|
@@ -166,6 +166,15 @@ export default {
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
+ beforeRouteLeave(to,from,next) {
|
|
|
+ if(to.name=='OpInvitationOfficialActivityData'){
|
|
|
+ next();
|
|
|
+ }else{
|
|
|
+ this.$store.state.Termsofinvitation={};
|
|
|
+ next();
|
|
|
+ }
|
|
|
+ console.log(this.$store.state.Termsofinvitation)
|
|
|
+ },
|
|
|
methods: {
|
|
|
//每页条数改变时触发 选择一页显示多少行
|
|
|
handleSizeChange(val) {
|
|
@@ -253,11 +262,33 @@ export default {
|
|
|
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
+ //查询添加vuex
|
|
|
QueryData() {
|
|
|
+ this.$store.state.Termsofinvitation = {
|
|
|
+ Country:this.Country,
|
|
|
+ UnitName:this.UnitName,
|
|
|
+ Contact:this.Contact,
|
|
|
+ Delegation:this.Delegation,
|
|
|
+ CreateUserId:this.CreateUserId,
|
|
|
+ InviteTime:this.InviteTime,
|
|
|
+ Field:this.Field,
|
|
|
+
|
|
|
+ };
|
|
|
this.currentPage = 1;
|
|
|
this.QueryInvitationOfficialActivityData()
|
|
|
},
|
|
|
+ //判断全局变量是否有值
|
|
|
+ estimatevuex(){
|
|
|
+ console.log(this.$store.state.Termsofinvitation);
|
|
|
+ this.Country=this.$store.state.Termsofinvitation.Country?this.$store.state.Termsofinvitation.Country:'';
|
|
|
+ this.UnitName=this.$store.state.Termsofinvitation.UnitName?this.$store.state.Termsofinvitation.UnitName:'';
|
|
|
+ this.Contact=this.$store.state.Termsofinvitation.Contact?this.$store.state.Termsofinvitation.Contact:'';
|
|
|
+ this.Delegation=this.$store.state.Termsofinvitation.Delegation?this.$store.state.Termsofinvitation.Delegation:'';
|
|
|
+ this.CreateUserId=this.$store.state.Termsofinvitation.CreateUserId?this.$store.state.Termsofinvitation.CreateUserId:'';
|
|
|
+ this.InviteTime=this.$store.state.Termsofinvitation.InviteTime?this.$store.state.Termsofinvitation.InviteTime:'';
|
|
|
+ this.Field=this.$store.state.Termsofinvitation.Field?this.$store.state.Termsofinvitation.Field:'';
|
|
|
+ this.currentPage=this.$store.state.Termsofinvitation.pgindex?this.$store.state.Termsofinvitation.pgindex:1;
|
|
|
+ },
|
|
|
//基础数据
|
|
|
QueryIOAInitData() {
|
|
|
var url = "/api/Resource/QueryIOAInitData"
|
|
@@ -458,12 +489,16 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
upDate(index, row) {
|
|
|
+ this.$store.state.Termsofinvitation.pgindex=this.currentPage
|
|
|
this.$router.push({
|
|
|
path: "/home/OpInvitationOfficialActivityData",
|
|
|
query: { id: row.id }
|
|
|
})
|
|
|
},
|
|
|
},
|
|
|
+ created(){
|
|
|
+ this.estimatevuex()
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.QueryIOAInitData();
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|