diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 7540604..971e705 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -356,13 +356,20 @@ method: 'get', }) } -// 泵站工情详情 +// 泵站工情雨水详情 export function rainWaterPumpStationInfo(id){ return request({ url: `/business/rainWaterPumpStationInfo/${id}`, method: 'get', }) } +//泵站工情污水详情 +export function sewagePumpStationInfo(id){ + return request({ + url: `/business/sewagePumpStationInfo/${id}`, + method: 'get', + }) +} // 河湖详情 export function lakeInfoList(query) { return request({ diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 7540604..971e705 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -356,13 +356,20 @@ method: 'get', }) } -// 泵站工情详情 +// 泵站工情雨水详情 export function rainWaterPumpStationInfo(id){ return request({ url: `/business/rainWaterPumpStationInfo/${id}`, method: 'get', }) } +//泵站工情污水详情 +export function sewagePumpStationInfo(id){ + return request({ + url: `/business/sewagePumpStationInfo/${id}`, + method: 'get', + }) +} // 河湖详情 export function lakeInfoList(query) { return request({ diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue index 422d9fc..ec876a4 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue @@ -2,7 +2,7 @@
-
发布预警
+
发布应急响应
diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 7540604..971e705 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -356,13 +356,20 @@ method: 'get', }) } -// 泵站工情详情 +// 泵站工情雨水详情 export function rainWaterPumpStationInfo(id){ return request({ url: `/business/rainWaterPumpStationInfo/${id}`, method: 'get', }) } +//泵站工情污水详情 +export function sewagePumpStationInfo(id){ + return request({ + url: `/business/sewagePumpStationInfo/${id}`, + method: 'get', + }) +} // 河湖详情 export function lakeInfoList(query) { return request({ diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue index 422d9fc..ec876a4 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue @@ -2,7 +2,7 @@
-
发布预警
+
发布应急响应
diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue index fd6d297..91f75bf 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue @@ -9,52 +9,7 @@ - -
- 已启动 - {{ - allData.showTipsData.warnGrade == "1" - ? "Ⅰ级" - : allData.showTipsData.warnGrade == "2" - ? "Ⅱ级" - : allData.showTipsData.warnGrade == "3" - ? "Ⅲ级" - : allData.showTipsData.warnGrade == "4" - ? "Ⅳ级" - : allData.showTipsData.warnGrade == "5" - ? "预警" - : null - }} - 级响应,从: - {{ - moment(allData.showTipsData.responseStartTime).format( - "YYYY-MM-DD HH:mm" - ) - }} - 起,预计到:{{ - moment(allData.showTipsData.responseEndTime).format("YYYY-MM-DD HH:mm") - }} -
- -
准备时间:
-
-
- {{ countdown.leftd }}{{ countdown.lefth }}{{ countdown.leftm }}{{ countdown.lefts }}秒 -
-
-
+
@@ -65,9 +20,7 @@ import {ref,reactive,onMounted} from "vue" import AuxiliaryResearchAndJudgmentLeft from './AuxiliaryResearchAndJudgmentLeft/index.vue' import SchedulingAidedDecisionRight from './SchedulingAidedDecisionRight/index.vue' -import { - getRecommendLevel -} from '@/api/FloodControlAndDrainage.js'; + // 面板控制组件 import PanelDisplayHidden from "@/views/pictureOnMap/page/components/PanelDisplayHidden.vue"; const showPanel = ref(false); //面板展开收起 @@ -75,152 +28,19 @@ showPanel.value = val; }; const { proxy } = getCurrentInstance(); -let allData = reactive({ - tableData: {}, - isShow: true, - showTipsData: {}, - setIntervalTime: null, -}); -let allTime = ref(0); -let countdown = ref(""); -const showTips = ref(false); - -// 获取头部提示预警信息 -function getPsLevel() { - let data = { - type: 7, - }; - getRecommendLevel(data).then((res) => { - if (res && res.code == 200) { - allData.showTipsData = res.data; - if (res.data.warnGrade) { - showTips.value = true; - } else { - showTips.value = false; - } - allTime.value = - moment(res.data.expectRainStartTime).diff( - moment(new Date()), - "seconds" - ) * 1000; - allData.setIntervalTime = setInterval(() => { - if (allTime.value == 0) { - clearInterval(allData.setIntervalTime); - } - allTime.value = allTime.value - 1000; - countdown.value = runTime(); - }, 1000); - } - }); -} -function runTime() { - // console.log(allTime.value); - let leftd = Math.floor(allTime.value / (1000 * 60 * 60 * 24)), //计算天数 - lefth = Math.floor((allTime.value / (1000 * 60 * 60)) % 24), //计算小时数 - leftm = Math.floor((allTime.value / (1000 * 60)) % 60), //计算分钟数 - lefts = Math.floor((allTime.value / 1000) % 60); //计算秒数 - let munberTimg = { - leftd: leftd, - lefth: lefth, - leftm: leftm, - lefts: lefts, - }; - return munberTimg; - // return leftd + "天" + lefth + "时" + leftm + "分" + lefts + "秒"; //返回倒计时的字符串 -} onMounted(() => { - getPsLevel(); - bus.on("warningRelease", (e) => { - getPsLevel(); - }); + }); onBeforeUnmount(() => { - bus.off("warningRelease"); + }); -onUnmounted(() => { - clearInterval(allData.setIntervalTime); -}); + diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 7540604..971e705 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -356,13 +356,20 @@ method: 'get', }) } -// 泵站工情详情 +// 泵站工情雨水详情 export function rainWaterPumpStationInfo(id){ return request({ url: `/business/rainWaterPumpStationInfo/${id}`, method: 'get', }) } +//泵站工情污水详情 +export function sewagePumpStationInfo(id){ + return request({ + url: `/business/sewagePumpStationInfo/${id}`, + method: 'get', + }) +} // 河湖详情 export function lakeInfoList(query) { return request({ diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue index 422d9fc..ec876a4 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/FloodReleaseForm/index.vue @@ -2,7 +2,7 @@
-
发布预警
+
发布应急响应
diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue index fd6d297..91f75bf 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/index.vue @@ -9,52 +9,7 @@ - -
- 已启动 - {{ - allData.showTipsData.warnGrade == "1" - ? "Ⅰ级" - : allData.showTipsData.warnGrade == "2" - ? "Ⅱ级" - : allData.showTipsData.warnGrade == "3" - ? "Ⅲ级" - : allData.showTipsData.warnGrade == "4" - ? "Ⅳ级" - : allData.showTipsData.warnGrade == "5" - ? "预警" - : null - }} - 级响应,从: - {{ - moment(allData.showTipsData.responseStartTime).format( - "YYYY-MM-DD HH:mm" - ) - }} - 起,预计到:{{ - moment(allData.showTipsData.responseEndTime).format("YYYY-MM-DD HH:mm") - }} -
- -
准备时间:
-
-
- {{ countdown.leftd }}{{ countdown.lefth }}{{ countdown.leftm }}{{ countdown.lefts }}秒 -
-
-
+
@@ -65,9 +20,7 @@ import {ref,reactive,onMounted} from "vue" import AuxiliaryResearchAndJudgmentLeft from './AuxiliaryResearchAndJudgmentLeft/index.vue' import SchedulingAidedDecisionRight from './SchedulingAidedDecisionRight/index.vue' -import { - getRecommendLevel -} from '@/api/FloodControlAndDrainage.js'; + // 面板控制组件 import PanelDisplayHidden from "@/views/pictureOnMap/page/components/PanelDisplayHidden.vue"; const showPanel = ref(false); //面板展开收起 @@ -75,152 +28,19 @@ showPanel.value = val; }; const { proxy } = getCurrentInstance(); -let allData = reactive({ - tableData: {}, - isShow: true, - showTipsData: {}, - setIntervalTime: null, -}); -let allTime = ref(0); -let countdown = ref(""); -const showTips = ref(false); - -// 获取头部提示预警信息 -function getPsLevel() { - let data = { - type: 7, - }; - getRecommendLevel(data).then((res) => { - if (res && res.code == 200) { - allData.showTipsData = res.data; - if (res.data.warnGrade) { - showTips.value = true; - } else { - showTips.value = false; - } - allTime.value = - moment(res.data.expectRainStartTime).diff( - moment(new Date()), - "seconds" - ) * 1000; - allData.setIntervalTime = setInterval(() => { - if (allTime.value == 0) { - clearInterval(allData.setIntervalTime); - } - allTime.value = allTime.value - 1000; - countdown.value = runTime(); - }, 1000); - } - }); -} -function runTime() { - // console.log(allTime.value); - let leftd = Math.floor(allTime.value / (1000 * 60 * 60 * 24)), //计算天数 - lefth = Math.floor((allTime.value / (1000 * 60 * 60)) % 24), //计算小时数 - leftm = Math.floor((allTime.value / (1000 * 60)) % 60), //计算分钟数 - lefts = Math.floor((allTime.value / 1000) % 60); //计算秒数 - let munberTimg = { - leftd: leftd, - lefth: lefth, - leftm: leftm, - lefts: lefts, - }; - return munberTimg; - // return leftd + "天" + lefth + "时" + leftm + "分" + lefts + "秒"; //返回倒计时的字符串 -} onMounted(() => { - getPsLevel(); - bus.on("warningRelease", (e) => { - getPsLevel(); - }); + }); onBeforeUnmount(() => { - bus.off("warningRelease"); + }); -onUnmounted(() => { - clearInterval(allData.setIntervalTime); -}); + diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/bengzhandanganfenxi.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/bengzhandanganfenxi.vue index e4227de..382ffcd 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/bengzhandanganfenxi.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/bengzhandanganfenxi.vue @@ -59,6 +59,7 @@ import { rainWaterPumpStationInfo, + sewagePumpStationInfo } from '@/api/FloodControlAndDrainage.js'; const props = defineProps({ // 数据id @@ -84,7 +85,9 @@ function gitDataFun() { loading.value=true - rainWaterPumpStationInfo(props.Getproperties.id).then(res => { + // rainPumpStation 有地方是plcRainPumpStation 有的是plcrainPumpStation 用ainPumpStation判断是污水还是雨水 + let url=props.Getproperties.stType.includes('ainPumpStation')?rainWaterPumpStationInfo:sewagePumpStationInfo + url(props.Getproperties.id).then(res => { console.log('渍水风险详情数据', res); loading.value=false if (res && res.code == 200) { @@ -99,7 +102,7 @@ onMounted(() => { - console.log('Getproperties123',props.Getproperties.dataId); + console.log('Getproperties123',props.Getproperties); gitDataFun() });