imatrix-ui 0.0.15 → 0.1.1-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.
Files changed (171) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/README.md +7 -0
  3. package/components/dynamic-source-select/dynamic-source-select-service.js +106 -0
  4. package/components/dynamic-source-select/dynamic-source-select.vue +673 -0
  5. package/components/dynamic-source-select/events.js +77 -0
  6. package/components/fs-preview/fs-preview.vue +287 -0
  7. package/components/index.js +26 -0
  8. package/components/plugins/export-data-new.js +623 -0
  9. package/components/plugins/export-data.js +431 -0
  10. package/components/plugins/index.js +15 -0
  11. package/components/plugins/public-method.js +47 -0
  12. package/components/rich-editor/index-bak.vue +306 -0
  13. package/components/rich-editor/index.vue +236 -0
  14. package/components/rich-editor/langs/zh-Hans.js +438 -0
  15. package/components/rich-editor/viewer.vue +105 -0
  16. package/components/super-grid/apis.js +1065 -0
  17. package/components/super-grid/columns-config.vue +430 -0
  18. package/components/super-grid/custom-formatter.js +330 -0
  19. package/components/super-grid/dynamic-input.vue +1706 -0
  20. package/components/super-grid/eventBus.js +2 -0
  21. package/components/super-grid/events.js +56 -0
  22. package/components/super-grid/formValidatorUtil.js +300 -0
  23. package/components/super-grid/formatter.js +190 -0
  24. package/components/super-grid/group-column.vue +100 -0
  25. package/components/super-grid/header-context-menu.vue +82 -0
  26. package/components/super-grid/index-column.vue +69 -0
  27. package/components/super-grid/normal-column.vue +1148 -0
  28. package/components/super-grid/public-methods.js +30 -0
  29. package/components/super-grid/row-operation.vue +193 -0
  30. package/components/super-grid/search-button.vue +74 -0
  31. package/components/super-grid/search-condition-input.vue +73 -0
  32. package/components/super-grid/search-condition-list.vue +68 -0
  33. package/components/super-grid/search-form-advancedQuery.vue +820 -0
  34. package/components/super-grid/search-form-dialog.vue +77 -0
  35. package/components/super-grid/search-form-item.vue +470 -0
  36. package/components/super-grid/search-form-number.vue +111 -0
  37. package/components/super-grid/search-form-open.vue +178 -0
  38. package/components/super-grid/search-form-ordinarySearch.vue +218 -0
  39. package/components/super-grid/search-form.vue +756 -0
  40. package/components/super-grid/search-methods.js +484 -0
  41. package/components/super-grid/selection-column.vue +46 -0
  42. package/components/super-grid/store.js +3 -0
  43. package/components/super-grid/super-grid-service.js +682 -0
  44. package/components/super-grid/super-grid.vue +2893 -0
  45. package/components/super-grid/utils.js +851 -0
  46. package/components/super-grid/view-image-dialog.vue +173 -0
  47. package/components/utils/gogocodeTransfer.js +59 -0
  48. package/components/utils/utils.js +180 -0
  49. package/components/utils/value-set.js +98 -0
  50. package/components/z-test-utton/index.vue +82 -0
  51. package/package.json +29 -40
  52. package/public/index.html +13 -0
  53. package/public/vite.svg +1 -0
  54. package/src/api/sso-service.js +172 -19
  55. package/src/api/tab.js +36 -0
  56. package/src/api/user-service.js +11 -11
  57. package/src/assets/401/401.gif +0 -0
  58. package/src/assets/404/404-cloud.png +0 -0
  59. package/src/assets/404/404.png +0 -0
  60. package/src/assets/cloud.png +0 -0
  61. package/src/directives/permission/index.js +13 -13
  62. package/src/directives/permission/permission.js +20 -15
  63. package/src/i18n/i18n.js +16 -0
  64. package/src/i18n/langs/cn.js +254 -0
  65. package/src/i18n/langs/en.js +264 -0
  66. package/src/permission.js +157 -71
  67. package/src/plugins.js +18 -18
  68. package/src/router/index.js +96 -69
  69. package/src/store/getters.js +15 -10
  70. package/src/store/index.js +19 -19
  71. package/src/store/modules/app.js +54 -42
  72. package/src/store/modules/permission.js +137 -73
  73. package/src/store/modules/tab-content.js +36 -0
  74. package/src/store/modules/user.js +293 -80
  75. package/src/styles/display-layout.scss +34 -0
  76. package/src/styles/element-ui.scss +29 -29
  77. package/src/styles/index.scss +157 -78
  78. package/src/styles/mixin.scss +27 -27
  79. package/src/styles/theme/black/font-style.scss +70 -0
  80. package/src/styles/theme/black/index.scss +306 -0
  81. package/src/styles/theme/black/sidebar.scss +189 -0
  82. package/src/styles/theme/blue/font-style.scss +46 -0
  83. package/src/styles/theme/blue/index.scss +172 -0
  84. package/src/styles/{sidebar.scss → theme/blue/sidebar.scss} +171 -141
  85. package/src/styles/theme/blue2/font-style.scss +70 -0
  86. package/src/styles/theme/blue2/index.scss +188 -0
  87. package/src/styles/theme/blue2/sidebar.scss +201 -0
  88. package/src/styles/theme/dark-blue/button.scss +9 -0
  89. package/src/styles/theme/dark-blue/card.scss +62 -0
  90. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  91. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  92. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  93. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  94. package/src/styles/theme/dark-blue/font.scss +71 -0
  95. package/src/styles/theme/dark-blue/form.scss +51 -0
  96. package/src/styles/theme/dark-blue/index.scss +269 -0
  97. package/src/styles/theme/dark-blue/input.scss +15 -0
  98. package/src/styles/theme/dark-blue/message.scss +8 -0
  99. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  100. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  101. package/src/styles/theme/dark-blue/sidebar.scss +266 -0
  102. package/src/styles/theme/dark-blue/tab.scss +83 -0
  103. package/src/styles/theme/dark-blue/table.scss +60 -0
  104. package/src/styles/theme/dark-blue/tree.scss +31 -0
  105. package/src/styles/theme/dark-blue/var.scss +1028 -0
  106. package/src/styles/theme/gray/card-style.scss +54 -0
  107. package/src/styles/theme/gray/font-style.scss +70 -0
  108. package/src/styles/theme/gray/index.scss +172 -0
  109. package/src/styles/theme/gray/input-style.scss +19 -0
  110. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  111. package/src/styles/theme/gray/sidebar.scss +231 -0
  112. package/src/styles/theme/gray/tab-style.scss +81 -0
  113. package/src/styles/transition.scss +47 -46
  114. package/src/utils/auth-api.js +159 -0
  115. package/src/utils/auth.js +61 -15
  116. package/src/utils/calculator/calculator-factory-wf.js +558 -0
  117. package/src/utils/calculator/calculator-factory.js +145 -0
  118. package/src/utils/calculator/calculator-util.js +166 -0
  119. package/src/utils/common-util.js +305 -0
  120. package/src/utils/eventBus.js +2 -0
  121. package/src/utils/iconUtils.js +28 -0
  122. package/src/utils/index.js +102 -86
  123. package/src/utils/jump-page-utils.js +814 -0
  124. package/src/utils/local-storage.js +33 -31
  125. package/src/utils/menu.js +19 -0
  126. package/src/utils/permission.js +31 -26
  127. package/src/utils/permissionAuth.js +90 -0
  128. package/src/utils/range-selector.js +188 -0
  129. package/src/utils/request.js +270 -116
  130. package/src/utils/restful-interface-utils.js +57 -0
  131. package/src/utils/util.js +698 -0
  132. package/src/utils/validate.js +34 -33
  133. package/src/utils/watermark.js +108 -0
  134. package/src/utils/workflow-util.js +93 -0
  135. package/src/views/404.vue +248 -228
  136. package/src/views/dsc-component/Sidebar/Item.vue +84 -0
  137. package/src/views/dsc-component/Sidebar/Link.vue +38 -0
  138. package/src/views/dsc-component/Sidebar/SidebarItem.vue +196 -0
  139. package/src/views/dsc-component/Sidebar/index.vue +220 -0
  140. package/src/views/dsc-component/tabs/tab-content.vue +199 -0
  141. package/src/views/error-page/401.vue +106 -91
  142. package/src/views/error-page/404.vue +248 -228
  143. package/src/views/layout/EmptyLayout.vue +3 -0
  144. package/src/views/layout/Layout.vue +81 -68
  145. package/src/views/layout/NewLayout.vue +18 -0
  146. package/src/views/layout/components/AppMain.vue +39 -29
  147. package/src/views/layout/components/Breadcrumb/index.vue +156 -0
  148. package/src/views/layout/components/Menubar/Item.vue +57 -0
  149. package/src/views/layout/components/Menubar/Link.vue +38 -0
  150. package/src/views/layout/components/Menubar/SidebarItem.vue +164 -0
  151. package/src/views/layout/components/Menubar/index.vue +210 -0
  152. package/src/views/layout/components/Sidebar/Item.vue +53 -29
  153. package/src/views/layout/components/Sidebar/Link.vue +38 -39
  154. package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -100
  155. package/src/views/layout/components/Sidebar/index.vue +141 -48
  156. package/src/views/layout/components/iframe-page.vue +38 -0
  157. package/src/views/layout/components/index.js +4 -3
  158. package/src/views/layout/components/tabs/tab-content.vue +207 -0
  159. package/src/views/layout/mixin/ResizeHandler.js +41 -41
  160. package/src/views/layout/tab-content-iframe-index.vue +38 -0
  161. package/src/views/layout/tab-content-index.vue +93 -0
  162. package/src/views/login/authredirect.vue +10 -10
  163. package/src/views/login/index.vue +296 -203
  164. package/src/views/login/update-password.vue +243 -0
  165. package/src/views/redirect/index.vue +14 -12
  166. package/src/views/wf-history/tache-subprocess-history.vue +45 -0
  167. package/vite.config.js +31 -0
  168. package/lib/super-ui.css +0 -1
  169. package/lib/super-ui.umd.min.js +0 -2
  170. package/src/styles/variables.scss +0 -4
  171. package/src/views/layout/components/Navbar.vue +0 -92
