Browse Source

EAM ——> 主要部件 导出/高级筛选导出 增加枚举类型

master_hella_20240701
gaojs 6 months ago
parent
commit
b29249495f
  1. 5
      src/api/eam/equipmentMainPart/index.ts
  2. 2
      src/views/eam/basicInspectionOption/basicInspectionOption.data.ts
  3. 2
      src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts
  4. 25
      src/views/eam/equipmentMainPart/equipmentMainPart.data.ts

5
src/api/eam/equipmentMainPart/index.ts

@ -48,8 +48,13 @@ export const deleteEquipmentMainPart = async (id: number) => {
// 导出主要部件 Excel // 导出主要部件 Excel
export const exportEquipmentMainPart = async (params) => { export const exportEquipmentMainPart = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/equipment-main-part/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/equipment-main-part/export-excel`, params }) return await request.download({ url: `/eam/equipment-main-part/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

2
src/views/eam/basicInspectionOption/basicInspectionOption.data.ts

@ -51,7 +51,7 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '来源于类型配置', label: '巡检项',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

2
src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts

@ -51,7 +51,7 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '来源于类型配置', label: '保养项',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,

25
src/views/eam/equipmentMainPart/equipmentMainPart.data.ts

@ -31,10 +31,15 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ {
label: '设备工装枚举', label: '类型',
field: 'type', field: 'type',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: {
component: 'Select'
}
}, },
{ {
label: '创建时间', label: '创建时间',
@ -77,18 +82,16 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isDetail:false, isDetail:false,
}, },
{ {
label: '是否用', label: '是否用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: true, dictType: DICT_TYPE.TRUE_FALSE,
form: { dictClass: 'string', // 默认都是字符串类型其他暂不考虑
component: 'Switch', isTable: true,
value: 'TRUE', isDetail: false,
componentProps: { isSearch: false,
inactiveValue: 'FALSE', isTableForm: false,
activeValue: 'TRUE' isForm: false,
}
},
}, },
{ {
label: '删除时间', label: '删除时间',

Loading…
Cancel
Save