From 5bfd3c8810effdc67c0bb9a162e5db5af6a6a174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 21 Sep 2023 19:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/BoardTopNav/index.vue | 2 +- ruoyi-ui/src/views/board/GPS/index.vue | 1 + ruoyi-ui/src/views/board/equipment/index.vue | 8 +- .../views/board/equipmentMonitoring/index.vue | 1 - ruoyi-ui/src/views/board/index/index.vue | 23 +++-- ruoyi-ui/vue.config.js | 85 ++++++++++--------- 6 files changed, 70 insertions(+), 50 deletions(-) diff --git a/ruoyi-ui/src/components/BoardTopNav/index.vue b/ruoyi-ui/src/components/BoardTopNav/index.vue index 2f9f452..908c90b 100644 --- a/ruoyi-ui/src/components/BoardTopNav/index.vue +++ b/ruoyi-ui/src/components/BoardTopNav/index.vue @@ -66,7 +66,6 @@ export default { }, async mounted() { - if (this.$route.name === 'SmartScene' || this.$route.name === 'GPS' || this.$route.name === 'index' || this.$store.getters.sceneId) { }else{ await this.$router.replace({path: "/board/index"}); @@ -96,6 +95,7 @@ export default { this.selectSecnesList = data if (!this.$store.getters.sceneId) { this.sceneId = data.find(e => e.defaultFlag === '1').sceneId + this.name = data.find(e => e.defaultFlag === '1').sceneName } if (this.$route.query.name) { this.sceneId = data.find(e => e.sceneName === this.$route.query.name).sceneId diff --git a/ruoyi-ui/src/views/board/GPS/index.vue b/ruoyi-ui/src/views/board/GPS/index.vue index d1b61ea..0181f99 100644 --- a/ruoyi-ui/src/views/board/GPS/index.vue +++ b/ruoyi-ui/src/views/board/GPS/index.vue @@ -275,6 +275,7 @@ export default { }, async setAlarmInfos() { const {rows: data} = await getAlarmInfos() + console.log(data) this.table1Data = data.map((e, i) => { return { value1: i, diff --git a/ruoyi-ui/src/views/board/equipment/index.vue b/ruoyi-ui/src/views/board/equipment/index.vue index f0c7246..e2e8731 100644 --- a/ruoyi-ui/src/views/board/equipment/index.vue +++ b/ruoyi-ui/src/views/board/equipment/index.vue @@ -148,7 +148,7 @@ export default { this.monitorUnitId = e.id this.getDevice(e.id) this.getRightDevice(e.id) - this.setMonitorById() + this.setMonitorById(e) this.show = true if(!getDeviceInterval){ var getDeviceInterval = setInterval(this.getDevice, 30 * 1000) @@ -158,11 +158,9 @@ export default { } }, async getDevice(e) { - console.log('getDevice') const {data} = await selectDeviceByDeviceModeByMonitorUnitId(this.$store.getters.sceneId, e) this.controlList = data.control this.acquisitionList = data.acquisition - console.log(data) }, async getRightDevice(e) { const data = await selectDeviceModeFunctionByFunctionType({ @@ -172,8 +170,8 @@ export default { "limit": 1 }) }, - async setMonitorById() { - const {data} = await getMonitorById(this.$store.getters.sceneId) + async setMonitorById(e) { + const {data} = await getMonitorById(e.id) this.MonitorInfo = data }, toHistory() { diff --git a/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue b/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue index 2b6f9e8..d323b31 100644 --- a/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue +++ b/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue @@ -138,7 +138,6 @@ export default { "limit": 10 }) this.tableData = data.latestData || [] - console.log(this.tableData) }, async setDeviceModesBySceneId(){ const {data} = await getDeviceModesBySceneId( { diff --git a/ruoyi-ui/src/views/board/index/index.vue b/ruoyi-ui/src/views/board/index/index.vue index d533bd0..71b4544 100644 --- a/ruoyi-ui/src/views/board/index/index.vue +++ b/ruoyi-ui/src/views/board/index/index.vue @@ -1,7 +1,7 @@