@@ -0,0 +1,484 @@
1
+ import * as Vue from 'vue'
2
+ const searchMethods = {
3
+ packageSearchParam() {
4
+ if (
5
+ this.searchType === 'normal' ||
6
+ !this.searchType ||
7
+ this.searchType === null ||
8
+ this.searchType === undefined ||
9
+ this.searchType === ''
10
+ ) {
11
+ const searchParams = []
12
+ this.searchableColumns.forEach((column) => {
13
+ const param = { leftBracket: '', rightBracket: '', joinSign: 'and' }
14
+ // 布尔型字段时prop中去掉了is字符,查询时返回带有is的属性字段,
15
+ // 否则会导致查询布尔型报500错误
16
+ let orgProp = column.orgProp
17
+ // sql查询时,会把点“.”改为两个下划线"__"
18
+ const replaceDot = '__'
19
+ if (orgProp && orgProp.indexOf(replaceDot) > 0) {
20
+ // 表示包括点“.”,需要把两个下划线"__"重新改为点“.”,否则会导致查询报500错误
21
+ orgProp = orgProp.replace(replaceDot, '.')
22
+ }
23
+ param.propName = orgProp
24
+ param.enumName = column.enumName
25
+ param.operator = this.getOperator(column)
26
+ param.dataType = column.dataType
27
+ param.matchingType = column.queryMatching
28
+ param.formatter = column.formatter
29
+ ? JSON.parse(JSON.stringify(column.formatter))
30
+ : column.formatter
31
+ const values = this.getFormItemValue(column.prop)
32
+ if (column.dataType === 'DATE' || column.dataType === 'TIME') {
33
+ // 日期 或 时间类型
34
+ // console.log('values==', values, column.prop)
35
+ if (
36
+ values !== null &&
37
+ values.length === 2 &&
38
+ values[0] !== null &&
39
+ values[1] !== null
40
+ ) {
41
+ const format = this.getDateTimeSearchFormatter(
42
+ column,
43
+ column.dataType,
44
+ column.formatter
45
+ )
46
+ if (format) {
47
+ if (!param.formatter) {
48
+ param.formatter = {}
49
+ param.formatter.options = {}
50
+ } else if (!param.formatter.options) {
51
+ param.formatter.options = {}
52
+ }
53
+ param.formatter.options.format = format
54
+ }
55
+ param.startValue = this.getDateTimeMillsByDateStr(values[0], format)
56
+ param.endValue = this.getDateTimeMillsByDateStr(values[1], format)
57
+ searchParams.push(param)
58
+ }
59
+ } else if (
60
+ (column.dataType === 'INTEGER' ||
61
+ column.dataType === 'LONG' ||
62
+ column.dataType === 'DOUBLE') &&
63
+ Array.isArray(values)
64
+ ) {
65
+ // 日期 或 时间类型
66
+ // const values1 = this.getFormItemValue(column.prop)
67
+ if (values) {
68
+ if (column.componentType === 'yearRange') {
69
+ if (values[0] || values[1]) {
70
+ param.startValue = values[0]
71
+ param.endValue = values[1]
72
+ if (values[0] && !values[1]) {
73
+ param.startValue = values[0]
74
+ param.endValue = 9999
75
+ } else if (!values[0] && values[1]) {
76
+ param.startValue = 0
77
+ param.endValue = values[1]
78
+ }
79
+ searchParams.push(param)
80
+ }
81
+ } else {
82
+ if (
83
+ !Array.isArray(values) ||
84
+ values.length < 2 ||
85
+ (values[0] === null && values[1] === null)
86
+ ) {
87
+ // 填写了一个有效值
88
+ if (!Array.isArray(values)) {
89
+ param.propValue = values
90
+ searchParams.push(param)
91
+ } else if (values.length < 2) {
92
+ param.propValue = values[0]
93
+ searchParams.push(param)
94
+ } else if (values[0] === null) {
95
+ param.propValue = values[1]
96
+ searchParams.push(param)
97
+ } else if (values[1] === null) {
98
+ param.propValue = values[0]
99
+ searchParams.push(param)
100
+ }
101
+ } else {
102
+ // 填写了两个有效值
103
+
104
+ param.startValue = values[0]
105
+ param.endValue = values[1]
106
+ searchParams.push(param)
107
+ }
108
+ }
109
+ }
110
+ } else if (
111
+ column.componentType &&
112
+ column.componentType.indexOf('Tree') !== -1 &&
113
+ column.componentType.indexOf('single') === -1
114
+ ) {
115
+ // 说明是多选组织树
116
+ // 是否是人员树
117
+ const isUser = this.isUserTree(column.componentType)
118
+ const values = this.getFormItemValue(column.prop)
119
+ if (values && values !== '') {
120
+ const newValue = []
121
+ let valueArr = values
122
+ if (Array.isArray(values)) {
123
+ // 表示是数组
124
+ valueArr = values
125
+ } else {
126
+ // 表示是字符串
127
+ valueArr = values.split(',')
128
+ }
129
+ if (Array.isArray(valueArr) && valueArr && valueArr.length > 0) {
130
+ valueArr.forEach((val) => {
131
+ // 截取用户名中的英文名信息
132
+ const userName = this.getUserName(isUser, val)
133
+ if (userName !== undefined && userName !== null) {
134
+ newValue.push(userName)
135
+ }
136
+ })
137
+ }
138
+ this.packageValueWithArray(newValue, searchParams, param)
139
+ }
140
+ } else if (
141
+ column.componentType &&
142
+ column.componentType.indexOf('Tree') !== -1
143
+ ) {
144
+ // 说明是单选组织树
145
+ // 是否是人员树
146
+ const isUser = this.isUserTree(column.componentType)
147
+ let propValue = this.getFormItemValue(column.prop)
148
+ // 截取用户名中的英文名信息
149
+ propValue = this.getUserName(isUser, propValue)
150
+ this.packageValueWithArray(propValue, searchParams, param)
151
+ } else {
152
+ if (column.componentType === 'multiselect') {
153
+ // 表示是多选下拉框选择器选择的值
154
+ const values = this.getFormItemValue(column.prop)
155
+ // console.log('values==', values, column.prop)
156
+ this.packageValueWithArray(values, searchParams, param)
157
+ } else {
158
+ const propValue = this.getFormItemValue(column.prop)
159
+ this.packageValueWithArray(propValue, searchParams, param)
160
+ }
161
+ }
162
+ })
163
+ return searchParams
164
+ } else {
165
+ const newSearchFormList = []
166
+ this.searchFormList.forEach((param) => {
167
+ let newParam = {}
168
+ newParam = param
169
+ // const param = { leftBracket: '', rightBracket: '', joinSign: 'and' }
170
+ // 布尔型字段时prop中去掉了is字符,查询时返回带有is的属性字段,
171
+ // 否则会导致查询布尔型报500错误
172
+ let orgProp = newParam.orgProp
173
+ // sql查询时,会把点“.”改为两个下划线"__"
174
+ const replaceDot = '__'
175
+ if (orgProp && orgProp.indexOf(replaceDot) > 0) {
176
+ // 表示包括点“.”,需要把两个下划线"__"重新改为点“.”,否则会导致查询报500错误
177
+ orgProp = orgProp.replace(replaceDot, '.')
178
+ }
179
+ newParam.propName = orgProp
180
+ newParam.operator = this.getOperator(param)
181
+ newParam.matchingType = param.queryMatching
182
+ if (newParam.dataType === 'DATE' || newParam.dataType === 'TIME') {
183
+ // 日期 或 时间类型
184
+ const values = newParam.value
185
+ // console.log('values==', values, column.prop)
186
+ if (
187
+ values !== null &&
188
+ values.length === 2 &&
189
+ values[0] !== null &&
190
+ values[1] !== null
191
+ ) {
192
+ newParam.startValue = values[0]
193
+ newParam.endValue = values[1]
194
+ }
195
+ } else if (
196
+ newParam.dataType === 'INTEGER' ||
197
+ newParam.dataType === 'LONG'
198
+ ) {
199
+ const values1 = newParam.value
200
+ if (values1) {
201
+ if (
202
+ !Array.isArray(values1) ||
203
+ values1.length < 2 ||
204
+ (values1[0] === null && values1[1] === null)
205
+ ) {
206
+ // 填写了一个有效值
207
+ if (!Array.isArray(values1)) {
208
+ newParam.propValue = values1
209
+ } else if (values1.length < 2) {
210
+ newParam.propValue = values1[0]
211
+ } else if (values1[0] === null) {
212
+ newParam.propValue = values1[1]
213
+ } else if (values1[1] === null) {
214
+ newParam.propValue = values1[0]
215
+ }
216
+ } else {
217
+ // 填写了两个有效值
218
+ newParam.startValue = values1[0]
219
+ newParam.endValue = values1[1]
220
+ }
221
+ }
222
+ } else if (
223
+ newParam.componentType &&
224
+ newParam.componentType.indexOf('Tree') !== -1 &&
225
+ newParam.componentType.indexOf('single') === -1
226
+ ) {
227
+ // 树多选,先手动分割数组,在生成多条
228
+ // 是否是人员树
229
+ const isUser = this.isUserTree(newParam.componentType)
230
+ const values = newParam.value
231
+ if (values && values !== '') {
232
+ const newValue = []
233
+ let valueArr = values
234
+ if (Array.isArray(values)) {
235
+ valueArr = values
236
+ } else {
237
+ valueArr = values.split(',')
238
+ }
239
+ if (Array.isArray(valueArr) && valueArr && valueArr.length > 0) {
240
+ valueArr.forEach((val) => {
241
+ // 截取用户名中的英文名信息
242
+ const userName = this.getUserName(isUser, val)
243
+ if (userName !== undefined && userName !== null) {
244
+ newValue.push(userName)
245
+ }
246
+ })
247
+ }
248
+ this.packageValueWithArray(newValue, newSearchFormList, param)
249
+ }
250
+ } else if (
251
+ newParam.componentType &&
252
+ newParam.componentType.indexOf('Tree') !== -1
253
+ ) {
254
+ // 说明是单选组织树
255
+ // 是否是人员树
256
+ const isUser = this.isUserTree(newParam.componentType)
257
+ let propValue = newParam.value
258
+ // 截取用户名中的英文名信息
259
+ propValue = this.getUserName(isUser, propValue)
260
+ this.packageValueWithArray(propValue, newSearchFormList, param)
261
+ } else {
262
+ if (newParam.componentType === 'multiselect') {
263
+ // 表示是多选下拉框选择器选择的值
264
+ const values = newParam.value
265
+ // console.log('values==', values, column.prop)
266
+ this.packageValueWithArray(values, newSearchFormList, param)
267
+ } else {
268
+ const values = newParam.value
269
+ this.packageValueWithArray(values, newSearchFormList, param)
270
+ }
271
+ }
272
+ })
273
+ return newSearchFormList
274
+ }
275
+ },
276
+ // 获得日期、时间查询格式配置,影响后台查询结果
277
+ getDateTimeSearchFormatter(column, dataType, formatter) {
278
+ const dateTimeFormat = 'yyyy-MM-dd HH:mm:ss'
279
+ const dateFormat = 'yyyy-m-d'
280
+ let format
281
+ if (column.componentType === 'dateSection') {
282
+ // 日期区间
283
+ format = dateFormat
284
+ } else if (column.componentType === 'dateTimePicker') {
285
+ // 日期时间选择器
286
+ format = dateTimeFormat
287
+ } else if (column.dataType === 'DATE' || column.componentType === 'date') {
288
+ // 日期选择器
289
+ format = dateFormat
290
+ }
291
+ if (!format) {
292
+ if (formatter) {
293
+ const formatOptions = formatter.options
294
+ if (formatOptions && formatOptions != null) {
295
+ format = formatOptions.format
296
+ }
297
+ }
298
+ }
299
+
300
+ if (!format) {
301
+ if (dataType === 'DATE') {
302
+ format = 'yyyy-m-d'
303
+ } else if (dataType === 'TIME') {
304
+ format = 'yyyy-m-d hh:mm:ss'
305
+ }
306
+ }
307
+ return format
308
+ },
309
+ // 根据日期字符串获得日期毫秒值
310
+ getDateTimeMillsByDateStr(dateStr, format) {
311
+ if (typeof dateStr === 'string' && format) {
312
+ // 表示是格式化后的值,转成date毫秒值传给后台,解决时区问题
313
+ format = format.toLowerCase()
314
+ if (
315
+ format.indexOf('h') > 0 &&
316
+ format.indexOf('m') > 0 &&
317
+ format.indexOf('s') > 0
318
+ ) {
319
+ // 表示有时分秒
320
+ dateStr = new Date(dateStr).getTime()
321
+ } else {
322
+ // 表示精确到日
323
+ dateStr = new Date(dateStr + ' 00:00:00').getTime()
324
+ }
325
+ }
326
+ return dateStr
327
+ },
328
+ // 是否是人员树
329
+ isUserTree(componentType) {
330
+ if (
331
+ componentType.indexOf('DeptManTree') > 0 ||
332
+ componentType.indexOf('WgManTree') > 0
333
+ ) {
334
+ return true
335
+ }
336
+ return false
337
+ },
338
+ // 获得用户名
339
+ getUserName(isUser, val) {
340
+ if (
341
+ isUser &&
342
+ val !== undefined &&
343
+ val !== null &&
344
+ val.indexOf('(') > 0 &&
345
+ val.indexOf(')') > 0
346
+ ) {
347
+ // 说明是人员树,如果是值中包括英文名,把英文名截取掉,因为有些字段保存的有英文名,有些没有英文名,为了便于查询,所以统一将英文名去掉。
348
+ // 例如:张三(Andy),处理后是:张三
349
+ val = val.substring(0, val.indexOf('('))
350
+ }
351
+ return val
352
+ },
353
+ getOperator(column) {
354
+ if (
355
+ (column.dataType === 'TEXT' || column.dataType === 'CLOB') &&
356
+ column.fuzzy &&
357
+ (!column.componentType ||
358
+ (column.componentType &&
359
+ ((column.componentType !== 'select' &&
360
+ column.componentType !== 'multiselect') ||
361
+ (column.componentType === 'multiselect' &&
362
+ column.ifMultiData !== undefined &&
363
+ column.ifMultiData === true))))
364
+ ) {
365
+ // 是否是文本类型的字段,且启用了模糊查询,则表示操作符为contains模糊查询
366
+ return 'CONTAIN'
367
+ } else if (Array.isArray(this.getFormItemValue(column.prop))) {
368
+ if (
369
+ column.dataType === 'INTEGER' ||
370
+ column.dataType === 'LONG' ||
371
+ column.dataType === 'DOUBLE'
372
+ ) {
373
+ return 'BETWEEN'
374
+ } else {
375
+ return 'EQ'
376
+ }
377
+ } else {
378
+ // 否则就是等于
379
+ return 'EQ'
380
+ }
381
+ },
382
+ getFormItemValue(prop, index) {
383
+ if (prop.indexOf('.') > 0) {
384
+ const parentOjbect = this.getParentObject(prop)
385
+ if (index != null && index !== undefined) {
386
+ return parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index]
387
+ } else {
388
+ return parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)]
389
+ }
390
+ } else {
391
+ if (index != null && index !== undefined) {
392
+ return this.searchForm[prop][index]
393
+ } else {
394
+ return this.searchForm[prop]
395
+ }
396
+ }
397
+ },
398
+ getParentObject(prop) {
399
+ const nestedProp = prop.split('.')
400
+ // 属性只有一个时父对象就是searchForm
401
+ if (nestedProp.length === 1) {
402
+ return this.searchForm
403
+ } else {
404
+ let parentObject
405
+ // 属性超过2个时先找到最后一层属性的父对象
406
+ for (let i = 0; i < nestedProp.length - 1; i++) {
407
+ parentObject = this.searchForm[nestedProp[i]]
408
+ }
409
+ return parentObject
410
+ }
411
+ },
412
+ // 处理多选下拉框时获得的值
413
+ // 处理非多选下拉框的值
414
+ packageValueWithArray(value, searchParams, param) {
415
+ if (value && Array.isArray(value)) {
416
+ const selectValues = value
417
+ // if (!Array.isArray(values)) {
418
+ // selectValues = values.split(',')
419
+ // }
420
+ let num = 0
421
+ selectValues.forEach((val) => {
422
+ const selectParam = Object.assign({}, param)
423
+ selectParam.joinSign = 'or' // 将条件连接符修改为or,否则无法查询到值
424
+ if (num === 0) {
425
+ selectParam.leftBracket = '1' // 左边有1个括号
426
+ }
427
+ if (num === selectValues.length - 1) {
428
+ // 说明是最后一个条件
429
+ selectParam.rightBracket = '1' // 右边有1个括号
430
+ selectParam.joinSign = 'and' // 最后一个条件的连接符需要修改为and
431
+ }
432
+ selectParam.propValue = val
433
+ // 注释该代码,是因为多选下拉框数据库中以逗号分隔存储时,使用EQ无法查询出结果,需要使用getOpertator计算出的结果
434
+ // selectParam.operator = 'EQ'
435
+ if (val !== undefined && val !== null) {
436
+ searchParams.push(selectParam)
437
+ }
438
+ num++
439
+ })
440
+ } else if (
441
+ typeof value !== 'undefined' &&
442
+ value !== '' &&
443
+ value !== null &&
444
+ !Array.isArray(value)
445
+ ) {
446
+ // 不是数组
447
+ param.propValue = value
448
+ searchParams.push(param)
449
+ }
450
+ },
451
+ // 保存查询条件
452
+ saveSearchCondition(condition) {
453
+ return this.$http.post(
454
+ window.$vueApp.config.globalProperties.baseAPI +
455
+ '/component/super-grids/search-conditions',
456
+ condition
457
+ )
458
+ },
459
+ // 显示查询条件列表
460
+ listSearchCondition(listCode) {
461
+ return this.$http.get(
462
+ window.$vueApp.config.globalProperties.baseAPI +
463
+ '/component/super-grids/search-condition-list/' +
464
+ listCode
465
+ )
466
+ },
467
+ // 删除查询条件
468
+ removeSearchCondition(conditionId) {
469
+ return this.$http.delete(
470
+ window.$vueApp.config.globalProperties.baseAPI +
471
+ '/component/super-grids/search-conditions/' +
472
+ conditionId
473
+ )
474
+ },
475
+ // 查询条件
476
+ getSearchCondition(conditionId) {
477
+ return this.$http.get(
478
+ window.$vueApp.config.globalProperties.baseAPI +
479
+ '/component/super-grids/search-conditions/' +
480
+ conditionId
481
+ )
482
+ },
483
+ }
484
+ export default searchMethods
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <el-table-column
3
+ align="center"
4
+ type="selection"
5
+ :label="column.label"
6
+ :fixed="fixed"
7
+ :width="column.width ? column.width : '50'"
8
+ />
9
+ </template>
10
+
11
+ <script>
12
+ /**
13
+ * 复选框列
14
+ */
15
+ export default {
16
+ name: 'SelectionColumn',
17
+ components: {},
18
+ props: {
19
+ column: {
20
+ type: Object,
21
+ default: null,
22
+ },
23
+ isLineEdit: {
24
+ type: Boolean,
25
+ default: false,
26
+ },
27
+ },
28
+ computed: {
29
+ fixed() {
30
+ if (
31
+ this.column.fixed === undefined ||
32
+ this.column.fixed === null ||
33
+ this.column.fixed === '' ||
34
+ this.column.fixed === 'false'
35
+ ) {
36
+ return false
37
+ }
38
+ // 左右都固定会导致列表显示速度慢,暂只支持左侧固定
39
+ if (this.column.fixed && this.column.fixed === 'right') {
40
+ return 'left'
41
+ }
42
+ return this.column.fixed
43
+ },
44
+ },
45
+ }
46
+ </script>
@@ -0,0 +1,3 @@
1
+ // 用于存放表格的控制属性,控制表格的编辑状态、存储表格的数据便于使用等等
2
+ const store = new Map()
3
+ export default store