fix: 已完成/已归档查看结果直达结果总览

This commit is contained in:
wkc
2026-03-05 16:20:20 +08:00
parent 012c5caa64
commit a753b87c1f
2 changed files with 27 additions and 14 deletions

View File

@@ -100,15 +100,37 @@ export default {
if (newId) {
this.projectId = newId;
this.projectInfo.projectId = newId;
this.initActiveTabFromRoute();
this.initPageData();
}
},
"$route.query.tab"() {
this.initActiveTabFromRoute();
},
},
created() {
// 初始化页面数据
this.initActiveTabFromRoute();
this.initPageData();
},
methods: {
initActiveTabFromRoute() {
const tab = (this.$route.query && this.$route.query.tab) || "";
const validTabs = ["upload", "config", "overview", "special", "detail"];
const targetTab = validTabs.includes(tab) ? tab : "upload";
this.setActiveTab(targetTab);
},
setActiveTab(index) {
this.activeTab = index;
const componentMap = {
upload: "UploadData",
config: "ParamConfig",
overview: "PreliminaryCheck",
special: "SpecialCheck",
detail: "DetailQuery",
};
this.currentComponent = componentMap[index] || "UploadData";
},
/** 初始化页面数据 */
initPageData() {
// 这里应该从API获取项目详细信息
@@ -208,18 +230,7 @@ export default {
/** 菜单选择事件 */
handleMenuSelect(index) {
console.log("菜单选择:", index);
this.activeTab = index;
// 组件映射
const componentMap = {
upload: "UploadData",
config: "ParamConfig",
overview: "PreliminaryCheck",
special: "SpecialCheck",
detail: "DetailQuery",
};
this.currentComponent = componentMap[index] || "UploadData";
this.setActiveTab(index);
},
/** UploadData 组件:菜单切换 */
handleMenuChange({ key, route }) {

View File

@@ -234,8 +234,10 @@ export default {
},
/** 查看结果 */
handleViewResult(row) {
console.log("查看结果:", row);
this.$modal.msgInfo("查看项目结果: " + row.projectName);
this.$router.push({
path: `/ccdiProject/detail/${row.projectId}`,
query: { tab: "overview" },
});
},
/** 重新分析 */
handleReAnalyze(row) {