imatrix-ui 2.9.9-dw → 2.9.11-boe1

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 (181) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +2 -2
  4. package/src/api/sso-service.js +19 -1
  5. package/src/i18n/i18n.js +1 -1
  6. package/src/i18n/langs/cn.js +14 -4
  7. package/src/i18n/langs/en.js +16 -5
  8. package/src/permission.js +1 -1
  9. package/src/plugins.js +3 -3
  10. package/src/router/index.js +10 -0
  11. package/src/store/modules/tab-content.js +6 -0
  12. package/src/store/modules/user.js +19 -0
  13. package/src/styles/index.scss +74 -4
  14. package/src/styles/theme/black/font-style.scss +70 -0
  15. package/src/styles/theme/black/index.scss +6 -30
  16. package/src/styles/theme/blue/font-style.scss +37 -0
  17. package/src/styles/theme/blue/index.scss +2 -18
  18. package/src/styles/theme/blue2/font-style.scss +70 -0
  19. package/src/styles/theme/blue2/index.scss +3 -13
  20. package/src/styles/theme/dark-blue/index.scss +27 -5
  21. package/src/styles/theme/dark-blue/message.scss +8 -0
  22. package/src/styles/theme/dark-blue/sidebar.scss +7 -37
  23. package/src/styles/theme/dark-blue/table.scss +1 -1
  24. package/src/styles/theme/gray/card-style.scss +13 -1
  25. package/src/styles/theme/gray/font-style.scss +38 -0
  26. package/src/styles/theme/gray/index.scss +13 -25
  27. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  28. package/src/styles/theme/gray/sidebar.scss +7 -14
  29. package/src/utils/auth-api.js +45 -1
  30. package/src/utils/common-util.js +21 -81
  31. package/src/utils/range-selector.js +185 -0
  32. package/src/utils/request.js +6 -3
  33. package/src/utils/util.js +12 -10
  34. package/src/views/dsc-component/Sidebar/Item.vue +7 -5
  35. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
  36. package/src/views/dsc-component/Sidebar/index.vue +12 -20
  37. package/src/views/dsc-component/tabs/tab-content.vue +1 -5
  38. package/src/views/layout/NewLayout.vue +6 -65
  39. package/src/views/layout/components/Menubar/Item.vue +23 -7
  40. package/src/views/layout/components/Menubar/Link.vue +11 -2
  41. package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
  42. package/src/views/layout/components/Menubar/index.vue +51 -16
  43. package/src/views/layout/components/tabs/tab-content.vue +160 -0
  44. package/src/views/layout/tab-content-iframe-index.vue +31 -0
  45. package/src/views/layout/tab-content-index.vue +85 -0
  46. package/src/views/login/index.vue +1 -1
  47. package/packages/breadcrumb/index.js +0 -6
  48. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  49. package/packages/department-tree/index.js +0 -6
  50. package/packages/department-tree/src/department-tree.vue +0 -108
  51. package/packages/department-tree-inline/index.js +0 -6
  52. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -402
  53. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
  54. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  55. package/packages/department-tree-inline/src/department-tree-service.js +0 -245
  56. package/packages/department-tree-inline/src/search-result.vue +0 -176
  57. package/packages/department-user-tree/index.js +0 -6
  58. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  59. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  60. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  61. package/packages/department-user-tree-inline/index.js +0 -6
  62. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -626
  63. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
  64. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  65. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -230
  66. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
  67. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  68. package/packages/directives/prevent-reclick.js +0 -19
  69. package/packages/dynamic-source-select/index.js +0 -6
  70. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  71. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  72. package/packages/dynamic-source-select/src/events.js +0 -55
  73. package/packages/fs-preview/index.js +0 -6
  74. package/packages/fs-preview/src/fs-preview.vue +0 -226
  75. package/packages/fs-upload/index.js +0 -6
  76. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  77. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  78. package/packages/fs-upload/src/fs-upload.vue +0 -189
  79. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  80. package/packages/fs-upload-list/index.js +0 -6
  81. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  82. package/packages/hamburger/index.js +0 -6
  83. package/packages/hamburger/src/hamburger.vue +0 -38
  84. package/packages/index.js +0 -121
  85. package/packages/multipart-upload/index.js +0 -6
  86. package/packages/multipart-upload/src/index.vue +0 -73
  87. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  88. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  89. package/packages/organization-input/index.js +0 -6
  90. package/packages/organization-input/src/organization-input.vue +0 -542
  91. package/packages/plugins/export-data-new.js +0 -453
  92. package/packages/plugins/export-data.js +0 -361
  93. package/packages/plugins/index.js +0 -15
  94. package/packages/plugins/public-method.js +0 -43
  95. package/packages/remove-department/index.js +0 -6
  96. package/packages/remove-department/src/remove-department.vue +0 -172
  97. package/packages/remove-department/src/remove-dept-service.js +0 -20
  98. package/packages/remove-user/index.js +0 -6
  99. package/packages/remove-user/src/remove-user-service.js +0 -20
  100. package/packages/remove-user/src/remove-user.vue +0 -195
  101. package/packages/remove-workgroup/index.js +0 -6
  102. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  103. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  104. package/packages/rich-editor/index.js +0 -7
  105. package/packages/rich-editor/index.vue +0 -278
  106. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  107. package/packages/rich-editor/viewer.vue +0 -103
  108. package/packages/scan-code-input/index.js +0 -6
  109. package/packages/scan-code-input/src/events.js +0 -33
  110. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  111. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  112. package/packages/secret-info/index.js +0 -7
  113. package/packages/secret-info/index.vue +0 -90
  114. package/packages/super-grid/index.js +0 -7
  115. package/packages/super-grid/src/apis.js +0 -763
  116. package/packages/super-grid/src/columns-config.vue +0 -335
  117. package/packages/super-grid/src/custom-formatter.js +0 -250
  118. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  119. package/packages/super-grid/src/eventBus.js +0 -2
  120. package/packages/super-grid/src/events.js +0 -55
  121. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  122. package/packages/super-grid/src/formatter.js +0 -181
  123. package/packages/super-grid/src/group-column.vue +0 -100
  124. package/packages/super-grid/src/header-context-menu.vue +0 -87
  125. package/packages/super-grid/src/index-column.vue +0 -51
  126. package/packages/super-grid/src/normal-column.vue +0 -769
  127. package/packages/super-grid/src/public-methods.js +0 -31
  128. package/packages/super-grid/src/row-operation.vue +0 -161
  129. package/packages/super-grid/src/search-button.vue +0 -66
  130. package/packages/super-grid/src/search-condition-input.vue +0 -61
  131. package/packages/super-grid/src/search-condition-list.vue +0 -59
  132. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  133. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  134. package/packages/super-grid/src/search-form-item.vue +0 -386
  135. package/packages/super-grid/src/search-form-number.vue +0 -38
  136. package/packages/super-grid/src/search-form-open.vue +0 -162
  137. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -188
  138. package/packages/super-grid/src/search-form.vue +0 -634
  139. package/packages/super-grid/src/search-methods.js +0 -387
  140. package/packages/super-grid/src/selection-column.vue +0 -43
  141. package/packages/super-grid/src/store.js +0 -3
  142. package/packages/super-grid/src/super-grid-service.js +0 -561
  143. package/packages/super-grid/src/super-grid.vue +0 -2829
  144. package/packages/super-grid/src/utils.js +0 -763
  145. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  146. package/packages/super-nine-grid/index.js +0 -7
  147. package/packages/super-nine-grid/src/apis.js +0 -103
  148. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  149. package/packages/super-nine-grid/src/formatter.js +0 -132
  150. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  151. package/packages/super-nine-grid/src/search-form.vue +0 -430
  152. package/packages/super-nine-grid/src/search-methods.js +0 -134
  153. package/packages/super-nine-grid/src/store.js +0 -3
  154. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  155. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  156. package/packages/super-nine-grid/src/utils.js +0 -261
  157. package/packages/svg-icon/index.js +0 -6
  158. package/packages/svg-icon/src/svg-icon.vue +0 -43
  159. package/packages/utils/utils.js +0 -152
  160. package/packages/utils/value-set.js +0 -86
  161. package/packages/valid-code/index.js +0 -7
  162. package/packages/valid-code/src/valid-code.vue +0 -95
  163. package/packages/workflow-button/index.js +0 -6
  164. package/packages/workflow-button/src/workflow-button.vue +0 -325
  165. package/packages/workflow-history-list/index.js +0 -6
  166. package/packages/workflow-history-list/src/api.js +0 -7
  167. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  168. package/packages/workgroup-tree/index.js +0 -6
  169. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  170. package/packages/workgroup-tree-inline/index.js +0 -6
  171. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  172. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  173. package/packages/workgroup-user-tree/index.js +0 -6
  174. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  175. package/packages/workgroup-user-tree-inline/index.js +0 -6
  176. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  177. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  178. package/packages/year-range-picker/index.js +0 -6
  179. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
  180. package/src/index.js +0 -93
  181. 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