mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 修改平台
This commit is contained in:
@@ -757,7 +757,7 @@
|
||||
"Dashboard": "仪表盘",
|
||||
"DatabaseApp": "数据库",
|
||||
"RemoteApps": "远程应用",
|
||||
"Clouds": "云设施",
|
||||
"Clouds": "云平台",
|
||||
"DatabaseAppCreate": "创建数据库应用",
|
||||
"DatabaseAppDetail": "数据库详情",
|
||||
"DatabaseAppPermission": "数据库授权",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<TabPage :active-menu.sync="tab.activeMenu" :submenu="tab.submenu" @tab-click="changeMoreCreates">
|
||||
<TabPage
|
||||
v-if="!loading"
|
||||
:active-menu.sync="tab.activeMenu"
|
||||
:submenu="tab.submenu"
|
||||
@tab-click="changeMoreCreates"
|
||||
>
|
||||
<keep-alive>
|
||||
<GenericListTable :table-config="tableConfig" :header-actions="headerActions" />
|
||||
</keep-alive>
|
||||
@@ -19,7 +24,7 @@ export default {
|
||||
data() {
|
||||
const vm = this
|
||||
return {
|
||||
show: true,
|
||||
loading: true,
|
||||
tab: {
|
||||
submenu: Categories,
|
||||
activeMenu: 'host'
|
||||
@@ -90,8 +95,7 @@ export default {
|
||||
},
|
||||
dropdown: []
|
||||
}
|
||||
},
|
||||
categoriesDropdown: this.$store.state.assets.assetCategoriesDropdown
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -99,13 +103,18 @@ export default {
|
||||
return `/api/v1/assets/platforms/?category=${this.tab.activeMenu}`
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.changeMoreCreates()
|
||||
async mounted() {
|
||||
try {
|
||||
await this.$store.dispatch('assets/getAssetCategories')
|
||||
await this.changeMoreCreates()
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeMoreCreates() {
|
||||
async changeMoreCreates() {
|
||||
this.tableConfig.url = this.url
|
||||
this.headerActions.moreCreates.dropdown = this.categoriesDropdown.filter(item => {
|
||||
this.headerActions.moreCreates.dropdown = this.$store.state.assets.assetCategoriesDropdown.filter(item => {
|
||||
return item.category === this.tab.activeMenu
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user