Преглед изворни кода

Merge branch 'feature_20241231_客资详情返回列表数据刷新优化'

zhujindu пре 11 месеци
родитељ
комит
2809ab13c9

+ 6 - 3
src/views/clew/clewent.vue

@@ -704,7 +704,8 @@ export default {
                 window.location.replace(window.location.origin + '/mobile/clew');
               } else {
                 store.dispatch('setRefreshClewPage', true);
-                this.$router.replace({ path: '/clew' });
+                // 返回上一页不会刷新页面
+                this.$router.go(-1);
               }
               return done(true);
             } else {
@@ -915,7 +916,8 @@ export default {
                 window.location.replace(window.location.origin + '/mobile/clew');
               } else {
                 store.dispatch('setRefreshClewPage', true);
-                this.$router.replace({ path: '/clew' });
+                // 返回上一页不会刷新页面
+                this.$router.go(-1);
               }
             } else {
               this.$toast(res.msg);
@@ -1009,7 +1011,8 @@ export default {
               window.location.replace(window.location.origin + '/mobile/clew');
             } else {
               store.dispatch('setRefreshClewPage', true);
-              this.$router.replace({ path: '/clew' });
+              // 返回上一页不会刷新页面
+              this.$router.go(-1);
             }
           } else {
             this.$toast(res.msg);

+ 11 - 2
src/views/clew/complaintDetail/index.vue

@@ -191,6 +191,7 @@ import radioGroup from './radioGroup';
 import followUpHistory from './followUpHistory';
 import { getDictOption } from '@/api/index';
 import { updateCustomerClueDept, getDeptInfo } from '@/api/clew';
+import store from '@/store';
 
 export default {
   name: 'complaintDetail',
@@ -326,8 +327,14 @@ export default {
         insertCustomerClueAnswerKs(params).then((res) => {
           this.toastLoading().clear();
           if (res.code == 200) {
-            this.$toast(res.msg);
-            window.location.replace(window.location.origin + '/mobile/clew');
+            if (this.$route.query.token != undefined) {
+              window.location.replace(window.location.origin + '/mobile/clew');
+            } else {
+              store.dispatch('setRefreshClewPage', true);
+              // 返回上一页不会刷新页面
+              this.$router.go(-1);
+              // this.$router.replace({ path: '/clew' });
+            }
           } else {
             this.$toast(res.msg);
           }
@@ -470,6 +477,8 @@ export default {
               if (this.$route.query.token != undefined) {
                 window.location.replace(window.location.origin + '/mobile/clew');
               } else {
+                store.dispatch('setRefreshClewPage', true);
+                // 返回上一页不会刷新页面
                 this.$router.go(-1);
               }
               return done(true);

+ 4 - 10
src/views/clew/index.vue

@@ -83,18 +83,15 @@ export default {
       customerClueOption: [],
     };
   },
-  // created() {
-  //   this.getCustomerClue();
-  //   this.approveList();
-  // },
-  activated() {
+  created() {
     this.getCustomerClue();
   },
+  activated() {},
   watch: {
     refreshClewPage: {
       handler(val) {
         if (val) {
-          // this.approveList();
+          this.approveList();
           store.dispatch('setRefreshClewPage', false);
         }
       },
@@ -104,11 +101,8 @@ export default {
       if (to.path == '/clew' && from.path == '/My/index') {
         this.isHandle = '-1';
         this.cid = -1;
+        this.getCustomerClue();
       }
-      // if (to.path == '/clew' && from.path == '/clewent') {
-      //   this.pageNum = 1;
-      //   this.approveList();
-      // }
     },
   },
   beforeRouteLeave(to, from, next) {

+ 8 - 2
src/views/week/assignAwait/JZfollowUp.vue

@@ -96,6 +96,7 @@ import {
 import { mapState } from 'vuex';
 import radioGroup from './radioGroup';
 import followUpHistory from './followUpHistory';
+import store from '@/store';
 
 export default {
   name: 'assignPage',
@@ -245,8 +246,13 @@ export default {
         insertFollowCustomerClueAnswer(params).then((res) => {
           this.toastLoading().clear();
           if (res.code == 200) {
-            this.$toast(res.msg);
-            window.location.replace(window.location.origin + '/mobile/clew');
+            if (this.$route.query.token != undefined) {
+              window.location.replace(window.location.origin + '/mobile/clew');
+            } else {
+              store.dispatch('setRefreshClewPage', true);
+              // 返回上一页不会刷新页面
+              this.$router.go(-1);
+            }
           } else {
             this.$toast(res.msg);
           }