zhuangyunsheng hai 1 ano
pai
achega
08b75a2b63

BIN=BIN
public/homeBg.png


+ 9 - 24
src/layout/components/NavBar/components/Breadcrumb.vue

@@ -18,37 +18,22 @@ const router = useRouter()
 const levelList = ref([])
 
 function getBreadcrumb() {
+    let matched = route.matched.filter(item => item.meta && item.meta.title);
+    
+    if (!isDashboard(matched[0])) matched.unshift({ path: "/home/index", meta: { title: "首页" }, redirect: "/" });
+    if (route && route.path.trim() === "/publicDomain") matched[matched.length - 1].meta.title = route.query.zcType && route.query.zcType.trim() || route.name;
 
-    let matched = route.matched.filter(item => item.meta && item.meta.title)
-
-    const first = matched[0]
-    if (!isDashboard(first)) {
-        matched = [{ path: '/home/index', meta: { title: '首页' } }].concat(matched)
-    }
-    levelList.value = matched.filter(
-        item => item.meta && item.meta.title && item.meta.breadcrumb !== false
-    )
+    levelList.value = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
 }
 function isDashboard(route) {
-    const name = route && route.name
-    if (!name) {
-        return false
-    }
-    return name.trim() === 'Index'
+    return route && route.name && route.name.trim() === "Index"
 }
