xieqy 2 роки тому
батько
коміт
3ead861bb3

Різницю між файлами не показано, бо вона завелика
+ 7 - 7
public/config.js


+ 3 - 1
src/utils/request.ts

@@ -1,5 +1,5 @@
 import axios from 'axios'
-import { MessageBox, Message } from 'element-ui'
+import { MessageBox, Message, Notification } from 'element-ui'
 import store from '@/store'
 import { geteSessionStorage } from '@/utils/auth'
 import qs from 'qs'
@@ -119,6 +119,7 @@ service.interceptors.response.use(
     if (res.code === -1) {
       if (!res.message || res.message.length < 100) {
         console.log(res.message || 'Error')
+        // Notification.error(res.message || 'Error')
         // Message({
         //   message: res.message || 'Error',
         //   type: 'error',
@@ -126,6 +127,7 @@ service.interceptors.response.use(
         // })
       } else {
         console.log('系统错误')
+        // Notification.error('系统错误')
         // Message({
         //   message: '系统错误',
         //   type: 'error',

+ 5 - 13
src/views/groupPage/baseMap/baseMap.vue

@@ -10,26 +10,18 @@ import EchartsMap from '@/views/groupPage/baseMap/components/EchartsMap.vue'
 import ProjectMap from '@/views/groupPage/baseMap/components/ProjectMap.vue'
 export default {
   name: 'bigScreenBaseMap', //大屏背景
-  components: {
-    EchartsMap,
-    ProjectMap
-  },
-  props: {
-    show: {}
+  components: { EchartsMap, ProjectMap },
+  computed: {
+    showGroupPage() {
+      return this.$store.state.bigScreen.isShowGroupPage
+    }
   },
   data() {
     return {
-      showGroupPage: null,
       showProjectPage: null
     }
   },
   watch: {
-    show: {
-      handler(val) {
-        this.showGroupPage = val
-      },
-      immediate: true
-    },
     showGroupPage(n, o) {
       this.showProjectPage = n ? false : true
     }

+ 2 - 2
src/views/groupPage/baseMap/components/EchartsMap.vue

@@ -785,8 +785,8 @@ export default {
         if (e.value == null) return
         that.debounce(() => {
           that.$store.state.bigScreen.currentMenuItem = {
-            name: e.name.split('项目')[0],
-            value: 'HB06',
+            name: e.name,
+            value: e.data.datas.prjNoLoc,
             pid: 2
           }
         }, 600)

+ 2 - 9
src/views/groupPage/baseMap/components/ProjectMap.vue

@@ -70,15 +70,7 @@ export default {
   watch: {
     show: {
       handler(val) {
-        if (val) {
-          // this.$nextTick(() => {
-          //   this.initData().then((result) => {
-          //     this.addToMap()
-          //   })
-          // })
-        } else {
-          this.resetData()
-        }
+        if (!val) this.resetData()
       },
       immediate: true
     },
@@ -111,6 +103,7 @@ export default {
     },
     //加载地图
     addToMap() {
+      console.log('项目地图调用一次')
       var viewer = new Cesium.Viewer('ProjectMap', {
         navigation: false,
         contextOptions: {

+ 1 - 0
src/views/groupPage/districtPageModules/customTools/pbsTree.vue

@@ -603,6 +603,7 @@ export default {
     },
     //外部调用清除
     externalClear() {
+      if (!window.viewer) return
       this.clearRangeSymbol()
       this.clearWall()
       if (Cesium.defined(pbsCustomDataSource)) {

+ 1 - 2
src/views/groupPage/districtPageModules/index.vue

@@ -57,9 +57,8 @@ import DecisionSupport from '@/views/groupPage/districtPageModules/decisionSuppo
   }
 })
 export default class districtPageModules extends Vue {
-  @Prop({ type: Boolean, default: false }) show!: boolean
   get showDistrictPage() {
-    return this.show
+    return !this.$store.state.bigScreen.isShowGroupPage
   }
   get districtModuleName() {
     return this.$store.state.bigScreen.currentActive

+ 1 - 4
src/views/groupPage/groupPageModules/ContractInfo.vue

@@ -5,7 +5,7 @@
     enter-active-class="animate__slideInLeft"
     leave-active-class="animate__slideOutLeft"
   >
-    <div class="widget-ContractInfo" v-if="show">
+    <div class="widget-ContractInfo">
       <div class="head">
         <div class="title">
           <div class="icon"></div>
@@ -83,9 +83,6 @@ export default {
     ComBatteryChart,
     ComLineChart
   },
-  props: {
-    show: {}
-  },
   data() {
     return {
       url,

+ 1 - 7
src/views/groupPage/groupPageModules/IndexStatistic.vue

@@ -5,7 +5,7 @@
     enter-active-class="animate__zoomIn"
     leave-active-class="animate__zoomOut"
   >
-    <div class="widget-IndexStatistic" v-if="show">
+    <div class="widget-IndexStatistic">
       <div class="boxpanel">
         <div class="statisticitem" :class="'statisticitem' + index" v-for="(item, index) in dataList" :key="item.name">
           <div class="itemName">{{ item.name }}</div>
@@ -21,9 +21,6 @@ import { getRequestResult } from '@/views/groupPage/apis'
 import { setNullAndUndefinedEmpty } from '@/views/groupPage/util'
 export default {
   name: 'IndexStatistic', //指标统计
-  props: {
-    show: {}
-  },
   data() {
     return {
       dataList: [
@@ -43,9 +40,6 @@ export default {
     }
   },
   watch: {
-    show: {
-      handler(n, o) {}
-    },
     code: {
       handler(n, o) {
         Object.assign(this.$data, this.$options.data())

+ 1 - 5
src/views/groupPage/groupPageModules/ProjectInfo.vue

@@ -5,7 +5,7 @@
     enter-active-class="animate__slideInRight"
     leave-active-class="animate__slideOutRight"
   >
-    <div class="widget-ProjectInfo" v-if="show">
+    <div class="widget-ProjectInfo">
       <div class="head">
         <div class="title">
           <div class="icon"></div>
@@ -74,9 +74,6 @@ export default {
     ComStatisticPieChart,
     ComBarChart
   },
-  props: {
-    show: {}
-  },
   data() {
     return {
       statusList: [
@@ -95,7 +92,6 @@ export default {
     }
   },
   watch: {
-    show(n, o) {},
     code: {
       handler(n, o) {
         Object.assign(this.$data, this.$options.data())

+ 1 - 5
src/views/groupPage/groupPageModules/ProjectStatistic.vue

@@ -5,7 +5,7 @@
     enter-active-class="animate__slideInUp"
     leave-active-class="animate__slideOutDown"
   >
-    <div class="widget-ProjectStatistic" v-if="show">
+    <div class="widget-ProjectStatistic">
       <div class="content-info">
         <div class="info-item" v-for="(item, index) of prjList" :key="item.name">
           <el-checkbox v-model="item.status"></el-checkbox>
@@ -23,9 +23,6 @@ import Vue from 'vue'
 import { getRequestResult } from '@/views/groupPage/apis'
 export default {
   name: 'ProjectStatistic', //项目信息统计
-  props: {
-    show: {}
-  },
   data() {
     return {
       prjList: [],
@@ -39,7 +36,6 @@ export default {
     this.getPageData()
   },
   watch: {
-    show(n, o) {},
     prjList: {
       handler(val, o) {
         if (!this.prjInfo) return

+ 5 - 8
src/views/groupPage/groupPageModules/index.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="widget-groupPageModules" v-if="showGroupPage">
     <!--左侧模块-->
-    <ContractInfo :show="showGroupPage" />
+    <ContractInfo />
     <!--中部模块-->
-    <IndexStatistic :show="showGroupPage" />
+    <IndexStatistic />
     <!--右侧模块-->
-    <ProjectInfo :show="showGroupPage" />
+    <ProjectInfo />
     <!--底部模块-->
-    <ProjectStatistic :show="showGroupPage" />
+    <ProjectStatistic />
   </div>
 </template>
 
@@ -25,12 +25,9 @@ export default {
     ProjectInfo,
     IndexStatistic
   },
-  props: {
-    show: {}
-  },
   computed: {
     showGroupPage() {
-      return this.show
+      return this.$store.state.bigScreen.isShowGroupPage
     }
   }
 }

+ 10 - 6
src/views/groupPage/header/header.vue

@@ -172,7 +172,7 @@ export default {
       } else {
         this.menuList = []
         this.$store.state.bigScreen.groupName = label
-        this.$store.state.bigScreen.groupCodeValue = pid == 0 ? value : label //设置指标代码,总公司为0,分公司为指标名称
+        this.$store.state.bigScreen.groupCodeValue = pid == 0 ? value : label //设置指标代码,总公司为null,分公司为指标名称
         this.$store.state.bigScreen.isShowGroupPage = true //切换显示为公司级大屏
       }
     },
@@ -305,12 +305,16 @@ export default {
     },
     async onProjectSelect() {
       const row = this.currentProjectInfo
-      // 这里设置当前项目
-      setParams(row.gcfw)
-      const { id } = row || {}
+      const { id, geo_info, gcfw, wkid } = row || {}
+      if (!geo_info || !wkid) {
+        this.$message.info('此项目暂未设置GIS信息(geo_info,wkid)')
+        return
+      }
+      // 这里设置当前项目信息
+      setParams(row)
       this.$store.commit('project/UPDATE', row)
-      setSessionStorage('initPosition', row.geo_info) //项目初始位置
-      setSessionStorage('currentPrj', row.id) //项目ID
+      setSessionStorage('initPosition', geo_info) //项目初始位置
+      setSessionStorage('currentPrj', id) //项目ID
       if (id) {
         const { result } = await setProjectKey(id)
         if (result) {

+ 3 - 3
src/views/groupPage/index.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="widget-groupPage">
     <!--地图模块-->
-    <BaseMap :show="showGroupPage" />
+    <BaseMap />
     <!--头部菜单模块-->
     <Header />
     <!--集团、分公司级页面模块-->
-    <GroupPageModules :show="showGroupPage" />
+    <GroupPageModules />
     <!--项目级页面模块-->
-    <DistrictPageModules :show="!showGroupPage" />
+    <DistrictPageModules />
   </div>
 </template>