1102提交

This commit is contained in:
fz
2023-11-02 14:30:57 +08:00
parent ec2afd10a5
commit 434d6e186f
10 changed files with 258 additions and 71 deletions
@@ -16,8 +16,8 @@
</el-descriptions-item>
</el-descriptions>
<div style="margin-top: 30px;">
<el-upload class="upload-demo" ref="upload" action="" accept=".png,.jpg,.doc,.docx,.txt,.pdf"
:auto-upload="false" :http-request="uploadFile" :on-change="beforeAvatarUpload" multiple>
<el-upload class="upload-demo" ref="upload" action="" :file-list="fileList" accept=".png,.jpg,.doc,.docx,.txt,.pdf"
:auto-upload="false" :http-request="uploadFile" :on-change="beforeAvatarUpload" :before-remove="beforeRemove" multiple>
<el-button type="primary"><span>修改证据</span></el-button>
</el-upload>
</div>
@@ -44,6 +44,7 @@ export default {
info: {
annexType: 2,
},
fileList:[]
// headers: {
// Authorization: "Bearer " + getToken(),
// },
@@ -51,6 +52,7 @@ export default {
},
watch: {
evidenceVisable(val) {
this.fileList = []
if (val) {
this.getEvidenceList({ caseAppliId: this.evidenceData.id, annexTypeList: "2" })
}
@@ -72,14 +74,20 @@ export default {
cancel() {
this.$emit("cancelEvidence");
},
// // 修改当前文件列表长度
// 修改当前文件列表长度
// changeFileLength(file, fileList) {
// this.filesLength = fileList.length
// this.uploadFiles.push(file)
// },
// 删除文件
beforeRemove(file, fileList){
this.uploadFiles = fileList
},
// 文件上传之前处理
beforeAvatarUpload(file) {
beforeAvatarUpload(file,fileList) {
console.log(file,fileList,"before");
this.uploadFiles = [];
this.uploadFiles.push(file)
// this.uploadFiles.push(file)
this.uploadFiles = fileList
},
// 用户点击上传调用
async upload() {