|
@@ -3,15 +3,25 @@
|
|
|
<ProTable ref="proTableRef" title="参数配置" row-key="roleId" :columns="columns" :search-columns="searchColumns" :request-api="getTableList">
|
|
|
<!-- 表格 header 按钮 -->
|
|
|
<template #tableHeader="scope">
|
|
|
- <el-button type="primary" icon="CirclePlus" @click="openDrawer('新增')"> 新增 </el-button>
|
|
|
- <el-button type="danger" icon="Delete" plain :disabled="!scope.isSelected" @click="batchDelete(scope.selectedListIds)"> 批量删除 </el-button>
|
|
|
+ <el-button type="primary" icon="CirclePlus" v-auth="['system:role:add']" @click="openDrawer('新增')"> 新增 </el-button>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ icon="Delete"
|
|
|
+ v-auth="['system:role:delete']"
|
|
|
+ plain
|
|
|
+ :disabled="!scope.isSelected"
|
|
|
+ @click="batchDelete(scope.selectedListIds)">
|
|
|
+ 批量删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
|
|
|
<template #operation="{ row }">
|
|
|
<div class="operation-group">
|
|
|
- <el-button type="primary" link icon="EditPen" v-auth="[]" @click="openDrawer('编辑', row)"> 编辑 </el-button>
|
|
|
- <el-button v-if="row.isLock !== '1'" type="primary" link icon="Delete" @click="deleteRow(row)"> 删除 </el-button>
|
|
|
- <div class="group" v-if="row.isLock !== '1'">
|
|
|
+ <el-button type="primary" link icon="EditPen" v-auth="['system:role:edit']" @click="openDrawer('编辑', row)"> 编辑 </el-button>
|
|
|
+ <el-button v-if="row.isLock !== '1'" type="primary" link icon="Delete" v-auth="['system:role:delete']" @click="deleteRow(row)">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ <div class="group" v-if="row.isLock !== '1' && userStore.user.userId === '1'">
|
|
|
<el-dropdown trigger="click">
|
|
|
<el-button type="primary" link icon="DArrowRight"> 授权 </el-button>
|
|
|
<template #dropdown>
|
|
@@ -38,7 +48,9 @@ import { ColumnProps, ProTableInstance, SearchProps } from '@/components/ProTabl
|
|
|
import { useDictOptions, useHandleData } from '@/hooks'
|
|
|
import { RoleBO, RoleQuery, RoleVO } from '@/api/interface/system/role'
|
|
|
import PermissionsDrawer from './components/PermissionsDrawer.vue'
|
|
|
+import { useUserStore } from '@/stores'
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
const proTableRef = ref<ProTableInstance>()
|
|
|
|
|
|
// 表格配置项
|