imatrix-ui 0.2.6-up → 0.2.7-up
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/README.md +7 -7
- package/index.html +13 -13
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +2724 -1932
- package/lib/super-ui.umd.cjs +24 -24
- package/package.json +1 -1
- package/packages/IntervalSelection/index.js +6 -6
- package/packages/IntervalSelection/src/quarterScope.vue +405 -405
- package/packages/IntervalSelection/src/sectionDate.vue +475 -475
- package/packages/breadcrumb/index.js +6 -6
- package/packages/breadcrumb/src/breadcrumb.vue +81 -81
- package/packages/department-tree/index.js +6 -6
- package/packages/department-tree/src/department-tree.vue +113 -113
- package/packages/department-tree-inline/index.js +6 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +472 -472
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +340 -340
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -86
- package/packages/department-tree-inline/src/department-tree-service.js +344 -344
- package/packages/department-tree-inline/src/search-result.vue +235 -235
- package/packages/department-user-tree/index.js +6 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +129 -129
- package/packages/department-user-tree/src/department-user-single-tree.vue +94 -94
- package/packages/department-user-tree/src/department-user-tree.vue +114 -114
- package/packages/department-user-tree-inline/index.js +9 -9
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +731 -731
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +334 -334
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +87 -87
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +309 -309
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +179 -179
- package/packages/department-user-tree-inline/src/search-result.vue +273 -273
- package/packages/directives/prevent-reclick.js +22 -22
- package/packages/dynamic-source-select/index.js +6 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +106 -106
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +675 -675
- package/packages/dynamic-source-select/src/events.js +78 -78
- package/packages/fs-preview/index.js +6 -6
- package/packages/fs-preview/src/fs-preview.vue +287 -287
- package/packages/fs-upload/index.js +6 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +443 -443
- package/packages/fs-upload/src/fs-upload-single.vue +353 -353
- package/packages/fs-upload/src/fs-upload.vue +191 -191
- package/packages/fs-upload/src/see-big-picture.vue +67 -67
- package/packages/fs-upload-list/index.js +6 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +372 -372
- package/packages/hamburger/index.js +6 -6
- package/packages/hamburger/src/hamburger.vue +40 -40
- package/packages/index.js +123 -123
- package/packages/multipart-upload/index.js +6 -6
- package/packages/multipart-upload/src/index.vue +66 -66
- package/packages/multipart-upload/src/multipart-upload-form.vue +377 -377
- package/packages/multipart-upload/src/multipart-upload-list.vue +517 -517
- package/packages/organization-input/index.js +6 -6
- package/packages/organization-input/src/organization-input.vue +583 -583
- package/packages/plugins/export-data-new.js +623 -623
- package/packages/plugins/export-data.js +431 -431
- package/packages/plugins/index.js +15 -15
- package/packages/plugins/public-method.js +47 -47
- package/packages/remove-department/index.js +6 -6
- package/packages/remove-department/src/remove-department.vue +200 -200
- package/packages/remove-department/src/remove-dept-service.js +31 -31
- package/packages/remove-user/index.js +6 -6
- package/packages/remove-user/src/remove-user-service.js +31 -31
- package/packages/remove-user/src/remove-user.vue +226 -226
- package/packages/remove-workgroup/index.js +6 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +31 -31
- package/packages/remove-workgroup/src/remove-workgroup.vue +183 -183
- package/packages/rich-editor/index.js +7 -7
- package/packages/rich-editor/index.vue +297 -297
- package/packages/rich-editor/langs/zh-Hans.js +438 -438
- package/packages/rich-editor/viewer.vue +105 -105
- package/packages/scan-code-input/index.js +6 -6
- package/packages/scan-code-input/src/events.js +34 -34
- package/packages/scan-code-input/src/scan-code-input-colse.vue +140 -140
- package/packages/scan-code-input/src/scan-code-input.vue +132 -132
- package/packages/secret-info/index.js +7 -7
- package/packages/secret-info/index.vue +100 -100
- package/packages/super-grid/index.js +7 -7
- package/packages/super-grid/src/apis.js +1092 -1092
- package/packages/super-grid/src/columns-config.vue +427 -427
- package/packages/super-grid/src/custom-formatter.js +394 -394
- package/packages/super-grid/src/eventBus.js +2 -2
- package/packages/super-grid/src/events.js +56 -56
- package/packages/super-grid/src/formValidatorUtil.js +300 -300
- package/packages/super-grid/src/formatter.js +196 -196
- package/packages/super-grid/src/group-column.vue +99 -99
- package/packages/super-grid/src/header-context-menu.vue +82 -82
- package/packages/super-grid/src/index-column.vue +69 -69
- package/packages/super-grid/src/public-methods.js +30 -30
- package/packages/super-grid/src/row-operation.vue +193 -193
- package/packages/super-grid/src/search-button.vue +74 -74
- package/packages/super-grid/src/search-condition-input.vue +73 -73
- package/packages/super-grid/src/search-condition-list.vue +68 -68
- package/packages/super-grid/src/search-form-advancedQuery.vue +819 -819
- package/packages/super-grid/src/search-form-dialog.vue +77 -77
- package/packages/super-grid/src/search-form-item.vue +495 -495
- package/packages/super-grid/src/search-form-number.vue +111 -111
- package/packages/super-grid/src/search-form-ordinarySearch.vue +239 -239
- package/packages/super-grid/src/search-form.vue +762 -762
- package/packages/super-grid/src/search-methods.js +592 -592
- package/packages/super-grid/src/selection-column.vue +46 -46
- package/packages/super-grid/src/store.js +3 -3
- package/packages/super-grid/src/super-grid-service.js +728 -728
- package/packages/super-grid/src/super-grid.vue +3011 -3011
- package/packages/super-grid/src/utils.js +880 -880
- package/packages/super-grid/src/view-image-dialog.vue +176 -176
- package/packages/super-nine-grid/index.js +7 -7
- package/packages/super-nine-grid/src/apis.js +108 -108
- package/packages/super-nine-grid/src/custom-formatter.js +73 -73
- package/packages/super-nine-grid/src/formatter.js +134 -134
- package/packages/super-nine-grid/src/search-form-number.vue +35 -35
- package/packages/super-nine-grid/src/search-form.vue +700 -700
- package/packages/super-nine-grid/src/search-methods.js +151 -151
- package/packages/super-nine-grid/src/store.js +3 -3
- package/packages/super-nine-grid/src/super-grid-service.js +107 -107
- package/packages/svg-icon/index.js +6 -6
- package/packages/svg-icon/src/svg-icon.vue +43 -43
- package/packages/utils/date-util.js +292 -292
- package/packages/utils/dom.js +227 -227
- package/packages/utils/gogocodeTransfer.js +59 -59
- package/packages/utils/memory-cache-utils.js +117 -117
- package/packages/utils/utils.js +180 -180
- package/packages/utils/value-set.js +97 -97
- package/packages/valid-code/index.js +7 -7
- package/packages/valid-code/src/valid-code.vue +104 -104
- package/packages/workflow-button/index.js +6 -6
- package/packages/workflow-button/src/workflow-button.vue +550 -550
- package/packages/workflow-history-list/index.js +6 -6
- package/packages/workflow-history-list/src/api.js +7 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +291 -291
- package/packages/workgroup-tree/index.js +6 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +86 -86
- package/packages/workgroup-tree-inline/index.js +6 -6
- package/packages/workgroup-tree-inline/src/search-result.vue +222 -222
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +516 -516
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +93 -93
- package/packages/workgroup-user-tree/index.js +6 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +103 -103
- package/packages/workgroup-user-tree-inline/index.js +9 -9
- package/packages/workgroup-user-tree-inline/src/search-result.vue +266 -266
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +239 -239
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +657 -657
- package/packages/year-range-picker/index.js +6 -6
- package/packages/year-range-picker/src/year-range-picker.vue +53 -53
- package/src/api/sso-service.js +172 -172
- package/src/api/tab.js +36 -36
- package/src/api/user-service.js +11 -11
- package/src/directives/permission/index.js +13 -13
- package/src/directives/permission/permission.js +20 -20
- package/src/i18n/langs/cn.js +259 -259
- package/src/i18n/langs/en.js +269 -269
- package/src/index.js +93 -93
- package/src/plugins.js +18 -18
- package/src/router/index.js +8 -26
- package/src/store/getters.js +15 -15
- package/src/store/index.js +19 -19
- package/src/store/modules/app.js +54 -54
- package/src/store/modules/tab-content.js +36 -36
- package/src/store/modules/user.js +285 -285
- package/src/utils/auth.js +61 -61
- package/src/utils/calculator/calculator-factory-wf.js +558 -558
- package/src/utils/calculator/calculator-factory.js +145 -145
- package/src/utils/calculator/calculator-util.js +166 -166
- package/src/utils/eventBus.js +2 -2
- package/src/utils/iconUtils.js +28 -28
- package/src/utils/index.js +102 -102
- package/src/utils/jump-page-utils.js +824 -824
- package/src/utils/menu.js +19 -19
- package/src/utils/permission.js +31 -31
- package/src/utils/permissionAuth.js +96 -96
- package/src/utils/range-selector.js +188 -188
- package/src/utils/request.js +269 -269
- package/src/utils/restful-interface-utils.js +57 -57
- package/src/utils/util.js +703 -703
- package/src/utils/validate.js +34 -34
- package/src/utils/watermark.js +108 -108
- package/src/utils/workflow-util.js +93 -93
- package/src/views/404.vue +248 -248
- package/src/views/dsc-component/Sidebar/Item.vue +84 -84
- package/src/views/dsc-component/Sidebar/Link.vue +38 -38
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +198 -198
- package/src/views/dsc-component/Sidebar/index.vue +229 -229
- package/src/views/dsc-component/tabs/tab-content.vue +203 -203
- package/src/views/error-page/401.vue +106 -106
- package/src/views/error-page/404.vue +248 -248
- package/src/views/layout/EmptyLayout.vue +3 -3
- package/src/views/layout/Layout.vue +81 -81
- package/src/views/layout/NewLayout.vue +18 -18
- package/src/views/layout/components/AppMain.vue +39 -39
- package/src/views/layout/components/Breadcrumb/index.vue +158 -158
- package/src/views/layout/components/Menubar/Item.vue +79 -79
- package/src/views/layout/components/Menubar/Link.vue +38 -38
- package/src/views/layout/components/Menubar/index.vue +210 -210
- package/src/views/layout/components/Sidebar/Item.vue +53 -53
- package/src/views/layout/components/Sidebar/Link.vue +38 -38
- package/src/views/layout/components/Sidebar/index.vue +141 -141
- package/src/views/layout/components/iframe-page.vue +38 -38
- package/src/views/layout/components/index.js +4 -4
- package/src/views/layout/components/tabs/tab-content.vue +207 -207
- package/src/views/layout/mixin/ResizeHandler.js +41 -41
- package/src/views/layout/tab-content-iframe-index.vue +38 -38
- package/src/views/layout/tab-content-index.vue +93 -93
- package/src/views/login/authredirect.vue +10 -10
- package/src/views/login/index.vue +296 -296
- package/src/views/login/update-password.vue +243 -243
- package/src/views/redirect/index.vue +14 -14
- package/src/views/wf-history/tache-subprocess-history.vue +45 -45
|
@@ -1,819 +1,819 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="formFlag">
|
|
3
|
-
<!-- <el-row style="padding-bottom: 8px">
|
|
4
|
-
<el-button type="primary" size="mini" plain icon="el-icon-circle-plus-outline" @click="add">
|
|
5
|
-
{{ $t('imatrixUIPublicModel.add') }}
|
|
6
|
-
</el-button>
|
|
7
|
-
<el-button type="primary" size="mini" plain icon="el-icon-delete" @click="remove">
|
|
8
|
-
{{ $t('imatrixUIPublicModel.delete') }}
|
|
9
|
-
</el-button>
|
|
10
|
-
</el-row> -->
|
|
11
|
-
<el-table
|
|
12
|
-
ref="table"
|
|
13
|
-
:data="searchFormList"
|
|
14
|
-
:row-class-name="tableRowClassName"
|
|
15
|
-
border
|
|
16
|
-
style="width: 100%"
|
|
17
|
-
highlight-current-row
|
|
18
|
-
@current-change="handleCurrentChange"
|
|
19
|
-
>
|
|
20
|
-
<el-table-column
|
|
21
|
-
:label="$t('imatrixUIPublicModel.edit')"
|
|
22
|
-
fixed="left"
|
|
23
|
-
align="center"
|
|
24
|
-
width="80"
|
|
25
|
-
>
|
|
26
|
-
<template v-slot="scope">
|
|
27
|
-
<el-icon @click="add"><CirclePlus /></el-icon>
|
|
28
|
-
<el-icon @click="remove(scope.$index)"><Remove /></el-icon>
|
|
29
|
-
</template>
|
|
30
|
-
</el-table-column>
|
|
31
|
-
<el-table-column prop="leftBracket" label="(" width="90">
|
|
32
|
-
<template v-slot="scope">
|
|
33
|
-
<el-select
|
|
34
|
-
v-model="scope.row.leftBracket"
|
|
35
|
-
size="small"
|
|
36
|
-
clearable
|
|
37
|
-
@focus="selectRow(scope.row)"
|
|
38
|
-
>
|
|
39
|
-
<el-option label="" value="" />
|
|
40
|
-
<el-option label="(" value="(" />
|
|
41
|
-
<el-option label="((" value="((" />
|
|
42
|
-
<el-option label="(((" value="(((" />
|
|
43
|
-
</el-select>
|
|
44
|
-
</template>
|
|
45
|
-
</el-table-column>
|
|
46
|
-
<el-table-column
|
|
47
|
-
:label="$t('imatrixUIPublicModel.fieldName')"
|
|
48
|
-
width="200"
|
|
49
|
-
>
|
|
50
|
-
<template v-slot="scope">
|
|
51
|
-
<el-select
|
|
52
|
-
v-model="scope.row.prop"
|
|
53
|
-
size="small"
|
|
54
|
-
clearable
|
|
55
|
-
filterable
|
|
56
|
-
@focus="selectRow(scope.row)"
|
|
57
|
-
@change="changeFieldName(scope.$index)"
|
|
58
|
-
>
|
|
59
|
-
<el-option
|
|
60
|
-
v-for="item in searchableColumns"
|
|
61
|
-
:key="item.prop"
|
|
62
|
-
:label="item.label"
|
|
63
|
-
:value="item.prop"
|
|
64
|
-
/>
|
|
65
|
-
</el-select>
|
|
66
|
-
</template>
|
|
67
|
-
</el-table-column>
|
|
68
|
-
<el-table-column :label="$t('imatrixUIPublicModel.operator')" width="110">
|
|
69
|
-
<template v-slot="scope">
|
|
70
|
-
<el-select
|
|
71
|
-
v-model="scope.row.operator"
|
|
72
|
-
size="small"
|
|
73
|
-
clearable
|
|
74
|
-
@focus="selectRow(scope.row)"
|
|
75
|
-
>
|
|
76
|
-
<el-option
|
|
77
|
-
v-for="option in operationArr[scope.$index]"
|
|
78
|
-
:key="option.name"
|
|
79
|
-
:label="option.label"
|
|
80
|
-
:value="option.name"
|
|
81
|
-
/>
|
|
82
|
-
</el-select>
|
|
83
|
-
</template>
|
|
84
|
-
</el-table-column>
|
|
85
|
-
<el-table-column :label="$t('imatrixUIPublicModel.value')">
|
|
86
|
-
<template v-if="scope.row.prop" v-slot="scope">
|
|
87
|
-
<el-date-picker
|
|
88
|
-
v-if="
|
|
89
|
-
scope.row.dataType === 'DATE' ||
|
|
90
|
-
scope.row.componentType === 'date'
|
|
91
|
-
"
|
|
92
|
-
v-model="scope.row.value"
|
|
93
|
-
type="daterange"
|
|
94
|
-
size="small"
|
|
95
|
-
:style="scope.row.searchControlWidth"
|
|
96
|
-
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
97
|
-
unlink-panels
|
|
98
|
-
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
99
|
-
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
100
|
-
value-format="yyyy-MM-dd"
|
|
101
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
102
|
-
@focus="selectRow(scope.row)"
|
|
103
|
-
/>
|
|
104
|
-
|
|
105
|
-
<el-date-picker
|
|
106
|
-
v-else-if="scope.row.componentType === 'dateTimePicker'"
|
|
107
|
-
v-model="scope.row.value"
|
|
108
|
-
type="datetimerange"
|
|
109
|
-
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
110
|
-
unlink-panels
|
|
111
|
-
size="small"
|
|
112
|
-
:style="scope.row.searchControlWidth"
|
|
113
|
-
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
114
|
-
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
115
|
-
value-format="yyyy-MM-dd HH:mm:ss"
|
|
116
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
117
|
-
@focus="selectRow(scope.row)"
|
|
118
|
-
/>
|
|
119
|
-
|
|
120
|
-
<el-date-picker
|
|
121
|
-
v-else-if="
|
|
122
|
-
scope.row.dataType === 'TIME' &&
|
|
123
|
-
scope.row.componentType === 'timepicker'
|
|
124
|
-
"
|
|
125
|
-
v-model="scope.row.value"
|
|
126
|
-
type="datetimerange"
|
|
127
|
-
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
128
|
-
unlink-panels
|
|
129
|
-
size="small"
|
|
130
|
-
:style="scope.row.searchControlWidth"
|
|
131
|
-
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
132
|
-
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
133
|
-
value-format="HH:mm:ss"
|
|
134
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
135
|
-
@focus="selectRow(scope.row)"
|
|
136
|
-
/>
|
|
137
|
-
|
|
138
|
-
<el-time-picker
|
|
139
|
-
v-else-if="
|
|
140
|
-
scope.row.componentType === 'timepicker' &&
|
|
141
|
-
scope.row.dataType !== 'TIME' &&
|
|
142
|
-
scope.row.dataType !== 'DATE'
|
|
143
|
-
"
|
|
144
|
-
v-model="scope.row.value"
|
|
145
|
-
type="fixed-time"
|
|
146
|
-
size="small"
|
|
147
|
-
:placeholder="$t('imatrixUIMessage.selectTime')"
|
|
148
|
-
style="width: 100%"
|
|
149
|
-
value-format="HH:mm:ss"
|
|
150
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
151
|
-
@focus="selectRow(scope.row)"
|
|
152
|
-
/>
|
|
153
|
-
|
|
154
|
-
<organization-input
|
|
155
|
-
v-else-if="componentTypeTypeIsTree(scope.row.componentType)"
|
|
156
|
-
v-model:value="scope.row.value"
|
|
157
|
-
:fields="getTreeFields(scope.row.orgTreeSet)"
|
|
158
|
-
:models="searchForm"
|
|
159
|
-
:size="small"
|
|
160
|
-
:multiple="getTreeIsMultiTree(scope.row.componentType)"
|
|
161
|
-
:tree-type="getTreeType(scope.row.componentType)"
|
|
162
|
-
@setValue="organizationInputEvent"
|
|
163
|
-
@clear="clearOrganizationInputEvent"
|
|
164
|
-
@focus="selectRow(scope.row)"
|
|
165
|
-
/>
|
|
166
|
-
|
|
167
|
-
<el-select
|
|
168
|
-
v-else-if="
|
|
169
|
-
((scope.row.componentType &&
|
|
170
|
-
scope.row.componentType === 'select') ||
|
|
171
|
-
scope.row.dataType === 'BOOLEAN') &&
|
|
172
|
-
!isDynamicDataSourceSource(scope.row)
|
|
173
|
-
"
|
|
174
|
-
v-model="scope.row.value"
|
|
175
|
-
clearable
|
|
176
|
-
:style="scope.row.searchControlWidth"
|
|
177
|
-
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
178
|
-
size="small"
|
|
179
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
180
|
-
@focus="selectRow(scope.row)"
|
|
181
|
-
>
|
|
182
|
-
<el-option
|
|
183
|
-
v-for="item in scope.row.valueSet"
|
|
184
|
-
:key="item.value"
|
|
185
|
-
:label="item.label"
|
|
186
|
-
:value="item.value"
|
|
187
|
-
/>
|
|
188
|
-
</el-select>
|
|
189
|
-
<el-select
|
|
190
|
-
v-else-if="
|
|
191
|
-
scope.row.componentType &&
|
|
192
|
-
scope.row.componentType === 'multiselect' &&
|
|
193
|
-
!isDynamicDataSourceSource(scope.row)
|
|
194
|
-
"
|
|
195
|
-
v-model="scope.row.value"
|
|
196
|
-
clearable
|
|
197
|
-
multiple
|
|
198
|
-
:style="scope.row.searchControlWidth"
|
|
199
|
-
collapse-tags
|
|
200
|
-
size="small"
|
|
201
|
-
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
202
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
203
|
-
@focus="selectRow(scope.row)"
|
|
204
|
-
>
|
|
205
|
-
<el-option
|
|
206
|
-
v-for="item in scope.row.valueSet"
|
|
207
|
-
:key="item.value"
|
|
208
|
-
:label="item.label"
|
|
209
|
-
:value="item.value"
|
|
210
|
-
/>
|
|
211
|
-
</el-select>
|
|
212
|
-
|
|
213
|
-
<dynamic-source-select
|
|
214
|
-
v-else-if="
|
|
215
|
-
scope.row.componentType &&
|
|
216
|
-
(scope.row.componentType === 'multiselect' ||
|
|
217
|
-
scope.row.componentType === 'select') &&
|
|
218
|
-
isDynamicDataSourceSource(scope.row)
|
|
219
|
-
"
|
|
220
|
-
:value="scope.row.value"
|
|
221
|
-
:base-props="{
|
|
222
|
-
multiple:
|
|
223
|
-
scope.row.componentType === 'multiselect' ? true : false,
|
|
224
|
-
}"
|
|
225
|
-
:entity="scope.row"
|
|
226
|
-
:options="getDynamicDataSourceOptions(scope.row)"
|
|
227
|
-
:table-name="tableName"
|
|
228
|
-
:is-join-table="isJoinTable"
|
|
229
|
-
:list-code="code"
|
|
230
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
231
|
-
/>
|
|
232
|
-
<search-form-number
|
|
233
|
-
v-else-if="
|
|
234
|
-
scope.row.componentType &&
|
|
235
|
-
scope.row.componentType === 'inputNumber'
|
|
236
|
-
"
|
|
237
|
-
:r="r"
|
|
238
|
-
:n="n"
|
|
239
|
-
size="small"
|
|
240
|
-
@setValue="setNumberValue"
|
|
241
|
-
@focus="selectRow(scope.row)"
|
|
242
|
-
/>
|
|
243
|
-
|
|
244
|
-
<el-switch
|
|
245
|
-
v-else-if="
|
|
246
|
-
scope.row.componentType && scope.row.componentType === 'switch'
|
|
247
|
-
"
|
|
248
|
-
v-model="scope.row.value"
|
|
249
|
-
active-color="#13ce66"
|
|
250
|
-
inactive-color="#ff4949"
|
|
251
|
-
size="small"
|
|
252
|
-
:style="scope.row.searchControlWidth"
|
|
253
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
254
|
-
@focus="selectRow(scope.row)"
|
|
255
|
-
/>
|
|
256
|
-
<el-slider
|
|
257
|
-
v-else-if="
|
|
258
|
-
scope.row.componentType && scope.row.componentType === 'slider'
|
|
259
|
-
"
|
|
260
|
-
v-model="scope.row.value"
|
|
261
|
-
size="small"
|
|
262
|
-
:style="scope.row.searchControlWidth"
|
|
263
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
264
|
-
@focus="selectRow(scope.row)"
|
|
265
|
-
/>
|
|
266
|
-
|
|
267
|
-
<el-rate
|
|
268
|
-
v-else-if="
|
|
269
|
-
scope.row.componentType && scope.row.componentType === 'rate'
|
|
270
|
-
"
|
|
271
|
-
v-model="scope.row.value"
|
|
272
|
-
:style="scope.row.searchControlWidth"
|
|
273
|
-
size="small"
|
|
274
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
275
|
-
@focus="selectRow(scope.row)"
|
|
276
|
-
/>
|
|
277
|
-
<span v-else-if="customComponent(scope.row.prop) === true">
|
|
278
|
-
<component
|
|
279
|
-
:is="scope.row.componentName"
|
|
280
|
-
:ref="scope.row.componentName"
|
|
281
|
-
v-model:value="scope.row.value"
|
|
282
|
-
class="customComponent"
|
|
283
|
-
:prop="scope.row.prop"
|
|
284
|
-
:row="scope.row"
|
|
285
|
-
@input="
|
|
286
|
-
setValueToModelProp(
|
|
287
|
-
scope.$index,
|
|
288
|
-
$event,
|
|
289
|
-
scope.row.componentName
|
|
290
|
-
)
|
|
291
|
-
"
|
|
292
|
-
@focus="selectRow(scope.row)"
|
|
293
|
-
/>
|
|
294
|
-
</span>
|
|
295
|
-
<el-input
|
|
296
|
-
v-else
|
|
297
|
-
v-model="scope.row.value"
|
|
298
|
-
size="small"
|
|
299
|
-
:style="scope.row.searchControlWidth"
|
|
300
|
-
@focus="selectRow(scope.row)"
|
|
301
|
-
@keyup.enter="submitForm('searchForm')"
|
|
302
|
-
@input="setValueToModelProp(scope.$index, $event)"
|
|
303
|
-
/>
|
|
304
|
-
</template>
|
|
305
|
-
</el-table-column>
|
|
306
|
-
<el-table-column prop="rightBracket" label=")" width="90">
|
|
307
|
-
<template v-slot="scope">
|
|
308
|
-
<el-select
|
|
309
|
-
v-model="scope.row.rightBracket"
|
|
310
|
-
size="small"
|
|
311
|
-
clearable
|
|
312
|
-
@focus="selectRow(scope.row)"
|
|
313
|
-
>
|
|
314
|
-
<el-option label="" value="" />
|
|
315
|
-
<el-option label=")" value=")" />
|
|
316
|
-
<el-option label="))" value="))" />
|
|
317
|
-
<el-option label=")))" value=")))" />
|
|
318
|
-
</el-select>
|
|
319
|
-
</template>
|
|
320
|
-
</el-table-column>
|
|
321
|
-
<el-table-column
|
|
322
|
-
:label="$t('imatrixUIPublicModel.andOr')"
|
|
323
|
-
prop="logicOperator"
|
|
324
|
-
width="110"
|
|
325
|
-
>
|
|
326
|
-
<template v-slot="scope">
|
|
327
|
-
<el-select
|
|
328
|
-
v-model="scope.row.joinSign"
|
|
329
|
-
size="small"
|
|
330
|
-
clearable
|
|
331
|
-
@focus="selectRow(scope.row)"
|
|
332
|
-
>
|
|
333
|
-
<el-option :label="$t('imatrixUIPublicModel.perhaps')" value="or" />
|
|
334
|
-
<el-option :label="$t('imatrixUIPublicModel.also')" value="and" />
|
|
335
|
-
</el-select>
|
|
336
|
-
</template>
|
|
337
|
-
</el-table-column>
|
|
338
|
-
<el-table-column
|
|
339
|
-
:label="$t('imatrixUIPublicModel.whenTheVariableIsEmpty')"
|
|
340
|
-
width="110"
|
|
341
|
-
>
|
|
342
|
-
<template v-slot="scope">
|
|
343
|
-
<el-select
|
|
344
|
-
v-model="scope.row.variableIsNull"
|
|
345
|
-
size="small"
|
|
346
|
-
clearable
|
|
347
|
-
@focus="selectRow(scope.row)"
|
|
348
|
-
>
|
|
349
|
-
<el-option label="Null" value="null" />
|
|
350
|
-
<el-option
|
|
351
|
-
:label="$t('imatrixUIPublicModel.ignore11')"
|
|
352
|
-
value="1=1"
|
|
353
|
-
/>
|
|
354
|
-
<el-option
|
|
355
|
-
:label="$t('imatrixUIPublicModel.nonConformity')"
|
|
356
|
-
value="1<>1"
|
|
357
|
-
/>
|
|
358
|
-
</el-select>
|
|
359
|
-
</template>
|
|
360
|
-
</el-table-column>
|
|
361
|
-
</el-table>
|
|
362
|
-
</div>
|
|
363
|
-
</template>
|
|
364
|
-
|
|
365
|
-
<script>
|
|
366
|
-
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
367
|
-
import searchMethods from './search-methods'
|
|
368
|
-
import searchFormNumber from './search-form-number.vue'
|
|
369
|
-
// import { isOptionFunction, getSearchObject } from './utils'
|
|
370
|
-
import store from './store'
|
|
371
|
-
import SearchConditionInput from './search-condition-input.vue'
|
|
372
|
-
import SearchConditionList from './search-condition-list.vue'
|
|
373
|
-
import { getDynamicDataSourceOptions, isDynamicDataSourceSource } from './utils'
|
|
374
|
-
import * as Vue from 'vue'
|
|
375
|
-
export default {
|
|
376
|
-
components: {
|
|
377
|
-
searchFormNumber,
|
|
378
|
-
SearchConditionInput,
|
|
379
|
-
SearchConditionList,
|
|
380
|
-
},
|
|
381
|
-
name: 'SearchForm',
|
|
382
|
-
props: {
|
|
383
|
-
searchableColumns: {
|
|
384
|
-
type: Array,
|
|
385
|
-
default: null,
|
|
386
|
-
},
|
|
387
|
-
searchFormList: {
|
|
388
|
-
type: Array,
|
|
389
|
-
default: null,
|
|
390
|
-
},
|
|
391
|
-
propMap: {
|
|
392
|
-
type: Object,
|
|
393
|
-
default: null,
|
|
394
|
-
},
|
|
395
|
-
code: {
|
|
396
|
-
type: String,
|
|
397
|
-
default: null,
|
|
398
|
-
},
|
|
399
|
-
isSql: {
|
|
400
|
-
type: Boolean,
|
|
401
|
-
default: false,
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
data() {
|
|
405
|
-
const gridParams = store.get(this.code)
|
|
406
|
-
let tableName
|
|
407
|
-
if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
|
|
408
|
-
tableName = gridParams.basicInfo.tableName
|
|
409
|
-
}
|
|
410
|
-
let isHasJoinTable
|
|
411
|
-
if (
|
|
412
|
-
gridParams &&
|
|
413
|
-
gridParams.basicInfo &&
|
|
414
|
-
gridParams.basicInfo.hasJoinTable
|
|
415
|
-
) {
|
|
416
|
-
isHasJoinTable = gridParams.basicInfo.hasJoinTable
|
|
417
|
-
}
|
|
418
|
-
const customComponentNames = new Set()
|
|
419
|
-
return {
|
|
420
|
-
customComponentNames: customComponentNames,
|
|
421
|
-
currentRow: null,
|
|
422
|
-
formFlag: true,
|
|
423
|
-
operationArr: [],
|
|
424
|
-
tableName,
|
|
425
|
-
isJoinTable: isHasJoinTable, // 是否是关联表
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
computed: {},
|
|
429
|
-
watch: {
|
|
430
|
-
searchableColumns: {
|
|
431
|
-
deep: true,
|
|
432
|
-
handler(newValue, oldValue) {
|
|
433
|
-
this.searchableColumns = newValue
|
|
434
|
-
this.refreshOperators()
|
|
435
|
-
this.formFlag = false
|
|
436
|
-
this.$nextTick(() => {
|
|
437
|
-
this.formFlag = true
|
|
438
|
-
})
|
|
439
|
-
},
|
|
440
|
-
},
|
|
441
|
-
},
|
|
442
|
-
created() {
|
|
443
|
-
this.refreshOperators()
|
|
444
|
-
if (!this.searchFormList || this.searchFormList.length < 1) {
|
|
445
|
-
this.add()
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
methods: {
|
|
449
|
-
...searchMethods,
|
|
450
|
-
getDynamicDataSourceOptions(column) {
|
|
451
|
-
const gridParams = store.get(this.code)
|
|
452
|
-
return getDynamicDataSourceOptions(
|
|
453
|
-
column,
|
|
454
|
-
this.isSql,
|
|
455
|
-
gridParams.additionalParamMap
|
|
456
|
-
)
|
|
457
|
-
},
|
|
458
|
-
// 值设置是否是动态数据源类型的数据源
|
|
459
|
-
isDynamicDataSourceSource(column) {
|
|
460
|
-
return isDynamicDataSourceSource(column)
|
|
461
|
-
},
|
|
462
|
-
refreshOperators() {
|
|
463
|
-
if (this.searchableColumns && this.searchableColumns.length > 0) {
|
|
464
|
-
for (var i = 0; i < this.searchableColumns.length; i++) {
|
|
465
|
-
const prop = this.searchableColumns[i].prop
|
|
466
|
-
const item = this.propMap[prop]
|
|
467
|
-
this.operationArr[i] = this.getOperators(item)
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
handleCurrentChange(val) {
|
|
472
|
-
this.currentRow = val
|
|
473
|
-
},
|
|
474
|
-
tableRowClassName({ row, rowIndex }) {
|
|
475
|
-
// 把每一行的索引放进row
|
|
476
|
-
row.index = rowIndex
|
|
477
|
-
},
|
|
478
|
-
// 选择行
|
|
479
|
-
selectRow(row) {
|
|
480
|
-
this.$refs.table.setCurrentRow(row)
|
|
481
|
-
},
|
|
482
|
-
// 改变选择的属性
|
|
483
|
-
changeFieldName(index) {
|
|
484
|
-
const prop = this.currentRow.prop
|
|
485
|
-
const item = this.propMap[prop]
|
|
486
|
-
this.searchFormList[index].dataType = item.dataType
|
|
487
|
-
this.searchFormList[index].orgProp = item.orgProp
|
|
488
|
-
this.searchFormList[index].componentType = item.componentType
|
|
489
|
-
this.searchFormList[index].componentName = item.componentName
|
|
490
|
-
this.searchFormList[index].queryMatching = item.queryMatching
|
|
491
|
-
this.searchFormList[index].searchControlWidth = item.searchControlWidth
|
|
492
|
-
this.searchFormList[index].fuzzy = item.fuzzy
|
|
493
|
-
this.searchFormList[index].valueSet = item.valueSet
|
|
494
|
-
this.operationArr[index] = this.getOperators(item)
|
|
495
|
-
},
|
|
496
|
-
setValueToModelProp(index, value, componentName) {
|
|
497
|
-
if (index !== null && index !== undefined) {
|
|
498
|
-
this.searchFormList[index]['value'] = value
|
|
499
|
-
}
|
|
500
|
-
},
|
|
501
|
-
componentTypeTypeIsTree(componentType) {
|
|
502
|
-
if (componentType) {
|
|
503
|
-
if (componentType.indexOf('DeptManTree') > 0) {
|
|
504
|
-
// 说明是部门人员树
|
|
505
|
-
return true
|
|
506
|
-
}
|
|
507
|
-
if (componentType.indexOf('DeptTree') > 0) {
|
|
508
|
-
// 说明是部门树
|
|
509
|
-
return true
|
|
510
|
-
}
|
|
511
|
-
if (componentType.indexOf('WgManTree') > 0) {
|
|
512
|
-
// 说明是工作组人员树
|
|
513
|
-
return true
|
|
514
|
-
}
|
|
515
|
-
if (componentType.indexOf('WgManTree') > 0) {
|
|
516
|
-
// 说明是工作组树
|
|
517
|
-
return true
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
return false
|
|
521
|
-
},
|
|
522
|
-
getTreeFields(orgTreeSet) {
|
|
523
|
-
if (orgTreeSet && orgTreeSet !== '') {
|
|
524
|
-
return JSON.parse(orgTreeSet)
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
getTreeIsMultiTree(componentType) {
|
|
528
|
-
if (
|
|
529
|
-
componentType &&
|
|
530
|
-
componentType.indexOf('single') >= 0 &&
|
|
531
|
-
componentType.indexOf('Tree') > 0
|
|
532
|
-
) {
|
|
533
|
-
return false
|
|
534
|
-
} else {
|
|
535
|
-
return true
|
|
536
|
-
}
|
|
537
|
-
},
|
|
538
|
-
getTreeType(componentType) {
|
|
539
|
-
if (componentType) {
|
|
540
|
-
if (componentType.indexOf('DeptManTree') > 0) {
|
|
541
|
-
// 说明是部门人员树
|
|
542
|
-
return 'DeptUserTree'
|
|
543
|
-
}
|
|
544
|
-
if (componentType.indexOf('DeptTree') > 0) {
|
|
545
|
-
// 说明是部门树
|
|
546
|
-
return 'DeptTree'
|
|
547
|
-
}
|
|
548
|
-
if (componentType.indexOf('WgTree') > 0) {
|
|
549
|
-
// 说明是工作组人员树
|
|
550
|
-
return 'WgTree'
|
|
551
|
-
}
|
|
552
|
-
if (componentType.indexOf('WgManTree') > 0) {
|
|
553
|
-
// 说明是工作组树
|
|
554
|
-
return 'WgUserTree'
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
},
|
|
558
|
-
// 组织结构树文本框值改变事件
|
|
559
|
-
organizationInputEvent(prop, value) {
|
|
560
|
-
if (this.currentRow) {
|
|
561
|
-
this.currentRow['value'] = value
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
// 组织结构树文本框值清空事件
|
|
565
|
-
clearOrganizationInputEvent(prop) {
|
|
566
|
-
if (this.currentRow) {
|
|
567
|
-
this.currentRow['value'] = null
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
customComponent(prop) {
|
|
571
|
-
const column = this.propMap[prop]
|
|
572
|
-
const gridParams = store.get(this.code)
|
|
573
|
-
if (column.componentName && column.componentName !== '') {
|
|
574
|
-
this.customComponentNames.add(column.componentName)
|
|
575
|
-
return true
|
|
576
|
-
}
|
|
577
|
-
if (
|
|
578
|
-
(!column.componentName || column.componentName === '') &&
|
|
579
|
-
gridParams.options &&
|
|
580
|
-
gridParams.options.search &&
|
|
581
|
-
gridParams.options.search.customSearchElements
|
|
582
|
-
) {
|
|
583
|
-
// 定义了自定义查询组件
|
|
584
|
-
const propSearchEle =
|
|
585
|
-
gridParams.options.search.customSearchElements[column.prop]
|
|
586
|
-
// console.log('customComponent-customSearchElements-propSearchEle-', column.prop)
|
|
587
|
-
if (propSearchEle) {
|
|
588
|
-
column.componentName = 'custom-' + column.prop
|
|
589
|
-
const component = propSearchEle.call(this, column)
|
|
590
|
-
// console.log('customComponent-customSearchElements-')
|
|
591
|
-
if (component) {
|
|
592
|
-
this.customComponentNames.add(column.componentName)
|
|
593
|
-
window.$vueApp.component(column.componentName, component)
|
|
594
|
-
return true
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
return false
|
|
599
|
-
},
|
|
600
|
-
validateForm() {
|
|
601
|
-
return new Promise((resolve, reject) => {
|
|
602
|
-
resolve(true)
|
|
603
|
-
})
|
|
604
|
-
},
|
|
605
|
-
resetForm() {
|
|
606
|
-
if (this.customComponentNames && this.customComponentNames.length > 0) {
|
|
607
|
-
for (const componentName of this.customComponentNames) {
|
|
608
|
-
// 遍历
|
|
609
|
-
this.$refs[componentName][0].resetField()
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
// 当是保持页数默认赋值的查询字段resetFields()不会被清空,需要下面的方法遍历设未null
|
|
613
|
-
$emit(this, 'resetForm')
|
|
614
|
-
this.add()
|
|
615
|
-
},
|
|
616
|
-
setNumberValue(value, r, n) {
|
|
617
|
-
if (this.currentRow) {
|
|
618
|
-
this.currentRow['value'] = value
|
|
619
|
-
}
|
|
620
|
-
},
|
|
621
|
-
// 添加
|
|
622
|
-
add() {
|
|
623
|
-
if (!this.searchFormList) {
|
|
624
|
-
this.searchFormList = []
|
|
625
|
-
}
|
|
626
|
-
this.searchFormList.push({
|
|
627
|
-
leftBracket: '',
|
|
628
|
-
prop: '',
|
|
629
|
-
operator: '',
|
|
630
|
-
value: '',
|
|
631
|
-
rightBracket: '',
|
|
632
|
-
joinSign: 'or',
|
|
633
|
-
dataType: '',
|
|
634
|
-
propDbName: '',
|
|
635
|
-
})
|
|
636
|
-
this.operationArr.push([])
|
|
637
|
-
},
|
|
638
|
-
// 删除
|
|
639
|
-
remove(index) {
|
|
640
|
-
if (index !== null && index !== undefined && index !== -1) {
|
|
641
|
-
this.searchFormList.splice(index, 1)
|
|
642
|
-
} else {
|
|
643
|
-
if (this.currentRow === null) {
|
|
644
|
-
this.$alert(this.$t('message.pleaseSelectARow'))
|
|
645
|
-
return
|
|
646
|
-
}
|
|
647
|
-
if (
|
|
648
|
-
this.currentRow &&
|
|
649
|
-
this.currentRow.index &&
|
|
650
|
-
this.currentRow.index !== null &&
|
|
651
|
-
this.currentRow.index !== undefined
|
|
652
|
-
) {
|
|
653
|
-
this.searchFormList.splice(this.currentRow.index, 1)
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
},
|
|
657
|
-
// 实时根据类型改变连接符
|
|
658
|
-
getOperators(item) {
|
|
659
|
-
if (item) {
|
|
660
|
-
if (
|
|
661
|
-
item.dataType === 'INTEGER' ||
|
|
662
|
-
item.dataType === 'LONG' ||
|
|
663
|
-
item.dataType === 'DOUBLE' ||
|
|
664
|
-
item.dataType === 'FLOAT'
|
|
665
|
-
) {
|
|
666
|
-
return [
|
|
667
|
-
{
|
|
668
|
-
name: 'GT',
|
|
669
|
-
label: this.$t('imatrixUIPublicModel.greaterThan'),
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
name: 'LT',
|
|
673
|
-
label: this.$t('imatrixUIPublicModel.lessThan'),
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
name: 'EQ',
|
|
677
|
-
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
name: 'LET',
|
|
681
|
-
label: this.$t('imatrixUIPublicModel.notGreaterThan'),
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
name: 'GET',
|
|
685
|
-
label: this.$t('imatrixUIPublicModel.notLessThan'),
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
name: 'NET',
|
|
689
|
-
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
name: 'IS_NULL',
|
|
693
|
-
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
name: 'IS_NOT_NULL',
|
|
697
|
-
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
698
|
-
},
|
|
699
|
-
]
|
|
700
|
-
} else if (item.dataType === 'DATE' || item.dataType === 'TIME') {
|
|
701
|
-
return [
|
|
702
|
-
{
|
|
703
|
-
name: 'GT',
|
|
704
|
-
label: this.$t('imatrixUIPublicModel.laterThan'),
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
name: 'LT',
|
|
708
|
-
label: this.$t('imatrixUIPublicModel.earlierThan'),
|
|
709
|
-
},
|
|
710
|
-
{
|
|
711
|
-
name: 'EQ',
|
|
712
|
-
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
name: 'LET',
|
|
716
|
-
label: this.$t('imatrixUIPublicModel.noLaterThan'),
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
name: 'GET',
|
|
720
|
-
label: this.$t('imatrixUIPublicModel.noEarlierThan'),
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
name: 'IS_NULL',
|
|
724
|
-
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
name: 'IS_NOT_NULL',
|
|
728
|
-
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
729
|
-
},
|
|
730
|
-
]
|
|
731
|
-
} else if (item.dataType === 'TEXT') {
|
|
732
|
-
return [
|
|
733
|
-
{
|
|
734
|
-
name: 'EQ',
|
|
735
|
-
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
736
|
-
},
|
|
737
|
-
{
|
|
738
|
-
name: 'NET',
|
|
739
|
-
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
740
|
-
},
|
|
741
|
-
{
|
|
742
|
-
name: 'CONTAIN',
|
|
743
|
-
label: this.$t('imatrixUIPublicModel.contain'),
|
|
744
|
-
},
|
|
745
|
-
{
|
|
746
|
-
name: 'NOT_CONTAIN',
|
|
747
|
-
label: this.$t('imatrixUIPublicModel.notIncluded'),
|
|
748
|
-
},
|
|
749
|
-
{
|
|
750
|
-
name: 'IS_NULL',
|
|
751
|
-
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
752
|
-
},
|
|
753
|
-
{
|
|
754
|
-
name: 'IS_NOT_NULL',
|
|
755
|
-
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
756
|
-
},
|
|
757
|
-
]
|
|
758
|
-
} else {
|
|
759
|
-
return [
|
|
760
|
-
{
|
|
761
|
-
name: 'EQ',
|
|
762
|
-
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
name: 'NET',
|
|
766
|
-
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
name: 'IS_NULL',
|
|
770
|
-
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
name: 'IS_NOT_NULL',
|
|
774
|
-
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
775
|
-
},
|
|
776
|
-
]
|
|
777
|
-
}
|
|
778
|
-
} else {
|
|
779
|
-
return [
|
|
780
|
-
{
|
|
781
|
-
name: 'EQ',
|
|
782
|
-
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
name: 'NET',
|
|
786
|
-
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
name: 'IS_NULL',
|
|
790
|
-
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
name: 'IS_NOT_NULL',
|
|
794
|
-
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
795
|
-
},
|
|
796
|
-
]
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
},
|
|
800
|
-
emits: ['resetForm'],
|
|
801
|
-
}
|
|
802
|
-
</script>
|
|
803
|
-
|
|
804
|
-
<style scoped>
|
|
805
|
-
.grid-search-form {
|
|
806
|
-
overflow: auto;
|
|
807
|
-
}
|
|
808
|
-
.grid-search-form :deep(.el-form-item) {
|
|
809
|
-
margin-bottom: 0px;
|
|
810
|
-
}
|
|
811
|
-
.grid-search-form :deep(.search-btn) {
|
|
812
|
-
margin-bottom: 5px;
|
|
813
|
-
text-align: center;
|
|
814
|
-
}
|
|
815
|
-
.grid-search-form :deep(.el-select),
|
|
816
|
-
.grid-search-form :deep(.customComponent) {
|
|
817
|
-
width: 100%;
|
|
818
|
-
}
|
|
819
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="formFlag">
|
|
3
|
+
<!-- <el-row style="padding-bottom: 8px">
|
|
4
|
+
<el-button type="primary" size="mini" plain icon="el-icon-circle-plus-outline" @click="add">
|
|
5
|
+
{{ $t('imatrixUIPublicModel.add') }}
|
|
6
|
+
</el-button>
|
|
7
|
+
<el-button type="primary" size="mini" plain icon="el-icon-delete" @click="remove">
|
|
8
|
+
{{ $t('imatrixUIPublicModel.delete') }}
|
|
9
|
+
</el-button>
|
|
10
|
+
</el-row> -->
|
|
11
|
+
<el-table
|
|
12
|
+
ref="table"
|
|
13
|
+
:data="searchFormList"
|
|
14
|
+
:row-class-name="tableRowClassName"
|
|
15
|
+
border
|
|
16
|
+
style="width: 100%"
|
|
17
|
+
highlight-current-row
|
|
18
|
+
@current-change="handleCurrentChange"
|
|
19
|
+
>
|
|
20
|
+
<el-table-column
|
|
21
|
+
:label="$t('imatrixUIPublicModel.edit')"
|
|
22
|
+
fixed="left"
|
|
23
|
+
align="center"
|
|
24
|
+
width="80"
|
|
25
|
+
>
|
|
26
|
+
<template v-slot="scope">
|
|
27
|
+
<el-icon @click="add"><CirclePlus /></el-icon>
|
|
28
|
+
<el-icon @click="remove(scope.$index)"><Remove /></el-icon>
|
|
29
|
+
</template>
|
|
30
|
+
</el-table-column>
|
|
31
|
+
<el-table-column prop="leftBracket" label="(" width="90">
|
|
32
|
+
<template v-slot="scope">
|
|
33
|
+
<el-select
|
|
34
|
+
v-model="scope.row.leftBracket"
|
|
35
|
+
size="small"
|
|
36
|
+
clearable
|
|
37
|
+
@focus="selectRow(scope.row)"
|
|
38
|
+
>
|
|
39
|
+
<el-option label="" value="" />
|
|
40
|
+
<el-option label="(" value="(" />
|
|
41
|
+
<el-option label="((" value="((" />
|
|
42
|
+
<el-option label="(((" value="(((" />
|
|
43
|
+
</el-select>
|
|
44
|
+
</template>
|
|
45
|
+
</el-table-column>
|
|
46
|
+
<el-table-column
|
|
47
|
+
:label="$t('imatrixUIPublicModel.fieldName')"
|
|
48
|
+
width="200"
|
|
49
|
+
>
|
|
50
|
+
<template v-slot="scope">
|
|
51
|
+
<el-select
|
|
52
|
+
v-model="scope.row.prop"
|
|
53
|
+
size="small"
|
|
54
|
+
clearable
|
|
55
|
+
filterable
|
|
56
|
+
@focus="selectRow(scope.row)"
|
|
57
|
+
@change="changeFieldName(scope.$index)"
|
|
58
|
+
>
|
|
59
|
+
<el-option
|
|
60
|
+
v-for="item in searchableColumns"
|
|
61
|
+
:key="item.prop"
|
|
62
|
+
:label="item.label"
|
|
63
|
+
:value="item.prop"
|
|
64
|
+
/>
|
|
65
|
+
</el-select>
|
|
66
|
+
</template>
|
|
67
|
+
</el-table-column>
|
|
68
|
+
<el-table-column :label="$t('imatrixUIPublicModel.operator')" width="110">
|
|
69
|
+
<template v-slot="scope">
|
|
70
|
+
<el-select
|
|
71
|
+
v-model="scope.row.operator"
|
|
72
|
+
size="small"
|
|
73
|
+
clearable
|
|
74
|
+
@focus="selectRow(scope.row)"
|
|
75
|
+
>
|
|
76
|
+
<el-option
|
|
77
|
+
v-for="option in operationArr[scope.$index]"
|
|
78
|
+
:key="option.name"
|
|
79
|
+
:label="option.label"
|
|
80
|
+
:value="option.name"
|
|
81
|
+
/>
|
|
82
|
+
</el-select>
|
|
83
|
+
</template>
|
|
84
|
+
</el-table-column>
|
|
85
|
+
<el-table-column :label="$t('imatrixUIPublicModel.value')">
|
|
86
|
+
<template v-if="scope.row.prop" v-slot="scope">
|
|
87
|
+
<el-date-picker
|
|
88
|
+
v-if="
|
|
89
|
+
scope.row.dataType === 'DATE' ||
|
|
90
|
+
scope.row.componentType === 'date'
|
|
91
|
+
"
|
|
92
|
+
v-model="scope.row.value"
|
|
93
|
+
type="daterange"
|
|
94
|
+
size="small"
|
|
95
|
+
:style="scope.row.searchControlWidth"
|
|
96
|
+
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
97
|
+
unlink-panels
|
|
98
|
+
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
99
|
+
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
100
|
+
value-format="yyyy-MM-dd"
|
|
101
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
102
|
+
@focus="selectRow(scope.row)"
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<el-date-picker
|
|
106
|
+
v-else-if="scope.row.componentType === 'dateTimePicker'"
|
|
107
|
+
v-model="scope.row.value"
|
|
108
|
+
type="datetimerange"
|
|
109
|
+
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
110
|
+
unlink-panels
|
|
111
|
+
size="small"
|
|
112
|
+
:style="scope.row.searchControlWidth"
|
|
113
|
+
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
114
|
+
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
115
|
+
value-format="yyyy-MM-dd HH:mm:ss"
|
|
116
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
117
|
+
@focus="selectRow(scope.row)"
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
<el-date-picker
|
|
121
|
+
v-else-if="
|
|
122
|
+
scope.row.dataType === 'TIME' &&
|
|
123
|
+
scope.row.componentType === 'timepicker'
|
|
124
|
+
"
|
|
125
|
+
v-model="scope.row.value"
|
|
126
|
+
type="datetimerange"
|
|
127
|
+
:range-separator="$t('imatrixUIPublicModel.to')"
|
|
128
|
+
unlink-panels
|
|
129
|
+
size="small"
|
|
130
|
+
:style="scope.row.searchControlWidth"
|
|
131
|
+
:start-placeholder="$t('imatrixUIMessage.startDate')"
|
|
132
|
+
:end-placeholder="$t('imatrixUIMessage.endDate')"
|
|
133
|
+
value-format="HH:mm:ss"
|
|
134
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
135
|
+
@focus="selectRow(scope.row)"
|
|
136
|
+
/>
|
|
137
|
+
|
|
138
|
+
<el-time-picker
|
|
139
|
+
v-else-if="
|
|
140
|
+
scope.row.componentType === 'timepicker' &&
|
|
141
|
+
scope.row.dataType !== 'TIME' &&
|
|
142
|
+
scope.row.dataType !== 'DATE'
|
|
143
|
+
"
|
|
144
|
+
v-model="scope.row.value"
|
|
145
|
+
type="fixed-time"
|
|
146
|
+
size="small"
|
|
147
|
+
:placeholder="$t('imatrixUIMessage.selectTime')"
|
|
148
|
+
style="width: 100%"
|
|
149
|
+
value-format="HH:mm:ss"
|
|
150
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
151
|
+
@focus="selectRow(scope.row)"
|
|
152
|
+
/>
|
|
153
|
+
|
|
154
|
+
<organization-input
|
|
155
|
+
v-else-if="componentTypeTypeIsTree(scope.row.componentType)"
|
|
156
|
+
v-model:value="scope.row.value"
|
|
157
|
+
:fields="getTreeFields(scope.row.orgTreeSet)"
|
|
158
|
+
:models="searchForm"
|
|
159
|
+
:size="small"
|
|
160
|
+
:multiple="getTreeIsMultiTree(scope.row.componentType)"
|
|
161
|
+
:tree-type="getTreeType(scope.row.componentType)"
|
|
162
|
+
@setValue="organizationInputEvent"
|
|
163
|
+
@clear="clearOrganizationInputEvent"
|
|
164
|
+
@focus="selectRow(scope.row)"
|
|
165
|
+
/>
|
|
166
|
+
|
|
167
|
+
<el-select
|
|
168
|
+
v-else-if="
|
|
169
|
+
((scope.row.componentType &&
|
|
170
|
+
scope.row.componentType === 'select') ||
|
|
171
|
+
scope.row.dataType === 'BOOLEAN') &&
|
|
172
|
+
!isDynamicDataSourceSource(scope.row)
|
|
173
|
+
"
|
|
174
|
+
v-model="scope.row.value"
|
|
175
|
+
clearable
|
|
176
|
+
:style="scope.row.searchControlWidth"
|
|
177
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
178
|
+
size="small"
|
|
179
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
180
|
+
@focus="selectRow(scope.row)"
|
|
181
|
+
>
|
|
182
|
+
<el-option
|
|
183
|
+
v-for="item in scope.row.valueSet"
|
|
184
|
+
:key="item.value"
|
|
185
|
+
:label="item.label"
|
|
186
|
+
:value="item.value"
|
|
187
|
+
/>
|
|
188
|
+
</el-select>
|
|
189
|
+
<el-select
|
|
190
|
+
v-else-if="
|
|
191
|
+
scope.row.componentType &&
|
|
192
|
+
scope.row.componentType === 'multiselect' &&
|
|
193
|
+
!isDynamicDataSourceSource(scope.row)
|
|
194
|
+
"
|
|
195
|
+
v-model="scope.row.value"
|
|
196
|
+
clearable
|
|
197
|
+
multiple
|
|
198
|
+
:style="scope.row.searchControlWidth"
|
|
199
|
+
collapse-tags
|
|
200
|
+
size="small"
|
|
201
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
202
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
203
|
+
@focus="selectRow(scope.row)"
|
|
204
|
+
>
|
|
205
|
+
<el-option
|
|
206
|
+
v-for="item in scope.row.valueSet"
|
|
207
|
+
:key="item.value"
|
|
208
|
+
:label="item.label"
|
|
209
|
+
:value="item.value"
|
|
210
|
+
/>
|
|
211
|
+
</el-select>
|
|
212
|
+
|
|
213
|
+
<dynamic-source-select
|
|
214
|
+
v-else-if="
|
|
215
|
+
scope.row.componentType &&
|
|
216
|
+
(scope.row.componentType === 'multiselect' ||
|
|
217
|
+
scope.row.componentType === 'select') &&
|
|
218
|
+
isDynamicDataSourceSource(scope.row)
|
|
219
|
+
"
|
|
220
|
+
:value="scope.row.value"
|
|
221
|
+
:base-props="{
|
|
222
|
+
multiple:
|
|
223
|
+
scope.row.componentType === 'multiselect' ? true : false,
|
|
224
|
+
}"
|
|
225
|
+
:entity="scope.row"
|
|
226
|
+
:options="getDynamicDataSourceOptions(scope.row)"
|
|
227
|
+
:table-name="tableName"
|
|
228
|
+
:is-join-table="isJoinTable"
|
|
229
|
+
:list-code="code"
|
|
230
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
231
|
+
/>
|
|
232
|
+
<search-form-number
|
|
233
|
+
v-else-if="
|
|
234
|
+
scope.row.componentType &&
|
|
235
|
+
scope.row.componentType === 'inputNumber'
|
|
236
|
+
"
|
|
237
|
+
:r="r"
|
|
238
|
+
:n="n"
|
|
239
|
+
size="small"
|
|
240
|
+
@setValue="setNumberValue"
|
|
241
|
+
@focus="selectRow(scope.row)"
|
|
242
|
+
/>
|
|
243
|
+
|
|
244
|
+
<el-switch
|
|
245
|
+
v-else-if="
|
|
246
|
+
scope.row.componentType && scope.row.componentType === 'switch'
|
|
247
|
+
"
|
|
248
|
+
v-model="scope.row.value"
|
|
249
|
+
active-color="#13ce66"
|
|
250
|
+
inactive-color="#ff4949"
|
|
251
|
+
size="small"
|
|
252
|
+
:style="scope.row.searchControlWidth"
|
|
253
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
254
|
+
@focus="selectRow(scope.row)"
|
|
255
|
+
/>
|
|
256
|
+
<el-slider
|
|
257
|
+
v-else-if="
|
|
258
|
+
scope.row.componentType && scope.row.componentType === 'slider'
|
|
259
|
+
"
|
|
260
|
+
v-model="scope.row.value"
|
|
261
|
+
size="small"
|
|
262
|
+
:style="scope.row.searchControlWidth"
|
|
263
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
264
|
+
@focus="selectRow(scope.row)"
|
|
265
|
+
/>
|
|
266
|
+
|
|
267
|
+
<el-rate
|
|
268
|
+
v-else-if="
|
|
269
|
+
scope.row.componentType && scope.row.componentType === 'rate'
|
|
270
|
+
"
|
|
271
|
+
v-model="scope.row.value"
|
|
272
|
+
:style="scope.row.searchControlWidth"
|
|
273
|
+
size="small"
|
|
274
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
275
|
+
@focus="selectRow(scope.row)"
|
|
276
|
+
/>
|
|
277
|
+
<span v-else-if="customComponent(scope.row.prop) === true">
|
|
278
|
+
<component
|
|
279
|
+
:is="scope.row.componentName"
|
|
280
|
+
:ref="scope.row.componentName"
|
|
281
|
+
v-model:value="scope.row.value"
|
|
282
|
+
class="customComponent"
|
|
283
|
+
:prop="scope.row.prop"
|
|
284
|
+
:row="scope.row"
|
|
285
|
+
@input="
|
|
286
|
+
setValueToModelProp(
|
|
287
|
+
scope.$index,
|
|
288
|
+
$event,
|
|
289
|
+
scope.row.componentName
|
|
290
|
+
)
|
|
291
|
+
"
|
|
292
|
+
@focus="selectRow(scope.row)"
|
|
293
|
+
/>
|
|
294
|
+
</span>
|
|
295
|
+
<el-input
|
|
296
|
+
v-else
|
|
297
|
+
v-model="scope.row.value"
|
|
298
|
+
size="small"
|
|
299
|
+
:style="scope.row.searchControlWidth"
|
|
300
|
+
@focus="selectRow(scope.row)"
|
|
301
|
+
@keyup.enter="submitForm('searchForm')"
|
|
302
|
+
@input="setValueToModelProp(scope.$index, $event)"
|
|
303
|
+
/>
|
|
304
|
+
</template>
|
|
305
|
+
</el-table-column>
|
|
306
|
+
<el-table-column prop="rightBracket" label=")" width="90">
|
|
307
|
+
<template v-slot="scope">
|
|
308
|
+
<el-select
|
|
309
|
+
v-model="scope.row.rightBracket"
|
|
310
|
+
size="small"
|
|
311
|
+
clearable
|
|
312
|
+
@focus="selectRow(scope.row)"
|
|
313
|
+
>
|
|
314
|
+
<el-option label="" value="" />
|
|
315
|
+
<el-option label=")" value=")" />
|
|
316
|
+
<el-option label="))" value="))" />
|
|
317
|
+
<el-option label=")))" value=")))" />
|
|
318
|
+
</el-select>
|
|
319
|
+
</template>
|
|
320
|
+
</el-table-column>
|
|
321
|
+
<el-table-column
|
|
322
|
+
:label="$t('imatrixUIPublicModel.andOr')"
|
|
323
|
+
prop="logicOperator"
|
|
324
|
+
width="110"
|
|
325
|
+
>
|
|
326
|
+
<template v-slot="scope">
|
|
327
|
+
<el-select
|
|
328
|
+
v-model="scope.row.joinSign"
|
|
329
|
+
size="small"
|
|
330
|
+
clearable
|
|
331
|
+
@focus="selectRow(scope.row)"
|
|
332
|
+
>
|
|
333
|
+
<el-option :label="$t('imatrixUIPublicModel.perhaps')" value="or" />
|
|
334
|
+
<el-option :label="$t('imatrixUIPublicModel.also')" value="and" />
|
|
335
|
+
</el-select>
|
|
336
|
+
</template>
|
|
337
|
+
</el-table-column>
|
|
338
|
+
<el-table-column
|
|
339
|
+
:label="$t('imatrixUIPublicModel.whenTheVariableIsEmpty')"
|
|
340
|
+
width="110"
|
|
341
|
+
>
|
|
342
|
+
<template v-slot="scope">
|
|
343
|
+
<el-select
|
|
344
|
+
v-model="scope.row.variableIsNull"
|
|
345
|
+
size="small"
|
|
346
|
+
clearable
|
|
347
|
+
@focus="selectRow(scope.row)"
|
|
348
|
+
>
|
|
349
|
+
<el-option label="Null" value="null" />
|
|
350
|
+
<el-option
|
|
351
|
+
:label="$t('imatrixUIPublicModel.ignore11')"
|
|
352
|
+
value="1=1"
|
|
353
|
+
/>
|
|
354
|
+
<el-option
|
|
355
|
+
:label="$t('imatrixUIPublicModel.nonConformity')"
|
|
356
|
+
value="1<>1"
|
|
357
|
+
/>
|
|
358
|
+
</el-select>
|
|
359
|
+
</template>
|
|
360
|
+
</el-table-column>
|
|
361
|
+
</el-table>
|
|
362
|
+
</div>
|
|
363
|
+
</template>
|
|
364
|
+
|
|
365
|
+
<script>
|
|
366
|
+
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
367
|
+
import searchMethods from './search-methods'
|
|
368
|
+
import searchFormNumber from './search-form-number.vue'
|
|
369
|
+
// import { isOptionFunction, getSearchObject } from './utils'
|
|
370
|
+
import store from './store'
|
|
371
|
+
import SearchConditionInput from './search-condition-input.vue'
|
|
372
|
+
import SearchConditionList from './search-condition-list.vue'
|
|
373
|
+
import { getDynamicDataSourceOptions, isDynamicDataSourceSource } from './utils'
|
|
374
|
+
import * as Vue from 'vue'
|
|
375
|
+
export default {
|
|
376
|
+
components: {
|
|
377
|
+
searchFormNumber,
|
|
378
|
+
SearchConditionInput,
|
|
379
|
+
SearchConditionList,
|
|
380
|
+
},
|
|
381
|
+
name: 'SearchForm',
|
|
382
|
+
props: {
|
|
383
|
+
searchableColumns: {
|
|
384
|
+
type: Array,
|
|
385
|
+
default: null,
|
|
386
|
+
},
|
|
387
|
+
searchFormList: {
|
|
388
|
+
type: Array,
|
|
389
|
+
default: null,
|
|
390
|
+
},
|
|
391
|
+
propMap: {
|
|
392
|
+
type: Object,
|
|
393
|
+
default: null,
|
|
394
|
+
},
|
|
395
|
+
code: {
|
|
396
|
+
type: String,
|
|
397
|
+
default: null,
|
|
398
|
+
},
|
|
399
|
+
isSql: {
|
|
400
|
+
type: Boolean,
|
|
401
|
+
default: false,
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
data() {
|
|
405
|
+
const gridParams = store.get(this.code)
|
|
406
|
+
let tableName
|
|
407
|
+
if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
|
|
408
|
+
tableName = gridParams.basicInfo.tableName
|
|
409
|
+
}
|
|
410
|
+
let isHasJoinTable
|
|
411
|
+
if (
|
|
412
|
+
gridParams &&
|
|
413
|
+
gridParams.basicInfo &&
|
|
414
|
+
gridParams.basicInfo.hasJoinTable
|
|
415
|
+
) {
|
|
416
|
+
isHasJoinTable = gridParams.basicInfo.hasJoinTable
|
|
417
|
+
}
|
|
418
|
+
const customComponentNames = new Set()
|
|
419
|
+
return {
|
|
420
|
+
customComponentNames: customComponentNames,
|
|
421
|
+
currentRow: null,
|
|
422
|
+
formFlag: true,
|
|
423
|
+
operationArr: [],
|
|
424
|
+
tableName,
|
|
425
|
+
isJoinTable: isHasJoinTable, // 是否是关联表
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
computed: {},
|
|
429
|
+
watch: {
|
|
430
|
+
searchableColumns: {
|
|
431
|
+
deep: true,
|
|
432
|
+
handler(newValue, oldValue) {
|
|
433
|
+
this.searchableColumns = newValue
|
|
434
|
+
this.refreshOperators()
|
|
435
|
+
this.formFlag = false
|
|
436
|
+
this.$nextTick(() => {
|
|
437
|
+
this.formFlag = true
|
|
438
|
+
})
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
created() {
|
|
443
|
+
this.refreshOperators()
|
|
444
|
+
if (!this.searchFormList || this.searchFormList.length < 1) {
|
|
445
|
+
this.add()
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
methods: {
|
|
449
|
+
...searchMethods,
|
|
450
|
+
getDynamicDataSourceOptions(column) {
|
|
451
|
+
const gridParams = store.get(this.code)
|
|
452
|
+
return getDynamicDataSourceOptions(
|
|
453
|
+
column,
|
|
454
|
+
this.isSql,
|
|
455
|
+
gridParams.additionalParamMap
|
|
456
|
+
)
|
|
457
|
+
},
|
|
458
|
+
// 值设置是否是动态数据源类型的数据源
|
|
459
|
+
isDynamicDataSourceSource(column) {
|
|
460
|
+
return isDynamicDataSourceSource(column)
|
|
461
|
+
},
|
|
462
|
+
refreshOperators() {
|
|
463
|
+
if (this.searchableColumns && this.searchableColumns.length > 0) {
|
|
464
|
+
for (var i = 0; i < this.searchableColumns.length; i++) {
|
|
465
|
+
const prop = this.searchableColumns[i].prop
|
|
466
|
+
const item = this.propMap[prop]
|
|
467
|
+
this.operationArr[i] = this.getOperators(item)
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
handleCurrentChange(val) {
|
|
472
|
+
this.currentRow = val
|
|
473
|
+
},
|
|
474
|
+
tableRowClassName({ row, rowIndex }) {
|
|
475
|
+
// 把每一行的索引放进row
|
|
476
|
+
row.index = rowIndex
|
|
477
|
+
},
|
|
478
|
+
// 选择行
|
|
479
|
+
selectRow(row) {
|
|
480
|
+
this.$refs.table.setCurrentRow(row)
|
|
481
|
+
},
|
|
482
|
+
// 改变选择的属性
|
|
483
|
+
changeFieldName(index) {
|
|
484
|
+
const prop = this.currentRow.prop
|
|
485
|
+
const item = this.propMap[prop]
|
|
486
|
+
this.searchFormList[index].dataType = item.dataType
|
|
487
|
+
this.searchFormList[index].orgProp = item.orgProp
|
|
488
|
+
this.searchFormList[index].componentType = item.componentType
|
|
489
|
+
this.searchFormList[index].componentName = item.componentName
|
|
490
|
+
this.searchFormList[index].queryMatching = item.queryMatching
|
|
491
|
+
this.searchFormList[index].searchControlWidth = item.searchControlWidth
|
|
492
|
+
this.searchFormList[index].fuzzy = item.fuzzy
|
|
493
|
+
this.searchFormList[index].valueSet = item.valueSet
|
|
494
|
+
this.operationArr[index] = this.getOperators(item)
|
|
495
|
+
},
|
|
496
|
+
setValueToModelProp(index, value, componentName) {
|
|
497
|
+
if (index !== null && index !== undefined) {
|
|
498
|
+
this.searchFormList[index]['value'] = value
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
componentTypeTypeIsTree(componentType) {
|
|
502
|
+
if (componentType) {
|
|
503
|
+
if (componentType.indexOf('DeptManTree') > 0) {
|
|
504
|
+
// 说明是部门人员树
|
|
505
|
+
return true
|
|
506
|
+
}
|
|
507
|
+
if (componentType.indexOf('DeptTree') > 0) {
|
|
508
|
+
// 说明是部门树
|
|
509
|
+
return true
|
|
510
|
+
}
|
|
511
|
+
if (componentType.indexOf('WgManTree') > 0) {
|
|
512
|
+
// 说明是工作组人员树
|
|
513
|
+
return true
|
|
514
|
+
}
|
|
515
|
+
if (componentType.indexOf('WgManTree') > 0) {
|
|
516
|
+
// 说明是工作组树
|
|
517
|
+
return true
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
return false
|
|
521
|
+
},
|
|
522
|
+
getTreeFields(orgTreeSet) {
|
|
523
|
+
if (orgTreeSet && orgTreeSet !== '') {
|
|
524
|
+
return JSON.parse(orgTreeSet)
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
getTreeIsMultiTree(componentType) {
|
|
528
|
+
if (
|
|
529
|
+
componentType &&
|
|
530
|
+
componentType.indexOf('single') >= 0 &&
|
|
531
|
+
componentType.indexOf('Tree') > 0
|
|
532
|
+
) {
|
|
533
|
+
return false
|
|
534
|
+
} else {
|
|
535
|
+
return true
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
getTreeType(componentType) {
|
|
539
|
+
if (componentType) {
|
|
540
|
+
if (componentType.indexOf('DeptManTree') > 0) {
|
|
541
|
+
// 说明是部门人员树
|
|
542
|
+
return 'DeptUserTree'
|
|
543
|
+
}
|
|
544
|
+
if (componentType.indexOf('DeptTree') > 0) {
|
|
545
|
+
// 说明是部门树
|
|
546
|
+
return 'DeptTree'
|
|
547
|
+
}
|
|
548
|
+
if (componentType.indexOf('WgTree') > 0) {
|
|
549
|
+
// 说明是工作组人员树
|
|
550
|
+
return 'WgTree'
|
|
551
|
+
}
|
|
552
|
+
if (componentType.indexOf('WgManTree') > 0) {
|
|
553
|
+
// 说明是工作组树
|
|
554
|
+
return 'WgUserTree'
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
// 组织结构树文本框值改变事件
|
|
559
|
+
organizationInputEvent(prop, value) {
|
|
560
|
+
if (this.currentRow) {
|
|
561
|
+
this.currentRow['value'] = value
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
// 组织结构树文本框值清空事件
|
|
565
|
+
clearOrganizationInputEvent(prop) {
|
|
566
|
+
if (this.currentRow) {
|
|
567
|
+
this.currentRow['value'] = null
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
customComponent(prop) {
|
|
571
|
+
const column = this.propMap[prop]
|
|
572
|
+
const gridParams = store.get(this.code)
|
|
573
|
+
if (column.componentName && column.componentName !== '') {
|
|
574
|
+
this.customComponentNames.add(column.componentName)
|
|
575
|
+
return true
|
|
576
|
+
}
|
|
577
|
+
if (
|
|
578
|
+
(!column.componentName || column.componentName === '') &&
|
|
579
|
+
gridParams.options &&
|
|
580
|
+
gridParams.options.search &&
|
|
581
|
+
gridParams.options.search.customSearchElements
|
|
582
|
+
) {
|
|
583
|
+
// 定义了自定义查询组件
|
|
584
|
+
const propSearchEle =
|
|
585
|
+
gridParams.options.search.customSearchElements[column.prop]
|
|
586
|
+
// console.log('customComponent-customSearchElements-propSearchEle-', column.prop)
|
|
587
|
+
if (propSearchEle) {
|
|
588
|
+
column.componentName = 'custom-' + column.prop
|
|
589
|
+
const component = propSearchEle.call(this, column)
|
|
590
|
+
// console.log('customComponent-customSearchElements-')
|
|
591
|
+
if (component) {
|
|
592
|
+
this.customComponentNames.add(column.componentName)
|
|
593
|
+
window.$vueApp.component(column.componentName, component)
|
|
594
|
+
return true
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
return false
|
|
599
|
+
},
|
|
600
|
+
validateForm() {
|
|
601
|
+
return new Promise((resolve, reject) => {
|
|
602
|
+
resolve(true)
|
|
603
|
+
})
|
|
604
|
+
},
|
|
605
|
+
resetForm() {
|
|
606
|
+
if (this.customComponentNames && this.customComponentNames.length > 0) {
|
|
607
|
+
for (const componentName of this.customComponentNames) {
|
|
608
|
+
// 遍历
|
|
609
|
+
this.$refs[componentName][0].resetField()
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
// 当是保持页数默认赋值的查询字段resetFields()不会被清空,需要下面的方法遍历设未null
|
|
613
|
+
$emit(this, 'resetForm')
|
|
614
|
+
this.add()
|
|
615
|
+
},
|
|
616
|
+
setNumberValue(value, r, n) {
|
|
617
|
+
if (this.currentRow) {
|
|
618
|
+
this.currentRow['value'] = value
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
// 添加
|
|
622
|
+
add() {
|
|
623
|
+
if (!this.searchFormList) {
|
|
624
|
+
this.searchFormList = []
|
|
625
|
+
}
|
|
626
|
+
this.searchFormList.push({
|
|
627
|
+
leftBracket: '',
|
|
628
|
+
prop: '',
|
|
629
|
+
operator: '',
|
|
630
|
+
value: '',
|
|
631
|
+
rightBracket: '',
|
|
632
|
+
joinSign: 'or',
|
|
633
|
+
dataType: '',
|
|
634
|
+
propDbName: '',
|
|
635
|
+
})
|
|
636
|
+
this.operationArr.push([])
|
|
637
|
+
},
|
|
638
|
+
// 删除
|
|
639
|
+
remove(index) {
|
|
640
|
+
if (index !== null && index !== undefined && index !== -1) {
|
|
641
|
+
this.searchFormList.splice(index, 1)
|
|
642
|
+
} else {
|
|
643
|
+
if (this.currentRow === null) {
|
|
644
|
+
this.$alert(this.$t('message.pleaseSelectARow'))
|
|
645
|
+
return
|
|
646
|
+
}
|
|
647
|
+
if (
|
|
648
|
+
this.currentRow &&
|
|
649
|
+
this.currentRow.index &&
|
|
650
|
+
this.currentRow.index !== null &&
|
|
651
|
+
this.currentRow.index !== undefined
|
|
652
|
+
) {
|
|
653
|
+
this.searchFormList.splice(this.currentRow.index, 1)
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
// 实时根据类型改变连接符
|
|
658
|
+
getOperators(item) {
|
|
659
|
+
if (item) {
|
|
660
|
+
if (
|
|
661
|
+
item.dataType === 'INTEGER' ||
|
|
662
|
+
item.dataType === 'LONG' ||
|
|
663
|
+
item.dataType === 'DOUBLE' ||
|
|
664
|
+
item.dataType === 'FLOAT'
|
|
665
|
+
) {
|
|
666
|
+
return [
|
|
667
|
+
{
|
|
668
|
+
name: 'GT',
|
|
669
|
+
label: this.$t('imatrixUIPublicModel.greaterThan'),
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
name: 'LT',
|
|
673
|
+
label: this.$t('imatrixUIPublicModel.lessThan'),
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
name: 'EQ',
|
|
677
|
+
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
name: 'LET',
|
|
681
|
+
label: this.$t('imatrixUIPublicModel.notGreaterThan'),
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
name: 'GET',
|
|
685
|
+
label: this.$t('imatrixUIPublicModel.notLessThan'),
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: 'NET',
|
|
689
|
+
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: 'IS_NULL',
|
|
693
|
+
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
name: 'IS_NOT_NULL',
|
|
697
|
+
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
698
|
+
},
|
|
699
|
+
]
|
|
700
|
+
} else if (item.dataType === 'DATE' || item.dataType === 'TIME') {
|
|
701
|
+
return [
|
|
702
|
+
{
|
|
703
|
+
name: 'GT',
|
|
704
|
+
label: this.$t('imatrixUIPublicModel.laterThan'),
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
name: 'LT',
|
|
708
|
+
label: this.$t('imatrixUIPublicModel.earlierThan'),
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
name: 'EQ',
|
|
712
|
+
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
name: 'LET',
|
|
716
|
+
label: this.$t('imatrixUIPublicModel.noLaterThan'),
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
name: 'GET',
|
|
720
|
+
label: this.$t('imatrixUIPublicModel.noEarlierThan'),
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
name: 'IS_NULL',
|
|
724
|
+
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
name: 'IS_NOT_NULL',
|
|
728
|
+
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
729
|
+
},
|
|
730
|
+
]
|
|
731
|
+
} else if (item.dataType === 'TEXT') {
|
|
732
|
+
return [
|
|
733
|
+
{
|
|
734
|
+
name: 'EQ',
|
|
735
|
+
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
name: 'NET',
|
|
739
|
+
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: 'CONTAIN',
|
|
743
|
+
label: this.$t('imatrixUIPublicModel.contain'),
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: 'NOT_CONTAIN',
|
|
747
|
+
label: this.$t('imatrixUIPublicModel.notIncluded'),
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
name: 'IS_NULL',
|
|
751
|
+
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
name: 'IS_NOT_NULL',
|
|
755
|
+
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
756
|
+
},
|
|
757
|
+
]
|
|
758
|
+
} else {
|
|
759
|
+
return [
|
|
760
|
+
{
|
|
761
|
+
name: 'EQ',
|
|
762
|
+
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: 'NET',
|
|
766
|
+
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
name: 'IS_NULL',
|
|
770
|
+
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
name: 'IS_NOT_NULL',
|
|
774
|
+
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
775
|
+
},
|
|
776
|
+
]
|
|
777
|
+
}
|
|
778
|
+
} else {
|
|
779
|
+
return [
|
|
780
|
+
{
|
|
781
|
+
name: 'EQ',
|
|
782
|
+
label: this.$t('imatrixUIPublicModel.beEqualTo'),
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: 'NET',
|
|
786
|
+
label: this.$t('imatrixUIPublicModel.notEqualTo'),
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
name: 'IS_NULL',
|
|
790
|
+
label: this.$t('imatrixUIPublicModel.isNull'),
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
name: 'IS_NOT_NULL',
|
|
794
|
+
label: this.$t('imatrixUIPublicModel.isNotNull'),
|
|
795
|
+
},
|
|
796
|
+
]
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
emits: ['resetForm'],
|
|
801
|
+
}
|
|
802
|
+
</script>
|
|
803
|
+
|
|
804
|
+
<style scoped>
|
|
805
|
+
.grid-search-form {
|
|
806
|
+
overflow: auto;
|
|
807
|
+
}
|
|
808
|
+
.grid-search-form :deep(.el-form-item) {
|
|
809
|
+
margin-bottom: 0px;
|
|
810
|
+
}
|
|
811
|
+
.grid-search-form :deep(.search-btn) {
|
|
812
|
+
margin-bottom: 5px;
|
|
813
|
+
text-align: center;
|
|
814
|
+
}
|
|
815
|
+
.grid-search-form :deep(.el-select),
|
|
816
|
+
.grid-search-form :deep(.customComponent) {
|
|
817
|
+
width: 100%;
|
|
818
|
+
}
|
|
819
|
+
</style>
|