agilebuilder-ui 1.1.49 → 1.1.50-rc2
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/{401-a94cd05b.js → 401-1310f9d0.js} +1 -1
- package/lib/{404-eb21244b.js → 404-7d861da4.js} +1 -1
- package/lib/{iframe-page-7add4333.js → iframe-page-855b820e.js} +1 -1
- package/lib/{index-7a601895.js → index-05d842ab.js} +13958 -13878
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +104 -104
- package/lib/{tab-content-iframe-index-483b398c.js → tab-content-iframe-index-d96ad21a.js} +1 -1
- package/lib/{tab-content-index-0862686f.js → tab-content-index-93a36198.js} +1 -1
- package/lib/{tache-subprocess-history-c80e8ed2.js → tache-subprocess-history-cb6f4ab6.js} +1 -1
- package/package.json +1 -1
- package/packages/fs-preview/src/fs-preview.vue +21 -8
- package/packages/fs-upload/src/fs-upload-multi.vue +7 -3
- package/packages/fs-upload/src/fs-upload-single.vue +6 -3
- package/packages/fs-upload-list/src/fs-upload-list.vue +6 -1
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +6 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +6 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +6 -1
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +6 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +7 -0
- package/packages/fs-upload-new/src/fs-button-upload.vue +5 -0
- package/packages/fs-upload-new/src/fs-drag-upload.vue +5 -0
- package/packages/fs-upload-new/src/fs-preview-new.vue +27 -8
- package/packages/fs-upload-new/src/fs-upload-new.vue +16 -1
- package/packages/multipart-upload/src/multipart-upload-form.vue +6 -2
- package/packages/multipart-upload/src/multipart-upload-list.vue +6 -2
- package/packages/plugins/export-data-new.js +14 -1
- package/packages/super-grid/src/apis.js +9 -0
- package/packages/super-grid/src/dynamic-input.vue +25 -5
- package/packages/super-grid/src/search-form-item.vue +17 -13
- package/packages/super-grid/src/search-methods.js +148 -139
- package/packages/super-grid/src/super-grid.vue +2 -0
- package/packages/super-grid/src/utils.js +1 -0
- package/packages/super-grid/src/view-image-dialog.vue +6 -2
- package/packages/utils/value-set.js +49 -9
- package/src/utils/auth.js +3 -0
- package/src/utils/common-util.js +37 -0
- package/src/utils/request.js +7 -1
- package/src/utils/watermark-cache.js +13 -0
- package/src/utils/watermark.js +47 -6
- package/src/views/layout/EmptyLayout.vue +9 -1
- package/src/views/layout/Layout.vue +4 -0
- package/src/views/layout/NewLayout.vue +4 -0
- package/src/views/login/update-password.vue +3 -0
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
>
|
|
158
158
|
<dynamic-source-select
|
|
159
159
|
v-model:value="searchForm[column.prop]"
|
|
160
|
-
:allow-create="
|
|
160
|
+
:allow-create="dataSourceOptions?.controlConfig?.allowCreate"
|
|
161
161
|
:base-props="{
|
|
162
162
|
multiple: column.componentType === 'multiselect' ? true : false
|
|
163
163
|
}"
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
:is-join-table="isJoinTable"
|
|
167
167
|
:list-code="code"
|
|
168
168
|
:list-toolbar-form-data="listToolbarFormData"
|
|
169
|
-
:options="
|
|
169
|
+
:options="dataSourceOptions"
|
|
170
170
|
:table-name="tableName"
|
|
171
171
|
@change="multiselectChange"
|
|
172
172
|
/>
|
|
@@ -289,7 +289,8 @@ export default {
|
|
|
289
289
|
moduleConfig: {},
|
|
290
290
|
dateVal: this.getFormItemValue(this.column.prop),
|
|
291
291
|
controlConfig: getControlConfig(this.column),
|
|
292
|
-
isShowEmtptyFlag: false
|
|
292
|
+
isShowEmtptyFlag: false,
|
|
293
|
+
dataSourceOptions: {}
|
|
293
294
|
// checkedEmpty: false,
|
|
294
295
|
}
|
|
295
296
|
},
|
|
@@ -323,6 +324,14 @@ export default {
|
|
|
323
324
|
if (this.column.valueSetOptions) {
|
|
324
325
|
this.moduleConfig = JSON.parse(this.column.valueSetOptions)
|
|
325
326
|
}
|
|
327
|
+
const componentType = this.column.componentType
|
|
328
|
+
if (
|
|
329
|
+
componentType &&
|
|
330
|
+
(componentType === 'multiselect' || componentType === 'select') &&
|
|
331
|
+
this.isDynamicDataSourceSource(this.column)
|
|
332
|
+
) {
|
|
333
|
+
this.dataSourceOptions = this.getDynamicDataSourceOptions(this.column)
|
|
334
|
+
}
|
|
326
335
|
console.log('searchitem页面', this.column)
|
|
327
336
|
},
|
|
328
337
|
mounted() {
|
|
@@ -346,12 +355,7 @@ export default {
|
|
|
346
355
|
return isDynamicDataSourceSource(column)
|
|
347
356
|
},
|
|
348
357
|
setValueToModelProp(prop, value, componentName, index) {
|
|
349
|
-
console.log('setValueToModelProp',
|
|
350
|
-
prop,
|
|
351
|
-
value,
|
|
352
|
-
componentName,
|
|
353
|
-
index
|
|
354
|
-
)
|
|
358
|
+
console.log('setValueToModelProp', prop, value, componentName, index)
|
|
355
359
|
if (prop && prop.indexOf('.') > 0) {
|
|
356
360
|
const parentOjbect = this.getParentObject(prop)
|
|
357
361
|
// 嵌套属性中的最后一个属性是属于这个中间父对象的,所有要通过中间父对象来赋值
|
|
@@ -497,10 +501,10 @@ export default {
|
|
|
497
501
|
return ['00:00:00']
|
|
498
502
|
}
|
|
499
503
|
} else {
|
|
500
|
-
const now = new Date()
|
|
501
|
-
const year = now.getFullYear()
|
|
502
|
-
const month = now.getMonth() + 1
|
|
503
|
-
const day = now.getDate()
|
|
504
|
+
const now = new Date()
|
|
505
|
+
const year = now.getFullYear() // e.g., 2023
|
|
506
|
+
const month = now.getMonth() + 1 // Months are 0-indexed, so add 1
|
|
507
|
+
const day = now.getDate() // Day of the month
|
|
504
508
|
return [`${year}-${month}-${day} 00:00:00`, `${year}-${month}-${day} 23:59:59`]
|
|
505
509
|
}
|
|
506
510
|
},
|
|
@@ -7,140 +7,7 @@ const searchMethods = {
|
|
|
7
7
|
this.searchType === undefined ||
|
|
8
8
|
this.searchType === ''
|
|
9
9
|
) {
|
|
10
|
-
|
|
11
|
-
this.searchableColumns.forEach((column) => {
|
|
12
|
-
const param = { leftBracket: '', rightBracket: '', joinSign: 'and' }
|
|
13
|
-
// 布尔型字段时prop中去掉了is字符,查询时返回带有is的属性字段,
|
|
14
|
-
// 否则会导致查询布尔型报500错误
|
|
15
|
-
let orgProp = column.orgProp
|
|
16
|
-
// sql查询时,会把点“.”改为两个下划线"__"
|
|
17
|
-
const replaceDot = '__'
|
|
18
|
-
if (orgProp && orgProp.indexOf(replaceDot) > 0) {
|
|
19
|
-
// 表示包括点“.”,需要把两个下划线"__"重新改为点“.”,否则会导致查询报500错误
|
|
20
|
-
orgProp = orgProp.replace(replaceDot, '.')
|
|
21
|
-
}
|
|
22
|
-
param.propName = orgProp
|
|
23
|
-
param.enumName = column.enumName
|
|
24
|
-
param.operator = this.getOperator(column)
|
|
25
|
-
param.dataType = column.dataType
|
|
26
|
-
param.matchingType = column.queryMatching
|
|
27
|
-
param.formatter = column.formatter ? JSON.parse(JSON.stringify(column.formatter)) : column.formatter
|
|
28
|
-
param.isEmptyValue = column._emptyValue && column._emptyValue === '#blank#' ? true : false
|
|
29
|
-
const values = this.getFormItemValue(column.prop)
|
|
30
|
-
if (column.dataType === 'DATE' || column.dataType === 'TIME') {
|
|
31
|
-
// 日期 或 时间类型
|
|
32
|
-
// console.log('values==', values, column.prop)
|
|
33
|
-
if (values && values.length === 2 && values[0] !== null && values[1] !== null) {
|
|
34
|
-
const format = this.getDateTimeSearchFormatter(column, column.dataType, column.formatter)
|
|
35
|
-
if (format) {
|
|
36
|
-
if (!param.formatter) {
|
|
37
|
-
param.formatter = {}
|
|
38
|
-
param.formatter.options = {}
|
|
39
|
-
} else if (!param.formatter.options) {
|
|
40
|
-
param.formatter.options = {}
|
|
41
|
-
}
|
|
42
|
-
param.formatter.options.format = format
|
|
43
|
-
}
|
|
44
|
-
param.startValue = this.getDateTimeMillsByDateStr(values[0], format)
|
|
45
|
-
param.endValue = this.getDateTimeMillsByDateStr(values[1], format)
|
|
46
|
-
searchParams.push(param)
|
|
47
|
-
}
|
|
48
|
-
} else if (
|
|
49
|
-
(column.dataType === 'INTEGER' || column.dataType === 'LONG' || column.dataType === 'DOUBLE') &&
|
|
50
|
-
Array.isArray(values)
|
|
51
|
-
) {
|
|
52
|
-
// 日期 或 时间类型
|
|
53
|
-
// const values1 = this.getFormItemValue(column.prop)
|
|
54
|
-
if (values) {
|
|
55
|
-
if (column.componentType === 'yearRange') {
|
|
56
|
-
if (values[0] || values[1]) {
|
|
57
|
-
param.startValue = values[0]
|
|
58
|
-
param.endValue = values[1]
|
|
59
|
-
if (values[0] && !values[1]) {
|
|
60
|
-
param.startValue = values[0]
|
|
61
|
-
param.endValue = 9999
|
|
62
|
-
} else if (!values[0] && values[1]) {
|
|
63
|
-
param.startValue = 0
|
|
64
|
-
param.endValue = values[1]
|
|
65
|
-
}
|
|
66
|
-
searchParams.push(param)
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
if (!Array.isArray(values) || values.length < 2 || (values[0] === null && values[1] === null)) {
|
|
70
|
-
// 填写了一个有效值
|
|
71
|
-
if (!Array.isArray(values)) {
|
|
72
|
-
param.propValue = values
|
|
73
|
-
searchParams.push(param)
|
|
74
|
-
} else if (values.length < 2) {
|
|
75
|
-
param.propValue = values[0]
|
|
76
|
-
searchParams.push(param)
|
|
77
|
-
} else if (values[0] === null) {
|
|
78
|
-
param.propValue = values[1]
|
|
79
|
-
searchParams.push(param)
|
|
80
|
-
} else if (values[1] === null) {
|
|
81
|
-
param.propValue = values[0]
|
|
82
|
-
searchParams.push(param)
|
|
83
|
-
}
|
|
84
|
-
} else {
|
|
85
|
-
// 填写了两个有效值
|
|
86
|
-
|
|
87
|
-
param.startValue = values[0]
|
|
88
|
-
param.endValue = values[1]
|
|
89
|
-
searchParams.push(param)
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
} else if (
|
|
94
|
-
column.componentType &&
|
|
95
|
-
column.componentType.indexOf('Tree') !== -1 &&
|
|
96
|
-
column.componentType.indexOf('single') === -1
|
|
97
|
-
) {
|
|
98
|
-
// 说明是多选组织树
|
|
99
|
-
// 是否是人员树
|
|
100
|
-
const isUser = this.isUserTree(column.componentType)
|
|
101
|
-
const values = this.getFormItemValue(column.prop)
|
|
102
|
-
if (values && values !== '') {
|
|
103
|
-
const newValue = []
|
|
104
|
-
let valueArr = values
|
|
105
|
-
if (Array.isArray(values)) {
|
|
106
|
-
// 表示是数组
|
|
107
|
-
valueArr = values
|
|
108
|
-
} else {
|
|
109
|
-
// 表示是字符串
|
|
110
|
-
valueArr = values.split(',')
|
|
111
|
-
}
|
|
112
|
-
if (Array.isArray(valueArr) && valueArr && valueArr.length > 0) {
|
|
113
|
-
valueArr.forEach((val) => {
|
|
114
|
-
// 截取用户名中的英文名信息
|
|
115
|
-
const userName = this.getUserName(isUser, val)
|
|
116
|
-
if (userName !== undefined && userName !== null) {
|
|
117
|
-
newValue.push(userName)
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
}
|
|
121
|
-
this.packageValueWithArray(newValue, searchParams, param)
|
|
122
|
-
}
|
|
123
|
-
} else if (column.componentType && column.componentType.indexOf('Tree') !== -1) {
|
|
124
|
-
// 说明是单选组织树
|
|
125
|
-
// 是否是人员树
|
|
126
|
-
const isUser = this.isUserTree(column.componentType)
|
|
127
|
-
let propValue = this.getFormItemValue(column.prop)
|
|
128
|
-
// 截取用户名中的英文名信息
|
|
129
|
-
propValue = this.getUserName(isUser, propValue)
|
|
130
|
-
this.packageValueWithArray(propValue, searchParams, param)
|
|
131
|
-
} else {
|
|
132
|
-
if (column.componentType === 'multiselect') {
|
|
133
|
-
// 表示是多选下拉框选择器选择的值
|
|
134
|
-
const values = this.getFormItemValue(column.prop)
|
|
135
|
-
// console.log('values==', values, column.prop)
|
|
136
|
-
this.packageValueWithArray(values, searchParams, param)
|
|
137
|
-
} else {
|
|
138
|
-
const propValue = this.getFormItemValue(column.prop)
|
|
139
|
-
this.packageValueWithArray(propValue, searchParams, param)
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
})
|
|
143
|
-
return searchParams
|
|
10
|
+
return this.packageSearchParamNormalType(this.searchableColumns)
|
|
144
11
|
} else {
|
|
145
12
|
const newSearchFormList = []
|
|
146
13
|
this.searchFormList.forEach((param) => {
|
|
@@ -305,7 +172,7 @@ const searchMethods = {
|
|
|
305
172
|
}
|
|
306
173
|
return val
|
|
307
174
|
},
|
|
308
|
-
getOperator(column) {
|
|
175
|
+
getOperator(column, searchForm) {
|
|
309
176
|
if (
|
|
310
177
|
(column.dataType === 'TEXT' || column.dataType === 'CLOB') &&
|
|
311
178
|
column.fuzzy &&
|
|
@@ -318,7 +185,7 @@ const searchMethods = {
|
|
|
318
185
|
) {
|
|
319
186
|
// 是否是文本类型的字段,且启用了模糊查询,则表示操作符为contains模糊查询
|
|
320
187
|
return 'CONTAIN'
|
|
321
|
-
} else if (Array.isArray(this.getFormItemValue(column.prop))) {
|
|
188
|
+
} else if (Array.isArray(this.getFormItemValue(column.prop, null, searchForm))) {
|
|
322
189
|
if (column.dataType === 'INTEGER' || column.dataType === 'LONG' || column.dataType === 'DOUBLE') {
|
|
323
190
|
return 'BETWEEN'
|
|
324
191
|
} else {
|
|
@@ -329,7 +196,10 @@ const searchMethods = {
|
|
|
329
196
|
return 'EQ'
|
|
330
197
|
}
|
|
331
198
|
},
|
|
332
|
-
getFormItemValue(prop, index) {
|
|
199
|
+
getFormItemValue(prop, index, searchForm) {
|
|
200
|
+
if(!searchForm){
|
|
201
|
+
searchForm = this.searchForm
|
|
202
|
+
}
|
|
333
203
|
if (prop.indexOf('.') > 0) {
|
|
334
204
|
const parentOjbect = this.getParentObject(prop)
|
|
335
205
|
if (index != null && index !== undefined) {
|
|
@@ -339,9 +209,9 @@ const searchMethods = {
|
|
|
339
209
|
}
|
|
340
210
|
} else {
|
|
341
211
|
if (index != null && index !== undefined) {
|
|
342
|
-
return
|
|
212
|
+
return searchForm[prop][index]
|
|
343
213
|
} else {
|
|
344
|
-
return
|
|
214
|
+
return searchForm[prop]
|
|
345
215
|
}
|
|
346
216
|
}
|
|
347
217
|
},
|
|
@@ -508,6 +378,145 @@ const searchMethods = {
|
|
|
508
378
|
return queryRangeFormat
|
|
509
379
|
}
|
|
510
380
|
return queryRange
|
|
381
|
+
},
|
|
382
|
+
packageSearchParamNormalType(searchableColumns, searchForm) {
|
|
383
|
+
const searchParams = []
|
|
384
|
+
if(!searchableColumns){
|
|
385
|
+
return searchParams
|
|
386
|
+
}
|
|
387
|
+
searchableColumns.forEach((column) => {
|
|
388
|
+
const param = { leftBracket: '', rightBracket: '', joinSign: 'and' }
|
|
389
|
+
// 布尔型字段时prop中去掉了is字符,查询时返回带有is的属性字段,
|
|
390
|
+
// 否则会导致查询布尔型报500错误
|
|
391
|
+
let orgProp = column.orgProp
|
|
392
|
+
// sql查询时,会把点“.”改为两个下划线"__"
|
|
393
|
+
const replaceDot = '__'
|
|
394
|
+
if (orgProp && orgProp.indexOf(replaceDot) > 0) {
|
|
395
|
+
// 表示包括点“.”,需要把两个下划线"__"重新改为点“.”,否则会导致查询报500错误
|
|
396
|
+
orgProp = orgProp.replace(replaceDot, '.')
|
|
397
|
+
}
|
|
398
|
+
param.propName = orgProp
|
|
399
|
+
param.enumName = column.enumName
|
|
400
|
+
param.operator = this.getOperator(column, searchForm)
|
|
401
|
+
param.dataType = column.dataType
|
|
402
|
+
param.matchingType = column.queryMatching
|
|
403
|
+
param.formatter = column.formatter ? JSON.parse(JSON.stringify(column.formatter)) : column.formatter
|
|
404
|
+
param.isEmptyValue = column._emptyValue && column._emptyValue === '#blank#' ? true : false
|
|
405
|
+
const values = this.getFormItemValue(column.prop, null, searchForm)
|
|
406
|
+
if (column.dataType === 'DATE' || column.dataType === 'TIME') {
|
|
407
|
+
// 日期 或 时间类型
|
|
408
|
+
// console.log('values==', values, column.prop)
|
|
409
|
+
if (values && values.length === 2 && values[0] !== null && values[1] !== null) {
|
|
410
|
+
const format = this.getDateTimeSearchFormatter(column, column.dataType, column.formatter)
|
|
411
|
+
if (format) {
|
|
412
|
+
if (!param.formatter) {
|
|
413
|
+
param.formatter = {}
|
|
414
|
+
param.formatter.options = {}
|
|
415
|
+
} else if (!param.formatter.options) {
|
|
416
|
+
param.formatter.options = {}
|
|
417
|
+
}
|
|
418
|
+
param.formatter.options.format = format
|
|
419
|
+
}
|
|
420
|
+
param.startValue = this.getDateTimeMillsByDateStr(values[0], format)
|
|
421
|
+
param.endValue = this.getDateTimeMillsByDateStr(values[1], format)
|
|
422
|
+
searchParams.push(param)
|
|
423
|
+
}
|
|
424
|
+
} else if (
|
|
425
|
+
(column.dataType === 'INTEGER' || column.dataType === 'LONG' || column.dataType === 'DOUBLE') &&
|
|
426
|
+
Array.isArray(values)
|
|
427
|
+
) {
|
|
428
|
+
// 日期 或 时间类型
|
|
429
|
+
// const values1 = this.getFormItemValue(column.prop, null, searchForm)
|
|
430
|
+
if (values) {
|
|
431
|
+
if (column.componentType === 'yearRange') {
|
|
432
|
+
if (values[0] || values[1]) {
|
|
433
|
+
param.startValue = values[0]
|
|
434
|
+
param.endValue = values[1]
|
|
435
|
+
if (values[0] && !values[1]) {
|
|
436
|
+
param.startValue = values[0]
|
|
437
|
+
param.endValue = 9999
|
|
438
|
+
} else if (!values[0] && values[1]) {
|
|
439
|
+
param.startValue = 0
|
|
440
|
+
param.endValue = values[1]
|
|
441
|
+
}
|
|
442
|
+
searchParams.push(param)
|
|
443
|
+
}
|
|
444
|
+
} else {
|
|
445
|
+
if (!Array.isArray(values) || values.length < 2 || (values[0] === null && values[1] === null)) {
|
|
446
|
+
// 填写了一个有效值
|
|
447
|
+
if (!Array.isArray(values)) {
|
|
448
|
+
param.propValue = values
|
|
449
|
+
searchParams.push(param)
|
|
450
|
+
} else if (values.length < 2) {
|
|
451
|
+
param.propValue = values[0]
|
|
452
|
+
searchParams.push(param)
|
|
453
|
+
} else if (values[0] === null) {
|
|
454
|
+
param.propValue = values[1]
|
|
455
|
+
searchParams.push(param)
|
|
456
|
+
} else if (values[1] === null) {
|
|
457
|
+
param.propValue = values[0]
|
|
458
|
+
searchParams.push(param)
|
|
459
|
+
}
|
|
460
|
+
} else {
|
|
461
|
+
// 填写了两个有效值
|
|
462
|
+
|
|
463
|
+
param.startValue = values[0]
|
|
464
|
+
param.endValue = values[1]
|
|
465
|
+
searchParams.push(param)
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
} else if (
|
|
470
|
+
column.componentType &&
|
|
471
|
+
column.componentType.indexOf('Tree') !== -1 &&
|
|
472
|
+
column.componentType.indexOf('single') === -1
|
|
473
|
+
) {
|
|
474
|
+
// 说明是多选组织树
|
|
475
|
+
// 是否是人员树
|
|
476
|
+
const isUser = this.isUserTree(column.componentType)
|
|
477
|
+
const values = this.getFormItemValue(column.prop, null, searchForm)
|
|
478
|
+
if (values && values !== '') {
|
|
479
|
+
const newValue = []
|
|
480
|
+
let valueArr = values
|
|
481
|
+
if (Array.isArray(values)) {
|
|
482
|
+
// 表示是数组
|
|
483
|
+
valueArr = values
|
|
484
|
+
} else {
|
|
485
|
+
// 表示是字符串
|
|
486
|
+
valueArr = values.split(',')
|
|
487
|
+
}
|
|
488
|
+
if (Array.isArray(valueArr) && valueArr && valueArr.length > 0) {
|
|
489
|
+
valueArr.forEach((val) => {
|
|
490
|
+
// 截取用户名中的英文名信息
|
|
491
|
+
const userName = this.getUserName(isUser, val)
|
|
492
|
+
if (userName !== undefined && userName !== null) {
|
|
493
|
+
newValue.push(userName)
|
|
494
|
+
}
|
|
495
|
+
})
|
|
496
|
+
}
|
|
497
|
+
this.packageValueWithArray(newValue, searchParams, param)
|
|
498
|
+
}
|
|
499
|
+
} else if (column.componentType && column.componentType.indexOf('Tree') !== -1) {
|
|
500
|
+
// 说明是单选组织树
|
|
501
|
+
// 是否是人员树
|
|
502
|
+
const isUser = this.isUserTree(column.componentType)
|
|
503
|
+
let propValue = this.getFormItemValue(column.prop, null, searchForm)
|
|
504
|
+
// 截取用户名中的英文名信息
|
|
505
|
+
propValue = this.getUserName(isUser, propValue)
|
|
506
|
+
this.packageValueWithArray(propValue, searchParams, param)
|
|
507
|
+
} else {
|
|
508
|
+
if (column.componentType === 'multiselect') {
|
|
509
|
+
// 表示是多选下拉框选择器选择的值
|
|
510
|
+
const values = this.getFormItemValue(column.prop, null, searchForm)
|
|
511
|
+
// console.log('values==', values, column.prop)
|
|
512
|
+
this.packageValueWithArray(values, searchParams, param)
|
|
513
|
+
} else {
|
|
514
|
+
const propValue = this.getFormItemValue(column.prop, null, searchForm)
|
|
515
|
+
this.packageValueWithArray(propValue, searchParams, param)
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
})
|
|
519
|
+
return searchParams
|
|
511
520
|
}
|
|
512
521
|
}
|
|
513
522
|
export default searchMethods
|
|
@@ -227,6 +227,7 @@ import { getGuId } from '../../../src/utils/guid.js'
|
|
|
227
227
|
// import resizeMixin from '../../../src/mixins/resizeMixin.js';
|
|
228
228
|
import storeVuex from '../../../src/store'
|
|
229
229
|
import { setPageDataToChatAiStore, setPageInfoToChatStore } from '../../../src/utils/chat-ai-util.ts'
|
|
230
|
+
import searchMethods from './search-methods'
|
|
230
231
|
export default {
|
|
231
232
|
components: {
|
|
232
233
|
IndexColumn,
|
|
@@ -943,6 +944,7 @@ export default {
|
|
|
943
944
|
...events,
|
|
944
945
|
...publicMethods,
|
|
945
946
|
...superGridService,
|
|
947
|
+
...searchMethods,
|
|
946
948
|
...apis,
|
|
947
949
|
onResize(entry) {
|
|
948
950
|
this.resizeTableHeight()
|
|
@@ -51,6 +51,7 @@ import * as Vue from 'vue'
|
|
|
51
51
|
import {
|
|
52
52
|
isPlateSys,
|
|
53
53
|
getSystemFrontendUrl,
|
|
54
|
+
getKkFilePreviewUrl,
|
|
54
55
|
} from '../../../src/utils/common-util'
|
|
55
56
|
import {getToken} from '../../../src/utils/auth'
|
|
56
57
|
|
|
@@ -154,7 +155,10 @@ export default {
|
|
|
154
155
|
//要预览文件的访问地址
|
|
155
156
|
const myPreviewUrl = originUrl + '&fullfilename='+myShowName
|
|
156
157
|
// http://127.0.0.1:8012/onlinePreview
|
|
157
|
-
|
|
158
|
+
getKkFilePreviewUrl(myPreviewUrl).then(url=>{
|
|
159
|
+
window.open(url, myShowName)
|
|
160
|
+
})
|
|
161
|
+
// previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
|
|
158
162
|
} else {
|
|
159
163
|
previewUrl =
|
|
160
164
|
this.baseUrl +
|
|
@@ -165,8 +169,8 @@ export default {
|
|
|
165
169
|
encodeURI(myShowName) +
|
|
166
170
|
'&serverPath=' +
|
|
167
171
|
uuid
|
|
172
|
+
window.open(previewUrl, myShowName)
|
|
168
173
|
}
|
|
169
|
-
window.open(previewUrl, myShowName)
|
|
170
174
|
}
|
|
171
175
|
},
|
|
172
176
|
deleteFile() {
|
|
@@ -27,7 +27,7 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
27
27
|
let titleValueSet = null
|
|
28
28
|
const titleValueSetJson = column.titleValueSet
|
|
29
29
|
if (titleValueSetJson) {
|
|
30
|
-
titleValueSet =
|
|
30
|
+
titleValueSet = column.titleValueSet
|
|
31
31
|
}
|
|
32
32
|
if (columnValueSet || titleValueSet) {
|
|
33
33
|
const valueSetMeta = {
|
|
@@ -150,11 +150,7 @@ function getDataSourceConfigList(columns) {
|
|
|
150
150
|
const column = columns[i]
|
|
151
151
|
const prop = column.prop ? column.prop : column.label
|
|
152
152
|
const columnValueSet = getConfigWithValueSet(column, prop, column)
|
|
153
|
-
let titleValueSet =
|
|
154
|
-
const titleValueSetJson = column.titleValueSet
|
|
155
|
-
if (titleValueSetJson) {
|
|
156
|
-
titleValueSet = getConfigWithValueSet(JSON.parse(titleValueSetJson), prop)
|
|
157
|
-
}
|
|
153
|
+
let titleValueSet = getConfigWithTitleValueSet(column.titleValueSetOptions, prop)
|
|
158
154
|
if (columnValueSet || titleValueSet) {
|
|
159
155
|
if (columnValueSet) {
|
|
160
156
|
// 字段的值设置
|
|
@@ -178,14 +174,14 @@ function getConfigWithValueSet(valueSetInfo, prop, column) {
|
|
|
178
174
|
* bean形式值设置前缀
|
|
179
175
|
*/
|
|
180
176
|
const BEAN_NAME_PREFIX = 'beanname:'
|
|
181
|
-
const enumName = valueSetInfo.enumName
|
|
182
|
-
const beanName = valueSetInfo.beanName
|
|
177
|
+
const enumName = valueSetInfo?valueSetInfo.enumName:null
|
|
178
|
+
const beanName = valueSetInfo?valueSetInfo.beanName:null
|
|
183
179
|
let infoObj = {
|
|
184
180
|
uuid: prop
|
|
185
181
|
}
|
|
186
182
|
// 选项组的在解析列表字段配置时就获得了,不需要在此处获得了
|
|
187
183
|
if (enumName && enumName !== '') {
|
|
188
|
-
if (valueSetInfo.remoteEnum === true) {
|
|
184
|
+
if (valueSetInfo && valueSetInfo.remoteEnum === true) {
|
|
189
185
|
// 需要远程获得枚举值
|
|
190
186
|
infoObj.type = 'enumName'
|
|
191
187
|
infoObj.props = {
|
|
@@ -233,3 +229,47 @@ function getConfigWithValueSet(valueSetInfo, prop, column) {
|
|
|
233
229
|
}
|
|
234
230
|
return null
|
|
235
231
|
}
|
|
232
|
+
|
|
233
|
+
// 动态列标题列值设置解析
|
|
234
|
+
function getConfigWithTitleValueSet(valueSetOptions, prop) {
|
|
235
|
+
let valueSetOptionsObj
|
|
236
|
+
if(valueSetOptions){
|
|
237
|
+
valueSetOptionsObj = JSON.parse(valueSetOptions)
|
|
238
|
+
}
|
|
239
|
+
let infoObj = {
|
|
240
|
+
uuid: prop
|
|
241
|
+
}
|
|
242
|
+
if (valueSetOptionsObj) {
|
|
243
|
+
// 动态数据源(select开启value-label自动转换或者)、数据表/视图、服务
|
|
244
|
+
const valueSetOptionsObj = JSON.parse(valueSetOptions)
|
|
245
|
+
if (
|
|
246
|
+
valueSetOptionsObj.type || valueSetOptionsObj.dynamicDataSourceCode
|
|
247
|
+
) {
|
|
248
|
+
// 表示是动态数据源等值设置信息
|
|
249
|
+
// const isShouldInitSearch = (valueSetOptionsObj.filterType === undefined || valueSetOptionsObj.filterType != 'remote')
|
|
250
|
+
if (!valueSetOptionsObj.type || valueSetOptionsObj.type !== 'optionGroup') {
|
|
251
|
+
// 选项组时不需要在此处获得
|
|
252
|
+
Object.assign(infoObj, valueSetOptionsObj)
|
|
253
|
+
// 更新uuid为字段名
|
|
254
|
+
infoObj.uuid = prop
|
|
255
|
+
if (!infoObj.props) {
|
|
256
|
+
infoObj.props = {}
|
|
257
|
+
}
|
|
258
|
+
infoObj.props.prop = prop
|
|
259
|
+
}
|
|
260
|
+
if (valueSetOptionsObj.dynamicDataSourceCode) {
|
|
261
|
+
infoObj.type = 'dynamicData'
|
|
262
|
+
if (!infoObj.props) {
|
|
263
|
+
infoObj.props = {}
|
|
264
|
+
}
|
|
265
|
+
infoObj.props.code = valueSetOptionsObj.dynamicDataSourceCode
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (infoObj.type) {
|
|
270
|
+
// 表示是有效的值设置
|
|
271
|
+
return infoObj
|
|
272
|
+
}
|
|
273
|
+
return null
|
|
274
|
+
}
|
|
275
|
+
|
package/src/utils/auth.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import authApi from './auth-api'
|
|
2
2
|
import { removeAllSystemPermissions } from './permissionAuth'
|
|
3
3
|
import { removeGlobalPropCache } from './global-prop'
|
|
4
|
+
import { removeWatermark} from './watermark-cache'
|
|
4
5
|
|
|
5
6
|
export function getToken() {
|
|
6
7
|
return authApi.getToken()
|
|
@@ -168,4 +169,6 @@ export function clearPermission() {
|
|
|
168
169
|
|
|
169
170
|
// 清除系统参数设置的全局属性缓存
|
|
170
171
|
removeGlobalPropCache()
|
|
172
|
+
// 清除水印配置
|
|
173
|
+
removeWatermark()
|
|
171
174
|
}
|
package/src/utils/common-util.js
CHANGED
|
@@ -3,6 +3,8 @@ import { getToken, getLanguage, getAllLanguages, setAllLanguages } from './auth'
|
|
|
3
3
|
import { v4 as uuidv4 } from 'uuid'
|
|
4
4
|
import { getCookieCache } from './auth'
|
|
5
5
|
import i18nUtil from './i18n-util'
|
|
6
|
+
import { Base64 } from 'js-base64'
|
|
7
|
+
import { getWatermarkSetting } from './watermark'
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* 获得相对地址
|
|
@@ -818,3 +820,38 @@ export function getURLSearchParamObj(fullPath) {
|
|
|
818
820
|
console.error('error===',error)
|
|
819
821
|
}
|
|
820
822
|
}
|
|
823
|
+
|
|
824
|
+
// 获得KKFileView预览url,处理水印
|
|
825
|
+
export function getKkFilePreviewUrl(previewUrl) {
|
|
826
|
+
let myPreviewUrl = getKkFileBackendUrl()+'?url='+encodeURIComponent(Base64.encode(previewUrl))
|
|
827
|
+
return new Promise((resolve,reject)=>{
|
|
828
|
+
getWatermarkSetting().then((watermark)=>{
|
|
829
|
+
if(watermark){
|
|
830
|
+
myPreviewUrl = myPreviewUrl + '&watermarkTxt='+watermark.content+'&watermarkXSpace=60&watermarkYSpace=100&watermarkWidth=500&watermarkHeight=100'
|
|
831
|
+
}
|
|
832
|
+
resolve(myPreviewUrl)
|
|
833
|
+
}).catch((error)=>{
|
|
834
|
+
console.error('获得水印失败',error)
|
|
835
|
+
resolve(myPreviewUrl)
|
|
836
|
+
})
|
|
837
|
+
})
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
function getKkFileBackendUrl() {
|
|
841
|
+
let kkFileViewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl
|
|
842
|
+
let kkFileViewUrlResult = kkFileViewUrl
|
|
843
|
+
let baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
844
|
+
if(kkFileViewUrl && baseURL){
|
|
845
|
+
let baseUrls = baseURL.split('/')
|
|
846
|
+
let prefixUrl = baseUrls[0]+ '//' + baseUrls[2]
|
|
847
|
+
let kkFileViewUrls = kkFileViewUrl.split('/')
|
|
848
|
+
let kkFilePrefixUrl = kkFileViewUrls[0]+ '//' + kkFileViewUrls[2]
|
|
849
|
+
if(prefixUrl === kkFilePrefixUrl){
|
|
850
|
+
// 如果baseURL和kkFileViewUrl的ip和端口一致,则表示kkFileView服务被nginx代理了,此时需要做内网、外网域名替换,例如:西安西开项目
|
|
851
|
+
// 如果baseURL和kkFileViewUrl的ip和端口不一致,则表示kkFileView服务没有被nginx代理,此时不需要处理kkFileViewUrl路径,例如:公司产品项目
|
|
852
|
+
kkFileViewUrlResult = getRelativeBaseUrl(kkFileViewUrl)
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
console.log('获得kkFile服务部署路径', kkFileViewUrlResult)
|
|
856
|
+
return kkFileViewUrlResult
|
|
857
|
+
}
|
package/src/utils/request.js
CHANGED
|
@@ -80,7 +80,13 @@ service.interceptors.response.use(
|
|
|
80
80
|
}
|
|
81
81
|
} else if (error.response.status === 403) {
|
|
82
82
|
// ForbiddenException(403) 403没权限
|
|
83
|
-
|
|
83
|
+
let message = ''
|
|
84
|
+
if (error.response.data?.message) {
|
|
85
|
+
message = error.response.data.message
|
|
86
|
+
console.error('ForbiddenException(403):', error.response.data)
|
|
87
|
+
} else {
|
|
88
|
+
message = getI18n().t('imatrixUIMessage.forbiddenException')
|
|
89
|
+
}
|
|
84
90
|
const serverConfig = window['$vueApp'].config.globalProperties
|
|
85
91
|
let vnode
|
|
86
92
|
if (serverConfig.forbiddenUser || serverConfig.forbiddenLinkUrl) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const watermarkSetting = 'AMB_WATERMARK_SETTING'
|
|
2
|
+
|
|
3
|
+
export function getWatermark() {
|
|
4
|
+
return localStorage.getItem(watermarkSetting)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function cacheWatermark(value) {
|
|
8
|
+
localStorage.setItem(watermarkSetting, value)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function removeWatermark() {
|
|
12
|
+
localStorage.removeItem(watermarkSetting)
|
|
13
|
+
}
|