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(() => {