From 8370c444ee6fcae4f3a935c96139f50dad66459d Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Tue, 14 May 2024 16:34:04 +0800 Subject: [PATCH] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=E4=B8=BB=E8=A6=81?= =?UTF-8?q?=E9=83=A8=E4=BB=B6=20=E6=96=87=E6=A1=A3=E7=B1=BB=E5=9E=8B=20?= =?UTF-8?q?=E6=95=85=E9=9A=9C=E7=B1=BB=E5=9E=8B=20=E6=95=85=E9=9A=9C?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=20=E5=90=8E=E7=AB=AF=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basicFaultCause/index.ts | 57 ++++ src/api/eam/basicFaultType/index.ts | 56 ++++ src/api/eam/documentType/index.ts | 56 ++++ src/api/eam/equipmentMainPart/index.ts | 56 ++++ .../basicFaultCause/basicFaultCause.data.ts | 160 ++++++++++++ src/views/eam/basicFaultCause/index.vue | 244 ++++++++++++++++++ .../eam/basicFaultType/basicFaultType.data.ts | 147 +++++++++++ src/views/eam/basicFaultType/index.vue | 244 ++++++++++++++++++ .../eam/documentType/documentType.data.ts | 149 +++++++++++ src/views/eam/documentType/index.vue | 244 ++++++++++++++++++ .../equipmentMainPart.data.ts | 149 +++++++++++ src/views/eam/equipmentMainPart/index.vue | 244 ++++++++++++++++++ 12 files changed, 1806 insertions(+) create mode 100644 src/api/eam/basicFaultCause/index.ts create mode 100644 src/api/eam/basicFaultType/index.ts create mode 100644 src/api/eam/documentType/index.ts create mode 100644 src/api/eam/equipmentMainPart/index.ts create mode 100644 src/views/eam/basicFaultCause/basicFaultCause.data.ts create mode 100644 src/views/eam/basicFaultCause/index.vue create mode 100644 src/views/eam/basicFaultType/basicFaultType.data.ts create mode 100644 src/views/eam/basicFaultType/index.vue create mode 100644 src/views/eam/documentType/documentType.data.ts create mode 100644 src/views/eam/documentType/index.vue create mode 100644 src/views/eam/equipmentMainPart/equipmentMainPart.data.ts create mode 100644 src/views/eam/equipmentMainPart/index.vue diff --git a/src/api/eam/basicFaultCause/index.ts b/src/api/eam/basicFaultCause/index.ts new file mode 100644 index 000000000..391442089 --- /dev/null +++ b/src/api/eam/basicFaultCause/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface BasicFaultCauseVO { + id: number + parentId: number + code: string + name: string + describing: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询故障原因列表 +export const getBasicFaultCausePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-fault-cause/senior', data }) + } else { + return await request.get({ url: `/eam/basic-fault-cause/page`, params }) + } +} + +// 查询故障原因详情 +export const getBasicFaultCause = async (id: number) => { + return await request.get({ url: `/eam/basic-fault-cause/get?id=` + id }) +} + +// 新增故障原因 +export const createBasicFaultCause = async (data: BasicFaultCauseVO) => { + return await request.post({ url: `/eam/basic-fault-cause/create`, data }) +} + +// 修改故障原因 +export const updateBasicFaultCause = async (data: BasicFaultCauseVO) => { + return await request.put({ url: `/eam/basic-fault-cause/update`, data }) +} + +// 删除故障原因 +export const deleteBasicFaultCause = async (id: number) => { + return await request.delete({ url: `/eam/basic-fault-cause/delete?id=` + id }) +} + +// 导出故障原因 Excel +export const exportBasicFaultCause = async (params) => { + return await request.download({ url: `/eam/basic-fault-cause/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-fault-cause/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/basicFaultType/index.ts b/src/api/eam/basicFaultType/index.ts new file mode 100644 index 000000000..727094608 --- /dev/null +++ b/src/api/eam/basicFaultType/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface BasicFaultTypeVO { + id: number + code: string + name: string + describing: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询故障类型列表 +export const getBasicFaultTypePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-fault-type/senior', data }) + } else { + return await request.get({ url: `/eam/basic-fault-type/page`, params }) + } +} + +// 查询故障类型详情 +export const getBasicFaultType = async (id: number) => { + return await request.get({ url: `/eam/basic-fault-type/get?id=` + id }) +} + +// 新增故障类型 +export const createBasicFaultType = async (data: BasicFaultTypeVO) => { + return await request.post({ url: `/eam/basic-fault-type/create`, data }) +} + +// 修改故障类型 +export const updateBasicFaultType = async (data: BasicFaultTypeVO) => { + return await request.put({ url: `/eam/basic-fault-type/update`, data }) +} + +// 删除故障类型 +export const deleteBasicFaultType = async (id: number) => { + return await request.delete({ url: `/eam/basic-fault-type/delete?id=` + id }) +} + +// 导出故障类型 Excel +export const exportBasicFaultType = async (params) => { + return await request.download({ url: `/eam/basic-fault-type/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-fault-type/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/documentType/index.ts b/src/api/eam/documentType/index.ts new file mode 100644 index 000000000..4d73e1d21 --- /dev/null +++ b/src/api/eam/documentType/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface DocumentTypeVO { + id: number + code: string + name: string + type: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询文档类型列表 +export const getDocumentTypePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/document-type/senior', data }) + } else { + return await request.get({ url: `/eam/document-type/page`, params }) + } +} + +// 查询文档类型详情 +export const getDocumentType = async (id: number) => { + return await request.get({ url: `/eam/document-type/get?id=` + id }) +} + +// 新增文档类型 +export const createDocumentType = async (data: DocumentTypeVO) => { + return await request.post({ url: `/eam/document-type/create`, data }) +} + +// 修改文档类型 +export const updateDocumentType = async (data: DocumentTypeVO) => { + return await request.put({ url: `/eam/document-type/update`, data }) +} + +// 删除文档类型 +export const deleteDocumentType = async (id: number) => { + return await request.delete({ url: `/eam/document-type/delete?id=` + id }) +} + +// 导出文档类型 Excel +export const exportDocumentType = async (params) => { + return await request.download({ url: `/eam/document-type/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/document-type/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/equipmentMainPart/index.ts b/src/api/eam/equipmentMainPart/index.ts new file mode 100644 index 000000000..482c17209 --- /dev/null +++ b/src/api/eam/equipmentMainPart/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface EquipmentMainPartVO { + id: number + name: string + code: string + type: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询主要部件列表 +export const getEquipmentMainPartPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/equipment-main-part/senior', data }) + } else { + return await request.get({ url: `/eam/equipment-main-part/page`, params }) + } +} + +// 查询主要部件详情 +export const getEquipmentMainPart = async (id: number) => { + return await request.get({ url: `/eam/equipment-main-part/get?id=` + id }) +} + +// 新增主要部件 +export const createEquipmentMainPart = async (data: EquipmentMainPartVO) => { + return await request.post({ url: `/eam/equipment-main-part/create`, data }) +} + +// 修改主要部件 +export const updateEquipmentMainPart = async (data: EquipmentMainPartVO) => { + return await request.put({ url: `/eam/equipment-main-part/update`, data }) +} + +// 删除主要部件 +export const deleteEquipmentMainPart = async (id: number) => { + return await request.delete({ url: `/eam/equipment-main-part/delete?id=` + id }) +} + +// 导出主要部件 Excel +export const exportEquipmentMainPart = async (params) => { + return await request.download({ url: `/eam/equipment-main-part/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/equipment-main-part/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/eam/basicFaultCause/basicFaultCause.data.ts b/src/views/eam/basicFaultCause/basicFaultCause.data.ts new file mode 100644 index 000000000..7f4a449da --- /dev/null +++ b/src/views/eam/basicFaultCause/basicFaultCause.data.ts @@ -0,0 +1,160 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const BasicFaultCauseRules = reactive({ + code: [required], + name: [required], +}) + +export const BasicFaultCause = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '父id(没有则为0)', + field: 'parentId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '设备编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '描述', + field: 'describing', + 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: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + form: { + component: 'Switch', + value: 'TURE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TURE' + } + }, + }, + { + 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/basicFaultCause/index.vue b/src/views/eam/basicFaultCause/index.vue new file mode 100644 index 000000000..856520c70 --- /dev/null +++ b/src/views/eam/basicFaultCause/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/basicFaultType/basicFaultType.data.ts b/src/views/eam/basicFaultType/basicFaultType.data.ts new file mode 100644 index 000000000..97d3471d9 --- /dev/null +++ b/src/views/eam/basicFaultType/basicFaultType.data.ts @@ -0,0 +1,147 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const BasicFaultTypeRules = reactive({ + code: [required], + name: [required], +}) + +export const BasicFaultType = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '设备编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '描述', + field: 'describing', + 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', + form: { + component: 'Switch', + value: 'TURE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TURE' + } + }, + }, + { + 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/basicFaultType/index.vue b/src/views/eam/basicFaultType/index.vue new file mode 100644 index 000000000..f45fe0e45 --- /dev/null +++ b/src/views/eam/basicFaultType/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/documentType/documentType.data.ts b/src/views/eam/documentType/documentType.data.ts new file mode 100644 index 000000000..1ec63a019 --- /dev/null +++ b/src/views/eam/documentType/documentType.data.ts @@ -0,0 +1,149 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const DocumentTypeRules = reactive({ + code: [required], + name: [required], + type: [required], + concurrencyStamp: [required], +}) + +export const DocumentType = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '设备编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '类型设备', + field: 'type', + 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: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + form: { + component: 'Switch', + value: 'TURE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TURE' + } + }, + }, + { + 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/documentType/index.vue b/src/views/eam/documentType/index.vue new file mode 100644 index 000000000..b244a4a6e --- /dev/null +++ b/src/views/eam/documentType/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts new file mode 100644 index 000000000..8937ab8ef --- /dev/null +++ b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts @@ -0,0 +1,149 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const EquipmentMainPartRules = reactive({ + name: [required], + code: [required], + type: [required], +}) + +export const EquipmentMainPart = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '设备工装枚举', + field: 'type', + 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: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + form: { + component: 'Switch', + value: 'TURE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TURE' + } + }, + }, + { + 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/equipmentMainPart/index.vue b/src/views/eam/equipmentMainPart/index.vue new file mode 100644 index 000000000..97cd0bdaf --- /dev/null +++ b/src/views/eam/equipmentMainPart/index.vue @@ -0,0 +1,244 @@ + + +