@@ -112,13 +112,18 @@ export default {
getCaseEvidenceTree({ caseId: this.caseId, caseType: 1 }).then(res => {
if (res.code === 200) {
this.treeData = res.data
+ for (let i = this.treeData.length - 1; i >= 0; i--) {
+ if (!this.treeData[i].child) {
+ this.treeData.splice(i, 1)
+ }
+ }
}
})
},
handleAdd() {
this.$refs.add.show()
},
- selectDirectory(item) {
+ selectDirectory() {
const nodes = this.$refs.cascaderRef.getCheckedNodes()
console.log(nodes)
this.$set(this.addInfo, 'type', nodes[0].data.promptName)
diff --git a/src/views/caseDetails/components/AddEvidence/components/EvidenceConfirm.vue b/src/views/caseDetails/components/AddEvidence/components/EvidenceConfirm.vue
index 20dde08..b411deb 100644
--- a/src/views/caseDetails/components/AddEvidence/components/EvidenceConfirm.vue
+++ b/src/views/caseDetails/components/AddEvidence/components/EvidenceConfirm.vue
@@ -28,12 +28,13 @@
-
+
-
![]()
+
![]()
-
+
+
@@ -64,7 +65,7 @@
-
+
@@ -72,11 +73,58 @@
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -106,6 +154,7 @@ export default {
caseNo: '',
caseName: '',
dataInfo: {},
+ evidenceInfo: undefined,
navList: [],
// 证据类型
evidenceTypeList: JSON.parse(sessionStorage.getItem('evidence_type')),
@@ -118,6 +167,7 @@ export default {
},
treeData: [],
flag: true,
+ level: '',
selectInfo: {
evidenceInfo: {
property: [],
@@ -162,22 +212,19 @@ export default {
getImgUrl(id) {
return `${baseURL}${commonDownloadFile}${id}`
},
- selectItem(item) {
- this.selectInfo = item
+ selectItem(index) {
+ this.selectInfo = this.selectList[index]
this.activedImg = `${baseURL}${commonDownloadFile}${this.selectInfo.fileId}`
},
reset() {
-
+ this.getTreeList()
},
findNodeById(nodes, id) {
for (const node of nodes) {
if (node.id === id) {
- return node
+ node.fileInfoList = this.selectList
} else if (node.child) {
- const foundNode = this.findNodeById(node.child, id)
- if (foundNode) {
- return foundNode
- }
+ this.findNodeById(node.child, id)
}
}
return null
@@ -197,20 +244,21 @@ export default {
return null
},
handleNodeClick(data) {
- this.selectId = data.id
+ // this.selectId = data.id
this.navList = []
this.navList = this.getParentNames(data, this.treeData)
- const nodeItem = this.findNodeById(this.treeData, this.selectId)
- if (nodeItem.fileInfoList.length === 0) {
- const newNodeItem = this.getFileList(nodeItem.child)
- this.$refs.tree.setCurrentKey(newNodeItem.id)
- this.selectList = newNodeItem.fileInfoList
- this.selectInfo = this.selectList[0]
+ const nodeItem = this.getFileList(this.treeData)
+ if (nodeItem.evidenceInfo) {
+ this.level = '3'
+ this.evidenceInfo = nodeItem.evidenceInfo
} else {
- this.selectList = nodeItem.fileInfoList
- this.selectInfo = this.selectList[0]
+ this.level = '2'
}
+ this.selectList = nodeItem.fileInfoList
+ this.selectInfo = this.selectList[0]
+ this.selectId = nodeItem.id
this.navList.push(data.directoryName)
+ this.$refs.tree.setCurrentKey(this.selectId)
},
checkEvidence(nodes) {
for (const item of nodes) {
@@ -228,6 +276,9 @@ export default {
}
}
},
+ handleAdd() {
+ this.$refs.add.show()
+ },
save() {
this.checkEvidence(this.treeData)
if (this.flag) {
@@ -249,7 +300,11 @@ export default {
this.$baseMessage.error('证据不能为空!')
}
},
+ handleDragEnd() {
+ this.findNodeById(this.treeData, this.selectId)
+ },
submit() {
+ console.log('2323', this.selectList)
this.save()
this.$emit('submit')
}
@@ -298,7 +353,7 @@ export default {
display: flex;
flex: 1;
.left {
- width: 55%;
+
margin-right: 24px;
position: relative;
// background: #F6F8F9;
@@ -324,12 +379,13 @@ export default {
background: #F6F8F9;
width: 150px;
margin-right: 14px;
+ height: calc(100vh - 408px);
}
.act_img {
padding: 16px 28px;
flex: 1;
background: #F6F8F9;
- height: calc(100vh - 420px);
+ height: calc(100vh - 472px);
background-size: 100% 100%;
display: flex;
align-items: center;
@@ -343,7 +399,7 @@ export default {
}
}
.right {
- width: 45%;
+ flex: 1;
position: relative;
border: 1px solid #DCE3EB;
display: flex;
@@ -370,6 +426,7 @@ export default {
background: #F6F8F9;
border-radius: 8px 8px 8px 8px;
margin-left: 24px;
+ overflow-y: auto;
// height: calc(100vh - 350px);
padding: 0 24px;
margin-bottom: 72px;
@@ -408,6 +465,10 @@ export default {
border-radius: 6px 6px 6px 6px;
border: 1px solid #D1D3D6;
cursor: move;
+ img {
+ width: 98px;
+ height: 138px;
+ }
}
.svg-img {
width: 98px;
@@ -519,7 +580,7 @@ export default {