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