From 15512e82037a50812674dc76d52a563a9575c874 Mon Sep 17 00:00:00 2001 From: chenshuichuan <1154693969@qq.com> Date: Thu, 6 Jun 2024 16:22:48 +0800 Subject: [PATCH] add iot and stock workshop --- src/api/iot/frpc/index.ts | 50 +++ src/api/mes/feedingrecord/index.ts | 50 +++ src/api/mes/stockworkshop/index.ts | 89 +++++ src/utils/dict.ts | 6 + src/views/Home/Index.vue | 20 +- src/views/erp/stock/stock/index.vue | 6 +- src/views/iot/frpc/FrpcProxyServerForm.vue | 147 +++++++++ src/views/iot/frpc/index.vue | 295 +++++++++++++++++ .../mes/feedingrecord/FeedingRecordForm.vue | 160 +++++++++ src/views/mes/feedingrecord/index.vue | 310 ++++++++++++++++++ .../stockworkshop/StockWorkshopDetailForm.vue | 148 +++++++++ .../StockWorkshopDetailIndex.vue | 248 ++++++++++++++ .../mes/stockworkshop/StockWorkshopForm.vue | 106 ++++++ src/views/mes/stockworkshop/index.vue | 191 +++++++++++ 14 files changed, 1813 insertions(+), 13 deletions(-) create mode 100644 src/api/iot/frpc/index.ts create mode 100644 src/api/mes/feedingrecord/index.ts create mode 100644 src/api/mes/stockworkshop/index.ts create mode 100644 src/views/iot/frpc/FrpcProxyServerForm.vue create mode 100644 src/views/iot/frpc/index.vue create mode 100644 src/views/mes/feedingrecord/FeedingRecordForm.vue create mode 100644 src/views/mes/feedingrecord/index.vue create mode 100644 src/views/mes/stockworkshop/StockWorkshopDetailForm.vue create mode 100644 src/views/mes/stockworkshop/StockWorkshopDetailIndex.vue create mode 100644 src/views/mes/stockworkshop/StockWorkshopForm.vue create mode 100644 src/views/mes/stockworkshop/index.vue diff --git a/src/api/iot/frpc/index.ts b/src/api/iot/frpc/index.ts new file mode 100644 index 00000000..859a0492 --- /dev/null +++ b/src/api/iot/frpc/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +// 代理服务 VO +export interface FrpcProxyServerVO { + id: number // id + frpcName: string // 代理名称 + localIp: string // 内网IP + localPort: number // 内网端口 + suffixPath: string // 访问后缀 + localStatus: string // 内网状态 + frpsId: number // 代理服务器 + proxyPort: number // 代理端口 + proxyAddress: string // 代理地址 + proxyStatus: string // 代理状态 + remark: string // 备注 + isEnable: boolean // 是否启用 +} + +// 代理服务 API +export const FrpcProxyServerApi = { + // 查询代理服务分页 + getFrpcProxyServerPage: async (params: any) => { + return await request.get({ url: `/iot/frpc-proxy-server/page`, params }) + }, + + // 查询代理服务详情 + getFrpcProxyServer: async (id: number) => { + return await request.get({ url: `/iot/frpc-proxy-server/get?id=` + id }) + }, + + // 新增代理服务 + createFrpcProxyServer: async (data: FrpcProxyServerVO) => { + return await request.post({ url: `/iot/frpc-proxy-server/create`, data }) + }, + + // 修改代理服务 + updateFrpcProxyServer: async (data: FrpcProxyServerVO) => { + return await request.put({ url: `/iot/frpc-proxy-server/update`, data }) + }, + + // 删除代理服务 + deleteFrpcProxyServer: async (id: number) => { + return await request.delete({ url: `/iot/frpc-proxy-server/delete?id=` + id }) + }, + + // 导出代理服务 Excel + exportFrpcProxyServer: async (params) => { + return await request.download({ url: `/iot/frpc-proxy-server/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/mes/feedingrecord/index.ts b/src/api/mes/feedingrecord/index.ts new file mode 100644 index 00000000..23dd9b1a --- /dev/null +++ b/src/api/mes/feedingrecord/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +// 投料记录 VO +export interface FeedingRecordVO { + id: number // id + feedingRecordCode: string // 单号 + productId: number // 产品id + planId: number // 计划id + itemId: number // 原料id + feedingPipeline: string // 制浆线 + feedingType: string // 投料类型 + weight: number // 重量 + feedingTime: Date // 投料时间 + userId: number // 记录人 + remark: string // 备注 + recordStatus: string // 状态 +} + +// 投料记录 API +export const FeedingRecordApi = { + // 查询投料记录分页 + getFeedingRecordPage: async (params: any) => { + return await request.get({ url: `/mes/feeding-record/page`, params }) + }, + + // 查询投料记录详情 + getFeedingRecord: async (id: number) => { + return await request.get({ url: `/mes/feeding-record/get?id=` + id }) + }, + + // 新增投料记录 + createFeedingRecord: async (data: FeedingRecordVO) => { + return await request.post({ url: `/mes/feeding-record/create`, data }) + }, + + // 修改投料记录 + updateFeedingRecord: async (data: FeedingRecordVO) => { + return await request.put({ url: `/mes/feeding-record/update`, data }) + }, + + // 删除投料记录 + deleteFeedingRecord: async (id: number) => { + return await request.delete({ url: `/mes/feeding-record/delete?id=` + id }) + }, + + // 导出投料记录 Excel + exportFeedingRecord: async (params) => { + return await request.download({ url: `/mes/feeding-record/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/mes/stockworkshop/index.ts b/src/api/mes/stockworkshop/index.ts new file mode 100644 index 00000000..c2e3c47a --- /dev/null +++ b/src/api/mes/stockworkshop/index.ts @@ -0,0 +1,89 @@ +import request from '@/config/axios' + +// 车间仓库存 VO +export interface StockWorkshopVO { + id: number // id + itemId: number // 原料编号 + count: number // 库存数量 + categoryId: number // 分类 +} + +// 车间仓库存 API +export const StockWorkshopApi = { + // 查询车间仓库存分页 + getStockWorkshopPage: async (params: any) => { + return await request.get({ url: `/mes/stock-workshop/page`, params }) + }, + + // 查询车间仓库存详情 + getStockWorkshop: async (id: number) => { + return await request.get({ url: `/mes/stock-workshop/get?id=` + id }) + }, + + // 新增车间仓库存 + createStockWorkshop: async (data: StockWorkshopVO) => { + return await request.post({ url: `/mes/stock-workshop/create`, data }) + }, + + // 修改车间仓库存 + updateStockWorkshop: async (data: StockWorkshopVO) => { + return await request.put({ url: `/mes/stock-workshop/update`, data }) + }, + + // 删除车间仓库存 + deleteStockWorkshop: async (id: number) => { + return await request.delete({ url: `/mes/stock-workshop/delete?id=` + id }) + }, + + // 导出车间仓库存 Excel + exportStockWorkshop: async (params) => { + return await request.download({ url: `/mes/stock-workshop/export-excel`, params }) + }, +} + +// 车间仓明细 VO +export interface StockWorkshopDetailVO { + id: number // id + itemId: number // 原料id + count: number // 数量 + detailType: string // 明细类别 + itemRequisitionCode: string // 领料单 + itemRequisitionDetailId: number // 领料明细id + feedingRecordCode: string // 投料单 + feedingRecordId: number // 投料id + userId: number // 操作人员 + operateTime: Date // 单据时间 +} + +// 车间仓明细 API +export const StockWorkshopDetailApi = { + // 查询车间仓明细分页 + getStockWorkshopDetailPage: async (params: any) => { + return await request.get({ url: `/mes/stock-workshop-detail/page`, params }) + }, + + // 查询车间仓明细详情 + getStockWorkshopDetail: async (id: number) => { + return await request.get({ url: `/mes/stock-workshop-detail/get?id=` + id }) + }, + + // 新增车间仓明细 + createStockWorkshopDetail: async (data: StockWorkshopDetailVO) => { + return await request.post({ url: `/mes/stock-workshop-detail/create`, data }) + }, + + // 修改车间仓明细 + updateStockWorkshopDetail: async (data: StockWorkshopDetailVO) => { + return await request.put({ url: `/mes/stock-workshop-detail/update`, data }) + }, + + // 删除车间仓明细 + deleteStockWorkshopDetail: async (id: number) => { + return await request.delete({ url: `/mes/stock-workshop-detail/delete?id=` + id }) + }, + + // 导出车间仓明细 Excel + exportStockWorkshopDetail: async (params) => { + return await request.download({ url: `/mes/stock-workshop-detail/export-excel`, params }) + }, +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 90a29037..4325c7ce 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -241,6 +241,11 @@ export enum DICT_TYPE { MES_DATA_TYPE = "mes_data_type", MES_MACHINE_STATUS = "mes_machine_status", MES_MACHINE_TYPE = "mes_machine_type", + MES_FEEDING_TYPE = "mes_feeding_type", + MES_FEEDING_RECORD_STATUS = "mes_feeding_record_status", + MES_FEEDING_PIPELINE = "mes_feeding_pipeline", + MES_STOCK_WORKSHOP_DETAIL_TYPE = "mes_stock_workshop_detail_type", + //====iot IOT_SIEMENS_TYPE = "iot_siemens_type", IOT_MODBUS_TYPE = "iot_modbus_type", @@ -256,4 +261,5 @@ export enum DICT_TYPE { IOT_GATEWAY_STATUS = "iot_gateway_status", IOT_DEVICE_DATA_TRANSFER_TYPE = "iot_device_data_transfer_type", IOT_DEVICE_DATA_TYPE = "iot_device_data_type", + IOT_PROXY_SERVER_STATUS = "iot_proxy_server_status", } diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index c59b9d22..938c934b 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -261,25 +261,25 @@ let notice = reactive([]) const getNotice = async () => { const data = [ { - title: '系统支持 JDK 8/17/21,Vue 2/3', + title: '厂区进行防火演练通知', type: '通知', keys: ['通知', '8', '17', '21', '2', '3'], date: new Date() }, { - title: '后端提供 Spring Boot 2.7/3.2 + Cloud 双架构', + title: '职位调整公告', type: '公告', keys: ['公告', 'Boot', 'Cloud'], date: new Date() }, { - title: '全部开源,个人与企业可 100% 直接使用,无需授权', + title: '端午放假通知', type: '通知', keys: ['通知', '无需授权'], date: new Date() }, { - title: '国内使用最广泛的快速开发平台,超 300+ 人贡献', + title: '失物招领公告', type: '公告', keys: ['公告', '最广泛'], date: new Date() @@ -294,32 +294,32 @@ let shortcut = reactive([]) const getShortcut = async () => { const data = [ { - name: 'Github', + name: '生产任务', icon: 'akar-icons:github-fill', url: 'github.io' }, { - name: 'Vue', + name: '用户管理', icon: 'logos:vue', url: 'vuejs.org' }, { - name: 'Vite', + name: '采购订单', icon: 'vscode-icons:file-type-vite', url: 'https://vitejs.dev/' }, { - name: 'Angular', + name: '报表看板', icon: 'logos:angular-icon', url: 'github.io' }, { - name: 'React', + name: '物联数据', icon: 'logos:react', url: 'github.io' }, { - name: 'Webpack', + name: '仓库管理', icon: 'logos:webpack', url: 'github.io' } diff --git a/src/views/erp/stock/stock/index.vue b/src/views/erp/stock/stock/index.vue index 07b54727..d4ddb8b1 100644 --- a/src/views/erp/stock/stock/index.vue +++ b/src/views/erp/stock/stock/index.vue @@ -85,15 +85,15 @@ - - - + + + diff --git a/src/views/iot/frpc/FrpcProxyServerForm.vue b/src/views/iot/frpc/FrpcProxyServerForm.vue new file mode 100644 index 00000000..001e56a8 --- /dev/null +++ b/src/views/iot/frpc/FrpcProxyServerForm.vue @@ -0,0 +1,147 @@ + + diff --git a/src/views/iot/frpc/index.vue b/src/views/iot/frpc/index.vue new file mode 100644 index 00000000..27a2a995 --- /dev/null +++ b/src/views/iot/frpc/index.vue @@ -0,0 +1,295 @@ + + + diff --git a/src/views/mes/feedingrecord/FeedingRecordForm.vue b/src/views/mes/feedingrecord/FeedingRecordForm.vue new file mode 100644 index 00000000..26bc2c67 --- /dev/null +++ b/src/views/mes/feedingrecord/FeedingRecordForm.vue @@ -0,0 +1,160 @@ + + diff --git a/src/views/mes/feedingrecord/index.vue b/src/views/mes/feedingrecord/index.vue new file mode 100644 index 00000000..1948e6fe --- /dev/null +++ b/src/views/mes/feedingrecord/index.vue @@ -0,0 +1,310 @@ + + + diff --git a/src/views/mes/stockworkshop/StockWorkshopDetailForm.vue b/src/views/mes/stockworkshop/StockWorkshopDetailForm.vue new file mode 100644 index 00000000..fcb0e8c4 --- /dev/null +++ b/src/views/mes/stockworkshop/StockWorkshopDetailForm.vue @@ -0,0 +1,148 @@ + + diff --git a/src/views/mes/stockworkshop/StockWorkshopDetailIndex.vue b/src/views/mes/stockworkshop/StockWorkshopDetailIndex.vue new file mode 100644 index 00000000..2e1852e1 --- /dev/null +++ b/src/views/mes/stockworkshop/StockWorkshopDetailIndex.vue @@ -0,0 +1,248 @@ + + + diff --git a/src/views/mes/stockworkshop/StockWorkshopForm.vue b/src/views/mes/stockworkshop/StockWorkshopForm.vue new file mode 100644 index 00000000..399b7ffa --- /dev/null +++ b/src/views/mes/stockworkshop/StockWorkshopForm.vue @@ -0,0 +1,106 @@ + + diff --git a/src/views/mes/stockworkshop/index.vue b/src/views/mes/stockworkshop/index.vue new file mode 100644 index 00000000..30d9b5dc --- /dev/null +++ b/src/views/mes/stockworkshop/index.vue @@ -0,0 +1,191 @@ + + +