From 1d76176308d07f2f96919e12b9309689b1b7383e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 11 Jul 2022 22:58:11 +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/xmProduct/XmProductInfo.vue | 14 ++++++++++---- src/views/xm/core/xmProject/XmProjectInfo.vue | 13 +++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/views/xm/core/xmProduct/XmProductInfo.vue b/src/views/xm/core/xmProduct/XmProductInfo.vue index 8ebe41d1..81186f3b 100644 --- a/src/views/xm/core/xmProduct/XmProductInfo.vue +++ b/src/views/xm/core/xmProduct/XmProductInfo.vue @@ -427,11 +427,17 @@ import WikiList from '../wiki/archive/WikiList.vue'; }else{ return dateStr.substr(0,10); } - }, - goBack(){ + }, + + goBack() { localStorage.setItem('product-infotype',"产品概览"); - this.$router.back() - } + + if(window.history.length>0){ + this.$router.back(-1); + }else{ + this.$router.push({path:'/xm/core/xmProduct/XmProductMng'}) + } + }, },//end methods components: { diff --git a/src/views/xm/core/xmProject/XmProjectInfo.vue b/src/views/xm/core/xmProject/XmProjectInfo.vue index b4ffd6e4..8626d0a2 100644 --- a/src/views/xm/core/xmProject/XmProjectInfo.vue +++ b/src/views/xm/core/xmProject/XmProjectInfo.vue @@ -439,8 +439,7 @@ export default { load: { list: false, edit: false }, groupUserVisible: false, exportArr: ["任务", "计划", "需求监控"], - dicts: getDefOptions(), - historyLength:0, + dicts: getDefOptions(), maxTableHeight:300, /**end 自定义属性请在上面加 请加备注**/ }; @@ -774,8 +773,9 @@ export default { }, goBack() { localStorage.setItem("project-infotype", "项目概览"); - if(this.historyLength>0){ - this.$router.back(); + + if(window.history.length>0){ + this.$router.back(-1); }else{ this.$router.push({path:'/xm/core/xmProject/XmProjectMng'}) } @@ -838,10 +838,7 @@ export default { XmWorkloadSetDayList, XmWorkloadSetMonthList //在下面添加其它组件 - }, - activated: function () { - this.historyLength=window.history.length - }, + }, mounted() { this.$nextTick(() => {