xieqy 3 年之前
父節點
當前提交
01772d942b

+ 15 - 14
src/config/bigScreenConfig.js

@@ -1,3 +1,4 @@
+const BASE_URL = 'http://221.182.8.141:8090/iserver'
 export const appconfig = {
   //大屏地图服务
   'bigScreenMapService': {
@@ -12,7 +13,7 @@ export const appconfig = {
         {
           "dixing": {
             "name": "地形",
-            "url": "http://221.182.8.141:8090/iserver/services/3D-TF_PAPN_DEM-sxgk_base/rest/realspace/datas/TF_PAPN_DEM%40sxgk_base"
+            "url": BASE_URL + "/services/3D-TF_PAPN_DEM-sxgk_base/rest/realspace/datas/TF_PAPN_DEM%40sxgk_base"
           }
         }
       },
@@ -22,7 +23,7 @@ export const appconfig = {
         "config": {
           "chinavec2d": {
             "name": "中国电子地图",
-            "url": "http://221.182.8.141:8090/iserver/services/map-citymap-3/rest/maps/citymap_yc"
+            "url": BASE_URL + "/services/map-citymap-3/rest/maps/citymap_yc"
           }
         }
       },
@@ -32,20 +33,20 @@ export const appconfig = {
         "config": {
           "wscj": {
             "name": "污水厂",
-            "url": "http://221.182.8.141:8090/iserver/services/3D-liduershuichang/rest/realspace"
+            "url": BASE_URL + "/services/3D-liduershuichang/rest/realspace"
           },
           "scj": {
             "name": "水厂",
-            "url": "http://221.182.8.141:8090/iserver/services/3D-BaiYinShuiChang/rest/realspace"
+            "url": BASE_URL + "/services/3D-BaiYinShuiChang/rest/realspace"
           },
           "jzcj": {
             "name": "建筑场景",
-            "url": "http://221.182.8.141:8090/iserver/services/3D-TF_PAPN_BUILD-2/rest/realspace"
+            "url": BASE_URL + "/services/3D-TF_PAPN_BUILD-2/rest/realspace"
           },
           "gcgdcj": {
             "name": "设计管网",
-            // "url": "http://221.182.8.141:8090/iserver/services/3D-hbyc_sj/rest/realspace"
-            "url": "http://221.182.8.141:8090/iserver/services/3D-hbyc_sj_lx_20220829/rest/realspace"
+            // "url": "/services/3D-hbyc_sj/rest/realspace"
+            "url": BASE_URL + "/services/3D-hbyc_sj_lx_20220829/rest/realspace"
           },
         }
       },
@@ -55,7 +56,7 @@ export const appconfig = {
         "config": {
           "sjdt": {
             "name": "设计管线",
-            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_sj"
+            "url": BASE_URL + "/services/map-sxgk_yc/rest/maps/hnyy_sj"
           },
         }
       },
@@ -65,11 +66,11 @@ export const appconfig = {
         "config": {
           "sjfw": {
             "name": "宜昌数据服务",
-            "url": "http://221.182.8.141:8090/iserver/services/data-sxgk_yc/rest/data"
+            "url": BASE_URL + "/services/data-sxgk_yc/rest/data"
           },
           "bjsmidfw": {
             "name": "部件SMID查询",
-            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_query"
+            "url": BASE_URL + "/services/map-sxgk_yc/rest/maps/hnyy_query"
           },
         }
       },
@@ -87,22 +88,22 @@ export const appconfig = {
           "sjtypedt": {
             "isDisplay": "1",
             "name": "管网施工状态专题图",
-            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_pressure_dp"
+            "url": BASE_URL + "/services/map-sxgk_yc/rest/maps/hnyy_pressure_dp"
           },
           "pcdtps": {
             "isDisplay": "0",
             "name": "质量验评专题图",
-            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_zlyp"
+            "url": BASE_URL + "/services/map-sxgk_yc/rest/maps/hnyy_zlyp"
           },
           "clpsgw": {
             "isDisplay": "0",
             "name": "存量排水管网",
-            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_pc_ps_dp"
+            "url": BASE_URL + "/services/map-sxgk_yc/rest/maps/hnyy_pc_ps_dp"
           },
           "sjpsgw": {
             "isDisplay": "0",
             "name": "设计排水管网",
-            "url": "http://221.182.8.141:8090/iserver/services/map-sxgk_yc/rest/maps/hnyy_sj_lx_dp"
+            "url": BASE_URL + "/services/map-sxgk_yc/rest/maps/hnyy_sj_lx_dp"
           },
         }
       }

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

@@ -16,6 +16,7 @@ const state = {
   currentTool: '',//当前激活工具
   propertiesViewValue: null,//属性查看选择值
   isShowPipeSpeedInfoCheck: false,//显示进度查看弹窗
+  monitorTreeCheckHistory: null//设备监测树历史记录
 }
 //检查是否存在已有数据方法
 function some(arr, str) {

+ 3 - 3
src/store/modules/routeSetting.ts

@@ -20,9 +20,9 @@ const prjSelectionRoutes = {
 const groupPageRoutes = {
   path: '/groupPage',
   component: () => import('@/views/groupPage/index.vue'),
-  meta: { title: '集团首页' },
+  meta: { title: '决策分析平台' },
   type: 'sys',
-  label: '集团首页',
+  label: '决策分析平台',
   icon: 'el-icon-star-on'
 }
 const dashboardRoute = {
@@ -139,7 +139,7 @@ const actions = {
                 path: autoLink(item.type, item)
               }
             })
-            menus.some((item, i) => {if (item.name === 'prjSelection') menus.splice(i, 1)})
+            menus.some((item, i) => { if (item.name === 'prjSelection') menus.splice(i, 1) })
             commit('SET_NAVMENUS', menus)
             let routes = data.map((item) => item.childrens)
             routes = routes.flat()

+ 3 - 0
src/views/groupPage/components/ComInfoBox.vue

@@ -39,6 +39,9 @@ export default class ComInfoBox extends Vue {
   handelClose() {
     this.$store.dispatch('bigScreen/removeAllTool')
   }
+  beforeDestroy() {
+    this.$store.dispatch('bigScreen/removeAllTool')
+  }
 }
 </script>
 <style lang='scss' scoped>

+ 76 - 2
src/views/groupPage/districtPageModules/commonModules/ToolBox.vue

@@ -16,7 +16,32 @@
           @click="activeEvent(item.name)"
         >
           <img v-if="item.name == '数据面板'" :src="dataPanelImg" />
-          <img v-else :src="item.imgUrl" />
+          <el-popover v-if="item.name == '基础地图'" placement="left" trigger="hover">
+            <div class="baseMapChangePanel">
+              <div
+                class="baseMapItem"
+                v-for="item of baseMapList"
+                :key="item.name"
+                :class="selectTdtType === item.TdtType ? 'layerselected' : ''"
+              >
+                <el-checkbox
+                  v-model="labelOn"
+                  class="baseMapItemLabel"
+                  label="注记"
+                  :class="{ baseMapItemLabelHide: selectTdtType !== item.TdtType }"
+                ></el-checkbox>
+                <div class="baseMapItemName">{{ item.name }}</div>
+                <el-image
+                  class="baseMapItemImage"
+                  :src="item.url"
+                  fit="cover"
+                  @click="layerItemClick(item.TdtType, '')"
+                ></el-image>
+              </div>
+            </div>
+            <img slot="reference" :src="item.imgUrl" />
+          </el-popover>
+          <img v-if="item.name !== '基础地图' && item.name !== '数据面板'" :src="item.imgUrl" />
         </div>
         <div class="list-item" :title="'工具栏'" @click="isFold = !isFold">
           <img :src="!isFold ? unfoldUrl : foldUrl" />
@@ -41,6 +66,13 @@ const viewMemoryType = {
 //工具栏
 @Component({ name: 'ToolBox', components: { ViewManagement } })
 export default class ToolBox extends Vue {
+  baseMapList: Array<any> = [
+    { name: '电子地图', url: require('@/views/groupPage/images/工具栏/电子地图.png'), TdtType: 'vec_w' },
+    { name: '影像地图', url: require('@/views/groupPage/images/工具栏/影像地图.png'), TdtType: 'img_w' },
+    { name: '大屏地图', url: require('@/views/groupPage/images/工具栏/大屏地图.png'), TdtType: 'bs_w' }
+  ]
+  labelOn: boolean = true
+  selectTdtType = 'bs_w'
   toolList: Array<any> = [
     { name: '数据面板' },
     { imgUrl: require('@/views/groupPage/images/工具栏/基础地图.png'), name: '基础地图' },
@@ -248,10 +280,52 @@ export default class ToolBox extends Vue {
   //漫游面板操作
   roaming() {
     this.isRoaming = true
+  } //地图选择面板点击事件
+  layerItemClick(layerType, poiType) {
+    if (layerType === this.selectTdtType) return
+    // this.initTianditu(layerType, poiType)
+    this.labelOn = true
+    this.selectTdtType = layerType
   }
 }
 </script>
-
+<style lang="scss">
+.baseMapChangePanel {
+  display: flex;
+  .baseMapItem {
+    margin: 0 0.03125rem; /* 6/192 */
+    width: 0.416667rem /* 80/192 */;
+    height: 0.416667rem /* 80/192 */;
+    position: relative;
+  }
+  .baseMapItem.layerselected {
+    border: 1px solid rgba(51, 133, 255, 1);
+  }
+  .baseMapItemLabel {
+    width: 100%;
+    position: absolute;
+    color: #fff;
+    background-color: rgba(0, 0, 0, 0.7);
+    z-index: 999;
+  }
+  .baseMapItemLabelHide {
+    display: none;
+  }
+  .baseMapItemImage {
+    height: 100%;
+    width: 100%;
+  }
+  .baseMapItemName {
+    width: 100%;
+    position: absolute;
+    bottom: 0;
+    text-align: center;
+    color: #fff;
+    background-color: rgba(0, 0, 0, 0.7);
+    z-index: 999;
+  }
+}
+</style>
 <style lang="scss" scoped>
 .animate__flipInX,
 .animate__flipOutX {

+ 30 - 8
src/views/groupPage/districtPageModules/customTools/monitorTree.vue

@@ -15,7 +15,7 @@
             :data="treeData"
             :props="defaultProps"
             default-expand-all
-            node-key="symbol"
+            node-key="id"
             :default-checked-keys="defaultCheckedKeys"
             :filter-node-method="filterNode"
             @check="getCheckList()"
@@ -50,13 +50,20 @@ export default class monitorTree extends Vue {
     target.filter(val)
   }
   @Watch('deviceCheckList', { deep: true })
-  onChangeCheckListMethod() {
+  onChangeCheckListMethod(val) {
     this.showMapPoint()
+    this.$store.state.bigScreen.monitorTreeCheckHistory = []
+    val.forEach((item) => {
+      this.$store.state.bigScreen.monitorTreeCheckHistory.push(item.id)
+    })
   }
   @Watch('treeData', { deep: true })
   onChangeTreeDataMethod() {
     this.setCheckInfo()
   }
+  get historyInfo() {
+    return this.$store.state.bigScreen.monitorTreeCheckHistory
+  }
   viewer
   //参数
   deviceCheckList = []
@@ -85,7 +92,7 @@ export default class monitorTree extends Vue {
     const res = await axios.request({ url: '/panoramic/commonData/list', method: 'get', params })
     let result = res.result
     Object.keys(result).forEach((item, index) => {
-      this.treeData.push({ symbol: index, name: item, children: result[item] })
+      this.treeData.push({ name: item, children: result[item] })
     })
   }
   setStatusIconColor(type) {
@@ -102,7 +109,7 @@ export default class monitorTree extends Vue {
     return iconSrc
   }
   handleTreeNodeClick(data) {
-    let entity = customDataSource.entities.getById(data.id)
+    let entity = customDataSource.entities.getById(data.name)
     this.viewer.flyTo(entity)
   }
   getCheckList() {
@@ -110,18 +117,33 @@ export default class monitorTree extends Vue {
   }
   setCheckInfo() {
     let checkedList = []
-    this.deviceCheckList = this.treeData
+    let tempCheckList = this.treeData
       .map((item, index) => {
-        checkedList.push(index)
+        if (item.children) {
+          item.children.forEach((child) => {
+            if (this.historyInfo != null) {
+              if (child.id && this.historyInfo.some((id) => id == child.id)) {
+                checkedList.push(child.id)
+              }
+            } else {
+              checkedList.push(child.id)
+            }
+          })
+        }
         return item.children
       })
       .flat()
+    tempCheckList.forEach((item) => {
+      if (checkedList.some((id) => id == item.id)) {
+        this.deviceCheckList.push(item)
+      }
+    })
     this.$nextTick(() => {
       this.defaultCheckedKeys = checkedList
+      this.$store.state.bigScreen.monitorTreeCheckHistory = this.defaultCheckedKeys
     })
   }
   showMapPoint() {
-    console.log(this.deviceCheckList)
     if (Cesium.defined(customDataSource)) {
       customDataSource.entities.removeAll()
     }
@@ -145,7 +167,6 @@ export default class monitorTree extends Vue {
     const position = Cesium.Cartesian3.fromDegrees(options.position[0], options.position[1], 0)
     var bottomPosition = Cesium.Cartographic.fromCartesian(position)
     var entity = new Cesium.Entity({
-      // id: 'deviceInfo' + options.id,
       id: options.name,
       type: 'deviceInfo',
       name: options.name,
@@ -185,6 +206,7 @@ export default class monitorTree extends Vue {
     )
   }
   initInfoPop(data, position) {
+    console.log(data)
     let deviceInfoConstructor = Vue.extend(deviceInfo)
     const deviceInfoModule = new deviceInfoConstructor({
       data: {

二進制
src/views/groupPage/images/工具栏/大屏地图.png


二進制
src/views/groupPage/images/工具栏/影像地图.png


二進制
src/views/groupPage/images/工具栏/电子地图.png


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

@@ -23,7 +23,7 @@ import DistrictPageModules from './districtPageModules/index.vue'
 //
 import { getBlockPage } from '@/views/groupPage/apis'
 export default {
-  name: 'groupPage', //集团首页
+  name: 'groupPage', //决策分析平台
   components: {
     Header,
     BaseMap,