Browse Source

合流区+预案参数

wangqin
王钦 6 months ago
parent
commit
822e85737f
  1. 81
      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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save