xieqy 2 years ago
parent
commit
8b07482faa

+ 29 - 0
src/store/modules/bigScreen.ts

@@ -11,6 +11,7 @@ const groupPageInfo = () => {
 }
 const getDefaultState = () => {
   return {
+    //初始范围
     initView: {
       destination: { x: -2002099.8064685483, y: 5125053.48587751, z: 3240386.7848629407 },
       orientation: {
@@ -19,6 +20,19 @@ const getDefaultState = () => {
         roll: 6.283185307179586
       }
     },
+    //三维图层
+    sceneLayerList: [
+      'NETWORK_SJ_PSWS@sxgk#1',
+      'NETWORK_SJ_PSYS@sxgk#1',
+      'NETWORK_SJ_PSWS_Node@sxgk#1',
+      'NETWORK_SJ_PSYS_Node@sxgk#1',
+      'TF_SJ_PSYS_JG_B_3D@sxgk#1',
+      'TF_SJ_PSYS_JG_B_3D@sxgk#2',
+      'TF_SJ_PSWS_JG_B_3D@sxgk#2',
+      'TF_SJ_PSWS_JG_B_3D@sxgk#1'
+    ],
+    //解决点击冲突
+    isClickingPipe: false,
     //地图配置信息
     tdttoken: '75293e320524bb2be0a5f14fa887e46f',
     mapConfig: null,
@@ -57,6 +71,12 @@ function delOne(arr, str) {
 const mutations = {
   SET_GISSOURCE: (state, payload) => {
     state.mapConfig = payload
+  },
+  Active_PipeUnitInfo: (state, data) => {
+
+  },
+  Deactive_PipeUnitInfo: (state, data) => {
+
   },
   SET_TOOL: (state, data) => {
     state.currentTool = data.name
@@ -88,6 +108,7 @@ function short(key) {
   return key.substring(key.indexOf("_") + 1, key.length)
 }
 const actions = {
+  //数据服务资源替换
   initGISResource({ commit }) {
     return new Promise((resolve, reject) => {
       GetUserInitData({ platform: 1 }).then(res => {
@@ -123,6 +144,14 @@ const actions = {
         reject(err)
       })
     })
+  },
+  //部件查看使用时功能启动
+  activePipeUnitInfo({ commit, state }) {
+
+  },
+  //部件查看使用时功能结束
+  deactivePipeUnitInfo({ commit, state }) {
+
   },
   // 添加工具集
   changeToolList({ commit, state }, value) {

+ 10 - 15
src/views/groupPage/baseMap/components/ProjectMap.vue

@@ -48,16 +48,6 @@ const layer_lx = [
     value: 'lxfxfw'
   }
 ]
-const gLayerList = [
-  'NETWORK_SJ_PSWS@sxgk#1',
-  'NETWORK_SJ_PSYS@sxgk#1',
-  'NETWORK_SJ_PSWS_Node@sxgk#1',
-  'NETWORK_SJ_PSYS_Node@sxgk#1',
-  'TF_SJ_PSYS_JG_B_3D@sxgk#1',
-  'TF_SJ_PSYS_JG_B_3D@sxgk#2',
-  'TF_SJ_PSWS_JG_B_3D@sxgk#2',
-  'TF_SJ_PSWS_JG_B_3D@sxgk#1'
-]
 export default {
   name: 'ProjectMap', //三维底图
   components: {
@@ -93,6 +83,9 @@ export default {
   computed: {
     mapConfig() {
       return this.$store.state.bigScreen.mapConfig
+    },
+    gLayerList() {
+      return this.$store.state.bigScreen.sceneLayerList
     }
   },
   methods: {
@@ -121,6 +114,8 @@ export default {
         infoBox: false,
         selectionIndicator: false //设置绿色框框不可见
       })
+      viewer.scene.screenSpaceCameraController.minimumZoomDistance = 500 //最小缩放比例
+      viewer.scene.screenSpaceCameraController.maximumZoomDistance = 15000 //最大缩放比例
       this.viewer = viewer
       window.viewer = viewer
       this.$store.state.bigScreen.isInitViewer = true
@@ -336,9 +331,9 @@ export default {
           }.bind(this)
         )
       }
-      // setTimeout(() => {
-      //   this.defaultUpdepth()
-      // }, 5000)
+      setTimeout(() => {
+        this.defaultUpdepth()
+      }, 5000)
     },
     //地形加载
     addTerrain() {
@@ -375,8 +370,8 @@ export default {
       //默认抬升
       const style3D = new Cesium.Style3D()
       style3D.altitudeMode = 0
-      style3D.bottomAltitude = this.mapConfig.downDepth
-      gLayerList.forEach((item) => {
+      style3D.bottomAltitude = -10
+      this.gLayerList.forEach((item) => {
         var layer = layers.find(item)
         if (layer) {
           layer.style3D = style3D

+ 6 - 15
src/views/groupPage/components/OthersChart/ComRadarChart.vue

@@ -9,9 +9,7 @@ export default {
   name: 'ComRadarChart', //设计施工综合图表
   props: {
     chartData: {
-      default: () => {
-        return [0, 0, 0, 0, 0]
-      }
+      default: () => {}
     },
     title: {}
   },
@@ -26,9 +24,6 @@ export default {
     }
   },
   mounted() {
-    this.$nextTick(() => {
-      this.initialChart()
-    })
     //图表大小自适应
     window.addEventListener('resize', this.onResize)
   },
@@ -45,14 +40,10 @@ export default {
       }
     },
     initialChart() {
+      this.destroyChart()
       var that = this
-      var indicator = [
-        { text: '合同', max: 30 },
-        { text: '进度', max: 30 },
-        { text: '安全', max: 30 },
-        { text: '监测', max: 30 },
-        { text: '质量', max: 30 }
-      ]
+      that.symbol = 0
+      var indicator = this.chartData.index
       var dataArr = [
         {
           name: '数量',
@@ -96,7 +87,7 @@ export default {
             },
             opacity: 1 // 区域透明度
           },
-          value: this.chartData
+          value: this.chartData.data
         }
       ]
       let option = {
@@ -116,7 +107,7 @@ export default {
             color: '#fff',
             fontSize: fontSize(12),
             formatter: function (name) {
-              let res = name + that.chartData[that.symbol] + '个'
+              let res = name + ':' + that.chartData.data[that.symbol] + '个'
               that.symbol++
               return res
             }

+ 2 - 1
src/views/groupPage/districtPageModules/commonModules/SectorToolbar.vue

@@ -269,6 +269,8 @@ export default class SectorToolbar extends Vue {
     this.isRoaming = true
   } //地图选择面板点击事件
   layerItemClick(layerType, poiType) {
+    this.$message.info('网络安全原因,暂时无法切换!')
+    return
     if (layerType === this.selectTdtType) return
     this.initTianditu(layerType, poiType)
     this.labelOn = true
@@ -370,7 +372,6 @@ export default class SectorToolbar extends Vue {
       poiName +
       '&TILEMATRIXSET=w&TILEMATRIX={TileMatrix}&TILEROW={TileRow}&TILECOL={TileCol}&STYLE=default&FORMAT=tiles&tk=' +
       token
-
     const subdomains = ['0', '1', '2', '3', '4', '5', '6', '7']
     const imagelayers = this.viewer.imageryLayers
     const check = event

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

@@ -579,6 +579,7 @@ export default {
       rangeHandler.setInputAction((movement) => {
         var pickedObject = window.viewer.scene.pick(movement.position)
         this.clearRangeSymbol()
+        if (this.$store.state.bigScreen.isClickingPipe) return
         if (
           window.viewer.scene.pickPositionSupported &&
           Cesium.defined(pickedObject) &&

+ 5 - 2
src/views/groupPage/districtPageModules/pipeUnitInfo/index.vue

@@ -26,7 +26,7 @@
 </template>
 
 <script lang="ts">
-import _ from 'lodash'
+import _, { filter } from 'lodash'
 import Config from './config.json'
 import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
 import ComMapBox from '@/views/groupPage/components/ComMapBox.vue'
@@ -88,6 +88,7 @@ export default class pipeUnitInfo extends Vue {
     this.viewer = (window as any).viewer
 
     this.getDirc(() => {
+      this.$store.state.bigScreen.isClickingPipe = true
       this.apiUrls.sjfw = this.mapConfig.gisResource.tiplayers.config['sjfw'].url
       this.apiUrls.bjsmidfw = this.mapConfig.gisResource.tiplayers.config['bjsmidfw'].url
       this.apiUrls.sjdt = this.mapConfig.gisResource.maps.config['sjdt'].url
@@ -276,6 +277,7 @@ export default class pipeUnitInfo extends Vue {
       that.removeHightLight(that.selectPick)
       var pick = that.viewer.scene.drillPick(movement.position)
       if (pick.length != 0) {
+        pick = pick.filter((i) => typeof i.id == 'string')
         that.showSelect(pick)
       } else {
         this.close()
@@ -481,7 +483,7 @@ export default class pipeUnitInfo extends Vue {
    */
   location(geometry, completed) {
     const position = geometry.position
-    const location = Cesium.Cartographic.fromDegrees(position.x, position.y, position.z + 50)
+    const location = Cesium.Cartographic.fromDegrees(position.x, position.y, position.z + 500)
     const scenePosition = Cesium.Cartographic.fromDegrees(position.x, position.y, position.z)
     const cartesian3 = Cesium.Cartographic.toCartesian(location)
     ;(this.$refs['ComMapBox'] as any).setPosition(Cesium.Cartographic.toCartesian(scenePosition))
@@ -710,6 +712,7 @@ export default class pipeUnitInfo extends Vue {
   close() {
     ;(this.$refs['ComMapBox'] as any).remove()
     this.clearAllPrimitives()
+    this.$store.state.bigScreen.isClickingPipe = false
   }
 }
 </script>

+ 6 - 6
src/views/groupPage/districtPageModules/wisdomWarning/FocusOnWarning.vue

@@ -69,15 +69,15 @@ export default class FocusOnWarning extends Vue {
     let methodArr = []
     for (let index = 0; index < length; index++) {
       const item = showList[index]
-      if (!typeArr.find((e) => e.type == item.result.warningType)) {
-        typeArr.push({ type: item.result.warningType, children: [item] })
+      if (!typeArr.find((e) => e.type == item.warnIndexManageInfo.warningType)) {
+        typeArr.push({ type: item.warnIndexManageInfo.warningType, children: [item] })
       } else {
-        typeArr.find((e) => e.type == item.result.warningType).children.push(item)
+        typeArr.find((e) => e.type == item.warnIndexManageInfo.warningType).children.push(item)
       }
-      if (!methodArr.find((e) => e.method == item.result.warningMethod)) {
-        methodArr.push({ method: item.result.warningMethod, children: [item] })
+      if (!methodArr.find((e) => e.method == item.warnIndexManageInfo.warningMethod)) {
+        methodArr.push({ method: item.warnIndexManageInfo.warningMethod, children: [item] })
       } else {
-        methodArr.find((e) => e.method == item.result.warningMethod).children.push(item)
+        methodArr.find((e) => e.method == item.warnIndexManageInfo.warningMethod).children.push(item)
       }
     }
     this.typeList[0].num = methodArr.find((i) => i.method == 'BJ').children.length

+ 31 - 3
src/views/groupPage/districtPageModules/wisdomWarning/StatisticOfWI.vue

@@ -21,7 +21,7 @@
         </div>
         <div class="radarChartContent">
           <div class="rc-chart">
-            <ComRadarChart />
+            <ComRadarChart :chartData="chartData" />
           </div>
           <div class="rc-switch">
             <div
@@ -57,6 +57,7 @@ export default class StatisticOfWI extends Vue {
     { title: '报警指标', value: 0, color: ['#FFA16D', '#F02828'] },
     { title: '推测指标', value: 0, color: ['#02D4F3', '#0976FE'] }
   ]
+  chartData = { index: [], data: [] }
   get wisdomWarningInfo() {
     return this.$store.state.bigScreen.wisdomWarningInfo
   }
@@ -64,10 +65,16 @@ export default class StatisticOfWI extends Vue {
   onChangeMethod(val) {
     this.assembleData(val)
   }
+  @Watch('current')
+  onChangeTypeMethod(val) {
+    val == '重点关注'
+      ? this.filterArray(this.wisdomWarningInfo.filter((e) => e.concernExtent == '重点关注'))
+      : this.filterArray(this.wisdomWarningInfo.filter((e) => e.concernExtent == '一般关注'))
+  }
   assembleData(result) {
     let total = result.length,
-      bj = result.filter((i) => i.result.warningMethod == 'BJ').length,
-      tc = result.filter((i) => i.result.warningMethod == 'TC').length
+      bj = result.filter((i) => i.warnIndexManageInfo.warningMethod == 'BJ').length,
+      tc = result.filter((i) => i.warnIndexManageInfo.warningMethod == 'TC').length
     this.pcList.find((e) => e.title == '指标总数').value = total
     this.pcList.find((e) => e.title == '报警指标').value = bj
     this.pcList.find((e) => e.title == '推测指标').value = tc
@@ -75,6 +82,27 @@ export default class StatisticOfWI extends Vue {
     this.pcList.find((e) => e.title == '报警指标').percent = roundFun(bj / total, 3) * 100
     this.pcList.find((e) => e.title == '推测指标').percent = roundFun(tc / total, 3) * 100
     //
+    this.filterArray(result.filter((e) => e.concernExtent == '重点关注'))
+  }
+  filterArray(arr) {
+    let newData = this.arrayClassfication(arr)
+    let index = [],
+      data = []
+    for (let i in newData) {
+      data.push(newData[i].length)
+      index.push({ text: i, max: newData[i].length })
+    }
+    this.chartData = { index, data }
+  }
+  arrayClassfication(target) {
+    let newData = {}
+    target.forEach((item) => {
+      newData[item.warnIndexManageInfo.warningType] = [
+        ...(newData[item.warnIndexManageInfo.warningType] || []),
+        ...[item]
+      ]
+    })
+    return newData
   }
 }
 </script>

+ 2 - 2
src/views/groupPage/districtPageModules/wisdomWarning/TodayWarningList.vue

@@ -146,8 +146,8 @@ export default class TodayWarningList extends Vue {
     const length = showList.length
     for (let index = 0; index < length; index++) {
       const item = showList[index]
-      let name = this.types.find((i) => i.code == item.result.warningType)
-        ? this.types.find((i) => i.code == item.result.warningType).name
+      let name = this.types.find((i) => i.code == item.warnIndexManageInfo.warningType)
+        ? this.types.find((i) => i.code == item.warnIndexManageInfo.warningType).name
         : '监测'
       const type = {
         type: name,

+ 3 - 9
src/views/groupPage/districtPageModules/wisdomWarning/index.vue

@@ -14,7 +14,7 @@ import { Vue, Component, Prop } from 'vue-property-decorator'
 import FocusOnWarning from './FocusOnWarning.vue'
 import StatisticOfWI from './StatisticOfWI.vue'
 import TodayWarningList from './TodayWarningList.vue'
-import { getWarnInfoList, getWarnIndexObject } from '@/views/groupPage/apis'
+import { getWarnInfoList } from '@/views/groupPage/apis'
 //智慧预警模块
 @Component({
   name: 'wisdomWarning',
@@ -28,14 +28,8 @@ export default class wisdomWarning extends Vue {
     const result = await getWarnInfoList({})
     if (!result || !result.result) return
     const filterArr = result.result.filter((e) => e.isShow == '0' && e.isValid == '0')
-    const length = filterArr.length
-    let showList = []
-    for (let index = 0; index < length; index++) {
-      const item = filterArr[index]
-      const res = await getWarnIndexObject({ id: item.warnIndexId })
-      showList.push({ ...item, ...res })
-    }
-    this.$store.state.bigScreen.wisdomWarningInfo = showList
+    console.log(filterArr)
+    this.$store.state.bigScreen.wisdomWarningInfo = filterArr
   }
   destroyed() {
     this.$store.state.bigScreen.wisdomWarningInfo = null

+ 21 - 19
src/views/groupPage/groupPageModules/ProjectStatistic.vue

@@ -43,12 +43,14 @@ export default {
     prjList: {
       handler(val, o) {
         if (!this.prjInfo) return
-        let data = null
+        let data = [],
+          result = []
         let all = false
         val.forEach((item) => {
+          data = []
           if (item.name == '建管项目') {
             if (item.status) {
-              data = this.prjInfo
+              data = this.prjInfo.filter((item) => item.type !== '未移交')
               all = true
             } else {
               data = []
@@ -57,33 +59,33 @@ export default {
           }
           if (item.name == 'EPC项目') {
             if (item.status) {
-              if (!all) data = this.prjInfo.filter((item) => item.type === '建管/EPC')
+              if (!all) data = [...data, ...this.prjInfo.filter((item) => item.type === '建管/EPC')]
             } else {
-              if (all) data = this.prjInfo
-              else data = []
+              if (!all) data = []
             }
           }
           if (item.name == '暂停项目') {
             if (item.status) {
-              let zt = this.prjInfo.filter((item) => item.stage === '暂停阶段')
-              zt.forEach((c) => {
-                if (data.findIndex((item) => item.prjName == c.prjName) == -1) {
-                  data.push(c)
-                }
-              })
+              if (!all) {
+                let zt = this.prjInfo.filter((item) => item.stage === '暂停阶段')
+                zt.forEach((c) => {
+                  if (data.findIndex((item) => item.prjName == c.prjName) == -1) {
+                    data.push(c)
+                  }
+                })
+              }
             } else {
-              data = data.filter((item) => item.stage !== '暂停阶段')
+              if (!all) data = []
             }
           }
           if (item.name == '未移交项目') {
             if (item.status) {
-              if (!all) data = this.prjInfo.filter((item) => item.type === '未移交')
-            } else {
-              data = this.prjInfo.filter((item) => item.type !== '未移交')
+              data = [...data, ...this.prjInfo.filter((item) => item.type === '未移交')]
             }
           }
+          result = [...result, ...data]
         })
-        this.$store.state.bigScreen.groupProject = data
+        this.$store.state.bigScreen.groupProject = result
       },
       deep: true
     },
@@ -124,9 +126,9 @@ export default {
         if (this.groupName === '三峡分公司') this.prjInfo = this.prjInfo.filter((item) => item.branch == this.groupName)
         this.prjList = [
           { name: '建管项目', num: this.prjInfo.filter((item) => item.type !== '未移交').length, status: true },
-          { name: 'EPC项目', num: this.prjInfo.filter((item) => item.type === '建管/EPC').length, status: true },
-          { name: '暂停项目', num: this.prjInfo.filter((item) => item.stage === '暂停阶段').length, status: true },
-          { name: '未移交项目', num: this.prjInfo.filter((item) => item.type === '未移交').length, status: true }
+          { name: 'EPC项目', num: this.prjInfo.filter((item) => item.type === '建管/EPC').length, status: false },
+          { name: '暂停项目', num: this.prjInfo.filter((item) => item.stage === '暂停阶段').length, status: false },
+          { name: '未移交项目', num: this.prjInfo.filter((item) => item.type === '未移交').length, status: false }
         ]
         this.$store.state.bigScreen.groupProject = this.prjInfo
       })