-function handleLink(item) {
-    const { redirect, path } = item
-    if (redirect) {
-        router.push(redirect)
-        return
-    }
-    // router.push(path)
+function handleLink({ redirect, path }) {
+    redirect && router.push(redirect)
 }
 
 watchEffect(() => {
-    if (route.path.startsWith('/redirect/')) {
-        return
-    }
+    if (route.path.startsWith("/redirect/")) return
     getBreadcrumb()
 })
 getBreadcrumb()

+ 4 - 4
src/layout/components/NavBar/index.vue

@@ -13,21 +13,21 @@
             <Breadcrumb />
         </div>
         <div class="tjm_navbar_left" v-else>
-            <tjm-side-bar/>
+            <tjm-side-bar />
         </div>
         <div class="tjm_navbar_right">
             <div class="tjm_tools_container">
                 <full-screen-btn></full-screen-btn>
                 <menu-search></menu-search>
-                <layout-style-set></layout-style-set>
+                <!-- <layout-style-set></layout-style-set> -->
             </div>
             <div class="tjm_user_container">
                 <el-dropdown>
                     <el-avatar :size="36" :src="avatar" />
                     <template #dropdown>
                         <el-dropdown-menu>
-                        <el-dropdown-item @click='goUserInfo'>个人信息</el-dropdown-item>
-                        <el-dropdown-item @click="logout">退出登录</el-dropdown-item>
+                            <el-dropdown-item @click='goUserInfo'>个人信息</el-dropdown-item>
+                            <el-dropdown-item @click="logout">退出登录</el-dropdown-item>
                         </el-dropdown-menu>
                     </template>
                 </el-dropdown>

+ 21 - 20
src/router/constantRoutes.js

@@ -10,12 +10,10 @@ export const staticRoutes = [
         path: "/redirect",
         component: Layout,
         hidden: true,
-        children: [
-            {
-                path: "/redirect/:path(.*)",
-                component: () => import("@/views/redirect/index.vue")
-            }
-        ]
+        children: [{
+            path: "/redirect/:path(.*)",
+            component: () => import("@/views/redirect/index.vue")
+        }]
     },
     {
         path: "/login",
@@ -23,12 +21,6 @@ export const staticRoutes = [
         hidden: true,
         component: () => import("@/views/login/index.vue")
     },
-    {
-        path: "/404",
-        name: "404",
-        hidden: true,
-        component: () => import("@/views/404.vue")
-    },
     {
         path: "/noPermission",
         name: "noPermission",
@@ -56,16 +48,15 @@ export const staticRoutes = [
             {
                 path: "/index",
                 name: "Index",
-                component: () => import("@/views/home/home.vue"),
+                component: () => import("@/views/home/index.vue"),
                 alwaysShow: false,
                 meta: {
                     title: "首页",
-                    icon: "ep-Cpu",
-                    affix: false
+                    icon: "ep-home-filled",
+                    affix: true
                 },
                 children: []
-            },
-            {
+            }, {
                 path: "/workflow/:page*",
                 name: "workflow",
                 component: () => import("@/micro/index.vue"),
@@ -78,8 +69,7 @@ export const staticRoutes = [
                     micro: true  //底座必须加
                 },
                 children: []
-            },
-            {
+            }, {
                 path: "/userInfo",
                 name: "userInfo",
                 component: () => import("@/views/system/userInfo.vue"),
@@ -87,11 +77,22 @@ export const staticRoutes = [
                 hidden: true,
                 meta: {
                     title: "个人信息",
-                    icon: "ep-Cpu",
                     affix: false
                 },
                 children: []
             }
         ]
     }
+
+    // , {
+    //     path: "/publicDomain",
+    //     name: "publicDomain",
+    //     component: () => import("@/views/publicDomain/index.vue"),
+    //     alwaysShow: false,
+    //     hidden: true,
+    //     meta: {
+    //         title: "首页-领域公开"
+    //     },
+    //     children: []
+    // }
 ]

+ 5 - 3
src/store/permission.js

@@ -1,7 +1,6 @@
 import { staticRoutes } from "@/router/constantRoutes"
 import { dynamicRoutes } from "@/router/dynamicRoutes"
 
-const Micro = () => import("@/micro/index.vue")
 import { useUserStore } from "@/store/user.js"
 import Layout from "@/layout/index.vue"
 import ParentView from "@/components/ParentView/index.vue"
@@ -41,8 +40,11 @@ export const usePermissionStore = defineStore(
 )
 
 function filterAsyncRouter(asyncRouterMap, httpSave = true) {
-    const blackList = ["/system/dataList", "/progress"]
-    const hideList = ["/publicDomain", "/caseShare"
+    const blackList = ["/system/dataList",
+        "/progress", // 进度
+        "/policyShare/message" // 留言
+    ]
+    const hideList = ["/publicDomain",
         // "/workflow"
     ]
 

+ 0 - 104
src/views/home/components/LineChart.vue

@@ -1,104 +0,0 @@
-<script>
-import * as echarts from 'echarts'
-import { markRaw } from 'vue'
-
-export default {
-  data() {
-    return {
-      chartColumn: null,
-      option: {
-        grid:{
-          height:'75%',
-          top:'20px'
-        },
-        xAxis: {
-          type: 'category',
-          data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月','十二月']
-        },
-        yAxis: {
-          type: 'value'
-        },
-        series: [
-          {
-            data: [120, 200, 150, 80, 70, 110, 130, 150, 80, 70, 110, 130],
-            type: 'bar',
-            stack: 'a',
-            name: 'a',
-            color: '#3b75d2',
-            barWidth: '12'
-          },
-          {
-            data: [30, '100', 30, 20, 40, '100', 90, 30, '100', 30, 20, 90],
-            type: 'bar',
-            stack: 'a',
-            name: 'c',
-            color: '#e19053'
-          },
-        ]
-      }
-    }
-  },
-  mounted() {
-    const stackInfo = {}
-    for (let i = 0; i < this.option.series[0].data.length; ++i) {
-      for (let j = 0; j < this.option.series.length; ++j) {
-        const stackName = this.option.series[j].stack
-        if (!stackName) {
-          continue
-        }
-        if (!stackInfo[stackName]) {
-          stackInfo[stackName] = {
-            stackStart: [],
-            stackEnd: []
-          }
-        }
-        const info = stackInfo[stackName]
-        const data = this.option.series[j].data[i]
-        if (data && data !== '-') {
-          if (info.stackStart[i] == null) {
-            info.stackStart[i] = j
-          }
-          info.stackEnd[i] = j
-        }
-      }
-    }
-    for (let i = 0; i < this.option.series.length; ++i) {
-      const data = this.option.series[i].data
-      const info = stackInfo[this.option.series[i].stack]
-      for (let j = 0; j < this.option.series[i].data.length; ++j) {
-        // const isStart = info.stackStart[j] === i;
-        const isEnd = info.stackEnd[j] === i
-        const topBorder = isEnd ? 40 : 0
-        const bottomBorder = 0
-        data[j] = {
-          value: data[j],
-          itemStyle: {
-            borderRadius: [topBorder, topBorder, bottomBorder, bottomBorder]
-          }
-        }
-      }
-    }
-    this.initChart()
-  },
-  methods: {
-    initChart() {
-      this.chartColumn = markRaw(echarts.init(this.$refs.chartColumn))
-      this.chartColumn.setOption(this.option)
-      this.chartColumn.resize()
-    }
-  }
-}
-
-
-</script>
-
-<template>
-  <div ref="chartColumn" className="echarts"></div>
-</template>
-
-<style scoped lang="scss">
-.echarts {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 117
src/views/home/components/PieChart.vue

@@ -1,117 +0,0 @@
-<script setup>
-import * as echarts from 'echarts'
-
-const chartColumn = ref(null)
-const { proxy } = getCurrentInstance()
-const option = ref({
-  color: [
-    "#3b75d2",
-    "#ef8b45",
-    "#1E9BD1",
-    "#2058D9",
-    "#11B972",
-    "#829eec"
-  ],
-  backgroundColor: "#fff",
-  grid: {
-    bottom: 150,
-    left: 100,
-    right: "10%"
-  },
-  legend: {
-    orient: "vertical",
-    top: "middle",
-    right: "0%",
-    textStyle: {
-      fontSize: 12
-    },
-    icon: "roundRect",
-    data: [
-      "集装箱昼夜吞吐量(万TEU)",
-      "集装箱当前港存量(万TEU)",
-      "散杂货昼夜吞吐量(万TEU)",
-      "散杂货当前港存量(万TEU)",
-      "油品散货昼夜吞吐量(万TEU)",
-      "油品散货当前港存量(万TEU)"
-    ]
-  },
-  series: [
-    {
-      radius: ["40%", "71%"],
-      center: ["33%", "50%"],
-      type: "pie",
-      label: {
-        show: true,
-        formatter: "{c}%",
-        fontSize: 12, // 将 fontSize 直接放在 label 下
-        position: "outside"
-      },
-      emphasis: { // 将 emphasis 放在 label 外面
-        label: {
-          show: true
-        }
-      },
-      labelLine: {
-        show: true,
-        length: 10,
-        length2: 15
-      },
-      name: "民警训练总量",
-      data: [
-        { name: "集装箱昼夜吞吐量(万TEU)", value: 10 },
-        { name: "集装箱当前港存量(万TEU)", value: 10 },
-        { name: "散杂货昼夜吞吐量(万TEU)", value: 10 },
-        { name: "散杂货当前港存量(万TEU)", value: 10 },
-        { name: "油品散货昼夜吞吐量(万TEU)", value: 10 },
-        { name: "油品散货当前港存量(万TEU)", value: 20 }
-      ]
-    },
-    {
-      radius: ["40%", "44%"],
-      center: ["33%", "50%"],
-      type: "pie",
-      label: { show: false },
-      emphasis: { label: { show: false } },
-      labelLine: { show: false },
-      animation: false,
-      tooltip: { show: false },
-      data: [
-        { value: 1, itemStyle: { color: "rgba(250,250,250,0.3)" } }
-      ]
-    },
-    {
-      name: "外边框",
-      type: "pie",
-      clockwise: false,
-      scale: false,
-      center: ["33%", "50%"],
-      radius: ["75%", "75%"],
-      label: { show: false },
-      data: [
-        { value: 9, name: "", itemStyle: { borderWidth: 2, borderColor: "#ccc" } }
-      ]
-    }
-  ]
-})
-
-onMounted(() => {
-  initChart()
-})
-
-function initChart() {
-  chartColumn.value = echarts.init(proxy.$refs['chartColumn'])
-  chartColumn.value.setOption(option.value)
-  chartColumn.value.resize()
-}
-</script>
-
-<template>
-  <div ref="chartColumn" className="echarts"></div>
-</template>
-
-<style scoped lang="scss">
-.echarts {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 343
src/views/home/components/cutLineChart.vue

@@ -1,343 +0,0 @@
-<script>
-import * as echarts from 'echarts'
-import { markRaw } from 'vue'
-
-let legendData = ["应用", "服务", "注册用户", "活跃用户"]
-let xAxisData = ["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022"]
-let seriesData = [
-  487.51,
-  559.53,
-  644.56,
-  9754.83,
-  896.67,
-  1074.38,
-  1271.84,
-  1604.87,
-  1994.59,
-  2339.96,
-  9976.08,
-  3642.3,
-  4167.98,
-  4696.01,
-  5250.09,
-  5830.95,
-  16544.26,
-  7366.64,
-  8605.13,
-  9370.21,
-  10005.56,
-  11392.8,
-  12013.1
-]
-let seriesData1 = [
-  17962.52,
-  15055.58,
-  12055.65,
-  10055.51,
-  1511.15,
-  1671.5,
-  1902.52,
-  2268.84,
-  2723.55,
-  3001.28,
-  2768.44,
-  3329.61,
-  3600.97,
-  3871.99,
-  4063.25,
-  4263.67,
-  4642.5,
-  5025.3,
-  5375.1,
-  5809.9,
-  5933.2,
-  6490.3,
-  7100.6
-]
-let seriesData2 = [
-  12487.51,
-  11559.53,
-  11644.56,
-  12754.83,
-  11896.67,
-  11074.38,
-  11271.84,
-  11604.87,
-  11994.59,
-  12339.96,
-  12976.08,
-  13642.3,
-  14167.98,
-  14696.01,
-  15250.09,
-  15830.95,
-  16544.26,
-  17366.64,
-  18605.13,
-  19370.21,
-  18005.56,
-  18392.8,
-  18013.1
-]
-let seriesData3 = [
-  2962.52,
-  1055.58,
-  1164.65,
-  1324.51,
-  1511.15,
-  1671.5,
-  1902.52,
-  2268.84,
-  2723.55,
-  23001.28,
-  12768.44,
-  3329.61,
-  23600.97,
-  3871.99,
-  24063.25,
-  4263.67,
-  1642.5,
-  5025.3,
-  5375.1,
-  5809.9,
-  5933.2,
-  6490.3,
-  7100.6
-]
-export default {
-  data() {
-    return {
-      chartColumn: null,
-      option: {
-        backgroundColor: "#fff",
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow'
-          }
-        },
-        grid: {
-          top: '10%',
-          left: '2%',
-          right: '2%',
-          bottom: '5%',
-          height: '85%',
-          containLabel: true
-        },
-        legend: {
-          icon: 'rect',
-          right: "0%",
-          top: '2%',
-          itemWidth: 7,
-          itemHeight: 7,
-          itemGap: 15,
-          textStyle: {
-            color: '#000',
-            fontSize: 12
-          }
-        },
-        xAxis: {
-          boundaryGap: true,
-          data: xAxisData,
-          axisLine: {
-            lineStyle: {
-              color: "rgba(0, 0, 0, 0.4)"
-            }
-          },
-          axisTick: {
-            show: false
-          },
-          axisLabel: {
-            color: '#333'
-          }
-        },
-        yAxis: [{
-          name: '',
-          type: "value",
-          inverse: false,
-          splitLine: {
-            show: true,
-            lineStyle: {
-              color: 'rgba(0, 0, 0, 0.3)',
-              type: 'dashed'
-            }
-          },
-          axisLine: {
-            show: false,
-            lineStyle: {
-              color: "#0A5C95"
-            }
-          },
-          axisLabel: {
-            formatter: "{value}",
-            color: '#333',
-            fontSize: 12
-          },
-          nameTextStyle: {
-            color: '#333',
-            padding: [0, 0, 0, 15],
-            fontSize: 12
-          },
-          axisTick: {
-            show: false
-          }
-        }],
-        series: [
-          {
-            name: legendData[0],
-            type: "line",
-            symbol: 'circle',
-            showAllSymbol: true,
-            symbolSize: 0,
-            smooth: true,
-            itemStyle: {
-              color: `#00CBFE`,
-              lineStyle: {
-                color: `rgba(235, 86, 125, 1)`,
-                width: 1.5
-              },
-            },
-            areaStyle: {
-              color: {
-                type: 'linear',
-                x: 0,
-                y: 0,
-                x2: 0,
-                y2: 1,
-                colorStops: [{
-                  offset: 0,
-                  color: 'rgba(235, 86, 125, 0.9)'
-                }, {
-                  offset: 1,
-                  color: 'rgba(235, 86, 125, 0.3)'
-                }]
-              }
-            },
-            data: seriesData
-          },
-          {
-            name: legendData[1],
-            type: "line",
-            symbol: 'circle',
-            showAllSymbol: true,
-            symbolSize: 0,
-            smooth: true,
-            itemStyle: {
-              color: `#FFDF04`,
-              lineStyle: {
-                color: `#FFDF04`,
-                width: 1.5
-              },
-            },
-            areaStyle: {
-              color: {
-                type: 'linear',
-                x: 0,
-                y: 0,
-                x2: 0,
-                y2: 1,
-                colorStops: [{
-                  offset: 0,
-                  color: 'rgba(250, 224, 76, 0.9)'
-                }, {
-                  offset: 1,
-                  color: 'rgba(250, 224, 76, 0.1)'
-                }]
-              }
-            },
-            data: seriesData1
-          },
-          {
-            name: legendData[2],
-            type: "line",
-            symbol: 'circle',
-            showAllSymbol: true,
-            symbolSize: 0,
-            smooth: true,
-            itemStyle: {
-              color: `#55b678`,
-              lineStyle: {
-                color: `#55b678`,
-                width: 1.5
-              },
-            },
-            areaStyle: {
-              color: {
-                type: 'linear',
-                x: 0,
-                y: 0,
-                x2: 0,
-                y2: 1,
-                colorStops: [{
-                  offset: 0,
-                  color: 'rgba(85, 182, 120, 0.9)'
-                }, {
-                  offset: 1,
-                  color: 'rgba(85, 182, 120, 0.1)'
-                }]
-              }
-            },
-            data: seriesData2
-          },
-          {
-            name: legendData[3],
-            type: "line",
-            symbol: 'circle',
-            showAllSymbol: true,
-            symbolSize: 0,
-            smooth: true,
-            itemStyle: {
-              color: `#32C5C0`,
-              lineStyle: {
-                color: `rgba(74, 116, 204, 1)`,
-                width: 1.5
-              },
-            },
-            areaStyle: {
-              color: {
-                type: 'linear',
-                x: 0,
-                y: 0,
-                x2: 0,
-                y2: 1,
-                colorStops: [{
-                  offset: 0,
-                  color: 'rgba(74, 116, 204, 0.9)'
-                }, {
-                  offset: 1,
-                  color: 'rgba(74, 116, 204, 0.1)'
-                }]
-              }
-            },
-            data: seriesData3
-          }
-          // 如有更多系列,请按照同样方式添加
-        ]
-      }
-    }
-  },
-  mounted() {
-    this.initChart()
-  },
-  methods: {
-    initChart() {
-      this.chartColumn = markRaw(echarts.init(this.$refs['chartColumn']))
-      this.chartColumn.setOption(this.option)
-      this.chartColumn.resize()
-    }
-  }
-}
-
-
-</script>
-
-<template>
-  <div ref="chartColumn" className="echarts"></div>
-</template>
-
-<style scoped lang="scss">
-.echarts {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 10
src/views/home/home.vue

@@ -1,10 +0,0 @@
-<template>
-  <div class="main">
-  </div>
-</template>
-
-<script>
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 19
src/views/home/homeShow.vue

@@ -1,19 +0,0 @@
-<template>
-    <div  class="iframeContent">
-         <iframe src="/iframe" sandbox="allow-scripts allow-forms allow-same-origin" frameborder="0" width="100%"  height="100vh"></iframe>  
-          <object data="http://10.205.81.73/qdpiot/web/BICRA5256" width="600" height="400">
-          <p>您的浏览器不支持显示嵌入的内容。</p>
-        </object>
-    </div>
-</template>
-
-<script setup>
-
-</script>
-
-<style lang='scss'>
-    .iframeContent{
-      border:1px  solid red;
-      // height: 86vh;
-    }
-</style>

+ 212 - 63
src/views/home/index.vue

@@ -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>

+ 13 - 0
src/views/home/main.js

@@ -0,0 +1,13 @@
+export const columns = [
+    { label: "政策名称", props: "name" },
+    { label: "政策类别", props: "zcType" },
+    { label: "发布人", props: "createName" },
+    { label: "发布单位", props: "companyName" },
+    { label: "联系方式", props: "contactPhone" },
+    { label: "发布日期", props: "createTime" }
+]
+
+export const storageTypeDic = [
+    { label: "政策文件", value: "文件类", title: "重点信息领域政策公开" },
+    { label: "政策解读", value: "解读类", title: "重点信息领域政策解读" }
+]

+ 10 - 3
src/views/publicDomain/index.vue

@@ -15,7 +15,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="政策类别">
-                    <el-select v-model="params.zcType" clearable placeholder="请选择政策类别">
+                    <el-select v-model="params.zcType" :disabled="$route.query.zcType" clearable placeholder="请选择政策类别">
                         <el-option v-for="item in typeDic" :key="item" :label="item" :value="item"></el-option>
                     </el-select>
                 </el-form-item>
@@ -64,7 +64,7 @@ import { columns } from "./main";
 
 import yhPagination from "@/components/Pagination/index.vue";
 import policyDetail from "@/views/manage/policyShare/dialog.vue";
-import policyLink from "./link.vue";
+import policyLink from "@/views/publicDomain/link/index.vue";
 
 export default {
     components: {
@@ -97,6 +97,10 @@ export default {
     },
 
     mounted() {
+        if (this.$route.query.zcType) this.params["zcType"] = this.$route.query.zcType;
+        if (this.$route.query.inWhType) this.params["inWhType"] = this.$route.query.inWhType;
+        if (this.$route.query.name) this.params["name"] = this.$route.query.name;
+
         this.reloadTable();
     },
 
@@ -128,6 +132,9 @@ export default {
                 isInWh: 1,
                 status: "done"
             }
+            if (this.$route.query.zcType) this.params["zcType"] = this.$route.query.zcType;
+            if (this.$route.query.inWhType) this.params["inWhType"] = this.$route.query.inWhType;
+            
             this.reloadTable();
         },
 
@@ -138,7 +145,7 @@ export default {
 
         table_link(row) {
             this.dialog.link = true;
-            nextTick(() => this.$refs.policyLink.open().setData(row));
+            nextTick(() => this.$refs.policyLink.open(row));
         },
 
         table_msg(row) {

+ 0 - 160
src/views/publicDomain/link.vue

@@ -1,160 +0,0 @@
-<template>
-    <el-dialog v-model="visible" title="政策关联" width="80%" @closed="$emit('closed')">
-        <el-card class="tjm_card_style_custom" shadow="never">
-            <div class="tjm_card_select">
-                <el-form class="tjm_card_select_left" :model="params" inline label-width="80px" label-position="left">
-                    <el-form-item label="政策编号">
-                        <el-input v-model="params.businessNo" clearable placeholder="请输入政策编号"></el-input>
-                    </el-form-item>
-                    <el-form-item label="项目名称">
-                        <el-input v-model="params.name" clearable placeholder="请输入项目名称"></el-input>
-                    </el-form-item>
-                    <el-form-item label="项目等级">
-                        <el-select v-model="params.zcLevel" clearable placeholder="请选择项目等级">
-                            <el-option v-for="item in levelDic" :key="item" :label="item" :value="item"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="项目类别">
-                        <el-select v-model="params.zcType" clearable placeholder="请选择项目类别">
-                            <el-option v-for="item in typeDic" :key="item" :label="item" :value="item"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="状态">
-                        <el-select v-model="params.isLand" clearable placeholder="请选择状态">
-                            <el-option v-for="(label, key) in statusDic" :key="key" :label="label" :value="parseInt(key)"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="填报日期">
-                        <el-date-picker v-model="createTime" type="daterange" value-format="YYYY-MM-DD" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
-                    </el-form-item>
-
-                    <el-form-item>
-                        <el-button type="primary" icon="search" @click="reloadTable">搜索</el-button>
-                        <el-button icon="refresh-right" @click="reset">重置</el-button>
-                    </el-form-item>
-                </el-form>
-            </div>
-            <el-divider></el-divider>
-
-            <div class="tjm_card_table">
-                <el-table v-loading="loading" row-key="id" header-cell-class-name="tjm_card_table_header" height="400" :data="tableData" border @row-click="(row, column) => !column.fixed && table_detail(row)">
-                    <el-table-column type="index" label="序号" width="55"></el-table-column>
-                    <template v-for="(item, index) in link_columns" :key="index">
-                        <el-table-column :label="item.label" :prop="item.props" :width="item.width || 180" show-overflow-tooltip>
-                            <template #default="scope">{{ columnFormat(scope.row, item.props) }}</template>
-                        </el-table-column>
-                    </template>
-                    <el-table-column label="操作" fixed="right" width="100">
-                        <template #default="scope">
-                            <el-button type="primary" link icon="tickets" @click.stop="table_detail(scope.row)">详情</el-button>
-                        </template>
-                    </el-table-column>
-                </el-table>
-            </div>
-            <div class="tjm_card_pagination">
-                <yh-pagination v-model:pageNo="params.page" v-model:pageSize="params.size" :total="total" @paginationChange="reloadTable"></yh-pagination>
-            </div>
-        </el-card>
-    </el-dialog>
-
-    <policy-strive-detail v-if="dialog.detail" ref="policyStriveDetail" @closed="dialog.detail = false"></policy-strive-detail>
-</template>
-
-<script>
-import API from "@/api/policy/strive";
-import { levelDic, typeDic } from "@/views/policyShare/main";
-import { statusDic } from "@/views/manage/policyStrive/main";
-import { link_columns } from "./main";
-
-import yhPagination from "@/components/Pagination/index.vue";
-import policyStriveDetail from "@/views/policyStrive/explain.vue";
-
-export default {
-    emits: ["closed"],
-    
-    components: {
-        yhPagination,
-        policyStriveDetail
-    },
-
-    data() {
-        return {
-            link_columns, levelDic, typeDic, statusDic,
-            visible: false,
-
-            loading: false,
-            createTime: [],
-            params: {
-                page: 1,
-                size: 10,
-                status: "done",
-                docNo: null
-            },
-
-            total: 0,
-            tableData: [],
-
-            dialog: {
-                detail: false
-            }
-        }
-    },
-
-    methods: {
-        open() {
-            this.visible = true;
-            return this;
-        },
-
-        setData(data) {
-            this.params.docNo = data.docNo;
-            this.reloadTable();
-        },
-
-        columnFormat(row, props) {
-            if (props == "status") return statusDic[row.isLand] || "";
-            if (props == "landAmount") return row.isLand == 1 && row[props] || "";
-            return row[props];
-        },
-
-        reloadTable() {
-            this.params.beginCreateTime = this.createTime && this.createTime.length && this.createTime[0] + " 00:00:00" || null;
-            this.params.endCreateTime = this.createTime && this.createTime.length && this.createTime[1] + " 23:59:59" || null;
-
-            this.loading = true;
-            API.get(this.params).then(res => {
-                this.loading = false;
-                if (res.code === 200) {
-                    this.tableData = res.data.records;
-                    this.total = res.data.total;
-                } else ElMessage.error(res.msg);
-            }).catch(() => this.loading = false);
-        },
-
-        reset() {
-            this.createTime = [];
-            for (const key in this.params) {
-                if (key == "page") this.params[key] = 1;
-                else if (key == "size") this.params[key] = 10;
-                else if (key == "status" || key != "docNo") this.params[key] = null;
-            }
-            this.reloadTable();
-        },
-
-        table_detail(row) {
-            this.dialog.detail = true;
-            nextTick(() => this.$refs.policyStriveDetail.open("detail").setData(row.id));
-        }
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-.tjm_card_style_custom {
-  border: none;
-
-  :deep(.el-card__body) {
-    padding: 0;
-  }
-}
-</style>

+ 32 - 0
src/views/publicDomain/link/index.vue

@@ -0,0 +1,32 @@
+<template>
+    <el-dialog v-model="visible" title="政策关联" width="80%" @closed="$emit('closed')">
+        <policy-link-strive :docNo="docNo"></policy-link-strive>
+    </el-dialog>
+</template>
+
+<script>
+import policyLinkStrive from "@/views/publicDomain/link/strive.vue";
+
+export default {
+    emits: ["closed"],
+    
+    components: {
+        policyLinkStrive
+    },
+
+    data() {
+        return {
+            visible: false,
+            docNo: ""
+        }
+    },
+
+    methods: {
+        open(data) {
+            this.visible = true;
+            this.docNo = data.docNo;
+            return this;
+        }
+    }
+}
+</script>

+ 153 - 0
src/views/publicDomain/link/strive.vue

@@ -0,0 +1,153 @@
+<template>
+    <el-card class="tjm_card_style_custom" shadow="never">
+        <div class="tjm_card_select">
+            <el-form class="tjm_card_select_left" :model="params" inline label-width="80px" label-position="left">
+                <el-form-item label="政策编号">
+                    <el-input v-model="params.businessNo" clearable placeholder="请输入政策编号"></el-input>
+                </el-form-item>
+                <el-form-item label="项目名称">
+                    <el-input v-model="params.name" clearable placeholder="请输入项目名称"></el-input>
+                </el-form-item>
+                <el-form-item label="项目等级">
+                    <el-select v-model="params.zcLevel" clearable placeholder="请选择项目等级">
+                        <el-option v-for="item in levelDic" :key="item" :label="item" :value="item"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="项目类别">
+                    <el-select v-model="params.zcType" clearable placeholder="请选择项目类别">
+                        <el-option v-for="item in typeDic" :key="item" :label="item" :value="item"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="状态">
+                    <el-select v-model="params.isLand" clearable placeholder="请选择状态">
+                        <el-option v-for="(label, key) in statusDic" :key="key" :label="label" :value="parseInt(key)"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="填报日期">
+                    <el-date-picker v-model="createTime" type="daterange" value-format="YYYY-MM-DD" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+                </el-form-item>
+
+                <el-form-item>
+                    <el-button type="primary" icon="search" @click="reloadTable">搜索</el-button>
+                    <el-button icon="refresh-right" @click="reset">重置</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
+        <el-divider></el-divider>
+
+        <div class="tjm_card_table">
+            <el-table v-loading="loading" row-key="id" header-cell-class-name="tjm_card_table_header" height="400" :data="tableData" border @row-click="(row, column) => !column.fixed && table_detail(row)">
+                <el-table-column type="index" label="序号" width="55"></el-table-column>
+                <template v-for="(item, index) in link_columns" :key="index">
+                    <el-table-column :label="item.label" :prop="item.props" :width="item.width || 180" show-overflow-tooltip>
+                        <template #default="scope">{{ columnFormat(scope.row, item.props) }}</template>
+                    </el-table-column>
+                </template>
+                <el-table-column label="操作" fixed="right" width="100">
+                    <template #default="scope">
+                        <el-button type="primary" link icon="tickets" @click.stop="table_detail(scope.row)">详情</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
+        <div class="tjm_card_pagination">
+            <yh-pagination v-model:pageNo="params.page" v-model:pageSize="params.size" :total="total" @paginationChange="reloadTable"></yh-pagination>
+        </div>
+    </el-card>
+
+    <strive-detail v-if="dialog" ref="striveDetail" @closed="dialog = false"></strive-detail>
+</template>
+
+<script>
+import API from "@/api/policy/strive";
+import { levelDic, typeDic } from "@/views/policyShare/main";
+import { statusDic } from "@/views/manage/policyStrive/main";
+import { link_columns } from "@/views/publicDomain/main";
+
+import yhPagination from "@/components/Pagination/index.vue";
+import striveDetail from "@/views/policyStrive/explain.vue";
+
+export default {
+    components: {
+        yhPagination,
+        striveDetail
+    },
+
+    props: {
+        docNo: { type: String, default: "" },
+    },
+
+    data() {
+        return {
+            link_columns, levelDic, typeDic, statusDic,
+
+            loading: false,
+            createTime: [],
+            params: {
+                page: 1,
+                size: 10,
+                status: "done",
+                docNo: this.docNo
+            },
+
+            total: 0,
+            tableData: [],
+
+            dialog: false
+        }
+    },
+
+    mounted() {
+        this.reloadTable();
+    },
+
+    methods: {
+        columnFormat(row, props) {
+            if (props == "status") return statusDic[row.isLand] || "";
+            if (props == "landAmount") return row.isLand == 1 && row[props] || "";
+            return row[props];
+        },
+
+        reloadTable() {
+            this.params.beginCreateTime = this.createTime && this.createTime.length && this.createTime[0] + " 00:00:00" || null;
+            this.params.endCreateTime = this.createTime && this.createTime.length && this.createTime[1] + " 23:59:59" || null;
+
+            this.loading = true;
+            API.get(this.params).then(res => {
+                this.loading = false;
+                if (res.code === 200) {
+                    this.tableData = res.data.records;
+                    this.total = res.data.total;
+                } else ElMessage.error(res.msg);
+            }).catch(() => this.loading = false);
+        },
+
+        reset() {
+            this.createTime = [];
+            this.params = {
+                page: 1,
+                size: 10,
+                status: "done",
+                docNo: this.docNo
+            }
+
+            this.reloadTable();
+        },
+
+        table_detail(row) {
+            this.dialog = true;
+            nextTick(() => this.$refs.striveDetail.open("detail").setData(row.id));
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.tjm_card_style_custom {
+  border: none;
+
+  :deep(.el-card__body) {
+    padding: 0;
+  }
+}
+</style>