|
@ -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 |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|