diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js index 8c89c12..a766ad3 100644 --- a/src/api/ywts/cszl/gw.js +++ b/src/api/ywts/cszl/gw.js @@ -29,3 +29,23 @@ params: data }); } + +// 智慧管网-管网健康路展示 +export function getScoreList(data) { + return request({ + url: "zhgw-gktj/zhgw/jklzs", + method: "post", + data, + params: data + }); +} + +// 设备基础详情 +export function getDeviceDetail(data) { + return request({ + url: "zhgw-gktj/zhgw/sbjcxq", + method: "post", + data, + params: data + }); +} diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js index 8c89c12..a766ad3 100644 --- a/src/api/ywts/cszl/gw.js +++ b/src/api/ywts/cszl/gw.js @@ -29,3 +29,23 @@ params: data }); } + +// 智慧管网-管网健康路展示 +export function getScoreList(data) { + return request({ + url: "zhgw-gktj/zhgw/jklzs", + method: "post", + data, + params: data + }); +} + +// 设备基础详情 +export function getDeviceDetail(data) { + return request({ + url: "zhgw-gktj/zhgw/sbjcxq", + method: "post", + data, + params: data + }); +} diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" new file mode 100644 index 0000000..4a7786b --- /dev/null +++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" Binary files differ diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js index 8c89c12..a766ad3 100644 --- a/src/api/ywts/cszl/gw.js +++ b/src/api/ywts/cszl/gw.js @@ -29,3 +29,23 @@ params: data }); } + +// 智慧管网-管网健康路展示 +export function getScoreList(data) { + return request({ + url: "zhgw-gktj/zhgw/jklzs", + method: "post", + data, + params: data + }); +} + +// 设备基础详情 +export function getDeviceDetail(data) { + return request({ + url: "zhgw-gktj/zhgw/sbjcxq", + method: "post", + data, + params: data + }); +} diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" new file mode 100644 index 0000000..4a7786b --- /dev/null +++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" Binary files differ diff --git a/src/pages/ywts/cszl/gw/alarmPop.vue b/src/pages/ywts/cszl/gw/alarmPop.vue index 02af7d8..5c8660a 100644 --- a/src/pages/ywts/cszl/gw/alarmPop.vue +++ b/src/pages/ywts/cszl/gw/alarmPop.vue @@ -9,6 +9,7 @@ 名称: {{ gwAlarmInfo.devicetypename }} 状态: {{ gwAlarmInfo.alarmstatusname }} 位置: {{ gwAlarmInfo.location }} + 告警时间: {{ gwAlarmInfo.createtime || '--' }} 告警内容: {{ gwAlarmInfo.alarmcontent || '--' }} diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js index 8c89c12..a766ad3 100644 --- a/src/api/ywts/cszl/gw.js +++ b/src/api/ywts/cszl/gw.js @@ -29,3 +29,23 @@ params: data }); } + +// 智慧管网-管网健康路展示 +export function getScoreList(data) { + return request({ + url: "zhgw-gktj/zhgw/jklzs", + method: "post", + data, + params: data + }); +} + +// 设备基础详情 +export function getDeviceDetail(data) { + return request({ + url: "zhgw-gktj/zhgw/sbjcxq", + method: "post", + data, + params: data + }); +} diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" new file mode 100644 index 0000000..4a7786b --- /dev/null +++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" Binary files differ diff --git a/src/pages/ywts/cszl/gw/alarmPop.vue b/src/pages/ywts/cszl/gw/alarmPop.vue index 02af7d8..5c8660a 100644 --- a/src/pages/ywts/cszl/gw/alarmPop.vue +++ b/src/pages/ywts/cszl/gw/alarmPop.vue @@ -9,6 +9,7 @@ 名称: {{ gwAlarmInfo.devicetypename }} 状态: {{ gwAlarmInfo.alarmstatusname }} 位置: {{ gwAlarmInfo.location }} + 告警时间: {{ gwAlarmInfo.createtime || '--' }} 告警内容: {{ gwAlarmInfo.alarmcontent || '--' }} diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue index b227543..fff91c7 100644 --- a/src/pages/ywts/cszl/gw/index.vue +++ b/src/pages/ywts/cszl/gw/index.vue @@ -2,15 +2,16 @@ @@ -21,23 +22,20 @@ import { heat } from '@/utils/freedo/heat' import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' import { - getHeat, - getDevList, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import { getStatistics, getArea, - getAlarmList + getAlarmList, + getScoreList } from "../../../../api/ywts/cszl/gw"; import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; import Pop from "./popup.vue"; import AlarmPop from "./alarmPop.vue"; +import ScorePop from "./scorePop.vue"; export default { name: 'Gw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, AlarmPop}, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, ScorePop, AlarmPop}, // components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, data() { return { @@ -45,6 +43,7 @@ isShow: false, showPop: false, showAlarmPop: false, // 是否显示报警点位的popup + showScorePop: false, // 是否显示健康路评分的popup listQuery: { deviceType: '', startTime: '', @@ -117,80 +116,79 @@ methods: { async btnClick(e) { clearUpMap() + console.log('--------', e); this.isListPage = false - this.selectIndex = e.target.id + this.showAlarmPop = false, // 是否显示报警点位的popup + this.showScorePop = false, // 是否显示报警点位的popup + this.selectIndex = typeof e === 'string' ? e : e.target.id switch (this.selectIndex) { - case "caseBtn": - this.casePoint() - break - case "devBtn": + case "layerBtn": // 点击健康路评分 this.search() break - } - }, - // 点击按钮 - handleClickButton(type) { - clearUpMap() - switch (type) { - case "alarm": // 点击管网告警 + case "alarmBtn": // 点击管网告警 this.fetchAlarmList() break + case "scoreBtn": // 点击健康路评分 + this.fetchScoreList() + break + case "eventBtn": // 事件 + break } }, // 查询管网物联设备点位 search(type = '') { const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - 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) - // }) + // 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) { @@ -238,19 +236,19 @@ 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) - }) - } - }) + // 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", @@ -285,16 +283,17 @@ lat:"25.807828", } ] - // temp.forEach(item => { - // AddLabelPoint( - // item.id, - // item.devicetypename, - // icon, - // [item.lon, item.lat, 0], 'gw', item, - // this.clickAlarmMarker) - // }) + clearUpMap() + 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 @@ -314,6 +313,78 @@ showAlarmPop(eventArg) } }, + // ----------------------------------------管网健康路评分------------------------------------------ + // 获取管网健康路评分列表 + fetchScoreList() { + const icon = require('@/assets/images/icon/智慧管网/score.png') + const params = { + startTime: '', + endTime: '', + } + getScoreList(params).then(response => { + if(response.code === 200) { + clearUpMap() + response.data.value.forEach(item => { + AddLabelPoint( + item.id, + item.name, + icon, + [item.lon, item.lat, 0], 'gw', item, + this.clickScoreMarker) + }) + } + }) + // const temp = [ + // { + // score:"1", + // name:"飞扬大道(2020一期)", + // lon:"114.894804", + // id:"6509", + // lat:"25.772637", + // }, + // { + // score:"1", + // name:"金富康小区6栋1号(品味鲜小吃)", + // lon:"114.86770265338376", + // id:"8152", + // lat:"25.756292746101437", + // }, + // { + // score:"1", + // name:"玫瑰路(2020一期)", + // lon:"114.904256", + // id:"6511", + // lat:"25.78952", + // } + // ] + // temp.forEach(item => { + // AddLabelPoint( + // item.id, + // item.name, + // icon, + // [item.lon, item.lat, 0], 'gw', item, + // this.clickScoreMarker) + // }) + }, + // 点击健康路评分点位 + clickScoreMarker(eventArg) { + const showScorePop = (e) => { + const item = e._data.data + this.showScorePop = true + this.$nextTick(() => { + this.$refs.scorePopRef.initData(item) + }) + } + if (this.showScorePop) { + this.showScorePop = false + setTimeout(() => { + showScorePop(eventArg) + }, 100); + } + else { + showScorePop(eventArg) + } + }, } } diff --git a/src/api/ywts/cszl/gw.js b/src/api/ywts/cszl/gw.js index 8c89c12..a766ad3 100644 --- a/src/api/ywts/cszl/gw.js +++ b/src/api/ywts/cszl/gw.js @@ -29,3 +29,23 @@ params: data }); } + +// 智慧管网-管网健康路展示 +export function getScoreList(data) { + return request({ + url: "zhgw-gktj/zhgw/jklzs", + method: "post", + data, + params: data + }); +} + +// 设备基础详情 +export function getDeviceDetail(data) { + return request({ + url: "zhgw-gktj/zhgw/sbjcxq", + method: "post", + data, + params: data + }); +} diff --git "a/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" new file mode 100644 index 0000000..4a7786b --- /dev/null +++ "b/src/assets/images/icon/\346\231\272\346\205\247\347\256\241\347\275\221/score.png" Binary files differ diff --git a/src/pages/ywts/cszl/gw/alarmPop.vue b/src/pages/ywts/cszl/gw/alarmPop.vue index 02af7d8..5c8660a 100644 --- a/src/pages/ywts/cszl/gw/alarmPop.vue +++ b/src/pages/ywts/cszl/gw/alarmPop.vue @@ -9,6 +9,7 @@ 名称: {{ gwAlarmInfo.devicetypename }} 状态: {{ gwAlarmInfo.alarmstatusname }} 位置: {{ gwAlarmInfo.location }} + 告警时间: {{ gwAlarmInfo.createtime || '--' }} 告警内容: {{ gwAlarmInfo.alarmcontent || '--' }} diff --git a/src/pages/ywts/cszl/gw/index.vue b/src/pages/ywts/cszl/gw/index.vue index b227543..fff91c7 100644 --- a/src/pages/ywts/cszl/gw/index.vue +++ b/src/pages/ywts/cszl/gw/index.vue @@ -2,15 +2,16 @@ @@ -21,23 +22,20 @@ import { heat } from '@/utils/freedo/heat' import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' import { - getHeat, - getDevList, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import { getStatistics, getArea, - getAlarmList + getAlarmList, + getScoreList } from "../../../../api/ywts/cszl/gw"; import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; import Pop from "./popup.vue"; import AlarmPop from "./alarmPop.vue"; +import ScorePop from "./scorePop.vue"; export default { name: 'Gw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, AlarmPop}, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, ScorePop, AlarmPop}, // components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, data() { return { @@ -45,6 +43,7 @@ isShow: false, showPop: false, showAlarmPop: false, // 是否显示报警点位的popup + showScorePop: false, // 是否显示健康路评分的popup listQuery: { deviceType: '', startTime: '', @@ -117,80 +116,79 @@ methods: { async btnClick(e) { clearUpMap() + console.log('--------', e); this.isListPage = false - this.selectIndex = e.target.id + this.showAlarmPop = false, // 是否显示报警点位的popup + this.showScorePop = false, // 是否显示报警点位的popup + this.selectIndex = typeof e === 'string' ? e : e.target.id switch (this.selectIndex) { - case "caseBtn": - this.casePoint() - break - case "devBtn": + case "layerBtn": // 点击健康路评分 this.search() break - } - }, - // 点击按钮 - handleClickButton(type) { - clearUpMap() - switch (type) { - case "alarm": // 点击管网告警 + case "alarmBtn": // 点击管网告警 this.fetchAlarmList() break + case "scoreBtn": // 点击健康路评分 + this.fetchScoreList() + break + case "eventBtn": // 事件 + break } }, // 查询管网物联设备点位 search(type = '') { const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - 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) - // }) + // 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) { @@ -238,19 +236,19 @@ 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) - }) - } - }) + // 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", @@ -285,16 +283,17 @@ lat:"25.807828", } ] - // temp.forEach(item => { - // AddLabelPoint( - // item.id, - // item.devicetypename, - // icon, - // [item.lon, item.lat, 0], 'gw', item, - // this.clickAlarmMarker) - // }) + clearUpMap() + 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 @@ -314,6 +313,78 @@ showAlarmPop(eventArg) } }, + // ----------------------------------------管网健康路评分------------------------------------------ + // 获取管网健康路评分列表 + fetchScoreList() { + const icon = require('@/assets/images/icon/智慧管网/score.png') + const params = { + startTime: '', + endTime: '', + } + getScoreList(params).then(response => { + if(response.code === 200) { + clearUpMap() + response.data.value.forEach(item => { + AddLabelPoint( + item.id, + item.name, + icon, + [item.lon, item.lat, 0], 'gw', item, + this.clickScoreMarker) + }) + } + }) + // const temp = [ + // { + // score:"1", + // name:"飞扬大道(2020一期)", + // lon:"114.894804", + // id:"6509", + // lat:"25.772637", + // }, + // { + // score:"1", + // name:"金富康小区6栋1号(品味鲜小吃)", + // lon:"114.86770265338376", + // id:"8152", + // lat:"25.756292746101437", + // }, + // { + // score:"1", + // name:"玫瑰路(2020一期)", + // lon:"114.904256", + // id:"6511", + // lat:"25.78952", + // } + // ] + // temp.forEach(item => { + // AddLabelPoint( + // item.id, + // item.name, + // icon, + // [item.lon, item.lat, 0], 'gw', item, + // this.clickScoreMarker) + // }) + }, + // 点击健康路评分点位 + clickScoreMarker(eventArg) { + const showScorePop = (e) => { + const item = e._data.data + this.showScorePop = true + this.$nextTick(() => { + this.$refs.scorePopRef.initData(item) + }) + } + if (this.showScorePop) { + this.showScorePop = false + setTimeout(() => { + showScorePop(eventArg) + }, 100); + } + else { + showScorePop(eventArg) + } + }, } } diff --git a/src/pages/ywts/cszl/gw/popup.vue b/src/pages/ywts/cszl/gw/popup.vue index 6544264..1bd9972 100644 --- a/src/pages/ywts/cszl/gw/popup.vue +++ b/src/pages/ywts/cszl/gw/popup.vue @@ -1,15 +1,17 @@