|
@@ -20,7 +20,7 @@
|
|
|
<div class="mask" v-if="progressFlag">
|
|
<div class="mask" v-if="progressFlag">
|
|
|
<el-progress type="circle" :percentage="percentage"></el-progress>
|
|
<el-progress type="circle" :percentage="percentage"></el-progress>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <imageAIVerifyErr></imageAIVerifyErr> -->
|
|
|
|
|
|
|
+ <imageAIVerifyErr v-if="imageAIVerifyFlag"></imageAIVerifyErr>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -81,6 +81,7 @@ export default {
|
|
|
progressFlag: false,
|
|
progressFlag: false,
|
|
|
percentage: 0,
|
|
percentage: 0,
|
|
|
timeFlag: null,
|
|
timeFlag: null,
|
|
|
|
|
+ imageAIVerifyFlag: false,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -153,22 +154,32 @@ export default {
|
|
|
message: '上传中...',
|
|
message: '上传中...',
|
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
|
});
|
|
});
|
|
|
|
|
+ // 需要图匠校验的添加参数和loading
|
|
|
|
|
+ if (this.photoIdentifyType) {
|
|
|
|
|
+ form.photoIdentifyType = this.photoIdentifyType;
|
|
|
|
|
+ this.progress();
|
|
|
|
|
+ }
|
|
|
// loading
|
|
// loading
|
|
|
- this.progress();
|
|
|
|
|
uploadImagev(form).then((res) => {
|
|
uploadImagev(form).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- // that.imgArr = res.data.url;
|
|
|
|
|
- let imgArr = [];
|
|
|
|
|
- res.data.forEach((item) => {
|
|
|
|
|
- imgArr.push(item.url);
|
|
|
|
|
- });
|
|
|
|
|
- loind1.clear();
|
|
|
|
|
- this.percentage = 100;
|
|
|
|
|
- clearInterval(this.timeFlag);
|
|
|
|
|
- this.progressFlag = false;
|
|
|
|
|
- this.percentage = 0;
|
|
|
|
|
- that.$toast('上传成功!');
|
|
|
|
|
- that.$emit('newimgarr', { fileUrl: imgArr.join(','), type: that.type });
|
|
|
|
|
|
|
+ // 图匠校验结果返回
|
|
|
|
|
+ if (this.photoIdentifyType) {
|
|
|
|
|
+ this.imageAIVerifyFlag = true;
|
|
|
|
|
+ // 清楚loaidng状态
|
|
|
|
|
+ this.percentage = 100;
|
|
|
|
|
+ clearInterval(this.timeFlag);
|
|
|
|
|
+ this.progressFlag = false;
|
|
|
|
|
+ this.percentage = 0;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 正常流程
|
|
|
|
|
+ let imgArr = [];
|
|
|
|
|
+ res.data.forEach((item) => {
|
|
|
|
|
+ imgArr.push(item.url);
|
|
|
|
|
+ });
|
|
|
|
|
+ loind1.clear();
|
|
|
|
|
+ that.$toast('上传成功!');
|
|
|
|
|
+ that.$emit('newimgarr', { fileUrl: imgArr.join(','), type: that.type });
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
that.$toast('上传失败!');
|
|
that.$toast('上传失败!');
|
|
|
}
|
|
}
|