浏览代码

feat: 系统角色排查

luoyali 10 月之前
父节点
当前提交
8bdec8feda
共有 1 个文件被更改,包括 37 次插入41 次删除
  1. 37 41
      src/views/setting/role/index.vue

+ 37 - 41
src/views/setting/role/index.vue

@@ -14,19 +14,9 @@
 				:columns="activeColumns"
 			>
 				<template #toolLeft>
-					<el-button type="primary" @click="addHandler">
-						<el-icon class="btn-icon">
-							<Plus />
-						</el-icon>
-					</el-button>
-					<el-button type="danger" :disabled="curSelectionRows.length === 0" @click="batch_del">
-						<el-icon class="btn-icon">
-							<Delete />
-						</el-icon>
-					</el-button>
-					<el-button type="primary" plain :disabled="!curSelectionRows.length || curSelectionRows.length !== 1" @click="visiblePermission = true"
-						>权限设置
-					</el-button>
+					<el-button plain :icon="Plus" @click="addHandler" type="primary">新增</el-button>
+					<el-button plain :icon="Key" :disabled="!curSelectionRows.length || curSelectionRows.length !== 1" @click="visiblePermission = true">权限设置</el-button>
+					<el-button plain :icon="Delete" :disabled="curSelectionRows.length === 0" @click="batch_del" type="danger">删除</el-button>
 				</template>
 
 				<template #statusSlot="scope">
@@ -68,7 +58,7 @@ import role from '@/api/system/role'
 import { computed, nextTick, ref, watch } from 'vue'
 import { ElMessage, ElMessageBox, ElTree } from 'element-plus'
 import { useTablePage } from '@/hooks/useTablePage'
-import { Plus, Delete } from '@element-plus/icons-vue'
+import { Plus, Delete, Key } from '@element-plus/icons-vue'
 import Permission from './permission.vue'
 
 const visible = ref(false) // 弹窗显示隐藏
@@ -126,16 +116,22 @@ const treeRef = ref<InstanceType<typeof ElTree>>()
 // 表格搜索条件
 const forms = ref([
 	{
-		prop: 'keyword',
+		prop: 'name',
 		label: '角色名称:',
 		itemType: 'input',
 		placeholder: '请输入角色名称'
 	},
+	{
+		prop: 'alias',
+		label: '权限字符:',
+		itemType: 'input',
+		placeholder: '请输入权限字符'
+	},
 	{
 		prop: 'status',
-		label: '状态:',
+		label: '角色状态:',
 		itemType: 'select',
-		placeholder: '请选择状态',
+		placeholder: '请选择角色状态',
 		options: [
 			{
 				label: '禁用',
@@ -174,22 +170,9 @@ const columns = [
 		label: '角色名称',
 		minWidth: 80
 	},
-	{
-		prop: 'status',
-		label: '状态',
-		minWidth: 50,
-		slots: {
-			default: 'statusSlot'
-		}
-	},
 	{
 		prop: 'alias',
-		label: '别名',
-		minWidth: 100
-	},
-	{
-		prop: 'remark',
-		label: '备注',
+		label: '权限字符',
 		minWidth: 100
 	},
 	{
@@ -198,20 +181,33 @@ const columns = [
 		minWidth: 80
 	},
 	{
-		prop: 'updateBy',
-		label: '修改人',
-		minWidth: 100
-	},
-	{
-		prop: 'updateTime',
-		label: '修改时间',
-		minWidth: 126
+		prop: 'status',
+		label: '角色状态',
+		minWidth: 50,
+		slots: {
+			default: 'statusSlot'
+		}
 	},
 	{
-		prop: 'createBy',
-		label: '创建人',
+		prop: 'remark',
+		label: '备注',
 		minWidth: 100
 	},
+	// {
+	// 	prop: 'updateBy',
+	// 	label: '修改人',
+	// 	minWidth: 100
+	// },
+	// {
+	// 	prop: 'updateTime',
+	// 	label: '修改时间',
+	// 	minWidth: 126
+	// },
+	// {
+	// 	prop: 'createBy',
+	// 	label: '创建人',
+	// 	minWidth: 100
+	// },
 	{
 		prop: 'createTime',
 		label: '创建时间',