cnhis-design-vue 3.1.56-release.0 → 3.1.56
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/annotation-edit/index.d.ts +18 -0
- package/es/components/annotation-edit/src/AnnotationEdit.d.ts +18 -0
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/annotation-edit/src/type.d.ts +4 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +20 -6
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/recordingDialog.vue.d.ts +14 -0
- package/es/components/audio-sdk/src/components/recordingDialog.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/recordingDialog.d.ts +5 -2
- package/es/components/audio-sdk/src/utils/recordingDialog.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/base-search/index.d.ts +14 -0
- package/es/components/base-search/src/index.vue.d.ts +14 -0
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/big-table/index.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +26 -4
- package/es/components/classification/index.d.ts +20 -7
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +14 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +20 -7
- package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +6 -5
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/src/index.vue.d.ts +20 -7
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/index.d.ts +4 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -2
- package/es/components/fabric-chart/src/FabricChart.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/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.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/form-config/index.d.ts +82 -14
- package/es/components/form-config/src/FormConfig.vue.d.ts +82 -14
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +26 -4
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +41 -7
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +26 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +27 -4
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +26 -4
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +1 -0
- package/es/components/form-render/src/constants/index.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +3 -1
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +77 -13
- package/es/components/info-header/src/InfoHeader.vue.d.ts +77 -13
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +5 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +5 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -5
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +26 -4
- package/es/components/recommend-search/index.d.ts +8 -8
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +8 -8
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -3
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +3 -3
- package/es/components/shortcut-setter/index.d.ts +26 -4
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +26 -4
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +14 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +14 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +14 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +14 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +15 -0
- 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 +14 -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 +15 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +15 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -1
- package/es/shared/components/CancelRadio/index.js +1 -1
- package/es/shared/components/InputNumberSlash/index.js +1 -1
- package/es/shared/components/SelectPage/index.js +1 -1
- package/es/shared/components/SlotRender/index.js +1 -1
- package/es/shared/components/SvgIcon/index.js +1 -1
- package/es/shared/components/TextOverTooltip/index.js +1 -1
- package/es/shared/components/VueDraggable/index.js +1 -1
- package/es/shared/components/no-data/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -0
- package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -0
- package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -0
- package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -0
- package/es/shared/utils/tapable/SyncBailHook.js +1 -0
- package/es/shared/utils/tapable/SyncLoopHook.js +1 -0
- package/es/shared/utils/vexutils.js +1 -1
- package/package.json +2 -2
|
@@ -643,6 +643,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
643
643
|
type: BooleanConstructor;
|
|
644
644
|
default: boolean;
|
|
645
645
|
};
|
|
646
|
+
loading: {
|
|
647
|
+
type: BooleanConstructor;
|
|
648
|
+
default: boolean;
|
|
649
|
+
};
|
|
646
650
|
}, {
|
|
647
651
|
selectMinWidth: number;
|
|
648
652
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -674,6 +678,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
674
678
|
type: BooleanConstructor;
|
|
675
679
|
default: boolean;
|
|
676
680
|
};
|
|
681
|
+
loading: {
|
|
682
|
+
type: BooleanConstructor;
|
|
683
|
+
default: boolean;
|
|
684
|
+
};
|
|
677
685
|
}>> & {
|
|
678
686
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
679
687
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
@@ -682,6 +690,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
682
690
|
dragEndWidth: import("vue").Ref<number>;
|
|
683
691
|
showKeys: import("vue").ComputedRef<any>;
|
|
684
692
|
titleList: import("vue").ComputedRef<string[]>;
|
|
693
|
+
isOptionsNull: import("vue").ComputedRef<boolean>;
|
|
685
694
|
handleSelect: (option: any) => void;
|
|
686
695
|
searchByPage: (onePage: number) => void;
|
|
687
696
|
changeWidth: ({ distance }: any) => void;
|
|
@@ -757,10 +766,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
757
766
|
type: BooleanConstructor;
|
|
758
767
|
default: boolean;
|
|
759
768
|
};
|
|
769
|
+
loading: {
|
|
770
|
+
type: BooleanConstructor;
|
|
771
|
+
default: boolean;
|
|
772
|
+
};
|
|
760
773
|
}>> & {
|
|
761
774
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
762
775
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
763
776
|
}, {
|
|
777
|
+
loading: boolean;
|
|
764
778
|
dynamicOptionInfo: import("../../../..").AnyObject;
|
|
765
779
|
fieldTitleList: import("../../../..").AnyObject[];
|
|
766
780
|
optionList: import("../../../..").AnyObject[];
|
|
@@ -37,7 +37,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
$message: import("naive-ui").MessageApi;
|
|
38
38
|
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
39
39
|
conditionList: import("vue").Ref<unknown[]>;
|
|
40
|
-
checkedItem: import("vue").Ref<any>;
|
|
41
40
|
addVisible: import("vue").Ref<boolean>;
|
|
42
41
|
actionList_prop: import("vue").Ref<{}>;
|
|
43
42
|
newSearchFieldList: any;
|
|
@@ -54,7 +53,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
53
|
copy: (item: IClassifyListType) => void;
|
|
55
54
|
saveAdd: (params: any) => Promise<void>;
|
|
56
55
|
cancelSaveAdd: () => void;
|
|
57
|
-
changeData: (data: any, checkedItemVal: any) => void;
|
|
58
56
|
delItem: (checkedItemVal: any) => Promise<void>;
|
|
59
57
|
setOneVisible: (flag: boolean) => void;
|
|
60
58
|
resetPopconfirm: () => Promise<void>;
|
|
@@ -88,6 +86,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
86
|
};
|
|
89
87
|
type: {
|
|
90
88
|
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
91
90
|
};
|
|
92
91
|
transitionName: {
|
|
93
92
|
type: StringConstructor;
|
|
@@ -131,6 +130,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
130
|
};
|
|
132
131
|
type: {
|
|
133
132
|
type: StringConstructor;
|
|
133
|
+
default: string;
|
|
134
134
|
};
|
|
135
135
|
transitionName: {
|
|
136
136
|
type: StringConstructor;
|
|
@@ -142,11 +142,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
142
142
|
}>> & {
|
|
143
143
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
144
144
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
145
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
146
145
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
147
146
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
148
147
|
}>>;
|
|
149
|
-
emits: (event: "close" | "handleOk" | "
|
|
148
|
+
emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
|
|
150
149
|
isAdmin: import("vue").ComputedRef<unknown>;
|
|
151
150
|
homeList: any;
|
|
152
151
|
visible: import("vue").Ref<boolean>;
|
|
@@ -158,7 +157,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
158
157
|
rinkTo: () => void;
|
|
159
158
|
close: () => void;
|
|
160
159
|
resetChangeWindow: () => void;
|
|
161
|
-
dragEnd: () => void;
|
|
162
160
|
clickli: (item: IClassifyListType) => void;
|
|
163
161
|
clickChecked: (item: IClassifyListType) => void;
|
|
164
162
|
changeSwitch: (item: IClassifyListType) => void;
|
|
@@ -260,7 +258,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
260
258
|
modelValue: unknown[];
|
|
261
259
|
componentData: Record<string, any>;
|
|
262
260
|
}>;
|
|
263
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "
|
|
261
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "resetPopconfirm" | "finishSubmit")[], "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
264
262
|
visibleIn: {
|
|
265
263
|
type: BooleanConstructor;
|
|
266
264
|
};
|
|
@@ -288,6 +286,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
288
286
|
};
|
|
289
287
|
type: {
|
|
290
288
|
type: StringConstructor;
|
|
289
|
+
default: string;
|
|
291
290
|
};
|
|
292
291
|
transitionName: {
|
|
293
292
|
type: StringConstructor;
|
|
@@ -299,11 +298,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
299
298
|
}>> & {
|
|
300
299
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
301
300
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
302
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
303
301
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
304
302
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
305
303
|
}, {
|
|
306
304
|
loading: boolean;
|
|
305
|
+
type: string;
|
|
307
306
|
dataSource: unknown[];
|
|
308
307
|
visibleIn: boolean;
|
|
309
308
|
getContainer: Function;
|
|
@@ -953,6 +952,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
953
952
|
type: BooleanConstructor;
|
|
954
953
|
default: boolean;
|
|
955
954
|
};
|
|
955
|
+
loading: {
|
|
956
|
+
type: BooleanConstructor;
|
|
957
|
+
default: boolean;
|
|
958
|
+
};
|
|
956
959
|
}, {
|
|
957
960
|
selectMinWidth: number;
|
|
958
961
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -984,6 +987,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
984
987
|
type: BooleanConstructor;
|
|
985
988
|
default: boolean;
|
|
986
989
|
};
|
|
990
|
+
loading: {
|
|
991
|
+
type: BooleanConstructor;
|
|
992
|
+
default: boolean;
|
|
993
|
+
};
|
|
987
994
|
}>> & {
|
|
988
995
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
989
996
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
@@ -992,6 +999,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
992
999
|
dragEndWidth: import("vue").Ref<number>;
|
|
993
1000
|
showKeys: import("vue").ComputedRef<any>;
|
|
994
1001
|
titleList: import("vue").ComputedRef<string[]>;
|
|
1002
|
+
isOptionsNull: import("vue").ComputedRef<boolean>;
|
|
995
1003
|
handleSelect: (option: any) => void;
|
|
996
1004
|
searchByPage: (onePage: number) => void;
|
|
997
1005
|
changeWidth: ({ distance }: any) => void;
|
|
@@ -1067,10 +1075,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1067
1075
|
type: BooleanConstructor;
|
|
1068
1076
|
default: boolean;
|
|
1069
1077
|
};
|
|
1078
|
+
loading: {
|
|
1079
|
+
type: BooleanConstructor;
|
|
1080
|
+
default: boolean;
|
|
1081
|
+
};
|
|
1070
1082
|
}>> & {
|
|
1071
1083
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
1072
1084
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
1073
1085
|
}, {
|
|
1086
|
+
loading: boolean;
|
|
1074
1087
|
dynamicOptionInfo: import("../../../..").AnyObject;
|
|
1075
1088
|
fieldTitleList: import("../../../..").AnyObject[];
|
|
1076
1089
|
optionList: import("../../../..").AnyObject[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as
|
|
1
|
+
import{defineComponent as e,ref as i,inject as t,useAttrs as a,computed as n,watch as o,openBlock as s,createElementBlock as l,unref as c,createBlock as d,mergeProps as r,withCtx as u,createVNode as f,createTextVNode as v,createCommentVNode as y}from"vue";import{useMessage as m,NButton as p}from"naive-ui";import b from"../table-modal/index.vue.js";import h from"../search-filter/index.vue.js";import C from"../../../../table-filter/src/hooks/useMixins.js";import{InjectionFilterApiConfig as g}from"../../../../table-filter/src/constants/index.js";const L={class:"search"};var I=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},conditionList:{type:Array,default:()=>[]},settingId:String,classifyModal:{type:Boolean,default:!1}},emits:["CondiTionListInit","saveGetTableCondiTionList","setClassifyModal"],setup(e,{emit:I}){const T=e,S=m(),{handleGetConfigApi:j}=C();let A=i(T.conditionList),_=i(!1),k=i({}),O=i([]),x=i(!1);const F=i(null),w=t(g),G=a();async function M(e){try{let i=Object.assign(e,{id:T.settingId,tableId:G.tableId});await j(i,"requestSaveTableCondiTionSetting",{},w)&&(I("CondiTionListInit"),$(!1))}catch(e){console.log(e)}}function q(){$(!1),A.value.forEach((e=>{e.checked=!1}))}function R(){_.value=!0}function E(e){_.value=!0,k.value=Object.assign(e,{from:"edit"})}function H(e){_.value=!0,k.value=Object.assign(e,{from:"copy"})}async function K(e){try{if(Object.assign(e,{tableId:G.tableId,conditionList:JSON.stringify(A.value)}),x.value=!0,!await j(e,"requestSaveTableCondiTion",{},w))return;F.value&&F.value.cancelSaveAdd(),I("saveGetTableCondiTionList"),_.value=!1}catch(e){console.log(e)}finally{x.value=!1}}function D(){_.value=!1,k.value={}}async function N(e){if(e)try{let i={id:e.sid};if(!await j(i,"requestDeleteTableCondiTion",{},w))return;S.success("删除成功"),I("saveGetTableCondiTionList",{type:"delete",item:e})}catch(e){console.log(e)}else S.info("请选择行")}function $(e){I("setClassifyModal",e)}async function B(){try{let e={id:T.settingId,tableId:G.tableId,type:"SEARCH_CATEGORY"};await j(e,"requestResetDefaultSetting",{},w)&&(I("CondiTionListInit"),$(!1))}catch(e){console.log(e)}}let J=n((()=>T.classifyModal));return o((()=>G.searchKey),(()=>{G.selectKeys=[G.searchKey||"all"]})),o((()=>T.searchFieldList),(e=>{e&&e.length>0&&(O.value=e.filter((e=>"operatorColumn"!==e.columnName)))}),{immediate:!0,deep:!0}),o((()=>T.conditionList),(e=>{A.value=e}),{immediate:!0,deep:!0}),o((()=>_),(e=>{e||(k.value={})})),(e,i)=>(s(),l("div",L,[c(J)?(s(),d(b,r({key:0,dataSource:c(A),visibleIn:c(J)},e.$attrs,{onHandleOk:M,onClose:q,onResetPopconfirm:B,edit:E,copy:H,delItem:N,type:"search"}),{add:u((()=>[f(c(p),{type:"info",onClick:R},{default:u((()=>[v("新增")])),_:1})])),_:1},16,["dataSource","visibleIn"])):y("v-if",!0),c(_)?(s(),d(h,r({key:1,ref_key:"searchFilter",ref:F},e.$attrs,{visible:c(_),loading:c(x),conditionList:c(A),actionList_prop:c(k),searchFieldList:c(O),isInSearch:!0,isCnHis:!0,showCompareField:!0,onSaveAdd:K,onCancelSaveAdd:D}),null,16,["visible","loading","conditionList","actionList_prop","searchFieldList"])):y("v-if",!0)]))}});export{I as default};
|
|
@@ -27,6 +27,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
};
|
|
28
28
|
type: {
|
|
29
29
|
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
30
31
|
};
|
|
31
32
|
transitionName: {
|
|
32
33
|
type: StringConstructor;
|
|
@@ -70,6 +71,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
70
71
|
};
|
|
71
72
|
type: {
|
|
72
73
|
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
73
75
|
};
|
|
74
76
|
transitionName: {
|
|
75
77
|
type: StringConstructor;
|
|
@@ -81,11 +83,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
81
83
|
}>> & {
|
|
82
84
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
83
85
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
84
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
85
86
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
86
87
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
87
88
|
}>>;
|
|
88
|
-
emits: (event: "close" | "handleOk" | "
|
|
89
|
+
emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
|
|
89
90
|
isAdmin: import("vue").ComputedRef<unknown>;
|
|
90
91
|
homeList: any;
|
|
91
92
|
visible: import("vue").Ref<boolean>;
|
|
@@ -97,7 +98,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
98
|
rinkTo: () => void;
|
|
98
99
|
close: () => void;
|
|
99
100
|
resetChangeWindow: () => void;
|
|
100
|
-
dragEnd: () => void;
|
|
101
101
|
clickli: (item: IClassifyListType) => void;
|
|
102
102
|
clickChecked: (item: IClassifyListType) => void;
|
|
103
103
|
changeSwitch: (item: IClassifyListType) => void;
|
|
@@ -199,7 +199,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
199
199
|
modelValue: unknown[];
|
|
200
200
|
componentData: Record<string, any>;
|
|
201
201
|
}>;
|
|
202
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "
|
|
202
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "resetPopconfirm" | "finishSubmit")[], "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
203
203
|
visibleIn: {
|
|
204
204
|
type: BooleanConstructor;
|
|
205
205
|
};
|
|
@@ -227,6 +227,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
227
|
};
|
|
228
228
|
type: {
|
|
229
229
|
type: StringConstructor;
|
|
230
|
+
default: string;
|
|
230
231
|
};
|
|
231
232
|
transitionName: {
|
|
232
233
|
type: StringConstructor;
|
|
@@ -238,11 +239,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
238
239
|
}>> & {
|
|
239
240
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
240
241
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
241
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
242
242
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
243
243
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
244
244
|
}, {
|
|
245
245
|
loading: boolean;
|
|
246
|
+
type: string;
|
|
246
247
|
dataSource: unknown[];
|
|
247
248
|
visibleIn: boolean;
|
|
248
249
|
getContainer: Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,computed as i,ref as l,inject as n,watch as a,openBlock as o,createBlock as s,unref as r,normalizeClass as c,withCtx as u,createVNode as d,normalizeStyle as p,createSlots as m,createElementVNode as v,createElementBlock as h,createCommentVNode as f,withDirectives as g,vShow as y,createTextVNode as C,toDisplayString as w,withModifiers as k,renderSlot as x}from"vue";import{useMessage as b,useDialog as z,NModal as S,NCard as _,NTooltip as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,computed as i,ref as l,inject as n,watch as a,openBlock as o,createBlock as s,unref as r,normalizeClass as c,withCtx as u,createVNode as d,normalizeStyle as p,createSlots as m,createElementVNode as v,createElementBlock as h,createCommentVNode as f,withDirectives as g,vShow as y,createTextVNode as C,toDisplayString as w,withModifiers as k,renderSlot as x}from"vue";import{useMessage as b,useDialog as z,NModal as S,NCard as _,NTooltip as M,NIcon as P,NSwitch as D,NPopconfirm as E,NButton as I}from"naive-ui";import{ReorderTwo as U,Brush as N,DocumentOutline as V}from"@vicons/ionicons5";import O from"../../../../../shared/components/VueDraggable/src/vuedraggable.js";import{root_isShowResetButton as F}from"../../const/index.js";import B from"axios";import{cloneDeep as A}from"lodash-es";const H={class:"svg-wrap"},R={class:"flex_between"},$={key:0},j={class:"table-modal-list"},J={class:"list-title"},T=v("span",{class:"list-title-item",style:{width:"6%"}},null,-1),Y=v("span",{class:"list-title-item"}," 名称 ",-1),q=v("span",{class:"list-title-item"}," 父类名称 ",-1),G=v("span",{class:"list-title-item"}," 是否显示 ",-1),K=v("span",{class:"list-title-item"}," 设置为默认 ",-1),L={class:"list-title-item"},Q=v("span",{class:"list-title-item"}," 操作 ",-1),W=["onClick"],X={class:"list-content-item",style:{width:"6%","text-align":"center",overflow:"initial"}},Z=["title"],ee=["title"],te={class:"list-content-item list-content-switch"},ie={class:"list-content-item list-content-radio"},le={class:"list-content-item"},ne={class:"list-content-item"},ae={key:0},oe=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),se={key:1},re=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1);var ce=e({__name:"index",props:{visibleIn:{type:Boolean},loading:{type:Boolean},confirm:{type:Function},edit:{type:Function,defdault:()=>({})},copy:{type:Function,defdault:()=>({})},delItem:{type:Function,defdault:()=>({})},dataSource:{type:Array,default:()=>[]},type:{type:String,default:"search"},transitionName:{type:String},getContainer:{type:Function,default:()=>document.body}},emits:["handleOk","close","resetPopconfirm","finishSubmit"],setup(e,{emit:ce}){const ue=e,de=B.create({}),pe=t(),me=b(),ve=z(),he=i((()=>(null==pe?void 0:pe.isOrgAdmin)||!1)),fe=l([]),ge=l(ue.visibleIn),ye=l(!1),Ce=l("other"==ue.type?"100%":"860px"),we=l("654px"),ke=n(F);function xe(){ue.type&&(Se(),ce("handleOk",function(e){if("search"==e||"other"==e)return{id:"",tableId:"",setting:JSON.stringify(fe.value.map((e=>({isDefault:e.isDefault,isShow:e.isShow,name:e.name,type:e.type,classifyId:e.sid}))))};if("mananger"==e){let e={};return fe.value.forEach(((t,i)=>{const l=(null==t?void 0:t.id)||"";e[l]={id:l,index:i,default:t.isDefault?1:0,isHide:t.isShow?0:1}})),{type:"HOMEPAGE",tableId:"10001",setting:JSON.stringify({pageConfig:e})}}return}(ue.type)))}function be(){ze()}function ze(){ge.value=!1,Se(),ce("close")}function Se(){Ce.value="860px",we.value="654px",ye.value=!1}function _e(){ye.value=!ye.value;let e=document.body.clientHeight;Ce.value="860px"===Ce.value?"100%":"860px",we.value="654px"===we.value?`${e}px`:"654px"}function Me(e){ce("resetPopconfirm",e)}function Pe(e,t,i){const l=ue[e];l&&l(t,i)}return a((()=>ue.visibleIn),(e=>{ge.value=e})),a((()=>ue.dataSource),(e=>{fe.value=A(e)}),{immediate:!0,deep:!0}),(t,i)=>(o(),s(r(S),{show:ge.value,bodyStyle:{height:we.value,overflowY:"auto"},width:Ce.value,maskClosable:!1,class:c(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":ye.value}]),closable:!1,centered:"",transitionName:e.transitionName,getContainer:e.getContainer,"positive-text":"保存","negative-text":"取消",onPositiveClick:xe,onNegativeClick:ze},{default:u((()=>[d(r(_),{style:p({width:Ce.value,height:we.value,overflowY:"auto"}),title:"设置分类",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},m({"header-extra":u((()=>[v("div",H,[v("i",{onClick:_e,class:c(["iconfont-table-filter",ye.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),v("i",{onClick:ze,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),default:u((()=>[r(he)&&"mananger"==e.type?(o(),h("p",$,[v("span",{onClick:be}," 添加首页 ")])):f("v-if",!0),v("div",j,[v("div",J,[T,Y,q,G,K,g(v("span",L," 设置公共首页 ",512),[[y,r(he)&&"mananger"==e.type]]),Q]),d(r(O),{class:"list-content",tag:"ul",list:fe.value,"item-key":"sid",animation:"300"},{item:u((({element:t})=>[g(v("li",{class:c({checked:t.checked}),onClick:e=>{return i=t,void fe.value.forEach((e=>{e.sid==i.sid?e.checked=!0:e.checked=!1}));var i}},[v("span",X,[d(r(M),{mouseEnterDelay:1},{trigger:u((()=>[d(r(P),{component:r(U),size:"24"},null,8,["component"])])),default:u((()=>[C(" 拖拽调整顺序 ")])),_:1})]),v("span",{title:t.displayCategory,class:"list-content-item"},w(t.name),9,Z),v("span",{title:t.name,class:"list-content-item"},w(t.displayCategory),9,ee),v("span",te,[d(r(D),{"onUpdate:value":e=>{return i=t,void fe.value.forEach((e=>{e.sid==i.sid&&(e.isShow=!e.isShow,e.isShow||(i.isDefault=!1))}));var i},size:"small",value:t.isShow},null,8,["onUpdate:value","value"])]),v("span",ie,[d(r(D),{"onUpdate:value":e=>{var i;(i=t).isShow&&fe.value.forEach((e=>{e.sid==i.sid?e.isDefault=!e.isDefault:e.isDefault=!1}))},size:"small",value:t.isDefault},null,8,["onUpdate:value","value"])]),g(v("span",le,[d(r(D),{"onUpdate:value":e=>function(e){function t(e){let t="";for(const i in e)t+=encodeURIComponent(i)+"="+encodeURIComponent(e[i])+"&";return t=t.slice(0,-1),t}ve.warning({title:`是否确定${e.isCommon?"取消":"设置"}公共首页?`,positiveText:"确定",negativeText:"取消",maskClosable:!1,onPositiveClick:()=>{let i={id:e.id,setCommon:!e.isCommon};de({url:"homePage/updateCommon",method:"post",data:i,transformRequest:[t]}).then((t=>{"SUCCESS"===t.data.result?(me.success(t.data.resultMsg),e.isCommon=!e.isCommon,ce("finishSubmit")):me.error(t.data.resultMsg)})).catch((e=>{console.log(e)}))},onNegativeClick:()=>({})})}(t),size:"small",value:t.isCommon},null,8,["onUpdate:value","value"])],512),[[y,r(he)&&"mananger"==e.type]]),v("span",ne,["mananger"==e.type&&r(he)?(o(),h("span",ae,[d(r(E),{onPositiveClick:e=>Pe("confirm",t)},{trigger:u((()=>[d(r(P),null,{default:u((()=>[oe])),_:1})])),default:u((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0),f(" 编辑 "),g(v("span",null,[d(r(M),null,{trigger:u((()=>[d(r(P),{component:r(N),onClick:k((e=>Pe("edit",t,"编辑")),["prevent","stop"])},null,8,["component","onClick"])])),default:u((()=>[C(" 编辑 ")])),_:2},1024)],512),[[y,"other"==e.type||"search"==e.type&&t.isEdit||"mananger"==e.type&&r(he)]]),f(" 复制 "),g(v("span",null,[d(r(M),null,{trigger:u((()=>[d(r(P),{component:r(V),onClick:k((e=>Pe("copy",t,"复制")),["prevent","stop"])},null,8,["component","onClick"])])),default:u((()=>[C(" 复制 ")])),_:2},1024)],512),[[y,"search"==e.type||"other"==e.type]]),f(" 删除 "),t.isEdit?(o(),h("span",se,[d(r(E),{onPositiveClick:e=>Pe("delItem",t,"删除")},{trigger:u((()=>[d(r(P),null,{default:u((()=>[re])),_:1})])),default:u((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0)])],10,W),[[y,"line"!=t.type]])])),_:1},8,["list"])])])),_:2},["search"==e.type?{name:"footer",fn:u((()=>[v("div",R,[v("div",null,[r(ke)?(o(),s(r(E),{key:0,placement:"top-start","positive-text":"确认","negative-text":"取消",onPositiveClick:Me},{trigger:u((()=>[d(r(I),null,{default:u((()=>[C("恢复默认设置")])),_:1})])),default:u((()=>[C(" 确认要恢复系统默认设置吗? ")])),_:1})):f("v-if",!0)]),v("div",null,[d(r(I),{onClick:ze},{default:u((()=>[C("取消")])),_:1}),x(t.$slots,"add"),d(r(I),{type:"info",onClick:xe},{default:u((()=>[C("保存")])),_:1})])])])),key:"0"}:void 0]),1032,["style"])])),_:3},8,["show","bodyStyle","width","class","transitionName","getContainer"]))}});export{ce as default};
|
|
@@ -259,7 +259,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
259
259
|
$message: import("naive-ui").MessageApi;
|
|
260
260
|
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
261
261
|
conditionList: import("vue").Ref<unknown[]>;
|
|
262
|
-
checkedItem: import("vue").Ref<any>;
|
|
263
262
|
addVisible: import("vue").Ref<boolean>;
|
|
264
263
|
actionList_prop: import("vue").Ref<{}>;
|
|
265
264
|
newSearchFieldList: any;
|
|
@@ -276,7 +275,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
276
275
|
copy: (item: IClassifyListType) => void;
|
|
277
276
|
saveAdd: (params: any) => Promise<void>;
|
|
278
277
|
cancelSaveAdd: () => void;
|
|
279
|
-
changeData: (data: any, checkedItemVal: any) => void;
|
|
280
278
|
delItem: (checkedItemVal: any) => Promise<void>;
|
|
281
279
|
setOneVisible: (flag: boolean) => void;
|
|
282
280
|
resetPopconfirm: () => Promise<void>;
|
|
@@ -310,6 +308,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
310
308
|
};
|
|
311
309
|
type: {
|
|
312
310
|
type: StringConstructor;
|
|
311
|
+
default: string;
|
|
313
312
|
};
|
|
314
313
|
transitionName: {
|
|
315
314
|
type: StringConstructor;
|
|
@@ -353,6 +352,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
353
352
|
};
|
|
354
353
|
type: {
|
|
355
354
|
type: StringConstructor;
|
|
355
|
+
default: string;
|
|
356
356
|
};
|
|
357
357
|
transitionName: {
|
|
358
358
|
type: StringConstructor;
|
|
@@ -364,11 +364,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
364
364
|
}>> & {
|
|
365
365
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
366
366
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
367
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
368
367
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
369
368
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
370
369
|
}>>;
|
|
371
|
-
emits: (event: "close" | "handleOk" | "
|
|
370
|
+
emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
|
|
372
371
|
isAdmin: import("vue").ComputedRef<unknown>;
|
|
373
372
|
homeList: any;
|
|
374
373
|
visible: import("vue").Ref<boolean>;
|
|
@@ -380,7 +379,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
380
379
|
rinkTo: () => void;
|
|
381
380
|
close: () => void;
|
|
382
381
|
resetChangeWindow: () => void;
|
|
383
|
-
dragEnd: () => void;
|
|
384
382
|
clickli: (item: IClassifyListType) => void;
|
|
385
383
|
clickChecked: (item: IClassifyListType) => void;
|
|
386
384
|
changeSwitch: (item: IClassifyListType) => void;
|
|
@@ -482,7 +480,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
482
480
|
modelValue: unknown[];
|
|
483
481
|
componentData: Record<string, any>;
|
|
484
482
|
}>;
|
|
485
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "
|
|
483
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "resetPopconfirm" | "finishSubmit")[], "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
486
484
|
visibleIn: {
|
|
487
485
|
type: BooleanConstructor;
|
|
488
486
|
};
|
|
@@ -510,6 +508,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
510
508
|
};
|
|
511
509
|
type: {
|
|
512
510
|
type: StringConstructor;
|
|
511
|
+
default: string;
|
|
513
512
|
};
|
|
514
513
|
transitionName: {
|
|
515
514
|
type: StringConstructor;
|
|
@@ -521,11 +520,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
521
520
|
}>> & {
|
|
522
521
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
523
522
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
524
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
525
523
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
526
524
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
527
525
|
}, {
|
|
528
526
|
loading: boolean;
|
|
527
|
+
type: string;
|
|
529
528
|
dataSource: unknown[];
|
|
530
529
|
visibleIn: boolean;
|
|
531
530
|
getContainer: Function;
|
|
@@ -1175,6 +1174,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1175
1174
|
type: BooleanConstructor;
|
|
1176
1175
|
default: boolean;
|
|
1177
1176
|
};
|
|
1177
|
+
loading: {
|
|
1178
|
+
type: BooleanConstructor;
|
|
1179
|
+
default: boolean;
|
|
1180
|
+
};
|
|
1178
1181
|
}, {
|
|
1179
1182
|
selectMinWidth: number;
|
|
1180
1183
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1206,6 +1209,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1206
1209
|
type: BooleanConstructor;
|
|
1207
1210
|
default: boolean;
|
|
1208
1211
|
};
|
|
1212
|
+
loading: {
|
|
1213
|
+
type: BooleanConstructor;
|
|
1214
|
+
default: boolean;
|
|
1215
|
+
};
|
|
1209
1216
|
}>> & {
|
|
1210
1217
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
1211
1218
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
@@ -1214,6 +1221,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1214
1221
|
dragEndWidth: import("vue").Ref<number>;
|
|
1215
1222
|
showKeys: import("vue").ComputedRef<any>;
|
|
1216
1223
|
titleList: import("vue").ComputedRef<string[]>;
|
|
1224
|
+
isOptionsNull: import("vue").ComputedRef<boolean>;
|
|
1217
1225
|
handleSelect: (option: any) => void;
|
|
1218
1226
|
searchByPage: (onePage: number) => void;
|
|
1219
1227
|
changeWidth: ({ distance }: any) => void;
|
|
@@ -1289,10 +1297,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1289
1297
|
type: BooleanConstructor;
|
|
1290
1298
|
default: boolean;
|
|
1291
1299
|
};
|
|
1300
|
+
loading: {
|
|
1301
|
+
type: BooleanConstructor;
|
|
1302
|
+
default: boolean;
|
|
1303
|
+
};
|
|
1292
1304
|
}>> & {
|
|
1293
1305
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
1294
1306
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
1295
1307
|
}, {
|
|
1308
|
+
loading: boolean;
|
|
1296
1309
|
dynamicOptionInfo: import("../..").AnyObject;
|
|
1297
1310
|
fieldTitleList: import("../..").AnyObject[];
|
|
1298
1311
|
optionList: import("../..").AnyObject[];
|
|
@@ -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 y,Fragment as C,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,InjectionClassifyfilterType as A}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as T}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import F from"../../table-filter/src/hooks/useAdvanced.js";const R={key:0,class:"header"},W={class:"tree"},q=["onClick"],G=["onClick"],Q=["onClick"],$={class:"child-item-name"},D={key:1,class:"tree-type-footer"},V={class:"selected-num"},H=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),K={key:0,class:"tile-type classify-1"},U={key:0,class:"header"},X={class:"right-setting"},Y=["onClick"],Z={class:"parent ellips"},ee={class:"children"},ie=["onClick"],ne={key:1,class:"selected-list"},le={class:"selected-num"},te=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),ae={class:"name"},se={class:"name"},oe={key:0,class:"main-wrapper"},de=["onClick"],ce={class:"tree-footer"},re=["onClick"],he=["onClick"],ue={key:0,class:"select-type-footer"},fe={class:"selected-num"},pe=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var me=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:()=>({})},filterType:{type:String,default:"1"}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:me}){const ge=e,{handleGetConfigApi:ve}=E(),{transformClassifyChild:ye}=F(),Ce=i(),ke=x(),Se=n(null);let be=n(150),xe=n(!1),Oe=n([]),_e=n([]),we=n([]),Ie=n(2),Le=n({name:"全部数据",sid:"all_data"}),Ne=n([]),ze=n(""),je=n(!1),Be=n("全部数据");l(T,ge.isShowResetButton),l(M,ge.filterApiConfig),l(A,ge.filterType);let Pe=t((()=>0===Ie.value?{marginRight:"8px"}:2===Ie.value?{display:"inline-block"}:{})),Je=t((()=>{let e=_e.value.filter((e=>-1!==ge.conditionSid.indexOf(e.sid)));if(-1!==ge.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Me=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Xe(n,l)+i}));function Ae(e){e.open?e.open=!1:e.open=!0}function Te(e,i,n){Be.value=e.name;let l=function(e){let i=[];return Oe.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,ge.conditionSid));qe(!1);const t=ye(null==e?void 0:e.conObj,ge.searchFieldList);me("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ee(){let e="";if(2===Ie.value)e=0;else{let i=Ie.value;e=++i}be.value=150,Fe(e)}async function Fe(e,i){let n={tableId:ge.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ve(n,"requestSaveListPersonaSetting",{},ge.filterApiConfig)&&me("setClassificationIndex",e)}catch(e){console.log(e)}}function Re(){je.value=!0,qe(!1)}function We(e){je.value=e}function qe(e){xe.value=void 0===e?!xe.value:e}function Ge(){if(!ge.tableId)return ke.warning("请传入tableId");Oe.value=[];let{displayCategoryList:e=[],conditionList:i=[]}=ge.conditionMap;Ne.value=JSON.parse(JSON.stringify(e))||[],we.value=JSON.parse(JSON.stringify(i)),_e.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i]));let n=[];var l;0===Ne.value.length&&(Ne.value=["未分类"]),Ne.value.forEach((e=>{let i={name:e,children:[]};_e.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==ge.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=ye(null==n?void 0:n.conObj,ge.searchFieldList);me("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&n.push(i)})),n.unshift({name:"全部数据",sid:"all_data"}),Oe.value=n,0===Ie.value&&(l=!0,Oe.value.forEach((e=>{e.children&&e.children.length&&(e.open=l)})))}function Qe({distance:e}){const i=be.value+e;be.value=Math.min(Math.max(i,50),650)}function $e(){Fe(Ie.value,be.value)}async function De(){await Ue(ge.tableId),He()}async function Ve(e){await Ue(ge.tableId),Ke()}function He(e){Ke(e).then((e=>({})))}function Ke(e,i={}){if(!ge.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(ge.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c,r;if(Object.keys(n).length>0){we.value=n.conditionList||[],Ne.value=n.displayCategoryList||[];let l={conditionList:we.value,displayCategoryList:Ne.value};me("getQuickSearchListObj",l),ze.value=null!=(t=n.settingId)?t:"";const h=we.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 Ue(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ve(i,"requestTableCondiTionList",{},ge.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Xe(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();Se.value&&i.includes(Se.value)||qe(!1)}))}))})),o((()=>ge.tableId),(e=>{e&&He(!0)}),{immediate:!0,deep:!0}),o((()=>ge.curClassificationIndex),(e=>{void 0!==e&&(Ie.value=e,Ge())}),{immediate:!0,deep:!0}),o((()=>ge.curClassificationWidth),(e=>{e&&(be.value=Number(e)||150)}),{immediate:!0}),o((()=>ge.conditionMap),(e=>{!async function(){try{await Ge()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(Ie)]),style:u(h(Pe))},[0===h(Ie)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(be)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",R,[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:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])):v("v-if",!0),y("ul",W,[(d(!0),c(C,null,k(h(Oe),((i,n)=>(d(),c(C,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(C,{key:1},[y("span",{class:r(["parent",{open:i.open}]),onClick:e=>Ae(i)},[y("span",null,g(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,G),i.open?(d(!0),c(C,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Te(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",$,g(Xe(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((()=>[y("span",null,g(h(Me)(e)),1)])),_:2},1024)):v("v-if",!0)],8,Q)))),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=>Te(i)},g(i.name),11,q))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",D,[y("div",V,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[H,m(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:Qe,onEnd:$e}]]):v("v-if",!0),1===h(Ie)?(d(),c(C,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(we).filter((e=>e.isShow)).length>0?(d(),c("div",K,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",U,[y("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[m(" 全部数据 "),h(Le).digital||0===h(Le).digital?(d(),c(C,{key:0},[m(" ("+g(h(Le).digital||0)+") ",1)],64)):v("v-if",!0)],2),y("div",X,[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:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])])):v("v-if",!0),y("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(C,null,k(h(Oe).slice(1),((e,i)=>(d(),c(C,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(C,{key:1},[y("span",Z,g(e.name),1),y("div",ee,[(d(!0),c(C,null,k(e.children,((i,n)=>(d(),c(C,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Te(i,0,e)},g(Xe(i.name,null==i?void 0:i.isPublic)),11,ie)):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=>Te(e)},g(e.name)+" "+g(e.digital),11,Y))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ne,[y("div",le,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(C,null,k(h(Oe).slice(1),(e=>(d(),c(C,null,[e.children&&0!==e.children.length?(d(!0),c(C,{key:1},k(e.children,((i,n)=>(d(),c(C,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=>Te(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=>Te(e)},null,8,["component","onClick"])]))],64)))),256)),y("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[te,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(Ie)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:Se},[y("span",{class:"title",onClick:n[3]||(n[3]=()=>qe())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[y("span",ae,g(h(Je)),1)])),default:b((()=>[y("span",se,g(h(Je)),1)])),_:1}),p(h(O),{component:h(xe)?h(B):h(L)},null,8,["component"])]),h(xe)?(d(),c("div",oe,[y("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(C,null,k(h(Oe),((i,n)=>(d(),c(C,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(C,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Ae(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,re)):v("v-if",!0),i.open?(d(!0),c(C,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Te(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",null,g(Xe(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((()=>[y("span",null,g(h(Me)(e)),1)])),_:2},1024)):v("v-if",!0)],8,he)))),128)):v("v-if",!0)],64)):(d(),c(C,{key:0},[y("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Te(i)},g(i.name),11,de),y("div",ce,[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:Re},[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",ue,[y("div",fe,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[pe,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(we),displayCategoryList:h(Ne),settingId:h(ze),tableId:e.tableId,classifyModal:h(je),onSaveGetTableCondiTionList:Ve,onCondiTionListInit:De,onSetClassifyModal:We},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6))}});export{me 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 y,Fragment as C,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 I,SettingsOutline as w,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,InjectionClassifyfilterType as A}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as T}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import F from"../../table-filter/src/hooks/useAdvanced.js";const R={key:0,class:"header"},W={class:"tree"},q=["onClick"],G=["onClick"],Q=["onClick"],$={class:"child-item-name"},D={key:1,class:"tree-type-footer"},V={class:"selected-num"},H=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),K={key:0,class:"tile-type classify-1"},U={key:0,class:"header"},X={class:"right-setting"},Y=["onClick"],Z={class:"parent ellips"},ee={class:"children"},ie=["onClick"],ne={key:1,class:"selected-list"},le={class:"selected-num"},te=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),ae={class:"name"},se={class:"name"},oe={key:0,class:"main-wrapper"},de=["onClick"],ce={class:"tree-footer"},re=["onClick"],he=["onClick"],ue={key:0,class:"select-type-footer"},fe={class:"selected-num"},pe=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var me=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:()=>({})},filterType:{type:String,default:"1"}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:me}){const ge=e,{handleGetConfigApi:ve}=E(),{transformClassifyChild:ye}=F(),Ce=i(),ke=x(),Se=n(null);let be=n(150),xe=n(!1),Oe=n([]),_e=n([]),Ie=n([]),we=n(2),Le=n({name:"全部数据",sid:"all_data"}),Ne=n([]),ze=n(""),je=n(!1),Be=n("全部数据");l(T,ge.isShowResetButton),l(M,ge.filterApiConfig),l(A,ge.filterType);let Pe=t((()=>0===we.value?{marginRight:"8px"}:2===we.value?{display:"inline-block"}:{})),Je=t((()=>{let e=_e.value.filter((e=>-1!==ge.conditionSid.indexOf(e.sid)));if(-1!==ge.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Me=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Xe(n,l)+i}));function Ae(e){e.open?e.open=!1:e.open=!0}function Te(e,i,n){Be.value=e.name;let l=function(e){let i=[];return Oe.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,ge.conditionSid));qe(!1);const t=ye(null==e?void 0:e.conObj,ge.searchFieldList);me("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}be.value=150,Fe(e)}async function Fe(e,i){let n={tableId:ge.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ve(n,"requestSaveListPersonaSetting",{},ge.filterApiConfig)&&me("setClassificationIndex",e)}catch(e){console.log(e)}}function Re(){je.value=!0,qe(!1)}function We(e){je.value=e}function qe(e){xe.value=void 0===e?!xe.value:e}function Ge(){if(!ge.tableId)return ke.warning("请传入tableId");Oe.value=[];let{displayCategoryList:e=[],conditionList:i=[],settingId:n=""}=ge.conditionMap;Ne.value=JSON.parse(JSON.stringify(e))||[],Ie.value=JSON.parse(JSON.stringify(i)),_e.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i])),ze.value=n;let l=[];var t;0===Ne.value.length&&(Ne.value=["未分类"]),Ne.value.forEach((e=>{let i={name:e,children:[]};_e.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==ge.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=ye(null==n?void 0:n.conObj,ge.searchFieldList);me("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&l.push(i)})),l.unshift({name:"全部数据",sid:"all_data"}),Oe.value=l,0===we.value&&(t=!0,Oe.value.forEach((e=>{e.children&&e.children.length&&(e.open=t)})))}function Qe({distance:e}){const i=be.value+e;be.value=Math.min(Math.max(i,50),650)}function $e(){Fe(we.value,be.value)}async function De(){await Ue(ge.tableId),He()}async function Ve(e){await Ue(ge.tableId),Ke()}function He(e){Ke(e).then((e=>({})))}function Ke(e,i={}){if(!ge.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(ge.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c,r;if(Object.keys(n).length>0){Ie.value=n.conditionList||[],Ne.value=n.displayCategoryList||[];let l={conditionList:Ie.value,displayCategoryList:Ne.value};me("getQuickSearchListObj",l),ze.value=null!=(t=n.settingId)?t:"";const h=Ie.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 Ue(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ve(i,"requestTableCondiTionList",{},ge.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Xe(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();Se.value&&i.includes(Se.value)||qe(!1)}))}))})),o((()=>ge.tableId),(e=>{e&&He(!0)}),{immediate:!0}),o((()=>ge.curClassificationIndex),(e=>{void 0!==e&&(we.value=e,Ge())}),{immediate:!0}),o((()=>ge.curClassificationWidth),(e=>{e&&(be.value=Number(e)||150)}),{immediate:!0}),o((()=>ge.conditionMap),(e=>{!async function(){try{await Ge()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(we)]),style:u(h(Pe))},[0===h(we)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(be)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",R,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ee},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Re},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])):v("v-if",!0),y("ul",W,[(d(!0),c(C,null,k(h(Oe),((i,n)=>(d(),c(C,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(C,{key:1},[y("span",{class:r(["parent",{open:i.open}]),onClick:e=>Ae(i)},[y("span",null,g(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,G),i.open?(d(!0),c(C,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Te(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",$,g(Xe(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((()=>[y("span",null,g(h(Me)(e)),1)])),_:2},1024)):v("v-if",!0)],8,Q)))),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=>Te(i)},g(i.name),11,q))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",D,[y("div",V,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[H,m(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:Qe,onEnd:$e}]]):v("v-if",!0),1===h(we)?(d(),c(C,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(Ie).filter((e=>e.isShow)).length>0?(d(),c("div",K,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",U,[y("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[m(" 全部数据 "),h(Le).digital||0===h(Le).digital?(d(),c(C,{key:0},[m(" ("+g(h(Le).digital||0)+") ",1)],64)):v("v-if",!0)],2),y("div",X,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ee,style:{"margin-right":"30px"}},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Re},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])])):v("v-if",!0),y("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(C,null,k(h(Oe).slice(1),((e,i)=>(d(),c(C,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(C,{key:1},[y("span",Z,g(e.name),1),y("div",ee,[(d(!0),c(C,null,k(e.children,((i,n)=>(d(),c(C,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Te(i,0,e)},g(Xe(i.name,null==i?void 0:i.isPublic)),11,ie)):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=>Te(e)},g(e.name)+" "+g(e.digital),11,Y))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ne,[y("div",le,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(C,null,k(h(Oe).slice(1),(e=>(d(),c(C,null,[e.children&&0!==e.children.length?(d(!0),c(C,{key:1},k(e.children,((i,n)=>(d(),c(C,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=>Te(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=>Te(e)},null,8,["component","onClick"])]))],64)))),256)),y("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[te,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:Se},[y("span",{class:"title",onClick:n[3]||(n[3]=()=>qe())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[y("span",ae,g(h(Je)),1)])),default:b((()=>[y("span",se,g(h(Je)),1)])),_:1}),p(h(O),{component:h(xe)?h(B):h(L)},null,8,["component"])]),h(xe)?(d(),c("div",oe,[y("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(C,null,k(h(Oe),((i,n)=>(d(),c(C,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(C,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Ae(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,re)):v("v-if",!0),i.open?(d(!0),c(C,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Te(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",null,g(Xe(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((()=>[y("span",null,g(h(Me)(e)),1)])),_:2},1024)):v("v-if",!0)],8,he)))),128)):v("v-if",!0)],64)):(d(),c(C,{key:0},[y("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Te(i)},g(i.name),11,de),y("div",ce,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ee},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Re},[p(h(O),{component:h(w),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",ue,[y("div",fe,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[pe,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(Ie),displayCategoryList:h(Ne),settingId:h(ze),tableId:e.tableId,classifyModal:h(je),onSaveGetTableCondiTionList:Ve,onCondiTionListInit:De,onSetClassifyModal:We},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6))}});export{me as default};
|
|
@@ -30,8 +30,9 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
30
30
|
onAdd?: ((...args: any[]) => any) | undefined;
|
|
31
31
|
onRemove?: ((...args: any[]) => any) | undefined;
|
|
32
32
|
"onAdd:prevent"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
"onClick:grid"?: ((...args: any[]) => any) | undefined;
|
|
33
34
|
}>>;
|
|
34
|
-
emits: (event: "select" | "add" | "change" | "remove" | "add:prevent", ...args: any[]) => void;
|
|
35
|
+
emits: (event: "select" | "add" | "change" | "remove" | "add:prevent" | "click:grid", ...args: any[]) => void;
|
|
35
36
|
canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
|
|
36
37
|
canvas: import("vue").Ref<any>;
|
|
37
38
|
pointTipProps: {
|
|
@@ -164,7 +165,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
164
165
|
show: boolean;
|
|
165
166
|
list: unknown[];
|
|
166
167
|
}>;
|
|
167
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "add" | "change" | "remove" | "add:prevent")[], "remove" | "select" | "add" | "change" | "add:prevent", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
168
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "add" | "change" | "remove" | "add:prevent" | "click:grid")[], "remove" | "select" | "add" | "change" | "add:prevent" | "click:grid", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
168
169
|
type: {
|
|
169
170
|
type: import("vue").PropType<import("./src/interface").IType>;
|
|
170
171
|
default: string;
|
|
@@ -182,6 +183,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
182
183
|
onAdd?: ((...args: any[]) => any) | undefined;
|
|
183
184
|
onRemove?: ((...args: any[]) => any) | undefined;
|
|
184
185
|
"onAdd:prevent"?: ((...args: any[]) => any) | undefined;
|
|
186
|
+
"onClick:grid"?: ((...args: any[]) => any) | undefined;
|
|
185
187
|
}, {
|
|
186
188
|
type: import("./src/interface").IType;
|
|
187
189
|
}>>;
|
|
@@ -32,8 +32,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
onAdd?: ((...args: any[]) => any) | undefined;
|
|
33
33
|
onRemove?: ((...args: any[]) => any) | undefined;
|
|
34
34
|
"onAdd:prevent"?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
"onClick:grid"?: ((...args: any[]) => any) | undefined;
|
|
35
36
|
}>>;
|
|
36
|
-
emits: (event: "select" | "add" | "change" | "remove" | "add:prevent", ...args: any[]) => void;
|
|
37
|
+
emits: (event: "select" | "add" | "change" | "remove" | "add:prevent" | "click:grid", ...args: any[]) => void;
|
|
37
38
|
canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
|
|
38
39
|
canvas: import("vue").Ref<any>;
|
|
39
40
|
pointTipProps: {
|
|
@@ -166,7 +167,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
166
167
|
show: boolean;
|
|
167
168
|
list: unknown[];
|
|
168
169
|
}>;
|
|
169
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "add" | "change" | "remove" | "add:prevent")[], "remove" | "select" | "add" | "change" | "add:prevent", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
170
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "add" | "change" | "remove" | "add:prevent" | "click:grid")[], "remove" | "select" | "add" | "change" | "add:prevent" | "click:grid", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
170
171
|
type: {
|
|
171
172
|
type: PropType<IType>;
|
|
172
173
|
default: string;
|
|
@@ -184,6 +185,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
184
185
|
onAdd?: ((...args: any[]) => any) | undefined;
|
|
185
186
|
onRemove?: ((...args: any[]) => any) | undefined;
|
|
186
187
|
"onAdd:prevent"?: ((...args: any[]) => any) | undefined;
|
|
188
|
+
"onClick:grid"?: ((...args: any[]) => any) | undefined;
|
|
187
189
|
}, {
|
|
188
190
|
type: IType;
|
|
189
191
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as r,reactive as t,computed as o,onMounted as s,onBeforeUnmount as a,openBlock as i,createElementBlock as l,normalizeStyle as u,unref as n,createElementVNode as p,Fragment as c,createVNode as h,mergeProps as
|
|
1
|
+
import{defineComponent as e,ref as r,reactive as t,computed as o,onMounted as s,onBeforeUnmount as a,openBlock as i,createElementBlock as l,normalizeStyle as u,unref as n,createElementVNode as p,Fragment as c,createVNode as h,mergeProps as d,createCommentVNode as m}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import v from"./components/PopupTip.vue.js";import g from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"./hooks/useEvent.js";import{useBirthProcessChart as w}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as C}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as k}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";import{useElectrocardiogramChart as y}from"./hooks/electrocardiogram/useElectrocardiogramChart.js";var j=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent","click:grid"],setup(e,{expose:j,emit:P}){const x=e,I=r(null),b=r(),M=t({show:!1,point:{x:0,y:0},list:[]}),R=t({show:!1,point:{x:0,y:0},list:[],target:null}),A=o((()=>{var e;return null==(e=b.value)?void 0:e.wrapperEl})),E=o((()=>({width:`${x.data.width||800}px`,height:`${x.data.height||500}px`}))),{propItems:S,redrawPoints:T,select:_,clickMenu:F,useMeasureRuler:G,useCaliper:$,useCaliperRuler:q,updatePolyline:B,getGridInfo:D}=function(){const e=[b,x,P,I,M,R];switch(x.type){case"birthProcess":return w(...e);case"surgicalAnesthesia":return k(...e);case"electrocardiogram":return y(...e);default:return C(...e)}}();return s((()=>{b.value=new f.Canvas(I.value,{width:S.canvasWidth,height:S.canvasHeight,backgroundColor:"#fff",selection:!1,stopContextMenu:!0,fireRightClick:!0,allowTouchScrolling:!0})})),a((()=>{var e,r,t,o;null==(r=null==(e=b.value)?void 0:e.off)||r.call(e),null==(o=null==(t=b.value)?void 0:t.clear)||o.call(t)})),j({redrawPoints:T,select:_,canvas:b,useMeasureRuler:G,useCaliper:$,useCaliperRuler:q,updatePolyline:B,getGridInfo:D}),(e,r)=>(i(),l("div",{class:"c-fabric-chart",style:u(n(E))},[p("canvas",{ref_key:"canvasRef",ref:I},null,512),n(A)?(i(),l(c,{key:0},[h(v,d({propItems:n(S)},M),null,16,["propItems"]),h(n(g),d({propItems:n(S)},R,{show:R.show,"onUpdate:show":r[0]||(r[0]=e=>R.show=e),onClickMenu:n(F)}),null,16,["propItems","show","onClickMenu"])],64)):m("v-if",!0)],4))}});export{j as default};
|