Browse Source

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

master_hella_20240701
gaojs 6 months ago
parent
commit
b29249495f
  1. 7
      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

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

@ -48,7 +48,12 @@ export const deleteEquipmentMainPart = async (id: number) => {
// 导出主要部件 Excel
export const exportEquipmentMainPart = async (params) => {
return await request.download({ url: `/eam/equipment-main-part/export-excel`, 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 })
}
}
// 下载用户导入模板

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

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

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

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

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

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

Loading…
Cancel
Save