cnhis-design-vue 2.1.125 → 2.1.126
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 +27 -13
- 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 +71 -71
- 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 +157 -63
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +74 -74
- package/es/full-calendar/index.js +52 -52
- package/es/full-calendar/style.css +1 -1
- package/es/grid/index.js +12 -1
- package/es/index/index.js +627 -529
- 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 +9 -9
- 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 +507 -390
- package/lib/cui.umd.js +507 -390
- package/lib/cui.umd.min.js +51 -51
- package/package.json +2 -2
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +65 -17
- package/packages/fabric-chart/src/mixins/drawExtracorporealCirculation.js +2 -6
- package/packages/fabric-chart/src/utils/index.js +8 -0
- package/packages/full-calendar/src/FullCalendar.vue +16 -11
- package/packages/full-calendar/src/components/ListTag.vue +6 -4
- package/packages/grid/src/grid.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.126",
|
|
4
4
|
"description": "前端业务UI库",
|
|
5
5
|
"keyword": "cnhis-design-vue vue cnhis",
|
|
6
6
|
"homepage": "http://dv.cnhis.com/",
|
|
@@ -114,4 +114,4 @@
|
|
|
114
114
|
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
}
|
|
117
|
+
}
|
|
@@ -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(
|
|
108
|
+
this.drawBottomTextDataGroup();
|
|
105
109
|
}
|
|
106
110
|
},
|
|
107
111
|
drawBorder() {
|
|
@@ -459,23 +463,19 @@ export default {
|
|
|
459
463
|
return time >= minTime && time <= maxTime;
|
|
460
464
|
},
|
|
461
465
|
removeMark() {
|
|
462
|
-
this.
|
|
463
|
-
if (obj.type && obj.type === 'mark') {
|
|
464
|
-
this.canvas.remove(obj);
|
|
465
|
-
}
|
|
466
|
-
});
|
|
466
|
+
this.markObjs.forEach(obj => this.canvas.remove(obj));
|
|
467
467
|
},
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
drawTopTotalLineAndTitle() {
|
|
469
|
+
const { bottom: obj, left: leftData } = this.templateData;
|
|
470
470
|
const { endX, originX, endY, topTotal, markHeight } = this.propItems;
|
|
471
|
-
if (!
|
|
471
|
+
if (!topTotal.width) {
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
const marginLeft =
|
|
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;
|
|
479
479
|
const left = originX - marginLeft * 4; // 默认减去4倍的左边距,防止最左边的数据与名称显示重合了
|
|
480
480
|
const title = new this.fabric.Text(String(obj.title), {
|
|
481
481
|
...defaultVaule.style,
|
|
@@ -487,14 +487,31 @@ export default {
|
|
|
487
487
|
top: endY + markHeight / 2,
|
|
488
488
|
type: 'mark'
|
|
489
489
|
});
|
|
490
|
-
this.
|
|
491
|
-
|
|
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
|
+
|
|
492
507
|
const _endY = this.extracorporealCirculationHeight ? endY + this.extracorporealCirculationHeight : endY;
|
|
493
508
|
const baseY = _endY + 2; // 目前固定10像素的下边距
|
|
494
509
|
const baseYLimit = endY - 2; // 目前固定10像素的上边距
|
|
495
510
|
const lineHeightText = (obj.style?.fontSize || 12) + 2;
|
|
496
511
|
const lineHeightImg = (obj.iconStyle?.height || 12) + 2;
|
|
497
512
|
const lineHeightSeq = (obj.seqStyle?.circle?.radius || 9) * 2 + 2;
|
|
513
|
+
let prevLeft = originX;
|
|
514
|
+
let prevCondition;
|
|
498
515
|
|
|
499
516
|
const setTop = (lineHeight, i, condition) => {
|
|
500
517
|
if (!~condition.limitIndex) {
|
|
@@ -511,12 +528,16 @@ export default {
|
|
|
511
528
|
}
|
|
512
529
|
return condition.y;
|
|
513
530
|
};
|
|
514
|
-
|
|
531
|
+
this.markData.forEach((item, index) => {
|
|
515
532
|
const condition = {
|
|
516
533
|
limitIndex: -1, // 标志点是否往上排列的标志,大于-1则表示需要往上排列
|
|
517
534
|
y: baseY
|
|
518
535
|
};
|
|
519
536
|
const x = this.computedX(item[0]);
|
|
537
|
+
// 相隔小于或等于一个小格的宽度就继承上个时间标记的高度继续计算定位,即错位显示
|
|
538
|
+
if (x - prevLeft <= xCellWidth) {
|
|
539
|
+
Object.assign(condition, prevCondition);
|
|
540
|
+
}
|
|
520
541
|
if (this.isLimit(item[0])) {
|
|
521
542
|
const pointList = [];
|
|
522
543
|
item[1].forEach(async (v, i) => {
|
|
@@ -550,7 +571,12 @@ export default {
|
|
|
550
571
|
}
|
|
551
572
|
}
|
|
552
573
|
});
|
|
553
|
-
|
|
574
|
+
prevLeft = x;
|
|
575
|
+
prevCondition = condition;
|
|
576
|
+
Promise.all(pointList).then(res => {
|
|
577
|
+
this.markObjs.push(...res);
|
|
578
|
+
this.canvas.add(...res);
|
|
579
|
+
});
|
|
554
580
|
}
|
|
555
581
|
});
|
|
556
582
|
},
|
|
@@ -624,9 +650,31 @@ export default {
|
|
|
624
650
|
newVal: this.getXValue(point.left)
|
|
625
651
|
};
|
|
626
652
|
this.$emit('markChange', value);
|
|
653
|
+
this.updateMarkData(value);
|
|
654
|
+
this.drawBottomTextDataGroup();
|
|
655
|
+
this.canvas.discardActiveObject();
|
|
627
656
|
});
|
|
628
657
|
}
|
|
629
658
|
},
|
|
659
|
+
updateMarkData({ data, newVal }) {
|
|
660
|
+
const id = data.id;
|
|
661
|
+
let listIndex, index;
|
|
662
|
+
listIndex = this.markData.findIndex(v => {
|
|
663
|
+
const i = v[1].findIndex(k => k.data?.id === id);
|
|
664
|
+
i > -1 && (index = i);
|
|
665
|
+
return i > -1;
|
|
666
|
+
});
|
|
667
|
+
const obj = this.markData[listIndex][1].splice(index, 1)[0];
|
|
668
|
+
const newIndex = this.markData.findIndex(v => v[0] === newVal);
|
|
669
|
+
if (!~newIndex) {
|
|
670
|
+
this.markData.push([newVal, [obj]]);
|
|
671
|
+
} else {
|
|
672
|
+
this.markData[newIndex][1].push(obj);
|
|
673
|
+
}
|
|
674
|
+
const emptyIndex = this.markData.findIndex(v => v[1].length === 0);
|
|
675
|
+
!!~emptyIndex && this.markData.splice(emptyIndex, 1);
|
|
676
|
+
sortByTime(this.markData);
|
|
677
|
+
},
|
|
630
678
|
moveLimit(point) {
|
|
631
679
|
point.setCoords();
|
|
632
680
|
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(
|
|
158
|
+
this.drawExtracorporealCirculation();
|
|
159
159
|
this.canvas.discardActiveObject();
|
|
160
|
-
this.
|
|
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
|
},
|
|
@@ -473,7 +473,7 @@ export default create({
|
|
|
473
473
|
});
|
|
474
474
|
</script>
|
|
475
475
|
<style lang="less" scoped>
|
|
476
|
-
@
|
|
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: #
|
|
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:
|
|
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:
|
|
550
|
+
color: @main-color;
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
&:active {
|
|
554
|
-
color:
|
|
554
|
+
color: @main-color;
|
|
555
555
|
background: rgba(36, 116, 255, 0.2);
|
|
556
|
-
border-color:
|
|
556
|
+
border-color: @main-color;
|
|
557
557
|
i {
|
|
558
|
-
color:
|
|
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
|
|
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: @
|
|
724
|
+
color: @main-color;
|
|
720
725
|
.week-day {
|
|
721
|
-
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:
|
|
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: @
|
|
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: @
|
|
148
|
+
background: @main-color;
|
|
147
149
|
&:hover {
|
|
148
|
-
background: @
|
|
150
|
+
background: @main-color;
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
|
-
color: @
|
|
153
|
+
color: @main-color;
|
|
152
154
|
}
|
|
153
155
|
.list-day {
|
|
154
156
|
width: 36px;
|
|
@@ -8,6 +8,7 @@ import 'xe-utils';
|
|
|
8
8
|
import VXETable from 'vxe-table';
|
|
9
9
|
import VXETablePluginAntd from 'vxe-table-plugin-antd';
|
|
10
10
|
import Grid from 'vxe-table/lib/grid';
|
|
11
|
+
import 'vxe-table/lib/style.css';
|
|
11
12
|
import 'vxe-table-plugin-antd/dist/style.css';
|
|
12
13
|
|
|
13
14
|
VXETable.use(VXETablePluginAntd);
|