cnhis-design-vue 2.1.122 → 2.1.125

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 (110) hide show
  1. package/CHANGELOG.md +33 -11
  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 +1629 -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 +1 -1
  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 +81 -50
  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 +4 -4
  42. package/es/grid/index.js +0 -1
  43. package/es/index/index.js +1238 -959
  44. package/es/index/style.css +1 -1
  45. package/es/input/index.js +9 -9
  46. package/es/input-number/index.js +8 -8
  47. package/es/layout/index.js +8 -8
  48. package/es/list/index.js +8 -8
  49. package/es/locale-provider/index.js +8 -8
  50. package/es/map/index.js +9 -9
  51. package/es/mentions/index.js +8 -8
  52. package/es/menu/index.js +8 -8
  53. package/es/message/index.js +8 -8
  54. package/es/multi-chat/index.js +76 -76
  55. package/es/multi-chat-client/index.js +70 -70
  56. package/es/multi-chat-history/index.js +4 -4
  57. package/es/multi-chat-record/index.js +14 -14
  58. package/es/multi-chat-setting/index.js +22 -22
  59. package/es/multi-chat-sip/index.js +1 -1
  60. package/es/notification/index.js +8 -8
  61. package/es/page-header/index.js +8 -8
  62. package/es/pagination/index.js +8 -8
  63. package/es/popconfirm/index.js +8 -8
  64. package/es/popover/index.js +8 -8
  65. package/es/progress/index.js +8 -8
  66. package/es/radio/index.js +9 -9
  67. package/es/rate/index.js +8 -8
  68. package/es/result/index.js +8 -8
  69. package/es/row/index.js +8 -8
  70. package/es/scale-container/index.js +386 -385
  71. package/es/scale-view/index.js +27 -27
  72. package/es/select/index.js +12 -12
  73. package/es/select-label/index.js +11 -11
  74. package/es/select-person/index.js +2 -2
  75. package/es/select-tag/index.js +4 -4
  76. package/es/shortcut-setter/index.js +10 -10
  77. package/es/skeleton/index.js +8 -8
  78. package/es/slider/index.js +8 -8
  79. package/es/slider-tree/index.js +9 -9
  80. package/es/space/index.js +8 -8
  81. package/es/spin/index.js +8 -8
  82. package/es/statistic/index.js +8 -8
  83. package/es/steps/index.js +8 -8
  84. package/es/switch/index.js +8 -8
  85. package/es/table-filter/index.js +65 -65
  86. package/es/tabs/index.js +8 -8
  87. package/es/tag/index.js +9 -9
  88. package/es/time-picker/index.js +8 -8
  89. package/es/timeline/index.js +8 -8
  90. package/es/tooltip/index.js +8 -8
  91. package/es/transfer/index.js +8 -8
  92. package/es/tree/index.js +8 -8
  93. package/es/tree-select/index.js +8 -8
  94. package/es/upload/index.js +8 -8
  95. package/es/verification-code/index.js +2 -2
  96. package/lib/cui.common.js +1458 -1118
  97. package/lib/cui.umd.js +1458 -1118
  98. package/lib/cui.umd.min.js +75 -75
  99. package/package.json +2 -2
  100. package/packages/big-table/index.js +4 -0
  101. package/packages/big-table/src/BigTable.vue +6 -8
  102. package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +81 -7
  103. package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +63 -7
  104. package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +21 -0
  105. package/packages/button/src/ButtonPrint/js/print.es.min.js +3 -3
  106. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +4 -1
  107. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +12 -8
  108. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +15 -11
  109. package/packages/fabric-chart/src/utils/index.js +1 -1
  110. package/packages/grid/src/grid.js +2 -3
@@ -14,6 +14,7 @@ import MouseRightClick from '../components/MouseRightClick';
14
14
  import DropPopup from '../components/DropPopup';
15
15
  import defaultVaule from '../const/defaultVaule';
16
16
  import Bus from '../utils/bus';
17
+ import { nearlyEqual } from '../utils';
17
18
 
18
19
  /**
19
20
  * @description: 递归遍历节点,设置颜色属性
@@ -609,7 +610,7 @@ export default {
609
610
  * @param {polylineIndex} 当前折线 index
610
611
  */
