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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/README.md +87 -87
  2. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  3. package/es/components/base-search/index.d.ts +2 -2
  4. package/es/components/base-search/src/index.vue.d.ts +2 -2
  5. package/es/components/base-search/style/index.css +1 -1
  6. package/es/components/big-table/index.d.ts +3 -4
  7. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  8. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  11. package/es/components/big-table/src/hooks/useEvent.js +1 -1
  12. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  13. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  14. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  15. package/es/components/big-table/src/utils.d.ts +11 -1
  16. package/es/components/big-table/src/utils.js +1 -1
  17. package/es/components/big-table/style/index.css +1 -1
  18. package/es/components/bpmn-workflow/index.d.ts +12 -0
  19. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.d.ts +12 -0
  20. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  21. package/es/components/button-print/index.d.ts +32 -7
  22. package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -8
  23. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  24. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  25. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  26. package/es/components/button-print/src/utils/print.js +1 -1
  27. package/es/components/classification/index.d.ts +1 -1
  28. package/es/components/classification/src/index.vue.d.ts +2 -2
  29. package/es/components/classification/style/index.css +1 -1
  30. package/es/components/config-provider/src/ConfigProvider.js +1 -1
  31. package/es/components/config-provider/src/interface.d.ts +4 -4
  32. package/es/components/date-picker/index.d.ts +4 -0
  33. package/es/components/date-picker/src/DatePicker.vue.d.ts +4 -0
  34. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  35. package/es/components/fabric-chart/index.d.ts +2 -2
  36. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  37. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -0
  38. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +16 -0
  43. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -0
  44. package/es/components/field-set/index.d.ts +26 -81
  45. package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
  46. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  47. package/es/components/field-set/style/index.css +1 -1
  48. package/es/components/form-config/index.d.ts +83 -42
  49. package/es/components/form-config/src/FormConfig.vue.d.ts +83 -42
  50. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  51. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +27 -13
  52. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +44 -23
  53. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  54. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  55. package/es/components/form-config/src/constants/index.d.ts +19 -1
  56. package/es/components/form-config/src/constants/index.js +1 -1
  57. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  58. package/es/components/form-config/src/types/index.d.ts +1 -0
  59. package/es/components/form-render/index.d.ts +27 -13
  60. package/es/components/form-render/index.js +1 -1
  61. package/es/components/form-render/src/FormRender.vue.d.ts +27 -13
  62. package/es/components/form-render/src/FormRender.vue.js +1 -1
  63. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +27 -13
  64. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  65. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  66. package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
  67. package/es/components/form-render/src/components/renderer/date.js +1 -1
  68. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
  69. package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +18 -0
  70. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  71. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  72. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  73. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +38 -2
  74. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  75. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +18 -0
  76. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  77. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +36 -0
  78. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  79. package/es/components/form-render/src/components/renderer/select.d.ts +32 -5
  80. package/es/components/form-render/src/components/renderer/select.js +1 -1
  81. package/es/components/form-render/src/hooks/index.d.ts +1 -1
  82. package/es/components/form-render/src/hooks/index.js +1 -1
  83. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -0
  84. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  85. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  86. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  87. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  88. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  89. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  90. package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
  91. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  92. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
  93. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  94. package/es/components/form-render/src/types/fieldItem.d.ts +11 -5
  95. package/es/components/form-render/src/types/index.d.ts +4 -3
  96. package/es/components/form-render/style/index.css +1 -1
  97. package/es/components/iho-table/index.d.ts +24 -5
  98. package/es/components/iho-table/src/IhoTable.vue.d.ts +24 -5
  99. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  100. package/es/components/iho-table/src/constants/index.d.ts +3 -2
  101. package/es/components/iho-table/src/constants/index.js +1 -1
  102. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -4
  103. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  104. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +22 -21
  105. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -1
  106. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
  107. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
  108. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
  109. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
  110. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  111. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  112. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
  113. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  114. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +48 -0
  115. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -0
  116. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.d.ts +1 -0
  117. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -0
  118. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  119. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  120. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  121. package/es/components/iho-table/src/plugins/highLightSetPlugin.d.ts +1 -0
  122. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -0
  123. package/es/components/iho-table/src/plugins/index.js +1 -1
  124. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  125. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.d.ts +1 -0
  126. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.js +1 -0
  127. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +4 -0
  128. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
  129. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  130. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  131. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
  132. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  133. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -1
  134. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  135. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  136. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  137. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
  138. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
  139. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  140. package/es/components/iho-table/src/types/index.d.ts +28 -5
  141. package/es/components/iho-table/src/types/pluginType.d.ts +12 -22
  142. package/es/components/iho-table/src/utils/index.d.ts +8 -3
  143. package/es/components/iho-table/src/utils/index.js +1 -1
  144. package/es/components/iho-table/style/iconfont.ttf +0 -0
  145. package/es/components/iho-table/style/index.css +1 -1
  146. package/es/components/index.css +1 -1
  147. package/es/components/index.d.ts +1 -0
  148. package/es/components/index.js +1 -1
  149. package/es/components/info-header/index.d.ts +56 -27
  150. package/es/components/info-header/src/InfoHeader.vue.d.ts +56 -27
  151. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  152. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  153. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +27 -13
  154. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +28 -13
  155. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  156. package/es/components/info-header/style/index.css +1 -1
  157. package/es/components/keyboard/index.d.ts +1 -1
  158. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  159. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  160. package/es/components/keyboard/src/constants/index.js +1 -1
  161. package/es/components/keyboard/style/index.css +1 -1
  162. package/es/components/map/index.d.ts +2 -14
  163. package/es/components/map/src/Map.vue.d.ts +1 -14
  164. package/es/components/map/src/types/index.d.ts +19 -0
  165. package/es/components/map/src/types/index.js +1 -0
  166. package/es/components/recommend-search/index.d.ts +13 -128
  167. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +15 -130
  168. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  169. package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
  170. package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
  171. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -63
  172. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  173. package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +1 -3
  174. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  175. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -62
  176. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  177. package/es/components/recommend-search/src/constant/index.d.ts +3 -0
  178. package/es/components/recommend-search/src/constant/index.js +1 -1
  179. package/es/components/scale-view/index.d.ts +38 -224
  180. package/es/components/scale-view/index.js +1 -1
  181. package/es/components/scale-view/src/ScaleView.vue.d.ts +37 -224
  182. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  183. package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
  184. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  185. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
  186. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  187. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  188. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  189. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
  190. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  191. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  192. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +8 -8
  193. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  194. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  195. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
  196. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  197. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  198. package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
  199. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  200. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  201. package/es/components/scale-view/src/hooks/use-component.d.ts +74 -4
  202. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
  203. package/es/components/scale-view/src/hooks/use-event.js +1 -1
  204. package/es/components/scale-view/src/types/index.d.ts +7 -0
  205. package/es/components/scale-view/src/types/index.js +1 -0
  206. package/es/components/scale-view/style/index.css +1 -1
  207. package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
  208. package/es/components/search-cascader/index.d.ts +12 -1
  209. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
  210. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  211. package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
  212. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  213. package/es/components/search-cascader/src/constants/index.d.ts +1 -0
  214. package/es/components/search-cascader/src/constants/index.js +1 -1
  215. package/es/components/select-label/index.d.ts +1 -1
  216. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  217. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  218. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  219. package/es/components/select-label/style/index.css +1 -1
  220. package/es/components/select-person/index.d.ts +199 -10
  221. package/es/components/select-person/src/SearchMultiple.vue.d.ts +131 -0
  222. package/es/components/select-person/src/SearchMultiple.vue.js +1 -0
  223. package/es/components/select-person/src/SearchMultiple.vue2.js +1 -0
  224. package/es/components/select-person/src/SelectPerson.vue.d.ts +186 -9
  225. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  226. package/es/components/select-person/src/utils/index.js +1 -1
  227. package/es/components/select-person/style/index.css +1 -1
  228. package/es/components/shortcut-setter/index.d.ts +32 -16
  229. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +32 -16
  230. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  231. package/es/components/steps-wheel/src/constants/index.js +1 -1
  232. package/es/components/steps-wheel/style/index.css +1 -1
  233. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  234. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  235. package/es/components/table-filter/src/types/index.d.ts +11 -2
  236. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  237. package/es/components/vod-chunk-upload/index.d.ts +73 -3
  238. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -3
  239. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  240. package/es/env.d.ts +25 -24
  241. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  242. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  243. package/es/shared/{mixins → hooks}/index.d.ts +1 -0
  244. package/es/shared/{mixins → hooks}/index.js +1 -1
  245. package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
  246. package/es/shared/hooks/useAsyncQueue.js +1 -0
  247. package/es/shared/{mixins → hooks}/useDateTime.d.ts +2 -2
  248. package/es/shared/hooks/useDateTime.js +1 -0
  249. package/es/shared/package.json.js +1 -0
  250. package/es/shared/utils/anime.d.ts +1 -1
  251. package/es/shared/utils/anime.js +1 -1
  252. package/es/shared/utils/index.d.ts +3 -14
  253. package/es/shared/utils/index.js +1 -1
  254. package/es/shared/utils/vexutils.d.ts +2 -2
  255. package/es/shared/utils/vexutils.js +1 -1
  256. package/es/shared/utils/vexutilsExpand.d.ts +254 -0
  257. package/es/shared/utils/vexutilsExpand.js +1 -0
  258. package/package.json +65 -65
  259. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  260. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  261. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  262. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  263. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  264. package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
  265. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
  266. package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
  267. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +0 -115
  268. package/es/components/scale-view/src/hooks/scaleview-props.js +0 -1
  269. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  270. package/es/shared/mixins/useDateTime.js +0 -1
  271. package/es/shared/utils/colorLog.d.ts +0 -31
  272. package/es/shared/utils/colorLog.js +0 -1
  273. package/es/shared/utils/tapable/index.d.ts +0 -139
  274. /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
  275. /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
  276. /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
  277. /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
  278. /package/es/shared/{mixins → hooks}/useTheme.d.ts +0 -0
  279. /package/es/shared/{mixins → hooks}/useTheme.js +0 -0
