|
@ -9,380 +9,385 @@ const supplierList = await SupplierApi.getSupplierNoPage({}) |
|
|
const userListAll = await UserApi.getSimpleUserList() |
|
|
const userListAll = await UserApi.getSimpleUserList() |
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const DeviceAccountsRules = reactive({ |
|
|
export const DeviceAccountsRules = reactive({ |
|
|
name: [ |
|
|
name: [required, { max: 50, message: '不得超过50个字符', trigger: 'blur' }], |
|
|
required, |
|
|
specification: [{ max: 20, message: '不得超过20个字符', trigger: 'blur' }], |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, |
|
|
type: [{ max: 20, message: '不得超过20个字符', trigger: 'blur' }], |
|
|
], |
|
|
status: [{ max: 20, message: '不得超过20个字符', trigger: 'blur' }], |
|
|
specification: [ |
|
|
|
|
|
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
type: [ |
|
|
|
|
|
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
status: [ |
|
|
|
|
|
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
power: [ |
|
|
power: [ |
|
|
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
|
|
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
|
|
{ validator:validateNumDot, message: '请输入数字格式', trigger: 'blur'} |
|
|
{ validator: validateNumDot, message: '请输入数字格式', trigger: 'blur' } |
|
|
], |
|
|
|
|
|
describes: [ |
|
|
|
|
|
{ max: 600, message: '不得超过600个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
factoryAreaNumber: [ |
|
|
|
|
|
required, |
|
|
|
|
|
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
purchaseDept: [ |
|
|
|
|
|
{ max: 100, message: '不得超过100个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
purchaser: [ |
|
|
|
|
|
{ max: 300, message: '不得超过300个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
supplierNumber: [ |
|
|
|
|
|
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
], |
|
|
|
|
|
describes: [{ max: 600, message: '不得超过600个字符', trigger: 'blur' }], |
|
|
|
|
|
factoryAreaNumber: [required, { max: 20, message: '不得超过20个字符', trigger: 'blur' }], |
|
|
|
|
|
purchaseDept: [{ max: 100, message: '不得超过100个字符', trigger: 'blur' }], |
|
|
|
|
|
purchaser: [{ max: 300, message: '不得超过300个字符', trigger: 'blur' }], |
|
|
|
|
|
supplierNumber: [{ max: 20, message: '不得超过20个字符', trigger: 'blur' }], |
|
|
purchasePrice: [ |
|
|
purchasePrice: [ |
|
|
{ validator: validateNumberMax20Length, message: '请填写合理的价格', trigger: 'blur' }, |
|
|
{ validator: validateNumberMax20Length, message: '请填写合理的价格', trigger: 'blur' }, |
|
|
{ validator:validateNumDot, message: '请输入数字格式', trigger: 'blur'} |
|
|
{ validator: validateNumDot, message: '请输入数字格式', trigger: 'blur' } |
|
|
], |
|
|
] |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
export const DeviceAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const DeviceAccounts = useCrudSchemas( |
|
|
{ |
|
|
reactive<CrudSchema[]>([ |
|
|
label: '设备台账编号', |
|
|
{ |
|
|
field: 'number', |
|
|
label: '设备台账编号', |
|
|
sort: 'custom', |
|
|
field: 'number', |
|
|
isSearch: true, |
|
|
sort: 'custom', |
|
|
isForm: false, |
|
|
isSearch: true, |
|
|
table: { |
|
|
isForm: false, |
|
|
width: '150', |
|
|
table: { |
|
|
fixed: 'left', |
|
|
width: '150', |
|
|
}, |
|
|
fixed: 'left' |
|
|
}, |
|
|
} |
|
|
{ |
|
|
|
|
|
label: '名称', |
|
|
|
|
|
field: 'name', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '规格型号', |
|
|
|
|
|
field: 'specification', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '设备功率(kw)', |
|
|
|
|
|
field: 'power', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: false, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '200', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '设备功率范围', |
|
|
|
|
|
field: 'powerRange', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
dictType: DICT_TYPE.POWER_RANGE, |
|
|
|
|
|
dictClass: 'string', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
search: { |
|
|
|
|
|
show: true, |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
}, |
|
|
}, |
|
|
isTable: false, |
|
|
{ |
|
|
isTableForm: false, |
|
|
label: '名称', |
|
|
isDetail: false, |
|
|
field: 'name', |
|
|
isForm: false, |
|
|
sort: 'custom', |
|
|
}, |
|
|
isSearch: true, |
|
|
{ |
|
|
table: { |
|
|
label: '设备类型', |
|
|
width: '150' |
|
|
field: 'type', |
|
|
} |
|
|
sort: 'custom', |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
}, |
|
|
isSearch: false, |
|
|
{ |
|
|
isForm: true, |
|
|
label: '规格型号', |
|
|
isTable: true, |
|
|
field: 'specification', |
|
|
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, |
|
|
sort: 'custom', |
|
|
dictClass: 'string', |
|
|
table: { |
|
|
form: { |
|
|
width: '150' |
|
|
value: 'DEVICE', |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
disabled: true, |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
search: { |
|
|
{ |
|
|
value: 'DEVICE' |
|
|
label: '设备功率(kw)', |
|
|
} |
|
|
field: 'power', |
|
|
}, |
|
|
sort: 'custom', |
|
|
{ |
|
|
isSearch: false, |
|
|
label: '所属厂区', |
|
|
table: { |
|
|
field: 'factoryAreaNumber', |
|
|
width: '200' |
|
|
sort: 'custom', |
|
|
} |
|
|
isSearch: false, |
|
|
|
|
|
isDetail: false, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
}, |
|
|
api: () => factoryDeptList, |
|
|
{ |
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
label: '设备功率范围', |
|
|
return factoryDeptList.find((account) => account.id == cellValue)?.name |
|
|
field: 'powerRange', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
dictType: DICT_TYPE.POWER_RANGE, |
|
|
|
|
|
dictClass: 'string', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
search: { |
|
|
|
|
|
show: true, |
|
|
|
|
|
component: 'Select' |
|
|
|
|
|
}, |
|
|
|
|
|
isTable: false, |
|
|
|
|
|
isTableForm: false, |
|
|
|
|
|
isDetail: false, |
|
|
|
|
|
isForm: false |
|
|
}, |
|
|
}, |
|
|
search: { |
|
|
{ |
|
|
show: true, |
|
|
label: '设备类型', |
|
|
component: 'Select', |
|
|
field: 'type', |
|
|
api: () => factoryDeptList, |
|
|
sort: 'custom', |
|
|
componentProps: { |
|
|
table: { |
|
|
optionsAlias: { |
|
|
width: '150' |
|
|
labelField: 'name', |
|
|
}, |
|
|
valueField: 'id' |
|
|
isSearch: false, |
|
|
}, |
|
|
isForm: true, |
|
|
filterable: true, |
|
|
isTable: true, |
|
|
|
|
|
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, |
|
|
|
|
|
dictClass: 'string', |
|
|
|
|
|
form: { |
|
|
|
|
|
value: 'DEVICE', |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
disabled: true |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
search: { |
|
|
|
|
|
value: 'DEVICE' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
{ |
|
|
component: 'Select', |
|
|
label: '所属厂区', |
|
|
|
|
|
field: 'factoryAreaNumber', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isSearch: false, |
|
|
|
|
|
isDetail: false, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150' |
|
|
|
|
|
}, |
|
|
api: () => factoryDeptList, |
|
|
api: () => factoryDeptList, |
|
|
componentProps: { |
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
disabled: false, |
|
|
return factoryDeptList.find((account) => account.id == cellValue)?.name |
|
|
optionsAlias: { |
|
|
|
|
|
labelField: 'name', |
|
|
|
|
|
valueField: 'id' |
|
|
|
|
|
}, |
|
|
|
|
|
filterable: true, |
|
|
|
|
|
placeholder: "请选择设备" |
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
search: { |
|
|
}, |
|
|
show: true, |
|
|
{ |
|
|
component: 'Select', |
|
|
label: '所属厂区', |
|
|
api: () => factoryDeptList, |
|
|
field: 'factoryAreaNumberDetail', |
|
|
componentProps: { |
|
|
sort: 'custom', |
|
|
optionsAlias: { |
|
|
isDetail: true, |
|
|
labelField: 'name', |
|
|
isForm: false, |
|
|
valueField: 'id' |
|
|
isSearch: false, |
|
|
}, |
|
|
isTable: false, |
|
|
filterable: true |
|
|
isTableForm: false, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
form: { |
|
|
label: '负责人', |
|
|
component: 'Select', |
|
|
field: 'principal', |
|
|
api: () => factoryDeptList, |
|
|
sort: 'custom', |
|
|
componentProps: { |
|
|
isSearch: false, |
|
|
disabled: false, |
|
|
isDetail: false, |
|
|
optionsAlias: { |
|
|
table: { |
|
|
labelField: 'name', |
|
|
width: '150', |
|
|
valueField: 'id' |
|
|
|
|
|
}, |
|
|
|
|
|
filterable: true, |
|
|
|
|
|
placeholder: '请选择设备' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
api: () => userListAll, |
|
|
{ |
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
label: '所属厂区', |
|
|
return userListAll.find((account) => account.id == cellValue)?.nickname |
|
|
field: 'factoryAreaNumberDetail', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isDetail: true, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
isSearch: false, |
|
|
|
|
|
isTable: false, |
|
|
|
|
|
isTableForm: false |
|
|
}, |
|
|
}, |
|
|
// search: {
|
|
|
{ |
|
|
// show: true,
|
|
|
label: '负责人', |
|
|
// component: 'Select',
|
|
|
field: 'principal', |
|
|
// api: () => userListAll,
|
|
|
sort: 'custom', |
|
|
// componentProps: {
|
|
|
isSearch: false, |
|
|
// optionsAlias: {
|
|
|
isDetail: false, |
|
|
// labelField: 'nickname',
|
|
|
table: { |
|
|
// valueField: 'id'
|
|
|
width: '150' |
|
|
// }
|
|
|
}, |
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
api: () => userListAll, |
|
|
api: () => userListAll, |
|
|
componentProps: { |
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
optionsAlias: { |
|
|
return userListAll.find((account) => account.id == cellValue)?.nickname |
|
|
labelField: 'nickname', |
|
|
|
|
|
valueField: 'id', |
|
|
|
|
|
}, |
|
|
|
|
|
filterable: true, |
|
|
|
|
|
placeholder: "请选择负责人" |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
// search: {
|
|
|
|
|
|
// show: true,
|
|
|
|
|
|
// component: 'Select',
|
|
|
|
|
|
// api: () => userListAll,
|
|
|
|
|
|
// componentProps: {
|
|
|
|
|
|
// optionsAlias: {
|
|
|
|
|
|
// labelField: 'nickname',
|
|
|
|
|
|
// valueField: 'id'
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
api: () => userListAll, |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
optionsAlias: { |
|
|
|
|
|
labelField: 'nickname', |
|
|
|
|
|
valueField: 'id' |
|
|
|
|
|
}, |
|
|
|
|
|
filterable: true, |
|
|
|
|
|
placeholder: '请选择负责人' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '负责人', |
|
|
label: '负责人', |
|
|
field: 'principalDetail', |
|
|
field: 'principalDetail', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isDetail: true, |
|
|
isDetail: true, |
|
|
isForm: false, |
|
|
isForm: false, |
|
|
isSearch: false, |
|
|
isSearch: false, |
|
|
isTable: false, |
|
|
isTable: false, |
|
|
isTableForm: false |
|
|
isTableForm: false, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '采购时间', |
|
|
|
|
|
field: 'purchaseTime', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
{ |
|
|
component: 'DatePicker', |
|
|
label: '采购时间', |
|
|
componentProps: { |
|
|
field: 'purchaseTime', |
|
|
type: 'datetime', |
|
|
sort: 'custom', |
|
|
valueFormat: 'x' |
|
|
formatter: dateFormatter, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150' |
|
|
|
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
detail: { |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
detail: { |
|
|
{ |
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
label: '采购部门', |
|
|
} |
|
|
field: 'purchaseDept', |
|
|
}, |
|
|
sort: 'custom', |
|
|
{ |
|
|
isSearch: false, |
|
|
label: '采购部门', |
|
|
isForm: true, |
|
|
field: 'purchaseDept', |
|
|
isTable: true, |
|
|
sort: 'custom', |
|
|
table: { |
|
|
isSearch: false, |
|
|
width: '150' |
|
|
isForm: true, |
|
|
}, |
|
|
isTable: true, |
|
|
form: { |
|
|
table: { |
|
|
component: 'Input' |
|
|
width: '150', |
|
|
} |
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Input', |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '采购人', |
|
|
|
|
|
field: 'purchaser', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Input', |
|
|
|
|
|
}, |
|
|
}, |
|
|
table: { |
|
|
{ |
|
|
width: '150', |
|
|
label: '采购人', |
|
|
|
|
|
field: 'purchaser', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Input' |
|
|
|
|
|
}, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150' |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '供应商', |
|
|
label: '供应商', |
|
|
field: 'supplierNumber', |
|
|
field: 'supplierNumber', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isDetail: false, |
|
|
isDetail: false, |
|
|
table: { |
|
|
table: { |
|
|
width: '150' |
|
|
width: '150', |
|
|
}, |
|
|
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
|
|
return supplierList.find((account) => account.number == cellValue)?.name |
|
|
|
|
|
}, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'Select', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
options: supplierList, |
|
|
|
|
|
optionsAlias: { |
|
|
|
|
|
labelField: 'name', |
|
|
|
|
|
valueField: 'number' |
|
|
|
|
|
}, |
|
|
|
|
|
filterable: true, |
|
|
|
|
|
placeholder: '请选择供应商' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
{ |
|
|
return supplierList.find((account) => account.number == cellValue)?.name |
|
|
label: '供应商', |
|
|
|
|
|
field: 'supplierNumberDetail', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isDetail: true, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
isSearch: false, |
|
|
|
|
|
isTable: false, |
|
|
|
|
|
isTableForm: false |
|
|
}, |
|
|
}, |
|
|
form:{ |
|
|
{ |
|
|
component: 'Select', |
|
|
label: '出厂日期', |
|
|
componentProps: { |
|
|
field: 'productionDate', |
|
|
options: supplierList, |
|
|
sort: 'custom', |
|
|
optionsAlias: { |
|
|
formatter: dateFormatter, |
|
|
labelField: 'name', |
|
|
table: { |
|
|
valueField: 'number' |
|
|
width: '150' |
|
|
}, |
|
|
}, |
|
|
filterable: true, |
|
|
form: { |
|
|
placeholder: "请选择供应商" |
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
detail: { |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD' |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '供应商', |
|
|
|
|
|
field: 'supplierNumberDetail', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
isDetail: true, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
isSearch: false, |
|
|
|
|
|
isTable: false, |
|
|
|
|
|
isTableForm: false, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '出厂日期', |
|
|
|
|
|
field: 'productionDate', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
{ |
|
|
component: 'DatePicker', |
|
|
label: '价格', |
|
|
componentProps: { |
|
|
field: 'purchasePrice', |
|
|
type: 'datetime', |
|
|
sort: 'custom', |
|
|
valueFormat: 'x' |
|
|
table: { |
|
|
|
|
|
width: '150' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
detail: { |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '价格', |
|
|
|
|
|
field: 'purchasePrice', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
table: { |
|
|
|
|
|
width: '150', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
label: '维修状态', |
|
|
label: '维修状态', |
|
|
field: 'status', |
|
|
field: 'status', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
dictType: DICT_TYPE.BASIC_STATUS, |
|
|
dictType: DICT_TYPE.BASIC_STATUS, |
|
|
dictClass: 'string', |
|
|
dictClass: 'string', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
isForm: false, |
|
|
isForm: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '创建者', |
|
|
label: '创建者', |
|
|
field: 'creator', |
|
|
field: 'creator', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: false, |
|
|
isSearch: false, |
|
|
isForm: false, |
|
|
isForm: false, |
|
|
table: { |
|
|
table: { |
|
|
width: 150 |
|
|
width: 150 |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '创建时间', |
|
|
|
|
|
field: 'createTime', |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
detail: { |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
|
|
}, |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
table: { |
|
|
|
|
|
width: 180 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
isTable: true, |
|
|
label: '创建时间', |
|
|
form: { |
|
|
field: 'createTime', |
|
|
component: 'DatePicker', |
|
|
sort: 'custom', |
|
|
componentProps: { |
|
|
formatter: dateFormatter, |
|
|
style: { width: '100%' }, |
|
|
isForm: false, |
|
|
type: 'datetime', |
|
|
table: { |
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
width: 170 |
|
|
valueFormat: 'x' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
isForm: false, |
|
|
label: '操作', |
|
|
isSearch: false, |
|
|
field: 'action', |
|
|
search: { |
|
|
isForm: false, |
|
|
component: 'DatePicker', |
|
|
table: { |
|
|
componentProps: { |
|
|
width: 200, |
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
fixed: 'right' |
|
|
type: 'daterange', |
|
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
isDetail: false, |
|
|
{ |
|
|
} |
|
|
label: '操作', |
|
|
])) |
|
|
field: 'action', |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
table: { |
|
|
|
|
|
width: 200, |
|
|
|
|
|
fixed: 'right' |
|
|
|
|
|
}, |
|
|
|
|
|
isDetail: false |
|
|
|
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
) |
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const UpImageRules = reactive({ |
|
|
export const UpImageRules = reactive({ |
|
|
filePath: [required], |
|
|
filePath: [required] |
|
|
}) |
|
|
}) |
|
|
export const UpImage = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const UpImage = useCrudSchemas( |
|
|
{ |
|
|
reactive<CrudSchema[]>([ |
|
|
label: '上传图片', |
|
|
{ |
|
|
field: 'filePathList', |
|
|
label: '上传图片', |
|
|
sort: 'custom', |
|
|
field: 'filePathList', |
|
|
isForm: true, |
|
|
sort: 'custom', |
|
|
form:{ |
|
|
isForm: true, |
|
|
component:'UploadImgs', |
|
|
form: { |
|
|
|
|
|
component: 'UploadImgs' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
]) |
|
|
])) |
|
|
) |
|
|
// // 表单校验
|
|
|
// // 表单校验
|
|
|
// export const UpFileRules = reactive({
|
|
|
// export const UpFileRules = reactive({
|
|
|
// filePath: [required],
|
|
|
// filePath: [required],
|
|
|