From 3e28f56729fbd554c7a8df0219c6981f192f23d8 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Tue, 26 Mar 2024 10:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Detail/src/DetailDeviceLedger.vue | 25 ++++++++-- .../deviceAccounts/deviceAccounts.data.ts | 46 ++++++++++++++++++- .../device/deviceRepair/deviceRepair.data.ts | 9 +++- .../deviceSpotInspectionRecordMain.data.ts | 5 ++ .../deviceInspectionMain.data.ts | 29 ++++++++---- .../deviceMaintainOrderMain.data.ts | 8 +++- .../deviceMaintenanceMain.data.ts | 27 ++++++++--- src/views/eam/mold/moldAccounts/index.vue | 18 ++++++++ .../mold/moldAccounts/moldAccounts.data.ts | 17 ++++++- .../eam/mold/moldinspectionjob/index.vue | 8 ++++ 10 files changed, 167 insertions(+), 25 deletions(-) diff --git a/src/components/Detail/src/DetailDeviceLedger.vue b/src/components/Detail/src/DetailDeviceLedger.vue index 1a031f8..598636a 100644 --- a/src/components/Detail/src/DetailDeviceLedger.vue +++ b/src/components/Detail/src/DetailDeviceLedger.vue @@ -107,7 +107,7 @@ :key="milestoneUpdateKey" > { titleNameRef.value = titleName @@ -880,10 +882,12 @@ const setBeiJian = () => { } // 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn(null), // 编辑 - defaultButtons.uploadFileBtn(null),//上传 -] +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({ hide: !hasmMilestoneRight(row)}), // 编辑 + defaultButtons.uploadFileBtn({ hide: !hasmMilestoneRight(row)}),//上传 + ] +} // 列表-操作按钮事件 const buttonMilestoneClick = async (val, row) => { @@ -949,6 +953,17 @@ function dialogUploadFile() { }) } +const hasmMilestoneRight = (row) => { + const rolesOk = userStore.roles.find(item => { + return item == 'mold_Engineer_role ' + }) + if (rolesOk != undefined && rolesOk != null) { + return true + } else { + return false + } +} +