cnhis-design-vue 3.1.51-beta.20 → 3.1.51-beta.21
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/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -1
- package/es/components/slider-tree/index.d.ts +4 -78
- package/es/components/slider-tree/index.js +1 -1
- package/es/components/slider-tree/src/index.vue.d.ts +3 -78
- package/es/components/slider-tree/src/index.vue2.js +1 -1
- package/es/components/slider-tree/src/utils/index.d.ts +13 -1
- package/es/components/slider-tree/src/utils/index.js +1 -1
- package/es/components/slider-tree/src/utils/tool.d.ts +1 -0
- package/es/components/slider-tree/src/utils/tool.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as a,ref as o,watch as l,resolveComponent as n,openBlock as s,createElementBlock as r,unref as i,normalizeStyle as u,createBlock as d,resolveDynamicComponent as c,createElementVNode as f,createVNode as m,mergeProps as v,createSlots as p,renderList as b,withCtx as h,createCommentVNode as g,renderSlot as x,normalizeProps as k,guardReactiveProps as y}from"vue";import{useTheme as D}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as C}from"@vueuse/core";import"date-fns";import{isString as $,isFunction as j,pick as w}from"lodash-es";import{widthAppend as I,uuidGenerator as H}from"../../../shared/utils/index.js";import{promiseTimeout as T}from"@vueuse/shared";import{VxeTableEventNameList as _,InjectionIhoTableEmits as A,InjectionIhoTableAnnotation as L,InjectionIhoTableUUID as R,InjectionIhoTableInstance as E,InjectionIhoTableConfig as F,InjectionIhoTableFieldList as O,InjectionIhoTableHandler as B}from"./constants/index.js";import{createTableHooks as S,applyTableConfigHooks as W,applyTableFieldHooks as q,createTableEventHandlers as z,createDomInsertComponent as G,createDataTransfer as J}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as K}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as M}from"./utils/index.js";const N=["id"];var P=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",..._],setup(e,{expose:_,emit:P}){var Q,U;const V=e,X=D({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),Y=t((()=>{var e,t;const a=null!=(t=null==(e=V.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":$(a)&&(a.includes("calc")||a.endsWith("%"))?a:I(a)}})),Z=K(),ee=function(e,...t){P(e,...t);const a=i(le)[M(e)];j(a)&&a(...t),Z.trigger(e,...t)};a(A,ee);const te=S();a(L,t((()=>V.annotation)));const ae=H();a(R,ae);const oe=o();a(E,oe);const le=o({uuid:null!=(U=null==(Q=V.tableConfig)?void 0:Q.uuid)?U:ae});a(F,le);const ne=C(se,10);function se(){le.value=W(te,V.tableConfig,{$table:oe,emits:ee}),le.value.uuid=ae}const re=o([]);a(O,re);const ie=C(ue,10);function ue(){re.value=q(te,V.fieldList,le.value,{$table:oe,emits:ee})}const de=J(te,le,oe),ce=o([]);async function fe(){var e,t;const a=await de(V.tableData),o=null==(e=oe.value)?void 0:e.getTableData().fullData;if(o){let e=0;if(!(o.some((t=>{var o;if(!(null==(o=oe.value)?void 0:o.isInsertByRow(t)))
|
|
1
|
+
import{defineComponent as e,computed as t,provide as a,ref as o,watch as l,resolveComponent as n,openBlock as s,createElementBlock as r,unref as i,normalizeStyle as u,createBlock as d,resolveDynamicComponent as c,createElementVNode as f,createVNode as m,mergeProps as v,createSlots as p,renderList as b,withCtx as h,createCommentVNode as g,renderSlot as x,normalizeProps as k,guardReactiveProps as y}from"vue";import{useTheme as D}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as C}from"@vueuse/core";import"date-fns";import{isString as $,isFunction as j,pick as w}from"lodash-es";import{widthAppend as I,uuidGenerator as H}from"../../../shared/utils/index.js";import{promiseTimeout as T}from"@vueuse/shared";import{VxeTableEventNameList as _,InjectionIhoTableEmits as A,InjectionIhoTableAnnotation as L,InjectionIhoTableUUID as R,InjectionIhoTableInstance as E,InjectionIhoTableConfig as F,InjectionIhoTableFieldList as O,InjectionIhoTableHandler as B}from"./constants/index.js";import{createTableHooks as S,applyTableConfigHooks as W,applyTableFieldHooks as q,createTableEventHandlers as z,createDomInsertComponent as G,createDataTransfer as J}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as K}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as M}from"./utils/index.js";const N=["id"];var P=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",..._],setup(e,{expose:_,emit:P}){var Q,U;const V=e,X=D({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),Y=t((()=>{var e,t;const a=null!=(t=null==(e=V.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":$(a)&&(a.includes("calc")||a.endsWith("%"))?a:I(a)}})),Z=K(),ee=function(e,...t){P(e,...t);const a=i(le)[M(e)];j(a)&&a(...t),Z.trigger(e,...t)};a(A,ee);const te=S();a(L,t((()=>V.annotation)));const ae=H();a(R,ae);const oe=o();a(E,oe);const le=o({uuid:null!=(U=null==(Q=V.tableConfig)?void 0:Q.uuid)?U:ae});a(F,le);const ne=C(se,10);function se(){le.value=W(te,V.tableConfig,{$table:oe,emits:ee}),le.value.uuid=ae}const re=o([]);a(O,re);const ie=C(ue,10);function ue(){re.value=q(te,V.fieldList,le.value,{$table:oe,emits:ee})}const de=J(te,le,oe),ce=o([]);async function fe(){var e,t;const a=await de(V.tableData),o=null==(e=oe.value)?void 0:e.getTableData().fullData;if(o){let e=0;if(!(o.some((t=>{var o;if(!(null==(o=oe.value)?void 0:o.isInsertByRow(t))){if(t!==a[e])return!0;e++}}))||e!==a.length))return}ce.value=a,null==(t=oe.value)||t.recalculate(!0)}const me={updateTableDataRef:C(fe,10),updateConfigRef:ne,updateFieldListRef:ie};a(B,me);const ve=z({hooks:te,config:le,$table:oe,context:me,emits:ee}),pe=t((()=>({...le.value,...ve})));let be=!1,he=!1,ge=!1;const xe=C((()=>{be&&se(),he&&ue(),ge&&fe(),be=!1,he=!1,ge=!1}),10);l((()=>V.tableConfig),(()=>{be=!0,he=!0,ge=!0,xe()}),{deep:!0}),l((()=>V.fieldList),(()=>{he=!0,ge=!0,xe()}),{deep:!0}),l([()=>[...V.tableData],()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(()=>{ge=!0,xe()})),l([()=>V.tableData,()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=le.value.treeConfig)?void 0:e.expandAll)&&(await T(11),null==(t=oe.value)||t.setAllTreeExpand(!0))})),se(),ue(),fe();const{header:ke,footer:ye}=G(te);function De(e){return w(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return _({$table:oe,async loadData(e){var t;null==(t=oe.value)||t.loadData(await de(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=oe.value)||e.loadColumn([]),null==(t=oe.value)||t.loadData([]),se(),ue(),fe()},...te.exposeHooks.expose.call({},le,{$table:oe,emits:ee})}),te.setupHooks.setup.call(le,re,{$table:oe,emits:ee}),(e,t)=>{const a=n("vxe-grid");return s(),r("section",{class:"iho-table",id:i(ae),style:u(i(X))},[(s(),d(c(i(ke)))),f("section",{style:u(i(Y))},[m(a,v({ref_key:"$table",ref:oe},i(pe),{columns:re.value,data:ce.value}),p({_:2},[b(e.$slots,((t,a)=>({name:a,fn:h((t=>[g(" 实际上所有的vxe-grid插槽都支持 "),x(e.$slots,a,k(y(De(t))))]))})))]),1040,["columns","data"])],4),(s(),d(c(i(ye))))],12,N)}}});export{P as default};
|
package/es/components/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export * from '../../es/shared/directive';
|
|
|
50
50
|
export * from './guide';
|
|
51
51
|
export * from './select-label';
|
|
52
52
|
export * from './card-reader-sdk';
|
|
53
|
+
export * from './slider-tree';
|
|
53
54
|
declare function install(app: App): void;
|
|
54
55
|
export { CGrid, CBigTable, CFieldSet, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, CScaleView, CMap, CVodChunkUpload, CRadio, CCheckbox, CSelect, CDatetime, CInfoHeader, CTimeLine, CBaseSearch, CQuickSearch, CClassification, CBpmnWorkflow, CStepsWheel, CEditor, CFormRender, CFabricChart, CShortcutProvider, CShortcutSetter, CFormConfig, CIhoTable, CKeyboard, CSearchCascader, CRecommendSearch, CDatePicker, CTimePicker, CConfigProvider, CPictureClipper, CTableExportField, CExpandField, CMultiChat, CCallback, CSliderTree };
|
|
55
56
|
declare const _default: {
|
package/es/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import d from"./map/index.js";export{default as CMap}from"./map/index.js";import n from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as m,CRadio as f,CCheckbox as l,CSelect as p,CDatetime as c}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import u from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import x from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import C from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import j from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import h from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import b from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import k from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import g from"./editor/index.js";export{default as CEditor}from"./editor/index.js";import S from"./form-render/index.js";export{default as CFormRender}from"./form-render/index.js";import F from"./fabric-chart/index.js";export{default as CFabricChart}from"./fabric-chart/index.js";import P from"./shortcut-provider/index.js";export{default as CShortcutProvider}from"./shortcut-provider/index.js";import v from"./shortcut-setter/index.js";export{default as CShortcutSetter}from"./shortcut-setter/index.js";import y from"./form-config/index.js";export{default as CFormConfig}from"./form-config/index.js";import
|
|
1
|
+
import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import d from"./map/index.js";export{default as CMap}from"./map/index.js";import n from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as m,CRadio as f,CCheckbox as l,CSelect as p,CDatetime as c}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import u from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import x from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import C from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import j from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import h from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import b from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import k from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import g from"./editor/index.js";export{default as CEditor}from"./editor/index.js";import S from"./form-render/index.js";export{default as CFormRender}from"./form-render/index.js";import F from"./fabric-chart/index.js";export{default as CFabricChart}from"./fabric-chart/index.js";import P from"./shortcut-provider/index.js";export{default as CShortcutProvider}from"./shortcut-provider/index.js";import v from"./shortcut-setter/index.js";export{default as CShortcutSetter}from"./shortcut-setter/index.js";import y from"./form-config/index.js";export{default as CFormConfig}from"./form-config/index.js";import T from"./iho-table/index.js";export{default as CIhoTable,useIhoTablePresetPlugins}from"./iho-table/index.js";import B from"./keyboard/index.js";export{default as CKeyboard}from"./keyboard/index.js";import D from"./search-cascader/index.js";export{default as CSearchCascader}from"./search-cascader/index.js";import A from"./recommend-search/index.js";export{default as CRecommendSearch}from"./recommend-search/index.js";import I from"./date-picker/index.js";export{default as CDatePicker}from"./date-picker/index.js";import R from"./time-picker/index.js";export{default as CTimePicker}from"./time-picker/index.js";import L from"./config-provider/index.js";export{default as CConfigProvider}from"./config-provider/index.js";import w from"./picture-clipper/index.js";export{default as CPictureClipper}from"./picture-clipper/index.js";import E from"./table-export-field/index.js";export{default as CTableExportField}from"./table-export-field/index.js";import K from"./expand-field/index.js";export{default as CExpandField}from"./expand-field/index.js";import V from"./multi-chat/index.js";export{default as CMultiChat}from"./multi-chat/index.js";import H from"./callback/index.js";export{default as CCallback}from"./callback/index.js";import M from"./slider-tree/index.js";export{default as CSliderTree}from"./slider-tree/index.js";export{default as CInsuranceSDK}from"./card-reader-sdk/src/insuranceSDK.js";export{default as CCardReaderSDK}from"./card-reader-sdk/src/cardReaderSDK.js";export{vFlexibleResize}from"../shared/directive/flexibleResize.js";export{useGuide}from"./guide/src/useGuide.js";export{useFieldListAdaptor}from"./form-render/src/hooks/useFieldListAdaptor.js";export{useFormRequest}from"./form-render/src/hooks/useFormRequest.js";export{useCommonLog}from"./form-render/src/hooks/useCommonLog.js";export{useFormField}from"./form-render/src/hooks/useFormField.js";export{useFormAsyncQueue}from"./form-render/src/hooks/useFormAsyncQueue.js";export{useFieldVisitor}from"./form-render/src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./form-render/src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./form-render/src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./form-render/src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./form-render/src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./form-render/src/hooks/useFormItemDeps.js";export{useAnchor}from"./form-render/src/hooks/useAnchor.js";export{useFormContext}from"./form-render/src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./form-render/src/hooks/useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./form-render/src/hooks/useFormRenderOptions.js";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./form-render/src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./form-render/src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./form-render/src/utils/schema.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,mergeDeepProperties,parseNumberFromMaybeString,presetRequestHandler,renderDescOption,splitExtendKey,validateMessageParser}from"./form-render/src/utils/index.js";export*from"@formily/core";export{GlobalShortcutProvider,ShortcutManager,useShortcuts}from"./shortcut-provider/src/hooks/useShortcuts.js";export{useShortcutSignature}from"./shortcut-provider/src/hooks/useShortcutSignature.js";export{defineTablePlugin,useTablePlugin}from"./iho-table/src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./iho-table/src/hooks/useColumnConfigAdaptor.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./iho-table/src/types/pluginType.js";export{Print}from"./button-print/src/utils/print.js";export{getFileUrl,isIReport,useBrowserPrint}from"./button-print/src/utils/browserPrint.js";export{transformOriginToTree}from"./slider-tree/src/utils/index.js";const O={CGrid:e,CBigTable:r,CFieldSet:o,CButtonPrint:t,CSelectPerson:s,CSelectLabel:i,CLabelFormContent:a,CScaleView:m,CMap:d,CVodChunkUpload:n,CRadio:f,CCheckbox:l,CSelect:p,CDatetime:c,CInfoHeader:u,CTimeLine:x,CBaseSearch:C,CQuickSearch:j,CClassification:h,CBpmnWorkflow:b,CStepsWheel:k,CEditor:g,CFormRender:S,CFabricChart:F,CShortcutProvider:P,CShortcutSetter:v,CFormConfig:y,CIhoTable:T,CKeyboard:B,CSearchCascader:D,CRecommendSearch:A,CDatePicker:I,CTimePicker:R,CConfigProvider:L,CPictureClipper:w,CTableExportField:E,CExpandField:K,CMultiChat:V,CCallback:H,CSliderTree:M};var q={install:function(e){Object.values(O).forEach((r=>{r.install(e)}))},...O};export{q as default};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../../../es/shared/types';
|
|
2
|
+
export * from './src/utils';
|
|
2
3
|
declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
3
4
|
sliderInitialWidth: {
|
|
4
5
|
type: NumberConstructor;
|
|
@@ -8,32 +9,11 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8
9
|
type: ObjectConstructor;
|
|
9
10
|
default: () => {};
|
|
10
11
|
};
|
|
11
|
-
treeRenderConfig: {
|
|
12
|
-
type: ObjectConstructor;
|
|
13
|
-
default: () => {
|
|
14
|
-
replaceFields: {
|
|
15
|
-
children: string;
|
|
16
|
-
title: string;
|
|
17
|
-
key: string;
|
|
18
|
-
};
|
|
19
|
-
title: string;
|
|
20
|
-
key: string;
|
|
21
|
-
parentId: string;
|
|
22
|
-
uniqId: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
isDraggable: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
|
-
treePrefix: {
|
|
30
|
-
type: FunctionConstructor;
|
|
31
|
-
};
|
|
32
|
-
treeSuffix: {
|
|
33
|
-
type: FunctionConstructor;
|
|
34
|
-
};
|
|
35
12
|
}, {
|
|
36
13
|
$message: import("naive-ui").MessageApi;
|
|
14
|
+
$attr: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
};
|
|
37
17
|
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
38
18
|
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
39
19
|
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
@@ -48,30 +28,6 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
48
28
|
type: ObjectConstructor;
|
|
49
29
|
default: () => {};
|
|
50
30
|
};
|
|
51
|
-
treeRenderConfig: {
|
|
52
|
-
type: ObjectConstructor;
|
|
53
|
-
default: () => {
|
|
54
|
-
replaceFields: {
|
|
55
|
-
children: string;
|
|
56
|
-
title: string;
|
|
57
|
-
key: string;
|
|
58
|
-
};
|
|
59
|
-
title: string;
|
|
60
|
-
key: string;
|
|
61
|
-
parentId: string;
|
|
62
|
-
uniqId: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
isDraggable: {
|
|
66
|
-
type: BooleanConstructor;
|
|
67
|
-
default: boolean;
|
|
68
|
-
};
|
|
69
|
-
treePrefix: {
|
|
70
|
-
type: FunctionConstructor;
|
|
71
|
-
};
|
|
72
|
-
treeSuffix: {
|
|
73
|
-
type: FunctionConstructor;
|
|
74
|
-
};
|
|
75
31
|
}>> & {
|
|
76
32
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
77
33
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
@@ -83,11 +39,8 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
83
39
|
expandedKeys: import("vue").Ref<string[]>;
|
|
84
40
|
selectedKeys: import("vue").Ref<string[]>;
|
|
85
41
|
selectNode: import("vue").Ref<{}>;
|
|
86
|
-
loadedKeys: import("vue").Ref<never[]>;
|
|
87
42
|
dragData: import("vue").Ref<{}>;
|
|
88
43
|
handleRenderLabel: ({ option }: any) => any;
|
|
89
|
-
handleRenderPrefix: ({ option }: any) => any;
|
|
90
|
-
handleRenderSuffix: ({ option }: any) => any;
|
|
91
44
|
init: () => Promise<void>;
|
|
92
45
|
onExpand: (expandedKeyVals: string[]) => void;
|
|
93
46
|
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
@@ -95,7 +48,6 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
95
48
|
reset: (flag: boolean, selectOrgId?: string | undefined) => Promise<void>;
|
|
96
49
|
onDrop: (info: any) => Promise<void>;
|
|
97
50
|
getDeptData: (orgId: string) => Promise<any>;
|
|
98
|
-
handleDeptData: (data: any) => any;
|
|
99
51
|
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
100
52
|
onLoadData: (treeNode: any) => any;
|
|
101
53
|
getExpandKeys: (data: any) => never[];
|
|
@@ -117,37 +69,11 @@ declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
117
69
|
type: ObjectConstructor;
|
|
118
70
|
default: () => {};
|
|
119
71
|
};
|
|
120
|
-
treeRenderConfig: {
|
|
121
|
-
type: ObjectConstructor;
|
|
122
|
-
default: () => {
|
|
123
|
-
replaceFields: {
|
|
124
|
-
children: string;
|
|
125
|
-
title: string;
|
|
126
|
-
key: string;
|
|
127
|
-
};
|
|
128
|
-
title: string;
|
|
129
|
-
key: string;
|
|
130
|
-
parentId: string;
|
|
131
|
-
uniqId: string;
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
isDraggable: {
|
|
135
|
-
type: BooleanConstructor;
|
|
136
|
-
default: boolean;
|
|
137
|
-
};
|
|
138
|
-
treePrefix: {
|
|
139
|
-
type: FunctionConstructor;
|
|
140
|
-
};
|
|
141
|
-
treeSuffix: {
|
|
142
|
-
type: FunctionConstructor;
|
|
143
|
-
};
|
|
144
72
|
}>> & {
|
|
145
73
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
146
74
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
147
75
|
}, {
|
|
148
76
|
sliderInitialWidth: number;
|
|
149
77
|
treeSearchApiConfig: Record<string, any>;
|
|
150
|
-
treeRenderConfig: Record<string, any>;
|
|
151
|
-
isDraggable: boolean;
|
|
152
78
|
}>>;
|
|
153
79
|
export default CSliderTree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COMPONENT_NAMESPACE as r}from"../../shared/global/variable.js";import{safeComponentRegister as e}from"../../shared/utils/index.js";import i from"./src/index.vue.js";const o=i;o.install=function(i){e(i,o,r+"SliderTree")};export{o as default};
|
|
1
|
+
import{COMPONENT_NAMESPACE as r}from"../../shared/global/variable.js";import{safeComponentRegister as e}from"../../shared/utils/index.js";import i from"./src/index.vue.js";export{transformOriginToTree}from"./src/utils/index.js";const o=i;o.install=function(i){e(i,o,r+"SliderTree")};export{o as default};
|
|
@@ -7,32 +7,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: ObjectConstructor;
|
|
8
8
|
default: () => {};
|
|
9
9
|
};
|
|
10
|
-
treeRenderConfig: {
|
|
11
|
-
type: ObjectConstructor;
|
|
12
|
-
default: () => {
|
|
13
|
-
replaceFields: {
|
|
14
|
-
children: string;
|
|
15
|
-
title: string;
|
|
16
|
-
key: string;
|
|
17
|
-
};
|
|
18
|
-
title: string;
|
|
19
|
-
key: string;
|
|
20
|
-
parentId: string;
|
|
21
|
-
uniqId: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
isDraggable: {
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
default: boolean;
|
|
27
|
-
};
|
|
28
|
-
treePrefix: {
|
|
29
|
-
type: FunctionConstructor;
|
|
30
|
-
};
|
|
31
|
-
treeSuffix: {
|
|
32
|
-
type: FunctionConstructor;
|
|
33
|
-
};
|
|
34
10
|
}, {
|
|
35
11
|
$message: import("naive-ui").MessageApi;
|
|
12
|
+
$attr: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
};
|
|
36
15
|
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
37
16
|
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
38
17
|
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
@@ -47,30 +26,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
26
|
type: ObjectConstructor;
|
|
48
27
|
default: () => {};
|
|
49
28
|
};
|
|
50
|
-
treeRenderConfig: {
|
|
51
|
-
type: ObjectConstructor;
|
|
52
|
-
default: () => {
|
|
53
|
-
replaceFields: {
|
|
54
|
-
children: string;
|
|
55
|
-
title: string;
|
|
56
|
-
key: string;
|
|
57
|
-
};
|
|
58
|
-
title: string;
|
|
59
|
-
key: string;
|
|
60
|
-
parentId: string;
|
|
61
|
-
uniqId: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
isDraggable: {
|
|
65
|
-
type: BooleanConstructor;
|
|
66
|
-
default: boolean;
|
|
67
|
-
};
|
|
68
|
-
treePrefix: {
|
|
69
|
-
type: FunctionConstructor;
|
|
70
|
-
};
|
|
71
|
-
treeSuffix: {
|
|
72
|
-
type: FunctionConstructor;
|
|
73
|
-
};
|
|
74
29
|
}>> & {
|
|
75
30
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
76
31
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
@@ -82,11 +37,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
37
|
expandedKeys: import("vue").Ref<string[]>;
|
|
83
38
|
selectedKeys: import("vue").Ref<string[]>;
|
|
84
39
|
selectNode: import("vue").Ref<{}>;
|
|
85
|
-
loadedKeys: import("vue").Ref<never[]>;
|
|
86
40
|
dragData: import("vue").Ref<{}>;
|
|
87
41
|
handleRenderLabel: ({ option }: any) => any;
|
|
88
|
-
handleRenderPrefix: ({ option }: any) => any;
|
|
89
|
-
handleRenderSuffix: ({ option }: any) => any;
|
|
90
42
|
init: () => Promise<void>;
|
|
91
43
|
onExpand: (expandedKeyVals: string[]) => void;
|
|
92
44
|
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
@@ -94,7 +46,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
94
46
|
reset: (flag: boolean, selectOrgId?: string) => Promise<void>;
|
|
95
47
|
onDrop: (info: any) => Promise<void>;
|
|
96
48
|
getDeptData: (orgId: string) => Promise<any>;
|
|
97
|
-
handleDeptData: (data: any) => any;
|
|
98
49
|
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
99
50
|
onLoadData: (treeNode: any) => any;
|
|
100
51
|
getExpandKeys: (data: any) => never[];
|
|
@@ -116,37 +67,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
116
67
|
type: ObjectConstructor;
|
|
117
68
|
default: () => {};
|
|
118
69
|
};
|
|
119
|
-
treeRenderConfig: {
|
|
120
|
-
type: ObjectConstructor;
|
|
121
|
-
default: () => {
|
|
122
|
-
replaceFields: {
|
|
123
|
-
children: string;
|
|
124
|
-
title: string;
|
|
125
|
-
key: string;
|
|
126
|
-
};
|
|
127
|
-
title: string;
|
|
128
|
-
key: string;
|
|
129
|
-
parentId: string;
|
|
130
|
-
uniqId: string;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
isDraggable: {
|
|
134
|
-
type: BooleanConstructor;
|
|
135
|
-
default: boolean;
|
|
136
|
-
};
|
|
137
|
-
treePrefix: {
|
|
138
|
-
type: FunctionConstructor;
|
|
139
|
-
};
|
|
140
|
-
treeSuffix: {
|
|
141
|
-
type: FunctionConstructor;
|
|
142
|
-
};
|
|
143
70
|
}>> & {
|
|
144
71
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
145
72
|
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
146
73
|
}, {
|
|
147
74
|
sliderInitialWidth: number;
|
|
148
75
|
treeSearchApiConfig: Record<string, any>;
|
|
149
|
-
treeRenderConfig: Record<string, any>;
|
|
150
|
-
isDraggable: boolean;
|
|
151
76
|
}>;
|
|
152
77
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,onMounted as r,withDirectives as n,openBlock as o,createElementBlock as s,normalizeStyle as l,createElementVNode as i,createVNode as u,unref as c,createCommentVNode as d,renderSlot as v,createBlock as f,mergeProps as p,h as m}from"vue";import{useMessage as g,NInput as h,NTree as y,NEmpty as b}from"naive-ui";import{vFlexibleResize as w}from"../../../shared/directive/flexibleResize.js";import x from"./hooks/useAsyncData.js";import{traversalData as I}from"./utils/tool.js";const O={class:"search-groups"},C={class:"tree-wrap"},k={key:1,class:"empty-container"},S={class:"table-footer-wrap"};var L=e({__name:"index",props:{sliderInitialWidth:{type:Number,default:300},treeSearchApiConfig:{type:Object,default:()=>({})}},emits:["select","saveWidth"],setup(e,{emit:L}){const A=e,N=g(),D=t();console.log("$attr>>>>>",D);const{getChildrenByOrgPartenId:$,searchEmpTreeData:j,updateDeptSort:K,getDeptList:W}=x(),M=(e,t)=>{var a,r;t=null==t?void 0:t.toLowerCase();let{label:n="",abbrp:o="",abbrw:s="",key:l,filterSearch:i=[]}=e;const u=(null==(a=null==n?void 0:n.toLowerCase())?void 0:a.indexOf(t))>-1,c=(null==(r=null==l?void 0:l.toLowerCase())?void 0:r.indexOf(t))>-1,d=i.some((e=>e.toLowerCase().indexOf(t)>-1));return!!(u||c||d)},R=a(A.sliderInitialWidth),U=a(""),E=a([]),J=a([]),P=a([]),T=a({}),_=a({});function z({option:e}){const t=e.label;if(t.includes(U.value.trim())){const e=t.substr(0,t.indexOf(U.value.trim())),a=t.substr(t.indexOf(U.value.trim())+U.value.trim().length);return m("div",[m("span",{style:{marginRight:e?"2px":"0px"}},e),m("span",{style:{color:"#2563F4"}},U.value.trim()),m("span",{style:{marginLeft:a?"2px":"0px"}},a)])}return t}function B(e){J.value=e}function F(e=[],[t]){P.value=e,L("select",t),T.value=t}async function V(){const e=U.value.trim();if(e){const{data:t,success:a}=await j({search:e},A.treeSearchApiConfig);a&&(E.value=t,J.value=function(e){const t=[];for(const a of I(e,"children")){let e=!1;for(const t of I(a.children,"children"))M(t,U.value)&&(e=!0);e&&t.push(a.key)}return t}(t))}else q(!1)}async function q(e,t){await Q();let a=E.value[0].orgId;e&&(a=t);const r=await H(a);if(r){const e=E.value.map((e=>e.orgId===a?r:e));E.value=e}}async function G(e){const{dragNode:t,node:a}=e;if(t.isOrg)return void N.error("机构不能拖动排序");if(t.orgId!==a.orgId)return void N.error("不能跨机构移动科室");if(t.parentId!==a.parentId)return void N.error("仅允许同层级科室排序");_.value=t;const r={curNode:t,moveToNode:a,orgId:t.orgId},{success:n}=await K(r,A.treeSearchApiConfig);n&&(N.success("排序成功"),q(!0,t.orgId))}async function H(e){const{data:t,success:a}=await W({orgId:e},A.treeSearchApiConfig);if(a){const a=E.value.find((t=>t.orgId===e));return a.children=t,a}}async function Q(){const{success:e,data:t}=await $(null,A.treeSearchApiConfig);e&&(E.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(){L("saveWidth",R.value)}return r((()=>{!async function(){await Q(),E.value.length>0&&(J.value=[E.value[0].key],P.value=[E.value[0].key],T.value=E.value[0],L("select",JSON.parse(JSON.stringify(E.value[0]))))}()})),(e,t)=>n((o(),s("div",{class:"left-tree-wrap",ref:"left",style:l({width:R.value+"px"})},[i("div",O,[u(c(h),{clearable:"",placeholder:"搜索关键字",value:U.value,"onUpdate:value":[t[0]||(t[0]=e=>U.value=e),V]},null,8,["value"]),d(" 按钮插槽 "),v(e.$slots,"buttons")]),d(" 标签tab插槽 "),v(e.$slots,"tabs"),i("div",C,[E.value.length>0?(o(),f(c(y),p({key:0},e.$attrs,{"virtual-scroll":"",selectable:!0,data:E.value,"expanded-keys":J.value,selectedKeys:P.value,"render-label":z,"onUpdate:expandedKeys":B,"onUpdate:selectedKeys":F,onLoad:X,onDrop:G}),null,16,["data","expanded-keys","selectedKeys"])):(o(),s("div",k,[u(c(b),{description:"暂无数据"})]))]),i("div",S,[d(" 导出数据插槽 "),v(e.$slots,"output")])],4)),[[c(w),{mode:"VR",onMove:Y,onEnd:Z}]])}});export{L as default};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param data
|
|
4
|
+
* @param param
|
|
5
|
+
* {
|
|
6
|
+
* children: 'childrenList',
|
|
7
|
+
* orgId: 'orgId',
|
|
8
|
+
* key: 'bck02',
|
|
9
|
+
label: 'bck03'
|
|
10
|
+
* }
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function transformOriginToTree(data: any, children: string, callback?: any): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
import{traversalData as o}from"./tool.js";function r(r,t,f){for(const n of o(r,t))f&&f(n);return r}export{r as transformOriginToTree};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function traversalData(data: any[], children?: string): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function*r(e,i="children"){if(e&&Array.isArray(e))for(let l=0;l<e.length;l++)yield e[l],e[l][i]&&(yield*r(e[l][i],i))}export{r as traversalData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.51-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.51-beta.21",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@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"},d={name:e,version:"3.1.51-beta.21",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.51-beta.
|
|
3
|
+
"version": "3.1.51-beta.21",
|
|
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": "daaf9d708f220135fe071f6f28ea2bb18ef5b121"
|
|
67
67
|
}
|