Merge branch 'main' of github.com:dataease/dataease into main

This commit is contained in:
taojinlong 2021-05-26 12:33:02 +08:00
commit 56ad6efc61
5 changed files with 24 additions and 37 deletions

View File

@ -14,6 +14,10 @@ public class SystemConstants {
}
public static final class PRIVILEGE_VALUE{
public final static Integer ON = 1;
public final static Integer OFF = 0;
}
}

View File

@ -91,14 +91,13 @@ public class SysAuthService {
});
});
// 授权修改
extSysAuthDetailMapper.authDetailsChange(sysAuthDetail.getPrivilegeValue(),sysAuthDetail.getPrivilegeType(),authIdChange);
// if(sysAuthDetail.getPrivilegeValue()==SystemConstants.PRIVILEGE_VALUE_ON){
// //当前为开启1 >>> 关闭0 需要将权限级别PrivilegeType大于当前级别的全新都修改为关闭 0
// extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_OFF,sysAuthDetail.getPrivilegeType(),authIdChange);
// }else{
// //当前为关闭0 >>> 开启1 需要将权限级别PrivilegeType小于当前级别的全新都修改为开启 1
// extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_ON,sysAuthDetail.getPrivilegeType(),authIdChange);
// }
if(sysAuthDetail.getPrivilegeValue()==SystemConstants.PRIVILEGE_VALUE.ON){
//当前为开启1 >>> 关闭0 需要将权限级别PrivilegeType大于当前级别的全新都修改为关闭 0
extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE.OFF,sysAuthDetail.getPrivilegeType(),authIdChange);
}else{
//当前为关闭0 >>> 开启1 需要将权限级别PrivilegeType小于当前级别的全新都修改为开启 1
extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE.ON,sysAuthDetail.getPrivilegeType(),authIdChange);
}
}
}

View File

@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1620789091905" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11831" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M295.424 831.36512l450.56 0c11.30496 0 20.48-9.17504 20.48-20.48l0-350.4128c0-11.30496-9.17504-20.48-20.48-20.48l-9.70752 0c0-21.0944 0-50.95424 0-51.36384-1.26976-117.248-97.95584-212.62336-215.552-212.62336-117.94432 0-214.6304 95.66208-215.57248 213.4016l0 50.5856-9.70752 0c-11.30496 0-20.48 9.17504-20.48 20.48l0 350.4128C274.944 822.19008 284.09856 831.36512 295.424 831.36512zM725.504 790.40512l-409.6 0 0-309.4528 409.6 0L725.504 790.40512zM346.09152 389.57056c0.75776-95.17056 79.07328-172.60544 174.61248-172.60544 95.25248 0 173.58848 77.2096 174.592 172.01152 0 1.3312 0 30.35136 0 51.01568L346.07104 439.99232 346.09152 389.57056z" p-id="11832"></path><path d="M476.01664 721.69472c0 11.30496 9.17504 20.48 20.48 20.48l48.37376 0c11.30496 0 20.48-9.17504 20.48-20.48l0-66.17088c16.6912-13.37344 26.64448-33.56672 26.64448-55.1936 0-39.23968-31.98976-71.168-71.31136-71.168s-71.31136 31.92832-71.31136 71.168c0 21.62688 9.95328 41.82016 26.64448 55.1936L476.01664 721.69472zM520.704 570.14272c16.73216 0 30.35136 13.55776 30.35136 30.208 0 10.87488-6.10304 20.97152-15.95392 26.3168-6.59456 3.584-10.69056 10.48576-10.69056 17.98144l0 56.56576-7.41376 0 0-56.56576c0-7.49568-4.096-14.41792-10.69056-17.98144-9.8304-5.34528-15.95392-15.44192-15.95392-26.3168C490.33216 583.68 503.95136 570.14272 520.704 570.14272z" p-id="11833"></path></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622003025732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7043" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M810.666667 213.333333l0 597.333333L213.333333 810.666667 213.333333 213.333333 810.666667 213.333333M810.666667 128 213.333333 128C166.4 128 128 166.4 128 213.333333l0 597.333333c0 46.933333 38.4 85.333333 85.333333 85.333333l597.333333 0c46.933333 0 85.333333-38.4 85.333333-85.333333L896 213.333333C896 166.4 857.6 128 810.666667 128L810.666667 128z" p-id="7044" fill="#bfbfbf"></path></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 771 B

View File

