forked from github/dataease
feat: 1.替换权限样式开关图标
This commit is contained in:
parent
c61f294e01
commit
8c33b8e346
@ -91,13 +91,14 @@ public class SysAuthService {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// 授权修改
|
// 授权修改
|
||||||
if(sysAuthDetail.getPrivilegeValue()==SystemConstants.PRIVILEGE_VALUE_ON){
|
extSysAuthDetailMapper.authDetailsChange(sysAuthDetail.getPrivilegeValue(),sysAuthDetail.getPrivilegeType(),authIdChange);
|
||||||
//当前为开启1 >>> 关闭0 需要将权限级别(PrivilegeType)大于当前级别的全新都修改为关闭 0
|
// if(sysAuthDetail.getPrivilegeValue()==SystemConstants.PRIVILEGE_VALUE_ON){
|
||||||
extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_OFF,sysAuthDetail.getPrivilegeType(),authIdChange);
|
// //当前为开启1 >>> 关闭0 需要将权限级别(PrivilegeType)大于当前级别的全新都修改为关闭 0
|
||||||
}else{
|
// extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_OFF,sysAuthDetail.getPrivilegeType(),authIdChange);
|
||||||
//当前为关闭0 >>> 开启1 需要将权限级别(PrivilegeType)小于当前级别的全新都修改为开启 1
|
// }else{
|
||||||
extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_ON,sysAuthDetail.getPrivilegeType(),authIdChange);
|
// //当前为关闭0 >>> 开启1 需要将权限级别(PrivilegeType)小于当前级别的全新都修改为开启 1
|
||||||
}
|
// extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_ON,sysAuthDetail.getPrivilegeType(),authIdChange);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,5 +475,8 @@ export default {
|
|||||||
.el-main >>> .el-drawer__wrapper{
|
.el-main >>> .el-drawer__wrapper{
|
||||||
width: 310px!important;
|
width: 310px!important;
|
||||||
}
|
}
|
||||||
|
.el-main >>> .el-drawer__body{
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -352,7 +352,7 @@ export default {
|
|||||||
debugger
|
debugger
|
||||||
this.defaultTree()
|
this.defaultTree()
|
||||||
// 默认展开 同时点击 新增的节点
|
// 默认展开 同时点击 新增的节点
|
||||||
if (panelInfo && this.lastActiveNodeData.id) {
|
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
|
||||||
if (!this.lastActiveNodeData.children) {
|
if (!this.lastActiveNodeData.children) {
|
||||||
this.$set(this.lastActiveNodeData, 'children', [])
|
this.$set(this.lastActiveNodeData, 'children', [])
|
||||||
}
|
}
|
||||||
@ -623,7 +623,7 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
document.querySelector('.is-current').firstChild.click()
|
document.querySelector('.is-current').firstChild.click()
|
||||||
// 如果是仪表盘列表的仪表盘 直接进入编辑界面
|
// 如果是仪表盘列表的仪表盘 直接进入编辑界面
|
||||||
if (panelInfo.nodeType === 'panel' && panelInfo.panelType === 'self') {
|
if (panelInfo.nodeType === 'panel') {
|
||||||
this.edit(this.lastActiveNodeData, this.lastActiveNode)
|
this.edit(this.lastActiveNodeData, this.lastActiveNode)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -18,24 +18,20 @@
|
|||||||
@node-click="nodeClick"
|
@node-click="nodeClick"
|
||||||
>
|
>
|
||||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
<span slot-scope="{ node, data }" class="custom-tree-node">
|
||||||
<span>
|
<span style="display: flex; flex: 1 1 0%; width: 0px;">
|
||||||
<span style="margin-left: 6px" v-html="data.name" />
|
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" v-html="data.name" />
|
||||||
</span>
|
</span>
|
||||||
<span v-if="showExtent" @click.stop>
|
<span v-if="showExtent" @click.stop>
|
||||||
<div v-if="authReady && authDetails[data.id]">
|
<div v-if="authReady && authDetails[data.id]">
|
||||||
<span v-for="auth in authDetails[data.id]" :key="auth.privilegeType" class="auth-span">
|
<span v-for="auth in authDetails[data.id]" :key="auth.privilegeType" class="auth-span">
|
||||||
<!-- 1-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
|
<!-- 1-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
|
||||||
<a href="javascript:;" @click="clickAuth(data.id,auth)">
|
<el-switch v-model="auth.privilegeValue" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="clickAuth(data.id,auth)" />
|
||||||
<svg-icon style="width: 22px;height: 22px" :icon-class="auth.privilegeValue===1?'lock_open':'lock_closed'" />
|
|
||||||
</a>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<span v-for="auth in defaultAuthDetails" :key="auth.privilegeType" class="auth-span">
|
<span v-for="auth in defaultAuthDetails" :key="auth.privilegeType" class="auth-span">
|
||||||
<!--2-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
|
<!--2-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
|
||||||
<a href="javascript:;" @click="clickAuth(data.id,auth)">
|
<el-switch v-model="auth.privilegeValue" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="clickAuth(data.id,auth)" />
|
||||||
<svg-icon style="width: 22px;height: 22px" :icon-class="auth.privilegeValue===1?'lock_open':'lock_closed'" />
|
|
||||||
</a>
|
|
||||||
</span>
|
</span>
|
||||||
</div></span>
|
</div></span>
|
||||||
</span>
|
</span>
|
||||||
@ -307,4 +303,17 @@ export default {
|
|||||||
color: #faaa39 !important;
|
color: #faaa39 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
>>>.el-switch__core{
|
||||||
|
width:30px!important;
|
||||||
|
height:13px;
|
||||||
|
/*color:#409EFF;*/
|
||||||
|
}
|
||||||
|
/*设置圆*/
|
||||||
|
>>>.el-switch__core::after{
|
||||||
|
width:13px;
|
||||||
|
height:13px;
|
||||||
|
margin-top:-2px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user