|
|
@@ -70,6 +70,27 @@
|
|
70
|
70
|
</el-select>
|
|
71
|
71
|
</el-form-item>
|
|
72
|
72
|
</el-col>
|
|
|
73
|
+ <el-col :span="12">
|
|
|
74
|
+ <el-form-item label="申请人案件证据资料上传:" prop="applicantEvidence">
|
|
|
75
|
+ <el-upload class="upload-demo" ref="fileupload" accept=".png,.jpg,.doc,.docx,.txt,.pdf"
|
|
|
76
|
+ :action="UploadUrl()" :on-success="handlSuccess" :on-remove="handleRemove"
|
|
|
77
|
+ :on-preview="handlePreview" :before-remove="beforeRemove" :data="filedata"
|
|
|
78
|
+ :headers="headers" multiple :limit="50" :on-exceed="handleExceed" :file-list="fileList">
|
|
|
79
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
80
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
81
|
+ 文件支持上传.jpg,png,.doc,docx,.txt,.pdf文件
|
|
|
82
|
+ </div>
|
|
|
83
|
+ </el-upload>
|
|
|
84
|
+ </el-form-item>
|
|
|
85
|
+ </el-col>
|
|
|
86
|
+ <el-col :span="24" v-if="modelFlag">
|
|
|
87
|
+ <el-form-item label="证据">
|
|
|
88
|
+ <div v-for="(item, index) in formData.caseAttachList" :key="index">
|
|
|
89
|
+ <div style="color: blue;cursor: pointer;" @click="fileDetil(item.annexPath)">{{
|
|
|
90
|
+ item.annexName }}</div>
|
|
|
91
|
+ </div>
|
|
|
92
|
+ </el-form-item>
|
|
|
93
|
+ </el-col>
|
|
73
|
94
|
<el-col :span="24">
|
|
74
|
95
|
<div style="display: inline-flex">
|
|
75
|
96
|
<div class="infoIcon"></div>
|
|
|
@@ -303,6 +324,7 @@ import {
|
|
303
|
324
|
import {
|
|
304
|
325
|
getTemplate,
|
|
305
|
326
|
} from "@/api/officialSeal/officialSeal.js";
|
|
|
327
|
+import { getToken } from "@/utils/auth";
|
|
306
|
328
|
export default {
|
|
307
|
329
|
props: ["addVisable", "queryParams", "caseData", "caseDisabled"],
|
|
308
|
330
|
dicts: ["case_built_type"],
|
|
|
@@ -317,7 +339,15 @@ export default {
|
|
317
|
339
|
caseAttachList: []
|
|
318
|
340
|
},
|
|
319
|
341
|
templateList: [],
|
|
320
|
|
- modelFlag:false,
|
|
|
342
|
+ modelFlag: false,
|
|
|
343
|
+ fileURL: window.location.origin + "/API",
|
|
|
344
|
+ fileList: [],
|
|
|
345
|
+ filedata: {
|
|
|
346
|
+ annexType: 2,
|
|
|
347
|
+ },
|
|
|
348
|
+ headers: {
|
|
|
349
|
+ Authorization: "Bearer " + getToken(),
|
|
|
350
|
+ },
|
|
321
|
351
|
};
|
|
322
|
352
|
},
|
|
323
|
353
|
watch: {
|
|
|
@@ -372,6 +402,42 @@ export default {
|
|
372
|
402
|
this.templateList = res.rows;
|
|
373
|
403
|
})
|
|
374
|
404
|
},
|
|
|
405
|
+ /** 查看证据 */
|
|
|
406
|
+ fileDetil(val) {
|
|
|
407
|
+ window.open(this.fileURL + val)
|
|
|
408
|
+ },
|
|
|
409
|
+ /** 文件上传地址 */
|
|
|
410
|
+ UploadUrl() {
|
|
|
411
|
+ return window.location.origin + "/API/common/upload";
|
|
|
412
|
+ },
|
|
|
413
|
+ /**文件上传成功*/
|
|
|
414
|
+ handlSuccess(res, file) {
|
|
|
415
|
+ this.formData.caseAttachList.push(
|
|
|
416
|
+ {
|
|
|
417
|
+ annexId:res.annexId,
|
|
|
418
|
+ }
|
|
|
419
|
+ );
|
|
|
420
|
+ },
|
|
|
421
|
+ /**文件超出个数限制时的钩子*/
|
|
|
422
|
+ handleExceed(files, fileList) {
|
|
|
423
|
+ this.$message.warning(
|
|
|
424
|
+ `当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
|
|
|
425
|
+ } 个文件`
|
|
|
426
|
+ );
|
|
|
427
|
+ },
|
|
|
428
|
+ // 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
|
|
|
429
|
+ beforeRemove(file, fileList) {
|
|
|
430
|
+ return this.$confirm(`确定移除 ${file.name}?`);
|
|
|
431
|
+ },
|
|
|
432
|
+ handleRemove(file, fileList) {
|
|
|
433
|
+ this.caseAttachListArr = this.caseAttachListArr.filter(item => item.annexId != file.annexId)
|
|
|
434
|
+ },
|
|
|
435
|
+ handlePreview(file) {
|
|
|
436
|
+ window.open(
|
|
|
437
|
+ window.location.origin + "/API" + file.certificatePath,
|
|
|
438
|
+ "_blank"
|
|
|
439
|
+ );
|
|
|
440
|
+ },
|
|
375
|
441
|
// 提交form表单
|
|
376
|
442
|
submitForm() {
|
|
377
|
443
|
this.$refs['ruleForm'].validate((valid) => {
|