cnhis-design-vue 3.1.34-beta.5 → 3.1.34-beta.7

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 (69) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/index.d.ts +1 -0
  3. package/es/components/big-table/src/BigTable.vue.d.ts +1 -0
  4. package/es/components/big-table/src/BigTable.vue2.js +13 -1
  5. package/es/components/big-table/src/components/edit-form/edit-select.js +26 -1
  6. package/es/components/big-table/src/hooks/useEvent.js +3 -4
  7. package/es/components/fabric-chart/index.d.ts +141 -374
  8. package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +2 -2
  9. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +142 -374
  10. package/es/components/fabric-chart/src/FabricChart.vue.js +52 -22
  11. package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
  12. package/es/components/fabric-chart/src/hooks/index.js +1 -0
  13. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +2 -2
  14. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -6
  15. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +4 -18
  16. package/es/components/fabric-chart/src/hooks/useCenter.js +3 -20
  17. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
  18. package/es/components/fabric-chart/src/hooks/useCommon.js +2 -2
  19. package/es/components/fabric-chart/src/hooks/useGrid.js +2 -7
  20. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +2 -1
  21. package/es/components/fabric-chart/src/hooks/useLeft.js +22 -28
  22. package/es/components/fabric-chart/src/hooks/useOther.js +1 -6
  23. package/es/components/fabric-chart/src/hooks/useRight.js +13 -18
  24. package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +25 -0
  25. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +339 -0
  26. package/es/components/fabric-chart/src/hooks/useTop.js +1 -6
  27. package/es/components/iho-table/index.d.ts +6 -4
  28. package/es/components/iho-table/src/IhoTable.vue.d.ts +6 -4
  29. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +9 -3
  30. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +5 -5
  31. package/es/components/iho-table/src/types/index.d.ts +7 -6
  32. package/es/components/iho-table/src/utils/index.d.ts +6 -0
  33. package/es/components/iho-table/src/utils/index.js +16 -2
  34. package/es/shared/assets/img/failure.js +1 -1
  35. package/es/shared/assets/img/failure.png.js +1 -1
  36. package/es/shared/assets/img/icon-asc.js +1 -1
  37. package/es/shared/assets/img/icon-desc.js +1 -1
  38. package/es/shared/assets/img/no-permission.js +1 -1
  39. package/es/shared/assets/img/no-permission.png.js +1 -1
  40. package/es/shared/assets/img/nodata.js +1 -1
  41. package/es/shared/assets/img/nodata.png.js +1 -1
  42. package/es/shared/assets/img/notfound.js +1 -1
  43. package/es/shared/assets/img/notfound.png.js +1 -1
  44. package/es/shared/assets/img/qr.js +1 -1
  45. package/es/shared/assets/img/qr.png.js +1 -1
  46. package/es/shared/assets/img/success.js +1 -1
  47. package/es/shared/assets/img/success.png.js +1 -1
  48. package/es/shared/assets/img/video.js +1 -1
  49. package/es/shared/assets/img/video.png.js +1 -1
  50. package/es/shared/assets/img/video_default_cover.js +1 -1
  51. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  52. package/es/shared/assets/img/video_hover.js +1 -1
  53. package/es/shared/assets/img/video_play_hover.js +1 -1
  54. package/es/shared/assets/img/xb_big.js +1 -1
  55. package/es/shared/assets/img/xb_big.png.js +1 -1
  56. package/es/shared/assets/img/xb_small.js +1 -1
  57. package/es/shared/assets/img/xb_small.png.js +1 -1
  58. package/es/shared/types/index.d.ts +1 -0
  59. package/package.json +2 -2
  60. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  61. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  62. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  63. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  64. package/es/components/fabric-chart/src/BirthProcessChart.vue.js +0 -172
  65. package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +0 -214
  66. package/es/components/fabric-chart/src/TemperatureChart.vue.js +0 -355
  67. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  68. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  69. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,214 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { IData, IDate, IPointType, IPropItems } from './interface';
