diff --git a/src/views/mdp/sys/user/UsersSelect.vue b/src/views/mdp/sys/user/UsersSelect.vue
index 73508059..4cdc3d3c 100644
--- a/src/views/mdp/sys/user/UsersSelect.vue
+++ b/src/views/mdp/sys/user/UsersSelect.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/views/xm/core/xmProduct/XmProductInfo.vue b/src/views/xm/core/xmProduct/XmProductInfo.vue
index bdb0e3e0..d9e4b7c8 100644
--- a/src/views/xm/core/xmProduct/XmProductInfo.vue
+++ b/src/views/xm/core/xmProduct/XmProductInfo.vue
@@ -302,6 +302,8 @@
this.infotype=infotype;
if(infotype=='返回'){
this.goBack()
+ }else{
+ localStorage.setItem('product-infotype',infotype);
}
},
handleExport() {
@@ -417,7 +419,8 @@
return dateStr.substr(0,10);
}
},
- goBack(){
+ goBack(){
+ localStorage.setItem('product-infotype',"产品概览");
this.$router.back()
}
@@ -451,7 +454,11 @@
},
mounted() {
this.$nextTick(() => {
-
+
+ var infotype=localStorage.getItem('product-infotype');
+ if(infotype){
+ this.infotype=infotype
+ }
});
}
}
diff --git a/src/views/xm/core/xmProduct/XmProductInfoRoute.vue b/src/views/xm/core/xmProduct/XmProductInfoRoute.vue
index 72cd1ee6..a2ca2916 100644
--- a/src/views/xm/core/xmProduct/XmProductInfoRoute.vue
+++ b/src/views/xm/core/xmProduct/XmProductInfoRoute.vue
@@ -7,6 +7,7 @@
diff --git a/src/views/xm/core/xmProduct/XmProductMng.vue b/src/views/xm/core/xmProduct/XmProductMng.vue
index 987a324e..6803d532 100644
--- a/src/views/xm/core/xmProduct/XmProductMng.vue
+++ b/src/views/xm/core/xmProduct/XmProductMng.vue
@@ -532,7 +532,8 @@
//进入info界面
intoInfo(row) {
this.editForm = row;
- this.$router.push({ name:'XmProductInfoRoute', params: row })
+ this.$router.push({ name:'XmProductInfoRoute', query: {id:row.id} })
+ localStorage.setItem("xm-product-info-route",JSON.stringify(row));
//this.showInfo = true;
},
//选择行xmProduct
diff --git a/src/views/xm/core/xmProject/XmProjectInfo.vue b/src/views/xm/core/xmProject/XmProjectInfo.vue
index 57d11d9f..0e8b693b 100644
--- a/src/views/xm/core/xmProject/XmProjectInfo.vue
+++ b/src/views/xm/core/xmProject/XmProjectInfo.vue
@@ -186,15 +186,7 @@
]),
},
watch:{
- selProject:function(selProject){
- var oldInfotype=this.infotype
- this.infotype=''
- this.$nextTick(()=>{
-
- this.infotype=oldInfotype
- })
-
- }
+
},
data() {
return {
@@ -229,10 +221,7 @@
sendContent:'咨询'
}
});
- },
- handleMenuSelect(menuId){
- this.infotype=menuId
- },
+ },
onUserSelected:function(users){
if(this.groupUserVisible==true){
var query={}
@@ -261,7 +250,9 @@
if(infotype=='返回'){
this.goBack()
- }
+ }else{
+ localStorage.setItem('project-infotype',infotype);
+ }
},
handleExport() {
this.downloadLoading = true
@@ -376,7 +367,8 @@
return dateStr.substr(0,10);
}
},
- goBack(){
+ goBack(){
+ localStorage.setItem('project-infotype',"项目概览");
this.$router.back()
}
@@ -408,7 +400,10 @@
},
mounted() {
this.$nextTick(() => {
-
+ var infotype=localStorage.getItem('project-infotype');
+ if(infotype){
+ this.infotype=infotype
+ }
});
}
}
diff --git a/src/views/xm/core/xmProject/XmProjectInfoRoute.vue b/src/views/xm/core/xmProject/XmProjectInfoRoute.vue
index 804ad438..cb3c3366 100644
--- a/src/views/xm/core/xmProject/XmProjectInfoRoute.vue
+++ b/src/views/xm/core/xmProject/XmProjectInfoRoute.vue
@@ -9,6 +9,7 @@
import { mapGetters } from 'vuex';
import XmProjectInfo from './XmProjectInfo'
+ import { listXmProject} from '@/api/xm/core/xmProject';
export default {
computed: {
@@ -30,6 +31,35 @@
this.selProject=project;
localStorage.setItem('xm-project-info-route',JSON.stringify(this.selProject));
this.$emit('submit',project)
+ },
+ initByQueryId(){
+ if(this.$route.query && this.$route.query.id){
+ var localStorageProject=localStorage.getItem("xm-project-info-route")
+ var project=null;
+ if(localStorageProject){
+ project=JSON.parse(localStorageProject)
+ if(project && project.id==this.$route.query.id){
+ this.selProject=project
+ this.showInfo=true;
+ }else{
+ this.getProject(this.$route.query.id);
+ }
+ }else{
+ this.getProject(this.$route.query.id);
+ }
+ }
+ },
+ getProject(id){
+ listXmProject({id:id}).then(res=>{
+ var tips = res.data.tips;
+ if(tips.isOk){
+ this.selProject=res.data.data[0]
+ localStorage.setItem("xm-project-info-route",JSON.stringify(this.selProject))
+ this.showInfo=true;
+ }else{
+
+ }
+ })
}
@@ -39,24 +69,10 @@
//在下面添加其它组件
},
activated(){
- if(this.$route.params && this.$route.params.id){
- this.selProject=this.$route.params
- this.showInfo=true;
- localStorage.setItem('xm-project-info-route',JSON.stringify(this.selProject));
- }else{
- this.selProject=JSON.parse(localStorage.getItem("xm-project-info-route"))
- this.showInfo=true;
- }
+ this.initByQueryId();
},
mounted() {
- if(this.$route.params && this.$route.params.id){
- this.selProject=this.$route.params
- this.showInfo=true;
- localStorage.setItem('xm-project-info-route',JSON.stringify(this.selProject));
- }else{
- this.selProject=JSON.parse(localStorage.getItem("xm-project-info-route"))
- this.showInfo=true;
- }
+ this.initByQueryId();
}
}
diff --git a/src/views/xm/core/xmProject/XmProjectMng.vue b/src/views/xm/core/xmProject/XmProjectMng.vue
index 8ec6b0d6..ed575a65 100644
--- a/src/views/xm/core/xmProject/XmProjectMng.vue
+++ b/src/views/xm/core/xmProject/XmProjectMng.vue
@@ -202,7 +202,7 @@
{{scope.row.startTime? scope.row.startTime.substr(0,10) : ""}}~{{scope.row.endTime? scope.row.endTime.substr(0,10) : ""}}
-
+
{{item.name}}
@@ -616,7 +616,8 @@
//进入info界面
intoInfo(row) {
this.selectProject = row;
- this.$router.push({ name:'XmProjectInfoRoute', params: row })
+ this.$router.push({ name:'XmProjectInfoRoute', query: {id:row.id} })
+ localStorage.setItem("xm-project-info-route",JSON.stringify(row))
//this.showInfo = true;
},