From e44d28da1263f40fb4112926e3a3568f320bed9d Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 24 Apr 2025 18:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home-space-gas.js | 62 +++++ .../components/right-two-model.vue | 2 +- .../components/left-three-model.vue | 15 +- .../components/left-two-model.vue | 15 +- .../components/right-one-model.vue | 2 +- .../components/right-two-model.vue | 2 +- src/views/home-foundation-pit/index.vue | 14 +- .../components/center-one-model.vue | 48 +++- .../components/center-three-model.vue | 67 ++++-- .../components/center-two-model.vue | 69 ++++-- .../components/left-one-model.vue | 72 +++--- .../components/left-three-model.vue | 68 ++++-- .../components/left-two-model.vue | 62 ++++- .../components/right-one-model.vue | 221 ++++++------------ src/views/home-space-gas/index.vue | 24 +- vue.config.js | 4 +- 16 files changed, 494 insertions(+), 253 deletions(-) create mode 100644 src/api/home-space-gas.js diff --git a/src/api/home-space-gas.js b/src/api/home-space-gas.js new file mode 100644 index 0000000..2eb607e --- /dev/null +++ b/src/api/home-space-gas.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 有限空间气体监测 ---- 设备列表接口 左1 +export function getHomeSpaceGasListAPI(data) { + return request({ + url: '/smart-site/excavationDetection/getMassConcreteList', + method: 'post', + data, + }) +} +// 有限空间气体监测 ---- 一氧化碳浓度接口 左2 +export function getCarbonMonoxideByIdAPI(data) { + return request({ + url: '/smart-site/confinedSpaceGas/getCurveGraph', + method: 'post', + data, + }) +} +// 有限空间气体监测 ---- 甲烷浓度接口 左3 +export function getMethaneDataByIdAPI(data) { + return request({ + url: '/smart-site/confinedSpaceGas/getCurveGraph', + method: 'post', + data, + }) +} + +// 有限空间气体监测 ---- 实时数据变化接口 中1 +export function getRealDataByIdAPI(data) { + return request({ + url: '/smart-site/confinedSpaceGas/realData', + method: 'post', + data, + }) +} + +// 有限空间气体监测 ---- 硫化氢浓度接口 中2 +export function getHydrogenSulfideDataByIdAPI(data) { + return request({ + url: '/smart-site/confinedSpaceGas/getCurveGraph', + method: 'post', + data, + }) +} + +// 有限空间气体监测 ---- 氧气浓度接口 中3 +export function getOxygenDataByIdAPI(data) { + return request({ + url: '/smart-site/confinedSpaceGas/getCurveGraph', + method: 'post', + data, + }) +} + +// 有限空间气体监测 ---- 报警信息接口 右1 +export function getWarningInfoAPI(data = {}) { + return request({ + url: '/smart-site/excavationDetection/concreteAlarmList', + method: 'post', + data, + }) +} diff --git a/src/views/home-concrete/components/right-two-model.vue b/src/views/home-concrete/components/right-two-model.vue index 27f0d1c..00a8755 100644 --- a/src/views/home-concrete/components/right-two-model.vue +++ b/src/views/home-concrete/components/right-two-model.vue @@ -166,7 +166,7 @@ export default { async getCollectDeviceAllData() { const { data: res } = await getCollectDeviceAllAPI({ - typeId: '174435992023806894661', + typeCode: '9000200', }) console.log( `%c🔍 大体积混凝土 ----> 区域设备统计(右二) 数据出参 %c`, diff --git a/src/views/home-foundation-pit/components/left-three-model.vue b/src/views/home-foundation-pit/components/left-three-model.vue index 3c9e5e4..b5bc9d5 100644 --- a/src/views/home-foundation-pit/components/left-three-model.vue +++ b/src/views/home-foundation-pit/components/left-three-model.vue @@ -32,8 +32,7 @@ export default { // this.$nextTick(() => { // this.initChart() // }) - - this.getTemperatureListData() + // this.getTemperatureListData() }, beforeDestroy() { if (!this.chart) { @@ -206,9 +205,9 @@ export default { } }, - async getTemperatureListData() { + async getTemperatureListData(id) { const { data: res } = await getTemperatureListAPI({ - typeId: '174435992023806894663', + id, }) console.log( `%c🔍 深基坑监测 ----> 监测温度变化值趋势(右三) 数据出参 %c`, @@ -240,6 +239,14 @@ export default { }) }, }, + watch: { + deviceId: { + handler(newValue) { + this.getTemperatureListData(newValue) + }, + deep: true, + }, + }, } diff --git a/src/views/home-foundation-pit/components/left-two-model.vue b/src/views/home-foundation-pit/components/left-two-model.vue index 6e6c4d5..f134b9c 100644 --- a/src/views/home-foundation-pit/components/left-two-model.vue +++ b/src/views/home-foundation-pit/components/left-two-model.vue @@ -8,6 +8,7 @@ class="device-item" v-for="(item, index) in deviceList" :key="index" + @click="onHandleSelectDevice(index, item.id)" > {{ item.devName }} {{ item.devCode }} @@ -53,12 +54,13 @@ export default { data() { return { deviceList: [], + activeIndex: 0, } }, methods: { async getMassConcreteListData() { const { data: res } = await getMassConcreteListAPI({ - typeId: '174435992023806894663', + typeCode: '9000300', }) console.log( @@ -68,6 +70,13 @@ export default { res, ) this.deviceList = res + if (res.length > 0) { + this.$emit('handleSelectDevice', res[0].id) + } + }, + onHandleSelectDevice(index, id) { + this.activeIndex = index + this.$emit('handleSelectDevice', id) }, }, created() { diff --git a/src/views/home-foundation-pit/components/right-one-model.vue b/src/views/home-foundation-pit/components/right-one-model.vue index 1f48430..b99c842 100644 --- a/src/views/home-foundation-pit/components/right-one-model.vue +++ b/src/views/home-foundation-pit/components/right-one-model.vue @@ -43,7 +43,7 @@ export default { methods: { async getDevStatisticsData() { const { data: res } = await getDevStatisticsAPI({ - typeId: '174435992023806894663', + typeCode: '9000300', }) console.log( diff --git a/src/views/home-foundation-pit/components/right-two-model.vue b/src/views/home-foundation-pit/components/right-two-model.vue index 9aee0bc..a225bd6 100644 --- a/src/views/home-foundation-pit/components/right-two-model.vue +++ b/src/views/home-foundation-pit/components/right-two-model.vue @@ -38,7 +38,7 @@ export default { methods: { async getConcreteAlarmListData() { const { data: res } = await getConcreteAlarmListAPI({ - typeId: '174435992023806894663', + typeCode: '9000300', }) console.log( `%c🔍 深基坑监测 ----> 报警信息(右二) 数据出参 %c`, diff --git a/src/views/home-foundation-pit/index.vue b/src/views/home-foundation-pit/index.vue index ddfe5b8..7aea732 100644 --- a/src/views/home-foundation-pit/index.vue +++ b/src/views/home-foundation-pit/index.vue @@ -8,10 +8,10 @@
- +
- +
@@ -33,6 +33,16 @@ export default { RightOneModel, RightTwoModel, }, + data() { + return { + deviceId: '', + } + }, + methods: { + handleSelectDevice(id) { + this.deviceId = id + }, + }, } diff --git a/src/views/home-space-gas/components/center-one-model.vue b/src/views/home-space-gas/components/center-one-model.vue index f82fafa..7ca686f 100644 --- a/src/views/home-space-gas/components/center-one-model.vue +++ b/src/views/home-space-gas/components/center-one-model.vue @@ -22,38 +22,78 @@ diff --git a/src/views/home-space-gas/components/center-three-model.vue b/src/views/home-space-gas/components/center-three-model.vue index 05b959e..75d0a84 100644 --- a/src/views/home-space-gas/components/center-three-model.vue +++ b/src/views/home-space-gas/components/center-three-model.vue @@ -1,7 +1,7 @@