cnhis-design-vue 3.4.0-beta.56 → 3.4.0-beta.59

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.
@@ -1,4 +1,4 @@
1
- import { ref, computed, reactive, watch } from 'vue';
1
+ import { ref, reactive, watch } from 'vue';
2
2
  import { defaultBorderStyle } from '../useDraw.js';
3
3
  import '../../../../../shared/utils/fabricjs/index.js';
4
4
  import { format } from 'date-fns';
@@ -18,125 +18,77 @@ import { useNewBirthProcess } from './useNewBirthProcess.js';
18
18
 
19
19
  function useNewBirthProcessChart(canvas, props, emits, canvasRef, pointTipProps, pointMenuProps) {
20
20
  const redrawPoints = ref();
21
- const leftScales = computed(
22
- () => props.data.scaleValues.filter((item) => item.layout === "left" && item.show)
23
- );
24
- const rightScales = computed(
25
- () => props.data.scaleValues.filter((item) => item.layout === "right" && item.show)
26
- );
27
- const originX = computed(
28
- () => {
29
- var _a;
30
- return (_a = leftScales.value) == null ? void 0 : _a.reduce((width, item) => {
31
- width += item.width;
32
- return width;
33
- }, 0);
34
- }
35
- );
36
- const endX = computed(() => {
37
- var _a;
38
- const { width } = props.data;
39
- const rightScalesWidth = (_a = rightScales.value) == null ? void 0 : _a.reduce((width2, item) => {
40
- width2 += item.width;
41
- return width2;
42
- }, 0);
43
- return width - (rightScalesWidth || 15);
44
- });
45
- const gridXNumber = computed(() => props.data.grid.mainXCell || 20);
46
- const gridYNumber = computed(() => props.data.grid.mainYCell || 8);
47
- const xCellWidth = computed(() => {
48
- return (endX.value - originX.value) / gridXNumber.value;
49
- });
50
- const yCellHeight = computed(() => {
51
- var _a;
21
+ function buildDerived() {
22
+ var _a, _b, _c, _d, _e, _f, _g, _h;
23
+ const leftScales = props.data.scaleValues.filter((item) => item.layout === "left" && item.show);
24
+ const rightScales = props.data.scaleValues.filter((item) => item.layout === "right" && item.show);
25
+ const originX = leftScales == null ? void 0 : leftScales.reduce((width, item) => width + item.width, 0);
26
+ const rightScalesWidth = rightScales == null ? void 0 : rightScales.reduce((width, item) => width + item.width, 0);
27
+ const endX = props.data.width - (rightScalesWidth || 15);
28
+ const gridXNumber = props.data.grid.mainXCell || 20;
29
+ const gridYNumber = props.data.grid.mainYCell || 8;
30
+ const timeXAxisHeight = ((_b = (_a = leftScales.concat(rightScales)) == null ? void 0 : _a.length) != null ? _b : 0) > 0 ? 20 : 0;
52
31
  const { xAxis, height, other } = props.data;
53
- const xAxisNumber = Object.values(xAxis).reduce((num, item) => {
54
- if (item.show)
55
- num++;
56
- return num;
57
- }, 0);
58
- const hasAlertLine = ((_a = other == null ? void 0 : other.alertLineList.length) != null ? _a : 0) > 0;
59
- return (height - timeXAxisHeight.value) / (gridYNumber.value + xAxisNumber + (hasAlertLine ? 1 : 0));
60
- });
61
- const originY = computed(() => {
62
- var _a;
63
- const { xAxis, other } = props.data;
64
- const xAxisNumber = Object.values(xAxis).reduce((num, item) => {
65
- if (item.show && item.position === "top")
66
- num++;
67
- return num;
68
- }, 0);
69
- const hasAlertLine = ((_a = other == null ? void 0 : other.alertLineList.length) != null ? _a : 0) > 0;
70
- return yCellHeight.value * (xAxisNumber || hasAlertLine ? 1 : 0);
71
- });
72
- const endY = computed(() => {
73
- const { xAxis, height } = props.data;
74
- const xAxisNumber = Object.values(xAxis).reduce((num, item) => {
75
- if (item.show && item.position === "bottom")
76
- num++;
77
- return num;
78
- }, 0);
79
- return height - yCellHeight.value * xAxisNumber - timeXAxisHeight.value;
80
- });
81
- const timeXAxisHeight = computed(() => {
82
- const scalesList = leftScales.value.concat(rightScales.value);
83
- return (scalesList == null ? void 0 : scalesList.length) > 0 ? 20 : 0;
84
- });
85
- const startTime = computed(() => getTime(props.data.xAxis.time.startTime));
86
- const timeXCell = computed(() => {
32
+ const xAxisNumberAll = Object.values(xAxis).reduce((num, item) => item.show ? num + 1 : num, 0);
33
+ const hasAlertLine = ((_c = other == null ? void 0 : other.alertLineList.length) != null ? _c : 0) > 0;
34
+ const yCellHeight = (height - timeXAxisHeight) / (gridYNumber + xAxisNumberAll + (hasAlertLine ? 1 : 0));
35
+ const xAxisNumberTop = Object.values(xAxis).reduce(
36
+ (num, item) => item.show && item.position === "top" ? num + 1 : num,
37
+ 0
38
+ );
39
+ const originY = yCellHeight * (xAxisNumberTop || hasAlertLine ? 1 : 0);
40
+ const xAxisNumberBottom = Object.values(xAxis).reduce(
41
+ (num, item) => item.show && item.position === "bottom" ? num + 1 : num,
42
+ 0
43
+ );
44
+ const endY = height - yCellHeight * xAxisNumberBottom - timeXAxisHeight;
45
+ const xCellWidth = (endX - originX) / gridXNumber;
46
+ const startTime = getTime(props.data.xAxis.time.startTime);
87
47
  const { spaceValue, spaceGridNumber } = props.data.xAxis.time || {};
88
- return spaceValue * 60 * 60 * 1e3 / (xCellWidth.value * spaceGridNumber);
89
- });
90
- const extraTimeXAxisList = computed(() => {
91
- var _a, _b, _c;
92
- const scalesTimeList = (_c = (_b = (_a = leftScales.value.concat(rightScales.value)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data) == null ? void 0 : _c.map((item) => getTime(item.time));
48
+ const timeXCell = spaceValue * 60 * 60 * 1e3 / (xCellWidth * spaceGridNumber);
49
+ const scalesTimeList = ((_f = (_e = (_d = leftScales.concat(rightScales)) == null ? void 0 : _d[0]) == null ? void 0 : _e.data) == null ? void 0 : _f.map((item) => getTime(item.time))) || [];
93
50
  const min = Math.min(...scalesTimeList);
94
51
  let max = Math.min(Math.max(...scalesTimeList));
95
- const timesXCell = timeXCell.value * xCellWidth.value;
96
- const xCellTimeList = range(1, gridXNumber.value + 1).reduce(
97
- (timeList, cur, next) => timeList.concat(startTime.value + cur * timesXCell),
98
- [startTime.value]
52
+ const timesXCell = timeXCell * xCellWidth;
53
+ const xCellTimeList = range(1, gridXNumber + 1).reduce(
54
+ (timeList, cur) => timeList.concat(startTime + cur * timesXCell),
55
+ [startTime]
99
56
  );
100
- max = Math.min(max, last(xCellTimeList));
57
+ max = Math.min(max, (_g = last(xCellTimeList)) != null ? _g : max);
101
58
  const startIndx = xCellTimeList.findIndex((time) => Math.abs(time - min) < timesXCell);
102
59
  const endIndx = xCellTimeList.findIndex((time) => Math.abs(time - max) < timesXCell) + 1;
103
- return xCellTimeList.filter((time, idx) => idx >= startIndx && idx <= endIndx).map((time) => format(new Date(time), "yyyy-MM-dd HH:mm:ss"));
104
- });
105
- const cervixYCell = computed(() => {
106
- const { scaleValues } = props.data;
107
- const cervixItem = scaleValues.find((item) => item.key === "cervix");
108
- return yCellHeight.value / ((cervixItem == null ? void 0 : cervixItem.spaceValue) || 1);
109
- });
110
- const event = computed(() => {
111
- var _a;
112
- return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
113
- });
114
- const propItems = reactive({
115
- canvasWidth: props.data.width,
116
- canvasHeight: props.data.height,
117
- borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle || {} },
118
- selectionStyle: props.data.selectionStyle || {},
119
- grid: props.data.grid,
120
- other: props.data.other,
121
- originX: originX.value,
122
- endX: endX.value,
123
- originY: originY.value,
124
- endY: endY.value,
125
- xCellWidth: xCellWidth.value,
126
- yCellHeight: yCellHeight.value,
127
- gridXNumber: gridXNumber.value,
128
- gridYNumber: gridYNumber.value,
129
- xAxis: props.data.xAxis,
130
- leftScales: leftScales.value,
131
- rightScales: rightScales.value,
132
- startTime: startTime.value,
133
- timeXCell: timeXCell.value,
134
- cervixYCell: cervixYCell.value,
135
- scaleValues: props.data.scaleValues,
136
- timeXAxisHeight: timeXAxisHeight.value,
137
- extraTimeXAxisList: extraTimeXAxisList.value,
138
- event: event.value
139
- });
60
+ const extraTimeXAxisList = xCellTimeList.filter((time, idx) => idx >= startIndx && idx <= endIndx).map((time) => format(new Date(time), "yyyy-MM-dd HH:mm:ss"));
61
+ const cervixItem = props.data.scaleValues.find((item) => item.key === "cervix");
62
+ const cervixYCell = yCellHeight / ((cervixItem == null ? void 0 : cervixItem.spaceValue) || 1);
63
+ const event = ((_h = props.data.grid) == null ? void 0 : _h.event) || { selectable: true, evented: true, hovered: true };
64
+ return {
65
+ canvasWidth: props.data.width,
66
+ canvasHeight: props.data.height,
67
+ borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
68
+ selectionStyle: props.data.selectionStyle || {},
69
+ grid: props.data.grid,
70
+ other: props.data.other,
71
+ originX,
72
+ endX,
73
+ originY,
74
+ endY,
75
+ xCellWidth,
76
+ yCellHeight,
77
+ gridXNumber,
78
+ gridYNumber,
79
+ xAxis: props.data.xAxis,
80
+ leftScales,
81
+ rightScales,
82
+ startTime,
83
+ timeXCell,
84
+ cervixYCell,
85
+ scaleValues: props.data.scaleValues,
86
+ timeXAxisHeight,
87
+ extraTimeXAxisList,
88
+ event
89
+ };
90
+ }
91
+ const propItems = reactive(buildDerived());
140
92
  watch(
141
93
  () => canvas.value,
142
94
  (value) => {
@@ -1,10 +1,10 @@
1
- import { reactive, ref, computed, unref, onMounted, nextTick, onBeforeUnmount, watch, toRefs } from 'vue';
1
+ import { reactive, ref, onMounted, nextTick, onBeforeUnmount, watch, toRefs } from 'vue';
2
2
  import { useDialog } from 'naive-ui';
3
3
  import { defaultBorderStyle } from '../useDraw.js';
4
4
  import '../../../../../shared/utils/fabricjs/index.js';
5
5
  import { format } from 'date-fns';
6
6
  import { getChildrenSize } from '../../utils/index.js';
7
- import { cloneDeep, range, flatten, isFunction } from 'lodash-es';
7
+ import { isFunction, cloneDeep, range, flatten } from 'lodash-es';
8
8
  import '../useEvent.js';
9
9
  import '../useShadow.js';
10
10
  import '../useCommon.js';
@@ -29,229 +29,173 @@ function useSurgicalAnesthesiaChart(canvas, props, emits, canvasRef, pointTipPro
29
29
  const pauseFlickerPoint = ref();
30
30
  let timeout = null;
31
31
  const oldChildrenSize = getChildrenSize(((_a = props.data.top) == null ? void 0 : _a.treeData) || []);
32
- const layout = computed(
33
- () => props.data.layout || {
32
+ function buildDerived() {
33
+ var _a2, _b, _c, _d, _e, _f;
34
+ const layout = props.data.layout || {
34
35
  top: "drug",
35
36
  center: "xAxis",
36
37
  bottom: "intraoperatively"
37
- }
38
- );
39
- const originX = computed(() => {
40
- var _a2;
41
- return (_a2 = props.data.left.width) != null ? _a2 : 0;
42
- });
43
- const gridXNumber = computed(() => {
44
- const { grid } = props.data;
45
- return grid.mainXCell * grid.subXCell;
46
- });
47
- const gridYNumber = computed(() => {
38
+ };
39
+ const originX = (_a2 = props.data.left.width) != null ? _a2 : 0;
48
40
  const { grid } = props.data;
49
- return grid.mainYCell * grid.subYCell;
50
- });
51
- const topGridYNumber = computed(() => {
41
+ const gridXNumber = grid.mainXCell * grid.subXCell;
42
+ const gridYNumber = grid.mainYCell * grid.subYCell;
52
43
  const { show = true, tree = {} } = props.data.top;
53
- if (!show)
54
- return 0;
55
44
  const { rowNumber = oldChildrenSize } = tree;
56
- if (oldChildrenSize < rowNumber) {
57
- return rowNumber;
58
- }
59
- return oldChildrenSize;
60
- });
61
- const topGridYCellHeight = computed(() => props.data.top.tree.cellHeight);
62
- const topGridHeight = computed(() => topGridYCellHeight.value * topGridYNumber.value);
63
- const topGridOriginY = computed(() => {
64
- const currentLayout = getLayout("drug") || "top";
65
- return getOriginTop(currentLayout);
66
- });
67
- const topGridEndY = computed(() => topGridOriginY.value + topGridHeight.value);
68
- const startTime = computed(
69
- () => {
70
- var _a2;
71
- return Date.parse(((_a2 = props.data.xAxis) == null ? void 0 : _a2.startTime) || format(new Date(), "yyyy-MM-dd HH:mm:ss"));
72
- }
73
- );
74
- const xAxis = computed(() => {
45
+ const topGridYNumber = !show ? 0 : oldChildrenSize < rowNumber ? rowNumber : oldChildrenSize;
46
+ const topGridYCellHeight = props.data.top.tree.cellHeight;
47
+ const topGridHeight = topGridYCellHeight * topGridYNumber;
48
+ const startTime = Date.parse(((_b = props.data.xAxis) == null ? void 0 : _b.startTime) || format(new Date(), "yyyy-MM-dd HH:mm:ss"));
75
49
  const cloneXAxis = cloneDeep(props.data.xAxis);
76
50
  const { spaceValue, spaceTimeStamp } = cloneXAxis;
77
- const list = range(gridXNumber.value / spaceValue + 1).map(
78
- (n) => n === 0 ? cloneXAxis.startTime : format(new Date(startTime.value + n * spaceValue * spaceTimeStamp), "yyyy-MM-dd HH:mm:ss")
51
+ const list = range(gridXNumber / spaceValue + 1).map(
52
+ (n) => n === 0 ? cloneXAxis.startTime : format(new Date(startTime + n * spaceValue * spaceTimeStamp), "yyyy-MM-dd HH:mm:ss")
79
53
  );
80
- return {
54
+ const xAxis = {
81
55
  ...cloneXAxis,
82
56
  list,
83
- left: originX.value
57
+ left: originX
84
58
  };
85
- });
86
- const treeData = getTreeData();
87
- const originYXAxis = computed(() => {
88
- const currentLayout = getLayout("xAxis") || "center";
89
- return getOriginTop(currentLayout);
90
- });
91
- const endX = computed(() => {
92
- var _a2;
93
- const { width, right } = props.data;
94
- if (!right)
95
- return width;
96
- const endWidth = (_a2 = right.width) != null ? _a2 : 0;
97
- return width - endWidth;
98
- });
99
- const originY = computed(() => {
100
- const currentLayout = getLayout("intraoperatively") || "bottom";
101
- return getOriginTop(currentLayout);
102
- });
103
- const extracorporealCirculationHeight = computed(() => {
104
- var _a2;
105
- const { show, height } = ((_a2 = props.data.other) == null ? void 0 : _a2.extracorporealCirculation) || {};
106
- if (!show || !height)
107
- return 0;
108
- return height;
109
- });
110
- const markHeight = computed(() => {
111
- var _a2;
112
- const { show, height } = ((_a2 = props.data.other) == null ? void 0 : _a2.mark) || {};
113
- if (!show || !height)
114
- return 0;
115
- return height;
116
- });
117
- const endY = computed(
118
- () => originY.value + (props.data.height - topGridHeight.value - xAxis.value.height - markHeight.value - extracorporealCirculationHeight.value)
119
- );
120
- const xCellWidth = computed(() => (endX.value - originX.value) / gridXNumber.value);
121
- const yCellHeight = computed(() => (endY.value - originY.value) / gridYNumber.value);
122
- const timeXCell = computed(() => xAxis.value.spaceTimeStamp / xCellWidth.value);
123
- const itemList = computed(() => {
124
- const { scaleValues } = props.data;
125
- return flatten(
126
- scaleValues.map((item) => {
127
- return item.dataList.filter((v) => v.show).map((v, dataIndex) => {
128
- return {
129
- ...v,
130
- bigType: item.type,
131
- unit: item.unit,
132
- dataIndex
133
- };
134
- });
135
- })
136
- );
137
- });
138
- const pulseYCell = computed(() => computedYCell("pulse"));
139
- const temperatureYCell = computed(() => computedYCell("temperature"));
140
- const event = computed(() => {
141
- var _a2;
142
- return ((_a2 = props.data.grid) == null ? void 0 : _a2.event) || { selectable: true, evented: true, hovered: true };
143
- });
144
- const propItems = reactive({
145
- canvasWidth: props.data.width,
146
- canvasHeight: props.data.height,
147
- borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
148
- pointSelectionStyle: props.data.pointSelectionStyle || {},
149
- grid: props.data.grid,
150
- top: props.data.top,
151
- left: props.data.left,
152
- other: props.data.other,
153
- topGridYNumber: unref(topGridYNumber),
154
- topGridYCellHeight: unref(topGridYCellHeight),
155
- topGridOriginY: unref(topGridOriginY),
156
- topGridEndY: unref(topGridEndY),
157
- treeData,
158
- getTreeData,
159
- xAxis: unref(xAxis),
160
- originYXAxis: unref(originYXAxis),
161
- startTime: unref(startTime),
162
- timeXCell: unref(timeXCell),
163
- gridXNumber: unref(gridXNumber),
164
- gridYNumber: unref(gridYNumber),
165
- xCellWidth: unref(xCellWidth),
166
- yCellHeight: unref(yCellHeight),
167
- originX: unref(originX),
168
- endX: unref(endX),
169
- originY: unref(originY),
170
- endY: unref(endY),
171
- markHeight: unref(markHeight),
172
- extracorporealCirculationHeight: unref(extracorporealCirculationHeight),
173
- itemList: unref(itemList),
174
- scaleValues: props.data.scaleValues,
175
- pulseYCell: unref(pulseYCell),
176
- temperatureYCell: unref(temperatureYCell),
177
- event: unref(event),
178
- dialog,
179
- extraMenuConfig: props.data.extraMenuConfig || {}
180
- });
181
- function getLayout(moduleName) {
182
- let layoutName = "";
183
- Object.entries(layout.value).some(([key, value]) => {
184
- if (value === moduleName) {
185
- layoutName = key;
186
- return true;
187
- }
188
- return;
189
- });
190
- return layoutName;
191
- }
192
- function getLayoutHeight(layoutName) {
193
- const moduleName = layout.value[layoutName];
194
- const xAxisHeight = xAxis.value.height;
195
- switch (moduleName) {
196
- case "drug":
197
- return topGridHeight.value;
198
- case "xAxis":
199
- return xAxisHeight;
200
- default:
201
- return props.data.height - topGridHeight.value - xAxisHeight;
59
+ function getLayout(moduleName) {
60
+ let layoutName = "";
61
+ Object.entries(layout).some(([key, value]) => {
62
+ if (value === moduleName) {
63
+ layoutName = key;
64
+ return true;
65
+ }
66
+ return false;
67
+ });
68
+ return layoutName;
202
69
  }
203
- }
204
- function getOriginTop(layoutName) {
205
- switch (layoutName) {
206
- case "top":
207
- return 0;
208
- case "center":
209
- return getLayoutHeight("top");
210
- default:
211
- return getLayoutHeight("top") + getLayoutHeight("center");
70
+ function getLayoutHeight(layoutName) {
71
+ const moduleName = layout[layoutName];
72
+ const xAxisHeight = xAxis.height;
73
+ switch (moduleName) {
74
+ case "drug":
75
+ return topGridHeight;
76
+ case "xAxis":
77
+ return xAxisHeight;
78
+ default:
79
+ return props.data.height - topGridHeight - xAxisHeight;
80
+ }
212
81
  }
213
- }
214
- function getTreeData() {
215
- const { show = true, tree = {} } = props.data.top;
216
- if (!show)
217
- return [];
218
- const cloneData = cloneDeep(props.data.top.treeData);
219
- let levelRow = 0;
220
- const { cellWidth, cellHeight } = props.data.top.tree;
221
- const { rowNumber = oldChildrenSize } = tree;
222
- if (oldChildrenSize < rowNumber) {
223
- cloneData.push(...range(rowNumber - oldChildrenSize).map(() => ({})));
82
+ function getOriginTop(layoutName) {
83
+ switch (layoutName) {
84
+ case "top":
85
+ return 0;
86
+ case "center":
87
+ return getLayoutHeight("top");
88
+ default:
89
+ return getLayoutHeight("top") + getLayoutHeight("center");
90
+ }
224
91
  }
225
- transferTree(cloneData);
226
- function transferTree(treeData2, deep = 0) {
227
- treeData2.forEach((item) => {
228
- var _a2;
229
- const other = {
230
- top: levelRow * cellHeight + topGridOriginY.value,
231
- left: deep * cellWidth,
232
- width: cellWidth,
233
- height: cellHeight,
234
- uuid: uuidGenerator()
235
- };
236
- levelRow++;
237
- if ((_a2 = item.children) == null ? void 0 : _a2.length) {
238
- levelRow--;
239
- const childrenSize = getChildrenSize(item.children);
240
- other.height = childrenSize * cellHeight;
241
- transferTree(item.children, deep + 1);
242
- } else {
243
- other.width = originX.value - other.left;
244
- }
245
- Object.assign(item, other);
246
- });
92
+ const topGridOriginY = getOriginTop(getLayout("drug") || "top");
93
+ const topGridEndY = topGridOriginY + topGridHeight;
94
+ const originYXAxis = getOriginTop(getLayout("xAxis") || "center");
95
+ const { width, right } = props.data;
96
+ const endX = !right ? width : width - ((_c = right.width) != null ? _c : 0);
97
+ const originY = getOriginTop(getLayout("intraoperatively") || "bottom");
98
+ const { show: ecShow, height: ecHeight } = ((_d = props.data.other) == null ? void 0 : _d.extracorporealCirculation) || {};
99
+ const extracorporealCirculationHeight = !ecShow || !ecHeight ? 0 : ecHeight;
100
+ const { show: markShow, height: markH } = ((_e = props.data.other) == null ? void 0 : _e.mark) || {};
101
+ const markHeight = !markShow || !markH ? 0 : markH;
102
+ const endY = originY + (props.data.height - topGridHeight - xAxis.height - markHeight - extracorporealCirculationHeight);
103
+ const xCellWidth = (endX - originX) / gridXNumber;
104
+ const yCellHeight = (endY - originY) / gridYNumber;
105
+ const timeXCell = xAxis.spaceTimeStamp / xCellWidth;
106
+ const itemList = flatten(
107
+ props.data.scaleValues.map((item) => {
108
+ return item.dataList.filter((v) => v.show).map((v, dataIndex) => ({
109
+ ...v,
110
+ bigType: item.type,
111
+ unit: item.unit,
112
+ dataIndex
113
+ }));
114
+ })
115
+ );
116
+ function computedYCell(type) {
117
+ const { scaleValues } = props.data;
118
+ const item = scaleValues.find((v) => v.type === type);
119
+ return yCellHeight * (item.spaceGridNumber || 1) / (item.spaceValue || 1);
247
120
  }
248
- return cloneData;
249
- }
250
- function computedYCell(type) {
251
- const { scaleValues } = props.data;
252
- const item = scaleValues.find((v) => v.type === type);
253
- return yCellHeight.value * (item.spaceGridNumber || 1) / (item.spaceValue || 1);
121
+ const pulseYCell = computedYCell("pulse");
122
+ const temperatureYCell = computedYCell("temperature");
123
+ const event = ((_f = props.data.grid) == null ? void 0 : _f.event) || { selectable: true, evented: true, hovered: true };
124
+ const getTreeData = () => {
125
+ const { show: show2 = true, tree: tree2 = {} } = props.data.top;
126
+ if (!show2)
127
+ return [];
128
+ const cloneData = cloneDeep(props.data.top.treeData);
129
+ let levelRow = 0;
130
+ const { cellWidth, cellHeight } = props.data.top.tree;
131
+ const { rowNumber: rowNumber2 = oldChildrenSize } = tree2;
132
+ if (oldChildrenSize < rowNumber2) {
133
+ cloneData.push(...range(rowNumber2 - oldChildrenSize).map(() => ({})));
134
+ }
135
+ transferTree(cloneData);
136
+ function transferTree(treeData, deep = 0) {
137
+ treeData.forEach((item) => {
138
+ var _a3;
139
+ const other = {
140
+ top: levelRow * cellHeight + topGridOriginY,
141
+ left: deep * cellWidth,
142
+ width: cellWidth,
143
+ height: cellHeight,
144
+ uuid: uuidGenerator()
145
+ };
146
+ levelRow++;
147
+ if ((_a3 = item.children) == null ? void 0 : _a3.length) {
148
+ levelRow--;
149
+ const childrenSize = getChildrenSize(item.children);
150
+ other.height = childrenSize * cellHeight;
151
+ transferTree(item.children, deep + 1);
152
+ } else {
153
+ other.width = originX - other.left;
154
+ }
155
+ Object.assign(item, other);
156
+ });
157
+ }
158
+ return cloneData;
159
+ };
160
+ return {
161
+ canvasWidth: props.data.width,
162
+ canvasHeight: props.data.height,
163
+ borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
164
+ pointSelectionStyle: props.data.pointSelectionStyle || {},
165
+ grid: props.data.grid,
166
+ top: props.data.top,
167
+ left: props.data.left,
168
+ other: props.data.other,
169
+ topGridYNumber,
170
+ topGridYCellHeight,
171
+ topGridOriginY,
172
+ topGridEndY,
173
+ treeData: getTreeData(),
174
+ getTreeData,
175
+ xAxis,
176
+ originYXAxis,
177
+ startTime,
178
+ timeXCell,
179
+ gridXNumber,
180
+ gridYNumber,
181
+ xCellWidth,
182
+ yCellHeight,
183
+ originX,
184
+ endX,
185
+ originY,
186
+ endY,
187
+ markHeight,
188
+ extracorporealCirculationHeight,
189
+ itemList,
190
+ scaleValues: props.data.scaleValues,
191
+ pulseYCell,
192
+ temperatureYCell,
193
+ event,
194
+ dialog,
195
+ extraMenuConfig: props.data.extraMenuConfig || {}
196
+ };
254
197
  }
198
+ const propItems = reactive(buildDerived());
255
199
  onMounted(async () => {
256
200
  await nextTick();
257
201
  const { redrawLinePoints: _redrawLinePoints, clickMenu: _clickTopMenu } = useTop(
@@ -158,7 +158,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
158
158
  });
159
159
  lines.push(line);
160
160
  }
161
- borderGroup.add(...lines).addWithUpdate();
161
+ borderGroup.add(...lines).addWithUpdate().set(defaultStyle);
162
162
  return borderGroup;
163
163
  }
164
164
  function drawShaDow(target) {
@@ -583,7 +583,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
583
583
  };
584
584
  }
585
585
  function drawOther(points, v, _item, otherObj) {
586
- var _a2, _b, _c;
586
+ var _a2, _b, _c, _d;
587
587
  if (!["temperature", "pain", "breathe"].includes(type))
588
588
  return;
589
589
  if (!(points == null ? void 0 : points.length) && type === "temperature" && !isLimit(v.time))
@@ -689,7 +689,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
689
689
  },
690
690
  verifiedText: {
691
691
  obj: verifiedText,
692
- left: xCellWidth / 2,
692
+ left: ((_d = verifiedStyle == null ? void 0 : verifiedStyle.position) == null ? void 0 : _d[key]) === "top-right" ? xCellWidth / 2 : 0,
693
693
  top: (value ? -yCellHeight : 0) - 5
694
694
  },
695
695
  reducePoint: {