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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="prefixCls">
|
|
3
|
-
<el-form ref="advancedFilter" v-
|
|
3
|
+
<el-form ref="advancedFilter" v-show="visible" :class="prefixCls + '-body'">
|
|
4
4
|
<slot name="prefix"></slot>
|
|
5
5
|
<el-form-item
|
|
6
6
|
v-for="item in GroupData"
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
:item="item"
|
|
19
19
|
@blur="$emit('blur')"
|
|
20
20
|
@clean="$emit('clean')"
|
|
21
|
+
@enter="$emit('enter')"
|
|
21
22
|
@filter="$emit('filter', model)"
|
|
22
23
|
/>
|
|
23
24
|
</div>
|
|
24
25
|
<i
|
|
25
|
-
v-if="!item.
|
|
26
|
+
v-if="!item.isNotClose"
|
|
26
27
|
:key="getOnlyKey(item)"
|
|
27
|
-
:class="[
|
|
28
|
+
:class="['filter_remove', 'n20-icon-yichu']"
|
|
28
29
|
@click="handleClose(item)"
|
|
29
30
|
></i>
|
|
30
31
|
</el-form-item>
|
|
@@ -33,11 +34,25 @@
|
|
|
33
34
|
<el-button v-popover:advanced_popover onlyicon plain icon="el-icon-plus" />
|
|
34
35
|
<el-popover ref="advanced_popover" placement="bottom-start" trigger="click">
|
|
35
36
|
<el-input v-model="keyword" clearable class="input-w m-b-s" :placeholder="$lc('搜索筛选条件')" />
|
|
36
|
-
<
|
|
37
|
+
<div class="flex-box flex-lr">
|
|
38
|
+
<el-button type="text" @click="allCheck">全选</el-button>
|
|
39
|
+
<el-button type="text" @click="defaultCheck"> 恢复默认</el-button>
|
|
40
|
+
</div>
|
|
41
|
+
<filterItem
|
|
42
|
+
:filter-list="filterListS"
|
|
43
|
+
:maxLength="maxLength"
|
|
44
|
+
:check-array.sync="checkList"
|
|
45
|
+
@checked="check"
|
|
46
|
+
/>
|
|
47
|
+
<div class="flex-box flex-c m-t-m">
|
|
48
|
+
<el-button size="mini" type="primary" @click="savaCheck">确认</el-button>
|
|
49
|
+
<el-button plain type="primary" @click="cancel">取消</el-button>
|
|
50
|
+
</div>
|
|
37
51
|
</el-popover>
|
|
38
|
-
<el-link class="m-l-s
|
|
39
|
-
{{ '
|
|
52
|
+
<el-link class="m-l-s color-primary" :underline="false" icon="n20-icon-query" @click="$emit('search')">
|
|
53
|
+
{{ '查询' | $lc }}</el-link
|
|
40
54
|
>
|
|
55
|
+
<el-link class="m-l-s" :underline="false" icon="n20-icon-qingchu" @click="cleared"> {{ '清空' | $lc }}</el-link>
|
|
41
56
|
</el-form-item>
|
|
42
57
|
</el-form>
|
|
43
58
|
</div>
|
|
@@ -60,9 +75,27 @@ export default {
|
|
|
60
75
|
// formItemInput,
|
|
61
76
|
formItemRender,
|
|
62
77
|
InputSearch,
|
|
78
|
+
// FormItem,
|
|
63
79
|
filterItem
|
|
64
80
|
},
|
|
81
|
+
provide() {
|
|
82
|
+
return {
|
|
83
|
+
prefixCls,
|
|
84
|
+
nFilter: this
|
|
85
|
+
}
|
|
86
|
+
},
|
|
65
87
|
props: {
|
|
88
|
+
isNotClose: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false
|
|
91
|
+
},
|
|
92
|
+
maxLength: {
|
|
93
|
+
type: Number
|
|
94
|
+
},
|
|
95
|
+
removeLoad: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: true
|
|
98
|
+
},
|
|
66
99
|
visible: {
|
|
67
100
|
type: Boolean,
|
|
68
101
|
default: false
|
|
@@ -91,7 +124,7 @@ export default {
|
|
|
91
124
|
remoteList: [],
|
|
92
125
|
GroupData: [],
|
|
93
126
|
checkList: [],
|
|
94
|
-
|
|
127
|
+
defineCheckList: [],
|
|
95
128
|
userNo: sessionStorage.getItem('userNo')
|
|
96
129
|
}
|
|
97
130
|
},
|
|
@@ -157,7 +190,13 @@ export default {
|
|
|
157
190
|
let flag = ''
|
|
158
191
|
switch (item.type) {
|
|
159
192
|
case 'numberrange':
|
|
160
|
-
flag =
|
|
193
|
+
flag =
|
|
194
|
+
this.model[item.startValue] !== null &&
|
|
195
|
+
this.model[item.endValue] !== null &&
|
|
196
|
+
this.model[item.startValue] !== undefined &&
|
|
197
|
+
this.model[item.endValue] !== undefined
|
|
198
|
+
? this.prefixCls + '-active'
|
|
199
|
+
: ''
|
|
161
200
|
break
|
|
162
201
|
case 'daterange':
|
|
163
202
|
case 'datetimerange':
|
|
@@ -219,19 +258,53 @@ export default {
|
|
|
219
258
|
cleared() {
|
|
220
259
|
this.$emit('clear')
|
|
221
260
|
},
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
261
|
+
setModelData(list) {
|
|
262
|
+
let arr = []
|
|
263
|
+
list.forEach((res) => {
|
|
264
|
+
if (res.value) {
|
|
265
|
+
arr.push(res.value)
|
|
266
|
+
} else if (res.startDate && res.endDate) {
|
|
267
|
+
arr.push(res.startDate)
|
|
268
|
+
arr.push(res.endDate)
|
|
269
|
+
} else if (res.startValue && res.endValue) {
|
|
270
|
+
arr.push(res.startValue)
|
|
271
|
+
arr.push(res.endValue)
|
|
272
|
+
}
|
|
273
|
+
})
|
|
274
|
+
for (const key in this.model) {
|
|
275
|
+
if (Object.hasOwnProperty.call(this.model, key)) {
|
|
276
|
+
if (!arr.includes(key)) {
|
|
277
|
+
delete this.model[key]
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
allCheck() {
|
|
283
|
+
if (this.maxLength) {
|
|
284
|
+
this.checkList = this.filterListS.slice(0, this.maxLength)?.map((res) => res[this.onlyKey])
|
|
285
|
+
console.log(this.checkList, this.filterListS)
|
|
286
|
+
} else {
|
|
287
|
+
this.checkList = this.filterListS?.map((res) => res[this.onlyKey])
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
defaultCheck() {
|
|
291
|
+
this.checkList = this.defineCheckList
|
|
292
|
+
},
|
|
293
|
+
cancel() {
|
|
294
|
+
this.checkList = this.defineCheckList
|
|
295
|
+
this.$refs.advanced_popover.showPopper = false
|
|
296
|
+
},
|
|
297
|
+
savaCheck() {
|
|
226
298
|
let saveCheckArr = []
|
|
227
299
|
// 如果keys数组不为空
|
|
228
|
-
if (
|
|
300
|
+
if (this.checkList.length > 0) {
|
|
229
301
|
this.filterList.forEach((item) => {
|
|
230
|
-
if (
|
|
302
|
+
if (this.checkList.includes(item[this.onlyKey])) {
|
|
231
303
|
saveCheckArr.push(item)
|
|
232
304
|
}
|
|
233
305
|
})
|
|
234
306
|
}
|
|
307
|
+
this.setModelData(saveCheckArr)
|
|
235
308
|
this.saveFilter(saveCheckArr).then(({ code }) => {
|
|
236
309
|
// 如果保存成功
|
|
237
310
|
if (code === 200) {
|
|
@@ -239,9 +312,12 @@ export default {
|
|
|
239
312
|
this.getFilterList()
|
|
240
313
|
}
|
|
241
314
|
})
|
|
315
|
+
this.$refs.advanced_popover.showPopper = false
|
|
242
316
|
this.$emit('check')
|
|
243
|
-
|
|
244
|
-
|
|
317
|
+
},
|
|
318
|
+
check(keys) {
|
|
319
|
+
this.checkList = keys
|
|
320
|
+
},
|
|
245
321
|
/**
|
|
246
322
|
* 保存筛选条件
|
|
247
323
|
* @param data
|
|
@@ -282,7 +358,7 @@ export default {
|
|
|
282
358
|
this.GroupData = _data.map((item) => {
|
|
283
359
|
for (let i = 0; i < this.filterList.length; i++) {
|
|
284
360
|
const originItem = this.filterList[i]
|
|
285
|
-
if (originItem.
|
|
361
|
+
if (originItem[this.onlyKey] === item[this.onlyKey]) {
|
|
286
362
|
item.label = originItem.label
|
|
287
363
|
if (item.options && originItem.options) {
|
|
288
364
|
item.options = originItem.options
|
|
@@ -292,14 +368,28 @@ export default {
|
|
|
292
368
|
return item
|
|
293
369
|
})
|
|
294
370
|
} else {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
371
|
+
if (this.removeLoad) {
|
|
372
|
+
this.GroupData = this.filterList.filter((item) => {
|
|
373
|
+
if (item.isDefault) {
|
|
374
|
+
return item
|
|
375
|
+
}
|
|
376
|
+
})
|
|
377
|
+
} else {
|
|
378
|
+
this.GroupData = []
|
|
379
|
+
}
|
|
300
380
|
}
|
|
301
381
|
this.checkList = this.GroupData.map((res) => res.id)
|
|
302
|
-
this.
|
|
382
|
+
this.defineCheckList = cloneDeep(this.checkList)
|
|
383
|
+
// 查找排序,在this.filterList中查找this.checkList中的每一项,并将其排在前面
|
|
384
|
+
this.filterList = this.filterList.sort((a, b) => {
|
|
385
|
+
if (this.checkList.includes(a[this.onlyKey]) && !this.checkList.includes(b[this.onlyKey])) {
|
|
386
|
+
return -1
|
|
387
|
+
}
|
|
388
|
+
if (!this.checkList.includes(a[this.onlyKey]) && this.checkList.includes(b[this.onlyKey])) {
|
|
389
|
+
return 1
|
|
390
|
+
}
|
|
391
|
+
return 0
|
|
392
|
+
})
|
|
303
393
|
})
|
|
304
394
|
.finally(() => {
|
|
305
395
|
for (const key in getOptionsMap()) {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="n20-form-item">
|
|
3
|
+
<label class="n20-form-item__label">{{ label }}</label>
|
|
4
|
+
<div class="n20-form-item__value">
|
|
5
|
+
<slot></slot>
|
|
6
|
+
</div>
|
|
7
|
+
<i class="filter_remove n20-icon-yichu"></i>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'FormItem',
|
|
14
|
+
inject: ['Form'],
|
|
15
|
+
props: {
|
|
16
|
+
label: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ''
|
|
19
|
+
},
|
|
20
|
+
item: {
|
|
21
|
+
type: Object
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<style lang="scss">
|
|
28
|
+
.n20-form-item {
|
|
29
|
+
position: relative;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
vertical-align: middle;
|
|
32
|
+
max-width: 426px;
|
|
33
|
+
height: 32px;
|
|
34
|
+
line-height: 32px;
|
|
35
|
+
margin-right: 8px;
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
padding-left: 8px;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
border: 1px solid #dcdfe5;
|
|
40
|
+
background: #fff;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
&__label {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
max-width: 168px;
|
|
48
|
+
margin-right: 6px;
|
|
49
|
+
color: #182b50;
|
|
50
|
+
}
|
|
51
|
+
&__value {
|
|
52
|
+
display: inline-block;
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
text-overflow: ellipsis;
|
|
57
|
+
.el-input .el-input__inner {
|
|
58
|
+
border: none;
|
|
59
|
+
padding-left: 0;
|
|
60
|
+
background-color: transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.el-input__inner:focus {
|
|
64
|
+
box-shadow: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
.filter_remove {
|
|
68
|
+
display: none;
|
|
69
|
+
position: absolute;
|
|
70
|
+
height: 13px;
|
|
71
|
+
width: 13px;
|
|
72
|
+
background: #f1f1f1;
|
|
73
|
+
right: -5px;
|
|
74
|
+
top: -7px;
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
z-index: 1;
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
.filter_remove {
|
|
83
|
+
display: block;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form class="n20-form">
|
|
3
|
+
<FormItem v-for="(item, i) in list" :key="i" :label="item.label" :item="item">
|
|
4
|
+
<slot v-if="item.slotName" :name="item.slotName"></slot>
|
|
5
|
+
<FormItemRender
|
|
6
|
+
v-else
|
|
7
|
+
:key="i"
|
|
8
|
+
:form="model"
|
|
9
|
+
:item="item"
|
|
10
|
+
@blur="$emit('blur')"
|
|
11
|
+
@clean="$emit('clean')"
|
|
12
|
+
@enter="$emit('enter')"
|
|
13
|
+
@filter="$emit('filter', model)"
|
|
14
|
+
></FormItemRender>
|
|
15
|
+
</FormItem>
|
|
16
|
+
</form>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import FormItem from './form-item.vue'
|
|
21
|
+
import FormItemRender from '../../formItemRender.vue'
|
|
22
|
+
export default {
|
|
23
|
+
name: 'Form',
|
|
24
|
+
components: {
|
|
25
|
+
FormItem,
|
|
26
|
+
FormItemRender
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
model: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => ({})
|
|
32
|
+
},
|
|
33
|
+
rules: {
|
|
34
|
+
type: Object,
|
|
35
|
+
default: () => ({})
|
|
36
|
+
},
|
|
37
|
+
list: {
|
|
38
|
+
type: Array,
|
|
39
|
+
default: () => []
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
provide() {
|
|
43
|
+
return {
|
|
44
|
+
Form: this
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="scss">
|
|
51
|
+
.n20-form {
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
position: relative;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
flex-wrap: wrap;
|
|
57
|
+
padding: 8px 0;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
props: {
|
|
8
|
+
isNotClose: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: false
|
|
11
|
+
},
|
|
12
|
+
visible: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
filterList: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
},
|
|
20
|
+
onlyKey: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ''
|
|
23
|
+
},
|
|
24
|
+
model: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => ({})
|
|
27
|
+
},
|
|
28
|
+
filterId: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ''
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export const getOnlyKey = (key, data) =>
|
|
2
|
-
|
|
3
|
-
return data[key]
|
|
4
|
-
}
|
|
1
|
+
export const getOnlyKey = (key, data) =>
|
|
2
|
+
key ? data[key] : Date.now().toString(36) + Math.random().toString(36).slice(2, 7)
|
|
5
3
|
let options = {}
|
|
6
4
|
export const setOptionsMap = (key, value) => {
|
|
7
5
|
options[key] = value
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex-box" style="height: 100%">
|
|
2
|
+
<div :class="{ 'flex-box': position !== 'top' }" style="height: 100%">
|
|
3
3
|
<AnchorSidebar
|
|
4
4
|
v-if="position !== 'right'"
|
|
5
5
|
:nav-list="navList"
|
|
6
6
|
:activit="value"
|
|
7
7
|
:style="{ width: navWidth }"
|
|
8
|
+
:class="{ 'top-css': position === 'top' }"
|
|
8
9
|
@click="activitFn"
|
|
9
10
|
/>
|
|
10
11
|
<div ref="anchor-content" :class="['flex-item', parentClass]" style="height: 100%; overflow: auto">
|
|
@@ -214,3 +215,24 @@ export default {
|
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
217
|
</script>
|
|
218
|
+
<style>
|
|
219
|
+
.top-css {
|
|
220
|
+
width: auto !important;
|
|
221
|
+
display: flex;
|
|
222
|
+
margin-bottom: 4px;
|
|
223
|
+
}
|
|
224
|
+
.top-css .n20-anchor2-nav {
|
|
225
|
+
padding: 5px;
|
|
226
|
+
border-left: none;
|
|
227
|
+
}
|
|
228
|
+
.top-css .n20-anchor2-nav-activit {
|
|
229
|
+
color: var(--color-primary);
|
|
230
|
+
}
|
|
231
|
+
.top-css .n20-anchor2-nav-activit:after {
|
|
232
|
+
content: '';
|
|
233
|
+
height: 2px;
|
|
234
|
+
background-color: #007aff;
|
|
235
|
+
display: block;
|
|
236
|
+
margin-top: 4px;
|
|
237
|
+
}
|
|
238
|
+
</style>
|
|
@@ -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) {
|