xieqy 3 years ago
parent
commit
44997d0a87

+ 8 - 0
src/views/groupPage/apis.ts

@@ -60,6 +60,14 @@ export function getZhgdEquipmentData(params) {
         params
     })
 }
+//获取智慧工地GPS设备
+export function getZhgdGPSData(params) {
+    return request({
+        url: '/tofly-sxgk/zhgd/zhgdGPSData',
+        method: 'get',
+        params
+    })
+}
 //获取智慧工地安全帽
 export function getZhgdHelmetData(params) {
     return request({

+ 2 - 2
src/views/groupPage/districtPageModules/commonModules/SearchBox.vue

@@ -22,7 +22,7 @@
             <el-option label="工程" value="4"></el-option>
             <el-option label="PBS编码" value="3"></el-option>
             <el-option label="部件标识码" value="2"></el-option>
-            <el-option label="设备" value="1"></el-option>
+            <el-option label="智慧工地" value="1"></el-option>
           </el-select>
           <el-button slot="append" icon="el-icon-search" @click="searching()" :loading="isSearching"></el-button>
         </el-input>
@@ -513,10 +513,10 @@ export default class SearchBox extends Vue {
       targetArr.map((item) => item.id),
       input
     )
+    console.log(input, targetArr, target)
     target.forEach((item) => {
       let index = targetArr.findIndex((e) => e.id === item)
       if (index != -1) {
-        console.log(targetArr[index]._info)
         this.searchDeviceList.push(targetArr[index]._info)
       }
     })

+ 5 - 1
src/views/groupPage/districtPageModules/customTools/monitorTree.vue

@@ -36,7 +36,7 @@
 <script lang="ts">
 import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
 import { getLatAndLon } from '@/views/groupPage/util'
-import { getZhgdCameraData, getZhgdEquipmentData, getZhgdHelmetData } from '@/views/groupPage/apis'
+import { getZhgdCameraData, getZhgdEquipmentData, getZhgdHelmetData, getZhgdGPSData } from '@/views/groupPage/apis'
 import deviceInfo from '@/views/groupPage/districtPageModules/customTools/infoComponents/deviceInfo.vue'
 const Cesium = (window as any).Cesium
 let customDataSource = new Cesium.CustomDataSource('monitorTree')
@@ -87,6 +87,7 @@ export default class monitorTree extends Vue {
       timeInterval = null
     }
     timeInterval = setInterval(() => {
+      console.log('调用刷新')
       this.initCom()
     }, 600000)
   }
@@ -135,9 +136,12 @@ export default class monitorTree extends Vue {
         status: item.status == 1 ? '未激活' : item.status == 2 ? '离线' : item.status == 3 ? '在线' : '无'
       }
     })
+    //GPS设备
+    // const gpsRes = await getZhgdGPSData({})
     this.treeData = [
       { name: '智慧工地摄像头', children: cameras },
       { name: '智慧工地监控设备', children: monitors },
+      // { name: '智慧工地GPS', children: [] },
       { name: '智慧工地安全帽', children: helmets }
     ]
   }