imatrix-ui 2.9.15-dw-tmp2 → 2.9.16-boe10

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 (194) 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/assets/nonemessage.png +0 -0
  6. package/src/i18n/i18n.js +1 -1
  7. package/src/i18n/langs/cn.js +18 -6
  8. package/src/i18n/langs/en.js +20 -7
  9. package/src/permission.js +2 -2
  10. package/src/plugins.js +3 -3
  11. package/src/router/index.js +10 -0
  12. package/src/store/modules/tab-content.js +6 -0
  13. package/src/store/modules/user.js +32 -2
  14. package/src/styles/display-layout.scss +1 -1
  15. package/src/styles/index.scss +74 -4
  16. package/src/styles/theme/black/font-style.scss +70 -0
  17. package/src/styles/theme/black/index.scss +6 -30
  18. package/src/styles/theme/blue/font-style.scss +37 -0
  19. package/src/styles/theme/blue/index.scss +2 -18
  20. package/src/styles/theme/blue2/font-style.scss +70 -0
  21. package/src/styles/theme/blue2/index.scss +3 -13
  22. package/src/styles/theme/dark-blue/card.scss +4 -6
  23. package/src/styles/theme/dark-blue/form.scss +7 -4
  24. package/src/styles/theme/dark-blue/index.scss +30 -5
  25. package/src/styles/theme/dark-blue/message.scss +8 -0
  26. package/src/styles/theme/dark-blue/radio.scss +13 -0
  27. package/src/styles/theme/dark-blue/sidebar.scss +7 -37
  28. package/src/styles/theme/dark-blue/tab.scss +4 -1
  29. package/src/styles/theme/dark-blue/table.scss +1 -1
  30. package/src/styles/theme/dark-blue/tree.scss +35 -10
  31. package/src/styles/theme/gray/card-style.scss +13 -1
  32. package/src/styles/theme/gray/font-style.scss +38 -0
  33. package/src/styles/theme/gray/index.scss +13 -25
  34. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  35. package/src/styles/theme/gray/sidebar.scss +7 -14
  36. package/src/utils/auth-api.js +47 -1
  37. package/src/utils/common-util.js +22 -81
  38. package/src/utils/jump-page-utils.js +8 -10
  39. package/src/utils/range-selector.js +185 -0
  40. package/src/utils/request.js +6 -3
  41. package/src/utils/util.js +13 -11
  42. package/src/utils/workflow-util.js +3 -0
  43. package/src/views/dsc-component/Sidebar/Item.vue +7 -5
  44. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
  45. package/src/views/dsc-component/Sidebar/index.vue +12 -20
  46. package/src/views/dsc-component/tabs/tab-content.vue +8 -9
  47. package/src/views/layout/EmptyLayout.vue +4 -1
  48. package/src/views/layout/NewLayout.vue +6 -65
  49. package/src/views/layout/components/AppMain.vue +2 -1
  50. package/src/views/layout/components/Menubar/Item.vue +23 -7
  51. package/src/views/layout/components/Menubar/Link.vue +11 -2
  52. package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
  53. package/src/views/layout/components/Menubar/index.vue +51 -16
  54. package/src/views/layout/components/tabs/tab-content.vue +162 -0
  55. package/src/views/layout/tab-content-iframe-index.vue +31 -0
  56. package/src/views/layout/tab-content-index.vue +85 -0
  57. package/src/views/login/index.vue +1 -1
  58. package/packages/breadcrumb/index.js +0 -6
  59. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  60. package/packages/department-tree/index.js +0 -6
  61. package/packages/department-tree/src/department-tree.vue +0 -108
  62. package/packages/department-tree-inline/index.js +0 -6
  63. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -408
  64. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -290
  65. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  66. package/packages/department-tree-inline/src/department-tree-service.js +0 -273
  67. package/packages/department-tree-inline/src/search-result.vue +0 -176
  68. package/packages/department-user-tree/index.js +0 -6
  69. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  70. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  71. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  72. package/packages/department-user-tree-inline/index.js +0 -6
  73. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -636
  74. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -271
  75. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  76. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -248
  77. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -142
  78. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  79. package/packages/directives/prevent-reclick.js +0 -19
  80. package/packages/dynamic-source-select/index.js +0 -6
  81. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  82. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  83. package/packages/dynamic-source-select/src/events.js +0 -55
  84. package/packages/fs-preview/index.js +0 -6
  85. package/packages/fs-preview/src/fs-preview.vue +0 -226
  86. package/packages/fs-upload/index.js +0 -6
  87. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  88. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  89. package/packages/fs-upload/src/fs-upload.vue +0 -189
  90. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  91. package/packages/fs-upload-list/index.js +0 -6
  92. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  93. package/packages/hamburger/index.js +0 -6
  94. package/packages/hamburger/src/hamburger.vue +0 -38
  95. package/packages/index.js +0 -121
  96. package/packages/multipart-upload/index.js +0 -6
  97. package/packages/multipart-upload/src/index.vue +0 -73
  98. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  99. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  100. package/packages/organization-input/index.js +0 -6
  101. package/packages/organization-input/src/organization-input.vue +0 -542
  102. package/packages/plugins/export-data-new.js +0 -466
  103. package/packages/plugins/export-data.js +0 -361
  104. package/packages/plugins/index.js +0 -15
  105. package/packages/plugins/public-method.js +0 -43
  106. package/packages/remove-department/index.js +0 -6
  107. package/packages/remove-department/src/remove-department.vue +0 -172
  108. package/packages/remove-department/src/remove-dept-service.js +0 -20
  109. package/packages/remove-user/index.js +0 -6
  110. package/packages/remove-user/src/remove-user-service.js +0 -20
  111. package/packages/remove-user/src/remove-user.vue +0 -195
  112. package/packages/remove-workgroup/index.js +0 -6
  113. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  114. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  115. package/packages/rich-editor/index.js +0 -7
  116. package/packages/rich-editor/index.vue +0 -278
  117. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  118. package/packages/rich-editor/viewer.vue +0 -103
  119. package/packages/scan-code-input/index.js +0 -6
  120. package/packages/scan-code-input/src/events.js +0 -33
  121. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  122. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  123. package/packages/secret-info/index.js +0 -7
  124. package/packages/secret-info/index.vue +0 -90
  125. package/packages/super-grid/index.js +0 -7
  126. package/packages/super-grid/src/apis.js +0 -820
  127. package/packages/super-grid/src/columns-config.vue +0 -335
  128. package/packages/super-grid/src/custom-formatter.js +0 -278
  129. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  130. package/packages/super-grid/src/eventBus.js +0 -2
  131. package/packages/super-grid/src/events.js +0 -55
  132. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  133. package/packages/super-grid/src/formatter.js +0 -181
  134. package/packages/super-grid/src/group-column.vue +0 -100
  135. package/packages/super-grid/src/header-context-menu.vue +0 -87
  136. package/packages/super-grid/src/index-column.vue +0 -51
  137. package/packages/super-grid/src/normal-column.vue +0 -771
  138. package/packages/super-grid/src/public-methods.js +0 -31
  139. package/packages/super-grid/src/row-operation.vue +0 -161
  140. package/packages/super-grid/src/search-button.vue +0 -66
  141. package/packages/super-grid/src/search-condition-input.vue +0 -61
  142. package/packages/super-grid/src/search-condition-list.vue +0 -59
  143. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  144. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  145. package/packages/super-grid/src/search-form-item.vue +0 -404
  146. package/packages/super-grid/src/search-form-number.vue +0 -38
  147. package/packages/super-grid/src/search-form-open.vue +0 -170
  148. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -196
  149. package/packages/super-grid/src/search-form.vue +0 -642
  150. package/packages/super-grid/src/search-methods.js +0 -448
  151. package/packages/super-grid/src/selection-column.vue +0 -43
  152. package/packages/super-grid/src/store.js +0 -3
  153. package/packages/super-grid/src/super-grid-service.js +0 -593
  154. package/packages/super-grid/src/super-grid.vue +0 -2882
  155. package/packages/super-grid/src/utils.js +0 -762
  156. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  157. package/packages/super-nine-grid/index.js +0 -7
  158. package/packages/super-nine-grid/src/apis.js +0 -103
  159. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  160. package/packages/super-nine-grid/src/formatter.js +0 -132
  161. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  162. package/packages/super-nine-grid/src/search-form.vue +0 -430
  163. package/packages/super-nine-grid/src/search-methods.js +0 -134
  164. package/packages/super-nine-grid/src/store.js +0 -3
  165. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  166. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  167. package/packages/super-nine-grid/src/utils.js +0 -261
  168. package/packages/svg-icon/index.js +0 -6
  169. package/packages/svg-icon/src/svg-icon.vue +0 -43
  170. package/packages/utils/memory-cache-utils.js +0 -90
  171. package/packages/utils/utils.js +0 -152
  172. package/packages/utils/value-set.js +0 -86
  173. package/packages/valid-code/index.js +0 -7
  174. package/packages/valid-code/src/valid-code.vue +0 -95
  175. package/packages/workflow-button/index.js +0 -6
  176. package/packages/workflow-button/src/workflow-button.vue +0 -325
  177. package/packages/workflow-history-list/index.js +0 -6
  178. package/packages/workflow-history-list/src/api.js +0 -7
  179. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  180. package/packages/workgroup-tree/index.js +0 -6
  181. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  182. package/packages/workgroup-tree-inline/index.js +0 -6
  183. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  184. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  185. package/packages/workgroup-user-tree/index.js +0 -6
  186. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  187. package/packages/workgroup-user-tree-inline/index.js +0 -6
  188. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  189. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  190. package/packages/year-range-picker/index.js +0 -6
  191. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
  192. package/report.20190716.140129.216348.001.json +0 -354
  193. package/src/index.js +0 -93
  194. package/src/styles/theme/gray/form-style.scss +0 -41
