cnhis-design-vue 3.1.42-beta.8 → 3.1.42-beta.80

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 (289) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/base-search/index.d.ts +2 -2
  3. package/es/components/base-search/src/index.vue.d.ts +2 -2
  4. package/es/components/base-search/style/index.css +1 -1
  5. package/es/components/big-table/index.d.ts +3 -4
  6. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  7. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  8. package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  10. package/es/components/big-table/src/hooks/useEvent.js +1 -1
  11. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  12. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  13. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  14. package/es/components/big-table/src/utils.d.ts +11 -1
  15. package/es/components/big-table/src/utils.js +1 -1
  16. package/es/components/big-table/style/index.css +1 -1
  17. package/es/components/bpmn-workflow/index.d.ts +12 -0
  18. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.d.ts +12 -0
  19. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  20. package/es/components/button-print/index.d.ts +32 -7
  21. package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -8
  22. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  23. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  24. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  25. package/es/components/button-print/src/utils/print.js +1 -1
  26. package/es/components/classification/index.d.ts +13 -13
  27. package/es/components/classification/src/components/set-classification/index.vue.d.ts +9 -9
  28. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  29. package/es/components/classification/src/components/table-modal/index.vue.d.ts +9 -9
  30. package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
  31. package/es/components/classification/src/index.vue.d.ts +14 -14
  32. package/es/components/classification/src/index.vue.js +1 -1
  33. package/es/components/classification/style/index.css +1 -1
  34. package/es/components/config-provider/src/ConfigProvider.js +1 -1
  35. package/es/components/config-provider/src/interface.d.ts +4 -4
  36. package/es/components/date-picker/index.d.ts +4 -0
  37. package/es/components/date-picker/src/DatePicker.vue.d.ts +4 -0
  38. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  39. package/es/components/fabric-chart/index.d.ts +2 -2
  40. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  41. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -0
  42. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +16 -0
  47. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -0
  48. package/es/components/field-set/index.d.ts +26 -81
  49. package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
  50. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  51. package/es/components/field-set/style/index.css +1 -1
  52. package/es/components/form-config/index.d.ts +88 -42
  53. package/es/components/form-config/src/FormConfig.vue.d.ts +88 -42
  54. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  55. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +27 -13
  56. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +47 -23
  57. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  58. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  59. package/es/components/form-config/src/constants/index.d.ts +19 -1
  60. package/es/components/form-config/src/constants/index.js +1 -1
  61. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  62. package/es/components/form-config/src/types/index.d.ts +1 -0
  63. package/es/components/form-render/index.d.ts +27 -13
  64. package/es/components/form-render/index.js +1 -1
  65. package/es/components/form-render/src/FormRender.vue.d.ts +27 -13
  66. package/es/components/form-render/src/FormRender.vue.js +1 -1
  67. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +27 -13
  68. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  69. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  70. package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
  71. package/es/components/form-render/src/components/renderer/date.js +1 -1
  72. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
  73. package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +18 -0
  74. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  75. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  76. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  77. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +56 -2
  78. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  79. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +18 -0
  80. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  81. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +36 -0
  82. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  83. package/es/components/form-render/src/components/renderer/select.d.ts +32 -5
  84. package/es/components/form-render/src/components/renderer/select.js +1 -1
  85. package/es/components/form-render/src/hooks/index.d.ts +1 -1
  86. package/es/components/form-render/src/hooks/index.js +1 -1
  87. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -0
  88. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  89. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +2 -1
  90. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  91. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  92. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  93. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  94. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  95. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  96. package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
  97. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  98. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
  99. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  100. package/es/components/form-render/src/types/fieldItem.d.ts +15 -5
  101. package/es/components/form-render/src/types/index.d.ts +4 -3
  102. package/es/components/form-render/style/index.css +1 -1
  103. package/es/components/iho-table/index.d.ts +26 -5
  104. package/es/components/iho-table/src/IhoTable.vue.d.ts +26 -5
  105. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  106. package/es/components/iho-table/src/constants/index.d.ts +3 -2
  107. package/es/components/iho-table/src/constants/index.js +1 -1
  108. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -4
  109. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  110. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +24 -21
  111. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -1
  112. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
  113. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
  114. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
  115. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
  116. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  117. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  118. package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -1
  119. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
  120. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  121. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.d.ts +11 -0
  122. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.js +1 -0
  123. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.d.ts +1 -0
  124. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -0
  125. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +48 -0
  126. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -0
  127. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.d.ts +1 -0
  128. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -0
  129. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  130. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  131. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  132. package/es/components/iho-table/src/plugins/highLightSetPlugin.d.ts +1 -0
  133. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -0
  134. package/es/components/iho-table/src/plugins/index.js +1 -1
  135. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  136. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.d.ts +1 -0
  137. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.js +1 -0
  138. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +4 -0
  139. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useTriggerEvent.d.ts +0 -0
  140. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useTriggerEvent.js +1 -0
  141. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
  142. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  143. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  144. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
  145. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  146. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -1
  147. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  148. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  149. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  150. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -1
  151. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
  152. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
  153. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  154. package/es/components/iho-table/src/types/index.d.ts +48 -5
  155. package/es/components/iho-table/src/types/pluginType.d.ts +32 -39
  156. package/es/components/iho-table/src/utils/index.d.ts +8 -3
  157. package/es/components/iho-table/src/utils/index.js +1 -1
  158. package/es/components/iho-table/style/iconfont.ttf +0 -0
  159. package/es/components/iho-table/style/index.css +1 -1
  160. package/es/components/index.css +1 -1
  161. package/es/components/index.d.ts +1 -0
  162. package/es/components/index.js +1 -1
  163. package/es/components/info-header/index.d.ts +56 -27
  164. package/es/components/info-header/src/InfoHeader.vue.d.ts +56 -27
  165. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  166. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  167. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +27 -13
  168. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +28 -13
  169. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  170. package/es/components/info-header/style/index.css +1 -1
  171. package/es/components/keyboard/index.d.ts +4 -2
  172. package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -2
  173. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  174. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +3 -1
  175. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  176. package/es/components/keyboard/src/constants/index.js +1 -1
  177. package/es/components/keyboard/style/index.css +1 -1
  178. package/es/components/map/index.d.ts +2 -14
  179. package/es/components/map/src/Map.vue.d.ts +1 -14
  180. package/es/components/map/src/types/index.d.ts +19 -0
  181. package/es/components/map/src/types/index.js +1 -0
  182. package/es/components/recommend-search/index.d.ts +13 -128
  183. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +15 -130
  184. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  185. package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
  186. package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
  187. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -63
  188. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  189. package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +1 -3
  190. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  191. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -62
  192. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  193. package/es/components/recommend-search/src/constant/index.d.ts +3 -0
  194. package/es/components/recommend-search/src/constant/index.js +1 -1
  195. package/es/components/scale-view/index.d.ts +38 -224
  196. package/es/components/scale-view/index.js +1 -1
  197. package/es/components/scale-view/src/ScaleView.vue.d.ts +37 -224
  198. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  199. package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
  200. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  201. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
  202. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  203. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  204. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  205. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
  206. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  207. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  208. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +8 -8
  209. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  210. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  211. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
  212. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  213. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  214. package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
  215. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  216. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  217. package/es/components/scale-view/src/hooks/use-component.d.ts +74 -4
  218. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
  219. package/es/components/scale-view/src/hooks/use-event.js +1 -1
  220. package/es/components/scale-view/src/types/index.d.ts +7 -0
  221. package/es/components/scale-view/src/types/index.js +1 -0
  222. package/es/components/scale-view/style/index.css +1 -1
  223. package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
  224. package/es/components/search-cascader/index.d.ts +12 -1
  225. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
  226. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  227. package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
  228. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  229. package/es/components/search-cascader/src/constants/index.d.ts +1 -0
  230. package/es/components/search-cascader/src/constants/index.js +1 -1
  231. package/es/components/select-label/index.d.ts +1 -1
  232. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  233. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  234. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  235. package/es/components/select-label/style/index.css +1 -1
  236. package/es/components/select-person/index.d.ts +199 -10
  237. package/es/components/select-person/src/SearchMultiple.vue.d.ts +125 -0
  238. package/es/components/select-person/src/SearchMultiple.vue.js +1 -0
  239. package/es/components/select-person/src/SearchMultiple.vue2.js +1 -0
  240. package/es/components/select-person/src/SelectPerson.vue.d.ts +186 -9
  241. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  242. package/es/components/select-person/src/utils/index.js +1 -1
  243. package/es/components/select-person/style/index.css +1 -1
  244. package/es/components/shortcut-setter/index.d.ts +33 -16
  245. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +33 -16
  246. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  247. package/es/components/steps-wheel/src/constants/index.js +1 -1
  248. package/es/components/steps-wheel/style/index.css +1 -1
  249. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +4 -4
  250. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
  251. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +5 -5
  252. package/es/components/table-filter/src/types/index.d.ts +11 -2
  253. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  254. package/es/components/vod-chunk-upload/index.d.ts +73 -3
  255. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -3
  256. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  257. package/es/env.d.ts +1 -0
  258. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  259. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  260. package/es/shared/{mixins → hooks}/index.d.ts +1 -0
  261. package/es/shared/{mixins → hooks}/index.js +1 -1
  262. package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
  263. package/es/shared/hooks/useAsyncQueue.js +1 -0
  264. package/es/shared/{mixins → hooks}/useDateTime.d.ts +2 -2
  265. package/es/shared/hooks/useDateTime.js +1 -0
  266. package/es/shared/package.json.js +1 -0
  267. package/es/shared/utils/anime.d.ts +1 -1
  268. package/es/shared/utils/anime.js +1 -1
  269. package/es/shared/utils/index.d.ts +3 -14
  270. package/es/shared/utils/index.js +1 -1
  271. package/es/shared/utils/vexutils.d.ts +2 -2
  272. package/es/shared/utils/vexutils.js +1 -1
  273. package/es/shared/utils/vexutilsExpand.d.ts +254 -0
  274. package/es/shared/utils/vexutilsExpand.js +1 -0
  275. package/package.json +2 -2
  276. package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
  277. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
  278. package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
  279. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +0 -115
  280. package/es/components/scale-view/src/hooks/scaleview-props.js +0 -1
  281. package/es/shared/mixins/useDateTime.js +0 -1
  282. package/es/shared/utils/colorLog.d.ts +0 -31
  283. package/es/shared/utils/colorLog.js +0 -1
  284. /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
  285. /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
  286. /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
  287. /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
  288. /package/es/shared/{mixins → hooks}/useTheme.d.ts +0 -0
  289. /package/es/shared/{mixins → hooks}/useTheme.js +0 -0
