feat:权限 管理

1. detail list 硬塞进menu——button
2.模板 controller page 和list 权限改成 :list
3. list index 的双击事件 需要校验view button 来return
补全旧事件. 前端 button configs list删除detail , 今天提交的部分去除
This commit is contained in:
lvjunzhao
2025-03-03 18:01:06 +08:00
parent 363789d227
commit 8b38cd8a0c
2 changed files with 4 additions and 13 deletions

View File

@ -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('批量删除'),

View File

@ -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({