|
@ -313,32 +313,39 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
label: '维修人', |
|
|
label: '维修人', |
|
|
field: 'maintenances', |
|
|
field: 'maintenances', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
api: () => userListAll, |
|
|
isDetail: false, |
|
|
formatter: (_: Recordable, __: TableColumn, cellValue) => { |
|
|
// formatter: (_: Recordable, __: TableColumn, cellValue) => {
|
|
|
const cellValueList = cellValue ? cellValue.split(',') : []; |
|
|
// let cellValueList = []
|
|
|
return userListAll |
|
|
// if (Array.isArray(cellValue)) {
|
|
|
.filter(item => cellValueList.includes(item.id.toString())) |
|
|
// cellValueList = cellValue
|
|
|
.map(item => item.nickname) |
|
|
// } else {
|
|
|
.join(','); |
|
|
// cellValueList = cellValue ? cellValue.split(',') : [];
|
|
|
}, |
|
|
// }
|
|
|
|
|
|
// // const cellValueList = cellValue ? cellValue.split(',') : [];
|
|
|
|
|
|
// return userListAll
|
|
|
|
|
|
// .filter(item => cellValueList.includes(item.id.toString()))
|
|
|
|
|
|
// .map(item => item.nickname)
|
|
|
|
|
|
// .join(',');
|
|
|
|
|
|
// },
|
|
|
|
|
|
isTable:false, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
type: 'Select', |
|
|
type: 'Select', |
|
|
initOptions: userListAll, |
|
|
initOptions: userListAll, |
|
|
multiple:true, |
|
|
multiple: true, |
|
|
collapseTags:true, |
|
|
collapseTags: true, |
|
|
collapseTagsTooltip:true, |
|
|
collapseTagsTooltip: true, |
|
|
optionsAlias: { |
|
|
optionsAlias: { |
|
|
labelField: 'nickname', |
|
|
labelField: 'nickname', |
|
|
valueField: 'id' |
|
|
valueField: 'id' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
form:{ |
|
|
form: { |
|
|
component: 'Select', |
|
|
component: 'Select', |
|
|
api: () => userListAll, |
|
|
// api: () => dutyUserList,
|
|
|
componentProps: { |
|
|
componentProps: { |
|
|
multiple:true, |
|
|
multiple: true, |
|
|
collapseTags:true, |
|
|
collapseTags: true, |
|
|
collapseTagsTooltip:true, |
|
|
collapseTagsTooltip: true, |
|
|
optionsAlias: { |
|
|
optionsAlias: { |
|
|
labelField: 'name', |
|
|
labelField: 'name', |
|
|
valueField: 'id' |
|
|
valueField: 'id' |
|
@ -346,6 +353,15 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '维修人', |
|
|
|
|
|
field: 'maintenancesName', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isForm:false, |
|
|
|
|
|
isDetail:true, |
|
|
|
|
|
isTable:true, |
|
|
|
|
|
isTableForm:false |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '备件', |
|
|
label: '备件', |
|
|
field: 'itemNumbers1', |
|
|
field: 'itemNumbers1', |
|
|