cnhis-design-vue 3.4.0-beta.9 → 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 +77 -50
- 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 +2 -1
- package/es/components/button-print/src/utils/print.js +13 -8
- package/es/components/callback/src/components/render/popupMaps.d.ts +110 -222
- package/es/components/classification/index.d.ts +123 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +123 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +123 -0
- package/es/components/classification/src/index.vue.d.ts +123 -0
- package/es/components/classification/src/index.vue2.js +7 -0
- package/es/components/date-picker/index.d.ts +41 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +41 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +34 -4
- 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 +18 -12
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +61 -33
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +86 -120
- 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 +21 -14
- 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 +16 -14
- 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 +15 -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 +83 -1
- package/es/components/field-set/src/FieldColor.vue2.js +2 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue2.js +2 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldSet.vue2.js +4 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +41 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +82 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +41 -0
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue2.js +1 -0
- 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/components/renderer/textarea.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/textarea.js +1 -1
- 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 +2785 -302
- package/es/components/iho-chat/src/Index.vue.d.ts +2785 -302
- 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 +796 -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 +217 -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 +134 -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 +109 -222
- package/es/components/iho-table/src/IhoTable.vue.d.ts +109 -222
- package/es/components/iho-table/src/IhoTable.vue2.js +23 -14
- package/es/components/iho-table/src/constants/index.d.ts +3 -3
- package/es/components/iho-table/src/constants/index.js +0 -21
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +39 -60
- 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 +43 -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 +41 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +25 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
- 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/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- 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 +38 -9
- 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/select-person/src/utils/index.js +11 -9
- package/es/components/shortcut-provider/src/hooks/useShortcuts.d.ts +3 -0
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +9 -3
- package/es/components/shortcut-setter/index.d.ts +2 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -0
- package/es/components/table-export-field/index.d.ts +6 -0
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +2 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +49 -18
- package/es/components/table-export-field/src/index.vue.d.ts +6 -0
- package/es/components/table-export-field/src/types/index.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +41 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +82 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +82 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +82 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +43 -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 +41 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +43 -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 +168 -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 +168 -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/CancelRadio/CancelRadio.js +3 -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/es/shared/utils/ho-edge.d.ts +12 -0
- package/es/shared/utils/ho-edge.js +58 -0
- package/package.json +3 -3
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import { i18n } from '../../../../../_virtual/_virtual_i18n-methods.js';
|
|
2
1
|
import { fabric } from '../../../../../shared/utils/fabricjs/index.js';
|
|
3
2
|
import { drawLine, defaultStyle, drawPoint, drawText, drawArrow } from '../useDraw.js';
|
|
4
3
|
import { useGrid } from '../useGrid.js';
|
|
5
4
|
import { format } from 'date-fns';
|
|
6
|
-
import { getType, getTime, isOneLine, isOverlapPoint, getFloorNumber, isValidValue, setOtherType, isEffectiveNode,
|
|
5
|
+
import { getType, getTime, isOneLine, isOverlapPoint, getFloorNumber, isValidValue, setOtherType, isEffectiveNode, getIndex } from '../../utils/index.js';
|
|
7
6
|
import { cloneDeep, omit, flatten, last } from 'lodash-es';
|
|
8
7
|
import '../useEvent.js';
|
|
9
8
|
import { useShadow } from '../useShadow.js';
|
|
10
9
|
import { useCommon } from '../useCommon.js';
|
|
11
10
|
import 'vue';
|
|
11
|
+
import { TEMPERATURE_MENU, PAIN_MENU, TITLE_MENU_MAP, OVERLAP } from '../../constants/index.js';
|
|
12
12
|
import 'naive-ui';
|
|
13
13
|
import '../surgicalAnesthesia/useTop.js';
|
|
14
14
|
import '@vueuse/core';
|
|
15
|
-
import { TEMPERATURE_MENU, PAIN_MENU, OVERLAP } from '../../constants/index.js';
|
|
16
15
|
import '../surgicalAnesthesia/useOther.js';
|
|
17
16
|
import '../../../../../shared/utils/index.js';
|
|
18
17
|
import { promiseTimeout } from '@vueuse/shared';
|
|
19
18
|
|
|
20
19
|
function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, getYValue, addRenderItem, pointTipProps, pointMenuProps) {
|
|
21
|
-
useGrid(canvas, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
const {
|
|
26
|
-
getEqualXTypes,
|
|
27
|
-
handleAddPrevent,
|
|
28
|
-
getPointEventProps
|
|
29
|
-
} = useCommon(canvas, emits, propItems);
|
|
30
|
-
const {
|
|
31
|
-
createShadowLines
|
|
32
|
-
} = useShadow();
|
|
20
|
+
useGrid(canvas, { ...propItems, isTemperature: true });
|
|
21
|
+
const { getEqualXTypes, handleAddPrevent, getPointEventProps } = useCommon(canvas, emits, propItems);
|
|
22
|
+
const { createShadowLines } = useShadow();
|
|
33
23
|
const {
|
|
34
24
|
left,
|
|
35
25
|
xScaleList,
|
|
@@ -75,21 +65,20 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
75
65
|
}
|
|
76
66
|
function drawBorder() {
|
|
77
67
|
const borderList = [];
|
|
78
|
-
borderList.push(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
68
|
+
borderList.push(
|
|
69
|
+
new fabric.Rect({
|
|
70
|
+
left: iconsWidth,
|
|
71
|
+
top: 0,
|
|
72
|
+
width: canvasWidth - iconsWidth - borderStyle.strokeWidth,
|
|
73
|
+
height: canvasHeight - borderStyle.strokeWidth,
|
|
74
|
+
fill: "transparent",
|
|
75
|
+
...borderStyle
|
|
76
|
+
})
|
|
77
|
+
);
|
|
86
78
|
if (painBorderColor) {
|
|
87
79
|
const painTop = painOriginY.originY - painSurplusCell[0] * yCellHeight;
|
|
88
80
|
const painEndTop = painTop + painHeight + (painSurplusCell[0] + painSurplusCell[1]) * yCellHeight - 1;
|
|
89
|
-
const style = {
|
|
90
|
-
...borderStyle,
|
|
91
|
-
stroke: painBorderColor
|
|
92
|
-
};
|
|
81
|
+
const style = { ...borderStyle, stroke: painBorderColor };
|
|
93
82
|
const topLine = drawLine([iconsWidth, painTop, endX, painTop], style);
|
|
94
83
|
const bottomLine = drawLine([iconsWidth, painEndTop, endX, painEndTop], style);
|
|
95
84
|
borderList.push(topLine, bottomLine);
|
|
@@ -104,7 +93,9 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
104
93
|
Array.from(gridPoints).forEach((point) => {
|
|
105
94
|
var _a, _b;
|
|
106
95
|
if (((_a = point == null ? void 0 : point.origin) == null ? void 0 : _a.type) === "pulse") {
|
|
107
|
-
if (pointerItem.find(
|
|
96
|
+
if (pointerItem.find(
|
|
97
|
+
(pointer) => Math.abs(point.left - pointer[0]) <= 1 && Math.abs(point.top - pointer[1]) <= 1
|
|
98
|
+
)) {
|
|
108
99
|
if (((_b = point == null ? void 0 : point.origin) == null ? void 0 : _b.key) === SHADOWKEYS[0]) {
|
|
109
100
|
heartRatePoints.push(point);
|
|
110
101
|
} else {
|
|
@@ -134,6 +125,33 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
134
125
|
const line = drawLine([originX, y, endX, y], scaleValue.positionLine);
|
|
135
126
|
canvas.value.add(line);
|
|
136
127
|
}
|
|
128
|
+
function creatShaDowBorder(points, mode, style) {
|
|
129
|
+
const borderGroup = new fabric.Group();
|
|
130
|
+
const lines = [];
|
|
131
|
+
const drawnLines = /* @__PURE__ */ new Set();
|
|
132
|
+
for (let i = 0; i < points.length; i++) {
|
|
133
|
+
const nextIndex = (i + 1) % points.length;
|
|
134
|
+
const startPoint = points[i];
|
|
135
|
+
const endPoint = points[nextIndex];
|
|
136
|
+
const lineKey1 = `${startPoint.x},${startPoint.y},${endPoint.x},${endPoint.y}`;
|
|
137
|
+
const lineKey2 = `${endPoint.x},${endPoint.y},${startPoint.x},${startPoint.y}`;
|
|
138
|
+
if (drawnLines.has(lineKey1) || drawnLines.has(lineKey2)) {
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (startPoint.x === endPoint.x && startPoint.y === endPoint.y || mode === "line" && startPoint.x === endPoint.x) {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
drawnLines.add(lineKey1);
|
|
145
|
+
const line = new fabric.Line([startPoint.x, startPoint.y, endPoint.x, endPoint.y], {
|
|
146
|
+
...defaultStyle,
|
|
147
|
+
...style,
|
|
148
|
+
strokeWidth: 1
|
|
149
|
+
});
|
|
150
|
+
lines.push(line);
|
|
151
|
+
}
|
|
152
|
+
borderGroup.add(...lines).addWithUpdate().set(defaultStyle);
|
|
153
|
+
return borderGroup;
|
|
154
|
+
}
|
|
137
155
|
function drawShaDow(target) {
|
|
138
156
|
var _a;
|
|
139
157
|
const pulseObj = yScaleValue.find((item) => item.show && item.type === "pulse");
|
|
@@ -144,56 +162,42 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
144
162
|
shadowLinesCache.clear();
|
|
145
163
|
if (shadowPointCache.size > 1) {
|
|
146
164
|
if (target) {
|
|
147
|
-
const {
|
|
148
|
-
type,
|
|
149
|
-
key
|
|
150
|
-
} = target.origin || {};
|
|
165
|
+
const { type, key } = target.origin || {};
|
|
151
166
|
if (type === "pulse") {
|
|
152
167
|
const list = shadowPointCache.get(key);
|
|
153
168
|
const index = list == null ? void 0 : list.findIndex((point) => point.left === target.left);
|
|
154
|
-
list.splice(index, 1, {
|
|
155
|
-
...list[index],
|
|
156
|
-
left: target.left,
|
|
157
|
-
top: target.top
|
|
158
|
-
});
|
|
169
|
+
list.splice(index, 1, { ...list[index], left: target.left, top: target.top });
|
|
159
170
|
}
|
|
160
171
|
}
|
|
161
|
-
const data = getShadowData();
|
|
172
|
+
const { data, otherLineData } = getShadowData();
|
|
162
173
|
if (data.length > 0) {
|
|
163
174
|
removePulsePointLine(data);
|
|
164
175
|
}
|
|
165
|
-
const {
|
|
166
|
-
mode,
|
|
167
|
-
style = {}
|
|
168
|
-
} = pulseObj.shadow || {};
|
|
176
|
+
const { mode, style = {} } = pulseObj.shadow || {};
|
|
169
177
|
data.forEach((item) => {
|
|
170
|
-
const points = item.map((v) => ({
|
|
171
|
-
|
|
172
|
-
y: v[1]
|
|
173
|
-
}));
|
|
174
|
-
const polygon = new fabric.Polygon(points, {
|
|
178
|
+
const points = item.map((v) => ({ x: v[0], y: v[1] }));
|
|
179
|
+
const polygon = mode === "color" ? new fabric.Polygon(points, {
|
|
175
180
|
...defaultStyle,
|
|
176
181
|
...style,
|
|
177
182
|
strokeWidth: 1
|
|
178
|
-
});
|
|
183
|
+
}) : creatShaDowBorder(points, mode, style);
|
|
179
184
|
if (["slash", "line"].includes(mode)) {
|
|
180
|
-
polygon.set({
|
|
181
|
-
fill: "transparent",
|
|
182
|
-
stroke: style.stroke || "#f00"
|
|
183
|
-
});
|
|
184
185
|
const shadowLines = [];
|
|
185
186
|
if (["slash"].includes(mode)) {
|
|
186
187
|
shadowLines.push(...createShadowLines(item, style._angle, style.space, omit(style, ["_angle", "space"])));
|
|
187
188
|
shadowLines.forEach((l) => {
|
|
188
189
|
shadowLinesCache.add(l);
|
|
189
190
|
});
|
|
190
|
-
} else {
|
|
191
|
+
} else if (!style.onlyBorder) {
|
|
191
192
|
const finalData = getLineData(item);
|
|
192
|
-
finalData.
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
originX: "center"
|
|
193
|
+
if (finalData.length > 0) {
|
|
194
|
+
const otherFilters = otherLineData.filter(([[x1, _]]) => {
|
|
195
|
+
return item.some(([x]) => Math.trunc(x) === Math.trunc(x1));
|
|
196
196
|
});
|
|
197
|
+
finalData.push(...otherFilters);
|
|
198
|
+
}
|
|
199
|
+
finalData.forEach((_item) => {
|
|
200
|
+
const l = drawLine([...flatten(_item)], { ...style, originX: "center" });
|
|
197
201
|
shadowLines.push(l);
|
|
198
202
|
shadowLinesCache.add(l);
|
|
199
203
|
});
|
|
@@ -211,7 +215,9 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
211
215
|
acc[key] = !acc[key] ? [cur] : acc[key].concat([cur]);
|
|
212
216
|
return acc;
|
|
213
217
|
}, {});
|
|
214
|
-
const finalResult = Object.values(result).filter(
|
|
218
|
+
const finalResult = Object.values(result).filter(
|
|
219
|
+
(item) => item.length === 2 && Math.trunc(item[0][1]) !== Math.trunc(item[1][1])
|
|
220
|
+
);
|
|
215
221
|
return finalResult;
|
|
216
222
|
}
|
|
217
223
|
function getXY(point) {
|
|
@@ -222,23 +228,36 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
222
228
|
}
|
|
223
229
|
function getShadowData() {
|
|
224
230
|
const data = [];
|
|
231
|
+
const otherLineData = [];
|
|
225
232
|
const pulsePoints = [];
|
|
226
233
|
const sames = [];
|
|
227
234
|
for (const item of shadowPointCache) {
|
|
228
235
|
pulsePoints.push(item[1]);
|
|
229
236
|
if (item[0] === SHADOWKEYS[0]) {
|
|
230
237
|
item[1].forEach((_item) => {
|
|
231
|
-
const someIndex = (shadowPointCache.get(SHADOWKEYS[1]) || []).findIndex(
|
|
232
|
-
|
|
238
|
+
const someIndex = (shadowPointCache.get(SHADOWKEYS[1]) || []).findIndex(
|
|
239
|
+
(v) => v.left === _item.left || v.time === _item.time
|
|
240
|
+
);
|
|
241
|
+
someIndex > -1 && sames.push({ time: _item.time, left: _item.left });
|
|
233
242
|
});
|
|
234
243
|
}
|
|
235
244
|
}
|
|
236
245
|
const [points1, points2] = pulsePoints;
|
|
237
246
|
let _arr1 = [];
|
|
238
247
|
let _arr2 = [];
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
const
|
|
248
|
+
const setData = () => {
|
|
249
|
+
const dataItem = [..._arr1, ..._arr2.reverse()];
|
|
250
|
+
const [firstPoint] = dataItem;
|
|
251
|
+
const lastPoint = last(dataItem);
|
|
252
|
+
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1])
|
|
253
|
+
dataItem.splice(-1, 1);
|
|
254
|
+
data.push(dataItem);
|
|
255
|
+
_arr1 = [];
|
|
256
|
+
_arr2 = [];
|
|
257
|
+
};
|
|
258
|
+
sames.forEach(({ time, left: left2 }) => {
|
|
259
|
+
const index1 = points1.findIndex((point) => point.left === left2 || point.time === time);
|
|
260
|
+
const index2 = points2.findIndex((point) => point.left === left2 || point.time === time);
|
|
242
261
|
const currentPoint1 = points1[index1];
|
|
243
262
|
const currentPoint2 = points2[index2];
|
|
244
263
|
const prevPoint1 = getPointWidthRightLine(points1[index1 - 1]);
|
|
@@ -246,7 +265,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
246
265
|
const prevPoint2 = getPointWidthRightLine(points2[index2 - 1]);
|
|
247
266
|
const nextPoint2 = points2[index2 + 1];
|
|
248
267
|
if (prevPoint1 && prevPoint2) {
|
|
249
|
-
if (prevPoint1.left !== prevPoint2.left) {
|
|
268
|
+
if (prevPoint1.left !== prevPoint2.left && prevPoint1.time !== prevPoint2.time) {
|
|
250
269
|
const maxPoint = Math.max(prevPoint1.left, prevPoint2.left);
|
|
251
270
|
_arr1.push(getXY([prevPoint1, prevPoint2].find((point) => point.left === maxPoint)));
|
|
252
271
|
}
|
|
@@ -255,16 +274,6 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
255
274
|
} else if (prevPoint2) {
|
|
256
275
|
_arr2.push(getXY(prevPoint2));
|
|
257
276
|
}
|
|
258
|
-
const setData = () => {
|
|
259
|
-
const dataItem = [..._arr1, ..._arr2.reverse()];
|
|
260
|
-
const [firstPoint] = dataItem;
|
|
261
|
-
const lastPoint = last(dataItem);
|
|
262
|
-
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1])
|
|
263
|
-
dataItem.splice(-1, 1);
|
|
264
|
-
data.push(dataItem);
|
|
265
|
-
_arr1 = [];
|
|
266
|
-
_arr2 = [];
|
|
267
|
-
};
|
|
268
277
|
const minYPoint = Math.min(currentPoint1.top, currentPoint2.top);
|
|
269
278
|
const maxYPoint = Math.max(currentPoint1.top, currentPoint2.top);
|
|
270
279
|
_arr1.push(getXY([currentPoint1, currentPoint2].find((point) => point.top === minYPoint)));
|
|
@@ -274,7 +283,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
274
283
|
}
|
|
275
284
|
if (!currentPoint1.breakpoint && !currentPoint2.breakpoint) {
|
|
276
285
|
if (nextPoint1 && nextPoint2) {
|
|
277
|
-
if (nextPoint1.left !== nextPoint2.left) {
|
|
286
|
+
if (nextPoint1.left !== nextPoint2.left && nextPoint1.time !== nextPoint2.time) {
|
|
278
287
|
const minPoint = Math.min(nextPoint1.left, nextPoint2.left);
|
|
279
288
|
_arr1.push(getXY([nextPoint1, nextPoint2].find((point) => point.left === minPoint)));
|
|
280
289
|
setData();
|
|
@@ -289,32 +298,23 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
289
298
|
setData();
|
|
290
299
|
}
|
|
291
300
|
}
|
|
301
|
+
if (currentPoint1.time === currentPoint2.time && currentPoint1.left != currentPoint2.left && currentPoint1.top != currentPoint2.top) {
|
|
302
|
+
otherLineData.push([getXY(currentPoint1), getXY(currentPoint2)]);
|
|
303
|
+
}
|
|
292
304
|
});
|
|
293
|
-
return data;
|
|
305
|
+
return { data, otherLineData };
|
|
294
306
|
}
|
|
295
307
|
function setCanvasEvent() {
|
|
296
308
|
canvas.value.on("mouse:up", (event2) => {
|
|
297
|
-
const {
|
|
298
|
-
button,
|
|
299
|
-
target,
|
|
300
|
-
pointer = {}
|
|
301
|
-
} = event2;
|
|
309
|
+
const { button, target, pointer = {} } = event2;
|
|
302
310
|
if (button === 3) {
|
|
303
311
|
if (!propItems.event.evented)
|
|
304
312
|
return;
|
|
305
|
-
const {
|
|
306
|
-
x = 0,
|
|
307
|
-
y = 0
|
|
308
|
-
} = pointer;
|
|
313
|
+
const { x = 0, y = 0 } = pointer;
|
|
309
314
|
if (x >= originX && x <= endX && y >= originY && y <= endY) {
|
|
310
|
-
pointMenuProps.point = {
|
|
311
|
-
x,
|
|
312
|
-
y
|
|
313
|
-
};
|
|
315
|
+
pointMenuProps.point = { x, y };
|
|
314
316
|
pointMenuProps.show = true;
|
|
315
|
-
const {
|
|
316
|
-
type
|
|
317
|
-
} = (target == null ? void 0 : target.origin) || {};
|
|
317
|
+
const { type } = (target == null ? void 0 : target.origin) || {};
|
|
318
318
|
if (target && ["temperature", "pain"].includes(type)) {
|
|
319
319
|
if (type === "temperature") {
|
|
320
320
|
pointMenuProps.list = [...TEMPERATURE_MENU];
|
|
@@ -325,7 +325,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
325
325
|
pointMenuProps.target = target;
|
|
326
326
|
} else {
|
|
327
327
|
pointMenuProps.target = null;
|
|
328
|
-
pointMenuProps.list = [
|
|
328
|
+
pointMenuProps.list = [TITLE_MENU_MAP.add];
|
|
329
329
|
itemList.forEach((v) => {
|
|
330
330
|
if (!getEqualXTypes([...gridPoints], x, "_type").includes(v.bigType)) {
|
|
331
331
|
const newY = ["pain"].includes(v.bigType) ? painOriginY : vitalSignsOriginY;
|
|
@@ -340,7 +340,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
340
340
|
key: v.key,
|
|
341
341
|
isOneLine: v.isOneLine
|
|
342
342
|
},
|
|
343
|
-
|
|
343
|
+
key: v.key
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -356,10 +356,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
356
356
|
if (button === 1) {
|
|
357
357
|
if (target)
|
|
358
358
|
return;
|
|
359
|
-
const {
|
|
360
|
-
x = 0,
|
|
361
|
-
y = 0
|
|
362
|
-
} = pointer;
|
|
359
|
+
const { x = 0, y = 0 } = pointer;
|
|
363
360
|
if (x >= originX && x <= endX && y > 0 && y < canvasHeight) {
|
|
364
361
|
emits("click:grid", {
|
|
365
362
|
x,
|
|
@@ -396,10 +393,12 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
396
393
|
type = key;
|
|
397
394
|
}
|
|
398
395
|
const styleKey = overlapKey || key;
|
|
399
|
-
points.push(
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
396
|
+
points.push(
|
|
397
|
+
drawPoint(type, {
|
|
398
|
+
...overlap[styleKey],
|
|
399
|
+
...pointer
|
|
400
|
+
})
|
|
401
|
+
);
|
|
403
402
|
}
|
|
404
403
|
}
|
|
405
404
|
});
|
|
@@ -429,10 +428,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
429
428
|
dataList = [],
|
|
430
429
|
list: scaleList = []
|
|
431
430
|
} = scaleValue;
|
|
432
|
-
const {
|
|
433
|
-
type: nonePainPointType,
|
|
434
|
-
textStyle: nonePainPointTextStyle
|
|
435
|
-
} = nonePainPointStyle;
|
|
431
|
+
const { type: nonePainPointType, textStyle: nonePainPointTextStyle } = nonePainPointStyle;
|
|
436
432
|
const pointList = [];
|
|
437
433
|
const lineList = [];
|
|
438
434
|
const otherList = [];
|
|
@@ -443,19 +439,11 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
443
439
|
const _isOneLine = isOneLine(scaleValue);
|
|
444
440
|
(_a = item.list) == null ? void 0 : _a.forEach((v, index) => {
|
|
445
441
|
const _item = !_isOneLine ? item : dataList.find((_v) => _v.key === v.key);
|
|
446
|
-
const points = getPointer(isRespirator(v) ? {
|
|
447
|
-
...v,
|
|
448
|
-
value: respiratorStyle.fixedValue
|
|
449
|
-
} : v, scaleValue);
|
|
442
|
+
const points = getPointer(isRespirator(v) ? { ...v, value: respiratorStyle.fixedValue } : v, scaleValue);
|
|
450
443
|
const nextV = item.list[index + 1];
|
|
451
|
-
const nextPoint = nextV ? getPointer(isRespirator(nextV) ? {
|
|
452
|
-
...nextV,
|
|
453
|
-
value: respiratorStyle.fixedValue
|
|
454
|
-
} : nextV, scaleValue) : void 0;
|
|
444
|
+
const nextPoint = nextV ? getPointer(isRespirator(nextV) ? { ...nextV, value: respiratorStyle.fixedValue } : nextV, scaleValue) : void 0;
|
|
455
445
|
const nextItem = nextV ? !_isOneLine ? item : dataList.find((_v) => _v.key === nextV.key) : {};
|
|
456
|
-
const {
|
|
457
|
-
key = ""
|
|
458
|
-
} = _item;
|
|
446
|
+
const { key = "" } = _item;
|
|
459
447
|
const mai = "mai";
|
|
460
448
|
if (!(key === mai && nextItem.key !== mai || key !== mai && nextItem.key === mai) && points && nextPoint && getFloorNumber(points[0], 1) === getFloorNumber(nextPoint[0], 1)) {
|
|
461
449
|
const pointOriginX = points[0] - xCellWidth / 2;
|
|
@@ -477,7 +465,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
477
465
|
let nextDoublePointsX2 = null;
|
|
478
466
|
const getData = (data) => {
|
|
479
467
|
return data.map((point, index, arr) => {
|
|
480
|
-
var _a2, _b;
|
|
468
|
+
var _a2, _b, _c, _d;
|
|
481
469
|
const nextPoint = arr[index + 1];
|
|
482
470
|
if (nextPoint && getFloorNumber(point.left, 1) === getFloorNumber(nextPoint.left, 1)) {
|
|
483
471
|
const pointOriginX = point.left - xCellWidth / 2;
|
|
@@ -492,11 +480,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
492
480
|
}
|
|
493
481
|
nextDoublePointsX2 = null;
|
|
494
482
|
}
|
|
495
|
-
return {
|
|
496
|
-
left: point.left,
|
|
497
|
-
top: point.top,
|
|
498
|
-
breakpoint: !point.rightLine
|
|
499
|
-
};
|
|
483
|
+
return { time: (_d = (_c = point.origin) == null ? void 0 : _c.data) == null ? void 0 : _d.time, left: point.left, top: point.top, breakpoint: !point.rightLine };
|
|
500
484
|
});
|
|
501
485
|
};
|
|
502
486
|
if (_isOneLine) {
|
|
@@ -509,9 +493,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
509
493
|
shadowPointCache.set(key, getData(pulsePoints[key]));
|
|
510
494
|
});
|
|
511
495
|
} else {
|
|
512
|
-
const {
|
|
513
|
-
key
|
|
514
|
-
} = item;
|
|
496
|
+
const { key } = item;
|
|
515
497
|
shadowPointCache.set(key, getData(pointList));
|
|
516
498
|
}
|
|
517
499
|
}
|
|
@@ -520,9 +502,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
520
502
|
function drawValue(points, v, _item) {
|
|
521
503
|
if (!(points == null ? void 0 : points.length) || !config.showValue)
|
|
522
504
|
return;
|
|
523
|
-
const {
|
|
524
|
-
lineAttr = {}
|
|
525
|
-
} = _item;
|
|
505
|
+
const { lineAttr = {} } = _item;
|
|
526
506
|
const y = points[1] <= vitalSignsOriginY.originY + yCellHeight ? points[1] + yCellHeight : points[1] - yCellHeight;
|
|
527
507
|
const value = drawText([points[0], y], {
|
|
528
508
|
value: isRespirator(v) ? respiratorStyle.fixedValue : v.value,
|
|
@@ -537,7 +517,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
537
517
|
};
|
|
538
518
|
}
|
|
539
519
|
function drawOther(points, v, _item, otherObj) {
|
|
540
|
-
var _a2, _b, _c;
|
|
520
|
+
var _a2, _b, _c, _d;
|
|
541
521
|
if (!["temperature", "pain", "breathe"].includes(type))
|
|
542
522
|
return;
|
|
543
523
|
if (!(points == null ? void 0 : points.length) && type === "temperature" && !isLimit(v.time))
|
|
@@ -546,13 +526,8 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
546
526
|
return;
|
|
547
527
|
if (!v.value && type === "breathe")
|
|
548
528
|
return;
|
|
549
|
-
const {
|
|
550
|
-
|
|
551
|
-
key
|
|
552
|
-
} = _item;
|
|
553
|
-
const {
|
|
554
|
-
value
|
|
555
|
-
} = otherObj;
|
|
529
|
+
const { lineAttr = {}, key } = _item;
|
|
530
|
+
const { value } = otherObj;
|
|
556
531
|
const x = computedX(v.time);
|
|
557
532
|
let reduceLine, reducePoint, noRise, riseText, verifiedText, respirator;
|
|
558
533
|
if (v.noRise && noRiseStyle.show) {
|
|
@@ -567,9 +542,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
567
542
|
gridPoints.add(noRise);
|
|
568
543
|
} else if (v.value) {
|
|
569
544
|
const top = y + yCellHeight * 2;
|
|
570
|
-
noRise = drawArrow([x, y, top], {
|
|
571
|
-
...noRiseStyle.style
|
|
572
|
-
});
|
|
545
|
+
noRise = drawArrow([x, y, top], { ...noRiseStyle.style });
|
|
573
546
|
}
|
|
574
547
|
noRise && otherList.push(noRise);
|
|
575
548
|
if (noRise && isFixed(noRiseStyle, v)) {
|
|
@@ -643,7 +616,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
643
616
|
},
|
|
644
617
|
verifiedText: {
|
|
645
618
|
obj: verifiedText,
|
|
646
|
-
left: xCellWidth / 2,
|
|
619
|
+
left: ((_d = verifiedStyle == null ? void 0 : verifiedStyle.position) == null ? void 0 : _d[key]) === "top-right" ? xCellWidth / 2 : 0,
|
|
647
620
|
top: (value ? -yCellHeight : 0) - 5
|
|
648
621
|
},
|
|
649
622
|
reducePoint: {
|
|
@@ -662,10 +635,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
662
635
|
const maxValue = Math.max(...scaleList);
|
|
663
636
|
const minValue = Math.min(...scaleList);
|
|
664
637
|
let upArrow, limitValue, belowMinValue;
|
|
665
|
-
const {
|
|
666
|
-
upArrowShow = false,
|
|
667
|
-
limitValueShow = false
|
|
668
|
-
} = _item;
|
|
638
|
+
const { upArrowShow = false, limitValueShow = false } = _item;
|
|
669
639
|
if (upArrowShow && +v.value > 180) {
|
|
670
640
|
let top = points[1] - yCellHeight * 2.5;
|
|
671
641
|
let yArr = [points[1] - yCellHeight / 2, top];
|
|
@@ -703,9 +673,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
703
673
|
});
|
|
704
674
|
} else {
|
|
705
675
|
const top = y + yCellHeight * 2;
|
|
706
|
-
belowMinValue = drawArrow([points[0], y, top], {
|
|
707
|
-
...belowMinValueStyle.style
|
|
708
|
-
});
|
|
676
|
+
belowMinValue = drawArrow([points[0], y, top], { ...belowMinValueStyle.style });
|
|
709
677
|
}
|
|
710
678
|
otherList.push(belowMinValue);
|
|
711
679
|
}
|
|
@@ -727,14 +695,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
727
695
|
function drawPointLine(points, nextPoint, v, index, _item, otherObj) {
|
|
728
696
|
let point;
|
|
729
697
|
let line;
|
|
730
|
-
const {
|
|
731
|
-
pointAttr = {},
|
|
732
|
-
lineAttr = {},
|
|
733
|
-
title = "",
|
|
734
|
-
key,
|
|
735
|
-
type: pointType = "circle",
|
|
736
|
-
overlapKey
|
|
737
|
-
} = _item;
|
|
698
|
+
const { pointAttr = {}, lineAttr = {}, title = "", key, type: pointType = "circle", overlapKey } = _item;
|
|
738
699
|
const pointHalfHeight = pointAttr.height ? pointAttr.height / 2 : 5;
|
|
739
700
|
const nextV = item.list[index + 1];
|
|
740
701
|
let newPoints = cloneDeep(points);
|
|
@@ -776,9 +737,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
776
737
|
line = drawLine([...newPoints, ...newNextPoint], {
|
|
777
738
|
...lineAttr
|
|
778
739
|
});
|
|
779
|
-
const {
|
|
780
|
-
obj: reduceObj
|
|
781
|
-
} = (otherObj == null ? void 0 : otherObj.reducePoint) || {};
|
|
740
|
+
const { obj: reduceObj } = (otherObj == null ? void 0 : otherObj.reducePoint) || {};
|
|
782
741
|
if (points && nextPoint && (reduceObj == null ? void 0 : reduceObj.top) < points[1] && (config == null ? void 0 : config.hypothermyViewCustom)) {
|
|
783
742
|
const reduceRightLine = drawLine([reduceObj.left, reduceObj.top, ...nextPoint], {
|
|
784
743
|
...lineAttr
|
|
@@ -797,10 +756,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
797
756
|
const previousLine = lineList[index - 1];
|
|
798
757
|
const pointAttrNew = {
|
|
799
758
|
origin: {
|
|
800
|
-
data: isRespirator(v) ? {
|
|
801
|
-
...v,
|
|
802
|
-
value: respiratorStyle.fixedValue
|
|
803
|
-
} : v,
|
|
759
|
+
data: isRespirator(v) ? { ...v, value: respiratorStyle.fixedValue } : v,
|
|
804
760
|
title,
|
|
805
761
|
key: key || "",
|
|
806
762
|
overlapKey,
|
|
@@ -817,11 +773,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
817
773
|
...v.pacemakerShow && type == "pulse" ? pacemaker.style : isRespirator(v) ? respiratorStyle.style : pointAttr,
|
|
818
774
|
...getPointEventProps(),
|
|
819
775
|
lockMovementX: true,
|
|
820
|
-
...isNonePain ? {
|
|
821
|
-
selectable: false,
|
|
822
|
-
evented: false,
|
|
823
|
-
...nonePainPointType === "number" ? nonePainPointTextStyle : {}
|
|
824
|
-
} : {}
|
|
776
|
+
...isNonePain ? { selectable: false, evented: false, ...nonePainPointType === "number" ? nonePainPointTextStyle : {} } : {}
|
|
825
777
|
};
|
|
826
778
|
if (points) {
|
|
827
779
|
if (!previousLine) {
|
|
@@ -872,9 +824,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
872
824
|
point.on("mouseup", (event2) => {
|
|
873
825
|
pointTipProps.show = false;
|
|
874
826
|
if (event2.button === 1) {
|
|
875
|
-
const {
|
|
876
|
-
type
|
|
877
|
-
} = point.origin;
|
|
827
|
+
const { type } = point.origin;
|
|
878
828
|
const value = getYValue(type, point.top);
|
|
879
829
|
const params = {
|
|
880
830
|
...point.origin,
|
|
@@ -890,12 +840,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
890
840
|
});
|
|
891
841
|
}
|
|
892
842
|
function setPopup(point, status = "moving") {
|
|
893
|
-
const {
|
|
894
|
-
title,
|
|
895
|
-
unit,
|
|
896
|
-
type,
|
|
897
|
-
data
|
|
898
|
-
} = point.origin;
|
|
843
|
+
const { title, unit, type, data } = point.origin;
|
|
899
844
|
pointTipProps.point = {
|
|
900
845
|
x: point.left,
|
|
901
846
|
y: point.top
|
|
@@ -904,10 +849,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
904
849
|
pointTipProps.list = [getListValue(), timeText];
|
|
905
850
|
pointTipProps.show = true;
|
|
906
851
|
function getListValue() {
|
|
907
|
-
const {
|
|
908
|
-
drugReduce,
|
|
909
|
-
physicsReduce
|
|
910
|
-
} = data || {};
|
|
852
|
+
const { drugReduce, physicsReduce } = data || {};
|
|
911
853
|
const value = status === "hover" ? data.value : getYValue(type, point.top);
|
|
912
854
|
if (isValidValue(drugReduce)) {
|
|
913
855
|
timeText += (data == null ? void 0 : data.changeTime) ? "\u2014>" + (data == null ? void 0 : data.changeTime.slice(-5)) : "";
|
|
@@ -932,37 +874,18 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
932
874
|
}
|
|
933
875
|
function updateLine(point) {
|
|
934
876
|
var _a, _b;
|
|
935
|
-
(_a = point.leftLine) == null ? void 0 : _a.setCoords().set({
|
|
936
|
-
|
|
937
|
-
y2: point.top
|
|
938
|
-
});
|
|
939
|
-
(_b = point.rightLine) == null ? void 0 : _b.setCoords().set({
|
|
940
|
-
x1: point.left,
|
|
941
|
-
y1: point.top
|
|
942
|
-
});
|
|
877
|
+
(_a = point.leftLine) == null ? void 0 : _a.setCoords().set({ x2: point.left, y2: point.top });
|
|
878
|
+
(_b = point.rightLine) == null ? void 0 : _b.setCoords().set({ x1: point.left, y1: point.top });
|
|
943
879
|
Object.values(point.otherObj).forEach((o) => {
|
|
944
|
-
const {
|
|
945
|
-
obj,
|
|
946
|
-
type = "",
|
|
947
|
-
top = 0,
|
|
948
|
-
isFixed: isFixed2,
|
|
949
|
-
moveHide = false,
|
|
950
|
-
left: left2 = 0
|
|
951
|
-
} = o || {};
|
|
880
|
+
const { obj, type = "", top = 0, isFixed: isFixed2, moveHide = false, left: left2 = 0 } = o || {};
|
|
952
881
|
if (type === "reduce")
|
|
953
882
|
return;
|
|
954
883
|
if (obj) {
|
|
955
884
|
if (type === "line") {
|
|
956
|
-
obj.setCoords().set({
|
|
957
|
-
x1: point.left,
|
|
958
|
-
y1: point.top
|
|
959
|
-
});
|
|
885
|
+
obj.setCoords().set({ x1: point.left, y1: point.top });
|
|
960
886
|
} else {
|
|
961
887
|
if (!isFixed2) {
|
|
962
|
-
obj.setCoords().set({
|
|
963
|
-
left: point.left + left2,
|
|
964
|
-
top: point.top + top
|
|
965
|
-
});
|
|
888
|
+
obj.setCoords().set({ left: point.left + left2, top: point.top + top });
|
|
966
889
|
}
|
|
967
890
|
if (moveHide) {
|
|
968
891
|
canvas.value.remove(obj);
|
|
@@ -1005,33 +928,25 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
1005
928
|
}
|
|
1006
929
|
return true;
|
|
1007
930
|
}
|
|
1008
|
-
function clickMenu({
|
|
1009
|
-
item,
|
|
1010
|
-
target
|
|
1011
|
-
}) {
|
|
931
|
+
function clickMenu({ item, target, pointer }) {
|
|
1012
932
|
if (!target) {
|
|
1013
933
|
const params = {
|
|
1014
934
|
data: {
|
|
1015
|
-
time: getXValue(
|
|
1016
|
-
value: getYValue(item.origin.type,
|
|
1017
|
-
|
|
1018
|
-
key: item.origin.key
|
|
1019
|
-
}
|
|
935
|
+
time: getXValue(pointer.x),
|
|
936
|
+
value: getYValue(item.origin.type, pointer.y),
|
|
937
|
+
...item.origin.isOneLine && { key: item.origin.key }
|
|
1020
938
|
},
|
|
1021
939
|
...item.origin
|
|
1022
940
|
};
|
|
1023
941
|
emits("add", params);
|
|
1024
942
|
updateData(params);
|
|
1025
943
|
} else {
|
|
1026
|
-
const {
|
|
944
|
+
const { data, type, isOneLine: isOneLine2, dataIndex, index } = target.origin;
|
|
945
|
+
const _data = omit(
|
|
1027
946
|
data,
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
index
|
|
1032
|
-
} = target.origin;
|
|
1033
|
-
const _data = deleteProperty(data, [...TEMPERATURE_MENU, ...PAIN_MENU]);
|
|
1034
|
-
_data[`${item.type}`] = item.value;
|
|
947
|
+
[...TEMPERATURE_MENU, ...PAIN_MENU].map((v) => v.key)
|
|
948
|
+
);
|
|
949
|
+
_data[`${item.key}`] = item.value;
|
|
1035
950
|
_data.changeTime = format(new Date(), "yyyy-MM-dd HH:mm");
|
|
1036
951
|
if (isOneLine2) {
|
|
1037
952
|
_data["key"] = target.origin.key;
|
|
@@ -1045,13 +960,7 @@ function useCenter(canvas, propItems, emits, computedX, computedY, getXValue, ge
|
|
|
1045
960
|
}
|
|
1046
961
|
}
|
|
1047
962
|
function updateData(params, mode = "add") {
|
|
1048
|
-
const {
|
|
1049
|
-
type,
|
|
1050
|
-
dataIndex,
|
|
1051
|
-
index,
|
|
1052
|
-
data,
|
|
1053
|
-
key
|
|
1054
|
-
} = params;
|
|
963
|
+
const { type, dataIndex, index, data, key } = params;
|
|
1055
964
|
const obj = yScaleValue.find((v) => v.type === type);
|
|
1056
965
|
if (mode === "add") {
|
|
1057
966
|
const dataList = !isOneLine(obj) ? obj.dataList[dataIndex] : obj.dataList.find((v) => v.enable);
|