|
|
@@ -2825,6 +2825,7 @@ export default {
|
|
|
examplePhotoImg: '', //示例-操作说明图标地址
|
|
|
photoIdentifyType: null, //图片识别类型
|
|
|
pictureSource: '0',
|
|
|
+ stillDistribute: false,
|
|
|
};
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
@@ -2856,6 +2857,7 @@ export default {
|
|
|
// 拍照次数重置
|
|
|
store.dispatch('setShotsNum', 0);
|
|
|
this.show = false;
|
|
|
+ this.stillDistribute = false;
|
|
|
},
|
|
|
watch: {
|
|
|
$route(to, from) {
|
|
|
@@ -4780,14 +4782,31 @@ export default {
|
|
|
if (!this.wuliaoMust) {
|
|
|
formData.collectionAnswers = [];
|
|
|
}
|
|
|
+ // 仍要上传
|
|
|
+ if (this.stillDistribute) {
|
|
|
+ formData.stillDistribute = true;
|
|
|
+ }
|
|
|
addCollectionAnswer(formData).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.$router.go(-1);
|
|
|
} else {
|
|
|
- this.$dialog.alert({
|
|
|
- title: '系统提示',
|
|
|
- message: res.msg,
|
|
|
- });
|
|
|
+ if (res.data) {
|
|
|
+ this.$dialog
|
|
|
+ .confirm({
|
|
|
+ title: '提示',
|
|
|
+ message: res.msg,
|
|
|
+ confirmButtonText: '仍要上传',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.stillDistribute = true;
|
|
|
+ this.onSubmit();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '系统提示',
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|