Просмотр исходного кода

'证据修改显隐问题调整'

hhl123456789 2 лет назад
Родитель
Сommit
6a0a382963
1 измененных файлов: 9 добавлений и 5 удалений
  1. 9
    5
      src/views/caseManagement/components/addCase.vue

+ 9
- 5
src/views/caseManagement/components/addCase.vue Просмотреть файл

@@ -84,7 +84,7 @@
84 84
               </el-select>
85 85
             </el-form-item>
86 86
           </el-col> -->
87
-          <el-col :span="12">
87
+          <el-col :span="12" v-if="buttonFlag">
88 88
             <el-form-item label="申请人案件证据资料上传:" prop="applicantEvidence">
89 89
               <el-upload class="upload-demo" ref="fileupload" accept=".png,.jpg,.doc,.docx,.txt,.pdf"
90 90
                 :action="UploadUrl()" :on-success="handlSuccess" :on-remove="handleRemove" :on-preview="handlePreview"
@@ -97,7 +97,7 @@
97 97
               </el-upload>
98 98
             </el-form-item>
99 99
           </el-col>
100
-          <el-col :span="24" v-if="modelFlag">
100
+          <el-col :span="24" v-if="modelFlag && showEvidence">
101 101
             <el-form-item label="证据:">
102 102
               <div v-for="(item, index) in formData.caseAttachList" :key="index" v-if="item.annexType == 2">
103 103
                 <div style="color: blue; cursor: pointer" @click="fileDetil(item.annexPath)">
@@ -578,6 +578,7 @@ export default {
578 578
       getUserInfoList: {},
579 579
       applicationFlag: null,
580 580
       showmediate: false,
581
+      showEvidence: false,//是否显示证据
581 582
       formZipData: {},
582 583
       nationalityList: [
583 584
         {
@@ -671,12 +672,14 @@ export default {
671 672
     caseApplicationSelectByIdFn(data) {
672 673
       this.applicantEvidence = [];
673 674
       this.respondentEvidence = [];
675
+      this.showEvidence = false;
674 676
       caseApplicationSelectById({ id: data }).then((res) => {
675 677
         res.data.affiliate.respondentSex = Number(res.data.affiliate.respondentSex)
676 678
         this.formData = res.data;
677 679
         this.formData.caseAttachList.forEach((item) => {
678 680
           if (item.annexType == 2) {
679 681
             this.applicantEvidence.push(item);
682
+            this.showEvidence = true
680 683
           } else if (item.annexType == 6) {
681 684
             // this.respondentEvidence.push(item);
682 685
           } else if (item.annexType == 7) {
@@ -740,9 +743,10 @@ export default {
740 743
       return this.$confirm(`确定移除 ${file.name}?`);
741 744
     },
742 745
     handleRemove(file, fileList) {
743
-      this.caseAttachListArr = this.caseAttachListArr.filter(
744
-        (item) => item.annexId != file.annexId
745
-      );
746
+      let newcaseAttachList = this.formData.caseAttachList.filter(item => 
747
+        item.annexId !== file.response.annexId
748
+      )
749
+      this.formData.caseAttachList = newcaseAttachList
746 750
     },
747 751
     handleExceedZip(files, fileList) {
748 752
       this.$message.warning(`当前限制选择 1 个文件`);