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 @@