Browse Source

合流区+预案参数

wangqin
王钦 6 months ago
parent
commit
822e85737f
  1. 57
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue
  2. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue
  3. 39
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue
  4. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

57
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue

@ -1,6 +1,7 @@
<template> <template>
<Dialog v-model="modelVisible" title="设备操作" width="600px"> <Dialog v-model="modelVisible" title="设备操作" width="600px">
<div class="DeviceControlDialog"> <div class="DeviceControlDialog">
<div style="height: 500px;overflow-y:auto;">
<Form <Form
column="2" column="2"
v-if="formList && formList.length" v-if="formList && formList.length"
@ -10,6 +11,7 @@
:formList="formList" :formList="formList"
:value="formData" :value="formData"
/> />
</div>
</div> </div>
<template #footer> <template #footer>
<Button @click.native="handleSubmit"> 发送 </Button> <Button @click.native="handleSubmit"> 发送 </Button>
@ -66,6 +68,19 @@ export default {
{label:"黄色",value:"2"}, {label:"黄色",value:"2"},
{label:"绿色",value:"3"}, {label:"绿色",value:"3"},
], ],
enum_normalTextSetting:[
{label:"常态文字持续显示",value:"0"},
{label:"触发显示常态文字",value:"1"},
],
enum_wordCycle:[
{label:"1:1常亮",value:"1"},
{label:"1:2",value:"2"},
{label:"1:3",value:"3"},
{label:"1:4",value:"4"},
{label:"2:4",value:"5"},
{label:"3:4",value:"6"},
{label:"4:5",value:"7"}
],
enum_wordFlicker:[ enum_wordFlicker:[
{label:"20次/min",value:"1"}, {label:"20次/min",value:"1"},
{label:"30次/min",value:"2"}, {label:"30次/min",value:"2"},
@ -81,13 +96,14 @@ export default {
"volume", "volume",
"colour", "colour",
"wordFlickerFrequency", "wordFlickerFrequency",
"textShiningDutyCycle", "wordDutyCycle",
"normalTextContent", "normalTextContent",
"triggerStateTextContent", "triggerTextContent",
"triggerTextDuration", "triggerTextDuration",
"normalTextDisplaySettings", "normalTextSetting",
"vehicleDetectorSensitivity", "vehicleDetectionSensitivity",
"calculationCycle", "averageData",
"timeQuantum",
"firstTimePeriodStartTTime", "firstTimePeriodStartTTime",
"firstTimePeriodEndTime", "firstTimePeriodEndTime",
"firstTimePeriodRedAndBlueFlash", "firstTimePeriodRedAndBlueFlash",
@ -147,7 +163,6 @@ export default {
pv += `${x.propertyName},${x.type},${x.property}.` pv += `${x.propertyName},${x.type},${x.property}.`
}) })
let n = _.find(result.data,{property:'numberOfPeriods'});
let _formList = []; let _formList = [];
this.list.forEach(e => { this.list.forEach(e => {
const p = _.find(result.data,{property:e}) const p = _.find(result.data,{property:e})
@ -161,7 +176,7 @@ export default {
if(p.property.indexOf('PeriodHornSwitch') !== -1 || if(p.property.indexOf('PeriodHornSwitch') !== -1 ||
p.property.indexOf('PeriodRedAndBlueFlash') !== -1 || p.property.indexOf('PeriodRedAndBlueFlash') !== -1 ||
p.property.indexOf('PeriodWhetherToReport') !== -1 || p.property.indexOf('PeriodWhetherToReport') !== -1 ||
p.property.indexOf('firstTimePeriodScreenSwitch') !== -1 ){ // | p.property.indexOf('TimePeriodScreenSwitch') !== -1 ){ // |
_formList.push({ _formList.push({
label: p.propertyName+':', label: p.propertyName+':',
key: p.property, key: p.property,
@ -180,11 +195,16 @@ export default {
], ],
}, },
}) })
} else if(p.property.indexOf('PeriodHornSwitch') !== -1){ } else if(p.property === 'wordFlickerFrequency'){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_wordFlicker
} }
})
}else if(p.property==="colour"){ }else if(p.property==="colour"){
_formList.push({ _formList.push({
label: p.propertyName+':', label: p.propertyName+':',
@ -195,17 +215,28 @@ export default {
options: this.enum_color options: this.enum_color
} }
}) })
} else if(p.property==="wordFlickerFrequency"){ }else if(p.property==="wordDutyCycle"){
_formList.push({ _formList.push({
label: p.propertyName+':', label: p.propertyName+':',
key: p.property, key: p.property,
type: "select", type: "select",
default: null, default: null,
options: { options: {
options: this.enum_wordFlicker options: this.enum_wordCycle
}
})
}else if(p.property==="normalTextSetting"){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_normalTextSetting
} }
}) })
} }
}
this.formData[p.property] = p.value this.formData[p.property] = p.value
} }
}) })

