小组权限阶段调整

This commit is contained in:
anhc 2022-07-10 21:37:26 +08:00
parent 44383ccafe
commit 3fea38acb4

View File

@ -1,11 +1,11 @@
<template> <template>
<el-container id="repositoryMain" style="overflow: hidden;"> <el-container id="repositoryMain" style="overflow: hidden;">
<el-header v-if="!havingWritePerm" :height="headerHeight2"> <el-header v-if="!havingWritePerm || havingCreatePerm" :height="headerHeight2">
</el-header> </el-header>
<el-header v-if="havingWritePerm" :height="headerHeight1"> <el-header v-if="havingWritePerm || havingCreatePerm" :height="headerHeight1">
<div style="margin: 12px 0px 10px;text-align: center;"> <div style="margin: 12px 0px 10px;text-align: center;">
<el-popover <el-popover
v-if="havingWritePerm" v-if="havingWritePerm || havingCreatePerm"
placement="bottom" placement="bottom"
width="280" width="280"
trigger="click" trigger="click"
@ -74,7 +74,7 @@
</awsui-button> </awsui-button>
</el-popover> </el-popover>
</div> </div>
<div v-if="havingWritePerm" style="width: 100%;border-bottom: 1px solid #F2F2F2;"></div> <div v-if="havingWritePerm || havingCreatePerm" style="width: 100%;border-bottom: 1px solid #F2F2F2;"></div>
</el-header> </el-header>
<el-main class="main-tree" :style="{'overflow': 'auto', 'height': treeHeight}"> <el-main class="main-tree" :style="{'overflow': 'auto', 'height': treeHeight}">
<el-tree <el-tree
@ -197,7 +197,7 @@
dis: false, dis: false,
headerHeight1: '60px', headerHeight1: '60px',
headerHeight2: '10px', headerHeight2: '10px',
treeHeight: (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px', treeHeight: (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm || this.havingCreatePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px',
fileMethodList: [], fileMethodList: [],
folderMethodList: [], folderMethodList: [],
createDesignerVisible: false, createDesignerVisible: false,
@ -264,6 +264,9 @@
havingRemovePerm: false, havingRemovePerm: false,
havingVersionManagePerm: false, havingVersionManagePerm: false,
validUserPermDataCount: 0, validUserPermDataCount: 0,
isOlderVersion:true,
havingCreatePerm:false,
havingBatchPerm:false,
isHighSecurity: false, isHighSecurity: false,
securityList: {}, securityList: {},
securityVisible: false, securityVisible: false,
@ -312,11 +315,15 @@
that.validUserPermDataCount = ro.data.validUserPermDataCount; that.validUserPermDataCount = ro.data.validUserPermDataCount;
if (that.validUserPermDataCount > 0) { if (that.validUserPermDataCount > 0) {
that.havingWritePerm = ro.data.havingWritePerm; that.havingWritePerm = ro.data.havingWritePerm;
that.havingCreatePerm = ro.data.havingCreatePerm
} else { } else {
that.havingWritePerm = false; that.havingWritePerm = false;
that.havingCreatePerm = false;
} }
that.havingRemovePerm = ro.data.havingRemovePerm; that.havingRemovePerm = ro.data.havingRemovePerm;
that.havingVersionManagePerm = ro.data.havingVersionManagePerm; that.havingVersionManagePerm = ro.data.havingVersionManagePerm;
that.havingBatchPerm = ro.data.havingBatchPerm;
that.isOlderVersion = ro.data.isOlderVersion;
that.initTreeHeight(); that.initTreeHeight();
}).catch(error => { }).catch(error => {
console.log(error); console.log(error);
@ -828,7 +835,7 @@
}, },
initTreeHeight() { initTreeHeight() {
this.treeHeight = (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px'; this.treeHeight = (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm || this.havingCreatePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px';
}, },
getIsHighSecurity(){ getIsHighSecurity(){
return this.isHighSecurity; return this.isHighSecurity;