cnhis-design-vue 2.1.100 → 2.1.102

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 (55) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +141 -101
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +2 -2
  6. package/es/captcha/index.js +3 -3
  7. package/es/card-reader-sdk/index.js +1 -1
  8. package/es/checkbox/index.js +1 -1
  9. package/es/color-picker/index.js +1 -1
  10. package/es/drag-layout/index.js +3 -3
  11. package/es/editor/index.js +1 -1
  12. package/es/ellipsis/index.js +1 -1
  13. package/es/fabric-chart/index.js +522 -340
  14. package/es/fabric-chart/style.css +1 -1
  15. package/es/form-table/index.js +20 -20
  16. package/es/index/index.js +1048 -671
  17. package/es/index/style.css +1 -1
  18. package/es/input/index.js +1 -1
  19. package/es/map/index.js +1 -1
  20. package/es/multi-chat/index.js +25 -25
  21. package/es/multi-chat-client/index.js +19 -19
  22. package/es/multi-chat-history/index.js +4 -4
  23. package/es/multi-chat-record/index.js +4 -4
  24. package/es/multi-chat-setting/index.js +20 -20
  25. package/es/multi-chat-sip/index.js +1 -1
  26. package/es/radio/index.js +1 -1
  27. package/es/scale-container/index.js +1 -1
  28. package/es/scale-view/index.js +27 -27
  29. package/es/select/index.js +4 -4
  30. package/es/select-label/index.js +3 -3
  31. package/es/select-person/index.js +2 -2
  32. package/es/select-tag/index.js +4 -4
  33. package/es/shortcut-setter/index.js +2 -2
  34. package/es/table-filter/index.js +270 -115
  35. package/es/table-filter/style.css +1 -1
  36. package/es/tag/index.js +1 -1
  37. package/es/verification-code/index.js +2 -2
  38. package/lib/cui.common.js +1175 -773
  39. package/lib/cui.umd.js +1175 -773
  40. package/lib/cui.umd.min.js +26 -26
  41. package/package.json +1 -1
  42. package/packages/big-table/src/BigTable.vue +33 -5
  43. package/packages/big-table/src/assets/style/table-global.less +4 -5
  44. package/packages/fabric-chart/src/FabricChart.vue +1 -1
  45. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +10 -8
  46. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +83 -47
  47. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +149 -97
  48. package/packages/fabric-chart/src/mixins/draw.js +1 -1
  49. package/packages/table-filter/src/base-search-com/BaseSearch.vue +1 -0
  50. package/packages/table-filter/src/components/render-widget/components/Text.vue +58 -0
  51. package/packages/table-filter/src/components/render-widget/components/index.js +3 -2
  52. package/packages/table-filter/src/components/render-widget/index.vue +11 -3
  53. package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +5 -5
  54. package/packages/table-filter/src/mixins/renderWidget.js +21 -5
  55. package/packages/table-filter/src/quick-search/QuickSearch.vue +10 -1
@@ -152,12 +152,7 @@ export default {
152
152
  this.isRightVisible = false;
153
153
  const text = this._currentPoint;
154
154
  this._currentPoint = '';
155
- const obj = {
156
- type: text.type,
157
- index: text.index,
158
- dataIndex: text.dataIndex
159
- };
160
- this.$emit(`${type}Other`, obj);
155
+ this.$emit(`${type}Other`, this.getOtherParams(text, false));
161
156
  },
