From a80ee2ebea3b0f1d8e26baaadb466bf99a0e6f8b Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Fri, 9 Aug 2024 16:49:00 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../machinery/IOTequipment/index.vue | 4 +--
.../machinery/coding/component/MapDIalog.vue | 29 ++++++++++++-------
sgzb-ui/vue.config.js | 2 +-
3 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue
index 915a71cd..3370d4e8 100644
--- a/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue
+++ b/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue
@@ -178,8 +178,8 @@
diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue
index c5f2aaab..0b0fa171 100644
--- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue
+++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue
@@ -94,7 +94,9 @@
- 暂无数据
+
+ {{ loadingData ? '数据加载中...' : 暂无数据 }}
+
@@ -222,18 +224,20 @@ export default {
activeIndex: '',
// 停留点信息
parkList: [],
+ warningList: [],
+ loadingData: true,
}
},
- created() {
- this.handleQuery()
- },
+ created() {},
mounted() {
- Promise.all([this.getIotDeviceLocation()])
+ Promise.all([this.getIotDeviceLocation(), this.handleQuery()])
.then((res) => {
+ this.loadingData = false
this.initMap()
})
.catch((err) => {
console.log(err)
+ this.loadingData = false
})
// this.getIotDeviceLocation()
@@ -247,9 +251,12 @@ export default {
this.trackAni.cancel()
}
// 2. 清除地图上面的标点覆盖物 并清除地图实例
- this.map.clearOverlays()
- this.map.destroy()
- this.map = null
+
+ if (this.map) {
+ this.map.clearOverlays()
+ this.map.destroy()
+ this.map = null
+ }
},
methods: {
@@ -468,8 +475,10 @@ export default {
},
/** 时间选择器 */
onChangeTime(val) {
- this.tripParams.beginTime = val[0]
- this.tripParams.endTime = val[1]
+ if (val) {
+ this.tripParams.beginTime = val[0]
+ this.tripParams.endTime = val[1]
+ }
},
},
}
diff --git a/sgzb-ui/vue.config.js b/sgzb-ui/vue.config.js
index 832fa8a4..eca9b714 100644
--- a/sgzb-ui/vue.config.js
+++ b/sgzb-ui/vue.config.js
@@ -46,7 +46,7 @@ module.exports = {
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://192.168.2.81:28080`,//旭/
// target: `http://192.168.2.248:28080`, //帅
- target: `http://192.168.2.246:49080`, //福
+ target: `http://192.168.2.225:49080`, //福
//******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;