cnhis-design-vue 2.1.120 → 2.1.122

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 (49) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +23 -23
  4. package/es/button/index.js +2 -2
  5. package/es/captcha/index.js +3 -3
  6. package/es/card-reader-sdk/index.js +1 -1
  7. package/es/checkbox/index.js +1 -1
  8. package/es/color-picker/index.js +1 -1
  9. package/es/drag-layout/index.js +3 -3
  10. package/es/editor/index.js +1 -1
  11. package/es/ellipsis/index.js +1 -1
  12. package/es/fabric-chart/index.js +83 -44
  13. package/es/fabric-chart/style.css +1 -1
  14. package/es/form-table/index.js +20 -20
  15. package/es/full-calendar/index.js +114 -112
  16. package/es/full-calendar/style.css +1 -1
  17. package/es/index/index.js +367 -326
  18. package/es/index/style.css +1 -1
  19. package/es/input/index.js +1 -1
  20. package/es/map/index.js +1 -1
  21. package/es/multi-chat/index.js +25 -25
  22. package/es/multi-chat-client/index.js +19 -19
  23. package/es/multi-chat-history/index.js +4 -4
  24. package/es/multi-chat-record/index.js +4 -4
  25. package/es/multi-chat-setting/index.js +20 -20
  26. package/es/multi-chat-sip/index.js +1 -1
  27. package/es/radio/index.js +1 -1
  28. package/es/scale-container/index.js +1 -1
  29. package/es/scale-view/index.js +27 -27
  30. package/es/select/index.js +4 -4
  31. package/es/select-label/index.js +3 -3
  32. package/es/select-person/index.js +2 -2
  33. package/es/select-tag/index.js +4 -4
  34. package/es/shortcut-setter/index.js +2 -2
  35. package/es/slider-tree/index.js +1 -1
  36. package/es/table-filter/index.js +30 -30
  37. package/es/tag/index.js +1 -1
  38. package/es/verification-code/index.js +2 -2
  39. package/lib/cui.common.js +948 -898
  40. package/lib/cui.umd.js +948 -898
  41. package/lib/cui.umd.min.js +33 -33
  42. package/package.json +1 -1
  43. package/packages/fabric-chart/src/FabricChart.vue +4 -1
  44. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +3 -2
  45. package/packages/fabric-chart/src/mixins/drawExtracorporealCirculation.js +35 -5
  46. package/packages/full-calendar/src/FullCalendar.vue +29 -21
  47. package/packages/full-calendar/src/components/ListTag.vue +1 -1
  48. package/packages/full-calendar/src/components/Tag.vue +12 -8
  49. package/packages/full-calendar/src/components/TagDetail.vue +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.120",
3
+ "version": "2.1.122",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -2,7 +2,7 @@
2
2
  <div class="c-fabric-chart" :style="{ width: canvasWidth }">
3
3
  <fabric-canvas ref="canvasEle" v-bind="$attrs" :templateData="templateData" v-if="rendercanvas">
4
4
  <fabric-grid></fabric-grid>
5
- <fabric-text-group v-if="hasXScalevalue" :templateData="templateData" v-on="$listeners"></fabric-text-group>
5
+ <fabric-text-group ref="otherGroups" v-if="hasXScalevalue" :templateData="templateData" v-on="$listeners"></fabric-text-group>
6
6
  <fabric-scale-value v-if="hasTable" :templateData="templateData"></fabric-scale-value>
7
7
  <fabric-lines v-if="hasTopTable" ref="lines" :linesObj="templateData.top" v-on="$listeners"></fabric-lines>
8
8
  <fabric-polylines
