From acfb95a2b394447b8f6b186021437b30607166fd Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Fri, 12 Apr 2024 16:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspection/inspectionRecord/index.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/qms/inspection/inspectionRecord/index.vue b/src/views/qms/inspection/inspectionRecord/index.vue index a65616c7c..b3963fe99 100644 --- a/src/views/qms/inspection/inspectionRecord/index.vue +++ b/src/views/qms/inspection/inspectionRecord/index.vue @@ -111,12 +111,11 @@ } } - const isShowDecisionButton = (row) => { - console.log(row.isPublished) + const isShowMainButton = (row, val) => { if(row.useDecision) { return row.isPublished } else { - return false + return val ? true : false } } @@ -124,9 +123,9 @@ const butttondata = (row) => { return [ // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 - defaultButtons.mainApplyDecisionBtn({ hide: isShowDecisionButton(row), hasPermi:'qms:inspection-recode-main:edit'}), // 使用决策 + defaultButtons.mainApplyDecisionBtn({ hide: isShowMainButton(row, null), hasPermi:'qms:inspection-recode-main:edit'}), // 使用决策 // defaultButtons.mainListDeleteBtn(null), // 删除 - defaultButtons.mainListOrderPubBtn({ hide: row.isPublished, hasPermi:'qms:inspection-recode-main:pub'}), // 发布 + defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi:'qms:inspection-recode-main:pub'}), // 发布 defaultButtons.mainListPackageBtn(null), // 包装 ] }