|
|
@ -298,8 +298,12 @@ const HeadButttondata = [ |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { |
|
|
|
// 新增 |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema[3].value = 'DEVICE' |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema[0].componentProps.disabled = false |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
|
}).componentProps.disabled = false |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'type' |
|
|
|
}).value = 'DEVICE' |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'type' |
|
|
|
}).componentProps.options = deviceTypeList |
|
|
@ -358,8 +362,6 @@ const butttondata = (row) => { |
|
|
|
} |
|
|
|
const onChange = (field, cur, item) => { |
|
|
|
if (field == 'deviceNumber') { |
|
|
|
// DeviceMaintenanceMain.allSchemas.formSchema[1].componentProps.disabled = true |
|
|
|
// DeviceMaintenanceMain.allSchemas.formSchema[2].componentProps.disabled = true |
|
|
|
formRef.value.formRef.formModel.factoryAreaNumber =String(item.componentProps.options.find((item) => item.number == cur).factoryAreaNumber) |
|
|
|
console.log(typeof formRef.value.formRef.formModel.factoryAreaNumber) |
|
|
|
// console.log(item) |
|
|
@ -455,14 +457,18 @@ const onChangeSec = (field, cur, item,formRefSec) => { |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema[0].componentProps.disabled = false |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
|
}).componentProps.disabled = false |
|
|
|
if (val == 'edit') { |
|
|
|
// 编辑 |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
|
}).componentProps.disabled = true |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'type' |
|
|
|
}).componentProps.options = deviceTypeList |
|
|
|
openForm('update', row) |
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema[0].componentProps.disabled = true |
|
|
|
} else if (val == 'delete') { |
|
|
|
// 删除 |
|
|
|
handleDelete(row.id) |
|
|
|