diff --git a/src/api/eam/basicSpotCheckOption/index.ts b/src/api/eam/basicSpotCheckOption/index.ts new file mode 100644 index 000000000..5b7d2d409 --- /dev/null +++ b/src/api/eam/basicSpotCheckOption/index.ts @@ -0,0 +1,63 @@ +import request from '@/config/axios' + +export interface BasicSpotCheckOptionVO { + id: number + code: string + name: string + selectId: number + describing: string + isUpdated: boolean + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询点检方案列表 +export const getBasicSpotCheckOptionPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-spotCheck-option/senior', data }) + } else { + return await request.get({ url: `/eam/basic-spotCheck-option/page`, params }) + } +} + +// 查询点检方案详情 +export const getBasicSpotCheckOption = async (id: number) => { + return await request.get({ url: `/eam/basic-spotCheck-option/get?id=` + id }) +} + +// 新增点检方案 +export const createBasicSpotCheckOption = async (data: BasicSpotCheckOptionVO) => { + return await request.post({ url: `/eam/basic-spotCheck-option/create`, data }) +} + +// 修改点检方案 +export const updateBasicSpotCheckOption = async (data: BasicSpotCheckOptionVO) => { + return await request.put({ url: `/eam/basic-spotCheck-option/update`, data }) +} + +// 删除点检方案 +export const deleteBasicSpotCheckOption = async (id: number) => { + return await request.delete({ url: `/eam/basic-spotCheck-option/delete?id=` + id }) +} + +// 导出点检方案 Excel +export const exportBasicSpotCheckOption = async (params) => { + return await request.download({ url: `/eam/basic-spotCheck-option/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-spotCheck-option/get-import-template' }) +} + +// 启用 / 禁用 +export const updateEnableCode = async (data: BasicSpotCheckOptionVO) => { + return await request.post({ url: `/eam/basic-spotCheck-option/ables` , data }) +} diff --git a/src/api/eam/inspectionItem/index.ts b/src/api/eam/inspectionItem/index.ts index 86b606728..ddf8cf80f 100644 --- a/src/api/eam/inspectionItem/index.ts +++ b/src/api/eam/inspectionItem/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet"; export interface InspectionItemVO { id: number @@ -59,4 +60,10 @@ export const exportInspectionItem = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/basic/inspection-item/get-import-template' }) -} \ No newline at end of file +} + + +// 启用 / 禁用 +export const updateEnableCode = async (data: InspectionItemVO) => { + return await request.post({ url: `/eam/basic/inspection-item/ables` , data }) +} diff --git a/src/views/eam/basicInspectionOption/itemSelectSetForm.vue b/src/views/eam/basicInspectionOption/itemSelectSetForm.vue index 0aed31571..357c89e66 100644 --- a/src/views/eam/basicInspectionOption/itemSelectSetForm.vue +++ b/src/views/eam/basicInspectionOption/itemSelectSetForm.vue @@ -83,6 +83,15 @@ +