From b5e9540454a6c7b0de1b090bcdf9090bfaf6574b Mon Sep 17 00:00:00 2001 From: shaoleiliu-netizen123 <480188199@qq.com> Date: Sat, 1 Aug 2026 15:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=AE=E6=94=B9=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/biz/maintenanceRecord/index.vue | 441 ---------------- mes-ui/src/views/biz/outsourcing/index.vue | 492 ------------------ src/layout/index.vue | 26 +- src/views/biz/device/index.vue | 1 + src/views/biz/orderProcessPlan/board.vue | 5 +- src/views/biz/orderProcessPlan/pgitem.vue | 3 +- src/views/biz/station/index.vue | 44 +- src/views/system/user/index.vue | 4 +- 8 files changed, 50 insertions(+), 966 deletions(-) delete mode 100644 mes-ui/src/views/biz/maintenanceRecord/index.vue delete mode 100644 mes-ui/src/views/biz/outsourcing/index.vue diff --git a/mes-ui/src/views/biz/maintenanceRecord/index.vue b/mes-ui/src/views/biz/maintenanceRecord/index.vue deleted file mode 100644 index 9a8956a..0000000 --- a/mes-ui/src/views/biz/maintenanceRecord/index.vue +++ /dev/null @@ -1,441 +0,0 @@ - - - - - diff --git a/mes-ui/src/views/biz/outsourcing/index.vue b/mes-ui/src/views/biz/outsourcing/index.vue deleted file mode 100644 index 0b68648..0000000 --- a/mes-ui/src/views/biz/outsourcing/index.vue +++ /dev/null @@ -1,492 +0,0 @@ - - - - - diff --git a/src/layout/index.vue b/src/layout/index.vue index ad563e5..c68217e 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -335,7 +335,6 @@ @@ -615,21 +614,16 @@ async function handleNoticeClick(item: SysNotice) { notice.value = item //异常填报直接弹窗 showErrorReportModal.value = true - // if (item.abnormalReporting) { - // - // }else { - // // 标记已读 - // if (item.id) { - // try { - // await noticeApi.markAsRead(item.id) - // // 刷新未读数量 - // loadUnreadCount() - // } catch (error) { - // // 忽略 - // } - // } - // router.push({ path: '/message/notice', query: { id: item.id?.toString() } }) - // } + // 标记已读 + if (item.id) { + try { + await noticeApi.markAsRead(item.id) + // 刷新未读数量 + loadUnreadCount() + } catch (error) { + // 忽略 + } + } } // 点击聊天 diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue index 3fbcc93..d3a3083 100644 --- a/src/views/biz/device/index.vue +++ b/src/views/biz/device/index.vue @@ -120,6 +120,7 @@ style="width: 200px" /> --> - + + + + + + + + @@ -144,8 +150,9 @@ import { NButton, NSpace,NTag, NIcon, NUpload, useMessage, useDialog, type DataT import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5' import { deviceApi, type Device } from '@/api/device' -import { dictDataApi } from '@/api/org' +import {deptApi, dictDataApi} from '@/api/org' import {sectionApi, type Section} from '@/api/section' +import {TreeNode} from "echarts/types/src/data/Tree"; const message = useMessage() @@ -208,6 +215,7 @@ const columns: DataTableColumns = [ { type: 'selection' }, { title: '工位编码', key: 'deviceCode' }, { title: '工位名称', key: 'deviceName' }, + { title: '工位类型', key: 'deviceType' }, { title: '所属工段', key: 'sectionName' }, { title: '状态', key: 'status', render:(row) =>{ @@ -431,8 +439,24 @@ async function loadDictOptions() { //加载工段 async function loadSection() { - const data = await sectionApi.listNoParam() - sectionList = data.map((d:any)=> ({ label: d.sectionName, value: (Number(d.id) || d.id) })) + const data = await deptApi.tree() + sectionList = buildOptions(data); +} + +function buildOptions(d: any[]): TreeNode[] { + return d.map(item => { + // 安全id转换:0也能正常转为数字,不会被||过滤 + const idNum = Number(item.id); + const key = !isNaN(idNum) ? idNum : item.id; + return { + label: item.deptName, + key, + // 子节点存在且为数组才递归处理 + children: Array.isArray(item.children) && item.children.length + ? buildOptions(item.children) + : undefined + }; + }); } onMounted(() => { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 03218e1..1139a19 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -507,7 +507,7 @@ async function loadData() { async function loadRoles() { try { - const roles = await roleApi.roleList() + const roles = await roleApi.list() roleOptions.value = roles.map((role: SysRole) => ({ label: role.name, value: role.id! @@ -519,7 +519,7 @@ async function loadRoles() { async function loadPostOptions() { try { - const posts = await postApi.postList() + const posts = await postApi.list() postOptions.value = posts.map(p => ({ label: p.postName, value: p.id!