@@ -0,0 +1,125 @@
1
+ import { ref, PropType, CSSProperties } from 'vue';
2
+ declare type IKey = string | number;
3
+ declare type ITreeOption = {
4
+ key: IKey;
5
+ children: any[];
6
+ parentNode: any;
7
+ [key: string]: any;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<{
10
+ treeData: {
11
+ type: PropType<any[]>;
12
+ default: () => never[];
13
+ };
14
+ checkedKeys: {
15
+ type: PropType<IKey[]>;
16
+ default: () => never[];
17
+ };
18
+ }, {
19
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
20
+ treeData: {
21
+ type: PropType<any[]>;
22
+ default: () => never[];
23
+ };
24
+ checkedKeys: {
25
+ type: PropType<IKey[]>;
26
+ default: () => never[];
27
+ };
28
+ }>> & {
29
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
30
+ }>>;
31
+ emit: (event: "notifyCheck", ...args: any[]) => void;
32
+ optionsRef: import("vue").ComputedRef<any[]>;
33
+ list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
34
+ containerProps: {
35
+ ref: import("vue").Ref<any>;
36
+ onScroll: () => void;
37
+ style: Partial<CSSStyleDeclaration>;
38
+ };
39
+ wrapperProps: import("vue").ComputedRef<{
40
+ style: {
41
+ width: string;
42
+ height: string;
43
+ marginTop: string;
44
+ };
45
+ }>;
46
+ containerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
47
+ searchCheckKeys: import("vue").Ref<IKey[]>;
48
+ showSelectKeys: import("vue").Ref<(string | number)[]>;
49
+ checkedChange: (checkList: (string | number)[], meta: {
50
+ actionType: 'check' | 'uncheck';
51
+ value: string | number;
52
+ }) => void;
53
+ handleCheckKey: (baseKeys: (string | number)[], currentTree: ITreeOption | null, value: string | number) => false | undefined;
54
+ findParent: (baseKeys: (string | number)[], currentTree: ITreeOption) => false | undefined;
55
+ handleUnCheckKey: (baseKeys: (string | number)[], currentTree: ITreeOption, value: string | number) => false | undefined;
56
+ findChild: (baseKeys: (string | number)[], children: ITreeOption[], value: string | number) => false | undefined;
57
+ checkInitTree: (tree: ITreeOption, baseKey: string | number) => false | undefined;
58
+ ref: typeof ref;
59
+ NCheckboxGroup: import("vue").DefineComponent<{
60
+ readonly min: NumberConstructor;
61
+ readonly max: NumberConstructor;
62
+ readonly size: PropType<"small" | "medium" | "large">;
63
+ readonly value: PropType<(string | number)[] | null>;
64
+ readonly defaultValue: {
65
+ readonly type: PropType<(string | number)[] | null>;
66
+ readonly default: null;
67
+ };
68
+ readonly disabled: {
69
+ readonly type: PropType<boolean | undefined>;
70
+ readonly default: undefined;
71
+ };
72
+ readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
73
+ actionType: "check" | "uncheck";
74
+ value: string | number;
75
+ }) => void>>;
76
+ readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
77
+ actionType: "check" | "uncheck";
78
+ value: string | number;
79
+ }) => void>>;
80
+ readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
81
+ }, {
82
+ mergedClsPrefix: import("vue").ComputedRef<string>;
83
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
84
+ readonly min: NumberConstructor;
85
+ readonly max: NumberConstructor;
86
+ readonly size: PropType<"small" | "medium" | "large">;
87
+ readonly value: PropType<(string | number)[] | null>;
88
+ readonly defaultValue: {
89
+ readonly type: PropType<(string | number)[] | null>;
90
+ readonly default: null;
91
+ };
92
+ readonly disabled: {
93
+ readonly type: PropType<boolean | undefined>;
94
+ readonly default: undefined;
95
+ };
96
+ readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
97
+ actionType: "check" | "uncheck";
98
+ value: string | number;
99
+ }) => void>>;
100
+ readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
101
+ actionType: "check" | "uncheck";
102
+ value: string | number;
103
+ }) => void>>;
104
+ readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
105
+ }>>, {
106
+ readonly disabled: boolean | undefined;
107
+ readonly defaultValue: (string | number)[] | null;
108
+ }>;
109
+ NCheckbox: any;
110
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "notifyCheck"[], "notifyCheck", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
111
+ treeData: {
112
+ type: PropType<any[]>;
113
+ default: () => never[];
114
+ };
115
+ checkedKeys: {
116
+ type: PropType<IKey[]>;
117
+ default: () => never[];
118
+ };
119
+ }>> & {
120
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
121
+ }, {
122
+ treeData: any[];
123
+ checkedKeys: IKey[];
124
+ }>;
125
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./SearchMultiple.vue2.js";import r from"../../../_virtual/plugin-vue_export-helper.js";var l=r(e,[["__file","SearchMultiple.vue"]]);export{l as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,computed as t,ref as a,watch as r,openBlock as l,createBlock as n,unref as i,withCtx as o,createElementVNode as u,normalizeStyle as c,createElementBlock as d,Fragment as s,renderList as p,createVNode as v}from"vue";import{NCheckboxGroup as f,NCheckbox as y}from"naive-ui";import{isEqual as h}from"lodash-es";import{useVirtualList as k}from"@vueuse/core";var m=e({__name:"SearchMultiple",props:{treeData:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},emits:["notifyCheck"],setup(e,{emit:m}){const N=e,_=t((()=>N.treeData)),{list:b,containerProps:g,wrapperProps:D}=k(_,{itemHeight:30,overscan:5}),A=t((()=>({...g.style,height:"308px"}))),K=a(N.checkedKeys),S=a([]);function x(e,t){const{actionType:a,value:r}=t,l=N.treeData.find((e=>e.key===r));if(l){switch(a){case"check":w(K.value.filter((e=>e!==r)),l,r);break;case"uncheck":E(K.value,l,r)}m("notifyCheck",K.value)}}function w(e,t,a){var r;if(!(null==t?void 0:t.parentNode))return K.value=[...e,a],!1;const l=null==(r=t.parentNode)?void 0:r.key;if(e.includes(l))return K.value=e,!1;if(t.parentNode.children){const r=t.parentNode.children.every((t=>[...e,a].includes(t.key)));if(r){const a=null==t?void 0:t.parentNode.children.map((e=>e.key)),l=e.filter((e=>!a.includes(e)));return r&&C(l,t.parentNode),!1}}w(e,t.parentNode,a)}function C(e,t){if(!t.parentNode||t.parentNode.children.length>1)return K.value=[...e,t.key],!1;C(e,t.parentNode)}function E(e,t,a){var r,l;if(e.includes(a)){const t=e.filter((e=>e!==a));return K.value=t,!1}if(!(null==t?void 0:t.parentNode))return K.value=e,!1;const n=null==(r=t.parentNode)?void 0:r.key,i=e.indexOf(n);if(i>-1){const r=null==(l=t.parentNode)?void 0:l.children;return e.splice(i,1),P(e,r,a),!1}E(e,t.parentNode,a)}function P(e,t,a){if(!Array.isArray(t))return K.value=e,!1;if(t.length>1){const r=t.filter((e=>e.key!==a)).map((e=>e.key));return K.value=[...e,...r],!1}P(e,t[0].children,a)}function H(e,t){const a=N.checkedKeys;return!!e&&(a.includes(e.key)?(S.value.push(t),!1):void H(e.parentNode,t))}return r((()=>N.treeData),(e=>{e&&e.length>0&&(S.value=[],e.forEach((e=>{H(e,e.key)})))}),{deep:!0,immediate:!0}),r((()=>N.checkedKeys),((e,t)=>{h(e,t)||N.treeData.length>0&&(S.value=[],K.value=e,N.treeData.forEach((e=>{H(e,e.key)})))}),{immediate:!0}),(e,t)=>(l(),n(i(f),{value:S.value,"onUpdate:value":[t[1]||(t[1]=e=>S.value=e),x]},{default:o((()=>[u("section",{class:"select-person__multipleWrapper",ref:i(g).ref,style:c(i(A)),onScroll:t[0]||(t[0]=(...e)=>i(g).onScroll&&i(g).onScroll(...e))},[u("section",{style:c(i(D).style)},[(l(!0),d(s,null,p(i(b),(e=>(l(),d("div",{class:"select-person__multiple-search",key:e.data.key},[v(i(y),{value:e.data.key,label:e.data.title,disabled:e.data.disabled},null,8,["value","label","disabled"])])))),128))],4)],36)])),_:1},8,["value"]))}});export{m as default};
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import { ref, PropType } from 'vue';
2
2
  import { type TreeOption } from 'naive-ui';
