1.菜单和按钮权限范围授权完成;
This commit is contained in:
@@ -47,6 +47,7 @@ class RoleButtonPermissionSerializer(CustomModelSerializer):
|
|||||||
角色按钮权限
|
角色按钮权限
|
||||||
"""
|
"""
|
||||||
isCheck = serializers.SerializerMethodField()
|
isCheck = serializers.SerializerMethodField()
|
||||||
|
data_range = serializers.SerializerMethodField()
|
||||||
|
|
||||||
def get_isCheck(self, instance):
|
def get_isCheck(self, instance):
|
||||||
params = self.request.query_params
|
params = self.request.query_params
|
||||||
@@ -55,9 +56,20 @@ class RoleButtonPermissionSerializer(CustomModelSerializer):
|
|||||||
role__id=params.get('role'),
|
role__id=params.get('role'),
|
||||||
).exists()
|
).exists()
|
||||||
|
|
||||||
|
def get_data_range(self, instance):
|
||||||
|
params = self.request.query_params
|
||||||
|
obj = RoleMenuButtonPermission.objects.filter(
|
||||||
|
menu_button__id=instance['id'],
|
||||||
|
role__id=params.get('role'),
|
||||||
|
).first()
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
return obj.data_range
|
||||||
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = MenuButton
|
model = MenuButton
|
||||||
fields = ['id','name','value','isCheck']
|
fields = ['id','name','value','isCheck','data_range']
|
||||||
|
|
||||||
class RoleMenuPermissionSerializer(CustomModelSerializer):
|
class RoleMenuPermissionSerializer(CustomModelSerializer):
|
||||||
"""
|
"""
|
||||||
@@ -122,7 +134,7 @@ class RoleMenuButtonPermissionViewSet(CustomModelViewSet):
|
|||||||
@action(methods=['PUT'], detail=True, permission_classes=[IsAuthenticated])
|
@action(methods=['PUT'], detail=True, permission_classes=[IsAuthenticated])
|
||||||
def set_role_premission(self,request,pk):
|
def set_role_premission(self,request,pk):
|
||||||
"""
|
"""
|
||||||
对角色授权:
|
对角色的菜单和按钮授权:
|
||||||
:param request:
|
:param request:
|
||||||
:param pk: role
|
:param pk: role
|
||||||
:return:
|
:return:
|
||||||
@@ -137,10 +149,12 @@ class RoleMenuButtonPermissionViewSet(CustomModelViewSet):
|
|||||||
RoleMenuPermission.objects.create(role_id=pk, menu_id=menu.get('id'))
|
RoleMenuPermission.objects.create(role_id=pk, menu_id=menu.get('id'))
|
||||||
for btn in menu.get('btns'):
|
for btn in menu.get('btns'):
|
||||||
if btn.get('isCheck'):
|
if btn.get('isCheck'):
|
||||||
RoleMenuButtonPermission.objects.create(role_id=pk, menu_button_id=btn.get('id'))
|
instance = RoleMenuButtonPermission.objects.create(role_id=pk, menu_button_id=btn.get('id'),data_range=btn.get('data_range'))
|
||||||
|
instance.dept.set(btn.get('dept',[]))
|
||||||
return DetailResponse(msg="授权成功")
|
return DetailResponse(msg="授权成功")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@action(methods=['GET'], detail=False, permission_classes=[IsAuthenticated])
|
@action(methods=['GET'], detail=False, permission_classes=[IsAuthenticated])
|
||||||
def role_menu_get_button(self, request):
|
def role_menu_get_button(self, request):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -45,3 +45,15 @@ export function getDataPermissionMenu() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置按钮的数据范围
|
||||||
|
*/
|
||||||
|
export function setBtnDatarange(roleId:number,data:object) {
|
||||||
|
return request({
|
||||||
|
url: `/api/system/role_menu_button_permission/${roleId}/set_btn_datarange/`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-drawer v-model="drawerVisible" title="权限配置" direction="rtl" size="60%" :close-on-click-modal="false" :before-close="handleDrawerClose">
|
<el-drawer v-model="drawerVisible" title="权限配置" direction="rtl" size="60%" :close-on-click-modal="false"
|
||||||
|
:before-close="handleDrawerClose">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div>当前角色: <el-tag>{{props.roleName}}</el-tag></div>
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div>当前角色:
|
||||||
|
<el-tag>{{ props.roleName }}</el-tag>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" :offset="8">
|
||||||
|
<div>
|
||||||
|
<el-button size="small" type="primary" class="pc-save-btn" @click="handleSavePermission">保存菜单授权
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<div class="permission-com">
|
<div class="permission-com">
|
||||||
<el-button type="primary" class="pc-save-btn" @click="handleSavePermission">保存菜单授权</el-button>
|
|
||||||
|
|
||||||
<el-collapse v-model="collapseCurrent" @change="handleCollapseChange" accordion>
|
<el-collapse v-model="collapseCurrent" @change="handleCollapseChange" accordion>
|
||||||
<el-collapse-item v-for="(item,mIndex) in menuData" :key="mIndex" :name="mIndex">
|
<el-collapse-item v-for="(item,mIndex) in menuData" :key="mIndex" :name="mIndex">
|
||||||
<template #title>
|
<template #title>
|
||||||
@@ -16,20 +27,22 @@
|
|||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</p>
|
</p>
|
||||||
<div v-show="!collapseCurrent.includes(mIndex)">
|
<div v-show="!collapseCurrent.includes(mIndex)">
|
||||||
<el-checkbox v-for="btn in item.btns" :key="btn.value" :label="btn.value" v-model="btn.isCheck">{{ btn.name }}</el-checkbox>
|
<el-checkbox v-for="btn in item.btns" :key="btn.value" :label="btn.value" v-model="btn.isCheck">
|
||||||
|
{{ btn.name }}
|
||||||
|
</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="pc-collapse-main">
|
<div class="pc-collapse-main">
|
||||||
<div class="pccm-item">
|
<div class="pccm-item">
|
||||||
<p>允许对这些数据有以下操作</p>
|
<p>允许对这些数据有以下操作</p>
|
||||||
<el-checkbox v-for="btn in item.btns" :key="btn.value" v-model="btn.isCheck" :label="btn.value">
|
<el-checkbox v-for="(btn,bIndex) in item.btns" :key="bIndex" v-model="btn.isCheck" :label="btn.value">
|
||||||
<p class="btn-item">
|
<div class="btn-item">
|
||||||
{{ btn.role ? `${btn.label}(${btn.role})` : btn.name }}
|
{{ btn.data_range!==null ? `${btn.name}(${formatDataRange(btn.data_range)})` : btn.name }}
|
||||||
<span @click.stop.prevent="handleSettingClick(item, btn.value)">
|
<span v-show="btn.isCheck" @click.stop.prevent="handleSettingClick(item, btn.id)">
|
||||||
<el-icon><Setting /></el-icon>
|
<el-icon><Setting/></el-icon>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</div>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -67,14 +80,15 @@
|
|||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
|
|
||||||
<el-dialog v-model="dialogVisible" title="数据权限配置" width="400px" :close-on-click-modal="false" :before-close="handleDialogClose">
|
<el-dialog v-model="dialogVisible" title="数据权限配置" width="400px" :close-on-click-modal="false"
|
||||||
|
:before-close="handleDialogClose">
|
||||||
<div class="pc-dialog">
|
<div class="pc-dialog">
|
||||||
<el-select v-model="dataPermission" @change="handlePermissionRangeChange" class="dialog-select" placeholder="请选择">
|
<el-select v-model="dataPermission" @change="handlePermissionRangeChange" class="dialog-select"
|
||||||
<el-option v-for="item in dataPermissionRange" :key="item.value" :label="item.label" :value="item.value" />
|
placeholder="请选择">
|
||||||
|
<el-option v-for="item in dataPermissionRange" :key="item.value" :label="item.label" :value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
v-if="dataPermission === 4"
|
v-show="dataPermission === 4"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
v-model="customDataPermission"
|
v-model="customDataPermission"
|
||||||
:props="defaultTreeProps"
|
:props="defaultTreeProps"
|
||||||
@@ -88,8 +102,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleDialogConfirm"> 确定 </el-button>
|
<el-button type="primary" @click="handleDialogConfirm"> 确定</el-button>
|
||||||
<el-button @click="handleDialogClose"> 取消 </el-button>
|
<el-button @click="handleDialogClose"> 取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -98,22 +112,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, defineProps,watch } from 'vue';
|
import {ref, onMounted, defineProps, watch,computed} from 'vue';
|
||||||
import XEUtils from 'xe-utils';
|
import XEUtils from 'xe-utils';
|
||||||
import { errorNotification } from '/@/utils/message';
|
import {errorNotification} from '/@/utils/message';
|
||||||
import {getDataPermissionRange, getDataPermissionDept, getRolePremission,setRolePremission} from './api';
|
import {getDataPermissionRange, getDataPermissionDept, getRolePremission, setRolePremission,setBtnDatarange} from './api';
|
||||||
import { MenuDataType, DataPermissionRangeType, CustomDataPermissionDeptType } from './types';
|
import {MenuDataType, DataPermissionRangeType, CustomDataPermissionDeptType} from './types';
|
||||||
import { ElMessage } from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
const props= defineProps({
|
|
||||||
roleId:{
|
const props = defineProps({
|
||||||
|
roleId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: -1
|
default: -1
|
||||||
},
|
},
|
||||||
roleName:{
|
roleName: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
drawerVisible:{
|
drawerVisible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
@@ -126,68 +141,38 @@ watch(
|
|||||||
(val) => {
|
(val) => {
|
||||||
drawerVisible.value = val;
|
drawerVisible.value = val;
|
||||||
getMenuBtnPermission()
|
getMenuBtnPermission()
|
||||||
|
fetchData()
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const handleDrawerClose = ()=>{
|
const handleDrawerClose = () => {
|
||||||
emit('update:drawerVisible', false);
|
emit('update:drawerVisible', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const defaultTreeProps = {
|
const defaultTreeProps = {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
};
|
};
|
||||||
|
|
||||||
let menuData = ref<MenuDataType[]>([
|
let menuData = ref<MenuDataType[]>([]);
|
||||||
// {
|
|
||||||
// key: '1',
|
|
||||||
// name: '用户管理',
|
|
||||||
// isCheck: true,
|
|
||||||
// radio: '1',
|
|
||||||
// btns: [
|
|
||||||
// { label: '新增', value: 'create', isCheck: true, role: '' },
|
|
||||||
// { label: '编辑', value: 'edit', isCheck: true, role: '' },
|
|
||||||
// { label: '查询', value: 'look', isCheck: true, role: '' },
|
|
||||||
// ],
|
|
||||||
// columns: [
|
|
||||||
// { name: '姓名', create: true, edit: true, delete: true, look: true },
|
|
||||||
// { name: '性别', create: false, edit: true, delete: false, look: true },
|
|
||||||
// { name: '地址', create: true, edit: false, delete: true, look: false },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// key: '2',
|
|
||||||
// name: '系统管理',
|
|
||||||
// isCheck: false,
|
|
||||||
// radio: '2',
|
|
||||||
// btns: [
|
|
||||||
// { label: '新增', value: 'create', isCheck: false, role: '' },
|
|
||||||
// { label: '编辑', value: 'edit', isCheck: true, role: '' },
|
|
||||||
// { label: '删除', value: 'delete', isCheck: false, role: '' },
|
|
||||||
// { label: '查询', value: 'look', isCheck: true, role: '' },
|
|
||||||
// ],
|
|
||||||
// columns: [
|
|
||||||
// { name: '姓名', create: false, edit: true, delete: false, look: true },
|
|
||||||
// { name: '性别', create: true, edit: true, delete: true, look: true },
|
|
||||||
// { name: '地址', create: true, edit: false, delete: true, look: false },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
]);
|
|
||||||
let collapseCurrent = ref(['1']);
|
let collapseCurrent = ref(['1']);
|
||||||
let menuCurrent = ref<Partial<MenuDataType>>({});
|
let menuCurrent = ref<Partial<MenuDataType>>({});
|
||||||
let menuBtnCurrent = ref('');
|
let menuBtnCurrent = ref<number>(-1);
|
||||||
let dialogVisible = ref(false);
|
let dialogVisible = ref(false);
|
||||||
let dataPermissionRange = ref<DataPermissionRangeType[]>([]);
|
let dataPermissionRange = ref<DataPermissionRangeType[]>([]);
|
||||||
|
const formatDataRange = computed(() => {
|
||||||
|
return function(datarange:number){
|
||||||
|
const findItem = dataPermissionRange.value.find((i) => i.value === datarange);
|
||||||
|
return findItem?.label || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
let deptData = ref<CustomDataPermissionDeptType[]>([]);
|
let deptData = ref<CustomDataPermissionDeptType[]>([]);
|
||||||
let dataPermission = ref();
|
let dataPermission = ref();
|
||||||
let customDataPermission = ref([]);
|
let customDataPermission = ref([]);
|
||||||
|
|
||||||
//获取菜单,按钮,权限
|
//获取菜单,按钮,权限
|
||||||
const getMenuBtnPermission = async () => {
|
const getMenuBtnPermission = async () => {
|
||||||
const resMenu = await getRolePremission({role:props.roleId})
|
const resMenu = await getRolePremission({role: props.roleId})
|
||||||
menuData.value = resMenu.data
|
menuData.value = resMenu.data
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,9 +191,14 @@ const handleCollapseChange = (val: string) => {
|
|||||||
collapseCurrent.value = [val];
|
collapseCurrent.value = [val];
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSettingClick = (record: MenuDataType, btnType: string) => {
|
/**
|
||||||
|
* 设置按钮数据权限
|
||||||
|
* @param record 当前菜单
|
||||||
|
* @param btnType 按钮类型
|
||||||
|
*/
|
||||||
|
const handleSettingClick = (record: MenuDataType, btnId: number) => {
|
||||||
menuCurrent.value = record;
|
menuCurrent.value = record;
|
||||||
menuBtnCurrent.value = btnType;
|
menuBtnCurrent.value = btnId;
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -221,11 +211,14 @@ const handleColumnChange = (val: boolean, record: MenuDataType, btnType: string)
|
|||||||
const handlePermissionRangeChange = async (val: number) => {
|
const handlePermissionRangeChange = async (val: number) => {
|
||||||
if (val === 4) {
|
if (val === 4) {
|
||||||
const res = await getDataPermissionDept();
|
const res = await getDataPermissionDept();
|
||||||
const data = XEUtils.toArrayTree(res.data, { parentKey: 'parent', strict: false });
|
const data = XEUtils.toArrayTree(res.data, {parentKey: 'parent', strict: false});
|
||||||
deptData.value = data;
|
deptData.value = data;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据权限设置确认
|
||||||
|
*/
|
||||||
const handleDialogConfirm = () => {
|
const handleDialogConfirm = () => {
|
||||||
if (dataPermission.value !== 0 && !dataPermission.value) {
|
if (dataPermission.value !== 0 && !dataPermission.value) {
|
||||||
errorNotification('请选择');
|
errorNotification('请选择');
|
||||||
@@ -234,11 +227,14 @@ const handleDialogConfirm = () => {
|
|||||||
|
|
||||||
//if (dataPermission.value !== 4) {}
|
//if (dataPermission.value !== 4) {}
|
||||||
for (const iterator of menuData.value) {
|
for (const iterator of menuData.value) {
|
||||||
if (iterator.key === menuCurrent.value.key) {
|
if (iterator.id === menuCurrent.value.id) {
|
||||||
for (const b of iterator.btns) {
|
for (const btn of iterator.btns) {
|
||||||
if (b.value === menuBtnCurrent.value) {
|
if (btn.id === menuBtnCurrent.value) {
|
||||||
const findItem = dataPermissionRange.value.find((i) => i.value === dataPermission.value);
|
const findItem = dataPermissionRange.value.find((i) => i.value === dataPermission.value);
|
||||||
b.role = findItem?.label || '';
|
btn.data_range = findItem?.value || 0;
|
||||||
|
if(btn.data_range===4){
|
||||||
|
btn.dept = customDataPermission.value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,7 +249,7 @@ const handleDialogClose = () => {
|
|||||||
|
|
||||||
//保存权限
|
//保存权限
|
||||||
const handleSavePermission = () => {
|
const handleSavePermission = () => {
|
||||||
setRolePremission(props.roleId, menuData.value).then(res=>{
|
setRolePremission(props.roleId, menuData.value).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -262,8 +258,6 @@ const handleSavePermission = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -271,53 +265,66 @@ onMounted(() => {
|
|||||||
.permission-com {
|
.permission-com {
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.pc-save-btn {
|
.pc-save-btn {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pc-collapse-title {
|
.pc-collapse-title {
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pc-collapse-main {
|
.pc-collapse-main {
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.pccm-item {
|
.pccm-item {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
.btn-item {
|
.btn-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.columns-list {
|
.columns-list {
|
||||||
.width-txt {
|
.width-txt {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.width-check {
|
.width-check {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.width-icon {
|
.width-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.columns-head {
|
.columns-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
border-bottom: 1px solid #ebeef5;
|
border-bottom: 1px solid #ebeef5;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.columns-item {
|
.columns-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.ci-checkout {
|
.ci-checkout {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
@@ -330,6 +337,7 @@ onMounted(() => {
|
|||||||
.dialog-select {
|
.dialog-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-tree {
|
.dialog-tree {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
@@ -344,9 +352,11 @@ onMounted(() => {
|
|||||||
border-top: none;
|
border-top: none;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-collapse-item {
|
.el-collapse-item {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-collapse-item__header {
|
.el-collapse-item__header {
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
@@ -356,10 +366,12 @@ onMounted(() => {
|
|||||||
border-right: 1px solid #ebeef5;
|
border-right: 1px solid #ebeef5;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-collapse-item__header.is-active {
|
.el-collapse-item__header.is-active {
|
||||||
border-radius: 8px 8px 0 0;
|
border-radius: 8px 8px 0 0;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-collapse-item__wrap {
|
.el-collapse-item__wrap {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-left: 1px solid #ebeef5;
|
border-left: 1px solid #ebeef5;
|
||||||
@@ -368,6 +380,7 @@ onMounted(() => {
|
|||||||
border-radius: 0 0 8px 8px;
|
border-radius: 0 0 8px 8px;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.el-collapse-item__content {
|
.el-collapse-item__content {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ export interface CustomDataPermissionMenuType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface MenuDataType {
|
export interface MenuDataType {
|
||||||
key: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
isCheck: boolean;
|
isCheck: boolean;
|
||||||
radio: string;
|
radio: string;
|
||||||
btns: { label: string; value: string; isCheck: boolean; role: string; }[];
|
btns: { id:number,label: string; value: string; isCheck: boolean; data_range: number;dept:object }[];
|
||||||
columns: { [key: string]: boolean | string; }[]
|
columns: { [key: string]: boolean | string; }[]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user