fix:图像ocr识别开发

dev_1.0.0
xiangcongshuai 7 months ago
parent a7783e1fc6
commit 68f4317284

@ -96,9 +96,9 @@ export function queryCaseDetails(data) {
}) })
} }
/** 获取案件指标详情 */ /** 获取案件指标详情 */
export function queryIndexDetail(data) { export function queryIndexDetail(data, page, size) {
return request({ return request({
url: `${routes.modelCase}/getIndexDetail`, url: `${routes.modelCase}/getIndexDetail?page=${page}&size=${size}`,
method: 'post', method: 'post',
data data
}) })

@ -88,4 +88,20 @@ export function updateEvidence(data) {
method: 'post', method: 'post',
data data
}) })
}
/** 获取证据基本信息 */
export function submitTask(data) {
return request({
url: `/ocr/record/submitTask`,
method: 'get',
params: data
})
}
/** 删除笔录中的文件 */
export function deleteFile(data) {
return request({
url: `/ocr/record/deleteFile`,
method: 'get',
params: data
})
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

@ -5,7 +5,7 @@ const network = {
// 默认的接口地址 如果是开发环境和生产环境走vab-mock-server当然你也可以选择自己配置成需要的接口地址 // 默认的接口地址 如果是开发环境和生产环境走vab-mock-server当然你也可以选择自己配置成需要的接口地址
baseURL: baseURL:
process.env.NODE_ENV === 'development' process.env.NODE_ENV === 'development'
? 'http://192.168.10.137:8097/fu-hsi-server' ? 'http://192.168.10.25:8097/fu-hsi-server'
: '/fuHsiApi', : '/fuHsiApi',
// 配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8 // 配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
contentType: 'application/json;charset=UTF-8', contentType: 'application/json;charset=UTF-8',

@ -1,7 +1,7 @@
<template> <template>
<div class="EvidenceProofread"> <div class="EvidenceProofread">
<div class="FormInfo"> <div class="FormInfo">
<el-form ref="form" :model="dataInfo" :rules="rules" label-width="100px" style="margin-top: 10px"> <el-form ref="form" :model="selectInfo" :rules="rules" label-width="100px" style="margin-top: 10px">
<el-row :gutter="10" class="form-content"> <el-row :gutter="10" class="form-content">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="案件编号"> <el-form-item label="案件编号">
@ -35,9 +35,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<div class="expand" @click="handleExpand"> <div class="expand" @click="handleExpand">
<span>收起</span> <span v-show="isExpand"></span>
<span v-show="isExpand"></span> <span v-show="!isExpand"></span>
<img :src="expandImg" alt=""> <img v-show="isExpand" :src="expandImg" alt="">
<img v-show="!isExpand" :src="unExpandImg" alt="">
<span class="line" /> <span class="line" />
</div> </div>
<div v-show="isExpand"> <div v-show="isExpand">
@ -153,6 +155,7 @@ export default {
// //
evidenceTypeList: JSON.parse(sessionStorage.getItem('evidence_type')), evidenceTypeList: JSON.parse(sessionStorage.getItem('evidence_type')),
expandImg: require('@/assets/record/expand.png'), expandImg: require('@/assets/record/expand.png'),
unExpandImg: require('@/assets/record/unExpand.png'),
caseNo: '', caseNo: '',
caseName: '', caseName: '',
dataInfo: {}, dataInfo: {},
@ -214,7 +217,7 @@ export default {
this.$route this.$route
) )
this.$baseMessage.success('提交成功') this.$baseMessage.success('提交成功')
this.$router.push({ path: `/case-details/${this.$route.params.id}/${this.$route.query.caseName}`, query: { currentKey: '1-2',isEdit: 1 }}) this.$router.push({ path: `/case-details/${this.$route.params.id}/${this.$route.query.caseName}`, query: { currentKey: '1-2', isEdit: 1 }})
} }
}) })
} }

