feat:部门权限
This commit is contained in:
1 parent
a333b91947
commit
984ee05179
2 files changed
+13
-22
No files matched your search
@@ -29,7 +29,8 @@
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'sys_dept_add'" @exportExcel="exportExcel"
|
||||
class="ml10" style="float: right; margin-right: 20px" @queryTable="getDataList">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('queryTree.view')" placement="top">
|
||||
<el-button circle icon="Grid" @click="handleView"></el-button>
|
||||
<el-button v-if="!stores.userInfos.roleCodes.includes('DEPT_ADMIN')" circle icon="Grid"
|
||||
@click="handleView" />
|
||||
</el-tooltip>
|
||||
</right-toolbar>
|
||||
</div>
|
||||
@@ -47,11 +48,13 @@
|
||||
<script lang="ts" name="systemDept" setup>
|
||||
import { downBlobFile } from "/@/utils/other"
|
||||
import { useI18n } from "vue-i18n"
|
||||
import { useUserInfo } from "/@/stores/userInfo"
|
||||
|
||||
const TreeView = defineAsyncComponent(() => import("./tree-view.vue"))
|
||||
const TableView = defineAsyncComponent(() => import("./table-view.vue"))
|
||||
|
||||
const { t } = useI18n()
|
||||
const stores = useUserInfo();
|
||||
|
||||
// 默认树视图展示
|
||||
const defaultTreeViewRef = ref(true)
|
||||
|
||||
@@ -1,31 +1,19 @@
|
||||
<template>
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
style="width: 100%"
|
||||
row-key="id"
|
||||
default-expand-all
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle?.headerCellStyle"
|
||||
>
|
||||
<el-table ref="tableRef" :data="state.dataList" v-loading="state.loading" style="width: 100%" row-key="id"
|
||||
default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle?.headerCellStyle">
|
||||
<el-table-column :label="$t('sysdept.name')" prop="name" width="400" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column :label="$t('sysdept.weight')" prop="weight" show-overflow-tooltip width="80"></el-table-column>
|
||||
<el-table-column prop="createTime" :label="$t('sysdept.createTime')" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('common.action')"
|
||||
v-auths="['sys_dept_add', 'sys_dept_edit', 'sys_dept_del']"
|
||||
show-overflow-tooltip
|
||||
width="250"
|
||||
>
|
||||
<el-table-column :label="$t('common.action')" v-auths="['sys_dept_add', 'sys_dept_edit', 'sys_dept_del']"
|
||||
show-overflow-tooltip width="250">
|
||||
<template #default="scope">
|
||||
<el-button text type="primary" icon="folder-add" @click="deptDialogRef.openDialog('add', scope.row?.id)" v-auth="'sys_dept_add'">
|
||||
<el-button text type="primary" icon="folder-add" @click="deptDialogRef.openDialog('add', scope.row?.id)"
|
||||
v-auth="'sys_dept_add'">
|
||||
{{ $t("common.addBtn") }}
|
||||
</el-button>
|
||||
<el-button text type="primary" icon="edit-pen" @click="deptDialogRef.openDialog('edit', scope.row?.id)" v-auth="'sys_dept_edit'"
|
||||
>{{ $t("common.editBtn") }}
|
||||
<el-button text type="primary" icon="edit-pen" @click="deptDialogRef.openDialog('edit', scope.row?.id)"
|
||||
v-auth="'sys_dept_edit'">{{ $t("common.editBtn") }}
|
||||
</el-button>
|
||||
<el-button text type="primary" icon="delete" @click="handleDelete(scope.row)" v-auth="'sys_dept_del'">
|
||||
{{ $t("common.delBtn") }}
|
||||
|
||||
Reference in new issue
Block a user