cnhis-design-vue 3.1.44-beta.12 → 3.1.44-beta.14

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 (326) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +0 -6
  3. package/es/components/base-search/src/index.vue.d.ts +0 -6
  4. package/es/components/base-search/src/index.vue.js +1 -1
  5. package/es/components/base-search/src/index.vue2.js +1 -0
  6. package/es/components/big-table/src/BigTable.vue.js +1 -1
  7. package/es/components/big-table/src/components/NoData.vue.js +1 -1
  8. package/es/components/big-table/src/components/NoData.vue2.js +1 -0
  9. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +1 -0
  11. package/es/components/big-table/src/components/input-button.vue.js +1 -1
  12. package/es/components/big-table/src/components/input-button.vue2.js +1 -0
  13. package/es/components/big-table/src/components/separate.vue.js +1 -1
  14. package/es/components/big-table/src/components/separate.vue2.js +1 -0
  15. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  16. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  17. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +1 -0
  18. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  19. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  20. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  21. package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
  22. package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
  23. package/es/components/button-print/src/components/EditFormat.vue2.js +1 -0
  24. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
  25. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -0
  26. package/es/components/button-print/src/components/Preview.vue.js +1 -1
  27. package/es/components/classification/index.d.ts +553 -75
  28. package/es/components/classification/src/components/search-filter/index.vue.d.ts +551 -61
  29. package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
  30. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -0
  31. package/es/components/classification/src/components/set-classification/index.vue.d.ts +553 -75
  32. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  33. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -0
  34. package/es/components/classification/src/components/table-modal/index.vue.d.ts +1 -1
  35. package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
  36. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -0
  37. package/es/components/classification/src/const/index.d.ts +2 -2
  38. package/es/components/classification/src/index.vue.d.ts +553 -75
  39. package/es/components/classification/src/index.vue.js +1 -1
  40. package/es/components/classification/src/index.vue2.js +1 -0
  41. package/es/components/classification/style/index.css +1 -1
  42. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  43. package/es/components/date-picker/src/DatePicker.vue2.js +1 -0
  44. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
  45. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
  46. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  47. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -0
  48. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -1
  49. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.d.ts +1 -1
  51. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/useBottom.d.ts +1 -1
  53. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -1
  55. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
  56. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
  57. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  58. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  59. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  60. package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -1
  61. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
  62. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  63. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  64. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
  65. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  66. package/es/components/fabric-chart/src/hooks/useOther.d.ts +1 -1
  67. package/es/components/fabric-chart/src/hooks/useOther.js +1 -1
  68. package/es/components/fabric-chart/src/hooks/useRight.d.ts +1 -1
  69. package/es/components/fabric-chart/src/hooks/useRight.js +1 -1
  70. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +1 -1
  71. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
  72. package/es/components/fabric-chart/src/hooks/useShadow.d.ts +1 -1
  73. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -1
  74. package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +1 -1
  75. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -1
  76. package/es/components/fabric-chart/src/hooks/useTop.d.ts +1 -1
  77. package/es/components/fabric-chart/src/hooks/useTop.js +1 -1
  78. package/es/components/fabric-chart/src/interface.d.ts +2 -2
  79. package/es/components/fabric-chart/src/utils/index.js +1 -1
  80. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  81. package/es/components/field-set/src/FieldSet.vue2.js +1 -0
  82. package/es/components/form-config/index.d.ts +0 -2
  83. package/es/components/form-config/src/FormConfig.vue.d.ts +0 -2
  84. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  85. package/es/components/form-config/src/FormConfig.vue2.js +1 -0
  86. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +0 -1
  87. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  88. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -0
  89. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  90. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -0
  91. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +0 -1
  92. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  93. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -0
  94. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  95. package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +1 -0
  96. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  97. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -0
  98. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  99. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -0
  100. package/es/components/form-render/index.d.ts +0 -1
  101. package/es/components/form-render/src/FormRender.vue.d.ts +0 -1
  102. package/es/components/form-render/src/FormRender.vue.js +1 -1
  103. package/es/components/form-render/src/FormRender.vue2.js +1 -0
  104. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +0 -1
  105. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  106. package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -0
  107. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  108. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  109. package/es/components/form-render/src/components/renderer/input.d.ts +4 -4
  110. package/es/components/form-render/src/components/renderer/input.js +1 -1
  111. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +4 -4
  112. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
  113. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  114. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
  115. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -0
  116. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  117. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  118. package/es/components/form-render/src/components/renderer/select.js +1 -1
  119. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
  120. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -0
  121. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  122. package/es/components/form-render/src/types/index.d.ts +2 -0
  123. package/es/components/guide/src/renderer.js +1 -1
  124. package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
  125. package/es/components/iho-select-label/src/LabelFormContent.vue2.js +1 -0
  126. package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
  127. package/es/components/iho-select-label/src/SelectLabel.vue2.js +1 -0
  128. package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
  129. package/es/components/iho-select-label/src/components/label-classify.vue2.js +1 -0
  130. package/es/components/iho-table/index.d.ts +2 -0
  131. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  132. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  133. package/es/components/iho-table/src/IhoTable.vue2.js +1 -0
  134. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +1 -0
  135. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
  136. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +1 -0
  137. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  138. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -0
  139. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  140. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -0
  141. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  142. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
  143. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -0
  144. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  145. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  146. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -0
  147. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  148. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  149. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  150. package/es/components/iho-table/src/types/index.d.ts +1 -0
  151. package/es/components/iho-table/src/utils/index.js +1 -1
  152. package/es/components/iho-table/style/index.css +1 -1
  153. package/es/components/index.css +1 -1
  154. package/es/components/index.d.ts +2 -1
  155. package/es/components/index.js +1 -1
  156. package/es/components/info-header/index.d.ts +8 -2
  157. package/es/components/info-header/src/InfoHeader.vue.d.ts +8 -2
  158. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  159. package/es/components/info-header/src/InfoHeader.vue2.js +1 -0
  160. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
  161. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -0
  162. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
  163. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -0
  164. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  165. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +1 -0
  166. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  167. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +1 -0
  168. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +0 -1
  169. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  170. package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -0
  171. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +0 -1
  172. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  173. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -0
  174. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  175. package/es/components/keyboard/src/Keyboard.vue2.js +1 -0
  176. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  177. package/es/components/keyboard/src/components/InputNumber.vue2.js +1 -0
  178. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  179. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -0
  180. package/es/components/map/src/Map.vue.js +1 -1
  181. package/es/components/map/src/Map.vue2.js +1 -0
  182. package/es/components/picture-clipper/index.d.ts +53 -0
  183. package/es/components/picture-clipper/index.js +1 -0
  184. package/es/components/picture-clipper/src/PictureClipper.vue.d.ts +53 -0
  185. package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -0
  186. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -0
  187. package/es/components/picture-clipper/style/index.css +1 -0
  188. package/es/components/quick-search/index.d.ts +0 -6
  189. package/es/components/quick-search/src/index.vue.d.ts +0 -6
  190. package/es/components/quick-search/src/index.vue.js +1 -1
  191. package/es/components/quick-search/src/index.vue2.js +1 -0
  192. package/es/components/quick-search/style/index.css +1 -1
  193. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  194. package/es/components/recommend-search/src/RecommendSearch.vue2.js +1 -0
  195. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  196. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -0
  197. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  198. package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +1 -0
  199. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  200. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -0
  201. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  202. package/es/components/scale-view/src/ScaleView.vue2.js +1 -0
  203. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  204. package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -0
  205. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  206. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -0
  207. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
  208. package/es/components/scale-view/src/components/EvaluatePage.vue2.js +1 -0
  209. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
  210. package/es/components/scale-view/src/components/NoData.vue.js +1 -1
  211. package/es/components/scale-view/src/components/NoData.vue2.js +1 -0
  212. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  213. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -0
  214. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  215. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  216. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -0
  217. package/es/components/select-label/src/SelectLabel.vue.js +1 -1
  218. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  219. package/es/components/select-label/src/components/label-classify.vue2.js +1 -0
  220. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  221. package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
  222. package/es/components/select-person/src/SelectPerson.vue.js +1 -1
  223. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
  224. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -0
  225. package/es/components/shortcut-setter/index.d.ts +0 -1
  226. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +0 -1
  227. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
  228. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -0
  229. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
  230. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -0
  231. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  232. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -0
  233. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +551 -48
  234. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  235. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -0
  236. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +134 -0
  237. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -0
  238. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -0
  239. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +140 -0
  240. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -0
  241. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -0
  242. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +28 -0
  243. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -0
  244. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -0
  245. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.d.ts +28 -0
  246. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -0
  247. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +1 -0
  248. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.d.ts +54 -0
  249. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -0
  250. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -0
  251. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +61 -0
  252. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -0
  253. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -0
  254. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +68 -0
  255. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -0
  256. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -0
  257. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +47 -0
  258. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -0
  259. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -0
  260. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +551 -0
  261. package/es/components/table-filter/src/components/classify-filter/components/index.js +1 -0
  262. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +551 -48
  263. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  264. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -0
  265. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
  266. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +1 -0
  267. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  268. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
  269. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
  270. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -0
  271. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
  272. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -0
  273. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
  274. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -0
  275. package/es/components/table-filter/src/components/render-widget/components/{Label.vue.d.ts → LabelInner.vue.d.ts} +1 -9
  276. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -0
  277. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -0
  278. package/es/components/table-filter/src/components/render-widget/components/{SelectLabel.vue.d.ts → LabelOut.vue.d.ts} +1 -9
  279. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -0
  280. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -0
  281. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +1 -9
  282. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  283. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -0
  284. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +713 -8
  285. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  286. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +0 -6
  287. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  288. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +3 -27
  289. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  290. package/es/components/table-filter/src/constants/index.d.ts +3 -0
  291. package/es/components/table-filter/src/constants/index.js +1 -0
  292. package/es/components/table-filter/src/directive/resize.js +1 -1
  293. package/es/components/table-filter/src/tool/baseOptions.d.ts +4 -0
  294. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  295. package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
  296. package/es/components/table-filter/src/tool/transformData.js +1 -1
  297. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  298. package/es/components/table-filter/src/types/enums.js +1 -1
  299. package/es/components/time-line/src/TimeLine.vue.js +1 -1
  300. package/es/components/time-line/src/TimeLine.vue2.js +1 -0
  301. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  302. package/es/components/time-picker/src/TimePicker.vue2.js +1 -0
  303. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
  304. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -0
  305. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  306. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -0
  307. package/es/env.d.ts +25 -25
  308. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
  309. package/es/shared/components/SelectPage/SelectPage.vue2.js +1 -0
  310. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
  311. package/es/shared/components/SvgIcon/SvgIcon.vue2.js +1 -0
  312. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  313. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +1 -0
  314. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  315. package/es/shared/components/no-data/NoData.vue.js +1 -1
  316. package/es/shared/components/no-data/NoData.vue2.js +1 -0
  317. package/es/shared/package.json.js +1 -1
  318. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  319. package/es/shared/utils/fabricjs/index.js +1 -0
  320. package/es/shared/utils/tapable/index.d.ts +139 -0
  321. package/package.json +2 -2
  322. package/es/components/fabric-chart/src/utils/utils.js +0 -1
  323. package/es/components/table-filter/src/components/render-widget/components/Label.vue.js +0 -1
  324. package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.js +0 -1
  325. /package/es/_virtual/{plugin-vue_export-helper.js → _plugin-vue_export-helper.js} +0 -0
  326. /package/es/components/fabric-chart/src/utils/{utils.d.ts → index.d.ts} +0 -0
