cnhis-design-vue 3.1.46-release.4 → 3.1.47-beta.0
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/button-print/src/utils/print.js +1 -1
- package/es/components/form-config/index.d.ts +67 -16
- package/es/components/form-config/src/FormConfig.vue.d.ts +67 -16
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +5 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +29 -7
- 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 +1 -1
- package/es/components/form-render/index.d.ts +5 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +4 -3
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +5 -4
- package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +16 -2
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +32 -4
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +16 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +1 -1
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +5 -0
- package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +8 -1
- package/es/components/form-render/src/types/index.d.ts +1 -7
- package/es/components/iho-table/index.d.ts +12 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +12 -0
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +5 -3
- package/es/components/iho-table/src/utils/index.d.ts +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +14 -12
- package/es/components/info-header/src/InfoHeader.vue.d.ts +14 -12
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -4
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +5 -4
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/select-person/index.d.ts +153 -14
- package/es/components/select-person/src/SearchMultiple.vue2.js +1 -1
- package/es/components/select-person/src/SearchOrgAndStaff.vue.d.ts +106 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue.js +1 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +150 -12
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/types/enums.d.ts +4 -0
- package/es/components/select-person/src/types/enums.js +1 -0
- package/es/components/select-person/src/utils/index.d.ts +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +13 -5
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +13 -5
- package/es/components/steps-wheel/index.d.ts +16 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +16 -0
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +6 -0
- package/es/shared/utils/business.d.ts +6 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapableLess.d.ts +28 -0
- package/es/shared/utils/tapableLess.js +1 -0
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,ref as a,watch as r,openBlock as
|
|
1
|
+
import{defineComponent as e,computed as t,ref as a,watch as r,openBlock as n,createBlock as l,unref as i,withCtx as o,createElementVNode as u,normalizeStyle as s,createElementBlock as c,Fragment as d,renderList as p,createVNode as f,createTextVNode as v,toDisplayString as y}from"vue";import{NCheckboxGroup as h,NCheckbox as k}from"naive-ui";import{isEqual as m}from"lodash-es";import{useVirtualList as N}from"@vueuse/core";const _={class:"user_item"},g=["title"];var x=e({__name:"SearchMultiple",props:{treeData:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},emits:["notifyCheck"],setup(e,{emit:x}){const D=e,b=t((()=>D.treeData)),{list:A,containerProps:K,wrapperProps:S}=N(b,{itemHeight:30,overscan:5}),w=t((()=>({...K.style,height:"308px"}))),C=a(D.checkedKeys),E=a([]);function P(e,t){const{actionType:a,value:r}=t,n=D.treeData.find((e=>e.key===r));if(n){switch(a){case"check":H(C.value.filter((e=>e!==r)),n,r);break;case"uncheck":O(C.value,n,r)}x("notifyCheck",C.value)}}function H(e,t,a){var r;if(!(null==t?void 0:t.parentNode))return C.value=[...e,a],!1;const n=null==(r=t.parentNode)?void 0:r.key;if(e.includes(n))return C.value=e,!1;if(t.parentNode.children){const r=t.parentNode.children.every((t=>[...e,a].includes(t.key)));if(r){const a=null==t?void 0:t.parentNode.children.map((e=>e.key)),n=e.filter((e=>!a.includes(e)));return r&&M(n,t.parentNode),!1}}H(e,t.parentNode,a)}function M(e,t){if(!t.parentNode||t.parentNode.children.length>1)return C.value=[...e,t.key],!1;M(e,t.parentNode)}function O(e,t,a){var r,n;if(e.includes(a)){const t=e.filter((e=>e!==a));return C.value=t,!1}if(!(null==t?void 0:t.parentNode))return C.value=e,!1;const l=null==(r=t.parentNode)?void 0:r.key,i=e.indexOf(l);if(i>-1){const r=null==(n=t.parentNode)?void 0:n.children;return e.splice(i,1),T(e,r,a),!1}O(e,t.parentNode,a)}function T(e,t,a){if(!Array.isArray(t))return C.value=e,!1;if(t.length>1){const r=t.filter((e=>e.key!==a)).map((e=>e.key));return C.value=[...e,...r],!1}T(e,t[0].children,a)}function U(e,t){const a=D.checkedKeys;return!!e&&(a.includes(e.key)?(E.value.push(t),!1):void U(e.parentNode,t))}return r((()=>D.treeData),(e=>{e&&e.length>0&&(E.value=[],e.forEach((e=>{U(e,e.key)})))}),{deep:!0,immediate:!0}),r((()=>D.checkedKeys),((e,t)=>{m(e,t)||D.treeData.length>0&&(E.value=[],C.value=e,D.treeData.forEach((e=>{U(e,e.key)})))}),{immediate:!0}),(e,t)=>(n(),l(i(h),{value:E.value,"onUpdate:value":[t[1]||(t[1]=e=>E.value=e),P]},{default:o((()=>[u("section",{class:"select-person__multipleWrapper",ref:i(K).ref,style:s(i(w)),onScroll:t[0]||(t[0]=(...e)=>i(K).onScroll&&i(K).onScroll(...e))},[u("section",{style:s(i(S).style)},[(n(!0),c(d,null,p(i(A),(e=>(n(),c("div",{class:"select-person__multiple-search",key:e.data.key},[f(i(k),{value:e.data.key,disabled:e.data.disabled},{default:o((()=>[u("p",_,[v(y(e.data.title)+" ",1),u("span",{class:"user_item_expand",title:e.data.title_expand_strs},y(e.data.title_expand_strs),9,g)])])),_:2},1032,["value","disabled"])])))),128))],4)],36)])),_:1},8,["value"]))}});export{x as default};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ref, PropType, CSSProperties } from 'vue';
|
|
2
|
+
declare type IKey = string | number;
|
|
3
|
+
declare type ITreeOption = {
|
|
4
|
+
key: IKey;
|
|
5
|
+
children: any[];
|
|
6
|
+
parentNode: any;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<{
|
|
10
|
+
treeData: {
|
|
11
|
+
type: PropType<any[]>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
checkedKeys: {
|
|
15
|
+
type: PropType<IKey[]>;
|
|
16
|
+
default: () => never[];
|
|
17
|
+
};
|
|
18
|
+
searchFilter: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
$message: import("naive-ui").MessageApi;
|
|
24
|
+
virtualItemHeight: number;
|
|
25
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
treeData: {
|
|
27
|
+
type: PropType<any[]>;
|
|
28
|
+
default: () => never[];
|
|
29
|
+
};
|
|
30
|
+
checkedKeys: {
|
|
31
|
+
type: PropType<IKey[]>;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
searchFilter: {
|
|
35
|
+
type: ObjectConstructor;
|
|
36
|
+
default: () => {};
|
|
37
|
+
};
|
|
38
|
+
}>> & {
|
|
39
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
onNotifyClear?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
}>>;
|
|
42
|
+
emit: (event: "notifyCheck" | "notifyClear", ...args: any[]) => void;
|
|
43
|
+
moduleHeight: import("vue").ComputedRef<any>;
|
|
44
|
+
showNums: import("vue").ComputedRef<number>;
|
|
45
|
+
staffDataRef: import("vue").ComputedRef<any[]>;
|
|
46
|
+
staffList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
47
|
+
staffContainerProps: {
|
|
48
|
+
ref: import("vue").Ref<any>;
|
|
49
|
+
onScroll: () => void;
|
|
50
|
+
style: Partial<CSSStyleDeclaration>;
|
|
51
|
+
};
|
|
52
|
+
staffWrapperProps: import("vue").ComputedRef<{
|
|
53
|
+
style: {
|
|
54
|
+
width: string;
|
|
55
|
+
height: string;
|
|
56
|
+
marginTop: string;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
staffContainerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
60
|
+
orgDataRef: import("vue").ComputedRef<any[]>;
|
|
61
|
+
orgList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
62
|
+
orgContainerProps: {
|
|
63
|
+
ref: import("vue").Ref<any>;
|
|
64
|
+
onScroll: () => void;
|
|
65
|
+
style: Partial<CSSStyleDeclaration>;
|
|
66
|
+
};
|
|
67
|
+
orgWrapperProps: import("vue").ComputedRef<{
|
|
68
|
+
style: {
|
|
69
|
+
width: string;
|
|
70
|
+
height: string;
|
|
71
|
+
marginTop: string;
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
orgContainerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
75
|
+
searchCheckKeys: import("vue").Ref<IKey[]>;
|
|
76
|
+
showSelectKeys: import("vue").Ref<(string | number)[]>;
|
|
77
|
+
handleClick: (tree: any) => void;
|
|
78
|
+
handleStaffClick: (baseKeys: (string | number)[], currentTree: ITreeOption, value: string | number) => false | undefined;
|
|
79
|
+
findParent: (baseKeys: (string | number)[], currentTree: ITreeOption) => false | undefined;
|
|
80
|
+
handleOrgClick: (baseKeys: (string | number)[], currentTree: ITreeOption, value: string | number) => void;
|
|
81
|
+
handleFindChildren: (treeList: ITreeOption[]) => void;
|
|
82
|
+
checkInitTree: (tree: ITreeOption, baseKey: string | number) => false | undefined;
|
|
83
|
+
ref: typeof ref;
|
|
84
|
+
NEmpty: any;
|
|
85
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("notifyCheck" | "notifyClear")[], "notifyCheck" | "notifyClear", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
86
|
+
treeData: {
|
|
87
|
+
type: PropType<any[]>;
|
|
88
|
+
default: () => never[];
|
|
89
|
+
};
|
|
90
|
+
checkedKeys: {
|
|
91
|
+
type: PropType<IKey[]>;
|
|
92
|
+
default: () => never[];
|
|
93
|
+
};
|
|
94
|
+
searchFilter: {
|
|
95
|
+
type: ObjectConstructor;
|
|
96
|
+
default: () => {};
|
|
97
|
+
};
|
|
98
|
+
}>> & {
|
|
99
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
onNotifyClear?: ((...args: any[]) => any) | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
searchFilter: Record<string, any>;
|
|
103
|
+
treeData: any[];
|
|
104
|
+
checkedKeys: IKey[];
|
|
105
|
+
}>;
|
|
106
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./SearchOrgAndStaff.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var a=e(r,[["__file","SearchOrgAndStaff.vue"]]);export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as t,ref as l,watch as a,openBlock as r,createElementBlock as i,Fragment as n,unref as s,createElementVNode as c,toDisplayString as o,normalizeStyle as d,renderList as u,normalizeClass as h,createTextVNode as p,createCommentVNode as f,createBlock as v}from"vue";import{useMessage as y,NEmpty as m}from"naive-ui";import{isEqual as k}from"lodash-es";import{useVirtualList as _}from"@vueuse/core";const g={class:"searchOrgAndStaff"},N={key:0,class:"searchOption"},S={class:"search_title"},C=["onClick"],b={class:"title"},x=["title"],D={class:"desc"},O={key:1,class:"SearchOption"},$={class:"search_title"},F=["onClick"],T={class:"title"},A={class:"desc"};var K=e({__name:"SearchOrgAndStaff",props:{treeData:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]},searchFilter:{type:Object,default:()=>({})}},emits:["notifyCheck","notifyClear"],setup(e,{emit:K}){var P;const w=e,E=y(),H=t((()=>{var e;return null!=(e=w.searchFilter.itemHeight)?e:300})),W=t((()=>Math.floor(H.value/50))),j=null!=(P=t((()=>w.treeData.filter((e=>!e.children)))))?P:[],{list:I,containerProps:M,wrapperProps:q}=_(j,{itemHeight:50,overscan:W.value}),z=t((()=>({...M.style,height:`${H.value}px`}))),B=t((()=>w.treeData.filter((e=>e.children&&e.children.length>0)))),{list:G,containerProps:J,wrapperProps:L}=_(B,{itemHeight:50,overscan:W.value}),Q=t((()=>({...J.style,height:`${H.value}px`}))),R=l(w.checkedKeys),U=l([]);function V(e){var t;if(R.value.find((t=>t===e.key)))return void E.info(`${e.title}已被选择`);if(e.disabled)return void E.info(`${e.title}已被禁用`);switch((null==(t=e.children)?void 0:t.length)>0?"org":"staff"){case"org":!function(e,t,l){t.children.length>0&&Z(t.children);X(e,t,l)}(R.value,e,e.key);break;case"staff":X(R.value,e,e.key)}K("notifyCheck",R.value),(null==w?void 0:w.searchFilter.multiple)||K("notifyClear")}function X(e,t,l){var a;if(!(null==t?void 0:t.parentNode))return R.value=[...e,l],!1;const r=null==(a=t.parentNode)?void 0:a.key;if(e.includes(r))return R.value=e,E.info(`${t.title}已存在于${t.tempTitle}中`),!1;if(t.parentNode.children){const a=t.parentNode.children.every((t=>[...e,l].includes(t.key)));if(a){const l=null==t?void 0:t.parentNode.children.map((e=>e.key)),r=e.filter((e=>!l.includes(e)));return a&&Y(r,t.parentNode),!1}}X(e,t.parentNode,l)}function Y(e,t){if(!t.parentNode||t.parentNode.children.length>1)return R.value=[...e,t.key],!1;Y(e,t.parentNode)}function Z(e){e.forEach((e=>{var t;if(R.value.includes(e.key)){const t=R.value.indexOf(e.key);R.value.splice(t,1)}(null==(t=e.children)?void 0:t.length)>0&&Z(e.children)}))}function ee(e,t){const l=w.checkedKeys;return!!e&&(l.includes(e.key)?(U.value.push(t),!1):void ee(e.parentNode,t))}return a((()=>w.treeData),(e=>{e&&e.length>0&&(U.value=[],e.forEach((e=>{ee(e,e.key)})))}),{deep:!0,immediate:!0}),a((()=>w.checkedKeys),((e,t)=>{k(e,t)||w.treeData.length>0&&(U.value=[],R.value=e,w.treeData.forEach((e=>{ee(e,e.key)})))}),{immediate:!0}),(t,l)=>{var a,y;return r(),i("div",g,[e.treeData.length>0?(r(),i(n,{key:0},[s(j).length>0?(r(),i("div",N,[c("h4",S,o(null==(a=e.searchFilter)?void 0:a.customTitles[0]),1),c("section",{class:"select-person__multipleWrapper",ref:s(M).ref,style:d(s(I).length>s(W)?s(z):{}),onScroll:l[0]||(l[0]=(...e)=>s(M).onScroll&&s(M).onScroll(...e))},[c("section",{style:d(s(q).style)},[(r(!0),i(n,null,u(s(I),(e=>(r(),i("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:h(["search_item user_item",e.data.disabled?"search_disabled":""]),onClick:t=>V(e.data)},[c("span",b,[p(o(e.data.title)+" ",1),c("span",{class:"user_item_expand",title:e.data.title_expand_strs},o(e.data.title_expand_strs),9,x)]),c("p",D,o(e.data.tempTitle),1)],10,C)])))),128))],4)],36)])):f("v-if",!0),s(B).length>0?(r(),i("div",O,[c("h4",$,o(null==(y=e.searchFilter)?void 0:y.customTitles[1]),1),c("section",{class:"person__OrgWrapper",ref:s(J).ref,style:d(s(G).length>s(W)?s(Q):{}),onScroll:l[1]||(l[1]=(...e)=>s(J).onScroll&&s(J).onScroll(...e))},[c("section",{style:d(s(L).style)},[(r(!0),i(n,null,u(s(G),(e=>(r(),i("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:h(["search_item",e.data.disabled?"search_disabled":""]),onClick:t=>V(e.data)},[c("span",T,o(e.data.title)+"("+o(e.data.innerItemsNum)+"人)",1),c("p",A,o(e.data.tempTitle),1)],10,F)])))),128))],4)],36)])):f("v-if",!0)],64)):(r(),v(s(m),{key:1,description:"暂无数据"}))])}}});export{K as default};
|
|
@@ -11,6 +11,7 @@ declare type IWordBook<T> = {
|
|
|
11
11
|
declare type IWordBookChild<T> = {
|
|
12
12
|
user_id_obj: keyof T;
|
|
13
13
|
user_name_obj: keyof T;
|
|
14
|
+
user_expand_keys?: string[];
|
|
14
15
|
};
|
|
15
16
|
declare type ITag = {
|
|
16
17
|
key: IKey;
|
|
@@ -58,9 +59,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
59
|
type: BooleanConstructor;
|
|
59
60
|
default: boolean;
|
|
60
61
|
};
|
|
61
|
-
|
|
62
|
-
type:
|
|
63
|
-
default:
|
|
62
|
+
searchFilter: {
|
|
63
|
+
type: PropType<AnyObject>;
|
|
64
|
+
default: () => {};
|
|
64
65
|
};
|
|
65
66
|
treeSetting: {
|
|
66
67
|
type: PropType<ITreeOption>;
|
|
@@ -75,6 +76,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
76
|
default: () => Promise<never[]>;
|
|
76
77
|
};
|
|
77
78
|
}, {
|
|
79
|
+
searchFilterBase: {
|
|
80
|
+
isOpen: boolean;
|
|
81
|
+
multiple: boolean;
|
|
82
|
+
customTitles: string[];
|
|
83
|
+
itemHeight: number;
|
|
84
|
+
};
|
|
78
85
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
79
86
|
defaultList: {
|
|
80
87
|
type: PropType<(IKey | ITag)[]>;
|
|
@@ -116,9 +123,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
116
123
|
type: BooleanConstructor;
|
|
117
124
|
default: boolean;
|
|
118
125
|
};
|
|
119
|
-
|
|
120
|
-
type:
|
|
121
|
-
default:
|
|
126
|
+
searchFilter: {
|
|
127
|
+
type: PropType<AnyObject>;
|
|
128
|
+
default: () => {};
|
|
122
129
|
};
|
|
123
130
|
treeSetting: {
|
|
124
131
|
type: PropType<ITreeOption>;
|
|
@@ -167,7 +174,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
167
174
|
allCheckedKeys: IKey[];
|
|
168
175
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
169
176
|
checkStrategyResult: import("vue").ComputedRef<any>;
|
|
170
|
-
|
|
177
|
+
isSearchFilter: import("vue").ComputedRef<boolean>;
|
|
178
|
+
mergeSearchFilter: import("vue").ComputedRef<{
|
|
179
|
+
isOpen: boolean;
|
|
180
|
+
multiple: boolean;
|
|
181
|
+
customTitles: string[];
|
|
182
|
+
itemHeight: number;
|
|
183
|
+
}>;
|
|
184
|
+
wordbookChildExpandkeys: import("vue").ComputedRef<string[]>;
|
|
185
|
+
caculateTagData: import("vue").ComputedRef<any[]>;
|
|
171
186
|
init: () => void;
|
|
172
187
|
getallCheckedKeysWithChild: (item: TreeOption) => void;
|
|
173
188
|
getallCheckedKeysWithParent: (item: TreeOption) => void;
|
|
@@ -183,8 +198,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
183
198
|
setAllCheckedKeys: (tree: TreeOption[]) => void;
|
|
184
199
|
setAllCheckedKeysWithChild: (tree: TreeOption[]) => void;
|
|
185
200
|
setAllCheckedKeysWithParent: (tree: TreeOption[]) => void;
|
|
201
|
+
searchSetting: () => string;
|
|
186
202
|
onSearch: () => Promise<void>;
|
|
187
|
-
onClear: () => void;
|
|
188
203
|
setTreeCheckd: (tree: TreeOption[], checked: boolean) => void;
|
|
189
204
|
setCheckdWithChild: (tree: TreeOption[], checked: boolean) => void;
|
|
190
205
|
setCheckdWithParent: (tree: TreeOption[], checked: boolean) => void;
|
|
@@ -196,6 +211,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
196
211
|
clearAll: () => void;
|
|
197
212
|
closeTag: (tag: ITag) => void;
|
|
198
213
|
notifyCheck: (keys: IKey[]) => void;
|
|
214
|
+
notifySearchClear: () => void;
|
|
199
215
|
getCheckWithLevel: () => {
|
|
200
216
|
[x: string]: any;
|
|
201
217
|
key: IKey;
|
|
@@ -411,6 +427,128 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
411
427
|
treeData: any[];
|
|
412
428
|
checkedKeys: (string | number)[];
|
|
413
429
|
}>;
|
|
430
|
+
SearchOrgAndStaff: import("vue").DefineComponent<{
|
|
431
|
+
treeData: {
|
|
432
|
+
type: PropType<any[]>;
|
|
433
|
+
default: () => never[];
|
|
434
|
+
};
|
|
435
|
+
checkedKeys: {
|
|
436
|
+
type: PropType<(string | number)[]>;
|
|
437
|
+
default: () => never[];
|
|
438
|
+
};
|
|
439
|
+
searchFilter: {
|
|
440
|
+
type: ObjectConstructor;
|
|
441
|
+
default: () => {};
|
|
442
|
+
};
|
|
443
|
+
}, {
|
|
444
|
+
$message: import("naive-ui").MessageApi;
|
|
445
|
+
virtualItemHeight: number;
|
|
446
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
447
|
+
treeData: {
|
|
448
|
+
type: PropType<any[]>;
|
|
449
|
+
default: () => never[];
|
|
450
|
+
};
|
|
451
|
+
checkedKeys: {
|
|
452
|
+
type: PropType<(string | number)[]>;
|
|
453
|
+
default: () => never[];
|
|
454
|
+
};
|
|
455
|
+
searchFilter: {
|
|
456
|
+
type: ObjectConstructor;
|
|
457
|
+
default: () => {};
|
|
458
|
+
};
|
|
459
|
+
}>> & {
|
|
460
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
461
|
+
onNotifyClear?: ((...args: any[]) => any) | undefined;
|
|
462
|
+
}>>;
|
|
463
|
+
emit: (event: "notifyCheck" | "notifyClear", ...args: any[]) => void;
|
|
464
|
+
moduleHeight: import("vue").ComputedRef<any>;
|
|
465
|
+
showNums: import("vue").ComputedRef<number>;
|
|
466
|
+
staffDataRef: import("vue").ComputedRef<any[]>;
|
|
467
|
+
staffList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
468
|
+
staffContainerProps: {
|
|
469
|
+
ref: import("vue").Ref<any>;
|
|
470
|
+
onScroll: () => void;
|
|
471
|
+
style: Partial<CSSStyleDeclaration>;
|
|
472
|
+
};
|
|
473
|
+
staffWrapperProps: import("vue").ComputedRef<{
|
|
474
|
+
style: {
|
|
475
|
+
width: string;
|
|
476
|
+
height: string;
|
|
477
|
+
marginTop: string;
|
|
478
|
+
};
|
|
479
|
+
}>;
|
|
480
|
+
staffContainerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
481
|
+
orgDataRef: import("vue").ComputedRef<any[]>;
|
|
482
|
+
orgList: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
|
|
483
|
+
orgContainerProps: {
|
|
484
|
+
ref: import("vue").Ref<any>;
|
|
485
|
+
onScroll: () => void;
|
|
486
|
+
style: Partial<CSSStyleDeclaration>;
|
|
487
|
+
};
|
|
488
|
+
orgWrapperProps: import("vue").ComputedRef<{
|
|
489
|
+
style: {
|
|
490
|
+
width: string;
|
|
491
|
+
height: string;
|
|
492
|
+
marginTop: string;
|
|
493
|
+
};
|
|
494
|
+
}>;
|
|
495
|
+
orgContainerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
496
|
+
searchCheckKeys: import("vue").Ref<(string | number)[]>;
|
|
497
|
+
showSelectKeys: import("vue").Ref<(string | number)[]>;
|
|
498
|
+
handleClick: (tree: any) => void;
|
|
499
|
+
handleStaffClick: (baseKeys: (string | number)[], currentTree: {
|
|
500
|
+
[key: string]: any;
|
|
501
|
+
key: string | number;
|
|
502
|
+
children: any[];
|
|
503
|
+
parentNode: any;
|
|
504
|
+
}, value: string | number) => false | undefined;
|
|
505
|
+
findParent: (baseKeys: (string | number)[], currentTree: {
|
|
506
|
+
[key: string]: any;
|
|
507
|
+
key: string | number;
|
|
508
|
+
children: any[];
|
|
509
|
+
parentNode: any;
|
|
510
|
+
}) => false | undefined;
|
|
511
|
+
handleOrgClick: (baseKeys: (string | number)[], currentTree: {
|
|
512
|
+
[key: string]: any;
|
|
513
|
+
key: string | number;
|
|
514
|
+
children: any[];
|
|
515
|
+
parentNode: any;
|
|
516
|
+
}, value: string | number) => void;
|
|
517
|
+
handleFindChildren: (treeList: {
|
|
518
|
+
[key: string]: any;
|
|
519
|
+
key: string | number;
|
|
520
|
+
children: any[];
|
|
521
|
+
parentNode: any;
|
|
522
|
+
}[]) => void;
|
|
523
|
+
checkInitTree: (tree: {
|
|
524
|
+
[key: string]: any;
|
|
525
|
+
key: string | number;
|
|
526
|
+
children: any[];
|
|
527
|
+
parentNode: any;
|
|
528
|
+
}, baseKey: string | number) => false | undefined;
|
|
529
|
+
ref: typeof ref;
|
|
530
|
+
NEmpty: any;
|
|
531
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("notifyCheck" | "notifyClear")[], "notifyCheck" | "notifyClear", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
532
|
+
treeData: {
|
|
533
|
+
type: PropType<any[]>;
|
|
534
|
+
default: () => never[];
|
|
535
|
+
};
|
|
536
|
+
checkedKeys: {
|
|
537
|
+
type: PropType<(string | number)[]>;
|
|
538
|
+
default: () => never[];
|
|
539
|
+
};
|
|
540
|
+
searchFilter: {
|
|
541
|
+
type: ObjectConstructor;
|
|
542
|
+
default: () => {};
|
|
543
|
+
};
|
|
544
|
+
}>> & {
|
|
545
|
+
onNotifyCheck?: ((...args: any[]) => any) | undefined;
|
|
546
|
+
onNotifyClear?: ((...args: any[]) => any) | undefined;
|
|
547
|
+
}, {
|
|
548
|
+
searchFilter: Record<string, any>;
|
|
549
|
+
treeData: any[];
|
|
550
|
+
checkedKeys: (string | number)[];
|
|
551
|
+
}>;
|
|
414
552
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
415
553
|
defaultList: {
|
|
416
554
|
type: PropType<(IKey | ITag)[]>;
|
|
@@ -452,9 +590,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
452
590
|
type: BooleanConstructor;
|
|
453
591
|
default: boolean;
|
|
454
592
|
};
|
|
455
|
-
|
|
456
|
-
type:
|
|
457
|
-
default:
|
|
593
|
+
searchFilter: {
|
|
594
|
+
type: PropType<AnyObject>;
|
|
595
|
+
default: () => {};
|
|
458
596
|
};
|
|
459
597
|
treeSetting: {
|
|
460
598
|
type: PropType<ITreeOption>;
|
|
@@ -482,7 +620,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
482
620
|
showClear: boolean;
|
|
483
621
|
multiple: boolean;
|
|
484
622
|
searchInner: boolean;
|
|
485
|
-
|
|
623
|
+
searchFilter: AnyObject;
|
|
486
624
|
treeSetting: ITreeOption;
|
|
487
625
|
queryLoadChildData: (node: TreeOption) => Promise<AnyObject>;
|
|
488
626
|
queryTreeSearch: (keyWork: string) => Promise<Array<AnyObject>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,createCommentVNode as o,withKeys as s,createTextVNode as d,toDisplayString as h,withDirectives as v,vShow as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as _,NGi as b,NSpace as C,NInputGroup as x,NInput as w,NIcon as L,NButton as S,NCheckbox as j,NTree as T}from"naive-ui";import{CloseCircleSharp as N}from"@vicons/ionicons5";import{searchFilterTree as I,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as O}from"lodash-es";import{SearchTypeConfig as $}from"./types/enums.js";import D from"./SearchMultiple.vue.js";import E from"./SearchOrgAndStaff.vue.js";const K={key:0},q={class:"c-select-person__scroll",style:{height:"342px"}};var A=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{expose:A,emit:B}){const P=e,R={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},U=l(""),H=l(!1),W=l([]),G=l([]),z=l([]),M=l([]),J=l([]),Q=l(!1),V=O(function e(l){return l.forEach((l=>{var t;if(null==(t=l.children)?void 0:t.length){const t=se(l.children,[]);l.innerItemsNum=t.length,l.innerLeafs=t,e(l.children)}})),de(l,"")}(P.data));let X=[];const Y=t((()=>!!P.queryLoadChildData)),Z=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.treeSetting)?void 0:e.checkStrategy)?l:"child"})),ee=t((()=>(null==P?void 0:P.searchFilter)&&Object.keys(null==P?void 0:P.searchFilter).length>0)),le=t((()=>ee.value?{...O(R),...P.searchFilter}:O(R))),te=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),ne=t((()=>{let e=[];return W.value.forEach((l=>{for(let t=0;t<M.value.length;t++){const n=M.value[t];if(n.key==l){e.push(n);break}}})),e}));function ae(e){e.disabled||e.children||!e.key||X.push(e.key)}function ue(e){e.disabled||e.tempTitle||!e.key||X.push(e.key)}async function ie(e){if(P.queryLoadChildData){const l=await P.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function re(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ce({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||Y.value&&!(null==e?void 0:e.isLeaf)){const l=P.wordbook.user_count_obj&&e[P.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}{const l=null!=(t=e.title_expand_strs)?t:"";return c("p",{class:"user_item"},[e.title,c("span",{class:"user_item_expand",title:l},[l])])}}function oe(e){return e[P.wordbookChild.user_name_obj]||e[P.wordbook.parent_name_obj]||e.orgName||e.title||""}function se(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?se(e.children,l):!e.disabled&&l.push(e)})),l}function de(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=oe(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?de(null==e?void 0:e.children,a):[]}})):[]}async function he(){if(Q.value=!!U.value.trim(),Y.value)z.value=await P.queryTreeSearch(U.value);else{const e=function(){const e={[$.SEARCH_ORG_STAFF]:ee.value,[$.SEARCH_ORG]:P.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();z.value=I(e,V,U.value)}G.value=z.value.length&&U.value?F(z.value):[]}function ve(e,l){var t,n;switch(null!=(n=null==(t=null==P?void 0:P.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}n.children&&ve(n.children,l)}}(e,l);break;case"parent":!function(e,l){W.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}}}(e,l)}}function pe(e){ve(z.value,e)}function fe(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=J.value.map((e=>e.key));W.value.includes(n.key)&&!a.includes(n.key)&&M.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs}),(null==(l=n.children)?void 0:l.length)&&fe(n.children)}}function ye(e){W.value=e}function ke(){W.value=[]}function me(e){W.value=e}function ge(){U.value="",setTimeout((()=>{he()}))}return function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];let o=te.value.reduce(((e,l)=>e+(c[l]?`${c[l]},`:"")),"");switch(c.title_expand_strs=o.slice(0,-1),c.title=oe(c),c.label=oe(c),c.parentNode=t,c.key||(c.key=c[P.wordbookChild.user_id_obj]||c[P.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),re(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==P?void 0:P.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":ae(c);break;case"parent":ue(c)}}}(V,null),z.value=V,P.defaultList.length>0&&(Y.value?(P.defaultList.forEach((e=>W.value.push(e.key))),M.value=O(P.defaultList),J.value=O(P.defaultList)):(P.defaultList.forEach((e=>W.value.push(e))),fe(V))),n((()=>W),(e=>{M.value=J.value.filter((l=>e.value.includes(l.key))),e.value.length&&fe(Y.value?z.value:V),H.value=X.every((e=>M.value.findIndex((l=>l.key===e))>-1));const l=M.value.filter((l=>e.value.includes(l.key)));B("check",e.value),B("checkWithLevel",l)}),{deep:!0}),n((()=>U.value),(e=>{e||ge()})),A({getCheckWithLevel:function(){const e=W.value,l=M.value.filter((l=>e.includes(l.key)));return null!=l?l:[]}}),(l,t)=>(a(),u(i(_),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(x),{style:{"margin-bottom":"12px"}},{default:r((()=>[o(" clearable "),c(i(w),{class:"search-input",value:U.value,"onUpdate:value":t[0]||(t[0]=e=>U.value=e),placeholder:e.searchPlaceholder,onKeyup:s(he,["enter"])},{suffix:r((()=>[U.value?(a(),u(i(L),{key:0,class:"search-clear",component:i(N),size:"16",onClick:ge},null,8,["component"])):o("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),c(i(S),{type:"primary",onClick:he},{default:r((()=>[d(h(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!Q.value?v((a(),u(i(j),{key:0,checked:H.value,"onUpdate:checked":[t[1]||(t[1]=e=>H.value=e),pe]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[p,i(X).length<1e3]]):o("v-if",!0),o(" 支持选人 "),e.searchInner&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),u(D,{key:1,treeData:z.value,checkedKeys:W.value,onNotifyCheck:me},null,8,["treeData","checkedKeys"])):i(ee)&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),f(y,{key:2},[o(" 同时兼容选人和选部门 "),c(E,{treeData:z.value,checkedKeys:W.value,searchFilter:i(le),onNotifyCheck:me,onNotifyClear:ge},null,8,["treeData","checkedKeys","searchFilter"])],2112)):(a(),u(i(T),k({key:3,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":W.value,"expanded-keys":G.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>G.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":W.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>W.value=e),data:z.value,"check-strategy":"child","render-label":ce},e.treeSetting,{"onUpdate:checkedKeys":ye,onLoad:ie}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),f("span",K,"已选择:"+h(i(ne).length),1)):o("v-if",!0),e.showClear?(a(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ke},"清空")):o("v-if",!0)])),_:1}),m("div",q,[(a(!0),f(y,null,g(i(ne),(e=>(a(),f("span",{class:"c-select-person__tag-item",key:e.key},[d(h(e.name)+" "+h(e.parentName?`(${e.parentName})`:"")+" "+h(e.innerItemsNum?`(${e.innerItemsNum}人)`:"")+" ",1),c(i(L),{class:"tag-close",component:i(N),onClick:l=>function(e){W.value=W.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={SEARCH_ORG_STAFF:"isSearchFilter",SEARCH_ORG:"searchInner"};export{e as SearchTypeConfig};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type TreeOption } from 'naive-ui';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function searchFilterTree(attr: string, data: TreeOption[], keyword: string): any[];
|
|
3
3
|
export declare function getExpandedKeys(tree: TreeOption[]): (string | number)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as n}from"lodash-es";function
|
|
1
|
+
import{cloneDeep as n}from"lodash-es";import{SearchTypeConfig as i}from"../types/enums.js";function e(e,l,u){const o=n(l);if(u.trim()){let n=[];switch(e){case i.SEARCH_ORG_STAFF:n=function(n,i){return c(n,i,[])}(o,u);break;case i.SEARCH_ORG:n=function(n,i){return t(n,[]).filter((n=>{var e;return null==(e=n.title)?void 0:e.includes(i.trim())}))}(o,u);break;default:n=r(o,u)}return n}return r(o,u)}function r(n,i){return l(n,i),o(n)}function l(n,i){n.forEach((n=>{var e,r;if(n.visible=null==(e=n.title)?void 0:e.includes(i.trim()),null==(r=n.children)?void 0:r.length)if(l(n.children,i),n.visible)u(n.children);else{n.children.some((n=>n.visible))&&(n.visible=!0)}}))}function t(n,i){return n.forEach((n=>{var e;(null==(e=n.children)?void 0:e.length)?t(n.children,i):i.push(n)})),i}function c(n,i,e){return n.forEach((n=>{var r,l;(null==(r=n.title)?void 0:r.includes(i.trim()))&&!n.disabled&&e.push(n),(null==(l=n.children)?void 0:l.length)&&c(n.children,i,e)})),e}function u(n){n.forEach((n=>{var i;n.visible=!0,(null==(i=n.children)?void 0:i.length)&&u(n.children)}))}function o(n){return n.filter((n=>{var i;return!!n.visible&&((null==(i=n.children)?void 0:i.length)&&(n.children=o(n.children)),!0)}))}function d(n){const i=[];return function n(e){for(let r=0,l=e.length;r<l;r++){const l=e[r];l.children&&(i.push(l.key),n(l.children))}}(n),i}export{d as getExpandedKeys,e as searchFilterTree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-select-person{padding:0 12px}.c-select-person__scroll{height:308px;overflow-y:auto}.c-select-person__clear-btn{color:#5585f5;cursor:pointer}.c-select-person__tag-item{align-items:center;background:rgba(85,133,245,.08);border:1px solid rgba(85,133,245,.5);border-radius:4px;box-sizing:border-box;color:#5585f5;display:inline-flex;font-size:14px;height:24px;line-height:24px;list-style:none;margin:0 8px 4px 0;padding:0 6px;transition:all .3s cubic-bezier(.215,.61,.355,1);white-space:nowrap}.c-select-person__tag-item .tag-close{color:#5585f5;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;margin-left:3px;transition:all .3s}.c-select-person__tag-item .tag-close:hover{color:rgba(85,133,245,.6)}.c-select-person__tag-item .tag-close:active{color:#fff}.c-select-person .select-person__multiple-search{display:flex;flex-direction:column}.c-select-person .select-person__multiple-search .n-checkbox{height:30px;overflow:hidden}
|
|
1
|
+
.c-select-person{padding:0 12px}.c-select-person__scroll{height:308px;overflow-y:auto}.c-select-person__clear-btn{color:#5585f5;cursor:pointer}.c-select-person__tag-item{align-items:center;background:rgba(85,133,245,.08);border:1px solid rgba(85,133,245,.5);border-radius:4px;box-sizing:border-box;color:#5585f5;display:inline-flex;font-size:14px;height:24px;line-height:24px;list-style:none;margin:0 8px 4px 0;padding:0 6px;transition:all .3s cubic-bezier(.215,.61,.355,1);white-space:nowrap}.c-select-person__tag-item .tag-close{color:#5585f5;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;margin-left:3px;transition:all .3s}.c-select-person__tag-item .tag-close:hover{color:rgba(85,133,245,.6)}.c-select-person__tag-item .tag-close:active{color:#fff}.c-select-person .n-tree-node-content{flex:1;overflow:hidden}.c-select-person .search-input .search-clear{cursor:pointer}.c-select-person .user_item{align-items:center;display:flex;font-size:14px}.c-select-person .user_item .user_item_expand{flex:1;font-size:12px;margin-left:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-select-person .search_title{border-bottom:1px solid #eee;font-size:16px;margin-top:8px;padding-bottom:5px}.c-select-person .select-person__multiple-search{display:flex;flex-direction:column}.c-select-person .select-person__multiple-search .n-checkbox{height:30px;overflow:hidden}.c-select-person .select-person__multiple-search .n-checkbox .n-checkbox__label{overflow:hidden}.c-select-person .select-person__multiple-search .search_item{align-items:flex-start;box-sizing:content-box;cursor:pointer;display:flex;flex-direction:column;height:40px;margin:2px;padding:3px}.c-select-person .select-person__multiple-search .search_item .title{align-items:center;display:flex;font-size:14px;overflow:hidden;width:100%}.c-select-person .select-person__multiple-search .search_item .desc{color:#7d88b5;font-size:12px;margin-top:5px}.c-select-person .select-person__multiple-search .search_item:hover{background:#f1f1f1}.c-select-person .select-person__multiple-search .search_disabled{color:#c2c2c2;cursor:not-allowed}.c-select-person .select-person__multiple-search .search_disabled .desc{color:#c2c2c2}.c-select-person .n-empty{margin-top:30px}
|
|
@@ -102,15 +102,22 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
102
102
|
name?: string | undefined;
|
|
103
103
|
render_key?: string[] | undefined;
|
|
104
104
|
search_key?: string[] | undefined;
|
|
105
|
+
value_key?: string | undefined;
|
|
106
|
+
queryParams?: string[] | undefined;
|
|
105
107
|
primary_key?: string | undefined;
|
|
106
108
|
type?: string | undefined;
|
|
107
|
-
value_key?: string | undefined;
|
|
108
109
|
level_key?: string | undefined;
|
|
109
110
|
link_key?: string | undefined;
|
|
110
111
|
link_key_split?: string | undefined;
|
|
111
112
|
show_key?: string[] | undefined;
|
|
112
113
|
conObj?: import("../../../es/shared/types").AnyObject[] | undefined;
|
|
113
114
|
conObjFirstLevel?: import("../../../es/shared/types").AnyObject[] | undefined;
|
|
115
|
+
setting?: {
|
|
116
|
+
cascading?: {
|
|
117
|
+
'form.name': string;
|
|
118
|
+
value: string;
|
|
119
|
+
}[] | undefined;
|
|
120
|
+
} | undefined;
|
|
114
121
|
} | undefined;
|
|
115
122
|
open?: {
|
|
116
123
|
value?: any;
|
|
@@ -1868,7 +1875,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1868
1875
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
1869
1876
|
};
|
|
1870
1877
|
operationalForm: {
|
|
1871
|
-
type: import("vue").PropType<import("
|
|
1878
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
1872
1879
|
};
|
|
1873
1880
|
linebarAutoHidden: {
|
|
1874
1881
|
type: BooleanConstructor;
|
|
@@ -2008,7 +2015,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2008
2015
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
2009
2016
|
};
|
|
2010
2017
|
operationalForm: {
|
|
2011
|
-
type: import("vue").PropType<import("
|
|
2018
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
2012
2019
|
};
|
|
2013
2020
|
linebarAutoHidden: {
|
|
2014
2021
|
type: BooleanConstructor;
|
|
@@ -2069,6 +2076,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2069
2076
|
triggerAllReactionsHandler: () => void;
|
|
2070
2077
|
operationalFormHandler: (field: string) => void;
|
|
2071
2078
|
triggerAllOperationalFormHandler: () => void;
|
|
2079
|
+
wordbookSettingHandler: (fieldKey: string, value: unknown) => void;
|
|
2072
2080
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
2073
2081
|
[key: symbol]: any;
|
|
2074
2082
|
[key: `x-${string}`]: any;
|
|
@@ -2184,7 +2192,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2184
2192
|
"x-read-pretty"?: boolean | undefined;
|
|
2185
2193
|
"x-compile-omitted"?: string[] | undefined;
|
|
2186
2194
|
}>>;
|
|
2187
|
-
onKeydown: (event: KeyboardEvent) => void
|
|
2195
|
+
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
2188
2196
|
clearSpan: (uuid: string) => void;
|
|
2189
2197
|
exposeEvent: {
|
|
2190
2198
|
validate(path?: string): Promise<void>;
|
|
@@ -2476,7 +2484,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2476
2484
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
2477
2485
|
};
|
|
2478
2486
|
operationalForm: {
|
|
2479
|
-
type: import("vue").PropType<import("
|
|
2487
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
2480
2488
|
};
|
|
2481
2489
|
linebarAutoHidden: {
|
|
2482
2490
|
type: BooleanConstructor;
|
|
@@ -104,15 +104,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
104
104
|
name?: string | undefined;
|
|
105
105
|
render_key?: string[] | undefined;
|
|
106
106
|
search_key?: string[] | undefined;
|
|
107
|
+
value_key?: string | undefined;
|
|
108
|
+
queryParams?: string[] | undefined;
|
|
107
109
|
primary_key?: string | undefined;
|
|
108
110
|
type?: string | undefined;
|
|
109
|
-
value_key?: string | undefined;
|
|
110
111
|
level_key?: string | undefined;
|
|
111
112
|
link_key?: string | undefined;
|
|
112
113
|
link_key_split?: string | undefined;
|
|
113
114
|
show_key?: string[] | undefined;
|
|
114
115
|
conObj?: import("../../../../es/shared/types").AnyObject[] | undefined;
|
|
115
116
|
conObjFirstLevel?: import("../../../../es/shared/types").AnyObject[] | undefined;
|
|
117
|
+
setting?: {
|
|
118
|
+
cascading?: {
|
|
119
|
+
'form.name': string;
|
|
120
|
+
value: string;
|
|
121
|
+
}[] | undefined;
|
|
122
|
+
} | undefined;
|
|
116
123
|
} | undefined;
|
|
117
124
|
open?: {
|
|
118
125
|
value?: any;
|
|
@@ -1870,7 +1877,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1870
1877
|
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
1871
1878
|
};
|
|
1872
1879
|
operationalForm: {
|
|
1873
|
-
type: import("vue").PropType<import("../../../../es/
|
|
1880
|
+
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
1874
1881
|
};
|
|
1875
1882
|
linebarAutoHidden: {
|
|
1876
1883
|
type: BooleanConstructor;
|
|
@@ -2010,7 +2017,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2010
2017
|
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
2011
2018
|
};
|
|
2012
2019
|
operationalForm: {
|
|
2013
|
-
type: import("vue").PropType<import("../../../../es/
|
|
2020
|
+
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
2014
2021
|
};
|
|
2015
2022
|
linebarAutoHidden: {
|
|
2016
2023
|
type: BooleanConstructor;
|
|
@@ -2071,6 +2078,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2071
2078
|
triggerAllReactionsHandler: () => void;
|
|
2072
2079
|
operationalFormHandler: (field: string) => void;
|
|
2073
2080
|
triggerAllOperationalFormHandler: () => void;
|
|
2081
|
+
wordbookSettingHandler: (fieldKey: string, value: unknown) => void;
|
|
2074
2082
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
2075
2083
|
[key: symbol]: any;
|
|
2076
2084
|
[key: `x-${string}`]: any;
|
|
@@ -2186,7 +2194,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2186
2194
|
"x-read-pretty"?: boolean | undefined;
|
|
2187
2195
|
"x-compile-omitted"?: string[] | undefined;
|
|
2188
2196
|
}>>;
|
|
2189
|
-
onKeydown: (event: KeyboardEvent) => void
|
|
2197
|
+
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
2190
2198
|
clearSpan: (uuid: string) => void;
|
|
2191
2199
|
exposeEvent: {
|
|
2192
2200
|
validate(path?: string): Promise<void>;
|
|
@@ -2478,7 +2486,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2478
2486
|
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
2479
2487
|
};
|
|
2480
2488
|
operationalForm: {
|
|
2481
|
-
type: import("vue").PropType<import("../../../../es/
|
|
2489
|
+
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
2482
2490
|
};
|
|
2483
2491
|
linebarAutoHidden: {
|
|
2484
2492
|
type: BooleanConstructor;
|