cnhis-design-vue 3.1.52-beta.3 → 3.1.52-beta.31

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 (142) hide show
  1. package/README.md +87 -87
  2. package/es/components/body-select/index.d.ts +57 -0
  3. package/es/components/body-select/index.js +1 -0
  4. package/es/components/body-select/src/config/index.d.ts +101 -0
  5. package/es/components/body-select/src/config/index.js +1 -0
  6. package/es/components/body-select/src/hooks/renderCanvas.d.ts +6 -0
  7. package/es/components/body-select/src/hooks/renderCanvas.js +1 -0
  8. package/es/components/body-select/src/index.vue.d.ts +58 -0
  9. package/es/components/body-select/src/index.vue.js +1 -0
  10. package/es/components/body-select/src/index.vue2.js +1 -0
  11. package/es/components/body-select/style/index.css +1 -0
  12. package/es/components/button-print/src/utils/print.d.ts +3 -3
  13. package/es/components/button-print/src/utils/print.js +1 -1
  14. package/es/components/callback/src/components/render/popupMaps.d.ts +45 -41
  15. package/es/components/classification/index.d.ts +82 -10
  16. package/es/components/classification/src/components/search-filter/index.vue.d.ts +82 -10
  17. package/es/components/classification/src/components/set-classification/index.vue.d.ts +82 -10
  18. package/es/components/classification/src/index.vue.d.ts +82 -10
  19. package/es/components/classification/style/index.css +1 -1
  20. package/es/components/date-picker/index.d.ts +38 -3
  21. package/es/components/date-picker/src/DatePicker.vue.d.ts +38 -3
  22. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  23. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  24. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  25. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  29. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
  30. package/es/components/fabric-chart/src/interface.d.ts +2 -2
  31. package/es/components/form-config/index.d.ts +2 -2
  32. package/es/components/form-config/src/FormConfig.vue.d.ts +74 -74
  33. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -37
  34. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +37 -37
  35. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  36. package/es/components/form-render/index.d.ts +37 -37
  37. package/es/components/form-render/index.js +1 -1
  38. package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
  39. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +37 -37
  40. package/es/components/form-render/src/components/renderer/date.d.ts +25 -0
  41. package/es/components/form-render/src/components/renderer/date.js +1 -1
  42. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  43. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +6 -0
  44. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  45. package/es/components/form-render/src/components/renderer/select.d.ts +7 -0
  46. package/es/components/form-render/src/components/renderer/select.js +1 -1
  47. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  48. package/es/components/form-render/src/hooks/useFormEvent.d.ts +2 -2
  49. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  50. package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
  51. package/es/components/form-render/src/types/fieldItem.js +1 -1
  52. package/es/components/form-render/src/types/index.d.ts +2 -2
  53. package/es/components/form-render/src/types/index.js +1 -1
  54. package/es/components/iho-table/index.d.ts +8 -4
  55. package/es/components/iho-table/index.js +1 -1
  56. package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -4
  57. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
  58. package/es/components/iho-table/src/plugins/copyPastePlugin.d.ts +1 -0
  59. package/es/components/iho-table/src/plugins/copyPastePlugin.js +1 -0
  60. package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
  61. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +38 -3
  62. package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.d.ts +1 -0
  63. package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -0
  64. package/es/components/iho-table/src/plugins/index.js +1 -1
  65. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +38 -3
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -7
  72. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  73. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  74. package/es/components/iho-table/src/types/index.d.ts +16 -12
  75. package/es/components/iho-table/src/utils/index.d.ts +2 -0
  76. package/es/components/iho-table/src/utils/index.js +1 -1
  77. package/es/components/index.css +1 -1
  78. package/es/components/index.d.ts +2 -1
  79. package/es/components/index.js +1 -1
  80. package/es/components/info-header/index.d.ts +2 -2
  81. package/es/components/info-header/src/InfoHeader.vue.d.ts +75 -75
  82. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +38 -38
  83. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +37 -37
  84. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  85. package/es/components/quick-search/index.d.ts +3 -1
  86. package/es/components/quick-search/src/index.vue.d.ts +3 -1
  87. package/es/components/quick-search/src/index.vue2.js +1 -1
  88. package/es/components/quick-search/style/index.css +1 -1
  89. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  90. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  91. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  92. package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -1
  93. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  94. package/es/components/shortcut-setter/index.d.ts +1 -1
  95. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +37 -37
  96. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  97. package/es/components/table-filter/index.d.ts +2 -0
  98. package/es/components/table-filter/index.js +1 -1
  99. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +76 -8
  100. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +38 -4
  101. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  102. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +38 -4
  103. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  104. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +76 -8
  105. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +2 -2
  106. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
  107. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +82 -10
  108. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  109. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +38 -3
  110. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
  111. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +38 -3
  112. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +38 -3
  113. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  114. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +38 -3
  115. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +152 -12
  116. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +152 -12
  117. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  118. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  119. package/es/env.d.ts +25 -25
  120. package/es/shared/assets/img/failure.png.js +1 -1
  121. package/es/shared/assets/img/no-permission.png.js +1 -1
  122. package/es/shared/assets/img/nodata.png.js +1 -1
  123. package/es/shared/assets/img/notfound.png.js +1 -1
  124. package/es/shared/assets/img/qr.png.js +1 -1
  125. package/es/shared/assets/img/success.png.js +1 -1
  126. package/es/shared/assets/img/video.png.js +1 -1
  127. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  128. package/es/shared/assets/img/xb_big.png.js +1 -1
  129. package/es/shared/assets/img/xb_small.png.js +1 -1
  130. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +9 -0
  131. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  132. package/es/shared/hooks/useDateTime.d.ts +8 -2
  133. package/es/shared/hooks/useDateTime.js +1 -1
  134. package/es/shared/package.json.js +1 -1
  135. package/package.json +2 -2
  136. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  137. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  138. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  139. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  140. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  141. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  142. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -372,7 +372,7 @@ declare const _default: import("vue").DefineComponent<{
372
372
  syncBarPosition: import("../../../..").Func<any[], any>;
373
373
  } | undefined>;
374
374
  currentAnchor: import("vue").WritableComputedRef<string>;
