mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-08 12:43:56 +00:00
perf: 优化应用授权列表
This commit is contained in:
parent
8929957fd9
commit
0e665912ff
@ -28,7 +28,7 @@ export default {
|
|||||||
showMenu: false,
|
showMenu: false,
|
||||||
showRefresh: true,
|
showRefresh: true,
|
||||||
showAssets: false,
|
showAssets: false,
|
||||||
treeUrl: '/api/v1/applications/applications/tree/?show_count=0',
|
treeUrl: '/api/v1/applications/applications/tree/',
|
||||||
callback: {
|
callback: {
|
||||||
onSelected: function(event, treeNode) {
|
onSelected: function(event, treeNode) {
|
||||||
let url = '/api/v1/applications/accounts/'
|
let url = '/api/v1/applications/accounts/'
|
||||||
|
@ -1,20 +1,51 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" :title="title" />
|
<GenericTreeListPage ref="TreeTablePage" :tree-setting="treeSetting" :header-actions="headerActions" :table-config="tableConfig" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericListPage } from '@/layout/components'
|
import GenericTreeListPage from '@/layout/components/GenericTreeListPage'
|
||||||
|
import { setUrlParam } from '@/utils/common'
|
||||||
import { DetailFormatter } from '@/components/TableFormatters'
|
import { DetailFormatter } from '@/components/TableFormatters'
|
||||||
import { ApplicationTypes } from '../const'
|
import { ApplicationTypes } from '@/views/perms/const'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: 'AssetAccountList',
|
||||||
components: {
|
components: {
|
||||||
GenericListPage
|
GenericTreeListPage
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const vm = this
|
const vm = this
|
||||||
return {
|
return {
|
||||||
title: this.$t('route.ApplicationPermission'),
|
isInit: true,
|
||||||
|
clickedRow: null,
|
||||||
|
iShowTree: true,
|
||||||
|
treeSetting: {
|
||||||
|
async: false,
|
||||||
|
showMenu: false,
|
||||||
|
showRefresh: true,
|
||||||
|
showAssets: false,
|
||||||
|
treeUrl: '/api/v1/applications/applications/tree/',
|
||||||
|
callback: {
|
||||||
|
onSelected: function(event, treeNode) {
|
||||||
|
let url = '/api/v1/perms/application-permissions/'
|
||||||
|
const nodeId = treeNode.id
|
||||||
|
if (treeNode.meta.type === 'category') {
|
||||||
|
url = setUrlParam(url, 'category', nodeId)
|
||||||
|
url = setUrlParam(url, 'type', '')
|
||||||
|
} else if (treeNode.meta.type === 'type') {
|
||||||
|
url = setUrlParam(url, 'category', '')
|
||||||
|
url = setUrlParam(url, 'type', nodeId)
|
||||||
|
} else if (treeNode.meta.type === 'application') {
|
||||||
|
url = setUrlParam(url, 'category', '')
|
||||||
|
url = setUrlParam(url, 'type', '')
|
||||||
|
url = setUrlParam(url, 'application_id', nodeId)
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
vm.tableConfig.url = url
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: '/api/v1/perms/application-permissions/',
|
url: '/api/v1/perms/application-permissions/',
|
||||||
columns: [
|
columns: [
|
||||||
@ -104,12 +135,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user