Browse Source

更新

wangqin
hui 7 months ago
parent
commit
61a36bb183
  1. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  2. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  3. 47
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  4. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  5. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index copy.vue
  6. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  7. 16
      ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js
  8. 20
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  9. 4
      ruoyi-ui/vue.config.js

8
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

@ -36,7 +36,7 @@ import Video from "@screen/components/Video";
import request from "@/utils/request"; import request from "@/utils/request";
import { delay } from "@screen/utils/common.js"; import { delay } from "@screen/utils/common.js";
import { handle3CResult } from "@screen/utils/deviceControl.js"; import { handle3CResult } from "@screen/utils/deviceControl.js";
import { controlModelMap, gzztMap } from "@screen/utils/enum.js"; import { inducerModeDic, inducerWorkTypeDic } from "@screen/utils/enum.js";
import { find, assign } from "lodash"; import { find, assign } from "lodash";
import { dialogDelayVisible } from "./../mixin"; import { dialogDelayVisible } from "./../mixin";
import LineChart from "../../LineChart/index.vue"; import LineChart from "../../LineChart/index.vue";
@ -154,11 +154,11 @@ export default {
methods: { methods: {
updateFormData(formData) { updateFormData(formData) {
formData.workMode && formData.workMode &&
this.$set(this.data, "workMode", controlModelMap[formData.workMode]); //(this.data.workMode = controlModelMap[formData.controlType]); this.$set(this.data, "workMode", inducerModeDic[formData.workMode]); //(this.data.workMode = inducerModeDic[formData.controlType]);
formData.inWorkStatus && formData.inWorkStatus &&
this.$set(this.data, "inWorkStatus", gzztMap[formData.inWorkStatus]); //(this.data.inWorkStatus = gzztMap[formData.inWorkStatus]); this.$set(this.data, "inWorkStatus", inducerWorkTypeDic[formData.inWorkStatus]); //(this.data.inWorkStatus = inducerWorkTypeDic[formData.inWorkStatus]);
formData.onWorkStatus && formData.onWorkStatus &&
this.$set(this.data, "onWorkStatus", gzztMap[formData.onWorkStatus]); //(this.data.onWorkStatus = gzztMap[formData.onWorkStatus]); this.$set(this.data, "onWorkStatus", inducerWorkTypeDic[formData.onWorkStatus]); //(this.data.onWorkStatus = inducerWorkTypeDic[formData.onWorkStatus]);
}, },
handleClickTabs() { }, handleClickTabs() { },

40
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue

@ -22,28 +22,31 @@
</template> </template>
<template v-if="editData.deviceType == '10'"> <template v-if="editData.deviceType == '10'">
<div class="center"> <div class="center">
<p>{{ awakerModeDic[editData.params.SETMD] }}</p> <p>{{ awakerWorkModeDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p> <p>时长{{ editData.params.SETTM }}分钟</p>
</div> </div>
</template> </template>
<template v-if="editData.deviceType == '12'"> <template v-if="editData.deviceType == '12'">
<div class="center"> <div class="center">
<p>{{ induceModeDic[editData.params.SETMD] }}</p> <p>{{ inducerModeDic[editData.params.mode] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p> <p>上行{{ inducerWorkType[editData.params.onWorkStatus] }},
下行{{inducerWorkType[editData.params.inWorkStatus] }}</p>
</div> </div>
</template> </template>
<template v-if="editData.deviceType == '13'"> <template v-if="editData.deviceType == '13'">
<div class="center"> <div class="center">
<p>{{ awakerModeDic[editData.params.SETMD] }}</p> <p>{{ awakerWorkModeDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p> <p>时长{{ editData.params.SETTM }}分钟</p>
</div> </div>
</template> </template>
</div> </div>
<div class="button"> <div class="button">
<el-button size="mini" type="primary" @click="onModify">修改</el-button> <!-- <el-button size="mini" type="primary" @click="onModify">修改</el-button> -->
<el-button size="mini" type="danger" @click="onDelete">删除</el-button> <!-- <el-button size="mini" type="danger" @click="onDelete">删除</el-button> -->
<el-button type="primary" icon="el-icon-edit" size="mini" circle @click="onModify"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" circle @click="onDelete"></el-button>
</div> </div>
</div> </div>
@ -55,7 +58,7 @@
<script> <script>
import request from "@/utils/request"; import request from "@/utils/request";
import { deviceTypeDic, gzmsMap, gzztMap } from "@screen/utils/enum.js" import { deviceTypeDic, awakerWorkModeDic, inducerWorkTypeDic, inducerModeDic } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/utils/api/device.js" import { getDeviceList } from "@screen/utils/api/device.js"
import taskEditDialog from "./taskEditDialog.vue"; import taskEditDialog from "./taskEditDialog.vue";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
@ -76,8 +79,9 @@ export default {
isEditingTask: false, isEditingTask: false,
selectedType:"", selectedType:"",
deviceTypeDic:"", deviceTypeDic:"",
awakerModeDic:"", awakerWorkModeDic:"",
induceModeDic:"", inducerModeDic:"",
inducerWorkType:"",
deviceDic:{}, deviceDic:{},
deviceList:[] deviceList:[]
}; };
@ -90,8 +94,9 @@ export default {
}, },
mounted() { mounted() {
this.deviceTypeDic = deviceTypeDic; this.deviceTypeDic = deviceTypeDic;
this.awakerModeDic = gzmsMap; this.awakerWorkModeDic = awakerWorkModeDic;
this.induceModeDic = gzztMap; this.inducerModeDic = inducerModeDic;
this.inducerWorkType = inducerWorkTypeDic;
this.isCompReady = true; this.isCompReady = true;
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######"); console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######");
this.initBasicData().then(res=>{ this.initBasicData().then(res=>{
@ -111,10 +116,7 @@ export default {
SETTM: temp.functions[1].params.SET, SETTM: temp.functions[1].params.SET,
} }
} else if (temp.deviceType == '12') { } else if (temp.deviceType == '12') {
params = { params = { ...temp.functions[0].params }
SETMD: temp.functions[0].params.SET,
SETTM: temp.functions[1].params.SET,
}
} else if (temp.deviceType == '13') { } else if (temp.deviceType == '13') {
params = { params = {
SETMD: temp.functions[0].params.SET, SETMD: temp.functions[0].params.SET,
@ -188,9 +190,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.task_editor_box{ .task_editor_box{
.main_ctt{ align-items: stretch; border-top:1px dashed #0AC; padding: 6px 0; max-height: 80px; .main_ctt{ align-items: stretch; border-top:1px dashed #0AC; padding: 6px 8px; max-height: 80px;
.device_type{ width: 200px; display: flex; flex-direction: row; align-items: center; } .device_type{ width: 200px; display: flex; flex-direction: row; align-items: center; }
.devices{ flex: 1; display: flex; flex-wrap: wrap; align-items: flex-start; .devices{ flex: 1; display: flex; flex-wrap: wrap; align-items: center;
span{ font-size:14px; margin:0 4px 3px 0; border-radius: 3px; white-space: nowrap; word-break: break-all; float: left;} span{ font-size:14px; margin:0 4px 3px 0; border-radius: 3px; white-space: nowrap; word-break: break-all; float: left;}
.title{border: 1px solid #0AC; padding: 2px 8px;} .title{border: 1px solid #0AC; padding: 2px 8px;}
.other{padding: 3px 8px;} .other{padding: 3px 8px;}
@ -198,9 +200,9 @@ export default {
.content{ width: 300px; display: flex; align-items: stretch; .content{ width: 300px; display: flex; align-items: stretch;
.board{ flex: 1; } .board{ flex: 1; }
.text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;} .text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;}
.center{ flex: 1; text-align: center;} .center{ flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;}
} }
.button{ width:140px; margin-left: 10px} .button{ width:140px; margin-left: 10px; display: flex; align-items: center;}
} }
} }
</style> </style>

47
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue

@ -70,9 +70,10 @@
<!-- 激光疲劳唤醒 --> <!-- 激光疲劳唤醒 -->
<el-form-item label="工作模式"> <el-form-item label="工作模式">
<el-select v-model="editData.type10.SETMD" placeholder="请选择"> <el-select v-model="editData.type10.SETMD" placeholder="请选择">
<el-option v-for="value,key in gzmsMap" :key="key" :label="value" :value="key" /> <el-option v-for="value,key in awakerWorkModeDic" :key="key" :label="value" :value="key" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工作时长"> <el-form-item label="工作时长">
<el-col :span="8"> <el-col :span="8">
<el-input-number v-model="editData.type10.SETTM" :min="0" :max="100000" /> <el-input-number v-model="editData.type10.SETTM" :min="0" :max="100000" />
@ -83,16 +84,22 @@
<template v-else-if="searchData.deviceType == '12'"> <template v-else-if="searchData.deviceType == '12'">
<!-- 行车诱导 --> <!-- 行车诱导 -->
<el-form-item label="工作模式"> <el-alert title="行车诱导设备开启后无法自动关闭,需要再新增一个定时任务将其关闭。" type="warning" :closable="false" show-icon>
<el-select v-model="editData.type12.SETMD" placeholder="请选择"> </el-alert>
<el-option v-for="value, key in gzztMap" :key="key" :label="value" :value="key" /> <el-form-item label="工作模式(定时控制只能使用手动模式)">
<el-select v-model="editData.type12.mode" placeholder="请选择" disabled>
<el-option v-for="value, key in inducerModeDic" :key="key" :label="value" :value="key" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工作时长"> <el-form-item label="上行工作模式">
<el-col :span="8"> <el-select v-model="editData.type12.onWorkStatus" placeholder="请选择">
<el-input-number v-model="editData.type12.SETTM" :min="0" :max="100000" /> <el-option v-for="value, key in inducerWorkTypeDic" :key="key" :label="value" :value="key" />
</el-col> </el-select>
<el-col :span="4" style="margin-left: 10px;">分钟</el-col> </el-form-item>
<el-form-item label="下行工作模式">
<el-select v-model="editData.type12.inWorkStatus" placeholder="请选择">
<el-option v-for="value, key in inducerWorkTypeDic" :key="key" :label="value" :value="key" />
</el-select>
</el-form-item> </el-form-item>
</template> </template>
@ -100,7 +107,7 @@
<!-- 智能设备箱 --> <!-- 智能设备箱 -->
<el-form-item label="工作模式"> <el-form-item label="工作模式">
<el-select v-model="editData.type13.SETMD" placeholder="请选择"> <el-select v-model="editData.type13.SETMD" placeholder="请选择">
<el-option v-for="value, key in gzmsMap" :key="key" :label="value" :value="key" /> <el-option v-for="value, key in awakerWorkModeDic" :key="key" :label="value" :value="key" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工作时长"> <el-form-item label="工作时长">
@ -123,7 +130,7 @@
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import { deviceTypeOptions, directionOptions, gzmsMap, gzztMap } from "@screen/utils/enum.js" import { deviceTypeOptions, directionOptions, awakerWorkModeDic, inducerModeDic, inducerWorkTypeDic } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/utils/api/device.js" import { getDeviceList } from "@screen/utils/api/device.js"
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"; import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue";
import BoardInfoEditor from "@screen/components/infoBoard/BoardInfoEditor"; import BoardInfoEditor from "@screen/components/infoBoard/BoardInfoEditor";
@ -151,8 +158,9 @@ export default {
mode:"add", mode:"add",
deviceTypeOptions, deviceTypeOptions,
directionOptions, directionOptions,
gzmsMap, awakerWorkModeDic,
gzztMap, inducerModeDic,
inducerWorkTypeDic,
deviceArr:[], deviceArr:[],
searchData: { searchData: {
deviceType: "", deviceType: "",
@ -213,7 +221,9 @@ export default {
// { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "\\\\n", "width": "160", "height": "80", "formatStyle": "2" } // { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "\\\\n", "width": "160", "height": "80", "formatStyle": "2" }
if (this.propData.deviceType == "2"){ if (this.propData.deviceType == "2"){
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params); this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params);
} else if (["5","10","12","13"].includes(this.propData.deviceType)){ } else if (["5","10","13"].includes(this.propData.deviceType)){
this.editData["type" + this.propData.deviceType] = { ...this.propData.params};
} else if (["12"].includes(this.propData.deviceType)) {
this.editData["type" + this.propData.deviceType] = { ...this.propData.params }; this.editData["type" + this.propData.deviceType] = { ...this.propData.params };
} }
}else{ }else{
@ -278,7 +288,6 @@ export default {
}, },
onSubmit(){ onSubmit(){
// this.boardDataTransform(); // this.boardDataTransform();
console.log(this.editData , "eeeeeeeeee");
let devices = []; let devices = [];
this.deviceArr.forEach((item,index)=>{ this.deviceArr.forEach((item,index)=>{
if (this.editData.devices.includes(item.id)){ if (this.editData.devices.includes(item.id)){
@ -315,10 +324,7 @@ export default {
SETTM: this.editData.type10.SETTM SETTM: this.editData.type10.SETTM
} }
} else if (this.searchData.deviceType == "12") { } else if (this.searchData.deviceType == "12") {
return { return this.editData.type12
SETMD: this.editData.type12.SETMD,
SETTM: this.editData.type12.SETTM
}
} else if (this.searchData.deviceType == "13") { } else if (this.searchData.deviceType == "13") {
return { return {
SETMD: this.editData.type13.SETMD, SETMD: this.editData.type13.SETMD,
@ -330,6 +336,9 @@ export default {
if (Object.keys(this.editData['type' + this.searchData.deviceType]).length<=0){ if (Object.keys(this.editData['type' + this.searchData.deviceType]).length<=0){
this.editData['type'+this.searchData.deviceType] = {}; this.editData['type'+this.searchData.deviceType] = {};
} }
if (this.searchData.deviceType == "12") {
this.$set(this.editData["type" + this.searchData.deviceType], "mode", "00");
}
this.onChange(); this.onChange();
}, },
onChange() { onChange() {

8
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue

@ -393,16 +393,16 @@ export default {
if (it.controlModel) { if (it.controlModel) {
let other = { let other = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel], controlModelName: inducerModeDic[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state], name: inducerWorkTypeDic[it.state],
}; };
if (it.time && it?.time[0]) { if (it.time && it?.time[0]) {
other = { other = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel], controlModelName: inducerModeDic[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state], name: inducerWorkTypeDic[it.state],
startTime: it.time[0], startTime: it.time[0],
endTime: it.time[1], endTime: it.time[1],
}; };

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

@ -67,8 +67,8 @@ import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { throttle } from "lodash"; import { throttle } from "lodash";
import { import {
controlModelMap, inducerModeDic,
gzztMap, inducerWorkTypeDic,
gzmsMap, gzmsMap,
eventSubClassMap, eventSubClassMap,
trafficKV, trafficKV,
@ -306,16 +306,16 @@ export default {
if (it.controlModel) { if (it.controlModel) {
let other = { let other = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel], controlModelName: inducerModeDic[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state], name: inducerWorkTypeDic[it.state],
}; };
if (it.time && it?.time[0]) { if (it.time && it?.time[0]) {
other = { other = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel], controlModelName: inducerModeDic[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state], name: inducerWorkTypeDic[it.state],
startTime: it.time[0], startTime: it.time[0],
endTime: it.time[1], endTime: it.time[1],
}; };

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

@ -54,8 +54,8 @@ import ScopeTable from "./ScopeTable.vue";
import { defaultTableInfo } from "../data"; import { defaultTableInfo } from "../data";
import Table from '@screen/components/Table.vue'; import Table from '@screen/components/Table.vue';
import { import {
controlModelMap, inducerModeDic,
gzztMap, inducerWorkTypeDic,
gzmsMap, gzmsMap,
eventSubClassMap, eventSubClassMap,
trafficKV trafficKV
@ -253,9 +253,9 @@ export default {
if (it.controlModel) { if (it.controlModel) {
data = { data = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel], controlModelName: inducerModeDic[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state], name: inducerWorkTypeDic[it.state],
}; };
if (it.time && it?.time[0]) { if (it.time && it?.time[0]) {
data = { data = {

16
ruoyi-ui/src/views/JiHeExpressway/utils/api/batch.js

@ -15,7 +15,9 @@ export function submitTaskRequest(id, jobGroup, time, devices, params, others) {
}, },
{ {
"functionId": "13", "functionId": "13",
"params": params "params": {
parameters: [params]
}
}, },
{ {
"functionId": "1B", "functionId": "1B",
@ -58,16 +60,8 @@ export function submitTaskRequest(id, jobGroup, time, devices, params, others) {
} }
] ]
} else if (deviceType == '12') { //行车诱导 } else if (deviceType == '12') { //行车诱导
functions = [ // { mode: "00", onWorkStatus: "01", inWorkStatus: "02" }
{ functions = [{ functionId: "51", params }]
"functionId": "SETMD",
"params": { SET: params.SETMD }
},
{
"functionId": "SETTM",
"params": { SET: params.SETTM }
}
]
} else if (deviceType == '13') { //智能设备箱 } else if (deviceType == '13') { //智能设备箱
functions = [ functions = [
{ {

20
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -264,7 +264,7 @@ export const deviceTypeOptions = [
{ {
value: 13, value: 13,
label: "智能设备箱", label: "智能设备箱",
timingControl: true, // timingControl: true,
}, },
{ {
value: 14, value: 14,
@ -286,6 +286,20 @@ export const trafficType = Object.keys(EventTopics).reduce((prev, now) => {
return { ...prev, [EventTopics[now]]: now }; return { ...prev, [EventTopics[now]]: now };
}, {}); }, {});
//激光疲劳唤醒工作模式
export const awakerWorkModeDic = {
"0": "激光关闭",
"1": "常亮模式",
"2": "间隔100ms闪烁模式",
"3": "间隔200ms闪烁模式",
"4": "间隔500ms闪烁模式",
"5": "2次闪烁模式",
"6": "SOS模式",
"7": "自定义模式1",
"8": "自定义模式2",
"9": "自定义模式3",
};
// 感知事件主类的子类(上方) warningSubclass // 感知事件主类的子类(上方) warningSubclass
export const WarningSubclass = { export const WarningSubclass = {
1: { 1: {
@ -1080,13 +1094,13 @@ export const directionOptions = [
//行车诱导相关 //行车诱导相关
export const controlModelMap = { export const inducerModeDic = {
"00": "手动模式", "00": "手动模式",
"01": "自动模式", "01": "自动模式",
"02": "万年历", "02": "万年历",
}; };
export const gzztMap = { export const inducerWorkTypeDic = {
"00": "不更新", "00": "不更新",
"01": "常亮", "01": "常亮",
"02": "流水", "02": "流水",

4
ruoyi-ui/vue.config.js

@ -52,8 +52,8 @@ module.exports = {
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁 // target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁 // target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥 // target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.72.174:8087`, //赵祥龙 // target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟 // target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝 // target: `http://10.168.56.165:8087`, //王家宝

Loading…
Cancel
Save