imatrix-ui 2.8.21-dw → 2.8.21
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.
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.umd.min.js +5 -35
- package/package.json +4 -2
- package/packages/breadcrumb/index.js +6 -0
- package/packages/breadcrumb/src/breadcrumb.vue +71 -0
- package/packages/department-tree/index.js +6 -0
- package/packages/department-tree/src/department-tree.vue +108 -0
- package/packages/department-tree-inline/index.js +6 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +402 -0
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -0
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
- package/packages/department-tree-inline/src/department-tree-service.js +245 -0
- package/packages/department-tree-inline/src/search-result.vue +176 -0
- package/packages/department-user-tree/index.js +6 -0
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
- package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
- package/packages/department-user-tree/src/department-user-tree.vue +101 -0
- package/packages/department-user-tree-inline/index.js +6 -0
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +626 -0
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +230 -0
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -0
- package/packages/department-user-tree-inline/src/search-result.vue +197 -0
- package/packages/directives/prevent-reclick.js +19 -0
- package/packages/dynamic-source-select/index.js +6 -0
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +70 -0
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -0
- package/packages/dynamic-source-select/src/events.js +55 -0
- package/packages/fs-preview/index.js +6 -0
- package/packages/fs-preview/src/fs-preview.vue +226 -0
- package/packages/fs-upload/index.js +6 -0
- package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
- package/packages/fs-upload/src/fs-upload-single.vue +312 -0
- package/packages/fs-upload/src/fs-upload.vue +189 -0
- package/packages/fs-upload/src/see-big-picture.vue +55 -0
- package/packages/fs-upload-list/index.js +6 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
- package/packages/hamburger/index.js +6 -0
- package/packages/hamburger/src/hamburger.vue +38 -0
- package/packages/index.js +121 -0
- package/packages/multipart-upload/index.js +6 -0
- package/packages/multipart-upload/src/index.vue +73 -0
- package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
- package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
- package/packages/organization-input/index.js +6 -0
- package/packages/organization-input/src/organization-input.vue +542 -0
- package/packages/plugins/export-data-new.js +453 -0
- package/packages/plugins/export-data.js +361 -0
- package/packages/plugins/index.js +15 -0
- package/packages/plugins/public-method.js +43 -0
- package/packages/remove-department/index.js +6 -0
- package/packages/remove-department/src/remove-department.vue +172 -0
- package/packages/remove-department/src/remove-dept-service.js +20 -0
- package/packages/remove-user/index.js +6 -0
- package/packages/remove-user/src/remove-user-service.js +20 -0
- package/packages/remove-user/src/remove-user.vue +195 -0
- package/packages/remove-workgroup/index.js +6 -0
- package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
- package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
- package/packages/rich-editor/index.js +7 -0
- package/packages/rich-editor/index.vue +278 -0
- package/packages/rich-editor/langs/zh-Hans.js +1 -0
- package/packages/rich-editor/viewer.vue +103 -0
- package/packages/scan-code-input/index.js +6 -0
- package/packages/scan-code-input/src/events.js +33 -0
- package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
- package/packages/scan-code-input/src/scan-code-input.vue +116 -0
- package/packages/secret-info/index.js +7 -0
- package/packages/secret-info/index.vue +90 -0
- package/packages/super-grid/index.js +7 -0
- package/packages/super-grid/src/apis.js +763 -0
- package/packages/super-grid/src/columns-config.vue +335 -0
- package/packages/super-grid/src/custom-formatter.js +250 -0
- package/packages/super-grid/src/dynamic-input.vue +1279 -0
- package/packages/super-grid/src/eventBus.js +2 -0
- package/packages/super-grid/src/events.js +55 -0
- package/packages/super-grid/src/formValidatorUtil.js +226 -0
- package/packages/super-grid/src/formatter.js +181 -0
- package/packages/super-grid/src/group-column.vue +100 -0
- package/packages/super-grid/src/header-context-menu.vue +87 -0
- package/packages/super-grid/src/index-column.vue +51 -0
- package/packages/super-grid/src/normal-column.vue +769 -0
- package/packages/super-grid/src/public-methods.js +31 -0
- package/packages/super-grid/src/row-operation.vue +161 -0
- package/packages/super-grid/src/search-button.vue +66 -0
- package/packages/super-grid/src/search-condition-input.vue +61 -0
- package/packages/super-grid/src/search-condition-list.vue +59 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +653 -0
- package/packages/super-grid/src/search-form-dialog.vue +79 -0
- package/packages/super-grid/src/search-form-item.vue +386 -0
- package/packages/super-grid/src/search-form-number.vue +38 -0
- package/packages/super-grid/src/search-form-open.vue +162 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
- package/packages/super-grid/src/search-form.vue +634 -0
- package/packages/super-grid/src/search-methods.js +387 -0
- package/packages/super-grid/src/selection-column.vue +43 -0
- package/packages/super-grid/src/store.js +3 -0
- package/packages/super-grid/src/super-grid-service.js +561 -0
- package/packages/super-grid/src/super-grid.vue +2793 -0
- package/packages/super-grid/src/utils.js +763 -0
- package/packages/super-grid/src/view-image-dialog.vue +130 -0
- package/packages/super-nine-grid/index.js +7 -0
- package/packages/super-nine-grid/src/apis.js +103 -0
- package/packages/super-nine-grid/src/custom-formatter.js +66 -0
- package/packages/super-nine-grid/src/formatter.js +132 -0
- package/packages/super-nine-grid/src/search-form-number.vue +38 -0
- package/packages/super-nine-grid/src/search-form.vue +430 -0
- package/packages/super-nine-grid/src/search-methods.js +134 -0
- package/packages/super-nine-grid/src/store.js +3 -0
- package/packages/super-nine-grid/src/super-grid-service.js +91 -0
- package/packages/super-nine-grid/src/super-nine-grid.vue +872 -0
- package/packages/super-nine-grid/src/utils.js +261 -0
- package/packages/svg-icon/index.js +6 -0
- package/packages/svg-icon/src/svg-icon.vue +43 -0
- package/packages/utils/utils.js +152 -0
- package/packages/utils/value-set.js +86 -0
- package/packages/valid-code/index.js +7 -0
- package/packages/valid-code/src/valid-code.vue +95 -0
- package/packages/workflow-button/index.js +6 -0
- package/packages/workflow-button/src/workflow-button.vue +325 -0
- package/packages/workflow-history-list/index.js +6 -0
- package/packages/workflow-history-list/src/api.js +7 -0
- package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
- package/packages/workgroup-tree/index.js +6 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
- package/packages/workgroup-tree-inline/index.js +6 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
- package/packages/workgroup-user-tree/index.js +6 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
- package/packages/workgroup-user-tree-inline/index.js +6 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
- package/packages/year-range-picker/index.js +6 -0
- package/packages/year-range-picker/src/year-range-picker.vue +51 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +4 -2
- package/src/i18n/langs/en.js +4 -2
- package/src/index.js +93 -0
- package/src/permission.js +7 -3
- package/src/plugins.js +3 -3
- package/src/router/index.js +24 -0
- package/src/store/getters.js +2 -1
- package/src/store/modules/app.js +10 -1
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/index.scss +32 -4
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +64 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +247 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +296 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +31 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/form-style.scss +2 -2
- package/src/styles/theme/gray/input-style.scss +8 -0
- package/src/utils/auth-api.js +115 -0
- package/src/utils/auth.js +34 -42
- package/src/utils/calculator/calculator-factory.js +2 -2
- package/src/utils/common-util.js +34 -0
- package/src/utils/jump-page-utils.js +29 -5
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +4 -0
- package/src/utils/request.js +18 -2
- package/src/utils/util.js +7 -3
- package/src/views/dsc-component/Sidebar/Item.vue +4 -4
- package/src/views/dsc-component/Sidebar/Link.vue +11 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
- package/src/views/dsc-component/Sidebar/index.vue +24 -12
- package/src/views/dsc-component/tabs/tab-content.vue +16 -1
- package/src/views/login/index.vue +1 -1
|
@@ -0,0 +1,387 @@
|
|
|
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
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
|