fix: 将迁移记录移入主控服务详情
This commit is contained in:
@@ -107,6 +107,9 @@
|
||||
<el-tab-pane label="用户组网" name="networking">
|
||||
<UserNetworkingManage v-if="tabLoaded['networking']" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="迁移记录" name="migration">
|
||||
<VmMigrationRecord v-if="tabLoaded['migration']" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -161,6 +164,7 @@ const VncNodeManage = defineAsyncComponent(() => import('./VncNodeManage.vue'))
|
||||
const SnapshotManage = defineAsyncComponent(() => import('./SnapshotManage.vue'))
|
||||
const BackupManage = defineAsyncComponent(() => import('./BackupManage.vue'))
|
||||
const UserNetworkingManage = defineAsyncComponent(() => import('./UserNetworkingManage.vue'))
|
||||
const VmMigrationRecord = defineAsyncComponent(() => import('./VmMigrationRecord.vue'))
|
||||
|
||||
// 引入tagsViewStore
|
||||
import { useTagsViewStore } from '@/store/tagsViewStore'
|
||||
@@ -193,7 +197,8 @@ const tabLoaded = reactive({
|
||||
'vnc': false,
|
||||
'snapshot': false,
|
||||
'backup': false,
|
||||
'networking': false
|
||||
'networking': false,
|
||||
'migration': false
|
||||
})
|
||||
|
||||
|
||||
@@ -347,8 +352,11 @@ const initPage = () => {
|
||||
|
||||
// 重置所有 tab 加载状态,使子组件在切换后重新拉取数据
|
||||
Object.keys(tabLoaded).forEach(k => { tabLoaded[k] = false })
|
||||
const queryTab = route.query.tab
|
||||
const savedTab = localStorage.getItem('kvmDetailActiveTab')
|
||||
if (savedTab && tabLoaded.hasOwnProperty(savedTab)) {
|
||||
if (queryTab && tabLoaded.hasOwnProperty(queryTab)) {
|
||||
activeTab.value = queryTab
|
||||
} else if (savedTab && tabLoaded.hasOwnProperty(savedTab)) {
|
||||
activeTab.value = savedTab
|
||||
} else {
|
||||
activeTab.value = 'host'
|
||||
@@ -583,4 +591,8 @@ onMounted(() => {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.custom-tabs :deep(.migration-record-page) {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user