@@ -113,6 +113,9 @@ export default create({
113
113
  repaintLine() {
114
114
  this.$refs.lines?.repaintLine();
115
115
  },
116
+ updateExtracorporealCirculation() {
117
+ this.$refs.otherGroups?.updateExtracorporealCirculation();
118
+ },
116
119
  toDataURL(option) {
117
120
  return this.$refs.canvasEle.toDataURL(option);
118
121
  },
@@ -100,7 +100,7 @@ export default {
100
100
  this.drawBorder();
101
101
  // this.canvas.renderAll();
102
102
  if (this.templateData.bottom) {
103
- this.drawExtracorporealCirculation(this.extracorporealCirculation);
103
+ this.drawExtracorporealCirculation();
104
104
  this.drawBottomTextDataGroup(this.templateData.bottom);
105
105
  }
106
106
  },
@@ -485,7 +485,8 @@ export default {
485
485
  });
486
486
  this.canvas.add(title);
487
487
  // textList.push(title);
488
- const baseY = endY + 2; // 目前固定10像素的下边距
488
+ const _endY = this.extracorporealCirculationHeight ? endY + this.extracorporealCirculationHeight : endY;
489
+ const baseY = _endY + 2; // 目前固定10像素的下边距
489
490
  const baseYLimit = endY - 2; // 目前固定10像素的上边距
490
491
  const lineHeightText = (obj.style?.fontSize || 12) + 2;
491
492
  const lineHeightImg = (obj.iconStyle?.height || 12) + 2;
@@ -1,16 +1,23 @@
1
1
  import cloneDeep from 'lodash/cloneDeep';
2
+ import vexutils, { moment } from '@/utils/vexutils';
2
3
 
3
4
  export default {
4
5
  name: 'drawExtracorporealCirculation',
5
6
  data() {
6
7
  this.extracorporealCirculation = cloneDeep(this.templateData.bottom?.extracorporealCirculation);
7
8
  this.extracorporealCirculationObjs = [];
9
+ this.extracorporealCirculationHeight = 0;
8
10
  return {};
9
11
  },
10
12
  components: {},
11
13
  methods: {
12
- drawExtracorporealCirculation(extracorporealCirculation) {
14
+ updateExtracorporealCirculation() {
15
+ this.extracorporealCirculation = cloneDeep(this.templateData.bottom?.extracorporealCirculation);
16
+ this.drawExtracorporealCirculation();
17
+ },
18
+ drawExtracorporealCirculation() {
13
19
  const { endX, originX, endY, markHeight, canvasWidth } = this.propItems;
20
+ const extracorporealCirculation = this.extracorporealCirculation;
14
21
  if (!markHeight || !extracorporealCirculation || !extracorporealCirculation.list?.length) {
15
22
  return;
16
23
  }
@@ -32,19 +39,26 @@ export default {
32
39
 
33
40
  let prevShadowBox;
34
41
  xList.forEach((x, i) => {
42
+ if (isInvalid(x)) return;
43
+
35
44
  const nextX = xList[i + 1];
36
45
  const prevX = xList[i - 1];
37
46
  if (isValid(x) || isValid(nextX)) {
38
47
  const x1 = isValid(x) ? x : originX;
39
- const x2 = isValid(nextX) ? nextX : endX;
48
+ const x2 = isValid(nextX) ? nextX : isInvalid(nextX) ? null : endX;
40
49
  const prevX1 = isValid(prevX) ? prevX : originX;
41
50
  const shadowBox = {};
42
- if (i < xList.length - 1) {
51
+ if (i < xList.length - 1 && x2) {
43
52
  shadowBox.params = [x1, x2, y2, [0, 2].includes(i) ? extracorporealCirculationStyle : ascendAortaStyle];
44
53
  shadowBox.shadowObjs = this.drawShadowBox(...shadowBox.params);
45
54
  }
46
55
  if (isValid(x)) {
47
56
  const key = getKey(i);
57
+ const currentTime = moment()
58
+ .clone()
59
+ .format('YYYY-MM-DD HH:mm');
60
+ const currentTimeX = this.computedX(currentTime);
61
+ const limitX2 = x < currentTimeX && isValid(currentTimeX) ? currentTimeX : x;
48
62
  const optLine = this.drawOptLine([x, endY, x, y2], {
49
63
  origin: {
50
64
  index,
@@ -53,7 +67,8 @@ export default {
53
67
  },
54
68
  limitX: {
55
69
  x1: i === 0 ? prevEndX ?? originX : prevX1,
56
- x2
70
+ x2: x2 || limitX2,
71
+ isCurrentTime: !x2 && index === list.length - 1
57
72
  },
58
73
  ...([1, 2, 3].includes(i) ? { leftShadowBox: prevShadowBox } : {}),
59
74
  ...([0, 1, 2].includes(i) ? { rightShadowBox: shadowBox } : {})
@@ -63,7 +78,7 @@ export default {
63
78
  prevLine = optLine;
64
79
  }
65
80
  if (i === 0 && prevLine) {
66
- prevLine.limitX.x2 = shadowBox.params[0];
81
+ prevLine.limitX.x2 = x1;
67
82
  }
68
83
  }
69
84
  prevShadowBox = shadowBox;
@@ -71,9 +86,16 @@ export default {
71
86
  });
72
87
  });
73
88
 
89
+ if (this.extracorporealCirculationObjs.length) {
90
+ this.extracorporealCirculationHeight = height;
91
+ }
92
+
74
93
  function isValid(x) {
75
94
  return x && x > 0 && x < canvasWidth;
76
95
  }
96
+ function isInvalid(x) {
97
+ return typeof x === 'undefined' || x === '';
98
+ }
77
99
  function getKey(i) {
78
100
  switch (i) {
79
101
  case 0:
@@ -108,6 +130,14 @@ export default {
108
130
  if (this.eventStyle.evented) {
109
131
  optLine.on('moving', () => {
110
132
  const { left, limitX } = optLine;
133
+ const { canvasWidth } = this.propItems;
134
+ const currentTime = moment()
135
+ .clone()
136
+ .format('YYYY-MM-DD HH:mm');
137
+ const currentTimeX = this.computedX(currentTime);
138
+ if (limitX.isCurrentTime && limitX.x2 < currentTimeX && currentTimeX > 0 && currentTimeX < canvasWidth) {
139
+ limitX.x2 = currentTimeX;
140
+ }
111
141
  if (left < limitX.x1) {
112
142
  optLine.setCoords().set({ x1: limitX.x1, x2: limitX.x1 });
113
143
  }
@@ -484,8 +484,8 @@ export default create({
484
484
  &__mask {
485
485
  position: absolute;
486
486
  z-index: 1;
487
- width: 100%;
488
- height: 100%;
487
+ width: calc(100% - 10px);
488
+ height: calc(100% - 10px);
489
489
  background-color: rgba(0, 0, 0, 0);
490
490
  }
491
491
  /deep/ .tag-detail-wrpper {
@@ -526,7 +526,7 @@ export default create({
526
526
  display: inline-flex;
527
527
  align-items: center;
528
528
  flex: 0 0 66px;
529
- padding: 0 15px;
529
+ padding: 0 5px;
530
530
  background: #f7f7f7;
531
531
  .header-left {
532
532
  color: #212121;
@@ -537,8 +537,8 @@ export default create({
537
537
  font-size: 12px;
538
538
  }
539
539
  .calendar-quick {
540
- height: 34px;
541
- line-height: 34px;
540
+ height: 32px;
541
+ line-height: 32px;
542
542
  padding: 0 14px;
543
543
  border: 1px solid #d9d9d9;
544
544
  cursor: pointer;
@@ -590,8 +590,8 @@ export default create({
590
590
  background: #ffffff; // 12
591
591
  }
592
592
  .time-title {
593
- margin-left: 16px;
594
- font-size: 18px;
593
+ margin-left: 10px;
594
+ font-size: 16px;
595
595
  }
596
596
  }
597
597
  .header-right {
@@ -601,7 +601,7 @@ export default create({
601
601
  .viewshow-wrap {
602
602
  display: inline-flex;
603
603
  align-items: center;
604
- height: 34px;
604
+ height: 32px;
605
605
  padding: 4px;
606
606
  color: #212121;
607
607
  border-radius: 6px;
@@ -611,7 +611,7 @@ export default create({
611
611
  display: inline-flex;
612
612
  align-items: center;
613
613
  height: 100%;
614
- padding: 4px 14px;
614
+ padding: 4px 10px;
615
615
  border-radius: 4px;
616
616
  cursor: pointer;
617
617
  &.active {
@@ -626,7 +626,7 @@ export default create({
626
626
  /deep/ .full-calendar__body {
627
627
  width: 100%;
628
628
  flex: 1;
629
- overflow-y: scroll;
629
+ overflow-y: auto;
630
630
  box-sizing: border-box;
631
631
 
632
632
  .fc-header-toolbar {
@@ -639,6 +639,14 @@ export default create({
639
639
  }
640
640
  }
641
641
 
642
+ .fc-col-header-cell-cushion {
643
+ font-weight: normal;
644
+ & > span {
645
+ padding: 10px 0;
646
+ display: inline-block;
647
+ }
648
+ }
649
+
642
650
  .fc-more-popover {
643
651
  background: #fff;
644
652
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
@@ -670,7 +678,6 @@ export default create({
670
678
  }
671
679
  .fc-daygrid-event {
672
680
  margin: 0;
673
- margin-bottom: 7px;
674
681
  }
675
682
  }
676
683
 
@@ -691,13 +698,15 @@ export default create({
691
698
  display: flex;
692
699
  flex-direction: column;
693
700
  justify-content: center;
694
- height: 71px;
695
- padding-top: 4px;
701
+ height: 60px;
702
+ padding-top: 3px;
696
703
  color: #212121;
697
704
  background: #fff;
698
705
  box-sizing: border-box;
706
+ font-weight: normal;
699
707
  .week-day {
700
708
  font-size: 30px;
709
+ font-weight: 500;
701
710
  }
702
711
  }
703
712
  .fc-day-past .week-header {
@@ -714,9 +723,9 @@ export default create({
714
723
  }
715
724
 
716
725
  .month-header {
717
- height: 71px;
718
- line-height: 71px;
719
- font-size: 16px;
726
+ padding: 10px 0;
727
+ font-size: 14px;
728
+ font-weight: normal;
720
729
  color: #212121;
721
730
  background: #fff;
722
731
  }
@@ -731,13 +740,12 @@ export default create({
731
740
  .fc-daygrid-day-top {
732
741
  flex-direction: row;
733
742
  .fc-daygrid-day-number {
734
- width: 26px;
735
- height: 26px;
736
- line-height: 26px;
743
+ width: 18px;
744
+ height: 18px;
745
+ line-height: 20px;
737
746
  color: #000;
738
- font-size: 19px;
747
+ font-size: 17px;
739
748
  text-align: center;
740
- padding: 4px;
741
749
  overflow: hidden;
742
750
  box-sizing: content-box;
743
751
  margin: 2px 0 0 2px;
@@ -9,7 +9,7 @@
9
9
  </div>
10
10
  <div class="list-tag__right">
11
11
  <div v-for="(item, index) in data.list" :key="index">
12
- <tag v-bind="$attrs" v-on="$listeners" :item="item" :title="item.title" :state="data.state" :avatar="item.avatar" :isAllDay="item.isAllDay"></tag>
12
+ <tag v-bind="$attrs" v-on="$listeners" :item="item" :title="item.title" :state="item.state" :avatar="item.avatar" :isAllDay="item.isAllDay"></tag>
13
13
  </div>
14
14
  </div>
15
15
  </li>
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div :class="['event-tag', 'event-tag-' + viewType, { 'event-tag--active': isActive }, { 'event-tag-allday': isAllDay }]" @click.stop="clickTag" ref="tagRef">
3
3
  <div :class="['event-tag__main', statusClass[state]]">
4
- <span class="event-tag__main__text-time" v-if="viewType === 'list'">{{ timeRange }}</span>
5
- <span class="event-tag__main__text-title">{{ title }}</span>
6
- <div :class="['right-operate', { 'right-operate-hasBtn': hasBtns }]">
4
+ <span :class="['event-tag__main__text-time', state == 2 ? 'text--deleted' : '']" v-if="viewType === 'list'">{{ timeRange }}</span>
5
+ <span :class="['event-tag__main__text-title', state == 2 ? 'text--deleted' : '']">{{ title }}</span>
6
+ <div :class="['right-operate', { 'right-operate-hasBtn': hasBtns }]" v-if="state != 2">
7
7
  <!-- <img :src="avatar" class="avatar-icon" alt="" /> -->
8
8
  <span class="calendar-quick-btn-wrap" v-if="hasBtns">
9
9
  <span v-for="btn in btns" :key="btn.type" @click.stop="() => clickListBtn(btn)" class="calendar-quick-btn">
@@ -42,10 +42,10 @@ export default {
42
42
  statusClass: ['done', 'undone'],
43
43
  isActive: false,
44
44
  btns: [
45
- {
46
- name: '新增',
47
- type: 'plus-square'
48
- },
45
+ // {
46
+ // name: '新增',
47
+ // type: 'plus-square'
48
+ // },
49
49
  {
50
50
  name: '编辑',
51
51
  type: 'form'
@@ -147,7 +147,7 @@ export default {
147
147
  border-color: rgba(130, 130, 130, 0.1);
148
148
  box-shadow: 0px 0px 3px 0px rgba(130, 130, 130, 0.3);
149
149
  border-radius: 2px;
150
- min-height: 20px;
150
+ min-height: 18px;
151
151
 
152
152
  .tag-detail-modal {
153
153
  display: none;
@@ -261,6 +261,10 @@ export default {
261
261
  overflow: hidden;
262
262
  white-space: nowrap;
263
263
  text-overflow: ellipsis;
264
+ &.text--deleted {
265
+ text-decoration: line-through;
266
+ color: #7f7f7f;
267
+ }
264
268
  }
265
269
  &__text-time {
266
270
  flex: 0 0 150px;
@@ -2,7 +2,7 @@
2
2
  <div class="tag-detail-wrpper">
3
3
  <div class="header">
4
4
  <p>日程详情</p>
5
- <div class="btn-wrap">
5
+ <div class="btn-wrap" v-if="item.state != 2">
6
6
  <span class="btn-item" v-for="btn in btns" :key="btn.type" @click.stop="() => clickListBtn(btn)">
7
7
  <a-icon v-if="btn.type === 'close'" :type="btn.type" :style="{ fontSize: '16px' }" />
8
8
  <a-tooltip v-else :title="btn.name" overlayClassName="tippy-tooltip">
@@ -50,10 +50,10 @@ export default {
50
50
  title: '',
51
51
  content: '',
52
52
  btns: [
53
- {
54
- name: '新增',
55
- type: 'plus-square'
56
- },
53
+ // {
54
+ // name: '新增',
55
+ // type: 'plus-square'
56
+ // },
57
57
  {
58
58
  name: '编辑',
59
59
  type: 'form'