|
@@ -22,6 +22,9 @@
|
|
|
</HcTooltip>
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
+ <HcTooltip keys="file_records_btn_recognition">
|
|
|
+ <el-button type="primary" hc-btn :loading="autoLoading" :disabled="tableCheckedKeys.length <= 0" @click="autoClick">自动识别</el-button>
|
|
|
+ </HcTooltip>
|
|
|
<HcTooltip keys="file_records_btn_upload_scanned_files">
|
|
|
<el-button type="primary" hc-btn @click="uploadModalClick">上传案卷</el-button>
|
|
|
</HcTooltip>
|
|
@@ -315,7 +318,7 @@ import archiveFileApi from '~api/archiveFile/archiveFileAuto.js'
|
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
|
import tasksApi from '~api/tasks/data'
|
|
|
import ossApi from '~api/oss'
|
|
|
-import { arrKeySort, deepClone, downloadBlob, getArrValue, getObjVal, getObjValue } from 'js-fast-way'
|
|
|
+import { arrKeySort, arrToId, deepClone, downloadBlob, getArrValue, getObjVal, getObjValue } from 'js-fast-way'
|
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
|
|
|
|
//变量
|
|
@@ -1390,6 +1393,24 @@ const splitModal = ref(false)
|
|
|
const splitModalClose = ()=>{
|
|
|
splitModal.value = false
|
|
|
}
|
|
|
+const autoLoading = ref(false)
|
|
|
+const autoClick = async ()=>{
|
|
|
+ autoLoading.value = true
|
|
|
+ const rows = tableCheckedKeys.value
|
|
|
+ let ids = arrToId(rows)
|
|
|
+ const { error, code, data, msg } = await tasksApi.atuoOCR({
|
|
|
+
|
|
|
+ ids,
|
|
|
+ })
|
|
|
+ autoLoading.value = false
|
|
|
+ //处理数据
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message.success(msg)
|
|
|
+ getTableData()
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg)
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|