zhujindu 1 anno fa
parent
commit
899454f8f2

+ 4 - 2
src/views/deviceWithin/addStoreVisit.vue

@@ -2840,10 +2840,14 @@ export default {
     }
     this.getPhotoTypeList();
     this.info();
+    // 拍照次数重置
+    store.dispatch('setShotsNum', 0);
   },
   watch: {
     $route(to, from) {
       if (from.path == '/addStoreVisit') {
+        // 离开当前页面时,关闭弹框
+        this.show = false;
         if (this.$refs.uploadVNormal) this.$refs.uploadVNormal.close();
       }
     },
@@ -2864,8 +2868,6 @@ export default {
       this.indexselect = 1;
     }
     this.getPhotoTypeList();
-    // 拍照次数重置
-    store.dispatch('setShotsNum', 0);
   },
   methods: {
     viewSM() {

+ 6 - 1
src/views/storeManagement/storeAdd.vue

@@ -294,7 +294,8 @@
                         @newimgarr="newimgarr1"
                         :imgText="fromValue.ifJzStoreType != 1 ? '门店照' : '家装前台照片'"
                         :photoIdentifyType="fromValue.ifJzStoreType != 1 ? '1' : ''"
-                        :type="1"></upload-img>
+                        :type="1"
+                        ref="uploadImgVStore"></upload-img>
                     </div>
                   </van-col>
                   <!-- 新建同城A、B店不显示陈列照 -->
@@ -842,6 +843,10 @@ export default {
         this.getbrands();
         this.getStreetQuery();
       }
+      if (from.path == '/storeAdd') {
+        // 离开当前页面时,关闭弹框
+        if (this.$refs.uploadImgVStore) this.$refs.uploadImgVStore.close();
+      }
     },
   },
   activated() {