cnhis-design-vue 2.1.34 → 2.1.35

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 (112) hide show
  1. package/CHANGELOG.md +28 -9
  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 +86 -86
  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/carousel/index.js +8 -8
  19. package/es/cascader/index.js +8 -8
  20. package/es/checkbox/index.js +9 -9
  21. package/es/col/index.js +8 -8
  22. package/es/collapse/index.js +8 -8
  23. package/es/color-picker/index.js +1 -1
  24. package/es/comment/index.js +8 -8
  25. package/es/config-provider/index.js +8 -8
  26. package/es/date-picker/index.js +8 -8
  27. package/es/descriptions/index.js +8 -8
  28. package/es/divider/index.js +8 -8
  29. package/es/drag-layout/index.js +3 -3
  30. package/es/drawer/index.js +8 -8
  31. package/es/dropdown/index.js +8 -8
  32. package/es/editor/index.js +1 -1
  33. package/es/empty/index.js +8 -8
  34. package/es/fabric-chart/index.js +545 -2355
  35. package/es/fabric-chart/style.css +1 -1
  36. package/es/form/index.js +8 -8
  37. package/es/form-model/index.js +8 -8
  38. package/es/form-table/index.js +62 -62
  39. package/es/index/index.js +1117 -2909
  40. package/es/index/style.css +1 -1
  41. package/es/input/index.js +9 -9
  42. package/es/input-number/index.js +8 -8
  43. package/es/layout/index.js +8 -8
  44. package/es/list/index.js +8 -8
  45. package/es/locale-provider/index.js +8 -8
  46. package/es/map/index.js +9 -9
  47. package/es/mentions/index.js +8 -8
  48. package/es/menu/index.js +8 -8
  49. package/es/message/index.js +8 -8
  50. package/es/multi-chat/index.js +75 -75
  51. package/es/multi-chat-client/index.js +69 -69
  52. package/es/multi-chat-history/index.js +4 -4
  53. package/es/multi-chat-record/index.js +14 -14
  54. package/es/multi-chat-setting/index.js +22 -22
  55. package/es/multi-chat-sip/index.js +1 -1
  56. package/es/notification/index.js +8 -8
  57. package/es/page-header/index.js +8 -8
  58. package/es/pagination/index.js +8 -8
  59. package/es/popconfirm/index.js +8 -8
  60. package/es/popover/index.js +8 -8
  61. package/es/progress/index.js +8 -8
  62. package/es/radio/index.js +9 -9
  63. package/es/rate/index.js +8 -8
  64. package/es/result/index.js +8 -8
  65. package/es/row/index.js +8 -8
  66. package/es/scale-view/index.js +33 -33
  67. package/es/select/index.js +11 -11
  68. package/es/select-label/index.js +11 -11
  69. package/es/select-person/index.js +2 -2
  70. package/es/shortcut-setter/index.js +10 -10
  71. package/es/skeleton/index.js +8 -8
  72. package/es/slider/index.js +8 -8
  73. package/es/space/index.js +8 -8
  74. package/es/spin/index.js +8 -8
  75. package/es/statistic/index.js +8 -8
  76. package/es/steps/index.js +8 -8
  77. package/es/switch/index.js +8 -8
  78. package/es/table-filter/index.js +84 -73
  79. package/es/table-filter/style.css +1 -1
  80. package/es/tabs/index.js +8 -8
  81. package/es/tag/index.js +9 -9
  82. package/es/time-picker/index.js +8 -8
  83. package/es/timeline/index.js +8 -8
  84. package/es/tooltip/index.js +8 -8
  85. package/es/transfer/index.js +8 -8
  86. package/es/tree/index.js +8 -8
  87. package/es/tree-select/index.js +8 -8
  88. package/es/upload/index.js +8 -8
  89. package/es/verification-code/index.js +2 -2
  90. package/lib/cui.common.js +911 -2767
  91. package/lib/cui.umd.js +911 -2767
  92. package/lib/cui.umd.min.js +29 -29
  93. package/package.json +2 -1
  94. package/packages/big-table/src/components/AutoLayoutButton.vue +3 -3
  95. package/packages/fabric-chart/src/FabricChart.vue +0 -17
  96. package/packages/fabric-chart/src/FabricGrid.vue +3 -10
  97. package/packages/fabric-chart/src/components/TimeScaleValue.vue +10 -8
  98. package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
  99. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +2 -22
  100. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +41 -34
  101. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +5 -6
  102. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +21 -16
  103. package/packages/fabric-chart/src/mixins/draw.js +2 -1
  104. package/packages/fabric-chart/src/mixins/fabricCommon.js +14 -4
  105. package/packages/scale-view/scaleView.vue +2010 -2010
  106. package/packages/table-filter/src/base-search-com/BaseSearch.vue +9 -0
  107. package/packages/fabric-chart/src/fabric-chart2/FabricBottom.vue +0 -108
  108. package/packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue +0 -181
  109. package/packages/fabric-chart/src/fabric-chart2/FabricCenter.vue +0 -612
  110. package/packages/fabric-chart/src/fabric-chart2/FabricLeft.vue +0 -104
  111. package/packages/fabric-chart/src/fabric-chart2/FabricRight.vue +0 -112
  112. package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +0 -172
