Browse Source

0430商邀修改lhj0952

liuhj 1 year ago
parent
commit
c6b0aabb55

+ 1 - 1
src/components/OP/backwardtabke.vue

@@ -61,7 +61,7 @@
                         <el-date-picker v-model="datainfo.issueApprovalDt" type="date" placeholder="选择日期">
                         </el-date-picker>
                     </div>
-                    <div class="backward-li-span"><p style="line-height: 0px;padding: 0;">出批件</p><p  style="line-height: 0px;padding: 0;">护照办理</p></div>
+                    <div class="backward-li-span"><p style="line-height: 10px;padding: 0;">出批件</p><p  style="line-height: 10px;padding: 0;">护照办理</p></div>
                     <div class="backward-li-span">
                         <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2}" placeholder="请输入内容"
                             v-model="datainfo.issueApprovalRemark">

+ 36 - 1
src/components/Resource/InvitationOfficialActivityData.vue

@@ -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;

+ 1 - 0
src/store/index.js

@@ -11,6 +11,7 @@ const store = new Vuex.Store({
 		return {
 			phone :'',
             webSocketMsg:'1',
+            Termsofinvitation:{},
 		}
 	},
 	// 在 mutations 内封装数据更新方法