diff --git a/src/api/mes/machine/index.ts b/src/api/mes/machine/index.ts
index 67983917..3e803bd2 100644
--- a/src/api/mes/machine/index.ts
+++ b/src/api/mes/machine/index.ts
@@ -1,52 +1,57 @@
-import request from '@/config/axios'
-
-// 机台 VO
-export interface MachineComponentVO {
- id: number // 装备id
- name: string // 装备名称
- parentId: number // 父id
- sort: number // 显示顺序
- orgId: number // 组织机台ID
- serialCode: string // 装备SN号
- outgoingTime: Date // 出厂日期
- outgoingReport: string // 出厂报告
- position: string // 位置
- standard: string // 规格
- remark: string // 备注
- status: number // 状态
- componentType: number // 组织类型
- machineType: string // 机台类型
-}
-
-// 机台 API
-export const MachineComponentApi = {
- // 查询机台列表
- getMachineComponentList: async (params) => {
- return await request.get({ url: `/mes/machine-component/list`, params })
- },
-
- // 查询机台详情
- getMachineComponent: async (id: number) => {
- return await request.get({ url: `/mes/machine-component/get?id=` + id })
- },
-
- // 新增机台
- createMachineComponent: async (data: MachineComponentVO) => {
- return await request.post({ url: `/mes/machine-component/create`, data })
- },
-
- // 修改机台
- updateMachineComponent: async (data: MachineComponentVO) => {
- return await request.put({ url: `/mes/machine-component/update`, data })
- },
-
- // 删除机台
- deleteMachineComponent: async (id: number) => {
- return await request.delete({ url: `/mes/machine-component/delete?id=` + id })
- },
-
- // 导出机台 Excel
- exportMachineComponent: async (params) => {
- return await request.download({ url: `/mes/machine-component/export-excel`, params })
- },
-}
\ No newline at end of file
+import request from '@/config/axios'
+
+// 机台 VO
+export interface MachineComponentVO {
+ id: number // 装备id
+ name: string // 装备名称
+ parentId: number // 父id
+ sort: number // 显示顺序
+ orgId: number // 组织机台ID
+ serialCode: string // 装备SN号
+ outgoingTime: Date // 出厂日期
+ outgoingReport: string // 出厂报告
+ position: string // 位置
+ standard: string // 规格
+ remark: string // 备注
+ status: number // 状态
+ componentType: number // 组织类型
+ machineType: string // 机台类型
+}
+
+// 机台 API
+export const MachineComponentApi = {
+ // 查询机台列表
+ getMachineComponentList: async (params) => {
+ return await request.get({ url: `/mes/machine-component/list`, params })
+ },
+
+ // 查询机台详情
+ getMachineComponent: async (id: number) => {
+ return await request.get({ url: `/mes/machine-component/get?id=` + id })
+ },
+
+ // 新增机台
+ createMachineComponent: async (data: MachineComponentVO) => {
+ return await request.post({ url: `/mes/machine-component/create`, data })
+ },
+
+ // 修改机台
+ updateMachineComponent: async (data: MachineComponentVO) => {
+ return await request.put({ url: `/mes/machine-component/update`, data })
+ },
+
+ // 删除机台
+ deleteMachineComponent: async (id: number) => {
+ return await request.delete({ url: `/mes/machine-component/delete?id=` + id })
+ },
+
+ // 导出机台 Excel
+ exportMachineComponent: async (params) => {
+ return await request.download({ url: `/mes/machine-component/export-excel`, params })
+ },
+
+ // 查询产线和机台列表
+ getPipelineAndMachineList: async (params) => {
+ return await request.get({ url: `/mes/machine-component/listPipelineAndMachine`, params })
+ },
+}
diff --git a/src/api/mes/orgworker/index.ts b/src/api/mes/orgworker/index.ts
new file mode 100644
index 00000000..99c60318
--- /dev/null
+++ b/src/api/mes/orgworker/index.ts
@@ -0,0 +1,44 @@
+import request from '@/config/axios'
+
+// 工位安排 VO
+export interface OrgWorkerVO {
+ id: number // id
+ orgId: number // 工位id
+ workDate: Date // 工作日期
+ groupType: number // 班别
+ workerId: number // 工人id
+ reportId: number // 报工单id
+}
+
+// 工位安排 API
+export const OrgWorkerApi = {
+ // 查询工位安排分页
+ getOrgWorkerPage: async (params: any) => {
+ return await request.get({ url: `/mes/org-worker/page`, params })
+ },
+
+ // 查询工位安排详情
+ getOrgWorker: async (id: number) => {
+ return await request.get({ url: `/mes/org-worker/get?id=` + id })
+ },
+
+ // 新增工位安排
+ createOrgWorker: async (data: OrgWorkerVO) => {
+ return await request.post({ url: `/mes/org-worker/create`, data })
+ },
+
+ // 修改工位安排
+ updateOrgWorker: async (data: OrgWorkerVO) => {
+ return await request.put({ url: `/mes/org-worker/update`, data })
+ },
+
+ // 删除工位安排
+ deleteOrgWorker: async (id: number) => {
+ return await request.delete({ url: `/mes/org-worker/delete?id=` + id })
+ },
+
+ // 导出工位安排 Excel
+ exportOrgWorker: async (params) => {
+ return await request.download({ url: `/mes/org-worker/export-excel`, params })
+ }
+}
\ No newline at end of file
diff --git a/src/views/mes/organization/OrganizationForm.vue b/src/views/mes/organization/OrganizationForm.vue
index 017a9922..646a27a3 100644
--- a/src/views/mes/organization/OrganizationForm.vue
+++ b/src/views/mes/organization/OrganizationForm.vue
@@ -57,7 +57,14 @@
-
+
@@ -85,6 +92,7 @@ import { OrganizationApi, OrganizationVO } from '@/api/mes/organization'
import { defaultProps, handleTree } from '@/utils/tree'
import * as UserApi from "@/api/system/user";
import {WorkTeamApi} from "@/api/mes/workteam";
+import {MachineComponentApi} from "@/api/mes/machine";
/** 产线工位 表单 */
defineOptions({ name: 'OrganizationForm' })
@@ -135,7 +143,7 @@ const open = async (type: string, id?: number) => {
}
}
await getOrganizationTree()
-
+ await getMachineComponentTree()
// 获得用户列表
userList.value = await UserApi.getSimpleUserList()
}
@@ -198,4 +206,13 @@ const handleOrgTypeChange = async () => {
// 获得用户列表
userList.value = await WorkTeamApi.getUserList(formData.value.orgType)
}
+const machineComponentTree = ref() // 树形结构
+/** 获得机台树 */
+const getMachineComponentTree = async () => {
+ machineComponentTree.value = []
+ const data = await MachineComponentApi.getPipelineAndMachineList()
+ const root: Tree = { id: 0, name: 'ALL', children: [] }
+ root.children = handleTree(data, 'id', 'parentId')
+ machineComponentTree.value.push(root)
+}
diff --git a/src/views/mes/organization/WorkerIndex.vue b/src/views/mes/organization/WorkerIndex.vue
new file mode 100644
index 00000000..cd1db88f
--- /dev/null
+++ b/src/views/mes/organization/WorkerIndex.vue
@@ -0,0 +1,302 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+ 导出
+
+
+ 展开/折叠
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mes/organization/index.vue b/src/views/mes/organization/index.vue
index f150d1fe..2e0ca252 100644
--- a/src/views/mes/organization/index.vue
+++ b/src/views/mes/organization/index.vue
@@ -138,8 +138,8 @@
-
-
+
+
diff --git a/src/views/mes/orgworker/OrgWorkerForm.vue b/src/views/mes/orgworker/OrgWorkerForm.vue
new file mode 100644
index 00000000..ba1b28bd
--- /dev/null
+++ b/src/views/mes/orgworker/OrgWorkerForm.vue
@@ -0,0 +1,129 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/views/mes/orgworker/index.vue b/src/views/mes/orgworker/index.vue
new file mode 100644
index 00000000..6b7c0513
--- /dev/null
+++ b/src/views/mes/orgworker/index.vue
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mes/planprogress/index.vue b/src/views/mes/planprogress/index.vue
index 666f8a6b..93f5248d 100644
--- a/src/views/mes/planprogress/index.vue
+++ b/src/views/mes/planprogress/index.vue
@@ -120,7 +120,7 @@
-
+