|
|
|
@ -118,9 +118,9 @@
|
|
|
|
v-hasPermi="['dangan:pictureRecard:export']"
|
|
|
|
v-hasPermi="['dangan:pictureRecard:export']"
|
|
|
|
>导出图片</el-button>
|
|
|
|
>导出图片</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<!-- <el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button icon="el-icon-full-screen" size="mini" type="primary" @click="OCRRecognition">OCR识别</el-button>
|
|
|
|
<el-button icon="el-icon-full-screen" size="mini" type="primary" @click="OCRRecognition">OCR识别</el-button>
|
|
|
|
</el-col>-->
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="pictureRecardList" @selection-change="handleSelectionChange" border>
|
|
|
|
<el-table v-loading="loading" :data="pictureRecardList" @selection-change="handleSelectionChange" border>
|
|
|
|
@ -132,8 +132,8 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>-->
|
|
|
|
</el-table-column>-->
|
|
|
|
<el-table-column label="档案目录路径" align="center" prop="muPath" min-width="120" show-overflow-tooltip/>
|
|
|
|
<el-table-column label="档案目录路径" align="center" prop="muPath" min-width="120" show-overflow-tooltip/>
|
|
|
|
<el-table-column label="档案室密集柜ID" align="center" prop="wlsjId" min-width="90"/>
|
|
|
|
<el-table-column label="档案室密集柜ID" align="center" prop="wlsjId" min-width="120"/>
|
|
|
|
<el-table-column label="档案室密集柜路径" align="center" prop="wlsjPath" min-width="100" show-overflow-tooltip/>
|
|
|
|
<el-table-column label="档案室密集柜路径" align="center" prop="wlsjPath" min-width="140" show-overflow-tooltip/>
|
|
|
|
<el-table-column label="是否已经识别" align="center" prop="recognize" min-width="120" show-overflow-tooltip>
|
|
|
|
<el-table-column label="是否已经识别" align="center" prop="recognize" min-width="120" show-overflow-tooltip>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<dict-tag :options="dict.type.recognize" :value="scope.row.recognize"/>
|
|
|
|
<dict-tag :options="dict.type.recognize" :value="scope.row.recognize"/>
|
|
|
|
@ -175,27 +175,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="myProgress" v-show="openProgress">
|
|
|
|
<!--采集识别失败提示-->
|
|
|
|
<div style="font-size: 50px">
|
|
|
|
<el-dialog
|
|
|
|
<span style="color: #409EFF">{{ percentage }}</span> /
|
|
|
|
title="提示"
|
|
|
|
<span style="color: #67C23A">{{ selectionList.length }} </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">
|
|
|
|
</div>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listPictureRecard, delPictureRecard } from "@/api/dangan/pictureRecard";
|
|
|
|
import { listPictureRecard, delPictureRecard } from "@/api/dangan/pictureRecard";
|
|
|
|
import { collectRecongnize } from "@/api/dangan/collection";
|
|
|
|
import { collectRecongnize, reRecongnize } from "@/api/dangan/collection";
|
|
|
|
import axios from 'axios'
|
|
|
|
import { listTask } from "@/api/dangan/task";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "PictureRecard",
|
|
|
|
name: "PictureRecard",
|
|
|
|
dicts: ['recognize', 'yw_type', 'error_correct'],
|
|
|
|
dicts: ['recognize', 'yw_type', 'error_correct', 'total_task', 'tatal_task_pic'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
tsVisible: false,
|
|
|
|
|
|
|
|
taskId: null,
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
|
loading: true,
|
|
|
|
loading: true,
|
|
|
|
// 选中数组
|
|
|
|
// 选中数组
|
|
|
|
@ -282,7 +291,11 @@ export default {
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// OCR识别
|
|
|
|
// OCR识别
|
|
|
|
OCRRecognition(){
|
|
|
|
async OCRRecognition(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let tatal_task_pic = this.dict.type.tatal_task_pic;
|
|
|
|
|
|
|
|
let total_task = this.dict.type.total_task;
|
|
|
|
|
|
|
|
|
|
|
|
let arr = [];
|
|
|
|
let arr = [];
|
|
|
|
let singeOrDouble = 0
|
|
|
|
let singeOrDouble = 0
|
|
|
|
if(this.queryParams.ywType==='option1'){
|
|
|
|
if(this.queryParams.ywType==='option1'){
|
|
|
|
@ -292,34 +305,66 @@ export default {
|
|
|
|
item.singeOrDouble = singeOrDouble
|
|
|
|
item.singeOrDouble = singeOrDouble
|
|
|
|
arr.push(item);
|
|
|
|
arr.push(item);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(arr.length>0){
|
|
|
|
|
|
|
|
this.percentage = 0;
|
|
|
|
if (arr.length === 0) {
|
|
|
|
this.openProgress = true;
|
|
|
|
this.$alert(`请先选择需要识别的档案!`, `提示`, {
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
type: 'warning'
|
|
|
|
this.selectionList = [];
|
|
|
|
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
|
|
|
|
this.openProgress = false;
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
}).catch(()=>{
|
|
|
|
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
|
|
|
|
this.openProgress = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(arr.length > tatal_task_pic[0].value){
|
|
|
|
|
|
|
|
this.$alert(`单任务图片最大数是【${tatal_task_pic[0].value}】!`, `提示`, {
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.Interval = setInterval(()=> {
|
|
|
|
let total1 = await listTask({status: '1'}).then(response => {
|
|
|
|
if(this.percentage===this.selectionList.length||this.percentage>this.selectionList.length){
|
|
|
|
return response.total;
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
});
|
|
|
|
this.Interval = null;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.getProgress()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 5000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
if(total1 > total_task[0].value || total1 == total_task[0].value){
|
|
|
|
this.$alert(`请先选择需要识别的档案!`, `提示`, {
|
|
|
|
this.$alert(`同时接收任务最大数【${total_task[0].value}】,请稍后再试!`, `提示`, {
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const loading = this.$loading({
|
|
|
|
|
|
|
|
lock: true,
|
|
|
|
|
|
|
|
text: 'Loading',
|
|
|
|
|
|
|
|
spinner: 'el-icon-loading',
|
|
|
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
|
|
|
|
this.selectionList = [];
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
|
|
loading.close();
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
}).catch((err)=>{
|
|
|
|
|
|
|
|
loading.close();
|
|
|
|
|
|
|
|
this.taskId = err.taskId;
|
|
|
|
|
|
|
|
this.tsVisible = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 暂不处理继续采集
|
|
|
|
|
|
|
|
onZbqljxcj(){
|
|
|
|
|
|
|
|
this.selectionList = [];
|
|
|
|
|
|
|
|
this.tsVisible = false;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 重新提交任务
|
|
|
|
|
|
|
|
qxtjTask(){
|
|
|
|
|
|
|
|
reRecongnize({taskId: this.taskId}).then(response => {
|
|
|
|
|
|
|
|
this.selectionList = [];
|
|
|
|
|
|
|
|
this.tsVisible = false;
|
|
|
|
|
|
|
|
this.$modal.msgSuccess(response.msg);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 去任务记录页面
|
|
|
|
|
|
|
|
goTask(){
|
|
|
|
|
|
|
|
this.$router.push("/task");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
|
@ -332,30 +377,7 @@ export default {
|
|
|
|
this.download('dangan/pictureRecard/exportImage', {
|
|
|
|
this.download('dangan/pictureRecard/exportImage', {
|
|
|
|
...this.queryParams
|
|
|
|
...this.queryParams
|
|
|
|
}, `上传历史记录图片_${new Date().getTime()}.zip`)
|
|
|
|
}, `上传历史记录图片_${new Date().getTime()}.zip`)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
/** 查询识别进度 */
|
|
|
|
|
|
|
|
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 = Math.round((response.data.file_counts/this.selectionList.length)*100);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.percentage = response.data.file_counts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.percentage===this.selectionList.length||this.percentage>this.selectionList.length){
|
|
|
|
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
|
|
|
|
this.Interval = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(function (error) {
|
|
|
|
|
|
|
|
// 处理错误情况
|
|
|
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
@ -365,22 +387,6 @@ export default {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.myProgress{
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
|
|
top:0;
|
|
|
|
|
|
|
|
left:0;
|
|
|
|
|
|
|
|
z-index: 10000;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
background: rgba(0,0,0,0.7);
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.c-tabs__item {
|
|
|
|
.c-tabs__item {
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
text-align: right;
|
|
|
|
text-align: right;
|
|
|
|
|