cnhis-design-vue 3.2.7-release.1 → 3.2.7-release.3
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/README.md +87 -87
- package/es/components/base-search/index.d.ts +2 -0
- package/es/components/base-search/src/index.vue.d.ts +2 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/index.d.ts +27 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +27 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +27 -0
- package/es/components/classification/index.d.ts +60 -5
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +60 -5
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +60 -5
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +60 -5
- package/es/components/date-picker/index.d.ts +13 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +13 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +26 -0
- package/es/components/field-set/src/components/condition.vue.d.ts +13 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +26 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +13 -0
- package/es/components/form-config/index.d.ts +37 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +37 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +20 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -0
- package/es/components/form-render/src/components/renderer/formItem.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- 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/tooltipMessage.vue2.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +2 -1
- package/es/components/form-render/src/utils/business.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +1 -1
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/iho-chat/index.d.ts +269 -94
- package/es/components/iho-chat/src/Index.vue.d.ts +269 -94
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +35 -13
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +41 -14
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +50 -14
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +13 -20
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +60 -11
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.d.ts +5 -5
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +62 -24
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -3
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +14 -2
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.d.ts +11 -0
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -0
- package/es/components/iho-chat/src/hooks/useSession.d.ts +1 -1
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/hooks/useState.js +1 -1
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +11 -0
- package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +0 -1
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +13 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +13 -0
- package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue.d.ts +13 -0
- package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue.js +1 -0
- package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +13 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +20 -2
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/iho-table/src/utils/index.d.ts +0 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +34 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +34 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +16 -0
- 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 +14 -0
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/index.d.ts +23 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +23 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +21 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
- package/es/components/scale-view/src/directive/drag-move.d.ts +3 -0
- package/es/components/scale-view/src/directive/drag-move.js +1 -0
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +15 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
- package/es/components/steps-wheel/index.d.ts +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +47 -5
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +37 -19
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +47 -5
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +47 -5
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +33 -18
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +69 -4
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +69 -4
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +3 -0
- package/es/components/time-line/index.d.ts +4 -4
- package/es/components/time-line/src/TimeLine.vue.d.ts +1 -1
- package/es/components/time-line/src/TimeLine.vue2.js +1 -1
- package/es/components/time-picker/index.d.ts +20 -2
- package/es/components/time-picker/src/TimePicker.vue.d.ts +21 -2
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/headerPlugin.d.ts +0 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +0 -1
@@ -587,6 +587,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
587
587
|
allowedInvalidValue: {
|
588
588
|
type: StringConstructor;
|
589
589
|
};
|
590
|
+
to: {
|
591
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
592
|
+
default: string;
|
593
|
+
};
|
590
594
|
}, {
|
591
595
|
attrs: {
|
592
596
|
[x: string]: unknown;
|
@@ -607,6 +611,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
607
611
|
allowedInvalidValue: {
|
608
612
|
type: StringConstructor;
|
609
613
|
};
|
614
|
+
to: {
|
615
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
616
|
+
default: string;
|
617
|
+
};
|
610
618
|
}>> & {
|
611
619
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
612
620
|
}>>;
|
@@ -643,10 +651,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
643
651
|
allowedInvalidValue: {
|
644
652
|
type: StringConstructor;
|
645
653
|
};
|
654
|
+
to: {
|
655
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
656
|
+
default: string;
|
657
|
+
};
|
646
658
|
}>> & {
|
647
659
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
648
660
|
}, {
|
649
661
|
updateUnchangedValue: boolean;
|
662
|
+
to: string | false | HTMLElement;
|
650
663
|
}>>;
|
651
664
|
NSelect: any;
|
652
665
|
WidgetValEnums: {
|
@@ -859,7 +872,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
859
872
|
default: null;
|
860
873
|
};
|
861
874
|
modelValue: {
|
862
|
-
type: (
|
875
|
+
type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
|
863
876
|
default: null;
|
864
877
|
};
|
865
878
|
}, {
|
@@ -870,7 +883,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
870
883
|
default: null;
|
871
884
|
};
|
872
885
|
modelValue: {
|
873
|
-
type: (
|
886
|
+
type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
|
874
887
|
default: null;
|
875
888
|
};
|
876
889
|
}>> & {
|
@@ -878,6 +891,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
878
891
|
}>>;
|
879
892
|
getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
|
880
893
|
emit: (event: "update:modelValue", ...args: any[]) => void;
|
894
|
+
selectDynamicRef: any;
|
881
895
|
isLoading: import("vue").Ref<boolean>;
|
882
896
|
filterApiConfig: import("../../../../../shared/types").AnyObject;
|
883
897
|
classifyFilterList: import("vue").Ref<import("../../../../../shared/types").AnyObject[]>;
|
@@ -893,7 +907,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
893
907
|
isMultiple: import("vue").ComputedRef<boolean>;
|
894
908
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
895
909
|
isLastPage: import("vue").ComputedRef<boolean>;
|
896
|
-
|
910
|
+
originList: import("vue").ComputedRef<any[]>;
|
911
|
+
valueCp: import("vue").ComputedRef<string | any[]>;
|
897
912
|
isInitRequest: import("vue").ComputedRef<boolean>;
|
898
913
|
setOptionActive: (selectIds: string[]) => void;
|
899
914
|
handleUpdateSelect: (value: string[] | null) => void;
|
@@ -909,8 +924,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
909
924
|
[key: string]: any;
|
910
925
|
}>;
|
911
926
|
init: () => void;
|
927
|
+
saveDynamicBaseList: (selectValue: any[] | null) => void;
|
912
928
|
NSelect: any;
|
913
929
|
SelectDynamicOption: import("vue").DefineComponent<{
|
930
|
+
oldValue: {
|
931
|
+
type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
|
932
|
+
default: () => never[];
|
933
|
+
};
|
914
934
|
dynamicOptionInfo: {
|
915
935
|
type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
|
916
936
|
default: () => {};
|
@@ -946,6 +966,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
946
966
|
}, {
|
947
967
|
selectMinWidth: number;
|
948
968
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
969
|
+
oldValue: {
|
970
|
+
type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
|
971
|
+
default: () => never[];
|
972
|
+
};
|
949
973
|
dynamicOptionInfo: {
|
950
974
|
type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
|
951
975
|
default: () => {};
|
@@ -1034,6 +1058,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1034
1058
|
ArrowBack: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1035
1059
|
ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1036
1060
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1061
|
+
oldValue: {
|
1062
|
+
type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
|
1063
|
+
default: () => never[];
|
1064
|
+
};
|
1037
1065
|
dynamicOptionInfo: {
|
1038
1066
|
type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
|
1039
1067
|
default: () => {};
|
@@ -1072,6 +1100,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1072
1100
|
}, {
|
1073
1101
|
isMultiple: boolean;
|
1074
1102
|
loading: boolean;
|
1103
|
+
oldValue: import("../../../../../shared/types").AnyObject[];
|
1075
1104
|
dynamicOptionInfo: import("../../../../../shared/types").AnyObject;
|
1076
1105
|
fieldTitleList: import("../../../../../shared/types").AnyObject[];
|
1077
1106
|
optionList: import("../../../../../shared/types").AnyObject[];
|
@@ -1085,13 +1114,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
1085
1114
|
default: null;
|
1086
1115
|
};
|
1087
1116
|
modelValue: {
|
1088
|
-
type: (
|
1117
|
+
type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
|
1089
1118
|
default: null;
|
1090
1119
|
};
|
1091
1120
|
}>> & {
|
1092
1121
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
1093
1122
|
}, {
|
1094
|
-
modelValue:
|
1123
|
+
modelValue: import("../../../../../shared/types").AnyObject[];
|
1095
1124
|
paramCfg: Record<string, any>;
|
1096
1125
|
}>;
|
1097
1126
|
InputNumberGroup: import("vue").DefineComponent<{
|
@@ -1220,6 +1249,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1220
1249
|
allowedInvalidValue: {
|
1221
1250
|
type: StringConstructor;
|
1222
1251
|
};
|
1252
|
+
to: {
|
1253
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
1254
|
+
default: string;
|
1255
|
+
};
|
1223
1256
|
}, {
|
1224
1257
|
attrs: {
|
1225
1258
|
[x: string]: unknown;
|
@@ -1240,6 +1273,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1240
1273
|
allowedInvalidValue: {
|
1241
1274
|
type: StringConstructor;
|
1242
1275
|
};
|
1276
|
+
to: {
|
1277
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
1278
|
+
default: string;
|
1279
|
+
};
|
1243
1280
|
}>> & {
|
1244
1281
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1245
1282
|
}>>;
|
@@ -1276,10 +1313,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1276
1313
|
allowedInvalidValue: {
|
1277
1314
|
type: StringConstructor;
|
1278
1315
|
};
|
1316
|
+
to: {
|
1317
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
1318
|
+
default: string;
|
1319
|
+
};
|
1279
1320
|
}>> & {
|
1280
1321
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1281
1322
|
}, {
|
1282
1323
|
updateUnchangedValue: boolean;
|
1324
|
+
to: string | false | HTMLElement;
|
1283
1325
|
}>>;
|
1284
1326
|
WidgetValEnums: {
|
1285
1327
|
CUSTOM: string;
|
@@ -1669,6 +1711,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1669
1711
|
allowedInvalidValue: {
|
1670
1712
|
type: StringConstructor;
|
1671
1713
|
};
|
1714
|
+
to: {
|
1715
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
1716
|
+
default: string;
|
1717
|
+
};
|
1672
1718
|
}, {
|
1673
1719
|
attrs: {
|
1674
1720
|
[x: string]: unknown;
|
@@ -1689,6 +1735,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1689
1735
|
allowedInvalidValue: {
|
1690
1736
|
type: StringConstructor;
|
1691
1737
|
};
|
1738
|
+
to: {
|
1739
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
1740
|
+
default: string;
|
1741
|
+
};
|
1692
1742
|
}>> & {
|
1693
1743
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1694
1744
|
}>>;
|
@@ -1725,10 +1775,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1725
1775
|
allowedInvalidValue: {
|
1726
1776
|
type: StringConstructor;
|
1727
1777
|
};
|
1778
|
+
to: {
|
1779
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
1780
|
+
default: string;
|
1781
|
+
};
|
1728
1782
|
}>> & {
|
1729
1783
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1730
1784
|
}, {
|
1731
1785
|
updateUnchangedValue: boolean;
|
1786
|
+
to: string | false | HTMLElement;
|
1732
1787
|
}>>;
|
1733
1788
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1734
1789
|
componentCfg: {
|
@@ -831,6 +831,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
831
831
|
allowedInvalidValue: {
|
832
832
|
type: StringConstructor;
|
833
833
|
};
|
834
|
+
to: {
|
835
|
+
type: PropType<string | false | HTMLElement>;
|
836
|
+
default: string;
|
837
|
+
};
|
834
838
|
}, {
|
835
839
|
attrs: {
|
836
840
|
[x: string]: unknown;
|
@@ -851,6 +855,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
851
855
|
allowedInvalidValue: {
|
852
856
|
type: StringConstructor;
|
853
857
|
};
|
858
|
+
to: {
|
859
|
+
type: PropType<string | false | HTMLElement>;
|
860
|
+
default: string;
|
861
|
+
};
|
854
862
|
}>> & {
|
855
863
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
856
864
|
}>>;
|
@@ -887,10 +895,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
887
895
|
allowedInvalidValue: {
|
888
896
|
type: StringConstructor;
|
889
897
|
};
|
898
|
+
to: {
|
899
|
+
type: PropType<string | false | HTMLElement>;
|
900
|
+
default: string;
|
901
|
+
};
|
890
902
|
}>> & {
|
891
903
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
892
904
|
}, {
|
893
905
|
updateUnchangedValue: boolean;
|
906
|
+
to: string | false | HTMLElement;
|
894
907
|
}>>;
|
895
908
|
NSelect: any;
|
896
909
|
WidgetValEnums: {
|
@@ -1103,7 +1116,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1103
1116
|
default: null;
|
1104
1117
|
};
|
1105
1118
|
modelValue: {
|
1106
|
-
type:
|
1119
|
+
type: PropType<AnyObject[]>;
|
1107
1120
|
default: null;
|
1108
1121
|
};
|
1109
1122
|
}, {
|
@@ -1114,7 +1127,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1114
1127
|
default: null;
|
1115
1128
|
};
|
1116
1129
|
modelValue: {
|
1117
|
-
type:
|
1130
|
+
type: PropType<AnyObject[]>;
|
1118
1131
|
default: null;
|
1119
1132
|
};
|
1120
1133
|
}>> & {
|
@@ -1122,6 +1135,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1122
1135
|
}>>;
|
1123
1136
|
getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
|
1124
1137
|
emit: (event: "update:modelValue", ...args: any[]) => void;
|
1138
|
+
selectDynamicRef: any;
|
1125
1139
|
isLoading: import("vue").Ref<boolean>;
|
1126
1140
|
filterApiConfig: AnyObject;
|
1127
1141
|
classifyFilterList: import("vue").Ref<AnyObject[]>;
|
@@ -1137,7 +1151,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
1137
1151
|
isMultiple: import("vue").ComputedRef<boolean>;
|
1138
1152
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
1139
1153
|
isLastPage: import("vue").ComputedRef<boolean>;
|
1140
|
-
|
1154
|
+
originList: import("vue").ComputedRef<any[]>;
|
1155
|
+
valueCp: import("vue").ComputedRef<string | any[]>;
|
1141
1156
|
isInitRequest: import("vue").ComputedRef<boolean>;
|
1142
1157
|
setOptionActive: (selectIds: string[]) => void;
|
1143
1158
|
handleUpdateSelect: (value: string[] | null) => void;
|
@@ -1153,8 +1168,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
1153
1168
|
[key: string]: any;
|
1154
1169
|
}>;
|
1155
1170
|
init: () => void;
|
1171
|
+
saveDynamicBaseList: (selectValue: any[] | null) => void;
|
1156
1172
|
NSelect: any;
|
1157
1173
|
SelectDynamicOption: import("vue").DefineComponent<{
|
1174
|
+
oldValue: {
|
1175
|
+
type: PropType<AnyObject[]>;
|
1176
|
+
default: () => never[];
|
1177
|
+
};
|
1158
1178
|
dynamicOptionInfo: {
|
1159
1179
|
type: PropType<AnyObject>;
|
1160
1180
|
default: () => {};
|
@@ -1190,6 +1210,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1190
1210
|
}, {
|
1191
1211
|
selectMinWidth: number;
|
1192
1212
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
1213
|
+
oldValue: {
|
1214
|
+
type: PropType<AnyObject[]>;
|
1215
|
+
default: () => never[];
|
1216
|
+
};
|
1193
1217
|
dynamicOptionInfo: {
|
1194
1218
|
type: PropType<AnyObject>;
|
1195
1219
|
default: () => {};
|
@@ -1278,6 +1302,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1278
1302
|
ArrowBack: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1279
1303
|
ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1280
1304
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1305
|
+
oldValue: {
|
1306
|
+
type: PropType<AnyObject[]>;
|
1307
|
+
default: () => never[];
|
1308
|
+
};
|
1281
1309
|
dynamicOptionInfo: {
|
1282
1310
|
type: PropType<AnyObject>;
|
1283
1311
|
default: () => {};
|
@@ -1316,6 +1344,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1316
1344
|
}, {
|
1317
1345
|
isMultiple: boolean;
|
1318
1346
|
loading: boolean;
|
1347
|
+
oldValue: AnyObject[];
|
1319
1348
|
dynamicOptionInfo: AnyObject;
|
1320
1349
|
fieldTitleList: AnyObject[];
|
1321
1350
|
optionList: AnyObject[];
|
@@ -1329,13 +1358,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
1329
1358
|
default: null;
|
1330
1359
|
};
|
1331
1360
|
modelValue: {
|
1332
|
-
type:
|
1361
|
+
type: PropType<AnyObject[]>;
|
1333
1362
|
default: null;
|
1334
1363
|
};
|
1335
1364
|
}>> & {
|
1336
1365
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
1337
1366
|
}, {
|
1338
|
-
modelValue:
|
1367
|
+
modelValue: AnyObject[];
|
1339
1368
|
paramCfg: Record<string, any>;
|
1340
1369
|
}>;
|
1341
1370
|
InputNumberGroup: import("vue").DefineComponent<{
|
@@ -1464,6 +1493,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1464
1493
|
allowedInvalidValue: {
|
1465
1494
|
type: StringConstructor;
|
1466
1495
|
};
|
1496
|
+
to: {
|
1497
|
+
type: PropType<string | false | HTMLElement>;
|
1498
|
+
default: string;
|
1499
|
+
};
|
1467
1500
|
}, {
|
1468
1501
|
attrs: {
|
1469
1502
|
[x: string]: unknown;
|
@@ -1484,6 +1517,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1484
1517
|
allowedInvalidValue: {
|
1485
1518
|
type: StringConstructor;
|
1486
1519
|
};
|
1520
|
+
to: {
|
1521
|
+
type: PropType<string | false | HTMLElement>;
|
1522
|
+
default: string;
|
1523
|
+
};
|
1487
1524
|
}>> & {
|
1488
1525
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1489
1526
|
}>>;
|
@@ -1520,10 +1557,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1520
1557
|
allowedInvalidValue: {
|
1521
1558
|
type: StringConstructor;
|
1522
1559
|
};
|
1560
|
+
to: {
|
1561
|
+
type: PropType<string | false | HTMLElement>;
|
1562
|
+
default: string;
|
1563
|
+
};
|
1523
1564
|
}>> & {
|
1524
1565
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1525
1566
|
}, {
|
1526
1567
|
updateUnchangedValue: boolean;
|
1568
|
+
to: string | false | HTMLElement;
|
1527
1569
|
}>>;
|
1528
1570
|
WidgetValEnums: {
|
1529
1571
|
CUSTOM: string;
|
@@ -1913,6 +1955,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1913
1955
|
allowedInvalidValue: {
|
1914
1956
|
type: StringConstructor;
|
1915
1957
|
};
|
1958
|
+
to: {
|
1959
|
+
type: PropType<string | false | HTMLElement>;
|
1960
|
+
default: string;
|
1961
|
+
};
|
1916
1962
|
}, {
|
1917
1963
|
attrs: {
|
1918
1964
|
[x: string]: unknown;
|
@@ -1933,6 +1979,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1933
1979
|
allowedInvalidValue: {
|
1934
1980
|
type: StringConstructor;
|
1935
1981
|
};
|
1982
|
+
to: {
|
1983
|
+
type: PropType<string | false | HTMLElement>;
|
1984
|
+
default: string;
|
1985
|
+
};
|
1936
1986
|
}>> & {
|
1937
1987
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1938
1988
|
}>>;
|
@@ -1969,10 +2019,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1969
2019
|
allowedInvalidValue: {
|
1970
2020
|
type: StringConstructor;
|
1971
2021
|
};
|
2022
|
+
to: {
|
2023
|
+
type: PropType<string | false | HTMLElement>;
|
2024
|
+
default: string;
|
2025
|
+
};
|
1972
2026
|
}>> & {
|
1973
2027
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
1974
2028
|
}, {
|
1975
2029
|
updateUnchangedValue: boolean;
|
2030
|
+
to: string | false | HTMLElement;
|
1976
2031
|
}>>;
|
1977
2032
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1978
2033
|
componentCfg: {
|
@@ -15,6 +15,10 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
|
|
15
15
|
allowedInvalidValue: {
|
16
16
|
type: StringConstructor;
|
17
17
|
};
|
18
|
+
to: {
|
19
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
20
|
+
default: string;
|
21
|
+
};
|
18
22
|
}, {
|
19
23
|
attrs: {
|
20
24
|
[x: string]: unknown;
|
@@ -35,6 +39,10 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
|
|
35
39
|
allowedInvalidValue: {
|
36
40
|
type: StringConstructor;
|
37
41
|
};
|
42
|
+
to: {
|
43
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
44
|
+
default: string;
|
45
|
+
};
|
38
46
|
}>> & {
|
39
47
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
40
48
|
}>>;
|
@@ -71,9 +79,14 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
|
|
71
79
|
allowedInvalidValue: {
|
72
80
|
type: StringConstructor;
|
73
81
|
};
|
82
|
+
to: {
|
83
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
84
|
+
default: string;
|
85
|
+
};
|
74
86
|
}>> & {
|
75
87
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
76
88
|
}, {
|
77
89
|
updateUnchangedValue: boolean;
|
90
|
+
to: string | false | HTMLElement;
|
78
91
|
}>>;
|
79
92
|
export default DatePicker;
|
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
17
17
|
allowedInvalidValue: {
|
18
18
|
type: StringConstructor;
|
19
19
|
};
|
20
|
+
to: {
|
21
|
+
type: PropType<string | false | HTMLElement>;
|
22
|
+
default: string;
|
23
|
+
};
|
20
24
|
}, {
|
21
25
|
attrs: {
|
22
26
|
[x: string]: unknown;
|
@@ -37,6 +41,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
37
41
|
allowedInvalidValue: {
|
38
42
|
type: StringConstructor;
|
39
43
|
};
|
44
|
+
to: {
|
45
|
+
type: PropType<string | false | HTMLElement>;
|
46
|
+
default: string;
|
47
|
+
};
|
40
48
|
}>> & {
|
41
49
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
42
50
|
}>>;
|
@@ -73,9 +81,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
73
81
|
allowedInvalidValue: {
|
74
82
|
type: StringConstructor;
|
75
83
|
};
|
84
|
+
to: {
|
85
|
+
type: PropType<string | false | HTMLElement>;
|
86
|
+
default: string;
|
87
|
+
};
|
76
88
|
}>> & {
|
77
89
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
78
90
|
}, {
|
79
91
|
updateUnchangedValue: boolean;
|
92
|
+
to: string | false | HTMLElement;
|
80
93
|
}>;
|
81
94
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as n,openBlock as o,createBlock as u,unref as r,isRef as i,createSlots as s,renderList as d,withCtx as c,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as v,handleInputEvent as y}from"../../../shared/hooks/useDateTime.js";import{isArray as h,isEqual as g,isString as w}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{format as V,sub as k,startOfDay as R,endOfDay as D}from"date-fns";var
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as n,openBlock as o,createBlock as u,unref as r,isRef as i,createSlots as s,renderList as d,withCtx as c,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as v,handleInputEvent as y}from"../../../shared/hooks/useDateTime.js";import{isArray as h,isEqual as g,isString as w}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{format as V,sub as k,startOfDay as R,endOfDay as D}from"date-fns";var S=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String},to:{type:[Object,String,Boolean],default:"body"}},emits:["update:formatted-value"],setup(e,{expose:S,emit:I}){const C=e,M=t(),_=a(null),b=a(null),$=a();let j="";const P=l({get:()=>T(C.formattedValue)?null:C.formattedValue,set(e){h(e)&&h(j)&&g(j,e)||j===e||(I("update:formatted-value",e,w(e)?Date.parse(e):h(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),j=e)}}),U=l((()=>{const e=Reflect.get(M,"type")||"";return["datetime","datetimerange"].includes(e)})),x=l((()=>{if(Reflect.get(M,"format"))return M.format;const e=M.type||"";return U.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),H=l((()=>U.value?x.value.split(" "):"")),{focus:q,blur:A,handleConfirm:B}=v(_,{formatRef:x,attrs:M,emit:I,allowedInvalidValue:C.allowedInvalidValue});async function F(e){e&&U.value&&(await m(),async function e(t=0){var a;t>2||(b.value=null==(a=_.value)?void 0:a.panelInstRef,b.value?v(b,{formatRef:H,attrs:M,isPanel:!0}):(await m(),e(++t)))}())}async function O(...e){var t,a,l,n,o,u;const r=Reflect.get(M,"type")||"",i=null==(n=null==(l=null==(a=null==(t=_.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(r.includes("range")?null==(o=C.onConfirm)||o.call(C,...e):(await m(),i.focus(),B(i),i.blur(),null==(u=C.onConfirm)||u.call(C,Date.parse(i.value),i.value)),!(null==i?void 0:i.value)||!C.updateUnchangedValue||r.includes("range"))return;const s=i.value;y(i,V(new Date,x.value)),y(i,s)}function T(e){return C.allowedInvalidValue&&C.allowedInvalidValue===e}return n((()=>C.formattedValue),(e=>{$.value=T(e)?e:C.placeholder?C.placeholder:"选择日期时间",T(e)||(j=e)}),{immediate:!0}),S({$datePicker:_,focus:q,blur:A,setShortcutValue:async function(e){const t=Reflect.get(M,"type")||"";if(!t||!t.includes("range")||!_.value)return;const a=_.value.$el.querySelectorAll(".n-input__input-el");let l,n;const o=new Date;if("week"===e){const e=k(o,{weeks:1});l=V(R(e),x.value)}else{const e=k(o,{months:1});l=V(R(e),x.value)}n=V(D(o),x.value),y(a[0],l),await m(),y(a[1],n)}}),(t,a)=>(o(),u(r(p),{ref_key:"datePickerRef",ref:_,"onUpdate:show":F,onConfirm:O,placeholder:$.value,to:e.to,"formatted-value":r(P),"onUpdate:formatted-value":a[0]||(a[0]=e=>i(P)?P.value=e:null)},s({_:2},[d(t.$slots,((e,a)=>({name:a,fn:c((()=>[f(t.$slots,a)]))})))]),1032,["placeholder","to","formatted-value"]))}});export{S as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as o,drawText as r}from"../useDraw.js";import{useElectrocardiogramCumputedPoint as
|
1
|
+
import{ref as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as o,drawText as r}from"../useDraw.js";import{useElectrocardiogramCumputedPoint as i}from"../useCumputedPoint.js";import"../useEvent.js";import{isNumber as n}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function l(l,s){const{getXValue:u,getYValue:c}=i(s),{yCellHeight:a,xCellWidth:h,measureLineStyle:d,measureTextStyle:f}=s,p=e(!1),x={origin:{x:0,y:0},obj:null,rendering:!1,type:"line"},m={origin:{x:300,y:10},caliper:{width:4*h,height:60,rect:null},caliperRuler:{width:6*h,height:120,rect:null},rectRuler:{width:12*h,height:120,rect:null}};function v(){x.obj&&(l.value.remove(x.obj),x.obj.text&&l.value.remove(x.obj.text),x.obj=null)}function g(){p.value||(p.value=!0)}function y(e,o){L();const{width:i,height:n,rect:s}=m[e];if(s)return;let u;const{x:c,y:a}=o||m.origin,h=a+m.caliper.height,p=["caliper","rectRuler"].includes(e);m[e].rect=new t.Rect({left:c,top:a,width:i,height:n,strokeWidth:0,fill:"transparent",hasControls:!1,hasBorders:!1,hoverCursor:"move"});const x={...d,hasControls:!1,hasBorders:!1,hoverCursor:"e-resize",strokeWidth:2,__type:e,evented:!0,selectable:!0},v=new t.Line([c,a,c,a+n],{...x,lockMovementY:!0,originX:"center"}),g=new t.Line([c+i,a,c+i,a+n],{...x,lockMovementY:!0,originX:"center"}),y=new t.Line([c,h,c+i,h],{...x,lockMovementX:!0,evented:p,hoverCursor:p?"n-resize":"default",originY:"center"});let w=C({x1:y.x1,x2:y.x2}).millisecond;if("rectRuler"===e){const{millivolt:e,millisecond:o,bpm:r}=C({x1:c+i,x2:c,y1:a+n,y2:a});w=`测量幅度:${e}\n测试时间:${o}\n瞬时心率:${r}`,y.set({y1:a,y2:a}),u=new t.Line([c,a+n,c+i,a+n],{...x,lockMovementX:!0,evented:!0,hoverCursor:"n-resize",originY:"center"})}const j=r([c,("rectRuler"===e?u.top:y.top)+10],{value:w,...f,originX:"left",originY:"top",backgroundColor:"#fff"});v.rect=m[e].rect,g.rect=m[e].rect,y.rect=m[e].rect,u&&(u.rect=m[e].rect),Object.assign(m[e].rect,{leftLine:v,rightLine:g,horizontalLine:y,horizontalLine2:u,text:j}),function(e,t){e.on("moving",(()=>{const{leftLine:o,rightLine:r,horizontalLine:i,horizontalLine2:n,text:l}=e;null==o||o.setCoords().set({x1:e.left,y1:e.top,x2:e.left,y2:e.top+e.height}),null==r||r.setCoords().set({x1:e.left+e.width,y1:e.top,x2:e.left+e.width,y2:e.top+e.height});const s=["caliper","rectRuler"].includes(t)?e.top+e.height:e.top+e.height/2;l.setCoords().set({left:e.left,top:s+10}),"rectRuler"===t?(null==i||i.setCoords().set({x1:e.left,x2:e.left+e.width,y1:e.top,y2:e.top}),null==n||n.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})):null==i||i.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})})),e.on("mouseup",(t=>{var o;1===t.button&&(l.value.discardActiveObject(),e.leftLine.bringToFront(),e.rightLine.bringToFront(),e.horizontalLine.bringToFront(),null==(o=e.horizontalLine2)||o.bringToFront())}))}(m[e].rect,e),b(v,"left"),b(g,"right"),p&&b(y,"horizontal"),u&&b(u,"horizontal2");const z=[m[e].rect,v,g,y,u,j].filter((e=>!!e));l.value.add(...z)}function C({x1:e,x2:t,y1:o,y2:r}){const i=(1e3*u(Math.abs(t-e))).toFixed(3);return{millisecond:`${i}ms`,millivolt:`${n(o)&&n(r)?c(Math.abs(r-o)).toFixed(3):0}mv`,bpm:`${(6e4/+i).toFixed(3)}bpm`}}function b(e,t){e.on("moving",(()=>{const{rect:o}=e;if(!o)return;const{leftLine:r,rightLine:i,horizontalLine:n,horizontalLine2:l,text:s}=o;if(("horizontal"===t&&!l||"horizontal2"===t)&&(e.top<=o.top?e.setCoords().set({y1:o.top,y2:o.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({height:e.top-o.top}),null==r||r.setCoords().set({y2:e.top}),null==i||i.setCoords().set({y2:e.top}),s.setCoords().set({top:e.top+10}),!l))return;"horizontal"===t&&l&&(e.top>=l.top?e.setCoords().set({y1:l.top,y2:l.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({top:e.top,height:l.top-e.top}),null==r||r.setCoords().set({y1:e.top}),null==i||i.setCoords().set({y1:e.top}),s.setCoords().set({top:l.top+10})),"left"===t&&(e.left>=i.left?e.setCoords().set({x1:i.left,x2:i.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({left:e.left,width:i.left-e.left}),n.setCoords().set({x1:e.left}),null==l||l.setCoords().set({x1:e.left}),s.setCoords().set({left:e.left})),"right"===t&&(e.left<=r.left?e.setCoords().set({x1:r.left,x2:r.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({width:e.left-r.left}),n.setCoords().set({x2:e.left}),null==l||l.setCoords().set({x2:e.left}));const{millivolt:u,millisecond:c,bpm:a}=C({x1:n.x1,x2:n.x2,y1:r.y1,y2:r.y2}),h=l?`测量幅度:${u}\n测试时间:${c}\n瞬时心率:${a}`:c;s.set("text",h)}))}function L(){Object.values(m).forEach((e=>{const{rect:t}=e;t&&(l.value.remove(t),t.leftLine&&l.value.remove(t.leftLine),t.rightLine&&l.value.remove(t.rightLine),t.horizontalLine&&l.value.remove(t.horizontalLine),t.horizontalLine2&&l.value.remove(t.horizontalLine2),t.text&&l.value.remove(t.text),e.rect=null)})),v()}return l.value.on("mouse:down",(e=>{if(1===e.button&&p.value){const{x:t=0,y:o=0}=e.pointer||{};L(),x.rendering=!0,x.origin={x:t,y:o}}})),l.value.on("mouse:up",(e=>{const{button:t}=e;1===t&&p.value&&setTimeout((()=>{if(p.value=!1,x.rendering&&(x.rendering=!1),"rect"===x.type){const{width:e,height:t}=x.obj,o={x:Math.min(x.origin.x,x.origin.x+e),y:Math.min(x.origin.y,x.origin.y+t)+2};m.rectRuler.width=Math.abs(e),m.rectRuler.height=Math.abs(t),v(),y("rectRuler",o)}})),3===t&&L()})),l.value.on("mouse:move",(e=>{if(1===e.button&&p.value&&x.rendering){const{x:i=0,y:n=0}=e.pointer||{};if(v(),"line"===x.type){const{x:e,y:t}=x.origin;x.obj=o([e,t,i,n],d);const{millivolt:s,millisecond:u}=C({x1:e,x2:i,y1:t,y2:n}),c=r([i,n+2*a],{value:`${s}\n${u}`,...f});x.obj.text=c,l.value.add(x.obj,c)}else!function({x:e,y:o}){const{x:i,y:n}=x.origin;x.obj=new t.Rect({...d,objectCaching:!1,fill:"transparent",left:i,top:n,width:e-i,height:o-n,strokeWidth:2});const{millivolt:s,millisecond:u,bpm:c}=C({x1:i,x2:e,y1:n,y2:o}),a=r([i,o+10],{value:`测量幅度:${s}\n测试时间:${u}\n瞬时心率:${c}`,...f,originX:"left",originY:"top",backgroundColor:"#fff"});x.obj.text=a,l.value.add(x.obj,a)}({x:i,y:n})}})),{flag:p,useMeasureRuler:function(){g(),x.type="line"},useCaliper:function(){y("caliper")},useCaliperRuler:function(){y("caliperRuler")},useRectRuler:function(){g(),x.type="rect"}}}export{l as useMeasureInstrument};
|