Merge pull request #9895 from dataease/pr@dev@fix_auth

Pr@dev@fix auth
This commit is contained in:
王嘉豪 2024-05-28 09:53:57 +08:00 committed by GitHub
commit 762285d5f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View File

@ -159,7 +159,7 @@ public class PanelGroupService {
panelGroupRequest.setUserId(userId);
panelGroupRequest.setIsAdmin(AuthUtils.getUser().getIsAdmin());
List<PanelGroupDTO> panelGroupDTOList = extPanelGroupMapper.panelGroupList(panelGroupRequest);
return TreeUtils.mergeTree(panelGroupDTOList, "panel_list");
return TreeUtils.mergeTree(panelGroupDTOList, "0");
}
public List<PanelGroupDTO> defaultTree(PanelGroupRequest panelGroupRequest) {

View File

@ -62,7 +62,6 @@
:is-relation="isRelation"
:element="element"
:in-draw="inDraw"
:in-screen="inScreen"
@filter-loaded="filterLoaded"
/>
</div>

View File

@ -201,7 +201,8 @@
<span class="header-title">
{{ $t('panel.panel_list') }}
<el-button
style="float: right; padding-right: 7px; margin-top: -8px"
v-if="hasDataPermission('manage', rootAuth)"
style="float: right; padding-right: 7px; margin-top: -8px; height: 12px"
icon="el-icon-plus"
type="text"
@click="showEditPanel(newFolder)"
@ -534,6 +535,7 @@ export default {
mixins: [msgCfm],
data() {
return {
rootAuth: '',
originResourceTree: [],
curSortType: 'time_desc',
localSortParams: null,
@ -993,9 +995,11 @@ export default {
this.sortTypeChange(this.localSortParams)
}
groupTree(this.groupForm, !userCache).then((res) => {
localStorage.setItem('panel-main-tree', JSON.stringify(res.data || []))
this.rootAuth = res.data ? res.data[0]?.privileges||'':''
const resMainData = res.data ? res.data[0]?.children || [] : []
localStorage.setItem('panel-main-tree', JSON.stringify(resMainData))
if (!userCache) {
this.originResourceTree = res.data || []
this.originResourceTree = resMainData
this.sortTypeChange(this.localSortParams)
}
if (this.responseSource === 'appApply') {