@@ -103,9 +103,11 @@ declare const _default: import("vue").DefineComponent<{
103
103
  emitValue: (value: ValueType) => void;
104
104
  onClear: () => void;
105
105
  onClick: (evt: Event) => void;
106
+ onKeydown: (evt: KeyboardEvent) => void;
106
107
  cssVariable: {
107
108
  '--menu-width': number;
108
109
  };
110
+ eventBus: AnyObject;
109
111
  uuid: string;
110
112
  show: import("vue").Ref<boolean> | import("vue").WritableComputedRef<boolean>;
111
113
  patternContent: import("vue").Ref<string>;
@@ -116,11 +118,13 @@ declare const _default: import("vue").DefineComponent<{
116
118
  inputRef: import("vue").Ref<any>;
117
119
  popoverRef: import("vue").Ref<any>;
118
120
  currentNode: import("vue").Ref<AnyObject | undefined>;
121
+ cursorNode: import("vue").Ref<AnyObject | undefined>;
119
122
  loadingNode: import("vue").Ref<Nullable<AnyObject>>;
120
123
  search: (payload?: {
121
124
  type: 'search' | 'update';
122
125
  node: AnyObject;
123
126
  }, keyword?: string) => Promise<void>;
127
+ changeCursorNode: (node: AnyObject) => void;
124
128
  NInput: any;
125
129
  NPopover: any;
126
130
  SearchMenu: import("vue").DefineComponent<{
@@ -143,7 +147,10 @@ declare const _default: import("vue").DefineComponent<{
143
147
  currentNode: {
144
148
  type: PropType<AnyObject>;
145
149
  };
146
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "nodeClick"[], "nodeClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
150
+ cursorNode: {
151
+ type: PropType<AnyObject>;
152
+ };
153
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
147
154
  childKey: {
148
155
  type: StringConstructor;
149
156
  default: string;
@@ -163,8 +170,12 @@ declare const _default: import("vue").DefineComponent<{
163
170
  currentNode: {
164
171
  type: PropType<AnyObject>;
165
172
  };
173
+ cursorNode: {
174
+ type: PropType<AnyObject>;
175
+ };
166
176
  }>> & {
167
177
  onNodeClick?: ((...args: any[]) => any) | undefined;
178
+ onChangeCursor?: ((...args: any[]) => any) | undefined;
168
179
  }, {
169
180
  options: AnyObject[];
170
181
  valueKey: string;
@@ -1 +1 @@
1
- import{defineComponent as e,provide as a,computed as l,ref as t,nextTick as r,openBlock as o,createBlock as u,unref as n,isRef as s,normalizeStyle as i,withCtx as c,createVNode as p,withKeys as v,createElementVNode as d,renderSlot as f}from"vue";import{uuidGenerator as y}from"../../../shared/utils/index.js";import{NOOP as h}from"@vue/shared";import{useVModel as m,onClickOutside as b,useDebounceFn as g}from"@vueuse/core";import{isString as w,isArray as k,isFunction as S,isObject as _}from"lodash-es";import{NPopover as K,NInput as C}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as j,InjectionSearchCascaderLoadingNode as N,InjectionSearchCascaderValue as P}from"./constants/index.js";import{useCssVariable as x}from"./hooks/useCssVariable.js";import{SearchMenu as A}from"./components/SearchMenu.js";import V from"../../../_virtual/plugin-vue_export-helper.js";const F=["id"];var L=V(e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function}},emits:["update:value","focus","update:show"],setup(e,{emit:V}){const L=e;function U(){var e;e=[],Promise.resolve(S(L.beforeSetValue)?L.beforeSetValue(e):e).then((e=>V("update:value",e)),h)}function B(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&function(){if(I.value)return;I.value=!0,M.value="",J()}()}const R=x(),E=y(),I=m(L,"show",V);a(j,l((()=>L.checkAbleLevel)));const M=t(""),T=l({get:()=>I.value?M.value:w(L.value)?L.value:k(L.value)?L.value.reduce(((e,a,l)=>0===l?a[L.labelKey]:e+" / "+a[L.labelKey]),""):"",set(e){M.value=e,J(void 0,e)}});function $(e){V("focus",e)}async function q(){var e;I.value=!1,null==(e=z.value)||e.blur()}const z=t();b(z,(e=>{var a;if(!I.value)return;const l=e;if(!l.target)return q();!function(e){let a=!1,l=e;for(;l;){if(l.id===E){a=!0;break}l=l.parentElement}return a}(l.target)?q():null==(a=z.value)||a.focus()}));const D=t(),G=t(),H=t(null);a(N,H),a(P,l((()=>L.value)));const J=g((async(e,a)=>{var l;const{type:t,node:o}=e||{};try{if("update"===t)return void(S(L.search)&&L.search({...o,isLeaf:!0}));H.value=o;const e=await(S(L.search)&&L.search(o,a));G.value=_(e)?e:o}finally{H.value=null,await r(),null==(l=D.value)||l.syncPosition()}}),400);return(a,l)=>(o(),u(n(K),{class:"search-cascader",trigger:"manual",show:n(I),"onUpdate:show":l[1]||(l[1]=e=>s(I)?I.value=e:null),"show-arrow":!1,placement:"bottom-start",style:i(n(R)),width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:D},{trigger:c((()=>[p(n(C),{class:"search-cascader__input",placeholder:n(I)?e.editPlaceholder:e.placeholder,clearable:e.clearable,onClear:U,value:n(T),"onUpdate:value":l[0]||(l[0]=e=>s(T)?T.value=e:null),ref_key:"inputRef",ref:z,onFocus:$,onClick:B,onKeydown:v(B,["enter"])},null,8,["placeholder","clearable","value","onKeydown"])])),default:c((()=>[d("section",{id:n(E)},[p(n(A),{"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:n(J),"current-node":G.value},{empty:c((()=>[f(a.$slots,"empty")])),_:3},8,["label-key","value-key","options","onNodeClick","current-node"])],8,F)])),_:3},8,["show","style","width"]))}}),[["__file","SearchCascader.vue"]]);export{L as default};
1
+ import{defineComponent as e,provide as a,computed as l,ref as t,nextTick as r,watch as o,openBlock as u,createBlock as n,unref as s,isRef as i,normalizeStyle as c,withCtx as v,createVNode as d,createElementVNode as p,renderSlot as f}from"vue";import{uuidGenerator as y}from"../../../shared/utils/index.js";import{NOOP as h}from"@vue/shared";import{useDebounceFn as m,useEventBus as g,useVModel as b,onClickOutside as w}from"@vueuse/core";import{isString as k,isArray as S,isFunction as _,isObject as K}from"lodash-es";import{NPopover as C,NInput as N}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as P,InjectionKeyboardEventBus as j,InjectionSearchCascaderLoadingNode as x,InjectionSearchCascaderValue as A}from"./constants/index.js";import{useCssVariable as U}from"./hooks/useCssVariable.js";import{SearchMenu as V}from"./components/SearchMenu.js";import F from"../../../_virtual/plugin-vue_export-helper.js";const L=["id"];var B=F(e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function}},emits:["update:value","focus","update:show"],setup(e,{emit:F}){const B=e;function E(){var e;e=[],Promise.resolve(_(B.beforeSetValue)?B.beforeSetValue(e):e).then((e=>F("update:value",e)),h)}function I(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&H()}const R=m((e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||q.value?M.emit(e.key):H()}),50),T=U(),M=g("cascaderKeydown"),$=y(),q=b(B,"show",F);a(P,l((()=>B.checkAbleLevel))),a(j,M);const z=t(""),D=l({get:()=>q.value?z.value:k(B.value)?B.value:S(B.value)?B.value.reduce(((e,a,l)=>0===l?a[B.labelKey]:e+" / "+a[B.labelKey]),""):"",set(e){z.value=e,Z(void 0,e)}});function G(e){F("focus",e)}function H(){q.value||(q.value=!0,z.value="",Z())}async function J(){var e;q.value=!1,null==(e=O.value)||e.blur()}const O=t();w(O,(e=>{var a;if(!q.value)return;const l=e;if(!l.target)return J();!function(e){let a=!1,l=e;for(;l;){if(l.id===$){a=!0;break}l=l.parentElement}return a}(l.target)?J():null==(a=O.value)||a.focus()}));const Q=t(),W=t(),X=t(),Y=t(null);a(x,Y),a(A,l((()=>B.value)));const Z=m((async(e,a)=>{var l;const{type:t,node:o}=e||{};try{if("update"===t)return void(_(B.search)&&B.search({...o,isLeaf:!0}));Y.value=o;const e=await(_(B.search)&&B.search(o,a));W.value=K(e)?e:o}finally{Y.value=null,await r(),null==(l=Q.value)||l.syncPosition()}}),400),ee=e=>{X.value=e};return o((()=>B.show),(e=>{e&&(X.value={})})),(a,l)=>(u(),n(s(C),{class:"search-cascader",trigger:"manual",show:s(q),"onUpdate:show":l[1]||(l[1]=e=>i(q)?q.value=e:null),"show-arrow":!1,placement:"bottom-start",style:c(s(T)),width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:Q},{trigger:v((()=>[d(s(N),{class:"search-cascader__input",placeholder:s(q)?e.editPlaceholder:e.placeholder,clearable:e.clearable,onClear:E,value:s(D),"onUpdate:value":l[0]||(l[0]=e=>i(D)?D.value=e:null),ref_key:"inputRef",ref:O,onFocus:G,onClick:I,onKeydown:s(R)},null,8,["placeholder","clearable","value","onKeydown"])])),default:v((()=>[p("section",{id:s($)},[d(s(V),{"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:s(Z),onChangeCursor:ee,"current-node":W.value,"cursor-node":X.value},{empty:v((()=>[f(a.$slots,"empty")])),_:3},8,["label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,L)])),_:3},8,["show","style","width"]))}}),[["__file","SearchCascader.vue"]]);export{B as default};
@@ -20,7 +20,10 @@ export declare const SearchMenu: import("vue").DefineComponent<{
20
20
  currentNode: {
21
21
  type: PropType<AnyObject>;
22
22
  };
23
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "nodeClick"[], "nodeClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
+ cursorNode: {
24
+ type: PropType<AnyObject>;
25
+ };
26
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
27
  childKey: {
25
28
  type: StringConstructor;
26
29
  default: string;
@@ -40,8 +43,12 @@ export declare const SearchMenu: import("vue").DefineComponent<{
40
43
  currentNode: {
41
44
  type: PropType<AnyObject>;
42
45
  };
46
+ cursorNode: {
47
+ type: PropType<AnyObject>;
48
+ };
43
49
  }>> & {
44
50
  onNodeClick?: ((...args: any[]) => any) | undefined;
51
+ onChangeCursor?: ((...args: any[]) => any) | undefined;
45
52
  }, {
46
53
  options: AnyObject[];
47
54
  valueKey: string;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,inject as a,createVNode as l,withModifiers as r,ref as n,createTextVNode as o}from"vue";import{traverse as i}from"../../../../shared/utils/index.js";import{Reload as s,ChevronForward as u}from"@vicons/ionicons5";import{NOOP as c}from"@vue/shared";import{useVirtualList as p}from"@vueuse/core";import{isNumber as d,isArray as v,isEqual as y,isString as f,isFunction as m}from"lodash-es";import{NCheckbox as h}from"naive-ui";import{InjectionSearchCascaderLoadingNode as K,InjectionSearchCascaderValue as b,InjectionSearchCascaderCheckAbleLevel as _}from"../constants/index.js";const k=e({props:{options:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},level:{type:Number,required:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"}},emits:["nodeClick"],setup(e,{emit:n}){const o=t((()=>e.options)),{list:i,containerProps:m,wrapperProps:k}=p(o,{itemHeight:32,overscan:5}),g=a(K),C=a(b),N=a(_),S=t((()=>d(N.value)&&N.value<=e.level));function x(t){const a=function(e){const t=[e];let a=e;for(;a.parent;)a=a.parent,t.unshift(a);return t}(t);if(v(C.value))return y(l(a,e.valueKey),l(C.value,e.valueKey));if(f(C.value)){const t=C.value.split("/").map((e=>e.trim()));return y(t,l(a,e.labelKey))}return!1;function l(e,t){return e.map((e=>e[t]))}}return()=>l("div",{class:"search-cascader__optionWrapper",ref:m.ref,style:m.style,onScroll:m.onScroll},[l("div",{style:k.value.style},[i.value.map((t=>{return l("div",{class:["search-cascader__option",{"search-cascader__option--active":(a=t.data,null==(o=e.activeNodes)?void 0:o.includes(a))}],onClick:()=>n("nodeClick",{type:"search",node:t.data}),title:t.data[e.labelKey]},[l("div",{class:"search-cascader__optionText"},[S.value?l(h,{style:{marginRight:"8px"},checked:x(t.data),onClick:r(c,["stop"]),onUpdateChecked:e=>e&&function(e){n("nodeClick",{type:"update",node:e})}(t.data)},null):null,t.data[e.labelKey]]),g.value===t.data?l(s,{class:"rotate"},null):t.data.isLeaf?null:l(u,null,null)]);var a,o}))])])}}),g=e({props:{childKey:{type:String,default:"children"},options:{type:Array,default:()=>[]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},currentNode:{type:Object}},emits:["nodeClick"],setup(e,{slots:t,emit:a}){const r=n([]);function s(t,n){return l(k,{level:n+1,labelKey:e.labelKey,valueKey:e.valueKey,activeNodes:r.value,onNodeClick:e=>a("nodeClick",e),options:t},null)}function u(t){let a=!1;return i(t,((t,l)=>{t===e.currentNode&&(a=!0,l())}),["children"]),a}function c(){if(!v(e.options)||!e.currentNode)return[];const t=[e.options];let a=e.options;for(r.value.length=0;v(a);){const l=a.find(u);if(!l)break;r.value.push(l),a=l[e.childKey],t.push(a)}return t}return()=>l("section",{class:"search-cascader__menuWrapper"},[v(e.options)&&e.options.length?e.currentNode?c().map(s):s(e.options,0):l("section",{class:"search-cascader__emptyWrapper"},[m(t.empty)?t.empty():l("section",null,[o("empty")])])])}});export{g as SearchMenu};
1
+ import{defineComponent as e,computed as r,inject as t,createVNode as o,withModifiers as n,ref as a,createTextVNode as l}from"vue";import{traverse as c}from"../../../../shared/utils/index.js";import{Reload as s,ChevronForward as u}from"@vicons/ionicons5";import{NOOP as i}from"@vue/shared";import{useVirtualList as d}from"@vueuse/core";import{isNumber as p,isArray as f,isEqual as v,isString as y,isFunction as h}from"lodash-es";import{NCheckbox as m}from"naive-ui";import{InjectionSearchCascaderLoadingNode as g,InjectionSearchCascaderValue as N,InjectionSearchCascaderCheckAbleLevel as C,InjectionKeyboardEventBus as b}from"../constants/index.js";const k=e({props:{options:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},level:{type:Number,required:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},cursorNode:{type:Object,default:()=>({})}},emits:["nodeClick","changeCursor"],setup(e,{emit:a}){const l=r((()=>e.options)),{list:c,containerProps:h,wrapperProps:k}=d(l,{itemHeight:32,overscan:5}),K=t(g),_=t(N),x=t(C),A=t(b),S=r((()=>p(x.value)&&x.value<=e.level));function j(e){return Object.keys(e).length<=0}function w(r){return e.cursorNode==r}function I(r){const t=function(e){const r=[e];let t=e;for(;t.parent;)t=t.parent,r.unshift(t);return r}(r);if(f(_.value))return v(o(t,e.valueKey),o(_.value,e.valueKey));if(y(_.value)){const r=_.value.split("/").map((e=>e.trim()));return v(r,o(t,e.labelKey))}return!1;function o(e,r){return e.map((e=>e[r]))}}function O(e){const r=h.ref.value;if(r){const t=32*e-(null==r?void 0:r.clientHeight);r.scrollTo(0,t>0?t:0)}}return A.on((function(r){function t(){return S.value?a("nodeClick",{type:"update",node:e.cursorNode}):a("nodeClick",{type:"search",node:e.cursorNode})}if("ArrowUp"===r){if(j(e.cursorNode))return;const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=0===r?l.value.length-1:r-1,t=l.value[e];a("changeCursor",t),O(e+3)}}if("ArrowRight"===r){if(j(e.cursorNode))return;a("nodeClick",{type:"search",node:e.cursorNode}),a("changeCursor",{})}if("ArrowDown"===r){if(j(e.cursorNode))return a("changeCursor",l.value[0]);const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=r>=l.value.length-1?0:r+1,t=l.value[e];a("changeCursor",t),O(e+1)}}if("ArrowLeft"===r&&e.activeNodes.length){const r=e.activeNodes.slice(-1);a("changeCursor",r[0])}" "===r&&t(),"Enter"===r&&t()})),()=>o("div",{class:"search-cascader__optionWrapper",ref:h.ref,style:h.style,onScroll:h.onScroll},[o("div",{style:k.value.style},[c.value.map((r=>{return o("div",{class:["search-cascader__option",{"search-cascader__option--active":(t=r.data,(null==(l=e.activeNodes)?void 0:l.includes(t))||w(r.data))}],onClick:()=>a("nodeClick",{type:"search",node:r.data}),title:r.data[e.labelKey]},[o("div",{class:"search-cascader__optionText"},[S.value?o(m,{style:{marginRight:"8px"},checked:I(r.data),onClick:n(i,["stop"]),onUpdateChecked:e=>e&&function(e){a("nodeClick",{type:"update",node:e})}(r.data)},null):null,r.data[e.labelKey]]),K.value===r.data?o(s,{class:"rotate"},null):r.data.isLeaf?null:o(u,null,null)]);var t,l}))])])}}),K=e({props:{childKey:{type:String,default:"children"},options:{type:Array,default:()=>[]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},currentNode:{type:Object},cursorNode:{type:Object}},emits:["nodeClick","changeCursor"],setup(e,{slots:r,emit:t}){const n=a([]);function s(r,a){return o(k,{level:a+1,labelKey:e.labelKey,valueKey:e.valueKey,activeNodes:n.value,onNodeClick:e=>t("nodeClick",e),onChangeCursor:e=>t("changeCursor",e),options:r,cursorNode:e.cursorNode},null)}function u(r){let t=!1;return c(r,((r,o)=>{r===e.currentNode&&(t=!0,o())}),["children"]),t}function i(){if(!f(e.options)||!e.currentNode)return[];const r=[e.options];let t=e.options;for(n.value.length=0;f(t);){const o=t.find(u);if(!o)break;n.value.push(o),t=o[e.childKey],r.push(t)}if(e.cursorNode){const t=r.findIndex((r=>r.findIndex((r=>r===e.cursorNode))>=0));if(t>=0){const e=r.slice(0,t+1);return n.value.splice(t,r.length),e}}return r}return()=>o("section",{class:"search-cascader__menuWrapper"},[f(e.options)&&e.options.length?e.currentNode?i().map(s):s(e.options,0):o("section",{class:"search-cascader__emptyWrapper"},[h(r.empty)?r.empty():o("section",null,[l("empty")])])])}});export{K as SearchMenu};
@@ -3,3 +3,4 @@ import { ComputedRef, InjectionKey, Ref } from 'vue';
3
3
  export declare const InjectionSearchCascaderLoadingNode: InjectionKey<Ref<Nullable<AnyObject>>>;
4
4
  export declare const InjectionSearchCascaderValue: InjectionKey<ComputedRef<AnyObject[] | string>>;
5
5
  export declare const InjectionSearchCascaderCheckAbleLevel: InjectionKey<ComputedRef<'last' | number>>;
6
+ export declare const InjectionKeyboardEventBus: InjectionKey<AnyObject>;
@@ -1 +1 @@
1
- const e=Symbol("InjectionSearchCascaderLoadingNode "),a=Symbol("InjectionSearchCascaderValue "),c=Symbol("InjectionSearchCascaderCheckAbleLevel");export{c as InjectionSearchCascaderCheckAbleLevel,e as InjectionSearchCascaderLoadingNode,a as InjectionSearchCascaderValue};
1
+ const e=Symbol("InjectionSearchCascaderLoadingNode "),o=Symbol("InjectionSearchCascaderValue "),a=Symbol("InjectionSearchCascaderCheckAbleLevel"),c=Symbol("InjectionKeyboardEventBus");export{c as InjectionKeyboardEventBus,a as InjectionSearchCascaderCheckAbleLevel,e as InjectionSearchCascaderLoadingNode,o as InjectionSearchCascaderValue};
@@ -510,8 +510,8 @@ declare const SelectLabel: SFCWithInstall<import("vue").DefineComponent<{
510
510
  }>> & {
511
511
  onOnChange?: ((...args: any[]) => any) | undefined;
512
512
  }, {
513
- selectedList: any[];
514
513
  item: any;
514
+ selectedList: any[];
515
515
  isDetail: boolean;
516
516
  isLock: boolean;
517
517
  sourceType: string;
@@ -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"../../../_virtual/plugin-vue_export-helper.js";import A from"xe-utils";const O={key:0,class:"label-disable-wrap"},K=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],j={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(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:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.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(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.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 D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.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)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.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),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,K)):o("v-if",!0),r(c("div",j,[c("div",k,[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(P.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(P.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",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),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))}}),[["__file","LabelFormContent.vue"]]);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"../../../_virtual/plugin-vue_export-helper.js";import A from"../../../shared/utils/vexutilsExpand.js";const O={key:0,class:"label-disable-wrap"},j=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(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:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.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(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.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 D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let r=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.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)}P.labelSelectedEdit=[...r],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.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),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[r(W)?(n(),s("div",O,j)):d("v-if",!0),o(c("div",K,[c("div",k,[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(P.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(P.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",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),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))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
@@ -511,8 +511,8 @@ declare const _default: import("vue").DefineComponent<{
511
511
  }>> & {
512
512
  onOnChange?: ((...args: any[]) => any) | undefined;
513
513
  }, {
514
- selectedList: any[];
515
514
  item: any;
515
+ selectedList: any[];
516
516
  isDetail: boolean;
517
517
  isLock: boolean;
518
518
  sourceType: string;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as c,createBlock as b,unref as m,withCtx as r,renderList as p,normalizeStyle as u,createVNode as L,toDisplayString as y,withDirectives as h,normalizeClass as C,createTextVNode as f,vShow as g,createCommentVNode as v,mergeProps as I,nextTick as w}from"vue";import{NSpace as x,NTag as S,NTooltip as k,NIcon as O,NModal as N}from"naive-ui";import{AddCircleOutline as j}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";import{handleLabelColor as P}from"../../../shared/utils/vexutils.js";import _ from"xe-utils";const B={class:"c-select-label"},A=c("span",null,"常用",-1),E={key:2,class:"outexplicit"},H=c("span",null,"选择标签",-1),z={class:"svg-wrap"};var F=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},item:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1},isLock:{type:Boolean,default:!1},sourceType:{type:String,default:""},explicit:{type:Boolean,default:!1},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},queryCommonlabels:{type:Function,default:()=>Promise.resolve({data:{}})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})}},emits:["onChange"],setup(e,{emit:F}){const V=e,T=l(null),U=t({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const D=a((()=>{const e=(null==V?void 0:V.item)||{};return(1==e.is_edit||e.isShow)&&!V.isDetail})),$=(e,l)=>{e.length&&e.forEach((e=>{let t=l.some((l=>l.labelId==e.labelId));e.isSelect=t}))},q=(e,l)=>{let t=U.multipleChoiceConfig,a=U.labelSelectedList||[];if(e){if(a.some((e=>e.labelId==l.labelId)))return;"2"==t[l.typeId]&&(a=a.filter((e=>e.typeId!==l.typeId))),a.push(l)}else{const e=a.findIndex((e=>e.labelId==l.labelId));-1!=e&&a.splice(e,1)}F("onChange",[...a]),U.labelSelectedList=a},J=e=>{V.isLock||(V.explicit||"init"===e||(U.labelVisible=!0),M(V.item))},R=()=>{var e;V.explicit||(null==(e=T.value)||e.resetShowAdd(),U.editLabelItem.showAdd=!1,U.editLabelItem={},U.inited=!1,U.modalWidth="763px",U.modalHeight="404px",U.maxHeight="404px",U.isChangeWindow=!1,U.labelVisible=!1)},K=()=>{U.isChangeWindow=!U.isChangeWindow;let e=document.body.clientHeight;U.modalWidth="763px"===U.modalWidth?"100%":"763px",U.modalHeight="404px"===U.modalHeight?e-110+"px":"404px",U.maxHeight="auto"===U.modalHeight?"404px":"none"},G=()=>{var e;null==(e=T.value)||e.handleLabelForm((e=>{F("onChange",[...e]),U.labelSelectedList=e,$(U.commonLabelList,e),R()}))},M=async(e,l)=>{const{rows:t,results:a}=await V.getLabelList(e,{update:l}),i=t||[],o={},s=`${e.val_key}_${e.name}`,n=l?[...U.labelSelectedEdit||[]]:[...U.labelSelectedList||[]];i.forEach((e=>{e.cacheKey=s,e.isSelect=!1,o[e.typeName]?o[e.typeName].itemList.push({...e}):o[e.typeName]={itemList:[{...e}],showAdd:!1,addVal:"",typeName:e.typeName,typeId:e.typeId}})),a&&(e.labelObj=o,e.labelList=i),l&&(U.labelSelectedEdit=n),U.editLabelItem=e,Q(a)},Q=e=>{if(!e)return!1;let l=Object.keys(e),t={},a=(e.typeList||[]).reduce(((e,l)=>(t[l.typeId]=l.multipleChoice,e[l.typeName]={multipleChoice:l.multipleChoice,parentColor:l.parentColor,allowCreateByPersonal:l.allowCreateByPersonal},e)),{});V.explicit&&(U.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?_.isPlainObject(e[l])?U.editLabelItem.labelObj[l]?(U.editLabelItem.labelObj[l].isNoAdd=!0,U.editLabelItem.labelObj[l].multipleChoice=null==(i=a[l])?void 0:i.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(o=a[l])?void 0:o.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(s=a[l])?void 0:s.parentColor):U.editLabelItem.labelObj[l]={addVal:"",showAdd:!1,itemList:!1,typeId:"",typeName:l,allowCreateByPersonal:null==(t=a[l])?void 0:t.allowCreateByPersonal,...a[l]||{}}:(U.editLabelItem.labelObj[l].multipleChoice=null==(n=a[l])?void 0:n.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(d=a[l])?void 0:d.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(c=a[l])?void 0:c.parentColor):e[l].forEach((e=>{U.editLabelItem.labelObj[e.typeName]={addVal:"",showAdd:!1,itemList:[],typeId:e.typeId,typeName:e.typeName,allowCreateByPersonal:e.allowCreateByPersonal,...a[e.typeName]||{}}})))}))},X=()=>{M(V.item,!0)},Y=()=>{G()},Z=(e,l)=>{V.explicit&&w((()=>{var t;null==(t=T.value)||t.hanldeSetLabelItem(e,l)}))};return i((()=>{V.explicit?J():(async e=>{const{rows:l,results:t}=await V.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});U.multipleChoiceConfig=a})(V.item)})),o((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];U.labelSelectedList=JSON.parse(JSON.stringify(l)),$(U.commonLabelList,U.labelSelectedList)}}),{immediate:!0,deep:!0}),o((()=>{var e;return null==(e=V.item)?void 0:e.label_type}),(e=>{e&&"form"==V.sourceType&&(async e=>{var l;let{data:t={}}=await V.queryCommonlabels(e)||{};if("SUCCESS"!==t.result)return;let a=(null==(l=t.map)?void 0:l.rows)||[];$(a,U.labelSelectedList),U.commonLabelList=a})(e)}),{immediate:!0,deep:!0}),(l,t)=>(s(),n(d,null,[c("div",B,[e.explicit?v("v-if",!0):(s(),b(m(x),{key:0,align:"center"},{default:r((()=>[(s(!0),n(d,null,p(U.labelSelectedList,(e=>(s(),b(m(S),{bordered:!1,key:e.labelId,style:u(m(P)(e,!0)),closable:m(D),onClose:l=>(e=>{const l=U.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),F("onChange",[...l]),U.labelSelectedList=l,Z(e.labelId,!1)})(e),size:"small"},{default:r((()=>[L(m(k),{placement:"top-start"},{trigger:r((()=>[c("span",null,y(e.labelName),1)])),default:r((()=>[c("span",null,y(e.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),e.explicit?v("v-if",!0):h((s(),n("span",{key:0,class:C(["form-add-icon form-add-icon-label",{disable:e.isLock}]),onClick:J},[L(m(O),{class:"add-icon",component:m(j)},null,8,["component"]),f(" 新增 ")],2)),[[g,m(D)]])])),_:1})),"form"==e.sourceType&&U.commonLabelList.length&&m(D)&&!e.explicit?(s(),b(m(x),{key:1,align:"center",class:"common-label"},{default:r((()=>[A,(s(!0),n(d,null,p(U.commonLabelList,((e,l)=>(s(),b(m(S),{checkable:"",checked:e.isSelect,"onUpdate:checked":l=>function(e,l){l.isSelect=e,q(e,l)}(l,e),key:l,style:u(m(P)(e)),size:"small"},{default:r((()=>[L(m(k),{placement:"top-start"},{trigger:r((()=>[c("span",null,y(e.labelName),1)])),default:r((()=>[c("span",null,y(e.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):v("v-if",!0),e.explicit&&m(D)?(s(),n("div",E,[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,explicit:e.explicit,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:X,onExplicitOnChange:Y}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):v("v-if",!0)]),v(" 弹窗 "),L(m(N),{preset:"dialog",class:C(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":U.isChangeWindow}]),show:U.labelVisible,"onUpdate:show":t[0]||(t[0]=e=>U.labelVisible=e),onPositiveClick:G,onNegativeClick:R,onClose:R,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:u({width:U.modalWidth})},{header:r((()=>[H,c("div",z,[c("i",{onClick:K,class:C(["iconfont-select-label",U.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,sourceType:e.sourceType,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:X}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64))}});export{F as default};
1
+ import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as c,createBlock as b,unref as m,withCtx as r,renderList as p,normalizeStyle as u,createVNode as L,toDisplayString as h,withDirectives as y,normalizeClass as C,createTextVNode as f,vShow as g,createCommentVNode as v,mergeProps as I,nextTick as w}from"vue";import{NSpace as x,NTag as S,NTooltip as k,NIcon as O,NModal as j}from"naive-ui";import{AddCircleOutline as N}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";import{handleLabelColor as P}from"../../../shared/utils/vexutils.js";import _ from"../../../shared/utils/vexutilsExpand.js";const B={class:"c-select-label"},E=c("span",null,"常用",-1),A={key:2,class:"outexplicit"},H=c("span",null,"选择标签",-1),z={class:"svg-wrap"};var F=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},item:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1},isLock:{type:Boolean,default:!1},sourceType:{type:String,default:""},explicit:{type:Boolean,default:!1},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},queryCommonlabels:{type:Function,default:()=>Promise.resolve({data:{}})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})}},emits:["onChange"],setup(e,{emit:F}){const V=e,T=l(null),U=t({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const D=a((()=>{const e=(null==V?void 0:V.item)||{};return(1==e.is_edit||e.isShow)&&!V.isDetail})),$=(e,l)=>{e.length&&e.forEach((e=>{let t=l.some((l=>l.labelId==e.labelId));e.isSelect=t}))},q=(e,l)=>{let t=U.multipleChoiceConfig,a=U.labelSelectedList||[];if(e){if(a.some((e=>e.labelId==l.labelId)))return;"2"==t[l.typeId]&&(a=a.filter((e=>e.typeId!==l.typeId))),a.push(l)}else{const e=a.findIndex((e=>e.labelId==l.labelId));-1!=e&&a.splice(e,1)}F("onChange",[...a]),U.labelSelectedList=a},J=e=>{V.isLock||(V.explicit||"init"===e||(U.labelVisible=!0),M(V.item))},R=()=>{var e;V.explicit||(null==(e=T.value)||e.resetShowAdd(),U.editLabelItem.showAdd=!1,U.editLabelItem={},U.inited=!1,U.modalWidth="763px",U.modalHeight="404px",U.maxHeight="404px",U.isChangeWindow=!1,U.labelVisible=!1)},K=()=>{U.isChangeWindow=!U.isChangeWindow;let e=document.body.clientHeight;U.modalWidth="763px"===U.modalWidth?"100%":"763px",U.modalHeight="404px"===U.modalHeight?e-110+"px":"404px",U.maxHeight="auto"===U.modalHeight?"404px":"none"},G=()=>{var e;null==(e=T.value)||e.handleLabelForm((e=>{F("onChange",[...e]),U.labelSelectedList=e,$(U.commonLabelList,e),R()}))},M=async(e,l)=>{const{rows:t,results:a}=await V.getLabelList(e,{update:l}),i=t||[],o={},s=`${e.val_key}_${e.name}`,n=l?[...U.labelSelectedEdit||[]]:[...U.labelSelectedList||[]];i.forEach((e=>{e.cacheKey=s,e.isSelect=!1,o[e.typeName]?o[e.typeName].itemList.push({...e}):o[e.typeName]={itemList:[{...e}],showAdd:!1,addVal:"",typeName:e.typeName,typeId:e.typeId}})),a&&(e.labelObj=o,e.labelList=i),l&&(U.labelSelectedEdit=n),U.editLabelItem=e,Q(a)},Q=e=>{if(!e)return!1;let l=Object.keys(e),t={},a=(e.typeList||[]).reduce(((e,l)=>(t[l.typeId]=l.multipleChoice,e[l.typeName]={multipleChoice:l.multipleChoice,parentColor:l.parentColor,allowCreateByPersonal:l.allowCreateByPersonal},e)),{});V.explicit&&(U.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?_.isPlainObject(e[l])?U.editLabelItem.labelObj[l]?(U.editLabelItem.labelObj[l].isNoAdd=!0,U.editLabelItem.labelObj[l].multipleChoice=null==(i=a[l])?void 0:i.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(o=a[l])?void 0:o.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(s=a[l])?void 0:s.parentColor):U.editLabelItem.labelObj[l]={addVal:"",showAdd:!1,itemList:!1,typeId:"",typeName:l,allowCreateByPersonal:null==(t=a[l])?void 0:t.allowCreateByPersonal,...a[l]||{}}:(U.editLabelItem.labelObj[l].multipleChoice=null==(n=a[l])?void 0:n.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(d=a[l])?void 0:d.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(c=a[l])?void 0:c.parentColor):e[l].forEach((e=>{U.editLabelItem.labelObj[e.typeName]={addVal:"",showAdd:!1,itemList:[],typeId:e.typeId,typeName:e.typeName,allowCreateByPersonal:e.allowCreateByPersonal,...a[e.typeName]||{}}})))}))},X=()=>{M(V.item,!0)},Y=()=>{G()},Z=(e,l)=>{V.explicit&&w((()=>{var t;null==(t=T.value)||t.hanldeSetLabelItem(e,l)}))};return i((()=>{V.explicit?J():(async e=>{const{rows:l,results:t}=await V.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});U.multipleChoiceConfig=a})(V.item)})),o((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];U.labelSelectedList=JSON.parse(JSON.stringify(l)),$(U.commonLabelList,U.labelSelectedList)}}),{immediate:!0,deep:!0}),o((()=>{var e;return null==(e=V.item)?void 0:e.label_type}),(e=>{e&&"form"==V.sourceType&&(async e=>{var l;let{data:t={}}=await V.queryCommonlabels(e)||{};if("SUCCESS"!==t.result)return;let a=(null==(l=t.map)?void 0:l.rows)||[];$(a,U.labelSelectedList),U.commonLabelList=a})(e)}),{immediate:!0,deep:!0}),(l,t)=>(s(),n(d,null,[c("div",B,[e.explicit?v("v-if",!0):(s(),b(m(x),{key:0,align:"center"},{default:r((()=>[(s(!0),n(d,null,p(U.labelSelectedList,(e=>(s(),b(m(S),{bordered:!1,key:e.labelId,style:u(m(P)(e,!0)),closable:m(D),onClose:l=>(e=>{const l=U.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),F("onChange",[...l]),U.labelSelectedList=l,Z(e.labelId,!1)})(e),size:"small"},{default:r((()=>[L(m(k),{placement:"top-start"},{trigger:r((()=>[c("span",null,h(e.labelName),1)])),default:r((()=>[c("span",null,h(e.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),e.explicit?v("v-if",!0):y((s(),n("span",{key:0,class:C(["form-add-icon form-add-icon-label",{disable:e.isLock}]),onClick:J},[L(m(O),{class:"add-icon",component:m(N)},null,8,["component"]),f(" 新增 ")],2)),[[g,m(D)]])])),_:1})),"form"==e.sourceType&&U.commonLabelList.length&&m(D)&&!e.explicit?(s(),b(m(x),{key:1,align:"center",class:"common-label"},{default:r((()=>[E,(s(!0),n(d,null,p(U.commonLabelList,((e,l)=>(s(),b(m(S),{checkable:"",checked:e.isSelect,"onUpdate:checked":l=>function(e,l){l.isSelect=e,q(e,l)}(l,e),key:l,style:u(m(P)(e)),size:"small"},{default:r((()=>[L(m(k),{placement:"top-start"},{trigger:r((()=>[c("span",null,h(e.labelName),1)])),default:r((()=>[c("span",null,h(e.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):v("v-if",!0),e.explicit&&m(D)?(s(),n("div",A,[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,explicit:e.explicit,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:X,onExplicitOnChange:Y}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):v("v-if",!0)]),v(" 弹窗 "),L(m(j),{preset:"dialog",class:C(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":U.isChangeWindow}]),show:U.labelVisible,"onUpdate:show":t[0]||(t[0]=e=>U.labelVisible=e),onPositiveClick:G,onNegativeClick:R,onClose:R,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:u({width:U.modalWidth})},{header:r((()=>[H,c("div",z,[c("i",{onClick:K,class:C(["iconfont-select-label",U.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,sourceType:e.sourceType,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:X}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64))}});export{F as default};
@@ -1 +1 @@
1
- @font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.iconfont-select-label{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:14px;font-style:normal}.icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-select-label-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.c-select-label .label-disable-wrap{align-items:center;display:flex;flex-direction:column;font-size:14px;line-height:20px;width:100%}.c-select-label .label-disable-wrap .label-disable-img{height:248px;width:320px}.c-select-label .common-label{border:1px solid rgba(0,0,0,.1);border-radius:4px;margin-top:8px!important;padding:4px 12px}.c-select-label .common-label>span{color:rgba(0,0,0,.9);margin-right:16px}.c-select-label .form-add-icon-label{align-items:center;color:#2d7aff;cursor:pointer;display:inline-flex;vertical-align:middle}.c-select-label .anticon+.anticon{margin-left:16px}.c-select-label .n-tag{border:1px solid #e0e0e6;margin:0 8px 0 0;max-width:108px}.c-select-label .n-tag .n-base-icon{color:#fff}.c-select-label .n-tag .n-tag__content{align-items:center;display:inline-block;line-height:20px;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-label-form-content{border-bottom:1px solid #e8e8e8;border-top:1px solid #e8e8e8;height:100%;width:100%}.c-label-form-content .label-wrap{display:flex;height:100%;width:100%}.c-label-form-content .label-wrap .left-label-wrap{border-right:1px solid #e8e8e8;max-height:404px;width:140px}.c-label-form-content .label-wrap .left-label-wrap.total-left-label-wrap{height:calc(100vh - 109px);max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .left-label-wrap.explicit-label-wrap{height:auto;overflow:hidden;overflow-y:auto;width:100%}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link{font-size:14px;padding:10px 8px}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link.n-anchor-link--active{background-color:#f2f2f2}.c-label-form-content .label-wrap .right-label-wrap{flex:1;max-height:404px;overflow-y:auto}.c-label-form-content .label-wrap .right-label-wrap.total-right-label-wrap{max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .right-label-wrap .label-add{display:inline-flex;height:30px;justify-content:center;line-height:30px;position:relative;text-align:center;top:2px;width:108px}.c-label-form-content .label-wrap .right-label-wrap .label-add .selfval{align-items:center;display:flex;justify-content:center}.c-label-form-content .label-wrap .right-label-wrap .add-input{width:108px}.c-label-form-content .label-wrap .right-label-wrap .add-input .n-input__suffix{cursor:pointer}.c-label-form-content .label-wrap .explicit-continer{border:1px solid #d5d5d5;width:100%}.c-label-form-content .edit-label-type{font-size:12px;margin-left:4px}.c-label-form-content .edit-label-content{margin-top:10px;padding:0 14px}.c-label-form-content .edit-label-content .edit-content{margin-top:8px;width:100%}.c-label-form-content .edit-label-content .edit-content .n-tag{border:1px solid #e0e0e6;margin:0 8px 8px 0;max-width:108px;text-align:center}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.c-label-form-content .edit-label-content .edit-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}.n-dialog__title .svg-wrap{margin:0 0 0 auto}.n-dialog__title .svg-wrap i{cursor:pointer;font-size:16px}
1
+ @font-face{font-family:select-label-iconfont;src:url(select-label-iconfont.ttf) format("truetype")}.iconfont-select-label{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:select-label-iconfont!important;font-size:14px;font-style:normal}.icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-select-label-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.c-select-label .label-disable-wrap{align-items:center;display:flex;flex-direction:column;font-size:14px;line-height:20px;width:100%}.c-select-label .label-disable-wrap .label-disable-img{height:248px;width:320px}.c-select-label .common-label{border:1px solid rgba(0,0,0,.1);border-radius:4px;margin-top:8px!important;padding:4px 12px}.c-select-label .common-label>span{color:rgba(0,0,0,.9);margin-right:16px}.c-select-label .form-add-icon-label{align-items:center;color:#2d7aff;cursor:pointer;display:inline-flex;vertical-align:middle}.c-select-label .anticon+.anticon{margin-left:16px}.c-select-label .n-tag{border:1px solid #e0e0e6;margin:0 8px 0 0;max-width:108px}.c-select-label .n-tag .n-base-icon{color:#fff}.c-select-label .n-tag .n-tag__content{align-items:center;display:inline-block;line-height:20px;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-label-form-content{border-bottom:1px solid #e8e8e8;border-top:1px solid #e8e8e8;height:100%;width:100%}.c-label-form-content .label-wrap{display:flex;height:100%;width:100%}.c-label-form-content .label-wrap .left-label-wrap{border-right:1px solid #e8e8e8;max-height:404px;width:140px}.c-label-form-content .label-wrap .left-label-wrap.total-left-label-wrap{height:calc(100vh - 109px);max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .left-label-wrap.explicit-label-wrap{height:auto;overflow:hidden;overflow-y:auto;width:100%}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link{font-size:14px;padding:10px 8px}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link.n-anchor-link--active{background-color:#f2f2f2}.c-label-form-content .label-wrap .right-label-wrap{flex:1;max-height:404px;overflow-y:auto}.c-label-form-content .label-wrap .right-label-wrap.total-right-label-wrap{max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .right-label-wrap .label-add{display:inline-flex;height:30px;justify-content:center;line-height:30px;position:relative;text-align:center;top:2px;width:108px}.c-label-form-content .label-wrap .right-label-wrap .label-add .selfval{align-items:center;display:flex;justify-content:center}.c-label-form-content .label-wrap .right-label-wrap .add-input{width:108px}.c-label-form-content .label-wrap .right-label-wrap .add-input .n-input__suffix{cursor:pointer}.c-label-form-content .label-wrap .explicit-continer{border:1px solid #d5d5d5;width:100%}.c-label-form-content .edit-label-type{font-size:12px;margin-left:4px}.c-label-form-content .edit-label-content{margin-top:10px;padding:0 14px}.c-label-form-content .edit-label-content .edit-content{margin-top:8px;width:100%}.c-label-form-content .edit-label-content .edit-content .n-tag{border:1px solid #e0e0e6;margin:0 8px 8px 0;max-width:108px;text-align:center}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.c-label-form-content .edit-label-content .edit-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}.n-dialog__title .svg-wrap{margin:0 0 0 auto}.n-dialog__title .svg-wrap i{cursor:pointer;font-size:16px}
@@ -2,6 +2,7 @@ import { SFCWithInstall } from '../../../es/shared/types';
2
2
  declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
3
3
  defaultList: {
4
4
  type: import("vue").PropType<((string | number) | {
5
+ [key: string]: any;
5
6
  key: string | number;
6
7
  name: string;
7
8
  })[]>;
@@ -48,8 +49,14 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
48
49
  type: BooleanConstructor;
49
50
  default: boolean;
50
51
  };
52
+ treeSetting: {
53
+ type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
54
+ [k: string]: unknown;
55
+ } & import("../../../es/shared/types").AnyObject>;
56
+ default: () => {};
57
+ };
51
58
  queryLoadChildData: {
52
- type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<void>>;
59
+ type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
53
60
  default: undefined;
54
61
  };
55
62
  queryTreeSearch: {
@@ -60,6 +67,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
60
67
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
61
68
  defaultList: {
62
69
  type: import("vue").PropType<((string | number) | {
70
+ [key: string]: any;
63
71
  key: string | number;
64
72
  name: string;
65
73
  })[]>;
@@ -106,8 +114,14 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
106
114
  type: BooleanConstructor;
107
115
  default: boolean;
108
116
  };
117
+ treeSetting: {
118
+ type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
119
+ [k: string]: unknown;
120
+ } & import("../../../es/shared/types").AnyObject>;
121
+ default: () => {};
122
+ };
109
123
  queryLoadChildData: {
110
- type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<void>>;
124
+ type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
111
125
  default: undefined;
112
126
  };
113
127
  queryTreeSearch: {
@@ -116,8 +130,9 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
116
130
  };
117
131
  }>> & {
118
132
  onCheck?: ((...args: any[]) => any) | undefined;
133
+ onCheckWithLevel?: ((...args: any[]) => any) | undefined;
119
134
  }>>;
120
- emit: (event: "check", ...args: any[]) => void;
135
+ emit: (event: "check" | "checkWithLevel", ...args: any[]) => void;
121
136
  keyword: import("vue").Ref<string>;
122
137
  checkedAll: import("vue").Ref<boolean>;
123
138
  checkedKeys: import("vue").Ref<(string | number)[]>;
@@ -134,28 +149,47 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
134
149
  suffix?: (() => import("vue").VNodeChild) | undefined;
135
150
  }[]>;
136
151
  tagData: import("vue").Ref<{
152
+ [x: string]: any;
137
153
  key: string | number;
138
154
  name: string;
139
155
  }[]>;
140
- temp: (import("naive-ui/es/tree/src/interface").TreeOptionBase & {
141
- [k: string]: unknown;
142
- } & import("../../../es/shared/types").AnyObject)[];
156
+ initTagData: import("vue").Ref<{
157
+ [x: string]: any;
158
+ key: string | number;
159
+ name: string;
160
+ }[]>;
161
+ isSearch: import("vue").Ref<boolean>;
162
+ temp: import("naive-ui").TreeOption[];
143
163
  allCheckedKeys: (string | number)[];
144
164
  isRemote: import("vue").ComputedRef<boolean>;
165
+ checkStrategyResult: import("vue").ComputedRef<any>;
145
166
  init: () => void;
167
+ getallCheckedKeysWithChild: (item: import("naive-ui").TreeOption) => void;
168
+ getallCheckedKeysWithParent: (item: import("naive-ui").TreeOption) => void;
169
+ queryLoadChildNode: (node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>;
146
170
  setDisabled: (data: import("naive-ui").TreeOption) => void;
147
171
  renderLabel: ({ option }: {
148
172
  option: import("naive-ui").TreeOption;
149
173
  }) => JSX.Element;
150
174
  getLabelName: (option: import("naive-ui").TreeOption) => unknown;
175
+ transformData: (trees: import("naive-ui").TreeOption[]) => import("naive-ui").TreeOption[];
176
+ calculateRootItems: (trees: import("naive-ui").TreeOption[], items: import("naive-ui").TreeOption[]) => import("naive-ui").TreeOption[];
177
+ transformParentNodeName: (trees: import("naive-ui").TreeOption[], temp: any) => import("naive-ui").TreeOption[];
151
178
  setAllCheckedKeys: (tree: import("naive-ui").TreeOption[]) => void;
179
+ setAllCheckedKeysWithChild: (tree: import("naive-ui").TreeOption[]) => void;
180
+ setAllCheckedKeysWithParent: (tree: import("naive-ui").TreeOption[]) => void;
152
181
  onSearch: () => Promise<void>;
182
+ onClear: () => void;
153
183
  setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
184
+ setCheckdWithChild: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
185
+ setCheckdWithParent: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
154
186
  checkedAllChange: (checked: boolean) => void;
155
187
  uniq: (arr: {
188
+ [key: string]: any;
156
189
  key: string | number;
157
190
  name: string;
158
191
  }[]) => {
192
+ [key: string]: any;
159
193
  key: string | number;
160
194
  name: string;
161
195
  }[];
@@ -164,9 +198,11 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
164
198
  setCheckedAll: () => void;
165
199
  clearAll: () => void;
166
200
  closeTag: (tag: {
201
+ [key: string]: any;
167
202
  key: string | number;
168
203
  name: string;
169
204
  }) => void;
205
+ notifyCheck: (keys: (string | number)[]) => void;
170
206
  NButton: any;
171
207
  NInput: any;
172
208
  NInputGroup: import("vue").DefineComponent<{
@@ -236,9 +272,151 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
236
272
  readonly privateShow: boolean;
237
273
  }>;
238
274
  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<{}>>, {}>;
239
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "check"[], "check", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
275
+ SearchMultiple: import("vue").DefineComponent<{
276
+ treeData: {
277
+ type: import("vue").PropType<any[]>;
278
+ default: () => never[];
279
+ };
280
+ checkedKeys: {
281
+ type: import("vue").PropType<(string | number)[]>;
282
+ default: () => never[];
283
+ };
284
+ }, {
285
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
286
+ treeData: {
287
+ type: import("vue").PropType<any[]>;
288
+ default: () => never[];
289
+ };
290
+ checkedKeys: {
291
+ type: import("vue").PropType<(string | number)[]>;
292
+ default: () => never[];
293
+ };
294
+ }>> & {
295
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
296
+ }>>;
297
+ emit: (event: "notifyCheck", ...args: any[]) => void;
298
+ optionsRef: import("vue").ComputedRef<any[]>;
299
+ list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<any>[]>;
300
+ containerProps: {
301
+ ref: import("vue").Ref<any>;
302
+ onScroll: () => void;
303
+ style: Partial<CSSStyleDeclaration>;
304
+ };
305
+ wrapperProps: import("vue").ComputedRef<{
306
+ style: {
307
+ width: string;
308
+ height: string;
309
+ marginTop: string;
310
+ };
311
+ }>;
312
+ containerStyleWithHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
313
+ searchCheckKeys: import("vue").Ref<(string | number)[]>;
314
+ showSelectKeys: import("vue").Ref<(string | number)[]>;
315
+ checkedChange: (checkList: (string | number)[], meta: {
316
+ actionType: "check" | "uncheck";
317
+ value: string | number;
318
+ }) => void;
319
+ handleCheckKey: (baseKeys: (string | number)[], currentTree: {
320
+ [key: string]: any;
321
+ key: string | number;
322
+ children: any[];
323
+ parentNode: any;
324
+ } | null, value: string | number) => false | undefined;
325
+ findParent: (baseKeys: (string | number)[], currentTree: {
326
+ [key: string]: any;
327
+ key: string | number;
328
+ children: any[];
329
+ parentNode: any;
330
+ }) => false | undefined;
331
+ handleUnCheckKey: (baseKeys: (string | number)[], currentTree: {
332
+ [key: string]: any;
333
+ key: string | number;
334
+ children: any[];
335
+ parentNode: any;
336
+ }, value: string | number) => false | undefined;
337
+ findChild: (baseKeys: (string | number)[], children: {
338
+ [key: string]: any;
339
+ key: string | number;
340
+ children: any[];
341
+ parentNode: any;
342
+ }[], value: string | number) => false | undefined;
343
+ checkInitTree: (tree: {
344
+ [key: string]: any;
345
+ key: string | number;
346
+ children: any[];
347
+ parentNode: any;
348
+ }, baseKey: string | number) => false | undefined;
349
+ ref: typeof import("vue").ref;
350
+ NCheckboxGroup: import("vue").DefineComponent<{
351
+ readonly min: NumberConstructor;
352
+ readonly max: NumberConstructor;
353
+ readonly size: import("vue").PropType<"small" | "medium" | "large">;
354
+ readonly value: import("vue").PropType<(string | number)[] | null>;
355
+ readonly defaultValue: {
356
+ readonly type: import("vue").PropType<(string | number)[] | null>;
357
+ readonly default: null;
358
+ };
359
+ readonly disabled: {
360
+ readonly type: import("vue").PropType<boolean | undefined>;
361
+ readonly default: undefined;
362
+ };
363
+ readonly 'onUpdate:value': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
364
+ actionType: "check" | "uncheck";
365
+ value: string | number;
366
+ }) => void>>;
367
+ readonly onUpdateValue: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
368
+ actionType: "check" | "uncheck";
369
+ value: string | number;
370
+ }) => void>>;
371
+ readonly onChange: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
372
+ }, {
373
+ mergedClsPrefix: import("vue").ComputedRef<string>;
374
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
375
+ readonly min: NumberConstructor;
376
+ readonly max: NumberConstructor;
377
+ readonly size: import("vue").PropType<"small" | "medium" | "large">;
378
+ readonly value: import("vue").PropType<(string | number)[] | null>;
379
+ readonly defaultValue: {
380
+ readonly type: import("vue").PropType<(string | number)[] | null>;
381
+ readonly default: null;
382
+ };
383
+ readonly disabled: {
384
+ readonly type: import("vue").PropType<boolean | undefined>;
385
+ readonly default: undefined;
386
+ };
387
+ readonly 'onUpdate:value': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
388
+ actionType: "check" | "uncheck";
389
+ value: string | number;
390
+ }) => void>>;
391
+ readonly onUpdateValue: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
392
+ actionType: "check" | "uncheck";
393
+ value: string | number;
394
+ }) => void>>;
395
+ readonly onChange: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
396
+ }>>, {
397
+ readonly disabled: boolean | undefined;
398
+ readonly defaultValue: (string | number)[] | null;
399
+ }>;
400
+ NCheckbox: any;
401
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "notifyCheck"[], "notifyCheck", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
402
+ treeData: {
403
+ type: import("vue").PropType<any[]>;
404
+ default: () => never[];
405
+ };
406
+ checkedKeys: {
407
+ type: import("vue").PropType<(string | number)[]>;
408
+ default: () => never[];
409
+ };
410
+ }>> & {
411
+ onNotifyCheck?: ((...args: any[]) => any) | undefined;
412
+ }, {
413
+ treeData: any[];
414
+ checkedKeys: (string | number)[];
415
+ }>;
416
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
240
417
  defaultList: {
241
418
  type: import("vue").PropType<((string | number) | {
419
+ [key: string]: any;
242
420
  key: string | number;
243
421
  name: string;
244
422
  })[]>;
@@ -285,8 +463,14 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
285
463
  type: BooleanConstructor;
286
464
  default: boolean;
287
465
  };
466
+ treeSetting: {
467
+ type: import("vue").PropType<import("naive-ui/es/tree/src/interface").TreeOptionBase & {
468
+ [k: string]: unknown;
469
+ } & import("../../../es/shared/types").AnyObject>;
470
+ default: () => {};
471
+ };
288
472
  queryLoadChildData: {
289
- type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<void>>;
473
+ type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
290
474
  default: undefined;
291
475
  };
292
476
  queryTreeSearch: {
@@ -295,12 +479,13 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
295
479
  };
296
480
  }>> & {
297
481
  onCheck?: ((...args: any[]) => any) | undefined;
482
+ onCheckWithLevel?: ((...args: any[]) => any) | undefined;
298
483
  }, {
299
484
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & {
300
485
  [k: string]: unknown;
301
486
  } & import("../../../es/shared/types").AnyObject)[];
302
- multiple: boolean;
303
487
  defaultList: ((string | number) | {
488
+ [key: string]: any;
304
489
  key: string | number;
305
490
  name: string;
306
491
  })[];
@@ -317,7 +502,11 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
317
502
  };
318
503
  showCount: boolean;
319
504
  showClear: boolean;
320
- queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<void>;
505
+ multiple: boolean;
506
+ treeSetting: import("naive-ui/es/tree/src/interface").TreeOptionBase & {
507
+ [k: string]: unknown;
508
+ } & import("../../../es/shared/types").AnyObject;
509
+ queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>;
321
510
  queryTreeSearch: (keyWork: string) => Promise<import("../../../es/shared/types").AnyObject[]>;
322
511
  }>>;
323
512
  export default SelectPerson;