agilebuilder-ui 1.1.50-sit2 → 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-d6261c73.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-d6261c73.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-d6261c73.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-sit2",
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
@@ -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