diff --git a/ruoyi-ui/src/views/board/equipment/index.vue b/ruoyi-ui/src/views/board/equipment/index.vue
index f86666c..97ab472 100644
--- a/ruoyi-ui/src/views/board/equipment/index.vue
+++ b/ruoyi-ui/src/views/board/equipment/index.vue
@@ -198,11 +198,13 @@ export default {
this.treeData = data
}
},
- treeClick(e) {
+ async treeClick(e) {
if (!e.children?.length > 0) {
this.monitorUnitId = e.id
- this.getDevice(e.id)
- this.setMonitorById(e)
+
+
+ await this.getDevice(e.id)
+ await this.setMonitorById(e)
this.show = true
if (typeof getDeviceInterval === 'number') {
clearInterval(getDeviceInterval)
diff --git a/ruoyi-ui/src/views/board/senso/index.vue b/ruoyi-ui/src/views/board/senso/index.vue
index 80e80db..15eddd7 100644
--- a/ruoyi-ui/src/views/board/senso/index.vue
+++ b/ruoyi-ui/src/views/board/senso/index.vue
@@ -65,7 +65,7 @@
-
@@ -74,7 +74,8 @@
-
@@ -106,7 +107,8 @@
已加载: {{ (mapOffset + 1) * 100 }} 总计: {{ mapTotal }}
+ @click="continueMap">已加载:
+ {{ ((mapOffset + 1) * 100 > mapTotal) ? mapTotal : ((mapOffset + 1) * 100) }} 总计: {{ mapTotal }}
继续加载
@@ -351,10 +353,9 @@ export default {
startTime: this.date?.[0],
endTime: this.date?.[1],
})
- console.log(data)
let deviceDataColumns = data.deviceDataColumns
let dataList = data.historyData?.dataList || []
- if (deviceDataColumns.filter(e => e.columnKey === 'longitude' || e.columnKey === '"latitude"').length >0) {
+ if (deviceDataColumns.filter(e => e.columnKey === 'longitude' || e.columnKey === '"latitude"').length > 0 && dataList.length > 0) {
this.isMap = true
this.mapTotal = data.historyData.count
let mapData = dataList.filter(e => (Object.keys(e).includes('longitude') || Object.keys(e).includes('"latitude"'))).map(e => {
@@ -377,8 +378,10 @@ export default {
} else {
this.tableData = data.historyData?.dataList
this.total = data.historyData?.count
- // this.currentPage = 1
- this.deviceDataColumns = data.deviceDataColumns
+ if (dataList.length > 0) {
+ // this.currentPage = 1
+ this.deviceDataColumns = data.deviceDataColumns
+ }
this.$nextTick(() => {
this.show = true
})