From 8b38cd8a0c9672dbd50050bba87e8b9d67aef1f8 Mon Sep 17 00:00:00 2001 From: lvjunzhao <967725@dms.yudean.com> Date: Mon, 3 Mar 2025 18:01:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9D=83=E9=99=90=20=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?1.=20detail=20list=20=E7=A1=AC=E5=A1=9E=E8=BF=9Bmenu=E2=80=94?= =?UTF-8?q?=E2=80=94button=202.=E6=A8=A1=E6=9D=BF=20controller=20page=20?= =?UTF-8?q?=E5=92=8Clist=20=E6=9D=83=E9=99=90=E6=94=B9=E6=88=90=20:list=20?= =?UTF-8?q?3.=20list=20index=20=E7=9A=84=E5=8F=8C=E5=87=BB=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=20=E9=9C=80=E8=A6=81=E6=A0=A1=E9=AA=8Cview=20button?= =?UTF-8?q?=20=E6=9D=A5return=20=E8=A1=A5=E5=85=A8=E6=97=A7=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6.=20=E5=89=8D=E7=AB=AF=20button=20configs=20list?= =?UTF-8?q?=E5=88=A0=E9=99=A4detail=20=EF=BC=8C=20=E4=BB=8A=E5=A4=A9?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=9A=84=E9=83=A8=E5=88=86=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CreateCodeStep/src/ViewDesignStep.vue | 7 ------- src/utils/helper/generatorHelper.ts | 10 ++++------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/components/CreateCodeStep/src/ViewDesignStep.vue b/src/components/CreateCodeStep/src/ViewDesignStep.vue index 75c154d..b2c95ad 100644 --- a/src/components/CreateCodeStep/src/ViewDesignStep.vue +++ b/src/components/CreateCodeStep/src/ViewDesignStep.vue @@ -683,13 +683,6 @@ icon: 'ant-design:delete-outlined', isDefault: true, }, - { - isUse: true, - name: t('查看详情'), - code: 'detail', - icon: 'ant-design:eye-outlined', - isDefault: true, - }, { isUse: false, name: t('批量删除'), diff --git a/src/utils/helper/generatorHelper.ts b/src/utils/helper/generatorHelper.ts index a48d5d6..01d54eb 100644 --- a/src/utils/helper/generatorHelper.ts +++ b/src/utils/helper/generatorHelper.ts @@ -434,7 +434,7 @@ export function buildListCode(model: GeneratorConfig): string { }); let btnEvent = `{`; model.listConfig.buttonConfigs - .filter((x) => x.isUse && x.isDefault && x.code != 'detail') + .filter((x) => x.isUse && x.isDefault) .forEach((x) => { btnEvent += `${x.code} : handle${upperFirst(x.code)},`; }); @@ -451,11 +451,6 @@ export function buildListCode(model: GeneratorConfig): string { buttonConfigs.push(item); return; } - if (item.code === 'detail') { - //detail按钮 只作为权限处理 - buttonConfigs.splice(index, 1); - return; - } }); const hasAddButton = hasButton(buttonConfigs, 'add'); const hasEditButton = hasButton(buttonConfigs, 'edit'); @@ -955,6 +950,9 @@ ${hasTemplatePrint ? ' reactive ' : ''} }); function dbClickRow(record) { + if (!actionButtonConfig?.value.some(element => element.code == 'view')) { + return; + } const { processId, taskIds, schemaId } = record.workflowData || {}; if (taskIds && taskIds.length) { router.push({