forked from github/dataease
feat(血源关系): 仪表板名称选项增加默认仪表板
This commit is contained in:
parent
1380585e5d
commit
26599611e3
@ -172,7 +172,7 @@ import { listDatasource } from '@/api/dataset/dataset'
|
|||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import GridTable from '@/components/gridTable/index.vue'
|
import GridTable from '@/components/gridTable/index.vue'
|
||||||
import consanguinity from './consanguinity.vue'
|
import consanguinity from './consanguinity.vue'
|
||||||
import { groupTree } from '@/api/panel/panel'
|
import { defaultTree, groupTree } from '@/api/panel/panel'
|
||||||
import { queryAuthModel } from '@/api/authModel/authModel'
|
import { queryAuthModel } from '@/api/authModel/authModel'
|
||||||
import { data } from 'vue2-ace-editor'
|
import { data } from 'vue2-ace-editor'
|
||||||
|
|
||||||
@ -406,12 +406,24 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getPanelGroupList() {
|
getPanelGroupList() {
|
||||||
const form = {
|
return defaultTree({ panelType: 'system' }, true).then((res) => {
|
||||||
panelType: 'self',
|
if (res.data?.length > 0) {
|
||||||
sort: 'create_time desc,node_type desc,name asc'
|
const defaultPanelTree = {
|
||||||
}
|
id: 'defaultPanel',
|
||||||
return groupTree(form, true).then((res) => {
|
name: this.$t('panel.default_panel'),
|
||||||
this.resourceTreeData = res.data
|
nodeType: 'folder',
|
||||||
|
children: res.data
|
||||||
|
}
|
||||||
|
this.resourceTreeData.push(defaultPanelTree)
|
||||||
|
}
|
||||||
|
}).then(() => {
|
||||||
|
const form = {
|
||||||
|
panelType: 'self',
|
||||||
|
sort: 'create_time desc,node_type desc,name asc'
|
||||||
|
}
|
||||||
|
groupTree(form, true).then((res) => {
|
||||||
|
this.resourceTreeData = [...this.resourceTreeData, ...res.data]
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
queryTypeChange(val) {
|
queryTypeChange(val) {
|
||||||
|
Loading…
Reference in New Issue
Block a user