系统管理权限
This commit is contained in:
parent
184ca551ce
commit
2fa8d3adb5
@ -2,7 +2,7 @@
|
|||||||
<div class="menu-index">
|
<div class="menu-index">
|
||||||
<el-card :bordered="false" class="pt-3 mb-3 proCard">
|
<el-card :bordered="false" class="pt-3 mb-3 proCard">
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleAdd()">
|
<el-button type="primary" @click="handleAdd()" v-perm="['sys:dept:add']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<plus />
|
<plus />
|
||||||
@ -32,13 +32,13 @@
|
|||||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link
|
<el-button type="primary" link
|
||||||
@click="handleAdd(row.id)">
|
@click="handleAdd(row.id)" v-perm="['sys:dept:addz']">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" link @click="handleEdit(row)">
|
<el-button type="primary" link @click="handleEdit(row)" v-perm="['sys:dept:update']">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" link @click="handleDelete(row.id)">
|
<el-button type="danger" link @click="handleDelete(row.id)" v-perm="['sys:dept:delete']">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
>
|
>
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<el-space>
|
<el-space>
|
||||||
<el-button type="primary" @click="handleAdd">
|
<el-button type="primary" @click="handleAdd" v-perm="['sys:level:add']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<PlusOutlined />
|
<PlusOutlined />
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</template>
|
</template>
|
||||||
添加职级
|
添加职级
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:level:batchDelete']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -39,6 +39,7 @@
|
|||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
|
v-perm="['sys:level:import']"
|
||||||
>
|
>
|
||||||
<el-button type="danger">
|
<el-button type="danger">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@ -49,7 +50,7 @@
|
|||||||
导入
|
导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button type="danger" @click="handleExport" :loading="exportLoading" :disabled="exportLoading">
|
<el-button type="danger" @click="handleExport" :loading="exportLoading" :disabled="exportLoading" v-perm="['sys:level:export']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Download />
|
<Download />
|
||||||
@ -113,21 +114,14 @@
|
|||||||
label: '编辑',
|
label: '编辑',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleEdit.bind(null, record),
|
||||||
ifShow: () => {
|
auth: ['sys:level:update'],
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// auth: ['basic_list'],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
|
||||||
ifShow: () => {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||||
// auth: ['basic_list'],
|
auth: ['sys:level:delete'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
>
|
>
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:loginlog:batchDelete']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -77,12 +77,7 @@ const editVisible=ref(false)
|
|||||||
label: '删除',
|
label: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
auth: ['sys:loginlog:delete'],
|
||||||
ifShow: () => {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
|
||||||
// auth: ['basic_list'],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
>
|
>
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:operlog:batchDelete']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -77,12 +77,7 @@ const editVisible=ref(false)
|
|||||||
label: '删除',
|
label: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
auth: ['sys:operlog:delete'],
|
||||||
ifShow: () => {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
|
||||||
// auth: ['basic_list'],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="menu-index">
|
<div class="menu-index">
|
||||||
<el-card :bordered="false" class="pt-3 mb-3 proCard">
|
<el-card :bordered="false" class="pt-3 mb-3 proCard">
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleAdd()">
|
<el-button type="primary" @click="handleAdd()" v-perm="['sys:menu:add']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<plus />
|
<plus />
|
||||||
@ -40,13 +40,13 @@
|
|||||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-if="row.type !== 1" type="primary" link
|
<el-button v-if="row.type !== 1" type="primary" link
|
||||||
@click="handleAdd(row.id)">
|
@click="handleAdd(row.id)" v-perm="['sys:menu:addz']">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" link @click="handleEdit(row)">
|
<el-button type="primary" link @click="handleEdit(row)" v-perm="['sys:menu:update']">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" link @click="handleDelete(row.id)">
|
<el-button type="danger" link @click="handleDelete(row.id)" v-perm="['sys:menu:delete']">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
>
|
>
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<el-button type="primary" @click="handleAdd">
|
<el-button type="primary" @click="handleAdd" v-perm="['sys:position:add']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<PlusOutlined />
|
<PlusOutlined />
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</template>
|
</template>
|
||||||
添加岗位
|
添加岗位
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:position:batchDelete']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -77,21 +77,13 @@ const selectionData = ref([])
|
|||||||
label: '编辑',
|
label: '编辑',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleEdit.bind(null, record),
|
||||||
ifShow: () => {
|
auth: ['sys:position:update'],
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// auth: ['basic_list'],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
auth: ['sys:position:delete'],
|
||||||
ifShow: () => {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
|
||||||
// auth: ['basic_list'],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
>
|
>
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<el-button type="primary" @click="handleAdd">
|
<el-button type="primary" @click="handleAdd" v-perm="['sys:role:add']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<PlusOutlined />
|
<PlusOutlined />
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</template>
|
</template>
|
||||||
添加角色
|
添加角色
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:role:batchDelete']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -88,32 +88,21 @@ const authVisible=ref(false)
|
|||||||
label: '分配权限',
|
label: '分配权限',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClick: handleAuth.bind(null, record),
|
onClick: handleAuth.bind(null, record),
|
||||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
|
||||||
ifShow: () => {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||||
// auth: ['basic_list'],
|
auth: ['sys:role:savePermission'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleEdit.bind(null, record),
|
||||||
ifShow: () => {
|
auth: ['sys:role:update'],
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// auth: ['basic_list'],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
|
||||||
ifShow: () => {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||||
// auth: ['basic_list'],
|
auth: ['sys:role:delete'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
>
|
>
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<el-space>
|
<el-space>
|
||||||
<el-button type="primary" @click="addTenant">
|
<el-button type="primary" @click="addTenant" v-perm="['sys:tenant:add']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon style="vertical-align: middle">
|
<el-icon style="vertical-align: middle">
|
||||||
<plus />
|
<plus />
|
||||||
@ -29,7 +29,7 @@
|
|||||||
新建
|
新建
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:tenant:batchDelete']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -86,26 +86,15 @@
|
|||||||
label: '删除',
|
label: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
|
auth:['sys:tenant:delete']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleEdit.bind(null, record),
|
||||||
|
auth:['sys:tenant:update']
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// dropDownActions: [
|
|
||||||
// {
|
|
||||||
// label: '启用',
|
|
||||||
// key: 'enabled',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '禁用',
|
|
||||||
// key: 'disabled',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// select: (key) => {
|
|
||||||
// ElMessage.info(`您点击了,${key} 按钮`);
|
|
||||||
// },
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
>
|
>
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<el-space>
|
<el-space>
|
||||||
<el-button type="primary" @click="addUser">
|
<el-button type="primary" @click="addUser" v-perm="['sys:user:add']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon style="vertical-align: middle">
|
<el-icon style="vertical-align: middle">
|
||||||
<plus />
|
<plus />
|
||||||
@ -29,7 +29,7 @@
|
|||||||
新建
|
新建
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:user:batchDelete']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Delete />
|
<Delete />
|
||||||
@ -46,6 +46,7 @@
|
|||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
|
v-perm="['sys:user:import']"
|
||||||
>
|
>
|
||||||
<el-button type="danger">
|
<el-button type="danger">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@ -56,7 +57,7 @@
|
|||||||
导入
|
导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button type="danger" @click="handleExport" :loading="exportLoading" :disabled="exportLoading">
|
<el-button type="danger" @click="handleExport" :loading="exportLoading" :disabled="exportLoading" v-perm="['sys:user:export']">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
<Download />
|
<Download />
|
||||||
@ -121,16 +122,19 @@
|
|||||||
label: '删除',
|
label: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
|
auth:['sys:user:delete']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleEdit.bind(null, record),
|
||||||
|
auth:['sys:user:update']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '重置密码',
|
label: '重置密码',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
onClick: handleResetPassWord.bind(null, record),
|
onClick: handleResetPassWord.bind(null, record),
|
||||||
|
auth:['sys:user:resetPwd']
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// dropDownActions: [
|
// dropDownActions: [
|
||||||
|
Loading…
Reference in New Issue
Block a user