@ -66,7 +66,7 @@
fit="cover" fit="cover"
/> />
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<img class="del" src="@/assets/record/del_img.png" alt=""> <img class="del" @click="del(index)" src="@/assets/record/del_img.png" alt="">
</div> </div>
<!-- </transition-group> --> <!-- </transition-group> -->
</vuedraggable> </vuedraggable>
@ -122,8 +122,15 @@ export default {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传头像图片大小不能超过 5MB!')
return false return false
} }
if (this.fileList >= 12) {
this.$message.error('上传文件数量不能超过12张!')
return false
}
return true return true
}, },
del(index) {
this.fileList.splice(index, 1)
},
handleSuccess(res, file) { handleSuccess(res, file) {
const obj = { const obj = {
name: file.name, name: file.name,

@ -14,6 +14,7 @@
</template> </template>
<script> <script>
import FormInfo from './FormInfo.vue' import FormInfo from './FormInfo.vue'
import { submitTask } from '@/api/caseDetails/ocr'
export default { export default {
name: 'RecordAnalysis', name: 'RecordAnalysis',
components: { FormInfo }, components: { FormInfo },
@ -24,11 +25,15 @@ export default {
}, },
methods: { methods: {
closed() { closed() {
this.$store.dispatch( submitTask({ recordId: this.$route.query.recordId }).then(res => {
'tabsBar/delRoute', if (res.code === 200) {
this.$route this.$store.dispatch(
) 'tabsBar/delRoute',
this.$router.push({ path: `/case-details/${this.$route.params.id}/${this.$route.query.caseName}`, query: { isEdit: 1, caseNo: this.$route.query.caseNo }}) this.$route
)
this.$router.push({ path: `/case-details/${this.$route.params.id}/${this.$route.query.caseName}`, query: { isEdit: 1, caseNo: this.$route.query.caseNo }})
}
})
} }
} }
} }
@ -66,7 +71,7 @@ export default {
font-size: 16px; font-size: 16px;
color: #999999; color: #999999;
width: 600px; width: 600px;
text-align: center; text-align: center;
} }
.btn { .btn {
width: 156px; width: 156px;

@ -16,9 +16,9 @@
<span>正在识别</span> <span>正在识别</span>
</div> </div>
</template> </template>
<template #opera="{row,index}"> <template #opera="{ row, rowIndex}">
<div class="btn-list"> <div class="btn-list">
<img src="@/assets/record/reset_identify.png" alt=""> <!-- <img src="@/assets/record/reset_identify.png" alt=""> -->
<!-- <img src="@/assets/record/view_detail.png" alt=""> --> <!-- <img src="@/assets/record/view_detail.png" alt=""> -->
<el-image <el-image
style="width: 16px; height: 16px;margin-right: 16px;" style="width: 16px; height: 16px;margin-right: 16px;"
@ -27,7 +27,7 @@
fit="cover" fit="cover"
@click="openDeatils(row)" @click="openDeatils(row)"
/> />
<img src="@/assets/record/del.png" alt="" @click="del(index)"> <img src="@/assets/record/del.png" alt="" @click="del(row,rowIndex )">
</div> </div>
</template> </template>
</vxe-grid> </vxe-grid>
@ -43,7 +43,7 @@ import * as vuedraggable from 'vuedraggable'
import FormInfo from './FormInfo.vue' import FormInfo from './FormInfo.vue'
import { baseURL } from '@/config' import { baseURL } from '@/config'
import { commonDownloadFile } from '@/api/config/uploadApi' import { commonDownloadFile } from '@/api/config/uploadApi'
import { saveRecord } from '@/api/caseDetails/ocr' import { saveRecord, deleteFile } from '@/api/caseDetails/ocr'
export default { export default {
name: 'RecordIdentify', name: 'RecordIdentify',
components: { vuedraggable, FormInfo }, components: { vuedraggable, FormInfo },
@ -86,12 +86,17 @@ export default {
// this.srcList.push(`${baseURL}${commonDownloadFile}1829334930064207873`) // this.srcList.push(`${baseURL}${commonDownloadFile}1829334930064207873`)
return [`${baseURL}${commonDownloadFile}${row.fileId}`] return [`${baseURL}${commonDownloadFile}${row.fileId}`]
}, },
del(index) { del(row, index) {
if (this.gridOptions.data.length === 1) { if (this.gridOptions.data.length === 1) {
this.$baseMessage.error('至少保留一条数据!') this.$baseMessage.error('至少保留一条数据!')
return return
} }
this.gridOptions.data.splice(index, 1) deleteFile({ recordId: this.$route.query.recordId, fileId: row.fileId }).then(res => {
if (res.code === 200) {
this.gridOptions.data.splice(index, 1)
this.$baseMessage.success('删除成功!')
}
})
}, },
next() { next() {
const formData = this.$refs.formInfoRef.recordForm const formData = this.$refs.formInfoRef.recordForm

@ -10,7 +10,9 @@
</img> </img>
</vuedraggable> </vuedraggable>
</el-scrollbar> </el-scrollbar>
<img v-if="selectInfo.fileId" :src="getImgUrl(selectInfo.fileId)" class="act_img" alt=""> <div class="act_img">
<img v-if="selectInfo.fileId" :src="getImgUrl(selectInfo.fileId)" alt="">
</div>
<span class="boder1" /> <span class="boder1" />
<span class="boder2" /> <span class="boder2" />
<span class="boder3" /> <span class="boder3" />
@ -127,6 +129,12 @@ export default {
background: #F6F8F9; background: #F6F8F9;
height: calc(100vh - 400px); height: calc(100vh - 400px);
background-size: 100% 100%; background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
img {
height: 100%;
}
} }
.actived { .actived {
border: 2px solid #3763FF !important; border: 2px solid #3763FF !important;

@ -68,8 +68,8 @@
:preview-src-list="[getImgUrl(item.fileId)]" :preview-src-list="[getImgUrl(item.fileId)]"
fit="cover" fit="cover"
/> />
<span>{{ item.name }}</span> <span>{{ item.fileName }}</span>
<img class="del" src="@/assets/record/del_img.png" alt=""> <img class="del" src="@/assets/record/del_img.png" alt="" @click="del(index)">
</div> </div>
<!-- </transition-group> --> <!-- </transition-group> -->
</vuedraggable> </vuedraggable>
@ -114,18 +114,26 @@ export default {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传头像图片大小不能超过 5MB!')
return false return false
} }
if (this.fileList >= 12) {
this.$message.error('上传文件数量不能超过12张!')
return false
}
return true return true
}, },
handleSuccess(res, file) { handleSuccess(res, file) {
const obj = { const obj = {
name: file.name, fileName: file.name,
fileId: res.data fileId: res.data
} }
this.fileList.push(obj) this.fileList.push(obj)
}, },
getImgUrl(id) { getImgUrl(id) {
return `${baseURL}${commonDownloadFile}${id}` return `${baseURL}${commonDownloadFile}${id}`
}, },
del(index) {
this.fileList.splice(index, 1)
},
async save() { async save() {
this.$refs.formInfoRef.$refs.form.validate(async valid => { this.$refs.formInfoRef.$refs.form.validate(async valid => {
if (valid) { if (valid) {
@ -154,12 +162,14 @@ export default {
confessionEndTime: formData.confessionTime[1], confessionEndTime: formData.confessionTime[1],
imgRecordStatus: '1', imgRecordStatus: '1',
indexNum: formData.indexNum, indexNum: formData.indexNum,
id: this.recordId,
fileIdList fileIdList
} }
saveRecord(params).then(res => { saveRecord(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$baseMessage.success(res.msg || '提交成功!') this.$baseMessage.success(res.msg || '提交成功!')
this.$emit('save', res.data) this.$emit('save', res.data)
this.recordId = res.data
} }
}) })
} }

@ -33,7 +33,7 @@
</div> </div>
</div> </div>
<!-- <p class="tips">文档格式笔录可直接上传若非文档格式系统将进行0CR识别内容人工核实后支持继续上传或保存结束本次笔录信息上传</p> --> <!-- <p class="tips">文档格式笔录可直接上传若非文档格式系统将进行0CR识别内容人工核实后支持继续上传或保存结束本次笔录信息上传</p> -->
<upload-record v-show="activeStep === 0" ref="UploadRecordRef" @save="saveOk" /> <upload-record v-show="activeStep === 0" ref="UploadRecordRef" @save="saveOk" />
<record-identify v-if="activeStep === 1" ref="RecordIdentifyRef" :record-id="recordId" @back="activeStep = 0" @save="saveOk" /> <record-identify v-if="activeStep === 1" ref="RecordIdentifyRef" :record-id="recordId" @back="activeStep = 0" @save="saveOk" />
<record-proofread v-if="activeStep === 2" ref="RecordProofreadRef" :record-id="recordId" @submit="submitRecord" /> <record-proofread v-if="activeStep === 2" ref="RecordProofreadRef" :record-id="recordId" @submit="submitRecord" />
<RecordAnalysis v-if="activeStep === 3" ref="RecordAnalysisRef" /> <RecordAnalysis v-if="activeStep === 3" ref="RecordAnalysisRef" />
@ -113,6 +113,14 @@ export default {
this.$refs.UploadRecordRef.fileList = res.data this.$refs.UploadRecordRef.fileList = res.data
if (this.activeStep === 1) { if (this.activeStep === 1) {
this.$refs.RecordIdentifyRef.gridOptions.data = res.data this.$refs.RecordIdentifyRef.gridOptions.data = res.data
for (const item of res.data) {
if (item.ocrStatus !== '1') {
setTimeout(() => {
this.getFileList()
}, 3000)
return
}
}
} else if (this.activeStep === 2) { } else if (this.activeStep === 2) {
this.$refs.RecordProofreadRef.dataList = res.data this.$refs.RecordProofreadRef.dataList = res.data
this.$refs.RecordProofreadRef.selectInfo = res.data[0] this.$refs.RecordProofreadRef.selectInfo = res.data[0]

@ -113,8 +113,8 @@ export default {
}, },
// //
handleAdd() { handleAdd() {
this.$refs.edit.show() // this.$refs.edit.show()
// this.$refs.SelectUploadTypeRef.show() this.$refs.SelectUploadTypeRef.show()
}, },
// //
handelEdit(row) { handelEdit(row) {

@ -10,13 +10,13 @@
<div class="record-content"> <div class="record-content">
<div v-if="isEdit" class="flex-row" style="align-items: center; justify-content: space-between"> <div v-if="isEdit" class="flex-row" style="align-items: center; justify-content: space-between">
<div> <div>
<!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd"></el-button> --> <el-button type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd"></el-button>
<el-dropdown @command="handleSelect"> <!-- <el-dropdown @command="handleSelect">
<el-button type="primary" icon="el-icon-circle-plus-outline">添加笔录</el-button> <el-button type="primary" icon="el-icon-circle-plus-outline">添加笔录</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1">文档笔录</el-dropdown-item> <el-dropdown-item command="1">文档笔录</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown> -->
<el-button type="primary" style="margin-left: 16px;" @click="addUser"></el-button> <el-button type="primary" style="margin-left: 16px;" @click="addUser"></el-button>
</div> </div>
@ -167,7 +167,7 @@ export default {
}, },
// //
handelEdit(row) { handelEdit(row) {
if (row.recordType === '1') { if (row.recordType === '1' && row.imgRecordStatus !== '3') {
this.$router.push({ path: `/edit-record/${this.caseId}/${row.id}`, query: { caseName: this.$route.params.caseName, caseNo: this.$route.query.caseNo, recordId: row.id, imgRecordStatus: row.imgRecordStatus }}) this.$router.push({ path: `/edit-record/${this.caseId}/${row.id}`, query: { caseName: this.$route.params.caseName, caseNo: this.$route.query.caseNo, recordId: row.id, imgRecordStatus: row.imgRecordStatus }})
} else { } else {
this.$refs.edit.show(row, true) this.$refs.edit.show(row, true)

@ -91,12 +91,12 @@ export default {
{ title: '序号', type: 'seq', width: '80px' }, { title: '序号', type: 'seq', width: '80px' },
{ title: '分析结果', width: '200px', field: 'indexResult', slots: { default: 'result' }}, { title: '分析结果', width: '200px', field: 'indexResult', slots: { default: 'result' }},
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' },
{ title: '指标名称', field: 'indexName', align: 'left' }, { title: '指标名称', field: 'indexName', align: 'left' },
{ title: '分值', field: 'score', width: '50px' }, { title: '分值', field: 'score', width: '50px' },
{ title: '数据来源', field: 'indexSource', width: '200px', formatter: ({ cellValue }) => { { title: '数据来源', field: 'indexSource', width: '200px', formatter: ({ cellValue }) => {
return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : '' return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : ''
} }, } }
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' }
// { title: '', field: 'atomicIndex' } // { title: '', field: 'atomicIndex' }
// { title: '', field: 'questioner' }, // { title: '', field: 'questioner' },
// { title: '', field: 'startTime' }, // { title: '', field: 'startTime' },
@ -149,15 +149,13 @@ export default {
fetchData() { fetchData() {
const params = { caseId: this.$route.params['id'], const params = { caseId: this.$route.params['id'],
indexType: '1', indexType: '1',
page: this.queryForm.page,
size: this.queryForm.size,
indexName: this.indexName, indexName: this.indexName,
indexResult: this.indexResult, indexResult: this.indexResult,
indexHasRecord: this.indexHasRecord, indexHasRecord: this.indexHasRecord,
atomicName: this.atomicName, atomicName: this.atomicName,
indexSource: this.indexSource indexSource: this.indexSource
} }
queryIndexDetail(params).then(res => { queryIndexDetail(params, this.queryForm.page, this.queryForm.size).then(res => {
this.gridOptions.data = res.data.records this.gridOptions.data = res.data.records
this.queryForm.total = res.data.total this.queryForm.total = res.data.total
}) })

@ -35,9 +35,12 @@
<el-input v-model="dataInfo.property['provider']" placeholder="请输入提供人" /> <el-input v-model="dataInfo.property['provider']" placeholder="请输入提供人" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<div class="expand"> <div class="expand" @click="handleExpand">
<span>收起</span> <span v-show="isExpand"></span>
<img :src="expandImg" alt=""> <span v-show="!isExpand"></span>
<img v-show="isExpand" :src="expandImg" alt="">
<img v-show="!isExpand" :src="unExpandImg" alt="">
<span class="line" /> <span class="line" />
</div> </div>
<div v-show="isExpand"> <div v-show="isExpand">
@ -139,6 +142,7 @@ export default {
// //
evidenceTypeList: JSON.parse(sessionStorage.getItem('evidence_type')), evidenceTypeList: JSON.parse(sessionStorage.getItem('evidence_type')),
expandImg: require('@/assets/record/expand.png'), expandImg: require('@/assets/record/expand.png'),
unExpandImg: require('@/assets/record/unExpand.png'),
caseNo: '', caseNo: '',
caseName: '', caseName: '',
dataInfo: { dataInfo: {
@ -158,6 +162,9 @@ export default {
getImgUrl(id) { getImgUrl(id) {
return `${baseURL}${commonDownloadFile}${id}` return `${baseURL}${commonDownloadFile}${id}`
}, },
handleExpand() {
this.isExpand = !this.isExpand
},
getData() { getData() {
queryEvidenceInfo({ evidenceId: this.$route.query.evidenceId }).then(res => { queryEvidenceInfo({ evidenceId: this.$route.query.evidenceId }).then(res => {
this.dataInfo = res.data this.dataInfo = res.data

@ -94,12 +94,12 @@ export default {
{ title: '', width: '50px', treeNode: true }, { title: '', width: '50px', treeNode: true },
{ title: '序号', type: 'seq', width: '80px' }, { title: '序号', type: 'seq', width: '80px' },
{ title: '分析结果', width: '200px', field: 'indexResult', slots: { default: 'result' }}, { title: '分析结果', width: '200px', field: 'indexResult', slots: { default: 'result' }},
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' },
{ title: '指标名称', field: 'indexName', align: 'left' }, { title: '指标名称', field: 'indexName', align: 'left' },
{ title: '分值', width: '200px', field: 'score' }, { title: '分值', width: '200px', field: 'score' },
{ title: '数据来源', field: 'indexSource', width: '200px', formatter: ({ cellValue }) => { { title: '数据来源', field: 'indexSource', width: '200px', formatter: ({ cellValue }) => {
return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : '' return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : ''
} }, } }
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' }
// { title: '', field: 'atomicIndex' } // { title: '', field: 'atomicIndex' }
// { title: '', field: 'questioner' }, // { title: '', field: 'questioner' },
// { title: '', field: 'startTime' }, // { title: '', field: 'startTime' },
@ -152,15 +152,13 @@ export default {
fetchData() { fetchData() {
const params = { caseId: this.$route.params['id'], const params = { caseId: this.$route.params['id'],
indexType: '2', indexType: '2',
page: this.queryForm.page,
size: this.queryForm.size,
indexName: this.indexName, indexName: this.indexName,
indexResult: this.indexResult, indexResult: this.indexResult,
indexHasRecord: this.indexHasRecord, indexHasRecord: this.indexHasRecord,
atomicName: this.atomicName, atomicName: this.atomicName,
indexSource: this.indexSource indexSource: this.indexSource
} }
queryIndexDetail(params).then(res => { queryIndexDetail(params, this.queryForm.page, this.queryForm.size).then(res => {
this.gridOptions.data = res.data.records this.gridOptions.data = res.data.records
this.queryForm.total = res.data.total this.queryForm.total = res.data.total
}) })

@ -90,12 +90,12 @@ export default {
{ title: '', width: '50px', treeNode: true }, { title: '', width: '50px', treeNode: true },
{ title: '序号', type: 'seq', width: '80px' }, { title: '序号', type: 'seq', width: '80px' },
{ title: '分析结果', width: '200px', field: 'indexResult', slots: { default: 'result' }}, { title: '分析结果', width: '200px', field: 'indexResult', slots: { default: 'result' }},
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' },
{ title: '指标名称', field: 'indexName', align: 'left' }, { title: '指标名称', field: 'indexName', align: 'left' },
{ title: '分值', width: '200px', field: 'score' }, { title: '分值', width: '200px', field: 'score' },
{ title: '数据来源', width: '200px', field: 'indexSource', formatter: ({ cellValue }) => { { title: '数据来源', width: '200px', field: 'indexSource', formatter: ({ cellValue }) => {
return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : '' return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : ''
} }, } }
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' }
// { title: '', field: 'atomicIndex' } // { title: '', field: 'atomicIndex' }
// { title: '', field: 'questioner' }, // { title: '', field: 'questioner' },
// { title: '', field: 'startTime' }, // { title: '', field: 'startTime' },
@ -149,15 +149,13 @@ export default {
fetchData() { fetchData() {
const params = { caseId: this.$route.params['id'], const params = { caseId: this.$route.params['id'],
indexType: '3', indexType: '3',
page: this.queryForm.page,
size: this.queryForm.size,
indexName: this.indexName, indexName: this.indexName,
indexResult: this.indexResult, indexResult: this.indexResult,
indexHasRecord: this.indexHasRecord, indexHasRecord: this.indexHasRecord,
atomicName: this.atomicName, atomicName: this.atomicName,
indexSource: this.indexSource indexSource: this.indexSource
} }
queryIndexDetail(params).then(res => { queryIndexDetail(params, this.queryForm.page, this.queryForm.size).then(res => {
this.gridOptions.data = res.data.records this.gridOptions.data = res.data.records
this.queryForm.total = res.data.total this.queryForm.total = res.data.total
}) })

@ -7,8 +7,8 @@
<div class="upload-way"> <div class="upload-way">
<div class="word_list" @click="handleSelect('1')"> <div class="word_list" @click="handleSelect('1')">
<img class="bg_img" src="../../../assets/record/word_bg.png" alt=""> <img class="bg_img" src="../../../assets/record/word_bg.png" alt="">
<span class="title">普通笔录文档</span> <span class="title">普通文档</span>
<span class="desc">笔录为有效的 docdocxtxtrtfwpd格式文件</span> <span class="desc">文档为有效的 docdocxtxtrtfwpd格式文件</span>
<div class="up-btn"> <div class="up-btn">
<img src="@/assets/record/upload_btn.png" alt=""> <img src="@/assets/record/upload_btn.png" alt="">
<span>选择上传</span> <span>选择上传</span>
@ -17,7 +17,7 @@
<div class="word_list" @click="handleSelect('2')"> <div class="word_list" @click="handleSelect('2')">
<img class="bg_img" src="../../../assets/record/ocr_bg.png" alt=""> <img class="bg_img" src="../../../assets/record/ocr_bg.png" alt="">
<span class="title">OCR识别</span> <span class="title">OCR识别</span>
<span class="desc">笔录为有效的 PNGJPGJPEGBMPWEBP图片格式</span> <span class="desc">图片为有效的 PNGJPGJPEGBMPWEBP图片格式</span>
<div class="up-btn"> <div class="up-btn">
<img src="@/assets/record/upload_btn.png" alt=""> <img src="@/assets/record/upload_btn.png" alt="">
<span>选择上传</span> <span>选择上传</span>

@ -64,7 +64,7 @@ export default {
dialogOptions: { dialogOptions: {
show: false, show: false,
title: { title: {
title: '选择三元组信息入库' title: ''
}, },
width: '1300px', width: '1300px',
top: '50px', top: '50px',
@ -99,6 +99,7 @@ export default {
this.gridOptions.data = [] this.gridOptions.data = []
this.selectionRows = [] this.selectionRows = []
this.name = '' this.name = ''
this.dialogOptions.title.title = `选择三元组信息入库 - ${data.confessionMaterial}`
this.fetchData() this.fetchData()
}, },
// //

@ -46,14 +46,14 @@
:accept="uploadOption.accept" :accept="uploadOption.accept"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:before-remove="beforeRemove" :before-upload="beforeUpload"
:on-success="handleSuccess" :on-success="handleSuccess"
multiple multiple
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="fileList" :file-list="fileList"
> >
<el-button size="small" type="primary" icon="el-icon-upload2">选择文件</el-button> <el-button size="small" type="primary" icon="el-icon-upload2">选择文件</el-button>
<div slot="tip" class="el-upload__tip">支持扩展名docxbmpjpgpng单个文档小于5mb</div> <div slot="tip" class="el-upload__tip">支持扩展名docxdoc单个文档小于5mb</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -65,6 +65,7 @@
import { baseURL } from '@/config/net.config' import { baseURL } from '@/config/net.config'
import { saveEvidence, updateEvidence } from '@/api/caseDetails' import { saveEvidence, updateEvidence } from '@/api/caseDetails'
import { getAccessToken } from '@/utils/accessToken' import { getAccessToken } from '@/utils/accessToken'
import { commonDownloadFile } from '@/api/config/uploadApi'
export default { export default {
name: 'EditEvidence', name: 'EditEvidence',
data() { data() {
@ -91,7 +92,7 @@ export default {
// //
uploadOption: { uploadOption: {
action: `${baseURL}/minio/uploadFile`, action: `${baseURL}/minio/uploadFile`,
accept: '.docx,.bmp,.jpg,.png' accept: '.docx,.doc'
}, },
isEdit: false isEdit: false
@ -126,6 +127,20 @@ export default {
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.$refs.form.clearValidate() this.$refs.form.clearValidate()
}, },
//
beforeUpload(file) {
const isLt5M = file.size / 1024 / 1024 < 5
const filename = file.name
const postfix = filename.substring(filename.lastIndexOf('.'))
if (!['.doc', '.docx'].includes(postfix)) {
this.$message.error('上传图片只能是 doc,docx 格式!')
return false
}
if (!isLt5M) {
this.$baseMessage.error('上传文件大小不能超过 5MB!')
return false
}
},
// //
handleSubmit() { handleSubmit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
@ -162,14 +177,22 @@ export default {
this.evidenceForm.fileIdList = list this.evidenceForm.fileIdList = list
}, },
handlePreview(file) { handlePreview(file) {
console.log(file) for (const item of this.fileList) {
if (item.name === file.name) {
if (!item.fileId) return
this.downloadFile(`${baseURL}${commonDownloadFile}${item.fileId}`, item.name)
}
}
},
downloadFile(url, fileName) {
const link = document.createElement('a')
link.href = url
link.download = fileName
link.click()
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`) this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
}, },
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleSuccess(response) { handleSuccess(response) {
if (response.code === 200) { if (response.code === 200) {
this.evidenceForm.fileIdList.push(response.data) this.evidenceForm.fileIdList.push(response.data)

@ -103,8 +103,8 @@
:accept="uploadOption.accept" :accept="uploadOption.accept"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:before-remove="beforeRemove"
:on-success="handleSuccess" :on-success="handleSuccess"
:before-upload="beforeUpload"
multiple multiple
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="fileList" :file-list="fileList"
@ -179,7 +179,7 @@ export default {
// //
uploadOption: { uploadOption: {
action: `${baseURL}/minio/uploadFile`, action: `${baseURL}/minio/uploadFile`,
accept: '.docx,.bmp,.jpg,.png' accept: '.docx,.doc'
}, },
// //
initialIndex: 0, initialIndex: 0,
@ -273,9 +273,6 @@ export default {
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`) this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
}, },
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleSuccess(response) { handleSuccess(response) {
if (response.code === 200) { if (response.code === 200) {
this.recordForm.fileIdList.push(response.data) this.recordForm.fileIdList.push(response.data)
@ -329,18 +326,18 @@ export default {
}) })
}, },
// //
handleFileChange(file, fileList) { beforeUpload(file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
const filename = file.name
const postfix = filename.substring(filename.lastIndexOf('.'))
if (!['.doc', '.docx'].includes(postfix)) {
this.$message.error('上传图片只能是 doc,docx 格式!')
return false
}
if (!isLt5M) { if (!isLt5M) {
this.$baseMessage.error('上传文件大小不能超过 5MB!') this.$baseMessage.error('上传文件大小不能超过 5MB!')
return false return false
} }
this.fileList = []
for (const x of fileList) {
if (x.raw) {
this.fileList.push(x.raw)
}
}
} }
} }
} }

@ -12,11 +12,12 @@
<div class="case-content"> <div class="case-content">
<div class="flex-row header"> <div class="flex-row header">
<el-radio-group v-model="caseDataStatus" size="large" @change="handleChange"> <el-radio-group v-model="caseAnalysisStatus" size="large" @change="handleChange">
<el-radio-button label="">全部</el-radio-button> <el-radio-button label="">全部</el-radio-button>
<el-radio-button label="0">未分析</el-radio-button> <el-radio-button label="0">未分析</el-radio-button>
<el-radio-button label="2">已分析</el-radio-button> <el-radio-button label="2">已分析</el-radio-button>
</el-radio-group> </el-radio-group>
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd"></el-button> <el-button type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd"></el-button>
<!-- <div> <!-- <div>
<el-button icon="el-icon-upload2" title="导入案件" circle @click="handleImport" /> <el-button icon="el-icon-upload2" title="导入案件" circle @click="handleImport" />
@ -130,7 +131,7 @@ export default {
], ],
// //
caseList: [], caseList: [],
caseDataStatus: '' caseAnalysisStatus: ''
} }
}, },
mounted() { mounted() {
@ -156,7 +157,7 @@ export default {
} }
delete params['updateTime'] delete params['updateTime']
if (params.identifyResult && params.identifyResult.length === 0) delete params['identifyResult'] if (params.identifyResult && params.identifyResult.length === 0) delete params['identifyResult']
params.caseDataStatus = this.caseDataStatus params.caseAnalysisStatus = this.caseAnalysisStatus
queryCaseList(params, this.queryForm.page, this.queryForm.size).then(res => { queryCaseList(params, this.queryForm.page, this.queryForm.size).then(res => {
this.caseList = res.data.records this.caseList = res.data.records
this.caseList.forEach(e => { this.caseList.forEach(e => {
@ -276,7 +277,7 @@ export default {
}, },
// tab // tab
handleChange(val) { handleChange(val) {
this.caseDataStatus = val this.caseAnalysisStatus = val
this.queryForm.page = 1 this.queryForm.page = 1
this.fetchData() this.fetchData()
}, },

@ -12,11 +12,11 @@
</div> </div>
<div> <div>
<div class="flex-row" style="justify-content: space-between;margin-bottom: 10px"> <div class="flex-row" style="justify-content: space-between;margin-bottom: 10px">
<span>证据充足占比</span> <span>取证不完全占比</span>
<span>{{ `${homeData['evidenceProportion']}%` }}</span> <span>{{ `${statisticsData['incompleteEvidenceRate']}%` }}</span>
</div> </div>
<el-progress <el-progress
:percentage="homeData['evidenceProportion']" :percentage="statisticsData['incompleteEvidenceRate']"
color="#FFFFFF" color="#FFFFFF"
:show-text="false" :show-text="false"
:stroke-width="15" :stroke-width="15"
@ -36,11 +36,11 @@
</div> </div>
<div> <div>
<div class="flex-row" style="justify-content: space-between;margin-bottom: 10px"> <div class="flex-row" style="justify-content: space-between;margin-bottom: 10px">
<span>嫌疑人占比</span> <span>自动投案占比</span>
<span>{{ `${homeData['doerProportion']}%` }}</span> <span>{{ `${statisticsData['surrenderRate']}%` }}</span>
</div> </div>
<el-progress <el-progress
:percentage="homeData['doerProportion']" :percentage="statisticsData['surrenderRate']"
color="#FFFFFF" color="#FFFFFF"
:show-text="false" :show-text="false"
:stroke-width="15" :stroke-width="15"

Loading…
Cancel
Save