@@ -1,104 +0,0 @@
1
- <script>
2
- import fabricCommon from '../mixins/fabricCommon';
3
- import defaultVaule from '../const/defaultVaule';
4
-
5
- export default {
6
- name: 'fabric-left2',
7
- mixins: [fabricCommon],
8
- props: {
9
- templateData: {
10
- type: Object,
11
- required: true
12
- }
13
- },
14
- data() {
15
- return {};
16
- },
17
- computed: {
18
- defaultTextStyle() {
19
- return {
20
- ...defaultVaule.style,
21
- ...defaultVaule.textStyle,
22
- centeredRotation: true,
23
- originX: 'center',
24
- originY: 'center'
25
- };
26
- }
27
- },
28
- mounted() {
29
- this.$nextTick(() => {
30
- this.init();
31
- });
32
- },
33
- methods: {
34
- init() {
35
- this.leftScaleValue(this.templateData.left);
36
- this.canvas.renderAll();
37
- },
38
- leftScaleValue(left) {
39
- let groupList = [];
40
- const { originX, originY, endY, yCellHeight } = this.propItems;
41
- const column = left.leftYScalevalue.length;
42
- const colWidth = originX / column;
43
- const residue = originX % column;
44
- const firstColWidth = colWidth + residue;
45
- left.leftYScalevalue.forEach((item, index) => {
46
- let list = [];
47
- // 刻度外框
48
- const rectWidth = index === 0 ? firstColWidth : colWidth;
49
- const rectLeft = index === 0 ? 0 : firstColWidth + (index - 1) * colWidth;
50
- const line =
51
- index > 0
52
- ? new this.fabric.Line([rectLeft, originY, rectLeft, endY], {
53
- ...defaultVaule.style,
54
- ...defaultVaule.borderStyle
55
- })
56
- : null;
57
- line && list.push(line);
58
-
59
- const leftVal = rectLeft + rectWidth / 2;
60
-
61
- // 刻度列表
62
- item.list.forEach((v, i) => {
63
- const top = endY - i * yCellHeight * left.spaceGridNumber;
64
- const text = this.createText(v, leftVal, i === 0 ? top - 5 : top, 'center', item.style);
65
- list.push(text);
66
- });
67
-
68
- // 添加标题和单位
69
- let title = item.name || '';
70
- if (item.unit) title += '\n' + item.unit;
71
- title && list.push(this.createText(title, leftVal, originY + (yCellHeight * left.spaceGridNumber) / 2, 'center', { ...item.style, textAlign: 'center' }));
72
- const group = new this.fabric.Group(list, defaultVaule.style);
73
- groupList.push(group);
74
- });
75
- // 外框
76
- groupList.push(
77
- new this.fabric.Rect({
78
- ...defaultVaule.style,
79
- ...defaultVaule.rectStyle,
80
- width: originX,
81
- height: endY - originY,
82
- left: 0,
83
- top: originY
84
- })
85
- );
86
- const group = groupList.length > 0 ? new this.fabric.Group([...groupList], { ...defaultVaule.style }) : null;
87
- group && group.sendToBack(); // 向下跳底层
88
- group && this.canvas.add(group);
89
- },
90
- createText(text, left, top, originX, style) {
91
- return new this.fabric.Text(String(text), {
92
- ...this.defaultTextStyle,
93
- left,
94
- top,
95
- originX,
96
- ...style
97
- });
98
- }
99
- },
100
- render(h) {
101
- return this.$slots.default ? h('div', this.$slots.default) : undefined;
102
- }
103
- };
104
- </script>
@@ -1,112 +0,0 @@
1
- <script>
2
- import fabricCommon from '../mixins/fabricCommon';
3
- import defaultVaule from '../const/defaultVaule';
4
-
5
- export default {
6
- name: 'fabric-right2',
7
- mixins: [fabricCommon],
8
- props: {
9
- templateData: {
10
- type: Object,
11
- required: true
12
- }
13
- },
14
- data() {
15
- return {};
16
- },
17
- computed: {
18
- defaultTextStyle() {
19
- return {
20
- ...defaultVaule.style,
21
- ...defaultVaule.textStyle,
22
- centeredRotation: true,
23
- originX: 'center',
24
- originY: 'center'
25
- };
26
- }
27
- },
28
- mounted() {
29
- this.$nextTick(() => {
30
- this.init();
31
- });
32
- },
33
- methods: {
34
- init() {
35
- this.rightScaleValue(this.templateData.right || null);
36
- this.canvas.renderAll();
37
- },
38
- rightScaleValue(right) {
39
- const { endX, endY, centigradeYCell, canvasWidth, canvasHeight } = this.propItems;
40
- if (!right) {
41
- this.canvas.add(new this.fabric.Line([canvasWidth - 1, 0, canvasWidth - 1, canvasHeight], defaultVaule.borderStyle));
42
- return false;
43
- }
44
- let list = [];
45
- // 华氏度外框
46
- list.push(
47
- new this.fabric.Rect({
48
- ...defaultVaule.style,
49
- ...defaultVaule.rectStyle,
50
- width: canvasWidth - endX - 1,
51
- height: canvasHeight - 1,
52
- left: endX,
53
- top: 0
54
- })
55
- );
56
-
57
- // 华氏度列表,目前是整数列表(33℃对应91℉,所以存在误差),如果是正对应的如33℃对应91.4℉则不需要计算difVal和spaceHVaule和spaceHVaule0
58
- const difVal = 6;
59
- const spaceScaleNumber = right.rightYScalevalue.spaceScaleNumber || 5;
60
- const mainScaleWidth = 9;
61
- const subScaleWidth = 5;
62
- const cList = this.templateData.left.leftYScalevalue.find(v => v.type === 'centigrade').list; // 左侧摄氏度温度list
63
- const minC = Math.min(...cList); // 左侧温度刻度最小值
64
- const h1 = right.rightYScalevalue.list[1];
65
- const h0 = right.rightYScalevalue.list[0];
66
- const c1 = (5 * (h1 - 32)) / 9;
67
- const c0 = (5 * (h0 - 32)) / 9;
68
- const top1 = endY - (c1 - minC) * centigradeYCell - difVal;
69
- const top0 = endY - (c0 - minC) * centigradeYCell - difVal;
70
- const spaceHVaule = (top0 - top1) / spaceScaleNumber; // 每华氏度之间的间隔高度值
71
- let endTop; // 记录最上一个刻度数的高度值,用于计算单位的高度
72
- right.rightYScalevalue.list.forEach((v, i) => {
73
- const c = (5 * (v - 32)) / 9; // 华氏转换为摄氏,此为固定公式
74
- const top = endY - (c - minC) * centigradeYCell - difVal; // 存在6px的误差,因为比如34℃=93.2华氏度而不是93华氏度
75
- if (i === right.rightYScalevalue.list.length - 1) endTop = top;
76
- const text = this.createText(`${v}°`, endX + mainScaleWidth, i === 0 ? endY - 5 : top, 'left', right.rightYScalevalue.style);
77
- list.push(text);
78
- // 刻度横线
79
- const spaceHVaule0 = (endY - top1) / spaceScaleNumber; // 第一个-每华氏度之间的间隔高度值
80
- for (let k = 0; k < spaceScaleNumber; k++) {
81
- const scaleTop = i === 0 ? endY - k * spaceHVaule0 : top - k * spaceHVaule;
82
- const line = new this.fabric.Line([endX, scaleTop, k > 0 ? endX + subScaleWidth : endX + mainScaleWidth, scaleTop], { ...defaultVaule.borderStyle });
83
- list.push(line);
84
- }
85
- });
86
-
87
- // 单位
88
- const width = canvasWidth - endX;
89
- const unit = right.rightYScalevalue.unit
90
- ? this.createText(right.rightYScalevalue.unit.split('').join('\n'), endX + width / 2, endTop / 2, 'center', right.rightYScalevalue.style)
91
- : null;
92
- unit && list.push(unit);
93
-
94
- const group = list.length > 0 ? new this.fabric.Group([...list], { ...defaultVaule.style }) : null;
95
- group && group.sendToBack(); // 向下跳底层
96
- group && this.canvas.add(group);
97
- },
98
- createText(text, left, top, originX, style) {
99
- return new this.fabric.Text(String(text), {
100
- ...this.defaultTextStyle,
101
- left,
102
- top,
103
- originX,
104
- ...style
105
- });
106
- }
107
- },
108
- render(h) {
109
- return this.$slots.default ? h('div', this.$slots.default) : undefined;
110
- }
111
- };
112
- </script>
@@ -1,172 +0,0 @@
1
- <script>
2
- import fabricCommon from '../mixins/fabricCommon';
3
- import draw from '../mixins/draw';
4
- import defaultVaule from '../const/defaultVaule';
5
-
6
- export default {
7
- name: 'fabric-top2',
8
- mixins: [fabricCommon, draw],
9
- props: {
10
- templateData: {
11
- type: Object,
12
- required: true
13
- }
14
- },
15
- data() {
16
- return {};
17
- },
18
- mounted() {
19
- this.$nextTick(() => {
20
- this.init();
21
- });
22
- },
23
- computed: {
24
- girdLineStyle() {
25
- return Object.assign({}, defaultVaule.borderStyle, this.templateData.borderStyle || {});
26
- }
27
- },
28
- methods: {
29
- init() {
30
- this.drawTop(this.templateData.top);
31
- this.canvas.renderAll();
32
- },
33
- drawTop(top) {
34
- let list = [];
35
- // 日期
36
- this.drawTopDate(top, list);
37
- // 上午/下午
38
- this.drawTopDay(top, list);
39
- // 时间刻度
40
- this.drawTopTime(top, list);
41
- const group = list.length > 0 ? new this.fabric.Group([...list], { ...defaultVaule.style }) : null;
42
- group && group.sendToBack(); // 向下跳底层
43
- group && this.canvas.add(group);
44
- },
45
- drawTopTime(top, list) {
46
- const { originX, originY, xCellWidth, table } = this.propItems;
47
- const dateHeight = top.date?.height || 0;
48
- const dayHeight = top.dayHeight || 0;
49
- const height = originY - dateHeight - dayHeight;
50
- const titleHeight = dayHeight + height;
51
- // 标题
52
- const title = this.drawTextGroup(
53
- {
54
- width: originX,
55
- height: titleHeight,
56
- ...defaultVaule.rectStyle
57
- },
58
- {
59
- text: String(top.xScalevalue.title),
60
- ...defaultVaule.textStyle,
61
- ...top.textGroupStyle
62
- },
63
- {
64
- left: 0,
65
- top: dateHeight
66
- }
67
- );
68
- list.push(title);
69
-
70
- // 时间列表
71
- let timeList = [];
72
- for (let j = 0; j < table.mainXCell; j++) {
73
- timeList.push(top.xScalevalue.list);
74
- }
75
- timeList.flat().forEach((v, i) => {
76
- const left = originX + i * xCellWidth;
77
- const textGroup = this.drawTextGroup(
78
- {
79
- width: xCellWidth,
80
- height
81
- },
82
- {
83
- text: String(v),
84
- ...defaultVaule.textStyle,
85
- ...top.textGroupStyle
86
- },
87
- {
88
- left,
89
- top: dateHeight + dayHeight
90
- }
91
- );
92
- list.push(textGroup);
93
- });
94
- },
95
- drawTopDay(top, list) {
96
- if (!top.dayHeight) return false;
97
- const { originX, xCellWidth, gridXNumber, table } = this.propItems;
98
- const height = top.dayHeight;
99
- // 上午下午列表
100
- const width = xCellWidth * table.subSecondXCell;
101
- const dayList = gridXNumber / table.subSecondXCell;
102
- for (let i = 0; i < dayList; i++) {
103
- const left = originX + i * width;
104
- const value = i % 2 === 0 ? '上午' : '下午';
105
- const textGroup = this.drawTextGroup(
106
- {
107
- width,
108
- height
109
- },
110
- {
111
- text: String(value),
112
- ...defaultVaule.textStyle,
113
- ...top.textGroupStyle
114
- },
115
- {
116
- left,
117
- top: top.date.height || 0
118
- }
119
- );
120
- list.push(textGroup);
121
- }
122
- },
123
- drawTopDate(top, list) {
124
- if (!top.date.height) return false;
125
- const { originX, xCellWidth, table } = this.propItems;
126
- const height = top.date.height;
127
- // 标题
128
- const title = this.drawTextGroup(
129
- {
130
- width: originX,
131
- height,
132
- ...defaultVaule.rectStyle
133
- },
134
- {
135
- text: String(top.date.title),
136
- ...defaultVaule.textStyle,
137
- ...top.textGroupStyle
138
- },
139
- {
140
- left: 0,
141
- top: 0
142
- }
143
- );
144
- list.push(title);
145
- // 日期列表
146
- const width = xCellWidth * table.subXCell;
147
- top.date.list.forEach((v, i) => {
148
- const left = originX + i * width;
149
- const textGroup = this.drawTextGroup(
150
- {
151
- width,
152
- height
153
- },
154
- {
155
- text: String(v),
156
- ...defaultVaule.textStyle,
157
- ...top.textGroupStyle
158
- },
159
- {
160
- left,
161
- top: 0
162
- }
163
- );
164
- list.push(textGroup);
165
- });
166
- }
167
- },
168
- render(h) {
169
- return this.$slots.default ? h('div', this.$slots.default) : undefined;
170
- }
171
- };
172
- </script>