n20-common-lib 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/package.json +120 -0
- package/src/assets/css/_coreLib.scss +26 -0
- package/src/assets/css/cl-approve-card.scss +66 -0
- package/src/assets/css/cl-drag-list.scss +22 -0
- package/src/assets/css/cl-empty.scss +10 -0
- package/src/assets/css/cl-expandable.scss +31 -0
- package/src/assets/css/cl-file-upload-table.scss +11 -0
- package/src/assets/css/cl-filter.scss +20 -0
- package/src/assets/css/cl-foldedpanel.scss +35 -0
- package/src/assets/css/cl-footer-box.scss +8 -0
- package/src/assets/css/cl-form-item.scss +281 -0
- package/src/assets/css/cl-more-tab.scss +98 -0
- package/src/assets/css/cl-nav-menu.scss +5 -0
- package/src/assets/css/cl-pagination.scss +71 -0
- package/src/assets/css/cl-secondary-tab.scss +30 -0
- package/src/assets/css/cl-sifting.scss +51 -0
- package/src/assets/css/cl-statis.scss +14 -0
- package/src/assets/css/cl-step.scss +164 -0
- package/src/assets/css/cl-suspend.scss +25 -0
- package/src/assets/css/cl-tertiary-tab.scss +37 -0
- package/src/assets/css/cl-upload.scss +41 -0
- package/src/assets/css/cl-worn-pagination.scss +50 -0
- package/src/assets/css/element-variables.scss +1053 -0
- package/src/assets/css/element.dev.scss +5 -0
- package/src/assets/css/font-icon.scss +22 -0
- package/src/assets/css/index.dev.scss +3 -0
- package/src/assets/css/index.scss +8 -0
- package/src/assets/css/normalize.scss +243 -0
- package/src/assets/css/rootvar.scss +66 -0
- package/src/assets/css/title-pop.scss +4 -0
- package/src/assets/getJsonc.js +51 -0
- package/src/assets/postMessage.js +2 -0
- package/src/assets/postMessageC.js +37 -0
- package/src/components/ApproveCard/index.vue +83 -0
- package/src/components/DatePicker/index.vue +22 -0
- package/src/components/Dialog/index.vue +115 -0
- package/src/components/DragList/index.vue +64 -0
- package/src/components/Empty/img/404.png +0 -0
- package/src/components/Empty/img/abnormal.svg +109 -0
- package/src/components/Empty/img/dispose.svg +72 -0
- package/src/components/Empty/img/empty.svg +58 -0
- package/src/components/Empty/img/general.svg +59 -0
- package/src/components/Empty/img/lock.svg +58 -0
- package/src/components/Empty/img/network.svg +60 -0
- package/src/components/Empty/img/relevant.svg +69 -0
- package/src/components/Empty/img/search.svg +73 -0
- package/src/components/Empty/index.vue +92 -0
- package/src/components/Expandable/index.vue +47 -0
- package/src/components/FileUploadTable/index.vue +456 -0
- package/src/components/Filters/index.vue +77 -0
- package/src/components/FoldedPanel/index.vue +64 -0
- package/src/components/FooterBox/index.vue +18 -0
- package/src/components/InputNumber/index.vue +126 -0
- package/src/components/MoreTab/index.vue +232 -0
- package/src/components/NavMenu/index.vue +90 -0
- package/src/components/Pagination/index.vue +126 -0
- package/src/components/SecondaryTab/index.vue +75 -0
- package/src/components/Select/index.vue +51 -0
- package/src/components/Sifting/index.vue +97 -0
- package/src/components/Statis/index.vue +55 -0
- package/src/components/Step/index.vue +65 -0
- package/src/components/Suspend/index.vue +63 -0
- package/src/components/Suspend/suspensionBtn.png +0 -0
- package/src/components/TertiaryTab/index.vue +49 -0
- package/src/components/TimePicker/index.vue +22 -0
- package/src/components/Upload/index.vue +237 -0
- package/src/components/WornPagination/index.vue +202 -0
- package/src/directives/VMove/index.js +42 -0
- package/src/directives/VTitle/index.js +55 -0
- package/src/directives/VTitle/tooltip.vue +21 -0
- package/src/directives/vDrag/index.js +72 -0
- package/src/index.js +111 -0
- package/src/utils/auth.js +41 -0
- package/src/utils/axios.js +180 -0
- package/src/utils/print.js +156 -0
- package/src/utils/pushLink.js +5 -0
- package/style/css/normalize.scss +243 -0
- package/style/fonts/element-icons.535877f5.woff +0 -0
- package/style/fonts/element-icons.732389de.ttf +0 -0
- package/style/index.css +3 -0
- package/style/index.css.map +1 -0
- package/style/index.umd.min.js +2 -0
- package/style/index.umd.min.js.map +1 -0
- package/style/server-config.jsonc +212 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 查看附件信息 -->
|
|
3
|
+
<div v-if="readonly" class="bd-t bd-l bd-r">
|
|
4
|
+
<div class="p-l p-r p-t-s p-b-s">
|
|
5
|
+
<div class="flex-box flex-v flex-lr">
|
|
6
|
+
<span>附件信息</span>
|
|
7
|
+
<el-button v-if="tableData.length" size="mini" plain @click="downRows"
|
|
8
|
+
>批量下载</el-button
|
|
9
|
+
>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<el-table
|
|
14
|
+
:data="tableData"
|
|
15
|
+
:row-key="keys.rowKey"
|
|
16
|
+
@selection-change="(selection) => (selectionList = selection)"
|
|
17
|
+
>
|
|
18
|
+
<el-table-column type="selection" width="50" align="center" />
|
|
19
|
+
<el-table-column label="附件类型" :prop="keys.type">
|
|
20
|
+
<template slot-scope="{ row }">
|
|
21
|
+
{{ row[keys.type] | typeFiter(typeOptions) }}
|
|
22
|
+
</template>
|
|
23
|
+
</el-table-column>
|
|
24
|
+
<el-table-column label="附件名称" :prop="keys.name" />
|
|
25
|
+
<el-table-column label="上传时间" :prop="keys.time" align="center" />
|
|
26
|
+
<el-table-column label="上传人" :prop="keys.user" />
|
|
27
|
+
<el-table-column label="操作" align="center" width="80">
|
|
28
|
+
<template slot-scope="{ row }">
|
|
29
|
+
<el-button
|
|
30
|
+
type="text"
|
|
31
|
+
icon="el-icon-view"
|
|
32
|
+
:disabled="seeTypes && !seeTypes.test(row[keys.url])"
|
|
33
|
+
@click="seeFile(row)"
|
|
34
|
+
/>
|
|
35
|
+
<el-button
|
|
36
|
+
type="text"
|
|
37
|
+
icon="el-icon-download"
|
|
38
|
+
:disabled="!row[keys.url]"
|
|
39
|
+
@click="downFile(row)"
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
42
|
+
</el-table-column>
|
|
43
|
+
</el-table>
|
|
44
|
+
|
|
45
|
+
<el-dialog
|
|
46
|
+
class="p-a-0"
|
|
47
|
+
title="附件预览"
|
|
48
|
+
:visible.sync="visibleP"
|
|
49
|
+
top="2vh"
|
|
50
|
+
width="96%"
|
|
51
|
+
>
|
|
52
|
+
<template slot="title">
|
|
53
|
+
<span class="el-dialog__title m-r"> 附件预览 </span>
|
|
54
|
+
<span v-if="!previewSameOrg" style="color: #999"
|
|
55
|
+
>附件地址与本页面地址不同源,可能无法查看。<a
|
|
56
|
+
:href="previewUrl"
|
|
57
|
+
:download="previewName || previewUrl"
|
|
58
|
+
>下载</a
|
|
59
|
+
>
|
|
60
|
+
</span>
|
|
61
|
+
</template>
|
|
62
|
+
<div class="p-a" style="height: 82vh">
|
|
63
|
+
<object
|
|
64
|
+
:key="previewUrl"
|
|
65
|
+
:data="previewUrl"
|
|
66
|
+
style="width: 100%; height: 100%"
|
|
67
|
+
>
|
|
68
|
+
<div class="flex-column flex-c flex-v" style="height: 100%">
|
|
69
|
+
<i
|
|
70
|
+
class="el-icon-s-release"
|
|
71
|
+
style="font-size: 60px; color: #999"
|
|
72
|
+
></i>
|
|
73
|
+
<span style="margin-top: 16px">
|
|
74
|
+
不支持在线预览,请
|
|
75
|
+
<a :href="previewUrl" :download="previewName || previewUrl"
|
|
76
|
+
>下载</a
|
|
77
|
+
>
|
|
78
|
+
到本地查看
|
|
79
|
+
</span>
|
|
80
|
+
</div>
|
|
81
|
+
</object>
|
|
82
|
+
</div>
|
|
83
|
+
</el-dialog>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<!-- 上传附件 -->
|
|
87
|
+
<div v-else class="bd-t bd-l bd-r">
|
|
88
|
+
<div class="p-l p-r p-t-s p-b-s">
|
|
89
|
+
<div class="flex-box flex-v flex-lr">
|
|
90
|
+
<span>附件信息</span>
|
|
91
|
+
<div>
|
|
92
|
+
<el-button type="primary" size="mini" @click="addRow">新增</el-button>
|
|
93
|
+
<el-button v-if="tableData.length" size="mini" plain @click="downRows"
|
|
94
|
+
>下载</el-button
|
|
95
|
+
>
|
|
96
|
+
<el-button
|
|
97
|
+
v-if="tableData.length"
|
|
98
|
+
type="danger"
|
|
99
|
+
plain
|
|
100
|
+
size="mini"
|
|
101
|
+
@click="deleteRows"
|
|
102
|
+
>删除</el-button
|
|
103
|
+
>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<el-table
|
|
109
|
+
:data="tableData"
|
|
110
|
+
:row-key="keys.rowKey"
|
|
111
|
+
@selection-change="(selection) => (selectionList = selection)"
|
|
112
|
+
>
|
|
113
|
+
<el-table-column type="selection" width="50" align="center" />
|
|
114
|
+
<el-table-column label="附件类型" min-width="160">
|
|
115
|
+
<template slot-scope="{ row }">
|
|
116
|
+
<el-select
|
|
117
|
+
v-model="row[keys.type]"
|
|
118
|
+
placeholder="请选择附件类型"
|
|
119
|
+
style="width: 100%"
|
|
120
|
+
>
|
|
121
|
+
<el-option
|
|
122
|
+
v-for="item in typeOptions"
|
|
123
|
+
:key="item.type"
|
|
124
|
+
:value="item.type"
|
|
125
|
+
:label="item.label"
|
|
126
|
+
/>
|
|
127
|
+
</el-select>
|
|
128
|
+
</template>
|
|
129
|
+
</el-table-column>
|
|
130
|
+
<el-table-column label="附件名称" min-width="160">
|
|
131
|
+
<template slot-scope="{ row }">
|
|
132
|
+
<el-input v-model="row[keys.name]" />
|
|
133
|
+
</template>
|
|
134
|
+
</el-table-column>
|
|
135
|
+
<el-table-column label="附件上传" min-width="160">
|
|
136
|
+
<template slot-scope="{ row, $index }">
|
|
137
|
+
<cl-upload
|
|
138
|
+
:ref="'upload' + $index"
|
|
139
|
+
class="upload-table-up"
|
|
140
|
+
:file-name="row['_name'] || row[keys.name]"
|
|
141
|
+
:msg-type="null"
|
|
142
|
+
:show-clear="false"
|
|
143
|
+
:action="action"
|
|
144
|
+
:headers="headers"
|
|
145
|
+
:accept="row[keys.type] | acceptFilter(typeOptions, fileAccept)"
|
|
146
|
+
:size="row[keys.type] | sizeFilter(typeOptions, fileSize)"
|
|
147
|
+
:before-upload="(file) => beforeUploadFn(file, row)"
|
|
148
|
+
:on-progress="(event) => onProgressFn(event, row)"
|
|
149
|
+
:on-success="
|
|
150
|
+
(response, file, fileList) =>
|
|
151
|
+
onSuccessFn(response, file, fileList, row)
|
|
152
|
+
"
|
|
153
|
+
:on-error="
|
|
154
|
+
(err, file, fileList) => errorFn(err, file, fileList, row, $index)
|
|
155
|
+
"
|
|
156
|
+
/>
|
|
157
|
+
</template>
|
|
158
|
+
</el-table-column>
|
|
159
|
+
<el-table-column
|
|
160
|
+
label="上传时间"
|
|
161
|
+
:prop="keys.time"
|
|
162
|
+
width="140"
|
|
163
|
+
align="center"
|
|
164
|
+
/>
|
|
165
|
+
<el-table-column label="上传人" :prop="keys.user" />
|
|
166
|
+
<el-table-column label="上传进度" width="220">
|
|
167
|
+
<template slot-scope="{ row, $index }">
|
|
168
|
+
<div v-if="row['_percent'] >= 0" class="flex-box flex-v">
|
|
169
|
+
<el-progress
|
|
170
|
+
class="upload-table-progress"
|
|
171
|
+
:percentage="row['_percent']"
|
|
172
|
+
:status="row['_status']"
|
|
173
|
+
style="width: 140px"
|
|
174
|
+
/>
|
|
175
|
+
<el-button
|
|
176
|
+
v-if="row['_status'] === 'exception'"
|
|
177
|
+
type="text"
|
|
178
|
+
size="mini"
|
|
179
|
+
style="width: 60px"
|
|
180
|
+
@click="anewSubmitFn(row, $index)"
|
|
181
|
+
>重新上传</el-button
|
|
182
|
+
>
|
|
183
|
+
<el-button
|
|
184
|
+
v-else-if="row['_percent'] >= 0 && row['_percent'] < 100"
|
|
185
|
+
type="text"
|
|
186
|
+
size="mini"
|
|
187
|
+
style="width: 60px"
|
|
188
|
+
@click="abortFn(row, $index)"
|
|
189
|
+
>取消</el-button
|
|
190
|
+
>
|
|
191
|
+
</div>
|
|
192
|
+
</template>
|
|
193
|
+
</el-table-column>
|
|
194
|
+
<el-table-column label="操作" align="center" width="80">
|
|
195
|
+
<template slot-scope="{ row }">
|
|
196
|
+
<el-button
|
|
197
|
+
type="text"
|
|
198
|
+
icon="el-icon-view"
|
|
199
|
+
:disabled="seeTypes && !seeTypes.test(row[keys.url])"
|
|
200
|
+
@click="seeFile(row)"
|
|
201
|
+
/>
|
|
202
|
+
</template>
|
|
203
|
+
</el-table-column>
|
|
204
|
+
</el-table>
|
|
205
|
+
|
|
206
|
+
<el-dialog
|
|
207
|
+
class="p-a-0"
|
|
208
|
+
title="附件预览"
|
|
209
|
+
:visible.sync="visibleP"
|
|
210
|
+
top="2vh"
|
|
211
|
+
width="96%"
|
|
212
|
+
>
|
|
213
|
+
<template slot="title">
|
|
214
|
+
<span class="el-dialog__title m-r"> 附件预览 </span>
|
|
215
|
+
<span v-if="!previewSameOrg" style="color: #999"
|
|
216
|
+
>附件地址与本页面地址不同源,可能无法查看。<a
|
|
217
|
+
:href="previewUrl"
|
|
218
|
+
:download="previewName || previewUrl"
|
|
219
|
+
>下载</a
|
|
220
|
+
>
|
|
221
|
+
</span>
|
|
222
|
+
</template>
|
|
223
|
+
<div class="p-a" style="height: 82vh">
|
|
224
|
+
<object
|
|
225
|
+
:key="previewUrl"
|
|
226
|
+
:data="previewUrl"
|
|
227
|
+
style="width: 100%; height: 100%"
|
|
228
|
+
>
|
|
229
|
+
<div class="flex-column flex-c flex-v" style="height: 100%">
|
|
230
|
+
<i
|
|
231
|
+
class="el-icon-s-release"
|
|
232
|
+
style="font-size: 60px; color: #999"
|
|
233
|
+
></i>
|
|
234
|
+
<span style="margin-top: 16px">
|
|
235
|
+
不支持在线预览,请
|
|
236
|
+
<a :href="previewUrl" :download="previewName || previewUrl"
|
|
237
|
+
>下载</a
|
|
238
|
+
>
|
|
239
|
+
到本地查看
|
|
240
|
+
</span>
|
|
241
|
+
</div>
|
|
242
|
+
</object>
|
|
243
|
+
</div>
|
|
244
|
+
</el-dialog>
|
|
245
|
+
</div>
|
|
246
|
+
</template>
|
|
247
|
+
|
|
248
|
+
<script>
|
|
249
|
+
import dayjs from 'dayjs'
|
|
250
|
+
|
|
251
|
+
export default {
|
|
252
|
+
name: 'FileUploadTable',
|
|
253
|
+
filters: {
|
|
254
|
+
typeFiter(type, typeOptions) {
|
|
255
|
+
return typeOptions.find((c) => c.type === type)?.label || ''
|
|
256
|
+
},
|
|
257
|
+
acceptFilter(type, typeOptions, fileAccept) {
|
|
258
|
+
return typeOptions.find((c) => c.type === type)?.accept || fileAccept
|
|
259
|
+
},
|
|
260
|
+
sizeFilter(type, typeOptions, fileSize) {
|
|
261
|
+
return typeOptions.find((c) => c.type === type)?.size || fileSize
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
props: {
|
|
265
|
+
readonly: {
|
|
266
|
+
type: Boolean,
|
|
267
|
+
default: false
|
|
268
|
+
},
|
|
269
|
+
action: {
|
|
270
|
+
type: String,
|
|
271
|
+
default: '/bems/1.0/attach'
|
|
272
|
+
},
|
|
273
|
+
headers: {
|
|
274
|
+
type: Object,
|
|
275
|
+
default: undefined
|
|
276
|
+
},
|
|
277
|
+
seeTypes: {
|
|
278
|
+
type: RegExp,
|
|
279
|
+
default: () => /\.jpg|\.png|\.gif|\.pdf$/i
|
|
280
|
+
},
|
|
281
|
+
tableData: {
|
|
282
|
+
type: Array,
|
|
283
|
+
default: () => [
|
|
284
|
+
// {
|
|
285
|
+
// id: 'n1',
|
|
286
|
+
// type: '001',
|
|
287
|
+
// name: '信贷合同-1',
|
|
288
|
+
// time: '2021-9-29 11:39:10',
|
|
289
|
+
// user: '张三'
|
|
290
|
+
// }
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
dataPorp: {
|
|
294
|
+
type: Object,
|
|
295
|
+
default: () => ({
|
|
296
|
+
// fileAccept: undefined, // 可选文件类型 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file
|
|
297
|
+
// fileSize: undefined, // 文件大小
|
|
298
|
+
// typeOptions: [
|
|
299
|
+
// // accept 覆盖fileAccept, size 覆盖fileSize
|
|
300
|
+
// {
|
|
301
|
+
// type: '001',
|
|
302
|
+
// label: '信贷合同',
|
|
303
|
+
// accept: 'image/*',
|
|
304
|
+
// size: '100Kb'
|
|
305
|
+
// },
|
|
306
|
+
// {
|
|
307
|
+
// type: '002',
|
|
308
|
+
// label: '贴现合同'
|
|
309
|
+
// },
|
|
310
|
+
// {
|
|
311
|
+
// type: '003',
|
|
312
|
+
// label: '其他合同'
|
|
313
|
+
// }
|
|
314
|
+
// ],
|
|
315
|
+
// keys: {
|
|
316
|
+
// rowKey: 'id',
|
|
317
|
+
// type: 'type', // 附件类型
|
|
318
|
+
// name: 'name', // 附件名称
|
|
319
|
+
// url: 'url', // 上传文件返回的文件地址
|
|
320
|
+
// time: 'time', // 附件上传时间
|
|
321
|
+
// user: 'user' // 附件上传人
|
|
322
|
+
// }
|
|
323
|
+
})
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
data() {
|
|
327
|
+
return {
|
|
328
|
+
selectionList: [],
|
|
329
|
+
fileAccept: this.dataPorp.fileAccept || undefined,
|
|
330
|
+
fileSize: this.dataPorp.fileSize || undefined,
|
|
331
|
+
typeOptions: this.dataPorp.typeOptions || [
|
|
332
|
+
{
|
|
333
|
+
type: '001',
|
|
334
|
+
label: '信贷合同'
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
type: '002',
|
|
338
|
+
label: '贴现合同'
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
type: '003',
|
|
342
|
+
label: '其他合同'
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
keys: this.dataPorp.keys || {
|
|
346
|
+
rowKey: 'id',
|
|
347
|
+
type: 'type',
|
|
348
|
+
name: 'name',
|
|
349
|
+
url: 'url',
|
|
350
|
+
time: 'time',
|
|
351
|
+
user: 'user'
|
|
352
|
+
},
|
|
353
|
+
|
|
354
|
+
visibleP: false,
|
|
355
|
+
previewUrl: undefined,
|
|
356
|
+
previewName: undefined,
|
|
357
|
+
previewSameOrg: false
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
methods: {
|
|
361
|
+
addRow() {
|
|
362
|
+
this.$emit('add-row')
|
|
363
|
+
},
|
|
364
|
+
downRows() {
|
|
365
|
+
this.$emit('down-rows', this.selectionList)
|
|
366
|
+
},
|
|
367
|
+
deleteRows() {
|
|
368
|
+
this.$emit('delete-rows', this.selectionList)
|
|
369
|
+
},
|
|
370
|
+
getFileName(row) {
|
|
371
|
+
let url = row[this.keys.url]
|
|
372
|
+
if (url) {
|
|
373
|
+
let sameOrg = new RegExp('^' + window.location.origin).test(url)
|
|
374
|
+
let name = row[this.keys.name]
|
|
375
|
+
? row[this.keys.name] + (url.match(/\.[^\.]*$/)?.[0] || '')
|
|
376
|
+
: ''
|
|
377
|
+
return {
|
|
378
|
+
url,
|
|
379
|
+
name,
|
|
380
|
+
sameOrg
|
|
381
|
+
}
|
|
382
|
+
} else {
|
|
383
|
+
return {}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
downFile(row) {
|
|
387
|
+
let { url, name } = this.getFileName(row)
|
|
388
|
+
if (url) {
|
|
389
|
+
let aDom = document.createElement('a')
|
|
390
|
+
aDom.href = url
|
|
391
|
+
aDom.download = name
|
|
392
|
+
aDom.click()
|
|
393
|
+
|
|
394
|
+
this.$nextTick(() => {
|
|
395
|
+
aDom = undefined
|
|
396
|
+
})
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
seeFile(row) {
|
|
400
|
+
let { url, name, sameOrg } = this.getFileName(row)
|
|
401
|
+
if (url) {
|
|
402
|
+
this.previewSameOrg = sameOrg
|
|
403
|
+
this.previewUrl = url
|
|
404
|
+
this.previewName = name
|
|
405
|
+
this.visibleP = true
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
beforeUploadFn(file, row) {
|
|
409
|
+
this.$set(row, '_percent', 0)
|
|
410
|
+
this.$set(row, '_status', undefined)
|
|
411
|
+
},
|
|
412
|
+
onProgressFn({ percent }, row) {
|
|
413
|
+
this.$set(row, '_percent', percent <= 99 ? Math.round(percent) : 99)
|
|
414
|
+
},
|
|
415
|
+
onSuccessFn(response, file, fileList, row) {
|
|
416
|
+
this.$set(row, '_name', file.name)
|
|
417
|
+
this.$set(row, '_percent', 100)
|
|
418
|
+
|
|
419
|
+
row[this.keys.time] = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
420
|
+
|
|
421
|
+
row[this.keys.url] = response.data
|
|
422
|
+
if (!row[this.keys.name]) {
|
|
423
|
+
row[this.keys.name] = file.name
|
|
424
|
+
}
|
|
425
|
+
this.$set(row, '_status', 'success')
|
|
426
|
+
},
|
|
427
|
+
errorFn(err, file, fileList, row, $index) {
|
|
428
|
+
this.$set(row, '_status', 'exception')
|
|
429
|
+
|
|
430
|
+
let clUpload = this.$refs['upload' + $index]
|
|
431
|
+
/* 重置文件状态,并加入文件队列 */
|
|
432
|
+
file.status = 'ready'
|
|
433
|
+
clUpload.fileList = [file]
|
|
434
|
+
},
|
|
435
|
+
abortFn(row, $index) {
|
|
436
|
+
this.$set(row, '_status', 'exception')
|
|
437
|
+
|
|
438
|
+
let clUpload = this.$refs['upload' + $index]
|
|
439
|
+
let elUpload = clUpload.$refs['upload']
|
|
440
|
+
let uploadFiles = elUpload.uploadFiles
|
|
441
|
+
|
|
442
|
+
/* 重置文件状态,并加入文件队列 */
|
|
443
|
+
let file = uploadFiles[uploadFiles.length - 1]
|
|
444
|
+
file.status = 'ready'
|
|
445
|
+
clUpload.fileList = [file]
|
|
446
|
+
|
|
447
|
+
elUpload.abort()
|
|
448
|
+
},
|
|
449
|
+
anewSubmitFn(row, $index) {
|
|
450
|
+
this.$set(row, '_status', 'success')
|
|
451
|
+
|
|
452
|
+
this.$refs['upload' + $index]?.$refs['upload']?.submit()
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
</script>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-popover
|
|
3
|
+
:width="width"
|
|
4
|
+
placement="bottom-end"
|
|
5
|
+
title="筛选"
|
|
6
|
+
trigger="click"
|
|
7
|
+
>
|
|
8
|
+
<span slot="reference">
|
|
9
|
+
<el-button icon="cl-icon-iconfontshaixuan" plain onlyicon size="mini"
|
|
10
|
+
/></span>
|
|
11
|
+
|
|
12
|
+
<div class="cl-filter">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
<div class="more" @click="showMore = !showMore">
|
|
15
|
+
<span>{{ showMore ? '收起' : '更多' }}条件</span
|
|
16
|
+
><i :class="showMore ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>
|
|
17
|
+
</div>
|
|
18
|
+
<el-collapse-transition>
|
|
19
|
+
<div v-show="showMore">
|
|
20
|
+
<slot name="more"></slot>
|
|
21
|
+
</div>
|
|
22
|
+
</el-collapse-transition>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="actions">
|
|
25
|
+
<slot name="actions">
|
|
26
|
+
<el-button size="mini" plain style="width: 76px" @click="clear">{{
|
|
27
|
+
clearText
|
|
28
|
+
}}</el-button>
|
|
29
|
+
<el-button
|
|
30
|
+
size="mini"
|
|
31
|
+
type="primary"
|
|
32
|
+
style="width: 76px"
|
|
33
|
+
@click="filter"
|
|
34
|
+
>{{ filterText }}</el-button
|
|
35
|
+
>
|
|
36
|
+
</slot>
|
|
37
|
+
</div>
|
|
38
|
+
</el-popover>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
export default {
|
|
43
|
+
name: 'Filters',
|
|
44
|
+
props: {
|
|
45
|
+
clearText: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: '清空已选'
|
|
48
|
+
},
|
|
49
|
+
filterText: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: '筛选'
|
|
52
|
+
},
|
|
53
|
+
show: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: true
|
|
56
|
+
},
|
|
57
|
+
width: {
|
|
58
|
+
type: Number,
|
|
59
|
+
default: 380
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
data() {
|
|
63
|
+
return {
|
|
64
|
+
showMore: false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
clear() {
|
|
69
|
+
this.$emit('clear')
|
|
70
|
+
},
|
|
71
|
+
filter() {
|
|
72
|
+
this.$emit('filter')
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cl-foldedpanel">
|
|
3
|
+
<div class="cl-foldedpanel-item" v-for="(item,index) in list" :key="index">
|
|
4
|
+
<div class="cl-foldedpanel-top">
|
|
5
|
+
<div class="cl-foldedpanel-left">
|
|
6
|
+
<span class="cl-foldedpanel-time">{{ item.time }}</span>
|
|
7
|
+
<i class=" el-icon-arrow-down" @click="show3 = !show3"></i>
|
|
8
|
+
</div>
|
|
9
|
+
<el-tag :type="val.type" size="mini" v-for="val in item.tag" :key="val.value">{{ val.value }}</el-tag>
|
|
10
|
+
<span>人民币:{{ item.money }}元</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="cl-foldedpanel-bottom">
|
|
13
|
+
<span class="down"></span>
|
|
14
|
+
<el-collapse-transition>
|
|
15
|
+
<div v-show="show3">
|
|
16
|
+
<div>我是下面要展示的内容</div>
|
|
17
|
+
</div>
|
|
18
|
+
</el-collapse-transition>
|
|
19
|
+
<div class="cl-foldedpanel-long"></div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
export default {
|
|
27
|
+
name: "FoldedPanel",
|
|
28
|
+
data() {
|
|
29
|
+
return {
|
|
30
|
+
show3:false,
|
|
31
|
+
list: [
|
|
32
|
+
{
|
|
33
|
+
time: '2021-12-31',
|
|
34
|
+
tag: [
|
|
35
|
+
{value: '支取本金',type:'success'},
|
|
36
|
+
{value: '正常结束',type:''}
|
|
37
|
+
],
|
|
38
|
+
money: '123,232,231,123:12'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
time: '2021-12-31',
|
|
42
|
+
tag: [
|
|
43
|
+
{value: '支取本金',type:'success'},
|
|
44
|
+
{value: '正常结束',type:''}
|
|
45
|
+
],
|
|
46
|
+
money: '123,232,231,123:12'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
time: '2021-12-31',
|
|
50
|
+
tag: [
|
|
51
|
+
{value: '支取本金',type:'success'},
|
|
52
|
+
{value: '正常结束',type:''}
|
|
53
|
+
],
|
|
54
|
+
money: '123,232,231,123:12'
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style scoped>
|
|
63
|
+
|
|
64
|
+
</style>
|