agilebuilder-ui 1.1.37-sit1 → 1.1.37-sit2
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/{401-ce7358c2.js → 401-c46a3b20.js} +1 -1
- package/lib/{404-8a0c9304.js → 404-c35a937a.js} +1 -1
- package/lib/{iframe-page-53f52856.js → iframe-page-10e94ddd.js} +1 -1
- package/lib/{index-2e61e67f.js → index-f92e8ddb.js} +11808 -11772
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +80 -80
- package/lib/{tab-content-iframe-index-e0a67343.js → tab-content-iframe-index-8113610a.js} +1 -1
- package/lib/{tab-content-index-fd4f9ad4.js → tab-content-index-3b7f4fa8.js} +1 -1
- package/lib/{tache-subprocess-history-7381fba2.js → tache-subprocess-history-75f40d2a.js} +1 -1
- package/package.json +1 -1
- package/packages/super-grid/src/components/grid-radio-input.vue +104 -0
- package/packages/super-grid/src/dynamic-input.vue +25 -17
- package/packages/super-grid/src/formValidatorUtil.js +7 -2
- package/packages/super-grid/src/search-form-item.vue +444 -460
- package/packages/super-grid/src/super-grid.vue +22 -3
- package/packages/super-grid/src/utils.js +3 -3
- package/packages/utils/value-set.js +25 -33
|
@@ -1,500 +1,484 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<el-form-item
|
|
3
|
+
:label-width="labelWidth ?? (column.querySetting ? getLabelWidth(column.querySetting) : '110px')"
|
|
4
|
+
:prop="column.prop"
|
|
5
|
+
>
|
|
6
|
+
<template v-slot:label>
|
|
7
|
+
<span
|
|
8
|
+
:title="(column.searchLabel ?? column.label).replace(/\\n/g, '</br>')"
|
|
9
|
+
v-html="(column.searchLabel ?? column.label).replace(/\\n/g, '</br>')"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
<span v-if="customComponent(column) === true">
|
|
10
13
|
<component
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
:is="column.componentName"
|
|
15
|
+
:ref="column.componentName"
|
|
16
|
+
:entity="searchForm"
|
|
17
|
+
:additional-settings="controlConfig"
|
|
18
|
+
:model-value="getFormItemValue(column.prop)"
|
|
19
|
+
:prop="column.prop"
|
|
20
|
+
:row="searchForm"
|
|
21
|
+
:select-options="column.valueSet"
|
|
22
|
+
class="customComponent"
|
|
23
|
+
@change="setValueToModelProp(column.prop, $event, column.componentName)"
|
|
21
24
|
/>
|
|
22
25
|
</span>
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
<!-- 日期区间-两个输入框方式 -->
|
|
27
|
+
<span v-else-if="column.componentType === 'dateSection'">
|
|
25
28
|
<el-date-picker
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
v-model="searchForm[column.prop][0]"
|
|
30
|
+
:placeholder="$t('imatrixUIMessage.startDate')"
|
|
31
|
+
:style="column.searchControlWidth"
|
|
32
|
+
type="date"
|
|
33
|
+
@change="setValueToModelProp(column.prop, $event, null, 0)"
|
|
31
34
|
/>
|
|
32
35
|
<el-date-picker
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
v-model="searchForm[column.prop][1]"
|
|
37
|
+
:placeholder="$t('imatrixUIMessage.endDate')"
|
|
38
|
+
:style="column.searchControlWidth"
|
|
39
|
+
type="date"
|
|
40
|
+
@change="setValueToModelProp(column.prop, $event, null, 1)"
|
|
38
41
|
/>
|
|
39
42
|
</span>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
@change="setValueToModelProp(column.prop,$event)"
|
|
89
|
-
/>
|
|
90
|
-
|
|
91
|
-
<el-time-picker
|
|
92
|
-
v-else-if="
|
|
93
|
-
column.componentType === 'timepicker' &&
|
|
94
|
-
column.dataType !== 'TIME' &&
|
|
95
|
-
column.dataType !== 'DATE'
|
|
96
|
-
"
|
|
97
|
-
v-model="searchForm[column.prop]"
|
|
98
|
-
:placeholder="$t('imatrixUIMessage.selectTime')"
|
|
99
|
-
style="width: 100%"
|
|
100
|
-
type="fixed-time"
|
|
101
|
-
format="HH:mm:ss"
|
|
102
|
-
value-format="HH:mm:ss"
|
|
103
|
-
@change="setValueToModelProp(column.prop,$event)"
|
|
104
|
-
/>
|
|
43
|
+
<!--后面再优化年份及年份区间控件--->
|
|
44
|
+
<year-range-picker
|
|
45
|
+
v-else-if="column.componentType === 'yearRange'"
|
|
46
|
+
:value="getFormItemValue(column.prop)"
|
|
47
|
+
type="yearRange"
|
|
48
|
+
@change="setYearRangeValue(column.prop, $event)"
|
|
49
|
+
/>
|
|
50
|
+
<el-date-picker
|
|
51
|
+
v-else-if="column.componentType === 'dateTimePicker'"
|
|
52
|
+
:default-time="getDefaultTime(column)"
|
|
53
|
+
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
54
|
+
v-model="searchForm[column.prop]"
|
|
55
|
+
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
56
|
+
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
57
|
+
:style="column.searchControlWidth"
|
|
58
|
+
type="datetimerange"
|
|
59
|
+
unlink-panels
|
|
60
|
+
format="YYYY-MM-DD HH:mm:ss"
|
|
61
|
+
value-format="YYYY-MM-DD HH:mm:ss"
|
|
62
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
63
|
+
/>
|
|
64
|
+
<!--:model-value="getFormItemValue(column.prop)"改成v-model="searchForm[column.prop]" 是因为新页面查询日期时会无法选中日期-->
|
|
65
|
+
<el-date-picker
|
|
66
|
+
v-else-if="column.dataType === 'DATE' || column.componentType === 'date'"
|
|
67
|
+
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
68
|
+
v-model="searchForm[column.prop]"
|
|
69
|
+
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
70
|
+
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
71
|
+
:style="column.searchControlWidth"
|
|
72
|
+
type="daterange"
|
|
73
|
+
unlink-panels
|
|
74
|
+
format="YYYY-MM-DD"
|
|
75
|
+
value-format="YYYY-MM-DD"
|
|
76
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
77
|
+
/>
|
|
78
|
+
<el-date-picker
|
|
79
|
+
v-else-if="column.dataType === 'TIME' && column.componentType === 'timepicker'"
|
|
80
|
+
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
81
|
+
v-model="searchForm[column.prop]"
|
|
82
|
+
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
83
|
+
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
84
|
+
:style="column.searchControlWidth"
|
|
85
|
+
type="datetimerange"
|
|
86
|
+
unlink-panels
|
|
87
|
+
format="HH:mm:ss"
|
|
88
|
+
value-format="HH:mm:ss"
|
|
89
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
90
|
+
/>
|
|
105
91
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
92
|
+
<el-time-picker
|
|
93
|
+
v-else-if="column.componentType === 'timepicker' && column.dataType !== 'TIME' && column.dataType !== 'DATE'"
|
|
94
|
+
v-model="searchForm[column.prop]"
|
|
95
|
+
:placeholder="$t('imatrixUIMessage.selectTime')"
|
|
96
|
+
style="width: 100%"
|
|
97
|
+
type="fixed-time"
|
|
98
|
+
format="HH:mm:ss"
|
|
99
|
+
value-format="HH:mm:ss"
|
|
100
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
101
|
+
/>
|
|
116
102
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
column.componentType === '
|
|
103
|
+
<organization-input
|
|
104
|
+
v-else-if="componentTypeTypeIsTree(column.componentType)"
|
|
105
|
+
:fields="getTreeFields(column.orgTreeSet)"
|
|
106
|
+
:models="searchForm"
|
|
107
|
+
:multiple="getTreeIsMultiTree(column.componentType)"
|
|
108
|
+
:tree-type="getTreeType(column.componentType)"
|
|
109
|
+
:value="getFormItemValue(column.prop)"
|
|
110
|
+
@clear="clearOrganizationInputEvent"
|
|
111
|
+
@setValue="organizationInputEvent"
|
|
112
|
+
/>
|
|
113
|
+
<el-select
|
|
114
|
+
v-else-if="column?.componentType === 'radio'"
|
|
115
|
+
:model-value="getFormItemValue(column.prop)"
|
|
116
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
117
|
+
:style="column.searchControlWidth"
|
|
118
|
+
clearable
|
|
119
|
+
filterable
|
|
120
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
121
|
+
>
|
|
122
|
+
<el-option v-for="item in column.valueSet" :key="item.value" :label="item.label" :value="item.value" />
|
|
123
|
+
</el-select>
|
|
124
|
+
<el-select
|
|
125
|
+
v-else-if="
|
|
126
|
+
((column.componentType && column.componentType === 'select') || column.dataType === 'BOOLEAN') &&
|
|
141
127
|
!isDynamicDataSourceSource(column)
|
|
142
128
|
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
129
|
+
:model-value="getFormItemValue(column.prop)"
|
|
130
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
131
|
+
:style="column.searchControlWidth"
|
|
132
|
+
clearable
|
|
133
|
+
filterable
|
|
134
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
135
|
+
>
|
|
136
|
+
<el-option v-for="item in column.valueSet" :key="item.value" :label="item.label" :value="item.value" />
|
|
137
|
+
</el-select>
|
|
138
|
+
<el-select
|
|
139
|
+
v-else-if="column.componentType && column.componentType === 'multiselect' && !isDynamicDataSourceSource(column)"
|
|
140
|
+
:model-value="getFormItemValue(column.prop)"
|
|
141
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
142
|
+
:style="column.searchControlWidth"
|
|
143
|
+
clearable
|
|
144
|
+
collapse-tags
|
|
145
|
+
filterable
|
|
146
|
+
multiple
|
|
147
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
148
|
+
>
|
|
149
|
+
<el-option v-for="item in column.valueSet" :key="item.value" :label="item.label" :value="item.value" />
|
|
150
|
+
</el-select>
|
|
151
|
+
<dynamic-source-select
|
|
152
|
+
v-else-if="
|
|
161
153
|
column.componentType &&
|
|
162
|
-
(column.componentType === 'multiselect' ||
|
|
163
|
-
column.componentType === 'select') &&
|
|
154
|
+
(column.componentType === 'multiselect' || column.componentType === 'select') &&
|
|
164
155
|
isDynamicDataSourceSource(column)
|
|
165
156
|
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
multiple: column.componentType === 'multiselect' ? true : false
|
|
157
|
+
:allow-create="true"
|
|
158
|
+
:base-props="{
|
|
159
|
+
multiple: column.componentType === 'multiselect' ? true : false
|
|
169
160
|
}"
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
161
|
+
:entity="searchForm"
|
|
162
|
+
:filterable="true"
|
|
163
|
+
:is-join-table="isJoinTable"
|
|
164
|
+
:list-code="code"
|
|
165
|
+
:list-toolbar-form-data="listToolbarFormData"
|
|
166
|
+
:options="getDynamicDataSourceOptions(column)"
|
|
167
|
+
:table-name="tableName"
|
|
168
|
+
:value="getFormItemValue(column.prop)"
|
|
169
|
+
@input="setValueToModelProp(column.prop, $event)"
|
|
170
|
+
/>
|
|
171
|
+
<!--
|
|
181
172
|
<el-input-number
|
|
182
173
|
v-else-if="column.componentType && column.componentType==='inputNumber'"
|
|
183
174
|
:value="getFormItemValue(column.prop)"
|
|
184
175
|
@input="setValueToModelProp(column.prop,$event)"
|
|
185
176
|
/> -->
|
|
186
177
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
178
|
+
<search-form-number
|
|
179
|
+
v-else-if="column.componentType && column.componentType === 'inputNumber'"
|
|
180
|
+
:item-value="searchForm[column.prop]"
|
|
181
|
+
:module-config="moduleConfig"
|
|
182
|
+
@setValue="setNumberValue"
|
|
183
|
+
/>
|
|
193
184
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
185
|
+
<el-switch
|
|
186
|
+
v-else-if="column.componentType && column.componentType === 'switch'"
|
|
187
|
+
:model-value="getFormItemValue(column.prop)"
|
|
188
|
+
:style="column.searchControlWidth"
|
|
189
|
+
active-color="#13ce66"
|
|
190
|
+
inactive-color="#ff4949"
|
|
191
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
192
|
+
/>
|
|
193
|
+
<el-slider
|
|
194
|
+
v-else-if="column.componentType && column.componentType === 'slider'"
|
|
195
|
+
:model-value="getFormItemValue(column.prop)"
|
|
196
|
+
:style="column.searchControlWidth"
|
|
197
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
198
|
+
/>
|
|
208
199
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
200
|
+
<el-rate
|
|
201
|
+
v-else-if="column.componentType && column.componentType === 'rate'"
|
|
202
|
+
:model-value="getFormItemValue(column.prop)"
|
|
203
|
+
:style="column.searchControlWidth"
|
|
204
|
+
@change="setValueToModelProp(column.prop, $event)"
|
|
205
|
+
/>
|
|
206
|
+
<el-input
|
|
207
|
+
v-else
|
|
208
|
+
:model-value="getFormItemValue(column.prop)"
|
|
209
|
+
:style="column.searchControlWidth"
|
|
210
|
+
@keyup.enter="submitForm('searchForm')"
|
|
211
|
+
@input="setValueToModelProp(column.prop, $event)"
|
|
212
|
+
/>
|
|
213
|
+
</el-form-item>
|
|
223
214
|
</template>
|
|
224
215
|
|
|
225
216
|
<script>
|
|
226
|
-
import {$emit} from '../../utils/gogocodeTransfer'
|
|
217
|
+
import { $emit } from '../../utils/gogocodeTransfer'
|
|
227
218
|
import searchMethods from './search-methods'
|
|
228
219
|
import searchFormNumber from './search-form-number.vue'
|
|
229
220
|
import store from './store'
|
|
230
|
-
import {getDynamicDataSourceOptions, isDynamicDataSourceSource, getControlConfig} from './utils'
|
|
221
|
+
import { getDynamicDataSourceOptions, isDynamicDataSourceSource, getControlConfig } from './utils'
|
|
231
222
|
|
|
232
223
|
export default {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
487
|
-
} else {
|
|
488
|
-
return ['00:00:00']
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
},
|
|
492
|
-
emits: ['submit-form'],
|
|
224
|
+
name: 'SearchFormItem',
|
|
225
|
+
components: {
|
|
226
|
+
searchFormNumber
|
|
227
|
+
},
|
|
228
|
+
inject: ['getListToolbarFormData'],
|
|
229
|
+
props: {
|
|
230
|
+
column: {
|
|
231
|
+
type: Object,
|
|
232
|
+
default: null
|
|
233
|
+
},
|
|
234
|
+
code: {
|
|
235
|
+
type: String,
|
|
236
|
+
default: null
|
|
237
|
+
},
|
|
238
|
+
isSql: {
|
|
239
|
+
type: Boolean,
|
|
240
|
+
default: false
|
|
241
|
+
},
|
|
242
|
+
tableName: {
|
|
243
|
+
type: String,
|
|
244
|
+
default: null
|
|
245
|
+
},
|
|
246
|
+
isJoinTable: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: false
|
|
249
|
+
},
|
|
250
|
+
// 查询表单信息
|
|
251
|
+
searchForm: {
|
|
252
|
+
type: Object,
|
|
253
|
+
default: null
|
|
254
|
+
},
|
|
255
|
+
index: {
|
|
256
|
+
type: Number,
|
|
257
|
+
default: 0
|
|
258
|
+
},
|
|
259
|
+
length: {
|
|
260
|
+
type: Number,
|
|
261
|
+
default: 0
|
|
262
|
+
},
|
|
263
|
+
loadCompleteQuery: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
default: false
|
|
266
|
+
},
|
|
267
|
+
labelWidth: {
|
|
268
|
+
type: [String, Number, undefined],
|
|
269
|
+
default: undefined
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
data() {
|
|
273
|
+
const customComponentNames = new Set()
|
|
274
|
+
return {
|
|
275
|
+
customComponentNames: customComponentNames,
|
|
276
|
+
dateOne: null,
|
|
277
|
+
dataTwo: null,
|
|
278
|
+
moduleConfig: {},
|
|
279
|
+
dateVal: this.getFormItemValue(this.column.prop),
|
|
280
|
+
controlConfig: getControlConfig(this.column)
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
computed: {
|
|
284
|
+
listToolbarFormData() {
|
|
285
|
+
const data = this.getListToolbarFormData()
|
|
286
|
+
if (data && data.listToolbarFormData) {
|
|
287
|
+
return data.listToolbarFormData
|
|
288
|
+
}
|
|
289
|
+
return null
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
created() {
|
|
293
|
+
if (this.column.valueSetOptions) {
|
|
294
|
+
this.moduleConfig = JSON.parse(this.column.valueSetOptions)
|
|
295
|
+
}
|
|
296
|
+
console.log('searchitem页面', this.column)
|
|
297
|
+
},
|
|
298
|
+
mounted() {
|
|
299
|
+
// 查询页面加载完成
|
|
300
|
+
if (this.index + 1 === this.length && this.loadCompleteQuery) {
|
|
301
|
+
$emit(this, 'submit-form')
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
methods: {
|
|
305
|
+
...searchMethods,
|
|
306
|
+
getDynamicDataSourceOptions(column) {
|
|
307
|
+
const gridParams = store.get(this.code)
|
|
308
|
+
let baseURL = gridParams.options.backendUrl
|
|
309
|
+
if (!baseURL) {
|
|
310
|
+
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
311
|
+
}
|
|
312
|
+
return getDynamicDataSourceOptions(column, this.isSql, gridParams.additionalParamMap, baseURL)
|
|
313
|
+
},
|
|
314
|
+
// 值设置是否是动态数据源类型的数据源
|
|
315
|
+
isDynamicDataSourceSource(column) {
|
|
316
|
+
return isDynamicDataSourceSource(column)
|
|
317
|
+
},
|
|
318
|
+
setValueToModelProp(prop, value, componentName, index) {
|
|
319
|
+
console.log(
|
|
320
|
+
'%c描述-105004',
|
|
321
|
+
'color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',
|
|
322
|
+
prop,
|
|
323
|
+
value,
|
|
324
|
+
componentName,
|
|
325
|
+
index
|
|
326
|
+
)
|
|
327
|
+
if (prop && prop.indexOf('.') > 0) {
|
|
328
|
+
const parentOjbect = this.getParentObject(prop)
|
|
329
|
+
// 嵌套属性中的最后一个属性是属于这个中间父对象的,所有要通过中间父对象来赋值
|
|
330
|
+
if (index != null && index !== undefined) {
|
|
331
|
+
// parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index] = value
|
|
332
|
+
parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index] = value
|
|
333
|
+
} else {
|
|
334
|
+
parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)] = value
|
|
335
|
+
}
|
|
336
|
+
} else {
|
|
337
|
+
if (index != null && index !== undefined) {
|
|
338
|
+
this.searchForm[prop][index] = value
|
|
339
|
+
} else {
|
|
340
|
+
this.searchForm[prop] = value
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
getLabelWidth(querySetting) {
|
|
345
|
+
const configData = JSON.parse(querySetting)
|
|
346
|
+
if (configData.labelWidth !== '' && configData.labelWidth !== null && configData.labelWidth !== undefined) {
|
|
347
|
+
return configData.labelWidth + 'px'
|
|
348
|
+
} else {
|
|
349
|
+
return '110px'
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
componentTypeTypeIsTree(componentType) {
|
|
353
|
+
if (componentType) {
|
|
354
|
+
if (componentType.indexOf('DeptManTree') > 0) {
|
|
355
|
+
// 说明是部门人员树
|
|
356
|
+
return true
|
|
357
|
+
}
|
|
358
|
+
if (componentType.indexOf('DeptTree') > 0) {
|
|
359
|
+
// 说明是部门树
|
|
360
|
+
return true
|
|
361
|
+
}
|
|
362
|
+
if (componentType.indexOf('WgManTree') > 0) {
|
|
363
|
+
// 说明是工作组人员树
|
|
364
|
+
return true
|
|
365
|
+
}
|
|
366
|
+
if (componentType.indexOf('WgManTree') > 0) {
|
|
367
|
+
// 说明是工作组树
|
|
368
|
+
return true
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return false
|
|
372
|
+
},
|
|
373
|
+
getTreeFields(orgTreeSetJson) {
|
|
374
|
+
if (orgTreeSetJson && orgTreeSetJson !== '') {
|
|
375
|
+
const orgTreeSet = JSON.parse(orgTreeSetJson)
|
|
376
|
+
if (orgTreeSet.length) {
|
|
377
|
+
return orgTreeSet
|
|
378
|
+
} else {
|
|
379
|
+
if (orgTreeSet.orgTreeSetArr) {
|
|
380
|
+
return orgTreeSet.orgTreeSetArr
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
getTreeIsMultiTree(componentType) {
|
|
386
|
+
if (componentType && componentType.indexOf('single') >= 0 && componentType.indexOf('Tree') > 0) {
|
|
387
|
+
return false
|
|
388
|
+
} else {
|
|
389
|
+
return true
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
getTreeType(componentType) {
|
|
393
|
+
if (componentType) {
|
|
394
|
+
if (componentType.indexOf('DeptManTree') > 0) {
|
|
395
|
+
// 说明是部门人员树
|
|
396
|
+
return 'DeptUserTree'
|
|
397
|
+
}
|
|
398
|
+
if (componentType.indexOf('DeptTree') > 0) {
|
|
399
|
+
// 说明是部门树
|
|
400
|
+
return 'DeptTree'
|
|
401
|
+
}
|
|
402
|
+
if (componentType.indexOf('WgTree') > 0) {
|
|
403
|
+
// 说明是工作组人员树
|
|
404
|
+
return 'WgTree'
|
|
405
|
+
}
|
|
406
|
+
if (componentType.indexOf('WgManTree') > 0) {
|
|
407
|
+
// 说明是工作组树
|
|
408
|
+
return 'WgUserTree'
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
// 组织结构树文本框值改变事件
|
|
413
|
+
organizationInputEvent(prop, value) {
|
|
414
|
+
if (prop) {
|
|
415
|
+
// 必须手动调用一下input事件,否则不会更新组件的值
|
|
416
|
+
this.searchForm[prop] = value
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
// 组织结构树文本框值清空事件
|
|
420
|
+
clearOrganizationInputEvent(prop) {
|
|
421
|
+
if (prop) {
|
|
422
|
+
// 必须手动调用一下input事件,否则不会更新组件的值
|
|
423
|
+
this.searchForm[prop] = null
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
customComponent(column) {
|
|
427
|
+
const gridParams = store.get(this.code)
|
|
428
|
+
if (column.componentName && column.componentName !== '') {
|
|
429
|
+
this.customComponentNames.add(column.componentName)
|
|
430
|
+
return true
|
|
431
|
+
}
|
|
432
|
+
if (
|
|
433
|
+
(!column.componentName || column.componentName === '') &&
|
|
434
|
+
gridParams.options &&
|
|
435
|
+
gridParams.options.search &&
|
|
436
|
+
gridParams.options.search.customSearchElements
|
|
437
|
+
) {
|
|
438
|
+
// 定义了自定义查询组件
|
|
439
|
+
const propSearchEle = gridParams.options.search.customSearchElements[column.prop]
|
|
440
|
+
// console.log('customComponent-customSearchElements-propSearchEle-', column.prop)
|
|
441
|
+
if (propSearchEle) {
|
|
442
|
+
column.componentName = 'custom-' + column.prop
|
|
443
|
+
const component = propSearchEle.call(this, column)
|
|
444
|
+
// console.log('customComponent-customSearchElements-')
|
|
445
|
+
if (component) {
|
|
446
|
+
this.customComponentNames.add(column.componentName)
|
|
447
|
+
window.$vueApp.component(column.componentName, component)
|
|
448
|
+
return true
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return false
|
|
453
|
+
},
|
|
454
|
+
setNumberValue(value, r, n) {
|
|
455
|
+
let itemValue = this.getFormItemValue(this.column.prop)
|
|
456
|
+
itemValue = value
|
|
457
|
+
this.setValueToModelProp(this.column.prop, itemValue)
|
|
458
|
+
},
|
|
459
|
+
setYearRangeValue(prop, value) {
|
|
460
|
+
this.searchForm[prop][0] = value[0]
|
|
461
|
+
this.searchForm[prop][1] = value[1]
|
|
462
|
+
},
|
|
463
|
+
getDefaultTime(column) {
|
|
464
|
+
if (column['valueSetOptions']) {
|
|
465
|
+
const valueSetOptions = JSON.parse(column['valueSetOptions'])
|
|
466
|
+
if (valueSetOptions.defaultTime) {
|
|
467
|
+
return [valueSetOptions.defaultTime, valueSetOptions.defaultTime]
|
|
468
|
+
} else {
|
|
469
|
+
return ['00:00:00']
|
|
470
|
+
}
|
|
471
|
+
} else {
|
|
472
|
+
return ['00:00:00']
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
emits: ['submit-form']
|
|
493
477
|
}
|
|
494
478
|
</script>
|
|
495
479
|
|
|
496
480
|
<style lang="scss" scoped>
|
|
497
481
|
:deep(.el-range-separator) {
|
|
498
|
-
|
|
482
|
+
min-width: 20px;
|
|
499
483
|
}
|
|
500
484
|
</style>
|