fix: 将迁移记录移入主控服务详情
Build and Deploy Vue3 / build (push) Successful in 6m13s
Build and Deploy Vue3 / deploy (push) Successful in 51s

This commit is contained in:
shiran
2026-08-04 08:22:24 +08:00
parent cbfb612b43
commit 7dccfa781b
5 changed files with 30 additions and 19 deletions
+14 -2
View File
@@ -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>