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

This commit is contained in:
taojinlong 2021-05-25 15:32:42 +08:00
commit f151d6a293
6 changed files with 47 additions and 21 deletions

View File

@ -18,6 +18,9 @@
<if test="sceneId != null">
and scene_id = #{sceneId,jdbcType=VARCHAR}
</if>
<if test="mode != null">
and mode = #{mode,jdbcType=INTEGER}
</if>
</where>
<if test="sort != null">
order by ${sort}

View File

@ -91,13 +91,14 @@ public class SysAuthService {
});
});
// 授权修改
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);
}
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);
// }
}
}

View File

@ -1,5 +1,9 @@
<template>
<el-col>
<el-row style="height: 25px;">
<span>{{ table.name }}</span>
</el-row>
<el-divider />
<el-checkbox v-model="checkAll" :disabled="!(fields.length > 0)" :indeterminate="isIndeterminate" @change="handleCheckAllChange">{{ $t('dataset.check_all') }}</el-checkbox>
<el-checkbox-group v-model="checkedFields" @change="handleCheckedFieldsChange">
<el-checkbox v-for="f in fields" :key="f.id" :label="f.id" style="display: block;margin-top: 4px;width: 100%;">
@ -98,5 +102,7 @@ export default {
</script>
<style scoped>
.el-divider--horizontal {
margin: 12px 0
}
</style>

View File

@ -475,5 +475,8 @@ export default {
.el-main >>> .el-drawer__wrapper{
width: 310px!important;
}
.el-main >>> .el-drawer__body{
overflow-y: auto;
}
</style>

View File

@ -352,13 +352,15 @@ export default {
debugger
this.defaultTree()
//
if (panelInfo && this.lastActiveNodeData.id) {
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
if (!this.lastActiveNodeData.children) {
this.$set(this.lastActiveNodeData, 'children', [])
}
this.lastActiveNodeData.children.push(panelInfo)
this.lastActiveNode.expanded = true
this.activeNodeAndClick(panelInfo)
} else {
this.tree(this.groupForm)
}
},
showEditPanel(param) {
@ -623,7 +625,7 @@ export default {
this.$nextTick(() => {
document.querySelector('.is-current').firstChild.click()
//
if (panelInfo.nodeType === 'panel' && panelInfo.panelType === 'self') {
if (panelInfo.nodeType === 'panel') {
this.edit(this.lastActiveNodeData, this.lastActiveNode)
}
})

View File

@ -18,26 +18,23 @@
@node-click="nodeClick"
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span>
<span style="margin-left: 6px" v-html="data.name" />
<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 v-if="showExtent" @click.stop>
<div v-if="authReady && authDetails[data.id]">
<span v-for="auth in authDetails[data.id]" :key="auth.privilegeType" class="auth-span">
<!-- 1-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
<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>
<el-switch v-model="auth.privilegeValue" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="clickAuth(data.id,auth)" />
</span>
</div>
<div v-else>
<span v-for="auth in defaultAuthDetails" :key="auth.privilegeType" class="auth-span">
<!--2-{{ auth.privilegeType }}-{{ auth.privilegeValue }}-->
<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>
<el-switch v-model="auth.privilegeValue" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="clickAuth(data.id,auth)" />
</span>
</div>
</span>
</div></span>
</span>
</el-tree>
</el-row>
@ -286,8 +283,9 @@ export default {
padding-left: 8px;
}
.tree-main{
height: 100vh;
height: calc(100vh - 206px);
border: 1px solid #e6e6e6;
overflow-y: auto;
}
.tree-head{
height: 30px;
@ -307,4 +305,17 @@ 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>