cnhis-design-vue 3.1.51-release.4 → 3.1.51
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/src/type.d.ts +1 -1
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -0
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +3 -3
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/field-set/index.d.ts +35 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +36 -1
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +2 -1
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -0
- package/es/components/field-set/src/utils/index.d.ts +2 -0
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/iho-table/index.d.ts +3 -3
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4 -3
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +7 -6
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/filterVisibleEventPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +15 -0
- 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/quick-search/index.d.ts +3 -0
- package/es/components/quick-search/src/index.vue.d.ts +3 -0
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/slider-tree/index.d.ts +16 -9
- package/es/components/slider-tree/src/index.vue.d.ts +16 -9
- package/es/components/slider-tree/src/index.vue2.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -135,6 +135,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
135
135
|
}[]>;
|
|
136
136
|
showAdd: import("vue").Ref<boolean>;
|
|
137
137
|
addVal: import("vue").Ref<string>;
|
|
138
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
138
139
|
parentNamesHasAdd: import("vue").ComputedRef<boolean>;
|
|
139
140
|
handleName: import("vue").ComputedRef<(item: import("..").ISearchType, key?: string) => any>;
|
|
140
141
|
init: () => void;
|
|
@@ -186,6 +187,8 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
186
187
|
setDefaultCon: (widgetArr: import("..").ISearchParamsType[]) => void;
|
|
187
188
|
getFilterParams: () => {};
|
|
188
189
|
setFilterParams: (params?: any) => void;
|
|
190
|
+
getOriginalConfig: () => import("..").IApiServerType[];
|
|
191
|
+
onFilterChange: (fn: any) => void;
|
|
189
192
|
NForm: any;
|
|
190
193
|
NFormItem: import("vue").DefineComponent<{
|
|
191
194
|
readonly label: StringConstructor;
|
|
@@ -137,6 +137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
137
137
|
}[]>;
|
|
138
138
|
showAdd: import("vue").Ref<boolean>;
|
|
139
139
|
addVal: import("vue").Ref<string>;
|
|
140
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
140
141
|
parentNamesHasAdd: import("vue").ComputedRef<boolean>;
|
|
141
142
|
handleName: import("vue").ComputedRef<(item: ISearchType, key?: string) => any>;
|
|
142
143
|
init: () => void;
|
|
@@ -188,6 +189,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
188
189
|
setDefaultCon: (widgetArr: ISearchParamsType[]) => void;
|
|
189
190
|
getFilterParams: () => {};
|
|
190
191
|
setFilterParams: (params?: any) => void;
|
|
192
|
+
getOriginalConfig: () => IApiServerType[];
|
|
193
|
+
onFilterChange: (fn: any) => void;
|
|
191
194
|
NForm: any;
|
|
192
195
|
NFormItem: import("vue").DefineComponent<{
|
|
193
196
|
readonly label: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,provide as t,computed as a,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as s,Fragment as u,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as S,NPopover as x,NModal as A,NCard as _,NIcon as
|
|
1
|
+
import{defineComponent as e,ref as l,provide as t,computed as a,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as s,Fragment as u,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as S,NPopover as x,NModal as A,NCard as _,NIcon as F,NButton as q,NForm as w,NFormItem as j,NInput as E}from"naive-ui";import{CloseOutline as U,AddOutline as I}from"@vicons/ionicons5";import L from"../../table-filter/src/hooks/useMixins.js";import N from"../../table-filter/src/hooks/useRenderWidget.js";import O from"../../table-filter/src/hooks/useAdvanced.js";import P from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as R}from"lodash-es";import{InjectionFilterApiConfig as V,InjectionFilterSearchConfig as z}from"../../table-filter/src/constants/index.js";const D={class:"quick-search-block quick-search-table"},T={class:"quick-row"},B={class:"quick-item-title"},Q={class:"quick-item-col"},M={class:"svg-wrap"},W={class:"flex_right"},G={class:"class-filter-content"},J={class:"quickSearch-content"},H=s("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={key:0,class:"s-content"};var Y=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:Y,emit:Z}){const $=e,ee={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},le=S(),{handleGetConfigApi:te,outQuickSearchFn:ae}=L(),{getRenderSearchConObj:ie,resetRenderWidgetValue:ne,isRender:oe}=N(),{transformData:re,getCacheDef:se,transformParams:ue}=O(),ce=l(null),de=l({classname:""});let fe=l(!1),ve=l([]),me=l([]),pe=l(!1),he=l("");const ge=l([]);t(V,$.filterApiConfig),t(z,ve);let ke=a((()=>!!me.value.length&&me.value.some((e=>e.isAdd)))),be=a((()=>(e,l="name")=>e.alias||e[l]));function ye(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let t=0;t<e.length;t++){let a=e[t];const i=ie(a);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ve.value)||[]}function Ce(){var e;null==(e=ce.value)||e.validate((e=>{var l;if(e)return;let t=ye();t.length||(t=[]);let a=null==(l=me.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await te(e,"requestSaveTableCondiTion",{},$.filterApiConfig))return;fe.value=!1,null==(l=ce.value)||l.restoreValidation(),de.value.classname="",me.value=[],Fe()}catch(e){console.log(e)}}({tableId:$.tableId||"",setting:JSON.stringify({displayCategory:a,name:de.value.classname,conObj:t}),conditionList:"[]"})}))}function Se(e){var l;const t=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{t&&t.focus()})),pe.value=!0}function xe(){pe.value=!1,he.value&&(me.value.forEach((e=>e.selected=!1)),me.value.push({disabled:!0,value:he.value,selected:!0,isAdd:!0}),he.value="")}function Ae(e){!function(e){me.value.splice(e,1)}(e)}function _e(){fe.value=!1}function Fe(){qe(ve.value),Z("clearQuickSearchConfig")}function qe(e){Array.isArray(e)&&(e.forEach((e=>{ne(e)})),ae.handlerInitSearchItem(ve.value))}return i((()=>$.searchFieldList),(e=>{e&&e.length>0&&function(){let e=R(re($.searchFieldList,{_filterApiConfig:$.filterApiConfig})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ve.value=e||[],ae.handlerInitSearchItem(ve.value)}()}),{immediate:!0,deep:!0}),i((()=>ve),(()=>{const e=ye()||[],l=ue(e);Z("getFilterParam",e,l),ge.value.forEach((e=>e(l)))}),{deep:!0}),n((()=>{const e=$.quickSearchConfig;if(e&&e.length>0)return l=e,void ve.value.forEach((e=>{var t,a;if(oe(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(t=i.value)?void 0:t.length)>0&&(e.value=se(e,i.value),e.unit=null!=(a=i.unit)?a:"")}}));var l;qe(ve.value)})),Y({openSaveToCalss:function(){let e=ye();e&&(e.length>0?fe.value=!0:le.warning("请设置搜索条件"))},clearData:Fe,onFilterSearch:function(){let e=ye()||[];const l=ue(e);return Z("onFilterSearch",e,l,!1),ve.value},getFilterParams:function(){const e=ye()||[];return ue(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ve.value.forEach((t=>{var a;if(oe(t)&&l.includes(t.columnName)){const l=e[t.columnName];t.value=Array.isArray(l)&&!1===(null==(a=t.widgetCfg)?void 0:a.multiple)?l[0]:l}}))},getOriginalConfig:function(){return $.searchFieldList},onFilterChange:function(e){ge.value.push(e)}}),(e,l)=>(o(),r("div",null,[s("div",D,[(o(!0),r(u,null,c(d(ve),(e=>(o(),r("div",{class:f(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[s("div",T,[v(" title "),s("div",B,[m(d(x),{trigger:"hover"},{trigger:p((()=>[h(g(d(be)(e,"title")),1)])),default:p((()=>[s("span",null,g(d(be)(e,"title")),1)])),_:2},1024)]),v(" content "),s("div",Q,[v(" 直接渲染组件 "),e.isRender?(o(),k(P,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,unit:e.unit,"onUpdate:unit":l=>e.unit=l},null,8,["cfg","modelValue","onUpdate:modelValue","unit","onUpdate:unit"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),m(d(A),{show:d(fe),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:Ce,onNegativeClick:_e,class:"classification-modal-block"},{default:p((()=>[m(d(_),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p((()=>[s("div",M,[m(d(F),{component:d(U),size:"24",onClick:_e},null,8,["component"])])])),footer:p((()=>[s("div",W,[m(d(q),{onClick:_e},{default:p((()=>[h("取消")])),_:1}),m(d(q),{type:"info",onClick:Ce},{default:p((()=>[h("确认")])),_:1})])])),default:p((()=>[s("div",G,[m(d(w),{ref_key:"formRef",ref:ce,"label-placement":"left",rules:ee,model:de.value},{default:p((()=>[m(d(j),{label:"筛选集名称",path:"classname"},{default:p((()=>[m(d(E),{value:de.value.classname,"onUpdate:value":l[0]||(l[0]=e=>de.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),s("div",J,[H,(o(!0),r(u,null,c(d(me),((e,l)=>(o(),r("div",{class:f(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:t=>function(e,l){e.disabled&&(me.value.forEach(((e,t)=>{t!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),r("div",X,[s("span",null,g(e.value),1)])):(o(),k(d(E),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),m(d(F),{component:d(U),class:"anticon-close",size:"20",onClick:e=>Ae(l)},null,8,["component","onClick"])],42,K)))),128)),d(ke)?v("v-if",!0):(o(),r(u,{key:0},[b(m(d(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:Se},{default:p((()=>[m(d(F),{component:d(I),size:"20"},null,8,["component"]),h("添加分类 ")])),_:1},512),[[y,!d(pe)]]),b(m(d(E),{style:{width:"100px"},class:"edit-tag",value:d(he),"onUpdate:value":l[1]||(l[1]=e=>C(he)?he.value=e:he=e),valueModifiers:{trim:!0},onBlur:xe,maxLength:10},null,8,["value"]),[[y,d(pe)]])],64))])])])),_:1})])),_:1},8,["show"])]))}});export{Y as default};
|
|
@@ -10,13 +10,11 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10
10
|
default: () => {};
|
|
11
11
|
};
|
|
12
12
|
}, {
|
|
13
|
-
$message: import("naive-ui").MessageApi;
|
|
14
13
|
$attr: {
|
|
15
14
|
[x: string]: unknown;
|
|
16
15
|
};
|
|
17
16
|
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
18
17
|
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
19
|
-
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
20
18
|
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
21
19
|
isMatchFn: (node: any, keyword: string) => boolean;
|
|
22
20
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -29,24 +27,33 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
29
27
|
default: () => {};
|
|
30
28
|
};
|
|
31
29
|
}>> & {
|
|
32
|
-
|
|
30
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
33
31
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
34
32
|
}>>;
|
|
35
|
-
emit: (event: "
|
|
33
|
+
emit: (event: "selectNode" | "saveWidth", ...args: any[]) => void;
|
|
36
34
|
flexWidth: import("vue").Ref<number>;
|
|
37
35
|
searchValue: import("vue").Ref<string>;
|
|
38
36
|
treeData: import("vue").Ref<any[]>;
|
|
39
37
|
expandedKeys: import("vue").Ref<string[]>;
|
|
40
38
|
selectedKeys: import("vue").Ref<string[]>;
|
|
41
39
|
selectNode: import("vue").Ref<{}>;
|
|
42
|
-
|
|
40
|
+
treeProperty: import("vue").ComputedRef<{
|
|
41
|
+
virtualScroll: boolean;
|
|
42
|
+
selectable: boolean;
|
|
43
|
+
data: any[];
|
|
44
|
+
expandedKeys: string[];
|
|
45
|
+
selectedKeys: string[];
|
|
46
|
+
renderLabel: ({ option }: any) => any;
|
|
47
|
+
onUpdateExpandedKeys: (expandedKeyVals: string[]) => void;
|
|
48
|
+
onUpdateSelectedKeys: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
49
|
+
onLoad: (treeNode: any) => any;
|
|
50
|
+
}>;
|
|
43
51
|
handleRenderLabel: ({ option }: any) => any;
|
|
44
52
|
init: () => Promise<void>;
|
|
45
53
|
onExpand: (expandedKeyVals: string[]) => void;
|
|
46
54
|
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
47
55
|
onSearch: () => Promise<void>;
|
|
48
|
-
|
|
49
|
-
onDrop: (info: any) => Promise<void>;
|
|
56
|
+
refreshNode: (selectOrgId?: string | undefined) => Promise<void>;
|
|
50
57
|
getDeptData: (orgId: string) => Promise<any>;
|
|
51
58
|
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
52
59
|
onLoadData: (treeNode: any) => any;
|
|
@@ -60,7 +67,7 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
60
67
|
mounted(el: any, { value }: any): void;
|
|
61
68
|
beforeUnmount(el: any): void;
|
|
62
69
|
};
|
|
63
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
70
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectNode" | "saveWidth")[], "selectNode" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
71
|
sliderInitialWidth: {
|
|
65
72
|
type: NumberConstructor;
|
|
66
73
|
default: number;
|
|
@@ -70,7 +77,7 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
70
77
|
default: () => {};
|
|
71
78
|
};
|
|
72
79
|
}>> & {
|
|
73
|
-
|
|
80
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
74
81
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
75
82
|
}, {
|
|
76
83
|
sliderInitialWidth: number;
|
|
@@ -8,13 +8,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
default: () => {};
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
|
-
$message: import("naive-ui").MessageApi;
|
|
12
11
|
$attr: {
|
|
13
12
|
[x: string]: unknown;
|
|
14
13
|
};
|
|
15
14
|
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
16
15
|
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
17
|
-
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
18
16
|
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
19
17
|
isMatchFn: (node: any, keyword: string) => boolean;
|
|
20
18
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -27,24 +25,33 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
25
|
default: () => {};
|
|
28
26
|
};
|
|
29
27
|
}>> & {
|
|
30
|
-
|
|
28
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
31
29
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
32
30
|
}>>;
|
|
33
|
-
emit: (event: "
|
|
31
|
+
emit: (event: "selectNode" | "saveWidth", ...args: any[]) => void;
|
|
34
32
|
flexWidth: import("vue").Ref<number>;
|
|
35
33
|
searchValue: import("vue").Ref<string>;
|
|
36
34
|
treeData: import("vue").Ref<any[]>;
|
|
37
35
|
expandedKeys: import("vue").Ref<string[]>;
|
|
38
36
|
selectedKeys: import("vue").Ref<string[]>;
|
|
39
37
|
selectNode: import("vue").Ref<{}>;
|
|
40
|
-
|
|
38
|
+
treeProperty: import("vue").ComputedRef<{
|
|
39
|
+
virtualScroll: boolean;
|
|
40
|
+
selectable: boolean;
|
|
41
|
+
data: any[];
|
|
42
|
+
expandedKeys: string[];
|
|
43
|
+
selectedKeys: string[];
|
|
44
|
+
renderLabel: ({ option }: any) => any;
|
|
45
|
+
onUpdateExpandedKeys: (expandedKeyVals: string[]) => void;
|
|
46
|
+
onUpdateSelectedKeys: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
47
|
+
onLoad: (treeNode: any) => any;
|
|
48
|
+
}>;
|
|
41
49
|
handleRenderLabel: ({ option }: any) => any;
|
|
42
50
|
init: () => Promise<void>;
|
|
43
51
|
onExpand: (expandedKeyVals: string[]) => void;
|
|
44
52
|
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
45
53
|
onSearch: () => Promise<void>;
|
|
46
|
-
|
|
47
|
-
onDrop: (info: any) => Promise<void>;
|
|
54
|
+
refreshNode: (selectOrgId?: string) => Promise<void>;
|
|
48
55
|
getDeptData: (orgId: string) => Promise<any>;
|
|
49
56
|
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
50
57
|
onLoadData: (treeNode: any) => any;
|
|
@@ -58,7 +65,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
65
|
mounted(el: any, { value }: any): void;
|
|
59
66
|
beforeUnmount(el: any): void;
|
|
60
67
|
};
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
68
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectNode" | "saveWidth")[], "selectNode" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
69
|
sliderInitialWidth: {
|
|
63
70
|
type: NumberConstructor;
|
|
64
71
|
default: number;
|
|
@@ -68,7 +75,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
75
|
default: () => {};
|
|
69
76
|
};
|
|
70
77
|
}>> & {
|
|
71
|
-
|
|
78
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
72
79
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
73
80
|
}, {
|
|
74
81
|
sliderInitialWidth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as a,onMounted as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,computed as l,onMounted as n,h as s,withDirectives as o,openBlock as r,createElementBlock as i,normalizeStyle as u,createElementVNode as c,createVNode as d,unref as v,createCommentVNode as f,renderSlot as p,createBlock as m,normalizeProps as h,mergeProps as y}from"vue";import{NInput as g,NTree as b,NEmpty as w}from"naive-ui";import{vFlexibleResize as x}from"../../../shared/directive/flexibleResize.js";import O from"./hooks/useAsyncData.js";import{traversalData as C}from"./utils/tool.js";import{useDebounceFn as S}from"@vueuse/core";const I={class:"search-groups"},L={class:"tree-wrap"},k={key:1,class:"empty-container"},N={class:"table-footer-wrap"};var A=e({__name:"index",props:{sliderInitialWidth:{type:Number,default:300},treeSearchApiConfig:{type:Object,default:()=>({})}},emits:["selectNode","saveWidth"],setup(e,{expose:A,emit:j}){const K=e,U=t(),{getChildrenByOrgPartenId:W,searchEmpTreeData:D,getDeptList:E}=O(),M=(e,t)=>{var a,l;t=null==t?void 0:t.toLowerCase();let{label:n="",abbrp:s="",abbrw:o="",key:r,filterSearch:i=[]}=e;const u=(null==(a=null==n?void 0:n.toLowerCase())?void 0:a.indexOf(t))>-1,c=(null==(l=null==r?void 0:r.toLowerCase())?void 0:l.indexOf(t))>-1,d=i.some((e=>e.toLowerCase().indexOf(t)>-1));return!!(u||c||d)},R=a(K.sliderInitialWidth),$=a(""),J=a([]),P=a([]),_=a([]),z=a({}),B=l((()=>{let e={};for(let t in U)e[t]=U[t];return{virtualScroll:!0,selectable:!0,data:J.value,expandedKeys:P.value,selectedKeys:_.value,renderLabel:F,onUpdateExpandedKeys:T,onUpdateSelectedKeys:V,onLoad:X,...e}}));function F({option:e}){const t=e.label;if(t.includes($.value.trim())){const e=t.substr(0,t.indexOf($.value.trim())),a=t.substr(t.indexOf($.value.trim())+$.value.trim().length);return s("div",[s("span",{style:{marginRight:e?"2px":"0px"}},e),s("span",{style:{color:"#2563F4"}},$.value.trim()),s("span",{style:{marginLeft:a?"2px":"0px"}},a)])}return t}function T(e){P.value=e}function V(e=[],[t]){_.value=e,j("selectNode",t),z.value=t}n((()=>{!async function(){await Q(),J.value.length>0&&(P.value=[J.value[0].key],_.value=[J.value[0].key],z.value=J.value[0],j("selectNode",JSON.parse(JSON.stringify(J.value[0]))))}()}));const q=S((async()=>{const e=$.value.trim();if(e){const{data:t,success:a}=await D({search:e},K.treeSearchApiConfig);a&&(J.value=t,P.value=function(e){const t=[];for(const a of C(e,"children")){let e=!1;for(const t of C(a.children,"children"))M(t,$.value)&&(e=!0);e&&t.push(a.key)}return t}(t))}else G()}),800);async function G(e){await Q();let t=J.value[0].orgId;e&&(t=e);const a=await H(t);if(a){const e=J.value.map((e=>e.orgId===t?a:e));J.value=e}}async function H(e){const{data:t,success:a}=await E({orgId:e},K.treeSearchApiConfig);if(a){const a=J.value.find((t=>t.orgId===e));return a.children=t,a}}async function Q(){const{success:e,data:t}=await W(null,K.treeSearchApiConfig);e&&(J.value=t)}function X(e){return new Promise((async t=>{e.isOrg&&!e.children&&(await H(e.orgId),t(!0)),t(!0)}))}function Y({distance:e}){const t=R.value+e;R.value=Math.min(Math.max(t,50),1e3)}function Z(){j("saveWidth",R.value)}return A({refreshNode:G}),(e,t)=>o((r(),i("div",{class:"left-tree-wrap",ref:"left",style:u({width:R.value+"px"})},[c("div",I,[d(v(g),{clearable:"",placeholder:"搜索关键字",value:$.value,"onUpdate:value":[t[0]||(t[0]=e=>$.value=e),v(q)]},null,8,["value","onUpdate:value"]),f(" 按钮插槽 "),p(e.$slots,"buttons")]),f(" 标签tab插槽 "),p(e.$slots,"tabs"),c("div",L,[J.value.length>0?(r(),m(v(b),h(y({key:0},v(B))),null,16)):(r(),i("div",k,[d(v(w),{description:"暂无数据"})]))]),c("div",N,[f(" 导出数据插槽 "),p(e.$slots,"output")])],4)),[[v(x),{mode:"VR",onMove:Y,onEnd:Z}]])}});export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.51",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},d={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},o={name:e,version:"3.1.51",private:!0,main:"index.ts",peerDependencies:n,dependencies:d};export{o as default,d as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{useMemoize as o}from"@vueuse/core";import{isString as i,isObject as
|
|
1
|
+
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{useMemoize as o}from"@vueuse/core";import{isString as i,isObject as u,isNumber as s,isArray as c,isFunction as f}from"lodash-es";import a from"../package.json.js";export{getBindEventSettingTrigger,getOperationalFormHandler,isMatchLowCodeCondition,isMatchLowCodeConditionsWithSqlExpression}from"./business.js";function l(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",u){r=x(r),e=x(e);for(let s=0;s<e.length;s++){if(n(e[s],i,u),o)return;for(let i=0;i<r.length;i++){const u=e[s][r[i]];if(Array.isArray(u)&&t(u,n,r,e[s]),o)return}}}(t,e,n,r)}function d(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(!Reflect.get(t,"__cnhis_version")&&u(a)&&Reflect.set(t,"__cnhis_version",a.version),r?r():t.component(n,e))}function p(t){if(!i(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function x(t){return Array.isArray(t)?t:[t]}function m(){return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const h=o((function(t){if(!t)return 0;let e="";return[...t].reduce(((t,n)=>{const r=e;return e=n,/[a-z]/.test(n)?t+8.05:/[A-Z]/.test(n)?t+9.13:/\d/.test(n)?t+8.9:/[.,]/.test(n)?t+4.03:/[)(]/.test(n)?t+5.17:/[\u4e00-\u9fa5():,。]/.test(n)?t+13.95:/[-+]/.test(n)?t+7.51:/[/\\]/.test(n)?t+4.11:/%/.test(n)?t+12.68:/‰/.test(n)?t+17.75:" "===n?" "===r?t:t+4:t+6}),0)})),g=Object.seal(Object.create(null));function v(t,e){return function t(e,n){return u(e)?c(e)?e.map((e=>t(e,n))):Object.entries(e).reduce(((e,[r,o])=>(n.includes(r)||(u(o)&&!f(o)?e[r]=t(o,n):e[r]=o),e)),{}):e}(t,e)}function y(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function b(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function j(t,e="px"){if(s(t))return`${t}${e}`;if(i(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}const O=o((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function w(t,e){if(!u(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function E(e){if(!t())throw new Error(e||"can't use this hook out of setup environment")}function $(t,e=1){const[n,r,o,i,u]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!n)return[255,255,255,e];const c=u&&parseInt(u,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(i,16),+(s(c)?c.toFixed(2):e)]}function _(t){return e({setup(e,{slots:o}){let i=(null==t?void 0:t.parent)&&Reflect.get(t.parent,"provides");const u=[];for(;i;)Object.entries(i).forEach((([t,e])=>{u.includes(t)||(u.push(t),n(t,e))})),i=Object.getPrototypeOf(i);return()=>{var t;return r("div",null,[null==(t=o.default)?void 0:t.call(o)])}}})}const S=o((function(t,e){return!(!i(e)||!i(t))&&e.split(",").some((e=>e.trim().includes(t)))}),{getKey:(...t)=>t.reduce(((t,e)=>String(t)+"_"+String(e)),"")});export{g as DMZ,x as arrayed,E as checkInSetupEnv,_ as createProviderWrapper,v as deepOmit,b as findAncestor,p as generateTimeFormat,h as getStringWidth,$ as hex2rgba,O as jsonParse,S as keywordMatcher,d as safeComponentRegister,y as separateMetaModule,w as shallowOmit,l as traverse,m as uuidGenerator,j as widthAppend};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.51
|
|
3
|
+
"version": "3.1.51",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "9d1013c0eb64ca7569c776fd9c8e41711a7cf1c4"
|
|
67
67
|
}
|