611
612
  drawPolyline(polyline, polylineIndex, polylineType, polylineTypeId) {
612
- const { originY, endY } = this.propItems;
613
+ const { originY, endY, xCellWidth, table } = this.propItems;
613
614
  const { list = [], critical = {}, diffValue = {} } = polyline;
614
615
 
615
616
  const pointList = [];
@@ -648,7 +649,10 @@ export default {
648
649
  let line;
649
650
  let point;
650
651
  let previousLine;
651
- line = points && nextPoint && !linePoints.data?.breakpoint ? this.drawLine([...points, ...nextPoint], { polylineIndex, polylineTypeId, lineIndex: index, ...lineAttr }) : null;
652
+ line =
653
+ !points || !nextPoint || linePoints.data?.breakpoint || (table.breakpoint && nextPoint[0] - points[0] > xCellWidth)
654
+ ? null
655
+ : this.drawLine([...points, ...nextPoint], { polylineIndex, polylineTypeId, lineIndex: index, ...lineAttr });
652
656
  previousLine = lineList[index - 1];
653
657
  const pointOthers = { polylineTypeId, polylineIndex, pointIndex: index, ...pointAttr, lineAttr };
654
658
  if (points) {
@@ -876,8 +880,8 @@ export default {
876
880
  for (let i = 0, len = this.addPointList.length; i < len; i++) {
877
881
  const currentPoint = this.addPointList[i];
878
882
  const prevPoint = this.addPointList[i - 1] || { left: point.prePoint?.left ?? originLeft, top: point.prePoint?.top ?? originTop };
879
- const currentPointObj = this.addPointObjList.find(obj => obj.left === currentPoint.left);
880
- if (currentPointObj?.line1?.x1 !== prevPoint.left) {
883
+ const currentPointObj = this.addPointObjList.find(obj => nearlyEqual(obj.left, currentPoint.left));
884
+ if (!nearlyEqual(currentPointObj?.line1?.x1, prevPoint.left)) {
881
885
  currentPointObj?.line1?.set({
882
886
  x1: prevPoint.left,
883
887
  y1: prevPoint.top,
@@ -897,7 +901,7 @@ export default {
897
901
  if (k > 0) {
898
902
  const curLeft = originLeft + this.spaceWidth * k;
899
903
  // 判断this.addPointList中的left是否包含curLeft,不包含就说明是漏了
900
- const hasPoint = this.addPointList.some(p => Math.abs(p.left - curLeft) <= 0.001);
904
+ const hasPoint = this.addPointList.some(p => nearlyEqual(p.left, curLeft));
901
905
  // const hasPoint = this.addPointList.some(v => v.left == curLeft);
902
906
  if (!hasPoint) {
903
907
  let index;
@@ -940,7 +944,7 @@ export default {
940
944
  const currentLeft = left;
941
945
 
942
946
  const startLength = this.addPointList.length;
943
- const n = 6; // 拖动范围,在需要增加节点的刻度左右吸入的范围值
947
+ const n = Math.min(this.spaceWidth / 2, 6); // 拖动范围,在需要增加节点的刻度左右吸入的范围值
944
948
  const residue = (left - originLeft) % this.spaceWidth;
945
949
 
946
950
  const condition = residue > 0 && (residue > this.spaceWidth - n || residue < n);
@@ -961,7 +965,7 @@ export default {
961
965
  // point.line1 && this.removePolyline(point.line1.id);
962
966
  setPointLineColor(point, 'transparent', conditionHasLine2);
963
967
  this.addPointList.length == 0 && this.clonePoint(point, [point.line1 ? point.line1.x1 : originLeft, point.line1 ? point.line1.y1 : originTop, originLeft, originTop]);
964
- if (this.addPointList.every(v => v.left !== left)) {
968
+ if (this.addPointList.every(v => !nearlyEqual(v.left, left))) {
965
969
  // const points1 = i === 1 ? [originLeft, originTop] : point.prePoints;
966
970
  const points1 = this.addPointList.length == 0 ? [originLeft, originTop] : point.prePoints;
967
971
  if (points1) {
@@ -973,7 +977,7 @@ export default {
973
977
  data.left = left;
974
978
  data.top = top;
975
979
  // 避免重复添加
976
- if (this.addPointObjList.every(o => o.left !== left)) {
980
+ if (this.addPointObjList.every(o => !nearlyEqual(o.left, left))) {
977
981
  this.addPointList.push(data);
978
982
  this.clonePoint(point, [...points1, left, top]);
979
983
  }
@@ -322,29 +322,33 @@ export default {
322
322
  };
323
323
  const left = this.computedX(v.time);
324
324
  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
- });
325
+ const icon =
326
+ !Reflect.has(_icon, 'show') || _icon.show
327
+ ? await this.createPoint(_icon.type, {
328
+ originX: 'center',
329
+ left,
330
+ ...item.style,
331
+ ...(item.style ? { stroke: item.style.fill } : {}),
332
+ ...(_icon.style || {}),
333
+ ...commonOptions
334
+ })
335
+ : null;
336
+ const iconHalfWidth = icon ? icon.width / 2 : 0;
333
337
  const text = new this.fabric.Text(String(v.value), {
334
338
  ...defaultVaule.style,
335
339
  ...defaultVaule.textStyle,
336
340
  ...item.style,
337
- left: left + icon.width / 2,
341
+ left: left + iconHalfWidth,
338
342
  name: v.value,
339
343
  ...commonOptions
340
344
  });
341
- const groupObj = new this.fabric.Group([icon, text], {
345
+ const groupObj = new this.fabric.Group(icon ? [icon, text] : [text], {
342
346
  id: `${index}_${i}_other_${Date.now()}`,
343
347
  lockMovementY: true,
344
348
  ...commonOptions,
345
349
  ...this.eventStyle,
346
350
  realLeft: left,
347
- iconHalfWidth: icon.width / 2
351
+ iconHalfWidth
348
352
  });
349
353
  if (prevPoint) {
350
354
  prevPoint.nextPoint = groupObj;
@@ -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
 
@@ -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';