|
|
|
@ -49,10 +49,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="pictureRecard.length>0">
|
|
|
|
<div v-if="pictureRecard.length>0">
|
|
|
|
|
|
|
|
|
|
|
|
<div v-show="isFails" style="margin-bottom: 10px;width:80%;min-width:400px">
|
|
|
|
|
|
|
|
<el-alert title="未识别图片,请重新识别" type="warning" effect="dark" :closable="false"></el-alert>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
|
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
|
<div style="margin: 15px 0;"></div>
|
|
|
|
<div style="margin: 15px 0;"></div>
|
|
|
|
<el-checkbox v-for="item in pictureRecard" :label="item.picName" :key="item.id" v-model="item.checked" @change="handleCheckChange(item)">
|
|
|
|
<el-checkbox v-for="item in pictureRecard" :label="item.picName" :key="item.id" v-model="item.checked" @change="handleCheckChange(item)">
|
|
|
|
@ -206,13 +202,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="myProgress" v-show="openProgress">
|
|
|
|
<!--采集识别失败提示-->
|
|
|
|
<div style="font-size: 50px">
|
|
|
|
<el-dialog
|
|
|
|
<span style="color: #409EFF">{{ percentage }}</span> /
|
|
|
|
title="提示"
|
|
|
|
<span style="color: #67C23A">{{ checkLength }} </span>
|
|
|
|
:visible.sync="tsVisible"
|
|
|
|
|
|
|
|
width="500px">
|
|
|
|
|
|
|
|
<div style="padding: 0 30px; line-height: 30px">
|
|
|
|
|
|
|
|
OCR识别任务提交失败,请选择【暂不处理继续采集】或【重新提交任务】或【去任务记录】查看!
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div style="margin-top:20px;">拼命识别中...</div>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" plain @click="onZbqljxcj">暂不处理继续采集</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" plain @click="qxtjTask">重新提交任务</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" plain @click="goTask">去任务记录</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -222,16 +226,16 @@ import { listCatalog } from "@/api/dangan/catalog";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
import { getCabinetTree } from "@/api/dangan/cabinet";
|
|
|
|
import { getCabinetTree } from "@/api/dangan/cabinet";
|
|
|
|
import { collectSaves, collectRecongnize } from "@/api/dangan/collection";
|
|
|
|
import { collectSaves, collectRecongnize, reRecongnize } from "@/api/dangan/collection";
|
|
|
|
import '@/utils/WebScan';
|
|
|
|
import '@/utils/WebScan';
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Collection",
|
|
|
|
name: "Collection",
|
|
|
|
components: {Treeselect},
|
|
|
|
components: {Treeselect},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
isFails: false,
|
|
|
|
tsVisible: false,
|
|
|
|
|
|
|
|
taskId: null,
|
|
|
|
// 颜色模式,0:黑白 1:灰色 2:彩色
|
|
|
|
// 颜色模式,0:黑白 1:灰色 2:彩色
|
|
|
|
pixel: 1,
|
|
|
|
pixel: 1,
|
|
|
|
// 是否单面
|
|
|
|
// 是否单面
|
|
|
|
@ -272,9 +276,6 @@ export default {
|
|
|
|
wlsjNode: undefined,
|
|
|
|
wlsjNode: undefined,
|
|
|
|
list: []
|
|
|
|
list: []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
percentage: 0,
|
|
|
|
|
|
|
|
openProgress: false,
|
|
|
|
|
|
|
|
Interval : null
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
@ -602,43 +603,42 @@ export default {
|
|
|
|
this.checkLength = arr.length;
|
|
|
|
this.checkLength = arr.length;
|
|
|
|
|
|
|
|
|
|
|
|
if(arr.length>0){
|
|
|
|
if(arr.length>0){
|
|
|
|
this.percentage = 0;
|
|
|
|
|
|
|
|
this.openProgress = true;
|
|
|
|
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
if(response.fails&&response.fails.length>0){
|
|
|
|
|
|
|
|
this.pictureRecard = response.fails
|
|
|
|
|
|
|
|
this.isFails = true;
|
|
|
|
|
|
|
|
this.$alert(`${response.msg},请重新识别失败档案!`, `提示`, {
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.isFails = false;
|
|
|
|
|
|
|
|
this.pictureRecard = [];
|
|
|
|
this.pictureRecard = [];
|
|
|
|
|
|
|
|
this.checkAll = false;
|
|
|
|
this.$modal.msgSuccess(response.msg);
|
|
|
|
this.$modal.msgSuccess(response.msg);
|
|
|
|
|
|
|
|
}).catch((err)=>{
|
|
|
|
|
|
|
|
console.log(123,err);
|
|
|
|
|
|
|
|
if(err.taskId){
|
|
|
|
|
|
|
|
this.taskId = err.taskId;
|
|
|
|
|
|
|
|
this.tsVisible = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.checkAll = false;
|
|
|
|
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
|
|
|
|
this.openProgress = false;
|
|
|
|
|
|
|
|
}).catch(()=>{
|
|
|
|
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
|
|
|
|
this.openProgress = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.Interval = setInterval(()=> {
|
|
|
|
|
|
|
|
if(this.percentage===this.checkLength || this.percentage>this.checkLength){
|
|
|
|
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
|
|
|
|
this.Interval = null;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.getProgress()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 5000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.$alert(`请先选择需要识别的档案!`, `提示`, {
|
|
|
|
this.$alert(`请先选择需要识别的档案!`, `提示`, {
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 暂不处理继续采集
|
|
|
|
|
|
|
|
onZbqljxcj(){
|
|
|
|
|
|
|
|
this.pictureRecard = [];
|
|
|
|
|
|
|
|
this.checkAll = false;
|
|
|
|
|
|
|
|
this.tsVisible = false;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 重新提交任务
|
|
|
|
|
|
|
|
qxtjTask(){
|
|
|
|
|
|
|
|
reRecongnize({taskId: this.taskId}).then(response => {
|
|
|
|
|
|
|
|
this.pictureRecard = [];
|
|
|
|
|
|
|
|
this.checkAll = false;
|
|
|
|
|
|
|
|
this.tsVisible = false;
|
|
|
|
|
|
|
|
this.$modal.msgSuccess(response.msg);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 去任务记录页面
|
|
|
|
|
|
|
|
goTask(){
|
|
|
|
|
|
|
|
this.$router.push("/task");
|
|
|
|
|
|
|
|
},
|
|
|
|
// 删除 点击上传
|
|
|
|
// 删除 点击上传
|
|
|
|
deleteFile(index){
|
|
|
|
deleteFile(index){
|
|
|
|
this.fileList.splice(index, 1);
|
|
|
|
this.fileList.splice(index, 1);
|
|
|
|
@ -661,29 +661,7 @@ export default {
|
|
|
|
// 创建File对象
|
|
|
|
// 创建File对象
|
|
|
|
const file = new File([blob], fileName, {type: mimeString});
|
|
|
|
const file = new File([blob], fileName, {type: mimeString});
|
|
|
|
return file;
|
|
|
|
return file;
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 查询识别进度 */
|
|
|
|
|
|
|
|
getProgress() {
|
|
|
|
|
|
|
|
// 向给定ID的用户发起请求
|
|
|
|
|
|
|
|
//axios.post('http://20.206.150.166:22443/get_file_count',`username=${this.$store.state.user.name}`, {
|
|
|
|
|
|
|
|
axios.post('http://123.57.142.195:443/get_file_count',`username=${this.$store.state.user.name}`, {
|
|
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
.then( (response)=> {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.percentage = response.data.file_counts;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.percentage===this.checkLength||this.percentage>this.checkLength){
|
|
|
|
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
|
|
|
|
this.Interval = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error)=> {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|