yang1998 11 months ago
parent
commit
d640deadfb

BIN
src/assets/imgs/deck/page_zhcj/menu-zhcj-7.png


+ 21 - 5
src/router/index.js

@@ -1,6 +1,6 @@
 import Vue from 'vue'
 import Router from 'vue-router'
-import { getCookie } from '@/utils/cookie'
+import {delCookie, getCookie} from '@/utils/cookie'
 import {GetUserInfo, getUserRootByUserId} from "@/services/user";
 
 Vue.use(Router)
@@ -27,6 +27,11 @@ const router = new Router({
       name: 'Cjjb',
       component: () => import('../views/shell/Page_cjjb.vue')
     },
+    {
+      path: '/zhnj',
+      name: 'Zhnj',
+      component: () => import('../views/shell/Page_zhnj.vue')
+    },
     // {
     //   path: '/vedio-test',
     //   name: 'VedioTest',
@@ -45,15 +50,26 @@ router.beforeEach((to, from, next) => {
     if(userToken){
       GetUserInfo().then(res => {
         console.log('用户的信息2',res.data)
+        if(res.code !== 200){
+          delCookie("cmnw_token")
+          next('/login')
+        }
+
 
         getUserRootByUserId(res.data.username).then(res2 => {
           console.log('拿到eusue取消年',res2.data)
-          let bol = Boolean(res2.data.find(i => i.permissionTitle.includes("驾驶舱查看")))
-          if(bol){
-            next()
+          if(res.code === 200){
+            let bol = Boolean(res2.data.find(i => i.permissionTitle.includes("驾驶舱查看")))
+            if(bol){
+              next()
+            }else{
+              location.href = '/cmnw_xmsb/'
+            }
           }else{
-            location.href = '/cmnw_xmsb/'
+            delCookie("cmnw_token")
+            next('/login')
           }
+
         })
       })
     }else{

+ 4 - 1
src/views/deck/pages/Page_zhcj.vue

@@ -44,7 +44,8 @@ export default {
         { id: 3, img: require('../../../assets/imgs/deck/page_zhcj/menu-zhcj-3.png'), title: '龙头企业', hasRight: true, disable_prod: false },
         { id: 4, img: require('../../../assets/imgs/deck/page_zhcj/menu-zhcj-4.png'), title: '智慧观测', hasRight: true, disable_prod: false },
         { id: 5, img: require('../../../assets/imgs/deck/page_zhcj/menu-zhcj-5.png'), title: '乡村振兴', hasRight: false, disable_prod: false },
-        { id: 6, img: require('../../../assets/imgs/deck/page_zhcj/menu-zhcj-6.png'), title: '长江禁捕', hasRight: false, disable_prod: false }
+        { id: 7, img: require('../../../assets/imgs/deck/page_zhcj/menu-zhcj-7.png'), title: '智慧农机', hasRight: false, disable_prod: false },
+        { id: 6, img: require('../../../assets/imgs/deck/page_zhcj/menu-zhcj-6.png'), title: '长江禁捕', hasRight: false, disable_prod: false },
       ],
       isProd: process.env.VUE_APP_MODE==='prod'
     }
@@ -60,6 +61,8 @@ export default {
       if(!(this.isProd&&item.disable_prod)) {
         if(item.id===6) {
           this.$router.push({ name: 'Cjjb' })
+        } else if(item.id===7) {
+          this.$router.push({ name: 'Zhnj' })
         } else {
           this.currentPage = item.id
         }

+ 31 - 3
src/views/deck/pages/layer_right/Page_scjt.vue

@@ -7,7 +7,7 @@
           <img width="24" src="@/assets/imgs/deck/page_zhcj/btn-back.png" alt="">
 <!--          <span class="text-28">返回</span>-->
         </div>
-        <ul class="cr-b1">
+        <ul class="other-b1">
           <li v-for="(item,index) in data_sta" :key="item.name">
             <img :src="item.icon" alt="">
             <div>
@@ -23,7 +23,7 @@
       <span class="box-title2">蔬菜集团列表</span>
       <div class="cr-b2">
         <el-table  v-if="isSubPanelIsShow" highlight-current-row :data="subTableData" class="table-default" @row-click="clickSubRow" height="72vh" >
-          <el-table-column label="监控点名称" width="130" label-class-name="title-ellipsis" prop="spjcmc" show-overflow-tooltip/>
+          <el-table-column label="监控点名称" min-width="180" label-class-name="title-ellipsis" prop="spjcmc" show-overflow-tooltip/>
           <el-table-column label="查看" min-width="90" prop="url" show-overflow-tooltip>
             <template #default="scope">
               <span :title="scope.url">查看视频</span>
@@ -71,7 +71,7 @@ export default {
     return {
       currentTown:'',
       data_sta: [
-        { name: '蔬菜集团', value: 'XX', unit: '个', icon: require('@/assets/imgs/deck/page_layer/icon-hzqy.png'),prop:'cnt' },
+        { name: '蔬菜集团', value: 'XX', unit: '个', icon: require('@/assets/imgs/deck/page_zhcj/icon-jtsl.png'),prop:'cnt' },
       ],
       tableData: [],
       isSubPanelIsShow:false,
@@ -180,6 +180,34 @@ export default {
     }
   }
 }
+.other-b1 {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: flex-start;
+  justify-content: center;
+
+  margin-bottom: 1vh;
+  li {
+    margin-right: 15px;
+    display: flex;
+    align-items: center;
+    img {
+      width: 141px;
+      //height: 116px;
+      margin-right: 15px;
+    }
+    &>div {
+      div {
+        display: flex;
+        align-items: center;
+        margin-top: 10px;
+        .text-28 {
+          margin-left: 10px;
+        }
+      }
+    }
+  }
+}
 
 
 </style>

+ 1 - 0
src/views/deck/pages/znfx_sub/ZnfxNcpcl.vue

@@ -669,6 +669,7 @@ export default {
       };
       myBridge.bridgeContent.addEventListener(listen, this);
       addLayer(this.layer_nyd);
+      this.$store.commit('changeToolLayers', [this.layer_nyd])
     },
     initDate() {
       this.yearArr = genRecentYears(2019);

+ 51 - 0
src/views/shell/Page_zhnj.vue

@@ -0,0 +1,51 @@
+<template>
+  <div>
+    <span id="back" title="返回" @click="handleBack"></span>
+    <iframe id="view" :src="sourceUrl" frameborder="0"></iframe>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'PageCjjb',
+  data() {
+    return {
+      sourceUrl: 'http://10.83.241.47:9090',
+    }
+  },
+  methods: {
+    handleBack() {
+      this.$router.push({ name: 'Deck' })
+    }
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+
+#view {
+  width: 100vw;
+  height: 100vh;
+}
+
+#back {
+  position: fixed;
+  left: 2vh;
+  top: 2vh;
+  display: block;
+  // width: 94px;
+  // height: 84px;
+  width: 1.12vw;
+  height: 1vw;
+  background: url('@/assets/imgs/home/btn-back.png') no-repeat;
+  background-size: cover;
+  cursor: pointer;
+  filter: opacity(0.8);
+  &:hover {
+    transform: scale(1.1);
+    filter: opacity(1);
+  }
+}
+
+</style>