diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js
index f5dc2bf..8c89c12 100644
--- a/src/api/ywts/cszl/gw.js
+++ b/src/api/ywts/cszl/gw.js
@@ -19,3 +19,13 @@
params: data
});
}
+
+// 智慧管网-管网物联设备点位列表
+export function getAlarmList(data) {
+ return request({
+ url: "zhgw-gktj/zhgw/wlgjlbfy",
+ method: "post",
+ data,
+ params: data
+ });
+}
diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js
index f5dc2bf..8c89c12 100644
--- a/src/api/ywts/cszl/gw.js
+++ b/src/api/ywts/cszl/gw.js
@@ -19,3 +19,13 @@
params: data
});
}
+
+// 智慧管网-管网物联设备点位列表
+export function getAlarmList(data) {
+ return request({
+ url: "zhgw-gktj/zhgw/wlgjlbfy",
+ method: "post",
+ data,
+ params: data
+ });
+}
diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
new file mode 100644
index 0000000..bacd6e7
--- /dev/null
+++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
Binary files differ
diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js
index f5dc2bf..8c89c12 100644
--- a/src/api/ywts/cszl/gw.js
+++ b/src/api/ywts/cszl/gw.js
@@ -19,3 +19,13 @@
params: data
});
}
+
+// 智慧管网-管网物联设备点位列表
+export function getAlarmList(data) {
+ return request({
+ url: "zhgw-gktj/zhgw/wlgjlbfy",
+ method: "post",
+ data,
+ params: data
+ });
+}
diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
new file mode 100644
index 0000000..bacd6e7
--- /dev/null
+++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
Binary files differ
diff --git a/src/pages/ywts/cszl/gw/alarmPop.vue b/src/pages/ywts/cszl/gw/alarmPop.vue
new file mode 100644
index 0000000..02af7d8
--- /dev/null
+++ b/src/pages/ywts/cszl/gw/alarmPop.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+ 名称: {{ gwAlarmInfo.devicetypename }}
+ 状态: {{ gwAlarmInfo.alarmstatusname }}
+ 位置: {{ gwAlarmInfo.location }}
+ 告警内容: {{ gwAlarmInfo.alarmcontent || '--' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js
index f5dc2bf..8c89c12 100644
--- a/src/api/ywts/cszl/gw.js
+++ b/src/api/ywts/cszl/gw.js
@@ -19,3 +19,13 @@
params: data
});
}
+
+// 智慧管网-管网物联设备点位列表
+export function getAlarmList(data) {
+ return request({
+ url: "zhgw-gktj/zhgw/wlgjlbfy",
+ method: "post",
+ data,
+ params: data
+ });
+}
diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
new file mode 100644
index 0000000..bacd6e7
--- /dev/null
+++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
Binary files differ
diff --git a/src/pages/ywts/cszl/gw/alarmPop.vue b/src/pages/ywts/cszl/gw/alarmPop.vue
new file mode 100644
index 0000000..02af7d8
--- /dev/null
+++ b/src/pages/ywts/cszl/gw/alarmPop.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+ 名称: {{ gwAlarmInfo.devicetypename }}
+ 状态: {{ gwAlarmInfo.alarmstatusname }}
+ 位置: {{ gwAlarmInfo.location }}
+ 告警内容: {{ gwAlarmInfo.alarmcontent || '--' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue
index aad4675..b227543 100644
--- a/src/pages/ywts/cszl/gw/index.vue
+++ b/src/pages/ywts/cszl/gw/index.vue
@@ -3,13 +3,14 @@
@@ -26,22 +27,24 @@
} from "../../../../api/ywts/cszl/gd";
import {
getStatistics,
- getArea
+ getArea,
+ getAlarmList
} from "../../../../api/ywts/cszl/gw";
import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo";
import ListPage from "@/components/ListPage";
-import Pop from "./pop.vue";
-import { TEXT_STYLE_OPTIONS } from "echarts/lib/util/model";
+import Pop from "./popup.vue";
+import AlarmPop from "./alarmPop.vue";
export default {
name: 'Gw',
- components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop},
+ components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, AlarmPop},
// components: { TimeManager, LayerManagerMix, ListPage, CommonBtn },
data() {
return {
isListPage: false,
isShow: false,
showPop: false,
+ showAlarmPop: false, // 是否显示报警点位的popup
listQuery: {
deviceType: '',
startTime: '',
@@ -92,18 +95,10 @@
name: '物联设备',
value: 'device'
}
- // , {
- // name: '环监设备',
- // value: 'others'
- // }
],
menus: {
device: [
],
- // others: [
- // {type : "1", typename: "****设备", total: "111"},
- // {type : "2", typename: "****设备", total: "111"}
- // ]
}
}
},
@@ -113,9 +108,11 @@
getStatistics().then(response => {
if(response.code === 200) {
this.menus.device = response.data.value
+ if(response.data.value && Array.isArray(response.data.value) && response.data.value.length) {
+ this.search(response.data.value[0].type)
+ }
}
})
- this.search()
},
methods: {
async btnClick(e) {
@@ -131,60 +128,69 @@
break
}
},
+ // 点击按钮
+ handleClickButton(type) {
+ clearUpMap()
+ switch (type) {
+ case "alarm": // 点击管网告警
+ this.fetchAlarmList()
+ break
+ }
+ },
// 查询管网物联设备点位
- search() {
+ search(type = '') {
const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png')
const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png')
- // getArea({
- // deviceType: '',
- // startTime: '',
- // endTime: '',
- // isAlarm: '',
- // hasOrder: '',
- // keywords: '',
- // }).then(response => {
- // if(response.code === 200) {
- // clearUpMap()
- // response.data.value.forEach(item => {
- // // console.log(item.areaboundary)
- // // todo : 画范围
- // AddLabelPoint(
- // item.id,
- // item.name,
- // item.deviceStatus === '2' ? iconDoing: iconDone,
- // [item.lon, item.lat, 0], 'gw', item,
- // this.clickGw)
- // })
- // }
- // })
- const res = {
- data: {
- value: [
- {
- id: '1',
- name: '111',
- deviceStatus: '2',
- lon: '114.87665',
- lat: '25.76418',
- },
- {
- id: '2',
- name: '122211',
- deviceStatus: '1',
- lon: '114.87365',
- lat: '25.76118',
- }
- ]
- }}
- const tempData = res.data.value
- tempData.forEach(item => {
- AddLabelPoint(
- item.id,
- item.name,
- item.deviceStatus === '2' ? iconDoing : iconDone,
- [item.lon, item.lat, 0], 'gw', item,
- this.clickMarker)
- })
+ getArea({
+ deviceType: type,
+ startTime: '',
+ endTime: '',
+ isAlarm: '',
+ hasOrder: '',
+ keywords: '',
+ }).then(response => {
+ if(response.code === 200) {
+ clearUpMap()
+ response.data.value.forEach(item => {
+ // console.log(item.areaboundary)
+ // todo : 画范围
+ AddLabelPoint(
+ item.id,
+ item.name,
+ item.deviceStatus === '2' ? iconDoing: iconDone,
+ [item.lon, item.lat, 0], 'gw', item,
+ this.clickGw)
+ })
+ }
+ })
+ // const res = {
+ // data: {
+ // value: [
+ // {
+ // id: '1',
+ // name: '111',
+ // deviceStatus: '2',
+ // lon: '114.87665',
+ // lat: '25.76418',
+ // },
+ // {
+ // id: '2',
+ // name: '122211',
+ // deviceStatus: '1',
+ // lon: '114.87365',
+ // lat: '25.76118',
+ // }
+ // ]
+ // }}
+ // const tempData = res.data.value
+ // tempData.forEach(item => {
+ // AddLabelPoint(
+ // item.id,
+ // item.name,
+ // item.deviceStatus === '2' ? iconDoing : iconDone,
+ // [item.lon, item.lat, 0], 'gw', item,
+ // this.clickMarker)
+ // })
},
// 点击icon事件
clickGw(eventArg) {
@@ -219,7 +225,94 @@
menuClick(e) {
console.log(e, 'menuClick')
clearResetMap()
- this.search()
+ this.search(e.type.trim())
+ },
+ // ----------------------------------------管网告警------------------------------------------
+ // 获取官网告警列表
+ fetchAlarmList() {
+ const icon = require('@/assets/images/icon/智慧管网/alarm.png')
+ const params = {
+ pageNo: 1,
+ pageSize: 10,
+ startTime: '',
+ endTime: '',
+ keywords: '',
+ }
+ getAlarmList(params).then(response => {
+ if(response.code === 200) {
+ clearUpMap()
+ response.data.value.forEach(item => {
+ AddLabelPoint(
+ item.id,
+ item.devicetypename,
+ icon,
+ [item.lon, item.lat, 0], 'gw', item,
+ this.clickAlarmMarker)
+ })
+ }
+ })
+ const temp = [
+ {
+ createtime:"2023-04-18 06:01:42",
+ code:null,
+ orderid:null,
+ alarmstatusname:"历史告警",
+ alarmcontent:null,
+ lotid:"112021020027",
+ lon:"114.87665",
+ devicetype:"5",
+ alarmstatus:"0",
+ imgurl:null,
+ location:"刺桐路",
+ id:"1353824",
+ devicetypename:"液位监测仪",
+ lat:"25.76418",
+ },
+ {
+ createtime:"2023-04-18 06:01:38",
+ code:null,
+ orderid:null,
+ alarmstatusname:"历史告警",
+ alarmcontent:null,
+ lotid:"112019020098",
+ lon:"114.899962",
+ devicetype:"5",
+ alarmstatus:"0",
+ imgurl:null,
+ location:"佳辰路",
+ id:"1353818",
+ devicetypename:"液位监测仪",
+ lat:"25.807828",
+ }
+ ]
+ // temp.forEach(item => {
+ // AddLabelPoint(
+ // item.id,
+ // item.devicetypename,
+ // icon,
+ // [item.lon, item.lat, 0], 'gw', item,
+ // this.clickAlarmMarker)
+ // })
+ },
+ // 点击点位
+ clickAlarmMarker(eventArg) {
+ const showAlarmPop = (e) => {
+ const item = e._data.data
+ this.showAlarmPop = true
+ this.$nextTick(() => {
+ console.log('ppp[p]', item);
+ this.$refs.alarmPopRef.initData(item)
+ })
+ }
+ if (this.showAlarmPop) {
+ this.showAlarmPop = false
+ setTimeout(() => {
+ showAlarmPop(eventArg)
+ }, 100);
+ }
+ else {
+ showAlarmPop(eventArg)
+ }
},
}
}
diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js
index f5dc2bf..8c89c12 100644
--- a/src/api/ywts/cszl/gw.js
+++ b/src/api/ywts/cszl/gw.js
@@ -19,3 +19,13 @@
params: data
});
}
+
+// 智慧管网-管网物联设备点位列表
+export function getAlarmList(data) {
+ return request({
+ url: "zhgw-gktj/zhgw/wlgjlbfy",
+ method: "post",
+ data,
+ params: data
+ });
+}
diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
new file mode 100644
index 0000000..bacd6e7
--- /dev/null
+++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
Binary files differ
diff --git a/src/pages/ywts/cszl/gw/alarmPop.vue b/src/pages/ywts/cszl/gw/alarmPop.vue
new file mode 100644
index 0000000..02af7d8
--- /dev/null
+++ b/src/pages/ywts/cszl/gw/alarmPop.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+ 名称: {{ gwAlarmInfo.devicetypename }}
+ 状态: {{ gwAlarmInfo.alarmstatusname }}
+ 位置: {{ gwAlarmInfo.location }}
+ 告警内容: {{ gwAlarmInfo.alarmcontent || '--' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue
index aad4675..b227543 100644
--- a/src/pages/ywts/cszl/gw/index.vue
+++ b/src/pages/ywts/cszl/gw/index.vue
@@ -3,13 +3,14 @@
@@ -26,22 +27,24 @@
} from "../../../../api/ywts/cszl/gd";
import {
getStatistics,
- getArea
+ getArea,
+ getAlarmList
} from "../../../../api/ywts/cszl/gw";
import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo";
import ListPage from "@/components/ListPage";
-import Pop from "./pop.vue";
-import { TEXT_STYLE_OPTIONS } from "echarts/lib/util/model";
+import Pop from "./popup.vue";
+import AlarmPop from "./alarmPop.vue";
export default {
name: 'Gw',
- components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop},
+ components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, AlarmPop},
// components: { TimeManager, LayerManagerMix, ListPage, CommonBtn },
data() {
return {
isListPage: false,
isShow: false,
showPop: false,
+ showAlarmPop: false, // 是否显示报警点位的popup
listQuery: {
deviceType: '',
startTime: '',
@@ -92,18 +95,10 @@
name: '物联设备',
value: 'device'
}
- // , {
- // name: '环监设备',
- // value: 'others'
- // }
],
menus: {
device: [
],
- // others: [
- // {type : "1", typename: "****设备", total: "111"},
- // {type : "2", typename: "****设备", total: "111"}
- // ]
}
}
},
@@ -113,9 +108,11 @@
getStatistics().then(response => {
if(response.code === 200) {
this.menus.device = response.data.value
+ if(response.data.value && Array.isArray(response.data.value) && response.data.value.length) {
+ this.search(response.data.value[0].type)
+ }
}
})
- this.search()
},
methods: {
async btnClick(e) {
@@ -131,60 +128,69 @@
break
}
},
+ // 点击按钮
+ handleClickButton(type) {
+ clearUpMap()
+ switch (type) {
+ case "alarm": // 点击管网告警
+ this.fetchAlarmList()
+ break
+ }
+ },
// 查询管网物联设备点位
- search() {
+ search(type = '') {
const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png')
const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png')
- // getArea({
- // deviceType: '',
- // startTime: '',
- // endTime: '',
- // isAlarm: '',
- // hasOrder: '',
- // keywords: '',
- // }).then(response => {
- // if(response.code === 200) {
- // clearUpMap()
- // response.data.value.forEach(item => {
- // // console.log(item.areaboundary)
- // // todo : 画范围
- // AddLabelPoint(
- // item.id,
- // item.name,
- // item.deviceStatus === '2' ? iconDoing: iconDone,
- // [item.lon, item.lat, 0], 'gw', item,
- // this.clickGw)
- // })
- // }
- // })
- const res = {
- data: {
- value: [
- {
- id: '1',
- name: '111',
- deviceStatus: '2',
- lon: '114.87665',
- lat: '25.76418',
- },
- {
- id: '2',
- name: '122211',
- deviceStatus: '1',
- lon: '114.87365',
- lat: '25.76118',
- }
- ]
- }}
- const tempData = res.data.value
- tempData.forEach(item => {
- AddLabelPoint(
- item.id,
- item.name,
- item.deviceStatus === '2' ? iconDoing : iconDone,
- [item.lon, item.lat, 0], 'gw', item,
- this.clickMarker)
- })
+ getArea({
+ deviceType: type,
+ startTime: '',
+ endTime: '',
+ isAlarm: '',
+ hasOrder: '',
+ keywords: '',
+ }).then(response => {
+ if(response.code === 200) {
+ clearUpMap()
+ response.data.value.forEach(item => {
+ // console.log(item.areaboundary)
+ // todo : 画范围
+ AddLabelPoint(
+ item.id,
+ item.name,
+ item.deviceStatus === '2' ? iconDoing: iconDone,
+ [item.lon, item.lat, 0], 'gw', item,
+ this.clickGw)
+ })
+ }
+ })
+ // const res = {
+ // data: {
+ // value: [
+ // {
+ // id: '1',
+ // name: '111',
+ // deviceStatus: '2',
+ // lon: '114.87665',
+ // lat: '25.76418',
+ // },
+ // {
+ // id: '2',
+ // name: '122211',
+ // deviceStatus: '1',
+ // lon: '114.87365',
+ // lat: '25.76118',
+ // }
+ // ]
+ // }}
+ // const tempData = res.data.value
+ // tempData.forEach(item => {
+ // AddLabelPoint(
+ // item.id,
+ // item.name,
+ // item.deviceStatus === '2' ? iconDoing : iconDone,
+ // [item.lon, item.lat, 0], 'gw', item,
+ // this.clickMarker)
+ // })
},
// 点击icon事件
clickGw(eventArg) {
@@ -219,7 +225,94 @@
menuClick(e) {
console.log(e, 'menuClick')
clearResetMap()
- this.search()
+ this.search(e.type.trim())
+ },
+ // ----------------------------------------管网告警------------------------------------------
+ // 获取官网告警列表
+ fetchAlarmList() {
+ const icon = require('@/assets/images/icon/智慧管网/alarm.png')
+ const params = {
+ pageNo: 1,
+ pageSize: 10,
+ startTime: '',
+ endTime: '',
+ keywords: '',
+ }
+ getAlarmList(params).then(response => {
+ if(response.code === 200) {
+ clearUpMap()
+ response.data.value.forEach(item => {
+ AddLabelPoint(
+ item.id,
+ item.devicetypename,
+ icon,
+ [item.lon, item.lat, 0], 'gw', item,
+ this.clickAlarmMarker)
+ })
+ }
+ })
+ const temp = [
+ {
+ createtime:"2023-04-18 06:01:42",
+ code:null,
+ orderid:null,
+ alarmstatusname:"历史告警",
+ alarmcontent:null,
+ lotid:"112021020027",
+ lon:"114.87665",
+ devicetype:"5",
+ alarmstatus:"0",
+ imgurl:null,
+ location:"刺桐路",
+ id:"1353824",
+ devicetypename:"液位监测仪",
+ lat:"25.76418",
+ },
+ {
+ createtime:"2023-04-18 06:01:38",
+ code:null,
+ orderid:null,
+ alarmstatusname:"历史告警",
+ alarmcontent:null,
+ lotid:"112019020098",
+ lon:"114.899962",
+ devicetype:"5",
+ alarmstatus:"0",
+ imgurl:null,
+ location:"佳辰路",
+ id:"1353818",
+ devicetypename:"液位监测仪",
+ lat:"25.807828",
+ }
+ ]
+ // temp.forEach(item => {
+ // AddLabelPoint(
+ // item.id,
+ // item.devicetypename,
+ // icon,
+ // [item.lon, item.lat, 0], 'gw', item,
+ // this.clickAlarmMarker)
+ // })
+ },
+ // 点击点位
+ clickAlarmMarker(eventArg) {
+ const showAlarmPop = (e) => {
+ const item = e._data.data
+ this.showAlarmPop = true
+ this.$nextTick(() => {
+ console.log('ppp[p]', item);
+ this.$refs.alarmPopRef.initData(item)
+ })
+ }
+ if (this.showAlarmPop) {
+ this.showAlarmPop = false
+ setTimeout(() => {
+ showAlarmPop(eventArg)
+ }, 100);
+ }
+ else {
+ showAlarmPop(eventArg)
+ }
},
}
}
diff --git a/src/pages/ywts/cszl/gw/pop.vue b/src/pages/ywts/cszl/gw/pop.vue
deleted file mode 100644
index 053b489..0000000
--- a/src/pages/ywts/cszl/gw/pop.vue
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-
-
-
-
-
- 名称: {{ gdInfo.name }}
- 类型: {{ gdInfo.typename }}
- 状态: {{ gdInfo.statusname }}
- 位置: {{ gdInfo.location }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js
index f5dc2bf..8c89c12 100644
--- a/src/api/ywts/cszl/gw.js
+++ b/src/api/ywts/cszl/gw.js
@@ -19,3 +19,13 @@
params: data
});
}
+
+// 智慧管网-管网物联设备点位列表
+export function getAlarmList(data) {
+ return request({
+ url: "zhgw-gktj/zhgw/wlgjlbfy",
+ method: "post",
+ data,
+ params: data
+ });
+}
diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
new file mode 100644
index 0000000..bacd6e7
--- /dev/null
+++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/alarm.png"
Binary files differ
diff --git a/src/pages/ywts/cszl/gw/alarmPop.vue b/src/pages/ywts/cszl/gw/alarmPop.vue
new file mode 100644
index 0000000..02af7d8
--- /dev/null
+++ b/src/pages/ywts/cszl/gw/alarmPop.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+ 名称: {{ gwAlarmInfo.devicetypename }}
+ 状态: {{ gwAlarmInfo.alarmstatusname }}
+ 位置: {{ gwAlarmInfo.location }}
+ 告警内容: {{ gwAlarmInfo.alarmcontent || '--' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue
index aad4675..b227543 100644
--- a/src/pages/ywts/cszl/gw/index.vue
+++ b/src/pages/ywts/cszl/gw/index.vue
@@ -3,13 +3,14 @@
@@ -26,22 +27,24 @@
} from "../../../../api/ywts/cszl/gd";
import {
getStatistics,
- getArea
+ getArea,
+ getAlarmList
} from "../../../../api/ywts/cszl/gw";
import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo";
import ListPage from "@/components/ListPage";
-import Pop from "./pop.vue";
-import { TEXT_STYLE_OPTIONS } from "echarts/lib/util/model";
+import Pop from "./popup.vue";
+import AlarmPop from "./alarmPop.vue";
export default {
name: 'Gw',
- components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop},
+ components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, AlarmPop},
// components: { TimeManager, LayerManagerMix, ListPage, CommonBtn },
data() {
return {
isListPage: false,
isShow: false,
showPop: false,
+ showAlarmPop: false, // 是否显示报警点位的popup
listQuery: {
deviceType: '',
startTime: '',
@@ -92,18 +95,10 @@
name: '物联设备',
value: 'device'
}
- // , {
- // name: '环监设备',
- // value: 'others'
- // }
],
menus: {
device: [
],
- // others: [
- // {type : "1", typename: "****设备", total: "111"},
- // {type : "2", typename: "****设备", total: "111"}
- // ]
}
}
},
@@ -113,9 +108,11 @@
getStatistics().then(response => {
if(response.code === 200) {
this.menus.device = response.data.value
+ if(response.data.value && Array.isArray(response.data.value) && response.data.value.length) {
+ this.search(response.data.value[0].type)
+ }
}
})
- this.search()
},
methods: {
async btnClick(e) {
@@ -131,60 +128,69 @@
break
}
},
+ // 点击按钮
+ handleClickButton(type) {
+ clearUpMap()
+ switch (type) {
+ case "alarm": // 点击管网告警
+ this.fetchAlarmList()
+ break
+ }
+ },
// 查询管网物联设备点位
- search() {
+ search(type = '') {
const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png')
const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png')
- // getArea({
- // deviceType: '',
- // startTime: '',
- // endTime: '',
- // isAlarm: '',
- // hasOrder: '',
- // keywords: '',
- // }).then(response => {
- // if(response.code === 200) {
- // clearUpMap()
- // response.data.value.forEach(item => {
- // // console.log(item.areaboundary)
- // // todo : 画范围
- // AddLabelPoint(
- // item.id,
- // item.name,
- // item.deviceStatus === '2' ? iconDoing: iconDone,
- // [item.lon, item.lat, 0], 'gw', item,
- // this.clickGw)
- // })
- // }
- // })
- const res = {
- data: {
- value: [
- {
- id: '1',
- name: '111',
- deviceStatus: '2',
- lon: '114.87665',
- lat: '25.76418',
- },
- {
- id: '2',
- name: '122211',
- deviceStatus: '1',
- lon: '114.87365',
- lat: '25.76118',
- }
- ]
- }}
- const tempData = res.data.value
- tempData.forEach(item => {
- AddLabelPoint(
- item.id,
- item.name,
- item.deviceStatus === '2' ? iconDoing : iconDone,
- [item.lon, item.lat, 0], 'gw', item,
- this.clickMarker)
- })
+ getArea({
+ deviceType: type,
+ startTime: '',
+ endTime: '',
+ isAlarm: '',
+ hasOrder: '',
+ keywords: '',
+ }).then(response => {
+ if(response.code === 200) {
+ clearUpMap()
+ response.data.value.forEach(item => {
+ // console.log(item.areaboundary)
+ // todo : 画范围
+ AddLabelPoint(
+ item.id,
+ item.name,
+ item.deviceStatus === '2' ? iconDoing: iconDone,
+ [item.lon, item.lat, 0], 'gw', item,
+ this.clickGw)
+ })
+ }
+ })
+ // const res = {
+ // data: {
+ // value: [
+ // {
+ // id: '1',
+ // name: '111',
+ // deviceStatus: '2',
+ // lon: '114.87665',
+ // lat: '25.76418',
+ // },
+ // {
+ // id: '2',
+ // name: '122211',
+ // deviceStatus: '1',
+ // lon: '114.87365',
+ // lat: '25.76118',
+ // }
+ // ]
+ // }}
+ // const tempData = res.data.value
+ // tempData.forEach(item => {
+ // AddLabelPoint(
+ // item.id,
+ // item.name,
+ // item.deviceStatus === '2' ? iconDoing : iconDone,
+ // [item.lon, item.lat, 0], 'gw', item,
+ // this.clickMarker)
+ // })
},
// 点击icon事件
clickGw(eventArg) {
@@ -219,7 +225,94 @@
menuClick(e) {
console.log(e, 'menuClick')
clearResetMap()
- this.search()
+ this.search(e.type.trim())
+ },
+ // ----------------------------------------管网告警------------------------------------------
+ // 获取官网告警列表
+ fetchAlarmList() {
+ const icon = require('@/assets/images/icon/智慧管网/alarm.png')
+ const params = {
+ pageNo: 1,
+ pageSize: 10,
+ startTime: '',
+ endTime: '',
+ keywords: '',
+ }
+ getAlarmList(params).then(response => {
+ if(response.code === 200) {
+ clearUpMap()
+ response.data.value.forEach(item => {
+ AddLabelPoint(
+ item.id,
+ item.devicetypename,
+ icon,
+ [item.lon, item.lat, 0], 'gw', item,
+ this.clickAlarmMarker)
+ })
+ }
+ })
+ const temp = [
+ {
+ createtime:"2023-04-18 06:01:42",
+ code:null,
+ orderid:null,
+ alarmstatusname:"历史告警",
+ alarmcontent:null,
+ lotid:"112021020027",
+ lon:"114.87665",
+ devicetype:"5",
+ alarmstatus:"0",
+ imgurl:null,
+ location:"刺桐路",
+ id:"1353824",
+ devicetypename:"液位监测仪",
+ lat:"25.76418",
+ },
+ {
+ createtime:"2023-04-18 06:01:38",
+ code:null,
+ orderid:null,
+ alarmstatusname:"历史告警",
+ alarmcontent:null,
+ lotid:"112019020098",
+ lon:"114.899962",
+ devicetype:"5",
+ alarmstatus:"0",
+ imgurl:null,
+ location:"佳辰路",
+ id:"1353818",
+ devicetypename:"液位监测仪",
+ lat:"25.807828",
+ }
+ ]
+ // temp.forEach(item => {
+ // AddLabelPoint(
+ // item.id,
+ // item.devicetypename,
+ // icon,
+ // [item.lon, item.lat, 0], 'gw', item,
+ // this.clickAlarmMarker)
+ // })
+ },
+ // 点击点位
+ clickAlarmMarker(eventArg) {
+ const showAlarmPop = (e) => {
+ const item = e._data.data
+ this.showAlarmPop = true
+ this.$nextTick(() => {
+ console.log('ppp[p]', item);
+ this.$refs.alarmPopRef.initData(item)
+ })
+ }
+ if (this.showAlarmPop) {
+ this.showAlarmPop = false
+ setTimeout(() => {
+ showAlarmPop(eventArg)
+ }, 100);
+ }
+ else {
+ showAlarmPop(eventArg)
+ }
},
}
}
diff --git a/src/pages/ywts/cszl/gw/pop.vue b/src/pages/ywts/cszl/gw/pop.vue
deleted file mode 100644
index 053b489..0000000
--- a/src/pages/ywts/cszl/gw/pop.vue
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-
-
-
-
-
- 名称: {{ gdInfo.name }}
- 类型: {{ gdInfo.typename }}
- 状态: {{ gdInfo.statusname }}
- 位置: {{ gdInfo.location }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/ywts/cszl/gw/popup.vue b/src/pages/ywts/cszl/gw/popup.vue
new file mode 100644
index 0000000..6544264
--- /dev/null
+++ b/src/pages/ywts/cszl/gw/popup.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+ 名称: {{ gdInfo.name }}
+ 类型: {{ gdInfo.typename }}
+ 状态: {{ gdInfo.statusname }}
+ 位置: {{ gdInfo.location }}
+
+
+
+
+
+
+
+
+
+
+