diff --git a/src/api/eam/documentTypeSelectSet/index.ts b/src/api/eam/documentTypeSelectSet/index.ts index f58a4858e..13b7164d6 100644 --- a/src/api/eam/documentTypeSelectSet/index.ts +++ b/src/api/eam/documentTypeSelectSet/index.ts @@ -1,5 +1,5 @@ import request from '@/config/axios' -import {BasicSpotCheckSelectSetVO} from "@/api/eam/basicSpotCheckSelectSet"; +import {BasicSpotCheckSelectSetVO} from "@/api/eam/spotCheckSelectSet"; export interface DocumentTypeSelectSetVO { id: number @@ -19,43 +19,43 @@ export const getDocumentTypeSelectSetPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/eam/document-type-select-set/senior', data }) + return await request.post({ url: '/eam/basic/document-type-select-set/senior', data }) } else { - return await request.get({ url: `/eam/document-type-select-set/page`, params }) + return await request.get({ url: `/eam/basic/document-type-select-set/page`, params }) } } // 查询文档类型选择集详情 export const getDocumentTypeSelectSet = async (id: number) => { - return await request.get({ url: `/eam/document-type-select-set/get?id=` + id }) + return await request.get({ url: `/eam/basic/document-type-select-set/get?id=` + id }) } // 新增文档类型选择集 export const createDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => { - return await request.post({ url: `/eam/document-type-select-set/create`, data }) + return await request.post({ url: `/eam/basic/document-type-select-set/create`, data }) } // 修改文档类型选择集 export const updateDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => { - return await request.put({ url: `/eam/document-type-select-set/update`, data }) + return await request.put({ url: `/eam/basic/document-type-select-set/update`, data }) } // 删除文档类型选择集 export const deleteDocumentTypeSelectSet = async (id: number) => { - return await request.delete({ url: `/eam/document-type-select-set/delete?id=` + id }) + return await request.delete({ url: `/eam/basic/document-type-select-set/delete?id=` + id }) } // 导出文档类型选择集 Excel export const exportDocumentTypeSelectSet = async (params) => { - return await request.download({ url: `/eam/document-type-select-set/export-excel`, params }) + return await request.download({ url: `/eam/basic/document-type-select-set/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/eam/document-type-select-set/get-import-template' }) + return request.download({ url: '/eam/basic/document-type-select-set/get-import-template' }) } // 启用 / 禁用 export const updateEnableCode = async (data: DocumentTypeSelectSetVO) => { - return await request.post({ url: `/eam/document-type-select-set/ables` , data }) + return await request.post({ url: `/eam/basic/document-type-select-set/ables` , data }) } diff --git a/src/api/eam/inspectionItemSelectSet/index.ts b/src/api/eam/inspectionItemSelectSet/index.ts index ec0cfe547..c3e897706 100644 --- a/src/api/eam/inspectionItemSelectSet/index.ts +++ b/src/api/eam/inspectionItemSelectSet/index.ts @@ -18,43 +18,43 @@ export const getInspectionItemSelectSetPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/eam/inspection-item-select-set/senior', data }) + return await request.post({ url: '/eam/basic/inspection-item-select-set/senior', data }) } else { - return await request.get({ url: `/eam/inspection-item-select-set/page`, params }) + return await request.get({ url: `/eam/basic/inspection-item-select-set/page`, params }) } } // 查询巡检项选择集详情 export const getInspectionItemSelectSet = async (id: number) => { - return await request.get({ url: `/eam/inspection-item-select-set/get?id=` + id }) + return await request.get({ url: `/eam/basic/inspection-item-select-set/get?id=` + id }) } // 新增巡检项选择集 export const createInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => { - return await request.post({ url: `/eam/inspection-item-select-set/create`, data }) + return await request.post({ url: `/eam/basic/inspection-item-select-set/create`, data }) } // 修改巡检项选择集 export const updateInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => { - return await request.put({ url: `/eam/inspection-item-select-set/update`, data }) + return await request.put({ url: `/eam/basic/inspection-item-select-set/update`, data }) } // 删除巡检项选择集 export const deleteInspectionItemSelectSet = async (id: number) => { - return await request.delete({ url: `/eam/inspection-item-select-set/delete?id=` + id }) + return await request.delete({ url: `/eam/basic/inspection-item-select-set/delete?id=` + id }) } // 导出巡检项选择集 Excel export const exportInspectionItemSelectSet = async (params) => { - return await request.download({ url: `/eam/inspection-item-select-set/export-excel`, params }) + return await request.download({ url: `/eam/basic/inspection-item-select-set/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/eam/inspection-item-select-set/get-import-template' }) + return request.download({ url: '/eam/basic/inspection-item-select-set/get-import-template' }) } // 启用 / 禁用 export const updateEnableCode = async (data: InspectionItemSelectSetVO) => { - return await request.post({ url: `/eam/inspection-item-select-set/ables` , data }) + return await request.post({ url: `/eam/basic/inspection-item-select-set/ables` , data }) } diff --git a/src/api/eam/maintenanceItemSelectSet/index.ts b/src/api/eam/maintenanceItemSelectSet/index.ts new file mode 100644 index 000000000..35f0c9817 --- /dev/null +++ b/src/api/eam/maintenanceItemSelectSet/index.ts @@ -0,0 +1,60 @@ +import request from '@/config/axios' + +export interface MaintenanceItemSelectSetVO { + id: number + name: string + itemCode: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询保养项选择集列表 +export const getBasicMaintenanceItemSelectSetPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic/maintenance-item-select-set/senior', data }) + } else { + return await request.get({ url: `/eam/basic/maintenance-item-select-set/page`, params }) + } +} + +// 查询保养项选择集详情 +export const getBasicMaintenanceItemSelectSet = async (id: number) => { + return await request.get({ url: `/eam/basic/maintenance-item-select-set/get?id=` + id }) +} + +// 新增保养项选择集 +export const createBasicMaintenanceItemSelectSet = async (data: MaintenanceItemSelectSetVO) => { + return await request.post({ url: `/eam/basic/maintenance-item-select-set/create`, data }) +} + +// 修改保养项选择集 +export const updateBasicMaintenanceItemSelectSet = async (data: MaintenanceItemSelectSetVO) => { + return await request.put({ url: `/eam/basic/maintenance-item-select-set/update`, data }) +} + +// 删除保养项选择集 +export const deleteBasicMaintenanceItemSelectSet = async (id: number) => { + return await request.delete({ url: `/eam/basic/maintenance-item-select-set/delete?id=` + id }) +} + +// 导出保养项选择集 Excel +export const exportBasicMaintenanceItemSelectSet = async (params) => { + return await request.download({ url: `/eam/basic/maintenance-item-select-set/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic/maintenance-item-select-set/get-import-template' }) +} + +// 启用 / 禁用 +export const updateEnableCode = async (data: MaintenanceItemSelectSetVO) => { + return await request.post({ url: `/eam/basic/inspection-item-select-set/ables` , data }) +} diff --git a/src/api/eam/basicSpotCheckSelectSet/index.ts b/src/api/eam/spotCheckSelectSet/index.ts similarity index 71% rename from src/api/eam/basicSpotCheckSelectSet/index.ts rename to src/api/eam/spotCheckSelectSet/index.ts index c48befc48..be9a0ccb3 100644 --- a/src/api/eam/basicSpotCheckSelectSet/index.ts +++ b/src/api/eam/spotCheckSelectSet/index.ts @@ -19,43 +19,43 @@ export const getBasicSpotCheckSelectSetPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/eam/basic-spot-check-select-set/senior', data }) + return await request.post({ url: '/eam/basic/spot-check-select-set/senior', data }) } else { - return await request.get({ url: `/eam/basic-spot-check-select-set/page`, params }) + return await request.get({ url: `/eam/basic/spot-check-select-set/page`, params }) } } // 查询点检选择集维护详情 export const getBasicSpotCheckSelectSet = async (id: number) => { - return await request.get({ url: `/eam/basic-spot-check-select-set/get?id=` + id }) + return await request.get({ url: `/eam/basic/spot-check-select-set/get?id=` + id }) } // 新增点检选择集维护 export const createBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => { - return await request.post({ url: `/eam/basic-spot-check-select-set/create`, data }) + return await request.post({ url: `/eam/basic/spot-check-select-set/create`, data }) } // 修改点检选择集维护 export const updateBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => { - return await request.put({ url: `/eam/basic-spot-check-select-set/update`, data }) + return await request.put({ url: `/eam/basic/spot-check-select-set/update`, data }) } // 删除点检选择集维护 export const deleteBasicSpotCheckSelectSet = async (id: number) => { - return await request.delete({ url: `/eam/basic-spot-check-select-set/delete?id=` + id }) + return await request.delete({ url: `/eam/basic/spot-check-select-set/delete?id=` + id }) } // 导出点检选择集维护 Excel export const exportBasicSpotCheckSelectSet = async (params) => { - return await request.download({ url: `/eam/basic-spot-check-select-set/export-excel`, params }) + return await request.download({ url: `/eam/basic/spot-check-select-set/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/eam/basic-spot-check-select-set/get-import-template' }) + return request.download({ url: '/eam/basic/spot-check-select-set/get-import-template' }) } // 启用 / 禁用 export const updateEnableCode = async (data: BasicSpotCheckSelectSetVO) => { - return await request.post({ url: `/eam/basic-spot-check-select-set/ables` , data }) + return await request.post({ url: `/eam/basic/spot-check-select-set/ables` , data }) } diff --git a/src/views/eam/maintenanceItemSelectSet/index.vue b/src/views/eam/maintenanceItemSelectSet/index.vue new file mode 100644 index 000000000..a27d398b8 --- /dev/null +++ b/src/views/eam/maintenanceItemSelectSet/index.vue @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + {{ row.name }} + + + + + + + + + + + + + + + + + + + diff --git a/src/views/eam/maintenanceItemSelectSet/itemSelectSetForm.vue b/src/views/eam/maintenanceItemSelectSet/itemSelectSetForm.vue new file mode 100644 index 000000000..e9eb348a1 --- /dev/null +++ b/src/views/eam/maintenanceItemSelectSet/itemSelectSetForm.vue @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + {{ ent.content}} + + + + 添加保养项 + + + + + + + + + 确 定 + 取 消 + + + + + + + + + + diff --git a/src/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data.ts b/src/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data.ts new file mode 100644 index 000000000..f5a076140 --- /dev/null +++ b/src/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data.ts @@ -0,0 +1,141 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const BasicMaintenanceItemSelectSetRules = reactive({ + name: [required], + itemCode: [required], + concurrencyStamp: [required], +}) + +export const BasicMaintenanceItemSelectSet = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '选择集名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '项编号', + field: 'itemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '部门id', + field: 'departmentCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: true, + isTableForm: false, + isForm: false, + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '删除人id', + field: 'deleterId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/basicSpotCheckSelectSet/index.vue b/src/views/eam/spotCheckSelectSet/index.vue similarity index 91% rename from src/views/eam/basicSpotCheckSelectSet/index.vue rename to src/views/eam/spotCheckSelectSet/index.vue index ab1beec5a..0ac3114fa 100644 --- a/src/views/eam/basicSpotCheckSelectSet/index.vue +++ b/src/views/eam/spotCheckSelectSet/index.vue @@ -50,13 +50,13 @@