-
-
{{
- index + 1
- }}
-
{{ item.warnTime }}
+
+
+
+ {{
+ index + 1
+ }}
+ {{ item.warnTime }}
+
+
{{ item.startAlarm }}
- {{ item.startAlarm }}
-
+
+
暂无数据
@@ -193,6 +210,7 @@ export default {
trackAni: null, // 轨迹实例
calLon: '',
calLat: '',
+
// 查询设备行程信息的参数
tripParams: {
beginTime: moment()
@@ -206,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()
@@ -231,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: {
@@ -250,6 +273,10 @@ export default {
},
/** 查询按钮 */
async handleQuery() {
+ if (!this.queryForm.date) {
+ this.$message.error('请选择时间范围!')
+ return
+ }
this.tripParams.iotId = this.iotCode
const res = await getIotDeviceTripApi({ ...this.tripParams })
console.log(res, '行程信息--')
@@ -448,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]
+ }
},
},
}
From a911f36d75b1c176d07a0d84b908a783c122db87 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Fri, 9 Aug 2024 17:06:58 +0800
Subject: [PATCH 9/9] =?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
---
.../warehouseManage/machinery/coding/component/BindIOT.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue
index c099d075..44fcf12d 100644
--- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue
+++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue
@@ -115,7 +115,7 @@
/>
-
+