|
|
|
@ -2,6 +2,11 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="evidence-content">
|
|
|
|
|
<div class="evidence-tree">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="filterText"
|
|
|
|
|
prefix-icon="el-icon-search"
|
|
|
|
|
placeholder="搜索名称"
|
|
|
|
|
/>
|
|
|
|
|
<el-tree
|
|
|
|
|
ref="tree"
|
|
|
|
|
node-key="id"
|
|
|
|
@ -9,7 +14,9 @@
|
|
|
|
|
current-node-key="1"
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
highlight-current
|
|
|
|
|
:filter-node-method="filterNode"
|
|
|
|
|
default-expand-all
|
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
@ -18,6 +25,7 @@
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" icon="el-icon-folder-add" @click="addFolder">新建文件夹</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="addEvidence">添加证据</el-button>
|
|
|
|
|
<el-button type="primary" @click="delAll">删除</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <el-input v-model="searchName" placeholder="搜索名称" style="width: 300px" /> -->
|
|
|
|
@ -28,11 +36,15 @@
|
|
|
|
|
<span v-if="index !== navList.length -1">></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<vxe-grid v-bind="gridOptions" style="margin-top: 10px;width: calc(100vw - 630px);">
|
|
|
|
|
<vxe-grid
|
|
|
|
|
ref="entityTable"
|
|
|
|
|
v-bind="gridOptions"
|
|
|
|
|
style="margin-top: 10px;width: calc(100vw - 630px);"
|
|
|
|
|
>
|
|
|
|
|
<template #status="{row}">
|
|
|
|
|
<div v-if="row.processStatus === '2'" class="status">
|
|
|
|
|
<img src="@/assets/record/success.png" alt="">
|
|
|
|
|
<span>处理完毕</span>
|
|
|
|
|
<span>已提取</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="row.processStatus === '3'" class="status">
|
|
|
|
|
<img src="@/assets/record/error.png" alt="">
|
|
|
|
@ -47,9 +59,10 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #opera="{row}">
|
|
|
|
|
<el-button type="text" @click="handelEdit(row)">编辑</el-button>
|
|
|
|
|
<el-button v-if="row.processStatus === '3'" type="text" @click="handelExtract(row)">重新提取</el-button>
|
|
|
|
|
<el-button type="text" style="color: red" @click="handleDel(row)">删除</el-button>
|
|
|
|
|
<el-button v-if="row.fileList.length > 0" type="text" icon="el-icon-edit" title="编辑" @click="handelEdit(row)" />
|
|
|
|
|
<el-button icon="el-icon-collection" title="重新提取" type="text" @click="handelExtract(row)" />
|
|
|
|
|
<el-button type="text" icon="el-icon-delete" style="color: red" title="删除" @click="handleDel(row)" />
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-grid>
|
|
|
|
|
<div style="text-align: center">
|
|
|
|
@ -74,7 +87,7 @@
|
|
|
|
|
import mixin from '@/views/mixin'
|
|
|
|
|
import EditEvidence from '@/views/caseDetails/components/edit/EditEvidence.vue'
|
|
|
|
|
import AddFolder from './AddEvidence/AddFolder.vue'
|
|
|
|
|
import { queryEvidenceList, deleteEvidence } from '@/api/caseDetails'
|
|
|
|
|
import { queryEvidenceList, deleteEvidence, batchDeleteEvidence } from '@/api/caseDetails'
|
|
|
|
|
import { debounce } from '@/utils'
|
|
|
|
|
import { getCaseEvidenceFileTree, caseEvidenceAnalysis } from '@/api/caseDetails/evidence'
|
|
|
|
|
import SelectUploadType from './SelectUploadType.vue'
|
|
|
|
@ -97,15 +110,16 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
searchName: '',
|
|
|
|
|
filterText: '',
|
|
|
|
|
gridOptions: {
|
|
|
|
|
...mixin.data().gridOptions,
|
|
|
|
|
columns: [
|
|
|
|
|
{ type: 'checkbox', width: '50px' },
|
|
|
|
|
{ title: '序号', type: 'seq', width: 80 },
|
|
|
|
|
{ title: '证据名称', field: 'evidenceName' },
|
|
|
|
|
{ title: '格式', field: 'evidenceFormat', width: 150 },
|
|
|
|
|
{ title: '提供人', field: 'provider', width: 200 },
|
|
|
|
|
{ title: '状态', slots: { default: 'status' }, align: 'center', width: 200 },
|
|
|
|
|
{ title: '证据类型', field: 'evidenceTypeDesc', width: 200 },
|
|
|
|
|
// { title: '证件文件', field: 'confessionMaterial' },
|
|
|
|
|
{ title: '最新时间', field: 'updateTime', width: 200 },
|
|
|
|
|
{ title: '操作', slots: { default: 'opera' }, fixed: 'right', width: '150px' }
|
|
|
|
@ -132,6 +146,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
searchName: function() {
|
|
|
|
|
this.debounceSearch(this)
|
|
|
|
|
},
|
|
|
|
|
filterText(val) {
|
|
|
|
|
this.$refs.tree.filter(val)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -147,6 +164,10 @@ export default {
|
|
|
|
|
debounceSearch: debounce((_this) => {
|
|
|
|
|
_this.fetchData()
|
|
|
|
|
}),
|
|
|
|
|
filterNode(value, data) {
|
|
|
|
|
if (!value) return true
|
|
|
|
|
return data.directoryName.indexOf(value) !== -1
|
|
|
|
|
},
|
|
|
|
|
addFolder() {
|
|
|
|
|
this.$refs.AddFolderRef.show()
|
|
|
|
|
},
|
|
|
|
@ -168,11 +189,23 @@ export default {
|
|
|
|
|
this.queryForm.total = res.data.total
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
filterTree(nodes) {
|
|
|
|
|
for (const node of nodes) {
|
|
|
|
|
if (node.level === 2) {
|
|
|
|
|
node.child = null
|
|
|
|
|
}
|
|
|
|
|
if (node.child) {
|
|
|
|
|
this.filterTree(node.child)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 查询左侧树
|
|
|
|
|
getTreeList() {
|
|
|
|
|
getCaseEvidenceFileTree({ caseId: this.caseId }).then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.treeData = res.data
|
|
|
|
|
// 过滤三级
|
|
|
|
|
this.filterTree(this.treeData)
|
|
|
|
|
this.treeData.unshift({
|
|
|
|
|
directoryName: '全部',
|
|
|
|
|
id: '1'
|
|
|
|
@ -214,7 +247,7 @@ export default {
|
|
|
|
|
this.$baseMessage.error('当前文件夹不可编辑!')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$router.push({ path: `/edit-evidence/${this.caseId}`, query: { caseName: this.$route.params.caseName, caseNo: this.$route.query.caseNo, evidenceId: row.id }})
|
|
|
|
|
this.$router.push({ path: `/edit-evidence/${this.caseId}/${row.id}`, query: { caseName: this.$route.params.caseName, caseNo: this.$route.query.caseNo }})
|
|
|
|
|
},
|
|
|
|
|
handleSelect(val) {
|
|
|
|
|
val === '1' ? this.$refs.edit.show() : this.$router.push({ path: `/add-evidence/${this.caseId}`, query: { caseName: this.$route.params.caseName, caseNo: this.$route.query.caseNo }})
|
|
|
|
@ -226,6 +259,28 @@ export default {
|
|
|
|
|
code === 200 ? this.$baseMessage.success(msg || '提取成功!') : this.$baseMessage.error(msg || '提取失败!')
|
|
|
|
|
this.fetchData()
|
|
|
|
|
},
|
|
|
|
|
// 批量删除
|
|
|
|
|
delAll() {
|
|
|
|
|
const item = this.$refs.entityTable.getCheckboxRecords()
|
|
|
|
|
const list = []
|
|
|
|
|
for (const items of item) {
|
|
|
|
|
list.push({
|
|
|
|
|
evidenceId: items.id,
|
|
|
|
|
fileId: items.fileId
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (list.length === 0) {
|
|
|
|
|
this.$baseMessage.error('请至少选择一条数据!')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
batchDeleteEvidence(list).then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.$baseMessage.success('删除成功!')
|
|
|
|
|
this.fetchData()
|
|
|
|
|
this.getTreeList()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 删除
|
|
|
|
|
handleDel(row) {
|
|
|
|
|
this.$baseConfirm('你确定要删除当前项吗', null, async() => {
|
|
|
|
@ -234,6 +289,7 @@ export default {
|
|
|
|
|
fileId: row.fileId
|
|
|
|
|
})
|
|
|
|
|
code === 200 ? this.$baseMessage.success(msg || '删除成功!') : this.$baseMessage.error(msg || '删除失败!')
|
|
|
|
|
this.getTreeList()
|
|
|
|
|
this.fetchData()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|