agilebuilder-ui 1.1.50-sit1 → 1.1.50-sit3

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.
@@ -1,5 +1,5 @@
1
1
  import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
2
- import { _ as s } from "./index-c625583f.js";
2
+ import { _ as s } from "./index-aad7870b.js";
3
3
  const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
4
4
  this.src = this.$route.query.src;
5
5
  } }, mounted() {
@@ -1,4 +1,4 @@
1
- import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-c625583f.js";
1
+ import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-aad7870b.js";
2
2
  import { resolveComponent as u, openBlock as l, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as C, renderList as T, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
3
3
  const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
4
4
  return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
2
- import { _ as I } from "./index-c625583f.js";
2
+ import { _ as I } from "./index-aad7870b.js";
3
3
  const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
4
4
  const o = this.$route.query.workflowId;
5
5
  o && (this.workflowId = parseInt(o));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.1.50-sit1",
3
+ "version": "1.1.50-sit3",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -1471,6 +1471,15 @@ const apis = {
1471
1471
  }
1472
1472
  }
1473
1473
  gridParams.gridData[rowIndex]['validateErrorField'] = fieldName
1474
+ },
1475
+ /**
1476
+ * 手动执行自定义查询
1477
+ * @param {Array} searchableColumns 查询字段集合
1478
+ * @param {object} searchData 查询值对象。例如:{'DEPT_CODE':'xxx','DEPT_NAME':'xxxx'}
1479
+ */
1480
+ handleSearch(searchableColumns, searchData){
1481
+ const searchForm = this.packageSearchParamNormalType(searchableColumns, searchData)
1482
+ this.doSearch(searchForm)
1474
1483
  }
1475
1484
  }
1476
1485
  export default apis
@@ -861,12 +861,20 @@ export default {
861
861
  // 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
862
862
  if (this.column.valueSetOptions) {
863
863
  if (this.column.componentType === 'switch') {
864
- const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
864
+ let valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
865
+ if(typeof valueSetOptionsObj === 'string'){
866
+ // 再转一次
867
+ valueSetOptionsObj = JSON.parse(valueSetOptionsObj)
868
+ }
865
869
  if (valueSetOptionsObj) {
866
870
  this.valueSetOptions = valueSetOptionsObj
867
871
  }
868
872
  } else if (this.column.componentType !== 'inputNumber') {
869
- const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
873
+ let valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
874
+ if(typeof valueSetOptionsObj === 'string'){
875
+ // 再转一次
876
+ valueSetOptionsObj = JSON.parse(valueSetOptionsObj)
877
+ }
870
878
  if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
871
879
  this.valueSetOptions = valueSetOptionsObj.valueSetOptions
872
880
  }
@@ -990,7 +998,11 @@ export default {
990
998
  */
991
999
  getDateAllowTime() {
992
1000
  if (this.column.valueSetOptions) {
993
- const optionsObj = JSON.parse(this.column.valueSetOptions)
1001
+ let optionsObj = JSON.parse(this.column.valueSetOptions)
1002
+ if(typeof optionsObj === 'string'){
1003
+ // 再转一次
1004
+ optionsObj = JSON.parse(optionsObj)
1005
+ }
994
1006
  const nowTime = Date.now()
995
1007
  if (optionsObj.stateForbiddenTime) {
996
1008
  const stateDayNumber = optionsObj.stateForbiddenTime
@@ -1822,7 +1834,11 @@ export default {
1822
1834
  this.column.valueSetOptions !== '' &&
1823
1835
  this.column.componentType === 'inputNumber'
1824
1836
  ) {
1825
- const inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1837
+ let inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1838
+ if(typeof inputNumberSetting === 'string'){
1839
+ // 再转一次
1840
+ inputNumberSetting = JSON.parse(inputNumberSetting)
1841
+ }
1826
1842
  if (inputNumberSetting.min) {
1827
1843
  defaultValue = inputNumberSetting.min
1828
1844
  }
@@ -1912,7 +1928,11 @@ export default {
1912
1928
  this.column.valueSetOptions !== '' &&
1913
1929
  this.column.componentType === 'inputNumber'
1914
1930
  ) {
1915
- const inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1931
+ let inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1932
+ if(typeof inputNumberSetting === 'string'){
1933
+ // 再转一次
1934
+ inputNumberSetting = JSON.parse(inputNumberSetting)
1935
+ }
1916
1936
  this.inputNumberSet = inputNumberSetting
1917
1937
  } else {
1918
1938
  this.inputNumberSet = {
@@ -7,140 +7,7 @@ const searchMethods = {
7
7
  this.searchType === undefined ||
8
8
  this.searchType === ''
9
9
  ) {
10
- const searchParams = []
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) => {
@@ -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 this.searchForm[prop][index]
212
+ return searchForm[prop][index]
343
213
  } else {
344
- return this.searchForm[prop]
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)
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
@@ -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 = packageEnumAndBeanColumnValueSet(JSON.parse(titleValueSetJson))
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 = null
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
+