Browse Source

05151600lhjrijie

liuhj 11 months ago
parent
commit
9d81c6272f

+ 19 - 0
src/components/OP/OPgroup.vue

@@ -145,6 +145,12 @@
 </template>
 <script>
 export default {
+    beforeRouteLeave(to, from, next) {
+        if(to.name!='Groupedit'){
+            localStorage.removeItem('tzczval');
+        }
+        next()
+    },
     // beforeRouteLeave(to, from, next) {
     //     console.log(to);
     //     console.log(from);
@@ -248,6 +254,12 @@ export default {
         },
         //编辑
         handleEdit(index, row,rows) {
+            var tzczval={
+                currentPage:this.currentPage,
+                value:this.value,
+                input:this.input,
+            }
+            localStorage.setItem('tzczval', JSON.stringify(tzczval));
             this.$router.push({path: '/home/Groupedit?id=' + row.id +''});
         },
         confirmDeparture(index, row){
@@ -341,6 +353,13 @@ export default {
             
         }
     },
+    created(){
+        if(JSON.parse(localStorage.getItem('tzczval'))){
+            this.currentPage=JSON.parse(localStorage.getItem('tzczval')).currentPage;
+            this.value=JSON.parse(localStorage.getItem('tzczval')).value;
+            this.input=JSON.parse(localStorage.getItem('tzczval')).input;
+        }
+    },
     mounted(){
         this.token=JSON.parse(localStorage.getItem('userinif')).token;
         this.pageId=Number(localStorage.getItem('indexs').split('-')[1]);//页面id

+ 32 - 0
src/components/Resource/CarData.vue

@@ -52,6 +52,12 @@
 </template>
 <script>
 export default {
+    beforeRouteLeave(to, from, next) {
+        if(to.name!='carDataEdit'){
+            localStorage.removeItem('carval');
+        }
+        next()
+    },
     data() {
         return {
             rules: {
@@ -130,6 +136,27 @@ export default {
                             that.currentPage = that.currentPage - 1;
                         }
                     }
+                    if(JSON.parse(localStorage.getItem('carval'))){
+                        that.currentPage=JSON.parse(localStorage.getItem('carval')).currentPage;
+                        that.input=JSON.parse(localStorage.getItem('carval')).input;
+                        var newarr = [];
+                        if (that.input == "") {
+                            newarr = that.tableData;
+                        } else {
+                            for (var i = 0; i < that.tableData.length; i++) {
+                                if (that.tableData[i].unitArea.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].unitName.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].contact.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].contactTel.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                }
+                            }
+                        }
+                        that.tableDatas = newarr;
+                    }
                 }
                 that.loading = false
             }).catch(function (error) {
@@ -180,6 +207,11 @@ export default {
             };
         },
         upDate(index, row) {
+            var carval={
+                currentPage:this.currentPage,
+                input:this.input,
+            }
+            localStorage.setItem('carval', JSON.stringify(carval));
             localStorage.setItem('CarDataEdit', JSON.stringify(row));
             this.$router.push('/home/carDataEdit')
         },

+ 26 - 0
src/components/Resource/CountryFeeCost.vue

@@ -93,6 +93,12 @@
 </template>
 <script>
 export default {
+    beforeRouteLeave(to, from, next) {
+        if(to.name!='CountryFeeCostOperation'){
+            localStorage.removeItem('qzfyval');
+        }
+        next()
+    },
     data() {
         return {
             loading: false,
@@ -140,6 +146,21 @@ export default {
                             that.currentPage = that.currentPage - 1;
                         }
                     }
+                    if(JSON.parse(localStorage.getItem('qzfyval'))){
+                        that.currentPage=JSON.parse(localStorage.getItem('qzfyval')).currentPage;
+                        that.input=JSON.parse(localStorage.getItem('qzfyval')).input;
+                        var newarr = [];
+                        if (that.input == "") {
+                            newarr = that.tableData;
+                        } else {
+                            for (var i = 0; i < that.tableData.length; i++) {
+                                if (that.tableData[i].visaCountry.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                }
+                            }
+                        }
+                        that.tableDatas = newarr;
+                    }
                 }
                 that.loading = false
             }).catch(function (error) {
@@ -169,6 +190,11 @@ export default {
         },
 
         upDate(index, row) {
+            var qzfyval={
+                currentPage:this.currentPage,
+                input:this.input,
+            }
+            localStorage.setItem('qzfyval', JSON.stringify(qzfyval));
             this.$router.push({
                 path: "/home/CountryFeeCostOperation",
                 query: { id: row.id }

+ 34 - 0
src/components/Resource/LocalGuide.vue

@@ -52,6 +52,12 @@
 </template>
 <script>
 export default {
+    beforeRouteLeave(to, from, next) {
+        if(to.name!='LocalGuideOperation'){
+            localStorage.removeItem('dydjval');
+        }
+        next()
+    },
     data() {
         return {
             loading: false,
@@ -112,9 +118,32 @@ export default {
                             that.currentPage = that.currentPage - 1;
                         }
                     }
+                    if(JSON.parse(localStorage.getItem('dydjval'))){
+                        that.currentPage=JSON.parse(localStorage.getItem('dydjval')).currentPage;
+                        that.input=JSON.parse(localStorage.getItem('dydjval')).input;
+                        var newarr = [];
+                        if (that.input == "") {
+                            newarr = that.tableData;
+                        } else {
+                            console.log(that.tableData);
+                            for (var i = 0; i < that.tableData.length; i++) {
+                                if (that.tableData[i].unitArea.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].unitName.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].contact.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].contactTel.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                }
+                            }
+                        }
+                        that.tableDatas = newarr;
+                    }
                 }
                 that.loading = false
             }).catch(function (error) {
+                console.log(error);
                 that.loading = false
                 that.$message.error("网络错误,请稍后重试");
             });
@@ -142,6 +171,11 @@ export default {
         },
 
         upDate(index, row) {
+            var dydjval={
+                currentPage:this.currentPage,
+                input:this.input,
+            }
+            localStorage.setItem('dydjval', JSON.stringify(dydjval));
             this.$router.push({
                 path: "/home/LocalGuideOperation",
                 query: { id: row.id }

+ 1 - 1
src/components/Resource/OpOfficialActivities.vue

@@ -170,7 +170,7 @@
                             </el-input>
                             <div v-show="reqSampleArrpd" class="reqSampleArr-ul">
                                 <div @click="reqSampleArrli(item)" class="reqSampleArr-li" v-for="(item,index) in reqSampleArr" :key="index">
-                                    {{'['+item.teamName+']   '+item.reqSample}}
+                                    {{'['+item.teamName+']('+item.client+')   '+item.reqSample}}
                                 </div>
                             </div>
                         </el-form-item>

+ 30 - 0
src/components/Resource/ThreeCode.vue

@@ -52,6 +52,12 @@
 </template>
 <script>
 export default {
+    beforeRouteLeave(to, from, next) {
+        if(to.name!='ThreeCodeOperation'){
+            localStorage.removeItem('szmval');
+        }
+        next()
+    },
     data() {
         return {
             loading: false,
@@ -104,6 +110,25 @@ export default {
                             that.currentPage = that.currentPage - 1;
                         }
                     }
+                    if(JSON.parse(localStorage.getItem('szmval'))){
+                        that.currentPage=JSON.parse(localStorage.getItem('szmval')).currentPage;
+                        that.input=JSON.parse(localStorage.getItem('szmval')).input;
+                        var newarr = [];
+                        if (that.input == "") {
+                            newarr = that.tableData;
+                        } else {
+                            for (var i = 0; i < that.tableData.length; i++) {
+                                if (that.tableData[i].airPort.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].three.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].city.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                }
+                            }
+                        }
+                        that.tableDatas = newarr;
+                    }
                 }
                 that.loading = false
             }).catch(function (error) {
@@ -132,6 +157,11 @@ export default {
         },
 
         upDate(index, row) {
+            var szmval={
+                currentPage:this.currentPage,
+                input:this.input,
+            }
+            localStorage.setItem('szmval', JSON.stringify(szmval));
             this.$router.push({
                 path: "/home/ThreeCodeOperation",
                 query: { id: row.id }