162
157
  removeOther() {
163
158
  this.canvas.forEachObject(obj => {
@@ -232,11 +227,13 @@ export default {
232
227
  }
233
228
  },
234
229
  drawTextDataGroupColList(colList) {
235
- const { originY } = this.propItems;
230
+ const { originY, endX } = this.propItems;
236
231
  let textList = [];
237
232
  colList.forEach((item, index) => {
238
233
  const baseTop = originY + (item.marginTop || 10);
239
234
  if (this.isLimit(item.scalevalue)) {
235
+ const textItemPoints = [];
236
+ const left = this.cumputedX(item.scalevalue);
240
237
  item.dataList.forEach((v, i) => {
241
238
  const top = baseTop + i * (item.lineHeight || 15);
242
239
  const text = new this.fabric.Text(String(v.value), {
@@ -245,9 +242,8 @@ export default {
245
242
  ...item.style,
246
243
  originX: 'left',
247
244
  originY: 'center',
248
- left: this.cumputedX(item.scalevalue),
245
+ left,
249
246
  top,
250
- lockMovementX: true,
251
247
  lockMovementY: true,
252
248
  dataIndex: index,
253
249
  index: i,
@@ -255,12 +251,23 @@ export default {
255
251
  id: `${index}_${i}_other_${Date.now()}`,
256
252
  name: v.value,
257
253
  objectCaching: false,
254
+ origin: {
255
+ time: item.scalevalue,
256
+ ...v
257
+ },
258
258
  ...this.eventStyle
259
259
  });
260
- text.hasControls = text.hasBorders = false;
261
- this.setPopup(text);
260
+ textItemPoints.push(text);
261
+ this.pointOtherEvent(text);
262
262
  textList.push(text);
263
263
  });
264
+ const maxTextWidth = Math.max(...textItemPoints.map(obj => obj.width));
265
+ const isOverstep = left > endX - maxTextWidth;
266
+ textItemPoints.forEach((point, _, arr) => {
267
+ point.maxTextWidth = maxTextWidth;
268
+ point.siblingPoints = arr.filter(_point => _point.index !== point.index);
269
+ if (isOverstep) point.setCoords().set('originX', 'right');
270
+ });
264
271
  }
265
272
  });
266
273
  this.canvas.add(...textList);
@@ -296,6 +303,7 @@ export default {
296
303
  this.setMovingEvent(title, originOptions);
297
304
  textList.push(title);
298
305
  const { icon: _icon = { type: 'circle' }, dataList } = item || {};
306
+ let prevPoint;
299
307
  for (let i = 0, len = dataList.length; i < len; i++) {
300
308
  const v = dataList[i];
301
309
  if (this.isLimit(v.time)) {
@@ -305,7 +313,8 @@ export default {
305
313
  dataIndex: index,
306
314
  index: i,
307
315
  type: 'list',
308
- objectCaching: false
316
+ objectCaching: false,
317
+ origin: v
309
318
  };
310
319
  const left = this.cumputedX(v.time);
311
320
  title.dataList.push(left);
@@ -327,20 +336,33 @@ export default {
327
336
  });
328
337
  const groupObj = new this.fabric.Group([icon, text], {
329
338
  id: `${index}_${i}_other_${Date.now()}`,
330
- lockMovementX: true,
331
339
  lockMovementY: true,
332
340
  ...commonOptions,
333
341
  ...this.eventStyle,
334
- realLeft: left
342
+ realLeft: left,
343
+ iconHalfWidth: icon.width / 2
335
344
  });
336
- groupObj.hasControls = groupObj.hasBorders = false;
337
- this.setPopup(groupObj);
345
+ if (prevPoint) {
346
+ prevPoint.nextPoint = groupObj;
347
+ groupObj.prevPoint = prevPoint;
348
+ }
349
+ prevPoint = groupObj;
350
+ this.pointOtherEvent(groupObj);
338
351
  textList.push(groupObj);
339
352
  }
340
353
  }
341
354
  }
342
355
  this.canvas.add(...textList);
343
356
  },
357
+ emitMouseoverTarget(point) {
358
+ if (point) {
359
+ Bus.$emit('mouseoverTarget', true);
360
+ this.showDrapPopup(point, true);
361
+ } else {
362
+ !this.isRightVisible && Bus.$emit('mouseoverTarget', false);
363
+ this.isDropVisible = false;
364
+ }
365
+ },
344
366
  setMovingEvent(point) {
345
367
  const { originX, originY, endX, endY } = this.propItems;
346
368
  const isLimit = () => point.left >= originX && point.left <= endX && point.top >= originY && point.top <= endY;
@@ -355,11 +377,9 @@ export default {
355
377
  point.isClone = true;
356
378
  });
357
379
  if (isLimit()) {
358
- Bus.$emit('mouseoverTarget', true);
359
- this.showDrapPopup(point, true);
380
+ this.emitMouseoverTarget(point);
360
381
  } else {
361
- !this.isRightVisible && Bus.$emit('mouseoverTarget', false);
362
- this.isDropVisible = false;
382
+ this.emitMouseoverTarget();
363
383
  }
364
384
  });
365
385
  point.on('moved', () => {
@@ -367,35 +387,60 @@ export default {
367
387
  point.isClone = false;
368
388
  this.removeOther();
369
389
  this.drawTextDataGroup(this.templateData.other);
370
- !this.isRightVisible && Bus.$emit('mouseoverTarget', false);
371
- this.isDropVisible = false;
390
+ this.emitMouseoverTarget();
372
391
  if (isLimit()) {
373
- const { type, dataIndex, left, dataList } = point;
374
- const time = this.getXValue(left);
392
+ const { left, dataList } = point;
375
393
  const index = dataList.findIndex(_left => _left > left);
376
394
  // 使用定时器,是因为:防止上方移除重绘过慢新增完后再次触发移除重绘导致页面多次重绘节点
377
395
  setTimeout(() => {
378
- this.$emit('addOhter', {
379
- type,
380
- dataIndex,
381
- index: !~index ? (dataList.length ? dataList.length - 1 : 0) : index,
382
- data: {
383
- time
384
- }
385
- });
396
+ this.$emit('addOhter', { ...this.getOtherParams(point), index: !~index ? (dataList.length ? dataList.length - 1 : 0) : index });
386
397
  });
387
398
  }
388
399
  });
389
400
  },
401
+ pointOtherEvent(point) {
402
+ point.hasControls = point.hasBorders = false;
403
+ this.setPopup(point);
404
+ // 移动中 实时更新相关联的线的坐标
405
+ if (this.eventStyle.evented) {
406
+ const { endX, originX } = this.propItems;
407
+ point.on('moving', () => {
408
+ point.setCoords();
409
+ const { prevPoint, nextPoint } = point;
410
+ const limitLeft = prevPoint?.left || originX;
411
+ const limitRight = nextPoint?.left || endX;
412
+ if (point.left > limitRight) point.set('left', limitRight);
413
+ if (point.left < limitLeft) point.set('left', limitLeft);
414
+ if (point.realLeft && point.iconHalfWidth) point.realLeft = point.left + point.iconHalfWidth;
415
+ if (point.maxTextWidth) {
416
+ const isOverstep = point.left + point.maxTextWidth > limitRight;
417
+ const originX = isOverstep ? 'right' : 'left';
418
+ point.setCoords().set({ originX });
419
+ point.siblingPoints.forEach(_point => _point.setCoords().set({ originX, left: point.left }));
420
+ }
421
+ this.showDrapPopup(point);
422
+ });
423
+ point.on('moved', () => {
424
+ this.isDropVisible = false;
425
+ this.$emit('otherChange', this.getOtherParams(point));
426
+ });
427
+ }
428
+ },
429
+ getOtherParams(point, isChange = true) {
430
+ const { type, dataIndex, left, realLeft, origin, index } = point;
431
+ return {
432
+ type,
433
+ dataIndex,
434
+ index,
435
+ data: {
436
+ ...origin,
437
+ ...(isChange ? { time: this.getXValue(realLeft ?? left) } : {})
438
+ }
439
+ };
440
+ },
390
441
  setPopup(point) {
391
- point.on('mouseover', () => {
392
- Bus.$emit('mouseoverTarget', true);
393
- this.showDrapPopup(point, true);
394
- });
395
- point.on('mouseout', () => {
396
- !this.isRightVisible && Bus.$emit('mouseoverTarget', false);
397
- this.isDropVisible = false;
398
- });
442
+ point.on('mouseover', () => this.emitMouseoverTarget(point));
443
+ point.on('mouseout', () => this.emitMouseoverTarget());
399
444
  },
400
445
  // 判断当前时间是否超出网格区域
401
446
  isLimit(value) {
@@ -441,12 +486,7 @@ export default {
441
486
  const lineHeightText = (obj.style?.fontSize || 12) + 2;
442
487
  const lineHeightImg = (obj.iconStyle?.height || 12) + 2;
443
488
  const lineHeightSeq = (obj.seqStyle?.circle?.radius || 9) * 2 + 2;
444
- const addCanvas = point => {
445
- point.hasControls = point.hasBorders = false;
446
- this.pointEvent(point);
447
- this.canvas.add(point);
448
- // this.canvas.requestRenderAll();
449
- };
489
+
450
490
  const setTop = (lineHeight, i, condition) => {
451
491
  if (!~condition.limitIndex) {
452
492
  condition.y += i === 0 ? lineHeight / 2 : lineHeight;
@@ -469,6 +509,7 @@ export default {
469
509
  };
470
510
  const x = this.cumputedX(item[0]);
471
511
  if (this.isLimit(item[0])) {
512
+ const pointList = [];
472
513
  item[1].forEach(async (v, i) => {
473
514
  const common = {
474
515
  left: x,
@@ -482,66 +523,80 @@ export default {
482
523
  objectCaching: false
483
524
  };
484
525
 
485
- const eventStyle = !this.eventStyle.evented
486
- ? {
487
- lockMovementX: true,
488
- lockMovementY: true
489
- }
490
- : {};
491
-
492
526
  if (this.isObject(v) && !v.value) {
493
527
  common.top = setTop(lineHeightImg, i, condition);
494
- const option = Object.assign({}, obj.iconStyle || {}, v || {}, {
495
- ...common,
496
- ...eventStyle
497
- });
498
- let ele;
499
- if (v?.iconClassName) {
500
- ele = await this.createImage(v.iconClassName, v);
501
- }
502
- const img = await this.createPoint(v?.url || v?.iconClassName ? 'img' : v.type, {
503
- ele: ele || '',
504
- ...option
505
- });
506
- addCanvas(img);
528
+ const option = {
529
+ ...obj.iconStyle,
530
+ ...v,
531
+ ...common
532
+ };
533
+ pointList.push(this.drawMarkPoint(v, option, obj));
507
534
  } else if (v.value) {
508
535
  if (v.seq) {
509
536
  common.top = setTop(lineHeightSeq, i, condition);
510
- // 标记增加序号
511
- const circle = await this.createPoint('circle', {
512
- ...common,
513
- radius: 5,
514
- strokeWidth: 1,
515
- stroke: '#000',
516
- fill: 'transparent',
517
- ...(obj.seqStyle?.circle || {})
518
- });
519
- const text = new this.fabric.Text(String(v.value), {
520
- ...defaultVaule.textStyle,
521
- ...common,
522
- ...(obj.seqStyle?.text || {})
523
- });
524
- const group = new this.fabric.Group([circle, text], {
525
- ...common,
526
- // hoverCursor: 'default',
527
- ...eventStyle
528
- });
529
- addCanvas(group);
537
+ pointList.push(this.drawMarkPoint(v, common, obj));
530
538
  } else {
531
539
  common.top = setTop(lineHeightText, i, condition);
532
- const text = new this.fabric.Text(String(v.value), {
533
- ...defaultVaule.textStyle,
534
- ...obj.style,
535
- ...common,
536
- ...eventStyle
537
- });
538
- addCanvas(text);
540
+ pointList.push(this.drawMarkPoint(v, common, obj));
539
541
  }
540
542
  }
541
543
  });
544
+ Promise.all(pointList).then(res => this.canvas.add(...res));
542
545
  }
543
546
  });
544
- // this.canvas.add(...textList);
547
+ },
548
+ async drawMarkPoint(v, option, obj) {
549
+ let point;
550
+ const eventStyle = !this.eventStyle.evented
551
+ ? {
552
+ lockMovementX: true,
553
+ lockMovementY: true
554
+ }
555
+ : {};
556
+ if (this.isObject(v) && !v.value) {
557
+ let ele;
558
+ if (v?.iconClassName) {
559
+ ele = await this.createImage(v.iconClassName, v);
560
+ }
561
+ point = await this.createPoint(v?.url || v?.iconClassName ? 'img' : v.type, {
562
+ ele: ele || '',
563
+ ...option,
564
+ ...eventStyle
565
+ });
566
+ } else if (v.value) {
567
+ if (v.seq) {
568
+ // 标记增加序号
569
+ const circle = await this.createPoint('circle', {
570
+ ...option,
571
+ radius: 5,
572
+ strokeWidth: 1,
573
+ stroke: '#000',
574
+ fill: 'transparent',
575
+ ...(obj.seqStyle?.circle || {})
576
+ });
577
+ const text = new this.fabric.Text(String(v.value), {
578
+ ...defaultVaule.textStyle,
579
+ ...option,
580
+ ...(obj.seqStyle?.text || {})
581
+ });
582
+ point = await new this.fabric.Group([circle, text], {
583
+ ...option,
584
+ ...eventStyle
585
+ });
586
+ } else {
587
+ point = await new this.fabric.Text(String(v.value), {
588
+ ...defaultVaule.textStyle,
589
+ ...obj.style,
590
+ ...option,
591
+ ...eventStyle
592
+ });
593
+ }
594
+ }
595
+
596
+ point.hasControls = point.hasBorders = false;
597
+ this.pointEvent(point);
598
+
599
+ return point;
545
600
  },
546
601
  pointEvent(point) {
547
602
  this.setPopup(point);
@@ -653,8 +708,5 @@ export default {
653
708
  }
654
709
  }
655
710
  }
656
- // render(h) {
657
- // return this.$slots.default ? h('div', this.$slots.default) : undefined;
658
- // }
659
711
  };
660
712
  </script>
@@ -150,7 +150,7 @@ export default {
150
150
  return new this.fabric.Circle({
151
151
  objectCaching: false,
152
152
  strokeWidth: 1,
153
- radius: data.width / 2,
153
+ radius: data.width ? data.width / 2 : data.radius,
154
154
  scale: 1,
155
155
  fill: '#fff',
156
156
  ...data
@@ -1805,6 +1805,7 @@ export default create({
1805
1805
  this.outRelationQuickSearch = [];
1806
1806
  let mySearchFieldList = JSON.parse(JSON.stringify(this.searchFieldList)).filter(i => ((i.random_key = this.getFiledRandom_key(i)), i.isShowSearch == 1 && i.filterExplicit == 1));
1807
1807
  this.outSearchFieldList = mySearchFieldList;
1808
+ this.sourceTrigger = 'baseSearch'
1808
1809
  // 跨表
1809
1810
  let outRelationQuickSearch = this.relationTableList.map(item => {
1810
1811
  return {
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <Input
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ v-model="valueCp"
6
+ class="widget-input"
7
+ >
8
+ <template v-if="showPrefix" #prefix>
9
+ <Checkbox v-model="componentCfg.isAccurateSearch">精准查询</Checkbox>
10
+ </template>
11
+ </Input>
12
+ </template>
13
+
14
+ <script>
15
+ import { Input, Checkbox } from 'ant-design-vue';
16
+
17
+ export default {
18
+ inheritAttrs: false,
19
+ components: {
20
+ Input,
21
+ Checkbox
22
+ },
23
+ props: {
24
+ value: {
25
+ type: [Array, String, Number],
26
+ },
27
+ componentCfg: {
28
+ type: Object
29
+ },
30
+ isQuick: {type: Boolean, default: false}
31
+ },
32
+ model: {
33
+ prop: "value",
34
+ event: "update:value"
35
+ },
36
+ computed: {
37
+ valueCp: {
38
+ set(val) {
39
+ this.$emit("update:value", val);
40
+ },
41
+ get() {
42
+ return this.value;
43
+ }
44
+ },
45
+ showPrefix() {
46
+ return !this.isQuick && this.componentCfg?.widgetCfg?.accurateSearch?.switchEnable
47
+ }
48
+ },
49
+ methods: {},
50
+ }
51
+ </script>
52
+ <style lang='less'>
53
+ .widget-input {
54
+ .ant-input:not(:first-child) {
55
+ padding-left: 100px;
56
+ }
57
+ }
58
+ </style>
@@ -4,6 +4,7 @@ import NumberRange from './NumberRange.vue';
4
4
  import DateRangeQuick from './DateRangeQuick.vue';
5
5
  import SelectDynamic from './SelectDynamic.vue';
6
6
  import Label from './Label.vue';
7
- import SelectLabel from './SelectLabel.vue'
7
+ import SelectLabel from './SelectLabel.vue';
8
+ import Text from './Text.vue';
8
9
 
9
- export { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic, Label, SelectLabel };
10
+ export { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic, Label, SelectLabel, Text };
@@ -58,7 +58,15 @@ export default {
58
58
  if(cfg?.fieldType?.includes?.('DATE') && cfg?.widgetCfg?.rangeFilter) {
59
59
  defW = 350
60
60
  }
61
- return `${cfg.advanceColWidth||defW}px`;
61
+ const isInputSwitchEnable = cfg?.fieldType === WidgetTypeEnums.INPUT && cfg?.widgetCfg?.accurateSearch?.switchEnable
62
+ if(isInputSwitchEnable) {
63
+ defW = 300
64
+ }
65
+ let width = cfg.advanceColWidth;
66
+ if (width && !isNaN(+width) && isInputSwitchEnable) {
67
+ width = +width + 100;
68
+ }
69
+ return `${width||defW}px`;
62
70
  },
63
71
  getEleMinWidth(cfg){
64
72
  if(!this.isQuick) return `${cfg.advanceColWidth|| 195}px`;
@@ -76,11 +84,11 @@ export default {
76
84
  if (customPlaceholder) {
77
85
  Props.placeholder = customPlaceholder;
78
86
  }
79
- if(widgetType === 'SELECT_DYNAMIC') {
87
+ if(widgetType === WidgetTypeEnums.SELECT_DYNAMIC) {
80
88
  Props.dropdownVisibleChangeRender = this.dropdownVisibleChangeRender;
81
89
  Props.handleWordBookSearchRender = this.handleWordBookSearchRender;
82
90
  }
83
- if(widgetType === 'LABEL' || widgetType === 'SELECT_LABEL') {
91
+ if(widgetType === WidgetTypeEnums.LABEL || widgetType === WidgetTypeEnums.SELECT_LABEL) {
84
92
  Props.getLabelListMethodRender = this.getLabelListMethodRender;
85
93
  }
86
94
  this.initialProps = Props;
@@ -1,6 +1,6 @@
1
1
  import { WidgetTypeEnums, DatePresetValEnums } from './enums';
2
2
  import { InputNumber, Input, DatePicker } from 'ant-design-vue';
3
- import { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic, Label, SelectLabel } from './components';
3
+ import { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic, Label, SelectLabel, Text } from './components';
4
4
  import moment from 'moment';
5
5
  import { presetValToTimestamp } from './helpers/presetValToTimestamp';
6
6
 
@@ -34,7 +34,7 @@ export const WidgetCfgMaps = new Map([
34
34
  [
35
35
  WidgetTypeEnums.INPUT,
36
36
  {
37
- component: Input,
37
+ component: Text,
38
38
  props: {
39
39
  allowClear: true
40
40
  },
@@ -48,8 +48,8 @@ export const WidgetCfgMaps = new Map([
48
48
  }
49
49
  }
50
50
  ],
51
- handlerProps(props, { title } = {}) {
52
- const Props = { ...props, placeholder: `请输入${title}` };
51
+ handlerProps(props, { title, isQuick } = {}) {
52
+ const Props = { ...props, placeholder: `请输入${title}`, isQuick };
53
53
  return Props;
54
54
  },
55
55
  setDefaultValue: SetDefVal
@@ -284,5 +284,5 @@ export const WidgetCfgMaps = new Map([
284
284
  return defaultValue;
285
285
  }
286
286
  }
287
- ],
287
+ ]
288
288
  ]);
@@ -13,6 +13,11 @@ function randomkey() {
13
13
  const BlockEle = [WidgetTypeEnums.CHECKBOX_GROUP, WidgetTypeEnums.DATE_RANGE_QUICK, WidgetTypeEnums.CHECKBOX_GROUP, WidgetTypeEnums.LABEL];
14
14
 
15
15
  export default {
16
+ data() {
17
+ return {
18
+ sourceTrigger: ''
19
+ };
20
+ },
16
21
  methods: {
17
22
  isRender(cfg) {
18
23
  return cfg.widgetCfg?.isRender;
@@ -31,12 +36,18 @@ export default {
31
36
  const isRender = this.isRender(cfg);
32
37
  if (!isRender) return isRender;
33
38
 
34
- const { widgetType } = cfg.widgetCfg || {};
39
+ let { widgetType } = cfg.widgetCfg || {};
35
40
 
36
41
  this.$set(cfg, '_frontId', randomkey());
37
42
  this.$set(cfg, 'isRender', isRender);
38
43
  this.$set(cfg, 'widgetType', widgetType);
39
44
  this.$set(cfg, 'con', 'EQ');
45
+ // 高级筛选中不处理
46
+ let { switchEnable = false, searchKey = '' } = cfg.widgetCfg?.accurateSearch || {};
47
+ if (this.sourceTrigger === 'baseSearch' && cfg.widgetType === WidgetTypeEnums.INPUT && switchEnable) {
48
+ this.$set(cfg, 'isAccurateSearch', false);
49
+ this.$set(cfg, 'accurateSearchKey', searchKey);
50
+ }
40
51
 
41
52
  if (BlockEle.includes(widgetType)) this.$set(cfg, '_isBlock', true);
42
53
 
@@ -47,7 +58,7 @@ export default {
47
58
  getRenderSearchConObj(cfg) {
48
59
  const isRender = this.isRender(cfg);
49
60
  if (!isRender) return null;
50
- const { columnName, con, value, widgetType } = cfg;
61
+ const { columnName, con, value, widgetType, widgetCfg, isAccurateSearch, accurateSearchKey } = cfg;
51
62
 
52
63
  let unit = null;
53
64
  // 时间组件 unit 设置为自定义
@@ -57,13 +68,18 @@ export default {
57
68
  }
58
69
 
59
70
  const val = Array.isArray(value) ? value : value ? [value] : [];
60
-
61
- return {
71
+ let obj = {
62
72
  field_key: columnName,
63
73
  con,
64
74
  value: val.length > 0 ? val : null,
65
75
  unit
66
76
  };
77
+
78
+ if (widgetType === WidgetTypeEnums.INPUT && widgetCfg?.accurateSearch?.switchEnable) {
79
+ obj.isAccurateSearch = isAccurateSearch;
80
+ obj.accurateSearchKey = accurateSearchKey;
81
+ }
82
+ return obj;
67
83
  },
68
84
  getDefValByRenderConObj(conObj, cfg) {
69
85
  const isRender = this.isRender(cfg);
@@ -87,7 +103,7 @@ export default {
87
103
  resetRenderWidgetValue(cfg) {
88
104
  const isRender = this.isRender(cfg);
89
105
  if (!isRender) return isRender;
90
- if (cfg.widgetType == 'DATE_RANGE_QUICK') {
106
+ if (cfg.widgetType == WidgetTypeEnums.DATE_RANGE_QUICK) {
91
107
  cfg.con = undefined;
92
108
  }
93
109
  cfg.value = undefined;
@@ -826,6 +826,7 @@ export default create({
826
826
  return {
827
827
  modalVisible: this.visible,
828
828
  showInner: false,
829
+ showInnerOutFilterConOBj: [], // 保存到分类时, 携带外部条件
829
830
  quickSearch: [],
830
831
  relationTableList: [], // 跨表查询
831
832
  relationQuickSearch: [], // 跨表查询检索条件
@@ -851,6 +852,7 @@ export default create({
851
852
  showAdd: false,
852
853
  addVal: "",
853
854
  fetchingWordbook: false,
855
+
854
856
  ...dataOptions
855
857
  };
856
858
  },
@@ -1372,12 +1374,14 @@ export default create({
1372
1374
  this.isChangeWindow = false;
1373
1375
  },
1374
1376
  // 填写搜索设置条件后打开新增搜索分类名称弹框
1375
- openSaveToCalss() {
1377
+ openSaveToCalss(outFilterConOBj = []) {
1376
1378
  let conObj = this.getConObjParams();
1377
1379
  if (!conObj) return;
1378
1380
  if (conObj.length > 0) {
1379
1381
  if (!this.validConObj(conObj, this.searchFieldList, this.searchFieldLimit)) return;
1380
1382
  this.showInner = true;
1383
+ // 保存到分类时, 携带外部条件
1384
+ this.showInnerOutFilterConOBj = outFilterConOBj
1381
1385
  } else {
1382
1386
  this.$message.warning(this.getI18nText('1.1.6.18', '请设置搜索条件'), 2);
1383
1387
  }
@@ -1591,6 +1595,9 @@ export default create({
1591
1595
  conObj = [];
1592
1596
  }
1593
1597
  let displayCategory = this.parentNames.filter(item => item.selected)[0]?.value;
1598
+ if(this.showInnerOutFilterConOBj?.length) {
1599
+ conObj.push(...this.showInnerOutFilterConOBj)
1600
+ }
1594
1601
  let params = {
1595
1602
  tableId: this.$attrs.tableId || "",
1596
1603
  setting: JSON.stringify({
@@ -1672,6 +1679,7 @@ export default create({
1672
1679
  let res = await this.handleGetConfigApi(params, 'requestSaveTableCondiTion');
1673
1680
  if (!res) return;
1674
1681
  this.showInner = false;
1682
+ this.showInnerOutFilterConOBj = [];
1675
1683
  this.formInner.resetFields();
1676
1684
  this.$emit("updateTableCondiTion");
1677
1685
  this.clearData();
@@ -1682,6 +1690,7 @@ export default create({
1682
1690
  },
1683
1691
  cancelSaveToCalss() {
1684
1692
  this.showInner = false;
1693
+ this.showInnerOutFilterConOBj = [];
1685
1694
  },
1686
1695
  // 清空快速搜索设置条件
1687
1696
  clearData() {