cnhis-design-vue 3.1.42-beta.71 → 3.1.42-beta.72

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.
Files changed (34) hide show
  1. package/es/components/fabric-chart/index.d.ts +2 -2
  2. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  3. package/es/components/form-config/index.d.ts +10 -10
  4. package/es/components/form-config/src/FormConfig.vue.d.ts +10 -10
  5. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +5 -5
  6. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +5 -5
  7. package/es/components/form-render/index.d.ts +5 -5
  8. package/es/components/form-render/src/FormRender.vue.d.ts +5 -5
  9. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +5 -5
  10. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  11. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  12. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -1
  13. package/es/components/iho-table/src/types/index.d.ts +1 -0
  14. package/es/components/info-header/index.d.ts +13 -13
  15. package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -13
  16. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -3
  17. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -3
  18. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  19. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  20. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +8 -8
  21. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +5 -5
  22. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
  23. package/es/components/select-label/index.d.ts +1 -1
  24. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  25. package/es/components/select-person/index.d.ts +141 -0
  26. package/es/components/select-person/src/SearchMultiple.vue.d.ts +14 -8
  27. package/es/components/select-person/src/SearchMultiple.vue.js +1 -0
  28. package/es/components/select-person/src/SearchMultiple.vue2.js +1 -0
  29. package/es/components/select-person/src/SelectPerson.vue.d.ts +143 -2
  30. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  31. package/es/components/shortcut-setter/index.d.ts +5 -5
  32. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +5 -5
  33. package/es/shared/package.json.js +1 -1
  34. package/package.json +65 -65
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import { ref, PropType } from 'vue';
2
2
  import { type TreeOption } from 'naive-ui';
3
3
  import { AnyObject } from '../../../../es/shared/types';
4
4
  declare type IKey = string | number;
