|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div>
|
|
|
3
|
+ <el-dialog title="调解书" :visible="mediationAppVisable" width="500px" @close="cancel" center
|
|
|
4
|
+ :distroy-on-close="true">
|
|
|
5
|
+ <div>
|
|
|
6
|
+ <div>
|
|
|
7
|
+ <span style="font-weight: bold;">下载调解书</span>
|
|
|
8
|
+ </div>
|
|
|
9
|
+ <div style="margin-top: 10px;">
|
|
|
10
|
+ <div style="color: blue; cursor: pointer" v-for="(item, index) in getFileListV"
|
|
|
11
|
+ v-if="item.annexType == 7 || item.annexType == 13" @click="downloadApplic(item.annexPath)">{{
|
|
|
12
|
+ item.annexName }}</div>
|
|
|
13
|
+ </div>
|
|
|
14
|
+ </div>
|
|
|
15
|
+ <div style="margin-top: 30px;">
|
|
|
16
|
+ <div>
|
|
|
17
|
+ <span style="font-weight: bold;">上传调解书</span>
|
|
|
18
|
+ </div>
|
|
|
19
|
+ <div style="margin-top: 10px;">
|
|
|
20
|
+ <el-upload class="upload-demo" accept=".doc,.docx,.pdf" ref="upload" :action="UploadUrl()"
|
|
|
21
|
+ :headers="headers" :data="filedata" :on-preview="handlePreview" :on-remove="handleRemove"
|
|
|
22
|
+ :auto-upload="false" :limit="1" :on-change="beforeUpload" :on-success="handlSuccess"
|
|
|
23
|
+ :file-list="fileList">
|
|
|
24
|
+ <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
25
|
+ <div slot="tip" class="el-upload__tip">只能上传.doc,docx,pdf文件</div>
|
|
|
26
|
+ </el-upload>
|
|
|
27
|
+ </div>
|
|
|
28
|
+ </div>
|
|
|
29
|
+ <div slot="footer" class="dialog-footer">
|
|
|
30
|
+ <el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
|
|
|
31
|
+ <el-button @click="submitMediator" class="endbutton1" type="primary" round><span>确 认</span></el-button>
|
|
|
32
|
+ </div>
|
|
|
33
|
+ </el-dialog>
|
|
|
34
|
+ </div>
|
|
|
35
|
+</template>
|
|
|
36
|
+
|
|
|
37
|
+<script>
|
|
|
38
|
+import { getFileList, meetingUpload } from "@/api/caseManagement/caseManagement.js"
|
|
|
39
|
+import { createRoomId } from '@/api/metting/metting.js'
|
|
|
40
|
+import { getToken } from "@/utils/auth";
|
|
|
41
|
+import moment from "moment";
|
|
|
42
|
+export default {
|
|
|
43
|
+ props: ["mediationAppVisable", "mediationLise", "queryParams"],
|
|
|
44
|
+ data() {
|
|
|
45
|
+ return {
|
|
|
46
|
+ getFileListV: [],
|
|
|
47
|
+ fileURL: window.location.origin + "/API",
|
|
|
48
|
+ fileList: [],
|
|
|
49
|
+ headers: {
|
|
|
50
|
+ Authorization: "Bearer " + getToken(),
|
|
|
51
|
+ },
|
|
|
52
|
+ filedata: {
|
|
|
53
|
+ annexType: null,
|
|
|
54
|
+ caseId: null
|
|
|
55
|
+ },
|
|
|
56
|
+ };
|
|
|
57
|
+ },
|
|
|
58
|
+ watch: {
|
|
|
59
|
+ mediationAppVisable(val) {
|
|
|
60
|
+ this.fileList = []
|
|
|
61
|
+ if (val) {
|
|
|
62
|
+ let dataValue = {
|
|
|
63
|
+ caseAppliId: this.mediationLise.id,
|
|
|
64
|
+ }
|
|
|
65
|
+ console.log(dataValue)
|
|
|
66
|
+ this.getFileListFn(dataValue)
|
|
|
67
|
+ }
|
|
|
68
|
+ },
|
|
|
69
|
+ },
|
|
|
70
|
+
|
|
|
71
|
+ methods: {
|
|
|
72
|
+ /**上传地址*/
|
|
|
73
|
+ UploadUrl() {
|
|
|
74
|
+ return window.location.origin + "/API/video/upload";
|
|
|
75
|
+ },
|
|
|
76
|
+ handlePreview(file) {
|
|
|
77
|
+ },
|
|
|
78
|
+ handleRemove(file, fileList) {
|
|
|
79
|
+
|
|
|
80
|
+ },
|
|
|
81
|
+ beforeUpload(flie, fileList) {
|
|
|
82
|
+ const isLt2M = flie.size / 1024 / 1024 < 50; // 小于50MB
|
|
|
83
|
+ if (!isLt2M) {
|
|
|
84
|
+ this.$message.error('上传的文件大小不能超过 50MB!');
|
|
|
85
|
+ }
|
|
|
86
|
+ return isLt2M;
|
|
|
87
|
+ function getFileExtension(filename) {
|
|
|
88
|
+ const parts = filename.split('.');
|
|
|
89
|
+ return parts.length > 1 ? parts.pop() : '';
|
|
|
90
|
+ }
|
|
|
91
|
+ const extension = getFileExtension(flie.name);
|
|
|
92
|
+ if (extension == 'docx' || extension == 'doc') {
|
|
|
93
|
+ this.filedata.annexType = 7
|
|
|
94
|
+ } else if (extension == 'pdf') {
|
|
|
95
|
+ this.filedata.annexType = 13
|
|
|
96
|
+ }
|
|
|
97
|
+ this.filedata.caseId = this.mediationLise.id
|
|
|
98
|
+ this.fileList = fileList;
|
|
|
99
|
+ },
|
|
|
100
|
+ handlSuccess(res, file) {
|
|
|
101
|
+ if (res.code == 200) {
|
|
|
102
|
+ this.$modal.msgSuccess("上传成功");
|
|
|
103
|
+ this.$emit("cancelmediationApp");
|
|
|
104
|
+ }
|
|
|
105
|
+ },
|
|
|
106
|
+ cancel() {
|
|
|
107
|
+ this.$emit("cancelmediationApp");
|
|
|
108
|
+ },
|
|
|
109
|
+ // 获取申请书附件
|
|
|
110
|
+ async getFileListFn(vals) {
|
|
|
111
|
+ await getFileList(vals).then(res => {
|
|
|
112
|
+ this.getFileListV = res.data
|
|
|
113
|
+ })
|
|
|
114
|
+ },
|
|
|
115
|
+ // 下载申请书
|
|
|
116
|
+ downloadApplic(val) {
|
|
|
117
|
+ window.open(this.fileURL + val);
|
|
|
118
|
+ },
|
|
|
119
|
+ /**提交选择结果*/
|
|
|
120
|
+ async submitMediator() {
|
|
|
121
|
+ this.$refs.upload.submit()
|
|
|
122
|
+
|
|
|
123
|
+
|
|
|
124
|
+ },
|
|
|
125
|
+ },
|
|
|
126
|
+
|
|
|
127
|
+};
|
|
|
128
|
+</script>
|
|
|
129
|
+
|
|
|
130
|
+<style lang="scss" scoped></style>
|