@@ -485,9 +485,6 @@ declare const _default: import("vue").DefineComponent<{
485
485
  modelValue: {
486
486
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
487
487
  };
488
- filterApiConfig: {
489
- type: ObjectConstructor;
490
- };
491
488
  }, any, {
492
489
  initialProps: {};
493
490
  }, {
@@ -511,9 +508,6 @@ declare const _default: import("vue").DefineComponent<{
511
508
  modelValue: {
512
509
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
513
510
  };
514
- filterApiConfig: {
515
- type: ObjectConstructor;
516
- };
517
511
  }>> & {
518
512
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
519
513
  onOutFilterChange?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as a,watch as t,onMounted as i,openBlock as n,createElementBlock as o,createElementVNode as r,Fragment as s,renderList as u,unref as c,normalizeClass as d,createCommentVNode as v,createVNode as f,withCtx as m,createTextVNode as p,toDisplayString as h,createBlock as g,withDirectives as k,vShow as b,isRef as y}from"vue";import{useMessage as C,NPopover as _,NModal as S,NCard as x,NIcon as A,NButton as q,NForm as w,NFormItem as F,NInput as j}from"naive-ui";import{CloseOutline as I,AddOutline as E}from"@vicons/ionicons5";import L from"../../table-filter/src/hooks/useMixins.js";import R from"../../table-filter/src/hooks/useRenderWidget.js";import U from"../../table-filter/src/hooks/useAdvanced.js";import V from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as z}from"lodash-es";import D from"../../../_virtual/plugin-vue_export-helper.js";const T={class:"quick-search-block quick-search-table"},B={class:"quick-row"},N={class:"quick-item-title"},O={class:"quick-item-col"},P={class:"svg-wrap"},Q={class:"flex_right"},M={class:"class-filter-content"},W={class:"quickSearch-content"},G=r("span",{class:"label"},"父类名称:",-1),J=["onDblclick","onClick"],H={key:0,class:"s-content"};var K=D(e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:D,emit:K}){const X=e,Y={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},Z=C(),{handleGetConfigApi:$,outQuickSearchFn:ee}=L(),{getRenderSearchConObj:le,resetRenderWidgetValue:ae,isRender:te}=R(),{transformData:ie,getCacheDef:ne,transformParams:oe}=U(),re=l(null),se=l({classname:""});let ue=l(!1),ce=l([]),de=l([]),ve=l(!1),fe=l(""),me=a((()=>!!de.value.length&&de.value.some((e=>e.isAdd)))),pe=a((()=>(e,l="name")=>e.alias||e[l]));function he(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=le(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ce.value)||[]}function ge(){var e;null==(e=re.value)||e.validate((e=>{var l;if(e)return;let a=he();a.length||(a=[]);let t=null==(l=de.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await $(e,"requestSaveTableCondiTion",{},X.filterApiConfig))return;ue.value=!1,null==(l=re.value)||l.restoreValidation(),se.value.classname="",de.value=[],_e()}catch(e){console.log(e)}}({tableId:X.tableId||"",setting:JSON.stringify({displayCategory:t,name:se.value.classname,conObj:a}),conditionList:"[]"})}))}function ke(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),ve.value=!0}function be(){ve.value=!1,fe.value&&(de.value.forEach((e=>e.selected=!1)),de.value.push({disabled:!0,value:fe.value,selected:!0,isAdd:!0}),fe.value="")}function ye(e){!function(e){de.value.splice(e,1)}(e)}function Ce(){ue.value=!1}function _e(){Se(ce.value),K("clearQuickSearchConfig")}function Se(e){Array.isArray(e)&&(e.forEach((e=>{ae(e)})),ee.handlerInitSearchItem(ce.value))}return t((()=>X.searchFieldList),(e=>{e&&e.length>0&&function(){let e=z(ie(X.searchFieldList)).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ce.value=e||[],ee.handlerInitSearchItem(ce.value)}()}),{immediate:!0,deep:!0}),t((()=>ce),(()=>{const e=he()||[],l=oe(e);K("getFilterParam",e,l)}),{deep:!0}),i((()=>{const e=X.quickSearchConfig;if(e&&e.length>0)return l=e,void ce.value.forEach((e=>{var a;if(te(e)){const t=l.find((l=>l.field_key===e.columnName));t&&(null==(a=t.value)?void 0:a.length)>0&&(e.value=ne(e,t.value))}}));var l;Se(ce.value)})),D({openSaveToCalss:function(){let e=he();e&&(e.length>0?ue.value=!0:Z.warning("请设置搜索条件"))},clearData:_e,onFilterSearch:function(){let e=he()||[];const l=oe(e);return K("onFilterSearch",e,l,!1),ce.value}}),(l,a)=>(n(),o("div",null,[r("div",T,[(n(!0),o(s,null,u(c(ce),(l=>(n(),o("div",{class:d(["quick-item",{"quick-block":l._isBlock}]),key:l.sid||l.columnName},[r("div",B,[v(" title "),r("div",N,[f(c(_),{trigger:"hover"},{trigger:m((()=>[p(h(c(pe)(l,"title")),1)])),default:m((()=>[r("span",null,h(c(pe)(l,"title")),1)])),_:2},1024)]),v(" content "),r("div",O,[v(" 直接渲染组件 "),l.isRender?(n(),g(V,{key:0,cfg:l,modelValue:l.value,filterApiConfig:e.filterApiConfig,"onUpdate:modelValue":e=>l.value=e},null,8,["cfg","modelValue","filterApiConfig","onUpdate:modelValue"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),f(c(S),{show:c(ue),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:ge,onNegativeClick:Ce,class:"classification-modal-block"},{default:m((()=>[f(c(x),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":m((()=>[r("div",P,[f(c(A),{component:c(I),size:"24",onClick:Ce},null,8,["component"])])])),footer:m((()=>[r("div",Q,[f(c(q),{onClick:Ce},{default:m((()=>[p("取消")])),_:1}),f(c(q),{type:"info",onClick:ge},{default:m((()=>[p("确认")])),_:1})])])),default:m((()=>[r("div",M,[f(c(w),{ref_key:"formRef",ref:re,"label-placement":"left",rules:Y,model:se.value},{default:m((()=>[f(c(F),{label:"筛选集名称",path:"classname"},{default:m((()=>[f(c(j),{value:se.value.classname,"onUpdate:value":a[0]||(a[0]=e=>se.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),r("div",W,[G,(n(!0),o(s,null,u(c(de),((e,l)=>(n(),o("div",{class:d(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:a=>function(e,l){e.disabled&&(de.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(n(),o("div",H,[r("span",null,h(e.value),1)])):(n(),g(c(j),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),f(c(A),{component:c(I),class:"anticon-close",size:"20",onClick:e=>ye(l)},null,8,["component","onClick"])],42,J)))),128)),c(me)?v("v-if",!0):(n(),o(s,{key:0},[k(f(c(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:ke},{default:m((()=>[f(c(A),{component:c(E),size:"20"},null,8,["component"]),p("添加分类 ")])),_:1},512),[[b,!c(ve)]]),k(f(c(j),{style:{width:"100px"},class:"edit-tag",value:c(fe),"onUpdate:value":a[1]||(a[1]=e=>y(fe)?fe.value=e:fe=e),valueModifiers:{trim:!0},onBlur:be,maxLength:10},null,8,["value"]),[[b,c(ve)]])],64))])])])),_:1})])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{K as default};
1
+ import e from"./index.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","index.vue"]]);export{i as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,provide as a,computed as t,watch as i,onMounted as n,openBlock as o,createElementBlock as s,createElementVNode as r,Fragment as c,renderList as u,unref as d,normalizeClass as v,createCommentVNode as f,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as S,NPopover as x,NModal as _,NCard as A,NIcon as q,NButton as w,NForm as F,NFormItem as j,NInput as I}from"naive-ui";import{CloseOutline as E,AddOutline as L}from"@vicons/ionicons5";import R from"../../table-filter/src/hooks/useMixins.js";import U from"../../table-filter/src/hooks/useRenderWidget.js";import V from"../../table-filter/src/hooks/useAdvanced.js";import z from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as D}from"lodash-es";import{InjectionFilterApiConfig as T}from"../../table-filter/src/constants/index.js";const B={class:"quick-search-block quick-search-table"},N={class:"quick-row"},O={class:"quick-item-title"},P={class:"quick-item-col"},Q={class:"svg-wrap"},M={class:"flex_right"},W={class:"class-filter-content"},G={class:"quickSearch-content"},J=r("span",{class:"label"},"父类名称:",-1),H=["onDblclick","onClick"],K={key:0,class:"s-content"};var X=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:X,emit:Y}){const Z=e,$={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},ee=S(),{handleGetConfigApi:le,outQuickSearchFn:ae}=R(),{getRenderSearchConObj:te,resetRenderWidgetValue:ie,isRender:ne}=U(),{transformData:oe,getCacheDef:se,transformParams:re}=V(),ce=l(null),ue=l({classname:""});let de=l(!1),ve=l([]),fe=l([]),me=l(!1),pe=l("");a(T,Z.filterApiConfig);let he=t((()=>!!fe.value.length&&fe.value.some((e=>e.isAdd)))),ge=t((()=>(e,l="name")=>e.alias||e[l]));function ke(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=te(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ve.value)||[]}function be(){var e;null==(e=ce.value)||e.validate((e=>{var l;if(e)return;let a=ke();a.length||(a=[]);let t=null==(l=fe.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await le(e,"requestSaveTableCondiTion",{},Z.filterApiConfig))return;de.value=!1,null==(l=ce.value)||l.restoreValidation(),ue.value.classname="",fe.value=[],_e()}catch(e){console.log(e)}}({tableId:Z.tableId||"",setting:JSON.stringify({displayCategory:t,name:ue.value.classname,conObj:a}),conditionList:"[]"})}))}function ye(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),me.value=!0}function Ce(){me.value=!1,pe.value&&(fe.value.forEach((e=>e.selected=!1)),fe.value.push({disabled:!0,value:pe.value,selected:!0,isAdd:!0}),pe.value="")}function Se(e){!function(e){fe.value.splice(e,1)}(e)}function xe(){de.value=!1}function _e(){Ae(ve.value),Y("clearQuickSearchConfig")}function Ae(e){Array.isArray(e)&&(e.forEach((e=>{ie(e)})),ae.handlerInitSearchItem(ve.value))}return i((()=>Z.searchFieldList),(e=>{e&&e.length>0&&function(){let e=D(oe(Z.searchFieldList)).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ve.value=e||[],ae.handlerInitSearchItem(ve.value)}()}),{immediate:!0,deep:!0}),i((()=>ve),(()=>{const e=ke()||[],l=re(e);Y("getFilterParam",e,l)}),{deep:!0}),n((()=>{const e=Z.quickSearchConfig;if(e&&e.length>0)return l=e,void ve.value.forEach((e=>{var a;if(ne(e)){const t=l.find((l=>l.field_key===e.columnName));t&&(null==(a=t.value)?void 0:a.length)>0&&(e.value=se(e,t.value))}}));var l;Ae(ve.value)})),X({openSaveToCalss:function(){let e=ke();e&&(e.length>0?de.value=!0:ee.warning("请设置搜索条件"))},clearData:_e,onFilterSearch:function(){let e=ke()||[];const l=re(e);return Y("onFilterSearch",e,l,!1),ve.value}}),(e,l)=>(o(),s("div",null,[r("div",B,[(o(!0),s(c,null,u(d(ve),(e=>(o(),s("div",{class:v(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[r("div",N,[f(" title "),r("div",O,[m(d(x),{trigger:"hover"},{trigger:p((()=>[h(g(d(ge)(e,"title")),1)])),default:p((()=>[r("span",null,g(d(ge)(e,"title")),1)])),_:2},1024)]),f(" content "),r("div",P,[f(" 直接渲染组件 "),e.isRender?(o(),k(z,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l},null,8,["cfg","modelValue","onUpdate:modelValue"])):f("v-if",!0)])])],2)))),128))]),f(" 保存到分类的弹窗 "),m(d(_),{show:d(de),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:be,onNegativeClick:xe,class:"classification-modal-block"},{default:p((()=>[m(d(A),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p((()=>[r("div",Q,[m(d(q),{component:d(E),size:"24",onClick:xe},null,8,["component"])])])),footer:p((()=>[r("div",M,[m(d(w),{onClick:xe},{default:p((()=>[h("取消")])),_:1}),m(d(w),{type:"info",onClick:be},{default:p((()=>[h("确认")])),_:1})])])),default:p((()=>[r("div",W,[m(d(F),{ref_key:"formRef",ref:ce,"label-placement":"left",rules:$,model:ue.value},{default:p((()=>[m(d(j),{label:"筛选集名称",path:"classname"},{default:p((()=>[m(d(I),{value:ue.value.classname,"onUpdate:value":l[0]||(l[0]=e=>ue.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),r("div",G,[J,(o(!0),s(c,null,u(d(fe),((e,l)=>(o(),s("div",{class:v(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:a=>function(e,l){e.disabled&&(fe.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),s("div",K,[r("span",null,g(e.value),1)])):(o(),k(d(I),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),m(d(q),{component:d(E),class:"anticon-close",size:"20",onClick:e=>Se(l)},null,8,["component","onClick"])],42,H)))),128)),d(he)?f("v-if",!0):(o(),s(c,{key:0},[b(m(d(w),{dashed:"",icon:"plus",class:"ant-btn",onClick:ye},{default:p((()=>[m(d(q),{component:d(L),size:"20"},null,8,["component"]),h("添加分类 ")])),_:1},512),[[y,!d(me)]]),b(m(d(I),{style:{width:"100px"},class:"edit-tag",value:d(pe),"onUpdate:value":l[1]||(l[1]=e=>C(pe)?pe.value=e:pe=e),valueModifiers:{trim:!0},onBlur:Ce,maxLength:10},null,8,["value"]),[[y,d(me)]])],64))])])])),_:1})])),_:1},8,["show"])]))}});export{X as default};
@@ -1 +1 @@
1
- .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;min-width:720px}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
1
+ .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px;margin-left:8px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;min-width:720px}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,provide as o,useSlots as n,ref as a,getCurrentInstance as p,watch as r,openBlock as l,createBlock as c,resolveDynamicComponent as u,unref as s,mergeProps as m,isRef as i,withCtx as d,renderSlot as f}from"vue";import{useVModel as y}from"@vueuse/core";import{isObject as v}from"lodash-es";import{InjectionRecommendSearchRootSlots as h,InjectionRecommendSearchRef as g}from"./constant/index.js";import b from"./components/RecommendInput.vue.js";import S from"./components/RecommendSelect.vue.js";import j from"../../../_virtual/plugin-vue_export-helper.js";var x=j(e({__name:"RecommendSearch",props:{mode:{type:String,default:"input"},value:{type:[String,Number]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},placeholder:{type:String},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},clearable:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]},recommendDeletable:{type:Boolean,default:!0},inputProps:{type:Object},popProps:{type:Object}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{expose:j,emit:x}){const C=e,$=y(C,"value",x),_={input:b,select:S},M=t((()=>_[C.mode]));o(h,n());const O=a();o(g,O);const R={},P=p();return r(O,(e=>{if(Object.keys(R).forEach((e=>Reflect.deleteProperty(R,e))),v(e))try{if(P&&P.appContext&&v(P.appContext.config)){const t=P.appContext.config.warnHandler;P.appContext.config.warnHandler=()=>1,Object.assign(R,e),P.appContext.config.warnHandler=t}else Object.assign(R,e)}catch(e){}})),j(R),(e,t)=>(l(),c(u(s(M)),m(e.$props,{value:s($),"onUpdate:value":t[0]||(t[0]=e=>i($)?$.value=e:null),onSearch:t[1]||(t[1]=t=>e.$emit("search",t)),onChoose:t[2]||(t[2]=t=>e.$emit("choose",t)),onOpenMenu:t[3]||(t[3]=t=>e.$emit("openMenu",t)),onCloseMenu:t[4]||(t[4]=t=>e.$emit("closeMenu",t)),onDelete:t[5]||(t[5]=t=>e.$emit("delete",t))}),{empty:d((()=>[f(e.$slots,"empty")])),_:3},16,["value"]))}}),[["__file","RecommendSearch.vue"]]);export{x as default};
1
+ import e from"./RecommendSearch.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var m=r(e,[["__file","RecommendSearch.vue"]]);export{m as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,computed as t,provide as o,useSlots as n,ref as a,getCurrentInstance as p,watch as r,openBlock as l,createBlock as c,resolveDynamicComponent as s,unref as u,mergeProps as m,isRef as i,withCtx as d,renderSlot as f}from"vue";import{useVModel as y}from"@vueuse/core";import{isObject as v}from"lodash-es";import{InjectionRecommendSearchRootSlots as g,InjectionRecommendSearchRef as h}from"./constant/index.js";import b from"./components/RecommendInput.vue.js";import S from"./components/RecommendSelect.vue.js";var j=e({__name:"RecommendSearch",props:{mode:{type:String,default:"input"},value:{type:[String,Number]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},placeholder:{type:String},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},clearable:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]},recommendDeletable:{type:Boolean,default:!0},inputProps:{type:Object},popProps:{type:Object}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{expose:j,emit:x}){const C=e,$=y(C,"value",x),M={input:b,select:S},O=t((()=>M[C.mode]));o(g,n());const P=a();o(h,P);const R={},w=p();return r(P,(e=>{if(Object.keys(R).forEach((e=>Reflect.deleteProperty(R,e))),v(e))try{if(w&&w.appContext&&v(w.appContext.config)){const t=w.appContext.config.warnHandler;w.appContext.config.warnHandler=()=>1,Object.assign(R,e),w.appContext.config.warnHandler=t}else Object.assign(R,e)}catch(e){}})),j(R),(e,t)=>(l(),c(s(u(O)),m(e.$props,{value:u($),"onUpdate:value":t[0]||(t[0]=e=>i($)?$.value=e:null),onSearch:t[1]||(t[1]=t=>e.$emit("search",t)),onChoose:t[2]||(t[2]=t=>e.$emit("choose",t)),onOpenMenu:t[3]||(t[3]=t=>e.$emit("openMenu",t)),onCloseMenu:t[4]||(t[4]=t=>e.$emit("closeMenu",t)),onDelete:t[5]||(t[5]=t=>e.$emit("delete",t))}),{empty:d((()=>[f(e.$slots,"empty")])),_:3},16,["value"]))}});export{j as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,watch as o,onMounted as n,computed as l,openBlock as r,createElementBlock as a,createVNode as c,unref as s,mergeProps as i,withCtx as m,Fragment as u,renderSlot as p,createCommentVNode as d,createElementVNode as y,renderList as v,toDisplayString as h}from"vue";import{useVModel as f,useVirtualList as _}from"@vueuse/core";import b from"./RecommendMenu.vue.js";import j from"./BaseSearch.js";import k from"../../../../_virtual/plugin-vue_export-helper.js";const g={class:"recommend-search"},L=y("section",{class:"recommend-search__empty"},"暂无数据",-1),M=["onClick"],O=["title"],w=y("section",{class:"recommend-search__empty"},"暂无数据",-1);var A=k(e({__name:"RecommendInput",props:{value:{type:String},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入"},clearable:{type:Boolean,default:!0},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]},recommendDeletable:{type:Boolean,default:!0}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{emit:k}){const A=e,C=t();function S(e=""){var t;null==(t=C.value)||t.setPattern(e)}const x=f(A,"value",k);o(x,S),n((()=>S(x.value)));const D=l((()=>x.value?A.options:A.options.filter((e=>{return A.commonList.every(t)&&A.recentList.every(t);function t(t){return t.itemObj!==e.itemObj}}))));function R(e){x.value=e,k("search",e)}function $(){k("openMenu")}function B(){k("closeMenu")}function P({type:e,value:t}){var o;x.value=t.itemObj,null==(o=C.value)||o.closeMenu(),k("choose",{type:e,value:t.itemObj})}const{list:I,wrapperProps:E,containerProps:H}=_(D,{itemHeight:32,overscan:3});function K(e){["ArrowUp","ArrowDown","Enter"].includes(e.key)&&console.log(e)}return(t,o)=>(r(),a("section",g,[c(s(j),i({ref_key:"baseSearchRef",ref:C,"display-value":s(x),"clear-pattern-on-open-menu":!1,placeholder:e.placeholder,clearable:e.clearable,onKeydown:K,onSearch:R,onOpenMenu:$,onCloseMenu:B},t.$attrs),{menu:m((()=>[s(x)?(r(),a(u,{key:1},[s(D).length?(r(),a("section",i({key:0,class:"recommend-search__optionContainer"},s(H),{style:{height:"256px"}}),[y("section",i({class:"recommend-search__optionList"},s(E)),[(r(!0),a(u,null,v(s(I),(e=>(r(),a("div",{onClick:t=>P({value:e.data}),key:e.data.itemObj,class:"recommend-search__option"},[y("div",{class:"recommend-search__optionText",title:e.data.itemObj},h(e.data.itemObj),9,O)],8,M)))),128))],16)],16)):p(t.$slots,"empty",{key:1},(()=>[w]))],64)):(r(),a(u,{key:0},[c(b,{"common-list":e.commonList,"recent-list":e.recentList,deletable:e.recommendDeletable,onDelete:o[0]||(o[0]=e=>t.$emit("delete",e)),onChoose:P},null,8,["common-list","recent-list","deletable"]),e.commonList.length||e.recentList.length?d("v-if",!0):p(t.$slots,"empty",{key:0},(()=>[L]))],64))])),_:3},16,["display-value","placeholder","clearable"])]))}}),[["__file","RecommendInput.vue"]]);export{A as default};
1
+ import e from"./RecommendInput.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var m=r(e,[["__file","RecommendInput.vue"]]);export{m as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,watch as o,onMounted as n,computed as l,openBlock as a,createElementBlock as r,createVNode as c,unref as s,mergeProps as i,withCtx as m,Fragment as u,renderSlot as p,createCommentVNode as d,createElementVNode as y,renderList as v,toDisplayString as h}from"vue";import{useVModel as f,useVirtualList as b}from"@vueuse/core";import _ from"./RecommendMenu.vue.js";import k from"./BaseSearch.js";const j={class:"recommend-search"},L=y("section",{class:"recommend-search__empty"},"暂无数据",-1),g=["onClick"],M=["title"],O=y("section",{class:"recommend-search__empty"},"暂无数据",-1);var w=e({__name:"RecommendInput",props:{value:{type:String},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入"},clearable:{type:Boolean,default:!0},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]},recommendDeletable:{type:Boolean,default:!0}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{emit:w}){const A=e,C=t();function S(e=""){var t;null==(t=C.value)||t.setPattern(e)}const D=f(A,"value",w);o(D,S),n((()=>S(D.value)));const $=l((()=>D.value?A.options:A.options.filter((e=>{return A.commonList.every(t)&&A.recentList.every(t);function t(t){return t.itemObj!==e.itemObj}}))));function x(e){D.value=e,w("search",e)}function B(){w("openMenu")}function P(){w("closeMenu")}function R({type:e,value:t}){var o;D.value=t.itemObj,null==(o=C.value)||o.closeMenu(),w("choose",{type:e,value:t.itemObj})}const{list:E,wrapperProps:H,containerProps:I}=b($,{itemHeight:32,overscan:3});function K(e){["ArrowUp","ArrowDown","Enter"].includes(e.key)&&console.log(e)}return(t,o)=>(a(),r("section",j,[c(s(k),i({ref_key:"baseSearchRef",ref:C,"display-value":s(D),"clear-pattern-on-open-menu":!1,placeholder:e.placeholder,clearable:e.clearable,onKeydown:K,onSearch:x,onOpenMenu:B,onCloseMenu:P},t.$attrs),{menu:m((()=>[s(D)?(a(),r(u,{key:1},[s($).length?(a(),r("section",i({key:0,class:"recommend-search__optionContainer"},s(I),{style:{height:"256px"}}),[y("section",i({class:"recommend-search__optionList"},s(H)),[(a(!0),r(u,null,v(s(E),(e=>(a(),r("div",{onClick:t=>R({value:e.data}),key:e.data.itemObj,class:"recommend-search__option"},[y("div",{class:"recommend-search__optionText",title:e.data.itemObj},h(e.data.itemObj),9,M)],8,g)))),128))],16)],16)):p(t.$slots,"empty",{key:1},(()=>[O]))],64)):(a(),r(u,{key:0},[c(_,{"common-list":e.commonList,"recent-list":e.recentList,deletable:e.recommendDeletable,onDelete:o[0]||(o[0]=e=>t.$emit("delete",e)),onChoose:R},null,8,["common-list","recent-list","deletable"]),e.commonList.length||e.recentList.length?d("v-if",!0):p(t.$slots,"empty",{key:0},(()=>[L]))],64))])),_:3},16,["display-value","placeholder","clearable"])]))}});export{w as default};
@@ -1 +1 @@
1
- import{defineComponent as e,openBlock as n,createElementBlock as o,createElementVNode as t,createTextVNode as m,createBlock as i,unref as l,createCommentVNode as c,Fragment as s,renderList as r,withCtx as a,toDisplayString as u}from"vue";import{TrashOutline as d}from"@vicons/ionicons5";import{NIcon as p,NTag as _}from"naive-ui";import{RecommendType as f}from"../constant/index.js";import v from"../../../../_virtual/plugin-vue_export-helper.js";const y={class:"recommend-search__menuRecommend"},h={key:0,class:"recommend-search__commonRecommend"},k={class:"recommend-search__menuRecommendList"},L={key:1,class:"recommend-search__recentRecommend"},R=t("header",null,"常用搜索",-1),C={class:"recommend-search__menuRecommendList"};var g=v(e({__name:"RecommendMenu",props:{getDisplayValue:{type:Function,default:e=>e.itemObj},commonList:{default:()=>[]},recentList:{default:()=>[]},deletable:{type:Boolean}},emits:["delete","choose"],setup(e,{emit:v}){function g(e,n){v("choose",{type:e,value:n})}function b(){v("delete")}return(v,j)=>(n(),o("section",y,[e.recentList.length?(n(),o("section",h,[t("header",null,[m(" 最近搜索 "),e.deletable?(n(),i(l(p),{key:0,component:l(d),onClick:b},null,8,["component"])):c("v-if",!0)]),t("div",k,[(n(!0),o(s,null,r(e.recentList,(o=>(n(),i(l(_),{size:"small",onClick:e=>{return n=o,void g(f.RECENTLY,n);var n},type:"primary",key:o.itemObj},{default:a((()=>[m(u(e.getDisplayValue(o)),1)])),_:2},1032,["onClick"])))),128))])])):c("v-if",!0),e.commonList.length?(n(),o("section",L,[R,t("div",C,[(n(!0),o(s,null,r(e.commonList,(o=>(n(),i(l(_),{size:"small",onClick:e=>{return n=o,void g(f.COMMONLY,n);var n},type:"primary",key:o.itemObj},{default:a((()=>[m(u(e.getDisplayValue(o)),1)])),_:2},1032,["onClick"])))),128))])])):c("v-if",!0)]))}}),[["__file","RecommendMenu.vue"]]);export{g as default};
1
+ import e from"./RecommendMenu.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var m=r(e,[["__file","RecommendMenu.vue"]]);export{m as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,openBlock as n,createElementBlock as o,createElementVNode as t,createTextVNode as m,createBlock as c,unref as i,createCommentVNode as l,Fragment as s,renderList as a,withCtx as r,toDisplayString as d}from"vue";import{TrashOutline as u}from"@vicons/ionicons5";import{NIcon as p,NTag as f}from"naive-ui";import{RecommendType as y}from"../constant/index.js";const v={class:"recommend-search__menuRecommend"},_={key:0,class:"recommend-search__commonRecommend"},h={class:"recommend-search__menuRecommendList"},k={key:1,class:"recommend-search__recentRecommend"},L=t("header",null,"常用搜索",-1),C={class:"recommend-search__menuRecommendList"};var R=e({__name:"RecommendMenu",props:{getDisplayValue:{type:Function,default:e=>e.itemObj},commonList:{default:()=>[]},recentList:{default:()=>[]},deletable:{type:Boolean}},emits:["delete","choose"],setup(e,{emit:R}){function b(e,n){R("choose",{type:e,value:n})}function g(){R("delete")}return(R,O)=>(n(),o("section",v,[e.recentList.length?(n(),o("section",_,[t("header",null,[m(" 最近搜索 "),e.deletable?(n(),c(i(p),{key:0,component:i(u),onClick:g},null,8,["component"])):l("v-if",!0)]),t("div",h,[(n(!0),o(s,null,a(e.recentList,(o=>(n(),c(i(f),{size:"small",onClick:e=>{return n=o,void b(y.RECENTLY,n);var n},type:"primary",key:o.itemObj},{default:r((()=>[m(d(e.getDisplayValue(o)),1)])),_:2},1032,["onClick"])))),128))])])):l("v-if",!0),e.commonList.length?(n(),o("section",k,[L,t("div",C,[(n(!0),o(s,null,a(e.commonList,(o=>(n(),c(i(f),{size:"small",onClick:e=>{return n=o,void b(y.COMMONLY,n);var n},type:"primary",key:o.itemObj},{default:r((()=>[m(d(e.getDisplayValue(o)),1)])),_:2},1032,["onClick"])))),128))])])):l("v-if",!0)]))}});export{R as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as a,openBlock as l,createElementBlock as o,createVNode as n,unref as r,mergeProps as u,isRef as i,withCtx as c,createElementVNode as s,normalizeProps as p,guardReactiveProps as v,Fragment as m,renderList as d,normalizeClass as y,toDisplayString as f,createBlock as h,createCommentVNode as _,renderSlot as K}from"vue";import{jsonParse as S}from"../../../../shared/utils/index.js";import{Checkmark as g}from"@vicons/ionicons5";import{useVModel as b,useVirtualList as k}from"@vueuse/core";import{isObject as M}from"lodash-es";import j from"./BaseSearch.js";import{NIcon as x}from"naive-ui";import C from"../../../../_virtual/plugin-vue_export-helper.js";const w={class:"recommend-search"},L=["onClick"],P=["title"],A=s("section",{class:"recommend-search__empty"},"暂无数据",-1);var O=C(e({__name:"RecommendSelect",props:{value:{type:[String,Number]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{emit:C}){const O=e,R=t(!1),U=a((()=>R.value?O.editPlaceholder:O.placeholder)),$=t();function B(e){return S(e.itemObj)}const H=a((()=>O.commonList.map(B))),N=a((()=>O.recentList.map(B))),T=a((()=>O.options.filter((e=>{return H.value.every(t)&&N.value.every(t);function t(t){return t[O.valueKey]!==e[O.valueKey]}}))));function q(e){let t="";return[...E.value,$.value].find((a=>{if(M(a)&&a[O.valueKey]===e)return t=a[O.labelKey],!0})),t}const z=t(),D=b(O,"value",C),E=a((()=>[...H.value,...N.value,...T.value]));function F(e=""){C("search",e)}function G(){F(),C("openMenu")}function I(){C("closeMenu")}function J(){D.value=null,C("clear")}function Q(e){var t,a;M(e)&&(D.value=e[O.valueKey],null==(t=z.value)||t.closeMenu(),$.value=e,a=e[O.valueKey],C("choose",{value:a,option:{...$.value}}))}const{list:V,wrapperProps:W,containerProps:X}=k(E,{itemHeight:32,overscan:5});return(t,a)=>(l(),o("section",w,[n(r(j),u({ref_key:"baseSearchRef",ref:z,value:r(D),"onUpdate:value":a[0]||(a[0]=e=>i(D)?D.value=e:null),show:R.value,"onUpdate:show":a[1]||(a[1]=e=>R.value=e),"display-value":q(r(D)),placeholder:r(U),onOpenMenu:G,onCloseMenu:I,onSearch:F,onClear:J},t.$attrs),{menu:c((()=>[r(E).length?(l(),o("section",u({key:0,class:"recommend-search__optionContainer",style:{height:"256px"}},r(X)),[s("section",p(v(r(W))),[(l(!0),o(m,null,d(r(V),(t=>(l(),o("div",{onClick:e=>Q(t.data),key:t.data[e.valueKey],class:y(["recommend-search__option",{"is-active":t.data[e.valueKey]===r(D)}])},[s("div",{class:"recommend-search__optionText",title:t.data.itemObj},f(t.data[e.labelKey]),9,P),t.data[e.valueKey]===r(D)?(l(),h(r(x),{key:0,component:r(g)},null,8,["component"])):_("v-if",!0)],10,L)))),128))],16)],16)):K(t.$slots,"empty",{key:1},(()=>[A]))])),_:3},16,["value","show","display-value","placeholder"])]))}}),[["__file","RecommendSelect.vue"]]);export{O as default};
1
+ import e from"./RecommendSelect.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var m=r(e,[["__file","RecommendSelect.vue"]]);export{m as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as a,computed as t,openBlock as l,createElementBlock as o,createVNode as n,unref as r,mergeProps as u,isRef as i,withCtx as s,createElementVNode as c,normalizeProps as p,guardReactiveProps as v,Fragment as m,renderList as d,normalizeClass as y,toDisplayString as f,createBlock as h,createCommentVNode as K,renderSlot as _}from"vue";import{jsonParse as S}from"../../../../shared/utils/index.js";import{Checkmark as b}from"@vicons/ionicons5";import{useVModel as g,useVirtualList as k}from"@vueuse/core";import{isObject as M}from"lodash-es";import C from"./BaseSearch.js";import{NIcon as j}from"naive-ui";const w={class:"recommend-search"},x=["onClick"],L=["title"],P=c("section",{class:"recommend-search__empty"},"暂无数据",-1);var A=e({__name:"RecommendSelect",props:{value:{type:[String,Number]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{emit:A}){const O=e,R=a(!1),U=t((()=>R.value?O.editPlaceholder:O.placeholder)),$=a();function B(e){return S(e.itemObj)}const H=t((()=>O.commonList.map(B))),N=t((()=>O.recentList.map(B))),T=t((()=>O.options.filter((e=>{return H.value.every(a)&&N.value.every(a);function a(a){return a[O.valueKey]!==e[O.valueKey]}}))));function q(e){let a="";return[...E.value,$.value].find((t=>{if(M(t)&&t[O.valueKey]===e)return a=t[O.labelKey],!0})),a}const z=a(),D=g(O,"value",A),E=t((()=>[...H.value,...N.value,...T.value]));function F(e=""){A("search",e)}function G(){F(),A("openMenu")}function I(){A("closeMenu")}function J(){D.value=null,A("clear")}function Q(e){var a,t;M(e)&&(D.value=e[O.valueKey],null==(a=z.value)||a.closeMenu(),$.value=e,t=e[O.valueKey],A("choose",{value:t,option:{...$.value}}))}const{list:V,wrapperProps:W,containerProps:X}=k(E,{itemHeight:32,overscan:5});return(a,t)=>(l(),o("section",w,[n(r(C),u({ref_key:"baseSearchRef",ref:z,value:r(D),"onUpdate:value":t[0]||(t[0]=e=>i(D)?D.value=e:null),show:R.value,"onUpdate:show":t[1]||(t[1]=e=>R.value=e),"display-value":q(r(D)),placeholder:r(U),onOpenMenu:G,onCloseMenu:I,onSearch:F,onClear:J},a.$attrs),{menu:s((()=>[r(E).length?(l(),o("section",u({key:0,class:"recommend-search__optionContainer",style:{height:"256px"}},r(X)),[c("section",p(v(r(W))),[(l(!0),o(m,null,d(r(V),(a=>(l(),o("div",{onClick:e=>Q(a.data),key:a.data[e.valueKey],class:y(["recommend-search__option",{"is-active":a.data[e.valueKey]===r(D)}])},[c("div",{class:"recommend-search__optionText",title:a.data.itemObj},f(a.data[e.labelKey]),9,L),a.data[e.valueKey]===r(D)?(l(),h(r(j),{key:0,component:r(b)},null,8,["component"])):K("v-if",!0)],10,x)))),128))],16)],16)):_(a.$slots,"empty",{key:1},(()=>[P]))])),_:3},16,["value","show","display-value","placeholder"])]))}});export{A as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,createCommentVNode as s,Fragment as r,unref as u,createBlock as c,mergeProps as p,createElementVNode as d,normalizeClass as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as A}from"./hooks/scaleview-submit.js";import{handleQueryParams as O,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import P from"./components/NoData.vue.js";import D from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as x,useMessage as I,NForm as q,NFormItem as M,NButton as R}from"naive-ui";import K from"../../../_virtual/plugin-vue_export-helper.js";const V={class:"c-scale-view-block"},H=["innerHTML"],U={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y=d("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),X={key:1,class:"footer"};var G=K(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:K,emit:G}){const Q=e,{ScaleViewState:Z}=w(),$=t(Z),z=x(),ee=I(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:le}=h(),ne=O(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(Q,$,{query:ne}),{initForm:_e}=_(Q,$,G,{query:ne}),{submitMethod:Ae}=A(Q,$,G,{query:ne}),{nextLogicEvent:Oe,handleDynamicDataRelation:je}=L(Q,$);(()=>{let{id:e}=ne;e&&($.shareId=e)})();const Te=e=>{try{le(),_e(e)}catch(e){console.log(e,"--error"),$.spinning=!1,$.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>Q.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;$.form={},$.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{_e(t)}))}),{immediate:!0});const Le=e=>{$.showEvaluateSettingWrap=!1,$.showEvaluateCountdown=!!e,G("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),$.showEvaluateCountdown=!1,ve.value||($.banSubmit=!0,Ae(),z.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{z.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Fe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||($.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;$.form[t.val_key]=a,Oe(e,t,$.formArray),je(o,t,$.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&($.choiceComObj[t.val_key]=o),Oe(e,t,$.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Oe(e,t,$.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":$.submitForm[t.val_key]=e}},Be=(e,t)=>{console.log(t),$.form[t.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),$.labelSelectedList=t,{labelStr:a.join(","),labels:o}},xe=()=>{var e;if(!$.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=$.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==Q.openType&&fe.value)return void G("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==$?void 0:$.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{z.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();G("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,l=o.message,n=$.formArray.find((e=>e.databaseTitle===i));return n&&(i=n.title),ee.error(i+l),e(!1),!1}{const t=Ae();e(t)}}))})),Me=()=>{G("onCloseSetting")};return K({getScaleData:()=>({...$}),onSubmitForm:qe,cancel:Me}),(e,t)=>(l(),n("div",V,[s(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),$.spinning||$.hasFrontAddress?s("v-if",!0):(l(),n(r,{key:0},[u(oe).noData?(l(),c(P,{key:0,noDataImg:u(oe).noDataImg,noDataTip:u(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(l(),n(r,{key:1},[u(fe)&&!u(we)?(l(),c(F,p({key:0},u(Se),{onWriteGuage:Le}),null,16)):(l(),n(r,{key:1},[u(ge)?(l(),c(D,p({key:0,ref_key:"countdownDom",ref:te},u(he),{onCloseEvaluateCountdown:Pe}),null,16)):s("v-if",!0),d("div",{class:m(["scale-container",{"scale-container-nopadding":u(ce),"scale-container-hasfooter":u(ye)}]),style:v(u(ue))},[u(me)?(l(),c(u(N),{key:0,config:$.config,maxScore:$.maxScore},null,8,["config","maxScore"])):s("v-if",!0),f(u(q),{ref_key:"formRef",ref:ae,model:$.form,rules:$.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(l(!0),n(r,null,y($.formArray,((e,t)=>(l(),n(r,{key:(e.id||e.seq)+t},[u(pe)(e)?(l(),c(u(M),{key:0,path:e.val_key,"show-label":!u(j)(e.type),class:"c-scle-form-item"},{label:g((()=>[d("span",{class:m({"scale-label-required":u(re)(e)}),innerHTML:u(de)(e)},null,10,H),u(re)(e)?(l(),n("span",U,"(必填)")):s("v-if",!0),u(be)(e)?(l(),n("span",W,b(u(be)(e)),1)):s("v-if",!0),u(se)(e)?(l(),n("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if($.evatipMap[e.id])return void De($.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=Q.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void ee.error(`${a} Is not a function`);let i=await o(e.id);i&&($.evatipMap[e.id]||($.evatipMap[e.id]=i,De(i)))})(e)},[Y,k(" 查看提示 ")],8,J)):s("v-if",!0)])),default:g((()=>[(l(),c(C(e.renderCom),p(u(Ce)(e,t),{key:(e.id||e.seq)+t,onScaleChange:Fe,onOnChange:t=>((e,t)=>{$.form[t.val_key]=Ne(e)})(t,e),onVodFileList:Be}),null,16,["onOnChange"])),u(ke)(e)?(l(),c(B,{key:0,item:e},null,8,["item"])):s("v-if",!0)])),_:2},1032,["path","show-label"])):s("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),u(ye)?(l(),n("div",X,[s(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(l(),c(u(R),{key:0,onClick:Me},{default:g((()=>[k("取消")])),_:1})):s("v-if",!0),Q.isLock?s("v-if",!0):(l(),c(u(R),{key:1,onClick:xe,disabled:$.banSubmit,type:"primary"},{default:g((()=>[k("保存")])),_:1},8,["disabled"]))])):s("v-if",!0)],64))],64))],64))]))}}),[["__file","ScaleView.vue"]]);export{G as default};
1
+ import e from"./ScaleView.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","ScaleView.vue"]]);export{i as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as n,createElementBlock as l,createCommentVNode as s,Fragment as r,unref as u,createBlock as c,mergeProps as p,createElementVNode as d,normalizeClass as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as A}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as O}from"./hooks/scaleview-submit.js";import{handleQueryParams as _,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import P from"./components/NoData.vue.js";import D from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as x,useMessage as I,NForm as q,NFormItem as M,NButton as R}from"naive-ui";const K={class:"c-scale-view-block"},V=["innerHTML"],H={key:0,class:"required-text"},U={key:1,class:"evalute-label"},W=["onClick"],J=d("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Y={key:1,class:"footer"};var X=e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:X,emit:G}){const Q=e,{ScaleViewState:Z}=w(),$=t(Z),z=x(),ee=I(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:ne}=h(),le=_(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(Q,$,{query:le}),{initForm:Ae}=A(Q,$,G,{query:le}),{submitMethod:Oe}=O(Q,$,G,{query:le}),{nextLogicEvent:_e,handleDynamicDataRelation:je}=L(Q,$);(()=>{let{id:e}=le;e&&($.shareId=e)})();const Te=e=>{try{ne(),Ae(e)}catch(e){console.log(e,"--error"),$.spinning=!1,$.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>Q.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;$.form={},$.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{Ae(t)}))}),{immediate:!0});const Le=e=>{$.showEvaluateSettingWrap=!1,$.showEvaluateCountdown=!!e,G("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),$.showEvaluateCountdown=!1,ve.value||($.banSubmit=!0,Oe(),z.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{z.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Fe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||($.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;$.form[t.val_key]=a,_e(e,t,$.formArray),je(o,t,$.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&($.choiceComObj[t.val_key]=o),_e(e,t,$.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":_e(e,t,$.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":$.submitForm[t.val_key]=e}},Be=(e,t)=>{console.log(t),$.form[t.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),$.labelSelectedList=t,{labelStr:a.join(","),labels:o}},xe=()=>{var e;if(!$.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=$.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==Q.openType&&fe.value)return void G("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==$?void 0:$.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{z.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();G("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,n=o.message,l=$.formArray.find((e=>e.databaseTitle===i));return l&&(i=l.title),ee.error(i+n),e(!1),!1}{const t=Oe();e(t)}}))})),Me=()=>{G("onCloseSetting")};return X({getScaleData:()=>({...$}),onSubmitForm:qe,cancel:Me}),(e,t)=>(n(),l("div",K,[s(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),$.spinning||$.hasFrontAddress?s("v-if",!0):(n(),l(r,{key:0},[u(oe).noData?(n(),c(P,{key:0,noDataImg:u(oe).noDataImg,noDataTip:u(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),l(r,{key:1},[u(fe)&&!u(we)?(n(),c(F,p({key:0},u(Se),{onWriteGuage:Le}),null,16)):(n(),l(r,{key:1},[u(ge)?(n(),c(D,p({key:0,ref_key:"countdownDom",ref:te},u(he),{onCloseEvaluateCountdown:Pe}),null,16)):s("v-if",!0),d("div",{class:m(["scale-container",{"scale-container-nopadding":u(ce),"scale-container-hasfooter":u(ye)}]),style:v(u(ue))},[u(me)?(n(),c(u(N),{key:0,config:$.config,maxScore:$.maxScore},null,8,["config","maxScore"])):s("v-if",!0),f(u(q),{ref_key:"formRef",ref:ae,model:$.form,rules:$.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),l(r,null,y($.formArray,((e,t)=>(n(),l(r,{key:(e.id||e.seq)+t},[u(pe)(e)?(n(),c(u(M),{key:0,path:e.val_key,"show-label":!u(j)(e.type),class:"c-scle-form-item"},{label:g((()=>[d("span",{class:m({"scale-label-required":u(re)(e)}),innerHTML:u(de)(e)},null,10,V),u(re)(e)?(n(),l("span",H,"(必填)")):s("v-if",!0),u(be)(e)?(n(),l("span",U,b(u(be)(e)),1)):s("v-if",!0),u(se)(e)?(n(),l("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if($.evatipMap[e.id])return void De($.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=Q.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void ee.error(`${a} Is not a function`);let i=await o(e.id);i&&($.evatipMap[e.id]||($.evatipMap[e.id]=i,De(i)))})(e)},[J,k(" 查看提示 ")],8,W)):s("v-if",!0)])),default:g((()=>[(n(),c(C(e.renderCom),p(u(Ce)(e,t),{key:(e.id||e.seq)+t,onScaleChange:Fe,onOnChange:t=>((e,t)=>{$.form[t.val_key]=Ne(e)})(t,e),onVodFileList:Be}),null,16,["onOnChange"])),u(ke)(e)?(n(),c(B,{key:0,item:e},null,8,["item"])):s("v-if",!0)])),_:2},1032,["path","show-label"])):s("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),u(ye)?(n(),l("div",Y,[s(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(n(),c(u(R),{key:0,onClick:Me},{default:g((()=>[k("取消")])),_:1})):s("v-if",!0),Q.isLock?s("v-if",!0):(n(),c(u(R),{key:1,onClick:xe,disabled:$.banSubmit,type:"primary"},{default:g((()=>[k("保存")])),_:1},8,["disabled"]))])):s("v-if",!0)],64))],64))],64))]))}});export{X as default};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as r,openBlock as s,createElementBlock as n,normalizeClass as i,unref as a,createElementVNode as l,createTextVNode as t,toDisplayString as o,createCommentVNode as u}from"vue";import c from"../../../../_virtual/plugin-vue_export-helper.js";const v={class:"answer-res-wrap"},p={class:"answer-res"},w={key:0},d={key:0,class:"correct-answer"},m=l("p",null,"正确答案:",-1),f={class:"answer-key"},P=l("p",null,"答案解析:",-1);var _=c(e({__name:"AnswerParse",props:{item:{type:Object,default:()=>({})}},setup(e){const c=e,_=r((()=>{var e;return(null==(e=c.item)?void 0:e.questionScore)||0})),y=r((()=>{var e;return(null==(e=c.item)?void 0:e.questionScore)>0})),q=r((()=>y.value?"icon-scale-view-dui":"icon-scale-view-cuo")),S=r((()=>"questionPartScore"in c.item?"部分正确":y.value?"回答正确":"回答错误")),g=r((()=>"questionPartScore"in c.item?"部分":"本题")),k=r((()=>{var e;let{correctAnswer:r}=(null==(e=c.item)?void 0:e.scoreConfigs)||{};return r})),A=r((()=>{var e;let{answerKey:r}=(null==(e=c.item)?void 0:e.scoreConfigs)||{};return r||"无"}));return(e,r)=>(s(),n("div",{class:i(["c-answerParse",{"answerParse-success":a(y)}])},[l("div",v,[l("div",p,[l("i",{class:i(["scale-view-iconfont",a(q)])},null,2),t(" "+o(a(S)),1)]),a(y)?(s(),n("div",w,o(a(g))+"得分:"+o(a(_))+"分",1)):u("v-if",!0)]),a(k)?(s(),n("div",d,[m,l("span",null,o(a(k)),1)])):u("v-if",!0),l("div",f,[P,l("span",null,o(a(A)),1)])],2))}}),[["__file","AnswerParse.vue"]]);export{_ as default};
1
+ import e from"./AnswerParse.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var s=r(e,[["__file","AnswerParse.vue"]]);export{s as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,computed as s,openBlock as r,createElementBlock as n,normalizeClass as i,unref as a,createElementVNode as l,createTextVNode as t,toDisplayString as c,createCommentVNode as o}from"vue";const u={class:"answer-res-wrap"},v={class:"answer-res"},d={key:0},w={key:0,class:"correct-answer"},p=l("p",null,"正确答案:",-1),m={class:"answer-key"},f=l("p",null,"答案解析:",-1);var y=e({__name:"AnswerParse",props:{item:{type:Object,default:()=>({})}},setup(e){const y=e,P=s((()=>{var e;return(null==(e=y.item)?void 0:e.questionScore)||0})),q=s((()=>{var e;return(null==(e=y.item)?void 0:e.questionScore)>0})),S=s((()=>q.value?"icon-scale-view-dui":"icon-scale-view-cuo")),k=s((()=>"questionPartScore"in y.item?"部分正确":q.value?"回答正确":"回答错误")),g=s((()=>"questionPartScore"in y.item?"部分":"本题")),A=s((()=>{var e;let{correctAnswer:s}=(null==(e=y.item)?void 0:e.scoreConfigs)||{};return s})),C=s((()=>{var e;let{answerKey:s}=(null==(e=y.item)?void 0:e.scoreConfigs)||{};return s||"无"}));return(e,s)=>(r(),n("div",{class:i(["c-answerParse",{"answerParse-success":a(q)}])},[l("div",u,[l("div",v,[l("i",{class:i(["scale-view-iconfont",a(S)])},null,2),t(" "+c(a(k)),1)]),a(q)?(r(),n("div",d,c(a(g))+"得分:"+c(a(P))+"分",1)):o("v-if",!0)]),a(A)?(r(),n("div",w,[p,l("span",null,c(a(A)),1)])):o("v-if",!0),l("div",m,[f,l("span",null,c(a(C)),1)])],2))}});export{y as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,onMounted as o,watch as a,openBlock as n,createElementBlock as l,normalizeClass as u,unref as r,createElementVNode as s,toDisplayString as i,createCommentVNode as d,createTextVNode as c}from"vue";import{useEvaluate as v}from"../hooks/use-evaluate.js";import w from"moment";import m from"../../../../_virtual/plugin-vue_export-helper.js";const f=s("i",{class:"scale-view-iconfont icon-scale-view-shijian"},null,-1),p={class:"answered-wrap"};var g=m(e({__name:"EvaluateCountdown",props:{formArray:{type:Array,default:()=>[]},evaluateResultConfig:{type:Object,default:()=>({})},evaluateResultSetting:{type:Object,default:()=>({})},form:{type:Object,default:()=>({})},currentTime:{default:(new Date).getTime()},showEvaluateCountdown:{type:Boolean,default:!1}},emits:["closeEvaluateCountdown"],setup(e,{expose:m,emit:g}){const j=e,y=t({source:"countdown",setAnswered:0}),{evaluateState:b,evaluateStartTime:h,showCountdown:C,getTotalLen:A,countdown:O,clearTimer:T}=v(j,y,{emit:g});o((()=>{(()=>{A();let{evaluateTime:e}=j.evaluateResultSetting;if(!C.value||!e)return;let t=(h.value?w(h.value):w()).add(e,"minutes");T(),O(t)})()})),a((()=>j.form),(e=>{(e||Object.keys(e).length)&&(console.log(e,"触发修改啦啦啦"),(e=>{var t;let o=null==(t=j.formArray)?void 0:t.filter((e=>!b.filterArr.includes(e.type)));if(!o||!o.length)return;let a={};o.forEach((t=>{const o=t.databaseTitle||t.title;a[o]=e[o]})),console.log(a);let n=0;for(let e in a){let t=a[e],o=(l=t,Object.prototype.toString.call(l));"[object Object]"==o?t&&Object.keys(t).length&&n++:"[object Array]"==o?t&&t.length&&n++:"[object Number]"==o?(t||0===t)&&n++:t&&n++}var l;y.setAnswered=n})(e))}),{immediate:!0,deep:!0});return m({getCountdownObj:()=>({setAnswered:y.setAnswered,totalLen:b.totalLen})}),(e,t)=>(n(),l("div",{class:u(["c-evaluateCountdown",{"evaluateCountdown-hasTime":j.showEvaluateCountdown}])},[j.showEvaluateCountdown?(n(),l("div",{key:0,class:u(["countdown",{"countdown-red":r(b).countdownRed}])},[s("span",null,i(r(b).countdownStr),1),f],2)):d("v-if",!0),s("div",p,[c(" 答题情况: "+i(y.setAnswered)+"/ ",1),s("span",null,i(r(b).totalLen),1)])],2))}}),[["__file","EvaluateCountdown.vue"]]);export{g as default};
1
+ import e from"./EvaluateCountdown.vue2.js";import o from"../../../../_virtual/_plugin-vue_export-helper.js";var t=o(e,[["__file","EvaluateCountdown.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,reactive as t,onMounted as o,watch as a,openBlock as n,createElementBlock as l,normalizeClass as u,unref as r,createElementVNode as s,toDisplayString as d,createCommentVNode as i,createTextVNode as c}from"vue";import{useEvaluate as w}from"../hooks/use-evaluate.js";import v from"moment";const m=s("i",{class:"scale-view-iconfont icon-scale-view-shijian"},null,-1),f={class:"answered-wrap"};var p=e({__name:"EvaluateCountdown",props:{formArray:{type:Array,default:()=>[]},evaluateResultConfig:{type:Object,default:()=>({})},evaluateResultSetting:{type:Object,default:()=>({})},form:{type:Object,default:()=>({})},currentTime:{default:(new Date).getTime()},showEvaluateCountdown:{type:Boolean,default:!1}},emits:["closeEvaluateCountdown"],setup(e,{expose:p,emit:y}){const b=e,g=t({source:"countdown",setAnswered:0}),{evaluateState:j,evaluateStartTime:h,showCountdown:A,getTotalLen:C,countdown:O,clearTimer:T}=w(b,g,{emit:y});o((()=>{(()=>{C();let{evaluateTime:e}=b.evaluateResultSetting;if(!A.value||!e)return;let t=(h.value?v(h.value):v()).add(e,"minutes");T(),O(t)})()})),a((()=>b.form),(e=>{(e||Object.keys(e).length)&&(console.log(e,"触发修改啦啦啦"),(e=>{var t;let o=null==(t=b.formArray)?void 0:t.filter((e=>!j.filterArr.includes(e.type)));if(!o||!o.length)return;let a={};o.forEach((t=>{const o=t.databaseTitle||t.title;a[o]=e[o]})),console.log(a);let n=0;for(let e in a){let t=a[e],o=(l=t,Object.prototype.toString.call(l));"[object Object]"==o?t&&Object.keys(t).length&&n++:"[object Array]"==o?t&&t.length&&n++:"[object Number]"==o?(t||0===t)&&n++:t&&n++}var l;g.setAnswered=n})(e))}),{immediate:!0,deep:!0});return p({getCountdownObj:()=>({setAnswered:g.setAnswered,totalLen:j.totalLen})}),(e,t)=>(n(),l("div",{class:u(["c-evaluateCountdown",{"evaluateCountdown-hasTime":b.showEvaluateCountdown}])},[b.showEvaluateCountdown?(n(),l("div",{key:0,class:u(["countdown",{"countdown-red":r(j).countdownRed}])},[s("span",null,d(r(j).countdownStr),1),m],2)):i("v-if",!0),s("div",f,[c(" 答题情况: "+d(g.setAnswered)+"/ ",1),s("span",null,d(r(j).totalLen),1)])],2))}});export{p as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,onMounted as a,openBlock as l,createElementBlock as u,createElementVNode as i,toDisplayString as n,createCommentVNode as s,unref as r,createVNode as v,withCtx as o,createTextVNode as m,Fragment as g}from"vue";import{useEvaluate as d}from"../hooks/use-evaluate.js";import c from"moment";import{NButton as f}from"naive-ui";import p from"../../../../_virtual/plugin-vue_export-helper.js";const S={class:"c-evaluate-page"},y={class:"evaluate-container"},R={key:0,class:"evaluate-name"},b={key:1,class:"evaluate-explain"},w={class:"evaluate-score"},T=i("span",null,"测评总题",-1),E=i("span",null,"测评总分",-1),k={key:0},x=i("span",null,"测试时间(分钟)",-1),Y={key:2,class:"evaluate-time-range"};var h=p(e({__name:"EvaluatePage",props:{formArray:{type:Array,default:()=>[]},evaluateResultConfig:{type:Object,default:()=>({})},evaluateResultSetting:{type:Object,default:()=>({})},isFinished:{type:Boolean,default:!1},maxScore:{type:Number,default:0}},emits:["writeGuage","closeEvaluateCountdown"],setup(e,{emit:p}){const h=e,_=t({source:"page",timer:null,curTime:(new Date).getTime(),timeRange:"",banStart:!1}),{evaluateState:j,evaluateStartTime:D,getEvaluateTime:C,getEvaluateStartTime:H,getEvaluateText:M,showCountdown:O,showRange:G,getTotalLen:N,countdown:$,clearTimer:A,disabledEvaluate:B,isBanStart:L}=d(h,_,{emit:p});a((()=>{P()}));const P=()=>{N(),F()},F=()=>{if(!h.evaluateResultSetting||!Object.keys(h.evaluateResultSetting).length)return;if(G.value){let e=c(D.value).format("YYYY年MM月DD日HH:mm:ss");if(C.value){let t=c(D.value).add(C.value,"minutes").format("YYYY年MM月DD日HH:mm:ss");_.timeRange=`${e}~${t}`}else _.timeRange=`${e}`}if(!D.value)return;let e=H.value;if(console.log(e,"--time"),!e)return;let t=e.getTime();A(),$(t)},q=()=>{console.log("触发---writeGuage"),A();let e=L();_.banStart=e,_.banStart||p("writeGuage",O.value)};return(e,t)=>(l(),u("div",S,[i("div",y,[h.evaluateResultSetting.evaluateName?(l(),u("h4",R,n(h.evaluateResultSetting.evaluateName),1)):s("v-if",!0),h.evaluateResultSetting.evaluateExplain?(l(),u("div",b,[i("div",null,n(h.evaluateResultSetting.evaluateExplain),1)])):s("v-if",!0),i("ul",w,[i("li",null,[i("div",null,n(r(j).totalLen),1),T]),i("li",null,[i("div",null,n(h.maxScore),1),E]),r(C)?(l(),u("li",k,[i("div",null,n(r(C)),1),x])):s("v-if",!0)]),r(G)?(l(),u("div",Y,n(_.timeRange),1)):s("v-if",!0),v(r(f),{class:"evaluate-btn",type:"primary",onClick:q,disabled:r(B)||_.banStart},{default:o((()=>[m(n(r(M))+" ",1),!r(j).isTimeOut&&r(j).countdownStr?(l(),u(g,{key:0},[m(" ("+n(r(j).countdownStr)+") ",1)],64)):s("v-if",!0)])),_:1},8,["disabled"])])]))}}),[["__file","EvaluatePage.vue"]]);export{h as default};
1
+ import e from"./EvaluatePage.vue2.js";import a from"../../../../_virtual/_plugin-vue_export-helper.js";var r=a(e,[["__file","EvaluatePage.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,reactive as t,onMounted as a,openBlock as l,createElementBlock as u,createElementVNode as i,toDisplayString as n,createCommentVNode as s,unref as v,createVNode as r,withCtx as o,createTextVNode as m,Fragment as d}from"vue";import{useEvaluate as g}from"../hooks/use-evaluate.js";import c from"moment";import{NButton as f}from"naive-ui";const p={class:"c-evaluate-page"},S={class:"evaluate-container"},y={key:0,class:"evaluate-name"},R={key:1,class:"evaluate-explain"},b={class:"evaluate-score"},w=i("span",null,"测评总题",-1),T=i("span",null,"测评总分",-1),k={key:0},E=i("span",null,"测试时间(分钟)",-1),Y={key:2,class:"evaluate-time-range"};var x=e({__name:"EvaluatePage",props:{formArray:{type:Array,default:()=>[]},evaluateResultConfig:{type:Object,default:()=>({})},evaluateResultSetting:{type:Object,default:()=>({})},isFinished:{type:Boolean,default:!1},maxScore:{type:Number,default:0}},emits:["writeGuage","closeEvaluateCountdown"],setup(e,{emit:x}){const h=e,D=t({source:"page",timer:null,curTime:(new Date).getTime(),timeRange:"",banStart:!1}),{evaluateState:j,evaluateStartTime:C,getEvaluateTime:H,getEvaluateStartTime:M,getEvaluateText:O,showCountdown:G,showRange:N,getTotalLen:$,countdown:_,clearTimer:A,disabledEvaluate:B,isBanStart:L}=g(h,D,{emit:x});a((()=>{F()}));const F=()=>{$(),P()},P=()=>{if(!h.evaluateResultSetting||!Object.keys(h.evaluateResultSetting).length)return;if(N.value){let e=c(C.value).format("YYYY年MM月DD日HH:mm:ss");if(H.value){let t=c(C.value).add(H.value,"minutes").format("YYYY年MM月DD日HH:mm:ss");D.timeRange=`${e}~${t}`}else D.timeRange=`${e}`}if(!C.value)return;let e=M.value;if(console.log(e,"--time"),!e)return;let t=e.getTime();A(),_(t)},q=()=>{console.log("触发---writeGuage"),A();let e=L();D.banStart=e,D.banStart||x("writeGuage",G.value)};return(e,t)=>(l(),u("div",p,[i("div",S,[h.evaluateResultSetting.evaluateName?(l(),u("h4",y,n(h.evaluateResultSetting.evaluateName),1)):s("v-if",!0),h.evaluateResultSetting.evaluateExplain?(l(),u("div",R,[i("div",null,n(h.evaluateResultSetting.evaluateExplain),1)])):s("v-if",!0),i("ul",b,[i("li",null,[i("div",null,n(v(j).totalLen),1),w]),i("li",null,[i("div",null,n(h.maxScore),1),T]),v(H)?(l(),u("li",k,[i("div",null,n(v(H)),1),E])):s("v-if",!0)]),v(N)?(l(),u("div",Y,n(D.timeRange),1)):s("v-if",!0),r(v(f),{class:"evaluate-btn",type:"primary",onClick:q,disabled:v(B)||D.banStart},{default:o((()=>[m(n(v(O))+" ",1),!v(j).isTimeOut&&v(j).countdownStr?(l(),u(d,{key:0},[m(" ("+n(v(j).countdownStr)+") ",1)],64)):s("v-if",!0)])),_:1},8,["disabled"])])]))}});export{x as default};
@@ -1 +1 @@
1
- import{openBlock as s,createElementBlock as r,createStaticVNode as e}from"vue";import a from"../../../../_virtual/plugin-vue_export-helper.js";const o={},i={class:"n-base-loading n-base-suffix",role:"img","aria-label":"loading"},n=[e('<div class="n-base-loading__transition-wrapper"><div class="n-base-loading__container"><div class="n-base-loading__container-layer"><div class="n-base-loading__container-layer-left"><svg class="n-base-loading__svg" viewBox="0 0 235.29411764705884 235.29411764705884" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="currentColor" stroke-width="24" stroke-linecap="round" cx="117.64705882352942" cy="117.64705882352942" r="88" stroke-dasharray="491" stroke-dashoffset="246"></circle></svg></div><div class="n-base-loading__container-layer-patch"><svg class="n-base-loading__svg" viewBox="0 0 235.29411764705884 235.29411764705884" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="currentColor" stroke-width="24" stroke-linecap="round" cx="117.64705882352942" cy="117.64705882352942" r="88" stroke-dasharray="491" stroke-dashoffset="246"></circle></svg></div><div class="n-base-loading__container-layer-right"><svg class="n-base-loading__svg" viewBox="0 0 235.29411764705884 235.29411764705884" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="currentColor" stroke-width="24" stroke-linecap="round" cx="117.64705882352942" cy="117.64705882352942" r="88" stroke-dasharray="491" stroke-dashoffset="246"></circle></svg></div></div></div></div>',1)];var l=a(o,[["render",function(e,a){return s(),r("div",i,n)}],["__file","LoadingCom.vue"]]);export{l as default};
1
+ import{openBlock as s,createElementBlock as r,createStaticVNode as e}from"vue";import a from"../../../../_virtual/_plugin-vue_export-helper.js";const o={},i={class:"n-base-loading n-base-suffix",role:"img","aria-label":"loading"},n=[e('<div class="n-base-loading__transition-wrapper"><div class="n-base-loading__container"><div class="n-base-loading__container-layer"><div class="n-base-loading__container-layer-left"><svg class="n-base-loading__svg" viewBox="0 0 235.29411764705884 235.29411764705884" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="currentColor" stroke-width="24" stroke-linecap="round" cx="117.64705882352942" cy="117.64705882352942" r="88" stroke-dasharray="491" stroke-dashoffset="246"></circle></svg></div><div class="n-base-loading__container-layer-patch"><svg class="n-base-loading__svg" viewBox="0 0 235.29411764705884 235.29411764705884" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="currentColor" stroke-width="24" stroke-linecap="round" cx="117.64705882352942" cy="117.64705882352942" r="88" stroke-dasharray="491" stroke-dashoffset="246"></circle></svg></div><div class="n-base-loading__container-layer-right"><svg class="n-base-loading__svg" viewBox="0 0 235.29411764705884 235.29411764705884" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="currentColor" stroke-width="24" stroke-linecap="round" cx="117.64705882352942" cy="117.64705882352942" r="88" stroke-dasharray="491" stroke-dashoffset="246"></circle></svg></div></div></div></div>',1)];var l=a(o,[["render",function(e,a){return s(),r("div",i,n)}],["__file","LoadingCom.vue"]]);export{l as default};
@@ -1 +1 @@
1
- import{defineComponent as a,computed as e,openBlock as t,createElementBlock as s,unref as r,createCommentVNode as o,createElementVNode as n,toDisplayString as i}from"vue";import p from"../../../../shared/assets/img/nodata.png.js";import m from"../../../../shared/assets/img/no-permission.png.js";import l from"../../../../shared/assets/img/failure.png.js";import u from"../../../../shared/assets/img/notfound.png.js";import f from"../../../../_virtual/plugin-vue_export-helper.js";const g={class:"no-data-tip NoData-page"},d=["src"],c={key:1};var h=f(a({__name:"NoData",props:{noDataTip:{type:String,default:"暂无数据"},noDataImg:{type:String,default:"nodata"},showImg:{type:Boolean,default:!0}},setup(a){const f=a,h=e((()=>{let a=null;switch(f.noDataImg){case"no-permission":a=m;break;case"failure":a=l;break;case"nodata":a=p;break;default:a=u}return a})),v=e((()=>{let a="";switch(f.noDataImg){case"no-permission":a="请联系管理员";break;case"failure":a="请稍后再试"}return a}));return(e,p)=>(t(),s("div",g,[a.showImg?(t(),s("img",{key:0,src:r(h),alt:""},null,8,d)):o("v-if",!0),n("p",null,i(a.noDataTip),1),r(v)?(t(),s("span",c,i(r(v)),1)):o("v-if",!0)]))}}),[["__file","NoData.vue"]]);export{h as default};
1
+ import e from"./NoData.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var a=r(e,[["__file","NoData.vue"]]);export{a as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as a,computed as s,openBlock as e,createElementBlock as t,unref as o,createCommentVNode as r,createElementVNode as n,toDisplayString as i}from"vue";import p from"../../../../shared/assets/img/nodata.png.js";import m from"../../../../shared/assets/img/no-permission.png.js";import l from"../../../../shared/assets/img/failure.png.js";import g from"../../../../shared/assets/img/notfound.png.js";const u={class:"no-data-tip NoData-page"},f=["src"],d={key:1};var c=a({__name:"NoData",props:{noDataTip:{type:String,default:"暂无数据"},noDataImg:{type:String,default:"nodata"},showImg:{type:Boolean,default:!0}},setup(a){const c=a,h=s((()=>{let a=null;switch(c.noDataImg){case"no-permission":a=m;break;case"failure":a=l;break;case"nodata":a=p;break;default:a=g}return a})),D=s((()=>{let a="";switch(c.noDataImg){case"no-permission":a="请联系管理员";break;case"failure":a="请稍后再试"}return a}));return(s,p)=>(e(),t("div",u,[a.showImg?(e(),t("img",{key:0,src:o(h),alt:""},null,8,f)):r("v-if",!0),n("p",null,i(a.noDataTip),1),o(D)?(e(),t("span",d,i(o(D)),1)):r("v-if",!0)]))}});export{c as default};
@@ -1 +1 @@
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};
1
+ import e from"./SearchCascader.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var a=r(e,[["__file","SearchCascader.vue"]]);export{a as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,provide as a,computed as l,ref as t,nextTick as o,watch as r,openBlock as u,createBlock as n,unref as s,isRef as c,normalizeStyle as i,withCtx as d,createVNode as v,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 K,isObject as C}from"lodash-es";import{NPopover as _,NInput as N}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as P,InjectionKeyboardEventBus as j,InjectionSearchCascaderLoadingNode as A,InjectionSearchCascaderValue as U}from"./constants/index.js";import{useCssVariable as V}from"./hooks/useCssVariable.js";import{SearchMenu as x}from"./components/SearchMenu.js";const F=["id"];var L=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:L}){const B=e;function E(){var e;e=[],Promise.resolve(K(B.beforeSetValue)?B.beforeSetValue(e):e).then((e=>L("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=V(),M=g("cascaderKeydown"),$=y(),q=b(B,"show",L);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){L("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(A,Y),a(U,l((()=>B.value)));const Z=m((async(e,a)=>{var l;const{type:t,node:r}=e||{};try{if("update"===t)return void(K(B.search)&&B.search({...r,isLeaf:!0}));Y.value=r;const e=await(K(B.search)&&B.search(r,a));W.value=C(e)?e:r}finally{Y.value=null,await o(),null==(l=Q.value)||l.syncPosition()}}),400),ee=e=>{X.value=e};return r((()=>B.show),(e=>{e&&(X.value={})})),(a,l)=>(u(),n(s(_),{class:"search-cascader",trigger:"manual",show:s(q),"onUpdate:show":l[1]||(l[1]=e=>c(q)?q.value=e:null),"show-arrow":!1,placement:"bottom-start",style:i(s(T)),width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:Q},{trigger:d((()=>[v(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=>c(D)?D.value=e:null),ref_key:"inputRef",ref:O,onFocus:G,onClick:I,onKeydown:s(R)},null,8,["placeholder","clearable","value","onKeydown"])])),default:d((()=>[p("section",{id:s($)},[v(s(x),{"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:d((()=>[f(a.$slots,"empty")])),_:3},8,["label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,F)])),_:3},8,["show","style","width"]))}});export{L as default};
@@ -1 +1 @@
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){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])}"Enter"===r&&(S.value?a("nodeClick",{type:"update",node:e.cursorNode}):a("nodeClick",{type:"search",node:e.cursorNode}))})),()=>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&&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};
1
+ import{defineComponent as e,ref as r,createVNode as t,createTextVNode as o,computed as n,inject as a,withModifiers 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{isArray as p,isFunction as f,isNumber as v,isEqual as y,isString 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:r}){const o=n((()=>e.options)),{list:c,containerProps:f,wrapperProps:k}=d(o,{itemHeight:32,overscan:5}),K=a(g),_=a(N),x=a(C),A=a(b),S=n((()=>v(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(p(_.value))return y(o(t,e.valueKey),o(_.value,e.valueKey));if(h(_.value)){const r=_.value.split("/").map((e=>e.trim()));return y(r,o(t,e.labelKey))}return!1;function o(e,r){return e.map((e=>e[r]))}}function O(e){const r=f.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(t){if("ArrowUp"===t){if(j(e.cursorNode))return;const t=o.value.findIndex((r=>r===e.cursorNode));if(t>=0){const e=0===t?o.value.length-1:t-1,n=o.value[e];r("changeCursor",n),O(e+3)}}if("ArrowRight"===t){if(j(e.cursorNode))return;r("nodeClick",{type:"search",node:e.cursorNode}),r("changeCursor",{})}if("ArrowDown"===t){if(j(e.cursorNode))return r("changeCursor",o.value[0]);const t=o.value.findIndex((r=>r===e.cursorNode));if(t>=0){const e=t>=o.value.length-1?0:t+1,n=o.value[e];r("changeCursor",n),O(e+1)}}if("ArrowLeft"===t&&e.activeNodes.length){const t=e.activeNodes.slice(-1);r("changeCursor",t[0])}"Enter"===t&&(S.value?r("nodeClick",{type:"update",node:e.cursorNode}):r("nodeClick",{type:"search",node:e.cursorNode}))})),()=>t("div",{class:"search-cascader__optionWrapper",ref:f.ref,style:f.style,onScroll:f.onScroll},[t("div",{style:k.value.style},[c.value.map((o=>{return t("div",{class:["search-cascader__option",{"search-cascader__option--active":(n=o.data,(null==(a=e.activeNodes)?void 0:a.includes(n))||w(o.data))}],onClick:()=>r("nodeClick",{type:"search",node:o.data}),title:o.data[e.labelKey]},[t("div",{class:"search-cascader__optionText"},[S.value?t(m,{style:{marginRight:"8px"},checked:I(o.data),onClick:l(i,["stop"]),onUpdateChecked:e=>e&&function(e){r("nodeClick",{type:"update",node:e})}(o.data)},null):null,o.data[e.labelKey]]),K.value===o.data?t(s,{class:"rotate"},null):o.data.isLeaf?null:t(u,null,null)]);var n,a}))])])}}),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:n,emit:a}){const l=r([]);function s(r,o){return t(k,{level:o+1,labelKey:e.labelKey,valueKey:e.valueKey,activeNodes:l.value,onNodeClick:e=>a("nodeClick",e),onChangeCursor:e=>a("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(!p(e.options)||!e.currentNode)return[];const r=[e.options];let t=e.options;for(l.value.length=0;p(t);){const o=t.find(u);if(!o)break;l.value.push(o),t=o[e.childKey],r.push(t)}if(e.cursorNode){const t=r.findIndex((r=>(r&&r.findIndex((r=>r===e.cursorNode)))>=0));if(t>=0){const e=r.slice(0,t+1);return l.value.splice(t,r.length),e}}return r}return()=>t("section",{class:"search-cascader__menuWrapper"},[p(e.options)&&e.options.length?e.currentNode?i().map(s):s(e.options,0):t("section",{class:"search-cascader__emptyWrapper"},[f(n.empty)?n.empty():t("section",null,[o("empty")])])])}});export{K as SearchMenu};
@@ -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 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};
1
+ import e from"./LabelFormContent.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","LabelFormContent.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../shared/utils/vexutilsExpand.js";const A={key:0,class:"label-disable-wrap"},O=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},j={class:"label-wrap"},k=["id"],T={class:"edit-label-type"};var B=t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:B,emit:D}){const V=t,F=L(),P=e(null),_=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!_.inited)return!1;let t=_.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(..._.labelSelectedEdit,...V.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(_.labelSelectedEdit=$.value,"object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=_.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await V.saveLabelItem(a,t);i&&(F.success("添加成功!"),D("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=_.labelSelectedEdit)?void 0:i.length)&&x.clone(_.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}_.labelSelectedEdit=[...d],N.value++,V.explicit&&D("explicitOnChange",[..._.labelSelectedEdit])},X=async t=>{const{status:e}=await V.deleteLabel(t,V.item);if(e){F.success("删除成功!");for(const e in _.labelConfig){const l=_.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&_.labelConfig[e].itemList.splice(l,1)}const e=_.labelSelectedEdit||[],l=V.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),D("change",[...l],V.item)}D("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=P.value.querySelector("a[href='"+l+"']"),e&&e.click(),_.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);_.cacheAnchorKey=e},et=()=>{var t;return null==(t=P.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>V.labelOptions),(t=>{t&&(()=>{var t;if(V.isLock)return;const e=JSON.parse(JSON.stringify(V.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}_.labelConfig=e,C((()=>{let t;R(),V.explicit&&_.inited&&(t=_.labelAnchorKey),z(_.labelConfig,t),_.inited=!0}))})()}),{immediate:!0,deep:!0}),B({resetShowAdd:()=>{let{labelObj:t}=_.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([..._.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=_.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(_.labelSelectedEdit)){const e=_.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&_.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:P},[d(W)?(n(),s("div",A,O)):o("v-if",!0),r(c("div",K,[c("div",j,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(_.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(_.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",T,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,k),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}});export{B as default};
@@ -1 +1 @@
1
- import e from"./SelectLabel.vue2.js";import l from"../../../_virtual/plugin-vue_export-helper.js";var r=l(e,[["__file","SelectLabel.vue"]]);export{r as default};
1
+ import e from"./SelectLabel.vue2.js";import l from"../../../_virtual/_plugin-vue_export-helper.js";var r=l(e,[["__file","SelectLabel.vue"]]);export{r as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,watch as a,openBlock as s,createElementBlock as t,createCommentVNode as i,unref as d,Fragment as c,createElementVNode as n,renderList as o,createBlock as u,normalizeStyle as f,normalizeClass as p,withCtx as y,createVNode as m,toDisplayString as r,withDirectives as b,withModifiers as v,vShow as h,createTextVNode as k}from"vue";import{NTag as I,NTooltip as g,NIcon as C,NButton as L,NInput as _}from"naive-ui";import{Close as A,Add as B}from"@vicons/ionicons5";import F from"../../../../_virtual/plugin-vue_export-helper.js";const P={class:"edit-content"},V={key:0,class:"label-disable-wrap"},w=[n("p",{class:"label-disable-title"},"无可选标签",-1),n("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],N={class:"label-content"},T={key:0,class:"selfval"},x={key:1,class:"selfval"};var E=F(e({__name:"label-classify",props:{classifyItem:{default:()=>({})},handleLabelChange:{type:Function,default:()=>{}},handleLabelColor:{type:Function,default:()=>{}},handleDelLabel:{type:Function,default:()=>{}},handleAddLabel:{type:Function,default:()=>{}},hanldeBlur:{type:Function,default:()=>{}},clearaddVal:{type:Function,default:()=>{}},isEdit:{type:Boolean,default:!1},sourceType:null},setup(e){var F;const E=e;let U=l((null==(F=E.classifyItem)?void 0:F.itemList)||[]);return a((()=>E.classifyItem),(e=>{U.value=(null==e?void 0:e.itemList)||[]}),{immediate:!0,deep:!0}),(l,a)=>(s(),t("div",P,[i(" disable "),d(U)?(s(),t(c,{key:1},[i(" "),n("div",N,[(s(!0),t(c,null,o(d(U),(l=>(s(),u(d(I),{checkable:"",checked:l.isSelect,"onUpdate:checked":a=>((e,l,a)=>{l.isSelect=e,E.handleLabelChange(e,l,a)})(a,l,e.classifyItem),key:l.labelId,style:f(e.handleLabelColor(l)),class:p({"sys-label-tag":l.isPublic&&1==l.isPublic})},{default:y((()=>[m(d(g),{placement:"top-start"},{trigger:y((()=>[n("span",null,r(l.labelName),1)])),default:y((()=>[n("span",null,r(l.labelName),1)])),_:2},1024),"guage"!=e.sourceType?b((s(),u(d(C),{key:0,class:"label-close",component:d(A),onClick:v((a=>e.handleDelLabel(l,e.classifyItem)),["stop"])},null,8,["component","onClick"])),[[h,!(l.isPublic&&1==l.isPublic)]]):i("v-if",!0)])),_:2},1032,["checked","onUpdate:checked","style","class"])))),128)),1==e.classifyItem.allowCreateByPersonal?(s(),t(c,{key:0},[e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(L),{key:0,dashed:"",class:"label-add",onClick:a[0]||(a[0]=l=>e.handleAddLabel(l,e.classifyItem))},{default:y((()=>[e.classifyItem.addVal?(s(),t("span",T,r(e.classifyItem.addVal),1)):(s(),t("span",x,[m(d(C),{component:d(B)},null,8,["component"]),k("标签")]))])),_:1},512)),[[h,!e.classifyItem.showAdd]]):i("v-if",!0),i(" 是否允许新增个人标签 allowCreateByPersonal "),e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(_),{key:1,class:"label-add add-input",value:e.classifyItem.addVal,"onUpdate:value":a[2]||(a[2]=l=>e.classifyItem.addVal=l),valueModifiers:{trim:!0},onBlur:a[3]||(a[3]=l=>e.hanldeBlur(l,e.classifyItem))},{suffix:y((()=>[m(d(C),{component:d(A),onClick:a[1]||(a[1]=v((l=>e.clearaddVal(l,e.classifyItem)),["stop"]))},null,8,["component"])])),_:1},8,["value"])),[[h,e.classifyItem.showAdd]]):i("v-if",!0)],64)):i("v-if",!0)])],2112)):(s(),t("div",V,w))]))}}),[["__file","label-classify.vue"]]);export{E as default};
1
+ import e from"./label-classify.vue2.js";import l from"../../../../_virtual/_plugin-vue_export-helper.js";var r=l(e,[["__file","label-classify.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,watch as a,openBlock as s,createElementBlock as t,createCommentVNode as i,unref as d,Fragment as c,createElementVNode as n,renderList as o,createBlock as u,normalizeStyle as y,normalizeClass as f,withCtx as p,createVNode as m,toDisplayString as r,withDirectives as b,withModifiers as v,vShow as h,createTextVNode as k}from"vue";import{NTag as I,NTooltip as g,NIcon as C,NButton as L,NInput as A}from"naive-ui";import{Close as B,Add as F}from"@vicons/ionicons5";const P={class:"edit-content"},V={key:0,class:"label-disable-wrap"},_=[n("p",{class:"label-disable-title"},"无可选标签",-1),n("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],w={class:"label-content"},N={key:0,class:"selfval"},T={key:1,class:"selfval"};var E=e({__name:"label-classify",props:{classifyItem:{default:()=>({})},handleLabelChange:{type:Function,default:()=>{}},handleLabelColor:{type:Function,default:()=>{}},handleDelLabel:{type:Function,default:()=>{}},handleAddLabel:{type:Function,default:()=>{}},hanldeBlur:{type:Function,default:()=>{}},clearaddVal:{type:Function,default:()=>{}},isEdit:{type:Boolean,default:!1},sourceType:null},setup(e){var E;const U=e;let x=l((null==(E=U.classifyItem)?void 0:E.itemList)||[]);return a((()=>U.classifyItem),(e=>{x.value=(null==e?void 0:e.itemList)||[]}),{immediate:!0,deep:!0}),(l,a)=>(s(),t("div",P,[i(" disable "),d(x)?(s(),t(c,{key:1},[i(" "),n("div",w,[(s(!0),t(c,null,o(d(x),(l=>(s(),u(d(I),{checkable:"",checked:l.isSelect,"onUpdate:checked":a=>((e,l,a)=>{l.isSelect=e,U.handleLabelChange(e,l,a)})(a,l,e.classifyItem),key:l.labelId,style:y(e.handleLabelColor(l)),class:f({"sys-label-tag":l.isPublic&&1==l.isPublic})},{default:p((()=>[m(d(g),{placement:"top-start"},{trigger:p((()=>[n("span",null,r(l.labelName),1)])),default:p((()=>[n("span",null,r(l.labelName),1)])),_:2},1024),"guage"!=e.sourceType?b((s(),u(d(C),{key:0,class:"label-close",component:d(B),onClick:v((a=>e.handleDelLabel(l,e.classifyItem)),["stop"])},null,8,["component","onClick"])),[[h,!(l.isPublic&&1==l.isPublic)]]):i("v-if",!0)])),_:2},1032,["checked","onUpdate:checked","style","class"])))),128)),1==e.classifyItem.allowCreateByPersonal?(s(),t(c,{key:0},[e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(L),{key:0,dashed:"",class:"label-add",onClick:a[0]||(a[0]=l=>e.handleAddLabel(l,e.classifyItem))},{default:p((()=>[e.classifyItem.addVal?(s(),t("span",N,r(e.classifyItem.addVal),1)):(s(),t("span",T,[m(d(C),{component:d(F)},null,8,["component"]),k("标签")]))])),_:1},512)),[[h,!e.classifyItem.showAdd]]):i("v-if",!0),i(" 是否允许新增个人标签 allowCreateByPersonal "),e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(A),{key:1,class:"label-add add-input",value:e.classifyItem.addVal,"onUpdate:value":a[2]||(a[2]=l=>e.classifyItem.addVal=l),valueModifiers:{trim:!0},onBlur:a[3]||(a[3]=l=>e.hanldeBlur(l,e.classifyItem))},{suffix:p((()=>[m(d(C),{component:d(B),onClick:a[1]||(a[1]=v((l=>e.clearaddVal(l,e.classifyItem)),["stop"]))},null,8,["component"])])),_:1},8,["value"])),[[h,e.classifyItem.showAdd]]):i("v-if",!0)],64)):i("v-if",!0)])],2112)):(s(),t("div",V,_))]))}});export{E as default};
@@ -95,12 +95,6 @@ declare const _default: import("vue").DefineComponent<{
95
95
  };
96
96
  readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
97
97
  actionType: "check" | "uncheck";
98
- /**
99
- * 取消勾选树节点
100
- * baseKeys:基准值
101
- * currentTree:当前树节点
102
- * value:树节点的key值
103
- */
104
98
  value: string | number;
105
99
  }) => void>>;
106
100
  readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
@@ -1 +1 @@
1
- import e from"./SearchMultiple.vue2.js";import r from"../../../_virtual/plugin-vue_export-helper.js";var l=r(e,[["__file","SearchMultiple.vue"]]);export{l as default};
1
+ import e from"./SearchMultiple.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var l=r(e,[["__file","SearchMultiple.vue"]]);export{l as default};
@@ -1 +1 @@
1
- import e from"./SelectPerson.vue2.js";import r from"../../../_virtual/plugin-vue_export-helper.js";var o=r(e,[["__file","SelectPerson.vue"]]);export{o as default};
1
+ import e from"./SelectPerson.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","SelectPerson.vue"]]);export{o as default};
@@ -1 +1 @@
1
- import{defineComponent as r,ref as t,provide as e,onBeforeUnmount as o,onMounted as s,openBlock as u,createElementBlock as i,createCommentVNode as p,renderSlot as a}from"vue";import{uuidGenerator as n}from"../../../shared/utils/index.js";import{InjectionShortcutManager as c}from"./constants/index.js";import"../index.js";import l from"../../../_virtual/plugin-vue_export-helper.js";import{ShortcutManager as d}from"./hooks/useShortcuts.js";var f=l(r({__name:"ShortcutProvider",props:{scope:{type:[String,Symbol]},autoFocus:{type:Boolean,default:!0}},setup(r){const l=r,f=t(),m=new d(f,l.scope||n()).start();return e(c,m),o((()=>{m.destroy()})),s((()=>{var r;return null==(r=f.value)?void 0:r.focus()})),(r,t)=>(u(),i("section",{ref_key:"shortcutWrapperRef",ref:f,"is-shortcut-capture":"",class:"shortcut-provider",tabindex:-9999},[p(" 需要绑定该作用域快捷键的内容 "),a(r.$slots,"default")],512))}}),[["__file","ShortcutProvider.vue"]]);export{f as default};
1
+ import r from"./ShortcutProvider.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var o=e(r,[["__file","ShortcutProvider.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as t,ref as r,provide as o,onBeforeUnmount as e,onMounted as s,openBlock as u,createElementBlock as a,createCommentVNode as p,renderSlot as i}from"vue";import{uuidGenerator as n}from"../../../shared/utils/index.js";import{InjectionShortcutManager as c}from"./constants/index.js";import"../index.js";import{ShortcutManager as d}from"./hooks/useShortcuts.js";var f=t({__name:"ShortcutProvider",props:{scope:{type:[String,Symbol]},autoFocus:{type:Boolean,default:!0}},setup(t){const f=t,l=r(),m=new d(l,f.scope||n()).start();return o(c,m),e((()=>{m.destroy()})),s((()=>{var t;return null==(t=l.value)?void 0:t.focus()})),(t,r)=>(u(),a("section",{ref_key:"shortcutWrapperRef",ref:l,"is-shortcut-capture":"",class:"shortcut-provider",tabindex:-9999},[p(" 需要绑定该作用域快捷键的内容 "),i(t.$slots,"default")],512))}});export{f as default};
@@ -2024,7 +2024,6 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2024
2024
  syncBarPosition: import("../../../es/shared/types").Func<any[], any>;
2025
2025
  } | undefined>;
2026
2026
  currentAnchor: import("vue").WritableComputedRef<string>;
2027
- generateAnchorList: (formModel: import("@formily/core").Form<any>) => Promise<void>;
2028
2027
  updateAnchorList: (field: import("@formily/core").GeneralField) => void;
2029
2028
  anchorIdList: import("vue").Ref<{
2030
2029
  name: string;
@@ -2026,7 +2026,6 @@ declare const _default: import("vue").DefineComponent<{
2026
2026
  syncBarPosition: Func<any[], any>;
2027
2027
  } | undefined>;
2028
2028
  currentAnchor: import("vue").WritableComputedRef<string>;
2029
- generateAnchorList: (formModel: import("../../../../es/components/form-render").Form<any>) => Promise<void>;
2030
2029
  updateAnchorList: (field: import("../../../../es/components/form-render").GeneralField) => void;
2031
2030
  anchorIdList: import("vue").Ref<{
2032
2031
  name: string;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as r,watch as o,openBlock as l,createBlock as i,unref as u}from"vue";import{isEqual as s,cloneDeep as a}from"lodash-es";import"../../shortcut-provider/index.js";import{normalizeSignatureInfo as p,isInvalidSignature as n,getDisplaySignature as c}from"../../shortcut-provider/src/utils/index.js";import m from"./ShortcutSetterItem.vue.js";import d from"../../form-render/index.js";import h from"../../../_virtual/plugin-vue_export-helper.js";import{GlobalShortcutProvider as v,useShortcuts as f}from"../../shortcut-provider/src/hooks/useShortcuts.js";var S=h(e({__name:"ShortcutSetter",props:{glob:{type:Boolean,default:!1},scope:{type:[String,Symbol]}},emits:["error","update"],setup(e,{expose:h,emit:S}){const g=e,y={SHORTCUT:m},j=t(0),_=r((()=>g.glob?v:g.scope)),k=f(_),b=t([]);let x={};function O(){x={},b.value=k.traverse().map((e=>(x[e.key]=p(e.shortcutSignature),{val_key:e.key,alias:e.label,html_type:"SHORTCUT",componentProps:{scope:_.value,onShortcutChange:T,shortcutKey:e.key,shortcutSignature:e.shortcutSignature,editPlaceholder:e.editPlaceholder,placeholder:e.placeholder,operation:e.operation},elem_width:6}))),j.value++}function T({key:e,info:t,resolve:r,reject:o}){const l=p(t);return n(l)?(S("error",`非法的快捷键组合=> ${c(l)}`),o()):Object.values(x).some((e=>s(e,l)))?(S("error",`重复的快捷键=> ${c(l)}`),o()):(S("update",{key:e,info:l}),x[e]=l,void r())}return o([_,()=>k.traverse()],O,{immediate:!0,deep:!0}),h({loadSignature(){O()},getSignature:()=>a(x),setSignature(){Object.entries(x).forEach((([e,t])=>{k.update(e,t)}))}}),(e,t)=>(l(),i(u(d),{column:12,key:j.value,"label-placement":"left","field-list":b.value,components:y},null,8,["field-list"]))}}),[["__file","ShortcutSetter.vue"]]);export{S as default};
1
+ import t from"./ShortcutSetter.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var r=e(t,[["__file","ShortcutSetter.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,computed as r,watch as o,openBlock as l,createBlock as s,unref as a}from"vue";import{isEqual as i,cloneDeep as u}from"lodash-es";import"../../shortcut-provider/index.js";import{normalizeSignatureInfo as n,isInvalidSignature as p,getDisplaySignature as c}from"../../shortcut-provider/src/utils/index.js";import m from"./ShortcutSetterItem.vue.js";import d from"../../form-render/index.js";import{GlobalShortcutProvider as h,useShortcuts as f}from"../../shortcut-provider/src/hooks/useShortcuts.js";var v=e({__name:"ShortcutSetter",props:{glob:{type:Boolean,default:!1},scope:{type:[String,Symbol]}},emits:["error","update"],setup(e,{expose:v,emit:S}){const y=e,g={SHORTCUT:m},j=t(0),k=r((()=>y.glob?h:y.scope)),b=f(k),x=t([]);let _={};function O(){_={},x.value=b.traverse().map((e=>(_[e.key]=n(e.shortcutSignature),{val_key:e.key,alias:e.label,html_type:"SHORTCUT",componentProps:{scope:k.value,onShortcutChange:T,shortcutKey:e.key,shortcutSignature:e.shortcutSignature,editPlaceholder:e.editPlaceholder,placeholder:e.placeholder,operation:e.operation},elem_width:6}))),j.value++}function T({key:e,info:t,resolve:r,reject:o}){const l=n(t);return p(l)?(S("error",`非法的快捷键组合=> ${c(l)}`),o()):Object.values(_).some((e=>i(e,l)))?(S("error",`重复的快捷键=> ${c(l)}`),o()):(S("update",{key:e,info:l}),_[e]=l,void r())}return o([k,()=>b.traverse()],O,{immediate:!0,deep:!0}),v({loadSignature(){O()},getSignature:()=>u(_),setSignature(){Object.entries(_).forEach((([e,t])=>{b.update(e,t)}))}}),(e,t)=>(l(),s(a(d),{column:12,key:j.value,"label-placement":"left","field-list":x.value,components:g},null,8,["field-list"]))}});export{v as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as u,openBlock as r,createElementBlock as l,createVNode as o,unref as n,withModifiers as a}from"vue";import{NInput as s}from"naive-ui";import{getDisplaySignature as c}from"../../shortcut-provider/src/utils/index.js";import i from"../../../_virtual/plugin-vue_export-helper.js";const p={class:"shortcut-setter-item__wrapper"};var v=i(e({__name:"ShortcutSetterItem",props:{shortcutKey:null,shortcutSignature:null,value:null,onChange:null,onFocus:null,placeholder:{default:"点击设置快捷键"},editPlaceholder:{default:"键盘按下要设置的快捷键组合"}},emits:["shortcutChange"],setup(e,{emit:i}){const v=e,h=t(c(v.shortcutSignature)),f=t(0),m=u((()=>0===f.value)),d=t(""),y=u((()=>m.value?h.value:d.value)),_=u((()=>m.value?v.placeholder:v.editPlaceholder));function g(){f.value=1}const K=t();function S(){var e;f.value=0,d.value="",null==(e=K.value)||e.blur()}const w=e=>{d.value=c(e)},j=async e=>{try{if(c(e)===h.value)return;await new Promise(((t,u)=>{i("shortcutChange",{key:v.shortcutKey,info:e,resolve:t,reject:u})})),h.value=c(e)}finally{S(),d.value=""}};return(e,t)=>(r(),l("section",p,[o(n(s),{ref_key:"inputRef",ref:K,"input-props":{class:"shortcut-setter-item"},value:n(y),placeholder:n(_),onFocus:g,onBlur:S,onKeydown:a(w,["prevent","stop"]),onKeyup:a(j,["prevent","stop"])},null,8,["value","placeholder","onKeydown","onKeyup"])]))}}),[["__file","ShortcutSetterItem.vue"]]);export{v as default};
1
+ import t from"./ShortcutSetterItem.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var r=e(t,[["__file","ShortcutSetterItem.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,computed as u,openBlock as l,createElementBlock as r,createVNode as o,unref as n,withModifiers as a}from"vue";import{NInput as s}from"naive-ui";import{getDisplaySignature as c}from"../../shortcut-provider/src/utils/index.js";const i={class:"shortcut-setter-item__wrapper"};var p=e({__name:"ShortcutSetterItem",props:{shortcutKey:null,shortcutSignature:null,value:null,onChange:null,onFocus:null,placeholder:{default:"点击设置快捷键"},editPlaceholder:{default:"键盘按下要设置的快捷键组合"}},emits:["shortcutChange"],setup(e,{emit:p}){const v=e,h=t(c(v.shortcutSignature)),d=t(0),f=u((()=>0===d.value)),m=t(""),y=u((()=>f.value?h.value:m.value)),K=u((()=>f.value?v.placeholder:v.editPlaceholder));function g(){d.value=1}const w=t();function _(){var e;d.value=0,m.value="",null==(e=w.value)||e.blur()}const S=e=>{m.value=c(e)},C=async e=>{try{if(c(e)===h.value)return;await new Promise(((t,u)=>{p("shortcutChange",{key:v.shortcutKey,info:e,resolve:t,reject:u})})),h.value=c(e)}finally{_(),m.value=""}};return(e,t)=>(l(),r("section",i,[o(n(s),{ref_key:"inputRef",ref:w,"input-props":{class:"shortcut-setter-item"},value:n(y),placeholder:n(K),onFocus:g,onBlur:_,onKeydown:a(S,["prevent","stop"]),onKeyup:a(C,["prevent","stop"])},null,8,["value","placeholder","onKeydown","onKeyup"])]))}});export{p as default};