|
@ -39,12 +39,12 @@ export default { |
|
|
event: "update:value", |
|
|
event: "update:value", |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
|
|
|
|
|
|
rebind: { |
|
|
rebind: { |
|
|
type: Function, |
|
|
type: Function, |
|
|
default: null |
|
|
default: null |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
visible: Boolean, |
|
|
visible: Boolean, |
|
|
dialogData: { |
|
|
dialogData: { |
|
|
type: Object, |
|
|
type: Object, |
|
@ -129,10 +129,10 @@ export default { |
|
|
handleSubmit(){ |
|
|
handleSubmit(){ |
|
|
const self = this; |
|
|
const self = this; |
|
|
this.$refs.FormConfigRef.validate().then((data) => { |
|
|
this.$refs.FormConfigRef.validate().then((data) => { |
|
|
|
|
|
|
|
|
data.numberOfDevices = this.dialogData.iotDeviceId.substr(this.dialogData.iotDeviceId.lastIndexOf('-')+1) |
|
|
data.numberOfDevices = this.dialogData.iotDeviceId.substr(this.dialogData.iotDeviceId.lastIndexOf('-')+1) |
|
|
request({ |
|
|
request({ |
|
|
url: `/business/device/functions/${self.dialogData.iotDeviceId}/0b`, |
|
|
url: `/business/device/functions2/${self.dialogData.iotDeviceId}/0b`, |
|
|
method: "POST", |
|
|
method: "POST", |
|
|
data: data |
|
|
data: data |
|
|
}) |
|
|
}) |
|
@ -157,12 +157,12 @@ export default { |
|
|
method: "get", |
|
|
method: "get", |
|
|
}).then(result => { |
|
|
}).then(result => { |
|
|
if (result.code != 200) return Message.error("操作失败"); |
|
|
if (result.code != 200) return Message.error("操作失败"); |
|
|
|
|
|
|
|
|
let pv = ""; |
|
|
let pv = ""; |
|
|
result.data.forEach(x=>{ |
|
|
result.data.forEach(x=>{ |
|
|
pv += `${x.propertyName},${x.type},${x.property}.` |
|
|
pv += `${x.propertyName},${x.type},${x.property}.` |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
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}) |
|
@ -173,9 +173,9 @@ export default { |
|
|
key: p.property, |
|
|
key: p.property, |
|
|
}) |
|
|
}) |
|
|
} else if(p.type === 'enum' ){ |
|
|
} else if(p.type === 'enum' ){ |
|
|
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('TimePeriodScreenSwitch') !== -1 ){ // 号角开关 | 红蓝爆闪灯 |
|
|
p.property.indexOf('TimePeriodScreenSwitch') !== -1 ){ // 号角开关 | 红蓝爆闪灯 |
|
|
_formList.push({ |
|
|
_formList.push({ |
|
|
label: p.propertyName+':', |
|
|
label: p.propertyName+':', |
|
@ -236,14 +236,14 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.formData[p.property] = p.value |
|
|
this.formData[p.property] = p.value |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.formList = _formList; |
|
|
this.formList = _formList; |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
@ -254,7 +254,7 @@ export default { |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
gap: 15px; |
|
|
gap: 15px; |
|
|
min-height: 360px; |
|
|
min-height: 360px; |
|
|
|
|
|
|
|
|
.tips { |
|
|
.tips { |
|
|
font-size: 12px; |
|
|
font-size: 12px; |
|
|
} |
|
|
} |
|
|