diff --git a/.env b/.env index 80e701f49..74e66bb15 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # 标题 -VITE_APP_TITLE=富维海拉管理系统 +VITE_APP_TITLE=富维海拉智慧工厂管理平台 # 项目本地运行端口号 VITE_PORT=80 diff --git a/README.md b/README.md index d3e92e517..b6f060c49 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## dev发布2024-05-17-002 +## dev发布2024-05-17-002-001 **xxxx.data.ts 文件配置说明** **form表单查询弹窗配置** form: { @@ -10,6 +10,8 @@ form: { searchTitle: '生产线物料关系信息', // 查询弹窗标题 hiddenFilterButton:true,//是否隐藏筛选按钮 dialogWidth:'100px',//搜索出来弹窗的宽度 + isConcatDetailSchemas:true, // 是否主子表合并 + searchDetailSchemas: PurchasereceiptRecordDetail.allSchemas, // 查询弹窗所需子表类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 searchCondition: [{ diff --git a/index.html b/index.html index ba11b4e50..b558105c9 100644 --- a/index.html +++ b/index.html @@ -3,16 +3,16 @@ - + %VITE_APP_TITLE% diff --git a/src/api/eam/maintenanceItem/index.ts b/src/api/eam/maintenanceItem/index.ts new file mode 100644 index 000000000..403c459dc --- /dev/null +++ b/src/api/eam/maintenanceItem/index.ts @@ -0,0 +1,61 @@ +import request from '@/config/axios' + +export interface MaintenanceItemVO { + id: number + content: string + serialNumber: number + equipmentParts: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询保养项维护列表 +export const getMaintenanceItemPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic/maintenance-item/senior', data }) + } else { + return await request.get({ url: `/eam/basic/maintenance-item/page`, params }) + } +} + +// 查询保养项维护详情 +export const getMaintenanceItem = async (id: number) => { + return await request.get({ url: `/eam/basic/maintenance-item/get?id=` + id }) +} + +// 新增保养项维护 +export const createMaintenanceItem = async (data: MaintenanceItemVO) => { + return await request.post({ url: `/eam/basic/maintenance-item/create`, data }) +} + +// 修改保养项维护 +export const updateMaintenanceItem = async (data: MaintenanceItemVO) => { + return await request.put({ url: `/eam/basic/maintenance-item/update`, data }) +} + +// 删除保养项维护 +export const deleteMaintenanceItem = async (id: number) => { + return await request.delete({ url: `/eam/basic/maintenance-item/delete?id=` + id }) +} + +// 导出保养项维护 Excel +export const exportMaintenanceItem = async (params) => { + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/maintenance-item/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/maintenance-item/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic/maintenance-item/get-import-template' }) +} \ No newline at end of file diff --git a/src/assets/imgs/login-bg.png b/src/assets/imgs/login-bg.png new file mode 100644 index 000000000..a0e6f1c61 Binary files /dev/null and b/src/assets/imgs/login-bg.png differ diff --git a/src/assets/imgs/login-bg1.png b/src/assets/imgs/login-bg1.png new file mode 100644 index 000000000..beb68b939 Binary files /dev/null and b/src/assets/imgs/login-bg1.png differ diff --git a/src/assets/imgs/logo1.png b/src/assets/imgs/logo1.png index 572b2e0ee..0dcd2fa03 100644 Binary files a/src/assets/imgs/logo1.png and b/src/assets/imgs/logo1.png differ diff --git a/src/config/axios/config.ts b/src/config/axios/config.ts index 811650873..7f7b94732 100644 --- a/src/config/axios/config.ts +++ b/src/config/axios/config.ts @@ -16,7 +16,7 @@ const config: { /** * 接口请求超时时间 */ - request_timeout: 30000, + request_timeout: 3000000, /** * 默认接口请求类型 diff --git a/src/views/eam/equipmentManufacturer/index.vue b/src/views/eam/equipmentManufacturer/index.vue index b30215282..9db5fb151 100644 --- a/src/views/eam/equipmentManufacturer/index.vue +++ b/src/views/eam/equipmentManufacturer/index.vue @@ -256,7 +256,6 @@ const handleEnable = (row,enable) =>{ row.available = enable EquipmentManufacturerApi.updateEquipmentManufacturer(row).then(res => { message.success(t('common.updateSuccess')) - getList() }) }) diff --git a/src/views/eam/equipmentSupplier/index.vue b/src/views/eam/equipmentSupplier/index.vue index e9ffeac07..af2a2bd16 100644 --- a/src/views/eam/equipmentSupplier/index.vue +++ b/src/views/eam/equipmentSupplier/index.vue @@ -256,7 +256,6 @@ const handleEnable = (row,enable) =>{ row.available = enable EquipmentSupplierApi.updateEquipmentSupplier(row).then(res => { message.success(t('common.updateSuccess')) - getList() }) }) } diff --git a/src/views/eam/inspectionItem/index.vue b/src/views/eam/inspectionItem/index.vue index fb132513f..8e95cb776 100644 --- a/src/views/eam/inspectionItem/index.vue +++ b/src/views/eam/inspectionItem/index.vue @@ -257,7 +257,6 @@ const handleEnable = (row,enable) =>{ row.available = enable InspectionItemApi.updateInspectionItem(row).then(res => { message.success(t('common.updateSuccess')) - getList() }) }) } diff --git a/src/views/eam/inspectionItem/inspectionItem.data.ts b/src/views/eam/inspectionItem/inspectionItem.data.ts index 1e310154e..e652e6091 100644 --- a/src/views/eam/inspectionItem/inspectionItem.data.ts +++ b/src/views/eam/inspectionItem/inspectionItem.data.ts @@ -17,6 +17,16 @@ export const InspectionItemRules = reactive({ export const InspectionItem = useCrudSchemas(reactive([ + { + label: '序号', + field: 'serialNumber', + sort: 'custom', + isSearch: true, + fixed: 'left', + form: { + component:'InputNumber' + }, + }, { label: '巡检内容', field: 'content', @@ -41,16 +51,6 @@ export const InspectionItem = useCrudSchemas(reactive([ sort: 'custom', isSearch: true }, - { - label: '序号', - field: 'serialNumber', - sort: 'custom', - isSearch: true, - fixed: 'left', - form: { - component:'InputNumber' - }, - }, { label: '来源于类型配置', field: 'type', @@ -84,13 +84,13 @@ export const InspectionItem = useCrudSchemas(reactive([ label: '是否启用', field: 'available', sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isTable: true, - isDetail: false, - isSearch: false, - isTableForm: false, - isForm: false, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, }, { label: '备注', diff --git a/src/views/eam/maintenanceItem/index.vue b/src/views/eam/maintenanceItem/index.vue new file mode 100644 index 000000000..bf32498c2 --- /dev/null +++ b/src/views/eam/maintenanceItem/index.vue @@ -0,0 +1,268 @@ + + + diff --git a/src/views/eam/maintenanceItem/maintenanceItem.data.ts b/src/views/eam/maintenanceItem/maintenanceItem.data.ts new file mode 100644 index 000000000..82f964601 --- /dev/null +++ b/src/views/eam/maintenanceItem/maintenanceItem.data.ts @@ -0,0 +1,106 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { handleTreeToComponentOptions } from '@/utils/tree' +import * as DeptApi from '@/api/system/dept' +const deptList = ref([]) // 树形结构 + +// 加载部门树(默认格式) +deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) + +// 表单校验 +export const MaintenanceItemRules = reactive({ + content: [required], + serialNumber: [required], + concurrencyStamp: [required] +}) + +export const MaintenanceItem = useCrudSchemas(reactive([ + + { + label: '序号', + field: 'serialNumber', + sort: 'custom', + isSearch: true, + fixed: 'left', + form: { + component:'InputNumber' + }, + }, + { + label: '保养内容', + field: 'content', + sort: 'custom', + isSearch: true, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + rows: 4 + }, + colProps: { + span: 24 + } + } + }, + { + label: '保养部位', + field: 'equipmentParts', + sort: 'custom', + isSearch: true + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isTable: false, + isDetail: false, + isSearch: false, + isTableForm: false, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + placeholder: "请选择部门", + filterable: true, + // multiple: true, + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + rows: 4 + }, + colProps: { + span: 24 + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/spotCheckItem/index.vue b/src/views/eam/spotCheckItem/index.vue index 6fc7ba504..997bae35f 100644 --- a/src/views/eam/spotCheckItem/index.vue +++ b/src/views/eam/spotCheckItem/index.vue @@ -256,7 +256,6 @@ const handleEnable = (row,enable) =>{ row.available = enable SpotCheckItemApi.updateSpotCheckItem(row).then(res => { message.success(t('common.updateSuccess')) - getList() }) }) } diff --git a/src/views/eam/spotCheckItem/spotCheckItem.data.ts b/src/views/eam/spotCheckItem/spotCheckItem.data.ts index 67902adfb..4d7e8db78 100644 --- a/src/views/eam/spotCheckItem/spotCheckItem.data.ts +++ b/src/views/eam/spotCheckItem/spotCheckItem.data.ts @@ -16,7 +16,16 @@ export const SpotCheckItemRules = reactive({ }) export const SpotCheckItem = useCrudSchemas(reactive([ - + { + label: '序号', + field: 'serialNumber', + sort: 'custom', + isSearch: true, + fixed: 'left', + form: { + component:'InputNumber' + }, + }, { label: '点检内容', field: 'content', @@ -35,16 +44,6 @@ export const SpotCheckItem = useCrudSchemas(reactive([ sort: 'custom', isSearch: true }, - { - label: '序号', - field: 'serialNumber', - sort: 'custom', - isSearch: true, - fixed: 'left', - form: { - component:'InputNumber' - }, - }, { label: '来源于类型配置', field: 'type', diff --git a/src/views/login/login.vue b/src/views/login/login.vue index b9bf1709d..1969c440f 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -1,14 +1,14 @@