From f8aa0c88e2d1c8ba7a008f805a4e0b109840356b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sun, 10 Jul 2022 09:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmProject/XmProjectInfo.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/xm/core/xmProject/XmProjectInfo.vue b/src/views/xm/core/xmProject/XmProjectInfo.vue index 4e6da7cc..5c5186fc 100644 --- a/src/views/xm/core/xmProject/XmProjectInfo.vue +++ b/src/views/xm/core/xmProject/XmProjectInfo.vue @@ -428,6 +428,7 @@ export default { groupUserVisible: false, exportArr: ["任务", "计划", "需求监控"], dicts: getDefOptions(), + historyLength:0, /**end 自定义属性请在上面加 请加备注**/ }; }, //end data @@ -716,8 +717,12 @@ export default { } }, goBack() { - localStorage.setItem("project-infotype", "项目概览"); - this.$router.back(); + localStorage.setItem("project-infotype", "项目概览"); + if(this.historyLength>0){ + this.$router.back(); + }else{ + this.$router.push({path:'/xm/core/xmProject/XmProjectMng'}) + } }, }, //end methods components: { @@ -745,6 +750,9 @@ export default { XmPlan, //在下面添加其它组件 }, + activated: function () { + this.historyLength=window.history.length + }, mounted() { this.$nextTick(() => { var infotype = localStorage.getItem("project-infotype");