You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1366 lines
49 KiB

<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="70px">
<el-form-item label="业务类型" prop="ywType">
<el-select
v-model="queryParams.ywType"
placeholder="业务类型"
clearable
style="width:100%"
>
<el-option
v-for="dict in dict.type.yw_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="任务状态"
clearable
style="width:100%"
>
<el-option
v-for="dict in dict.type.task_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="taskList" border>
<el-table-column label="任务ID" align="center" prop="id" min-width="60" show-overflow-tooltip/>
<el-table-column label="创建人" align="center" prop="createBy" min-width="60" show-overflow-tooltip/>
<el-table-column label="创建时间" align="center" prop="createTime" min-width="100" show-overflow-tooltip/>
<el-table-column label="业务类型" align="center" prop="ywType" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
<dict-tag :options="dict.type.yw_type" :value="scope.row.ywType"/>
</template>
</el-table-column>
<el-table-column label="档案目录路径" align="center" prop="muPath" min-width="120" show-overflow-tooltip/>
<el-table-column label="总数量" align="center" prop="num" />
<el-table-column label="任务状态" align="center" prop="status" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
<dict-tag :options="dict.type.task_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="200">
<template slot-scope="scope">
<el-button
v-if="scope.row.status==='0'|| scope.row.status==='3'|| scope.row.status==='4'"
size="mini"
type="text"
@click="cjsbrw(scope.row)"
>重新提交任务</el-button>
<el-button
v-if="scope.row.status==='2'&& (scope.row.failNum>0 || scope.row.failNum===null) "
size="mini"
type="text"
@click="cjsbrw(scope.row)"
>重新识别失败图片</el-button>
<el-button
v-if="scope.row.status==='2' || (scope.row.status==='-1'&& (scope.row.failNum!==null)) || scope.row.status==='4'"
size="mini"
type="text"
@click="handleUpdate1(scope.row)"
>任务详情</el-button>
<el-button
v-if="scope.row.status==='1'"
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>任务进度</el-button>
<el-button
v-if="scope.row.status==='2' || (scope.row.status==='-1'&& (scope.row.failNum!==null)) || scope.row.status==='4'"
size="mini"
type="text"
@click="viewDetail(scope.row)"
>档案数据</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dangan:task:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 任务进度/任务详情 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body class="rwjd">
<div class="rw_con">
<div class="num">
<span style="color:#409EFF;">总数量:{{ form.num }}</span>
<el-link type="primary" @click="getALLPicture(form.picIds)">查看所有图片</el-link>
</div>
<div class="num" v-if="form.status==='1' && form.failNum>0">
<span style="color:#409EFF;">重新识别数量:{{ form.lastNum }}</span>
</div>
<div class="num" v-if="form.status==='1'">
<span style="color:#67C23A;">正在识别:{{percentage}}</span>
</div>
<div class="num" v-if="form.status==='2'||form.status==='-1'">
<span style="color:#67C23A;">成功:{{ form.successNum }}</span>
<el-link type="success" v-if="form.successNum && form.successNum>0" @click="getSuccessPicture(form.successIds)">查看成功图片</el-link>
</div>
<div class="num" v-if="form.status==='2'||form.status==='-1'">
<span style="color:#F56C6C;">失败:{{ form.failNum }}</span>
<el-link type="danger" v-if="form.failNum && form.failNum>0" @click="getFailPicture(form.failIds)">查看失败图片</el-link>
</div>
<div class="num" style="color:#F56C6C;" v-if="(form.status==='2'||form.status==='-1')&&form.failNum && form.failNum>0">失败原因:{{ form.remark }}</div>
<div class="num" style="color:#F56C6C;" v-if="form.status==='4'">异常原因:{{ form.remark }}</div>
</div>
</el-dialog>
<!-- 查看相关图片 -->
<el-dialog :title="xgtp.title" :visible.sync="xgtp.open" width="800px" append-to-body top="6vh">
<div>
<el-table v-loading="xgtp.loading" :data="xgtp.list" border>
<el-table-column label="图片ID" align="center" prop="id" fixed min-width="90"/>
<!-- <el-table-column label="档案室密集柜路径" align="center" prop="wlsjPath" min-width="120" show-overflow-tooltip/>-->
<el-table-column label="图片路径" align="center" prop="picUrl">
<template slot-scope="scope">
<image-preview :src="scope.row.picUrl" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="xgtp.title==='失败图片'">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="onSdsb(scope.row)"
>手动识别</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="xgtp.total>0"
:total="xgtp.total"
:page.sync="xgtp.queryParams.pageNum"
:limit.sync="xgtp.queryParams.pageSize"
@pagination="xgtpQuery"
/>
</div>
</el-dialog>
<!--更换识别类型-->
<el-dialog title="识别类型确认" :visible.sync="dAType.open" width="500px" append-to-body>
<div style="padding: 0 40px 40px;">
<el-select v-if="dAType.selRow && (dAType.selRow.ywType==='option1')"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions0"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-if="dAType.selRow && (dAType.selRow.ywType==='option3'||dAType.selRow.ywType==='option9'||dAType.selRow.ywType==='option2')"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions1"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-if="dAType.selRow && dAType.selRow.ywType==='option4'"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions2"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-if="dAType.selRow && dAType.selRow.ywType==='option6'"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions3"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-if="dAType.selRow && dAType.selRow.ywType==='option5'"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions4"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-if="dAType.selRow && dAType.selRow.ywType==='option8'"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions5"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-if="dAType.selRow && dAType.selRow.ywType==='option7'"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions6"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-if="dAType.selRow && dAType.selRow.ywType==='option12'"
v-model="dAType.sbType"
placeholder="请选择识别类型"
clearable
style="width:100%"
>
<el-option
v-for="item in dAType.sbTypeOptions7"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div style="text-align: center">
<el-button type="primary" @click="sbTypeSubmit">确定</el-button>
</div>
</el-dialog>
<!-- 手动识别-->
<el-dialog title="手动识别" :visible.sync="shiBie.open" width="90%" append-to-body top="10px !important">
<div style="height: 86vh;">
<el-form ref="shiBieForm" :model="shiBie.form" label-width="60px">
<el-row :gutter="20">
<el-col :span="12">
<el-carousel height="calc(86vh - 100px)" :autoplay="false">
<el-carousel-item>
<div class="jc_sb_img" style="height:100%; overflow:auto; text-align:center; font-size:0">
<el-image style="height:100%;" :src="shiBie.form.pictures" fit="contain" :preview-src-list="[shiBie.form.pictures]"></el-image>
</div>
</el-carousel-item>
</el-carousel>
</el-col>
<!--常住人口登记表1-->
<el-col :span="12">
<el-row :gutter="10" v-if="shiBie.form.ywType==='option1'">
<el-col :span="24">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="addOption1"
>添加行</el-button>
</el-col>
<el-col :span="24" style="margin-top: 10px;">
<el-row v-for="(item,index) in option1List" :key="index">
<el-col :span="8">
<el-form-item label="户主或与户主关系" label-width="130px">
<el-input v-model="item.relation" placeholder="请输入户主或与户主关系" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="姓名" label-width="60px">
<el-input v-model="item.name" placeholder="请输入姓名" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出生年月日" label-width="100px">
<el-input v-model="item.birthday" placeholder="请输入出生年月日" />
</el-form-item>
</el-col>
<el-col :span="2" style="text-align: center">
<el-button type="danger" icon="el-icon-delete" circle @click="delOption1(index)"></el-button>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
<!--常住人口登记表2-->
<el-col :span="12" v-if="shiBie.form.ywType==='option3'">
<el-form-item label="户主姓名" prop="hzName" label-width="90px">
<el-input v-model="shiBie.form.hzName" placeholder="请输入户主姓名" />
</el-form-item>
<el-form-item label="姓名" prop="name" label-width="90px">
<el-input v-model="shiBie.form.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="出生日期" prop="birthday" label-width="90px">
<el-input v-model="shiBie.form.birthday" placeholder="请输入出生日期" />
</el-form-item>
<el-form-item label="身份证号" prop="cardId" label-width="90px">
<el-input v-model="shiBie.form.cardId" placeholder="请输入身份证号" />
</el-form-item>
</el-col>
<!--常住人口登记表3-->
<el-col :span="12" v-if="shiBie.form.ywType==='option9'">
<el-form-item label="户主姓名" prop="hzName" label-width="90px">
<el-input v-model="shiBie.form.hzName" placeholder="请输入户主姓名" />
</el-form-item>
<el-form-item label="姓名" prop="name" label-width="90px">
<el-input v-model="shiBie.form.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="出生日期" prop="birthday" label-width="90px">
<el-input v-model="shiBie.form.birthday" placeholder="请输入出生日期" />
</el-form-item>
<el-form-item label="监护人1" prop="jhr1" label-width="90px">
<el-input v-model="shiBie.form.jhr1" placeholder="请输入监护人1" />
</el-form-item>
<el-form-item label="监护人2" prop="jhr2" label-width="90px">
<el-input v-model="shiBie.form.jhr2" placeholder="请输入监护人2" />
</el-form-item>
<el-form-item label="监护关系1" prop="jhgx1" label-width="90px">
<el-input v-model="shiBie.form.jhgx1" placeholder="请输入监护关系1" />
</el-form-item>
<el-form-item label="监护关系2" prop="jhgx2" label-width="90px">
<el-input v-model="shiBie.form.jhgx2" placeholder="请输入监护关系2" />
</el-form-item>
<el-form-item label="身份证号" prop="cardId" label-width="90px">
<el-input v-model="shiBie.form.cardId" placeholder="请输入身份证号" />
</el-form-item>
</el-col>
<!--常住卡-->
<el-col :span="12" v-if="shiBie.form.ywType==='option2'">
<el-form-item label="户主姓名与户主关系" prop="relation" label-width="140px">
<el-input v-model="shiBie.form.relation" placeholder="请输入户主姓名与户主关系" />
</el-form-item>
<el-form-item label="姓名" prop="name" label-width="140px">
<el-input v-model="shiBie.form.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="出生日期" prop="birthday" label-width="140px">
<el-input v-model="shiBie.form.birthday" placeholder="请输入出生日期" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="shiBie.form.ywType==='option4'">
<el-form-item label="婴儿姓名" prop="name" label-width="100px">
<el-input v-model="shiBie.form.name" placeholder="请输入婴儿姓名" />
</el-form-item>
<el-form-item label="出生时间" prop="birthday" label-width="100px">
<el-input v-model="shiBie.form.birthday" placeholder="请输入出生时间" />
</el-form-item>
<el-form-item label="母亲姓名" prop="mName" label-width="100px">
<el-input v-model="shiBie.form.mName" placeholder="请输入母亲姓名" />
</el-form-item>
<el-form-item label="母亲身份证号" prop="mCardId" label-width="100px">
<el-input v-model="shiBie.form.mCardId" placeholder="请输入母亲身份证号" />
</el-form-item>
<el-form-item label="父亲姓名" prop="fName" label-width="100px">
<el-input v-model="shiBie.form.fName" placeholder="请输入父亲姓名" />
</el-form-item>
<el-form-item label="父亲身份证号" prop="fCardId" label-width="100px">
<el-input v-model="shiBie.form.fCardId" placeholder="请输入父亲身份证号" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="shiBie.form.ywType==='option5'">
<el-form-item label="姓名1" prop="name1" label-width="120px">
<el-input v-model="shiBie.form.name1" placeholder="请输入姓名1" />
</el-form-item>
<el-form-item label="居民身份证编号1" prop="cardId1" label-width="120px">
<el-input v-model="shiBie.form.cardId1" placeholder="请输入居民身份证编号1" />
</el-form-item>
<el-form-item label="姓名2" prop="name2" label-width="120px">
<el-input v-model="shiBie.form.name2" placeholder="请输入姓名2" />
</el-form-item>
<el-form-item label="居民身份证编号2" prop="cardId2" label-width="120px">
<el-input v-model="shiBie.form.cardId2" placeholder="请输入居民身份证编号2" />
</el-form-item>
<el-form-item label="姓名3" prop="name3" label-width="120px">
<el-input v-model="shiBie.form.name3" placeholder="请输入姓名3" />
</el-form-item>
<el-form-item label="居民身份证编号3" prop="cardId3" label-width="120px">
<el-input v-model="shiBie.form.cardId3" placeholder="请输入居民身份证编号3" />
</el-form-item>
<el-form-item label="姓名4" prop="name4" label-width="120px">
<el-input v-model="shiBie.form.name4" placeholder="请输入姓名4" />
</el-form-item>
<el-form-item label="居民身份证编号4" prop="cardId4" label-width="120px">
<el-input v-model="shiBie.form.cardId4" placeholder="请输入居民身份证编号4" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="shiBie.form.ywType==='option6'">
<el-form-item label="姓名女" label-width="90px">
<el-input v-model="shiBie.form.wName" placeholder="请输入姓名女" />
</el-form-item>
<el-form-item label="身份证号女" label-width="90px">
<el-input v-model="shiBie.form.wCardId" placeholder="请输入身份证号女" />
</el-form-item>
<el-form-item label="姓名男" label-width="90px">
<el-input v-model="shiBie.form.mName" placeholder="请输入姓名男" />
</el-form-item>
<el-form-item label="身份证号男" label-width="90px">
<el-input v-model="shiBie.form.mCardId" placeholder="请输入身份证号男" />
</el-form-item>
<el-form-item label="出生日期" label-width="90px">
<el-input v-model="shiBie.form.birthday" placeholder="请输入出生日期" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="shiBie.form.ywType==='option7'">
<el-form-item label="申请人姓名" prop="name" label-width="90px">
<el-input v-model="shiBie.form.name" placeholder="请输入申请人姓名" />
</el-form-item>
<el-form-item label="姓名1" prop="name1" label-width="90px">
<el-input v-model="shiBie.form.name1" placeholder="请输入姓名1" />
</el-form-item>
<el-form-item label="姓名2" prop="name2" label-width="90px">
<el-input v-model="shiBie.form.name2" placeholder="请输入姓名2" />
</el-form-item>
<el-form-item label="姓名3" prop="name3" label-width="90px">
<el-input v-model="shiBie.form.name3" placeholder="请输入姓名3" />
</el-form-item>
<el-form-item label="姓名4" prop="name4" label-width="90px">
<el-input v-model="shiBie.form.name4" placeholder="请输入姓名4" />
</el-form-item>
<el-form-item label="姓名5" prop="name5" label-width="90px">
<el-input v-model="shiBie.form.name5" placeholder="请输入姓名5" />
</el-form-item>
</el-col>
<el-col :span="12" class="jc_sb" v-if="shiBie.form.ywType==='option8'">
<el-form-item label="申请人姓名" prop="name" label-width="90px">
<el-input v-model="shiBie.form.name" placeholder="请输入申请人姓名" />
</el-form-item>
<el-form-item label="身份证号" prop="cardId" label-width="90px">
<el-input v-model="shiBie.form.cardId" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="姓名1" prop="name1" label-width="90px">
<el-input v-model="shiBie.form.name1" placeholder="请输入姓名1" />
</el-form-item>
<el-form-item label="出生日期1" prop="birthDate1" label-width="90px">
<el-input v-model="shiBie.form.birthDate1" placeholder="请输入出生日期1" />
</el-form-item>
<el-form-item label="身份证号1" prop="cardId1" label-width="90px">
<el-input v-model="shiBie.form.cardId1" placeholder="请输入身份证号1" />
</el-form-item>
<el-form-item label="姓名2" prop="name2" label-width="90px">
<el-input v-model="shiBie.form.name2" placeholder="请输入姓名2" />
</el-form-item>
<el-form-item label="出生日期2" prop="birthDate2" label-width="90px">
<el-input v-model="shiBie.form.birthDate2" placeholder="请输入出生日期2" />
</el-form-item>
<el-form-item label="身份证号2" prop="cardId2" label-width="90px">
<el-input v-model="shiBie.form.cardId2" placeholder="请输入身份证号2" />
</el-form-item>
<el-form-item label="姓名3" prop="name3" label-width="90px">
<el-input v-model="shiBie.form.name3" placeholder="请输入姓名3" />
</el-form-item>
<el-form-item label="出生日期3" prop="birthDate3" label-width="90px">
<el-input v-model="shiBie.form.birthDate3" placeholder="请输入出生日期3" />
</el-form-item>
<el-form-item label="身份证号3" prop="cardId3" label-width="90px">
<el-input v-model="shiBie.form.cardId3" placeholder="请输入身份证号3" />
</el-form-item>
<el-form-item label="姓名4" prop="name4" label-width="90px">
<el-input v-model="shiBie.form.name4" placeholder="请输入姓名4" />
</el-form-item>
<el-form-item label="出生日期4" prop="birthDate4" label-width="90px">
<el-input v-model="shiBie.form.birthDate4" placeholder="请输入出生日期4" />
</el-form-item>
<el-form-item label="身份证号4" prop="cardId4" label-width="90px">
<el-input v-model="shiBie.form.cardId4" placeholder="请输入身份证号4" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="shiBie.form.ywType==='option12'">
<el-form-item label="全文识别内容" prop="allInfo" label-width="100px">
<el-input v-model="shiBie.form.allInfo" type="textarea" placeholder="请输入全文识别内容" :rows="10"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align:right; margin-top: 30px;">
<el-button type="primary" @click="shiBieSubmit">确 定</el-button>
<el-button @click="shiBieCancel">取 消</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { listTask, listByIds, getTask, delTask } from "@/api/dangan/task";
import { reRecongnize } from "@/api/dangan/collection";
import { addCzrkdj, batchAdd } from "@/api/dangan/czrkdj";
import { addBirthDJ } from "@/api/dangan/birthDJ";
import { addYtzm } from "@/api/dangan/ytzm";
import { addQyz } from "@/api/dangan/qyz";
import { addZqz } from "@/api/dangan/zqz";
import { addZfnyhkcg } from "@/api/dangan/zfnyhkcg";
import { addQuanwen } from "@/api/dangan/quanwen";
import axios from "axios";
export default {
name: "Task",
dicts: ['task_status', 'yw_type', 'total_task'],
data() {
return {
// 档案类型
dAType: {
// 弹出框
open: false,
sbType: null,
// 常住人口登记表
sbTypeOptions0: [
{ label:'常住人口登记表1', value:'option1' },
{ label:'常住人口登记表2', value:'option3' },
{ label:'常住人口登记表3', value:'option9' },
{ label:'常住卡', value:'option2' },
{ label:'常住1全文识别类型', value:'option11' },
],
// 常住人口登记表
sbTypeOptions1: [
{ label:'常住人口登记表1', value:'option1' },
{ label:'常住人口登记表2', value:'option3' },
{ label:'常住人口登记表3', value:'option9' },
{ label:'常住卡', value:'option2' },
],
// 出生医学证明
sbTypeOptions2: [
{ label:'出生医学证明', value:'option4' }
],
// 一胎证明
sbTypeOptions3: [
{ label:'一胎证明', value:'option6' }
],
// 迁移证
sbTypeOptions4: [
{ label:'迁移证', value:'option5' }
],
// 准迁证
sbTypeOptions5: [
{ label:'准迁证', value:'option8' }
],
// 转非农业人口批复存根
sbTypeOptions6: [
{ label:'转非农业人口批复存根', value:'option7' }
],
// 全文识别类型
sbTypeOptions7: [
{ label:'全文识别类型', value:'option12' }
],
selRow: null
},
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 识别任务记录表格数据
taskList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
num: null,
status: null
},
form: {},
// 识别进度
percentage: null,
// 相关图片
xgtp:{
title: null,
open: false,
list: [],
total: 0,
queryParams:{
pageNum: 1,
pageSize: 10,
ids: null
}
},
shiBie: {
open: false,
form: {}
},
// 常驻1批量添加列表
option1List: []
};
},
created() {
this.getList();
},
methods: {
/** 查询识别任务记录列表 */
getList() {
this.loading = true;
listTask(this.queryParams).then(response => {
this.taskList = response.rows;
this.total = response.total;
this.loading = false;
});
},
getALLPicture(ids){
this.xgtp.queryParams.pageNum = 1;
this.xgtp.queryParams.ids = ids;
this.xgtp.title="所有图片";
this.xgtp.open = true;
this.xgtpQuery();
},
getFailPicture(ids){
this.xgtp.queryParams.pageNum = 1;
this.xgtp.queryParams.ids = ids;
this.xgtp.title="失败图片";
this.xgtp.open = true;
this.xgtpQuery();
},
getSuccessPicture(ids){
this.xgtp.queryParams.pageNum = 1;
this.xgtp.queryParams.ids = ids;
this.xgtp.title="成功图片";
this.xgtp.open = true;
this.xgtpQuery();
},
xgtpQuery(){
this.xgtp.list = [];
this.xgtp.loading = true;
listByIds(this.xgtp.queryParams).then(response => {
this.xgtp.list = response.rows;
this.xgtp.total = response.total;
this.xgtp.loading = false;
}).catch(()=>{
this.xgtp.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 修改按钮操作 */
handleUpdate(row) {
this.percentage = null;
getTask(row.id).then(response => {
this.form = response.data;
if(this.form.status==='2'){
this.$modal.msgSuccess("识别已结束");
this.getList()
}else {
this.open = true;
this.getProgress();
this.title = "任务进度";
}
});
},
handleUpdate1(row) {
this.form = row;
this.open = true;
this.title = "任务详情";
},
// 创建识别任务
cjsbrw(row){
this.dAType.selRow = row;
this.dAType.sbType = row.ywType;
this.dAType.open = true;
/*if(row.failNum===row.num){
this.dAType.sbType = row.ywType;
this.dAType.open = true;
}else {
this.onReRecongnize()
}*/
},
// 识别类型选择
sbTypeSubmit(){
if(this.dAType.sbType){
this.dAType.open = false;
this.onReRecongnize()
}else {
this.$alert(`请先选择识别类型!`, `提示`, {
type: 'warning'
});
}
},
async onReRecongnize(){
let total_task = this.dict.type.total_task;
let total1 = await listTask({status: '-1'}).then(response => {
return response.total;
});
if(total1 > total_task[0].value || total1 == total_task[0].value){
this.$alert(`已到达【任务等待】最大数【${total_task[0].value}】,请稍后再试!`, `提示`, {
type: 'warning'
});
return;
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
reRecongnize({taskId: this.dAType.selRow.id, sbType: this.dAType.sbType?this.dAType.sbType:this.dAType.selRow.ywType}).then(response => {
loading.close();
this.dAType.sbType = null;
this.$modal.msgSuccess(response.msg);
this.getList()
})
},
/** 查询识别进度 */
getProgress() {
// 向给定ID的用户发起请求
//axios.post('https://4493yu98cz42.vicp.fun/get_file_count',`taskId=${this.form.id}`, {
//axios.post('http://ocr.nat300.top/get_file_count',`taskId=${this.form.id}`, {
// axios.post('http://119.45.15.215:2332/get_file_count',`taskId=${this.form.id}`, {
axios.post('http://20.206.150.166:22443/get_file_count',`taskId=${this.form.id}`, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}).then((response)=>{
if(response.data.file_counts===0 && response.data.total===0){
this.percentage = response.data.msg;
}else {
this.percentage = response.data.file_counts
}
}).catch(function (error) {
this.percentage = 0
})
},
//手动识别
onSdsb(row){
console.log(4545, row);
this.option1List=[];
if(this.form.ywType==='option1'||this.form.ywType==='option3'||this.form.ywType==='option9'||this.form.ywType==='option2'){
this.shiBie.form = {
id: null,
ywType: null,
taskId: null,
muId: null,
muPath: null,
relation: null,
allInfo: null,
name: null,
otherName: null,
usedName: null,
sex: null,
jhr1: null,
jhgx1: null,
jhr2: null,
jhgx2: null,
gmcszqfrq: null,
birthday: null,
address: null,
yj: null,
nation: null,
zjxy: null,
whcd: null,
hyzk: null,
zyjfwcs: null,
bxsqtzz: null,
gmzdhhmqfjgjrq: null,
hsyhdqlbxshsdjhk: null,
hsybxshcqlhsdjhk: null,
hshyqwhd: null,
zxhkrq: null,
zxhkyy: null,
hkdjsxbgjznrsjjblrz1: null,
hkdjsxbgjznrsjjblrz2: null,
jiguan: null,
xzz: null,
hzName: null,
hb: null,
djrq: null,
byzk: null,
height: null,
blood: null,
zy: null,
slReason: null,
sljmsfzqm: null,
qfyj: null,
yxrq: null,
cardId: null,
picIds: null,
pictures: null,
allPicIds: null,
allPics: null,
errorCorrect: null,
auditStatus: null,
auditName: null,
auditResult: null,
auditReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
}
if(this.form.ywType==='option4'){
this.shiBie.form = {
id: null,
ywType: 'option4',
taskId: null,
muId: null,
muPath: null,
birthNum: null,
name: null,
birthday: null,
sex: null,
bornAddress: null,
mName: null,
mAge: null,
mGj: null,
mNation: null,
mCardId: null,
fName: null,
fAge: null,
fGj: null,
fNation: null,
fCardId: null,
homeAddress: null,
momSign: null,
jsrySign: null,
jsUnit: null,
djType: null,
picIds: null,
pictures: null,
allPicIds: null,
allPics: null,
errorCorrect: null,
auditStatus: null,
auditName: null,
auditResult: null,
auditReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
}
if(this.form.ywType==='option5'){
this.shiBie.form = {
id: null,
ywType: 'option5',
taskId: null,
muId: null,
muPath: null,
fwUnit: null,
wjXh: null,
name1: null,
sex1: null,
cardId1: null,
name2: null,
sex2: null,
cardId2: null,
name3: null,
sex3: null,
cardId3: null,
name4: null,
sex4: null,
cardId4: null,
qyReason: null,
yAddress: null,
qwAddress: null,
sDate: null,
eDate: null,
cbr: null,
picIds: null,
pictures: null,
allPicIds: null,
allPics: null,
errorCorrect: null,
auditStatus: null,
auditName: null,
auditResult: null,
auditReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
}
if(this.form.ywType==='option6'){
this.shiBie.form = {
id: null,
ywType: 'option6',
taskId: null,
muId: null,
muPath: null,
year: null,
xh: null,
wName: null,
wUnit: null,
wCardId: null,
mName: null,
mUnit: null,
mCardId: null,
syzh: null,
birthday: null,
hospital: null,
babySex: null,
suggest: null,
pcsAddress: null,
tbDate1: null,
tbDate2: null,
picIds: null,
pictures: null,
allPicIds: null,
allPics: null,
errorCorrect: null,
auditStatus: null,
auditName: null,
auditResult: null,
auditReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
}
if(this.form.ywType==='option7'){
this.shiBie.form = {
id: null,
ywType: 'option6',
taskId: null,
muId: null,
muPath: null,
num: null,
name: null,
address: null,
relation1: null,
name1: null,
sex1: null,
relation2: null,
name2: null,
sex2: null,
relation3: null,
name3: null,
sex3: null,
relation4: null,
name4: null,
sex4: null,
relation5: null,
name5: null,
sex5: null,
jg1: null,
jg2: null,
cbr: null,
cbDate: null,
picIds: null,
pictures: null,
allPicIds: null,
allPics: null,
errorCorrect: null,
auditStatus: null,
auditName: null,
auditResult: null,
auditReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
}
if(this.form.ywType==='option8'){
this.shiBie.form = {
id: null,
ywType: 'option8',
taskId: null,
muId: null,
muPath: null,
num: null,
name: null,
cardId: null,
address: null,
djJg: null,
relation1: null,
name1: null,
sex1: null,
birthDate1: null,
cardId1: null,
relation2: null,
name2: null,
sex2: null,
birthDate2: null,
cardId2: null,
relation3: null,
name3: null,
birthDate3: null,
sex3: null,
cardId3: null,
relation4: null,
name4: null,
sex4: null,
birthDate4: null,
cardId4: null,
fwdw: null,
qrAddress: null,
zqReason: null,
pzjg: null,
cbr: null,
qfDate: null,
picIds: null,
pictures: null,
allPicIds: null,
allPics: null,
errorCorrect: null,
auditStatus: null,
auditName: null,
auditResult: null,
auditReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
}
if(this.form.ywType==='option12'){
this.shiBie.form = {
id: null,
ywType: 'option12',
allInfo: null,
taskId: null,
flag: 1,
muId: null,
muPath: null,
picIds: null,
pictures: null,
allPicIds: null,
allPics: null,
errorCorrect: null,
auditStatus: null,
auditName: null,
auditResult: null,
auditReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
}
this.shiBie.form.ywType = this.form.ywType;
this.shiBie.form.taskId = this.form.id;
this.shiBie.form.muId = this.form.muId;
this.shiBie.form.muPath = this.form.muPath;
this.shiBie.form.picIds = row.id;
this.shiBie.form.pictures = row.picUrl;
this.shiBie.form.allPicIds = row.id;
this.shiBie.form.allPics = row.picUrl;
this.shiBie.form.auditStatus = '0';
this.shiBie.form.errorCorrect = 2;
console.log(6666, this.shiBie.form);
this.shiBie.open = true;
},
shiBieSubmit(){
this.$refs["shiBieForm"].validate(valid => {
if (valid) {
if(this.shiBie.form.ywType==='option1'){
if(this.option1List.length<1){
this.$alert(`至少添加1条记录`, `提示`, {
type: 'warning'
});
}else {
let arr = [];
console.log(this.option1List);
this.option1List.forEach( item =>{
const obj = {...this.shiBie.form};
obj.relation=item.relation;
obj.name=item.name;
obj.birthday=item.birthday;
arr.push(obj)
})
batchAdd(arr).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
}
if(this.shiBie.form.ywType==='option3'||this.shiBie.form.ywType==='option9'||this.shiBie.form.ywType==='option2'){
addCzrkdj(this.shiBie.form).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
if(this.shiBie.form.ywType==='option4'){
addBirthDJ(this.shiBie.form).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
if(this.shiBie.form.ywType==='option5'){
addQyz(this.shiBie.form).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
if(this.shiBie.form.ywType==='option6'){
addYtzm(this.shiBie.form).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
if(this.shiBie.form.ywType==='option7'){
addZfnyhkcg(this.shiBie.form).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
if(this.shiBie.form.ywType==='option8'){
addZqz(this.shiBie.form).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
if(this.shiBie.form.ywType==='option12'){
addQuanwen(this.shiBie.form).then(response => {
this.$modal.msgSuccess("手动识别成功");
this.shiBie.open= false;
this.xgtp.open= false;
this.open= false;
this.getList();
});
}
}
});
},
shiBieCancel(){
this.shiBie.open = false;
},
// 添加
addOption1(){
if(this.option1List.length>3){
this.$alert(`最多添加4条记录`, `提示`, {
type: 'warning'
});
}else {
this.option1List.push({
relation: null,
name: null,
birthday: null,
})
}
},
delOption1(index){
this.option1List.splice(index, 1)
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除该数据项?').then(function() {
return delTask(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
// 查看任务添加记录
viewDetail(row){
// 常住人口登记表
if(row.ywType==='option1'|| row.ywType==='option3'|| row.ywType==='option9'|| row.ywType==='option2'){
this.$router.push("/dangan/czrkdj?muId=" + row.muId + '&ywType=' +row.ywType + '&taskId=' +row.id);
}
// 出生医学证明
if(row.ywType==='option4'){
this.$router.push("/dangan/birthDJ?muId=" + row.muId+ '&taskId=' +row.id);
}
// 迁移证
if(row.ywType==='option5'){
this.$router.push("/dangan/qyz?muId=" + row.muId+ '&taskId=' +row.id);
}
// 一胎证明
if(row.ywType==='option6'){
this.$router.push("/dangan/ytzm?muId=" + row.muId+ '&taskId=' +row.id);
}
// 转非农业人口批复存根
if(row.ywType==='option7'){
this.$router.push("/dangan/zfnyhkcg?muId=" + row.muId+ '&taskId=' +row.id);
}
// 准迁证
if(row.ywType==='option8'){
this.$router.push("/dangan/zqz?muId=" + row.muId+ '&taskId=' +row.id);
}
// 全文识别类型
if(row.ywType==='option12'){
this.$router.push("/dangan/quanwen?muId=" + row.muId+ '&taskId=' +row.id);
}
}
}
};
</script>
<style scoped lang="scss">
.rwjd{
::v-deep.el-dialog__body {
padding: 20px 20px;
.rw_con{
padding: 0 20px;
padding-bottom: 30px;
font-size: 16px;
.num{
height: 40px;
display: flex;
justify-content: space-between;
align-items: start;
}
}
}
}
.el-carousel__item{
background-color: #b5c2d2;
}
.jc_sb{
.el-form-item {
margin-bottom: 10px;
}
}
.jc_sb_img::-webkit-scrollbar{
width: 10px;
height: 10px;
}
.jc_sb_img::-webkit-scrollbar-thumb{
background-color: #54b5ba;
}
.jc_sb_img::-webkit-scrollbar-track{
background-color: #cccccc;
}
</style>