|
|
@ -116,9 +116,10 @@ export default { |
|
|
|
tableData: [], |
|
|
|
selections: [], |
|
|
|
dialogVisible: false, |
|
|
|
cameraTypeId: '', |
|
|
|
cameraTypeId: '', // 摄像头 |
|
|
|
airEquipmentTypeId: '', // 空气质量检测设备 |
|
|
|
temperaSensorTypeId: '', // 温湿度感应器 |
|
|
|
waterSensorTypeId: '', // 漏水传感器 |
|
|
|
form: { deviceInfo: {}, divPosition: '' }, |
|
|
|
// 设备绑定 |
|
|
|
devVal: '', |
|
|
@ -129,6 +130,9 @@ export default { |
|
|
|
rules: { |
|
|
|
deviceInfo: [ |
|
|
|
{ required: true, validator: checkDeviceInfo, trigger: 'change' } |
|
|
|
], |
|
|
|
isDisplay: [ |
|
|
|
{ required: true, message: '请选择是否显示', trigger: 'change' } |
|
|
|
] |
|
|
|
}, |
|
|
|
isMultiple: false, |
|
|
@ -137,7 +141,7 @@ export default { |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
'form.divPosition'(newVal, oldVal) { |
|
|
|
if (newVal && newVal.includes('OAO')) { |
|
|
|
if (newVal && (newVal.includes('OAO') || newVal.includes('LS'))) { |
|
|
|
this.isMultiple = true |
|
|
|
} else { |
|
|
|
this.isMultiple = false |
|
|
@ -168,6 +172,7 @@ export default { |
|
|
|
this.cameraTypeId = data.find((x) => { return x.name === '摄像头' }).id |
|
|
|
this.airEquipmentTypeId = data.find((x) => { return x.name === '空气质量检测设备' }).id |
|
|
|
this.temperaSensorTypeId = data.find((x) => { return x.name === '温湿度感应器' }).id |
|
|
|
this.waterSensorTypeId = data.find((x) => { return x.name === '漏水传感器' }).id |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -194,6 +199,8 @@ export default { |
|
|
|
deviceTypeId = this.cameraTypeId |
|
|
|
} else if (this.form.divPosition.includes('TOP')) { |
|
|
|
deviceTypeId = this.airEquipmentTypeId |
|
|
|
} else if (this.form.divPosition.includes('LS')) { |
|
|
|
deviceTypeId = this.waterSensorTypeId |
|
|
|
} else { |
|
|
|
deviceTypeId = this.temperaSensorTypeId |
|
|
|
} |
|
|
|