cnhis-design-vue 3.1.51-release.0 → 3.1.51-release.2
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/components/base-search/index.d.ts +13 -8
- package/es/components/base-search/src/index.vue.d.ts +13 -8
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/callback/index.d.ts +69 -0
- package/es/components/callback/index.js +1 -0
- package/es/components/callback/src/components/dialog/drawer.vue.d.ts +353 -0
- package/es/components/callback/src/components/dialog/drawer.vue.js +1 -0
- package/es/components/callback/src/components/dialog/drawer.vue2.js +1 -0
- package/es/components/callback/src/components/dialog/modal.vue.d.ts +166 -0
- package/es/components/callback/src/components/dialog/modal.vue.js +1 -0
- package/es/components/callback/src/components/dialog/modal.vue2.js +1 -0
- package/es/components/callback/src/components/popup/index.vue.d.ts +48 -0
- package/es/components/callback/src/components/popup/index.vue.js +1 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue.d.ts +62 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue.js +1 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue2.js +1 -0
- package/es/components/callback/src/components/render/enums.d.ts +5 -0
- package/es/components/callback/src/components/render/enums.js +1 -0
- package/es/components/callback/src/components/render/index.vue.d.ts +57 -0
- package/es/components/callback/src/components/render/index.vue.js +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +5700 -0
- package/es/components/callback/src/components/render/popupMaps.js +1 -0
- package/es/components/callback/src/index.vue.d.ts +68 -0
- package/es/components/callback/src/index.vue.js +1 -0
- package/es/components/callback/src/index.vue2.js +1 -0
- package/es/components/callback/src/types/index.d.ts +11 -0
- package/es/components/callback/style/callback-iconfont.ttf +0 -0
- package/es/components/callback/style/index.css +1 -0
- package/es/components/classification/index.d.ts +57 -15
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +57 -15
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +57 -15
- package/es/components/classification/src/index.vue.d.ts +57 -15
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/expand-field/index.d.ts +0 -13
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +0 -13
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +0 -13
- package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +0 -13
- package/es/components/expand-field/src/index.vue.d.ts +0 -13
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.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/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/form-config/index.d.ts +174 -25
- package/es/components/form-config/src/FormConfig.vue.d.ts +175 -26
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -10
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +121 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
- package/es/components/form-config/src/constants/index.d.ts +19 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +7 -3
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +4 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +79 -2
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +10 -1
- package/es/components/form-render/src/components/renderer/select.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 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +16 -10
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/components/form-render/src/types/index.d.ts +1 -19
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/types/index.d.ts +2 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +4 -3
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +13 -13
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -13
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -5
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -4
- package/es/components/quick-search/index.d.ts +13 -8
- package/es/components/quick-search/src/index.vue.d.ts +13 -8
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +615 -255
- package/es/components/select-label/index.d.ts +617 -256
- package/es/components/select-label/index.js +1 -1
- package/es/components/{iho-select-label/src/LabelFormContent.vue.d.ts → select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts} +5 -5
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -0
- package/es/components/{iho-select-label/src/SelectLabel.vue.d.ts → select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts} +7 -7
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -0
- package/es/components/{iho-select-label/src/components/label-classify.vue.d.ts → select-label/src/ihoLabel/iho-label-classify.vue.d.ts} +1 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -0
- package/es/components/select-label/src/index.vue.d.ts +899 -0
- package/es/components/select-label/src/index.vue.js +1 -0
- package/es/components/select-label/src/index.vue2.js +1 -0
- package/es/components/shortcut-setter/index.d.ts +6 -5
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -5
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +52 -7
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +34 -2
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -6
- 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 +57 -15
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -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 +56 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +4 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +55 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +1 -7
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -6
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +16 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +19 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/directive/flexibleResize.d.ts +4 -0
- package/es/{components/classification/src → shared}/directive/flexibleResize.js +1 -1
- package/es/shared/directive/index.d.ts +1 -0
- package/es/shared/directive/index.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +27 -0
- package/es/shared/utils/business.d.ts +1 -2
- package/es/shared/utils/index.d.ts +3 -3
- package/package.json +2 -2
- package/es/components/classification/src/directive/flexibleResize.d.ts +0 -28
- package/es/components/iho-select-label/index.d.ts +0 -363
- package/es/components/iho-select-label/index.js +0 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue.js +0 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue2.js +0 -1
- package/es/components/iho-select-label/src/SelectLabel.vue.js +0 -1
- package/es/components/iho-select-label/src/SelectLabel.vue2.js +0 -1
- package/es/components/iho-select-label/src/components/label-classify.vue.js +0 -1
- package/es/components/iho-select-label/src/components/label-classify.vue2.js +0 -1
- package/es/components/iho-select-label/style/iho-select-label-iconfont.ttf +0 -0
- package/es/components/iho-select-label/style/index.css +0 -1
- package/es/components/table-filter/src/types/tool.d.ts +0 -7
- /package/es/components/{iho-select-label → callback}/src/types/index.js +0 -0
- /package/es/components/{iho-select-label → select-label}/src/types/index.d.ts +0 -0
- /package/es/components/{table-filter/src/types/tool.js → select-label/src/types/index.js} +0 -0
|
@@ -648,10 +648,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
648
648
|
className: string;
|
|
649
649
|
displayCategory: string;
|
|
650
650
|
filterConditions: {
|
|
651
|
-
value: string;
|
|
652
|
-
key: string;
|
|
653
651
|
condition: string;
|
|
652
|
+
key: string;
|
|
654
653
|
presetVal: string;
|
|
654
|
+
value: string;
|
|
655
|
+
isAccurateSearch?: boolean | undefined;
|
|
656
|
+
accurateSearchKey?: string | undefined;
|
|
655
657
|
}[];
|
|
656
658
|
};
|
|
657
659
|
loading: import("vue").Ref<boolean>;
|
|
@@ -679,12 +681,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
679
681
|
updateCondition: (index: number, val: any) => void;
|
|
680
682
|
getParamCfg: (key: string) => any;
|
|
681
683
|
initFilterConditions: (tableId: string, rawConditions: import("../../../../es/components/table-filter/src/types").ISearchConfigType) => Promise<void>;
|
|
682
|
-
getRawFilterConditions: () =>
|
|
683
|
-
field_key: any;
|
|
684
|
-
con: any;
|
|
685
|
-
value: any;
|
|
686
|
-
unit: any;
|
|
687
|
-
}[];
|
|
684
|
+
getRawFilterConditions: () => any[];
|
|
688
685
|
findConditionByDisplayCategory: (sid: string) => unknown;
|
|
689
686
|
handleDisplayCategorySelectProxy: (item: import("../../../../es/components/table-filter/src/types").ICategoryItemType) => void;
|
|
690
687
|
clearFormData: () => void;
|
|
@@ -715,6 +712,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
715
712
|
type: StringConstructor;
|
|
716
713
|
default: null;
|
|
717
714
|
};
|
|
715
|
+
isAccurate: {
|
|
716
|
+
type: BooleanConstructor;
|
|
717
|
+
};
|
|
718
718
|
}, {
|
|
719
719
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
720
720
|
paramCfg: {
|
|
@@ -729,13 +729,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
729
729
|
type: StringConstructor;
|
|
730
730
|
default: null;
|
|
731
731
|
};
|
|
732
|
+
isAccurate: {
|
|
733
|
+
type: BooleanConstructor;
|
|
734
|
+
};
|
|
732
735
|
}>> & {
|
|
733
736
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
737
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
734
738
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
|
735
739
|
}>>;
|
|
736
|
-
emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
|
|
740
|
+
emit: (event: "update:modelValue" | "update:isAccurate" | "update:presetVal", ...args: any[]) => void;
|
|
737
741
|
valueCp: import("vue").WritableComputedRef<any>;
|
|
738
742
|
presetValCp: import("vue").WritableComputedRef<string>;
|
|
743
|
+
isAccurateCp: import("vue").WritableComputedRef<boolean>;
|
|
739
744
|
widgetType: import("vue").ComputedRef<any>;
|
|
740
745
|
Date: import("vue").DefineComponent<{
|
|
741
746
|
componentCfg: {
|
|
@@ -885,35 +890,67 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
885
890
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
|
886
891
|
}, {
|
|
887
892
|
modelValue: string | number | unknown[];
|
|
888
|
-
presetVal: string;
|
|
889
893
|
paramCfg: Record<string, any>;
|
|
894
|
+
presetVal: string;
|
|
890
895
|
}>;
|
|
891
896
|
InputFilter: import("vue").DefineComponent<{
|
|
897
|
+
paramCfg: {
|
|
898
|
+
type: ObjectConstructor;
|
|
899
|
+
default: null;
|
|
900
|
+
};
|
|
892
901
|
modelValue: {
|
|
893
902
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
894
903
|
default: null;
|
|
895
904
|
};
|
|
905
|
+
isAccurateFilter: {
|
|
906
|
+
type: BooleanConstructor;
|
|
907
|
+
};
|
|
896
908
|
}, {
|
|
897
909
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
910
|
+
paramCfg: {
|
|
911
|
+
type: ObjectConstructor;
|
|
912
|
+
default: null;
|
|
913
|
+
};
|
|
898
914
|
modelValue: {
|
|
899
915
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
900
916
|
default: null;
|
|
901
917
|
};
|
|
918
|
+
isAccurateFilter: {
|
|
919
|
+
type: BooleanConstructor;
|
|
920
|
+
};
|
|
902
921
|
}>> & {
|
|
903
922
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
923
|
+
"onUpdate:isAccurateFilter"?: ((...args: any[]) => any) | undefined;
|
|
904
924
|
}>>;
|
|
905
|
-
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
925
|
+
emit: (event: "update:modelValue" | "update:isAccurateFilter", ...args: any[]) => void;
|
|
926
|
+
optionList: import("vue").Ref<{
|
|
927
|
+
label: string;
|
|
928
|
+
value: number;
|
|
929
|
+
}[]>;
|
|
906
930
|
valueCp: import("vue").WritableComputedRef<any>;
|
|
931
|
+
isAccurateFilterCp: import("vue").WritableComputedRef<number>;
|
|
932
|
+
isShowSearch: import("vue").ComputedRef<any>;
|
|
907
933
|
NInput: any;
|
|
908
|
-
|
|
934
|
+
NSelect: any;
|
|
935
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurateFilter")[], "update:modelValue" | "update:isAccurateFilter", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
936
|
+
paramCfg: {
|
|
937
|
+
type: ObjectConstructor;
|
|
938
|
+
default: null;
|
|
939
|
+
};
|
|
909
940
|
modelValue: {
|
|
910
941
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
911
942
|
default: null;
|
|
912
943
|
};
|
|
944
|
+
isAccurateFilter: {
|
|
945
|
+
type: BooleanConstructor;
|
|
946
|
+
};
|
|
913
947
|
}>> & {
|
|
914
948
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
949
|
+
"onUpdate:isAccurateFilter"?: ((...args: any[]) => any) | undefined;
|
|
915
950
|
}, {
|
|
916
951
|
modelValue: string | number | unknown[];
|
|
952
|
+
paramCfg: Record<string, any>;
|
|
953
|
+
isAccurateFilter: boolean;
|
|
917
954
|
}>;
|
|
918
955
|
InputNumber: import("vue").DefineComponent<{
|
|
919
956
|
modelValue: {
|
|
@@ -1442,8 +1479,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1442
1479
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
|
1443
1480
|
}, {
|
|
1444
1481
|
modelValue: string | number | unknown[];
|
|
1445
|
-
presetVal: string;
|
|
1446
1482
|
paramCfg: Record<string, any>;
|
|
1483
|
+
presetVal: string;
|
|
1447
1484
|
}>;
|
|
1448
1485
|
SelectLabel: import("vue").DefineComponent<{
|
|
1449
1486
|
paramCfg: {
|
|
@@ -1509,7 +1546,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1509
1546
|
SELECTLABEL: string;
|
|
1510
1547
|
SELECTDYNAMIC: string;
|
|
1511
1548
|
};
|
|
1512
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal")[], "update:modelValue" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1549
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1513
1550
|
paramCfg: {
|
|
1514
1551
|
type: ObjectConstructor;
|
|
1515
1552
|
default: null;
|
|
@@ -1522,13 +1559,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1522
1559
|
type: StringConstructor;
|
|
1523
1560
|
default: null;
|
|
1524
1561
|
};
|
|
1562
|
+
isAccurate: {
|
|
1563
|
+
type: BooleanConstructor;
|
|
1564
|
+
};
|
|
1525
1565
|
}>> & {
|
|
1526
1566
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
1567
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
1527
1568
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
|
1528
1569
|
}, {
|
|
1529
1570
|
modelValue: string | number | unknown[];
|
|
1530
|
-
presetVal: string;
|
|
1531
1571
|
paramCfg: Record<string, any>;
|
|
1572
|
+
presetVal: string;
|
|
1573
|
+
isAccurate: boolean;
|
|
1532
1574
|
}>;
|
|
1533
1575
|
ConditionEnums: {
|
|
1534
1576
|
NULL: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as i,ref as n,provide as l,computed as t,onMounted as a,nextTick as s,watch as o,openBlock as d,createElementBlock as c,normalizeClass as r,unref as h,normalizeStyle as u,withDirectives as f,createVNode as p,createTextVNode as m,toDisplayString as g,createCommentVNode as v,createElementVNode as C,Fragment as y,renderList as k,createBlock as S,withCtx as b}from"vue";import{useMessage as x,NIcon as O,NTooltip as _}from"naive-ui";import{Repeat as w,SettingsOutline as I,ChevronDown as L,ChevronForward as N,Checkmark as z,Close as j,ChevronUp as B}from"@vicons/ionicons5";import P from"./components/set-classification/index.vue.js";import J from"./directive/flexibleResize.js";import{InjectionFilterApiConfig as M}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as A}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import F from"../../table-filter/src/hooks/useAdvanced.js";const T={key:0,class:"header"},R={class:"tree"},W=["onClick"],q=["onClick"],G=["onClick"],Q={class:"child-item-name"},$={key:1,class:"tree-type-footer"},D={class:"selected-num"},V=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),H={key:0,class:"tile-type classify-1"},K={key:0,class:"header"},U={class:"right-setting"},X=["onClick"],Y={class:"parent ellips"},Z={class:"children"},ee=["onClick"],ie={key:1,class:"selected-list"},ne={class:"selected-num"},le=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),te={class:"name"},ae={class:"name"},se={key:0,class:"main-wrapper"},oe=["onClick"],de={class:"tree-footer"},ce=["onClick"],re=["onClick"],he={key:0,class:"select-type-footer"},ue={class:"selected-num"},fe=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var pe=e({__name:"index",props:{tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},conditionMap:{type:Object,default:()=>({})},conditionSid:{type:Array,default:()=>["all_data"]},curClassificationIndex:{type:Number,default:0},curClassificationWidth:{type:Number},hideConditionChangeBtn:{type:Number,default:0},hideConditionChangeSetting:{type:Number,default:0},hideClearConditionChange:{type:Number,default:1},isShowResetButton:{type:Boolean,default:!0},filterApiConfig:{type:Object,default:()=>({})}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:pe}){const me=e,{handleGetConfigApi:ge}=E(),{transformClassifyChild:ve}=F(),Ce=i(),ye=x(),ke=n(null);let Se=n(150),be=n(!1),xe=n([]),Oe=n([]),_e=n([]),we=n(2),Ie=n({name:"全部数据",sid:"all_data"}),Le=n([]),Ne=n(""),ze=n(!1),je=n("全部数据");l(A,me.isShowResetButton),l(M,me.filterApiConfig);let Be=t((()=>0===we.value?{marginRight:"8px"}:2===we.value?{display:"inline-block"}:{})),Pe=t((()=>{let e=Oe.value.filter((e=>-1!==me.conditionSid.indexOf(e.sid)));if(-1!==me.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Je=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Ue(n,l)+i}));function Me(e){e.open?e.open=!1:e.open=!0}function Ae(e,i,n){je.value=e.name;let l=function(e){let i=[];return xe.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})):-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})),i}(function(e,i,n){let l=JSON.parse(JSON.stringify(i));l="all_data"===e||-1!==l.indexOf(e)?["all_data"]:[e];return l}(e.sid,me.conditionSid));We(!1);const t=ve(null==e?void 0:e.conObj,me.searchFieldList);pe("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ee(){let e="";if(2===we.value)e=0;else{let i=we.value;e=++i}Se.value=150,Fe(e)}async function Fe(e,i){let n={tableId:me.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ge(n,"requestSaveListPersonaSetting",{},me.filterApiConfig)&&pe("setClassificationIndex",e)}catch(e){console.log(e)}}function Te(){ze.value=!0,We(!1)}function Re(e){ze.value=e}function We(e){be.value=void 0===e?!be.value:e}function qe(){if(!me.tableId)return ye.warning("请传入tableId");xe.value=[];let{displayCategoryList:e=[],conditionList:i=[]}=me.conditionMap;Le.value=JSON.parse(JSON.stringify(e))||[],_e.value=JSON.parse(JSON.stringify(i)),Oe.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i]));let n=[];var l;0===Le.value.length&&(Le.value=["未分类"]),Le.value.forEach((e=>{let i={name:e,children:[]};Oe.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==me.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=ve(null==n?void 0:n.conObj,me.searchFieldList);pe("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&n.push(i)})),n.unshift({name:"全部数据",sid:"all_data"}),xe.value=n,0===we.value&&(l=!0,xe.value.forEach((e=>{e.children&&e.children.length&&(e.open=l)})))}function Ge({distance:e}){const i=Se.value+e;Se.value=Math.min(Math.max(i,50),650)}function Qe(){Fe(we.value,Se.value)}async function $e(){await Ke(me.tableId),Ve()}async function De(e){await Ke(me.tableId),He()}function Ve(e){He(e).then((e=>({})))}function He(e,i={}){if(!me.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(me.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c,r;if(Object.keys(n).length>0){_e.value=n.conditionList||[],Le.value=n.displayCategoryList||[];let l={conditionList:_e.value,displayCategoryList:Le.value};pe("getQuickSearchListObj",l),Ne.value=null!=(t=n.settingId)?t:"";const h=_e.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(s=null==(a=Ce.tableOptions)?void 0:a.filterCondition)?void 0:s.displayCategory)&&e&&i({name:null==(d=null==(o=Ce.tableOptions)?void 0:o.filterCondition)?void 0:d.name,sid:null==(r=null==(c=Ce.tableOptions)?void 0:c.filterCondition)?void 0:r.displayCategory}),i(h)}else i({})}))}async function Ke(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ge(i,"requestTableCondiTionList",{},me.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Ue(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();ke.value&&i.includes(ke.value)||We(!1)}))}))})),o((()=>me.tableId),(e=>{e&&Ve(!0)}),{immediate:!0,deep:!0}),o((()=>me.curClassificationIndex),(e=>{void 0!==e&&(we.value=e,qe())}),{immediate:!0,deep:!0}),o((()=>me.curClassificationWidth),(e=>{e&&(Se.value=Number(e)||150)}),{immediate:!0}),o((()=>me.conditionMap),(e=>{!async function(){try{await qe()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(we)]),style:u(h(Be))},[0===h(we)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(Se)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",T,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])):v("v-if",!0),C("ul",R,[(d(!0),c(y,null,k(h(xe),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[C("span",{class:r(["parent",{open:i.open}]),onClick:e=>Me(i)},[C("span",null,g(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,q),i.open?(d(!0),c(y,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}])},[C("span",Q,g(Ue(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,G)))),128)):v("v-if",!0)],64)):(d(),c("span",{key:0,class:r(["child-item header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ae(i)},g(i.name),11,W))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",$,[C("div",D,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[V,m(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:Ge,onEnd:Qe}]]):v("v-if",!0),1===h(we)?(d(),c(y,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(_e).filter((e=>e.isShow)).length>0?(d(),c("div",H,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",K,[C("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[m(" 全部数据 "),h(Ie).digital||0===h(Ie).digital?(d(),c(y,{key:0},[m(" ("+g(h(Ie).digital||0)+") ",1)],64)):v("v-if",!0)],2),C("div",U,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ee,style:{"margin-right":"30px"}},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])])):v("v-if",!0),C("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(y,null,k(h(xe).slice(1),((e,i)=>(d(),c(y,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(y,{key:1},[C("span",Y,g(e.name),1),C("div",Z,[(d(!0),c(y,null,k(e.children,((i,n)=>(d(),c(y,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Ae(i,0,e)},g(Ue(i.name,null==i?void 0:i.isPublic)),11,ee)):v("v-if",!0)],64)))),256))])],64)):(d(),c("span",{key:0,class:r(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>Ae(e)},g(e.name)+" "+g(e.digital),11,X))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ie,[C("div",ne,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(y,null,k(h(xe).slice(1),(e=>(d(),c(y,null,[e.children&&0!==e.children.length?(d(!0),c(y,{key:1},k(e.children,((i,n)=>(d(),c(y,null,[i.selected?(d(),c("div",{class:"selected-item",key:i.sid},[m(g(i.name)+" ",1),p(h(O),{component:h(j),onClick:n=>Ae(i,0,e)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[m(g(e.name)+" ",1),p(h(O),{component:h(j),onClick:i=>Ae(e)},null,8,["component","onClick"])]))],64)))),256)),C("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[le,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(we)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:ke},[C("span",{class:"title",onClick:n[3]||(n[3]=()=>We())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[C("span",te,g(h(Pe)),1)])),default:b((()=>[C("span",ae,g(h(Pe)),1)])),_:1}),p(h(O),{component:h(be)?h(B):h(L)},null,8,["component"])]),h(be)?(d(),c("div",se,[C("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(y,null,k(h(xe),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Me(i)},[m(g(i.name)+g(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,ce)):v("v-if",!0),i.open?(d(!0),c(y,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}])},[C("span",null,g(Ue(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,re)))),128)):v("v-if",!0)],64)):(d(),c(y,{key:0},[C("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ae(i)},g(i.name),11,oe),C("div",de,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",he,[C("div",ue,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[fe,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(_e),displayCategoryList:h(Le),settingId:h(Ne),tableId:e.tableId,classifyModal:h(ze),onSaveGetTableCondiTionList:De,onCondiTionListInit:$e,onSetClassifyModal:Re},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6))}});export{pe as default};
|
|
1
|
+
import{defineComponent as e,useAttrs as i,ref as n,provide as l,computed as t,onMounted as a,nextTick as s,watch as o,openBlock as d,createElementBlock as c,normalizeClass as r,unref as h,normalizeStyle as u,withDirectives as f,createVNode as p,createTextVNode as m,toDisplayString as g,createCommentVNode as v,createElementVNode as C,Fragment as y,renderList as k,createBlock as S,withCtx as b}from"vue";import{useMessage as x,NIcon as O,NTooltip as _}from"naive-ui";import{Repeat as w,SettingsOutline as I,ChevronDown as L,ChevronForward as N,Checkmark as z,Close as j,ChevronUp as B}from"@vicons/ionicons5";import P from"./components/set-classification/index.vue.js";import{vFlexibleResize as J}from"../../../shared/directive/flexibleResize.js";import{InjectionFilterApiConfig as M}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as A}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import F from"../../table-filter/src/hooks/useAdvanced.js";const T={key:0,class:"header"},R={class:"tree"},W=["onClick"],q=["onClick"],G=["onClick"],Q={class:"child-item-name"},$={key:1,class:"tree-type-footer"},D={class:"selected-num"},V=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),H={key:0,class:"tile-type classify-1"},K={key:0,class:"header"},U={class:"right-setting"},X=["onClick"],Y={class:"parent ellips"},Z={class:"children"},ee=["onClick"],ie={key:1,class:"selected-list"},ne={class:"selected-num"},le=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),te={class:"name"},ae={class:"name"},se={key:0,class:"main-wrapper"},oe=["onClick"],de={class:"tree-footer"},ce=["onClick"],re=["onClick"],he={key:0,class:"select-type-footer"},ue={class:"selected-num"},fe=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var pe=e({__name:"index",props:{tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},conditionMap:{type:Object,default:()=>({})},conditionSid:{type:Array,default:()=>["all_data"]},curClassificationIndex:{type:Number,default:0},curClassificationWidth:{type:Number},hideConditionChangeBtn:{type:Number,default:0},hideConditionChangeSetting:{type:Number,default:0},hideClearConditionChange:{type:Number,default:1},isShowResetButton:{type:Boolean,default:!0},filterApiConfig:{type:Object,default:()=>({})}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:pe}){const me=e,{handleGetConfigApi:ge}=E(),{transformClassifyChild:ve}=F(),Ce=i(),ye=x(),ke=n(null);let Se=n(150),be=n(!1),xe=n([]),Oe=n([]),_e=n([]),we=n(2),Ie=n({name:"全部数据",sid:"all_data"}),Le=n([]),Ne=n(""),ze=n(!1),je=n("全部数据");l(A,me.isShowResetButton),l(M,me.filterApiConfig);let Be=t((()=>0===we.value?{marginRight:"8px"}:2===we.value?{display:"inline-block"}:{})),Pe=t((()=>{let e=Oe.value.filter((e=>-1!==me.conditionSid.indexOf(e.sid)));if(-1!==me.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Je=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Ue(n,l)+i}));function Me(e){e.open?e.open=!1:e.open=!0}function Ae(e,i,n){je.value=e.name;let l=function(e){let i=[];return xe.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})):-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})),i}(function(e,i,n){let l=JSON.parse(JSON.stringify(i));l="all_data"===e||-1!==l.indexOf(e)?["all_data"]:[e];return l}(e.sid,me.conditionSid));We(!1);const t=ve(null==e?void 0:e.conObj,me.searchFieldList);pe("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ee(){let e="";if(2===we.value)e=0;else{let i=we.value;e=++i}Se.value=150,Fe(e)}async function Fe(e,i){let n={tableId:me.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ge(n,"requestSaveListPersonaSetting",{},me.filterApiConfig)&&pe("setClassificationIndex",e)}catch(e){console.log(e)}}function Te(){ze.value=!0,We(!1)}function Re(e){ze.value=e}function We(e){be.value=void 0===e?!be.value:e}function qe(){if(!me.tableId)return ye.warning("请传入tableId");xe.value=[];let{displayCategoryList:e=[],conditionList:i=[]}=me.conditionMap;Le.value=JSON.parse(JSON.stringify(e))||[],_e.value=JSON.parse(JSON.stringify(i)),Oe.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i]));let n=[];var l;0===Le.value.length&&(Le.value=["未分类"]),Le.value.forEach((e=>{let i={name:e,children:[]};Oe.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==me.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=ve(null==n?void 0:n.conObj,me.searchFieldList);pe("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&n.push(i)})),n.unshift({name:"全部数据",sid:"all_data"}),xe.value=n,0===we.value&&(l=!0,xe.value.forEach((e=>{e.children&&e.children.length&&(e.open=l)})))}function Ge({distance:e}){const i=Se.value+e;Se.value=Math.min(Math.max(i,50),650)}function Qe(){Fe(we.value,Se.value)}async function $e(){await Ke(me.tableId),Ve()}async function De(e){await Ke(me.tableId),He()}function Ve(e){He(e).then((e=>({})))}function He(e,i={}){if(!me.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(me.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c,r;if(Object.keys(n).length>0){_e.value=n.conditionList||[],Le.value=n.displayCategoryList||[];let l={conditionList:_e.value,displayCategoryList:Le.value};pe("getQuickSearchListObj",l),Ne.value=null!=(t=n.settingId)?t:"";const h=_e.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(s=null==(a=Ce.tableOptions)?void 0:a.filterCondition)?void 0:s.displayCategory)&&e&&i({name:null==(d=null==(o=Ce.tableOptions)?void 0:o.filterCondition)?void 0:d.name,sid:null==(r=null==(c=Ce.tableOptions)?void 0:c.filterCondition)?void 0:r.displayCategory}),i(h)}else i({})}))}async function Ke(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ge(i,"requestTableCondiTionList",{},me.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Ue(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();ke.value&&i.includes(ke.value)||We(!1)}))}))})),o((()=>me.tableId),(e=>{e&&Ve(!0)}),{immediate:!0,deep:!0}),o((()=>me.curClassificationIndex),(e=>{void 0!==e&&(we.value=e,qe())}),{immediate:!0,deep:!0}),o((()=>me.curClassificationWidth),(e=>{e&&(Se.value=Number(e)||150)}),{immediate:!0}),o((()=>me.conditionMap),(e=>{!async function(){try{await qe()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(we)]),style:u(h(Be))},[0===h(we)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(Se)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",T,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])):v("v-if",!0),C("ul",R,[(d(!0),c(y,null,k(h(xe),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[C("span",{class:r(["parent",{open:i.open}]),onClick:e=>Me(i)},[C("span",null,g(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,q),i.open?(d(!0),c(y,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}])},[C("span",Q,g(Ue(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,G)))),128)):v("v-if",!0)],64)):(d(),c("span",{key:0,class:r(["child-item header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ae(i)},g(i.name),11,W))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",$,[C("div",D,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[V,m(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:Ge,onEnd:Qe}]]):v("v-if",!0),1===h(we)?(d(),c(y,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(_e).filter((e=>e.isShow)).length>0?(d(),c("div",H,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",K,[C("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[m(" 全部数据 "),h(Ie).digital||0===h(Ie).digital?(d(),c(y,{key:0},[m(" ("+g(h(Ie).digital||0)+") ",1)],64)):v("v-if",!0)],2),C("div",U,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ee,style:{"margin-right":"30px"}},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])])):v("v-if",!0),C("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(y,null,k(h(xe).slice(1),((e,i)=>(d(),c(y,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(y,{key:1},[C("span",Y,g(e.name),1),C("div",Z,[(d(!0),c(y,null,k(e.children,((i,n)=>(d(),c(y,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Ae(i,0,e)},g(Ue(i.name,null==i?void 0:i.isPublic)),11,ee)):v("v-if",!0)],64)))),256))])],64)):(d(),c("span",{key:0,class:r(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>Ae(e)},g(e.name)+" "+g(e.digital),11,X))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ie,[C("div",ne,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(y,null,k(h(xe).slice(1),(e=>(d(),c(y,null,[e.children&&0!==e.children.length?(d(!0),c(y,{key:1},k(e.children,((i,n)=>(d(),c(y,null,[i.selected?(d(),c("div",{class:"selected-item",key:i.sid},[m(g(i.name)+" ",1),p(h(O),{component:h(j),onClick:n=>Ae(i,0,e)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[m(g(e.name)+" ",1),p(h(O),{component:h(j),onClick:i=>Ae(e)},null,8,["component","onClick"])]))],64)))),256)),C("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[le,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(we)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:ke},[C("span",{class:"title",onClick:n[3]||(n[3]=()=>We())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[C("span",te,g(h(Pe)),1)])),default:b((()=>[C("span",ae,g(h(Pe)),1)])),_:1}),p(h(O),{component:h(be)?h(B):h(L)},null,8,["component"])]),h(be)?(d(),c("div",se,[C("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(y,null,k(h(xe),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Me(i)},[m(g(i.name)+g(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,ce)):v("v-if",!0),i.open?(d(!0),c(y,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}])},[C("span",null,g(Ue(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,re)))),128)):v("v-if",!0)],64)):(d(),c(y,{key:0},[C("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ae(i)},g(i.name),11,oe),C("div",de,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",he,[C("div",ue,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[fe,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(_e),displayCategoryList:h(Le),settingId:h(Ne),tableId:e.tableId,classifyModal:h(ze),onSaveGetTableCondiTionList:De,onCondiTionListInit:$e,onSetClassifyModal:Re},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6))}});export{pe as default};
|
|
@@ -774,10 +774,6 @@ declare const ExpandField: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
774
774
|
type: BooleanConstructor;
|
|
775
775
|
default: boolean;
|
|
776
776
|
};
|
|
777
|
-
orgId: {
|
|
778
|
-
type: StringConstructor;
|
|
779
|
-
default: string;
|
|
780
|
-
};
|
|
781
777
|
defaultList: {
|
|
782
778
|
type: import("vue").PropType<string[]>;
|
|
783
779
|
default: () => never[];
|
|
@@ -792,10 +788,6 @@ declare const ExpandField: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
792
788
|
type: BooleanConstructor;
|
|
793
789
|
default: boolean;
|
|
794
790
|
};
|
|
795
|
-
orgId: {
|
|
796
|
-
type: StringConstructor;
|
|
797
|
-
default: string;
|
|
798
|
-
};
|
|
799
791
|
defaultList: {
|
|
800
792
|
type: import("vue").PropType<string[]>;
|
|
801
793
|
default: () => never[];
|
|
@@ -1522,10 +1514,6 @@ declare const ExpandField: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1522
1514
|
type: BooleanConstructor;
|
|
1523
1515
|
default: boolean;
|
|
1524
1516
|
};
|
|
1525
|
-
orgId: {
|
|
1526
|
-
type: StringConstructor;
|
|
1527
|
-
default: string;
|
|
1528
|
-
};
|
|
1529
1517
|
defaultList: {
|
|
1530
1518
|
type: import("vue").PropType<string[]>;
|
|
1531
1519
|
default: () => never[];
|
|
@@ -1541,7 +1529,6 @@ declare const ExpandField: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1541
1529
|
visible: boolean;
|
|
1542
1530
|
defaultList: string[];
|
|
1543
1531
|
treeData: import("../../../es/shared/types").AnyObject[];
|
|
1544
|
-
orgId: string;
|
|
1545
1532
|
}>;
|
|
1546
1533
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checkPerson"[], "checkPerson", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1547
1534
|
defaultValue: {
|
|
@@ -56,10 +56,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
56
|
type: BooleanConstructor;
|
|
57
57
|
default: boolean;
|
|
58
58
|
};
|
|
59
|
-
orgId: {
|
|
60
|
-
type: StringConstructor;
|
|
61
|
-
default: string;
|
|
62
|
-
};
|
|
63
59
|
defaultList: {
|
|
64
60
|
type: PropType<string[]>;
|
|
65
61
|
default: () => never[];
|
|
@@ -74,10 +70,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
70
|
type: BooleanConstructor;
|
|
75
71
|
default: boolean;
|
|
76
72
|
};
|
|
77
|
-
orgId: {
|
|
78
|
-
type: StringConstructor;
|
|
79
|
-
default: string;
|
|
80
|
-
};
|
|
81
73
|
defaultList: {
|
|
82
74
|
type: PropType<string[]>;
|
|
83
75
|
default: () => never[];
|
|
@@ -804,10 +796,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
804
796
|
type: BooleanConstructor;
|
|
805
797
|
default: boolean;
|
|
806
798
|
};
|
|
807
|
-
orgId: {
|
|
808
|
-
type: StringConstructor;
|
|
809
|
-
default: string;
|
|
810
|
-
};
|
|
811
799
|
defaultList: {
|
|
812
800
|
type: PropType<string[]>;
|
|
813
801
|
default: () => never[];
|
|
@@ -823,7 +811,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
823
811
|
visible: boolean;
|
|
824
812
|
defaultList: string[];
|
|
825
813
|
treeData: import("../../..").AnyObject[];
|
|
826
|
-
orgId: string;
|
|
827
814
|
}>;
|
|
828
815
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checkPerson"[], "checkPerson", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
829
816
|
defaultValue: {
|
|
@@ -5,10 +5,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
type: BooleanConstructor;
|
|
6
6
|
default: boolean;
|
|
7
7
|
};
|
|
8
|
-
orgId: {
|
|
9
|
-
type: StringConstructor;
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
12
8
|
defaultList: {
|
|
13
9
|
type: PropType<string[]>;
|
|
14
10
|
default: () => never[];
|
|
@@ -23,10 +19,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
19
|
type: BooleanConstructor;
|
|
24
20
|
default: boolean;
|
|
25
21
|
};
|
|
26
|
-
orgId: {
|
|
27
|
-
type: StringConstructor;
|
|
28
|
-
default: string;
|
|
29
|
-
};
|
|
30
22
|
defaultList: {
|
|
31
23
|
type: PropType<string[]>;
|
|
32
24
|
default: () => never[];
|
|
@@ -753,10 +745,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
753
745
|
type: BooleanConstructor;
|
|
754
746
|
default: boolean;
|
|
755
747
|
};
|
|
756
|
-
orgId: {
|
|
757
|
-
type: StringConstructor;
|
|
758
|
-
default: string;
|
|
759
|
-
};
|
|
760
748
|
defaultList: {
|
|
761
749
|
type: PropType<string[]>;
|
|
762
750
|
default: () => never[];
|
|
@@ -772,6 +760,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
772
760
|
visible: boolean;
|
|
773
761
|
defaultList: string[];
|
|
774
762
|
treeData: AnyObject[];
|
|
775
|
-
orgId: string;
|
|
776
763
|
}>;
|
|
777
764
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,openBlock as o,createBlock as t,unref as i,isRef as l,withCtx as n,createVNode as d,createElementVNode as r,createTextVNode as s}from"vue";import{NModal as u,NCard as p,NButton as c}from"naive-ui";import
|
|
1
|
+
import{defineComponent as e,ref as a,openBlock as o,createBlock as t,unref as i,isRef as l,withCtx as n,createVNode as d,createElementVNode as r,createTextVNode as s}from"vue";import{NModal as u,NCard as p,NButton as c}from"naive-ui";import _ from"../../../select-person/index.js";const f={class:"flex_right"};var m=e({__name:"PersonModal",props:{visible:{type:Boolean,default:!1},defaultList:{type:Array,default:()=>[]},treeData:{type:Array,default:()=>[]}},emits:["check","changeModalVisible"],setup(e,{emit:m}){const b=a({parent_id_obj:"id",parent_id_obj_key:"id",parent_name_obj:"name",parent_name_obj_key:"name",user_count_obj:"count"}),h={user_id_obj:"id",user_id_obj_key:"id",user_name_obj:"name",user_name_obj_key:"name"},v=a([]),k=a([]);function x(){m("check",k.value),v.value=[],g()}function g(){m("changeModalVisible")}function y(e){const a=e.map((e=>e.originItem));a.forEach((e=>{e.parentNode&&delete e.parentNode})),k.value=a}return(a,m)=>(o(),t(i(u),{class:"expand-field-modal-block expand-person-modal",show:e.visible,"onUpdate:show":m[0]||(m[0]=e=>l(visible)?visible.value=e:null),maskClosable:!1,width:"700px",bodyStyle:"height: 556px;maxHeight: 556px;",closable:!1,centered:"",onPositiveClick:x,onNegativeClick:g},{default:n((()=>[d(i(p),{style:{width:"700px",height:"556px",maxHeight:"556px"},title:"批量编辑",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":n((()=>[r("div",{class:"svg-wrap"},[r("i",{onClick:g,class:"iconfont-expand-field icon-expand-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:n((()=>[r("div",f,[d(i(c),{onClick:g},{default:n((()=>[s("取消")])),_:1}),d(i(c),{type:"info",onClick:x},{default:n((()=>[s("保存")])),_:1})])])),default:n((()=>[d(i(_),{style:{padding:"0"},ref:"personRef",wordbook:b.value,wordbookChild:h,data:e.treeData,defaultList:e.defaultList,onCheckWithLevel:y},null,8,["wordbook","data","defaultList"])])),_:1})])),_:1},8,["show"]))}});export{m as default};
|
|
@@ -669,10 +669,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
669
669
|
type: BooleanConstructor;
|
|
670
670
|
default: boolean;
|
|
671
671
|
};
|
|
672
|
-
orgId: {
|
|
673
|
-
type: StringConstructor;
|
|
674
|
-
default: string;
|
|
675
|
-
};
|
|
676
672
|
defaultList: {
|
|
677
673
|
type: import("vue").PropType<string[]>;
|
|
678
674
|
default: () => never[];
|
|
@@ -687,10 +683,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
687
683
|
type: BooleanConstructor;
|
|
688
684
|
default: boolean;
|
|
689
685
|
};
|
|
690
|
-
orgId: {
|
|
691
|
-
type: StringConstructor;
|
|
692
|
-
default: string;
|
|
693
|
-
};
|
|
694
686
|
defaultList: {
|
|
695
687
|
type: import("vue").PropType<string[]>;
|
|
696
688
|
default: () => never[];
|
|
@@ -1417,10 +1409,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1417
1409
|
type: BooleanConstructor;
|
|
1418
1410
|
default: boolean;
|
|
1419
1411
|
};
|
|
1420
|
-
orgId: {
|
|
1421
|
-
type: StringConstructor;
|
|
1422
|
-
default: string;
|
|
1423
|
-
};
|
|
1424
1412
|
defaultList: {
|
|
1425
1413
|
type: import("vue").PropType<string[]>;
|
|
1426
1414
|
default: () => never[];
|
|
@@ -1436,7 +1424,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1436
1424
|
visible: boolean;
|
|
1437
1425
|
defaultList: string[];
|
|
1438
1426
|
treeData: AnyObject[];
|
|
1439
|
-
orgId: string;
|
|
1440
1427
|
}>;
|
|
1441
1428
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checkPerson"[], "checkPerson", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1442
1429
|
defaultValue: {
|
|
@@ -776,10 +776,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
776
776
|
type: BooleanConstructor;
|
|
777
777
|
default: boolean;
|
|
778
778
|
};
|
|
779
|
-
orgId: {
|
|
780
|
-
type: StringConstructor;
|
|
781
|
-
default: string;
|
|
782
|
-
};
|
|
783
779
|
defaultList: {
|
|
784
780
|
type: PropType<string[]>;
|
|
785
781
|
default: () => never[];
|
|
@@ -794,10 +790,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
794
790
|
type: BooleanConstructor;
|
|
795
791
|
default: boolean;
|
|
796
792
|
};
|
|
797
|
-
orgId: {
|
|
798
|
-
type: StringConstructor;
|
|
799
|
-
default: string;
|
|
800
|
-
};
|
|
801
793
|
defaultList: {
|
|
802
794
|
type: PropType<string[]>;
|
|
803
795
|
default: () => never[];
|
|
@@ -1524,10 +1516,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1524
1516
|
type: BooleanConstructor;
|
|
1525
1517
|
default: boolean;
|
|
1526
1518
|
};
|
|
1527
|
-
orgId: {
|
|
1528
|
-
type: StringConstructor;
|
|
1529
|
-
default: string;
|
|
1530
|
-
};
|
|
1531
1519
|
defaultList: {
|
|
1532
1520
|
type: PropType<string[]>;
|
|
1533
1521
|
default: () => never[];
|
|
@@ -1543,7 +1531,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1543
1531
|
visible: boolean;
|
|
1544
1532
|
defaultList: string[];
|
|
1545
1533
|
treeData: AnyObject[];
|
|
1546
|
-
orgId: string;
|
|
1547
1534
|
}>;
|
|
1548
1535
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checkPerson"[], "checkPerson", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1549
1536
|
defaultValue: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,provide as e,ref as l,openBlock as a,createElementBlock as i,createElementVNode as n,
|
|
1
|
+
import{defineComponent as t,provide as e,ref as l,openBlock as a,createElementBlock as i,createElementVNode as n,createVNode as o,unref as s,withCtx as r,Fragment as d,renderList as c,createTextVNode as u,toDisplayString as m,createBlock as p,withModifiers as f}from"vue";import{useMessage as v,NGrid as h,NGridItem as _,NTooltip as g,NIcon as y,NPopconfirm as C,NButton as k}from"naive-ui";import{Brush as x}from"@vicons/ionicons5";import D from"./components/form.vue.js";import w from"./hooks/useAsyncData.js";import{InjectionExpandFieldApiConfig as b}from"./constants/index.js";const M={class:"tableset-expand-field"},N={class:"list"},I={class:"table-modal-list"},z={class:"list-content"},A=n("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[n("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),n("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),n("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),n("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),S={class:"footer"};var j=t({__name:"index",props:{id:{type:String,default:""},expandFieldApiConfig:{type:Object},tableData:{type:Array,default:()=>[]},orgId:{type:String,default:""}},emits:["closeModal"],setup(t,{emit:j}){const F=t,O=v(),{deleteExtendFieldById:V}=w();e(b,F.expandFieldApiConfig);const B=[{title:"字段标题",columnName:"name",span:3},{title:"字段键名",columnName:"code",span:3},{title:"字段类型",columnName:"html_type",span:3},{title:"问号提示",columnName:"remark",span:4},{title:"创建时间",columnName:"createdDate",span:4},{title:"修改时间",columnName:"updatedDate",span:4},{title:"操作",columnName:"operator",span:3}],E=l(!1),P=l("add"),U=l({});function q(){j("closeModal")}function G(){E.value=!0,P.value="add",U.value={}}function H(){E.value=!1}return(e,l)=>(a(),i("div",M,[n("div",N,[n("div",I,[o(s(h),{cols:24,class:"list-title"},{default:r((()=>[(a(),i(d,null,c(B,(t=>o(s(_),{span:t.span,class:"list-title-item",key:t.columnName},{default:r((()=>[u(m(t.title),1)])),_:2},1032,["span"]))),64))])),_:1}),n("div",z,[(a(!0),i(d,null,c(t.tableData,((t,e)=>(a(),p(s(h),{key:e,class:"list-content-block"},{default:r((()=>[o(s(_),{span:3,title:t.name,class:"list-content-item"},{default:r((()=>[u(m(t.name),1)])),_:2},1032,["title"]),o(s(_),{span:3,title:t.code,class:"list-content-item"},{default:r((()=>[u(m(t.code),1)])),_:2},1032,["title"]),o(s(_),{span:3,title:t.html_type,class:"list-content-item"},{default:r((()=>[u(m(t.html_type),1)])),_:2},1032,["title"]),o(s(_),{span:4,title:t.remark,class:"list-content-item"},{default:r((()=>[u(m(t.remark),1)])),_:2},1032,["title"]),o(s(_),{span:4,title:t.createdDate,class:"list-content-item"},{default:r((()=>[u(m(t.createdDate),1)])),_:2},1032,["title"]),o(s(_),{span:4,title:t.updatedDate,class:"list-content-item"},{default:r((()=>[u(m(t.updatedDate),1)])),_:2},1032,["title"]),o(s(_),{span:3,class:"list-content-item"},{default:r((()=>[o(s(g),{duration:0},{trigger:r((()=>[o(s(y),{component:s(x),onClick:f((e=>{return l=t,E.value=!0,P.value="edit",void(U.value={...l});var l}),["prevent","stop"])},null,8,["component","onClick"])])),default:r((()=>[u(" 编辑 ")])),_:2},1024),o(s(g),{duration:0},{trigger:r((()=>[o(s(C),{onPositiveClick:e=>async function(t){try{const e=await V(t,F.expandFieldApiConfig);if("SUCCESS"!==(null==e?void 0:e.result))return void O.error((null==e?void 0:e.resultMsg)||"删除失败");O.success("删除成功")}catch(t){O.error(t)}}(t)},{trigger:r((()=>[o(s(y),null,{default:r((()=>[A])),_:1})])),default:r((()=>[u(" 确认要删除-"+m(t.name)+"吗? ",1)])),_:2},1032,["onPositiveClick"])])),default:r((()=>[u(" 删除 ")])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])]),n("div",S,[o(s(k),{onClick:q},{default:r((()=>[u("取消")])),_:1}),o(s(k),{type:"info",onClick:G},{default:r((()=>[u("增加字段")])),_:1})])]),o(D,{visible:E.value,formItemData:U.value,formOntype:P.value,id:t.id,orgId:t.orgId,onCancelModal:H},null,8,["visible","formItemData","formOntype","id","orgId"])]))}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as
|
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as o,drawText as n,defaultTextStyle as i,drawPoint as r,drawTextAndIconGroup as l,defaultStyle as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as u}from"../useGrid.js";import{useBirthProcessCumputedPoint as c}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as p}from"../useScaleColumn.js";import{useCommon as h}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import"../temperature/useShadow.js";import{cloneDeep as k}from"lodash-es";import{format as w}from"date-fns";import"naive-ui";import"@vueuse/core";function x(x,b,j,C,P){const{cumputedX:S,cumputedY:E,getXValue:G,getYValue:M}=c(b),{getEqualXTypes:T,handleAddPrevent:Y,isGridLimit:L,setPrevAndNextPoint:X}=h(x,j,b),{xAxis:A,grid:I,originX:H,originY:W,xCellWidth:N,endY:O,startTime:V,leftAddAreaWidth:D,leftScales:R,rightScales:$,yCellHeight:B,endX:F,scaleValues:q,canvasWidth:z,borderStyle:J,rightAddAreaWidth:K,event:Q,originYCervix:U,other:Z,canvasHeight:_}=b,ee=k(q),te=new Set;function oe(){ee.filter((e=>e.show)).forEach(((e,l)=>{var s;const a=[],u=[],c=[];null==(s=e.data)||s.forEach(((s,d)=>{!function(s,d,f){let p,h;const{pointAttr:g={},lineAttr:v={},title:m="",key:y,type:k="circle",childbirthStyle:w={}}=e,P=e.data[f+1],S=se(P,e);if(s&&S&&!d.breakpoint)h=t([...s,...S],{...v});else if(s&&!S&&!d.breakpoint){const o=se(P,e);h=o?t([...s,...o],{...v}):null}let E,T;if(d.childbirth){const e=s[1]+B;E=o([s[0],s[1],e],w),c.push(E),T=n([s[0]+N/2,e-B/2],{value:String(d.childbirth),...i,originX:"left",originY:"center",...w}),c.push(T)}const Y=u[f-1],L={origin:{data:d,title:m,key:y||"",dataIndex:l,index:f},leftLine:Y,rightLine:h,arrowGroup:E,arrowGroupText:T,...g,...b.event.hovered?b.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:b.event};Y?p=r(k,{left:Y.get("x2"),top:Y.get("y2"),...L}):s&&(L.leftLine=null,p=r(k,{left:s[0],top:s[1],...L}));u.push(h),p&&(!function(e){Q.hovered&&(e.on("mouseover",(()=>{le(e,"hover")})),e.on("mouseout",(()=>{C.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{re(e),function(e){var t,o,n,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(o=e.rightLine)||o.setCoords().set({x1:e.left,y1:e.top}),null==(n=e.arrowGroup)||n.setCoords().set({left:e.left,top:e.top}),null==(i=e.arrowGroupText)||i.setCoords().set({left:e.left+N/2,top:e.top+B/2})}(e),Q.hovered&&le(e)})),e.on("mouseup",(t=>{if(C.show=!1,1===t.button){const{key:t}=e.origin,o={...e.origin,data:{...e.origin.data,time:G(e.left),value:M(t,e.top)}};x.value.discardActiveObject(),j("change",o),ne(o,"change")}}))}(p),a.push(p),te.add(p))}(se(s,e),s,d)})),Promise.all(a).then((e=>{const t=u.filter((e=>e));X(e),Promise.all(c).then((o=>{x.value.add(...t,...e,...o),e.forEach((e=>{null==e||e.bringToFront()}))}))}))}))}function ne(e,t="add"){const{dataIndex:o,data:n,index:i,key:r}=e,l=ee.find((e=>e.key===r));switch(t){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=n;break;default:{const e=g(n.time,l.data);l.data.splice(e,0,n);break}}ie()}function ie(){var e;te.size&&(null==(e=x.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),(null==e?void 0:e.arrowGroup)&&t.push(null==e?void 0:e.arrowGroup),(null==e?void 0:e.arrowGroupText)&&t.push(null==e?void 0:e.arrowGroupText)})),t}([...te]))),te.clear(),oe()}function re(e){const t=e.prevPoint?e.prevPoint.left:H,o=e.nextPoint?e.nextPoint.left:F;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<U&&e.set("top",U),e.top<W&&e.set("top",W),e.top>O&&e.set("top",O),e.left<t&&e.set("left",t),e.left>o&&e.set("left",o)}function le(e,t="moving"){const{title:o,key:n,data:i}=e.origin;C.point={x:e.left,y:e.top},C.list=[`${o} ${"hover"===t?i.value:M(n,e.top)}`,`时间 ${G(e.left).slice(-5)}`],C.show=!0}function se(e,t){if(v(e)&&function(e){const t=V+864e5,o=m(e);return o>=V&&o<=t}(e.time)){const o=S(e.time),n=E(t.key,t.range,e.value);return[o,n<W?W:n>O?O:n]}}function ae(e,t){return e+1>t[1]?t[0]:e+1}return u(x,b),function(){const t=new e.Rect({...J,width:z-D-K-1,height:O-1,left:D,top:0,fill:"transparent"});x.value.add(t)}(),function(){function t(t,o="left"){let r="left"===o?D:F;t.forEach(((t,o)=>{const{range:l,spaceValue:u,width:c,title:h,titleStyle:g,key:v,position:m="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:b}=t,j=[],C=[],P=r+c/2,S=y(l,u),E=S.length;S.forEach(((e,o)=>{const{lineXMain:n,lineXSub:i,textLeft:l}=d(m,r,c),s=O-o*B*k,a=0===o?O-8:o!==S.length-1||W||U&&"FHR"!==v?s:W+8;!w||(0===o||o===E-1)&&!b||j.push(f(String(e),t,l,a)),C.push(...p(t,o,n,i,s,B,W,E))}));const G=new e.Rect({...a,strokeWidth:.5,width:c,height:O,left:P,top:O/2}),M=n([P,W>0?W-B/2:B/2],{value:String(h),...i,...g}),T=new e.Group([...C,...j,G,...M?[M]:[]],{objectCaching:!1,...s});x.value.add(T),T.sendToBack(),r+=c}))}t(R),t($,"right")}(),function(){const{show:t,startTime:o,range:r=[0,23],position:l="top",style:a}=A.time,{show:u,range:c=[0,23],position:d,style:f}=A.processTime;if(t||u){const p=[],h=[],g=[],v=[],m=H+N/2,y=B/2;for(let e=0;e<I.mainXCell;e++){if(t){const t=0===e?+o.slice(11,13):ae(p.at(-1),r);p.push(t);const s="top"===l?W-y:O+y;g.push(n([m+e*N,s],{value:String(t),...i,...a||{}}))}if(u){const t=0===e?c[0]:h.at(-1)+1;h.push(t);const o="top"===d?y:_-y;v.push(n([m+e*N,o],{value:String(t),...i,...f||{}}))}}const k=new e.Group([...g,...v],{objectCaching:!1,...s});x.value.add(k),x.value.sendToBack(k)}}(),function(){var e;const o=Object.values(Z),n=[],i={},r=ee.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:o,range:n}=r||{},i=E(o,n,10),l=[0,t],s=[-t/e,0],a=[(O-i-t)/e,O-i],u=[F-H,e*(F-H)+t];let c=[],d=[];function f([o,n]){return Math.abs(n-e*o-t)<=1}function p([e,t]){const[o,n]=[...h([e,t])];return o>=H&&o<=F&&n>=i&&n<=O}function h([e,t]){return[H+e,O-t]}return f(l)&&p(l)&&(c=h(l)),f(s)&&p(s)&&(c=h(s)),f(a)&&p(a)&&(d=h(a)),f(u)&&p(u)&&(d=h(u)),[...c,...d]}o.forEach((e=>{if(!e.show)return;const{key:o}=e;switch(o){case"fetalPresentation":{const{range:i,show:r}=ee.find((e=>e.key===o));if(r){const r=E(o,i,0);n.push(t([H,r,F,r],{...e}))}break}case"alert":if(l){const{key:o,range:a}=r||{},u=216e5,c={time:w(new Date(m(l.time)+u),"yyyy-MM-dd HH:mm"),value:10},[d,f]=[S(l.time)-H,O-E(o,a,l.value)],[p,h]=[S(c.time)-H,O-E(o,a,c.value)],g=(h-f)/(p-d),v=f-d*g,y=s(g,v);y.length>0&&(n.push(t(y,{...e})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(l){const{k:o,b:r}=i,a=144e5,u=s(o,r-(S(w(new Date(m(l.time)+a),"yyyy-MM-dd HH:mm"))-S(l.time))*o);u.length>0&&n.push(t(u,{...e}))}}})),x.value.add(...n)}(),oe(),function(){function e(e,t){const o=ee.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:o,key:e.key},pointer:t}}b.event.evented&&x.value.on("mouse:up",(t=>{if(3===t.button){const{x:o=0,y:n=0}=t.pointer||{};o>=H&&o<=F&&n>=W&&n<=O&&(P.point={x:o,y:n},P.show=!0,t.target?(P.target=t.target,P.list=["删除节点"],[...te].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&P.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(P.target=null,P.list=["新增节点"],ee.filter((e=>e.show)).forEach((i=>{if(!T([...te],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<U)return;P.list.push(e(i,t.pointer))}})),1===P.list.length&&(P.show=!1,Y("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=z-K/2;function t(e,t){if(!e.length)return;let n=W;const i=[];e.forEach((e=>{const o=e.title.split("").join("\n"),r=q.findIndex((t=>t.key===e.key)),{text:s,icon:a}=l(o,e,{text:{originY:"top",left:t,top:n},icon:{left:t,topY:n,originY:"top",origin:{type:e.type,dataIndex:r},...b.event}},"vertical");var u;n+=s.height+a.height+15,(u=a).on("moving",(()=>{u.set("originY","center"),L(u)?(re(u),le(u)):C.show=!1})),u.on("mouseup:before",(e=>{if(C.show=!1,0===e.e.button&&L(u))if(T([...te],u.left,"key").includes(u.origin.key))Y("repeat");else{const e={data:{time:G(u.left),value:M(u.origin.key,u.top)},...u.origin};j("add",e),ne(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(u)})),i.push(s,a)})),o(i),x.value.add(...i)}function o(e){const t=e.at(-1),o=(O-W)/2,n=(t.height+t.top-W)/2;e.forEach((e=>{const t=e.top+o-n;e.set({top:t,originTop:t})}))}t(R,D/2),t($,e)}(),{clickMenu:function({item:e,target:t}){const o={...e.origin};"remove"===e.mode?(j("remove",o),ne(o,"remove")):(Object.assign(o,{data:{time:G(e.pointer.x),value:M(e.origin.key,e.pointer.y)}}),j("add",o),ne(o))},redrawPoints:ie}}export{x as useBirthProcess};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e,computed as a,reactive as t,onMounted as l,nextTick as r}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as i}from"../../utils/index.js";import{useCanvasEvent as s}from"../useEvent.js";import"../temperature/useShadow.js";import"lodash-es";import"naive-ui";import{useBirthProcess as d}from"./useBirthProcess.js";function n(n,o,v,c,h,m){const f=e(),p=e(),g=e(),x=a((()=>o.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),w=a((()=>o.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),y=a((()=>{var e;return(null==(e=w.value)?void 0:e.length)?30:0})),V=a((()=>{var e;return 30+(null==(e=x.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),b=a((()=>{var e;const{width:a}=o.data,t=null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-y.value-t})),j=a((()=>o.data.grid.mainXCell)),A=a((()=>{const e=o.data.grid.mainYCell||14;return o.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),C=a((()=>(b.value-V.value)/j.value)),k=a((()=>{const{xAxis:e,height:a}=o.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(A.value+t)})),Y=a((()=>{const{xAxis:e}=o.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return k.value*a})),S=a((()=>{var e;const{scaleValues:a}=o.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!Y.value)return Y.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return H.value-l*r*k.value})),H=a((()=>{const{xAxis:e,height:a}=o.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-k.value*t})),P=a((()=>i(o.data.xAxis.time.startTime))),X=a((()=>36e5/C.value)),F=a((()=>{const{scaleValues:e}=o.data,a=e.find((e=>"cervix"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),R=a((()=>{const{scaleValues:e}=o.data,a=e.find((e=>"FHR"===e.key));return k.value/((null==a?void 0:a.spaceValue)||10)})),W=a((()=>{const{scaleValues:e}=o.data,a=e.find((e=>"fetalPresentation"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),O=a((()=>{var e;return(null==(e=o.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),M=t({canvasWidth:o.data.width,canvasHeight:o.data.height,borderStyle:{...u,...o.data.borderStyle||{}},selectionStyle:o.data.selectionStyle||{},grid:o.data.grid,other:o.data.other,originX:V.value,endX:b.value,originY:Y.value,endY:H.value,xCellWidth:C.value,yCellHeight:k.value,gridXNumber:j.value,gridYNumber:A.value,xAxis:o.data.xAxis,leftScales:x.value,rightScales:w.value,leftAddAreaWidth:30,rightAddAreaWidth:y.value,startTime:P.value,timeXCell:X.value,cervixYCell:F.value,FHRYCell:R.value,fetalPresentationYCell:W.value,scaleValues:o.data.scaleValues,event:O.value,originYCervix:S.value});return l((()=>{r((()=>{const{clickMenu:e,redrawPoints:a}=d(n,M,v,h,m);p.value=a,g.value=e;const{select:t}=s(n,M,v);f.value=t}))})),{propItems:M,redrawPoints:p,select:f,clickMenu:g}}export{n as useBirthProcessChart};
|
|
1
|
+
import{ref as e,computed as a,reactive as t,onMounted as l,nextTick as r}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as i}from"../../utils/index.js";import{useCanvasEvent as s}from"../useEvent.js";import"../temperature/useShadow.js";import"lodash-es";import"naive-ui";import"@vueuse/core";import{useBirthProcess as d}from"./useBirthProcess.js";function n(n,o,v,c,h,m){const f=e(),p=e(),g=e(),x=a((()=>o.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),w=a((()=>o.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),y=a((()=>{var e;return(null==(e=w.value)?void 0:e.length)?30:0})),V=a((()=>{var e;return 30+(null==(e=x.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),b=a((()=>{var e;const{width:a}=o.data,t=null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-y.value-t})),j=a((()=>o.data.grid.mainXCell)),A=a((()=>{const e=o.data.grid.mainYCell||14;return o.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),C=a((()=>(b.value-V.value)/j.value)),k=a((()=>{const{xAxis:e,height:a}=o.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(A.value+t)})),Y=a((()=>{const{xAxis:e}=o.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return k.value*a})),S=a((()=>{var e;const{scaleValues:a}=o.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!Y.value)return Y.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return H.value-l*r*k.value})),H=a((()=>{const{xAxis:e,height:a}=o.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-k.value*t})),P=a((()=>i(o.data.xAxis.time.startTime))),X=a((()=>36e5/C.value)),F=a((()=>{const{scaleValues:e}=o.data,a=e.find((e=>"cervix"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),R=a((()=>{const{scaleValues:e}=o.data,a=e.find((e=>"FHR"===e.key));return k.value/((null==a?void 0:a.spaceValue)||10)})),W=a((()=>{const{scaleValues:e}=o.data,a=e.find((e=>"fetalPresentation"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),O=a((()=>{var e;return(null==(e=o.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),M=t({canvasWidth:o.data.width,canvasHeight:o.data.height,borderStyle:{...u,...o.data.borderStyle||{}},selectionStyle:o.data.selectionStyle||{},grid:o.data.grid,other:o.data.other,originX:V.value,endX:b.value,originY:Y.value,endY:H.value,xCellWidth:C.value,yCellHeight:k.value,gridXNumber:j.value,gridYNumber:A.value,xAxis:o.data.xAxis,leftScales:x.value,rightScales:w.value,leftAddAreaWidth:30,rightAddAreaWidth:y.value,startTime:P.value,timeXCell:X.value,cervixYCell:F.value,FHRYCell:R.value,fetalPresentationYCell:W.value,scaleValues:o.data.scaleValues,event:O.value,originYCervix:S.value});return l((()=>{r((()=>{const{clickMenu:e,redrawPoints:a}=d(n,M,v,h,m);p.value=a,g.value=e;const{select:t}=s(n,M,v);f.value=t}))})),{propItems:M,redrawPoints:p,select:f,clickMenu:g}}export{n as useBirthProcessChart};
|