diff --git a/src/api/eam/device/problemSolving/index.ts b/src/api/eam/device/problemSolving/index.ts new file mode 100644 index 0000000..9c97bc3 --- /dev/null +++ b/src/api/eam/device/problemSolving/index.ts @@ -0,0 +1,55 @@ +import request from '@/config/axios' + +export interface AttachmentFileVO { + itemNumber: string + qty: number + areaNumber: string + isInAccount: string + siteId: string + available: string + funcCode: string + concurrencyStamp: number +} + +// 查询备件台账列表 +export const getProblemSolvingPage = async (params) => { + params.funcCode="problem_solving" + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/attachment-file/senior', data }) + } else { + return await request.get({ url: `/eam/attachment-file/page`, params }) + } +} + +// 查询备件台账详情 +export const getProblemSolving = async (id: number) => { + return await request.get({ url: `/eam/attachment-file/get?id=` + id }) +} + +// 新增备件台账 +export const createProblemSolving = async (data: AttachmentFileVO) => { + data.funcCode="problem_solving" + return await request.post({ url: `/eam/attachment-file/create`, data }) +} + +// 修改备件台账 +export const updateProblemSolving = async (data: AttachmentFileVO) => { + return await request.put({ url: `/eam/attachment-file/update`, data }) +} + +// 删除备件台账 +export const deleteProblemSolving = async (id: number) => { + return await request.delete({ url: `/eam/attachment-file/delete?id=` + id }) +} + +// 导出备件台账 Excel +export const exportProblemSolving = async (params) => { + return await request.download({ url: `/eam/attachment-file/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/attachment-file/get-import-template' }) +} diff --git a/src/api/eam/item/replaceItemDes/index.ts b/src/api/eam/item/replaceItemDes/index.ts new file mode 100644 index 0000000..92cd7f2 --- /dev/null +++ b/src/api/eam/item/replaceItemDes/index.ts @@ -0,0 +1,55 @@ +import request from '@/config/axios' + +export interface AttachmentFileVO { + itemNumber: string + qty: number + areaNumber: string + isInAccount: string + siteId: string + funcCode: string + available: string + concurrencyStamp: number +} + +// 查询备件台账列表 +export const getReplaceItemDesPage = async (params) => { + params.funcCode="Replace_Item_Des" + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/attachment-file/senior', data }) + } else { + return await request.get({ url: `/eam/attachment-file/page`, params }) + } +} + +// 查询备件台账详情 +export const getReplaceItemDes = async (id: number) => { + return await request.get({ url: `/eam/attachment-file/get?id=` + id }) +} + +// 新增备件台账 +export const createReplaceItemDes = async (data: AttachmentFileVO) => { + data.funcCode="Replace_Item_Des" + return await request.post({ url: `/eam/attachment-file/create`, data }) +} + +// 修改备件台账 +export const updateReplaceItemDes = async (data: AttachmentFileVO) => { + return await request.put({ url: `/eam/attachment-file/update`, data }) +} + +// 删除备件台账 +export const deleteReplaceItemDes = async (id: number) => { + return await request.delete({ url: `/eam/attachment-file/delete?id=` + id }) +} + +// 导出备件台账 Excel +export const exportReplaceItemDes = async (params) => { + return await request.download({ url: `/eam/attachment-file/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/attachment-file/get-import-template' }) +} diff --git a/src/views/eam/device/problemSolving/index.vue b/src/views/eam/device/problemSolving/index.vue new file mode 100644 index 0000000..b603df2 --- /dev/null +++ b/src/views/eam/device/problemSolving/index.vue @@ -0,0 +1,224 @@ + + + diff --git a/src/views/eam/device/problemSolving/problemSolving.data.ts b/src/views/eam/device/problemSolving/problemSolving.data.ts new file mode 100644 index 0000000..1302a63 --- /dev/null +++ b/src/views/eam/device/problemSolving/problemSolving.data.ts @@ -0,0 +1,83 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + + import { DeviceAccounts } from '@/views/eam/device/deviceAccounts/deviceAccounts.data' + import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts' + +// 表单校验 +export const ProblemSolvingRules = reactive({ + itemNumber: [required], + areaNumber: [required], + concurrencyStamp: [required], +}) + +export const ProblemSolving = useCrudSchemas(reactive([ + { + label: '设备编号', + field: 'number', + sort: 'custom', + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择设备编号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '设备信息', // 查询弹窗标题 + searchAllSchemas: DeviceAccounts.allSchemas, // 查询弹窗所需类 + searchPage: DeviceAccountsApi.getDeviceAccountsPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: "TRUE", + isMainValue: false + }] + } + } + }, + { + label: '文件', + field: 'filePathListView', + sort: 'custom', + isTable: false, + table: { + }, + form: { + component: 'UploadFile', + componentProps: { + + } + } + }, + { + label: '文件', + field: 'filePathList', + sort: 'custom', + isTable: false, + isForm: false, + table: { + }, + form: { + component: 'UploadFile', + componentProps: { + + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + + fixed: 'right' + } + } +])) diff --git a/src/views/eam/item/replaceItemDes/index.vue b/src/views/eam/item/replaceItemDes/index.vue new file mode 100644 index 0000000..a949072 --- /dev/null +++ b/src/views/eam/item/replaceItemDes/index.vue @@ -0,0 +1,224 @@ + + + diff --git a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts new file mode 100644 index 0000000..a3417af --- /dev/null +++ b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts @@ -0,0 +1,67 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import { Item } from '@/views/eam/basic/item/item.data' +import * as ItemApi from '@/api/eam/basic/item' + +// 表单校验 +export const ReplaceItemDesRules = reactive({ + itemNumber: [required], + areaNumber: [required], + concurrencyStamp: [required], +}) + +export const ReplaceItemDes = useCrudSchemas(reactive([ + { + label: '备件编号', + field: 'number', + sort: 'custom', + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择备件编号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 + searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: "TRUE", + isMainValue: false + }] + } + } + }, + { + label: '文件', + field: 'filePathList', + sort: 'custom', + isTable: false, + table: { + }, + form: { + component: 'UploadFile', + componentProps: { + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + + fixed: 'right' + } + } +]))