From c0518a269c59b2b5e4fc89b9ef47be045800dc77 Mon Sep 17 00:00:00 2001 From: v_xugzhou <941071842@qq.com> Date: Wed, 25 Dec 2024 10:35:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=AC=E5=85=B1=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=91=A8=E6=9C=9F=E4=BB=BB=E5=8A=A1-?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C=E4=BC=98=E5=8C=96=20--stor?= =?UTF-8?q?y=3D121334648=20#=20Reviewed,=20transaction=20id:=2027700?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PeriodicList/ModifyPeriodicDialog.vue | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue b/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue index 5bb54a06e..86ba7b1a5 100644 --- a/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue +++ b/frontend/desktop/src/pages/task/PeriodicList/ModifyPeriodicDialog.vue @@ -96,12 +96,12 @@

{{ option.name }}

@@ -219,8 +219,8 @@ :loading="saveLoading" :disabled="isLoading || previewDataLoading" data-test-id="periodicEdit_form_saveBtn" - :class="{ 'btn-permission-disable': hasNoCreatePerm }" - v-cursor="{ active: hasNoCreatePerm }" + :class="{ 'btn-permission-disable': hasNoPermission.create }" + v-cursor="{ active: hasNoPermission.create }" @click="onPeriodicConfirm"> {{ isEdit ? $t('保存') : $t('提交') }} @@ -411,12 +411,17 @@ const nodes = Object.values(activities).map(item => item.name) return nodes.join(',') }, - hasNoCreatePerm () { + hasNoPermission () { const { id, auth_actions } = this.templateData + if (this.isEdit || !id) { - return false + return { view: false, create: false } + } + + return { + view: !auth_actions.includes(this.flowPermission.view), + create: !auth_actions.includes(this.flowPermission.create) } - return !auth_actions.includes(this.flowPermission.create) }, schemeSelectPlaceholder () { return this.formData.template_id && !this.schemeList.length ? i18n.t('此流程无执行方案,无需选择') : i18n.t('请选择') @@ -492,7 +497,7 @@ } }, onTempSelect (applyPerm = [], selectInfo) { - if (!this.hasPermission(applyPerm, selectInfo.auth_actions)) { + if (this.hasNoPermission.view) { const permissionData = { project: [{ id: this.project_id, @@ -785,7 +790,7 @@ }, // 周期任务保存 onPeriodicConfirm () { - if (this.hasNoCreatePerm) { + if (this.hasNoPermission.create) { const { id, name, auth_actions } = this.templateData const resourceData = { [this.isCommon ? 'common_flow' : 'flow']: [{ id, name }],