cnhis-design-vue 3.4.0-release.3 → 3.4.0-release.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.
- package/es/_virtual/_virtual_i18n-methods.js +5 -1
- package/es/components/audio-sdk/index.d.ts +4 -4
- package/es/components/audio-sdk/src/Index.vue.d.ts +4 -4
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +4 -4
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +4 -4
- package/es/components/base-search/index.d.ts +34 -0
- package/es/components/base-search/src/index.vue.d.ts +34 -0
- package/es/components/base-search/src/index.vue2.js +9 -1
- package/es/components/button-print/index.d.ts +32 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +73 -48
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +11 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +35 -0
- package/es/components/button-print/src/utils/print.d.ts +1 -1
- package/es/components/button-print/src/utils/print.js +4 -2
- package/es/components/callback/src/components/render/popupMaps.d.ts +38 -24
- package/es/components/classification/index.d.ts +84 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +84 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +84 -0
- package/es/components/classification/src/index.vue.d.ts +84 -0
- package/es/components/classification/src/index.vue2.js +7 -0
- package/es/components/date-picker/index.d.ts +28 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +28 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +26 -1
- package/es/components/expand-field/index.d.ts +31 -0
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +31 -0
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +31 -0
- package/es/components/expand-field/src/components/form.vue.d.ts +31 -0
- package/es/components/expand-field/src/index.vue.d.ts +31 -0
- package/es/components/fabric-chart/index.d.ts +3 -3
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +3 -3
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
- package/es/components/fabric-chart/src/components/PopupMenu.d.ts +4 -4
- package/es/components/fabric-chart/src/components/PopupMenu.js +57 -39
- package/es/components/fabric-chart/src/constants/index.d.ts +19 -5
- package/es/components/fabric-chart/src/constants/index.js +26 -11
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.d.ts +4 -3
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +119 -193
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +69 -117
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +15 -11
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +39 -27
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +86 -122
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -0
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +65 -113
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +4 -3
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +63 -37
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +31 -14
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +4 -3
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +6 -7
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +152 -208
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +4 -3
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +8 -9
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -0
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +4 -3
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +138 -229
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +5 -2
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +195 -273
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -0
- package/es/components/fabric-chart/src/interface.d.ts +14 -1
- package/es/components/fabric-chart/src/utils/eventBus.d.ts +2 -0
- package/es/components/fabric-chart/src/utils/eventBus.js +5 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -1
- package/es/components/fabric-chart/src/utils/index.js +2 -10
- package/es/components/fabric-chart/style/index.css +1 -1
- package/es/components/field-editor/index.d.ts +1 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +1 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +57 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue2.js +3 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +28 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +56 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +28 -0
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/form-config/index.d.ts +24 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +24 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +48 -24
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -0
- package/es/components/form-config/src/constants/index.d.ts +2 -0
- package/es/components/form-config/src/constants/index.js +2 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +20 -3
- package/es/components/form-render/index.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +3 -2
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +8 -0
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.d.ts +1 -1
- package/es/components/form-render/src/utils/index.js +5 -2
- package/es/components/iho-chat/index.d.ts +2757 -300
- package/es/components/iho-chat/src/Index.vue.d.ts +2757 -300
- package/es/components/iho-chat/src/Index.vue2.js +5 -3
- package/es/components/iho-chat/src/api/index.d.ts +89 -16
- package/es/components/iho-chat/src/api/index.js +8 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +104 -22
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +191 -29
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +191 -29
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +3 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +783 -101
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +611 -51
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +27 -28
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +204 -14
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +175 -10
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +2 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +197 -29
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +48 -11
- package/es/components/iho-chat/src/components/ContextMenu.js +7 -10
- package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +88 -7
- package/es/components/iho-chat/src/components/MessageMarkdown.vue.d.ts +158 -0
- package/es/components/iho-chat/src/components/MessageMarkdown.vue.js +6 -0
- package/es/components/iho-chat/src/components/MessageMarkdown.vue2.js +51 -0
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +176 -14
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +192 -29
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +2 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +91 -8
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +121 -11
- package/es/components/iho-chat/src/components/Video.vue.d.ts +89 -8
- package/es/components/iho-chat/src/components/userItemRender.js +2 -1
- package/es/components/iho-chat/src/constants/index.d.ts +2 -1
- package/es/components/iho-chat/src/constants/index.js +1 -0
- package/es/components/iho-chat/src/hooks/useData.d.ts +374 -27
- package/es/components/iho-chat/src/hooks/useData.js +31 -10
- package/es/components/iho-chat/src/hooks/useStreamOutput.d.ts +6 -0
- package/es/components/iho-chat/src/hooks/useStreamOutput.js +100 -0
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +89 -7
- package/es/components/iho-chat/src/hooks/useWebSocket.js +14 -4
- package/es/components/iho-chat/src/types/index.d.ts +39 -7
- package/es/components/iho-chat/src/utils/index.d.ts +2 -1
- package/es/components/iho-chat/src/utils/sseClient.d.ts +22 -0
- package/es/components/iho-chat/src/utils/sseClient.js +97 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +37 -24
- package/es/components/iho-table/src/IhoTable.vue.d.ts +37 -24
- package/es/components/iho-table/src/IhoTable.vue2.js +7 -2
- package/es/components/iho-table/src/constants/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +30 -4
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +22 -8
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +7 -2
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +28 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +8 -2
- package/es/components/iho-table/src/types/index.d.ts +3 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +46 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +46 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +41 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +2 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +41 -2
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +20 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +20 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +9 -6
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +42 -2
- package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
- package/es/components/scale-view/index.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +9 -3
- package/es/components/scale-view/src/hooks/use-event.js +56 -22
- package/es/components/select-person/index.d.ts +31 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +14 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +36 -8
- package/es/components/select-person/src/index.vue.d.ts +31 -0
- package/es/components/select-person/src/index.vue2.js +4 -0
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +2 -2
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +28 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +56 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +56 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +56 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +30 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +10 -2
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +30 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +10 -2
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +116 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +9 -9
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +116 -0
- package/es/components/table-filter/src/constants/index.d.ts +1 -0
- package/es/components/table-filter/src/constants/index.js +4 -1
- package/es/shared/components/Ellipsis/Ellipsis.d.ts +12 -0
- package/es/shared/components/Ellipsis/Ellipsis.js +86 -0
- package/es/shared/components/Ellipsis/index.d.ts +2 -0
- package/es/shared/components/Ellipsis/index.js +2 -0
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +15 -0
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +24 -10
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +3 -2
- package/es/shared/utils/business.js +16 -0
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { onBeforeUnmount } from 'vue';
|
|
1
2
|
import { fabric } from '../../../../../shared/utils/fabricjs/index.js';
|
|
2
3
|
import { drawTextGroup, defaultRectStyle, drawTextAndIconGroup, drawText, defaultTextStyle, defaultStyle } from '../useDraw.js';
|
|
3
4
|
import { useBirthProcessCumputedPoint } from '../useCumputedPoint.js';
|
|
@@ -5,7 +6,6 @@ import '../useEvent.js';
|
|
|
5
6
|
import '../useShadow.js';
|
|
6
7
|
import { drawScaleNumber } from '../useScaleColumn.js';
|
|
7
8
|
import { useCommon } from '../useCommon.js';
|
|
8
|
-
import 'vue';
|
|
9
9
|
import { isEffectiveNode, getScaleNumberList } from '../../utils/index.js';
|
|
10
10
|
import { cloneDeep, omit, last } from 'lodash-es';
|
|
11
11
|
import 'date-fns';
|
|
@@ -16,6 +16,7 @@ import './useTop.js';
|
|
|
16
16
|
import '@vueuse/core';
|
|
17
17
|
import './useOther.js';
|
|
18
18
|
import '../../../../../shared/utils/index.js';
|
|
19
|
+
import { singlePointAddEventBus } from '../../utils/eventBus.js';
|
|
19
20
|
|
|
20
21
|
function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, updateData, getGridPoints) {
|
|
21
22
|
const { getYValue, getXValue, computedX } = useBirthProcessCumputedPoint(propItems);
|
|
@@ -36,6 +37,7 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
36
37
|
canvasHeight,
|
|
37
38
|
xCellWidth
|
|
38
39
|
} = propItems;
|
|
40
|
+
const icons = /* @__PURE__ */ new Set();
|
|
39
41
|
function drawTitle() {
|
|
40
42
|
if (!left)
|
|
41
43
|
return;
|
|
@@ -74,7 +76,7 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
74
76
|
list.forEach((item) => {
|
|
75
77
|
var _a;
|
|
76
78
|
const targetList = !item.linkKey ? item.list : (_a = list.find((_item) => _item.key === item.linkKey)) == null ? void 0 : _a.list;
|
|
77
|
-
let firstPointLeft =
|
|
79
|
+
let firstPointLeft = 0;
|
|
78
80
|
targetList.find((k) => {
|
|
79
81
|
let con = false;
|
|
80
82
|
if (isEffectiveNode(k)) {
|
|
@@ -85,18 +87,18 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
85
87
|
}
|
|
86
88
|
return con;
|
|
87
89
|
});
|
|
88
|
-
item.limitRight = firstPointLeft - xCellWidth;
|
|
90
|
+
item.limitRight = firstPointLeft ? firstPointLeft - xCellWidth : endX;
|
|
89
91
|
});
|
|
90
92
|
const externalIconList = cloneDeep(left.externalIconList || []).map((item) => ({
|
|
91
93
|
...item,
|
|
92
94
|
isExternal: true
|
|
93
95
|
}));
|
|
94
|
-
const { projectNameMargin = [5, 30], titleWidth = 20 } = left;
|
|
96
|
+
const { projectNameMargin = [5, 30], titleWidth = 20, projectNameLineHeight = 10 } = left;
|
|
95
97
|
let topY = endY + markHeight + extracorporealCirculationHeight - projectNameMargin[0];
|
|
96
98
|
const leftX = titleWidth + projectNameMargin[1];
|
|
97
99
|
const iconList = [];
|
|
98
100
|
externalIconList.concat(list.reverse()).forEach((item) => {
|
|
99
|
-
topY -=
|
|
101
|
+
topY -= projectNameLineHeight;
|
|
100
102
|
const title = item.title;
|
|
101
103
|
const { text, icon } = drawTextAndIconGroup(title, item, {
|
|
102
104
|
text: {
|
|
@@ -107,7 +109,7 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
107
109
|
leftX,
|
|
108
110
|
topY,
|
|
109
111
|
originX: "center",
|
|
110
|
-
...item.isExternal
|
|
112
|
+
...item.isExternal && { evented: false, selectable: false },
|
|
111
113
|
origin: {
|
|
112
114
|
linkKey: item.linkKey,
|
|
113
115
|
limitRight: item.limitRight
|
|
@@ -130,8 +132,15 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
130
132
|
}
|
|
131
133
|
});
|
|
132
134
|
icon.linkPoints = linkPoints;
|
|
135
|
+
icons.add(icon);
|
|
133
136
|
});
|
|
134
137
|
}
|
|
138
|
+
function listener(params) {
|
|
139
|
+
const { limitRight, key } = params;
|
|
140
|
+
const icon = Array.from(icons).find((_icon) => _icon.origin.key === key);
|
|
141
|
+
icon && setLimitRight(icon, limitRight);
|
|
142
|
+
}
|
|
143
|
+
singlePointAddEventBus.on(listener);
|
|
135
144
|
function setPointEvent(point) {
|
|
136
145
|
point.on("moving", () => {
|
|
137
146
|
point.set("originX", "center");
|
|
@@ -153,17 +162,17 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
153
162
|
handleAddPrevent("repeat");
|
|
154
163
|
} else {
|
|
155
164
|
const params = {
|
|
156
|
-
data:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
165
|
+
data: [
|
|
166
|
+
{
|
|
167
|
+
time: getXValue(point.left),
|
|
168
|
+
value: getYValue(point.origin.type, point.top),
|
|
169
|
+
...point.origin.linkKey && { key: point.origin.key }
|
|
170
|
+
}
|
|
171
|
+
],
|
|
161
172
|
...point.origin
|
|
162
173
|
};
|
|
163
174
|
const limitRight = point.left - xCellWidth;
|
|
164
|
-
point
|
|
165
|
-
_point.origin.limitRight = limitRight;
|
|
166
|
-
});
|
|
175
|
+
setLimitRight(point, limitRight);
|
|
167
176
|
emits("add", omit(params, ["limitRight"]));
|
|
168
177
|
updateData({ ...params, key });
|
|
169
178
|
}
|
|
@@ -172,6 +181,11 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
172
181
|
setRestore(point);
|
|
173
182
|
});
|
|
174
183
|
}
|
|
184
|
+
function setLimitRight(point, limitRight) {
|
|
185
|
+
point.linkPoints.forEach((_point) => {
|
|
186
|
+
_point.origin.limitRight = limitRight;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
175
189
|
function setRestore(point) {
|
|
176
190
|
point.setCoords().set({ originX: "left", left: point.originLeft, top: point.originTop });
|
|
177
191
|
}
|
|
@@ -244,6 +258,9 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
|
|
|
244
258
|
drawYScale();
|
|
245
259
|
drawIcons();
|
|
246
260
|
drawBorder();
|
|
261
|
+
onBeforeUnmount(() => {
|
|
262
|
+
singlePointAddEventBus.off(listener);
|
|
263
|
+
});
|
|
247
264
|
}
|
|
248
265
|
|
|
249
266
|
export { useLeft };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { fabric } from '../../../../../shared/utils/fabricjs';
|
|
3
|
-
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
|
3
|
+
import { IPointTipProps, IPointMenuProps, PopupMenuItem, ICoordinateValue } from '../../../../../components/fabric-chart/src/interface';
|
|
4
4
|
import { AnyObject } from '../../../../../shared/types';
|
|
5
5
|
export declare function useOther(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps, moveLimit: Function, getContainPoints: Function, showDialog: Function, removeCurrentSelection: Function): {
|
|
6
|
-
clickMenu: ({ item, target }: {
|
|
7
|
-
item:
|
|
6
|
+
clickMenu: ({ item, target, pointer }: {
|
|
7
|
+
item: PopupMenuItem;
|
|
8
8
|
target: any;
|
|
9
|
+
pointer: ICoordinateValue;
|
|
9
10
|
}) => void;
|
|
10
11
|
handleKeydown: (evt: KeyboardEvent) => void;
|
|
11
12
|
};
|
|
@@ -15,7 +15,7 @@ import './useTop.js';
|
|
|
15
15
|
import '@vueuse/core';
|
|
16
16
|
import '../../../../../shared/utils/index.js';
|
|
17
17
|
|
|
18
|
-
const NEW_OTHER_MENU = filter(OTHER_MENU, (o) => o.
|
|
18
|
+
const NEW_OTHER_MENU = filter(OTHER_MENU, (o) => o.key !== "add");
|
|
19
19
|
function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveLimit, getContainPoints, showDialog, removeCurrentSelection) {
|
|
20
20
|
const { computedX, getXValue } = useBirthProcessCumputedPoint(propItems);
|
|
21
21
|
const { getEqualXTypes, handleAddPrevent, isGridLimit, getPointEventProps } = useCommon(canvas, emits, propItems);
|
|
@@ -216,14 +216,14 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
|
|
|
216
216
|
});
|
|
217
217
|
canvas.value.add(...gridPointsMap.get(key));
|
|
218
218
|
}
|
|
219
|
-
function clickMenu({ item, target }) {
|
|
219
|
+
function clickMenu({ item, target, pointer }) {
|
|
220
220
|
if (!target)
|
|
221
221
|
return;
|
|
222
|
-
const {
|
|
222
|
+
const { key, _type } = item;
|
|
223
223
|
const params = { ...target.origin, type: _type };
|
|
224
|
-
emits(
|
|
225
|
-
if (
|
|
226
|
-
updateData(params,
|
|
224
|
+
emits(key, params);
|
|
225
|
+
if (key === "remove") {
|
|
226
|
+
updateData(params, key);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
function updateData(params, mode = "add") {
|
|
@@ -447,7 +447,6 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
|
|
|
447
447
|
pointMenuProps.list = NEW_OTHER_MENU.map((item) => {
|
|
448
448
|
return {
|
|
449
449
|
...item,
|
|
450
|
-
renderItem: () => item.label,
|
|
451
450
|
_type: "other"
|
|
452
451
|
};
|
|
453
452
|
});
|
package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { reactive, ref,
|
|
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
|
|
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
|
-
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
78
|
-
(n) => n === 0 ? cloneXAxis.startTime : format(new Date(startTime
|
|
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
|
-
|
|
54
|
+
const xAxis = {
|
|
81
55
|
...cloneXAxis,
|
|
82
56
|
list,
|
|
83
|
-
left: originX
|
|
57
|
+
left: originX
|
|
84
58
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
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(
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import { fabric } from '../../../../../shared/utils/fabricjs';
|
|
3
3
|
import { AnyObject } from '../../../../../shared/types';
|
|
4
|
-
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
|
4
|
+
import { IPointTipProps, IPointMenuProps, ICoordinateValue, PopupMenuItem } from '../../../../../components/fabric-chart/src/interface';
|
|
5
5
|
export declare function useTop(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
|
6
6
|
redrawLinePoints: () => void;
|
|
7
|
-
clickMenu: ({ item, target }: {
|
|
8
|
-
item:
|
|
7
|
+
clickMenu: ({ item, target, pointer }: {
|
|
8
|
+
item: PopupMenuItem;
|
|
9
9
|
target: any;
|
|
10
|
+
pointer: ICoordinateValue;
|
|
10
11
|
}) => void;
|
|
11
12
|
};
|
|
@@ -18,7 +18,7 @@ import '@vueuse/core';
|
|
|
18
18
|
import './useOther.js';
|
|
19
19
|
import '../../../../../shared/utils/index.js';
|
|
20
20
|
|
|
21
|
-
const NEW_OTHER_MENU = filter(OTHER_MENU, (o) => o.
|
|
21
|
+
const NEW_OTHER_MENU = filter(OTHER_MENU, (o) => o.key !== "add");
|
|
22
22
|
function findTreeItem(tree, type, [x, y]) {
|
|
23
23
|
var _a, _b;
|
|
24
24
|
let item = null;
|
|
@@ -776,8 +776,6 @@ function useTop(canvas, propItems, emits, pointTipProps, pointMenuProps) {
|
|
|
776
776
|
pointMenuProps.list = NEW_OTHER_MENU.concat(treeMenuList).map((item) => {
|
|
777
777
|
return {
|
|
778
778
|
...item,
|
|
779
|
-
renderItem: () => item.label,
|
|
780
|
-
type: item.key || item.type,
|
|
781
779
|
_type: "tree"
|
|
782
780
|
};
|
|
783
781
|
});
|
|
@@ -793,21 +791,22 @@ function useTop(canvas, propItems, emits, pointTipProps, pointMenuProps) {
|
|
|
793
791
|
}
|
|
794
792
|
function clickMenu({
|
|
795
793
|
item,
|
|
796
|
-
target
|
|
794
|
+
target,
|
|
795
|
+
pointer
|
|
797
796
|
}) {
|
|
798
797
|
var _a;
|
|
799
798
|
if (!target)
|
|
800
799
|
return;
|
|
801
800
|
const {
|
|
802
|
-
|
|
801
|
+
key,
|
|
803
802
|
_type
|
|
804
803
|
} = item;
|
|
805
804
|
const params = {
|
|
806
805
|
...target.origin,
|
|
807
806
|
type: _type
|
|
808
807
|
};
|
|
809
|
-
if (NEW_OTHER_MENU.map((item2) => item2.
|
|
810
|
-
if (
|
|
808
|
+
if (NEW_OTHER_MENU.map((item2) => item2.key).includes(key)) {
|
|
809
|
+
if (key === "remove") {
|
|
811
810
|
const removeItemList = [...gridPoints].filter((p) => {
|
|
812
811
|
var _a2;
|
|
813
812
|
return ((_a2 = p.origin) == null ? void 0 : _a2.uuid) === params.uuid;
|
|
@@ -819,9 +818,9 @@ function useTop(canvas, propItems, emits, pointTipProps, pointMenuProps) {
|
|
|
819
818
|
});
|
|
820
819
|
}
|
|
821
820
|
}
|
|
822
|
-
emits(
|
|
821
|
+
emits(key, omit(params, ["uuid"]));
|
|
823
822
|
} else {
|
|
824
|
-
(_a = extraMenuConfig.click) == null ? void 0 : _a.call(extraMenuConfig,
|
|
823
|
+
(_a = extraMenuConfig.click) == null ? void 0 : _a.call(extraMenuConfig, key, omit(params, ["uuid"]));
|
|
825
824
|
}
|
|
826
825
|
}
|
|
827
826
|
useGrid(canvas, {
|
|
@@ -2,6 +2,7 @@ import { fabric } from '../../../../../shared/utils/fabricjs/index.js';
|
|
|
2
2
|
import { drawTextGroup, defaultTextStyle, defaultStyle } from '../useDraw.js';
|
|
3
3
|
import 'date-fns';
|
|
4
4
|
import 'lodash-es';
|
|
5
|
+
import '../../utils/eventBus.js';
|
|
5
6
|
import '../useEvent.js';
|
|
6
7
|
import '../useShadow.js';
|
|
7
8
|
import '../useCommon.js';
|