fix:ocr识别开发
parent
5f91a15868
commit
a7783e1fc6
@ -0,0 +1,91 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import routes from '../gateway-routes'
|
||||||
|
|
||||||
|
/** 获取笔录基本信息 */
|
||||||
|
export function getRocordInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/record/info`,
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 保存笔录 */
|
||||||
|
export function saveRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/record/saveRecord`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 获取笔录文件列表 */
|
||||||
|
export function queryFileList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/record/queryFileList`,
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 修正图片识别文字内容 */
|
||||||
|
export function reviseOcrText(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/record/reviseOcrText`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 提交识别任务 */
|
||||||
|
export function submitOrcTask(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/evidence/submitOrcTask`,
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 提取标题 */
|
||||||
|
export function retrieveTitle(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/evidence/retrieveTitle`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 查询提取标题进度 */
|
||||||
|
export function retrieveTitleProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/evidence/retrieveTitleProcess`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 查询OCR识别结果 */
|
||||||
|
export function queryEvidenceFileList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/evidence/queryFileList`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 保存证据 */
|
||||||
|
export function saveEvidence(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/evidence/batchSaveEvidence`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 获取证据基本信息 */
|
||||||
|
export function queryEvidenceInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ocr/evidence/info`,
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 更新案件证据信息(复用接口) */
|
||||||
|
export function updateEvidence(data) {
|
||||||
|
return request({
|
||||||
|
url: `/caseEvidence/updateEvidence`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
After Width: | Height: | Size: 630 B |
@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
* @description 代码生成机状态管理
|
||||||
|
*/
|
||||||
|
|
||||||
|
const state = () => ({
|
||||||
|
recordInfo: {
|
||||||
|
confessionTime: [],
|
||||||
|
lawAsker: '',
|
||||||
|
confessionMaterial: '',
|
||||||
|
indexNum: undefined,
|
||||||
|
personId: ''
|
||||||
|
},
|
||||||
|
fileList: []
|
||||||
|
})
|
||||||
|
const getters = {
|
||||||
|
recordInfo: (state) => state.recordInfo,
|
||||||
|
fileList: (state) => state.fileList
|
||||||
|
}
|
||||||
|
|
||||||
|
const mutations = {
|
||||||
|
setRecordInfo(state, data) {
|
||||||
|
state.recordInfo = data
|
||||||
|
},
|
||||||
|
setFileList(state, data) {
|
||||||
|
state.fileList = data
|
||||||
|
},
|
||||||
|
}
|
||||||
|
const actions = {
|
||||||
|
setRecordInfo({ commit }, data) {
|
||||||
|
commit('setRecordInfo', data)
|
||||||
|
},
|
||||||
|
setFileList({ commit }, data) {
|
||||||
|
commit('setFileList', data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default { state, getters, mutations, actions }
|
@ -0,0 +1,366 @@
|
|||||||
|
<template>
|
||||||
|
<div class="EditEvidence">
|
||||||
|
<div class="EvidenceProofread">
|
||||||
|
<div class="FormInfo">
|
||||||
|
<el-form ref="form" :model="dataInfo" :rules="rules" label-width="100px" style="margin-top: 10px">
|
||||||
|
<el-row :gutter="10" class="form-content">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="案件编号">
|
||||||
|
<span>{{ caseNo }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="案件名称">
|
||||||
|
<span>{{ caseName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="证据名称" prop="evidenceName">
|
||||||
|
<el-input v-model="dataInfo['evidenceName']" placeholder="请输入证据名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="证据类型" prop="evidenceType">
|
||||||
|
<el-select v-model="dataInfo['evidenceType']" style="width: 100%" placeholder="请选择证据类型">
|
||||||
|
<el-option
|
||||||
|
v-for="item in evidenceTypeList"
|
||||||
|
:key="item.value"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
/>
|
||||||
|
</el-select></el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="提供人" prop="provider">
|
||||||
|
<el-input v-model="dataInfo.property['provider']" placeholder="请输入提供人" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<div class="expand">
|
||||||
|
<span>收起</span>
|
||||||
|
<img :src="expandImg" alt="">
|
||||||
|
<span class="line" />
|
||||||
|
</div>
|
||||||
|
<div v-show="isExpand">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="受害人" prop="victim">
|
||||||
|
<el-input v-model="dataInfo.property['victim']" placeholder="请输入受害人名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="合同标的物" prop="contractSubject">
|
||||||
|
<el-input v-model="dataInfo.property['contractSubject']" placeholder="请输入合同标的物" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="合同签订时间" prop="contractSignTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataInfo.property['contractSignTime']"
|
||||||
|
type="datetime"
|
||||||
|
format="yyyy-MM-dd HH:MM"
|
||||||
|
value-format="yyyy-MM-dd HH:mm"
|
||||||
|
placeholder="请选择合同签订时间"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="金额" prop="amount">
|
||||||
|
<el-input v-model="dataInfo.property['amount']" type="number" placeholder="请输入金额" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="证据结果" prop="evidenceResult">
|
||||||
|
<el-input v-model="dataInfo.property['evidenceResult']" placeholder="请输入证据结果" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="其他" prop="otherDesc">
|
||||||
|
<el-input
|
||||||
|
v-model="dataInfo.property.otherDesc"
|
||||||
|
row
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="proofread-content">
|
||||||
|
<div class="left">
|
||||||
|
<div class="show-img">
|
||||||
|
<img :src="activedImg" alt="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="boder1" />
|
||||||
|
<span class="boder2" />
|
||||||
|
<span class="boder3" />
|
||||||
|
<span class="boder4" />
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="title">识别结果</div>
|
||||||
|
<el-input
|
||||||
|
v-model="dataInfo.ocrText"
|
||||||
|
readonly
|
||||||
|
class="right-text"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
<span class="boder1" />
|
||||||
|
<span class="boder2" />
|
||||||
|
<span class="boder3" />
|
||||||
|
<span class="boder4" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="footer-btns">
|
||||||
|
<div class="reset_btn" @click="reset">重置</div>
|
||||||
|
<div class="btn" @click="submit">确认并提交</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as vuedraggable from 'vuedraggable'
|
||||||
|
import { baseURL } from '@/config'
|
||||||
|
import { commonDownloadFile } from '@/api/config/uploadApi'
|
||||||
|
import { queryEvidenceInfo, updateEvidence } from '@/api/caseDetails/ocr'
|
||||||
|
export default {
|
||||||
|
name: 'EvidenceProofread',
|
||||||
|
components: { vuedraggable },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataList: [],
|
||||||
|
isExpand: true,
|
||||||
|
rules: {
|
||||||
|
evidenceName: [{ required: true, message: '证据名称不能为空!', trigger: 'blur' }],
|
||||||
|
evidenceType: [{ required: true, message: '证据类型不能为空!', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
// 证据类型
|
||||||
|
evidenceTypeList: JSON.parse(sessionStorage.getItem('evidence_type')),
|
||||||
|
expandImg: require('@/assets/record/expand.png'),
|
||||||
|
caseNo: '',
|
||||||
|
caseName: '',
|
||||||
|
dataInfo: {
|
||||||
|
fileId: '',
|
||||||
|
ocrText: '',
|
||||||
|
property: {}
|
||||||
|
},
|
||||||
|
activedImg: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.caseNo = this.$route.query.caseNo
|
||||||
|
this.caseName = this.$route.query.caseName
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getImgUrl(id) {
|
||||||
|
return `${baseURL}${commonDownloadFile}${id}`
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
queryEvidenceInfo({ evidenceId: this.$route.query.evidenceId }).then(res => {
|
||||||
|
this.dataInfo = res.data
|
||||||
|
this.dataInfo.fileId = res.data.fileList[0].fileId
|
||||||
|
this.dataInfo.ocrText = res.data.fileList[0].ocrText
|
||||||
|
this.activedImg = `${baseURL}${commonDownloadFile}${this.dataInfo.fileId}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
this.dataInfo.caseId = this.$route.params.id
|
||||||
|
this.dataInfo.fileIdList = [this.dataInfo.fileList[0].fileId]
|
||||||
|
updateEvidence(this.dataInfo).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$store.dispatch(
|
||||||
|
'tabsBar/delRoute',
|
||||||
|
this.$route
|
||||||
|
)
|
||||||
|
this.$router.push({ path: `/case-details/${this.$route.params.id}/${this.$route.query.caseName}`, query: { currentKey: '1-2', isEdit: 1 }})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.EditEvidence {
|
||||||
|
display: flex;
|
||||||
|
background: #FFFFFF;
|
||||||
|
height: 100%;
|
||||||
|
.EvidenceProofread {
|
||||||
|
display: flex;
|
||||||
|
margin: 24px;
|
||||||
|
width: 100%;
|
||||||
|
.FormInfo {
|
||||||
|
width: 470px;
|
||||||
|
background: #F6F8F9;
|
||||||
|
border-radius: 8px 8px 8px 8px;
|
||||||
|
// height: calc(100vh - 350px);
|
||||||
|
padding: 0 24px;
|
||||||
|
margin-bottom: 72px;
|
||||||
|
.expand {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
padding: 0 24px;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
img {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.line {
|
||||||
|
flex: 1;
|
||||||
|
height: 1px;
|
||||||
|
background: #E9E9E9;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.el-scrollbar__wrap) {
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
.proofread-content {
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 18px;
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 72px;
|
||||||
|
.left {
|
||||||
|
width: 55%;
|
||||||
|
margin-right: 24px;
|
||||||
|
position: relative;
|
||||||
|
// background: #F6F8F9;
|
||||||
|
border: 1px solid #DCE3EB;
|
||||||
|
display: flex;
|
||||||
|
padding: 8px;
|
||||||
|
.show-img {
|
||||||
|
padding: 16px 28px;
|
||||||
|
flex: 1;
|
||||||
|
background: #F6F8F9;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
width: 45%;
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid #DCE3EB;
|
||||||
|
display: flex;
|
||||||
|
padding: 8px;
|
||||||
|
flex-direction: column;
|
||||||
|
.title {
|
||||||
|
background: #F6F8F9;
|
||||||
|
border-bottom: 1px solid #DCE3EB;
|
||||||
|
height: 70px;
|
||||||
|
padding-left: 24px;
|
||||||
|
line-height: 70px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #333333;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::v-deep .el-textarea__inner {
|
||||||
|
height: calc(100vh - 450px);
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.img_list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 25px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
padding: 24px;
|
||||||
|
background: #F6F8F9;
|
||||||
|
.img_item {
|
||||||
|
width: 98px;
|
||||||
|
height: 138px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 6px 6px 6px 6px;
|
||||||
|
border: 1px solid #D1D3D6;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.boder1 {
|
||||||
|
position: absolute;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
border-top: 2px solid #2073FF;
|
||||||
|
border-left: 2px solid #2073FF;
|
||||||
|
}
|
||||||
|
.boder2 {
|
||||||
|
position: absolute;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
border-top: 2px solid #2073FF;
|
||||||
|
border-right: 2px solid #2073FF;
|
||||||
|
}
|
||||||
|
.boder3 {
|
||||||
|
position: absolute;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-bottom: 2px solid #2073FF;
|
||||||
|
border-left: 2px solid #2073FF;
|
||||||
|
}
|
||||||
|
.boder4 {
|
||||||
|
position: absolute;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-bottom: 2px solid #2073FF;
|
||||||
|
border-right: 2px solid #2073FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.footer-btns {
|
||||||
|
position: absolute;
|
||||||
|
right: 24px;
|
||||||
|
bottom: 24px;
|
||||||
|
display: flex;
|
||||||
|
.btn {
|
||||||
|
width: 188px;
|
||||||
|
height: 48px;
|
||||||
|
background: #3763FF;
|
||||||
|
box-shadow: 0px 2px 0px 0px rgba(0,0,0,0.04);
|
||||||
|
border-radius: 6px 6px 6px 6px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 48px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 24px;
|
||||||
|
}
|
||||||
|
.reset_btn {
|
||||||
|
width: 188px;
|
||||||
|
height: 48px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 2px 0px 0px rgba(0,0,0,0.04);
|
||||||
|
border-radius: 6px 6px 6px 6px;
|
||||||
|
border: 1px solid #3763FF;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 48px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #3763FF;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue