Browse Source

no message

zhujindu 16 hours ago
parent
commit
356419a0f4
1 changed files with 2 additions and 13 deletions
  1. 2 13
      src/views/deviceWithin/taskPhotoTaking.vue

+ 2 - 13
src/views/deviceWithin/taskPhotoTaking.vue

@@ -243,19 +243,9 @@ export default {
         this.taskPhotoRecognitionResult = item.taskPhotoRecognitionResult;
         this.taskPhotoRecognitionResult = item.taskPhotoRecognitionResult;
       });
       });
     },
     },
-    waitUploadReady(interval = 1000) {
-      return new Promise((resolve) => {
-        const intervalId = setInterval(() => {
-          const taskPhoto = this.$refs.taskPhoto && this.$refs.taskPhoto[0];
-          if (taskPhoto && taskPhoto.isUploadImg) {
-            clearInterval(intervalId);
-            resolve();
-          }
-        }, interval);
-      });
-    },
     async onSubmit() {
     async onSubmit() {
       this.toastLoading(0, '提交中,请稍候...', true);
       this.toastLoading(0, '提交中,请稍候...', true);
+      const taskPhoto = this.$refs.taskPhoto && this.$refs.taskPhoto[0];
       let formData = {
       let formData = {
         storeId: this.$route.query.storeId,
         storeId: this.$route.query.storeId,
         storeCode: this.$route.query.storeCode,
         storeCode: this.$route.query.storeCode,
@@ -276,7 +266,7 @@ export default {
       };
       };
       if (this.userInfo.photoMethod == '1') {
       if (this.userInfo.photoMethod == '1') {
         formData.mediaInfos = [];
         formData.mediaInfos = [];
-      } else if (taskPhoto) {
+      } else {
         this.mediaInfos = [];
         this.mediaInfos = [];
         this.syncUpload(taskPhoto.imgArr, () => {
         this.syncUpload(taskPhoto.imgArr, () => {
           this.toastLoading().clear();
           this.toastLoading().clear();
@@ -287,7 +277,6 @@ export default {
     },
     },
     syncUpload(imgArr, callback) {
     syncUpload(imgArr, callback) {
       if (!imgArr.length) {
       if (!imgArr.length) {
-        this.isUploadImg = true;
         callback && callback();
         callback && callback();
         return;
         return;
       } else {
       } else {