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