cnhis-design-vue 2.1.128 → 2.1.130

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 (124) hide show
  1. package/CHANGELOG.md +66 -1
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +1631 -338
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +22 -22
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/card-reader-sdk/index.js +57 -23
  19. package/es/carousel/index.js +8 -8
  20. package/es/cascader/index.js +8 -8
  21. package/es/checkbox/index.js +9 -9
  22. package/es/col/index.js +8 -8
  23. package/es/collapse/index.js +8 -8
  24. package/es/color-picker/index.js +1 -1
  25. package/es/comment/index.js +8 -8
  26. package/es/config-provider/index.js +8 -8
  27. package/es/date-picker/index.js +8 -8
  28. package/es/descriptions/index.js +8 -8
  29. package/es/direct/index.js +16 -16
  30. package/es/divider/index.js +8 -8
  31. package/es/drag-layout/index.js +3 -3
  32. package/es/drawer/index.js +8 -8
  33. package/es/dropdown/index.js +8 -8
  34. package/es/editor/index.js +1 -1
  35. package/es/ellipsis/index.js +1 -1
  36. package/es/empty/index.js +8 -8
  37. package/es/fabric-chart/index.js +320 -146
  38. package/es/form/index.js +8 -8
  39. package/es/form-model/index.js +8 -8
  40. package/es/form-table/index.js +698 -697
  41. package/es/full-calendar/index.js +52 -52
  42. package/es/full-calendar/style.css +1 -1
  43. package/es/grid/index.js +0 -1
  44. package/es/index/index.js +1977 -1269
  45. package/es/index/style.css +1 -1
  46. package/es/input/index.js +9 -9
  47. package/es/input-number/index.js +8 -8
  48. package/es/layout/index.js +8 -8
  49. package/es/list/index.js +8 -8
  50. package/es/locale-provider/index.js +8 -8
  51. package/es/map/index.js +9 -9
  52. package/es/mentions/index.js +8 -8
  53. package/es/menu/index.js +8 -8
  54. package/es/message/index.js +8 -8
  55. package/es/multi-chat/index.js +76 -76
  56. package/es/multi-chat-client/index.js +70 -70
  57. package/es/multi-chat-history/index.js +4 -4
  58. package/es/multi-chat-record/index.js +14 -14
  59. package/es/multi-chat-setting/index.js +22 -22
  60. package/es/multi-chat-sip/index.js +1 -1
  61. package/es/notification/index.js +8 -8
  62. package/es/page-header/index.js +8 -8
  63. package/es/pagination/index.js +8 -8
  64. package/es/popconfirm/index.js +8 -8
  65. package/es/popover/index.js +8 -8
  66. package/es/progress/index.js +8 -8
  67. package/es/radio/index.js +9 -9
  68. package/es/rate/index.js +8 -8
  69. package/es/result/index.js +8 -8
  70. package/es/row/index.js +8 -8
  71. package/es/scale-container/index.js +386 -385
  72. package/es/scale-view/index.js +27 -27
  73. package/es/select/index.js +12 -12
  74. package/es/select-label/index.js +11 -11
  75. package/es/select-person/index.js +2 -2
  76. package/es/select-tag/index.js +4 -4
  77. package/es/shortcut-setter/index.js +10 -10
  78. package/es/skeleton/index.js +8 -8
  79. package/es/slider/index.js +8 -8
  80. package/es/slider-tree/index.js +9 -9
  81. package/es/space/index.js +8 -8
  82. package/es/spin/index.js +8 -8
  83. package/es/statistic/index.js +8 -8
  84. package/es/steps/index.js +8 -8
  85. package/es/switch/index.js +8 -8
  86. package/es/table-filter/index.js +521 -230
  87. package/es/table-filter/style.css +1 -1
  88. package/es/tabs/index.js +8 -8
  89. package/es/tag/index.js +9 -9
  90. package/es/time-picker/index.js +8 -8
  91. package/es/timeline/index.js +8 -8
  92. package/es/tooltip/index.js +8 -8
  93. package/es/transfer/index.js +8 -8
  94. package/es/tree/index.js +8 -8
  95. package/es/tree-select/index.js +8 -8
  96. package/es/upload/index.js +8 -8
  97. package/es/verification-code/index.js +2 -2
  98. package/lib/cui.common.js +2106 -1304
  99. package/lib/cui.umd.js +2106 -1304
  100. package/lib/cui.umd.min.js +48 -48
  101. package/package.json +1 -1
  102. package/packages/big-table/index.js +4 -0
  103. package/packages/big-table/src/BigTable.vue +6 -8
  104. package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +81 -7
  105. package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +63 -7
  106. package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +21 -0
  107. package/packages/big-table/src/utils/headerFilter.js +2 -1
  108. package/packages/card-reader-sdk/src/cardReaderSDK.js +12 -0
  109. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +4 -1
  110. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +12 -8
  111. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +137 -49
  112. package/packages/fabric-chart/src/mixins/drawExtracorporealCirculation.js +2 -6
  113. package/packages/fabric-chart/src/utils/index.js +9 -1
  114. package/packages/full-calendar/src/FullCalendar.vue +16 -11
  115. package/packages/full-calendar/src/components/ListTag.vue +6 -4
  116. package/packages/grid/src/grid.js +2 -3
  117. package/packages/table-filter/src/base-search-com/BaseSearch.vue +27 -4
  118. package/packages/table-filter/src/components/render-widget/enums.js +39 -16
  119. package/packages/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +245 -31
  120. package/packages/table-filter/src/components/render-widget/index.vue +7 -4
  121. package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +38 -11
  122. package/packages/table-filter/src/mixins/mixins.js +10 -8
  123. package/packages/table-filter/src/mixins/renderWidget.js +2 -2
  124. package/packages/table-filter/src/quick-search/QuickSearch.vue +26 -4
