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
|
@@ -5,6 +5,202 @@
|
|
|
5
5
|
"css_prefix_text": "n20-icon-",
|
|
6
6
|
"description": "",
|
|
7
7
|
"glyphs": [
|
|
8
|
+
{
|
|
9
|
+
"icon_id": "39632933",
|
|
10
|
+
"name": "语言切换",
|
|
11
|
+
"font_class": "yuyanqiehuan",
|
|
12
|
+
"unicode": "e62f",
|
|
13
|
+
"unicode_decimal": 58927
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"icon_id": "39546292",
|
|
17
|
+
"name": "arrows",
|
|
18
|
+
"font_class": "lujing",
|
|
19
|
+
"unicode": "e62e",
|
|
20
|
+
"unicode_decimal": 58926
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"icon_id": "39545500",
|
|
24
|
+
"name": "menu",
|
|
25
|
+
"font_class": "caidan",
|
|
26
|
+
"unicode": "e61e",
|
|
27
|
+
"unicode_decimal": 58910
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"icon_id": "39545088",
|
|
31
|
+
"name": "jtskywgk",
|
|
32
|
+
"font_class": "a-bianzu701",
|
|
33
|
+
"unicode": "e613",
|
|
34
|
+
"unicode_decimal": 58899
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"icon_id": "39545089",
|
|
38
|
+
"name": "cszhyw",
|
|
39
|
+
"font_class": "zhcsyw",
|
|
40
|
+
"unicode": "e614",
|
|
41
|
+
"unicode_decimal": 58900
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"icon_id": "39545090",
|
|
45
|
+
"name": "jrwg",
|
|
46
|
+
"font_class": "a-bianzu1",
|
|
47
|
+
"unicode": "e615",
|
|
48
|
+
"unicode_decimal": 58901
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"icon_id": "39545091",
|
|
52
|
+
"name": "csywgl",
|
|
53
|
+
"font_class": "bianzu",
|
|
54
|
+
"unicode": "e616",
|
|
55
|
+
"unicode_decimal": 58902
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"icon_id": "39545092",
|
|
59
|
+
"name": "cszlpt",
|
|
60
|
+
"font_class": "a-bianzu3",
|
|
61
|
+
"unicode": "e617",
|
|
62
|
+
"unicode_decimal": 58903
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"icon_id": "39545093",
|
|
66
|
+
"name": "cswy",
|
|
67
|
+
"font_class": "a-bianzu69",
|
|
68
|
+
"unicode": "e618",
|
|
69
|
+
"unicode_decimal": 58904
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"icon_id": "39545094",
|
|
73
|
+
"name": "jtsjfx",
|
|
74
|
+
"font_class": "a-bianzu2",
|
|
75
|
+
"unicode": "e619",
|
|
76
|
+
"unicode_decimal": 58905
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"icon_id": "39545095",
|
|
80
|
+
"name": "csfzjc",
|
|
81
|
+
"font_class": "a-bianzu70",
|
|
82
|
+
"unicode": "e61a",
|
|
83
|
+
"unicode_decimal": 58906
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"icon_id": "39130753",
|
|
87
|
+
"name": "query",
|
|
88
|
+
"font_class": "query",
|
|
89
|
+
"unicode": "e612",
|
|
90
|
+
"unicode_decimal": 58898
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"icon_id": "38017865",
|
|
94
|
+
"name": "风控管理",
|
|
95
|
+
"font_class": "fengkongguanli",
|
|
96
|
+
"unicode": "e611",
|
|
97
|
+
"unicode_decimal": 58897
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"icon_id": "37668679",
|
|
101
|
+
"name": "清除",
|
|
102
|
+
"font_class": "qingchu",
|
|
103
|
+
"unicode": "e610",
|
|
104
|
+
"unicode_decimal": 58896
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"icon_id": "37667394",
|
|
108
|
+
"name": "移除",
|
|
109
|
+
"font_class": "yichu",
|
|
110
|
+
"unicode": "e60f",
|
|
111
|
+
"unicode_decimal": 58895
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"icon_id": "37355986",
|
|
115
|
+
"name": "增加 copy",
|
|
116
|
+
"font_class": "a-zengjiacopy",
|
|
117
|
+
"unicode": "e62d",
|
|
118
|
+
"unicode_decimal": 58925
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"icon_id": "37315078",
|
|
122
|
+
"name": "图钉",
|
|
123
|
+
"font_class": "tuding",
|
|
124
|
+
"unicode": "e60c",
|
|
125
|
+
"unicode_decimal": 58892
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"icon_id": "35627211",
|
|
129
|
+
"name": "出口",
|
|
130
|
+
"font_class": "chukou",
|
|
131
|
+
"unicode": "e621",
|
|
132
|
+
"unicode_decimal": 58913
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"icon_id": "35627212",
|
|
136
|
+
"name": "步骤",
|
|
137
|
+
"font_class": "buzhou",
|
|
138
|
+
"unicode": "e622",
|
|
139
|
+
"unicode_decimal": 58914
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"icon_id": "35627213",
|
|
143
|
+
"name": "撤销",
|
|
144
|
+
"font_class": "chexiao",
|
|
145
|
+
"unicode": "e623",
|
|
146
|
+
"unicode_decimal": 58915
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"icon_id": "35627214",
|
|
150
|
+
"name": "并行网关",
|
|
151
|
+
"font_class": "binghangwangguan",
|
|
152
|
+
"unicode": "e624",
|
|
153
|
+
"unicode_decimal": 58916
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"icon_id": "35627215",
|
|
157
|
+
"name": "保存",
|
|
158
|
+
"font_class": "baocun",
|
|
159
|
+
"unicode": "e626",
|
|
160
|
+
"unicode_decimal": 58918
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"icon_id": "35627216",
|
|
164
|
+
"name": "框选",
|
|
165
|
+
"font_class": "kuangxuan",
|
|
166
|
+
"unicode": "e627",
|
|
167
|
+
"unicode_decimal": 58919
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"icon_id": "35627217",
|
|
171
|
+
"name": "分支网关",
|
|
172
|
+
"font_class": "fenzhiwangguan",
|
|
173
|
+
"unicode": "e628",
|
|
174
|
+
"unicode_decimal": 58920
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"icon_id": "35627218",
|
|
178
|
+
"name": "预览",
|
|
179
|
+
"font_class": "yulan",
|
|
180
|
+
"unicode": "e629",
|
|
181
|
+
"unicode_decimal": 58921
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"icon_id": "35627219",
|
|
185
|
+
"name": "入口",
|
|
186
|
+
"font_class": "rukou",
|
|
187
|
+
"unicode": "e62a",
|
|
188
|
+
"unicode_decimal": 58922
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"icon_id": "35627220",
|
|
192
|
+
"name": "合并网关",
|
|
193
|
+
"font_class": "hebingwangguan",
|
|
194
|
+
"unicode": "e62b",
|
|
195
|
+
"unicode_decimal": 58923
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"icon_id": "35627221",
|
|
199
|
+
"name": "恢复",
|
|
200
|
+
"font_class": "huifu",
|
|
201
|
+
"unicode": "e62c",
|
|
202
|
+
"unicode_decimal": 58924
|
|
203
|
+
},
|
|
8
204
|
{
|
|
9
205
|
"icon_id": "34742144",
|
|
10
206
|
"name": "收起折叠(去边框)",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/assets/realUrl.js
CHANGED
package/src/components/.DS_Store
CHANGED
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import getWidth from '../../utils/asciiWidth.js'
|
|
3
|
+
const prefixClass = 'n20-advanced-filter-item'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: "FormItem",
|
|
7
|
+
props: {
|
|
8
|
+
label: {
|
|
9
|
+
type:String,
|
|
10
|
+
default: ''
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
prefixClass
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
width(){
|
|
20
|
+
return this._lang === 'zh'? this.label.length: getWidth(this.label)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div :class="prefixClass">
|
|
28
|
+
<div :class="prefixClass +'__name'">{{label}}</div>
|
|
29
|
+
<div :class="[prefixClass+ '__value']">
|
|
30
|
+
<slot></slot>
|
|
31
|
+
</div>
|
|
32
|
+
<i class="filter_remove n20-icon-yichu"></i>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<style lang="scss">
|
|
38
|
+
.n20-advanced-filter-item {
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -49,6 +49,9 @@ export default {
|
|
|
49
49
|
handleFilter() {
|
|
50
50
|
this.$emit('filter')
|
|
51
51
|
},
|
|
52
|
+
handleEnter() {
|
|
53
|
+
this.$emit('enter')
|
|
54
|
+
},
|
|
52
55
|
handleVisibleChange(value) {
|
|
53
56
|
if (!value) {
|
|
54
57
|
this.handleFilter()
|
|
@@ -77,7 +80,7 @@ export default {
|
|
|
77
80
|
},
|
|
78
81
|
render(h) {
|
|
79
82
|
const { item, form, context } = this
|
|
80
|
-
const MAX_WIDTH =
|
|
83
|
+
const MAX_WIDTH = 312
|
|
81
84
|
let elementDom = null
|
|
82
85
|
|
|
83
86
|
let typeEnum = (type) => {
|
|
@@ -103,7 +106,7 @@ export default {
|
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
|
|
106
|
-
let w = asciiWidth(item.placeholder || typeEnum(item.type)) +
|
|
109
|
+
let w = asciiWidth(item.placeholder || typeEnum(item.type)) + 34
|
|
107
110
|
if (/px$/.test(item.width)) {
|
|
108
111
|
w = item.width.replace(/px$/, '')
|
|
109
112
|
}
|
|
@@ -117,25 +120,40 @@ export default {
|
|
|
117
120
|
|
|
118
121
|
const calcWidth = (value, type) => {
|
|
119
122
|
let W = null
|
|
120
|
-
if (!value) {
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
+
if (!Array.isArray(value)) {
|
|
124
|
+
if (!value) {
|
|
125
|
+
if (type) {
|
|
126
|
+
return Number(w) + 104 + 'px'
|
|
127
|
+
}
|
|
128
|
+
return w + 'px'
|
|
123
129
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
if (getWidth(value, type) > w) {
|
|
131
|
+
if (getWidth(value, type) > MAX_WIDTH) {
|
|
132
|
+
W = MAX_WIDTH
|
|
133
|
+
} else {
|
|
134
|
+
W = getWidth(value, type)
|
|
135
|
+
}
|
|
129
136
|
} else {
|
|
130
|
-
|
|
137
|
+
if (type) {
|
|
138
|
+
W = w ? w : asciiWidth(item.placeholder || typeEnum[item.type]) + 150
|
|
139
|
+
} else {
|
|
140
|
+
W = w ? w : asciiWidth(item.placeholder || typeEnum[item.type]) + 40
|
|
141
|
+
}
|
|
131
142
|
}
|
|
132
143
|
} else {
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
144
|
+
if (!value[0] && !value[1]) {
|
|
145
|
+
return Number(w) + 110 + 'px'
|
|
146
|
+
}
|
|
147
|
+
let widthMax = getWidth(value[0]) + getWidth(value[1]) + 35
|
|
148
|
+
if (widthMax > w) {
|
|
149
|
+
if (widthMax > MAX_WIDTH) {
|
|
150
|
+
W = MAX_WIDTH
|
|
151
|
+
} else {
|
|
152
|
+
W = widthMax
|
|
153
|
+
}
|
|
137
154
|
}
|
|
138
155
|
}
|
|
156
|
+
|
|
139
157
|
return W + 'px'
|
|
140
158
|
}
|
|
141
159
|
|
|
@@ -166,7 +184,7 @@ export default {
|
|
|
166
184
|
const keyup = (ev) => {
|
|
167
185
|
if (ev.keyCode === 13) {
|
|
168
186
|
ev.target.blur()
|
|
169
|
-
this.
|
|
187
|
+
this.handleEnter()
|
|
170
188
|
}
|
|
171
189
|
}
|
|
172
190
|
|
|
@@ -178,7 +196,7 @@ export default {
|
|
|
178
196
|
{
|
|
179
197
|
attrs: {
|
|
180
198
|
style: {
|
|
181
|
-
width:
|
|
199
|
+
width:calcWidth(form[item.value])
|
|
182
200
|
},
|
|
183
201
|
ruleField: true,
|
|
184
202
|
'rule-form': 'ruleValidate',
|
|
@@ -338,7 +356,7 @@ export default {
|
|
|
338
356
|
ruleErrorHide: item.ruleErrorHide
|
|
339
357
|
},
|
|
340
358
|
style: {
|
|
341
|
-
width: calcWidth(form[item.startValue], true)
|
|
359
|
+
width: calcWidth([form[item.startValue], form[item.endValue]], true)
|
|
342
360
|
},
|
|
343
361
|
props: inputRangeProps,
|
|
344
362
|
on: {
|
|
@@ -365,13 +383,22 @@ export default {
|
|
|
365
383
|
const datePickerProps = {
|
|
366
384
|
value: form[item.value],
|
|
367
385
|
type: item.type,
|
|
386
|
+
'prefix-icon': (item.props && item.props.prefixIcon) ?? '',
|
|
368
387
|
clearable: (item.props && item.props.clearable) ?? true,
|
|
369
388
|
// 将 props 对象中的属性应用到 datePicker 上
|
|
370
389
|
...item.props
|
|
371
390
|
}
|
|
372
|
-
elementDom = h('
|
|
391
|
+
elementDom = h('el-date-picker', {
|
|
373
392
|
directives: [{ name: 'rule-key' }],
|
|
374
|
-
attrs: {
|
|
393
|
+
attrs: {
|
|
394
|
+
'rule-form': 'ruleValidate',
|
|
395
|
+
ruleField: true,
|
|
396
|
+
class: `n20-date-editor`,
|
|
397
|
+
'value-format': (item.props && item.props.valueFormat) ?? 'yyyy-MM-dd',
|
|
398
|
+
placeholder: (item.props && item.props.placeholder) ?? $lc('请选择'),
|
|
399
|
+
rules: item.rules,
|
|
400
|
+
ruleErrorHide: item.ruleErrorHide
|
|
401
|
+
},
|
|
375
402
|
style: {
|
|
376
403
|
width: calcWidth(form[item.value])
|
|
377
404
|
},
|
|
@@ -396,29 +423,33 @@ export default {
|
|
|
396
423
|
case 'monthrange':
|
|
397
424
|
const pickerProps = {
|
|
398
425
|
type: item.type,
|
|
399
|
-
startDate: form[item.startDate],
|
|
400
|
-
endDate: form[item.endDate],
|
|
426
|
+
startDate: form[item.startDate] || null,
|
|
427
|
+
endDate: form[item.endDate] || null,
|
|
428
|
+
rules: item.rules,
|
|
401
429
|
clearable: (item.props && item.props.clearable) ?? true,
|
|
402
430
|
...item.props
|
|
403
431
|
}
|
|
404
|
-
|
|
405
432
|
elementDom = h('datePickerPor', {
|
|
406
433
|
directives: [{ name: 'rule-key', value: 'startDate' }],
|
|
407
|
-
attrs: {
|
|
434
|
+
attrs: {
|
|
435
|
+
ruleField: true,
|
|
436
|
+
'rule-form': 'ruleValidate',
|
|
437
|
+
ruleErrorHide: item.ruleErrorHide,
|
|
438
|
+
rules: item.rules
|
|
439
|
+
},
|
|
408
440
|
props: pickerProps,
|
|
409
441
|
style: {
|
|
410
442
|
width: calcWidth(form[item.startDate], true)
|
|
411
443
|
},
|
|
412
444
|
on: {
|
|
445
|
+
'update:start-date': (val) => {
|
|
446
|
+
this.$set(form, item.startDate, val)
|
|
447
|
+
},
|
|
448
|
+
'update:end-date': (val) => {
|
|
449
|
+
this.$set(form, item.endDate, val)
|
|
450
|
+
},
|
|
413
451
|
clear: this.handleClear,
|
|
414
|
-
change: (
|
|
415
|
-
if (value) {
|
|
416
|
-
this.$set(form, item.startDate, value[0])
|
|
417
|
-
this.$set(form, item.endDate, value[1])
|
|
418
|
-
} else {
|
|
419
|
-
this.$set(form, item.startDate, null)
|
|
420
|
-
this.$set(form, item.endDate, null)
|
|
421
|
-
}
|
|
452
|
+
change: () => {
|
|
422
453
|
this.handleFilter()
|
|
423
454
|
}
|
|
424
455
|
},
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="prefixCls">
|
|
3
|
-
<
|
|
3
|
+
<div ref="advancedFilter" v-show="visible" :class="prefixCls + '-body'">
|
|
4
4
|
<slot name="prefix"></slot>
|
|
5
|
-
<
|
|
5
|
+
<FormItem
|
|
6
6
|
v-for="item in GroupData"
|
|
7
7
|
:key="getOnlyKey(item)"
|
|
8
|
-
:class="[
|
|
8
|
+
:class="[activeClass(item)]"
|
|
9
9
|
:label="item.label"
|
|
10
|
-
:required="item.required !== undefined ||
|
|
10
|
+
:required="item.required !== undefined || true ? item.required : false"
|
|
11
11
|
:disabled="item.props && item.props.disabled"
|
|
12
12
|
>
|
|
13
|
-
<div :class="prefixCls + '-content'">
|
|
14
13
|
<slot v-if="item.slotName" :name="item.slotName"></slot>
|
|
15
14
|
<formItemRender
|
|
16
15
|
v-else
|
|
@@ -18,36 +17,39 @@
|
|
|
18
17
|
:item="item"
|
|
19
18
|
@blur="$emit('blur')"
|
|
20
19
|
@clean="$emit('clean')"
|
|
20
|
+
@enter="$emit('enter')"
|
|
21
21
|
@filter="$emit('filter', model)"
|
|
22
22
|
/>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
v-if="!item.isDefault"
|
|
23
|
+
<!-- <i
|
|
24
|
+
v-if="!item.isNotClose"
|
|
26
25
|
:key="getOnlyKey(item)"
|
|
27
26
|
:class="[prefixCls + '-item-close', 'n20-icon-yichu']"
|
|
28
27
|
@click="handleClose(item)"
|
|
29
|
-
></i
|
|
30
|
-
</
|
|
28
|
+
></i>-->
|
|
29
|
+
</FormItem>
|
|
31
30
|
<slot name="suffix"></slot>
|
|
32
|
-
<
|
|
31
|
+
<div :class="prefixCls + '-add'">
|
|
33
32
|
<el-button v-popover:advanced_popover onlyicon plain icon="el-icon-plus" />
|
|
34
33
|
<el-popover ref="advanced_popover" placement="bottom-start" trigger="click">
|
|
35
34
|
<el-input v-model="keyword" clearable class="input-w m-b-s" :placeholder="$lc('搜索筛选条件')" />
|
|
36
35
|
<filterItem :filter-list="filterListS" :check-array.sync="checkList" @checked="check" />
|
|
37
36
|
</el-popover>
|
|
37
|
+
<el-link class="m-l-s f-s-s color-primary" :underline="false" icon="n20-icon-query" @click="$emit('search')">
|
|
38
|
+
{{ '查询' | $lc }}</el-link
|
|
39
|
+
>
|
|
38
40
|
<el-link class="m-l-s f-s-s" :underline="false" icon="n20-icon-qingchu" @click="cleared">
|
|
39
|
-
{{ '
|
|
41
|
+
{{ '清空' | $lc }}</el-link
|
|
40
42
|
>
|
|
41
|
-
</
|
|
42
|
-
</
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
43
45
|
</div>
|
|
44
46
|
</template>
|
|
45
47
|
|
|
46
48
|
<script>
|
|
47
|
-
// import formItemInput from './form-item-input.vue'
|
|
48
49
|
import formItemRender from './formItemRender.vue'
|
|
49
50
|
import InputSearch from '../InputSearch/index.vue'
|
|
50
51
|
import filterItem from './filterItem.vue'
|
|
52
|
+
import FormItem from './FormItem.vue'
|
|
51
53
|
import axios from '../../utils/axios.js'
|
|
52
54
|
import { $lc } from '../../utils/i18n/index.js'
|
|
53
55
|
import cloneDeep from 'lodash/cloneDeep'
|
|
@@ -60,9 +62,14 @@ export default {
|
|
|
60
62
|
// formItemInput,
|
|
61
63
|
formItemRender,
|
|
62
64
|
InputSearch,
|
|
63
|
-
filterItem
|
|
65
|
+
filterItem,
|
|
66
|
+
FormItem
|
|
64
67
|
},
|
|
65
68
|
props: {
|
|
69
|
+
isNotClose: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false
|
|
72
|
+
},
|
|
66
73
|
visible: {
|
|
67
74
|
type: Boolean,
|
|
68
75
|
default: false
|
|
@@ -157,7 +164,13 @@ export default {
|
|
|
157
164
|
let flag = ''
|
|
158
165
|
switch (item.type) {
|
|
159
166
|
case 'numberrange':
|
|
160
|
-
flag =
|
|
167
|
+
flag =
|
|
168
|
+
this.model[item.startValue] !== null &&
|
|
169
|
+
this.model[item.endValue] !== null &&
|
|
170
|
+
this.model[item.startValue] !== undefined &&
|
|
171
|
+
this.model[item.endValue] !== undefined
|
|
172
|
+
? this.prefixCls + '-active'
|
|
173
|
+
: ''
|
|
161
174
|
break
|
|
162
175
|
case 'daterange':
|
|
163
176
|
case 'datetimerange':
|
|
@@ -219,7 +232,27 @@ export default {
|
|
|
219
232
|
cleared() {
|
|
220
233
|
this.$emit('clear')
|
|
221
234
|
},
|
|
222
|
-
|
|
235
|
+
setModelData(list) {
|
|
236
|
+
let arr = []
|
|
237
|
+
list.forEach((res) => {
|
|
238
|
+
if (res.value) {
|
|
239
|
+
arr.push(res.value)
|
|
240
|
+
} else if (res.startDate && res.endDate) {
|
|
241
|
+
arr.push(res.startDate)
|
|
242
|
+
arr.push(res.endDate)
|
|
243
|
+
} else if (res.startValue && res.endValue) {
|
|
244
|
+
arr.push(res.startValue)
|
|
245
|
+
arr.push(res.endValue)
|
|
246
|
+
}
|
|
247
|
+
})
|
|
248
|
+
for (const key in this.model) {
|
|
249
|
+
if (Object.hasOwnProperty.call(this.model, key)) {
|
|
250
|
+
if (!arr.includes(key)) {
|
|
251
|
+
delete this.model[key]
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
223
256
|
check: _debounce(function (keys) {
|
|
224
257
|
// 保存当前选择的过滤条件
|
|
225
258
|
this.checkList = keys
|
|
@@ -232,6 +265,7 @@ export default {
|
|
|
232
265
|
}
|
|
233
266
|
})
|
|
234
267
|
}
|
|
268
|
+
this.setModelData(saveCheckArr)
|
|
235
269
|
this.saveFilter(saveCheckArr).then(({ code }) => {
|
|
236
270
|
// 如果保存成功
|
|
237
271
|
if (code === 200) {
|
|
@@ -240,7 +274,6 @@ export default {
|
|
|
240
274
|
}
|
|
241
275
|
})
|
|
242
276
|
this.$emit('check')
|
|
243
|
-
// // 保存过滤条件
|
|
244
277
|
}, 1000),
|
|
245
278
|
/**
|
|
246
279
|
* 保存筛选条件
|
|
@@ -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>
|