File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,8 +136,8 @@ onMounted(() => loadChatUserGroups())
136136 <component :is =" Header" >
137137 <h4 >{{ title }}</h4 >
138138 <!-- 创建用户组 -->
139- <MkTooltip content="创建用户组" placement="top">
140- <el-button v-if = " perm.system.chatUserGroup.create() " text type =" primary" @click =" handleOpenGroupDialog()" >
139+ <MkTooltip content="创建用户组" placement="top" v-if = " perm . system . chatUserGroup . create () " >
140+ <el-button text type =" primary" @click =" handleOpenGroupDialog()" >
141141 <MkIcon name="icon_add_outlined" :size =" 18 " />
142142 </el-button >
143143 </MkTooltip >
@@ -203,8 +203,8 @@ onMounted(() => loadChatUserGroups())
203203 <el-table-column label =" 操作" width =" 70" fixed =" right" >
204204 <template #default =" { row } " >
205205 <!-- 移除成员 -->
206- <MkTooltip content="移除" placement="top">
207- <el-button v-if = " perm.system.chatUserGroup.removeMember() " type =" primary" text @click =" handleRemoveMembers(row)" >
206+ <MkTooltip content="移除" placement="top" v-if = " perm . system . chatUserGroup . removeMember () " >
207+ <el-button type =" primary" text @click =" handleRemoveMembers(row)" >
208208 <MkIcon name="icon_assigned_outlined" />
209209 </el-button >
210210 </MkTooltip >
Original file line number Diff line number Diff line change @@ -209,13 +209,13 @@ onMounted(() => loadChatUsers())
209209 <template #default =" { row } " >
210210 <div class =" flex-align-center gap-3" >
211211 <span @click.stop >
212- <el-switch v-model =" row.is_active" size =" small" :before-change =" () => handleChangeStatus(row)" />
212+ <el-switch v-model =" row.is_active" size =" small" :disabled = " !perm.system.chatUser.edit() " : before-change =" () => handleChangeStatus(row)" />
213213 </span >
214214 <el-divider direction =" vertical" />
215215 <div class =" flex" >
216216 <!-- 编辑 -->
217- <MkTooltip content="编辑" placement="top">
218- <el-button v-if = " perm.system.chatUser.edit() " type =" primary" text @click.stop =" handleOpenUserFormDrawer(row)" >
217+ <MkTooltip content="编辑" placement="top" v-if = " perm . system . chatUser . edit () " >
218+ <el-button type =" primary" text @click.stop =" handleOpenUserFormDrawer(row)" >
219219 <MkIcon name="icon_edit_outlined" />
220220 </el-button >
221221 </MkTooltip >
Original file line number Diff line number Diff line change @@ -250,8 +250,8 @@ onMounted(() => {
250250 <el-table-column label =" 操作" width =" 70" fixed =" right" >
251251 <template #default =" { row } " >
252252 <!-- 移除成员 -->
253- <MkTooltip content="移除" placement="top">
254- <el-button v-if = " perm.system.userGroup.removeMember() " type =" primary" text @click =" handleRemoveMembers(row)" >
253+ <MkTooltip content="移除" placement="top" v-if = " perm . system . userGroup . removeMember () " >
254+ <el-button type =" primary" text @click =" handleRemoveMembers(row)" >
255255 <MkIcon name="icon_assigned_outlined" />
256256 </el-button >
257257 </MkTooltip >
Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ onMounted(() => loadRoles())
8383 <template #aside =" { title , Header } " >
8484 <component :is =" Header" >
8585 <h4 >{{ title }}</h4 >
86- <MkTooltip content="创建角色" placement="top">
86+ <MkTooltip content="创建角色" placement="top" v-if = " perm . system . role . create () " >
8787 <!-- 创建角色 -->
88- <el-button v-if = " perm.system.role.create() " class =" -mr-1" text type =" primary" @click =" handleOpenRoleDialog()" >
88+ <el-button class =" -mr-1" text type =" primary" @click =" handleOpenRoleDialog()" >
8989 <MkIcon name="icon_add_outlined" :size =" 18 " />
9090 </el-button >
9191 </MkTooltip >
Original file line number Diff line number Diff line change 9696 <div class =" flex-between mb-4" >
9797 <div >
9898 <!-- 添加成员 -->
99- <el-button type =" primary" v-if =" perm.system.workspace .addMember()" @click =" handleOpenAddMemberDrawer" > <MkIcon name="icon_add_outlined" />添加成员 </el-button >
99+ <el-button type =" primary" v-if =" perm.system.role .addMember()" @click =" handleOpenAddMemberDrawer" > <MkIcon name="icon_add_outlined" />添加成员 </el-button >
100100 </div >
101101
102102 <MkComplexSearch :fields =" searchFields " @change =" handleSearch " />
@@ -117,13 +117,13 @@ watch(
117117 <el-table-column v-if =" currentRole.type !== ROLE_TYPE.ADMIN" prop =" workspace_name" label =" 工作空间" min-width =" 180" show-overflow-tooltip />
118118 <el-table-column label =" 操作" width =" 70" fixed =" right" >
119119 <template #default =" { row } " >
120- <MkTooltip content="移除" placement="top">
121- <el-button v-if = " perm.system.workspace.removeMember() " type =" primary" text @click =" handleRemoveMember(row)" ><MkIcon name="icon_assigned_outlined" /></el-button >
120+ <MkTooltip content="移除" placement="top" v-if = " perm . system . role . removeMember () " >
121+ <el-button type =" primary" text @click =" handleRemoveMember(row)" ><MkIcon name="icon_assigned_outlined" /></el-button >
122122 </MkTooltip >
123123 </template >
124124 </el-table-column >
125125 <template #footer-batch-actions >
126- <el-button v-if =" perm.system.workspace .removeMember()" type =" danger" plain @click =" handleBatchDelete" >移除</el-button >
126+ <el-button v-if =" perm.system.role .removeMember()" type =" danger" plain @click =" handleBatchDelete" >移除</el-button >
127127 </template >
128128 </MkTable >
129129 </div >
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ onMounted(() => loadSystemUsers())
212212 <span @click.stop >
213213 <el-switch
214214 v-model =" row.is_active"
215- :disabled =" row.role === ROLE_TYPE.ADMIN || row.id === user.userInfo?.id"
215+ :disabled =" row.role === ROLE_TYPE.ADMIN || row.id === user.userInfo?.id || !perm.system.user.edit() "
216216 :before-change =" () => handleChangeStatus(row)"
217217 size =" small"
218218 class =" mr-3"
@@ -222,16 +222,16 @@ onMounted(() => loadSystemUsers())
222222
223223 <div class =" flex" >
224224 <!-- 编辑 -->
225- <MkTooltip content="编辑" placement="top">
226- <el-button v-if = " perm.system.user.edit() " type =" primary" text @click.stop =" handleOpenUserFormDrawer(row)" >
225+ <MkTooltip content="编辑" placement="top" v-if = " perm . system . user . edit () " >
226+ <el-button type =" primary" text @click.stop =" handleOpenUserFormDrawer(row)" >
227227 <MkIcon name="icon_edit_outlined" />
228228 </el-button >
229229 </MkTooltip >
230230 <!-- 修改用户密码 -->
231231 <ButtonChangeUserPassword :user =" row " @refresh =" loadSystemUsers (false )" />
232232 <!-- 删除 -->
233- <MkTooltip content="删除" placement="top">
234- <el-button v-if = " perm.system.user.delete() " type =" primary" text @click.stop =" deleteUser(row)" >
233+ <MkTooltip content="删除" placement="top" v-if = " perm . system . user . delete () " >
234+ <el-button type =" primary" text @click.stop =" deleteUser(row)" >
235235 <MkIcon name="icon_delete-trash_outlined" />
236236 </el-button >
237237 </MkTooltip >
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ onMounted(() => loadWorkspaceOptions())
177177 <component :is =" Header" >
178178 <h4 >{{ title }}</h4 >
179179 <!-- 创建工作空间 -->
180- <MkTooltip content="创建工作空间" placement="top">
181- <el-button v-if = " perm.system.workspace.create() " text type =" primary" class =" -mr-1" @click =" handleOpenWorkspaceDialog()" >
180+ <MkTooltip content="创建工作空间" placement="top" v-if = " perm . system . workspace . create () " >
181+ <el-button text type =" primary" class =" -mr-1" @click =" handleOpenWorkspaceDialog()" >
182182 <MkIcon name="icon_add_outlined" :size =" 18 " />
183183 </el-button >
184184 </MkTooltip >
@@ -248,8 +248,8 @@ onMounted(() => loadWorkspaceOptions())
248248 <el-table-column label =" 操作" width =" 70" fixed =" right" >
249249 <template #default =" { row } " >
250250 <!-- 移除成员 -->
251- <MkTooltip content="移除" placement="top">
252- <el-button v-if = " perm.system.workspace.removeMember() " type =" primary" text @click =" handleRemoveMember(row)" >
251+ <MkTooltip content="移除" placement="top" v-if = " perm . system . workspace . removeMember () " >
252+ <el-button type =" primary" text @click =" handleRemoveMember(row)" >
253253 <MkIcon name="icon_assigned_outlined" />
254254 </el-button >
255255 </MkTooltip >
You can’t perform that action at this time.
0 commit comments