n20-common-lib 2.7.0-beta.2 → 2.7.0-beta.21
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/package.json +1 -1
- package/src/assets/.DS_Store +0 -0
- package/src/assets/css/_coreLib.scss +4 -1
- package/src/assets/css/advanced-filter.scss +356 -0
- package/src/assets/css/cl-layout-header.scss +79 -15
- package/src/assets/css/cl-pagination.scss +34 -4
- package/src/assets/css/{cl-dialog.scss → dialog.scss} +10 -7
- package/src/assets/css/filter.scss +1 -178
- package/src/assets/css/font-icon.scss +3 -8
- package/src/assets/css/normalize.scss +12 -1
- package/src/assets/getJsonc.js +2 -2
- package/src/assets/iconFont/demo_index.html +1950 -1129
- package/src/assets/iconFont/iconfont.css +182 -68
- package/src/assets/iconFont/iconfont.js +1 -66
- package/src/assets/iconFont/iconfont.json +196 -0
- package/src/assets/iconFont/iconfont.ttf +0 -0
- package/src/assets/iconFont/iconfont.woff +0 -0
- package/src/assets/iconFont/iconfont.woff2 +0 -0
- package/src/assets/realUrl.js +1 -1
- package/src/components/.DS_Store +0 -0
- package/src/components/AdvancedFilter/filterItem.vue +7 -1
- package/src/components/AdvancedFilter/formItemRender.vue +248 -63
- package/src/components/AdvancedFilter/index.vue +113 -23
- package/src/components/AdvancedFilter/main/Form/form-item.vue +87 -0
- package/src/components/AdvancedFilter/main/Form/form.vue +59 -0
- package/src/components/AdvancedFilter/main/index.vue +34 -0
- package/src/components/AdvancedFilter/utils.js +2 -4
- package/src/components/Anchor/AnchorItem.vue +5 -0
- package/src/components/Anchor/index.vue +23 -1
- package/src/components/ApprovalButtons/index.vue +49 -10
- package/src/components/ApprovalButtons/showAppOpi.vue +5 -3
- package/src/components/ApprovalCard/index.vue +1 -1
- package/src/components/DateChoose/index.vue +278 -0
- package/src/components/DatePicker/por.vue +1 -1
- package/src/components/Descriptions/index.vue +4 -0
- package/src/components/ElectronicArchive/index.vue +1 -0
- package/src/components/FileUploadTable/index.vue +93 -28
- package/src/components/InputNumber/index.vue +1 -0
- package/src/components/Layout/HeaderWrap/changePwd.vue +2 -2
- package/src/components/Layout/HeaderWrap/indexN.vue +151 -84
- package/src/components/Layout/HeaderWrap/menuDrawer.vue +47 -38
- package/src/components/Layout/indexN.vue +30 -5
- package/src/components/LoginTemporary/indexN.vue +10 -57
- package/src/components/Pagination/index.vue +25 -137
- package/src/components/Pagination/remotePagination.vue +201 -0
- package/src/components/Pagination/staticPagination.vue +156 -0
- package/src/components/SecondaryTab/index.vue +27 -1
- package/src/components/TablePro/index.vue +15 -8
- package/src/directives/VRuleKey/index.js +5 -4
- package/src/index.js +3 -4
- package/src/plugins/Print/.DS_Store +0 -0
- package/style/fonts/iconfont.1676b4d9.woff2 +0 -0
- package/{src/assets/iconFont5/iconfont.ttf → style/fonts/iconfont.2be34155.ttf} +0 -0
- package/style/fonts/iconfont.ac432622.woff +0 -0
- package/style/index.css +2 -2
- package/theme/blue.css +2 -2
- package/theme/cctcRed.css +2 -2
- package/theme/fonts/iconfont.1676b4d9.woff2 +0 -0
- package/{style/fonts/iconfont.06971f9f.ttf → theme/fonts/iconfont.2be34155.ttf} +0 -0
- package/theme/fonts/iconfont.ac432622.woff +0 -0
- package/theme/green.css +2 -2
- package/theme/lightBlue.css +2 -2
- package/theme/orange.css +2 -2
- package/theme/purple.css +2 -2
- package/theme/red.css +2 -2
- package/theme/yellow.css +2 -2
- package/src/assets/iconFont3/demo.css +0 -539
- package/src/assets/iconFont3/demo_index.html +0 -1936
- package/src/assets/iconFont3/iconfont.css +0 -319
- package/src/assets/iconFont3/iconfont.js +0 -1
- package/src/assets/iconFont3/iconfont.json +0 -541
- package/src/assets/iconFont3/iconfont.ttf +0 -0
- package/src/assets/iconFont3/iconfont.woff +0 -0
- package/src/assets/iconFont3/iconfont.woff2 +0 -0
- package/src/assets/iconFont4/demo.css +0 -539
- package/src/assets/iconFont4/demo_index.html +0 -2005
- package/src/assets/iconFont4/iconfont.css +0 -331
- package/src/assets/iconFont4/iconfont.js +0 -1
- package/src/assets/iconFont4/iconfont.json +0 -562
- package/src/assets/iconFont4/iconfont.ttf +0 -0
- package/src/assets/iconFont4/iconfont.woff +0 -0
- package/src/assets/iconFont4/iconfont.woff2 +0 -0
- package/src/assets/iconFont5/demo.css +0 -539
- package/src/assets/iconFont5/demo_index.html +0 -2281
- package/src/assets/iconFont5/iconfont.css +0 -379
- package/src/assets/iconFont5/iconfont.js +0 -1
- package/src/assets/iconFont5/iconfont.json +0 -646
- package/src/assets/iconFont5/iconfont.woff +0 -0
- package/src/assets/iconFont5/iconfont.woff2 +0 -0
- package/src/components/Pagination/mixins/index.js +0 -39
- package/style/fonts/iconfont.47f5da25.woff2 +0 -0
- package/style/fonts/iconfont.6ad948fe.woff +0 -0
- package/style/fonts/iconfont.76d19005.woff2 +0 -0
- package/style/fonts/iconfont.84848783.woff2 +0 -0
- package/style/fonts/iconfont.85c70ef9.ttf +0 -0
- package/style/fonts/iconfont.a3597821.woff +0 -0
- package/style/fonts/iconfont.ab8c366d.ttf +0 -0
- package/style/fonts/iconfont.b7ea4726.woff +0 -0
- package/style/fonts/iconfont.e6bdbf43.woff2 +0 -0
- package/style/fonts/iconfont.f1777a50.woff +0 -0
- package/style/fonts/iconfont.fbdd69b3.ttf +0 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="inline_block">
|
|
3
|
+
<el-select v-model="showValue" select collapse-tags clearable multiple disabled v-title="showValue.toString()">
|
|
4
|
+
<el-option v-for="item in showValue" :key="item" :label="item" :value="item" />
|
|
5
|
+
</el-select>
|
|
6
|
+
<el-link
|
|
7
|
+
:underline="false"
|
|
8
|
+
icon="n20-icon-sousuokuang-sousuodanchuang"
|
|
9
|
+
class="m-l-s"
|
|
10
|
+
@click="visibleSelect = true"
|
|
11
|
+
></el-link>
|
|
12
|
+
<Dialog
|
|
13
|
+
v-drag
|
|
14
|
+
:visible.sync="visibleSelect"
|
|
15
|
+
title="时间选择器"
|
|
16
|
+
:destroy-on-open="true"
|
|
17
|
+
width="600px"
|
|
18
|
+
@closed="close"
|
|
19
|
+
>
|
|
20
|
+
<div style="height: 200px">
|
|
21
|
+
<el-form v-if="visible" :model="form" ref="form" label-width="80px" :inline="false" size="normal">
|
|
22
|
+
<el-form-item label="类型">
|
|
23
|
+
<el-select class="input-w" v-model="form.type" placeholder="请选择">
|
|
24
|
+
<el-option v-for="item in filterOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
25
|
+
</el-option>
|
|
26
|
+
</el-select>
|
|
27
|
+
</el-form-item>
|
|
28
|
+
<el-form-item label="日期" v-if="[5, 2, 3, 6].includes(form.type)">
|
|
29
|
+
<cl-date-picker-por
|
|
30
|
+
v-if="form.type === 5"
|
|
31
|
+
:start-date.sync="form.term.start"
|
|
32
|
+
:end-date.sync="form.term.end"
|
|
33
|
+
type="daterange"
|
|
34
|
+
startStop
|
|
35
|
+
value-format="yyyy-MM-dd"
|
|
36
|
+
/>
|
|
37
|
+
<el-select
|
|
38
|
+
class="input-w"
|
|
39
|
+
v-model="form.value"
|
|
40
|
+
collapse-tags
|
|
41
|
+
clearable
|
|
42
|
+
multiple
|
|
43
|
+
placeholder="请选择"
|
|
44
|
+
v-if="form.type === 2"
|
|
45
|
+
>
|
|
46
|
+
<el-option v-for="item in weeks" :key="item" :label="item" :value="item"> </el-option>
|
|
47
|
+
</el-select>
|
|
48
|
+
<el-select
|
|
49
|
+
class="input-w"
|
|
50
|
+
v-model="form.value"
|
|
51
|
+
collapse-tags
|
|
52
|
+
clearable
|
|
53
|
+
multiple
|
|
54
|
+
placeholder="请选择"
|
|
55
|
+
v-if="form.type === 3"
|
|
56
|
+
>
|
|
57
|
+
<el-option v-for="item in months" :key="item" :label="item" :value="item"> </el-option>
|
|
58
|
+
</el-select>
|
|
59
|
+
<el-date-picker
|
|
60
|
+
type="dates"
|
|
61
|
+
v-model="form.value"
|
|
62
|
+
placeholder="选择一个或多个日期"
|
|
63
|
+
v-if="form.type === 6"
|
|
64
|
+
format="yyyy-MM-dd"
|
|
65
|
+
value-format="yyyy-MM-dd"
|
|
66
|
+
>
|
|
67
|
+
</el-date-picker>
|
|
68
|
+
</el-form-item>
|
|
69
|
+
<el-form-item label="时间点" v-if="hasTime">
|
|
70
|
+
<cl-time-picker v-model="form.time" value-format="HH:mm:ss" placeholder="请选择时间" />
|
|
71
|
+
</el-form-item>
|
|
72
|
+
</el-form>
|
|
73
|
+
<div class="flex-box flex-r" v-if="!visible">
|
|
74
|
+
<el-link class="m-b-s" :underline="false" icon="n20-icon-xinzeng" @click="handle('新增')">新增</el-link>
|
|
75
|
+
</div>
|
|
76
|
+
<ul class="list" v-if="!visible">
|
|
77
|
+
<li v-for="(item, index) in value" :key="index">
|
|
78
|
+
<div class="flex-box flex-lr">
|
|
79
|
+
<span>
|
|
80
|
+
<span>{{
|
|
81
|
+
options.find((item2) => {
|
|
82
|
+
return item2.value === item.type
|
|
83
|
+
}).label
|
|
84
|
+
}}</span>
|
|
85
|
+
<span v-if="item.type === 2">{{ item.value }}</span>
|
|
86
|
+
<span v-else-if="item.type === 3">{{ item.value }}日</span>
|
|
87
|
+
<span v-else-if="item.type === 5" class="m-l-s">{{ item.term.start }}至{{ item.term.end }}</span>
|
|
88
|
+
<span v-else-if="item.type === 6" class="m-l-s">{{ item.value.toString() }}</span>
|
|
89
|
+
<span style="margin-left: 4px" v-if="hasTime">{{ item.time }}</span>
|
|
90
|
+
</span>
|
|
91
|
+
<div>
|
|
92
|
+
<el-link
|
|
93
|
+
class="m-l-s m-r-s"
|
|
94
|
+
:underline="false"
|
|
95
|
+
icon="n20-icon-bianjixuanzhong"
|
|
96
|
+
@click="handle('编辑', item, index)"
|
|
97
|
+
></el-link>
|
|
98
|
+
<el-link
|
|
99
|
+
class="m-r-s"
|
|
100
|
+
:underline="false"
|
|
101
|
+
icon="n20-icon-a-shanchuxuanzhong"
|
|
102
|
+
@click="handle('删除', item, index)"
|
|
103
|
+
></el-link>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</li>
|
|
107
|
+
</ul>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="dialog-footer" v-if="!visible">
|
|
110
|
+
<el-button type="primary" @click="visibleSelect = false">确定</el-button>
|
|
111
|
+
<el-button plain @click="visibleSelect = false">取消</el-button>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="dialog-footer" v-else>
|
|
114
|
+
<el-button type="primary" @click="handle('确定')">确定</el-button>
|
|
115
|
+
<el-button plain @click="handle('取消')">取消</el-button>
|
|
116
|
+
</div>
|
|
117
|
+
</Dialog>
|
|
118
|
+
</div>
|
|
119
|
+
</template>
|
|
120
|
+
|
|
121
|
+
<script>
|
|
122
|
+
import Dialog from '../Dialog/index.vue'
|
|
123
|
+
export default {
|
|
124
|
+
name: 'DateChoose',
|
|
125
|
+
components: {
|
|
126
|
+
Dialog
|
|
127
|
+
},
|
|
128
|
+
props: {
|
|
129
|
+
value: {
|
|
130
|
+
type: Array,
|
|
131
|
+
default: () => {
|
|
132
|
+
return []
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
optionsSelect: {
|
|
136
|
+
type: Array,
|
|
137
|
+
default: () => {
|
|
138
|
+
return ['每日', '每周', '每月', '工作日', '自定义日期区间', '每月固定天数']
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
hasTime: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: true
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
data() {
|
|
147
|
+
return {
|
|
148
|
+
form: {},
|
|
149
|
+
visible: false,
|
|
150
|
+
visibleSelect: false,
|
|
151
|
+
title: '新增',
|
|
152
|
+
options: [
|
|
153
|
+
{
|
|
154
|
+
label: '每日',
|
|
155
|
+
value: 1
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: '每周',
|
|
159
|
+
value: 2
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
label: '每月',
|
|
163
|
+
value: 3
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
label: '工作日',
|
|
167
|
+
value: 4
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
label: '自定义日期区间',
|
|
171
|
+
value: 5
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
label: '每月固定天数',
|
|
175
|
+
value: 6
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
weeks: ['一', '二', '三', '四', '五', '六', '日'],
|
|
179
|
+
months: [
|
|
180
|
+
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
181
|
+
31
|
|
182
|
+
],
|
|
183
|
+
index: '',
|
|
184
|
+
showValue: [],
|
|
185
|
+
filterOptions: []
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
computed: {},
|
|
189
|
+
watch: {},
|
|
190
|
+
created() {},
|
|
191
|
+
mounted() {
|
|
192
|
+
console.log(this.optionsSelect)
|
|
193
|
+
this.filterOptions = JSON.parse(JSON.stringify(this.options)).filter((item) => {
|
|
194
|
+
return this.optionsSelect.includes(item.label)
|
|
195
|
+
})
|
|
196
|
+
this.setView()
|
|
197
|
+
},
|
|
198
|
+
methods: {
|
|
199
|
+
setView() {
|
|
200
|
+
this.showValue = this.value.map((item) => {
|
|
201
|
+
const type = this.options.find((item2) => {
|
|
202
|
+
return item2.value === item.type
|
|
203
|
+
}).label
|
|
204
|
+
let week = ''
|
|
205
|
+
if (item.type === 2) {
|
|
206
|
+
week = item.value
|
|
207
|
+
} else if (item.type === 3) {
|
|
208
|
+
week = item.value + '日'
|
|
209
|
+
} else if (item.type === 5) {
|
|
210
|
+
week = `${item.term.start}-${item.term.end}`
|
|
211
|
+
} else if (item.type === 6) {
|
|
212
|
+
week = `${item.value.toString()}`
|
|
213
|
+
}
|
|
214
|
+
const time = item.time || ''
|
|
215
|
+
return type + week + time
|
|
216
|
+
})
|
|
217
|
+
},
|
|
218
|
+
close() {
|
|
219
|
+
this.form = {}
|
|
220
|
+
},
|
|
221
|
+
handle(type, row, index) {
|
|
222
|
+
switch (type) {
|
|
223
|
+
case '新增':
|
|
224
|
+
this.index = ''
|
|
225
|
+
this.title = '新增'
|
|
226
|
+
this.visible = true
|
|
227
|
+
this.form = {
|
|
228
|
+
term: { start: '', end: '' }
|
|
229
|
+
}
|
|
230
|
+
// this.value.push({})
|
|
231
|
+
break
|
|
232
|
+
case '编辑':
|
|
233
|
+
this.title = '编辑'
|
|
234
|
+
this.index = index
|
|
235
|
+
this.form = JSON.parse(JSON.stringify(row))
|
|
236
|
+
this.visible = true
|
|
237
|
+
break
|
|
238
|
+
case '取消':
|
|
239
|
+
this.form = {}
|
|
240
|
+
this.visible = false
|
|
241
|
+
break
|
|
242
|
+
case '确定':
|
|
243
|
+
if (this.index !== '') {
|
|
244
|
+
this.value[this.index] = this.form
|
|
245
|
+
} else {
|
|
246
|
+
this.value.push(this.form)
|
|
247
|
+
}
|
|
248
|
+
this.setView()
|
|
249
|
+
this.visible = false
|
|
250
|
+
this.$emit('save', this.value)
|
|
251
|
+
break
|
|
252
|
+
break
|
|
253
|
+
case '删除':
|
|
254
|
+
this.$msgboxPor({
|
|
255
|
+
title: '确认要删除吗?',
|
|
256
|
+
message: '',
|
|
257
|
+
type: 'warning',
|
|
258
|
+
customClass: 'question',
|
|
259
|
+
confirmButtonText: '确定',
|
|
260
|
+
cancelButtonText: '取消'
|
|
261
|
+
}).then(() => {
|
|
262
|
+
this.value.splice(index, 1)
|
|
263
|
+
this.setView()
|
|
264
|
+
})
|
|
265
|
+
break
|
|
266
|
+
default:
|
|
267
|
+
break
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
</script>
|
|
273
|
+
<stylescoped>
|
|
274
|
+
.list li {
|
|
275
|
+
height: 24px;
|
|
276
|
+
line-height: 24px;
|
|
277
|
+
}
|
|
278
|
+
</stylescoped>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
ref="date-picker"
|
|
4
4
|
v-model="valueC"
|
|
5
5
|
class="n20-date-editor"
|
|
6
|
-
:class="{ 'has-value': clearable && valueC }"
|
|
6
|
+
:class="{ 'has-value': clearable && valueC, [this.$attrs && this.$attrs['rule-form']]: !valueC }"
|
|
7
7
|
:type="type"
|
|
8
8
|
:value-format="valueFormat"
|
|
9
9
|
:placeholder="'选择日期' | $lc"
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-descriptions class="n20-descriptions" :column="column" size="default" border>
|
|
3
3
|
<slot></slot>
|
|
4
|
+
<template v-if="this.$slots.default.length === 1">
|
|
5
|
+
<el-descriptions-item v-for="(item, index) in column - 1" :key="index" />
|
|
6
|
+
</template>
|
|
4
7
|
</el-descriptions>
|
|
5
8
|
</template>
|
|
6
9
|
|
|
@@ -13,6 +16,7 @@ export default {
|
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
18
|
created() {
|
|
19
|
+
console.log(this.$slots.default)
|
|
16
20
|
this.resize()
|
|
17
21
|
window.addEventListener('resize', this.resize)
|
|
18
22
|
},
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="file-upload-table">
|
|
3
3
|
<div class="flex-box flex-v flex-lr m-b-s">
|
|
4
|
-
<div
|
|
4
|
+
<div>
|
|
5
|
+
<slot name="title"></slot>
|
|
6
|
+
</div>
|
|
5
7
|
<div>
|
|
6
8
|
<slot v-if="!readonly" name="add-btn">
|
|
7
9
|
<el-button type="primary" size="mini" @click="addRow">{{ '新增' | $lc }}</el-button>
|
|
@@ -9,6 +11,9 @@
|
|
|
9
11
|
<slot v-if="!readonly && showBatchUpload" name="batch-btn">
|
|
10
12
|
<el-button size="mini" plain @click="visibleBatch = true">{{ '批量上传' | $lc }}</el-button>
|
|
11
13
|
</slot>
|
|
14
|
+
<slot v-if="!readonly && showBatchPrint" name="batch-btn">
|
|
15
|
+
<el-button size="mini" plain @click="batchPrint">{{ '批量打印' | $lc }}</el-button>
|
|
16
|
+
</slot>
|
|
12
17
|
<slot name="down-btn">
|
|
13
18
|
<el-button size="mini" plain @click="downRows">{{ '下载' | $lc }}</el-button>
|
|
14
19
|
</slot>
|
|
@@ -21,6 +26,7 @@
|
|
|
21
26
|
:data="tableData"
|
|
22
27
|
:row-key="keys.rowKey"
|
|
23
28
|
border
|
|
29
|
+
:height="height"
|
|
24
30
|
@selection-change="(selection) => (selectionList = selection)"
|
|
25
31
|
>
|
|
26
32
|
<slot name="selection-column">
|
|
@@ -72,17 +78,17 @@
|
|
|
72
78
|
</slot>
|
|
73
79
|
</el-table-column>
|
|
74
80
|
<el-table-column v-if="readonly" :label="'附件上传' | $lc" :prop="keys.name">
|
|
75
|
-
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
76
|
-
'附件上传' | $lc
|
|
77
|
-
|
|
81
|
+
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
82
|
+
>{{ '附件上传' | $lc }}
|
|
83
|
+
</slot>
|
|
78
84
|
<slot slot-scope="{ row }" name="upload" :row="row">
|
|
79
85
|
{{ $options.filters.fileName(row, keys.url) || row[keys.name] }}
|
|
80
86
|
</slot>
|
|
81
87
|
</el-table-column>
|
|
82
88
|
<el-table-column v-if="!readonly" :label="'附件上传' | $lc">
|
|
83
|
-
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
84
|
-
'附件上传' | $lc
|
|
85
|
-
|
|
89
|
+
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
90
|
+
>{{ '附件上传' | $lc }}
|
|
91
|
+
</slot>
|
|
86
92
|
<slot slot-scope="{ row, $index }" name="upload" :row="row" :[indexK]="$index">
|
|
87
93
|
<Upload
|
|
88
94
|
:ref="'upload' + $index"
|
|
@@ -126,7 +132,7 @@
|
|
|
126
132
|
</template>
|
|
127
133
|
<template slot-scope="{ row, $index }">
|
|
128
134
|
<slot name="percent" :row="row" :[indexK]="$index">
|
|
129
|
-
<div v-if="row['_percent'] >= 0 && !
|
|
135
|
+
<div v-if="row['_percent'] >= 0 && !readonly" class="flex-box flex-v">
|
|
130
136
|
<el-progress
|
|
131
137
|
class="n20-upload-table-progress"
|
|
132
138
|
:percentage="row['_percent']"
|
|
@@ -140,16 +146,16 @@
|
|
|
140
146
|
size="mini"
|
|
141
147
|
style="width: 60px"
|
|
142
148
|
@click="anewSubmitFn(row, $index)"
|
|
143
|
-
>{{ '重新上传' | $lc }}
|
|
144
|
-
>
|
|
149
|
+
>{{ '重新上传' | $lc }}
|
|
150
|
+
</el-button>
|
|
145
151
|
<el-button
|
|
146
152
|
v-else-if="row['_percent'] >= 0 && row['_percent'] < 100"
|
|
147
153
|
type="text"
|
|
148
154
|
size="mini"
|
|
149
155
|
style="width: 60px"
|
|
150
156
|
@click="abortFn(row, $index)"
|
|
151
|
-
>{{ '取消' | $lc }}
|
|
152
|
-
>
|
|
157
|
+
>{{ '取消' | $lc }}
|
|
158
|
+
</el-button>
|
|
153
159
|
</div>
|
|
154
160
|
</slot>
|
|
155
161
|
</template>
|
|
@@ -263,6 +269,19 @@ const ViewerImg = async function () {
|
|
|
263
269
|
let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
|
|
264
270
|
return component
|
|
265
271
|
}
|
|
272
|
+
const keysDefault = {
|
|
273
|
+
rowKey: 'id',
|
|
274
|
+
type: 'type',
|
|
275
|
+
name: 'name',
|
|
276
|
+
url: 'url',
|
|
277
|
+
time: 'time',
|
|
278
|
+
user: 'user'
|
|
279
|
+
}
|
|
280
|
+
const typeOptionsDefault = [
|
|
281
|
+
{ type: '001', label: $lc('信贷合同') },
|
|
282
|
+
{ type: '002', label: $lc('贴现合同') },
|
|
283
|
+
{ type: '003', label: $lc('其他合同') }
|
|
284
|
+
]
|
|
266
285
|
|
|
267
286
|
export default {
|
|
268
287
|
name: 'FileUploadTable',
|
|
@@ -313,6 +332,10 @@ export default {
|
|
|
313
332
|
type: RegExp,
|
|
314
333
|
default: () => /\.(jpg|png|gif|svg|pdf)$/i
|
|
315
334
|
},
|
|
335
|
+
height: {
|
|
336
|
+
type: [String, Number],
|
|
337
|
+
default: '300px'
|
|
338
|
+
},
|
|
316
339
|
tableData: {
|
|
317
340
|
type: Array,
|
|
318
341
|
default: () => []
|
|
@@ -325,6 +348,10 @@ export default {
|
|
|
325
348
|
type: Boolean,
|
|
326
349
|
default: false
|
|
327
350
|
},
|
|
351
|
+
showBatchPrint: {
|
|
352
|
+
type: Boolean,
|
|
353
|
+
default: false
|
|
354
|
+
},
|
|
328
355
|
uploadHttpRequest: {
|
|
329
356
|
type: Function,
|
|
330
357
|
default: undefined
|
|
@@ -389,16 +416,67 @@ export default {
|
|
|
389
416
|
return this.dataPorp.fileData || undefined
|
|
390
417
|
},
|
|
391
418
|
typeOptions() {
|
|
392
|
-
return this.dataPorp.typeOptions ||
|
|
419
|
+
return this.dataPorp.typeOptions || typeOptionsDefault
|
|
393
420
|
},
|
|
394
421
|
keys() {
|
|
395
|
-
return this.dataPorp.keys ||
|
|
422
|
+
return this.dataPorp.keys || keysDefault
|
|
396
423
|
},
|
|
397
424
|
multiple() {
|
|
398
425
|
return this.dataPorp.multiple ?? true
|
|
399
426
|
}
|
|
400
427
|
},
|
|
401
428
|
methods: {
|
|
429
|
+
async batchPrint() {
|
|
430
|
+
if (!this.selectionList.length) {
|
|
431
|
+
return this.$message({
|
|
432
|
+
message: $lc(`请先勾选要打印的数据!`),
|
|
433
|
+
type: 'warning',
|
|
434
|
+
showClose: true
|
|
435
|
+
})
|
|
436
|
+
}
|
|
437
|
+
let selectionList = await this.setUrlData(this.selectionList)
|
|
438
|
+
|
|
439
|
+
const { printJS } = await import('../../plugins/Print')
|
|
440
|
+
|
|
441
|
+
// 打印PDF文件的函数
|
|
442
|
+
function printPdf(item, index) {
|
|
443
|
+
printJS({
|
|
444
|
+
printable: item.pathUrl,
|
|
445
|
+
type: item.printType,
|
|
446
|
+
onPrintDialogClose: function () {
|
|
447
|
+
// 如果还有剩余的PDF文件,则继续打印下一个
|
|
448
|
+
if (index < selectionList.length - 1) {
|
|
449
|
+
printPdf(selectionList[index + 1], index + 1)
|
|
450
|
+
} else {
|
|
451
|
+
// 所有PDF文件都已打印完毕
|
|
452
|
+
console.log('所有PDF文件打印完成')
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
onError: (error) => {
|
|
456
|
+
console.error('打印PDF文件出错:', error)
|
|
457
|
+
}
|
|
458
|
+
})
|
|
459
|
+
}
|
|
460
|
+
// 开始打印第一个PDF文件
|
|
461
|
+
if (selectionList.length > 0) {
|
|
462
|
+
printPdf(selectionList[0], 0)
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
async setUrlData(selectionList) {
|
|
466
|
+
let list = selectionList.map((item) => {
|
|
467
|
+
axios
|
|
468
|
+
.get(`/api/neams/eamsbaserecord/download/${item[this.keys.url]}?t=${Date.now()}`, null, {
|
|
469
|
+
responseType: 'blob'
|
|
470
|
+
})
|
|
471
|
+
.then((res) => {
|
|
472
|
+
item.pathUrl = URL.createObjectURL(res)
|
|
473
|
+
let extension = item['_name'].split('.').pop().toLowerCase()
|
|
474
|
+
item.printType = extension === 'pdf' ? 'pdf' : 'image'
|
|
475
|
+
})
|
|
476
|
+
return item
|
|
477
|
+
})
|
|
478
|
+
return await Promise.all(list)
|
|
479
|
+
},
|
|
402
480
|
batchBeforeUploadFn(file) {
|
|
403
481
|
let bu = this.$listeners['before-upload'] || this.$listeners['beforeUpload']
|
|
404
482
|
if (bu) return bu(file)
|
|
@@ -554,6 +632,7 @@ export default {
|
|
|
554
632
|
this.$set(row, '_percent', percent <= 99 ? Math.round(percent) : 99)
|
|
555
633
|
},
|
|
556
634
|
onSuccessFn(response, file, fileList, row) {
|
|
635
|
+
this.$set(row, '_typeDisabled', true)
|
|
557
636
|
this.$set(row, '_name', file.name)
|
|
558
637
|
this.$set(row, '_percent', 100)
|
|
559
638
|
row[this.keys.time] = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
@@ -620,20 +699,6 @@ export default {
|
|
|
620
699
|
}
|
|
621
700
|
}
|
|
622
701
|
}
|
|
623
|
-
|
|
624
|
-
const keysD = {
|
|
625
|
-
rowKey: 'id',
|
|
626
|
-
type: 'type',
|
|
627
|
-
name: 'name',
|
|
628
|
-
url: 'url',
|
|
629
|
-
time: 'time',
|
|
630
|
-
user: 'user'
|
|
631
|
-
}
|
|
632
|
-
const typeOptionsD = [
|
|
633
|
-
{ type: '001', label: $lc('信贷合同') },
|
|
634
|
-
{ type: '002', label: $lc('贴现合同') },
|
|
635
|
-
{ type: '003', label: $lc('其他合同') }
|
|
636
|
-
]
|
|
637
702
|
</script>
|
|
638
703
|
<style>
|
|
639
704
|
.file-upload-table_preview-pn {
|
|
@@ -125,7 +125,7 @@ export default {
|
|
|
125
125
|
.post(
|
|
126
126
|
'/bems/prod_1.0/uas/api/authorization/password/validate',
|
|
127
127
|
{
|
|
128
|
-
username: this.form.username,
|
|
128
|
+
// username: this.form.username,
|
|
129
129
|
password: value
|
|
130
130
|
},
|
|
131
131
|
{ noMsg: true, loading: false }
|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
181
181
|
.post(
|
|
182
182
|
'/bems/prod_1.0/uas/api/authorization/password/update',
|
|
183
183
|
{
|
|
184
|
-
|
|
184
|
+
password: this.form.orginPassword,
|
|
185
185
|
newPassword: this.form.newPassword
|
|
186
186
|
},
|
|
187
187
|
{
|