375
- updateAnchorList: (field: import("../../../../../../es/components/form-render").GeneralField) => void;
375
+ updateAnchorList: (field: import("@formily/core").GeneralField) => void;
376
376
  anchorIdList: import("vue").Ref<{
377
377
  name: string;
378
378
  title: string;
@@ -389,12 +389,12 @@ declare const _default: import("vue").DefineComponent<{
389
389
  afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
390
390
  afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
391
391
  }>>[T]>>;
392
- triggerAutoHidden: (field: import("../../../../../../es/components/form-render").GeneralField) => Promise<void>;
393
- observeFormGraph: Record<string, import("../../../../../../es/components/form-render").GeneralField>;
394
- setGraph: (field: import("../../../../../../es/components/form-render").GeneralField) => void;
395
- removeGraph: (field: import("../../../../../../es/components/form-render").GeneralField) => void;
396
- lowCodeEventTrigger: (field: import("../../../../../../es/components/form-render").GeneralField) => void;
397
- formModel: import("../../../../../../es/components/form-render").Form<{
392
+ triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
393
+ observeFormGraph: Record<string, import("@formily/core").GeneralField>;
394
+ setGraph: (field: import("@formily/core").GeneralField) => void;
395
+ removeGraph: (field: import("@formily/core").GeneralField) => void;
396
+ lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
397
+ formModel: import("@formily/core").Form<{
398
398
  [x: string]: any;
399
399
  }>;
400
400
  lowCodeReactionsHandler: (field: string) => void;
@@ -609,12 +609,12 @@ declare const _default: import("vue").DefineComponent<{
609
609
  onKeydown: (event: KeyboardEvent) => Promise<void>;
610
610
  clearSpan: (uuid: string) => void;
611
611
  exposeEvent: {
612
- validate(path?: string, { force }?: {
612
+ validate(path?: string | ((field: import("@formily/core").Field<any, any, any, any>) => boolean), { force }?: {
613
613
  force?: boolean | undefined;
614
614
  }): Promise<void>;
615
615
  getFormValues(needCombineExtendKey?: boolean): any;
616
616
  setFormValues(values: import("../../../..").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
617
- setFieldState(path: string, setter: (field: Partial<Pick<import("../../../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../../../es/components/form-render").NonFunctionPropertyNames<{
617
+ setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
618
618
  match: (pattern: import("@formily/path").Pattern) => boolean;
619
619
  validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
620
620
  data: any;
@@ -627,22 +627,22 @@ declare const _default: import("vue").DefineComponent<{
627
627
  onBlur: (...args: any[]) => Promise<void>;
628
628
  onInput: (...args: any[]) => Promise<void>;
629
629
  editable: boolean;
630
- reset: (options?: import("../../../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
630
+ reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
631
631
  title: string;
632
632
  visible: boolean;
633
633
  submit: <T_1>(onSubmit?: ((values: any) => void | Promise<T_1>) | undefined) => Promise<T_1>;
634
- validator: import("../../../../../../es/components/form-render").FieldValidator;
635
- pattern: import("../../../../../../es/components/form-render").FieldPatternTypes;
634
+ validator: import("@formily/core").FieldValidator;
635
+ pattern: import("@formily/core").FieldPatternTypes;
636
636
  content: any;
637
- display: import("../../../../../../es/components/form-render").FieldDisplayTypes;
637
+ display: import("@formily/core").FieldDisplayTypes;
638
638
  hidden: boolean;
639
- form: import("../../../../../../es/components/form-render").Form<any>;
639
+ form: import("@formily/core").Form<any>;
640
640
  componentProps: Record<string, any>;
641
641
  decoratorProps: Record<string, any>;
642
642
  description: string;
643
643
  readOnly: boolean;
644
- component: import("../../../../../../es/components/form-render").FieldComponent<any, any>;
645
- decorator: import("../../../../../../es/components/form-render").FieldDecorator<any, any>;
644
+ component: import("@formily/core").FieldComponent<any, any>;
645
+ decorator: import("@formily/core").FieldDecorator<any, any>;
646
646
  validating: boolean;
647
647
  submitting: boolean;
648
648
  active: boolean;
@@ -651,27 +651,27 @@ declare const _default: import("vue").DefineComponent<{
651
651
  modified: boolean;
652
652
  inputValue: string;
653
653
  inputValues: any[];
654
- dataSource: import("../../../../../../es/components/form-render").FieldDataSource;
655
- feedbacks: import("../../../../../../es/components/form-render").IFieldFeedback[];
656
- caches: import("../../../../../../es/components/form-render").IFieldCaches;
657
- selfErrors: import("../../../../../../es/components/form-render").FeedbackMessage;
658
- readonly errors: import("../../../../../../es/components/form-render").IFormFeedback[];
659
- selfWarnings: import("../../../../../../es/components/form-render").FeedbackMessage;
660
- readonly warnings: import("../../../../../../es/components/form-render").IFormFeedback[];
661
- selfSuccesses: import("../../../../../../es/components/form-render").FeedbackMessage;
662
- readonly successes: import("../../../../../../es/components/form-render").IFormFeedback[];
654
+ dataSource: import("@formily/core").FieldDataSource;
655
+ feedbacks: import("@formily/core").IFieldFeedback[];
656
+ caches: import("@formily/core").IFieldCaches;
657
+ selfErrors: import("@formily/core").FeedbackMessage;
658
+ readonly errors: import("@formily/core").IFormFeedback[];
659
+ selfWarnings: import("@formily/core").FeedbackMessage;
660
+ readonly warnings: import("@formily/core").IFormFeedback[];
661
+ selfSuccesses: import("@formily/core").FeedbackMessage;
662
+ readonly successes: import("@formily/core").IFormFeedback[];
663
663
  readonly selfValid: boolean;
664
664
  readonly valid: boolean;
665
665
  readonly selfInvalid: boolean;
666
666
  readonly invalid: boolean;
667
667
  initialValue: string;
668
668
  readonly validateStatus: "error" | "success" | "warning" | "validating";
669
- setDataSource: (dataSource?: import("../../../../../../es/components/form-render").FieldDataSource | undefined) => void;
670
- setFeedback: (feedback?: import("../../../../../../es/components/form-render").IFieldFeedback | undefined) => void;
671
- setSelfErrors: (messages?: import("../../../../../../es/components/form-render").FeedbackMessage | undefined) => void;
672
- setSelfWarnings: (messages?: import("../../../../../../es/components/form-render").FeedbackMessage | undefined) => void;
673
- setSelfSuccesses: (messages?: import("../../../../../../es/components/form-render").FeedbackMessage | undefined) => void;
674
- setValidator: (validator?: import("../../../../../../es/components/form-render").FieldValidator | undefined) => void;
669
+ setDataSource: (dataSource?: import("@formily/core").FieldDataSource | undefined) => void;
670
+ setFeedback: (feedback?: import("@formily/core").IFieldFeedback | undefined) => void;
671
+ setSelfErrors: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
672
+ setSelfWarnings: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
673
+ setSelfSuccesses: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
674
+ setValidator: (validator?: import("@formily/core").FieldValidator | undefined) => void;
675
675
  setValidatorRule: (name: string, value: any) => void;
676
676
  setRequired: (required?: boolean | undefined) => void;
677
677
  setValue: (value?: string | undefined) => void;
@@ -679,7 +679,7 @@ declare const _default: import("vue").DefineComponent<{
679
679
  setLoading: (loading?: boolean | undefined) => void;
680
680
  setValidating: (validating?: boolean | undefined) => void;
681
681
  setSubmitting: (submitting?: boolean | undefined) => void;
682
- queryFeedbacks: (search?: import("../../../../../../es/components/form-render").ISearchFeedback | undefined) => import("../../../../../../es/components/form-render").IFieldFeedback[];
682
+ queryFeedbacks: (search?: import("@formily/core").ISearchFeedback | undefined) => import("@formily/core").IFieldFeedback[];
683
683
  modify: () => void;
684
684
  initialized: boolean;
685
685
  mounted: boolean;
@@ -688,13 +688,13 @@ declare const _default: import("vue").DefineComponent<{
688
688
  componentType: any;
689
689
  designable: boolean;
690
690
  locate: (address: import("@formily/path").Pattern) => void;
691
- readonly parent: import("../../../../../../es/components/form-render").GeneralField;
691
+ readonly parent: import("@formily/core").GeneralField;
692
692
  readPretty: boolean;
693
693
  readonly destroyed: boolean;
694
694
  setTitle: (title?: string | undefined) => void;
695
695
  setDescription: (description?: string | undefined) => void;
696
- setDisplay: (type?: import("../../../../../../es/components/form-render").FieldDisplayTypes | undefined) => void;
697
- setPattern: (type?: import("../../../../../../es/components/form-render").FieldPatternTypes | undefined) => void;
696
+ setDisplay: (type?: import("@formily/core").FieldDisplayTypes | undefined) => void;
697
+ setPattern: (type?: import("@formily/core").FieldPatternTypes | undefined) => void;
698
698
  setComponent: <C extends unknown, ComponentProps extends object = {}>(component?: C | undefined, props?: ComponentProps | undefined) => void;
699
699
  setComponentProps: <ComponentProps_1 extends object = {}>(props?: ComponentProps_1 | undefined) => void;
700
700
  setDecorator: <D extends unknown, ComponentProps_2 extends object = {}>(component?: D | undefined, props?: ComponentProps_2 | undefined) => void;
@@ -704,8 +704,8 @@ declare const _default: import("vue").DefineComponent<{
704
704
  onInit: () => void;
705
705
  onMount: () => void;
706
706
  onUnmount: () => void;
707
- query: (pattern: import("@formily/path").Pattern) => import("../../../../../../es/components/form-render").Query;
708
- notify: (type: import("../../../../../../es/components/form-render").LifeCycleTypes, payload?: any) => void;
707
+ query: (pattern: import("@formily/path").Pattern) => import("@formily/core").Query;
708
+ notify: (type: import("@formily/core").LifeCycleTypes, payload?: any) => void;
709
709
  dispose: () => void;
710
710
  destroy: (forceClear?: boolean | undefined) => void;
711
711
  }>>>) => void): void;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,provide as t,computed as o,unref as a,openBlock as n,createBlock as u,normalizeStyle as i,withCtx as s,createVNode as r,mergeProps as d,createElementBlock as f,normalizeClass as c,createElementVNode as p,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as g,toDisplayString as h}from"vue";import{NPopover as k,NInputNumber as w,NSpace as V,NIcon as b}from"naive-ui";import{Close as x,GitCompareOutline as O,ArrowUndoSharp as S}from"@vicons/ionicons5";import C from"./components/NumberPanel.vue.js";import{useDraggable as _}from"@vueuse/core";import{useTheme as j}from"../../../shared/hooks/useTheme.js";import"date-fns";import"lodash-es";import{defaultCssVars as I}from"./constants/index.js";const D=p("span",null,"键盘",-1),N={class:"keys"},K=["onClick"];var R=e({__name:"Keyboard",props:{mode:{type:String,default:"english"},drag:{type:Boolean,default:!1},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},defaultValue:{type:Number},value:{type:Number},panel:{type:Boolean,default:!0},moveOffset:{type:Object,default:()=>({x:0,y:0})}},emits:["change","keydown"],setup(e,{expose:R,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],J=E.split("").concat(F),M=E.split(".")[0].split("").sort().concat(["."],F),P=j(I,"Keyboard");let Q=l(Date.now());t("toSelectInputContent",Q);const T=o((()=>"english"===B.mode)),$=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),A=o((()=>`${JSON.stringify(P.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),G=l(J.slice()),H=l(),L=l(),W=l(),X=l(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(T.value&&B.drag){const{x:e,y:l,style:t}=_(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,l)=>{var t,o,a,n;e.x+=null!=(o=null==(t=B.moveOffset)?void 0:t.x)?o:0,e.y+=null!=(n=null==(a=B.moveOffset)?void 0:a.y)?n:0}});return t}}();function Z(e){"Switch"!==e?U("keydown",e):G.value="Q"===G.value[0]?M.slice():J.slice()}function q(e){H.value.setShow(!1),X.value=e,U("change",e)}return R({select:function(){Q.value=Date.now()}}),(l,t)=>a(T)||e.panel?!a(T)&&e.panel?(n(),u(C,d({key:1},a($),{style:a(P)}),null,16,["style"])):(n(),f("div",{key:2,class:c(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:i(a(A))},[r(a(V),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:i({cursor:e.drag?"move":"default"})},{default:s((()=>[D,r(a(b),{onClick:t[1]||(t[1]=e=>Z("close")),component:a(x)},null,8,["component"])])),_:1},8,["style"]),p("div",N,[(n(!0),f(m,null,v(G.value,((e,l)=>(n(),f("span",{key:e,class:c(["key"+l]),onClick:l=>Z(e)},["Switch"===e?(n(),u(a(b),{key:0,component:a(O)},null,8,["component"])):y("v-if",!0),"Undo"===e?(n(),u(a(b),{key:1,component:a(S)},null,8,["component"])):y("v-if",!0),g(" "+h(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,K)))),128))])],6)):(n(),u(a(k),{key:0,ref_key:"popoverRef",ref:H,trigger:"click","show-arrow":!1,placement:"bottom-start",style:i([{padding:"0"},a(P)]),"display-directive":"show"},{trigger:s((()=>[r(a(w),{value:X.value,"onUpdate:value":t[0]||(t[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:s((()=>[r(C,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}});export{R as default};
1
+ import{defineComponent as e,ref as l,provide as t,computed as o,unref as a,openBlock as n,createBlock as u,normalizeStyle as i,withCtx as s,createVNode as r,mergeProps as d,createElementBlock as f,normalizeClass as c,createElementVNode as p,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as g,toDisplayString as h}from"vue";import{NPopover as k,NInputNumber as w,NSpace as V,NIcon as b}from"naive-ui";import{Close as x,GitCompareOutline as O,ArrowUndoSharp as S}from"@vicons/ionicons5";import C from"./components/NumberPanel.vue.js";import{useDraggable as _}from"@vueuse/core";import{useTheme as j}from"../../../shared/hooks/useTheme.js";import"date-fns";import"lodash-es";import{defaultCssVars as I}from"./constants/index.js";const D=p("span",null,"键盘",-1),N={class:"keys"},K=["onClick"];var R=e({__name:"Keyboard",props:{mode:{type:String,default:"english"},drag:{type:Boolean,default:!1},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},defaultValue:{type:Number},value:{type:Number},panel:{type:Boolean,default:!0},moveOffset:{type:Object,default:()=>({x:0,y:0})}},emits:["change","keydown"],setup(e,{expose:R,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],J=E.split("").concat(F),M=E.split(".")[0].split("").sort().concat(["."],F),P=j(I,"Keyboard");let Q=l(Date.now());t("toSelectInputContent",Q);const T=o((()=>"english"===B.mode)),$=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),A=o((()=>`${JSON.stringify(P.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),G=l(J.slice()),H=l(),L=l(),W=l(),X=l(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(T.value&&B.drag){const{x:e,y:l,style:t}=_(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,l)=>{var t,o,a,n;e.x+=null!=(o=null==(t=B.moveOffset)?void 0:t.x)?o:0,e.y+=null!=(n=null==(a=B.moveOffset)?void 0:a.y)?n:0}});return t}}();function Z(e){"Switch"!==e?U("keydown",e):G.value="Q"===G.value[0]?M.slice():J.slice()}function q(e){var l;null==(l=H.value)||l.setShow(!1),X.value=e,U("change",e)}return R({select:function(){Q.value=Date.now()}}),(l,t)=>a(T)||e.panel?!a(T)&&e.panel?(n(),u(C,d({key:1},a($),{style:a(P)}),null,16,["style"])):(n(),f("div",{key:2,class:c(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:i(a(A))},[r(a(V),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:i({cursor:e.drag?"move":"default"})},{default:s((()=>[D,r(a(b),{onClick:t[1]||(t[1]=e=>Z("close")),component:a(x)},null,8,["component"])])),_:1},8,["style"]),p("div",N,[(n(!0),f(m,null,v(G.value,((e,l)=>(n(),f("span",{key:e,class:c(["key"+l]),onClick:l=>Z(e)},["Switch"===e?(n(),u(a(b),{key:0,component:a(O)},null,8,["component"])):y("v-if",!0),"Undo"===e?(n(),u(a(b),{key:1,component:a(S)},null,8,["component"])):y("v-if",!0),g(" "+h(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,K)))),128))])],6)):(n(),u(a(k),{key:0,ref_key:"popoverRef",ref:H,trigger:"click","show-arrow":!1,placement:"bottom-start",style:i([{padding:"0"},a(P)]),"display-directive":"show"},{trigger:s((()=>[r(a(w),{value:X.value,"onUpdate:value":t[0]||(t[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:s((()=>[r(C,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}});export{R as default};
@@ -135,6 +135,8 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
135
135
  }[]>;
136
136
  showAdd: import("vue").Ref<boolean>;
137
137
  addVal: import("vue").Ref<string>;
138
+ parentInputRef: import("vue").Ref<any>;
139
+ parentInputAddRef: import("vue").Ref<any>;
138
140
  filterChangeFnList: import("vue").Ref<any[]>;
139
141
  parentNamesHasAdd: import("vue").ComputedRef<boolean>;
140
142
  handleName: import("vue").ComputedRef<(item: import("..").ISearchType, key?: string) => any>;
@@ -176,7 +178,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
176
178
  saveToCalss: () => void;
177
179
  handleParentNamesAdd: (e: Event) => void;
178
180
  hanldeBlur: () => void;
179
- editParentName: (e: Event, item: import("..").IParentNamesType) => void;
181
+ editParentName: (item: import("..").IParentNamesType) => void;
180
182
  handleParentNameSelect: (item: import("..").IParentNamesType, index: number) => void;
181
183
  handleParentNamesRemove: (index: number) => void;
182
184
  handleParent: (index: number) => void;
@@ -137,6 +137,8 @@ declare const _default: import("vue").DefineComponent<{
137
137
  }[]>;
138
138
  showAdd: import("vue").Ref<boolean>;
139
139
  addVal: import("vue").Ref<string>;
140
+ parentInputRef: import("vue").Ref<any>;
141
+ parentInputAddRef: import("vue").Ref<any>;
140
142
  filterChangeFnList: import("vue").Ref<any[]>;
141
143
  parentNamesHasAdd: import("vue").ComputedRef<boolean>;
142
144
  handleName: import("vue").ComputedRef<(item: ISearchType, key?: string) => any>;
@@ -178,7 +180,7 @@ declare const _default: import("vue").DefineComponent<{
178
180
  saveToCalss: () => void;
179
181
  handleParentNamesAdd: (e: Event) => void;
180
182
  hanldeBlur: () => void;
181
- editParentName: (e: Event, item: IParentNamesType) => void;
183
+ editParentName: (item: IParentNamesType) => void;
182
184
  handleParentNameSelect: (item: IParentNamesType, index: number) => void;
183
185
  handleParentNamesRemove: (index: number) => void;
184
186
  handleParent: (index: number) => void;
@@ -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 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};
1
+ import{defineComponent as e,ref as l,provide as a,computed as t,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as u,Fragment as s,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 _,NPopover as A,NModal as S,NCard as x,NIcon as F,NButton as q,NForm as w,NFormItem as j,NInput as I}from"naive-ui";import{CloseOutline as R,AddOutline as U}from"@vicons/ionicons5";import E 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 V}from"lodash-es";import{InjectionFilterApiConfig as z,InjectionFilterSearchConfig as D}from"../../table-filter/src/constants/index.js";const L={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=u("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={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=_(),{handleGetConfigApi:ae,outQuickSearchFn:te}=E(),{getRenderSearchConObj:ie,resetRenderWidgetValue:ne,isRender:oe}=N(),{transformData:re,getCacheDef:ue,transformParams:se}=O(),ce=l(null),de=l({classname:""});let fe=l(!1),ve=l([]),me=l([]),pe=l(!1),he=l("");const ge=l(),ke=l(),be=l([]);a(z,$.filterApiConfig),a(D,ve);let ye=t((()=>!!me.value.length&&me.value.some((e=>e.isAdd)))),Ce=t((()=>(e,l="name")=>e.alias||e[l]));function _e(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=ie(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ve.value)||[]}function Ae(){var e;null==(e=ce.value)||e.validate((e=>{var l;if(e)return;let a=_e();a.length||(a=[]);let t=null==(l=me.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await ae(e,"requestSaveTableCondiTion",{},$.filterApiConfig))return;fe.value=!1,null==(l=ce.value)||l.restoreValidation(),de.value.classname="",me.value=[],we()}catch(e){console.log(e)}}({tableId:$.tableId||"",setting:JSON.stringify({displayCategory:t,name:de.value.classname,conObj:a.map((e=>(e.unit&&(e.value=[]),e)))}),conditionList:"[]"})}))}function Se(e){setTimeout((()=>{ke.value&&ke.value.focus()}),100),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 Fe(e){!function(e){me.value.splice(e,1)}(e)}function qe(){fe.value=!1}function we(){je(ve.value),Z("clearQuickSearchConfig")}function je(e){Array.isArray(e)&&(e.forEach((e=>{ne(e)})),te.handlerInitSearchItem(ve.value))}return i((()=>$.searchFieldList),(e=>{e&&e.length>0&&function(){let e=V(re($.searchFieldList,{_filterApiConfig:$.filterApiConfig})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ve.value=e||[],te.handlerInitSearchItem(ve.value)}()}),{immediate:!0,deep:!0}),i((()=>ve),(()=>{const e=_e()||[],l=se(e);Z("getFilterParam",e,l),be.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 a,t;if(oe(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(a=i.value)?void 0:a.length)>0&&(e.value=ue(e,i.value),e.unit=null!=(t=i.unit)?t:"")}}));var l;je(ve.value)})),Y({openSaveToCalss:function(){let e=_e();e&&(e.length>0?fe.value=!0:le.warning("请设置搜索条件"))},clearData:we,onFilterSearch:function(){let e=_e()||[];const l=se(e);return Z("onFilterSearch",e,l,!1),ve.value},getFilterParams:function(){const e=_e()||[];return se(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ve.value.forEach((a=>{var t;if(oe(a)&&l.includes(a.columnName)){const l=e[a.columnName];a.value=Array.isArray(l)&&!1===(null==(t=a.widgetCfg)?void 0:t.multiple)?l[0]:l}}))},getOriginalConfig:function(){return $.searchFieldList},onFilterChange:function(e){be.value.push(e)}}),(e,l)=>(o(),r("div",null,[u("div",L,[(o(!0),r(s,null,c(d(ve),(e=>(o(),r("div",{class:f(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[u("div",T,[v(" title "),u("div",B,[m(d(A),{trigger:"hover"},{trigger:p((()=>[h(g(d(Ce)(e,"title")),1)])),default:p((()=>[u("span",null,g(d(Ce)(e,"title")),1)])),_:2},1024)]),v(" content "),u("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(S),{show:d(fe),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:Ae,onNegativeClick:qe,class:"classification-modal-block"},{default:p((()=>[m(d(x),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p((()=>[u("div",M,[m(d(F),{component:d(R),size:"24",onClick:qe},null,8,["component"])])])),footer:p((()=>[u("div",W,[m(d(q),{onClick:qe},{default:p((()=>[h("取消")])),_:1}),m(d(q),{type:"info",onClick:Ae},{default:p((()=>[h("确认")])),_:1})])])),default:p((()=>[u("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(I),{value:de.value.classname,"onUpdate:value":l[0]||(l[0]=e=>de.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),u("div",J,[H,(o(!0),r(s,null,c(d(me),((e,l)=>(o(),r("div",{class:"parent-name",key:l,onDblclick:l=>function(e){e.disabled=!1,setTimeout((()=>{ge.value.length>0&&ge.value[0].focus()}),100)}(e),onClick:a=>function(e,l){e.disabled&&(me.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),r("div",{key:0,class:f(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}])},[u("div",X,g(e.value),1),m(d(F),{component:d(R),class:"anticon-close",size:"20",onClick:e=>Fe(l)},null,8,["component","onClick"])],2)):(o(),k(d(I),{key:1,ref_for:!0,ref_key:"parentInputRef",ref:ge,class:"parent-input",style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxlength:20},null,8,["value","onUpdate:value","disabled","onBlur"]))],40,K)))),128)),d(ye)?v("v-if",!0):(o(),r(s,{key:0},[b(m(d(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:Se},{default:p((()=>[m(d(F),{component:d(U),size:"20"},null,8,["component"]),h("添加分类 ")])),_:1},512),[[y,!d(pe)]]),b(m(d(I),{ref_key:"parentInputAddRef",ref:ke,class:"parent-input",style:{width:"100px"},value:d(he),"onUpdate:value":l[1]||(l[1]=e=>C(he)?he.value=e:he=e),valueModifiers:{trim:!0},onBlur:xe,maxlength:20},null,8,["value"]),[[y,d(pe)]])],64))])])])),_:1})])),_:1},8,["show"])]))}});export{Y as default};
@@ -1 +1 @@
1
- .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px;margin-left:8px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;flex-wrap:nowrap}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px;white-space:nowrap}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.select-dynamic-popover .n-base-select-menu__empty{justify-content:left;padding:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options{background:#fff;box-shadow:0 0 6px rgba(0,0,0,.2);display:flex;flex-direction:column;justify-content:left}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .n-empty{padding:12px 32px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .mixins-options-active{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header .name{align-items:center;display:flex;flex:1;font-weight:700;height:34px;padding:0 12px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content{list-style:none;margin:0;max-height:250px;outline:none;overflow:auto;padding-left:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li{color:rgba(0,0,0,.65);cursor:pointer;display:flex;font-size:14px;line-height:22px;text-overflow:ellipsis;transition:background .3s ease;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li.actived{color:#5585f5}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li:hover{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li .content{flex:1;overflow:hidden;padding:5px 12px;text-overflow:ellipsis;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination{width:100%}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group .n-button{flex:1}.classify-fieldkey-popover{width:200px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
1
+ .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .parent-name{align-items:center;display:flex}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .parent-input{margin-bottom:10px;margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;display:flex;justify-content:center;margin-bottom:10px;margin-right:10px;max-width:120px;padding:0 10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;display:flex;justify-content:center;line-height:1;width:18px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px;margin-left:8px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;flex-wrap:nowrap}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px;white-space:nowrap}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.select-dynamic-popover .n-base-select-menu__empty{justify-content:left;padding:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options{background:#fff;box-shadow:0 0 6px rgba(0,0,0,.2);display:flex;flex-direction:column;justify-content:left}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .n-empty{padding:12px 32px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .mixins-options-active{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header .name{align-items:center;display:flex;flex:1;font-weight:700;height:34px;padding:0 12px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content{list-style:none;margin:0;max-height:250px;outline:none;overflow:auto;padding-left:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li{color:rgba(0,0,0,.65);cursor:pointer;display:flex;font-size:14px;line-height:22px;text-overflow:ellipsis;transition:background .3s ease;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li.actived{color:#5585f5}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li:hover{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li .content{flex:1;overflow:hidden;padding:5px 12px;text-overflow:ellipsis;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination{width:100%}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group .n-button{flex:1}.classify-fieldkey-popover{width:200px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
1
+ import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
@@ -1 +1 @@
1
- import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../shared/utils/vexutilsExpand.js";const A={key:0,class:"label-disable-wrap"},O=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},j={class:"label-wrap"},k=["id"],T={class:"edit-label-type"};var B=t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:B,emit:D}){const V=t,F=L(),P=e(null),_=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!_.inited)return!1;let t=_.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(..._.labelSelectedEdit,...V.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(_.labelSelectedEdit=$.value,"object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=_.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await V.saveLabelItem(a,t);i&&(F.success("添加成功!"),D("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=_.labelSelectedEdit)?void 0:i.length)&&x.clone(_.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}_.labelSelectedEdit=[...d],N.value++,V.explicit&&D("explicitOnChange",[..._.labelSelectedEdit])},X=async t=>{const{status:e}=await V.deleteLabel(t,V.item);if(e){F.success("删除成功!");for(const e in _.labelConfig){const l=_.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&_.labelConfig[e].itemList.splice(l,1)}const e=_.labelSelectedEdit||[],l=V.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),D("change",[...l],V.item)}D("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=P.value.querySelector("a[href='"+l+"']"),e&&e.click(),_.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);_.cacheAnchorKey=e},et=()=>{var t;return null==(t=P.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>V.labelOptions),(t=>{t&&(()=>{var t;if(V.isLock)return;const e=JSON.parse(JSON.stringify(V.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}_.labelConfig=e,C((()=>{let t;R(),V.explicit&&_.inited&&(t=_.labelAnchorKey),z(_.labelConfig,t),_.inited=!0}))})()}),{immediate:!0,deep:!0}),B({resetShowAdd:()=>{let{labelObj:t}=_.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([..._.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=_.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(_.labelSelectedEdit)){const e=_.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&_.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:P},[d(W)?(n(),s("div",A,O)):o("v-if",!0),r(c("div",K,[c("div",j,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(_.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(_.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",T,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,k),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}});export{B as default};
1
+ import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as r,createCommentVNode as d,withDirectives as o,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../shared/utils/vexutilsExpand.js";const A={key:0,class:"label-disable-wrap"},O=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},j={class:"label-wrap"},k=["id"],T={class:"edit-label-type"};var B=t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:B,emit:D}){const V=t,F=L(),P=e(null),_=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!_.inited)return!1;let t=_.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(..._.labelSelectedEdit,...V.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(_.labelSelectedEdit=$.value,"object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=_.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await V.saveLabelItem(a,t);i&&(F.success("添加成功!"),D("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let r=(null==(i=_.labelSelectedEdit)?void 0:i.length)&&x.clone(_.labelSelectedEdit,!0)||[];if(t){if(r.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;r=r.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}r.push(e)}else{const t=r.findIndex((t=>t.labelId==e.labelId));-1!=t&&r.splice(t,1)}_.labelSelectedEdit=[...r],N.value++,V.explicit&&D("explicitOnChange",[..._.labelSelectedEdit])},X=async t=>{const{status:e}=await V.deleteLabel(t,V.item);if(e){F.success("删除成功!");for(const e in _.labelConfig){const l=_.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&_.labelConfig[e].itemList.splice(l,1)}const e=_.labelSelectedEdit||[],l=V.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),D("change",[...l],V.item)}D("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=P.value.querySelector("a[href='"+l+"']"),e&&e.click(),_.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);_.cacheAnchorKey=e},et=()=>{var t;return null==(t=P.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>V.labelOptions),(t=>{t&&(()=>{var t;if(V.isLock)return;const e=JSON.parse(JSON.stringify(V.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}_.labelConfig=e,C((()=>{let t;R(),V.explicit&&_.inited&&(t=_.labelAnchorKey),z(_.labelConfig,t),_.inited=!0}))})()}),{immediate:!0,deep:!0}),B({resetShowAdd:()=>{let{labelObj:t}=_.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([..._.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=_.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(_.labelSelectedEdit)){const e=_.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&_.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:P},[r(W)?(n(),s("div",A,O)):d("v-if",!0),o(c("div",K,[c("div",j,[d(" 表单内嵌打开标签组件的样式 "),d(' <div v-if="explicit" class="explicit-continer">\r\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\r\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\r\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\r\n\t\t\t\t\t\t\t\t<span slot="tab">\r\n\t\t\t\t\t\t\t\t\t{{ i }}\r\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\r\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\r\n\t\t\t\t\t\t\t\t\t\t<labelClassify\r\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\r\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\r\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</n-tab-pane>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</n-tabs>\r\n\t\t\t\t</div> '),d("\r\n\t\t\t\t\t普通标签样式\r\n\t\t\t\t\tv-else\r\n\t\t\t\t\texplicit\r\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(r(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(_.labelConfig,((t,e)=>(n(),y(r(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),d(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(_.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",T,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,k),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:r(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!r(W)]])],512))}});export{B as default};
@@ -95,6 +95,12 @@ declare const _default: import("vue").DefineComponent<{
95
95
  };
96
96
  readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
97
97
  actionType: "check" | "uncheck";
98
+ /**
99
+ * 取消勾选树节点
100
+ * baseKeys:基准值
101
+ * currentTree:当前树节点
102
+ * value:树节点的key值
103
+ */
98
104
  value: string | number;
99
105
  }) => void>>;
100
106
  readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,ref as l,watch as a,openBlock as r,createElementBlock as i,Fragment as n,unref as s,createElementVNode as c,toDisplayString as o,normalizeStyle as d,renderList as u,normalizeClass as h,createTextVNode as p,createCommentVNode as f,createBlock as v}from"vue";import{useMessage as y,NEmpty as m}from"naive-ui";import{isEqual as k}from"lodash-es";import{useVirtualList as _}from"@vueuse/core";const g={class:"searchOrgAndStaff"},N={key:0,class:"searchOption"},S={class:"search_title"},C=["onClick"],b={class:"title"},x=["title"],D={class:"desc"},O={key:1,class:"SearchOption"},$={class:"search_title"},F=["onClick"],T={class:"title"},A={class:"desc"};var K=e({__name:"SearchOrgAndStaff",props:{treeData:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]},searchFilter:{type:Object,default:()=>({})}},emits:["notifyCheck","notifyClear"],setup(e,{emit:K}){var P;const w=e,E=y(),H=t((()=>{var e;return null!=(e=w.searchFilter.itemHeight)?e:300})),W=t((()=>Math.floor(H.value/50))),j=null!=(P=t((()=>w.treeData.filter((e=>!e.children)))))?P:[],{list:I,containerProps:M,wrapperProps:q}=_(j,{itemHeight:50,overscan:W.value}),z=t((()=>({...M.style,height:`${H.value}px`}))),B=t((()=>w.treeData.filter((e=>e.children&&e.children.length>0)))),{list:G,containerProps:J,wrapperProps:L}=_(B,{itemHeight:50,overscan:W.value}),Q=t((()=>({...J.style,height:`${H.value}px`}))),R=l(w.checkedKeys),U=l([]);function V(e){var t;if(R.value.find((t=>t===e.key)))return void E.info(`${e.title}已被选择`);if(e.disabled)return void E.info(`${e.title}已被禁用`);switch((null==(t=e.children)?void 0:t.length)>0?"org":"staff"){case"org":!function(e,t,l){t.children.length>0&&Z(t.children);X(e,t,l)}(R.value,e,e.key);break;case"staff":X(R.value,e,e.key)}K("notifyCheck",R.value),(null==w?void 0:w.searchFilter.multiple)||K("notifyClear")}function X(e,t,l){var a;if(!(null==t?void 0:t.parentNode))return R.value=[...e,l],!1;const r=null==(a=t.parentNode)?void 0:a.key;if(e.includes(r))return R.value=e,E.info(`${t.title}已存在于${t.tempTitle}中`),!1;if(t.parentNode.children){const a=t.parentNode.children.every((t=>[...e,l].includes(t.key)));if(a){const l=null==t?void 0:t.parentNode.children.map((e=>e.key)),r=e.filter((e=>!l.includes(e)));return a&&Y(r,t.parentNode),!1}}X(e,t.parentNode,l)}function Y(e,t){if(!t.parentNode||t.parentNode.children.length>1)return R.value=[...e,t.key],!1;Y(e,t.parentNode)}function Z(e){e.forEach((e=>{var t;if(R.value.includes(e.key)){const t=R.value.indexOf(e.key);R.value.splice(t,1)}(null==(t=e.children)?void 0:t.length)>0&&Z(e.children)}))}function ee(e,t){const l=w.checkedKeys;return!!e&&(l.includes(e.key)?(U.value.push(t),!1):void ee(e.parentNode,t))}return a((()=>w.treeData),(e=>{e&&e.length>0&&(U.value=[],e.forEach((e=>{ee(e,e.key)})))}),{deep:!0,immediate:!0}),a((()=>w.checkedKeys),((e,t)=>{k(e,t)||w.treeData.length>0&&(U.value=[],R.value=e,w.treeData.forEach((e=>{ee(e,e.key)})))}),{immediate:!0}),(t,l)=>{var a,y;return r(),i("div",g,[e.treeData.length>0?(r(),i(n,{key:0},[s(j).length>0?(r(),i("div",N,[c("h4",S,o(null==(a=e.searchFilter)?void 0:a.customTitles[0]),1),c("section",{class:"select-person__multipleWrapper",ref:s(M).ref,style:d(s(I).length>s(W)?s(z):{}),onScroll:l[0]||(l[0]=(...e)=>s(M).onScroll&&s(M).onScroll(...e))},[c("section",{style:d(s(q).style)},[(r(!0),i(n,null,u(s(I),(e=>(r(),i("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:h(["search_item user_item",e.data.disabled?"search_disabled":""]),onClick:t=>V(e.data)},[c("span",b,[p(o(e.data.title)+" ",1),c("span",{class:"user_item_expand",title:e.data.title_expand_strs},o(e.data.title_expand_strs),9,x)]),c("p",D,o(e.data.tempTitle),1)],10,C)])))),128))],4)],36)])):f("v-if",!0),s(B).length>0?(r(),i("div",O,[c("h4",$,o(null==(y=e.searchFilter)?void 0:y.customTitles[1]),1),c("section",{class:"person__OrgWrapper",ref:s(J).ref,style:d(s(G).length>s(W)?s(Q):{}),onScroll:l[1]||(l[1]=(...e)=>s(J).onScroll&&s(J).onScroll(...e))},[c("section",{style:d(s(L).style)},[(r(!0),i(n,null,u(s(G),(e=>(r(),i("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:h(["search_item",e.data.disabled?"search_disabled":""]),onClick:t=>V(e.data)},[c("span",T,o(e.data.title)+"("+o(e.data.innerItemsNum)+"人)",1),c("p",A,o(e.data.tempTitle),1)],10,F)])))),128))],4)],36)])):f("v-if",!0)],64)):(r(),v(s(m),{key:1,description:"暂无数据"}))])}}});export{K as default};
1
+ import{defineComponent as e,computed as t,ref as l,watch as a,openBlock as r,createElementBlock as i,Fragment as n,unref as s,createElementVNode as c,toDisplayString as o,normalizeStyle as d,renderList as u,normalizeClass as h,createTextVNode as p,createCommentVNode as f,createBlock as v}from"vue";import{useMessage as y,NEmpty as m}from"naive-ui";import{isEqual as k}from"lodash-es";import{useVirtualList as _}from"@vueuse/core";const g={class:"searchOrgAndStaff"},N={key:0,class:"searchOption"},S={class:"search_title"},C=["onClick"],b={class:"title"},x=["title"],D={class:"desc"},O={key:1,class:"SearchOption"},$={class:"search_title"},F=["onClick"],T={class:"title"},A={class:"desc"};var K=e({__name:"SearchOrgAndStaff",props:{treeData:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]},searchFilter:{type:Object,default:()=>({})}},emits:["notifyCheck","notifyClear"],setup(e,{emit:K}){var P;const w=e,E=y(),H=t((()=>{var e;return null!=(e=w.searchFilter.itemHeight)?e:300})),W=t((()=>Math.floor(H.value/50))),j=null!=(P=t((()=>w.treeData.filter((e=>!e.children)))))?P:[],{list:I,containerProps:M,wrapperProps:q}=_(j,{itemHeight:50,overscan:W.value}),z=t((()=>({...M.style,height:`${H.value}px`}))),B=t((()=>w.treeData.filter((e=>e.children&&e.children.length>0)))),{list:G,containerProps:J,wrapperProps:L}=_(B,{itemHeight:50,overscan:W.value}),Q=t((()=>({...J.style,height:`${H.value}px`}))),R=l(w.checkedKeys),U=l([]);function V(e){var t;if(R.value.find((t=>t===e.key)))return void E.info(`${e.title}已被选择`);if(e.disabled)return void E.info(`${e.title}已被禁用`);switch((null==(t=e.children)?void 0:t.length)>0?"org":"staff"){case"org":!function(e,t,l){t.children.length>0&&Z(t.children);X(e,t,l)}(R.value,e,e.key);break;case"staff":X(R.value,e,e.key)}K("notifyCheck",R.value),(null==w?void 0:w.searchFilter.multiple)||K("notifyClear")}function X(e,t,l){var a;if(!(null==t?void 0:t.parentNode))return R.value=[...e,l],!1;const r=null==(a=t.parentNode)?void 0:a.key;if(e.includes(r))return R.value=e,E.info(`${t.title}已存在于${t.tempTitle}中`),!1;if(t.parentNode.children){const a=t.parentNode.children.every((t=>[...e,l].includes(t.key)));if(a){const l=null==t?void 0:t.parentNode.children.map((e=>e.key)),r=e.filter((e=>!l.includes(e)));return a&&Y(r,t.parentNode),!1}}X(e,t.parentNode,l)}function Y(e,t){if(!t.parentNode||t.parentNode.children.length>1)return R.value=[...e,t.key],!1;Y(e,t.parentNode)}function Z(e){e.forEach((e=>{var t;if(R.value.includes(e.key)){const t=R.value.indexOf(e.key);R.value.splice(t,1)}(null==(t=e.children)?void 0:t.length)>0&&Z(e.children)}))}function ee(e,t){const l=w.checkedKeys;return!!e&&(l.includes(e.key)?(U.value.push(t),!1):void ee(e.parentNode,t))}return a((()=>w.treeData),(e=>{e&&e.length>0&&(U.value=[],e.forEach((e=>{ee(e,e.key)})))}),{deep:!0,immediate:!0}),a((()=>w.checkedKeys),((e,t)=>{k(e,t)||w.treeData.length>0&&(U.value=[],R.value=e,w.treeData.forEach((e=>{ee(e,e.key)})))}),{immediate:!0}),(t,l)=>{var a,y;return r(),i("div",g,[e.treeData.length>0?(r(),i(n,{key:0},[s(j).length>0?(r(),i("div",N,[c("h4",S,o(null==(a=e.searchFilter)?void 0:a.customTitles[0]),1),c("section",{class:"select-person__multipleWrapper",ref:s(M).ref,style:d(s(I).length>s(W)?s(z):{}),onScroll:l[0]||(l[0]=(...e)=>s(M).onScroll&&s(M).onScroll(...e))},[c("section",{style:d(s(q).style)},[(r(!0),i(n,null,u(s(I),(e=>(r(),i("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:h(["search_item user_item",e.data.disabled?"search_disabled":""]),onClick:t=>V(e.data)},[c("span",b,[p(o(e.data.title)+" ",1),c("span",{class:"user_item_expand",title:e.data.title_expand_strs},o(e.data.title_expand_strs),9,x)]),c("span",D,o(e.data.tempTitle),1)],10,C)])))),128))],4)],36)])):f("v-if",!0),s(B).length>0?(r(),i("div",O,[c("h4",$,o(null==(y=e.searchFilter)?void 0:y.customTitles[1]),1),c("section",{class:"person__OrgWrapper",ref:s(J).ref,style:d(s(G).length>s(W)?s(Q):{}),onScroll:l[1]||(l[1]=(...e)=>s(J).onScroll&&s(J).onScroll(...e))},[c("section",{style:d(s(L).style)},[(r(!0),i(n,null,u(s(G),(e=>(r(),i("div",{class:"select-person__multiple-search",key:e.data.key},[c("div",{class:h(["search_item",e.data.disabled?"search_disabled":""]),onClick:t=>V(e.data)},[c("span",T,o(e.data.title)+"("+o(e.data.innerItemsNum)+"人)",1),c("span",A,o(e.data.tempTitle),1)],10,F)])))),128))],4)],36)])):f("v-if",!0)],64)):(r(),v(s(m),{key:1,description:"暂无数据"}))])}}});export{K as default};
@@ -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,createCommentVNode as o,withKeys as s,createTextVNode as d,toDisplayString as h,withDirectives as v,vShow as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as _,NGi as b,NSpace as C,NInputGroup as w,NInput as x,NIcon as L,NButton as S,NCheckbox as j,NTree as T}from"naive-ui";import{CloseCircleSharp as N}from"@vicons/ionicons5";import{searchFilterTree as I,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as O}from"lodash-es";import{SearchTypeConfig as $}from"./types/enums.js";import D from"./SearchMultiple.vue.js";import E from"./SearchOrgAndStaff.vue.js";const K={key:0},q={class:"c-select-person__scroll",style:{height:"342px"}};var A=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{expose:A,emit:B}){const P=e,R={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},U=l(""),H=l(!1),W=l([]),G=l([]),z=l([]),M=l([]),J=l([]),Q=l(!1),V=O(function e(l){return l.forEach((l=>{var t;if(null==(t=l.children)?void 0:t.length){const t=se(l.children,[]);l.innerItemsNum=t.length,l.innerLeafs=t,e(l.children)}})),de(l,"")}(P.data));let X=[];const Y=t((()=>!!P.queryLoadChildData)),Z=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.treeSetting)?void 0:e.checkStrategy)?l:"child"})),ee=t((()=>(null==P?void 0:P.searchFilter)&&Object.keys(null==P?void 0:P.searchFilter).length>0)),le=t((()=>ee.value?{...O(R),...P.searchFilter}:O(R))),te=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),ne=t((()=>{let e=[];return W.value.forEach((l=>{for(let t=0;t<M.value.length;t++){const n=M.value[t];if(n.key==l){e.push(n);break}}})),e}));function ae(e){e.disabled||e.children||!e.key||X.push(e.key)}function ue(e){e.disabled||e.tempTitle||!e.key||X.push(e.key)}async function ie(e){if(P.queryLoadChildData){const l=await P.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function re(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ce({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||Y.value&&!(null==e?void 0:e.isLeaf)){const l=P.wordbook.user_count_obj&&e[P.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}{const l=null!=(t=e.title_expand_strs)?t:"";return c("p",{class:"user_item"},[e.title,c("span",{class:"user_item_expand",title:l},[l])])}}function oe(e){return e[P.wordbookChild.user_name_obj]||e[P.wordbook.parent_name_obj]||e.orgName||e.title||""}function se(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?se(e.children,l):!e.disabled&&l.push(e)})),l}function de(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=oe(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?de(null==e?void 0:e.children,a):[]}})):[]}async function he(){var e,l;const t=null!=(l=null==(e=null==P?void 0:P.wordbook)?void 0:e.filter_key)?l:"keyword";if(Q.value=!!U.value.trim(),Y.value)z.value=await P.queryTreeSearch(U.value);else{const e=function(){const e={[$.SEARCH_ORG_STAFF]:ee.value,[$.SEARCH_ORG]:P.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();z.value=I(e,V,U.value,t)}G.value=z.value.length&&U.value?F(z.value):[]}function ve(e,l){var t,n;switch(null!=(n=null==(t=null==P?void 0:P.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}n.children&&ve(n.children,l)}}(e,l);break;case"parent":!function(e,l){W.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}}}(e,l)}}function pe(e){ve(z.value,e)}function fe(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=J.value.map((e=>e.key));W.value.includes(n.key)&&!a.includes(n.key)&&M.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs,originItem:n}),(null==(l=n.children)?void 0:l.length)&&fe(n.children)}}function ye(e){W.value=e}function ke(){W.value=[]}function me(e){W.value=e}function ge(){U.value="",setTimeout((()=>{he()}))}return function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];let o=te.value.reduce(((e,l)=>e+(c[l]?`${c[l]},`:"")),"");switch(c.title_expand_strs=o.slice(0,-1),c.title=oe(c),c.label=oe(c),c.parentNode=t,c.key||(c.key=c[P.wordbookChild.user_id_obj]||c[P.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),re(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==P?void 0:P.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":ae(c);break;case"parent":ue(c)}}}(V,null),z.value=V,P.defaultList.length>0&&(Y.value?(P.defaultList.forEach((e=>W.value.push(e.key))),M.value=O(P.defaultList),J.value=O(P.defaultList)):(P.defaultList.forEach((e=>W.value.push(e))),fe(V))),n((()=>W),(e=>{M.value=J.value.filter((l=>e.value.includes(l.key))),e.value.length&&fe(Y.value?z.value:V),H.value=X.every((e=>M.value.findIndex((l=>l.key===e))>-1));const l=M.value.filter((l=>e.value.includes(l.key)));B("check",e.value),B("checkWithLevel",l)}),{deep:!0}),n((()=>U.value),(e=>{e||ge()})),A({getCheckWithLevel:function(){const e=W.value,l=M.value.filter((l=>e.includes(l.key)));return null!=l?l:[]}}),(l,t)=>(a(),u(i(_),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(w),{style:{"margin-bottom":"12px"}},{default:r((()=>[o(" clearable "),c(i(x),{class:"search-input",value:U.value,"onUpdate:value":t[0]||(t[0]=e=>U.value=e),placeholder:e.searchPlaceholder,onKeyup:s(he,["enter"])},{suffix:r((()=>[U.value?(a(),u(i(L),{key:0,class:"search-clear",component:i(N),size:"16",onClick:ge},null,8,["component"])):o("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),c(i(S),{type:"primary",onClick:he},{default:r((()=>[d(h(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!Q.value?v((a(),u(i(j),{key:0,checked:H.value,"onUpdate:checked":[t[1]||(t[1]=e=>H.value=e),pe]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[p,i(X).length<1e3]]):o("v-if",!0),o(" 支持选人 "),e.searchInner&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),u(D,{key:1,treeData:z.value,checkedKeys:W.value,onNotifyCheck:me},null,8,["treeData","checkedKeys"])):i(ee)&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),f(y,{key:2},[o(" 同时兼容选人和选部门 "),c(E,{treeData:z.value,checkedKeys:W.value,searchFilter:i(le),onNotifyCheck:me,onNotifyClear:ge},null,8,["treeData","checkedKeys","searchFilter"])],2112)):(a(),u(i(T),k({key:3,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":W.value,"expanded-keys":G.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>G.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":W.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>W.value=e),data:z.value,"check-strategy":"child","render-label":ce},e.treeSetting,{"onUpdate:checkedKeys":ye,onLoad:ie}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),f("span",K,"已选择:"+h(i(ne).length),1)):o("v-if",!0),e.showClear?(a(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ke},"清空")):o("v-if",!0)])),_:1}),m("div",q,[(a(!0),f(y,null,g(i(ne),(e=>(a(),f("span",{class:"c-select-person__tag-item",key:e.key},[d(h(e.name)+" "+h(e.parentName?`(${e.parentName})`:"")+" "+h(e.innerItemsNum?`(${e.innerItemsNum}人)`:"")+" ",1),c(i(L),{class:"tag-close",component:i(N),onClick:l=>function(e){W.value=W.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{A as default};
1
+ import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,createCommentVNode as o,withKeys as s,createTextVNode as d,toDisplayString as h,withDirectives as v,vShow as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as _,NGi as b,NSpace as C,NInputGroup as w,NInput as x,NIcon as L,NButton as S,NCheckbox as j,NTree as T}from"naive-ui";import{CloseCircleSharp as N}from"@vicons/ionicons5";import{searchFilterTree as I,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as O}from"lodash-es";import{SearchTypeConfig as $}from"./types/enums.js";import D from"./SearchMultiple.vue.js";import K from"./SearchOrgAndStaff.vue.js";const q={key:0},A={class:"c-select-person__scroll",style:{height:"342px"}};var B=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{expose:B,emit:E}){const P=e,R={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},U=l(""),H=l(!1),W=l([]),G=l([]),z=l([]),M=l([]),J=l([]),Q=l(!1),V=O(function e(l){var t;for(let n=0,a=l.length;n<a;n++){const a=l[n];if(null==(t=a.children)?void 0:t.length){const l=se(a.children,[]);a.innerItemsNum=l.length,a.innerLeafs=l,e(a.children)}}return de(l,"")}(P.data));let X=[];const Y=t((()=>!!P.queryLoadChildData)),Z=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.treeSetting)?void 0:e.checkStrategy)?l:"child"})),ee=t((()=>(null==P?void 0:P.searchFilter)&&Object.keys(null==P?void 0:P.searchFilter).length>0)),le=t((()=>ee.value?{...O(R),...P.searchFilter}:O(R))),te=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),ne=t((()=>{let e=[];return W.value.forEach((l=>{for(let t=0,n=M.value.length;t<n;t++){const n=M.value[t];if(n.key==l){e.push(n);break}}})),e}));function ae(e){e.disabled||e.children||!e.key||X.push(e.key)}function ue(e){e.disabled||e.tempTitle||!e.key||X.push(e.key)}async function ie(e){if(P.queryLoadChildData){const l=await P.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function re(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ce({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||Y.value&&!(null==e?void 0:e.isLeaf)){const l=P.wordbook.user_count_obj&&e[P.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}{const l=null!=(t=e.title_expand_strs)?t:"";return c("p",{class:"user_item"},[e.title,c("span",{class:"user_item_expand",title:l},[l])])}}function oe(e){return e[P.wordbookChild.user_name_obj]||e[P.wordbook.parent_name_obj]||e.orgName||e.title||""}function se(e,l){var t;for(let n=0,a=e.length;n<a;n++){const a=e[n];(null==(t=a.children)?void 0:t.length)?se(a.children,l):!a.disabled&&l.push(a)}return l}function de(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=oe(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?de(null==e?void 0:e.children,a):[]}})):[]}async function he(){var e,l;const t=null!=(l=null==(e=null==P?void 0:P.wordbook)?void 0:e.filter_key)?l:"keyword";if(Q.value=!!U.value.trim(),Y.value)z.value=await P.queryTreeSearch(U.value);else{const e=function(){const e={[$.SEARCH_ORG_STAFF]:ee.value,[$.SEARCH_ORG]:P.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();z.value=I(e,V,U.value,t)}G.value=z.value.length&&U.value?F(z.value):[]}function ve(e,l){var t,n;switch(null!=(n=null==(t=null==P?void 0:P.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}n.children&&ve(n.children,l)}}(e,l);break;case"parent":!function(e,l){W.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}}}(e,l)}}function pe(e){ve(z.value,e)}function fe(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=J.value.map((e=>e.key));W.value.includes(n.key)&&!a.includes(n.key)&&M.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs,originItem:n}),(null==(l=n.children)?void 0:l.length)&&fe(n.children)}}function ye(e){W.value=e}function ke(){W.value=[]}function me(e){W.value=e}function ge(){U.value="",setTimeout((()=>{he()}))}return function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];let o=te.value.reduce(((e,l)=>e+(c[l]?`${c[l]},`:"")),"");switch(c.title_expand_strs=o.slice(0,-1),c.title=oe(c),c.label=oe(c),c.parentNode=t,c.key||(c.key=c[P.wordbookChild.user_id_obj]||c[P.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),re(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==P?void 0:P.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":ae(c);break;case"parent":ue(c)}}}(V,null),z.value=V,P.defaultList.length>0&&(Y.value?(P.defaultList.forEach((e=>W.value.push(e.key))),M.value=O(P.defaultList),J.value=O(P.defaultList)):(P.defaultList.forEach((e=>W.value.push(e))),fe(V))),n((()=>W),(e=>{M.value=J.value.filter((l=>e.value.includes(l.key))),e.value.length&&fe(Y.value?z.value:V),H.value=X.every((e=>M.value.findIndex((l=>l.key===e))>-1));const l=M.value.filter((l=>e.value.includes(l.key)));E("check",e.value),E("checkWithLevel",l)}),{deep:!0}),n((()=>U.value),(e=>{e||ge()})),B({getCheckWithLevel:function(){const e=W.value,l=M.value.filter((l=>e.includes(l.key)));return null!=l?l:[]}}),(l,t)=>(a(),u(i(_),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(w),{style:{"margin-bottom":"12px"}},{default:r((()=>[o(" clearable "),c(i(x),{class:"search-input",value:U.value,"onUpdate:value":t[0]||(t[0]=e=>U.value=e),placeholder:e.searchPlaceholder,onKeyup:s(he,["enter"])},{suffix:r((()=>[U.value?(a(),u(i(L),{key:0,class:"search-clear",component:i(N),size:"16",onClick:ge},null,8,["component"])):o("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),c(i(S),{type:"primary",onClick:he},{default:r((()=>[d(h(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!Q.value?v((a(),u(i(j),{key:0,checked:H.value,"onUpdate:checked":[t[1]||(t[1]=e=>H.value=e),pe]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[p,i(X).length<1e3]]):o("v-if",!0),o(" 支持选人 "),e.searchInner&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),u(D,{key:1,treeData:z.value,checkedKeys:W.value,onNotifyCheck:me},null,8,["treeData","checkedKeys"])):i(ee)&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),f(y,{key:2},[o(" 同时兼容选人和选部门 "),c(K,{treeData:z.value,checkedKeys:W.value,searchFilter:i(le),onNotifyCheck:me,onNotifyClear:ge},null,8,["treeData","checkedKeys","searchFilter"])],2112)):(a(),u(i(T),k({key:3,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":W.value,"expanded-keys":G.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>G.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":W.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>W.value=e),data:z.value,"check-strategy":"child","render-label":ce},e.treeSetting,{"onUpdate:checkedKeys":ye,onLoad:ie}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),f("span",q,"已选择:"+h(i(ne).length),1)):o("v-if",!0),e.showClear?(a(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ke},"清空")):o("v-if",!0)])),_:1}),m("div",A,[(a(!0),f(y,null,g(i(ne),(e=>(a(),f("span",{class:"c-select-person__tag-item",key:e.key},[d(h(e.name)+" "+h(e.parentName?`(${e.parentName})`:"")+" "+h(e.innerItemsNum?`(${e.innerItemsNum}人)`:"")+" ",1),c(i(L),{class:"tag-close",component:i(N),onClick:l=>function(e){W.value=W.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{B as default};
@@ -2320,7 +2320,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2320
2320
  onKeydown: (event: KeyboardEvent) => Promise<void>;
2321
2321
  clearSpan: (uuid: string) => void;
2322
2322
  exposeEvent: {
2323
- validate(path?: string, { force }?: {
2323
+ validate(path?: string | ((field: import("@formily/core").Field<any, any, any, any>) => boolean), { force }?: {
2324
2324
  force?: boolean | undefined;
2325
2325
  }): Promise<void>;
2326
2326
  getFormValues(needCombineExtendKey?: boolean): any;