This commit is contained in:
zhutianqi
2021-11-30 15:20:43 +08:00
parent 6b5c134025
commit 96c1e226f9
@@ -409,7 +409,7 @@
<!-- 新增样式 -->
<div class="demo-drawer-content">
<el-form
v-if="reloadAddForm"
v-if="reloadAddForm && modalshowflag"
ref="sarStandardsInfoForm"
:model="sarStandardsInfoEO"
:rules="sarStandardsInfoRules"
@@ -1887,7 +1887,7 @@
<loading :loading="OCRLoading">数据加载中……</loading>
<div class="demo-drawer-footer">
<el-button size="mini" @click="OCRclose">取消</el-button>
<el-button type="primary" size="mini" @click="OCRsubmit">转换</el-button>
<el-button type="primary" :loading="OCRSubmitLoading" size="mini" @click="OCRsubmit">{{ OCRSubmitButton }}</el-button>
</div>
</div>
</el-drawer>
@@ -1947,6 +1947,8 @@ export default {
},
data() {
return {
OCRSubmitLoading: false,
OCRSubmitButton: '',
OCRType: '',
OCRoptions: [],
OCRDatas: [],
@@ -2671,6 +2673,7 @@ export default {
} else if (this.OCRDatas.length === 0) {
this.$message.warning('请选择一个文件')
} else {
this.OCRSubmitLoading = true
if (this.OCRType === '0') {
let json = {
standNumber: this.ocrList[0].standYear ? this.ocrList[0].standSortShow + ' ' + this.ocrList[0].standNumber + '-' + this.ocrList[0].standYear : this.ocrList[0].standSortShow + ' ' + this.ocrList[0].standNumber,
@@ -2687,6 +2690,7 @@ export default {
},
(res) => {
this.OCRModel = false
this.OCRSubmitLoading = false
if (res.ok) {
this.$message.success('OCR实别成功')
} else {
@@ -2705,6 +2709,7 @@ export default {
_this: this
}, res => {
this.OCRModel = false
this.OCRSubmitLoading = false
if (res.ok) {
this.$message.success('拆分成功')
} else {
@@ -2720,12 +2725,15 @@ export default {
if (type === '0') {
text = 'OCR识别'
this.OCRTitle = '选择OCR识别文件'
this.OCRSubmitButton = '转换'
} else if (type === '1') {
text = '拆分'
this.OCRTitle = '选择拆分文件'
this.OCRSubmitButton = '拆分'
} else if (type === '2') {
text = '编辑'
this.OCRTitle = '选择编辑文件'
}
if (this.ocrList.length > 1 && (type === '0' || type === '1' || type === '2')) {
this.$message.warning('仅能选择一条数据进行' + text)