diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue
index 1db5ee26..4be2b1c3 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue
@@ -1,16 +1,8 @@
-
-
+
+
{{ item.label || "-" }}
@@ -18,18 +10,9 @@
:
-
+
-
+
{{ value }}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParamMulti.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParamMulti.vue
index 0fabeb8f..10e19ac0 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParamMulti.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParamMulti.vue
@@ -9,7 +9,7 @@
showWordLimit placeholder="请输入发布内容" />
-
@@ -30,6 +30,7 @@ import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGr
import request from "@/utils/request";
import { batchFunctions } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
+import { multiResultShow } from "@screen/utils/common";
import { Message } from "element-ui";
@@ -85,18 +86,19 @@ export default {
methods: {
cancelClick() {
this.$emit("update:activeIcon", null);
- this.submitting = false;
+ this.$emit("update:submitting", false);
+ // this.submitting = false;
},
handleSubmit() {
const selectItems = this.selectItems.map(item => JSON.parse(item));
- console.log(this.selectItems, selectItems, "selectItems");
const checkList = selectItems.map(item => JSON.parse(item.otherConfig));
if (!this.releaseMessage?.trim())
return Message.error("发布内容不能为空!");
if (!selectItems.length)
- return Message.error("请至少选择一个广播设备!");
+ return Message.error("请至少选择一个设备!");
- this.submitting = true;
+ // this.submitting = true;
+ this.$emit("update:submitting", true);
batchFunctions(
{
@@ -118,17 +120,11 @@ export default {
]
})
.then((data) => {
- const allItems = data.data;
- const successItems = allItems.filter(item => item.result.retCode == 0);
- console.log("xxxxxxx111")
- if (successItems.length == allItems.length) {
- Message.success("广播设置成功!");
- } else {
- Message.error(`广播设置失败, 失败${allItems.length - successItems.length}个!`);
- }
+ multiResultShow(data.data, item => item.result.retCode == 0, "广播设置");
})
.finally(() => {
- this.submitting = false;
+ // this.submitting = false;
+ this.$emit("update:submitting", false);
});
},
},
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
index a34a4490..efaad632 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
@@ -1,28 +1,12 @@
-
-
+
@@ -44,7 +37,7 @@ import request from "@/utils/request";
import { delay } from "@screen/utils/common.js";
import { handle3CResult } from "@screen/utils/deviceControl.js";
import { controlModelMap, gzztMap } from "@screen/utils/enum.js";
-import { find } from "lodash";
+import { find, assign } from "lodash";
import { dialogDelayVisible } from "./../mixin";
import LineChart from "../../LineChart/index.vue";
@@ -55,6 +48,7 @@ export default {
provide() {
return {
requestURL: this.requestURL,
+ updateFormData: this.updateFormData
};
},
components: {
@@ -127,7 +121,7 @@ export default {
.then((data) => {
this.dialogData.brand = data.brand;
})
- .catch((err) => {});
+ .catch((err) => { });
// this.requestURL(52)
// .then((result) => {
@@ -145,13 +139,7 @@ export default {
const formData = {};
formData.controlType = data.mode;
await handle3CResult(data, formData, this.requestURL);
-
- formData.controlType &&
- this.$set(this.data, "workMode", controlModelMap[formData.controlType]); //(this.data.workMode = controlModelMap[formData.controlType]);
- formData.inWorkStatus &&
- this.$set(this.data, "inWorkStatus", gzztMap[formData.inWorkStatus]); //(this.data.inWorkStatus = gzztMap[formData.inWorkStatus]);
- formData.onWorkStatus &&
- this.$set(this.data, "onWorkStatus", gzztMap[formData.onWorkStatus]); //(this.data.onWorkStatus = gzztMap[formData.onWorkStatus]);
+ this.updateFormData({ ...formData, workMode: data.mode });
});
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
@@ -164,7 +152,16 @@ export default {
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods: {
- handleClickTabs() {},
+ updateFormData(formData) {
+ formData.workMode &&
+ this.$set(this.data, "workMode", controlModelMap[formData.workMode]); //(this.data.workMode = controlModelMap[formData.controlType]);
+ formData.inWorkStatus &&
+ this.$set(this.data, "inWorkStatus", gzztMap[formData.inWorkStatus]); //(this.data.inWorkStatus = gzztMap[formData.inWorkStatus]);
+ formData.onWorkStatus &&
+ this.$set(this.data, "onWorkStatus", gzztMap[formData.onWorkStatus]); //(this.data.onWorkStatus = gzztMap[formData.onWorkStatus]);
+
+ },
+ handleClickTabs() { },
requestURL(functionId = 52, options = {}) {
return new Promise((resolve, reject) => {
request
@@ -219,7 +216,7 @@ export default {
align-items: center;
justify-content: end;
- > div {
+ >div {
font-size: 16px;
padding: 6px 12px;
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
index 738de131..41b4362a 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
@@ -1,86 +1,9 @@
@@ -115,7 +103,7 @@ export default {
if (roadInfo) this.$set(this.data, "roadName", roadInfo.roadName);
},
methods: {
- handleClickTabs() {},
+ handleClickTabs() { },
},
};
@@ -156,7 +144,7 @@ export default {
align-items: center;
justify-content: end;
- > div {
+ >div {
font-size: 16px;
padding: 6px 12px;
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
index fd23a851..dc8d4b51 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
@@ -4,9 +4,11 @@
{{ data.text }}
- handleSwitcherChange(value, data)" />
- {{ data.state?'开':'关' }}
+ {{ data.state ? '开' :
+ '关' }}
+
@@ -49,93 +51,93 @@ export default {
},
created() {
- Promise.all([this.getAc(), this.getDc()]).then(res=>{
- // if (result.code != 200) return;
+ Promise.all([this.getAc(), this.getDc()]).then(res => {
+ // if (result.code != 200) return;
let ac = res[0].data;
let dc = res[1].data;
let deviceInfo = _.merge({}, ac, dc);
- const typeMap = {
- ac: '220v',
- dc: '12v',
- }
- for (const key in deviceInfo.formatValue) {
- // electricity 电流
- // voltage 电压
- if (key.includes('electricity')) {
- const args = key.match(/[a-z]+|[0-9]+$/g);
+ const typeMap = {
+ ac: '220v',
+ dc: '12v',
+ }
+ for (const key in deviceInfo.formatValue) {
+ // electricity 电流
+ // voltage 电压
+ if (key.includes('electricity')) {
+ const args = key.match(/[a-z]+|[0-9]+$/g);
- const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
- // console.log(type , num , prefix , "+++=========="); //dc 2 dc_out
- this.devicesList.push(
- {
- label: `支路${num} (${typeMap[type]}) 电压`,
- key: `${prefix}_voltage_${num}`,
- text: deviceInfo.formatValue[`${prefix}_voltage_${num}`],
- gridColumn: 3
- },
- {
- label: '电流',
- key: `${prefix}_electricity_${num}`,
- text: deviceInfo.formatValue[key],
- gridColumn: 2,
- state: deviceInfo.value[key] > 0
- }
- );
- }
+ const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
+ // console.log(type , num , prefix , "+++=========="); //dc 2 dc_out
+ this.devicesList.push(
+ {
+ label: `支路${num} (${typeMap[type]}) 电压`,
+ key: `${prefix}_voltage_${num}`,
+ text: deviceInfo.formatValue[`${prefix}_voltage_${num}`],
+ gridColumn: 3
+ },
+ {
+ label: '电流',
+ key: `${prefix}_electricity_${num}`,
+ text: deviceInfo.formatValue[key],
+ gridColumn: 2,
+ state: deviceInfo.value[key] > 0
+ }
+ );
}
- this.devicesList.push(
- {
- label: '风扇',
- key: `fan_status`,
- // key: `aa_electricity_1`,
- text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-',
- gridColumn: 2,
- state: (deviceInfo.formatValue['fan_status']==='0')
- },
-
- {
- label: '温度',
- key: `temperature`,
- text: deviceInfo.formatValue['temperature'] ? `${deviceInfo.formatValue['temperature']} °C` : '-',
- gridColumn: 2
- },
- {
+ }
+ this.devicesList.push(
+ {
+ label: '风扇',
+ key: `fan_status`,
+ // key: `aa_electricity_1`,
+ text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-',
+ gridColumn: 2,
+ state: (deviceInfo.formatValue['fan_status'] === '0')
+ },
+
+ {
+ label: '温度',
+ key: `temperature`,
+ text: deviceInfo.formatValue['temperature'] ? `${deviceInfo.formatValue['temperature']} °C` : '-',
+ gridColumn: 2
+ },
+ {
label: '箱门',
key: `door_status`,
text: { 0: '关闭', 1: '打开' }[deviceInfo.formatValue['door_status']] || '-',
gridColumn: 1
},
- {
- label: '湿度',
- key: `humidity`,
- text: deviceInfo.formatValue['humidity'] ? `${deviceInfo.formatValue['humidity']} %` : '-',
- gridColumn: 2
- },
- {
- label: '市电掉电',
- key: `power_status`,
- text: { 0: '正常', 1: '掉电' }[deviceInfo.formatValue['power_status']] || '-',
- gridColumn: 2
- },
- )
- // this.data = result.rows;
- // this.total = result.total;
- })
+ {
+ label: '湿度',
+ key: `humidity`,
+ text: deviceInfo.formatValue['humidity'] ? `${deviceInfo.formatValue['humidity']} %` : '-',
+ gridColumn: 2
+ },
+ {
+ label: '市电掉电',
+ key: `power_status`,
+ text: { 0: '正常', 1: '掉电' }[deviceInfo.formatValue['power_status']] || '-',
+ gridColumn: 2
+ },
+ )
+ // this.data = result.rows;
+ // this.total = result.total;
+ })
.finally(() => {
this.secondLoading = false
})
},
methods: {
- getAc(){
+ getAc() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1ac`,
method: "get",
params: {}
})
},
- getDc(){
+ getDc() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1dc`,
method: "get",
@@ -145,17 +147,16 @@ export default {
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";
let deviceName = "";
- if(data.key.includes("fan")){
+ if (data.key.includes("fan")) {
str += "风扇?";
deviceName = "fan_out_en";
- }else{
+ } else {
str += "该支路?"
deviceName = data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en"; //dc_out_2_en ac_out_2_en;
}
data.state = value;
const isContinue = await confirm({ message: `${str}` })
.catch(() => {
- console.log(data.state,value,333)
data.state = !value;
});
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue
index 26bf1e93..64b0dda6 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue
@@ -2,8 +2,8 @@
暂无设备参数
-
- {{ data.text }}
+
+ {{ data.text }}
handleSwitcherChange(value, data)" />
{{ data.state ? '开' :
@@ -17,10 +17,12 @@
@@ -54,7 +325,7 @@ export default {
.EditEventInformationDialog {
gap: 9px;
width: 1050px;
- height: 810px;
+ height: 850px;
display: flex;
flex-direction: column;
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/index.vue
index 7b49b40c..581eeaec 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/index.vue
@@ -22,7 +22,7 @@
{{ detailData.eventLevel?`${detailData.eventCause+['','一','二','三','四','五'][detailData.eventLevel]}级事件` : '暂无事件等级' }}
-
+
@@ -80,6 +80,11 @@ export default {
],
editEventInformationDialogVisible: false
}
+ },
+ methods: {
+ closeDialog(){
+ this.editEventInformationDialogVisible = false;
+ }
}
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue
index 06e1004c..2a2f46da 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue
@@ -25,7 +25,7 @@
-->
-
+
一键发布