|
|
@ -25,7 +25,7 @@ export const DeviceMaintenanceMainRules = reactive({ |
|
|
|
type: [required], |
|
|
|
classes: [required], |
|
|
|
faultType: [required], |
|
|
|
describes : [ |
|
|
|
describes: [ |
|
|
|
required, |
|
|
|
{ max: 200, message: '不得超过200个字符', trigger: 'blur' }, |
|
|
|
], |
|
|
@ -159,13 +159,13 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
placeholder: "请先选择设备" |
|
|
|
}, |
|
|
|
}, |
|
|
|
isSearch:true, |
|
|
|
search:{ |
|
|
|
isSearch: true, |
|
|
|
search: { |
|
|
|
component: 'Select', |
|
|
|
api: () => userListAll, |
|
|
|
componentProps: { |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'nickname', |
|
|
|
valueField: 'id' |
|
|
@ -259,7 +259,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
componentProps: { |
|
|
|
type: 'textarea', |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -295,7 +295,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 300, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isDetail:false |
|
|
|
isDetail: false |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
@ -324,7 +324,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
componentProps: { |
|
|
|
type: 'textarea', |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -339,7 +339,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
componentProps: { |
|
|
|
type: 'textarea', |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -354,7 +354,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
componentProps: { |
|
|
|
type: 'textarea', |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -362,31 +362,38 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'maintenances', |
|
|
|
sort: 'custom', |
|
|
|
isDetail: false, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue) => { |
|
|
|
const cellValueList = cellValue ? cellValue.split(',') : []; |
|
|
|
return userListAll |
|
|
|
.filter(item => cellValueList.includes(item.id.toString())) |
|
|
|
.map(item => item.nickname) |
|
|
|
.join(','); |
|
|
|
}, |
|
|
|
// formatter: (_: Recordable, __: TableColumn, cellValue) => {
|
|
|
|
// let cellValueList = []
|
|
|
|
// if (Array.isArray(cellValue)) {
|
|
|
|
// cellValueList = cellValue
|
|
|
|
// } else {
|
|
|
|
// 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: { |
|
|
|
type: 'Select', |
|
|
|
initOptions: userListAll, |
|
|
|
multiple:true, |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
multiple: true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'nickname', |
|
|
|
valueField: 'id' |
|
|
|
} |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
// api: () => dutyUserList,
|
|
|
|
componentProps: { |
|
|
|
multiple:true, |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
multiple: true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
@ -394,18 +401,27 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '维修人', |
|
|
|
field: 'maintenancesName', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
isDetail:true, |
|
|
|
isTable:true, |
|
|
|
isTableForm:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备件', |
|
|
|
field: 'itemNumbers1', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', |
|
|
|
searchField: 'itemNumbers1', |
|
|
|
searchTitle: '备件', |
|
|
|
multiple:true, |
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, |
|
|
|
searchPage: ItemApi.getItemList, |
|
|
|
searchCondition: [{ |
|
|
@ -422,9 +438,9 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchListPlaceholder: '请选择备件', // 输入框占位文本
|
|
|
|
searchField: 'itemNumbers1', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
multiple:true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
|
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'number', |
|
|
|
value: 'deviceNumber', |
|
|
@ -441,9 +457,9 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
isTable:false, |
|
|
|
isForm: false, |
|
|
|
isDetail: false, |
|
|
|
isTable: false, |
|
|
|
isSearch: false, |
|
|
|
isTableForm: false, |
|
|
|
}, |
|
|
@ -489,7 +505,7 @@ export const DeviceMaintenanceMainSecRules = reactive({ |
|
|
|
type: [required], |
|
|
|
classes: [required], |
|
|
|
faultType: [required], |
|
|
|
describes : [ |
|
|
|
describes: [ |
|
|
|
required, |
|
|
|
{ max: 200, message: '不得超过200个字符', trigger: 'blur' }, |
|
|
|
], |
|
|
@ -722,7 +738,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
componentProps: { |
|
|
|
type: 'textarea', |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -758,6 +774,6 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 300, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isDetail:false |
|
|
|
isDetail: false |
|
|
|
} |
|
|
|
])) |