Commit c932528fa37c550c5457e1655fabd6f76bb3ac49

Authored by loveumiko
1 parent ac80c5f4

fix: 修改客户角色启用后隐藏删除按钮

@@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
6 :clickToRowSelect="false" 6 :clickToRowSelect="false"
7 > 7 >
8 <template #toolbar> 8 <template #toolbar>
9 - <Authority value="api:yt:role:saveOrUpdateRoleInfoWithMenu:post"> 9 + <Authority value="api:yt:custom:role:post">
10 <a-button type="primary" @click="handleCreate">新增角色</a-button> 10 <a-button type="primary" @click="handleCreate">新增角色</a-button>
11 </Authority> 11 </Authority>
12 - <Authority value="api:yt:role:delete"> 12 + <Authority value="api:yt:custom:role:delete">
13 <Popconfirm 13 <Popconfirm
14 title="您确定要批量删除数据" 14 title="您确定要批量删除数据"
15 ok-text="确定" 15 ok-text="确定"
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </Authority> 21 </Authority>
22 </template> 22 </template>
23 <template #status="{ record }"> 23 <template #status="{ record }">
24 - <Authority value="api:yt:role:saveOrUpdateRoleInfoWithMenu:update"> 24 + <Authority value="api:yt:custom:role:update">
25 <Switch 25 <Switch
26 :checked="record.status === 1" 26 :checked="record.status === 1"
27 :loading="record.pendingStatus" 27 :loading="record.pendingStatus"
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 /> 31 />
32 </Authority> 32 </Authority>
33 <Tag 33 <Tag
34 - v-if="!hasPermission('api:yt:role:saveOrUpdateRoleInfoWithMenu:update')" 34 + v-if="!hasPermission('api:yt:custom:role:update')"
35 :color="record.status ? 'green' : 'red'" 35 :color="record.status ? 'green' : 'red'"
36 > 36 >
37 {{ record.status ? '启用' : '禁用' }} 37 {{ record.status ? '启用' : '禁用' }}
@@ -42,16 +42,16 @@ @@ -42,16 +42,16 @@
42 :actions="[ 42 :actions="[
43 { 43 {
44 label: '编辑', 44 label: '编辑',
45 - auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update', 45 + auth: 'api:yt:custom:role:update',
46 icon: 'clarity:note-edit-line', 46 icon: 'clarity:note-edit-line',
47 onClick: handleEdit.bind(null, record), 47 onClick: handleEdit.bind(null, record),
48 }, 48 },
49 { 49 {
50 label: '删除', 50 label: '删除',
51 - auth: 'api:yt:role:delete', 51 + auth: 'api:yt:custom:role:delete',
52 icon: 'ant-design:delete-outlined', 52 icon: 'ant-design:delete-outlined',
53 color: 'error', 53 color: 'error',
54 - ifShow: record.roleType != RoleEnum.SYS_ADMIN, 54 + ifShow: record.roleType != RoleEnum.SYS_ADMIN && !record.status,
55 popConfirm: { 55 popConfirm: {
56 title: '是否确认删除', 56 title: '是否确认删除',
57 confirm: handleDeleteOrBatchDelete.bind(null, record), 57 confirm: handleDeleteOrBatchDelete.bind(null, record),
@@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
6 :clickToRowSelect="false" 6 :clickToRowSelect="false"
7 > 7 >
8 <template #toolbar> 8 <template #toolbar>
9 - <Authority value="api:yt:role:saveOrUpdateRoleInfoWithMenu:post"> 9 + <Authority value="api:yt:tenant:role:post">
10 <a-button type="primary" @click="handleCreate"> 新增角色 </a-button> 10 <a-button type="primary" @click="handleCreate"> 新增角色 </a-button>
11 </Authority> 11 </Authority>
12 - <Authority value="api:yt:role:delete"> 12 + <Authority value="api:yt:tenant:role:delete">
13 <Popconfirm 13 <Popconfirm
14 title="您确定要批量删除数据" 14 title="您确定要批量删除数据"
15 ok-text="确定" 15 ok-text="确定"
@@ -34,13 +34,13 @@ @@ -34,13 +34,13 @@
34 :actions="[ 34 :actions="[
35 { 35 {
36 label: '编辑', 36 label: '编辑',
37 - auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update', 37 + auth: 'api:yt:tenant:role:update',
38 icon: 'clarity:note-edit-line', 38 icon: 'clarity:note-edit-line',
39 onClick: handleEdit.bind(null, record), 39 onClick: handleEdit.bind(null, record),
40 }, 40 },
41 { 41 {
42 label: '删除', 42 label: '删除',
43 - auth: 'api:yt:role:delete', 43 + auth: 'api:yt:tenant:role:delete',
44 ifShow: !record.status, 44 ifShow: !record.status,
45 icon: 'ant-design:delete-outlined', 45 icon: 'ant-design:delete-outlined',
46 color: 'error', 46 color: 'error',