fix: 已完成/已归档查看结果直达结果总览
This commit is contained in:
@@ -100,15 +100,37 @@ export default {
|
|||||||
if (newId) {
|
if (newId) {
|
||||||
this.projectId = newId;
|
this.projectId = newId;
|
||||||
this.projectInfo.projectId = newId;
|
this.projectInfo.projectId = newId;
|
||||||
|
this.initActiveTabFromRoute();
|
||||||
this.initPageData();
|
this.initPageData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"$route.query.tab"() {
|
||||||
|
this.initActiveTabFromRoute();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 初始化页面数据
|
// 初始化页面数据
|
||||||
|
this.initActiveTabFromRoute();
|
||||||
this.initPageData();
|
this.initPageData();
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
initPageData() {
|
||||||
// 这里应该从API获取项目详细信息
|
// 这里应该从API获取项目详细信息
|
||||||
@@ -208,18 +230,7 @@ export default {
|
|||||||
/** 菜单选择事件 */
|
/** 菜单选择事件 */
|
||||||
handleMenuSelect(index) {
|
handleMenuSelect(index) {
|
||||||
console.log("菜单选择:", index);
|
console.log("菜单选择:", index);
|
||||||
this.activeTab = index;
|
this.setActiveTab(index);
|
||||||
|
|
||||||
// 组件映射
|
|
||||||
const componentMap = {
|
|
||||||
upload: "UploadData",
|
|
||||||
config: "ParamConfig",
|
|
||||||
overview: "PreliminaryCheck",
|
|
||||||
special: "SpecialCheck",
|
|
||||||
detail: "DetailQuery",
|
|
||||||
};
|
|
||||||
|
|
||||||
this.currentComponent = componentMap[index] || "UploadData";
|
|
||||||
},
|
},
|
||||||
/** UploadData 组件:菜单切换 */
|
/** UploadData 组件:菜单切换 */
|
||||||
handleMenuChange({ key, route }) {
|
handleMenuChange({ key, route }) {
|
||||||
|
|||||||
@@ -234,8 +234,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查看结果 */
|
/** 查看结果 */
|
||||||
handleViewResult(row) {
|
handleViewResult(row) {
|
||||||
console.log("查看结果:", row);
|
this.$router.push({
|
||||||
this.$modal.msgInfo("查看项目结果: " + row.projectName);
|
path: `/ccdiProject/detail/${row.projectId}`,
|
||||||
|
query: { tab: "overview" },
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 重新分析 */
|
/** 重新分析 */
|
||||||
handleReAnalyze(row) {
|
handleReAnalyze(row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user