#82 证据修改显隐问题调整

已合并
hhlxayunmei 2 年前 将 1 次代码提交从 hhl合并至 dev
共有 1 个文件被更改,包括 9 次插入5 次删除
  1. 9
    5
      src/views/caseManagement/components/addCase.vue

+ 9
- 5
src/views/caseManagement/components/addCase.vue 查看文件

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