@@ -14,6 +14,8 @@ import DropPopup from '../components/DropPopup';
14
14
  import MouseRightClick from '../components/MouseRightClick';
15
15
  import eventCommon from '../mixins/eventCommon';
16
16
  import Bus from '../utils/bus';
17
+ import { cloneDeep } from 'lodash';
18
+ import { sortByTime } from '../utils';
17
19
 
18
20
  const rightClickNode = [
19
21
  { name: '修改', type: 'edit' },
@@ -65,6 +67,8 @@ export default {
65
67
  }
66
68
  },
67
69
  data() {
70
+ this.markData = sortByTime(cloneDeep(this.templateData.bottom?.list));
71
+ this.markObjs = [];
68
72
  return {
69
73
  leftStartX: 0,
70
74
  isDropVisible: false,
@@ -101,7 +105,7 @@ export default {
101
105
  // this.canvas.renderAll();
102
106
  if (this.templateData.bottom) {
103
107
  this.drawExtracorporealCirculation();
104
- this.drawBottomTextDataGroup(this.templateData.bottom);
108
+ this.drawBottomTextDataGroup();
105
109
  }
106
110
  },
107
111
  drawBorder() {
@@ -322,29 +326,33 @@ export default {
322
326
  };
323
327
  const left = this.computedX(v.time);
324
328
  title.dataList.push(left);
325
- const icon = await this.createPoint(_icon.type, {
326
- originX: 'center',
327
- left,
328
- ...item.style,
329
- ...(item.style ? { stroke: item.style.fill } : {}),
330
- ...(_icon.style || {}),
331
- ...commonOptions
332
- });
329
+ const icon =
330
+ !Reflect.has(_icon, 'show') || _icon.show
331
+ ? await this.createPoint(_icon.type, {
332
+ originX: 'center',
333
+ left,
334
+ ...item.style,
335
+ ...(item.style ? { stroke: item.style.fill } : {}),
336
+ ...(_icon.style || {}),
337
+ ...commonOptions
338
+ })
339
+ : null;
340
+ const iconHalfWidth = icon ? icon.width / 2 : 0;
333
341
  const text = new this.fabric.Text(String(v.value), {
334
342
  ...defaultVaule.style,
335
343
  ...defaultVaule.textStyle,
336
344
  ...item.style,
337
- left: left + icon.width / 2,
345
+ left: left + iconHalfWidth,
338
346
  name: v.value,
339
347
  ...commonOptions
340
348
  });
341
- const groupObj = new this.fabric.Group([icon, text], {
349
+ const groupObj = new this.fabric.Group(icon ? [icon, text] : [text], {
342
350
  id: `${index}_${i}_other_${Date.now()}`,
343
351
  lockMovementY: true,
344
352
  ...commonOptions,
345
353
  ...this.eventStyle,
346
354
  realLeft: left,
347
- iconHalfWidth: icon.width / 2
355
+ iconHalfWidth
348
356
  });
349
357
  if (prevPoint) {
350
358
  prevPoint.nextPoint = groupObj;
@@ -455,23 +463,19 @@ export default {
455
463
  return time >= minTime && time <= maxTime;
456
464
  },
457
465
  removeMark() {
458
- this.canvas.forEachObject(obj => {
459
- if (obj.type && obj.type === 'mark') {
460
- this.canvas.remove(obj);
461
- }
462
- });
466
+ this.markObjs.forEach(obj => this.canvas.remove(obj));
463
467
  },
464
- // 底部标记
465
- drawBottomTextDataGroup(obj) {
468
+ drawTopTotalLineAndTitle() {
469
+ const { bottom: obj, left: leftData } = this.templateData;
466
470
  const { endX, originX, endY, topTotal, markHeight } = this.propItems;
467
- if (!markHeight || !obj.list) {
471
+ if (!topTotal.width) {
468
472
  return;
469
473
  }
470
474
 
471
- topTotal.width && this.canvas.add(this.drawLine([endX, endY - 1, endX, endY + markHeight], { ...this.defaultRectStyle }));
472
- topTotal.width && this.canvas.add(this.drawLine([originX, endY + markHeight, endX, endY + markHeight], { ...this.defaultRectStyle }));
473
- // const textList = [];
474
- const marginLeft = this.templateData.left.leftYScalevalue.spaceGridNumber || defaultVaule.spaceGridNumber;
475
+ const line1 = this.drawLine([endX, endY - 1, endX, endY + markHeight], { ...this.defaultRectStyle });
476
+ const line2 = this.drawLine([originX, endY + markHeight, endX, endY + markHeight], { ...this.defaultRectStyle });
477
+
478
+ const marginLeft = leftData.leftYScalevalue.spaceGridNumber || defaultVaule.spaceGridNumber;
475
479
  const left = originX - marginLeft * 4; // 默认减去4倍的左边距,防止最左边的数据与名称显示重合了
476
480
  const title = new this.fabric.Text(String(obj.title), {
477
481
  ...defaultVaule.style,
@@ -483,43 +487,75 @@ export default {
483
487
  top: endY + markHeight / 2,
484
488
  type: 'mark'
485
489
  });
486
- this.canvas.add(title);
487
- // textList.push(title);
490
+ this.markObjs.push(title, line1, line2);
491
+ this.canvas.add(title, line1, line2);
492
+ },
493
+ // 底部标记
494
+ drawBottomTextDataGroup() {
495
+ const { bottom: obj } = this.templateData;
496
+ const { originX, endY, markHeight, xCellWidth } = this.propItems;
497
+ if (!markHeight || !this.markData?.length) {
498
+ return;
499
+ }
500
+ if (this.markObjs.length) {
501
+ [...this.markObjs].forEach(obj => this.canvas.remove(obj));
502
+ this.markObjs = [];
503
+ }
504
+
505
+ this.drawTopTotalLineAndTitle();
506
+
488
507
  const _endY = this.extracorporealCirculationHeight ? endY + this.extracorporealCirculationHeight : endY;
489
508
  const baseY = _endY + 2; // 目前固定10像素的下边距
490
509
  const baseYLimit = endY - 2; // 目前固定10像素的上边距
491
510
  const lineHeightText = (obj.style?.fontSize || 12) + 2;
492
511
  const lineHeightImg = (obj.iconStyle?.height || 12) + 2;
493
512
  const lineHeightSeq = (obj.seqStyle?.circle?.radius || 9) * 2 + 2;
513
+ let prevLeft = originX;
514
+ let prevCondition;
515
+ const pointerObj = {};
494
516
 
495
- const setTop = (lineHeight, i, condition) => {
517
+ const setTop = (item, lineHeight, i, condition) => {
518
+ let _lineHeight = lineHeight;
519
+ if (item.desc && obj.showDesc) {
520
+ _lineHeight = lineHeight + lineHeightText;
521
+ }
496
522
  if (!~condition.limitIndex) {
497
- condition.y += i === 0 ? lineHeight / 2 : lineHeight;
498
- if (condition.y >= endY + markHeight - lineHeight / 2) {
523
+ condition.y += i === 0 ? _lineHeight / 2 : _lineHeight;
524
+ if (condition.y >= endY + markHeight - _lineHeight / 2) {
499
525
  condition.limitIndex++;
500
526
  if (condition.limitIndex === 0) {
501
527
  condition.y = baseYLimit;
502
- condition.y -= lineHeight / 2;
528
+ condition.y -= _lineHeight / 2;
503
529
  }
504
530
  }
505
531
  } else {
506
- condition.y -= lineHeight;
532
+ condition.y -= _lineHeight;
507
533
  }
508
- return condition.y;
534
+ const y = condition.y;
535
+ let y1,
536
+ y2 = y;
537
+ if (item.desc && obj.showDesc) {
538
+ y1 = y + _lineHeight / 2 - lineHeight - lineHeightText / 2;
539
+ y2 = y + _lineHeight / 2 - lineHeight / 2;
540
+ }
541
+ return { y1, y2 };
509
542
  };
510
- obj.list.forEach((item, index) => {
543
+ this.markData.forEach((item, index) => {
511
544
  const condition = {
512
545
  limitIndex: -1, // 标志点是否往上排列的标志,大于-1则表示需要往上排列
513
546
  y: baseY
514
547
  };
515
548
  const x = this.computedX(item[0]);
549
+ // 相隔小于或等于一个小格的宽度就继承上个时间标记的高度继续计算定位,即错位显示
550
+ const prevHasBelowShow = pointerObj[`x_${prevLeft}`]?.some(o => o > endY);
551
+ if (x - prevLeft <= xCellWidth && prevHasBelowShow) {
552
+ Object.assign(condition, prevCondition);
553
+ }
516
554
  if (this.isLimit(item[0])) {
517
555
  const pointList = [];
556
+ pointerObj[`x_${x}`] = [];
518
557
  item[1].forEach(async (v, i) => {
519
558
  const common = {
520
- left: x,
521
- originX: 'center',
522
- originY: 'center',
523
559
  data: v.data || {},
524
560
  other: v.other || {},
525
561
  time: item[0],
@@ -528,29 +564,37 @@ export default {
528
564
  objectCaching: false
529
565
  };
530
566
 
567
+ let conditionRes;
531
568
  if (this.isObject(v) && !v.value) {
532
- common.top = setTop(lineHeightImg, i, condition);
533
- const option = {
534
- ...obj.iconStyle,
535
- ...v,
536
- ...common
537
- };
538
- pointList.push(this.drawMarkPoint(v, option, obj));
569
+ conditionRes = setTop(v, lineHeightImg, i, condition);
570
+ pointList.push(this.drawMarkPoint(v, common, obj, conditionRes, x));
539
571
  } else if (v.value) {
540
572
  if (v.seq) {
541
- common.top = setTop(lineHeightSeq, i, condition);
542
- pointList.push(this.drawMarkPoint(v, common, obj));
573
+ conditionRes = setTop(v, lineHeightSeq, i, condition);
574
+ pointList.push(this.drawMarkPoint(v, common, obj, conditionRes, x));
543
575
  } else {
544
- common.top = setTop(lineHeightText, i, condition);
545
- pointList.push(this.drawMarkPoint(v, common, obj));
576
+ conditionRes = setTop(v, lineHeightText, i, condition);
577
+ pointList.push(this.drawMarkPoint(v, common, obj, conditionRes, x));
546
578
  }
547
579
  }
580
+ pointerObj[`x_${x}`].push(conditionRes.y2);
581
+ });
582
+ prevLeft = x;
583
+ prevCondition = condition;
584
+ Promise.all(pointList).then(res => {
585
+ this.markObjs.push(...res);
586
+ this.canvas.add(...res);
548
587
  });
549
- Promise.all(pointList).then(res => this.canvas.add(...res));
550
588
  }
551
589
  });
552
590
  },
553
- async drawMarkPoint(v, option, obj) {
591
+ async drawMarkPoint(v, option, obj, { y1, y2 }, x) {
592
+ const positionObj = {
593
+ left: x,
594
+ originX: 'center',
595
+ originY: 'center',
596
+ top: y2
597
+ };
554
598
  let point;
555
599
  const eventStyle = !this.eventStyle.evented
556
600
  ? {
@@ -565,6 +609,9 @@ export default {
565
609
  }
566
610
  point = await this.createPoint(v?.url || v?.iconClassName ? 'img' : v.type, {
567
611
  ele: ele || '',
612
+ ...positionObj,
613
+ ...obj.iconStyle,
614
+ ...v,
568
615
  ...option,
569
616
  ...eventStyle
570
617
  });
@@ -572,6 +619,7 @@ export default {
572
619
  if (v.seq) {
573
620
  // 标记增加序号
574
621
  const circle = await this.createPoint('circle', {
622
+ ...positionObj,
575
623
  ...option,
576
624
  radius: 5,
577
625
  strokeWidth: 1,
@@ -581,10 +629,12 @@ export default {
581
629
  });
582
630
  const text = new this.fabric.Text(String(v.value), {
583
631
  ...defaultVaule.textStyle,
632
+ ...positionObj,
584
633
  ...option,
585
634
  ...(obj.seqStyle?.text || {})
586
635
  });
587
636
  point = await new this.fabric.Group([circle, text], {
637
+ ...positionObj,
588
638
  ...option,
589
639
  ...eventStyle
590
640
  });
@@ -592,11 +642,27 @@ export default {
592
642
  point = await new this.fabric.Text(String(v.value), {
593
643
  ...defaultVaule.textStyle,
594
644
  ...obj.style,
645
+ ...positionObj,
595
646
  ...option,
596
647
  ...eventStyle
597
648
  });
598
649
  }
599
650
  }
651
+ if (y1) {
652
+ const descPoint = new this.fabric.Text(String(v.desc), {
653
+ ...defaultVaule.textStyle,
654
+ ...positionObj,
655
+ ...option,
656
+ ...obj.style,
657
+ top: y1
658
+ });
659
+ point = await new this.fabric.Group([descPoint, point], {
660
+ ...option,
661
+ left: x,
662
+ originX: 'center',
663
+ ...eventStyle
664
+ });
665
+ }
600
666
 
601
667
  point.hasControls = point.hasBorders = false;
602
668
  this.pointEvent(point);
@@ -620,9 +686,31 @@ export default {
620
686
  newVal: this.getXValue(point.left)
621
687
  };
622
688
  this.$emit('markChange', value);
689
+ this.updateMarkData(value);
690
+ this.drawBottomTextDataGroup();
691
+ this.canvas.discardActiveObject();
623
692
  });
624
693
  }
625
694
  },
695
+ updateMarkData({ data, newVal }) {
696
+ const id = data.id;
697
+ let listIndex, index;
698
+ listIndex = this.markData.findIndex(v => {
699
+ const i = v[1].findIndex(k => k.data?.id === id);
700
+ i > -1 && (index = i);
701
+ return i > -1;
702
+ });
703
+ const obj = this.markData[listIndex][1].splice(index, 1)[0];
704
+ const newIndex = this.markData.findIndex(v => v[0] === newVal);
705
+ if (!~newIndex) {
706
+ this.markData.push([newVal, [obj]]);
707
+ } else {
708
+ this.markData[newIndex][1].push(obj);
709
+ }
710
+ const emptyIndex = this.markData.findIndex(v => v[1].length === 0);
711
+ !!~emptyIndex && this.markData.splice(emptyIndex, 1);
712
+ sortByTime(this.markData);
713
+ },
626
714
  moveLimit(point) {
627
715
  point.setCoords();
628
716
  const { originX, endX, originY, endY, markHeight } = this.propItems;
@@ -155,13 +155,9 @@ export default {
155
155
  this.$emit('extracorporealCirculationChange', params);
156
156
  const { index, key, data } = params;
157
157
  this.extracorporealCirculation.list[index][key] = data;
158
- this.drawExtracorporealCirculation(this.extracorporealCirculation);
158
+ this.drawExtracorporealCirculation();
159
159
  this.canvas.discardActiveObject();
160
- this.canvas.forEachObject(obj => {
161
- if (obj.type && obj.type === 'mark') {
162
- obj.bringForward();
163
- }
164
- });
160
+ this.markObjs.forEach(obj => obj.bringForward());
165
161
  });
166
162
  }
167
163
  },
@@ -9,7 +9,7 @@ export function getTangent(angle) {
9
9
  return +Math.tan((angle * Math.PI) / 180);
10
10
  }
11
11
 
12
- function nearlyEqual(v1, v2) {
12
+ export function nearlyEqual(v1, v2) {
13
13
  return Math.abs(v1 - v2) <= 0.0001;
14
14
  }
15
15
 
@@ -79,3 +79,11 @@ export function getIntersectionPoint(a, b, c, d) {
79
79
  // 否则不相交
80
80
  return false;
81
81
  }
82
+
83
+ export function sortByTime(list = []) {
84
+ list.sort((a, b) => {
85
+ return Date.parse(a[0]) - Date.parse(b[0]);
86
+ });
87
+
88
+ return list;
89
+ }
@@ -473,7 +473,7 @@ export default create({
473
473
  });
474
474
  </script>
475
475
  <style lang="less" scoped>
476
- @primary-color: #2d7aff;
476
+ @main-color: #2563f4;
477
477
 
478
478
  .c-full-calendar {
479
479
  position: relative;
@@ -527,7 +527,7 @@ export default create({
527
527
  align-items: center;
528
528
  flex: 0 0 66px;
529
529
  padding: 0 5px;
530
- background: #f7f7f7;
530
+ background: #fff;
531
531
  .header-left {
532
532
  color: #212121;
533
533
  span {
@@ -543,19 +543,19 @@ export default create({
543
543
  border: 1px solid #d9d9d9;
544
544
  cursor: pointer;
545
545
  &:hover {
546
- color: #2d7aff;
546
+ color: @main-color;
547
547
  background: rgba(36, 116, 255, 0.1);
548
548
  border-color: rgba(36, 116, 255, 0.2);
549
549
  i {
550
- color: #2d7aff;
550
+ color: @main-color;
551
551
  }
552
552
  }
553
553
  &:active {
554
- color: #2d7aff;
554
+ color: @main-color;
555
555
  background: rgba(36, 116, 255, 0.2);
556
- border-color: #2d7aff;
556
+ border-color: @main-color;
557
557
  i {
558
- color: #2d7aff;
558
+ color: @main-color;
559
559
  }
560
560
  }
561
561
  &.disabled {
@@ -580,7 +580,7 @@ export default create({
580
580
  box-shadow: 1px 0 0 0 rgba(36, 116, 255, 0.2);
581
581
  }
582
582
  &:active {
583
- box-shadow: 1px 0 0 0 #2d7aff;
583
+ box-shadow: 1px 0 0 0 @main-color;
584
584
  }
585
585
  }
586
586
  .btn-next {
@@ -629,6 +629,10 @@ export default create({
629
629
  overflow-y: auto;
630
630
  box-sizing: border-box;
631
631
 
632
+ .fc-timegrid-divider {
633
+ display: none;
634
+ }
635
+
632
636
  .fc-header-toolbar {
633
637
  margin-bottom: 0;
634
638
  }
@@ -641,6 +645,7 @@ export default create({
641
645
 
642
646
  .fc-col-header-cell-cushion {
643
647
  font-weight: normal;
648
+ color: @main-color;
644
649
  & > span {
645
650
  padding: 10px 0;
646
651
  display: inline-block;
@@ -716,9 +721,9 @@ export default create({
716
721
  }
717
722
  }
718
723
  .fc-day-today .week-header {
719
- color: @primary-color;
724
+ color: @main-color;
720
725
  .week-day {
721
- color: @primary-color;
726
+ color: @main-color;
722
727
  }
723
728
  }
724
729
 
@@ -755,7 +760,7 @@ export default create({
755
760
  background-color: #f2f7ff;
756
761
  .fc-daygrid-day-number {
757
762
  color: #fff;
758
- background-color: #2d7aff;
763
+ background-color: @main-color;
759
764
  border-radius: 50%;
760
765
  }
761
766
  }
@@ -113,6 +113,8 @@ export default {
113
113
  };
114
114
  </script>
115
115
  <style lang="less" scoped>
116
+ @main-color: #2563f4;
117
+
116
118
  .list-tag {
117
119
  width: 100%;
118
120
  height: 100%;
@@ -136,19 +138,19 @@ export default {
136
138
  }
137
139
  &.active {
138
140
  .list-day {
139
- color: @primary-color;
141
+ color: @main-color;
140
142
  background: rgba(36, 116, 255, 0.1);
141
143
  }
142
144
  }
143
145
  &.curday {
144
146
  .list-day {
145
147
  color: #fff;
146
- background: @primary-color;
148
+ background: @main-color;
147
149
  &:hover {
148
- background: @primary-color;
150
+ background: @main-color;
149
151
  }
150
152
  }
151
- color: @primary-color;
153
+ color: @main-color;
152
154
  }
153
155
  .list-day {
154
156
  width: 36px;
@@ -6,10 +6,9 @@
6
6
  import Vue from 'vue';
7
7
  import 'xe-utils';
8
8
  import VXETable from 'vxe-table';
9
- import VXETablePluginAntd from 'vxe-table-plugin-antd'
9
+ import VXETablePluginAntd from 'vxe-table-plugin-antd';
10
10
  import Grid from 'vxe-table/lib/grid';
11
- // import 'vxe-table/lib/style.css';
12
- import 'vxe-table-plugin-antd/dist/style.css'
11
+ import 'vxe-table-plugin-antd/dist/style.css';
13
12
 
14
13
  VXETable.use(VXETablePluginAntd);
15
14
  import create from '@/core/create';
@@ -234,8 +234,12 @@
234
234
  <!-- 平铺按钮列表 -->
235
235
  <template v-for="(item, j) in rowTileBtnList">
236
236
  <!-- v-if="item.type == 'ADD'" -->
237
- <li ref="rowTileBtnItem" class="rowTileBtn-item 123" :key="item.sid" v-if="showLi(item)" :data-key="item.sid" data-source="rowTile">
238
- <template v-if="item.type == 'ADD' || item.type == 'BATCH'">
237
+ <li ref="rowTileBtnItem" class="rowTileBtn-item" :key="item.sid" v-if="showLi(item)" :data-key="item.sid" data-source="rowTile">
238
+ <template v-if="isFrontendComponent(item) && !item.isHide">
239
+ <!-- 读卡 -->
240
+ <slot name="frontendComponent" v-bind="$attrs" :curBtn="item"></slot>
241
+ </template>
242
+ <template v-else-if="item.type == 'ADD' || item.type == 'BATCH'">
239
243
  <a-button
240
244
  v-preventReClick="preventReTime"
241
245
  v-show="visibleBtn(item) && !item.isHide"
@@ -314,7 +318,13 @@
314
318
  <a-dropdown overlayClassName="baseSearch-fold-dropdown" v-show="!isInlineOperating">
315
319
  <a-menu slot="overlay">
316
320
  <template v-for="(b, j) in rowFoldBtnList">
317
- <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-if="showLiAdd(b)" @click="showDrawer(b, j)">
321
+ <template v-if="isFrontendComponent(b)">
322
+ <a-sub-menu v-if="visibleBtn(b)" :title="b.alias || b.name" :key="b.sid">
323
+ <!-- 读卡 -->
324
+ <slot name="frontendComponent" v-bind="$attrs" comType="submenu" :curBtn="b"></slot>
325
+ </a-sub-menu>
326
+ </template>
327
+ <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-else-if="showLiAdd(b)" @click="showDrawer(b, j)">
318
328
  {{ b.alias || b.name }}
319
329
  <getBtnIcon :data="b" :btnObj="btnObj" />
320
330
  </a-menu-item>
@@ -340,7 +350,13 @@
340
350
  <a-menu-item-group :key="key" v-if="showRowFoldBtnList(value.list)">
341
351
  <template slot="title"></template>
342
352
  <template v-for="(b, j) in value.list">
343
- <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-if="b.type == 'ADD'" @click="showDrawer(b, j)">
353
+ <template v-if="isFrontendComponent(b)">
354
+ <a-sub-menu v-if="visibleBtn(b)" :title="b.alias || b.name" :key="b.sid">
355
+ <!-- 读卡 -->
356
+ <slot name="frontendComponent" v-bind="$attrs" comType="submenu" :curBtn="b"></slot>
357
+ </a-sub-menu>
358
+ </template>
359
+ <a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-else-if="b.type == 'ADD'" @click="showDrawer(b, j)">
344
360
  {{ b.alias || b.name }}
345
361
  <getBtnIcon :data="b" :btnObj="btnObj" />
346
362
  </a-menu-item>
@@ -930,6 +946,13 @@ export default create({
930
946
  this.tabIndex = index;
931
947
  if (index !== -1) this.$emit('tabClick', this.tabConditionList[index]);
932
948
  },
949
+ isFrontendComponent(item){
950
+ if(item.type !== 'ADD') return false;
951
+ if(Array.isArray(item.settingObj)) {
952
+ return item.settingObj[0]?.trigger_type === 'FRONTEND_COMPONENT'
953
+ }
954
+ return item.settingObj?.trigger_type === 'FRONTEND_COMPONENT'
955
+ },
933
956
  pageResize(obj) {
934
957
  if (this.resizeFlag || this.visibleInlineOperateBtn || this.isRowEditing) return;
935
958
  let baseLeft = this.$refs['baseLeft'];
@@ -17,20 +17,43 @@ export const WidgetTypeEnums = {
17
17
  export const DatePresetValEnums = {
18
18
  CUSTOM: 'CUSTOM', // 自定义输入,特殊处理
19
19
 
20
- NOW: 'NOW',
21
- TODAY: 'TODAY',
22
- TODAY_START: 'TODAY_START',
23
- TODAY_END: 'TODAY_END',
24
- TOMORROW: 'TOMORROW',
25
- TOMORROW_START: 'TOMORROW_START',
26
- TOMORROW_END: 'TOMORROW_END',
27
- YESTERDAY: 'YESTERDAY',
28
- YESTERDAY_START: 'YESTERDAY_START',
29
- YESTERDAY_END: 'YESTERDAY_END',
30
-
31
- WEEK_START: 'THIS_WEEK_START',
32
- WEEK_END: 'THIS_WEEK_END',
33
-
34
- MONTH_START: 'THIS_MONTH_START',
35
- MONTH_END: 'THIS_MONTH_END'
20
+ NOW: 'NOW', // 当前
21
+ TODAY: 'TODAY', // 今天
22
+ TODAY_START: 'TODAY_START', // 今天初
23
+ TODAY_END: 'TODAY_END', // 今天未
24
+
25
+ TOMORROW: 'TOMORROW', // 明天
26
+ TOMORROW_START: 'TOMORROW_START', // 明天初
27
+ TOMORROW_END: 'TOMORROW_END', // 明天未
28
+
29
+ YESTERDAY: 'YESTERDAY', // 昨天
30
+ YESTERDAY_START: 'YESTERDAY_START', // 昨天初
31
+ YESTERDAY_END: 'YESTERDAY_END', // 昨天未
32
+
33
+ THIS_WEEK: 'THIS_WEEK', // 本周
34
+ WEEK_START: 'THIS_WEEK_START', // 本周初
35
+ WEEK_END: 'THIS_WEEK_END', // 本周未
36
+ NEXT_WEEK: 'NEXT_WEEK', // 下周
37
+ LAST_WEEK: 'LAST_WEEK', // 上周
38
+ PAST_WEEK: 'PAST_WEEK', // 近一周(7天)
39
+
40
+ THIS_MONTH: 'THIS_MONTH', // 本月
41
+ MONTH_START: 'THIS_MONTH_START', // 本月初
42
+ MONTH_END: 'THIS_MONTH_END', // 本月未
43
+ NEXT_MONTH: 'NEXT_MONTH', // 下月
44
+ LAST_MONTH: 'LAST_MONTH', // 上月
45
+ PAST_MONTH: 'PAST_MONTH', // 近一个月(30天)
46
+
47
+ THIS_QUARTER: 'THIS_QUARTER', // 本季度
48
+ NEXT_QUARTER: 'NEXT_QUARTER', // 上季度
49
+ LAST_QUARTER: 'LAST_QUARTER', // 下季度
50
+ QUARTER_START: 'THIS_QUARTER_START', // 季度初
51
+ QUARTER_END: 'THIS_QUARTER_END', // 季度未
52
+
53
+ THIS_YEAR: 'THIS_YEAR', // 今年
54
+ YEAR_START: 'THIS_YEAR_START', // 今年初
55
+ YEAR_END: 'THIS_YEAR_END', // 今年未
56
+ NEXT_YEAR: 'NEXT_YEAR', // 明年
57
+ LAST_YEAR: 'LAST_YEAR', // 去年
58
+ PAST_HALF_YEAR: 'PAST_HALF_YEAR' // 近半年(182天)
36
59
  };