3
- declare const _default: import("vue").DefineComponent<{
4
- data: {
5
- type: PropType<IData>;
6
- required: true;
7
- };
8
- addRenderItem: {
9
- type: FunctionConstructor;
10
- };
11
- }, {
12
- defaultHeight: number;
13
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
14
- data: {
15
- type: PropType<IData>;
16
- required: true;
17
- };
18
- addRenderItem: {
19
- type: FunctionConstructor;
20
- };
21
- }>> & {
22
- onChange?: ((...args: any[]) => any) | undefined;
23
- onSelect?: ((...args: any[]) => any) | undefined;
24
- onAdd?: ((...args: any[]) => any) | undefined;
25
- }>>;
26
- emits: (event: "change" | "add" | "select", ...args: any[]) => void;
27
- select: import("vue").Ref<any>;
28
- canvasRef: any;
29
- canvas: import("vue").Ref<any>;
30
- dateHeight: import("vue").ComputedRef<number>;
31
- hospitalDaysHeight: import("vue").ComputedRef<number>;
32
- operationDaysHeight: import("vue").ComputedRef<number>;
33
- xScalevalueHeight: import("vue").ComputedRef<number>;
34
- breathingHeight: import("vue").ComputedRef<any>;
35
- gridXNumber: import("vue").ComputedRef<number>;
36
- gridYNumber: import("vue").ComputedRef<number>;
37
- endX: import("vue").ComputedRef<number>;
38
- endXLimit: import("vue").ComputedRef<number>;
39
- originX: import("vue").ComputedRef<any>;
40
- endY: import("vue").ComputedRef<number>;
41
- originY: import("vue").ComputedRef<number>;
42
- originYLimit: import("vue").ComputedRef<number>;
43
- xCellWidth: import("vue").ComputedRef<number>;
44
- yCellHeight: import("vue").ComputedRef<number>;
45
- iconsWidth: import("vue").ComputedRef<any>;
46
- xScaleList: import("vue").ComputedRef<any[]>;
47
- breatheYCell: import("vue").ComputedRef<number>;
48
- pulseYCell: import("vue").ComputedRef<number>;
49
- temperatureYCell: import("vue").ComputedRef<number>;
50
- painYCell: import("vue").ComputedRef<number>;
51
- event: import("vue").ComputedRef<any>;
52
- itemList: import("vue").ComputedRef<any[]>;
53
- painIndex: import("vue").ComputedRef<number>;
54
- painHeight: import("vue").ComputedRef<number>;
55
- painOriginY: import("vue").ComputedRef<{
56
- originY: number;
57
- endY: number;
58
- }>;
59
- vitalSignsOriginY: import("vue").ComputedRef<{
60
- originY: number;
61
- endY: number;
62
- }>;
63
- topList: import("vue").ComputedRef<IDate[]>;
64
- getRightInfo: import("vue").ComputedRef<any>;
65
- propItems: any;
66
- computedYCell: (type: IPointType) => number;
67
- cumputedX: (value: string | number, setAllCenter?: boolean) => any;
68
- cumputedY: (type: IPointType, scaleValueList: number[], value: string | number) => number;
69
- getXValue: (pointX: number) => string | undefined;
70
- getYValue: (type: IPointType, pointY: number) => number;
71
- setPopup: (point: any) => void;
72
- isAddPoint: (x: number) => boolean;
73
- updateData: (params: any, mode?: string) => void;
74
- redrawPoints: () => void;
75
- pointTipProps: {
76
- show: boolean;
77
- point: {
78
- x: number;
79
- y: number;
80
- };
81
- list: string[];
82
- };
83
- pointMenuProps: {
84
- show: boolean;
85
- point: {
86
- x: number;
87
- y: number;
88
- };
89
- list: any[];
90
- target: any;
91
- };
92
- clickMenu: ({ item, target }: {
93
- item: any;
94
- target: any;
95
- }) => void;
96
- drawScaleValue: (yScaleValueList: any[]) => void;
97
- PopupTip: import("vue").DefineComponent<{
98
- show: {
99
- type: BooleanConstructor;
100
- required: true;
101
- default: boolean;
102
- };
103
- point: {
104
- type: null;
105
- required: true;
106
- };
107
- list: {
108
- type: ArrayConstructor;
109
- required: false;
110
- default: () => never[];
111
- };
112
- propItems: {
113
- type: null;
114
- required: true;
115
- };
116
- }, {
117
- props: {
118
- show: boolean;
119
- point: import("./interface").ICoordinateValue;
120
- list: string[];
121
- propItems: import("../../../shared/types").AnyObject;
122
- };
123
- pointStyle: import("vue").ComputedRef<{
124
- top: string;
125
- bottom: string;
126
- left: string;
127
- right: string;
128
- 'transform-origin': string;
129
- }>;
130
- Teleport: {
131
- new (): {
132
- $props: import("vue").VNodeProps & import("vue").TeleportProps;
133
- };
134
- __isTeleport: true;
135
- };
136
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
137
- show: {
138
- type: BooleanConstructor;
139
- required: true;
140
- default: boolean;
141
- };
142
- point: {
143
- type: null;
144
- required: true;
145
- };
146
- list: {
147
- type: ArrayConstructor;
148
- required: false;
149
- default: () => never[];
150
- };
151
- propItems: {
152
- type: null;
153
- required: true;
154
- };
155
- }>>, {
156
- list: unknown[];
157
- }>;
158
- PopupMenu: import("vue").DefineComponent<{
159
- show: {
160
- type: BooleanConstructor;
161
- default: boolean;
162
- };
163
- list: {
164
- type: ArrayConstructor;
165
- default: () => never[];
166
- };
167
- point: {
168
- type: PropType<import("./interface").ICoordinateValue>;
169
- };
170
- propItems: {
171
- type: PropType<IPropItems>;
172
- };
173
- target: {
174
- type: PropType<any>;
175
- };
176
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:show" | "clickMenu")[], "clickMenu" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
177
- show: {
178
- type: BooleanConstructor;
179
- default: boolean;
180
- };
181
- list: {
182
- type: ArrayConstructor;
183
- default: () => never[];
184
- };
185
- point: {
186
- type: PropType<import("./interface").ICoordinateValue>;
187
- };
188
- propItems: {
189
- type: PropType<IPropItems>;
190
- };
191
- target: {
192
- type: PropType<any>;
193
- };
194
- }>> & {
195
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
196
- onClickMenu?: ((...args: any[]) => any) | undefined;
197
- }, {
198
- show: boolean;
199
- list: unknown[];
200
- }>;
201
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "add" | "select")[], "change" | "add" | "select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
202
- data: {
203
- type: PropType<IData>;
204
- required: true;
205
- };
206
- addRenderItem: {
207
- type: FunctionConstructor;
208
- };
209
- }>> & {
210
- onChange?: ((...args: any[]) => any) | undefined;
211
- onSelect?: ((...args: any[]) => any) | undefined;
212
- onAdd?: ((...args: any[]) => any) | undefined;
213
- }, {}>;
214
- export default _default;
@@ -1,355 +0,0 @@
1
- import { defineComponent, ref, computed, reactive, onMounted, openBlock, createElementBlock, Fragment, createElementVNode, unref, createBlock, mergeProps, createCommentVNode } from 'vue';
2
- import { fabric } from './utils/index.js';
3
- import { defaultBorderStyle } from './hooks/useDraw.js';
4
- import { useCumputedPoint } from './hooks/useCumputedPoint.js';
5
- import { useTop } from './hooks/useTop.js';
6
- import { useLeft } from './hooks/useLeft.js';
7
- import { useRight } from './hooks/useRight.js';
8
- import { useCenter } from './hooks/useCenter.js';
9
- import { useBottom } from './hooks/useBottom.js';
10
- import { useOther } from './hooks/useOther.js';
11
- import { useEvent, useCanvasEvent } from './hooks/useEvent.js';
12
- import 'naive-ui';
13
- import 'lodash-es';
14
- import PopupTip from './components/PopupTip.vue.js';
15
- import PopupMenu from './components/PopupMenu.js';
16
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
17
-
18
- const _sfc_main = /* @__PURE__ */ defineComponent({
19
- __name: "TemperatureChart",
20
- props: {
21
- data: { type: Object, required: true },
22
- addRenderItem: { type: Function }
23
- },
24
- emits: [
25
- "change",
26
- "add",
27
- "select"
28
- ],
29
- setup(__props, { expose, emit: emits }) {
30
- const props = __props;
31
- const defaultHeight = 15;
32
- let select = ref();
33
- const canvasRef = ref(null);
34
- let canvas = ref();
35
- const dateHeight = computed(() => {
36
- const { top } = props.data;
37
- return top.date.show && (top.date.height || defaultHeight) || 0;
38
- });
39
- const hospitalDaysHeight = computed(() => {
40
- var _a;
41
- const { top } = props.data;
42
- return ((_a = top.hospitalDays) == null ? void 0 : _a.show) && (top.hospitalDays.height || defaultHeight) || 0;
43
- });
44
- const operationDaysHeight = computed(() => {
45
- var _a;
46
- const { top } = props.data;
47
- return ((_a = top.operationDays) == null ? void 0 : _a.show) && (top.operationDays.height || defaultHeight) || 0;
48
- });
49
- const xScalevalueHeight = computed(() => {
50
- var _a, _b, _c;
51
- const { top } = props.data;
52
- const height = ((_a = top.xScalevalue) == null ? void 0 : _a.show) && (top.xScalevalue.height || defaultHeight) || 0;
53
- const dayHeight = ((_b = top.xScalevalue) == null ? void 0 : _b.show) ? (_c = top.dayHeight) != null ? _c : 0 : 0;
54
- return height + dayHeight;
55
- });
56
- const breathingHeight = computed(() => {
57
- var _a;
58
- const { bottom } = props.data;
59
- return ((_a = bottom == null ? void 0 : bottom.breathing) == null ? void 0 : _a.show) && (bottom.breathing.height || defaultHeight * 2) || 0;
60
- });
61
- const gridXNumber = computed(() => {
62
- const { grid } = props.data;
63
- return grid.mainXCell * grid.subXCell + grid.surplusXCell;
64
- });
65
- const gridYNumber = computed(() => {
66
- const { grid } = props.data;
67
- return grid.mainYCell * grid.subYCell + grid.surplusYCell;
68
- });
69
- const endX = computed(() => {
70
- var _a;
71
- const { width, right = null, top } = props.data;
72
- if (!right)
73
- return width;
74
- const endWidth = (_a = right.width) != null ? _a : 0;
75
- return width - endWidth;
76
- });
77
- const endXLimit = computed(() => {
78
- const { grid } = props.data;
79
- return endX.value - grid.surplusXCell * xCellWidth.value;
80
- });
81
- const originX = computed(() => {
82
- const { top, left } = props.data;
83
- const originX2 = top.titleWidth + iconsWidth.value;
84
- return originX2;
85
- });
86
- const endY = computed(() => {
87
- const { bottom = null, height } = props.data;
88
- if (!bottom)
89
- return height;
90
- const endHeight = bottom.height || 30;
91
- return height - endHeight;
92
- });
93
- const originY = computed(() => {
94
- var _a;
95
- const { top } = props.data;
96
- const dayHeight = top.xScalevalue.show && ((_a = top.dayHeight) != null ? _a : 0) || 0;
97
- const xScaleHeight = top.xScalevalue.show && (top.xScalevalue.height || defaultHeight) || 0;
98
- const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value;
99
- return topHeight;
100
- });
101
- const originYLimit = computed(() => {
102
- const { grid } = props.data;
103
- return originY.value + grid.surplusYCell * yCellHeight.value;
104
- });
105
- const xCellWidth = computed(() => {
106
- return (endX.value - originX.value) / gridXNumber.value;
107
- });
108
- const yCellHeight = computed(() => {
109
- return (endY.value - originY.value) / gridYNumber.value;
110
- });
111
- const iconsWidth = computed(() => {
112
- var _a, _b;
113
- const { left } = props.data;
114
- return ((_a = left.icons) == null ? void 0 : _a.show) && (((_b = left.icons) == null ? void 0 : _b.width) || 100) || 0;
115
- });
116
- const xScaleList = computed(() => {
117
- const { top } = props.data;
118
- const dateList = top.date.list;
119
- const times = top.xScalevalue.times;
120
- let left = originX.value - xCellWidth.value;
121
- function getDate(date) {
122
- const [year = "2022", month = "01", day = "01"] = String(date).match(/\d+/g) || [];
123
- return `20${year}`.slice(-4) + "-" + `00${month}`.slice(-2) + "-" + `00${day}`.slice(-2);
124
- }
125
- const timeList = dateList.map((item) => {
126
- return times.map((v) => {
127
- left += xCellWidth.value;
128
- const start = new Date(`${getDate(item)} ${v.start}`).getTime();
129
- const end = new Date(`${getDate(item)} ${v.end}`).getTime();
130
- return {
131
- start,
132
- end,
133
- left,
134
- center: left + xCellWidth.value / 2,
135
- scaleCell: (end - start) / xCellWidth.value
136
- };
137
- });
138
- });
139
- return timeList.flat();
140
- });
141
- const breatheYCell = computed(() => {
142
- return computedYCell("breathe");
143
- });
144
- const pulseYCell = computed(() => {
145
- return computedYCell("pulse");
146
- });
147
- const temperatureYCell = computed(() => {
148
- return computedYCell("temperature");
149
- });
150
- const painYCell = computed(() => {
151
- return computedYCell("pain");
152
- });
153
- const event = computed(() => {
154
- var _a;
155
- return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
156
- });
157
- const itemList = computed(() => {
158
- const { left } = props.data;
159
- return left.yScaleValue.map((item) => {
160
- return item.dataList.map((v, dataIndex) => {
161
- return {
162
- ...v,
163
- bigType: item.type,
164
- unit: item.unit,
165
- dataIndex
166
- };
167
- });
168
- }).flat();
169
- });
170
- const painIndex = computed(() => {
171
- const { left } = props.data;
172
- return left.yScaleValue.findIndex((v) => v.type === "pain");
173
- });
174
- const painHeight = computed(() => {
175
- const { grid } = props.data;
176
- return painIndex.value === -1 ? 0 : yCellHeight.value * grid.subYCell;
177
- });
178
- const painOriginY = computed(() => {
179
- const { left } = props.data;
180
- let obj = {
181
- originY: endY.value,
182
- endY: endY.value
183
- };
184
- if (painIndex.value === 0 && left.yScaleValue.length > 1) {
185
- obj.originY = originYLimit.value;
186
- obj.endY = originYLimit.value + painHeight.value;
187
- } else if (painIndex.value === left.yScaleValue.length - 1) {
188
- obj.originY = endY.value - painHeight.value;
189
- obj.endY = endY.value;
190
- }
191
- return obj;
192
- });
193
- const vitalSignsOriginY = computed(() => {
194
- const { left } = props.data;
195
- let obj = {
196
- originY: originY.value,
197
- endY: endY.value
198
- };
199
- if (painIndex.value === 0 && left.yScaleValue.length > 1) {
200
- obj.originY = originYLimit.value + painHeight.value;
201
- obj.endY = endY.value;
202
- } else if (painIndex.value === left.yScaleValue.length - 1) {
203
- obj.originY = originYLimit.value;
204
- obj.endY = endY.value - painHeight.value;
205
- }
206
- return obj;
207
- });
208
- const topList = computed(() => {
209
- const { top } = props.data;
210
- let topList2 = [];
211
- for (let i in top) {
212
- if (top[i].show) {
213
- topList2.push({
214
- ...top[i],
215
- key: i
216
- });
217
- }
218
- }
219
- return topList2.sort((a, b) => a.seq - b.seq);
220
- });
221
- const getRightInfo = computed(() => {
222
- var _a;
223
- const { left, right } = props.data;
224
- const temperatureObj = left.yScaleValue.find((v) => v.type === "temperature");
225
- const yScaleValue = (right == null ? void 0 : right.yScaleValue) || {};
226
- if ((_a = temperatureObj == null ? void 0 : temperatureObj.list) == null ? void 0 : _a.length) {
227
- Object.assign(yScaleValue, {
228
- list: temperatureObj.list.map((v) => Math.floor((1.8 * v + 32) * 100) / 100),
229
- spaceGridNumber: temperatureObj.spaceGridNumber
230
- });
231
- }
232
- return yScaleValue;
233
- });
234
- const propItems = reactive({
235
- canvasWidth: props.data.width,
236
- canvasHeight: props.data.height,
237
- borderStyle: props.data.borderStyle || defaultBorderStyle,
238
- selectionStyle: props.data.selectionStyle || {},
239
- dateHeight: dateHeight.value,
240
- hospitalDaysHeight: hospitalDaysHeight.value,
241
- operationDaysHeight: operationDaysHeight.value,
242
- xScalevalueHeight: xScalevalueHeight.value,
243
- topList: topList.value,
244
- breathingHeight: breathingHeight.value,
245
- hospitalizationDate: props.data.hospitalizationDate,
246
- grid: props.data.grid,
247
- top: props.data.top,
248
- left: props.data.left,
249
- right: props.data.right,
250
- bottom: props.data.bottom,
251
- other: props.data.other,
252
- painIndex: painIndex.value,
253
- painHeight: painHeight.value,
254
- painOriginY: painOriginY.value,
255
- vitalSignsOriginY: vitalSignsOriginY.value,
256
- gridXNumber: gridXNumber.value,
257
- gridYNumber: gridYNumber.value,
258
- iconsWidth: iconsWidth.value,
259
- originX: originX.value,
260
- originY: originY.value,
261
- originYLimit: originYLimit.value,
262
- endX: endX.value,
263
- endXLimit: endXLimit.value,
264
- endY: endY.value,
265
- xCellWidth: xCellWidth.value,
266
- yCellHeight: yCellHeight.value,
267
- xScaleList: xScaleList.value,
268
- breatheYCell: breatheYCell.value,
269
- pulseYCell: pulseYCell.value,
270
- temperatureYCell: temperatureYCell.value,
271
- painYCell: painYCell.value,
272
- event: event.value,
273
- itemList: itemList.value,
274
- getRightInfo: getRightInfo.value,
275
- config: props.data.config || {}
276
- });
277
- function computedYCell(type) {
278
- const { yScaleValue } = props.data.left;
279
- const item = yScaleValue.find((v) => v.type === type);
280
- const list = (item == null ? void 0 : item.list) || [];
281
- if (!list.length)
282
- return 0;
283
- return yCellHeight.value / ((list[1] - list[0]) / item.spaceGridNumber);
284
- }
285
- const { cumputedX, cumputedY, getXValue, getYValue } = useCumputedPoint(propItems);
286
- useTop(canvas, propItems);
287
- const { setPopup, isAddPoint, updateData, redrawPoints, pointTipProps, pointMenuProps, clickMenu } = useCenter(
288
- canvas,
289
- propItems,
290
- emits,
291
- cumputedX,
292
- cumputedY,
293
- getXValue,
294
- getYValue,
295
- props.addRenderItem
296
- );
297
- const { drawScaleValue } = useLeft(
298
- canvas,
299
- propItems,
300
- emits,
301
- setPopup,
302
- pointTipProps,
303
- cumputedX,
304
- cumputedY,
305
- getXValue,
306
- getYValue,
307
- isAddPoint,
308
- updateData
309
- );
310
- useRight(canvas, propItems, drawScaleValue);
311
- useBottom(canvas, propItems);
312
- useOther(canvas, propItems, cumputedX);
313
- onMounted(() => {
314
- canvas.value = new fabric.Canvas(canvasRef.value, {
315
- width: propItems.canvasWidth,
316
- height: propItems.canvasHeight,
317
- backgroundColor: "#fff",
318
- selection: false,
319
- containerClass: "c-fabric-chart",
320
- fireRightClick: true
321
- });
322
- useEvent(canvasRef.value);
323
- const { select: selectFunc } = useCanvasEvent(canvas, propItems, emits);
324
- select.value = selectFunc;
325
- });
326
- expose({
327
- redrawPoints,
328
- select,
329
- canvas
330
- });
331
- return (_ctx, _cache) => {
332
- return openBlock(), createElementBlock(Fragment, null, [
333
- createElementVNode("canvas", {
334
- ref_key: "canvasRef",
335
- ref: canvasRef
336
- }, null, 512),
337
- unref(canvas) ? (openBlock(), createBlock(PopupTip, mergeProps({
338
- key: 0,
339
- propItems
340
- }, unref(pointTipProps)), null, 16, ["propItems"])) : createCommentVNode("v-if", true),
341
- unref(canvas) ? (openBlock(), createBlock(unref(PopupMenu), mergeProps({
342
- key: 1,
343
- propItems
344
- }, unref(pointMenuProps), {
345
- show: unref(pointMenuProps).show,
346
- "onUpdate:show": _cache[0] || (_cache[0] = ($event) => unref(pointMenuProps).show = $event),
347
- onClickMenu: unref(clickMenu)
348
- }), null, 16, ["propItems", "show", "onClickMenu"])) : createCommentVNode("v-if", true)
349
- ], 64);
350
- };
351
- }
352
- });
353
- var TemperatureChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "TemperatureChart.vue"]]);
354
-
355
- export { TemperatureChart as default };