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