@@ -178,7 +178,7 @@ declare const _default: import("vue").DefineComponent<{
178
178
  setCheckedAll: () => void;
179
179
  clearAll: () => void;
180
180
  closeTag: (tag: ITag) => void;
181
- notifyCheck: (keys: Array<IKey>) => void;
181
+ notifyCheck: (keys: IKey[]) => void;
182
182
  NButton: any;
183
183
  NInput: any;
184
184
  NInputGroup: import("vue").DefineComponent<{
@@ -248,6 +248,147 @@ declare const _default: import("vue").DefineComponent<{
248
248
  readonly privateShow: boolean;
249
249
  }>;
250
250
  CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
251
+ SearchMultiple: import("vue").DefineComponent<{
252
+ treeData: {
253
+ type: PropType<any[]>;
254
+ default: () => never[];
255
+ };
256
+ checkedKeys: {
257
+ type: PropType<(string | number)[]>;
258
+ default: () => never[];
259
+ };
260
+ }, {
261
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
262
+ treeData: {
263
+ type: PropType<any[]>;
264
+ default: () => never[];
265
+ };
266
+ checkedKeys: {
267
+ type: PropType<(string | number)[]>;
268
+ default: () => never[];
269
+ };
270
+ }>> & {
271
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
272
+ }>>;
273
+ emit: (event: "notifyCheck", ...args: any[]) => void;
274
+ optionsRef: import("vue").ComputedRef<any[]>;
275
+ list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
276
+ containerProps: {
277
+ ref: import("vue").Ref<any>;
278
+ onScroll: () => void;
279
+ style: Partial<CSSStyleDeclaration>;
280
+ };
281
+ wrapperProps: import("vue").ComputedRef<{
282
+ style: {
283
+ width: string;
284
+ height: string;
285
+ marginTop: string;
286
+ };
287
+ }>;
288
+ containerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
289
+ searchCheckKeys: import("vue").Ref<(string | number)[]>;
290
+ showSelectKeys: import("vue").Ref<(string | number)[]>;
291
+ checkedChange: (checkList: (string | number)[], meta: {
292
+ actionType: "check" | "uncheck";
293
+ value: string | number;
294
+ }) => void;
295
+ handleCheckKey: (baseKeys: (string | number)[], currentTree: {
296
+ [key: string]: any;
297
+ key: string | number;
298
+ children: any[];
299
+ parentNode: any;
300
+ } | null, value: string | number) => false | undefined;
301
+ findParent: (baseKeys: (string | number)[], currentTree: {
302
+ [key: string]: any;
303
+ key: string | number;
304
+ children: any[];
305
+ parentNode: any;
306
+ }) => false | undefined;
307
+ handleUnCheckKey: (baseKeys: (string | number)[], currentTree: {
308
+ [key: string]: any;
309
+ key: string | number;
310
+ children: any[];
311
+ parentNode: any;
312
+ }, value: string | number) => false | undefined;
313
+ findChild: (baseKeys: (string | number)[], children: {
314
+ [key: string]: any;
315
+ key: string | number;
316
+ children: any[];
317
+ parentNode: any;
318
+ }[], value: string | number) => false | undefined;
319
+ checkInitTree: (tree: {
320
+ [key: string]: any;
321
+ key: string | number;
322
+ children: any[];
323
+ parentNode: any;
324
+ }, baseKey: string | number) => false | undefined;
325
+ ref: typeof ref;
326
+ NCheckboxGroup: import("vue").DefineComponent<{
327
+ readonly min: NumberConstructor;
328
+ readonly max: NumberConstructor;
329
+ readonly size: PropType<"small" | "medium" | "large">;
330
+ readonly value: PropType<(string | number)[] | null>;
331
+ readonly defaultValue: {
332
+ readonly type: PropType<(string | number)[] | null>;
333
+ readonly default: null;
334
+ };
335
+ readonly disabled: {
336
+ readonly type: PropType<boolean | undefined>;
337
+ readonly default: undefined;
338
+ };
339
+ readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
340
+ actionType: "check" | "uncheck";
341
+ value: string | number;
342
+ }) => void>>;
343
+ readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
344
+ actionType: "check" | "uncheck";
345
+ value: string | number;
346
+ }) => void>>;
347
+ readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
348
+ }, {
349
+ mergedClsPrefix: import("vue").ComputedRef<string>;
350
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
351
+ readonly min: NumberConstructor;
352
+ readonly max: NumberConstructor;
353
+ readonly size: PropType<"small" | "medium" | "large">;
354
+ readonly value: PropType<(string | number)[] | null>;
355
+ readonly defaultValue: {
356
+ readonly type: PropType<(string | number)[] | null>;
357
+ readonly default: null;
358
+ };
359
+ readonly disabled: {
360
+ readonly type: PropType<boolean | undefined>;
361
+ readonly default: undefined;
362
+ };
363
+ readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
364
+ actionType: "check" | "uncheck";
365
+ value: string | number;
366
+ }) => void>>;
367
+ readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
368
+ actionType: "check" | "uncheck";
369
+ value: string | number;
370
+ }) => void>>;
371
+ readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
372
+ }>>, {
373
+ readonly disabled: boolean | undefined;
374
+ readonly defaultValue: (string | number)[] | null;
375
+ }>;
376
+ NCheckbox: any;
377
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "notifyCheck"[], "notifyCheck", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
378
+ treeData: {
379
+ type: PropType<any[]>;
380
+ default: () => never[];
381
+ };
382
+ checkedKeys: {
383
+ type: PropType<(string | number)[]>;
384
+ default: () => never[];
385
+ };
386
+ }>> & {
387
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
388
+ }, {
389
+ treeData: any[];
390
+ checkedKeys: (string | number)[];
391
+ }>;
251
392
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
252
393
  defaultList: {
253
394
  type: PropType<(IKey | ITag)[]>;
@@ -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,withKeys as o,createTextVNode as d,toDisplayString as s,withDirectives as h,vShow as v,createCommentVNode as p,mergeProps as f,createElementBlock as y,createElementVNode as k,Fragment as m,renderList as g}from"vue";import{NGrid as b,NGi as _,NSpace as w,NInputGroup as C,NInput as x,NButton as S,NCheckbox as L,NTree as T,NIcon as j,NTooltip as N}from"naive-ui";import{CloseCircleSharp as $}from"@vicons/ionicons5";import{filterTree as I,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as q}from"lodash-es";const B={key:0},K={class:"c-select-person__scroll",style:{height:"342px"}};var P=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},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{emit:P}){const U=e,E=l(""),O=l(!1),A=l([]),F=l([]),R=l([]),W=l([]),M=l([]),z=l(!1),G=q(((H=U.data).forEach((e=>{var l;if(null==(l=e.children)?void 0:l.length){const l=te(e.children,[]);e.innerItemsNum=l.length}})),ne(H,"")));var H;let J=[];const Q=t((()=>!!U.queryLoadChildData));function V(e){e.disabled||e.children||!e.key||J.push(e.key)}function X(e){e.disabled||e.tempTitle||!e.key||J.push(e.key)}async function Y(e){if(U.queryLoadChildData){const l=await U.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 Z(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ee({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||Q.value&&!(null==e?void 0:e.isLeaf)){const l=U.wordbook.user_count_obj&&e[U.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}return c(N,{trigger:"hover"},{default:()=>c("span",null,[e.title]),trigger:()=>c("span",null,[e.title])})}function le(e){return e[U.wordbookChild.user_name_obj]||e[U.wordbook.parent_name_obj]||e.orgName||e.title||""}function te(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?te(e.children,l):l.push(e)})),l}function ne(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=le(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?ne(null==e?void 0:e.children,a):[]}})):[]}async function ae(){z.value=!!E.value.trim(),Q.value?R.value=await U.queryTreeSearch(E.value):R.value=I(G,E.value),F.value=R.value.length&&E.value?D(R.value):[]}function ue(){setTimeout((()=>{ae()}))}function ie(e,l){var t,n;switch(null!=(n=null==(t=null==U?void 0:U.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&&!A.value.includes(n.key)&&A.value.push(n.key),!l)){const e=A.value.findIndex((e=>e===n.key));A.value.splice(e,1)}n.children&&ie(n.children,l)}}(e,l);break;case"parent":!function(e,l){A.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!A.value.includes(n.key)&&A.value.push(n.key),!l)){const e=A.value.findIndex((e=>e===n.key));A.value.splice(e,1)}}}(e,l)}}function re(e){ie(R.value,e)}function ce(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=M.value.map((e=>e.key));A.value.includes(n.key)&&!a.includes(n.key)&&W.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum}),(null==(l=n.children)?void 0:l.length)&&ce(n.children)}}function oe(e){A.value=e}function de(){A.value=[]}return t((()=>{var e,l;return null!=(l=null==(e=null==U?void 0:U.treeSetting)?void 0:e.checkStrategy)?l:"child"})),function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];switch(c.title=le(c),c.parentNode=t,c.key||(c.key=c[U.wordbookChild.user_id_obj]||c[U.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),Z(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==U?void 0:U.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":V(c);break;case"parent":X(c)}}}(G,null),R.value=G,U.defaultList.length>0&&(Q.value?(U.defaultList.forEach((e=>A.value.push(e.key))),W.value=q(U.defaultList),M.value=q(U.defaultList)):(U.defaultList.forEach((e=>A.value.push(e))),ce(G))),n((()=>A),(e=>{W.value=M.value.filter((l=>e.value.includes(l.key))),e.value.length&&ce(Q.value?R.value:G),O.value=J.every((e=>W.value.findIndex((l=>l.key===e))>-1));const l=W.value.filter((l=>e.value.includes(l.key)));P("check",e.value),P("checkWithLevel",l)}),{deep:!0}),(l,t)=>(a(),u(i(b),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(_),null,{default:r((()=>[c(i(w),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(C),{style:{"margin-bottom":"12px"}},{default:r((()=>[c(i(x),{clearable:"",value:E.value,"onUpdate:value":t[0]||(t[0]=e=>E.value=e),placeholder:e.searchPlaceholder,onClear:ue,onKeyup:o(ae,["enter"])},null,8,["value","placeholder","onKeyup"]),c(i(S),{type:"primary",onClick:ae},{default:r((()=>[d(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!z.value?h((a(),u(i(L),{key:0,checked:O.value,"onUpdate:checked":[t[1]||(t[1]=e=>O.value=e),re]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[v,i(J).length<1e3]]):p("v-if",!0),p(' <SearchMultiple\r\n\t\t\t\t\tv-if="multiple && isSearch && checkStrategyResult === \'parent\'"\r\n\t\t\t\t\t:treeData="treeData"\r\n\t\t\t\t\t:checkedKeys="checkedKeys"\r\n\t\t\t\t\t@notifyCheck="notifyCheck"\r\n\t\t\t\t/> v-else '),c(i(T),f({"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":A.value,"expanded-keys":F.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>F.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":A.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>A.value=e),data:R.value,"check-strategy":"child","render-label":ee},e.treeSetting,{"onUpdate:checkedKeys":oe,onLoad:Y}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"])])),_:1})])),_:1}),c(i(_),null,{default:r((()=>[c(i(w),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(w),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),y("span",B,"已选择:"+s(W.value.length),1)):p("v-if",!0),e.showClear?(a(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:de},"清空")):p("v-if",!0)])),_:1}),k("div",K,[(a(!0),y(m,null,g(W.value,(e=>(a(),y("span",{class:"c-select-person__tag-item",key:e.key},[d(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:e.innerItemsNum?`(${e.innerItemsNum})`:"")+" ",1),c(i(j),{class:"tag-close",component:i($),onClick:l=>function(e){A.value=A.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{P as default};
1
+ import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as u,unref as i,withCtx as o,createVNode as r,withKeys as c,createTextVNode as d,toDisplayString as s,withDirectives as v,vShow as h,createCommentVNode as p,mergeProps as f,createElementBlock as y,createElementVNode as k,Fragment as m,renderList as g}from"vue";import{NGrid as b,NGi as _,NSpace as w,NInputGroup as C,NInput as x,NButton as L,NCheckbox as S,NTree as j,NIcon as T,NTooltip as N}from"naive-ui";import{CloseCircleSharp as $}from"@vicons/ionicons5";import{filterTree as I,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as q}from"lodash-es";import B from"./SearchMultiple.vue.js";const K={key:0},P={class:"c-select-person__scroll",style:{height:"342px"}};var U=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},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{emit:U}){const E=e,O=l(""),A=l(!1),F=l([]),W=l([]),M=l([]),R=l([]),z=l([]),G=l(!1),H=q(((J=E.data).forEach((e=>{var l;if(null==(l=e.children)?void 0:l.length){const l=ne(e.children,[]);e.innerItemsNum=l.length}})),ue(J,"")));var J;let Q=[];const V=t((()=>!!E.queryLoadChildData)),X=t((()=>{var e,l;return null!=(l=null==(e=null==E?void 0:E.treeSetting)?void 0:e.checkStrategy)?l:"child"}));function Y(e){e.disabled||e.children||!e.key||Q.push(e.key)}function Z(e){e.disabled||e.tempTitle||!e.key||Q.push(e.key)}async function ee(e){if(E.queryLoadChildData){const l=await E.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 le(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function te({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||V.value&&!(null==e?void 0:e.isLeaf)){const l=E.wordbook.user_count_obj&&e[E.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return r("span",null,[`${e.title}${t}`])}return r(N,{trigger:"hover"},{default:()=>r("span",null,[e.title]),trigger:()=>r("span",null,[e.title])})}function ae(e){return e[E.wordbookChild.user_name_obj]||e[E.wordbook.parent_name_obj]||e.orgName||e.title||""}function ne(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?ne(e.children,l):l.push(e)})),l}function ue(e,l){return e&&0!==e.length?e.map((e=>{var t;const a=ae(e),n=l?`${a}/${l}`:a;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?ue(null==e?void 0:e.children,n):[]}})):[]}async function ie(){G.value=!!O.value.trim(),V.value?M.value=await E.queryTreeSearch(O.value):M.value=I(H,O.value),W.value=M.value.length&&O.value?D(M.value):[]}function oe(){setTimeout((()=>{ie()}))}function re(e,l){var t,a;switch(null!=(a=null==(t=null==E?void 0:E.treeSetting)?void 0:t.checkStrategy)?a:"child"){case"child":!function(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}a.children&&re(a.children,l)}}(e,l);break;case"parent":!function(e,l){F.value=[];for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&!a.tempTitle&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}}}(e,l)}}function ce(e){re(M.value,e)}function de(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t],n=z.value.map((e=>e.key));F.value.includes(a.key)&&!n.includes(a.key)&&R.value.push({key:a.key,name:a.title,parentName:a.tempTitle,innerItemsNum:a.innerItemsNum}),(null==(l=a.children)?void 0:l.length)&&de(a.children)}}function se(e){F.value=e}function ve(){F.value=[]}function he(e){F.value=e}return function e(l,t){var a,n,u,i;for(let o=0,r=l.length;o<r;o++){const r=l[o];switch(r.title=ae(r),r.parentNode=t,r.key||(r.key=r[E.wordbookChild.user_id_obj]||r[E.wordbook.parent_id_obj]||Date.now()),(null==(a=r.children)?void 0:a.length)?(e(r.children,r),le(r)):0===(null==(n=r.children)?void 0:n.length)&&Reflect.deleteProperty(r,"children"),null!=(i=null==(u=null==E?void 0:E.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":Y(r);break;case"parent":Z(r)}}}(H,null),M.value=H,E.defaultList.length>0&&(V.value?(E.defaultList.forEach((e=>F.value.push(e.key))),R.value=q(E.defaultList),z.value=q(E.defaultList)):(E.defaultList.forEach((e=>F.value.push(e))),de(H))),a((()=>F),(e=>{R.value=z.value.filter((l=>e.value.includes(l.key))),e.value.length&&de(V.value?M.value:H),A.value=Q.every((e=>R.value.findIndex((l=>l.key===e))>-1));const l=R.value.filter((l=>e.value.includes(l.key)));U("check",e.value),U("checkWithLevel",l)}),{deep:!0}),(l,t)=>(n(),u(i(b),{cols:2,class:"c-select-person"},{default:o((()=>[r(i(_),null,{default:o((()=>[r(i(w),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:o((()=>[r(i(C),{style:{"margin-bottom":"12px"}},{default:o((()=>[r(i(x),{clearable:"",value:O.value,"onUpdate:value":t[0]||(t[0]=e=>O.value=e),placeholder:e.searchPlaceholder,onClear:oe,onKeyup:c(ie,["enter"])},null,8,["value","placeholder","onKeyup"]),r(i(L),{type:"primary",onClick:ie},{default:o((()=>[d(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!G.value?v((n(),u(i(S),{key:0,checked:A.value,"onUpdate:checked":[t[1]||(t[1]=e=>A.value=e),ce]},{default:o((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[h,i(Q).length<1e3]]):p("v-if",!0),e.multiple&&G.value&&"parent"===i(X)?(n(),u(B,{key:1,treeData:M.value,checkedKeys:F.value,onNotifyCheck:he},null,8,["treeData","checkedKeys"])):(n(),u(i(j),f({key:2,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":F.value,"expanded-keys":W.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>W.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":F.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>F.value=e),data:M.value,"check-strategy":"child","render-label":te},e.treeSetting,{"onUpdate:checkedKeys":se,onLoad:ee}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),r(i(_),null,{default:o((()=>[r(i(w),{vertical:"",style:{"padding-left":"12px"}},{default:o((()=>[r(i(w),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:o((()=>[e.showCount?(n(),y("span",K,"已选择:"+s(R.value.length),1)):p("v-if",!0),e.showClear?(n(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:ve},"清空")):p("v-if",!0)])),_:1}),k("div",P,[(n(!0),y(m,null,g(R.value,(e=>(n(),y("span",{class:"c-select-person__tag-item",key:e.key},[d(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:e.innerItemsNum?`(${e.innerItemsNum})`:"")+" ",1),r(i(T),{class:"tag-close",component:i($),onClick:l=>function(e){F.value=F.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{U as default};
@@ -1994,7 +1994,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
1994
1994
  onScroll?: ((...args: any[]) => any) | undefined;
1995
1995
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
1996
1996
  }>>;
1997
- emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
1997
+ emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
1998
1998
  cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
1999
1999
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
2000
2000
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
@@ -2164,14 +2164,14 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2164
2164
  submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
2165
2165
  validator: import("@formily/core").FieldValidator;
2166
2166
  pattern: import("@formily/core").FieldPatternTypes;
2167
- form: import("@formily/core").Form<any>;
2168
2167
  content: any;
2168
+ display: import("@formily/core").FieldDisplayTypes;
2169
+ hidden: boolean;
2170
+ form: import("@formily/core").Form<any>;
2169
2171
  componentProps: Record<string, any>;
2170
2172
  decoratorProps: Record<string, any>;
2171
- display: import("@formily/core").FieldDisplayTypes;
2172
2173
  description: string;
2173
2174
  readOnly: boolean;
2174
- hidden: boolean;
2175
2175
  component: import("@formily/core").FieldComponent<any, any>;
2176
2176
  decorator: import("@formily/core").FieldDecorator<any, any>;
2177
2177
  validating: boolean;
@@ -2305,7 +2305,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2305
2305
  readonly displayDirective: "if" | "show" | "show:lazy";
2306
2306
  }>;
2307
2307
  NTabs: any;
2308
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2308
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2309
2309
  fieldList: {
2310
2310
  type: import("vue").PropType<import("..").FieldItem[]>;
2311
2311
  };
@@ -1996,7 +1996,7 @@ declare const _default: import("vue").DefineComponent<{
1996
1996
  onScroll?: ((...args: any[]) => any) | undefined;
1997
1997
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
1998
1998
  }>>;
1999
- emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
1999
+ emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
2000
2000
  cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
2001
2001
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
2002
2002
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
@@ -2166,14 +2166,14 @@ declare const _default: import("vue").DefineComponent<{
2166
2166
  submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
2167
2167
  validator: import("../../../../es/components/form-render").FieldValidator;
2168
2168
  pattern: import("../../../../es/components/form-render").FieldPatternTypes;
2169
- form: import("../../../../es/components/form-render").Form<any>;
2170
2169
  content: any;
2170
+ display: import("../../../../es/components/form-render").FieldDisplayTypes;
2171
+ hidden: boolean;
2172
+ form: import("../../../../es/components/form-render").Form<any>;
2171
2173
  componentProps: Record<string, any>;
2172
2174
  decoratorProps: Record<string, any>;
2173
- display: import("../../../../es/components/form-render").FieldDisplayTypes;
2174
2175
  description: string;
2175
2176
  readOnly: boolean;
2176
- hidden: boolean;
2177
2177
  component: import("../../../../es/components/form-render").FieldComponent<any, any>;
2178
2178
  decorator: import("../../../../es/components/form-render").FieldDecorator<any, any>;
2179
2179
  validating: boolean;
@@ -2307,7 +2307,7 @@ declare const _default: import("vue").DefineComponent<{
2307
2307
  readonly displayDirective: "if" | "show" | "show:lazy";
2308
2308
  }>;
2309
2309
  NTabs: any;
2310
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2310
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2311
2311
  fieldList: {
2312
2312
  type: import("vue").PropType<FieldItem[]>;
2313
2313
  };
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.42-beta.71",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.42-beta.71",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};
1
+ var e="@cnhis-design-vue/shared",i="3.1.42-beta.72",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.42-beta.72",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,65 +1,65 @@
1
- {
2
- "name": "cnhis-design-vue",
3
- "version": "3.1.42-beta.71",
4
- "license": "ISC",
5
- "module": "./es/components/index.js",
6
- "main": "./es/components/index.js",
7
- "types": "./es/components/index.d.ts",
8
- "sideEffects": [
9
- "es/components/**/style/*",
10
- "es/components/*(.css,.less)"
11
- ],
12
- "files": [
13
- "es",
14
- "README.md"
15
- ],
16
- "peerDependencies": {
17
- "naive-ui": "^2.30.0",
18
- "vue": "^3.2.0",
19
- "vxe-table": "^4.2.5"
20
- },
21
- "dependencies": {
22
- "@formily/core": "2.1.9",
23
- "@formily/path": "2.1.9",
24
- "@formily/reactive": "2.1.9",
25
- "@formily/vue": "2.1.9",
26
- "@vicons/ionicons5": "^0.12.0",
27
- "@vueuse/core": "^8.6.0",
28
- "@vueuse/shared": "^8.6.0",
29
- "@wangeditor/editor": "^5.1.1",
30
- "@wangeditor/editor-for-vue": "^5.1.11",
31
- "axios": "^0.27.2",
32
- "bpmn-js": "^9.2.2",
33
- "bpmnlint-utils": "^1.0.2",
34
- "date-fns": "^2.29.1",
35
- "diagram-js": "^8.7.1",
36
- "ids": "^1.0.0",
37
- "inherits": "^2.0.4",
38
- "lodash": "^4.17.21",
39
- "lodash-es": "^4.17.21",
40
- "lodash-unified": "^1.0.2",
41
- "min-dash": "^3.8.1",
42
- "min-dom": "^3.2.1",
43
- "moment": "^2.29.1",
44
- "naive-ui": "^2.30.0",
45
- "sortablejs": "^1.15.0",
46
- "spark-md5": "^3.0.2",
47
- "tiny-svg": "^2.2.4",
48
- "v-viewer": "^3.0.10",
49
- "video.js": "^7.19.2",
50
- "videojs-contrib-hls": "^5.15.0",
51
- "viewerjs": "^1.10.5",
52
- "vue": "^3.2.0",
53
- "vue-simple-uploader": "^1.0.0-beta.5",
54
- "xe-utils": "^3.5.4"
55
- },
56
- "browserslist": [
57
- "defaults",
58
- "not ie < 8",
59
- "last 2 versions",
60
- "> 1%",
61
- "iOS 7",
62
- "last 3 iOS versions"
63
- ],
64
- "gitHead": "a039636e7ec69438be868216de841481953dbb11"
65
- }
1
+ {
2
+ "name": "cnhis-design-vue",
3
+ "version": "3.1.42-beta.72",
4
+ "license": "ISC",
5
+ "module": "./es/components/index.js",
6
+ "main": "./es/components/index.js",
7
+ "types": "./es/components/index.d.ts",
8
+ "sideEffects": [
9
+ "es/components/**/style/*",
10
+ "es/components/*(.css,.less)"
11
+ ],
12
+ "files": [
13
+ "es",
14
+ "README.md"
15
+ ],
16
+ "peerDependencies": {
17
+ "naive-ui": "^2.30.0",
18
+ "vue": "^3.2.0",
19
+ "vxe-table": "^4.2.5"
20
+ },
21
+ "dependencies": {
22
+ "@formily/core": "2.1.9",
23
+ "@formily/path": "2.1.9",
24
+ "@formily/reactive": "2.1.9",
25
+ "@formily/vue": "2.1.9",
26
+ "@vicons/ionicons5": "^0.12.0",
27
+ "@vueuse/core": "^8.6.0",
28
+ "@vueuse/shared": "^8.6.0",
29
+ "@wangeditor/editor": "^5.1.1",
30
+ "@wangeditor/editor-for-vue": "^5.1.11",
31
+ "axios": "^0.27.2",
32
+ "bpmn-js": "^9.2.2",
33
+ "bpmnlint-utils": "^1.0.2",
34
+ "date-fns": "^2.29.1",
35
+ "diagram-js": "^8.7.1",
36
+ "ids": "^1.0.0",
37
+ "inherits": "^2.0.4",
38
+ "lodash": "^4.17.21",
39
+ "lodash-es": "^4.17.21",
40
+ "lodash-unified": "^1.0.2",
41
+ "min-dash": "^3.8.1",
42
+ "min-dom": "^3.2.1",
43
+ "moment": "^2.29.1",
44
+ "naive-ui": "^2.30.0",
45
+ "sortablejs": "^1.15.0",
46
+ "spark-md5": "^3.0.2",
47
+ "tiny-svg": "^2.2.4",
48
+ "v-viewer": "^3.0.10",
49
+ "video.js": "^7.19.2",
50
+ "videojs-contrib-hls": "^5.15.0",
51
+ "viewerjs": "^1.10.5",
52
+ "vue": "^3.2.0",
53
+ "vue-simple-uploader": "^1.0.0-beta.5",
54
+ "xe-utils": "^3.5.4"
55
+ },
56
+ "browserslist": [
57
+ "defaults",
58
+ "not ie < 8",
59
+ "last 2 versions",
60
+ "> 1%",
61
+ "iOS 7",
62
+ "last 3 iOS versions"
63
+ ],
64
+ "gitHead": "a8f7d7cdca3113620c2a7b0dbaf062673dfc51cc"
65
+ }