3
3
  import { AnyObject } from '../../../../es/shared/types';
4
4
  declare type IKey = string | number;
@@ -15,6 +15,7 @@ declare type IWordBookChild<T> = {
15
15
  declare type ITag = {
16
16
  key: IKey;
17
17
  name: string;
18
+ [key: string]: any;
18
19
  };
19
20
  declare const _default: import("vue").DefineComponent<{
20
21
  defaultList: {
@@ -53,8 +54,12 @@ declare const _default: import("vue").DefineComponent<{
53
54
  type: BooleanConstructor;
54
55
  default: boolean;
55
56
  };
57
+ treeSetting: {
58
+ type: PropType<ITreeOption>;
59
+ default: () => {};
60
+ };
56
61
  queryLoadChildData: {
57
- type: PropType<(node: TreeOption) => Promise<void>>;
62
+ type: PropType<(node: TreeOption) => Promise<AnyObject>>;
58
63
  default: undefined;
59
64
  };
60
65
  queryTreeSearch: {
@@ -99,8 +104,12 @@ declare const _default: import("vue").DefineComponent<{
99
104
  type: BooleanConstructor;
100
105
  default: boolean;
101
106
  };
107
+ treeSetting: {
108
+ type: PropType<ITreeOption>;
109
+ default: () => {};
110
+ };
102
111
  queryLoadChildData: {
103
- type: PropType<(node: TreeOption) => Promise<void>>;
112
+ type: PropType<(node: TreeOption) => Promise<AnyObject>>;
104
113
  default: undefined;
105
114
  };
106
115
  queryTreeSearch: {
@@ -109,8 +118,9 @@ declare const _default: import("vue").DefineComponent<{
109
118
  };
110
119
  }>> & {
111
120
  onCheck?: ((...args: any[]) => any) | undefined;
121
+ onCheckWithLevel?: ((...args: any[]) => any) | undefined;
112
122
  }>>;
113
- emit: (event: "check", ...args: any[]) => void;
123
+ emit: (event: "check" | "checkWithLevel", ...args: any[]) => void;
114
124
  keyword: import("vue").Ref<string>;
115
125
  checkedAll: import("vue").Ref<boolean>;
116
126
  checkedKeys: import("vue").Ref<IKey[]>;
@@ -127,21 +137,40 @@ declare const _default: import("vue").DefineComponent<{
127
137
  suffix?: (() => import("vue").VNodeChild) | undefined;
128
138
  }[]>;
129
139
  tagData: import("vue").Ref<{
140
+ [x: string]: any;
141
+ key: IKey;
142
+ name: string;
143
+ }[]>;
144
+ initTagData: import("vue").Ref<{
145
+ [x: string]: any;
130
146
  key: IKey;
131
147
  name: string;
132
148
  }[]>;
133
- temp: ITreeOption[];
149
+ isSearch: import("vue").Ref<boolean>;
150
+ temp: TreeOption[];
134
151
  allCheckedKeys: IKey[];
135
152
  isRemote: import("vue").ComputedRef<boolean>;
153
+ checkStrategyResult: import("vue").ComputedRef<any>;
136
154
  init: () => void;
155
+ getallCheckedKeysWithChild: (item: TreeOption) => void;
156
+ getallCheckedKeysWithParent: (item: TreeOption) => void;
157
+ queryLoadChildNode: (node: TreeOption) => Promise<AnyObject>;
137
158
  setDisabled: (data: TreeOption) => void;
138
159
  renderLabel: ({ option }: {
139
160
  option: TreeOption;
140
161
  }) => JSX.Element;
141
162
  getLabelName: (option: TreeOption) => unknown;
163
+ transformData: (trees: TreeOption[]) => TreeOption[];
164
+ calculateRootItems: (trees: TreeOption[], items: TreeOption[]) => TreeOption[];
165
+ transformParentNodeName: (trees: TreeOption[], temp: any) => TreeOption[];
142
166
  setAllCheckedKeys: (tree: TreeOption[]) => void;
167
+ setAllCheckedKeysWithChild: (tree: TreeOption[]) => void;
168
+ setAllCheckedKeysWithParent: (tree: TreeOption[]) => void;
143
169
  onSearch: () => Promise<void>;
170
+ onClear: () => void;
144
171
  setTreeCheckd: (tree: TreeOption[], checked: boolean) => void;
172
+ setCheckdWithChild: (tree: TreeOption[], checked: boolean) => void;
173
+ setCheckdWithParent: (tree: TreeOption[], checked: boolean) => void;
145
174
  checkedAllChange: (checked: boolean) => void;
146
175
  uniq: (arr: ITag[]) => ITag[];
147
176
  setTagData: (tree: TreeOption[]) => void;
@@ -149,6 +178,7 @@ declare const _default: import("vue").DefineComponent<{
149
178
  setCheckedAll: () => void;
150
179
  clearAll: () => void;
151
180
  closeTag: (tag: ITag) => void;
181
+ notifyCheck: (keys: IKey[]) => void;
152
182
  NButton: any;
153
183
  NInput: any;
154
184
  NInputGroup: import("vue").DefineComponent<{
@@ -218,7 +248,148 @@ declare const _default: import("vue").DefineComponent<{
218
248
  readonly privateShow: boolean;
219
249
  }>;
220
250
  CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
221
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "check"[], "check", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
251
+ SearchMultiple: import("vue").DefineComponent<{
252
+ treeData: {
253
+ type: PropType<any[]>;
254
+ default: () => never[];
255
+ };
256
+ checkedKeys: {
257
+ type: PropType<(string | number)[]>;
258
+ default: () => never[];
259
+ };
260
+ }, {
261
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
262
+ treeData: {
263
+ type: PropType<any[]>;
264
+ default: () => never[];
265
+ };
266
+ checkedKeys: {
267
+ type: PropType<(string | number)[]>;
268
+ default: () => never[];
269
+ };
270
+ }>> & {
271
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
272
+ }>>;
273
+ emit: (event: "notifyCheck", ...args: any[]) => void;
274
+ optionsRef: import("vue").ComputedRef<any[]>;
275
+ list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
276
+ containerProps: {
277
+ ref: import("vue").Ref<any>;
278
+ onScroll: () => void;
279
+ style: Partial<CSSStyleDeclaration>;
280
+ };
281
+ wrapperProps: import("vue").ComputedRef<{
282
+ style: {
283
+ width: string;
284
+ height: string;
285
+ marginTop: string;
286
+ };
287
+ }>;
288
+ containerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
289
+ searchCheckKeys: import("vue").Ref<(string | number)[]>;
290
+ showSelectKeys: import("vue").Ref<(string | number)[]>;
291
+ checkedChange: (checkList: (string | number)[], meta: {
292
+ actionType: "check" | "uncheck";
293
+ value: string | number;
294
+ }) => void;
295
+ handleCheckKey: (baseKeys: (string | number)[], currentTree: {
296
+ [key: string]: any;
297
+ key: string | number;
298
+ children: any[];
299
+ parentNode: any;
300
+ } | null, value: string | number) => false | undefined;
301
+ findParent: (baseKeys: (string | number)[], currentTree: {
302
+ [key: string]: any;
303
+ key: string | number;
304
+ children: any[];
305
+ parentNode: any;
306
+ }) => false | undefined;
307
+ handleUnCheckKey: (baseKeys: (string | number)[], currentTree: {
308
+ [key: string]: any;
309
+ key: string | number;
310
+ children: any[];
311
+ parentNode: any;
312
+ }, value: string | number) => false | undefined;
313
+ findChild: (baseKeys: (string | number)[], children: {
314
+ [key: string]: any;
315
+ key: string | number;
316
+ children: any[];
317
+ parentNode: any;
318
+ }[], value: string | number) => false | undefined;
319
+ checkInitTree: (tree: {
320
+ [key: string]: any;
321
+ key: string | number;
322
+ children: any[];
323
+ parentNode: any;
324
+ }, baseKey: string | number) => false | undefined;
325
+ ref: typeof ref;
326
+ NCheckboxGroup: import("vue").DefineComponent<{
327
+ readonly min: NumberConstructor;
328
+ readonly max: NumberConstructor;
329
+ readonly size: PropType<"small" | "medium" | "large">;
330
+ readonly value: PropType<(string | number)[] | null>;
331
+ readonly defaultValue: {
332
+ readonly type: PropType<(string | number)[] | null>;
333
+ readonly default: null;
334
+ };
335
+ readonly disabled: {
336
+ readonly type: PropType<boolean | undefined>;
337
+ readonly default: undefined;
338
+ };
339
+ readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
340
+ actionType: "check" | "uncheck";
341
+ value: string | number;
342
+ }) => void>>;
343
+ readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
344
+ actionType: "check" | "uncheck";
345
+ value: string | number;
346
+ }) => void>>;
347
+ readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
348
+ }, {
349
+ mergedClsPrefix: import("vue").ComputedRef<string>;
350
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
351
+ readonly min: NumberConstructor;
352
+ readonly max: NumberConstructor;
353
+ readonly size: PropType<"small" | "medium" | "large">;
354
+ readonly value: PropType<(string | number)[] | null>;
355
+ readonly defaultValue: {
356
+ readonly type: PropType<(string | number)[] | null>;
357
+ readonly default: null;
358
+ };
359
+ readonly disabled: {
360
+ readonly type: PropType<boolean | undefined>;
361
+ readonly default: undefined;
362
+ };
363
+ readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
364
+ actionType: "check" | "uncheck";
365
+ value: string | number;
366
+ }) => void>>;
367
+ readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
368
+ actionType: "check" | "uncheck";
369
+ value: string | number;
370
+ }) => void>>;
371
+ readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
372
+ }>>, {
373
+ readonly disabled: boolean | undefined;
374
+ readonly defaultValue: (string | number)[] | null;
375
+ }>;
376
+ NCheckbox: any;
377
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "notifyCheck"[], "notifyCheck", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
378
+ treeData: {
379
+ type: PropType<any[]>;
380
+ default: () => never[];
381
+ };
382
+ checkedKeys: {
383
+ type: PropType<(string | number)[]>;
384
+ default: () => never[];
385
+ };
386
+ }>> & {
387
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
388
+ }, {
389
+ treeData: any[];
390
+ checkedKeys: (string | number)[];
391
+ }>;
392
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
222
393
  defaultList: {
223
394
  type: PropType<(IKey | ITag)[]>;
224
395
  default: () => never[];
@@ -255,8 +426,12 @@ declare const _default: import("vue").DefineComponent<{
255
426
  type: BooleanConstructor;
256
427
  default: boolean;
257
428
  };
429
+ treeSetting: {
430
+ type: PropType<ITreeOption>;
431
+ default: () => {};
432
+ };
258
433
  queryLoadChildData: {
259
- type: PropType<(node: TreeOption) => Promise<void>>;
434
+ type: PropType<(node: TreeOption) => Promise<AnyObject>>;
260
435
  default: undefined;
261
436
  };
262
437
  queryTreeSearch: {
@@ -265,9 +440,9 @@ declare const _default: import("vue").DefineComponent<{
265
440
  };
266
441
  }>> & {
267
442
  onCheck?: ((...args: any[]) => any) | undefined;
443
+ onCheckWithLevel?: ((...args: any[]) => any) | undefined;
268
444
  }, {
269
445
  data: ITreeOption[];
270
- multiple: boolean;
271
446
  defaultList: (IKey | ITag)[];
272
447
  searchPlaceholder: string;
273
448
  searchButtonText: string;
@@ -275,7 +450,9 @@ declare const _default: import("vue").DefineComponent<{
275
450
  wordbookChild: IWordBookChild<ITreeOption>;
276
451
  showCount: boolean;
277
452
  showClear: boolean;
278
- queryLoadChildData: (node: TreeOption) => Promise<void>;
453
+ multiple: boolean;
454
+ treeSetting: ITreeOption;
455
+ queryLoadChildData: (node: TreeOption) => Promise<AnyObject>;
279
456
  queryTreeSearch: (keyWork: string) => Promise<Array<AnyObject>>;
280
457
  }>;
281
458
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as o,unref as u,withCtx as d,createVNode as c,withKeys as r,createTextVNode as i,toDisplayString as s,withDirectives as v,vShow as h,createCommentVNode as p,createElementBlock as f,createElementVNode as y,Fragment as k,renderList as b}from"vue";import{NGrid as g,NGi as m,NSpace as _,NInputGroup as w,NInput as x,NButton as C,NCheckbox as L,NTree as j,NIcon as q,NTooltip as B}from"naive-ui";import{CloseCircleSharp as P}from"@vicons/ionicons5";import{filterTree as S,getExpandedKeys as U}from"./utils/index.js";import{cloneDeep as D}from"lodash-es";const T={key:0},K={class:"c-select-person__scroll",style:{height:"342px"}};var $=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},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check"],setup(e,{emit:$}){const A=e,E=l(""),F=l(!1),I=l([]),O=l([]),N=l([]),R=l([]),z=D(A.data);let G=[];const H=t((()=>!!A.queryLoadChildData));function J(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function M({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||H.value&&!(null==e?void 0:e.isLeaf)){const l=A.wordbook.user_count_obj&&e[A.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}return c(B,{trigger:"hover"},{default:()=>c("span",null,[e.title]),trigger:()=>c("span",null,[e.title])})}function Q(e){return e[A.wordbookChild.user_name_obj]||e[A.wordbook.parent_name_obj]||e.orgName||e.title||""}function V(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];(null==(l=a.children)?void 0:l.length)&&V(a.children),a.disabled||a.children||G.push(a.key)}}async function W(){H.value?N.value=await A.queryTreeSearch(E.value):(N.value=S(z,E.value),G=[],V(N.value),le()),O.value=N.value.length&&E.value?U(N.value):[]}function X(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!I.value.includes(a.key)&&I.value.push(a.key),!l)){const e=I.value.findIndex((e=>e===a.key));I.value.splice(e,1)}a.children&&X(a.children,l)}}function Y(e){X(N.value,e)}function Z(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];I.value.includes(a.key)&&R.value.push({key:a.key,name:a.title}),(null==(l=a.children)?void 0:l.length)&&Z(a.children)}}function ee(e){I.value=e}function le(){F.value=G.every((e=>R.value.findIndex((l=>l.key===e))>-1))}function te(){I.value=[]}return function e(l){var t,a;for(let n=0,o=l.length;n<o;n++){const o=l[n];o.title=Q(o),o.key||(o.key=o[A.wordbookChild.user_id_obj]||o[A.wordbook.parent_id_obj]||Date.now()),(null==(t=o.children)?void 0:t.length)?(e(o.children),J(o)):0===(null==(a=o.children)?void 0:a.length)&&Reflect.deleteProperty(o,"children"),o.disabled||o.children||G.push(o.key)}}(z),N.value=z,A.defaultList.length>0&&(H.value?(A.defaultList.forEach((e=>I.value.push(e.key))),R.value=D(A.defaultList)):(A.defaultList.forEach((e=>I.value.push(e))),Z(z))),a((()=>I),(e=>{R.value=[],e.value.length&&Z(H.value?N.value:z),le(),$("check",e.value)}),{deep:!0}),(l,t)=>(n(),o(u(g),{cols:2,class:"c-select-person"},{default:d((()=>[c(u(m),null,{default:d((()=>[c(u(_),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:d((()=>[c(u(w),{style:{"margin-bottom":"12px"}},{default:d((()=>[c(u(x),{clearable:"",value:E.value,"onUpdate:value":t[0]||(t[0]=e=>E.value=e),placeholder:e.searchPlaceholder,onKeyup:r(W,["enter"])},null,8,["value","placeholder","onKeyup"]),c(u(C),{type:"primary",onClick:W},{default:d((()=>[i(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple?v((n(),o(u(L),{key:0,checked:F.value,"onUpdate:checked":[t[1]||(t[1]=e=>F.value=e),Y]},{default:d((()=>[i(" 全选 ")])),_:1},8,["checked"])),[[h,u(G).length<1e3]]):p("v-if",!0),c(u(j),{"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":I.value,"expanded-keys":O.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>O.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":I.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>I.value=e),data:N.value,"check-strategy":"child","render-label":M,"onUpdate:checkedKeys":ee,onLoad:e.queryLoadChildData},null,8,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data","onLoad"])])),_:1})])),_:1}),c(u(m),null,{default:d((()=>[c(u(_),{vertical:"",style:{"padding-left":"12px"}},{default:d((()=>[c(u(_),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:d((()=>[e.showCount?(n(),f("span",T,"已选择:"+s(R.value.length),1)):p("v-if",!0),e.showClear?(n(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:te},"清空")):p("v-if",!0)])),_:1}),y("div",K,[(n(!0),f(k,null,b(R.value,(e=>(n(),f("span",{class:"c-select-person__tag-item",key:e.key},[i(s(e.name)+" ",1),c(u(q),{class:"tag-close",component:u(P),onClick:l=>function(e){I.value=I.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{$ as default};
1
+ import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as u,unref as i,withCtx as o,createVNode as r,withKeys as c,createTextVNode as d,toDisplayString as s,withDirectives as v,vShow as h,createCommentVNode as p,mergeProps as f,createElementBlock as y,createElementVNode as k,Fragment as m,renderList as g}from"vue";import{NGrid as b,NGi as _,NSpace as w,NInputGroup as C,NInput as x,NButton as L,NCheckbox as S,NTree as j,NIcon as T,NTooltip as N}from"naive-ui";import{CloseCircleSharp as $}from"@vicons/ionicons5";import{filterTree as I,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as q}from"lodash-es";import B from"./SearchMultiple.vue.js";const K={key:0},P={class:"c-select-person__scroll",style:{height:"342px"}};var U=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{emit:U}){const E=e,O=l(""),A=l(!1),F=l([]),W=l([]),M=l([]),R=l([]),z=l([]),G=l(!1),H=q(((J=E.data).forEach((e=>{var l;if(null==(l=e.children)?void 0:l.length){const l=ne(e.children,[]);e.innerItemsNum=l.length}})),ue(J,"")));var J;let Q=[];const V=t((()=>!!E.queryLoadChildData)),X=t((()=>{var e,l;return null!=(l=null==(e=null==E?void 0:E.treeSetting)?void 0:e.checkStrategy)?l:"child"}));function Y(e){e.disabled||e.children||!e.key||Q.push(e.key)}function Z(e){e.disabled||e.tempTitle||!e.key||Q.push(e.key)}async function ee(e){if(E.queryLoadChildData){const l=await E.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function le(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function te({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||V.value&&!(null==e?void 0:e.isLeaf)){const l=E.wordbook.user_count_obj&&e[E.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return r("span",null,[`${e.title}${t}`])}return r(N,{trigger:"hover"},{default:()=>r("span",null,[e.title]),trigger:()=>r("span",null,[e.title])})}function ae(e){return e[E.wordbookChild.user_name_obj]||e[E.wordbook.parent_name_obj]||e.orgName||e.title||""}function ne(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?ne(e.children,l):l.push(e)})),l}function ue(e,l){return e&&0!==e.length?e.map((e=>{var t;const a=ae(e),n=l?`${a}/${l}`:a;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?ue(null==e?void 0:e.children,n):[]}})):[]}async function ie(){G.value=!!O.value.trim(),V.value?M.value=await E.queryTreeSearch(O.value):M.value=I(H,O.value),W.value=M.value.length&&O.value?D(M.value):[]}function oe(){setTimeout((()=>{ie()}))}function re(e,l){var t,a;switch(null!=(a=null==(t=null==E?void 0:E.treeSetting)?void 0:t.checkStrategy)?a:"child"){case"child":!function(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}a.children&&re(a.children,l)}}(e,l);break;case"parent":!function(e,l){F.value=[];for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&!a.tempTitle&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}}}(e,l)}}function ce(e){re(M.value,e)}function de(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t],n=z.value.map((e=>e.key));F.value.includes(a.key)&&!n.includes(a.key)&&R.value.push({key:a.key,name:a.title,parentName:a.tempTitle,innerItemsNum:a.innerItemsNum}),(null==(l=a.children)?void 0:l.length)&&de(a.children)}}function se(e){F.value=e}function ve(){F.value=[]}function he(e){F.value=e}return function e(l,t){var a,n,u,i;for(let o=0,r=l.length;o<r;o++){const r=l[o];switch(r.title=ae(r),r.parentNode=t,r.key||(r.key=r[E.wordbookChild.user_id_obj]||r[E.wordbook.parent_id_obj]||Date.now()),(null==(a=r.children)?void 0:a.length)?(e(r.children,r),le(r)):0===(null==(n=r.children)?void 0:n.length)&&Reflect.deleteProperty(r,"children"),null!=(i=null==(u=null==E?void 0:E.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":Y(r);break;case"parent":Z(r)}}}(H,null),M.value=H,E.defaultList.length>0&&(V.value?(E.defaultList.forEach((e=>F.value.push(e.key))),R.value=q(E.defaultList),z.value=q(E.defaultList)):(E.defaultList.forEach((e=>F.value.push(e))),de(H))),a((()=>F),(e=>{R.value=z.value.filter((l=>e.value.includes(l.key))),e.value.length&&de(V.value?M.value:H),A.value=Q.every((e=>R.value.findIndex((l=>l.key===e))>-1));const l=R.value.filter((l=>e.value.includes(l.key)));U("check",e.value),U("checkWithLevel",l)}),{deep:!0}),(l,t)=>(n(),u(i(b),{cols:2,class:"c-select-person"},{default:o((()=>[r(i(_),null,{default:o((()=>[r(i(w),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:o((()=>[r(i(C),{style:{"margin-bottom":"12px"}},{default:o((()=>[r(i(x),{clearable:"",value:O.value,"onUpdate:value":t[0]||(t[0]=e=>O.value=e),placeholder:e.searchPlaceholder,onClear:oe,onKeyup:c(ie,["enter"])},null,8,["value","placeholder","onKeyup"]),r(i(L),{type:"primary",onClick:ie},{default:o((()=>[d(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!G.value?v((n(),u(i(S),{key:0,checked:A.value,"onUpdate:checked":[t[1]||(t[1]=e=>A.value=e),ce]},{default:o((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[h,i(Q).length<1e3]]):p("v-if",!0),e.multiple&&G.value&&"parent"===i(X)?(n(),u(B,{key:1,treeData:M.value,checkedKeys:F.value,onNotifyCheck:he},null,8,["treeData","checkedKeys"])):(n(),u(i(j),f({key:2,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":F.value,"expanded-keys":W.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>W.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":F.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>F.value=e),data:M.value,"check-strategy":"child","render-label":te},e.treeSetting,{"onUpdate:checkedKeys":se,onLoad:ee}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),r(i(_),null,{default:o((()=>[r(i(w),{vertical:"",style:{"padding-left":"12px"}},{default:o((()=>[r(i(w),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:o((()=>[e.showCount?(n(),y("span",K,"已选择:"+s(R.value.length),1)):p("v-if",!0),e.showClear?(n(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:ve},"清空")):p("v-if",!0)])),_:1}),k("div",P,[(n(!0),y(m,null,g(R.value,(e=>(n(),y("span",{class:"c-select-person__tag-item",key:e.key},[d(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:e.innerItemsNum?`(${e.innerItemsNum})`:"")+" ",1),r(i(T),{class:"tag-close",component:i($),onClick:l=>function(e){F.value=F.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{U as default};
@@ -1 +1 @@
1
- import{cloneDeep as i}from"lodash-es";function n(n,l){const c=i(n);return e(c,l),r(c)}function e(i,n){i.forEach((i=>{var r,c;if(i.visible=null==(r=i.title)?void 0:r.includes(n),null==(c=i.children)?void 0:c.length)if(e(i.children,n),i.visible)l(i.children);else{i.children.some((i=>i.visible))&&(i.visible=!0)}}))}function l(i){i.forEach((i=>{var n;i.visible=!0,(null==(n=i.children)?void 0:n.length)&&l(i.children)}))}function r(i){return i.filter((i=>{var n;return!!i.visible&&((null==(n=i.children)?void 0:n.length)&&(i.children=r(i.children)),!0)}))}function c(i){const n=[];return function i(e){for(let l=0,r=e.length;l<r;l++){const r=e[l];r.children&&(n.push(r.key),i(r.children))}}(i),n}export{n as filterTree,c as getExpandedKeys};
1
+ import{cloneDeep as n}from"lodash-es";function i(i,r){const c=n(i);return r.trim()?function(n,i){return e(n,[]).filter((n=>{var l;return null==(l=n.title)?void 0:l.includes(i.trim())}))}(c,r):(l(c,r),t(c))}function l(n,i){n.forEach((n=>{var e,t;if(n.visible=null==(e=n.title)?void 0:e.includes(i.trim()),null==(t=n.children)?void 0:t.length)if(l(n.children,i),n.visible)r(n.children);else{n.children.some((n=>n.visible))&&(n.visible=!0)}}))}function e(n,i){return n.forEach((n=>{var l;(null==(l=n.children)?void 0:l.length)?e(n.children,i):i.push(n)})),i}function r(n){n.forEach((n=>{var i;n.visible=!0,(null==(i=n.children)?void 0:i.length)&&r(n.children)}))}function t(n){return n.filter((n=>{var i;return!!n.visible&&((null==(i=n.children)?void 0:i.length)&&(n.children=t(n.children)),!0)}))}function c(n){const i=[];return function n(l){for(let e=0,r=l.length;e<r;e++){const r=l[e];r.children&&(i.push(r.key),n(r.children))}}(n),i}export{i as filterTree,c as getExpandedKeys};
@@ -1 +1 @@
1
- .c-select-person{padding:0 12px}.c-select-person__scroll{height:308px;overflow-y:auto}.c-select-person__clear-btn{color:#5585f5;cursor:pointer}.c-select-person__tag-item{align-items:center;background:rgba(85,133,245,.08);border:1px solid rgba(85,133,245,.5);border-radius:4px;box-sizing:border-box;color:#5585f5;display:inline-flex;font-size:14px;height:24px;line-height:24px;list-style:none;margin:0 8px 4px 0;padding:0 6px;transition:all .3s cubic-bezier(.215,.61,.355,1);white-space:nowrap}.c-select-person__tag-item .tag-close{color:#5585f5;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;margin-left:3px;transition:all .3s}.c-select-person__tag-item .tag-close:hover{color:rgba(85,133,245,.6)}.c-select-person__tag-item .tag-close:active{color:#fff}
1
+ .c-select-person{padding:0 12px}.c-select-person__scroll{height:308px;overflow-y:auto}.c-select-person__clear-btn{color:#5585f5;cursor:pointer}.c-select-person__tag-item{align-items:center;background:rgba(85,133,245,.08);border:1px solid rgba(85,133,245,.5);border-radius:4px;box-sizing:border-box;color:#5585f5;display:inline-flex;font-size:14px;height:24px;line-height:24px;list-style:none;margin:0 8px 4px 0;padding:0 6px;transition:all .3s cubic-bezier(.215,.61,.355,1);white-space:nowrap}.c-select-person__tag-item .tag-close{color:#5585f5;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;margin-left:3px;transition:all .3s}.c-select-person__tag-item .tag-close:hover{color:rgba(85,133,245,.6)}.c-select-person__tag-item .tag-close:active{color:#fff}.c-select-person .select-person__multiple-search{display:flex;flex-direction:column}.c-select-person .select-person__multiple-search .n-checkbox{height:30px;overflow:hidden}