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.
- package/CHANGELOG.md +33 -11
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +1629 -338
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +22 -22
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/card-reader-sdk/index.js +1 -1
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/direct/index.js +16 -16
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +81 -50
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +698 -697
- package/es/full-calendar/index.js +4 -4
- package/es/grid/index.js +0 -1
- package/es/index/index.js +1238 -959
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +76 -76
- package/es/multi-chat-client/index.js +70 -70
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +22 -22
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-container/index.js +386 -385
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +12 -12
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/slider-tree/index.js +9 -9
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +65 -65
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +1458 -1118
- package/lib/cui.umd.js +1458 -1118
- package/lib/cui.umd.min.js +75 -75
- package/package.json +2 -2
- package/packages/big-table/index.js +4 -0
- package/packages/big-table/src/BigTable.vue +6 -8
- package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +81 -7
- package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +63 -7
- package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +21 -0
- package/packages/button/src/ButtonPrint/js/print.es.min.js +3 -3
- package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +4 -1
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +12 -8
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +15 -11
- package/packages/fabric-chart/src/utils/index.js +1 -1
- 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 =
|
|
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
|
|
880
|
-
if (currentPointObj?.line1?.x1
|
|
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 =>
|
|
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
|
|
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
|
|
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 =
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
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 +
|
|
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
|
|
351
|
+
iconHalfWidth
|
|
348
352
|
});
|
|
349
353
|
if (prevPoint) {
|
|
350
354
|
prevPoint.nextPoint = groupObj;
|
|
@@ -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
|
-
|
|
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';
|