|
|
@@ -1,74 +1,223 @@
|
|
|
<template>
|
|
|
- <div class="homepage">
|
|
|
- {{ $t('noep.test.home') }}
|
|
|
- <div>阿里巴巴普惠体-NO</div>
|
|
|
- <div class="ph">阿里巴巴普惠体-B</div>
|
|
|
- <div class="ph1">阿里巴巴普惠体-M</div>
|
|
|
- <div class="ph2">阿里巴巴普惠体-R</div>
|
|
|
- </div>
|
|
|
+ <img class="home-bg" src="/homeBg.png" />
|
|
|
+
|
|
|
+ <div class="home-container">
|
|
|
+ <el-form @submit.prevent @keyup.enter="name && toDomain({ name })">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="name" size="large" clearable placeholder="搜索">
|
|
|
+ <template #suffix>
|
|
|
+ <el-button link icon="search" @click="name && toDomain({ name })"></el-button>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="热搜词:">
|
|
|
+ <el-tag type="warning">政策</el-tag>
|
|
|
+ </el-form-item> -->
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-card class="home-container__tabs-card">
|
|
|
+ <el-tabs class="left-tabs" v-model="params.zcLevel" tab-position="left" @tab-change="reloadTable">
|
|
|
+ <el-tab-pane v-for="item in levelDic" :key="item" :label="item.slice(0, -1)" :name="item"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+ <el-card shadow="never">
|
|
|
+ <template #header>
|
|
|
+ <el-tabs v-model="params.inWhType" @tab-change="reloadTable">
|
|
|
+ <el-tab-pane v-for="item in storageTypeDic" :key="item.value" :label="item.label" :name="item.value"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </template>
|
|
|
+ <el-table v-loading="loading" row-key="id" header-cell-class-name="tjm_card_table_header" height="300px" :data="tableData" border @row-click="(row, column) => !column.fixed && table_detail(row)">
|
|
|
+ <template v-for="(item, index) in columns" :key="index">
|
|
|
+ <el-table-column :label="item.label" :prop="item.props" min-width="100" show-overflow-tooltip>
|
|
|
+ <template #default="scope">{{ columnFormat(scope.row, item.props) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-card class="home-container__domain">
|
|
|
+ <template #header>{{ domainTitle }}</template>
|
|
|
+ <el-row>
|
|
|
+ <el-col v-for="zcType in typeDic" :key="zcType" :span="8">
|
|
|
+ <el-button @click="toDomain({ zcType, inWhType: params.inWhType })">{{ zcType }}</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup>
|
|
|
-function getClientIP(onNewIP) {
|
|
|
- let MyPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
|
|
|
- let pc = new MyPeerConnection({
|
|
|
- iceServers: []
|
|
|
- });
|
|
|
- let noop = () => {
|
|
|
- };
|
|
|
- let localIPs = {};
|
|
|
- let ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g;
|
|
|
- let iterateIP = (ip) => {
|
|
|
- if (!localIPs[ip]) onNewIP(ip);
|
|
|
- localIPs[ip] = true;
|
|
|
- };
|
|
|
- pc.createDataChannel('');
|
|
|
- pc.createOffer().then((sdp) => {
|
|
|
- sdp.sdp.split('\n').forEach(function (line) {
|
|
|
- if (line.indexOf('candidate') < 0) return;
|
|
|
- line.match(ipRegex).forEach(iterateIP);
|
|
|
- });
|
|
|
- pc.setLocalDescription(sdp, noop, noop);
|
|
|
- }).catch((reason) => {
|
|
|
- });
|
|
|
- pc.onicecandidate = (ice) => {
|
|
|
- if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
|
|
|
- ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
|
|
|
- };
|
|
|
-}
|
|
|
+<script>
|
|
|
+import Share from "@/api/policy/share";
|
|
|
+import { levelDic, typeDic } from "@/views/policyShare/main";
|
|
|
+import { columns, storageTypeDic } from "./main";
|
|
|
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ columns, levelDic, typeDic, storageTypeDic,
|
|
|
+ name: "", // 筛选字段 -- 名称
|
|
|
|
|
|
-let config = {
|
|
|
- headers:{
|
|
|
+ loading: false,
|
|
|
+ params: {
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ status: "done",
|
|
|
+ zcLevel: levelDic[0],
|
|
|
+ inWhType: storageTypeDic[0].value
|
|
|
+ },
|
|
|
+ tableData: []
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
-// try {
|
|
|
-// getClientIP((ip) => {
|
|
|
-// config.headers['X-Forwarded-For'] = ip;
|
|
|
-// config.headers['X-Real-Ip'] = ip;
|
|
|
-// });
|
|
|
-// console.log(config)
|
|
|
-// } catch (ex) {
|
|
|
-// console.log(ex);
|
|
|
-// }
|
|
|
-</script>
|
|
|
+ computed: {
|
|
|
+ domainTitle() {
|
|
|
+ return storageTypeDic.find(s => s.value == this.params.inWhType).title
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
-<style lang='scss' scoped>
|
|
|
-.homepage {
|
|
|
- // color:red;
|
|
|
- // background: orange;
|
|
|
- height: 1000px;
|
|
|
- font-size: 28px;
|
|
|
-}
|
|
|
-.ph {
|
|
|
- font-family: 'Alibaba PuHuiTi B';
|
|
|
+ mounted() {
|
|
|
+ this.reloadTable();
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ columnFormat(row, props) {
|
|
|
+ if (props == "createTime") return row[props].split(" ")[0];
|
|
|
+ if (props == "status") return statusDic[row[props]] || "";
|
|
|
+ if (props == "isInWh") return whetherDic[row[props]] || "";
|
|
|
+ return row[props];
|
|
|
+ },
|
|
|
+
|
|
|
+ reloadTable() {
|
|
|
+ this.loading = true;
|
|
|
+ Share.get(this.params).then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.code === 200) this.tableData = res.data.records;
|
|
|
+ else ElMessage.error(res.msg);
|
|
|
+ }).catch(() => this.loading = false);
|
|
|
+ },
|
|
|
+
|
|
|
+ toDomain(query) {
|
|
|
+ this.$router.push({ path: '/publicDomain', query })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-.ph1 {
|
|
|
- font-family: 'Alibaba PuHuiTi M';
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.home-bg {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
}
|
|
|
-.ph2 {
|
|
|
- font-family: 'Alibaba PuHuiTi R';
|
|
|
+
|
|
|
+.home-container {
|
|
|
+ position: relative;
|
|
|
+ z-index: 100;
|
|
|
+ padding: 15px 20px;
|
|
|
+
|
|
|
+ .el-tabs :deep {
|
|
|
+ .el-tabs__active-bar {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-tabs__item.is-active {
|
|
|
+ background: var(--el-color-primary);
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-tabs__content {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .home-container__tabs-card > :deep(.el-card__body) {
|
|
|
+ display: flex;
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ .el-tabs.el-tabs--left {
|
|
|
+ margin-top: 40px;
|
|
|
+
|
|
|
+ .el-tabs__header {
|
|
|
+ justify-content: flex-start;
|
|
|
+ margin-right: 1px;
|
|
|
+
|
|
|
+ .el-tabs__nav-wrap::after {
|
|
|
+ width: 1px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ > .el-card {
|
|
|
+ flex-basis: 100%;
|
|
|
+ border: none;
|
|
|
+ border-radius: 0;
|
|
|
+
|
|
|
+ .el-card__header {
|
|
|
+ padding: 0;
|
|
|
+ border: none;
|
|
|
+
|
|
|
+ .el-tabs.el-tabs--top .el-tabs__header {
|
|
|
+ margin-bottom: 1px;
|
|
|
+
|
|
|
+ .el-tabs__nav-wrap::after {
|
|
|
+ height: 1px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-tabs__item {
|
|
|
+ padding: 0 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-card__body {
|
|
|
+ padding-right: 0;
|
|
|
+ padding-bottom: 0;
|
|
|
+
|
|
|
+ .el-table .el-table__header tr th {
|
|
|
+ background: #f4f4f4;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .home-container__domain {
|
|
|
+ margin-top: 18px;
|
|
|
+
|
|
|
+ :deep(.el-card__header) {
|
|
|
+ position: relative;
|
|
|
+ border-bottom: none;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 20px;
|
|
|
+ width: calc(100% - 40px);
|
|
|
+ height: 1px;
|
|
|
+ background: var(--el-card-border-color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.el-card__body) {
|
|
|
+ text-align: center;
|
|
|
+ padding-top: calc(var(--el-card-padding) + 10px);
|
|
|
+ padding-bottom: calc(var(--el-card-padding) - 10px);
|
|
|
+
|
|
|
+ .el-col {
|
|
|
+ margin-bottom: calc(var(--el-card-padding) + 10px);
|
|
|
+
|
|
|
+ .el-button {
|
|
|
+ --el-button-border-color: var(--el-text-color-primary);
|
|
|
+ --el-button-text-color: var(--el-text-color-primary);
|
|
|
+ padding: 30px 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|