eoss-ui 0.7.56 → 0.7.58
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/lib/calogin.js +233 -233
- package/lib/eoss-ui.common.js +842 -820
- package/lib/flow-group.js +17 -4
- package/lib/flow-list.js +81 -81
- package/lib/flow.js +308 -303
- package/lib/index.js +1 -1
- package/lib/main.js +179 -175
- package/lib/qr-code.js +13 -13
- package/package.json +160 -160
- package/packages/button/index.js +5 -5
- package/packages/button/src/main.vue +418 -418
- package/packages/button-group/index.js +5 -5
- package/packages/button-group/src/main.vue +346 -346
- package/packages/calendar/index.js +5 -5
- package/packages/calogin/index.js +5 -5
- package/packages/calogin/src/main.vue +412 -412
- package/packages/calogin/src/plugin.js +915 -915
- package/packages/card/index.js +5 -5
- package/packages/card/src/main.vue +156 -156
- package/packages/cascader/index.js +5 -5
- package/packages/cascader/src/main.vue +168 -168
- package/packages/checkbox-group/index.js +5 -5
- package/packages/checkbox-group/src/main.vue +333 -333
- package/packages/clients/index.js +5 -5
- package/packages/clients/src/main.vue +151 -151
- package/packages/data-table/index.js +5 -5
- package/packages/data-table/src/children.vue +39 -39
- package/packages/data-table/src/column.vue +992 -992
- package/packages/data-table/src/main.vue +1840 -1840
- package/packages/data-table/src/sizer.vue +195 -195
- package/packages/data-table-form/index.js +5 -5
- package/packages/data-table-form/src/checkbox.vue +101 -101
- package/packages/data-table-form/src/colgroup.vue +17 -17
- package/packages/data-table-form/src/main.vue +181 -181
- package/packages/data-table-form/src/radio.vue +65 -65
- package/packages/data-table-form/src/table.vue +233 -233
- package/packages/data-table-form/src/tbody.vue +336 -336
- package/packages/data-table-form/src/thead.vue +68 -68
- package/packages/date-picker/index.js +5 -5
- package/packages/date-picker/src/main.vue +236 -236
- package/packages/dialog/index.js +5 -5
- package/packages/enable-drag/index.js +5 -5
- package/packages/enterprise/index.js +5 -5
- package/packages/enterprise/src/main.vue +66 -66
- package/packages/error-page/index.js +5 -5
- package/packages/error-page/src/main.vue +44 -44
- package/packages/flow/index.js +5 -5
- package/packages/flow/src/component/Circulate.vue +413 -413
- package/packages/flow/src/component/CommonOpinions.vue +374 -373
- package/packages/flow/src/component/CustomPreset.vue +322 -322
- package/packages/flow/src/component/FileList.vue +97 -97
- package/packages/flow/src/component/FreeCirculation.vue +241 -241
- package/packages/flow/src/component/Preset.vue +255 -255
- package/packages/flow/src/component/SendMsg.vue +242 -242
- package/packages/flow/src/component/TimeLimit.vue +190 -190
- package/packages/flow/src/component/taskUnionExamine.vue +756 -756
- package/packages/flow/src/form.vue +123 -121
- package/packages/flow/src/freeStartFlow.vue +2846 -2846
- package/packages/flow/src/main.vue +3878 -3878
- package/packages/flow/src/processForm.vue +1365 -1365
- package/packages/flow/src/processReject.vue +309 -309
- package/packages/flow/src/reset.vue +942 -942
- package/packages/flow/src/startTaskRead.vue +693 -692
- package/packages/flow/src/supervise.vue +159 -159
- package/packages/flow/src/table.vue +58 -58
- package/packages/flow-group/index.js +5 -5
- package/packages/flow-group/src/main.vue +732 -717
- package/packages/flow-list/index.js +5 -5
- package/packages/flow-list/src/main.vue +1801 -1801
- package/packages/form/index.js +5 -5
- package/packages/form/src/main.vue +3901 -3901
- package/packages/form/src/table.vue +1512 -1512
- package/packages/handle-user/index.js +5 -5
- package/packages/handle-user/src/main.vue +137 -137
- package/packages/handler/index.js +5 -5
- package/packages/handler/src/main.vue +496 -496
- package/packages/icon/index.js +5 -5
- package/packages/icon/src/main.vue +104 -104
- package/packages/icons/index.js +5 -5
- package/packages/icons/src/main.vue +81 -81
- package/packages/input/index.js +5 -5
- package/packages/input/src/main.vue +356 -356
- package/packages/input-number/index.js +5 -5
- package/packages/input-number/src/main.vue +106 -106
- package/packages/label/index.js +5 -5
- package/packages/label/src/main.vue +457 -457
- package/packages/layout/index.js +5 -5
- package/packages/layout/src/item.vue +152 -152
- package/packages/layout/src/main.vue +31 -31
- package/packages/login/index.js +5 -5
- package/packages/login/src/main.vue +2082 -2082
- package/packages/login/src/resetPassword.vue +557 -557
- package/packages/main/index.js +5 -5
- package/packages/main/src/default/message.vue +249 -249
- package/packages/main/src/default/notice.vue +157 -157
- package/packages/main/src/default/userinfo.vue +503 -503
- package/packages/main/src/main.vue +2 -2
- package/packages/main/src/public/online.vue +89 -89
- package/packages/main/src/public/search.vue +464 -464
- package/packages/main/src/public/settings.vue +227 -227
- package/packages/main/src/simplicity/apps.vue +388 -388
- package/packages/main/src/simplicity/avatar.vue +82 -82
- package/packages/main/src/simplicity/handler.vue +160 -160
- package/packages/main/src/simplicity/index.vue +2305 -2307
- package/packages/main/src/simplicity/lists.vue +84 -84
- package/packages/main/src/simplicity/menu-list.vue +135 -135
- package/packages/main/src/simplicity/message.vue +293 -293
- package/packages/main/src/simplicity/notice.vue +222 -222
- package/packages/main/src/simplicity/router-page.vue +45 -45
- package/packages/main/src/simplicity/sub-menu.vue +274 -274
- package/packages/main/src/simplicity/user.vue +259 -259
- package/packages/main/src/simplicity/userinfo.vue +401 -401
- package/packages/menu/index.js +5 -5
- package/packages/menu/src/main.vue +595 -595
- package/packages/nav/index.js +5 -5
- package/packages/nav/src/main.vue +351 -351
- package/packages/notify/index.js +5 -5
- package/packages/notify/src/main.vue +538 -538
- package/packages/page/index.js +5 -5
- package/packages/page/src/main.vue +167 -167
- package/packages/pagination/index.js +5 -5
- package/packages/pagination/src/main.vue +96 -96
- package/packages/player/index.js +5 -5
- package/packages/player/src/main.vue +194 -194
- package/packages/qr-code/index.js +5 -5
- package/packages/qr-code/src/main.vue +170 -170
- package/packages/radio-group/index.js +6 -6
- package/packages/radio-group/src/main.vue +319 -319
- package/packages/retrial-auth/index.js +5 -5
- package/packages/retrial-auth/src/main.vue +280 -280
- package/packages/select/index.js +5 -5
- package/packages/select/src/main.vue +782 -782
- package/packages/select-ganged/index.js +5 -5
- package/packages/select-ganged/src/main.vue +724 -724
- package/packages/selector/index.js +5 -5
- package/packages/selector/src/main.vue +761 -761
- package/packages/selector-panel/index.js +5 -5
- package/packages/selector-panel/src/main.vue +1027 -1027
- package/packages/selector-panel/src/selection.vue +170 -170
- package/packages/selector-panel/src/tree.vue +129 -129
- package/packages/sizer/index.js +5 -5
- package/packages/sizer/src/main.vue +254 -254
- package/packages/steps/index.js +5 -5
- package/packages/steps/src/main.vue +181 -181
- package/packages/switch/index.js +5 -5
- package/packages/switch/src/main.vue +170 -170
- package/packages/table-form/index.js +5 -5
- package/packages/tabs/index.js +5 -5
- package/packages/tabs/src/main.vue +788 -788
- package/packages/tabs-panel/index.js +5 -5
- package/packages/tabs-panel/src/main.vue +29 -29
- package/packages/theme-chalk/src/base.scss +261 -261
- package/packages/theme-chalk/src/button-group.scss +176 -176
- package/packages/theme-chalk/src/button.scss +24 -24
- package/packages/theme-chalk/src/calendar.scss +113 -113
- package/packages/theme-chalk/src/card.scss +99 -99
- package/packages/theme-chalk/src/checkbox-group.scss +8 -8
- package/packages/theme-chalk/src/clients.scss +87 -87
- package/packages/theme-chalk/src/data-table-form.scss +67 -67
- package/packages/theme-chalk/src/data-table.scss +297 -297
- package/packages/theme-chalk/src/date-picker.scss +7 -7
- package/packages/theme-chalk/src/dialog.scss +77 -77
- package/packages/theme-chalk/src/enable-drag.scss +181 -181
- package/packages/theme-chalk/src/enterprise.scss +5 -5
- package/packages/theme-chalk/src/error-page.scss +18 -18
- package/packages/theme-chalk/src/flow-group.scss +110 -110
- package/packages/theme-chalk/src/flow-list.scss +39 -39
- package/packages/theme-chalk/src/flow.scss +351 -351
- package/packages/theme-chalk/src/form.scss +501 -501
- package/packages/theme-chalk/src/handle-user.scss +40 -40
- package/packages/theme-chalk/src/handler.scss +148 -148
- package/packages/theme-chalk/src/icon.scss +1608 -1608
- package/packages/theme-chalk/src/icons.scss +99 -99
- package/packages/theme-chalk/src/input.scss +9 -9
- package/packages/theme-chalk/src/label.scss +24 -24
- package/packages/theme-chalk/src/layout.scss +46 -46
- package/packages/theme-chalk/src/login.scss +1006 -1006
- package/packages/theme-chalk/src/main.scss +663 -663
- package/packages/theme-chalk/src/menu.scss +224 -224
- package/packages/theme-chalk/src/mixins/color.scss +117 -117
- package/packages/theme-chalk/src/nav.scss +111 -111
- package/packages/theme-chalk/src/page.scss +3 -3
- package/packages/theme-chalk/src/pagination.scss +29 -29
- package/packages/theme-chalk/src/player.scss +9 -9
- package/packages/theme-chalk/src/qr-code.scss +17 -17
- package/packages/theme-chalk/src/radio-group.scss +9 -9
- package/packages/theme-chalk/src/retrial-auth.scss +38 -38
- package/packages/theme-chalk/src/select-ganged.scss +8 -8
- package/packages/theme-chalk/src/select.scss +8 -8
- package/packages/theme-chalk/src/selector-panel.scss +204 -204
- package/packages/theme-chalk/src/selector.scss +114 -114
- package/packages/theme-chalk/src/simplicity.scss +1403 -1403
- package/packages/theme-chalk/src/sizer.scss +36 -36
- package/packages/theme-chalk/src/steps.scss +88 -88
- package/packages/theme-chalk/src/switch.scss +3 -3
- package/packages/theme-chalk/src/table-form.scss +1 -1
- package/packages/theme-chalk/src/tabs.scss +87 -87
- package/packages/theme-chalk/src/tips.scss +7 -7
- package/packages/theme-chalk/src/toolbar.scss +179 -179
- package/packages/theme-chalk/src/tree-group.scss +72 -72
- package/packages/theme-chalk/src/tree.scss +165 -165
- package/packages/theme-chalk/src/upload.scss +172 -172
- package/packages/theme-chalk/src/wxlogin.scss +3 -3
- package/packages/tips/index.js +5 -5
- package/packages/tips/src/main.vue +141 -141
- package/packages/toolbar/index.js +5 -5
- package/packages/toolbar/src/main.vue +430 -430
- package/packages/tree/index.js +5 -5
- package/packages/tree-group/index.js +5 -5
- package/packages/upload/index.js +5 -5
- package/packages/upload/src/main.vue +1344 -1344
- package/packages/upload/src/picture.js +15 -15
- package/packages/wujie/index.js +5 -5
- package/packages/wujie/src/main.vue +145 -145
- package/packages/wxlogin/index.js +5 -5
- package/packages/wxlogin/src/main.vue +128 -128
- package/src/config/api.js +317 -317
- package/src/config/image.js +2 -2
- package/src/index.js +163 -163
- package/src/utils/bus.js +3 -3
- package/src/utils/date-util.js +312 -312
- package/src/utils/http.js +50 -50
- package/src/utils/rules.js +18 -18
- package/src/utils/store.js +21 -21
- package/src/utils/webSocket.js +107 -107
- package/packages/.DS_Store +0 -0
- package/packages/calogin/.DS_Store +0 -0
- package/packages/date-picker/.DS_Store +0 -0
- package/packages/date-picker/src/.DS_Store +0 -0
- package/packages/dialog/.DS_Store +0 -0
- package/packages/flow/.DS_Store +0 -0
- package/packages/flow/src/.DS_Store +0 -0
- package/packages/flow-list/.DS_Store +0 -0
- package/packages/form/.DS_Store +0 -0
- package/packages/icon/.DS_Store +0 -0
- package/packages/login/.DS_Store +0 -0
- package/packages/main/.DS_Store +0 -0
- package/packages/main/src/.DS_Store +0 -0
- package/packages/menu/.DS_Store +0 -0
- package/packages/select/.DS_Store +0 -0
- package/packages/selector/.DS_Store +0 -0
- package/packages/selector-panel/.DS_Store +0 -0
- package/packages/theme-chalk/src/.DS_Store +0 -0
- package/packages/upload/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
- package/src/utils/.DS_Store +0 -0
|
@@ -1,992 +1,992 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-table-column v-bind="config" :key="field">
|
|
3
|
-
<slot> </slot>
|
|
4
|
-
<template slot-scope="scope">
|
|
5
|
-
<template v-if="isForm && !isReadOnly(scope)">
|
|
6
|
-
<el-form-item
|
|
7
|
-
v-if="!(type === 'handle' && !scope.row.hideHandle)"
|
|
8
|
-
:name="name"
|
|
9
|
-
:prop="field || prop"
|
|
10
|
-
:rules="isNotRule(scope) ? [] : rules"
|
|
11
|
-
:index="scope.$index"
|
|
12
|
-
>
|
|
13
|
-
<component
|
|
14
|
-
v-if="getType(scope.row.formConfigs, 'component')"
|
|
15
|
-
:is="tag"
|
|
16
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
17
|
-
v-model="scope.row[field || prop]"
|
|
18
|
-
:data="getData(scope.row.formOptions)"
|
|
19
|
-
@blur="
|
|
20
|
-
(event) => {
|
|
21
|
-
handleBlur({
|
|
22
|
-
item: config,
|
|
23
|
-
event: event,
|
|
24
|
-
data: scope.row,
|
|
25
|
-
scope: scope
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
"
|
|
29
|
-
@focus="
|
|
30
|
-
(event) => {
|
|
31
|
-
handleFocus({
|
|
32
|
-
item: config,
|
|
33
|
-
event: event,
|
|
34
|
-
data: scope.row,
|
|
35
|
-
scope: scope
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
"
|
|
39
|
-
@change="
|
|
40
|
-
(value) => {
|
|
41
|
-
handleChange({
|
|
42
|
-
item: config,
|
|
43
|
-
name: field || prop,
|
|
44
|
-
value: value,
|
|
45
|
-
data: scope.row,
|
|
46
|
-
scope: scope
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
"
|
|
50
|
-
></component>
|
|
51
|
-
<es-select
|
|
52
|
-
v-else-if="getType(scope.row.formConfigs, 'select')"
|
|
53
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
54
|
-
v-model="scope.row[field || prop]"
|
|
55
|
-
:data="getData(scope.row.formOptions)"
|
|
56
|
-
@blur="
|
|
57
|
-
(event) => {
|
|
58
|
-
handleBlur({
|
|
59
|
-
item: config,
|
|
60
|
-
event: event,
|
|
61
|
-
data: scope.row,
|
|
62
|
-
scope: scope
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
"
|
|
66
|
-
@focus="
|
|
67
|
-
(event) => {
|
|
68
|
-
handleFocus({
|
|
69
|
-
item: config,
|
|
70
|
-
event: event,
|
|
71
|
-
data: scope.row,
|
|
72
|
-
scope: scope
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
"
|
|
76
|
-
@change="
|
|
77
|
-
(value) => {
|
|
78
|
-
handleChange({
|
|
79
|
-
item: config,
|
|
80
|
-
name: field || prop,
|
|
81
|
-
value: value,
|
|
82
|
-
data: scope.row,
|
|
83
|
-
scope: scope
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
"
|
|
87
|
-
>
|
|
88
|
-
</es-select>
|
|
89
|
-
<es-cascader
|
|
90
|
-
v-else-if="getType(scope.row.formConfigs, 'cascader')"
|
|
91
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
92
|
-
v-model="scope.row[field || prop]"
|
|
93
|
-
:data="getData(scope.row.formOptions)"
|
|
94
|
-
@blur="
|
|
95
|
-
(event) => {
|
|
96
|
-
handleBlur({
|
|
97
|
-
item: config,
|
|
98
|
-
event: event,
|
|
99
|
-
data: scope.row,
|
|
100
|
-
scope: scope
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
"
|
|
104
|
-
@focus="
|
|
105
|
-
(event) => {
|
|
106
|
-
handleFocus({
|
|
107
|
-
item: config,
|
|
108
|
-
event: event,
|
|
109
|
-
data: scope.row,
|
|
110
|
-
scope: scope
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
"
|
|
114
|
-
@change="
|
|
115
|
-
(value) => {
|
|
116
|
-
handleChange({
|
|
117
|
-
item: config,
|
|
118
|
-
name: field || prop,
|
|
119
|
-
value: value,
|
|
120
|
-
data: scope.row,
|
|
121
|
-
scope: scope
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
"
|
|
125
|
-
>
|
|
126
|
-
</es-cascader>
|
|
127
|
-
<es-select-ganged
|
|
128
|
-
v-else-if="getType(scope.row.formConfigs, 'ganged')"
|
|
129
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
130
|
-
v-model="scope.row[field || prop]"
|
|
131
|
-
:data="init(getData(scope.row.formOptions), config)"
|
|
132
|
-
@change="
|
|
133
|
-
(value) => {
|
|
134
|
-
handleChange({
|
|
135
|
-
name: field || prop,
|
|
136
|
-
value: value,
|
|
137
|
-
data: scope.row,
|
|
138
|
-
item: item
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
"
|
|
142
|
-
>
|
|
143
|
-
</es-select-ganged>
|
|
144
|
-
<es-radio-group
|
|
145
|
-
v-else-if="getType(scope.row.formConfigs, 'radio')"
|
|
146
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
147
|
-
v-model="scope.row[field || prop]"
|
|
148
|
-
:data="getData(scope.row.formOptions)"
|
|
149
|
-
@change="
|
|
150
|
-
(value) => {
|
|
151
|
-
handleChange({
|
|
152
|
-
item: config,
|
|
153
|
-
name: field || prop,
|
|
154
|
-
value: value,
|
|
155
|
-
data: scope.row
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
"
|
|
159
|
-
>
|
|
160
|
-
</es-radio-group>
|
|
161
|
-
<es-checkbox-group
|
|
162
|
-
v-else-if="getType(scope.row.formConfigs, 'checkbox')"
|
|
163
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
164
|
-
v-model="scope.row[field || prop]"
|
|
165
|
-
:data="getData(scope.row.formOptions)"
|
|
166
|
-
@change="
|
|
167
|
-
(value) => {
|
|
168
|
-
handleChange({
|
|
169
|
-
item: config,
|
|
170
|
-
name: field || prop,
|
|
171
|
-
value: value,
|
|
172
|
-
data: scope.row
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
"
|
|
176
|
-
>
|
|
177
|
-
</es-checkbox-group>
|
|
178
|
-
<es-switch
|
|
179
|
-
v-else-if="getType(scope.row.formConfigs, 'switch')"
|
|
180
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
181
|
-
v-model="scope.row[field || prop]"
|
|
182
|
-
:data="getData(scope.row.formOptions)"
|
|
183
|
-
@change="
|
|
184
|
-
(value) => {
|
|
185
|
-
handleChange({
|
|
186
|
-
item: config,
|
|
187
|
-
name: field || prop,
|
|
188
|
-
value: value,
|
|
189
|
-
data: scope.row
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
"
|
|
193
|
-
>
|
|
194
|
-
</es-switch>
|
|
195
|
-
<es-date-picker
|
|
196
|
-
v-else-if="
|
|
197
|
-
config.date ||
|
|
198
|
-
getType(scope.row.formConfigs, [
|
|
199
|
-
'date',
|
|
200
|
-
'year',
|
|
201
|
-
'month',
|
|
202
|
-
'date',
|
|
203
|
-
'dates',
|
|
204
|
-
'week',
|
|
205
|
-
'datetime',
|
|
206
|
-
'datetimerange',
|
|
207
|
-
'daterange',
|
|
208
|
-
'monthrange',
|
|
209
|
-
'quarter',
|
|
210
|
-
'halfyear'
|
|
211
|
-
])
|
|
212
|
-
"
|
|
213
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
214
|
-
v-model="scope.row[field || prop]"
|
|
215
|
-
:type="type"
|
|
216
|
-
@blur="
|
|
217
|
-
(event) => {
|
|
218
|
-
handleBlur({
|
|
219
|
-
item: config,
|
|
220
|
-
event: event,
|
|
221
|
-
data: scope.row,
|
|
222
|
-
scope: scope
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
"
|
|
226
|
-
@focus="
|
|
227
|
-
(event) => {
|
|
228
|
-
handleFocus({
|
|
229
|
-
item: config,
|
|
230
|
-
event: event,
|
|
231
|
-
data: scope.row,
|
|
232
|
-
scope: scope
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
"
|
|
236
|
-
@change="
|
|
237
|
-
(value) => {
|
|
238
|
-
handleChange({
|
|
239
|
-
item: config,
|
|
240
|
-
name: field || prop,
|
|
241
|
-
value: value,
|
|
242
|
-
data: scope.row,
|
|
243
|
-
scope: scope
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
"
|
|
247
|
-
>
|
|
248
|
-
</es-date-picker>
|
|
249
|
-
<es-input-number
|
|
250
|
-
v-else-if="getType(scope.row.formConfigs, 'number')"
|
|
251
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
252
|
-
v-model="scope.row[field || prop]"
|
|
253
|
-
@blur="
|
|
254
|
-
(event) => {
|
|
255
|
-
handleBlur({
|
|
256
|
-
item: config,
|
|
257
|
-
event: event,
|
|
258
|
-
data: scope.row,
|
|
259
|
-
scope: scope
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
"
|
|
263
|
-
@focus="
|
|
264
|
-
(event) => {
|
|
265
|
-
handleFocus({
|
|
266
|
-
item: config,
|
|
267
|
-
event: event,
|
|
268
|
-
data: scope.row,
|
|
269
|
-
scope: scope
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
"
|
|
273
|
-
@change="
|
|
274
|
-
(value) => {
|
|
275
|
-
handleChange({
|
|
276
|
-
item: config,
|
|
277
|
-
name: field || prop,
|
|
278
|
-
value: value,
|
|
279
|
-
data: scope.row,
|
|
280
|
-
scope: scope
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
"
|
|
284
|
-
>
|
|
285
|
-
</es-input-number>
|
|
286
|
-
<es-selector
|
|
287
|
-
v-else-if="getType(scope.row.formConfigs, 'selector')"
|
|
288
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
289
|
-
v-model="scope.row[field || prop]"
|
|
290
|
-
v-on="
|
|
291
|
-
exclAttribute({
|
|
292
|
-
data: events,
|
|
293
|
-
attrs: 'change'
|
|
294
|
-
})
|
|
295
|
-
"
|
|
296
|
-
@change="
|
|
297
|
-
(value) => {
|
|
298
|
-
handleChange({
|
|
299
|
-
item: config,
|
|
300
|
-
name: field || prop,
|
|
301
|
-
value: value,
|
|
302
|
-
data: scope.row
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
"
|
|
306
|
-
>
|
|
307
|
-
</es-selector>
|
|
308
|
-
<template
|
|
309
|
-
v-else-if="
|
|
310
|
-
getType(scope.row.formConfigs, ['text', 'input', 'textarea'])
|
|
311
|
-
"
|
|
312
|
-
>
|
|
313
|
-
<template v-if="config.lazy">
|
|
314
|
-
<input
|
|
315
|
-
v-if="getType(scope.row.formConfigs, ['text', 'input'])"
|
|
316
|
-
class="el-input__inner"
|
|
317
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
318
|
-
v-model.lazy="scope.row[field]"
|
|
319
|
-
@blur="
|
|
320
|
-
(event) => {
|
|
321
|
-
handleBlur({
|
|
322
|
-
item: config,
|
|
323
|
-
event: event,
|
|
324
|
-
data: scope.row,
|
|
325
|
-
scope: scope
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
"
|
|
329
|
-
@focus="
|
|
330
|
-
(event) => {
|
|
331
|
-
handleFocus({
|
|
332
|
-
item: config,
|
|
333
|
-
event: event,
|
|
334
|
-
data: scope.row,
|
|
335
|
-
scope: scope
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
"
|
|
339
|
-
@change="
|
|
340
|
-
(value) => {
|
|
341
|
-
handleChange({
|
|
342
|
-
item: config,
|
|
343
|
-
name: field || prop,
|
|
344
|
-
value: value,
|
|
345
|
-
data: scope.row,
|
|
346
|
-
scope: scope
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
"
|
|
350
|
-
/>
|
|
351
|
-
<textarea
|
|
352
|
-
v-else
|
|
353
|
-
class="el-textarea__inner"
|
|
354
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
355
|
-
v-model.lazy="scope.row[field]"
|
|
356
|
-
@blur="
|
|
357
|
-
(event) => {
|
|
358
|
-
handleBlur({
|
|
359
|
-
item: config,
|
|
360
|
-
event: event,
|
|
361
|
-
data: scope.row,
|
|
362
|
-
scope: scope
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
"
|
|
366
|
-
@focus="
|
|
367
|
-
(event) => {
|
|
368
|
-
handleFocus({
|
|
369
|
-
item: config,
|
|
370
|
-
event: event,
|
|
371
|
-
data: scope.row,
|
|
372
|
-
scope: scope
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
"
|
|
376
|
-
@change="
|
|
377
|
-
(value) => {
|
|
378
|
-
handleChange({
|
|
379
|
-
item: config,
|
|
380
|
-
name: field || prop,
|
|
381
|
-
value: value,
|
|
382
|
-
data: scope.row,
|
|
383
|
-
scope: scope
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
"
|
|
387
|
-
></textarea>
|
|
388
|
-
</template>
|
|
389
|
-
<es-input
|
|
390
|
-
v-else
|
|
391
|
-
v-bind="getOptions(scope.row.formConfigs)"
|
|
392
|
-
:type="type"
|
|
393
|
-
:scope="scope"
|
|
394
|
-
v-model="scope.row[field || prop]"
|
|
395
|
-
@blur="
|
|
396
|
-
(event) => {
|
|
397
|
-
handleBlur({
|
|
398
|
-
item: config,
|
|
399
|
-
event: event,
|
|
400
|
-
data: scope.row,
|
|
401
|
-
scope: scope
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
"
|
|
405
|
-
@focus="
|
|
406
|
-
(event) => {
|
|
407
|
-
handleFocus({
|
|
408
|
-
item: config,
|
|
409
|
-
event: event,
|
|
410
|
-
data: scope.row,
|
|
411
|
-
scope: scope
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
"
|
|
415
|
-
@change="
|
|
416
|
-
(value) => {
|
|
417
|
-
handleChange({
|
|
418
|
-
item: config,
|
|
419
|
-
name: field || prop,
|
|
420
|
-
value: value,
|
|
421
|
-
data: scope.row,
|
|
422
|
-
scope: scope
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
"
|
|
426
|
-
>
|
|
427
|
-
</es-input>
|
|
428
|
-
</template>
|
|
429
|
-
</el-form-item>
|
|
430
|
-
</template>
|
|
431
|
-
<expand-dom
|
|
432
|
-
v-else-if="render"
|
|
433
|
-
:column="config"
|
|
434
|
-
:row="scope.row"
|
|
435
|
-
:render="render"
|
|
436
|
-
:index="indexs"
|
|
437
|
-
:options="optionDatas"
|
|
438
|
-
>
|
|
439
|
-
</expand-dom>
|
|
440
|
-
<template v-else-if="dateFormat">
|
|
441
|
-
{{ formatDate(scope.row[field || prop], dateFormat) }}
|
|
442
|
-
</template>
|
|
443
|
-
<span
|
|
444
|
-
v-else-if="type === 'textarea'"
|
|
445
|
-
v-html="format(scope.row, true)"
|
|
446
|
-
:style="styles ? styles[scope.row[prop]] : {}"
|
|
447
|
-
></span>
|
|
448
|
-
<span
|
|
449
|
-
v-else
|
|
450
|
-
:style="styles ? styles[scope.row[prop]] : {}"
|
|
451
|
-
v-html="format(scope.row)"
|
|
452
|
-
></span>
|
|
453
|
-
<!-- {{ format(scope.row) }} -->
|
|
454
|
-
<es-button-group
|
|
455
|
-
v-if="type === 'handle' && !scope.row.hideHandle"
|
|
456
|
-
v-bind="
|
|
457
|
-
exclAttribute({
|
|
458
|
-
data: config,
|
|
459
|
-
attrs: ['contents', 'events', 'type', 'width', 'template', 'title']
|
|
460
|
-
})
|
|
461
|
-
"
|
|
462
|
-
stop
|
|
463
|
-
:mode="mode"
|
|
464
|
-
:contents="contents || events"
|
|
465
|
-
:data="scope"
|
|
466
|
-
@handleClick="handleClick"
|
|
467
|
-
v-model="btnWidth"
|
|
468
|
-
></es-button-group>
|
|
469
|
-
</template>
|
|
470
|
-
</el-table-column>
|
|
471
|
-
</template>
|
|
472
|
-
|
|
473
|
-
<script type="text/babel">
|
|
474
|
-
import { findSysCode, getDictList } from 'eoss-ui/src/config/api.js';
|
|
475
|
-
import util from 'eoss-ui/src/utils/util';
|
|
476
|
-
export default {
|
|
477
|
-
name: 'Column',
|
|
478
|
-
components: {
|
|
479
|
-
expandDom: {
|
|
480
|
-
functional: true,
|
|
481
|
-
props: {
|
|
482
|
-
row: Object,
|
|
483
|
-
render: [Function, String],
|
|
484
|
-
index: Number,
|
|
485
|
-
column: {
|
|
486
|
-
type: Object,
|
|
487
|
-
default: null
|
|
488
|
-
},
|
|
489
|
-
options: Object
|
|
490
|
-
},
|
|
491
|
-
render: (h, ctx) => {
|
|
492
|
-
const params = {
|
|
493
|
-
row: ctx.props.row,
|
|
494
|
-
index: ctx.props.index
|
|
495
|
-
};
|
|
496
|
-
if (ctx.props.column) {
|
|
497
|
-
params.column = ctx.props.column;
|
|
498
|
-
}
|
|
499
|
-
if (typeof ctx.props.render == 'string') {
|
|
500
|
-
try {
|
|
501
|
-
return util.toFunction(ctx.props.render)(
|
|
502
|
-
h,
|
|
503
|
-
params,
|
|
504
|
-
ctx.props.options
|
|
505
|
-
);
|
|
506
|
-
} catch (error) {
|
|
507
|
-
throw error;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
return ctx.props.render(h, params, ctx.props.options);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
|
-
inject: {
|
|
515
|
-
elForm: {
|
|
516
|
-
default: ''
|
|
517
|
-
},
|
|
518
|
-
tableReload: {
|
|
519
|
-
default: ''
|
|
520
|
-
},
|
|
521
|
-
table: {
|
|
522
|
-
default: ''
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
props: {
|
|
526
|
-
tag: String,
|
|
527
|
-
mode: String,
|
|
528
|
-
service: String,
|
|
529
|
-
form: Boolean,
|
|
530
|
-
readonly: Boolean,
|
|
531
|
-
name: String,
|
|
532
|
-
filterIcon: [Boolean, String],
|
|
533
|
-
title: String,
|
|
534
|
-
label: String,
|
|
535
|
-
labelKey: String,
|
|
536
|
-
valueKey: String,
|
|
537
|
-
field: String,
|
|
538
|
-
prop: String,
|
|
539
|
-
sortable: [Boolean, String],
|
|
540
|
-
sort: [Boolean, String],
|
|
541
|
-
className: String,
|
|
542
|
-
labelClassName: String,
|
|
543
|
-
type: String,
|
|
544
|
-
required: Boolean,
|
|
545
|
-
width: [Number, String],
|
|
546
|
-
minWidth: [Number, String],
|
|
547
|
-
hide: Boolean,
|
|
548
|
-
showOverflowTooltip: [Boolean, Number],
|
|
549
|
-
render: [Function, String],
|
|
550
|
-
contents: Array,
|
|
551
|
-
events: [Array, Object],
|
|
552
|
-
dateFormat: String,
|
|
553
|
-
dateValue: {
|
|
554
|
-
type: String,
|
|
555
|
-
default: ''
|
|
556
|
-
},
|
|
557
|
-
styles: [Array, Object],
|
|
558
|
-
sysCode: String,
|
|
559
|
-
valueToString: Boolean,
|
|
560
|
-
symbol: String,
|
|
561
|
-
rules: [Array, Object],
|
|
562
|
-
method: String,
|
|
563
|
-
indexs: {
|
|
564
|
-
type: Number,
|
|
565
|
-
default: null
|
|
566
|
-
},
|
|
567
|
-
data: [Object, Array],
|
|
568
|
-
optionData: {
|
|
569
|
-
type: Object,
|
|
570
|
-
default() {
|
|
571
|
-
return {};
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
watch: {
|
|
576
|
-
optionData: {
|
|
577
|
-
deep: true,
|
|
578
|
-
handler(val) {
|
|
579
|
-
this.optionDatas = val;
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
width: {
|
|
583
|
-
immediate: true,
|
|
584
|
-
handler(val) {
|
|
585
|
-
if (val) {
|
|
586
|
-
this.btnWidth = parseInt(val, 10) + 'px';
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
},
|
|
591
|
-
computed: {
|
|
592
|
-
config() {
|
|
593
|
-
let config = {
|
|
594
|
-
label: this.label || this.title,
|
|
595
|
-
width: this.btnWidth || this.width
|
|
596
|
-
};
|
|
597
|
-
if (this.type === 'expand') {
|
|
598
|
-
config = { type: this.type, ...config, ...this.$attrs };
|
|
599
|
-
return config;
|
|
600
|
-
}
|
|
601
|
-
let required = this.required;
|
|
602
|
-
if (this.rules && !required) {
|
|
603
|
-
if (Array.isArray(this.rules)) {
|
|
604
|
-
this.rules.map((item) => {
|
|
605
|
-
if (item.required) {
|
|
606
|
-
required = item.required;
|
|
607
|
-
}
|
|
608
|
-
});
|
|
609
|
-
} else if (this.rules.required) {
|
|
610
|
-
required = this.rules.required;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
if (this.type === 'handle') {
|
|
614
|
-
config.sort = true;
|
|
615
|
-
config.outside = false;
|
|
616
|
-
}
|
|
617
|
-
return {
|
|
618
|
-
...config,
|
|
619
|
-
filterIcon: this.icon,
|
|
620
|
-
sortable: this.sortable || this.sort,
|
|
621
|
-
minWidth: this.minWidth || this.table.minWidth,
|
|
622
|
-
className: [
|
|
623
|
-
this.className ? this.className : '',
|
|
624
|
-
this.type ? ' es-table-' + this.type + '-box' : '',
|
|
625
|
-
this.showOverflowTooltip ? ' es-text-ellipsis' : ''
|
|
626
|
-
].join(' '),
|
|
627
|
-
labelClassName: [
|
|
628
|
-
this.labelClassName ? this.labelClassName : '',
|
|
629
|
-
required ? 'es-required' : ''
|
|
630
|
-
].join(' '),
|
|
631
|
-
showOverflowTooltip: this.showOverflowTooltip,
|
|
632
|
-
prop: this.field || this.prop,
|
|
633
|
-
field: this.field,
|
|
634
|
-
...this.$attrs
|
|
635
|
-
};
|
|
636
|
-
},
|
|
637
|
-
formOption() {
|
|
638
|
-
let config = {
|
|
639
|
-
labelKey: this.sysCode
|
|
640
|
-
? this.service
|
|
641
|
-
? 'label'
|
|
642
|
-
: 'shortName'
|
|
643
|
-
: this.labelKey,
|
|
644
|
-
valueKey: this.sysCode
|
|
645
|
-
? this.service
|
|
646
|
-
? 'value'
|
|
647
|
-
: 'cciValue'
|
|
648
|
-
: this.valueKey,
|
|
649
|
-
rules: this.rules,
|
|
650
|
-
events: this.events,
|
|
651
|
-
...this.$attrs
|
|
652
|
-
};
|
|
653
|
-
return config;
|
|
654
|
-
},
|
|
655
|
-
icon() {
|
|
656
|
-
if (this.filterIcon === true) {
|
|
657
|
-
return 'es-icon-yingyong';
|
|
658
|
-
}
|
|
659
|
-
return false;
|
|
660
|
-
},
|
|
661
|
-
isForm() {
|
|
662
|
-
let type = this.type ? this.type.toLowerCase() : '';
|
|
663
|
-
let flag =
|
|
664
|
-
(this.form &&
|
|
665
|
-
[
|
|
666
|
-
'input',
|
|
667
|
-
'text',
|
|
668
|
-
'textarea',
|
|
669
|
-
'checkbox',
|
|
670
|
-
'radio',
|
|
671
|
-
'select',
|
|
672
|
-
'handle',
|
|
673
|
-
'date',
|
|
674
|
-
'year',
|
|
675
|
-
'month',
|
|
676
|
-
'date',
|
|
677
|
-
'dates',
|
|
678
|
-
'week',
|
|
679
|
-
'datetime',
|
|
680
|
-
'datetimerange',
|
|
681
|
-
'daterange',
|
|
682
|
-
'monthrange',
|
|
683
|
-
'quarter',
|
|
684
|
-
'halfyear',
|
|
685
|
-
'switch',
|
|
686
|
-
'selector',
|
|
687
|
-
'ganged',
|
|
688
|
-
'number'
|
|
689
|
-
].indexOf(type) > -1) ||
|
|
690
|
-
['space', 'slot', 'component'].indexOf(type) > -1;
|
|
691
|
-
return flag;
|
|
692
|
-
},
|
|
693
|
-
option() {
|
|
694
|
-
const field = this.field || this.prop;
|
|
695
|
-
return this.data ? this.data : this.optionDatas[this.sysCode || field];
|
|
696
|
-
},
|
|
697
|
-
findCode() {
|
|
698
|
-
if (this.service) {
|
|
699
|
-
return `/${this.service}${getDictList}`;
|
|
700
|
-
}
|
|
701
|
-
return findSysCode;
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
data() {
|
|
705
|
-
return {
|
|
706
|
-
btnWidth: '',
|
|
707
|
-
searchs: [],
|
|
708
|
-
optionDatas: this.optionData
|
|
709
|
-
};
|
|
710
|
-
},
|
|
711
|
-
mounted() {},
|
|
712
|
-
methods: {
|
|
713
|
-
init(data, value, item) {
|
|
714
|
-
if (data && value) {
|
|
715
|
-
if (Array.isArray(value) && value.length) {
|
|
716
|
-
if (item.url || this.sysCode) {
|
|
717
|
-
value.forEach(async (val, index) => {
|
|
718
|
-
if (
|
|
719
|
-
val.hasSub == false ||
|
|
720
|
-
this.searchs.indexOf(val[this.valueKey] || val.value) > -1
|
|
721
|
-
) {
|
|
722
|
-
return;
|
|
723
|
-
}
|
|
724
|
-
this.searchs.push(val[this.valueKey] || val.value);
|
|
725
|
-
if ((item.ganged && index < item.ganged - 1) || val.hasSub) {
|
|
726
|
-
let option = data[index + 1];
|
|
727
|
-
let lists = [];
|
|
728
|
-
if (option) {
|
|
729
|
-
let v = val[this.valueKey] || val.value;
|
|
730
|
-
lists = option.filter((list) => {
|
|
731
|
-
return list[item.filtrateKey] == v;
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
if (lists.length == 0) {
|
|
735
|
-
let queryKey = item.queryKey;
|
|
736
|
-
let param = {};
|
|
737
|
-
if (queryKey) {
|
|
738
|
-
for (let i in queryKey) {
|
|
739
|
-
param[i] = val[queryKey[i]];
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
let params = util.extend(
|
|
743
|
-
true,
|
|
744
|
-
this.sysCode
|
|
745
|
-
? { sysAppCode: this.sysCode, code: sysCode }
|
|
746
|
-
: {},
|
|
747
|
-
item.param ? item.param : {},
|
|
748
|
-
param
|
|
749
|
-
);
|
|
750
|
-
await util
|
|
751
|
-
.ajax({
|
|
752
|
-
url: this.sysCode ? this.findCode : item.url,
|
|
753
|
-
method: this.method,
|
|
754
|
-
params: params,
|
|
755
|
-
data: params
|
|
756
|
-
})
|
|
757
|
-
.then((res) => {
|
|
758
|
-
if (res.rCode === 0) {
|
|
759
|
-
let options = JSON.parse(JSON.stringify(data));
|
|
760
|
-
if (options[index + 1]) {
|
|
761
|
-
this.$set(
|
|
762
|
-
data,
|
|
763
|
-
index + 1,
|
|
764
|
-
options[index + 1].concat(
|
|
765
|
-
JSON.parse(JSON.stringify(res.results))
|
|
766
|
-
)
|
|
767
|
-
);
|
|
768
|
-
} else {
|
|
769
|
-
this.$set(
|
|
770
|
-
data,
|
|
771
|
-
index + 1,
|
|
772
|
-
JSON.parse(JSON.stringify(res.results))
|
|
773
|
-
);
|
|
774
|
-
}
|
|
775
|
-
} else {
|
|
776
|
-
let msg = res.msg || '系统错误,请联系管理员!';
|
|
777
|
-
this.$message.error(msg);
|
|
778
|
-
}
|
|
779
|
-
})
|
|
780
|
-
.catch((err) => {
|
|
781
|
-
if (err.message && err.message !== 'canceled') {
|
|
782
|
-
this.$message.error(err.message);
|
|
783
|
-
}
|
|
784
|
-
});
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
return data;
|
|
792
|
-
},
|
|
793
|
-
getType(config, types) {
|
|
794
|
-
let type =
|
|
795
|
-
config && config[this.field || this.prop]
|
|
796
|
-
? config[this.field || this.prop]['type'] ||
|
|
797
|
-
config[this.field || this.prop]
|
|
798
|
-
: this.type;
|
|
799
|
-
return Array.isArray(types) ? types.includes(type) : type == types;
|
|
800
|
-
},
|
|
801
|
-
getOptions(config) {
|
|
802
|
-
let option = config && config[this.field || this.prop];
|
|
803
|
-
return option && typeof option == 'object'
|
|
804
|
-
? { ...this.formOption, ...option }
|
|
805
|
-
: this.formOption;
|
|
806
|
-
},
|
|
807
|
-
getData(res) {
|
|
808
|
-
return res && res[this.field || this.prop]
|
|
809
|
-
? res[this.field || this.prop]
|
|
810
|
-
: this.option;
|
|
811
|
-
},
|
|
812
|
-
exclAttribute({ data, attrs }) {
|
|
813
|
-
return util.exclAttribute({ data, attrs });
|
|
814
|
-
},
|
|
815
|
-
format(rows, flag) {
|
|
816
|
-
const field = this.field || this.prop;
|
|
817
|
-
let data = this.option;
|
|
818
|
-
let str = '';
|
|
819
|
-
if (util.isObject(rows[field])) {
|
|
820
|
-
str =
|
|
821
|
-
rows[field][this.labelKey] ||
|
|
822
|
-
rows[field]['name'] ||
|
|
823
|
-
rows[field]['label'] ||
|
|
824
|
-
rows[field]['shortName'];
|
|
825
|
-
} else if (Array.isArray(rows[field])) {
|
|
826
|
-
const vals = rows[field].map((item) => {
|
|
827
|
-
if (util.isObject(item)) {
|
|
828
|
-
return (
|
|
829
|
-
item[this.labelKey] ||
|
|
830
|
-
item['name'] ||
|
|
831
|
-
item['label'] ||
|
|
832
|
-
item['shortName']
|
|
833
|
-
);
|
|
834
|
-
} else {
|
|
835
|
-
if (data && data.length && util.isObject(data[0])) {
|
|
836
|
-
return this.getLabel(data, item);
|
|
837
|
-
}
|
|
838
|
-
return item;
|
|
839
|
-
}
|
|
840
|
-
});
|
|
841
|
-
str = vals.join(this.symbol ? this.symbol : '-');
|
|
842
|
-
} else {
|
|
843
|
-
if (this.valueToString) {
|
|
844
|
-
const vals = rows[field].split(',').map((item) => {
|
|
845
|
-
if (data && data.length && util.isObject(data[0])) {
|
|
846
|
-
return this.getLabel(data, item);
|
|
847
|
-
}
|
|
848
|
-
return item;
|
|
849
|
-
});
|
|
850
|
-
str = vals.join(this.symbol ? this.symbol : '-');
|
|
851
|
-
} else {
|
|
852
|
-
if (data && data.length && util.isObject(data[0])) {
|
|
853
|
-
str = this.getLabel(data, rows[field]);
|
|
854
|
-
} else {
|
|
855
|
-
str = rows[field];
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
if (str && flag) {
|
|
860
|
-
str = str.replace(RegExp('\\n', 'g'), '<br/>');
|
|
861
|
-
str = str.replace(RegExp(' ', 'g'), ' ');
|
|
862
|
-
}
|
|
863
|
-
return str;
|
|
864
|
-
},
|
|
865
|
-
getLabel(obj, val) {
|
|
866
|
-
for (let i = 0; i < obj.length; i++) {
|
|
867
|
-
let item = obj[i];
|
|
868
|
-
let value = item[this.valueKey || 'cciValue'] || item['value'];
|
|
869
|
-
if (value == val) {
|
|
870
|
-
return (
|
|
871
|
-
item[this.labelKey] ||
|
|
872
|
-
item['name'] ||
|
|
873
|
-
item['label'] ||
|
|
874
|
-
item['shortName']
|
|
875
|
-
);
|
|
876
|
-
} else if (item.children && item.children.length) {
|
|
877
|
-
return this.getLabel(item.children, val);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
},
|
|
881
|
-
isReadOnly(scope) {
|
|
882
|
-
return (
|
|
883
|
-
scope.row.canEdit === false ||
|
|
884
|
-
this.readonly ||
|
|
885
|
-
this.$attrs.editable === false ||
|
|
886
|
-
(scope.row.cantEditKey &&
|
|
887
|
-
scope.row.cantEditKey.indexOf(this.field || this.prop) > -1)
|
|
888
|
-
);
|
|
889
|
-
},
|
|
890
|
-
isNotRule(scope) {
|
|
891
|
-
if (
|
|
892
|
-
scope.row.canRule === false ||
|
|
893
|
-
(scope.row.notRules &&
|
|
894
|
-
scope.row.notRules.indexOf(this.field || this.prop) > -1)
|
|
895
|
-
) {
|
|
896
|
-
this.elForm && this.elForm.clearValidate(this.field || this.prop);
|
|
897
|
-
return true;
|
|
898
|
-
}
|
|
899
|
-
return false;
|
|
900
|
-
},
|
|
901
|
-
handleBlur(data) {
|
|
902
|
-
this.events && this.events.blur && this.events.blur(data);
|
|
903
|
-
this.$emit('formBlur', data);
|
|
904
|
-
this.$emit('form-blur', data);
|
|
905
|
-
},
|
|
906
|
-
handleFocus(data) {
|
|
907
|
-
this.events && this.events.focus && this.events.focus(data);
|
|
908
|
-
this.$emit('formFocus', data);
|
|
909
|
-
this.$emit('form-focus', data);
|
|
910
|
-
},
|
|
911
|
-
handleChange(datas) {
|
|
912
|
-
let { item, name, data } = datas;
|
|
913
|
-
if (
|
|
914
|
-
item &&
|
|
915
|
-
((data.formConfigs && data.formConfigs[name] == 'ganged') ||
|
|
916
|
-
this.type == 'ganged')
|
|
917
|
-
) {
|
|
918
|
-
let { index, value } = datas.value;
|
|
919
|
-
if (
|
|
920
|
-
(item.url || this.sysCode) &&
|
|
921
|
-
((item.ganged && index > item.ganged - 1) || value.hasSub)
|
|
922
|
-
) {
|
|
923
|
-
let filte = value[this.valueKey] || value.value;
|
|
924
|
-
let datas = [];
|
|
925
|
-
if (this.optionDatas[this.field || this.prop][index + 1]) {
|
|
926
|
-
datas = this.optionDatas[this.field || this.prop][index + 1].filter(
|
|
927
|
-
(items) => {
|
|
928
|
-
return filte == items[item.filtrateKey];
|
|
929
|
-
}
|
|
930
|
-
);
|
|
931
|
-
}
|
|
932
|
-
if (datas.length == 0) {
|
|
933
|
-
let queryKey = item.queryKey;
|
|
934
|
-
let param = {};
|
|
935
|
-
if (queryKey) {
|
|
936
|
-
for (let i in queryKey) {
|
|
937
|
-
param[i] = value[queryKey[i]];
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
let params = util.extend(
|
|
941
|
-
true,
|
|
942
|
-
this.sysCode ? { sysAppCode: this.sysCode, code: sysCode } : {},
|
|
943
|
-
item.param ? item.param : {},
|
|
944
|
-
param
|
|
945
|
-
);
|
|
946
|
-
util
|
|
947
|
-
.ajax({
|
|
948
|
-
url: this.sysCode ? this.findCode : item.url,
|
|
949
|
-
method: this.method,
|
|
950
|
-
params: params,
|
|
951
|
-
data: params
|
|
952
|
-
})
|
|
953
|
-
.then((res) => {
|
|
954
|
-
if (res.rCode === 0) {
|
|
955
|
-
let options = JSON.parse(
|
|
956
|
-
JSON.stringify(this.optionDatas[this.sysCode])
|
|
957
|
-
);
|
|
958
|
-
if (options[index + 1]) {
|
|
959
|
-
options[index + 1] = options[index + 1].concat(
|
|
960
|
-
JSON.parse(JSON.stringify(res.results))
|
|
961
|
-
);
|
|
962
|
-
} else {
|
|
963
|
-
options.push(JSON.parse(JSON.stringify(res.results)));
|
|
964
|
-
}
|
|
965
|
-
this.$set(this.optionDatas, this.sysCode, options);
|
|
966
|
-
} else {
|
|
967
|
-
let msg = res.msg || '系统错误,请联系管理员!';
|
|
968
|
-
this.$message.error(msg);
|
|
969
|
-
}
|
|
970
|
-
})
|
|
971
|
-
.catch((err) => {
|
|
972
|
-
if (err.message && err.message !== 'canceled') {
|
|
973
|
-
this.$message.error(err.message);
|
|
974
|
-
}
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
this.events && this.events.change && this.events.change(datas);
|
|
980
|
-
this.$emit('formChange', datas);
|
|
981
|
-
this.$emit('form-change', datas);
|
|
982
|
-
},
|
|
983
|
-
handleClick(data) {
|
|
984
|
-
this.$emit('handleClick', data);
|
|
985
|
-
this.$emit('handle-click', data);
|
|
986
|
-
},
|
|
987
|
-
formatDate(date, fmt) {
|
|
988
|
-
return date ? util.formatDate(date, fmt) : this.dateValue;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
};
|
|
992
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<el-table-column v-bind="config" :key="field">
|
|
3
|
+
<slot> </slot>
|
|
4
|
+
<template slot-scope="scope">
|
|
5
|
+
<template v-if="isForm && !isReadOnly(scope)">
|
|
6
|
+
<el-form-item
|
|
7
|
+
v-if="!(type === 'handle' && !scope.row.hideHandle)"
|
|
8
|
+
:name="name"
|
|
9
|
+
:prop="field || prop"
|
|
10
|
+
:rules="isNotRule(scope) ? [] : rules"
|
|
11
|
+
:index="scope.$index"
|
|
12
|
+
>
|
|
13
|
+
<component
|
|
14
|
+
v-if="getType(scope.row.formConfigs, 'component')"
|
|
15
|
+
:is="tag"
|
|
16
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
17
|
+
v-model="scope.row[field || prop]"
|
|
18
|
+
:data="getData(scope.row.formOptions)"
|
|
19
|
+
@blur="
|
|
20
|
+
(event) => {
|
|
21
|
+
handleBlur({
|
|
22
|
+
item: config,
|
|
23
|
+
event: event,
|
|
24
|
+
data: scope.row,
|
|
25
|
+
scope: scope
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
"
|
|
29
|
+
@focus="
|
|
30
|
+
(event) => {
|
|
31
|
+
handleFocus({
|
|
32
|
+
item: config,
|
|
33
|
+
event: event,
|
|
34
|
+
data: scope.row,
|
|
35
|
+
scope: scope
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
"
|
|
39
|
+
@change="
|
|
40
|
+
(value) => {
|
|
41
|
+
handleChange({
|
|
42
|
+
item: config,
|
|
43
|
+
name: field || prop,
|
|
44
|
+
value: value,
|
|
45
|
+
data: scope.row,
|
|
46
|
+
scope: scope
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
"
|
|
50
|
+
></component>
|
|
51
|
+
<es-select
|
|
52
|
+
v-else-if="getType(scope.row.formConfigs, 'select')"
|
|
53
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
54
|
+
v-model="scope.row[field || prop]"
|
|
55
|
+
:data="getData(scope.row.formOptions)"
|
|
56
|
+
@blur="
|
|
57
|
+
(event) => {
|
|
58
|
+
handleBlur({
|
|
59
|
+
item: config,
|
|
60
|
+
event: event,
|
|
61
|
+
data: scope.row,
|
|
62
|
+
scope: scope
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
"
|
|
66
|
+
@focus="
|
|
67
|
+
(event) => {
|
|
68
|
+
handleFocus({
|
|
69
|
+
item: config,
|
|
70
|
+
event: event,
|
|
71
|
+
data: scope.row,
|
|
72
|
+
scope: scope
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
"
|
|
76
|
+
@change="
|
|
77
|
+
(value) => {
|
|
78
|
+
handleChange({
|
|
79
|
+
item: config,
|
|
80
|
+
name: field || prop,
|
|
81
|
+
value: value,
|
|
82
|
+
data: scope.row,
|
|
83
|
+
scope: scope
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
"
|
|
87
|
+
>
|
|
88
|
+
</es-select>
|
|
89
|
+
<es-cascader
|
|
90
|
+
v-else-if="getType(scope.row.formConfigs, 'cascader')"
|
|
91
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
92
|
+
v-model="scope.row[field || prop]"
|
|
93
|
+
:data="getData(scope.row.formOptions)"
|
|
94
|
+
@blur="
|
|
95
|
+
(event) => {
|
|
96
|
+
handleBlur({
|
|
97
|
+
item: config,
|
|
98
|
+
event: event,
|
|
99
|
+
data: scope.row,
|
|
100
|
+
scope: scope
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
"
|
|
104
|
+
@focus="
|
|
105
|
+
(event) => {
|
|
106
|
+
handleFocus({
|
|
107
|
+
item: config,
|
|
108
|
+
event: event,
|
|
109
|
+
data: scope.row,
|
|
110
|
+
scope: scope
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
"
|
|
114
|
+
@change="
|
|
115
|
+
(value) => {
|
|
116
|
+
handleChange({
|
|
117
|
+
item: config,
|
|
118
|
+
name: field || prop,
|
|
119
|
+
value: value,
|
|
120
|
+
data: scope.row,
|
|
121
|
+
scope: scope
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
"
|
|
125
|
+
>
|
|
126
|
+
</es-cascader>
|
|
127
|
+
<es-select-ganged
|
|
128
|
+
v-else-if="getType(scope.row.formConfigs, 'ganged')"
|
|
129
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
130
|
+
v-model="scope.row[field || prop]"
|
|
131
|
+
:data="init(getData(scope.row.formOptions), config)"
|
|
132
|
+
@change="
|
|
133
|
+
(value) => {
|
|
134
|
+
handleChange({
|
|
135
|
+
name: field || prop,
|
|
136
|
+
value: value,
|
|
137
|
+
data: scope.row,
|
|
138
|
+
item: item
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
"
|
|
142
|
+
>
|
|
143
|
+
</es-select-ganged>
|
|
144
|
+
<es-radio-group
|
|
145
|
+
v-else-if="getType(scope.row.formConfigs, 'radio')"
|
|
146
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
147
|
+
v-model="scope.row[field || prop]"
|
|
148
|
+
:data="getData(scope.row.formOptions)"
|
|
149
|
+
@change="
|
|
150
|
+
(value) => {
|
|
151
|
+
handleChange({
|
|
152
|
+
item: config,
|
|
153
|
+
name: field || prop,
|
|
154
|
+
value: value,
|
|
155
|
+
data: scope.row
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
"
|
|
159
|
+
>
|
|
160
|
+
</es-radio-group>
|
|
161
|
+
<es-checkbox-group
|
|
162
|
+
v-else-if="getType(scope.row.formConfigs, 'checkbox')"
|
|
163
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
164
|
+
v-model="scope.row[field || prop]"
|
|
165
|
+
:data="getData(scope.row.formOptions)"
|
|
166
|
+
@change="
|
|
167
|
+
(value) => {
|
|
168
|
+
handleChange({
|
|
169
|
+
item: config,
|
|
170
|
+
name: field || prop,
|
|
171
|
+
value: value,
|
|
172
|
+
data: scope.row
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
"
|
|
176
|
+
>
|
|
177
|
+
</es-checkbox-group>
|
|
178
|
+
<es-switch
|
|
179
|
+
v-else-if="getType(scope.row.formConfigs, 'switch')"
|
|
180
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
181
|
+
v-model="scope.row[field || prop]"
|
|
182
|
+
:data="getData(scope.row.formOptions)"
|
|
183
|
+
@change="
|
|
184
|
+
(value) => {
|
|
185
|
+
handleChange({
|
|
186
|
+
item: config,
|
|
187
|
+
name: field || prop,
|
|
188
|
+
value: value,
|
|
189
|
+
data: scope.row
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
"
|
|
193
|
+
>
|
|
194
|
+
</es-switch>
|
|
195
|
+
<es-date-picker
|
|
196
|
+
v-else-if="
|
|
197
|
+
config.date ||
|
|
198
|
+
getType(scope.row.formConfigs, [
|
|
199
|
+
'date',
|
|
200
|
+
'year',
|
|
201
|
+
'month',
|
|
202
|
+
'date',
|
|
203
|
+
'dates',
|
|
204
|
+
'week',
|
|
205
|
+
'datetime',
|
|
206
|
+
'datetimerange',
|
|
207
|
+
'daterange',
|
|
208
|
+
'monthrange',
|
|
209
|
+
'quarter',
|
|
210
|
+
'halfyear'
|
|
211
|
+
])
|
|
212
|
+
"
|
|
213
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
214
|
+
v-model="scope.row[field || prop]"
|
|
215
|
+
:type="type"
|
|
216
|
+
@blur="
|
|
217
|
+
(event) => {
|
|
218
|
+
handleBlur({
|
|
219
|
+
item: config,
|
|
220
|
+
event: event,
|
|
221
|
+
data: scope.row,
|
|
222
|
+
scope: scope
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
"
|
|
226
|
+
@focus="
|
|
227
|
+
(event) => {
|
|
228
|
+
handleFocus({
|
|
229
|
+
item: config,
|
|
230
|
+
event: event,
|
|
231
|
+
data: scope.row,
|
|
232
|
+
scope: scope
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
"
|
|
236
|
+
@change="
|
|
237
|
+
(value) => {
|
|
238
|
+
handleChange({
|
|
239
|
+
item: config,
|
|
240
|
+
name: field || prop,
|
|
241
|
+
value: value,
|
|
242
|
+
data: scope.row,
|
|
243
|
+
scope: scope
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
"
|
|
247
|
+
>
|
|
248
|
+
</es-date-picker>
|
|
249
|
+
<es-input-number
|
|
250
|
+
v-else-if="getType(scope.row.formConfigs, 'number')"
|
|
251
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
252
|
+
v-model="scope.row[field || prop]"
|
|
253
|
+
@blur="
|
|
254
|
+
(event) => {
|
|
255
|
+
handleBlur({
|
|
256
|
+
item: config,
|
|
257
|
+
event: event,
|
|
258
|
+
data: scope.row,
|
|
259
|
+
scope: scope
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
"
|
|
263
|
+
@focus="
|
|
264
|
+
(event) => {
|
|
265
|
+
handleFocus({
|
|
266
|
+
item: config,
|
|
267
|
+
event: event,
|
|
268
|
+
data: scope.row,
|
|
269
|
+
scope: scope
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
"
|
|
273
|
+
@change="
|
|
274
|
+
(value) => {
|
|
275
|
+
handleChange({
|
|
276
|
+
item: config,
|
|
277
|
+
name: field || prop,
|
|
278
|
+
value: value,
|
|
279
|
+
data: scope.row,
|
|
280
|
+
scope: scope
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
"
|
|
284
|
+
>
|
|
285
|
+
</es-input-number>
|
|
286
|
+
<es-selector
|
|
287
|
+
v-else-if="getType(scope.row.formConfigs, 'selector')"
|
|
288
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
289
|
+
v-model="scope.row[field || prop]"
|
|
290
|
+
v-on="
|
|
291
|
+
exclAttribute({
|
|
292
|
+
data: events,
|
|
293
|
+
attrs: 'change'
|
|
294
|
+
})
|
|
295
|
+
"
|
|
296
|
+
@change="
|
|
297
|
+
(value) => {
|
|
298
|
+
handleChange({
|
|
299
|
+
item: config,
|
|
300
|
+
name: field || prop,
|
|
301
|
+
value: value,
|
|
302
|
+
data: scope.row
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
"
|
|
306
|
+
>
|
|
307
|
+
</es-selector>
|
|
308
|
+
<template
|
|
309
|
+
v-else-if="
|
|
310
|
+
getType(scope.row.formConfigs, ['text', 'input', 'textarea'])
|
|
311
|
+
"
|
|
312
|
+
>
|
|
313
|
+
<template v-if="config.lazy">
|
|
314
|
+
<input
|
|
315
|
+
v-if="getType(scope.row.formConfigs, ['text', 'input'])"
|
|
316
|
+
class="el-input__inner"
|
|
317
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
318
|
+
v-model.lazy="scope.row[field]"
|
|
319
|
+
@blur="
|
|
320
|
+
(event) => {
|
|
321
|
+
handleBlur({
|
|
322
|
+
item: config,
|
|
323
|
+
event: event,
|
|
324
|
+
data: scope.row,
|
|
325
|
+
scope: scope
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
"
|
|
329
|
+
@focus="
|
|
330
|
+
(event) => {
|
|
331
|
+
handleFocus({
|
|
332
|
+
item: config,
|
|
333
|
+
event: event,
|
|
334
|
+
data: scope.row,
|
|
335
|
+
scope: scope
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
"
|
|
339
|
+
@change="
|
|
340
|
+
(value) => {
|
|
341
|
+
handleChange({
|
|
342
|
+
item: config,
|
|
343
|
+
name: field || prop,
|
|
344
|
+
value: value,
|
|
345
|
+
data: scope.row,
|
|
346
|
+
scope: scope
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
"
|
|
350
|
+
/>
|
|
351
|
+
<textarea
|
|
352
|
+
v-else
|
|
353
|
+
class="el-textarea__inner"
|
|
354
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
355
|
+
v-model.lazy="scope.row[field]"
|
|
356
|
+
@blur="
|
|
357
|
+
(event) => {
|
|
358
|
+
handleBlur({
|
|
359
|
+
item: config,
|
|
360
|
+
event: event,
|
|
361
|
+
data: scope.row,
|
|
362
|
+
scope: scope
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
"
|
|
366
|
+
@focus="
|
|
367
|
+
(event) => {
|
|
368
|
+
handleFocus({
|
|
369
|
+
item: config,
|
|
370
|
+
event: event,
|
|
371
|
+
data: scope.row,
|
|
372
|
+
scope: scope
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
"
|
|
376
|
+
@change="
|
|
377
|
+
(value) => {
|
|
378
|
+
handleChange({
|
|
379
|
+
item: config,
|
|
380
|
+
name: field || prop,
|
|
381
|
+
value: value,
|
|
382
|
+
data: scope.row,
|
|
383
|
+
scope: scope
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
"
|
|
387
|
+
></textarea>
|
|
388
|
+
</template>
|
|
389
|
+
<es-input
|
|
390
|
+
v-else
|
|
391
|
+
v-bind="getOptions(scope.row.formConfigs)"
|
|
392
|
+
:type="type"
|
|
393
|
+
:scope="scope"
|
|
394
|
+
v-model="scope.row[field || prop]"
|
|
395
|
+
@blur="
|
|
396
|
+
(event) => {
|
|
397
|
+
handleBlur({
|
|
398
|
+
item: config,
|
|
399
|
+
event: event,
|
|
400
|
+
data: scope.row,
|
|
401
|
+
scope: scope
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
"
|
|
405
|
+
@focus="
|
|
406
|
+
(event) => {
|
|
407
|
+
handleFocus({
|
|
408
|
+
item: config,
|
|
409
|
+
event: event,
|
|
410
|
+
data: scope.row,
|
|
411
|
+
scope: scope
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
"
|
|
415
|
+
@change="
|
|
416
|
+
(value) => {
|
|
417
|
+
handleChange({
|
|
418
|
+
item: config,
|
|
419
|
+
name: field || prop,
|
|
420
|
+
value: value,
|
|
421
|
+
data: scope.row,
|
|
422
|
+
scope: scope
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
"
|
|
426
|
+
>
|
|
427
|
+
</es-input>
|
|
428
|
+
</template>
|
|
429
|
+
</el-form-item>
|
|
430
|
+
</template>
|
|
431
|
+
<expand-dom
|
|
432
|
+
v-else-if="render"
|
|
433
|
+
:column="config"
|
|
434
|
+
:row="scope.row"
|
|
435
|
+
:render="render"
|
|
436
|
+
:index="indexs"
|
|
437
|
+
:options="optionDatas"
|
|
438
|
+
>
|
|
439
|
+
</expand-dom>
|
|
440
|
+
<template v-else-if="dateFormat">
|
|
441
|
+
{{ formatDate(scope.row[field || prop], dateFormat) }}
|
|
442
|
+
</template>
|
|
443
|
+
<span
|
|
444
|
+
v-else-if="type === 'textarea'"
|
|
445
|
+
v-html="format(scope.row, true)"
|
|
446
|
+
:style="styles ? styles[scope.row[prop]] : {}"
|
|
447
|
+
></span>
|
|
448
|
+
<span
|
|
449
|
+
v-else
|
|
450
|
+
:style="styles ? styles[scope.row[prop]] : {}"
|
|
451
|
+
v-html="format(scope.row)"
|
|
452
|
+
></span>
|
|
453
|
+
<!-- {{ format(scope.row) }} -->
|
|
454
|
+
<es-button-group
|
|
455
|
+
v-if="type === 'handle' && !scope.row.hideHandle"
|
|
456
|
+
v-bind="
|
|
457
|
+
exclAttribute({
|
|
458
|
+
data: config,
|
|
459
|
+
attrs: ['contents', 'events', 'type', 'width', 'template', 'title']
|
|
460
|
+
})
|
|
461
|
+
"
|
|
462
|
+
stop
|
|
463
|
+
:mode="mode"
|
|
464
|
+
:contents="contents || events"
|
|
465
|
+
:data="scope"
|
|
466
|
+
@handleClick="handleClick"
|
|
467
|
+
v-model="btnWidth"
|
|
468
|
+
></es-button-group>
|
|
469
|
+
</template>
|
|
470
|
+
</el-table-column>
|
|
471
|
+
</template>
|
|
472
|
+
|
|
473
|
+
<script type="text/babel">
|
|
474
|
+
import { findSysCode, getDictList } from 'eoss-ui/src/config/api.js';
|
|
475
|
+
import util from 'eoss-ui/src/utils/util';
|
|
476
|
+
export default {
|
|
477
|
+
name: 'Column',
|
|
478
|
+
components: {
|
|
479
|
+
expandDom: {
|
|
480
|
+
functional: true,
|
|
481
|
+
props: {
|
|
482
|
+
row: Object,
|
|
483
|
+
render: [Function, String],
|
|
484
|
+
index: Number,
|
|
485
|
+
column: {
|
|
486
|
+
type: Object,
|
|
487
|
+
default: null
|
|
488
|
+
},
|
|
489
|
+
options: Object
|
|
490
|
+
},
|
|
491
|
+
render: (h, ctx) => {
|
|
492
|
+
const params = {
|
|
493
|
+
row: ctx.props.row,
|
|
494
|
+
index: ctx.props.index
|
|
495
|
+
};
|
|
496
|
+
if (ctx.props.column) {
|
|
497
|
+
params.column = ctx.props.column;
|
|
498
|
+
}
|
|
499
|
+
if (typeof ctx.props.render == 'string') {
|
|
500
|
+
try {
|
|
501
|
+
return util.toFunction(ctx.props.render)(
|
|
502
|
+
h,
|
|
503
|
+
params,
|
|
504
|
+
ctx.props.options
|
|
505
|
+
);
|
|
506
|
+
} catch (error) {
|
|
507
|
+
throw error;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
return ctx.props.render(h, params, ctx.props.options);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
inject: {
|
|
515
|
+
elForm: {
|
|
516
|
+
default: ''
|
|
517
|
+
},
|
|
518
|
+
tableReload: {
|
|
519
|
+
default: ''
|
|
520
|
+
},
|
|
521
|
+
table: {
|
|
522
|
+
default: ''
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
props: {
|
|
526
|
+
tag: String,
|
|
527
|
+
mode: String,
|
|
528
|
+
service: String,
|
|
529
|
+
form: Boolean,
|
|
530
|
+
readonly: Boolean,
|
|
531
|
+
name: String,
|
|
532
|
+
filterIcon: [Boolean, String],
|
|
533
|
+
title: String,
|
|
534
|
+
label: String,
|
|
535
|
+
labelKey: String,
|
|
536
|
+
valueKey: String,
|
|
537
|
+
field: String,
|
|
538
|
+
prop: String,
|
|
539
|
+
sortable: [Boolean, String],
|
|
540
|
+
sort: [Boolean, String],
|
|
541
|
+
className: String,
|
|
542
|
+
labelClassName: String,
|
|
543
|
+
type: String,
|
|
544
|
+
required: Boolean,
|
|
545
|
+
width: [Number, String],
|
|
546
|
+
minWidth: [Number, String],
|
|
547
|
+
hide: Boolean,
|
|
548
|
+
showOverflowTooltip: [Boolean, Number],
|
|
549
|
+
render: [Function, String],
|
|
550
|
+
contents: Array,
|
|
551
|
+
events: [Array, Object],
|
|
552
|
+
dateFormat: String,
|
|
553
|
+
dateValue: {
|
|
554
|
+
type: String,
|
|
555
|
+
default: ''
|
|
556
|
+
},
|
|
557
|
+
styles: [Array, Object],
|
|
558
|
+
sysCode: String,
|
|
559
|
+
valueToString: Boolean,
|
|
560
|
+
symbol: String,
|
|
561
|
+
rules: [Array, Object],
|
|
562
|
+
method: String,
|
|
563
|
+
indexs: {
|
|
564
|
+
type: Number,
|
|
565
|
+
default: null
|
|
566
|
+
},
|
|
567
|
+
data: [Object, Array],
|
|
568
|
+
optionData: {
|
|
569
|
+
type: Object,
|
|
570
|
+
default() {
|
|
571
|
+
return {};
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
watch: {
|
|
576
|
+
optionData: {
|
|
577
|
+
deep: true,
|
|
578
|
+
handler(val) {
|
|
579
|
+
this.optionDatas = val;
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
width: {
|
|
583
|
+
immediate: true,
|
|
584
|
+
handler(val) {
|
|
585
|
+
if (val) {
|
|
586
|
+
this.btnWidth = parseInt(val, 10) + 'px';
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
computed: {
|
|
592
|
+
config() {
|
|
593
|
+
let config = {
|
|
594
|
+
label: this.label || this.title,
|
|
595
|
+
width: this.btnWidth || this.width
|
|
596
|
+
};
|
|
597
|
+
if (this.type === 'expand') {
|
|
598
|
+
config = { type: this.type, ...config, ...this.$attrs };
|
|
599
|
+
return config;
|
|
600
|
+
}
|
|
601
|
+
let required = this.required;
|
|
602
|
+
if (this.rules && !required) {
|
|
603
|
+
if (Array.isArray(this.rules)) {
|
|
604
|
+
this.rules.map((item) => {
|
|
605
|
+
if (item.required) {
|
|
606
|
+
required = item.required;
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
} else if (this.rules.required) {
|
|
610
|
+
required = this.rules.required;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
if (this.type === 'handle') {
|
|
614
|
+
config.sort = true;
|
|
615
|
+
config.outside = false;
|
|
616
|
+
}
|
|
617
|
+
return {
|
|
618
|
+
...config,
|
|
619
|
+
filterIcon: this.icon,
|
|
620
|
+
sortable: this.sortable || this.sort,
|
|
621
|
+
minWidth: this.minWidth || this.table.minWidth,
|
|
622
|
+
className: [
|
|
623
|
+
this.className ? this.className : '',
|
|
624
|
+
this.type ? ' es-table-' + this.type + '-box' : '',
|
|
625
|
+
this.showOverflowTooltip ? ' es-text-ellipsis' : ''
|
|
626
|
+
].join(' '),
|
|
627
|
+
labelClassName: [
|
|
628
|
+
this.labelClassName ? this.labelClassName : '',
|
|
629
|
+
required ? 'es-required' : ''
|
|
630
|
+
].join(' '),
|
|
631
|
+
showOverflowTooltip: this.showOverflowTooltip,
|
|
632
|
+
prop: this.field || this.prop,
|
|
633
|
+
field: this.field,
|
|
634
|
+
...this.$attrs
|
|
635
|
+
};
|
|
636
|
+
},
|
|
637
|
+
formOption() {
|
|
638
|
+
let config = {
|
|
639
|
+
labelKey: this.sysCode
|
|
640
|
+
? this.service
|
|
641
|
+
? 'label'
|
|
642
|
+
: 'shortName'
|
|
643
|
+
: this.labelKey,
|
|
644
|
+
valueKey: this.sysCode
|
|
645
|
+
? this.service
|
|
646
|
+
? 'value'
|
|
647
|
+
: 'cciValue'
|
|
648
|
+
: this.valueKey,
|
|
649
|
+
rules: this.rules,
|
|
650
|
+
events: this.events,
|
|
651
|
+
...this.$attrs
|
|
652
|
+
};
|
|
653
|
+
return config;
|
|
654
|
+
},
|
|
655
|
+
icon() {
|
|
656
|
+
if (this.filterIcon === true) {
|
|
657
|
+
return 'es-icon-yingyong';
|
|
658
|
+
}
|
|
659
|
+
return false;
|
|
660
|
+
},
|
|
661
|
+
isForm() {
|
|
662
|
+
let type = this.type ? this.type.toLowerCase() : '';
|
|
663
|
+
let flag =
|
|
664
|
+
(this.form &&
|
|
665
|
+
[
|
|
666
|
+
'input',
|
|
667
|
+
'text',
|
|
668
|
+
'textarea',
|
|
669
|
+
'checkbox',
|
|
670
|
+
'radio',
|
|
671
|
+
'select',
|
|
672
|
+
'handle',
|
|
673
|
+
'date',
|
|
674
|
+
'year',
|
|
675
|
+
'month',
|
|
676
|
+
'date',
|
|
677
|
+
'dates',
|
|
678
|
+
'week',
|
|
679
|
+
'datetime',
|
|
680
|
+
'datetimerange',
|
|
681
|
+
'daterange',
|
|
682
|
+
'monthrange',
|
|
683
|
+
'quarter',
|
|
684
|
+
'halfyear',
|
|
685
|
+
'switch',
|
|
686
|
+
'selector',
|
|
687
|
+
'ganged',
|
|
688
|
+
'number'
|
|
689
|
+
].indexOf(type) > -1) ||
|
|
690
|
+
['space', 'slot', 'component'].indexOf(type) > -1;
|
|
691
|
+
return flag;
|
|
692
|
+
},
|
|
693
|
+
option() {
|
|
694
|
+
const field = this.field || this.prop;
|
|
695
|
+
return this.data ? this.data : this.optionDatas[this.sysCode || field];
|
|
696
|
+
},
|
|
697
|
+
findCode() {
|
|
698
|
+
if (this.service) {
|
|
699
|
+
return `/${this.service}${getDictList}`;
|
|
700
|
+
}
|
|
701
|
+
return findSysCode;
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
data() {
|
|
705
|
+
return {
|
|
706
|
+
btnWidth: '',
|
|
707
|
+
searchs: [],
|
|
708
|
+
optionDatas: this.optionData
|
|
709
|
+
};
|
|
710
|
+
},
|
|
711
|
+
mounted() {},
|
|
712
|
+
methods: {
|
|
713
|
+
init(data, value, item) {
|
|
714
|
+
if (data && value) {
|
|
715
|
+
if (Array.isArray(value) && value.length) {
|
|
716
|
+
if (item.url || this.sysCode) {
|
|
717
|
+
value.forEach(async (val, index) => {
|
|
718
|
+
if (
|
|
719
|
+
val.hasSub == false ||
|
|
720
|
+
this.searchs.indexOf(val[this.valueKey] || val.value) > -1
|
|
721
|
+
) {
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
this.searchs.push(val[this.valueKey] || val.value);
|
|
725
|
+
if ((item.ganged && index < item.ganged - 1) || val.hasSub) {
|
|
726
|
+
let option = data[index + 1];
|
|
727
|
+
let lists = [];
|
|
728
|
+
if (option) {
|
|
729
|
+
let v = val[this.valueKey] || val.value;
|
|
730
|
+
lists = option.filter((list) => {
|
|
731
|
+
return list[item.filtrateKey] == v;
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
if (lists.length == 0) {
|
|
735
|
+
let queryKey = item.queryKey;
|
|
736
|
+
let param = {};
|
|
737
|
+
if (queryKey) {
|
|
738
|
+
for (let i in queryKey) {
|
|
739
|
+
param[i] = val[queryKey[i]];
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
let params = util.extend(
|
|
743
|
+
true,
|
|
744
|
+
this.sysCode
|
|
745
|
+
? { sysAppCode: this.sysCode, code: sysCode }
|
|
746
|
+
: {},
|
|
747
|
+
item.param ? item.param : {},
|
|
748
|
+
param
|
|
749
|
+
);
|
|
750
|
+
await util
|
|
751
|
+
.ajax({
|
|
752
|
+
url: this.sysCode ? this.findCode : item.url,
|
|
753
|
+
method: this.method,
|
|
754
|
+
params: params,
|
|
755
|
+
data: params
|
|
756
|
+
})
|
|
757
|
+
.then((res) => {
|
|
758
|
+
if (res.rCode === 0) {
|
|
759
|
+
let options = JSON.parse(JSON.stringify(data));
|
|
760
|
+
if (options[index + 1]) {
|
|
761
|
+
this.$set(
|
|
762
|
+
data,
|
|
763
|
+
index + 1,
|
|
764
|
+
options[index + 1].concat(
|
|
765
|
+
JSON.parse(JSON.stringify(res.results))
|
|
766
|
+
)
|
|
767
|
+
);
|
|
768
|
+
} else {
|
|
769
|
+
this.$set(
|
|
770
|
+
data,
|
|
771
|
+
index + 1,
|
|
772
|
+
JSON.parse(JSON.stringify(res.results))
|
|
773
|
+
);
|
|
774
|
+
}
|
|
775
|
+
} else {
|
|
776
|
+
let msg = res.msg || '系统错误,请联系管理员!';
|
|
777
|
+
this.$message.error(msg);
|
|
778
|
+
}
|
|
779
|
+
})
|
|
780
|
+
.catch((err) => {
|
|
781
|
+
if (err.message && err.message !== 'canceled') {
|
|
782
|
+
this.$message.error(err.message);
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
return data;
|
|
792
|
+
},
|
|
793
|
+
getType(config, types) {
|
|
794
|
+
let type =
|
|
795
|
+
config && config[this.field || this.prop]
|
|
796
|
+
? config[this.field || this.prop]['type'] ||
|
|
797
|
+
config[this.field || this.prop]
|
|
798
|
+
: this.type;
|
|
799
|
+
return Array.isArray(types) ? types.includes(type) : type == types;
|
|
800
|
+
},
|
|
801
|
+
getOptions(config) {
|
|
802
|
+
let option = config && config[this.field || this.prop];
|
|
803
|
+
return option && typeof option == 'object'
|
|
804
|
+
? { ...this.formOption, ...option }
|
|
805
|
+
: this.formOption;
|
|
806
|
+
},
|
|
807
|
+
getData(res) {
|
|
808
|
+
return res && res[this.field || this.prop]
|
|
809
|
+
? res[this.field || this.prop]
|
|
810
|
+
: this.option;
|
|
811
|
+
},
|
|
812
|
+
exclAttribute({ data, attrs }) {
|
|
813
|
+
return util.exclAttribute({ data, attrs });
|
|
814
|
+
},
|
|
815
|
+
format(rows, flag) {
|
|
816
|
+
const field = this.field || this.prop;
|
|
817
|
+
let data = this.option;
|
|
818
|
+
let str = '';
|
|
819
|
+
if (util.isObject(rows[field])) {
|
|
820
|
+
str =
|
|
821
|
+
rows[field][this.labelKey] ||
|
|
822
|
+
rows[field]['name'] ||
|
|
823
|
+
rows[field]['label'] ||
|
|
824
|
+
rows[field]['shortName'];
|
|
825
|
+
} else if (Array.isArray(rows[field])) {
|
|
826
|
+
const vals = rows[field].map((item) => {
|
|
827
|
+
if (util.isObject(item)) {
|
|
828
|
+
return (
|
|
829
|
+
item[this.labelKey] ||
|
|
830
|
+
item['name'] ||
|
|
831
|
+
item['label'] ||
|
|
832
|
+
item['shortName']
|
|
833
|
+
);
|
|
834
|
+
} else {
|
|
835
|
+
if (data && data.length && util.isObject(data[0])) {
|
|
836
|
+
return this.getLabel(data, item);
|
|
837
|
+
}
|
|
838
|
+
return item;
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
str = vals.join(this.symbol ? this.symbol : '-');
|
|
842
|
+
} else {
|
|
843
|
+
if (this.valueToString) {
|
|
844
|
+
const vals = rows[field].split(',').map((item) => {
|
|
845
|
+
if (data && data.length && util.isObject(data[0])) {
|
|
846
|
+
return this.getLabel(data, item);
|
|
847
|
+
}
|
|
848
|
+
return item;
|
|
849
|
+
});
|
|
850
|
+
str = vals.join(this.symbol ? this.symbol : '-');
|
|
851
|
+
} else {
|
|
852
|
+
if (data && data.length && util.isObject(data[0])) {
|
|
853
|
+
str = this.getLabel(data, rows[field]);
|
|
854
|
+
} else {
|
|
855
|
+
str = rows[field];
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
if (str && flag) {
|
|
860
|
+
str = str.replace(RegExp('\\n', 'g'), '<br/>');
|
|
861
|
+
str = str.replace(RegExp(' ', 'g'), ' ');
|
|
862
|
+
}
|
|
863
|
+
return str;
|
|
864
|
+
},
|
|
865
|
+
getLabel(obj, val) {
|
|
866
|
+
for (let i = 0; i < obj.length; i++) {
|
|
867
|
+
let item = obj[i];
|
|
868
|
+
let value = item[this.valueKey || 'cciValue'] || item['value'];
|
|
869
|
+
if (value == val) {
|
|
870
|
+
return (
|
|
871
|
+
item[this.labelKey] ||
|
|
872
|
+
item['name'] ||
|
|
873
|
+
item['label'] ||
|
|
874
|
+
item['shortName']
|
|
875
|
+
);
|
|
876
|
+
} else if (item.children && item.children.length) {
|
|
877
|
+
return this.getLabel(item.children, val);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
isReadOnly(scope) {
|
|
882
|
+
return (
|
|
883
|
+
scope.row.canEdit === false ||
|
|
884
|
+
this.readonly ||
|
|
885
|
+
this.$attrs.editable === false ||
|
|
886
|
+
(scope.row.cantEditKey &&
|
|
887
|
+
scope.row.cantEditKey.indexOf(this.field || this.prop) > -1)
|
|
888
|
+
);
|
|
889
|
+
},
|
|
890
|
+
isNotRule(scope) {
|
|
891
|
+
if (
|
|
892
|
+
scope.row.canRule === false ||
|
|
893
|
+
(scope.row.notRules &&
|
|
894
|
+
scope.row.notRules.indexOf(this.field || this.prop) > -1)
|
|
895
|
+
) {
|
|
896
|
+
this.elForm && this.elForm.clearValidate(this.field || this.prop);
|
|
897
|
+
return true;
|
|
898
|
+
}
|
|
899
|
+
return false;
|
|
900
|
+
},
|
|
901
|
+
handleBlur(data) {
|
|
902
|
+
this.events && this.events.blur && this.events.blur(data);
|
|
903
|
+
this.$emit('formBlur', data);
|
|
904
|
+
this.$emit('form-blur', data);
|
|
905
|
+
},
|
|
906
|
+
handleFocus(data) {
|
|
907
|
+
this.events && this.events.focus && this.events.focus(data);
|
|
908
|
+
this.$emit('formFocus', data);
|
|
909
|
+
this.$emit('form-focus', data);
|
|
910
|
+
},
|
|
911
|
+
handleChange(datas) {
|
|
912
|
+
let { item, name, data } = datas;
|
|
913
|
+
if (
|
|
914
|
+
item &&
|
|
915
|
+
((data.formConfigs && data.formConfigs[name] == 'ganged') ||
|
|
916
|
+
this.type == 'ganged')
|
|
917
|
+
) {
|
|
918
|
+
let { index, value } = datas.value;
|
|
919
|
+
if (
|
|
920
|
+
(item.url || this.sysCode) &&
|
|
921
|
+
((item.ganged && index > item.ganged - 1) || value.hasSub)
|
|
922
|
+
) {
|
|
923
|
+
let filte = value[this.valueKey] || value.value;
|
|
924
|
+
let datas = [];
|
|
925
|
+
if (this.optionDatas[this.field || this.prop][index + 1]) {
|
|
926
|
+
datas = this.optionDatas[this.field || this.prop][index + 1].filter(
|
|
927
|
+
(items) => {
|
|
928
|
+
return filte == items[item.filtrateKey];
|
|
929
|
+
}
|
|
930
|
+
);
|
|
931
|
+
}
|
|
932
|
+
if (datas.length == 0) {
|
|
933
|
+
let queryKey = item.queryKey;
|
|
934
|
+
let param = {};
|
|
935
|
+
if (queryKey) {
|
|
936
|
+
for (let i in queryKey) {
|
|
937
|
+
param[i] = value[queryKey[i]];
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
let params = util.extend(
|
|
941
|
+
true,
|
|
942
|
+
this.sysCode ? { sysAppCode: this.sysCode, code: sysCode } : {},
|
|
943
|
+
item.param ? item.param : {},
|
|
944
|
+
param
|
|
945
|
+
);
|
|
946
|
+
util
|
|
947
|
+
.ajax({
|
|
948
|
+
url: this.sysCode ? this.findCode : item.url,
|
|
949
|
+
method: this.method,
|
|
950
|
+
params: params,
|
|
951
|
+
data: params
|
|
952
|
+
})
|
|
953
|
+
.then((res) => {
|
|
954
|
+
if (res.rCode === 0) {
|
|
955
|
+
let options = JSON.parse(
|
|
956
|
+
JSON.stringify(this.optionDatas[this.sysCode])
|
|
957
|
+
);
|
|
958
|
+
if (options[index + 1]) {
|
|
959
|
+
options[index + 1] = options[index + 1].concat(
|
|
960
|
+
JSON.parse(JSON.stringify(res.results))
|
|
961
|
+
);
|
|
962
|
+
} else {
|
|
963
|
+
options.push(JSON.parse(JSON.stringify(res.results)));
|
|
964
|
+
}
|
|
965
|
+
this.$set(this.optionDatas, this.sysCode, options);
|
|
966
|
+
} else {
|
|
967
|
+
let msg = res.msg || '系统错误,请联系管理员!';
|
|
968
|
+
this.$message.error(msg);
|
|
969
|
+
}
|
|
970
|
+
})
|
|
971
|
+
.catch((err) => {
|
|
972
|
+
if (err.message && err.message !== 'canceled') {
|
|
973
|
+
this.$message.error(err.message);
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
this.events && this.events.change && this.events.change(datas);
|
|
980
|
+
this.$emit('formChange', datas);
|
|
981
|
+
this.$emit('form-change', datas);
|
|
982
|
+
},
|
|
983
|
+
handleClick(data) {
|
|
984
|
+
this.$emit('handleClick', data);
|
|
985
|
+
this.$emit('handle-click', data);
|
|
986
|
+
},
|
|
987
|
+
formatDate(date, fmt) {
|
|
988
|
+
return date ? util.formatDate(date, fmt) : this.dateValue;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
</script>
|