|
@@ -294,19 +294,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,
|
|
@@ -327,7 +317,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();
|
|
@@ -338,7 +328,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 {
|