From 7ea7cd0ce3faafb0ab881935d88bef7928fc2ca7 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 03 十二月 2025 17:52:38 +0800
Subject: [PATCH] feat: 页面
---
src/views/UserManage/UserManageList.vue | 56 ++++++++++++++++++++++++--------------------------------
1 files changed, 24 insertions(+), 32 deletions(-)
diff --git a/src/views/UserManage/UserManageList.vue b/src/views/UserManage/UserManageList.vue
index fd75ebc..2402aa5 100644
--- a/src/views/UserManage/UserManageList.vue
+++ b/src/views/UserManage/UserManageList.vue
@@ -14,14 +14,16 @@
</QueryFilterItem>
</template>
<template #btn>
- <el-button @click="openDialog()" icon="Plus" type="primary">鏂板</el-button>
+ <el-button
+ v-if="checkSubModuleItemShow('pageButton', 'addBtn')"
+ @click="openDialog()"
+ icon="Plus"
+ type="primary"
+ >鏂板</el-button
+ >
</template>
</ProTableQueryFilterBar>
- <ProTableV2
- v-bind="proTableProps"
- :columns="UserManageColumns"
- :operationBtns="operationBtns"
- >
+ <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns">
<template #status="{ row }">
<FieldSwitch
v-model="row.status"
@@ -52,11 +54,9 @@
QueryFilterItem,
useTable,
useFormDialog,
- defineOperationBtns,
FieldSwitch,
} from '@bole-core/components';
import * as userServices from '@/services/api/user';
-import { UserManageColumns } from './constants';
import { EnumUserStatus, EnumUserStatusText } from '@/constants';
import { ModelValueType } from 'element-plus';
import { Message } from '@bole-core/core';
@@ -68,21 +68,13 @@
name: 'UserManageList',
});
-const operationBtns = defineOperationBtns([
- {
- data: {
- enCode: 'editBtn',
- name: '缂栬緫',
- },
+const operationBtnMap: Record<string, OperationBtnType> = {
+ editBtn: {
emits: {
onClick: (role) => openDialog(role),
},
},
- {
- data: {
- enCode: 'resetPasswordBtn',
- name: '閲嶇疆瀵嗙爜',
- },
+ resetPasswordBtn: {
props: {
type: 'danger',
},
@@ -90,19 +82,19 @@
onClick: (role) => openResetPasswordDialog(role),
},
},
- // {
- // data: {
- // enCode: 'resetOperatorPasswordBtn',
- // name: '閲嶇疆鎿嶄綔瀵嗙爜',
- // },
- // props: {
- // type: 'danger',
- // },
- // emits: {
- // onClick: (role) => openResetOperatorPasswordDialog(role),
- // },
- // },
-]);
+ resetOperatorPasswordBtn: {
+ props: {
+ type: 'danger',
+ },
+ emits: {
+ onClick: (role) => openResetOperatorPasswordDialog(role),
+ },
+ },
+};
+
+const { checkSubModuleItemShow, column, operationBtns } = useAccess({
+ operationBtnMap,
+});
const router = useRouter();
const BaseState = {
--
Gitblit v1.9.1