imatrix-ui 2.9.0-dw → 2.9.0-dw-tmp3

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