@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1620789052806" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11539" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M476.01664 721.69472c0 11.30496 9.17504 20.48 20.48 20.48l48.37376 0c11.30496 0 20.48-9.17504 20.48-20.48l0-66.17088c16.6912-13.37344 26.64448-33.56672 26.64448-55.1936 0-39.23968-31.98976-71.168-71.31136-71.168s-71.31136 31.92832-71.31136 71.168c0 21.62688 9.95328 41.82016 26.64448 55.1936L476.01664 721.69472zM520.704 570.14272c16.73216 0 30.35136 13.55776 30.35136 30.208 0 10.87488-6.10304 20.97152-15.95392 26.3168-6.59456 3.584-10.69056 10.48576-10.69056 17.98144l0 56.56576-7.41376 0 0-56.56576c0-7.49568-4.096-14.41792-10.69056-17.98144-9.8304-5.34528-15.95392-15.44192-15.95392-26.3168C490.33216 583.68 503.95136 570.14272 520.704 570.14272z" p-id="11540" fill="#1296db"></path><path d="M295.424 831.22176l450.56 0c11.30496 0 20.48-9.17504 20.48-20.48L766.464 463.72864c0-11.30496-9.17504-20.48-20.48-20.48L338.1248 443.24864c-20.7872-61.56288-5.2224-129.59744 41.69728-175.9232 67.42016-66.53952 177.664-67.11296 245.71904-1.37216 1.47456 1.4336 50.72896 50.05312 50.72896 50.05312l28.7744-29.16352c0 0-50.50368-49.84832-50.97472-50.29888-83.98848-81.16224-219.91424-80.42496-303.0016 1.6384-54.84544 54.14912-75.48928 132.34176-56.0128 205.12768-11.12064 0.2048-20.09088 9.23648-20.09088 20.39808l0 347.01312C274.944 822.04672 284.09856 831.22176 295.424 831.22176zM725.504 790.26176l-409.6 0L315.904 484.20864l409.6 0L725.504 790.26176z" p-id="11541" fill="#1296db"></path></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622002928181" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6752" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M810.666667 128H213.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333v597.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h597.333334c46.933333 0 85.333333-38.4 85.333333-85.333333V213.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z m-384 597.333333l-213.333334-213.333333 59.733334-59.733333 153.6 153.6 324.266666-324.266667L810.666667 341.333333l-384 384z" p-id="6753" fill="#0a7be0"></path></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 794 B

View File

@ -18,23 +18,26 @@
@node-click="nodeClick"
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span style="display: flex; flex: 1 1 0%; width: 0px;">
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" v-html="data.name" />
<span>
<span style="margin-left: 6px" v-html="data.name" />
</span>
<span v-if="showExtent" @click.stop>
<div v-if="authReady && authDetails[data.id]">
<div v-if="authDetails[data.id]">
<span v-for="auth in authDetails[data.id]" :key="auth.privilegeType" class="auth-span">
<!-- 1-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
<el-switch v-model="auth.privilegeValue" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="clickAuth(data.id,auth)" />
<a href="javascript:;" @click="clickAuth(data.id,auth)">
<svg-icon style="width: 22px;height: 22px" :icon-class="auth.privilegeValue===1?'lock_open':'lock_closed'" />
</a>
</span>
</div>
<div v-else>
<span v-for="auth in defaultAuthDetails" :key="auth.privilegeType" class="auth-span">
<!--2-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
<el-switch v-model="auth.privilegeValue" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="clickAuth(data.id,auth)" />
<a href="javascript:;" @click="clickAuth(data.id,auth)">
<svg-icon style="width: 22px;height: 22px" :icon-class="auth.privilegeValue===1?'lock_open':'lock_closed'" />
</a>
</span>
</div>
</span>
</div></span>
</span>
</el-tree>
</el-row>
@ -91,8 +94,6 @@ export default {
},
authDetails: {},
defaultAuthDetails: [],
// authDetails authDetails[id]
authReady: false,
searchStatus: false, //
// ID authTarget
loadedNodeIds: new Set()
@ -133,7 +134,6 @@ export default {
loadAuth() {
if (this.authCondition && this.showExtent) {
debugger
this.authReady = false
let authQueryCondition = {}
if (this.dataInfo.direction === 'source') {
// authTarget authSource
@ -149,7 +149,6 @@ export default {
}
authDetails(authQueryCondition).then(res => {
this.authDetails = res.data
this.authReady = true
})
}
},
@ -253,7 +252,6 @@ export default {
}
}
authChange(authChangeCondition).then(res => {
this.authDetails = res.data
//
this.loadAuth()
})
@ -283,9 +281,8 @@ export default {
padding-left: 8px;
}
.tree-main{
height: calc(100vh - 206px);
height: 100vh;
border: 1px solid #e6e6e6;
overflow-y: auto;
}
.tree-head{
height: 30px;
@ -305,17 +302,4 @@ export default {
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>