|
@@ -161,15 +161,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
// loading
|
|
// loading
|
|
|
uploadImagev(form).then((res) => {
|
|
uploadImagev(form).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
|
|
|
|
+ if (res.code == -1) {
|
|
|
|
|
+ // 图匠图片校验接口超时
|
|
|
|
|
+ this.requestTimeOut();
|
|
|
|
|
+ } else if (res.code == 200) {
|
|
|
// 图匠校验结果返回
|
|
// 图匠校验结果返回
|
|
|
if (this.photoIdentifyType) {
|
|
if (this.photoIdentifyType) {
|
|
|
this.imageAIVerifyFlag = true;
|
|
this.imageAIVerifyFlag = true;
|
|
|
- // 清楚loaidng状态
|
|
|
|
|
- this.percentage = 100;
|
|
|
|
|
- clearInterval(this.timeFlag);
|
|
|
|
|
- this.progressFlag = false;
|
|
|
|
|
- this.percentage = 0;
|
|
|
|
|
|
|
+ this.resetProgress();
|
|
|
} else {
|
|
} else {
|
|
|
// 正常流程
|
|
// 正常流程
|
|
|
let imgArr = [];
|
|
let imgArr = [];
|
|
@@ -186,6 +185,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
progress() {
|
|
progress() {
|
|
|
|
|
+ // 后端接口20000ms后失效,每1000m progress加10,到90停止;
|
|
|
this.progressFlag = true;
|
|
this.progressFlag = true;
|
|
|
this.percentage = 10;
|
|
this.percentage = 10;
|
|
|
this.timeFlag = setInterval(() => {
|
|
this.timeFlag = setInterval(() => {
|
|
@@ -193,6 +193,23 @@ export default {
|
|
|
this.percentage = this.percentage + 10;
|
|
this.percentage = this.percentage + 10;
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
},
|
|
},
|
|
|
|
|
+ requestTimeOut() {
|
|
|
|
|
+ this.resetProgress();
|
|
|
|
|
+ this.$dialog
|
|
|
|
|
+ .confirm({
|
|
|
|
|
+ title: '系统提示',
|
|
|
|
|
+ message: '网络原因导致图像未被识别,暂时允许提交',
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 重置loaidng状态
|
|
|
|
|
+ resetProgress() {
|
|
|
|
|
+ this.percentage = 100;
|
|
|
|
|
+ clearInterval(this.timeFlag);
|
|
|
|
|
+ this.progressFlag = false;
|
|
|
|
|
+ this.percentage = 0;
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|