瀏覽代碼

调解书上传

hanchaobo 2 年之前
父節點
當前提交
f00a25449f
共有 1 個檔案被更改,包括 10 行新增5 行删除
  1. 10
    5
      src/views/caseManagement/components/mediation.vue

+ 10
- 5
src/views/caseManagement/components/mediation.vue 查看文件

98
         <!-- v-if="!mediationType" -->
98
         <!-- v-if="!mediationType" -->
99
         <el-col :span="24">
99
         <el-col :span="24">
100
           <el-form-item label="上传调解书">
100
           <el-form-item label="上传调解书">
101
-            <el-upload class="upload-demo" accept=".doc,.docx" ref="upload" :action="UploadUrl()"
102
-              :headers="headers" :data="filedata" :on-preview="handlePreview" :on-remove="handleRemove" :limit="1"
101
+            <el-upload class="upload-demo" accept=".doc,.docx,.pdf" ref="upload" :action="UploadUrl()"
102
+              :headers="headers" :data="filedata" :on-preview="handlePreview" :on-remove="handleRemove" :limit="2"
103
               :on-change="beforeUpload" :on-success="handlSuccess" :file-list="fileList">
103
               :on-change="beforeUpload" :on-success="handlSuccess" :file-list="fileList">
104
               <el-button slot="trigger" size="small" :disabled="!isSecretaryRole" type="primary">选取文件</el-button>
104
               <el-button slot="trigger" size="small" :disabled="!isSecretaryRole" type="primary">选取文件</el-button>
105
               <!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
105
               <!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
106
-              <div slot="tip" class="el-upload__tip">只能上传.doc,docx文件</div>
106
+              <div slot="tip" class="el-upload__tip">只能上传.doc,docx,pdf文件</div>
107
             </el-upload>
107
             </el-upload>
108
           </el-form-item>
108
           </el-form-item>
109
         </el-col>
109
         </el-col>
178
   },
178
   },
179
   watch: {
179
   watch: {
180
     mediationVisable(val) {
180
     mediationVisable(val) {
181
+      this.attachList = [];
181
       this.formData.mediaResult = 1;
182
       this.formData.mediaResult = 1;
182
       this.formData.sealFlag = 1;
183
       this.formData.sealFlag = 1;
183
       this.recordArr = [];
184
       this.recordArr = [];
221
     handlePreview(file) {
222
     handlePreview(file) {
222
     },
223
     },
223
     handleRemove(file, fileList) {
224
     handleRemove(file, fileList) {
224
-
225
+      let updatedArray = this.attachList.filter(item => item.annexId != file.response.annexId);
226
+      this.attachList = updatedArray;
225
     },
227
     },
226
     beforeUpload(flie, fileList) {
228
     beforeUpload(flie, fileList) {
227
       this.fileList = fileList;
229
       this.fileList = fileList;
229
     handlSuccess(res, file) {
231
     handlSuccess(res, file) {
230
       this.codes = res.code
232
       this.codes = res.code
231
       console.log(res)
233
       console.log(res)
232
-      this.attachList = [{ annexId: res.annexId,annexType:res.annexType}];
234
+      this.attachList.push({ annexId: res.annexId,annexType:res.annexType});
233
       // this.$set(this.mediationData, "attachList", {annexId:res.annexId});
235
       // this.$set(this.mediationData, "attachList", {annexId:res.annexId});
234
     },
236
     },
235
     /** 获取案件详情信息 */
237
     /** 获取案件详情信息 */
319
         this.$emit("cancelMediation");
321
         this.$emit("cancelMediation");
320
         this.$emit("getList", this.queryParams);
322
         this.$emit("getList", this.queryParams);
321
         this.loadingSubmit = false;
323
         this.loadingSubmit = false;
324
+      }).catch(err=>{
325
+        this.loadingSubmit = false;
322
       });
326
       });
323
     },
327
     },
324
     cancel() {
328
     cancel() {
352
           id: this.mediationData.id,
356
           id: this.mediationData.id,
353
           caseFlowId: this.mediationData.caseFlowId,
357
           caseFlowId: this.mediationData.caseFlowId,
354
           sealFlag:this.sealFlag,
358
           sealFlag:this.sealFlag,
359
+          attachList: this.attachList,
355
           mediaResult: this.formData.mediaResult,
360
           mediaResult: this.formData.mediaResult,
356
         }
361
         }
357
       }
362
       }