Browse Source

预案

wangqin
zhoule 11 months ago
parent
commit
2b5a669a1f
  1. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  2. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  3. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

12
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -66,18 +66,6 @@ import { Message } from "element-ui";
import { Loading } from 'element-ui';
import { WarningType as warningTypeMapping, WarningSubclass as warningSubclassTypeMapping } from "@screen/utils/enum.js"
function getRandomData(min = 1, max = 15) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getMockData() {
return Array.from({ length: getRandomData(9, 24) }).map(() => ({
time: "2023.12.22 13:00:00",
source: "视频智能识别",
location: "k100+000",
direction: "济南方向",
}));
}
const warningSourceMapping = {
1: '视频AI',

40
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -412,6 +412,29 @@ const typeMap = {
]
}
const gzztMap = {
"01": '常亮',
"02": '流水',
"03": '闪烁',
"04": '关闭',
}
const gzmsMap = {
"SETMD0": "激光关闭",
"SETMD1": "常亮模式",
"SETMD2": "间隔100ms闪烁模式",
"SETMD3": "间隔200ms闪烁模式",
"SETMD4": "间隔500ms闪烁模式",
"SETMD5": "2次闪烁模式",
"SETMD6": "SOS模式",
"SETMD7": "自定义模式1",
"SETMD8": "自定义模式2",
"SETMD9": "自定义模式3",
}
const controlModelMap = {
"00": '手动模式',
"01": '自动模式',
"02": '万年历',
}
export default {
name: 'addAndEditDialog',
components: {
@ -599,7 +622,15 @@ export default {
let action = {};
if (it.otherConfig) {
let config = JSON.parse(it.otherConfig);
action = { ...it, ...config, qbb: (config?.dcInfoBoardTemplate?.content || '') };
let qbb = ''
if (config.id) {
qbb = config.content;
config = { dcInfoBoardTemplate: config };
}
// if (config.state) {
// config.gzms = config.state
// }
action = { ...it, ...config, qbb: qbb };
}
if (it.deviceList) {
action.deviceList = it.deviceList.split(',').map(str => Number(str));
@ -653,12 +684,16 @@ export default {
if (it.controlModel) {
let other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state]
}
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state],
startTime: it.time[0],
endTime: it.time[1]
}
@ -668,6 +703,7 @@ export default {
if (it.gzms) {
data.otherConfig = JSON.stringify({
state: it.gzms,
name: gzmsMap[it.gzms],
operationDuration: it.operationDuration,
})
}
@ -678,8 +714,8 @@ export default {
if (valid) {
// this.submitting = false;
let secondFormTable = this.$refs['secondFormTable'].tableData || [];
// console.log('12', secondFormTable);
let thirdFormTable = this.$refs['thirdFormTable'].tableData || [];
console.log('12', thirdFormTable);
let dcArr = [];
let id = '';
if (this.dialogType == 2) id = this.planId;

10
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

@ -55,11 +55,11 @@
<div v-if="scope.row.deviceType == 12" class="mjs">
<el-select v-model="scope.row.controlModel" placeholder="请选择控制模式">
<el-option label="手动模式" :value="1"></el-option>
<el-option label="自动模式" :value="2"></el-option>
<el-option label="万年历" :value="3"></el-option>
<el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" value="02"></el-option>
</el-select>
<el-time-picker v-if="scope.row.controlModel == 2" v-model="scope.row.time" is-range
<el-time-picker v-if="scope.row.controlModel == '01'" v-model="scope.row.time" is-range
style="" range-separator="-" placeholder="选择时间" value-format="HH:mm" format="HH:mm">
</el-time-picker>
<el-select v-model="scope.row.state" placeholder="工作状态">
@ -329,7 +329,7 @@ export default {
},
dialogSubmit(data) {
this.tableData[this.index].qbb = data.content;
this.tableData[this.index].otherConfig = JSON.stringify({ dcInfoBoardTemplate: data });
this.tableData[this.index].otherConfig = JSON.stringify(data);
}
}
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

@ -28,7 +28,7 @@
<ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" />
<ElTableColumn prop="planName" label="预案名称" width="140" align="center" />
<ElTableColumn prop="triggeringCondition" label="检索条件" width="140" />
<ElTableColumn prop="strDeviceType" label="设备类型" width="140" />
<ElTableColumn prop="deviceType" label="设备类型" width="140" />
<ElTableColumn prop="controllableDeviceName" label="可控设备"/>
<ElTableColumn prop="controlCommand" label="控制指令" />
<ElTableColumn label="操作" width="210" align="center">
@ -146,7 +146,7 @@ export default {
result.rows.forEach(it => {
it.strEventCategory = it.eventCategory == 1 ? '交通事件' : '感知事件';
it.strEventType = eventTypeMap[it.eventCategory || 0][it.eventType];
it.strDeviceType = deviceMap[it.deviceType];
// it.strDeviceType = deviceMap[it.deviceType];
})
this.tableData = result.rows;
this.total = result.total;

Loading…
Cancel
Save