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