@@ -1,448 +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
- if (dateStr.indexOf('T') !== -1) {
262
- return new Date(dateStr).getTime()
263
- }
264
- // 表示是格式化后的值,转成date毫秒值传给后台,解决时区问题
265
- format = format.toLowerCase()
266
- if (format.indexOf('h') > 0 && format.indexOf('m') > 0 && format.indexOf('s') > 0) {
267
- // 表示有时分秒
268
- dateStr = new Date(dateStr).getTime()
269
- } else {
270
- // 表示精确到日
271
- dateStr = new Date(dateStr + ' 00:00:00').getTime()
272
- }
273
- }
274
- return dateStr
275
- },
276
- // 是否是人员树
277
- isUserTree(componentType) {
278
- if (componentType.indexOf('DeptManTree') > 0 || componentType.indexOf('WgManTree') > 0) {
279
- return true
280
- }
281
- return false
282
- },
283
- // 获得用户名
284
- getUserName(isUser, val) {
285
- if (isUser && val !== undefined && val !== null && val.indexOf('(') > 0 && val.indexOf(')') > 0) {
286
- // 说明是人员树,如果是值中包括英文名,把英文名截取掉,因为有些字段保存的有英文名,有些没有英文名,为了便于查询,所以统一将英文名去掉。
287
- // 例如:张三(Andy),处理后是:张三
288
- val = val.substring(0, val.indexOf('('))
289
- }
290
- return val
291
- },
292
- getOperator(column) {
293
- if ((column.dataType === 'TEXT' || column.dataType === 'CLOB') && column.fuzzy &&
294
- (!column.componentType || (column.componentType && ((column.componentType !== 'select' && column.componentType !== 'multiselect') ||
295
- (column.componentType === 'multiselect' && column.ifMultiData !== undefined && column.ifMultiData === true))))) {
296
- // 是否是文本类型的字段,且启用了模糊查询,则表示操作符为contains模糊查询
297
- return 'CONTAIN'
298
- } else if (Array.isArray(this.getFormItemValue(column.prop))) {
299
- if (column.dataType === 'INTEGER' || column.dataType === 'LONG' || column.dataType === 'DOUBLE') {
300
- return 'BETWEEN'
301
- } else {
302
- return 'EQ'
303
- }
304
- } else {
305
- // 否则就是等于
306
- return 'EQ'
307
- }
308
- },
309
- getFormItemValue(prop, index) {
310
- if (prop.indexOf('.') > 0) {
311
- const parentOjbect = this.getParentObject(prop)
312
- if (index != null && index !== undefined) {
313
- return parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index]
314
- } else {
315
- return parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)]
316
- }
317
- } else {
318
- if (index != null && index !== undefined) {
319
- return this.searchForm[prop][index]
320
- } else {
321
- return this.searchForm[prop]
322
- }
323
- }
324
- },
325
- getParentObject(prop) {
326
- const nestedProp = prop.split('.')
327
- // 属性只有一个时父对象就是searchForm
328
- if (nestedProp.length === 1) {
329
- return this.searchForm
330
- } else {
331
- let parentObject
332
- // 属性超过2个时先找到最后一层属性的父对象
333
- for (let i = 0; i < nestedProp.length - 1; i++) {
334
- parentObject = this.searchForm[nestedProp[i]]
335
- }
336
- return parentObject
337
- }
338
- },
339
- // 处理多选下拉框时获得的值
340
- // 处理非多选下拉框的值
341
- packageValueWithArray(value, searchParams, param) {
342
- if (value && Array.isArray(value)) {
343
- const selectValues = value
344
- // if (!Array.isArray(values)) {
345
- // selectValues = values.split(',')
346
- // }
347
- let num = 0
348
- selectValues.forEach(val => {
349
- const selectParam = Object.assign({}, param)
350
- selectParam.joinSign = 'or'// 将条件连接符修改为or,否则无法查询到值
351
- if (num === 0) {
352
- selectParam.leftBracket = '1' // 左边有1个括号
353
- }
354
- if (num === selectValues.length - 1) {
355
- // 说明是最后一个条件
356
- selectParam.rightBracket = '1'// 右边有1个括号
357
- selectParam.joinSign = 'and' // 最后一个条件的连接符需要修改为and
358
- }
359
- selectParam.propValue = val
360
- // 注释该代码,是因为多选下拉框数据库中以逗号分隔存储时,使用EQ无法查询出结果,需要使用getOpertator计算出的结果
361
- // selectParam.operator = 'EQ'
362
- if (val !== undefined && val !== null) {
363
- searchParams.push(selectParam)
364
- }
365
- num++
366
- })
367
- } else if (typeof (value) !== 'undefined' && value !== '' && value !== null && !Array.isArray(value)) {
368
- // 不是数组
369
- param.propValue = value
370
- searchParams.push(param)
371
- }
372
- },
373
- // 保存查询条件
374
- saveSearchCondition(condition) {
375
- return this.$http.post(Vue.prototype.baseAPI + '/component/super-grids/search-conditions', condition)
376
- },
377
- // 显示查询条件列表
378
- listSearchCondition(listCode) {
379
- return this.$http.get(Vue.prototype.baseAPI + '/component/super-grids/search-condition-list/' + listCode)
380
- },
381
- // 删除查询条件
382
- removeSearchCondition(conditionId) {
383
- return this.$http.delete(Vue.prototype.baseAPI + '/component/super-grids/search-conditions/' + conditionId)
384
- },
385
- // 查询条件
386
- getSearchCondition(conditionId) {
387
- return this.$http.get(Vue.prototype.baseAPI + '/component/super-grids/search-conditions/' + conditionId)
388
- },
389
- // 设置默认查询值
390
- setDefaultQueryValue(column, searchForm) {
391
- if (column.componentType === 'date' || column.componentType === 'dateSection' ||
392
- column.componentType === 'timePicker' || column.componentType === 'dateTimePicker') {
393
- const formatList = { 'date': 'YYYYMMDD', 'dateSection': 'YYYYMMDDHHMMSS', 'timePicker': 'YYYYMMDD', 'dateTimePicker': 'YYYYMMDDHHMMSS' }
394
- const valueTypeList = { 'date': 'String', 'dateSection': 'Date', 'timePicker': 'String', 'dateTimePicker': 'String' }
395
- const rowControlConfig = column['controlConfig']
396
- if (rowControlConfig !== null && rowControlConfig !== undefined && rowControlConfig !== '') {
397
- const controlConfig = JSON.parse(rowControlConfig)
398
- if (controlConfig.timeDefaultQueryRange) {
399
- const format = formatList[column.componentType]
400
- const valueType = valueTypeList[column.componentType]
401
- if (format && valueType) {
402
- const queryRange = this.getDateQueryRange(column.componentType, format, controlConfig.timeDefaultQueryRange, valueType)
403
- searchForm[column.prop] = queryRange
404
- }
405
- }
406
- }
407
- }
408
- },
409
- // 获取近一周,近两周,近一个月的时间范围
410
- // componentType组件类型 date time
411
- // format 格式 年月日/年月日时分秒
412
- // queryRangeType 查询范围类型 近一周nearlyWeek/近两周nearlyTwoWeeks/近一个月nearlyMonth
413
- // valueType 返回对象类型 String Date
414
- getDateQueryRange(componentType, format, timeDefaultQueryRange, valueType) {
415
- const queryRange = []
416
- const nowDate = new Date() // 当前时间
417
- let startDate// 开始时间
418
- const endDate = new Date()// 结束时间
419
- if (timeDefaultQueryRange !== null && timeDefaultQueryRange > 0) {
420
- startDate = new Date(nowDate.setDate(nowDate.getDate() - parseInt(timeDefaultQueryRange)))
421
- }
422
- if (format === 'YYYYMMDD') {
423
- queryRange[0] = startDate.getFullYear() + '-' + (startDate.getMonth() + 1) + '-' + startDate.getDate()
424
- queryRange[1] = endDate.getFullYear() + '-' + (endDate.getMonth() + 1) + '-' + endDate.getDate()
425
- } else {
426
- queryRange[0] = startDate.getFullYear() + '-' + (startDate.getMonth() + 1) + '-' + startDate.getDate() + ' 00:00:00'
427
- queryRange[1] = endDate.getFullYear() + '-' + (endDate.getMonth() + 1) + '-' + endDate.getDate() + ' 23:59:59'
428
- }
429
- if (valueType === 'Date') {
430
- const queryRangeFormat = []
431
- queryRange.forEach(date => {
432
- var tempStrs = date.split(' ')
433
- var dateStrs = tempStrs[0].split('-')
434
- var year = parseInt(dateStrs[0], 10)
435
- var month = parseInt(dateStrs[1], 10) - 1
436
- var day = parseInt(dateStrs[2], 10)
437
- var timeStrs = tempStrs[1].split(':')
438
- var hour = parseInt(timeStrs[0], 10)
439
- var minute = parseInt(timeStrs[1], 10)
440
- var second = parseInt(timeStrs[2], 10)
441
- queryRangeFormat.push(new Date(year, month, day, hour, minute, second))
442
- })
443
- return queryRangeFormat
444
- }
445
- return queryRange
446
- }
447
- }
448
- 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