parent_code修改为@ParentDeviceCode,顺便先开放下拉框出来----淦

This commit is contained in:
wu
2022-08-21 13:06:08 +08:00
parent 74fcfc16f5
commit 668c1bcf7c

View File

@@ -8,9 +8,9 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="设备编码" v-if="choosable === 'true'">
<el-select v-model="deviceConfigureModelValue.parent_device_code" placeholder="请选择">
<!-- v-if="choosable === 'true'" -->
<el-form-item label="设备编码" >
<el-select filterable allow-create v-model="deviceConfigureModelValue['@ParentDeviceCode']" placeholder="请选择">
<el-option v-for="(item, i) in deviceCodeData" :key="i" :label="item.name" :value="item.code">
</el-option>
</el-select>
@@ -115,15 +115,17 @@ export default {
}
})
this.rules = rules
this.deviceConfigureModelValue = this.choosable === 'true' ? assign(deviceConfigureModelValue, { parent_device_code: '' }) : deviceConfigureModelValue
this.deviceConfigureModelValue = assign(deviceConfigureModelValue, { '@ParentDeviceCode': '' })
//this.deviceConfigureModelValue = this.choosable === 'true' ? assign(deviceConfigureModelValue, { parent_device_code: '' }) : deviceConfigureModelValue
console.log(this.deviceConfigureModelValue)
this.deviceConfigureFormItem = deviceConfigureFormItemData[e]
},
setDeviceDefaultFormItemValue (val) {
const deviceConfigureModelValue = {}
if (this.choosable === 'true') {
deviceConfigureModelValue.parent_device_code = val.parent_device_code
}
// if (this.choosable === 'true') {
// deviceConfigureModelValue["@ParentDeviceCode"] = val["@ParentDeviceCode"]
// }
deviceConfigureModelValue["@ParentDeviceCode"] = val["@ParentDeviceCode"]
each(deviceConfigureFormItemData[this.defaultDeviceTypeNameValue], (item) => {
if (item.type === 'time') {
deviceConfigureModelValue[item.key] = val[item.key] ? val[item.key] : new Date()