n20-common-lib 2.7.0-beta.14 → 2.7.0-beta.16
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 +216 -0
- package/src/assets/css/cl-layout-header.scss +3 -1
- 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/FormItem.vue +41 -0
- package/src/components/AdvancedFilter/formItemRender.vue +63 -32
- package/src/components/AdvancedFilter/index.vue +52 -19
- 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 +90 -29
- package/src/components/InputNumber/index.vue +1 -0
- package/src/components/Layout/HeaderWrap/changePwd.vue +2 -2
- package/src/components/Layout/HeaderWrap/indexN.vue +39 -35
- package/src/components/Layout/indexN.vue +14 -3
- 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 +4 -3
- package/src/directives/VRuleKey/index.js +7 -4
- package/src/index.js +3 -4
- 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
|
@@ -36,14 +36,33 @@
|
|
|
36
36
|
:placeholder="'请选择加签类型' | $lc"
|
|
37
37
|
style="width: 10em"
|
|
38
38
|
>
|
|
39
|
-
<el-option
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
<el-option v-if="addTaskModel === '1'" :label="'向后加签' | $lc" value="1" />
|
|
40
|
+
<template v-else>
|
|
41
|
+
<el-option
|
|
42
|
+
v-if="authList.includes('isAddForwardTask') || preAddTask"
|
|
43
|
+
:label="'向前加签' | $lc"
|
|
44
|
+
value="2"
|
|
45
|
+
/>
|
|
46
|
+
<el-option
|
|
47
|
+
v-if="addTaskModel === '1' || authList.includes('isAddtask') || preAddTask"
|
|
48
|
+
:label="'向后加签' | $lc"
|
|
49
|
+
value="1"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
45
52
|
</el-select>
|
|
46
53
|
<el-select
|
|
54
|
+
v-if="addTaskModel === '1'"
|
|
55
|
+
v-model="addTaskType"
|
|
56
|
+
clearable
|
|
57
|
+
:placeholder="'请选择审批方式' | $lc"
|
|
58
|
+
style="width: 10em"
|
|
59
|
+
>
|
|
60
|
+
<el-option :label="'普通节点' | $lc" value="1" />
|
|
61
|
+
<el-option :label="'会签并行' | $lc" value="2" />
|
|
62
|
+
<el-option :label="'普通串行' | $lc" value="3" />
|
|
63
|
+
</el-select>
|
|
64
|
+
<el-select
|
|
65
|
+
v-else
|
|
47
66
|
v-model="addTaskType"
|
|
48
67
|
disabled
|
|
49
68
|
clearable
|
|
@@ -83,7 +102,7 @@
|
|
|
83
102
|
style="width: 18%"
|
|
84
103
|
/>
|
|
85
104
|
</template>
|
|
86
|
-
<el-form-item class="flex-1" :label="'审批意见' | $lc" :error="errMsg" :required="
|
|
105
|
+
<el-form-item class="flex-1" :label="'审批意见' | $lc" :error="errMsg" :required="requiredC" style="width: 70%">
|
|
87
106
|
<el-input
|
|
88
107
|
ref="msg-input"
|
|
89
108
|
v-model="messageC"
|
|
@@ -284,6 +303,7 @@ export default {
|
|
|
284
303
|
data() {
|
|
285
304
|
this.msgisSync = !!this.$listeners['update:message']
|
|
286
305
|
return {
|
|
306
|
+
requiredC: false,
|
|
287
307
|
prefixCls,
|
|
288
308
|
messageIn: '',
|
|
289
309
|
errMsg: undefined,
|
|
@@ -303,6 +323,7 @@ export default {
|
|
|
303
323
|
approvalToV: false,
|
|
304
324
|
showApprovalTo: false,
|
|
305
325
|
opiAndUser: false,
|
|
326
|
+
addTaskModel: '0',
|
|
306
327
|
otherAtt: {},
|
|
307
328
|
fileDtos: [],
|
|
308
329
|
fileName: '',
|
|
@@ -336,11 +357,19 @@ export default {
|
|
|
336
357
|
this.taskId = this.$route.query.taskId || this.$route.params.taskId
|
|
337
358
|
this.showBtn = this.$route.query.habtn !== 'true'
|
|
338
359
|
this.getBtns()
|
|
360
|
+
this.getAddTaskMode()
|
|
339
361
|
this.getShowApprovalTo()
|
|
340
362
|
this.getHasQueryAppOpiAndUser()
|
|
341
363
|
this.nextApproval && this.getTodoList()
|
|
364
|
+
this.getConfiguration()
|
|
342
365
|
},
|
|
343
366
|
methods: {
|
|
367
|
+
// 意见是否必填
|
|
368
|
+
getConfiguration() {
|
|
369
|
+
getJsonc('portal/server-config.jsonc', null, true).then(({ opinionRequired }) => {
|
|
370
|
+
this.requiredC = opinionRequired ?? this.required
|
|
371
|
+
})
|
|
372
|
+
},
|
|
344
373
|
getTodoList() {
|
|
345
374
|
return new Promise((resolve, reject) => {
|
|
346
375
|
const dto = JSON.parse(sessionStorage.getItem(`approvalDto`))
|
|
@@ -353,6 +382,16 @@ export default {
|
|
|
353
382
|
})
|
|
354
383
|
})
|
|
355
384
|
},
|
|
385
|
+
// 获取加签方式的模式
|
|
386
|
+
getAddTaskMode() {
|
|
387
|
+
axios
|
|
388
|
+
.get(`/bems/activiti/sample/getAddTaskMode`, null, { loading: false, noMsg: true })
|
|
389
|
+
.then(({ data, code }) => {
|
|
390
|
+
if (code === 200) {
|
|
391
|
+
this.addTaskModel = data
|
|
392
|
+
}
|
|
393
|
+
})
|
|
394
|
+
},
|
|
356
395
|
|
|
357
396
|
// 换回到发起页
|
|
358
397
|
goFrom() {
|
|
@@ -549,7 +588,7 @@ export default {
|
|
|
549
588
|
},
|
|
550
589
|
// 审批
|
|
551
590
|
approvalFn() {
|
|
552
|
-
if (this.
|
|
591
|
+
if (this.requiredC && !this.messageC) {
|
|
553
592
|
return this.errMsgFn(
|
|
554
593
|
this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
|
|
555
594
|
)
|
|
@@ -568,7 +607,7 @@ export default {
|
|
|
568
607
|
})
|
|
569
608
|
},
|
|
570
609
|
approvalNext() {
|
|
571
|
-
if (this.
|
|
610
|
+
if (this.requiredC && !this.messageC) {
|
|
572
611
|
return this.errMsgFn(
|
|
573
612
|
this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
|
|
574
613
|
)
|
|
@@ -605,7 +644,7 @@ export default {
|
|
|
605
644
|
})
|
|
606
645
|
},
|
|
607
646
|
async goApproval(row) {
|
|
608
|
-
const { appUrl = {} } = await getJsonc('activiti/server-config.jsonc')
|
|
647
|
+
const { appUrl = {} } = await getJsonc('activiti/server-config.jsonc', null, true)
|
|
609
648
|
if (appUrl[row.appNo]) {
|
|
610
649
|
let path = toExaminePath(row, appUrl) || appUrl[row.appNo] + $lc('/') + row.typeCode
|
|
611
650
|
linkPush(path, {
|
|
@@ -47,9 +47,11 @@ export default {
|
|
|
47
47
|
methods: {
|
|
48
48
|
// 审批意见选择是否单选,1是 0 否
|
|
49
49
|
getIsMultiple() {
|
|
50
|
-
axios
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
axios
|
|
51
|
+
.get(`/bems/activiti/actAppOpi/queryAppOpiAndUser`, null, { loading: false, noMsg: true })
|
|
52
|
+
.then(({ msg }) => {
|
|
53
|
+
this.multiple = msg === '0'
|
|
54
|
+
})
|
|
53
55
|
},
|
|
54
56
|
getData() {
|
|
55
57
|
if (this.andUser) {
|
|
@@ -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
|
+
break
|
|
251
|
+
case '删除':
|
|
252
|
+
this.$msgboxPor({
|
|
253
|
+
title: '确认要删除吗?',
|
|
254
|
+
message: '',
|
|
255
|
+
type: 'warning',
|
|
256
|
+
customClass: 'question',
|
|
257
|
+
confirmButtonText: '确定',
|
|
258
|
+
cancelButtonText: '取消'
|
|
259
|
+
}).then(() => {
|
|
260
|
+
this.value.splice(index, 1)
|
|
261
|
+
this.setView()
|
|
262
|
+
})
|
|
263
|
+
break
|
|
264
|
+
default:
|
|
265
|
+
break
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
</script>
|
|
271
|
+
<style lang="scss" scoped>
|
|
272
|
+
.list {
|
|
273
|
+
li {
|
|
274
|
+
height: 24px;
|
|
275
|
+
line-height: 24px;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
</style>
|
|
@@ -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>
|
|
@@ -73,17 +78,17 @@
|
|
|
73
78
|
</slot>
|
|
74
79
|
</el-table-column>
|
|
75
80
|
<el-table-column v-if="readonly" :label="'附件上传' | $lc" :prop="keys.name">
|
|
76
|
-
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
77
|
-
'附件上传' | $lc
|
|
78
|
-
|
|
81
|
+
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
82
|
+
>{{ '附件上传' | $lc }}
|
|
83
|
+
</slot>
|
|
79
84
|
<slot slot-scope="{ row }" name="upload" :row="row">
|
|
80
85
|
{{ $options.filters.fileName(row, keys.url) || row[keys.name] }}
|
|
81
86
|
</slot>
|
|
82
87
|
</el-table-column>
|
|
83
88
|
<el-table-column v-if="!readonly" :label="'附件上传' | $lc">
|
|
84
|
-
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
85
|
-
'附件上传' | $lc
|
|
86
|
-
|
|
89
|
+
<slot slot="header" slot-scope="scope" name="upload-header" :column="scope.column"
|
|
90
|
+
>{{ '附件上传' | $lc }}
|
|
91
|
+
</slot>
|
|
87
92
|
<slot slot-scope="{ row, $index }" name="upload" :row="row" :[indexK]="$index">
|
|
88
93
|
<Upload
|
|
89
94
|
:ref="'upload' + $index"
|
|
@@ -127,7 +132,7 @@
|
|
|
127
132
|
</template>
|
|
128
133
|
<template slot-scope="{ row, $index }">
|
|
129
134
|
<slot name="percent" :row="row" :[indexK]="$index">
|
|
130
|
-
<div v-if="row['_percent'] >= 0 && !
|
|
135
|
+
<div v-if="row['_percent'] >= 0 && !readonly" class="flex-box flex-v">
|
|
131
136
|
<el-progress
|
|
132
137
|
class="n20-upload-table-progress"
|
|
133
138
|
:percentage="row['_percent']"
|
|
@@ -141,16 +146,16 @@
|
|
|
141
146
|
size="mini"
|
|
142
147
|
style="width: 60px"
|
|
143
148
|
@click="anewSubmitFn(row, $index)"
|
|
144
|
-
>{{ '重新上传' | $lc }}
|
|
145
|
-
>
|
|
149
|
+
>{{ '重新上传' | $lc }}
|
|
150
|
+
</el-button>
|
|
146
151
|
<el-button
|
|
147
152
|
v-else-if="row['_percent'] >= 0 && row['_percent'] < 100"
|
|
148
153
|
type="text"
|
|
149
154
|
size="mini"
|
|
150
155
|
style="width: 60px"
|
|
151
156
|
@click="abortFn(row, $index)"
|
|
152
|
-
>{{ '取消' | $lc }}
|
|
153
|
-
>
|
|
157
|
+
>{{ '取消' | $lc }}
|
|
158
|
+
</el-button>
|
|
154
159
|
</div>
|
|
155
160
|
</slot>
|
|
156
161
|
</template>
|
|
@@ -264,6 +269,19 @@ const ViewerImg = async function () {
|
|
|
264
269
|
let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
|
|
265
270
|
return component
|
|
266
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
|
+
]
|
|
267
285
|
|
|
268
286
|
export default {
|
|
269
287
|
name: 'FileUploadTable',
|
|
@@ -315,7 +333,8 @@ export default {
|
|
|
315
333
|
default: () => /\.(jpg|png|gif|svg|pdf)$/i
|
|
316
334
|
},
|
|
317
335
|
height: {
|
|
318
|
-
type: [String, Number]
|
|
336
|
+
type: [String, Number],
|
|
337
|
+
default: '300px'
|
|
319
338
|
},
|
|
320
339
|
tableData: {
|
|
321
340
|
type: Array,
|
|
@@ -329,6 +348,10 @@ export default {
|
|
|
329
348
|
type: Boolean,
|
|
330
349
|
default: false
|
|
331
350
|
},
|
|
351
|
+
showBatchPrint: {
|
|
352
|
+
type: Boolean,
|
|
353
|
+
default: false
|
|
354
|
+
},
|
|
332
355
|
uploadHttpRequest: {
|
|
333
356
|
type: Function,
|
|
334
357
|
default: undefined
|
|
@@ -393,16 +416,67 @@ export default {
|
|
|
393
416
|
return this.dataPorp.fileData || undefined
|
|
394
417
|
},
|
|
395
418
|
typeOptions() {
|
|
396
|
-
return this.dataPorp.typeOptions ||
|
|
419
|
+
return this.dataPorp.typeOptions || typeOptionsDefault
|
|
397
420
|
},
|
|
398
421
|
keys() {
|
|
399
|
-
return this.dataPorp.keys ||
|
|
422
|
+
return this.dataPorp.keys || keysDefault
|
|
400
423
|
},
|
|
401
424
|
multiple() {
|
|
402
425
|
return this.dataPorp.multiple ?? true
|
|
403
426
|
}
|
|
404
427
|
},
|
|
405
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
|
+
},
|
|
406
480
|
batchBeforeUploadFn(file) {
|
|
407
481
|
let bu = this.$listeners['before-upload'] || this.$listeners['beforeUpload']
|
|
408
482
|
if (bu) return bu(file)
|
|
@@ -558,6 +632,7 @@ export default {
|
|
|
558
632
|
this.$set(row, '_percent', percent <= 99 ? Math.round(percent) : 99)
|
|
559
633
|
},
|
|
560
634
|
onSuccessFn(response, file, fileList, row) {
|
|
635
|
+
this.$set(row, '_typeDisabled', true)
|
|
561
636
|
this.$set(row, '_name', file.name)
|
|
562
637
|
this.$set(row, '_percent', 100)
|
|
563
638
|
row[this.keys.time] = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
@@ -624,20 +699,6 @@ export default {
|
|
|
624
699
|
}
|
|
625
700
|
}
|
|
626
701
|
}
|
|
627
|
-
|
|
628
|
-
const keysD = {
|
|
629
|
-
rowKey: 'id',
|
|
630
|
-
type: 'type',
|
|
631
|
-
name: 'name',
|
|
632
|
-
url: 'url',
|
|
633
|
-
time: 'time',
|
|
634
|
-
user: 'user'
|
|
635
|
-
}
|
|
636
|
-
const typeOptionsD = [
|
|
637
|
-
{ type: '001', label: $lc('信贷合同') },
|
|
638
|
-
{ type: '002', label: $lc('贴现合同') },
|
|
639
|
-
{ type: '003', label: $lc('其他合同') }
|
|
640
|
-
]
|
|
641
702
|
</script>
|
|
642
703
|
<style>
|
|
643
704
|
.file-upload-table_preview-pn {
|