diff --git a/dangan-ui/src/api/dangan/collection.js b/dangan-ui/src/api/dangan/collection.js
index 1acbb98..7b4cbff 100644
--- a/dangan-ui/src/api/dangan/collection.js
+++ b/dangan-ui/src/api/dangan/collection.js
@@ -23,6 +23,16 @@ export function collectRecongnize(data) {
}
+// 新增档案目录 组
+export function collectRecongnizeZu(data) {
+ return request({
+ url: '/dangan/collect/recongnizeZu',
+ method: 'post',
+ data: data
+ })
+}
+
+
// 获取进度条
export function collectProgress() {
return request({
diff --git a/dangan-ui/src/views/dangan/collection/index.vue b/dangan-ui/src/views/dangan/collection/index.vue
index 9533924..b11efa5 100644
--- a/dangan-ui/src/views/dangan/collection/index.vue
+++ b/dangan-ui/src/views/dangan/collection/index.vue
@@ -37,10 +37,17 @@
OCR识别
-
+
+
+
+
+ 是否一组[OCR最多选择2张识别]
+ 是否双面
+
+
全选
@@ -215,7 +222,7 @@ import { catalogTreeselect } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listBookshelf } from "@/api/dangan/bookshelf";
-import { collectSaves, collectRecongnize, collectProgress } from "@/api/dangan/collection";
+import { collectSaves, collectRecongnize, collectProgress, collectRecongnizeZu } from "@/api/dangan/collection";
import '@/utils/WebScan';
export default {
@@ -256,6 +263,10 @@ export default {
pictureRecard: [],
// 是否全选
checkAll: false,
+ // 是否一组
+ isYiZu: false,
+ // 是否双面
+ isSuangMian: false,
// 扫描文件上传
smwj: {
loading: false,
@@ -584,22 +595,57 @@ export default {
},
// OCR识别
OCRRecognition(){
- let arr = [];
- this.pictureRecard.forEach(item => {
- if(item.checked){
- arr.push(item)
- }
- })
- if(arr.length>0){
- collectRecongnize(arr).then(response => {
- this.pictureRecard = [];
- this.$modal.msgSuccess("操作成功");
- });
+ if(this.isYiZu){
+ let checked = [];
+ let unchecked = [];
+ let singeOrDouble = 0
+ if(this.isSuangMian){
+ singeOrDouble = 1
+ }
+ this.pictureRecard.forEach(item => {
+ item.singeOrDouble = singeOrDouble
+ if(item.checked){
+ checked.push(item)
+ }else {
+ unchecked.push(item)
+ }
+ })
+ if(checked.length>0){ //collectRecongnizeZu
+ collectRecongnizeZu({
+ checked,
+ unchecked
+ }).then(response => {
+ this.pictureRecard = [];
+ this.$modal.msgSuccess("操作成功");
+ });
+ }else {
+ this.$alert(`请先选择需要识别的档案!`, `提示`, {
+ type: 'warning'
+ });
+ }
}else {
- this.$alert(`请先选择需要识别的档案!`, `提示`, {
- type: 'warning'
- });
+ let arr = [];
+ let singeOrDouble = 0
+ if(this.isSuangMian){
+ singeOrDouble = 1
+ }
+ this.pictureRecard.forEach(item => {
+ item.singeOrDouble = singeOrDouble
+ if(item.checked){
+ arr.push(item)
+ }
+ })
+ if(arr.length>0){
+ collectRecongnize(arr).then(response => {
+ this.pictureRecard = [];
+ this.$modal.msgSuccess("操作成功");
+ });
+ }else {
+ this.$alert(`请先选择需要识别的档案!`, `提示`, {
+ type: 'warning'
+ });
+ }
}
},
// 删除 点击上传