1
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue

@ -57,7 +57,6 @@ export default {
method: "get", method: "get",
}).then(result => { }).then(result => {
if (result.code != 200) return Message.error("操作失败"); if (result.code != 200) return Message.error("操作失败");
console.log('------------',result)
result.data.forEach(item => { result.data.forEach(item => {
if (item.propertyName) { if (item.propertyName) {
devs.push({ devs.push({

39
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="ScopeTable"> <div class="ScopeTable">
<el-row> <el-row :gutter="5">
<el-col :span="2"> <el-col :span="3">
<p>设备资源:</p> <p>设备资源:</p>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
@ -19,7 +19,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="10">
<!-- 设备列表 --> <!-- 设备列表 -->
<el-select v-if="tableInfo.searchRule == 1" v-model="tableInfo.devList" placeholder="请选择设备" multiple <el-select v-if="tableInfo.searchRule == 1" v-model="tableInfo.devList" placeholder="请选择设备" multiple
collapse-tags> collapse-tags>
@ -36,8 +36,8 @@
<span v-if="tableInfo.searchRule == 4" style="width: 56px;">公里</span> <span v-if="tableInfo.searchRule == 4" style="width: 56px;">公里</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="5">
<el-col :span="2"> <el-col :span="3">
<p>执行操作:</p> <p>执行操作:</p>
</el-col> </el-col>
<!-- 可变信息标识 --> <!-- 可变信息标识 -->
@ -48,7 +48,8 @@
</el-select> </el-select>
</el-col> </el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.zx_operationType == 1" :span="4"> <el-col v-if="tableInfo.deviceType == 2 && tableInfo.zx_operationType == 1" :span="4">
<el-input @click.native="clickQbb('zx_content')" placeholder="请选择" v-model="tableInfo.zx_content" <el-input @click.native="clickQbb('zx_dcInfoBoardTemplate')" placeholder="请选择"
:value="tableInfo.zx_dcInfoBoardTemplate?tableInfo.zx_dcInfoBoardTemplate.content:''"
readonly> readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i> <i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input> </el-input>
@ -99,8 +100,8 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="tableInfo.deviceType !== 5"> <el-row :gutter="5" v-if="tableInfo.deviceType !== 5">
<el-col :span="2"> <el-col :span="3">
<p>恢复操作:</p> <p>恢复操作:</p>
</el-col> </el-col>
<!-- 可变信息标识 --> <!-- 可变信息标识 -->
@ -111,7 +112,8 @@
</el-select> </el-select>
</el-col> </el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.hf_operationType == 1" :span="4"> <el-col v-if="tableInfo.deviceType == 2 && tableInfo.hf_operationType == 1" :span="4">
<el-input @click.native="clickQbb('hf_content')" placeholder="请选择" v-model="tableInfo.hf_content" <el-input @click.native="clickQbb('hf_dcInfoBoardTemplate')" placeholder="请选择"
:value="tableInfo.hf_dcInfoBoardTemplate?tableInfo.hf_dcInfoBoardTemplate.content:''"
readonly> readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i> <i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input> </el-input>
@ -162,9 +164,6 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 情报板弹窗 --> <!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" /> <QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
</div> </div>
@ -178,6 +177,7 @@ import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { planDeviceOptions } from "@screen/utils/enum.js"; import { planDeviceOptions } from "@screen/utils/enum.js";
import { defaultTableInfo } from "../data"; import { defaultTableInfo } from "../data";
import { dataTool } from 'echarts';
export default { export default {
name: 'ScopeTable', name: 'ScopeTable',
@ -293,7 +293,6 @@ export default {
loadData.forEach(it => { loadData.forEach(it => {
this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName }) this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
}) })
console.log('bbbbbbbbbbb', this.sbOptions)
}, },
immediate: true, immediate: true,
} }
@ -342,8 +341,18 @@ export default {
this.isShowDialog = false; this.isShowDialog = false;
}, },
dialogSubmit(data) { dialogSubmit(data) {
console.log('qbbData', data)
this.tableInfo[this.clickQbbName] = data.content; this.tableInfo[this.clickQbbName] = {
"fontType":data.fontType,
"screenSize":data.screenSize,
"fontSpacing":data.fontSpacing,
"stopTime":data.stopTime,
"fontSize":data.fontSize,
"inScreenMode":data.inScreenMode,
"formatStyle":data.formatStyle,
"content":data.content,
"fontColor":data.fontColor
};
// this.tableData[this.index].otherConfig = JSON.stringify(data); // this.tableData[this.index].otherConfig = JSON.stringify(data);
} }
} }

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

@ -21,15 +21,15 @@
</div> </div>
<div> <div>
<el-row v-for="(item, index) in tableData" :key="item.id" class="rowBlock"> <div v-for="(item, index) in tableData" :key="item.id" class="rowBlock">
<el-col :span="22"> <div style="flex:1">
<ScopeTable :tableInfo="item"></ScopeTable> <ScopeTable :tableInfo="item"></ScopeTable>
</el-col> </div>
<el-col :span="2"> <div style="width:100px">
<ElButton class="elButton" icon="el-icon-plus" plain size="mini" @click.native="onAdd()" /> <ElButton class="elButton" icon="el-icon-plus" plain size="mini" @click.native="onAdd()" />
<ElButton class="elButton" icon="el-icon-delete" plain size="mini" @click.native="onDel(index)" /> <ElButton class="elButton" icon="el-icon-delete" plain size="mini" @click.native="onDel(index)" />
</el-col> </div>
</el-row> </div>
</div> </div>
</ElForm> </ElForm>
@ -198,8 +198,6 @@ export default {
dcArr.push(action); dcArr.push(action);
}); });
this.tableData = dcArr; this.tableData = dcArr;
console.log("tableData", this.tableData);
}) })
// console.log('secondFormData', this.secondFormData) // console.log('secondFormData', this.secondFormData)
// }).catch((err) => { // }).catch((err) => {
@ -268,6 +266,7 @@ export default {
return data; return data;
}, },
handleSubmit() { handleSubmit() {
this.$refs["ruleForm"].validate((valid) => { this.$refs["ruleForm"].validate((valid) => {
if (valid) { if (valid) {
let dcArr = []; let dcArr = [];
@ -278,13 +277,13 @@ export default {
searchRule: item.searchRule, searchRule: item.searchRule,
number: item.number number: item.number
} }
let zxData = {}, hfData = {};
if (this.dialogType == 2) { if (this.dialogType == 2) {
dcData.emergencyPlansId = this.planId; dcData.emergencyPlansId = this.planId;
} }
if (item.devList && item.devList.length > 0) { if (item.devList && item.devList.length > 0) {
dcData.deviceList = item.devList.join(","); dcData.deviceList = item.devList.join(",");
} }
let zxData = {}, hfData = {};
Object.keys(item).forEach(key => { Object.keys(item).forEach(key => {
if (/^zx_/.test(key)) { if (/^zx_/.test(key)) {
let keyName = key.substring(3); let keyName = key.substring(3);
@ -304,11 +303,6 @@ export default {
dcArr.push(dcData); dcArr.push(dcData);
}) })
console.log({
...this.formData,
dcExecuteAction: dcArr
});
// return;
if (this.dialogType == 1) { if (this.dialogType == 1) {
// //
request({ request({
@ -359,7 +353,6 @@ export default {
}); });
}, },
areAllValuesEmpty(obj) { areAllValuesEmpty(obj) {
console.log("ass", obj);
return Object.keys(obj).every(function (key) { return Object.keys(obj).every(function (key) {
const value = obj[key]; const value = obj[key];
return ( return (
@ -387,7 +380,7 @@ export default {
.EventAddPlanDialog { .EventAddPlanDialog {
gap: 9px; gap: 9px;
width: 1280px; width: 100%;
height: 310px; height: 310px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -419,6 +412,8 @@ export default {
background-color: #296887; background-color: #296887;
padding: 5px 10px; padding: 5px 10px;
margin-bottom: 10px; margin-bottom: 10px;
display: flex;
justify-content: space-between;
} }
} }

Loading…
Cancel
Save