diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue index 1506a111..8aa137f6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue @@ -105,7 +105,6 @@ export default { }, methods: { close() { - console.log("------"); this.modelVisible = false; }, updateDialogVisible(bool) { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue index af329ca6..6bd999ca 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue @@ -99,24 +99,47 @@ export default { if (!this.checkList.length) return Message.error("请至少选择一个广播设备!"); + const devices = []; + const functions = []; + for(let i of this.checkList){ + const d = _.find(this.musicList,{otherConfig:i}) + devices.push({ + "id": d.id, + "iotDeviceId": d.iotDeviceId, + "deviceType": d.deviceType + }) + + functions.push({ + "functionId": "A1", + "params": { + "name": "task-3", + "outVol": "6", + "priority": "1", + "text": "山东高速欢迎您", + "repeatTimes": "3", + "termList": [ + + { + ...JSON.parse(i) + } + ], + "functionType": "startPaTts" + } + + }) + } this.submitting = true; request({ - url: `/broadcast/broadcastFunctionCall`, + url: `/business/device/batchFunctions`, method: "post", data: { - name: "task-3", - outVol: "6", - priority: "1", - text: this.releaseMessage.trim(), - repeatTimes: "3", - termList: this.checkList.map((str) => JSON.parse(str)), - functionType: "startPaTts", + devices,functions }, }) .then((data) => { // console.log(data); - if (data.retCode == "0") { + if (data.code == "200") { Message.success("广播设置成功!"); this.modelVisible = false; } else { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue new file mode 100644 index 00000000..a8b7b0bb --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue new file mode 100644 index 00000000..e4eb4f10 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js new file mode 100644 index 00000000..1820068a --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js @@ -0,0 +1,44 @@ +export const devicesFormList = [ + { + label: "设备内温度过高", + key: `theInternalTemperatureOfTheDeviceOverheats`, + // text: "-", + gridColumn: 2, + }, + { + label: "阵列电压", + key: `arrayVoltage`, + // text: "-", + gridColumn: 2, + }, + { + label: "阵列电流", + key: `arrayCurrent`, + // text: "-", + gridColumn: 2, + }, + { + label: "发电功率L", + key: `generatingPowerL`, + text: "-", + gridColumn: 2, + }, + { + label: "发电功率H", + key: `generatingPowerH`, + text: "-", + gridColumn: 2, + }, + { + label: "负载电压", + key: `loadVoltage`, + text: "-", + gridColumn: 2, + }, + { + label: "负载电流", + key: `loadCurrent`, + text: "-", + gridColumn: 2, + }, +]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue new file mode 100644 index 00000000..88e9570d --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue @@ -0,0 +1,187 @@ + + + + + +../mixin../mixin../mixin diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js index 13dd9f9e..c118c862 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js @@ -25,10 +25,13 @@ export const dialogDelayVisible = { computed: { obverseVisible: { set(bool) { - try { - typeof this.visibleClose === "function" && this.visibleClose?.(bool); - } catch (error) {} - + if(this.visibleClose){ + try { + typeof this.visibleClose === "function" && this.visibleClose?.(bool); + } catch (error) {} + + } + setTimeout(() => { this.$emit("change", bool); }, 180); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue index 1bd6844e..169cbc77 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue @@ -53,6 +53,7 @@ import RoadNetworkFacilities from "./../Dialogs/RoadNetworkFacilities/index.vue" import SmartDevice from "./../Dialogs/SmartDevice/index.vue"; import RemoteMachine from "./../Dialogs/RemoteMachine/index.vue"; import SolarEnergy from "./../Dialogs/SolarEnergy/index.vue"; +import ConfluenceArea from "./../Dialogs/ConfluenceArea/index.vue"; import Intermodulation from "./../Dialogs/Intermodulation/index.vue"; import GuardrailCollision from "./../Dialogs/GuardrailCollision/index.vue"; import MeteorologicalDetection from "./../Dialogs/MeteorologicalDetection/index.vue"; @@ -79,7 +80,8 @@ export default { FatigueWakesUp, RoadNetworkFacilities, RemoteMachine, - MeteorologicalDetection + MeteorologicalDetection, + ConfluenceArea }, data() { return { @@ -246,7 +248,7 @@ export default { const key = getHandleDeviceType(item) || `${this.active}/${item.title}`; const status = item.status; - + console.log(item.status,'------------') if (!status) { //开启 this.nowSelected = item.title; this.nowSelectedCompleted = false; @@ -479,4 +481,4 @@ export default { } } } - +../Dialogs/ConfluenceArea/index.vue diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index b863512a..8fa15c98 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -57,6 +57,7 @@ export const DeviceForMap = { }, 合流区: { deviceType: "8", + dialog:"ConfluenceArea", }, 护栏碰撞: { deviceType: "6", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue index 7a7ae814..7fc80fed 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue @@ -485,6 +485,7 @@ export default { }, ], weatherList: [], + sort:['长清区','平阴县','东平县','汶上县','梁山县','嘉祥县','巨野县','郓城县'] }; }, @@ -503,28 +504,10 @@ export default { getWeatherFacts().then((response) => { let obj = response.data; let data = []; - for (let key in obj) { - // if (key === "weatherFacts1") { - // obj[key].name = "长清区"; - // } else if (key === "weatherFacts2") { - // obj[key].name = "平阴县"; - // } else if (key === "weatherFacts3") { - // obj[key].name = "东平县"; - // } else if (key === "weatherFacts4") { - // obj[key].name = "汶上县"; - // } else if (key === "weatherFacts5") { - // obj[key].name = "梁山县"; - // } else if (key === "weatherFacts6") { - // obj[key].name = "嘉祥县"; - // } else if (key === "weatherFacts7") { - // obj[key].name = "巨野县"; - // } else if (key === "weatherFacts8") { - // obj[key].name = "郓城县"; - // } - data.push(obj[key]); + for(let i of this.sort){ + data.push(_.find(obj,{name:i})) } this.weatherList = data; - // console.log("weatherList", this.weatherList); }); }, // 按小时查询天气 @@ -533,30 +516,12 @@ export default { let obj = response.data; let data = []; for (let key in obj) { - // if (key === "hourlyWeather1") { - // console.log("obj[key]", obj[key][id - 1]); - // obj[key][id - 1].name = "长清区"; - // } else if (key === "hourlyWeather2") { - // obj[key][id - 1].name = "平阴县"; - // } else if (key === "hourlyWeather3") { - // obj[key][id - 1].name = "东平县"; - // } else if (key === "hourlyWeather4") { - // obj[key][id - 1].name = "汶上县"; - // } else if (key === "hourlyWeather5") { - // obj[key][id - 1].name = "梁山县"; - // } else if (key === "hourlyWeather6") { - // obj[key][id - 1].name = "嘉祥县"; - // } else if (key === "hourlyWeather7") { - // obj[key][id - 1].name = "巨野县"; - // } else if (key === "hourlyWeather8") { - // obj[key][id - 1].name = "郓城县"; - // } - data.push(obj[key]); + data.push(obj[key][id-1]); } let newData = []; - data.forEach((item) => { - newData.push(item[id - 1]); - }); + for(let i of this.sort){ + newData.push(_.find(data,{name:i})) + } this.weatherList = newData; }); },