From 535c2aa8633531d1d622a34708f844ed7f77e022 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E9=92=A6?= <360013221@qq.com>
Date: Thu, 16 May 2024 14:13:02 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=88=E6=B5=81=E5=8C=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/Dialog/index.vue | 1 -
.../components/BroadcastReleases.vue | 41 +++-
.../components/DeviceControlDialog.vue | 156 +++++++++++++++
.../components/DeviceParams.vue | 124 ++++++++++++
.../components/Dialogs/ConfluenceArea/data.js | 44 +++++
.../Dialogs/ConfluenceArea/index.vue | 187 ++++++++++++++++++
.../pages/Home/components/Dialogs/mixin.js | 11 +-
.../Home/components/RoadAndEvents/index.vue | 8 +-
.../RoadAndEvents/utils/buttonEvent.js | 1 +
.../components/sortFaceForecast/index.vue | 49 +----
10 files changed, 563 insertions(+), 59 deletions(-)
create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue
create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue
create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js
create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue
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 @@
+
+
+
暂无设备参数
+
+
+ {{ data.text }}
+
+
+
+
+
+
+
+
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;
});
},