cnhis-design-vue 3.1.44 → 3.1.45-beta.0

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 (268) hide show
  1. package/es/components/base-search/src/index.vue.js +1 -1
  2. package/es/components/big-table/src/BigTable.vue.js +1 -1
  3. package/es/components/big-table/src/components/NoData.vue.js +1 -1
  4. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
  5. package/es/components/big-table/src/components/input-button.vue.js +1 -1
  6. package/es/components/big-table/src/components/separate.vue.js +1 -1
  7. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  8. package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
  9. package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
  10. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
  11. package/es/components/button-print/src/components/Preview.vue.js +1 -1
  12. package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
  13. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  14. package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
  15. package/es/components/classification/src/index.vue.js +1 -1
  16. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  17. package/es/components/fabric-chart/index.d.ts +5 -41
  18. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +5 -41
  19. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
  20. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  21. package/es/components/fabric-chart/src/hooks/{useBirthProcess.d.ts → birthProcess/useBirthProcess.d.ts} +2 -2
  22. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -0
  23. package/es/components/fabric-chart/src/hooks/{useBirthProcessChart.d.ts → birthProcess/useBirthProcessChart.d.ts} +3 -3
  24. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -0
  25. package/es/components/fabric-chart/src/hooks/index.d.ts +5 -7
  26. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +6 -0
  28. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -0
  29. package/es/components/fabric-chart/src/hooks/temperature/index.d.ts +6 -0
  30. package/es/components/fabric-chart/src/hooks/temperature/index.js +1 -0
  31. package/es/components/fabric-chart/src/hooks/temperature/useBottom.d.ts +4 -0
  32. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -0
  33. package/es/components/fabric-chart/src/hooks/{useCenter.d.ts → temperature/useCenter.d.ts} +3 -3
  34. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -0
  35. package/es/components/fabric-chart/src/hooks/{useLeft.d.ts → temperature/useLeft.d.ts} +3 -3
  36. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -0
  37. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +4 -0
  38. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -0
  39. package/es/components/fabric-chart/src/hooks/temperature/useRight.d.ts +4 -0
  40. package/es/components/fabric-chart/src/hooks/temperature/useRight.js +1 -0
  41. package/es/components/fabric-chart/src/hooks/{useShadow.d.ts → temperature/useShadow.d.ts} +1 -1
  42. package/es/components/fabric-chart/src/hooks/temperature/useShadow.js +1 -0
  43. package/es/components/fabric-chart/src/hooks/{useTemperatureChart.d.ts → temperature/useTemperatureChart.d.ts} +3 -3
  44. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -0
  45. package/es/components/fabric-chart/src/hooks/temperature/useTop.d.ts +4 -0
  46. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -0
  47. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  48. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  49. package/es/components/fabric-chart/src/interface.d.ts +1 -1
  50. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  51. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  52. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  53. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  54. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  55. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  56. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  57. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  58. package/es/components/form-render/src/FormRender.vue.js +1 -1
  59. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  60. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  61. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  62. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  63. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  64. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  65. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
  66. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  67. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  68. package/es/components/form-render/src/components/renderer/select.js +1 -1
  69. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
  70. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  71. package/es/components/guide/src/renderer.js +1 -1
  72. package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
  73. package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
  74. package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
  75. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  76. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  77. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
  78. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  79. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
  84. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  86. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  87. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  88. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
  89. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  90. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  91. package/es/components/iho-table/src/utils/index.js +1 -1
  92. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  93. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
  94. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
  95. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  96. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  97. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  98. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  99. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  100. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  101. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  102. package/es/components/map/src/Map.vue.js +1 -1
  103. package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -1
  104. package/es/components/quick-search/src/index.vue.js +1 -1
  105. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  106. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  107. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  108. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  109. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  110. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  111. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  112. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
  113. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
  114. package/es/components/scale-view/src/components/NoData.vue.js +1 -1
  115. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  116. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  117. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  118. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  119. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  120. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  121. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  122. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  123. package/es/components/select-label/src/SelectLabel.vue.js +1 -1
  124. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  125. package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
  126. package/es/components/select-person/src/SelectPerson.vue.js +1 -1
  127. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
  128. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
  129. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
  130. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  131. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  132. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -1
  133. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -1
  134. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -1
  135. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -1
  136. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -1
  137. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -1
  138. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -1
  139. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -1
  140. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  141. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
  142. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  143. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
  144. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
  145. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
  146. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -1
  147. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -1
  148. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  149. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  150. package/es/components/table-filter/src/directive/resize.js +1 -1
  151. package/es/components/time-line/src/TimeLine.vue.js +1 -1
  152. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  153. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
  154. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  155. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
  156. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
  157. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  158. package/es/shared/components/no-data/NoData.vue.js +1 -1
  159. package/es/shared/package.json.js +1 -1
  160. package/package.json +2 -2
  161. package/es/components/base-search/src/index.vue2.js +0 -1
  162. package/es/components/big-table/src/components/NoData.vue2.js +0 -1
  163. package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +0 -1
  164. package/es/components/big-table/src/components/input-button.vue2.js +0 -1
  165. package/es/components/big-table/src/components/separate.vue2.js +0 -1
  166. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +0 -1
  167. package/es/components/button-print/src/components/EditFormat.vue2.js +0 -1
  168. package/es/components/button-print/src/components/IdentityVerification.vue2.js +0 -1
  169. package/es/components/classification/src/components/search-filter/index.vue2.js +0 -1
  170. package/es/components/classification/src/components/set-classification/index.vue2.js +0 -1
  171. package/es/components/classification/src/components/table-modal/index.vue2.js +0 -1
  172. package/es/components/classification/src/index.vue2.js +0 -1
  173. package/es/components/date-picker/src/DatePicker.vue2.js +0 -1
  174. package/es/components/fabric-chart/src/FabricChart.vue2.js +0 -1
  175. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +0 -1
  176. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +0 -1
  177. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +0 -1
  178. package/es/components/fabric-chart/src/hooks/useBottom.d.ts +0 -4
  179. package/es/components/fabric-chart/src/hooks/useBottom.js +0 -1
  180. package/es/components/fabric-chart/src/hooks/useCenter.js +0 -1
  181. package/es/components/fabric-chart/src/hooks/useLeft.js +0 -1
  182. package/es/components/fabric-chart/src/hooks/useOther.d.ts +0 -4
  183. package/es/components/fabric-chart/src/hooks/useOther.js +0 -1
  184. package/es/components/fabric-chart/src/hooks/useRight.d.ts +0 -4
  185. package/es/components/fabric-chart/src/hooks/useRight.js +0 -1
  186. package/es/components/fabric-chart/src/hooks/useShadow.js +0 -1
  187. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +0 -1
  188. package/es/components/fabric-chart/src/hooks/useTop.d.ts +0 -4
  189. package/es/components/fabric-chart/src/hooks/useTop.js +0 -1
  190. package/es/components/field-set/src/FieldSet.vue2.js +0 -1
  191. package/es/components/form-config/src/FormConfig.vue2.js +0 -1
  192. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +0 -1
  193. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +0 -1
  194. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +0 -1
  195. package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +0 -1
  196. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +0 -1
  197. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +0 -1
  198. package/es/components/form-render/src/FormRender.vue2.js +0 -1
  199. package/es/components/form-render/src/FormRenderWrapper.vue2.js +0 -1
  200. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +0 -1
  201. package/es/components/form-render/src/components/tooltipMessage.vue2.js +0 -1
  202. package/es/components/iho-select-label/src/LabelFormContent.vue2.js +0 -1
  203. package/es/components/iho-select-label/src/SelectLabel.vue2.js +0 -1
  204. package/es/components/iho-select-label/src/components/label-classify.vue2.js +0 -1
  205. package/es/components/iho-table/src/IhoTable.vue2.js +0 -1
  206. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +0 -1
  207. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +0 -1
  208. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +0 -1
  209. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +0 -1
  210. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +0 -1
  211. package/es/components/info-header/src/InfoHeader.vue2.js +0 -1
  212. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +0 -1
  213. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +0 -1
  214. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +0 -1
  215. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +0 -1
  216. package/es/components/info-header/src/components/infoDescription/index.vue2.js +0 -1
  217. package/es/components/info-header/src/components/patientInfo/index.vue2.js +0 -1
  218. package/es/components/keyboard/src/Keyboard.vue2.js +0 -1
  219. package/es/components/keyboard/src/components/InputNumber.vue2.js +0 -1
  220. package/es/components/keyboard/src/components/NumberPanel.vue2.js +0 -1
  221. package/es/components/map/src/Map.vue2.js +0 -1
  222. package/es/components/picture-clipper/src/PictureClipper.vue2.js +0 -1
  223. package/es/components/quick-search/src/index.vue2.js +0 -1
  224. package/es/components/recommend-search/src/RecommendSearch.vue2.js +0 -1
  225. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +0 -1
  226. package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +0 -1
  227. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +0 -1
  228. package/es/components/scale-view/src/ScaleView.vue2.js +0 -1
  229. package/es/components/scale-view/src/components/AnswerParse.vue2.js +0 -1
  230. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +0 -1
  231. package/es/components/scale-view/src/components/EvaluatePage.vue2.js +0 -1
  232. package/es/components/scale-view/src/components/NoData.vue2.js +0 -1
  233. package/es/components/search-cascader/src/SearchCascader.vue2.js +0 -1
  234. package/es/components/select-label/src/LabelFormContent.vue2.js +0 -1
  235. package/es/components/select-label/src/components/label-classify.vue2.js +0 -1
  236. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +0 -1
  237. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +0 -1
  238. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +0 -1
  239. package/es/components/steps-wheel/src/StepsWheel.vue2.js +0 -1
  240. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +0 -1
  241. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +0 -1
  242. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +0 -1
  243. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +0 -1
  244. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +0 -1
  245. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +0 -1
  246. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +0 -1
  247. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +0 -1
  248. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +0 -1
  249. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +0 -1
  250. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +0 -1
  251. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +0 -1
  252. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +0 -1
  253. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +0 -1
  254. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +0 -1
  255. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +0 -1
  256. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +0 -1
  257. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +0 -1
  258. package/es/components/time-line/src/TimeLine.vue2.js +0 -1
  259. package/es/components/time-picker/src/TimePicker.vue2.js +0 -1
  260. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +0 -1
  261. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +0 -1
  262. package/es/shared/components/SelectPage/SelectPage.vue2.js +0 -1
  263. package/es/shared/components/SvgIcon/SvgIcon.vue2.js +0 -1
  264. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +0 -1
  265. package/es/shared/components/no-data/NoData.vue2.js +0 -1
  266. /package/es/_virtual/{_plugin-vue_export-helper.js → plugin-vue_export-helper.js} +0 -0
  267. /package/es/components/fabric-chart/src/{hooks/constant.d.ts → constants/index.d.ts} +0 -0
  268. /package/es/components/fabric-chart/src/{hooks/constant.js → constants/index.js} +0 -0
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as b,withKeys as k,withModifiers as v,toDisplayString as F,renderSlot as C}from"vue";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as H,cloneDeep as x}from"lodash-es";import{createForm as A,onFieldValueChange as L,onFieldMount as R,onFieldUnmount as O,onFieldReact as w,onFormMount as _}from"@formily/core";import{FormProvider as B,FormConsumer as V}from"@formily/vue";import{NForm as I,NTabs as N,NTabPane as D,NConfigProvider as q}from"naive-ui";import{InjectionFormGraph as T}from"./constants/index.js";import{useAutoHidden as U}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as W}from"./hooks/useComplexOptions.js";import{useFormDomEvent as E,useFormExposeEvent as G}from"./hooks/useFormEvent.js";import{useFormGraph as K}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as M}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as P}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as J}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as $}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as z}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as Q}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as X}from"./hooks/useFormValidator.js";import{useAnchor as Y}from"./hooks/useAnchor.js";import{useFormContext as Z}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import{createObjSchema as ee}from"./utils/schema.js";const oe={key:0,style:{height:"54px"}},te={style:{"white-space":"pre"}};var re=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:re,emit:se}){const ae=e,ie=S(),{nuiThemeOverrides:le}=$();X();const ne=o(),me=t((()=>H(ae.maxHeight)?ae.maxHeight+"px":ae.maxHeight)),{SchemaField:de,businessCollector:pe,formItemDepsCollector:ue,changeContextCollector:ce,formUUID:fe}=Z(ae,se),{anchorBarRef:he,currentAnchor:ye,updateAnchorList:je,anchorIdList:ge,onScroll:be}=Y(ae,se,ne,ue);M(ae).callLifeCycle("onSetup");const{trigger:ke}=U(),{observeFormGraph:ve,setGraph:Fe,removeGraph:Ce}=K();r(T,ve);const{lowCodeEventTrigger:Se}=P(),He=A({initialValues:ae.initialData,effects(e){L("*",(o=>{const t=o.props.name.toString();pe.trigger(e,t),ue.trigger(t),se("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:ce.getContext(t,o.value)}),Se(o),xe(t,o.value)})),R("*",Fe),O("*",Ce),ae.linebarAutoHidden&&(w("*",ke),_((e=>e.query("*").forEach(ke)))),ae.anchor&&w("*",je)}}),{lowCodeReactionsHandler:xe,triggerAllReactionsHandler:Ae}=J(t((()=>ae.lowCodeReactions)),He);s(Ae);const{schemaAdaptor:Le}=z(pe);let Re=ae.fieldList||[];const Oe=t((()=>ae.schema?ae.schema:ae.fieldList?(Re=Q().traverse(x(ae.fieldList),ae.fieldVisitor),ee(Le(Re))):ee({}))),{onKeydown:we}=E({formModel:He,formRenderRef:ne,props:ae}),{clearSpan:_e}=W();a((()=>_e(fe)));const Be=G({formModel:He,formRenderRef:ne,formItemDepsCollector:ue,getFieldList:()=>Re,formUUID:fe});return re({formModel:He,validate:(e="*")=>Be.validate(e),getFormValues:(e=!0)=>Be.getFormValues(e),async setFormValues(e,o=!0,t=!1,r=!0){t&&(pe.triggerLock=!0),Be.setFormValues(e,o,r),await i(),pe.triggerLock=!1},setFieldState(e,o){Be.setFieldState(e,o)},resetFields(e="*"){Be.resetFields(e)},queryWidget:async e=>Be.queryWidget(e),getFieldList:()=>Re,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(I),{class:d(["form-render",{"form-render--no-border":!e.bordered,"form-render--underline":"underline"===e.bordered}]),"require-mark-placement":"left",style:p(m(ie))},{default:u((()=>[e.anchor?(l(),c("section",oe,[f(m(N),{value:m(ye),"onUpdate:value":t[0]||(t[0]=e=>h(ye)?ye.value=e:null),type:"line",ref_key:"anchorBarRef",ref:he},{default:u((()=>[(l(!0),c(y,null,j(m(ge),(e=>(l(),n(m(D),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),f(m(q),{"theme-overrides":m(le)},{default:u((()=>[b("section",{class:"form-render__wrapper",style:p({"--column":e.column,"--form-height":m(me)}),ref_key:"formRenderRef",ref:ne,onScroll:t[1]||(t[1]=(...e)=>m(be)&&m(be)(...e)),onKeydownCapture:t[2]||(t[2]=k(v(((...e)=>m(we)&&m(we)(...e)),["prevent"]),["enter"]))},[f(m(B),{form:m(He)},{default:u((()=>[f(m(de),{schema:m(Oe)},null,8,["schema"]),e.consumer?(l(),n(m(V),{key:0},{default:u((({form:e})=>[b("div",te,F(JSON.stringify(e.values,null,2)),1)])),_:1})):g("v-if",!0),C(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}});export{re as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as r,computed as t,openBlock as a,createBlock as l,withCtx as o,renderSlot as u,nextTick as d}from"vue";import s from"./FormRender.vue.js";var n=e({__name:"FormRenderWrapper",setup(e,{expose:n}){const f=r(),i=r(0);return n({...["validate","getFormValues","setFormValues","setFieldState","resetFields","queryWidget","getFieldList"].reduce(((e,r)=>(e[r]=(...e)=>{var t;return(null==(t=f.value)?void 0:t[r]).call(t,...e)},e)),{}),formModel:t((()=>{var e;return null==(e=f.value)?void 0:e.formModel})),reload:async function(){i.value++,await d()}}),(e,r)=>(a(),l(s,{key:i.value,ref_key:"formRenderRef",ref:f},{default:o((()=>[u(e.$slots,"default")])),_:3}))}});export{n as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as r,computed as a,inject as o,openBlock as s,createElementBlock as l,createElementVNode as t,normalizeClass as i,unref as n,createTextVNode as d,toDisplayString as m,createBlock as f,createCommentVNode as u,Fragment as p,createVNode as v,withCtx as c,renderSlot as _}from"vue";import"../../../../index.js";import b from"../../tooltipMessage.vue.js";import{InjectionFormItemDepsCollector as k,FormItemLineBarDepKeyPrepend as y}from"../../../constants/index.js";import{ChevronDown as h,ChevronUp as g}from"@vicons/ionicons5";import{NCollapseTransition as j}from"naive-ui";import{useFormField as w}from"../../../hooks/useFormField.js";const x={class:"form-render__linebar","anchor-target":""},F={class:"form-render__linebarHeaderTitle"};var H=e({__name:"FormCollapse",props:{show:{type:Boolean,default:!0},title:{type:String,default:""},remark:String,disabled:{type:Boolean,default:!1}},setup(e){const H=e,B=r(H.show);function C(){H.disabled||(B.value=!B.value)}const S=a((()=>["form-render__linebarHeader",{"form-render__linebarHeader--disabled":!!H.disabled}])),{fieldKey:D}=w();return o(k).setDeps(D.value,y+D.value,((e=!0)=>{B.value=e})),(r,a)=>(s(),l("section",x,[t("header",{class:i(n(S)),onClick:C},[t("div",F,[d(m(e.title)+" ",1),e.remark?(s(),f(b,{key:0,message:e.remark},null,8,["message"])):u("v-if",!0)]),e.disabled?u("v-if",!0):(s(),l(p,{key:0},[B.value?(s(),f(n(h),{key:0})):(s(),f(n(g),{key:1}))],64))],2),v(n(j),{class:"form-render__linebarItem",show:B.value},{default:c((()=>[_(r.$slots,"default")])),_:3},8,["show"])]))}});export{H as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as o,openBlock as s,createBlock as r,unref as i,withCtx as t,createVNode as n,createElementVNode as a,createElementBlock as l,Fragment as m,renderList as p,toDisplayString as g}from"vue";import{HelpCircleOutline as f}from"@vicons/ionicons5";import{isString as u}from"lodash-es";import{NTooltip as c}from"naive-ui";const d={style:{display:"inline-flex","flex-direction":"column"}};var v=e({__name:"tooltipMessage",props:{message:String},setup(e){const v=e,x=o((()=>u(v.message)?v.message.split("<br>"):[]));return(e,o)=>(s(),r(i(c),{trigger:"hover"},{trigger:t((()=>[n(i(f))])),default:t((()=>[a("section",d,[(s(!0),l(m,null,p(i(x),(e=>(s(),l("span",{key:e},g(e),1)))),128))])])),_:1}))}});export{v as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as l,watch as a,openBlock as t,createElementBlock as s,createCommentVNode as i,withDirectives as o,createElementVNode as r,normalizeClass as c,createVNode as d,unref as n,withCtx as f,Fragment as y,renderList as p,createBlock as b,createTextVNode as u,toDisplayString as m,vShow as g}from"vue";import{NAnchor as v,NAnchorLink as h}from"naive-ui";import C from"./components/label-classify.vue.js";const w={key:0,class:"label-disable-wrap"},L=[r("p",{class:"label-disable-title"},"无可选标签",-1),r("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],I={style:{height:"100%"}},x={class:"label-wrap"},k=["id"];var N=e({__name:"LabelFormContent",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},isChangeWindow:{type:Boolean,default:!1},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange"],setup(e,{expose:N,emit:S}){const A=e,O=l(),$=l(null),_=()=>{var e;return null==(e=$.value)?void 0:e.querySelector(".right-label-wrap")},F=e=>{e.preventDefault()},W=(e,l,a)=>{let t=O.value||[];if(e)t.push({classifyId:a.classifyId,classifyName:a.classifyName,labelCode:l.labelCode,labelShowText:l.labelShowText,backgroundColor:l.backgroundColor});else{const e=t.findIndex((e=>e.classifyId===a.classifyId&&e.labelCode===l.labelCode));e>-1&&t.splice(e,1)}O.value=t,A.explicit&&S("explicitOnChange",t)};return a((()=>A.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];O.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),N({handleLabelForm:e=>{e([...O.value||[]])}}),(l,a)=>(t(),s("div",{class:"c-iho-label-form-content",ref_key:"labelFormContent",ref:$},[e.categoryList.length?i("v-if",!0):(t(),s("div",w,L)),o(r("div",I,[r("div",x,[r("div",{class:c(["left-label-wrap",{"total-left-label-wrap":e.isChangeWindow}])},[d(n(v),{"offset-target":_,type:"block",onClick:F},{default:f((()=>[(t(!0),s(y,null,p(e.categoryList,(e=>(t(),b(n(h),{key:e.classifyId,href:`#${e.classifyId}-${e.classifyName}`,title:e.classifyName},null,8,["href","title"])))),128))])),_:1})],2),r("div",{class:c(["right-label-wrap",{"total-right-label-wrap":e.isChangeWindow}])},[(t(!0),s(y,null,p(e.categoryList,((e,l)=>(t(),s("div",{key:l,class:"edit-label-content"},[r("div",{class:"edit-label",id:`${e.classifyId}-${e.classifyName}`},[u(m(e.classifyName),1),i(" <span class=\"edit-label-type\">({{ v.multipleChoice == 2 ? '单' : '多' }}选)</span> ")],8,k),d(C,{categoryItem:e,selectedList:O.value,handleLabelChange:W},null,8,["categoryItem","selectedList"])])))),128))],2)])],512),[[g,e.categoryList.length>0]])],512))}});export{N as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as l,reactive as i,watch as a,openBlock as t,createElementBlock as o,Fragment as n,createElementVNode as s,createBlock as d,unref as c,withCtx as r,renderList as p,normalizeStyle as h,createVNode as g,toDisplayString as m,createTextVNode as u,createCommentVNode as x,normalizeClass as b}from"vue";import{NSpace as f,NTag as C,NTooltip as y,NIcon as v,NModal as w}from"naive-ui";import{AddCircleOutline as L}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";const k={class:"c-iho-select-label"},H={key:1,class:"outexplicit"},_=s("span",null,"选择标签",-1),z={class:"svg-wrap"};var S=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},explicit:{type:Boolean,default:!1}},emits:["onChange"],setup(e,{emit:S}){const V=e,A=l(null),F=l(),I=i({labelVisible:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px"}),O=()=>{V.explicit||(I.labelVisible=!0)},N=()=>{V.explicit||(I.modalWidth="763px",I.modalHeight="404px",I.maxHeight="404px",I.isChangeWindow=!1,I.labelVisible=!1)},E=()=>{I.isChangeWindow=!I.isChangeWindow;let e=document.body.clientHeight;I.modalWidth="763px"===I.modalWidth?"100%":"763px",I.modalHeight="404px"===I.modalHeight?e-110+"px":"404px",I.maxHeight="auto"===I.modalHeight?"404px":"none"},J=()=>{var e;null==(e=A.value)||e.handleLabelForm((e=>{S("onChange",[...e]),F.value=e,N()}))},R=()=>{J()};return a((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];F.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),(l,i)=>(t(),o(n,null,[s("div",k,[e.explicit?x("v-if",!0):(t(),d(c(f),{key:0,align:"center"},{default:r((()=>[(t(!0),o(n,null,p(F.value,(e=>{return t(),d(c(C),{bordered:!1,key:`${e.classifyId}-${e.labelCode}`,class:"select-label-active",style:h((l=e,{background:l.backgroundColor,color:"#fff",borderColor:l.backgroundColor})),size:"small",closable:"",onClose:l=>(e=>{const l=F.value||[],i=l.findIndex((l=>l.classifyId==e.classifyId&&l.labelCode==e.labelCode));i>-1&&l.splice(i,1),F.value=l,S("onChange",[...l])})(e)},{default:r((()=>[g(c(y),{placement:"top-start",duration:0},{trigger:r((()=>[s("span",null,m(e.labelShowText),1)])),default:r((()=>[s("span",null,m(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["style","onClose"]);var l})),128)),e.explicit?x("v-if",!0):(t(),o("span",{key:0,class:"form-add-icon form-add-icon-label",onClick:O},[g(c(v),{class:"add-icon",component:c(L)},null,8,["component"]),u(" 新增 ")]))])),_:1})),e.explicit?(t(),o("div",H,[g(W,{ref_key:"labelFormContentRef",ref:A,categoryList:e.categoryList,selectedList:e.selectedList,isChangeWindow:I.isChangeWindow,explicit:e.explicit,onExplicitOnChange:R},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])):x("v-if",!0)]),x(" 弹窗 "),g(c(w),{preset:"dialog",class:b(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":I.isChangeWindow}]),show:I.labelVisible,"onUpdate:show":i[0]||(i[0]=e=>I.labelVisible=e),onPositiveClick:J,onNegativeClick:N,onClose:N,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:h({width:I.modalWidth})},{header:r((()=>[_,s("div",z,[s("i",{onClick:E,class:b(["iconfont-select-label",I.isChangeWindow?"icon-iho-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-iho-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[g(W,{ref_key:"labelFormContentRef",ref:A,categoryList:e.categoryList,selectedList:F.value,isChangeWindow:I.isChangeWindow,explicit:e.explicit,onExplicitOnChange:R},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])),_:1},8,["show","class","style"])],64))}});export{S as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as l,openBlock as a,createElementBlock as t,unref as c,Fragment as d,renderList as o,createBlock as s,normalizeStyle as n,withCtx as r,createVNode as i,createElementVNode as b,toDisplayString as u}from"vue";import{NTag as p,NTooltip as y}from"naive-ui";const f={class:"edit-content"},g={key:0,class:"label-disable-wrap"},h=[b("p",{class:"label-disable-title"},"无可选标签",-1),b("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],k={key:1,class:"label-content"};var m=e({__name:"label-classify",props:{categoryItem:{type:Object,default:()=>({})},selectedList:{type:Array,default:()=>[]},handleLabelChange:{type:Function,default:()=>({})}},setup(e){var m;const v=e,C="rgb(85, 133, 245)";let I=l((null==(m=v.categoryItem)?void 0:m.labelList)||[]);const L=e=>v.selectedList.findIndex((l=>l.classifyId===v.categoryItem.classifyId&&l.labelCode===e.labelCode))>-1;function x(e){return L(e)?{background:e.backgroundColor||C,borderColor:e.backgroundColor||C}:{}}return(l,m)=>(a(),t("div",f,[c(I)&&0!==c(I).length?(a(),t("div",k,[(a(!0),t(d,null,o(c(I),(l=>(a(),s(c(p),{checkable:"",checked:L(l),"onUpdate:checked":a=>((e,l,a)=>{v.handleLabelChange(e,l,a)})(a,l,e.categoryItem),key:l.labelCode,style:n(x(l))},{default:r((()=>[i(c(y),{placement:"top-start",duration:0},{trigger:r((()=>[b("span",null,u(l.labelShowText),1)])),default:r((()=>[b("span",null,u(l.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])):(a(),t("div",g,h))]))}});export{m as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as t,provide as a,ref as o,watch as l,resolveComponent as n,openBlock as s,createElementBlock as r,unref as i,normalizeStyle as u,createBlock as d,resolveDynamicComponent as c,createElementVNode as f,createVNode as m,mergeProps as v,createSlots as p,renderList as b,withCtx as h,createCommentVNode as g,renderSlot as x,normalizeProps as k,guardReactiveProps as y}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as D}from"@vueuse/core";import"date-fns";import{isString as $,isFunction as j,pick as w}from"lodash-es";import{widthAppend as I,uuidGenerator as H}from"../../../shared/utils/index.js";import{promiseTimeout as _}from"@vueuse/shared";import{VxeTableEventNameList as A,InjectionIhoTableEmits as L,InjectionIhoTableAnnotation as T,InjectionIhoTableUUID as R,InjectionIhoTableInstance as E,InjectionIhoTableConfig as F,InjectionIhoTableFieldList as O,InjectionIhoTableHandler as S}from"./constants/index.js";import{createTableHooks as W,applyTableConfigHooks as q,applyTableFieldHooks as z,createTableEventHandlers as B,createDomInsertComponent as G,createDataTransfer as J}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as K}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as M}from"./utils/index.js";const N=["id"];var P=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...A],setup(e,{expose:A,emit:P}){var Q,U;const V=e,X=C({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),Y=t((()=>{var e,t;const a=null!=(t=null==(e=V.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":$(a)&&(a.includes("calc")||a.endsWith("%"))?a:I(a)}})),Z=K(),ee=function(e,...t){P(e,...t);const a=i(le)[M(e)];j(a)&&a(...t),Z.trigger(e,...t)};a(L,ee);const te=W();a(T,t((()=>V.annotation)));const ae=H();a(R,ae);const oe=o();a(E,oe);const le=o({uuid:null!=(U=null==(Q=V.tableConfig)?void 0:Q.uuid)?U:ae});a(F,le);const ne=D(se,10);function se(){le.value=q(te,V.tableConfig,{$table:oe,emits:ee}),le.value.uuid=ae}const re=o([]);a(O,re);const ie=D(ue,10);function ue(){re.value=z(te,V.fieldList,le.value,{$table:oe,emits:ee})}const de=J(te,le,oe),ce=o([]);async function fe(){var e;ce.value=await de(V.tableData),null==(e=oe.value)||e.recalculate(!0)}const me={updateTableDataRef:D(fe,10),updateConfigRef:ne,updateFieldListRef:ie};a(S,me);const ve=B({hooks:te,config:le,$table:oe,context:me,emits:ee}),pe=t((()=>({...le.value,...ve})));let be=!1,he=!1,ge=!1;const xe=D((()=>{be&&se(),he&&ue(),ge&&fe(),be=!1,he=!1,ge=!1}),10);l((()=>V.tableConfig),(()=>{be=!0,he=!0,ge=!0,xe()}),{deep:!0}),l((()=>V.fieldList),(()=>{he=!0,ge=!0,xe()}),{deep:!0}),l([()=>[...V.tableData],()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(()=>{ge=!0,xe()})),l([()=>V.tableData,()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=le.value.treeConfig)?void 0:e.expandAll)&&(await _(11),null==(t=oe.value)||t.setAllTreeExpand(!0))})),se(),ue(),fe();const{header:ke,footer:ye}=G(te);function Ce(e){return w(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return A({$table:oe,async loadData(e){var t;null==(t=oe.value)||t.loadData(await de(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=oe.value)||e.loadColumn([]),null==(t=oe.value)||t.loadData([]),se(),ue(),fe()},...te.exposeHooks.expose.call({},le,{$table:oe,emits:ee})}),te.setupHooks.setup.call(le,re,{$table:oe,emits:ee}),(e,t)=>{const a=n("vxe-grid");return s(),r("section",{class:"iho-table",id:i(ae),style:u(i(X))},[(s(),d(c(i(ke)))),f("section",{style:u(i(Y))},[m(a,v({ref_key:"$table",ref:oe},i(pe),{columns:re.value,data:ce.value}),p({_:2},[b(e.$slots,((t,a)=>({name:a,fn:h((t=>[g(" 实际上所有的vxe-grid插槽都支持 "),x(e.$slots,a,k(y(Ce(t))))]))})))]),1040,["columns","data"])],4),(s(),d(c(i(ye))))],12,N)}}});export{P as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,reactive as a,openBlock as t,createBlock as l,unref as o}from"vue";import n from"../../../../date-picker/index.js";import{subDays as r,subMonths as i}from"date-fns";var d=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){var d,p,u;const m=e,f=a((null==(u=null==(p=null==(d=m.payload)?void 0:d.column)?void 0:p.filters)?void 0:u[0])||{data:void 0}),v=a({"近一周":()=>[r(new Date,7).getTime(),(new Date).getTime()],"近一个月":()=>[i(new Date,1).getTime(),(new Date).getTime()]});function c(e,a){var t;f.value=a,(null==(t=m.payload)?void 0:t.$panel)&&(m.payload.$panel.changeOption(null,!!a,f),m.payload.$panel.confirmFilter(new CustomEvent("click")))}return(e,a)=>(t(),l(o(n),{type:"datetimerange",panel:"",clearable:"","default-time":["00:00:00","23:59:59"],"formatted-value":f.data,"onUpdate:formatted-value":a[0]||(a[0]=e=>f.data=e),shortcuts:v,onConfirm:c},null,8,["formatted-value","shortcuts"]))}});export{d as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as l,inject as a,ref as t,onDeactivated as u,openBlock as n,createElementBlock as o,unref as r,createBlock as i,createCommentVNode as v,createElementVNode as s,createVNode as c,isRef as d,withCtx as p,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as y,createTextVNode as _}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as C,NCheckbox as $,NCheckboxGroup as S,NButtonGroup as x,NButton as L}from"naive-ui";const U={class:"iho-table__filterWrapper"},j={class:"iho-table__filterListItem"},w={class:"iho-table__filterFooter"};var E=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const E=e,F=l((()=>{var e,l,a;return null!=(a=null==(l=null==(e=E.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),I=l({get:()=>F.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(E.payload)return F.value.forEach((l=>{E.payload.$panel.changeOption(null,e.includes(l.value),l)})),E.payload.$panel.confirmFilter(new CustomEvent("click"))}}),O=a("$xetable"),P=t([...I.value]),W=t("");function q(){O&&(O.reactData.filterStore.visible=!1)}u(q);const z=l((()=>{var e,l;if(!E.payload||!E.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=E.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:D,containerProps:H,wrapperProps:R}=g(l((()=>W.value?F.value.filter((e=>`${e.label}`.includes(W.value))):F.value)),{itemHeight:32,overscan:3}),A=l((()=>!!P.value.length&&P.value.length!==F.value.length)),B=l({get:()=>P.value.length===F.value.length&&0!==F.value.length,set:e=>{P.value=e?F.value.map((e=>e.value)):[]}}),G=l((()=>({...H.style,height:b(32*z.value)})));function J(){I.value=P.value,q()}function K(){P.value=[]}return(e,l)=>(n(),o("section",U,[r(F).length>5?(n(),i(r(C),{key:0,value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e)},null,8,["value"])):v("v-if",!0),s("div",j,[c(r($),{label:"全选",checked:r(B),"onUpdate:checked":l[1]||(l[1]=e=>d(B)?B.value=e:null),indeterminate:r(A)},null,8,["checked","indeterminate"])]),c(r(S),{value:P.value,"onUpdate:value":l[3]||(l[3]=e=>P.value=e)},{default:p((()=>[s("section",{ref:r(H).ref,style:f(r(G)),onScroll:l[2]||(l[2]=(...e)=>r(H).onScroll&&r(H).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(r(R).style)},[(n(!0),o(h,null,m(r(D),(e=>(n(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[c(r($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",w,[s("section",null,y(`已选择${P.value.length}项`),1),c(r(x),{size:"small"},{default:p((()=>[c(r(L),{onClick:K},{default:p((()=>[_("清空")])),_:1}),c(r(L),{onClick:q},{default:p((()=>[_("取消")])),_:1}),c(r(L),{type:"primary",onClick:J},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{E as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as t,ref as r,computed as i,openBlock as a,createBlock as o,unref as s,mergeProps as n,isRef as u}from"vue";import{generateTimeFormat as l}from"../../../../../../../shared/utils/index.js";import{isFunction as m}from"lodash-es";import{useIhoTableFormEvent as d}from"../../../../utils/index.js";import p from"../../../../../../date-picker/index.js";var c=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:c}){const f=e,w=t(),{emitFormChangeWithParams:D}=d(f),v=r(),y=i({get:()=>f.value,set(e){const t=f.value;t!==e&&(c("update:value",e),D({oldValue:t}))}}),b=i((()=>{const e=w.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:l(e)}}})),{isStartDate:g=!1,isEndDate:h=!1}=w,T=w.connectField||"",$=(e,t)=>g&&T?e>t:!(!h||!T)&&e<t,j=e=>{const t=new Date(f.row[T]),r=new Date(e),{h:i,m:a,s:o}=H(t),s=(e,t,r,i)=>!(h&&r>i)&&(!(g&&r<i)&&$(e,t));return{isHourDisabled:t=>{if(!f.row[T])return!1;const a=new Date(`${f.row[T].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:n}=H(r);return s(t,i,e-60*t*60*1e3-60*o*1e3-1e3*n,a)},isMinuteDisabled:t=>{if(!f.row[T])return!1;const o=new Date(`${f.row[T].split(" ")[0]} ${i}:00:00`).getTime(),{s:n}=H(r);return s(t,a,e-60*t*1e3-1e3*n,o)},isSecondDisabled:t=>{if(!f.row[T])return!1;const r=new Date(`${f.row[T].split(" ")[0]} ${i}:${a}:00`).getTime();return s(t,o,e-1e3*t,r)}}},x={type:w.type||"datetime",clearable:!0,placeholder:w.placeholder||"请选择",...w,...b.value,isDateDisabled:F(w.isDateDisabled)||(e=>!!f.row[T]&&$(e,h?new Date(`${f.row[T].split(" ")[0]} 00:00:00`).getTime():new Date(f.row[T]).getTime()))};function F(e){return m(e)?t=>e(t,f.row):null}function H(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return x.type.includes("time")&&(x.isTimeDisabled=F(w.isTimeDisabled)||j),(e,t)=>(a(),o(s(p),n({ref_key:"formRef",ref:v},s(x),{"formatted-value":s(y),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(y)?y.value=e:null)}),null,16,["formatted-value"]))}});export{c as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as a,ref as t,watch as o,computed as u,onDeactivated as l,openBlock as r,createBlock as n,unref as i,withCtx as s,createElementVNode as p,withModifiers as d,normalizeStyle as v,toDisplayString as c,renderSlot as m,createVNode as f}from"vue";import{cloneDeep as h,isObject as w,isArray as y}from"lodash-es";import{NPopover as g,NInput as b}from"naive-ui";import{InjectionIhoTableHandler as x}from"../../../../constants/index.js";import{useIhoTableFormEvent as k}from"../../../../utils/index.js";const _=["onClick"];var C=e({__name:"editSeparate",props:{value:{},height:{type:Number,default:48},column:{type:Object,required:!0},row:{type:Object,required:!0},displayContent:{type:String,default:""},rowIndex:{type:Number,required:!0}},emits:["update:value","click"],setup(e,{emit:C}){const j=e,U=a(x),q=t(),P=t();function S(e){P.value=e}const T=t(!1);function I(e){T.value=e}function N(e){T.value=!T.value,C("click",e)}o(T,(function(e){e?async function(){var e;P.value=h(j.value),await new Promise((e=>setTimeout(e))),null==(e=q.value)||e.syncPosition()}():R()}));const{emitFormChangeWithParams:O}=k(j);async function R(){if(!w(P.value)&&!y(P.value)&&j.value===P.value)return;const e=j.value;C("update:value",P.value),O({oldValue:e}),U.updateTableDataRef()}const z=u((()=>({border:"1px solid #f5f5f5",height:j.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return l(R),(a,t)=>(r(),n(i(g),{ref_key:"popoverRef",ref:q,trigger:"manual",show:T.value,"onUpdate:show":t[1]||(t[1]=e=>T.value=e),"show-arrow":!1},{trigger:s((()=>[p("div",{onClick:d(N,["stop"]),style:v(i(z)),class:"iho-table__separateText"},c(e.displayContent||" "),13,_)])),default:s((()=>[m(a.$slots,"menu",{value:P.value,"onUpdate:value":S,"onUpdate:show":I,col:e.column,row:e.row},(()=>[f(i(b),{value:P.value,"onUpdate:value":t[0]||(t[0]=e=>P.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}});export{C as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as l,ref as t,watch as a,nextTick as r,openBlock as o,createBlock as u,unref as i,mergeProps as n,withCtx as m,createVNode as c,createElementBlock as d,Fragment as v,renderList as f,createTextVNode as s,toDisplayString as p,createCommentVNode as k}from"vue";import{NPopover as y,NInput as _,NSpace as h,NScrollbar as w,NButton as b}from"naive-ui";import{useIhoTableFormEvent as g}from"../../../../utils/index.js";import V from"../../../../../../time-picker/index.js";import{parse as C,isValid as F,format as q}from"date-fns";var j=e({__name:"editTime",props:{formattedValue:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:j}){const x=e,I=l(),{emitFormChangeWithParams:O}=g(x),P=t(null),R=t(!1),S=t(),$=t(),A=t();let E=x.formattedValue;const{placeholder:H="请选择",valueFormat:U="HH:mm",shortcutOptions:z=[]}=I,D={placeholder:H,valueFormat:U,format:U};function K(e){A.value=e,E!==e&&(j("update:formattedValue",e),O({oldValue:E}),E=e)}function N(){[D.valueFormat.replace(/:/,""),D.valueFormat].some((e=>{const l=C(($.value||"").trim(),e,new Date);if(F(l)){return K(q(l,D.valueFormat)),!0}}))}function T(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return a((()=>x.formattedValue),(e=>{$.value=e,A.value=e}),{immediate:!0}),a((()=>R.value),(async e=>{var l,t,a,o,u;e&&(await r(),null==(u=null==(o=null==(a=null==(t=null==(l=S.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:o.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(e,l)=>(o(),u(i(y),n({show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},e.$attrs,{onClickoutside:l[3]||(l[3]=()=>R.value=!1)}),{trigger:m((()=>[c(i(_),{ref_key:"formRef",ref:P,clearable:"",value:$.value,"onUpdate:value":l[0]||(l[0]=e=>$.value=e),onClick:l[1]||(l[1]=()=>R.value=!0),onChange:N,onKeydown:T},null,8,["value"])])),default:m((()=>[c(i(h),null,{default:m((()=>[c(i(V),n({ref_key:"timePickerRef",ref:S,show:"","formatted-value":A.value},i(D),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":K,onConfirm:l[2]||(l[2]=()=>R.value=!1)}),null,16,["formatted-value"]),c(i(w),{class:"iho-table__scrollbar"},{default:m((()=>[i(z).length?(o(),u(i(h),{key:0,vertical:"",wrap:!1},{default:m((()=>[(o(!0),d(v,null,f(i(z),(e=>(o(),u(i(b),{size:"tiny",key:e,onClick:l=>function(e){K(e),R.value=!1}(e)},{default:m((()=>[s(p(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}});export{j as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,provide as t,ref as n,computed as o,openBlock as i,createElementBlock as a,normalizeClass as s,normalizeStyle as r,unref as c,createElementVNode as p,createCommentVNode as f,renderSlot as l,createVNode as d,withCtx as u,mergeProps as m,Fragment as h,renderList as g,createBlock as v,resolveDynamicComponent as y,h as b,nextTick as I}from"vue";import{isString as _}from"lodash-es";import $ from"./components/infoDescription/index.vue.js";import x from"./components/patientInfo/index.vue.js";import{InjectionInfoHeaderEmit as S,InjectionInfoHeaderFormRef as j}from"./constants/index.js";const z={class:"c-info-header__operation"},w={key:0,class:"c-info-header__divider"},k={class:"c-info-header__setting"},C=["onClick"];var H=e({__name:"InfoHeader",props:{compact:{type:Boolean,required:!0},patientInfo:{type:Object,default:()=>({})},patientEditable:{type:Boolean},separator:{type:String,default:":"},infoList:{type:Array,default:()=>[]},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:38},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]},formProps:{type:Object}},emits:["openPatientInfo","fieldSet","update:compact","formChange"],setup(e,{expose:H,emit:P}){const A=e;t(S,P);const B=n();function D(){var e;return null==(e=B.value)?void 0:e.updateColumn()}const E=o((()=>({"--row-height":A.rowHeight,"--row-num":A.compact?1:2,"--padding-tb":A.compact?9:4}))),F={patientInfo:{event:function(){P("openPatientInfo")},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){P("fieldSet")},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){P("update:compact",!A.compact),await I(),await D()},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},N=o((()=>A.settingIcons.map((e=>(_(e)?F[e]:e)||{})))),O=n();return t(j,O),H({update:D,$formRender:O}),(t,n)=>(i(),a("div",{class:s(["c-info-header",{"is-compact":e.compact}]),style:r(c(E))},[p("section",z,[f(" 操作区插槽 "),l(t.$slots,"operation")]),t.$slots.operation?(i(),a("div",w)):f("v-if",!0),f(" 患者信息区插槽,需要自己实现整个患者信息区时使用 "),l(t.$slots,"patientModule",{},(()=>[d(c(x),{"patient-info":e.patientInfo,"patient-editable":e.patientEditable},{avatarInfo:u((()=>[f(" 头像区补充内容插槽 (会插入头像下方) "),l(t.$slots,"avatarInfo")])),avatar:u((()=>[f(" 头像插槽 "),l(t.$slots,"avatar")])),tags:u((()=>[f(" 标签插槽 "),l(t.$slots,"tags")])),_:3},8,["patient-info","patient-editable"])])),d(c($),m({ref_key:"infoDescriptionRef",ref:B,"root-slot":t.$slots},t.$props),{info:u((()=>[f(" 信息描述区插槽 "),l(t.$slots,"info")])),_:3},16,["root-slot"]),p("section",k,[f(" 设置区插槽 "),l(t.$slots,"setting",{},(()=>[(i(!0),a(h,null,g(c(N),(e=>(i(),a("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(i(),v(y(e.render)))],8,C)))),128))]))])],6))}});export{H as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as t,computed as o,watch as n,openBlock as l,createElementBlock as i,createBlock as r,unref as m,normalizeStyle as s,Fragment as d,withDirectives as f,createElementVNode as a,vShow as c,createCommentVNode as u}from"vue";import{isField as p}from"@formily/core";import{useForm as v}from"@formily/vue";import{isFunction as y}from"lodash-es";import{pauseTracking as I,enableTracking as h}from"@vue/reactivity";import"../../../../form-render/index.js";import{InjectionSchemaField as F,InjectionBusinessCollector as w}from"../../../../form-render/src/constants/index.js";import{InjectionInfoHeaderFormRef as b}from"../../constants/index.js";import k from"./HiddenContent.vue.js";import P from"./InfoEllipsis.vue.js";import x from"../../../../../shared/components/SlotRender/SlotRender.js";import{useFieldListAdaptor as j}from"../../../../form-render/src/hooks/useFieldListAdaptor.js";import{createObjSchema as g}from"../../../../form-render/src/utils/schema.js";const S={key:0};var W=e({__name:"DescriptionItem",props:{infoItem:{default:()=>({})},labelField:{default:"label"},valueField:{default:"value"},width:null,rootSlot:null},setup(e){const W=e,_=t(F,{render:()=>null}),B=t(b);async function E(e){var t,o,n;if(!e.formField||e.edit)return;e.edit=!0;const l=await(null==(t=B.value)?void 0:t.queryWidget(e[W.labelField]));l&&(null==(o=l.widgetElement)||o.focus(),null==(n=l.widgetElement)||n.click())}const q=t(w,void 0),{schemaAdaptor:A}=j(q),C=v(),D=o((()=>{var e,t,o;const n=W.infoItem.formField;if(!n)return{};const l=W.infoItem[W.labelField],i={...n,html_type:null!=(e=n.html_type)?e:"INPUT",val_key:l,decoratorProps:{showLabel:!1,...n.decoratorProps,style:{marginBottom:"-12px"}},componentProps:{size:"tiny",clearable:!0,...n.componentProps,style:{fontWeight:(null==(t=W.infoItem)?void 0:t.bold)?700:500,...null==(o=n.componentProps)?void 0:o.style},async onBlur(e){var t;if(C&&C.value)try{const o=C.value.query(l).take();await(o&&p(o)&&o.validate()),W.infoItem.edit=!1,y(null==(t=n.componentProps)?void 0:t.onBlur)&&n.componentProps.onBlur(e)}catch(e){}}}};I(),i.default_val=W.infoItem[W.valueField],h();const r=A([i]);return g(r)}));n((()=>W.width),(e=>{var t;e&&W.infoItem.formField&&(null==(t=B.value)||t.setFieldState(W.infoItem[W.labelField],(t=>{t.componentProps&&(t.componentProps.style={...t.componentProps.style,maxWidth:e+"px"})})))}));const L=o((()=>({fontWeight:W.infoItem.bold?700:500,...W.infoItem.contentStyle}))),R=o((()=>{const{bold:e,contentStyle:t}=W.infoItem,o=W.width+"px";return{width:o,maxWidth:o,fontWeight:e?700:500,...t}})),z=o((()=>["电话","身份证"].some((e=>{var t,o;return null==(o=null==(t=W.infoItem[W.labelField])?void 0:t.includes)?void 0:o.call(t,e)}))));return(t,o)=>(l(),i("section",{onDblclick:o[0]||(o[0]=t=>E(e.infoItem)),onClick:o[1]||(o[1]=t=>async function(e){e.formField&&!e[W.valueField]&&0!==e[W.valueField]&&E(e)}(e.infoItem))},[e.infoItem.slot?(l(),r(m(x),{key:0,renderer:e.infoItem.slot,"root-slots":e.rootSlot,item:e.infoItem,style:s(m(L)),width:e.width},null,8,["renderer","root-slots","item","style","width"])):(l(),i(d,{key:1},[f(a("section",null,[m(z)?(l(),r(k,{key:0,content:e.infoItem[e.valueField],tip:e.infoItem.tip,"content-style":m(L),width:e.width},null,8,["content","tip","content-style","width"])):(l(),r(P,{key:1,"content-style":m(R),content:e.infoItem[e.valueField],tip:e.infoItem.tip},null,8,["content-style","content","tip"]))],512),[[c,!e.infoItem.edit||!e.infoItem.formField]]),e.infoItem.formField?f((l(),i("section",S,[(l(),r(m(_),{schema:m(D),key:e.infoItem[e.labelField]},null,8,["schema"]))],512)),[[c,e.infoItem.edit]]):u("v-if",!0)],64))],32))}});export{W as default};
@@ -1 +0,0 @@
1
- import{defineComponent as l,openBlock as e,createBlock as t,unref as i,withCtx as o,createElementBlock as a,Fragment as n,renderList as u}from"vue";import{NDescriptions as d,NDescriptionsItem as r}from"naive-ui";import f from"./DescriptionItem.vue.js";var s=l({__name:"DescriptionList",props:{infoList:{default:()=>[]},labelField:{default:"label"},valueField:{default:"value"},rootSlot:null,descriptionWidthList:{default:()=>[]},columnNum:{default:3},inForm:{type:Boolean}},setup(l){const s={height:"100%",display:"inline-flex","align-items":"center"};return(m,p)=>(e(),t(i(d),{"label-align":"right","label-placement":"left",separator:":",column:l.columnNum,"label-style":s,"content-style":s},{default:o((()=>[(e(!0),a(n,null,u(l.infoList,((a,n)=>(e(),t(i(r),{key:a[l.labelField],label:a[l.labelField]},{default:o((()=>[(e(),t(f,{key:a[l.labelField],"info-item":a,width:l.descriptionWidthList[n],"root-slot":l.rootSlot,"label-field":l.labelField,"value-field":l.valueField},null,8,["info-item","width","root-slot","label-field","value-field"]))])),_:2},1032,["label"])))),128))])),_:1},8,["column"]))}});export{s as default};
@@ -1 +0,0 @@
1
- import{defineComponent as t,ref as n,computed as e,openBlock as i,createElementBlock as o,normalizeStyle as r,unref as l,createElementVNode as a,createVNode as c,normalizeClass as s}from"vue";import u from"./InfoEllipsis.vue.js";const d={class:"c-info-header__hidden--content"};var f=t({__name:"HiddenContent",props:{content:{type:String,default:""},tip:String,width:{type:Number},contentStyle:{type:Object,default:()=>({})}},setup(t){const f=t,h=n(!0);function p(){h.value=!h.value}const v=e((()=>{const t=f.width+"px";return{maxWidth:t,width:t}})),y=e((()=>{if(!f.width)return{};const t=f.width-40+"px";return Object.assign({},f.contentStyle,{maxWidth:t})})),g=e((()=>{let{content:t}=f;if(!h.value)return t;if(null==t)return"-";t+="";const n=t.length;if(!n||1===n)return t;const e=Math.floor(n/2),i=Math.floor((n-e)/2);return`${t.substring(0,i)}${"*".repeat(e)}${null==t?void 0:t.substring(i+e)}`}));return(n,e)=>(i(),o("div",{class:"c-info-header__hidden",style:r(l(v))},[a("div",d,[c(u,{"content-style":l(y),content:l(g),tip:t.tip},null,8,["content-style","content","tip"])]),a("i",{onClick:p,class:s(["c-info-header__hidden--icon","info-header--iconfont","info-header--icon-"+(h.value?"guanbi-yanjing":"faxian-yanjing")])},null,2)],4))}});export{f as default};
@@ -1 +0,0 @@
1
- import{defineComponent as t,openBlock as e,createBlock as o,unref as i,withCtx as l,createElementVNode as p,createVNode as n,normalizeStyle as a,createTextVNode as r,toDisplayString as s}from"vue";import{NTooltip as d,NEllipsis as u}from"naive-ui";var f=t({__name:"InfoEllipsis",props:{content:{type:String,default:""},tip:{type:String},contentStyle:{type:Object,default:()=>({})}},setup:t=>(f,c)=>(e(),o(i(d),{disabled:!t.tip},{trigger:l((()=>[p("section",null,[n(i(u),{style:a(t.contentStyle),tooltip:{placement:t.tip?"bottom":"top"}},{default:l((()=>[r(s(t.content||"-"),1)])),_:1},8,["style","tooltip"])])])),default:l((()=>[r(" "+s(t.tip),1)])),_:1},8,["disabled"]))});export{f as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as i,computed as o,ref as l,nextTick as n,onMounted as t,watch as r,onBeforeUnmount as a,onDeactivated as s,onActivated as u,openBlock as f,createElementBlock as d,normalizeStyle as m,createVNode as c,unref as p,withCtx as v,createCommentVNode as h,renderSlot as _,createElementVNode as y,createBlock as w,mergeProps as F}from"vue";import{useThrottleFn as L,useEventListener as b}from"@vueuse/core";import{isArray as C}from"lodash-es";import{NScrollbar as W,NConfigProvider as k}from"naive-ui";import x from"./DescriptionList.vue.js";import{InjectionInfoHeaderEmit as j,InjectionInfoHeaderFormRef as R}from"../../constants/index.js";import{useThemeOverrides as g}from"../../hooks/useThemeOverrides.js";import $ from"../../../../form-render/index.js";var A=e({__name:"index",props:{infoList:{default:()=>[]},labelField:{default:"label"},valueField:{default:"value"},minColumnWidth:{default:180},rootSlot:null,formProps:{default:()=>({})}},setup(e,{expose:A}){const I=e,{themeOverrides:M}=g(),O=i(j),P=o((()=>C(I.infoList)&&I.infoList.some((e=>e.formField)))),S=o((()=>C(I.infoList)?I.infoList.reduce(((e,i)=>(i.formField&&(e[i[I.labelField]]=i[I.valueField]),e)),{}):{}));function q(e){var i;const{fieldKey:o,value:l}=e,n=null==(i=I.infoList)?void 0:i.find((e=>e[I.labelField]===o));n&&(n[I.valueField]=l,O&&O("formChange",e))}const z=i(R),D=l(3),K=l(),T=l(0),B=l([]),E=L((async function(){await n();const e=K.value;if(!e)return;const{clientWidth:i}=e;D.value=Math.floor(i/+I.minColumnWidth),T.value=Math.floor(i/D.value),await n();const o=e.querySelectorAll(".n-descriptions-table-content__label");o&&(B.value=Array.from(o).map((e=>T.value-e.clientWidth-8)))}),200,!0,!1);let G;function H(){clearInterval(G)}function J(){H(),G=setInterval(E,700)}return t(E),r([()=>I.minColumnWidth,()=>I.infoList],E,{flush:"post",deep:!0}),b(window,"resize",E),a(H),s(H),u(J),t(J),A({updateColumn:E}),(i,o)=>(f(),d("section",{class:"c-info-header__info",ref_key:"infoRef",ref:K,style:m({"--column-width":T.value})},[c(p(W),{class:"c-info-header__infoWrapper"},{default:v((()=>[h(" 描述信息区插槽 "),_(i.$slots,"info",{},(()=>[y("section",null,[p(P)?(f(),w(p($),F({key:1},e.formProps,{onFormChange:q,"initial-data":p(S),ref_key:"formRenderRef",ref:z,class:"c-info-header__formRender"}),{default:v((()=>[c(p(k),{"theme-overrides":p(M),style:m({"grid-column":"span min(var(--column), 999) / span min(var(--column), 999)"})},{default:v((()=>[c(x,F(i.$props,{"description-width-list":B.value,"column-num":D.value,"in-form":""}),null,16,["description-width-list","column-num"])])),_:1},8,["theme-overrides","style"])])),_:1},16,["initial-data"])):(f(),w(x,F({key:0},i.$props,{"description-width-list":B.value,"column-num":D.value}),null,16,["description-width-list","column-num"]))])]))])),_:3})],4))}});export{A as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as t,ref as a,watch as n,nextTick as i,openBlock as l,createElementBlock as o,renderSlot as r,createVNode as s,unref as p,withCtx as f,mergeProps as d,createElementVNode as u,normalizeClass as c,createBlock as v,resolveDynamicComponent as m,createCommentVNode as _,createTextVNode as g,Fragment as x,renderList as y,toDisplayString as I,h}from"vue";import{isArray as w,isString as b,isNumber as k,isFunction as P,isObject as E,pick as U}from"lodash-es";import{NPopover as C,NImage as L,NDivider as H,NSpace as z,NButton as T,NTag as j,NEllipsis as F}from"naive-ui";import N from"../../../../form-render/index.js";const R={class:"c-info-header__patient"},$={class:"c-info-header__patientHeader"},B={key:0,class:"c-info-header__patientHeader--name"},S={key:1,class:"c-info-header__patientHeader--sex"},V={key:2,class:"c-info-header__patientHeader--age"};var D=e({__name:"index",props:{patientInfo:{default:()=>({})},patientEditable:{type:Boolean}},setup(e){const D=e,M=t((()=>D.patientInfo&&w(D.patientInfo.tagList)?D.patientInfo.tagList.filter((e=>e.render||b(e.content)&&e.content)):[])),O={warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"},W={warning:"#fff",info:"#2563F4"};function q({type:e="warning"}){return{color:O[e],textColor:W[e]}}function A(e){return()=>b(e)||k(e)?e:P(e)?e():E(e)?h(e):null}const G=a(!1),J=t((()=>D.patientEditable?[{val_key:"name",is_null:"0",is_empty:"0",alias:"姓名",html_type:"INPUT",...D.patientInfo.nameProps},{val_key:"sex",alias:"性别",html_type:"SELECT",is_null:"0",option:[{text:"未知",value:"未知"},{text:"男",value:"男"},{text:"女",value:"女"}],...D.patientInfo.sexProps},{val_key:"age",alias:"年龄",html_type:"INPUT_NUMBER",is_null:"0",is_empty:"0",decoratorProps:{style:{flex:2}},...D.patientInfo.ageProps,suffixConfig:{alias:"年龄单位",is_null:"0",val_key:"ageUnit",html_type:"SELECT",decoratorProps:{style:{flex:1}},option:[{value:"天",text:"天"},{value:"月",text:"月"},{value:"岁",text:"岁"},{value:"小时",text:"小时"},{value:"分",text:"分"},{value:"周",text:"周"}],...D.patientInfo.ageUnitProps}}]:[])),K=a();async function Q(){K.value&&(await K.value.validate(),Object.assign(D.patientInfo,U(K.value.getFormValues(),["name","sex","age","ageUnit"])),G.value=!1)}return n(G,(async e=>{await i(),e&&K.value&&K.value.setFormValues(D.patientInfo||{})})),(t,a)=>(l(),o("section",R,[r(t.$slots,"avatar",{},(()=>[s(p(C),null,{trigger:f((()=>[s(p(L),d({style:{"border-radius":"50%"},width:40,height:40,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:f((()=>[s(p(L),d({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),u("section",null,[u("header",$,[s(p(C),{disabled:!e.patientEditable,trigger:"manual",placement:"bottom",show:G.value},{trigger:f((()=>{var t;return[u("section",{class:c(["c-info-header__patientHeaderWrapper",{"in-edit":G.value}]),onDblclick:a[0]||(a[0]=t=>e.patientEditable&&(G.value=!0))},[e.patientInfo.name?(l(),o("div",B,[(l(),v(m(A(e.patientInfo.name))))])):_("v-if",!0),e.patientInfo.sex?(l(),o("div",S,[g(" / "),(l(),v(m(A(e.patientInfo.sex))))])):_("v-if",!0),null!=e.patientInfo.age?(l(),o("div",V,[g(" / "),(l(),v(m(A(e.patientInfo.age)))),(l(),v(m(A(null!=(t=e.patientInfo.ageUnit)?t:"岁"))))])):_("v-if",!0)],34)]})),default:f((()=>[s(p(N),{column:"6",size:"small","label-placement":"left",style:{width:"200px",margin:"4px 0 -8px 0"},"field-list":p(J),ref_key:"formRenderRef",ref:K},null,8,["field-list"]),s(p(H),{style:{margin:"8px -14px",width:"calc(100% + 28px)"}}),s(p(z),{justify:"end"},{default:f((()=>[s(p(T),{size:"small",onClick:a[1]||(a[1]=e=>G.value=!1)},{default:f((()=>[g("取消")])),_:1}),s(p(T),{size:"small",type:"info",onClick:Q},{default:f((()=>[g("确认")])),_:1})])),_:1})])),_:1},8,["disabled","show"]),r(t.$slots,"tags",{tagList:p(M)},(()=>[(l(!0),o(x,null,y(e.patientInfo.tagList||[],(e=>(l(),v(p(j),d({key:e.content,size:"medium",bordered:!1,color:q(e)},e),{default:f((()=>[e.render?(l(),v(m(e.render),{key:0})):(l(),v(p(F),{key:1,style:{"max-width":"96px"}},{default:f((()=>[g(I(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),r(t.$slots,"avatarInfo")])]))}});export{D as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as l,provide as t,computed as o,unref as n,openBlock as a,createBlock as u,normalizeStyle as i,withCtx as s,createVNode as r,mergeProps as d,createElementBlock as c,normalizeClass as f,createElementVNode as p,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as g,toDisplayString as h}from"vue";import{NPopover as k,NInputNumber as w,NSpace as V,NIcon as b}from"naive-ui";import{Close as x,GitCompareOutline as O,ArrowUndoSharp as S}from"@vicons/ionicons5";import C from"./components/NumberPanel.vue.js";import{useDraggable as _}from"@vueuse/core";import{useTheme as j}from"../../../shared/hooks/useTheme.js";import"date-fns";import"lodash-es";import{defaultCssVars as I}from"./constants/index.js";const D=p("span",null,"键盘",-1),N={class:"keys"},K=["onClick"];var R=e({__name:"Keyboard",props:{mode:{type:String,default:"english"},drag:{type:Boolean,default:!1},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},defaultValue:{type:Number},value:{type:Number},panel:{type:Boolean,default:!0},moveOffset:{type:Object,default:()=>({x:0,y:0})}},emits:["change","keydown"],setup(e,{expose:R,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],J=E.split("").concat(F),M=E.split(".")[0].split("").sort().concat(["."],F),P=j(I,"Keyboard");let Q=l(Date.now());t("toSelectInputContent",Q);const T=o((()=>"english"===B.mode)),$=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),A=o((()=>`${JSON.stringify(P.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),G=l(J.slice()),H=l(null),L=l(null),W=l(null),X=l(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(T.value&&B.drag){const{x:e,y:l,style:t}=_(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,l)=>{var t,o,n,a;e.x+=null!=(o=null==(t=B.moveOffset)?void 0:t.x)?o:0,e.y+=null!=(a=null==(n=B.moveOffset)?void 0:n.y)?a:0}});return t}}();function Z(e){"Switch"!==e?U("keydown",e):G.value="Q"===G.value[0]?M.slice():J.slice()}function q(e){var l,t;null==(t=null==(l=H.value)?void 0:l.setShow)||t.call(l,!1),X.value=e,U("change",e)}return R({select:function(){Q.value=Date.now()}}),(l,t)=>n(T)||e.panel?!n(T)&&e.panel?(a(),u(C,d({key:1},n($),{style:n(P)}),null,16,["style"])):(a(),c("div",{key:2,class:f(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:i(n(A))},[r(n(V),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:i({cursor:e.drag?"move":"default"})},{default:s((()=>[D,r(n(b),{onClick:t[1]||(t[1]=e=>Z("close")),component:n(x)},null,8,["component"])])),_:1},8,["style"]),p("div",N,[(a(!0),c(m,null,v(G.value,((e,l)=>(a(),c("span",{key:e,class:f(["key"+l]),onClick:l=>Z(e)},["Switch"===e?(a(),u(n(b),{key:0,component:n(O)},null,8,["component"])):y("v-if",!0),"Undo"===e?(a(),u(n(b),{key:1,component:n(S)},null,8,["component"])):y("v-if",!0),g(" "+h(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,K)))),128))])],6)):(a(),u(n(k),{key:0,ref_key:"popoverRef",ref:H,trigger:"click","show-arrow":!1,placement:"bottom-start",style:i([{padding:"0"},n(P)]),"display-directive":"show"},{trigger:s((()=>[r(n(w),{value:X.value,"onUpdate:value":t[0]||(t[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:s((()=>[r(C,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}});export{R as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as t,inject as u,watch as l,openBlock as n,createBlock as o,unref as a,withCtx as s,createVNode as i}from"vue";import{NInput as r,NSpace as c,NIcon as p}from"naive-ui";import{CaretUp as d,CaretDown as m}from"@vicons/ionicons5";import{getNumber as f}from"../utils/index.js";var v=e({__name:"InputNumber",props:{modelValue:{type:String,default:""},integer:{type:Boolean,default:!1},status:{type:String,default:"success"}},emits:["update:modelValue","update:status"],setup(e,{expose:v,emit:g}){const y=e,V=t(null),_=u("toSelectInputContent");function x(e){const t="string"==typeof e?e:e.join("");g("update:modelValue",t),g("update:status",t?"success":"error")}function S(e){return y.integer?/(^[1-9]\d*$)/.test(e)||!e:/^\d*\.?\d*$/.test(e)||!e}function b(e){const t=f(y.modelValue);let u="+"===e?t+1:t-1;(u<=0||isNaN(u))&&(u=1),g("update:modelValue",u.toString()),g("update:status","success")}return l((()=>_.value),(e=>{var t,u;!y.integer&&(null==(u=null==(t=V.value)?void 0:t.select)||u.call(t))})),v({$childrenRefs:V}),(t,u)=>(n(),o(a(r),{ref_key:"inputRef",ref:V,value:e.modelValue,"onUpdate:value":x,"allow-input":S,placeholder:"",status:e.status,clearable:!e.integer},{suffix:s((()=>[i(a(c),{justify:"center",vertical:""},{default:s((()=>[i(a(p),{size:"13",component:a(d),onClick:u[0]||(u[0]=e=>b("+"))},null,8,["component"]),i(a(p),{size:"13",component:a(m),onClick:u[1]||(u[1]=e=>b("-"))},null,8,["component"])])),_:1})])),_:1},8,["value","status","clearable"]))}});export{v as default};
@@ -1 +0,0 @@
1
- import{defineComponent,computed,ref,watch,openBlock,createElementBlock,normalizeClass,normalizeStyle,unref,createElementVNode,createVNode,withCtx,Fragment,renderList,toDisplayString,createBlock,createCommentVNode,nextTick}from"vue";import{NSpace,NIcon}from"naive-ui";import{ArrowUndoSharp}from"@vicons/ionicons5";import InputNumber from"./InputNumber.vue.js";import{useDraggable}from"@vueuse/core";import{getNumber}from"../utils/index.js";const _hoisted_1={class:"keys"},_hoisted_2=["onClick"],_hoisted_3=["onClick"],_hoisted_4={class:"btns"},_hoisted_5=["onClick"],_hoisted_6={class:"inputs"},_hoisted_7={class:"inputs-right"},_hoisted_8=createElementVNode("hr",null,null,-1);var _sfc_main=defineComponent({__name:"NumberPanel",props:{defaultValue:{type:Number},value:{type:Number},mode:{type:String},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},moveOffset:{type:Object,default:()=>({x:0,y:0})},drag:{type:Boolean,default:!1}},emits:["change"],setup(__props,{emit:emit}){const props=__props,NUMBERKEYS="1234567890.",DAYS=[3,7,14,30],DOSENUMBERKEYS="123/456*789-0.+",CALCULATIONSYMBOLS=["+","-","*","/"],isNumber=computed((()=>"number"===props.mode)),isDay=computed((()=>"day"===props.mode&&!isNumber.value)),isDose=computed((()=>"dose"===props.mode&&!isNumber.value)),numberKeys=computed((()=>(isDose.value?DOSENUMBERKEYS:NUMBERKEYS).split(""))),days=ref(DAYS),doses=ref([2,3,4,5,6,7,8]),inputValue=ref(""),integerValue=ref(),numeratorValue=ref(),denominatorValue=ref(),inputValueStatus=ref("success"),numeratorValueStatus=ref("success"),denominatorValueStatus=ref("success"),keyboardRef=ref(null),inputRef=ref(null),style=init();function init(){if(props.defaultValue&&(inputValue.value=props.defaultValue.toString()),props.drag){const{x:e,y:t,style:a}=useDraggable(keyboardRef,{initialValue:props.positionInitialValue,onMove:(e,t)=>{var a,u,n,l;e.x+=null!=(u=null==(a=props.moveOffset)?void 0:a.x)?u:0,e.y+=null!=(l=null==(n=props.moveOffset)?void 0:n.y)?l:0}});return a}}async function setFocus(){var e,t,a;const u=null==(a=null==(t=null==(e=inputRef.value)?void 0:e.$childrenRefs)?void 0:t.$refs)?void 0:a.inputElRef;await nextTick(),u.focus()}function keydown(key){switch(key){case"Undo":updateValue(key);break;case"Enter":if(!validator())return void(inputValueStatus.value="error");emit("change",eval(inputValue.value)),setFocus();break;default:"number"==typeof key?(inputValue.value=key.toString(),setInputValueStatus(),setFocus()):updateValue(key)}}function onKeydown(e){["Enter"].includes(e.key)&&keydown("Enter")}async function updateValue(e){var t,a,u;const n=null==(u=null==(a=null==(t=inputRef.value)?void 0:t.$childrenRefs)?void 0:a.$refs)?void 0:u.inputElRef,{selectionStart:l,selectionEnd:o}=n,r=inputValue.value.split("");if("Undo"===e){const e=l===o?1:o-l,t=l===o?l-1:l;inputValue.value&&t>-1&&r.splice(t,e)}else r.splice(l,o-l,e);inputValue.value=r.join(""),await nextTick(),n.focus();const s="Undo"===e?l?o>l?l:l-1:0:l+1;n.setSelectionRange(s,s),setInputValueStatus()}function validator(){if(!inputValue.value)return!1;if(CALCULATIONSYMBOLS.slice(2).includes(inputValue.value[0]))return!1;if(CALCULATIONSYMBOLS.includes(inputValue.value[inputValue.value.length-1]))return!1;const e=[];let t=[];const a=inputValue.value.split("");a.forEach(((u,n)=>{CALCULATIONSYMBOLS.includes(u)?(e.push(t.join("")),t=[]):(t.push(u),n===a.length-1&&e.push(t.join("")))}));return!!e.every(((e,t)=>0===t&&!e||/^\d*(.\d+)?$/.test(e)))}function updateFraction(e){setInputStatus(inputValue,inputValueStatus)&&(inputValue.value=(Math.round(+inputValue.value*(1/e)*100)/100).toString(),setInputValueStatus())}function calculateFraction(){if(!setInputStatus(inputValue,inputValueStatus)||!setInputStatus(numeratorValue,numeratorValueStatus,!0)||!setInputStatus(denominatorValue,denominatorValueStatus,!0))return;const e=getNumber(integerValue.value)+getNumber(numeratorValue.value)/getNumber(denominatorValue.value);inputValue.value=(Math.round(+inputValue.value*e*100)/100).toString(),setInputValueStatus()}function setInputStatus(e,t,a){if((a||e.value&&"."!==e.value)&&(!a||e.value))return!0;t.value="error"}function setInputValueStatus(){inputValueStatus.value=inputValue.value?"success":"error"}return watch((()=>props.value),(e=>inputValue.value=(e||"").toString()),{immediate:!0}),(e,t)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["c-keyboard",{isFixed:__props.drag}]),ref_key:"keyboardRef",ref:keyboardRef,style:normalizeStyle(unref(style)),onKeydown:onKeydown},[createElementVNode("div",{class:normalizeClass(["left",{isDose:unref(isDose)}])},[createVNode(InputNumber,{ref_key:"inputRef",ref:inputRef,modelValue:inputValue.value,"onUpdate:modelValue":t[0]||(t[0]=e=>inputValue.value=e),status:inputValueStatus.value,"onUpdate:status":t[1]||(t[1]=e=>inputValueStatus.value=e)},null,8,["modelValue","status"]),createElementVNode("div",_hoisted_1,[createVNode(unref(NSpace),{class:"margin-offset","wrap-item":!1},{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(numberKeys),(e=>(openBlock(),createElementBlock("span",{key:e,class:normalizeClass("0"===e?"is-0":""),onClick:t=>keydown(e)},toDisplayString(e),11,_hoisted_2)))),128))])),_:1}),createVNode(unref(NSpace),{class:"margin-offset","wrap-item":!1},{default:withCtx((()=>[createElementVNode("span",{class:"opt",onClick:t[2]||(t[2]=e=>keydown("Undo"))},[createVNode(unref(NIcon),{component:unref(ArrowUndoSharp)},null,8,["component"])]),createElementVNode("span",{class:"opt",onClick:t[3]||(t[3]=e=>keydown("Enter"))},"确定")])),_:1})])],2),unref(isDay)?(openBlock(),createBlock(unref(NSpace),{key:0,class:"right-days","wrap-item":!1,justify:"center",vertical:""},{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(days.value,(e=>(openBlock(),createElementBlock("span",{class:"btn",key:e,onClick:t=>keydown(e)},toDisplayString(e)+"天",9,_hoisted_3)))),128))])),_:1})):createCommentVNode("v-if",!0),unref(isDose)?(openBlock(),createBlock(unref(NSpace),{key:1,class:"right-dose","wrap-item":!1},{default:withCtx((()=>[createElementVNode("div",_hoisted_4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(doses.value,(e=>(openBlock(),createElementBlock("span",{class:"btn",key:e,onClick:t=>updateFraction(e)},"1/"+toDisplayString(e),9,_hoisted_5)))),128))]),createVNode(unref(NSpace),{justify:"center",vertical:"","wrap-item":!1},{default:withCtx((()=>[createElementVNode("div",_hoisted_6,[createVNode(InputNumber,{integer:"",modelValue:integerValue.value,"onUpdate:modelValue":t[4]||(t[4]=e=>integerValue.value=e)},null,8,["modelValue"]),createElementVNode("div",_hoisted_7,[createVNode(InputNumber,{integer:"",modelValue:numeratorValue.value,"onUpdate:modelValue":t[5]||(t[5]=e=>numeratorValue.value=e),status:numeratorValueStatus.value,"onUpdate:status":t[6]||(t[6]=e=>numeratorValueStatus.value=e)},null,8,["modelValue","status"]),_hoisted_8,createVNode(InputNumber,{integer:"",modelValue:denominatorValue.value,"onUpdate:modelValue":t[7]||(t[7]=e=>denominatorValue.value=e),status:denominatorValueStatus.value,"onUpdate:status":t[8]||(t[8]=e=>denominatorValueStatus.value=e)},null,8,["modelValue","status"])])]),createElementVNode("span",{class:"btn",onClick:calculateFraction},"分子式剂量")])),_:1})])),_:1})):createCommentVNode("v-if",!0)],38))}});export{_sfc_main as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,reactive as a,computed as t,onMounted as n,openBlock as s,createElementBlock as o,createElementVNode as r,createVNode as l,unref as i,withCtx as c,createTextVNode as d,toDisplayString as p,Fragment as m,renderList as u,createCommentVNode as g}from"vue";import{useMessage as v,NInput as q,NButton as L}from"naive-ui";const h={class:"c-map"},y={class:"search-container"},f={class:"map-input-search"},k={class:"input-addon"},w=r("div",{id:"map-core"},null,-1),_={key:0,class:"address-list"},S=["onClick"],P={class:"title"};var C=e({__name:"Map",props:{locationProp:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"}},emits:["selectLocation"],setup(e,{emit:C}){const O=e,T=a({qq:null,searchKey:"",centrePoint:{},location:{lng:"",lat:""},localObj:{},map:null,ac:null,addressList:[],markers:[],timeout:null,searchService:null,geocoder:{}}),M=t((()=>{var e,a;return null==(a=null==(e=T.addressList)?void 0:e[0])?void 0:a.name})),I=t((()=>O.locationProp&&JSON.parse(O.locationProp)||null)),B=v(),E=e=>{if(e&&"geolocation"==e.module){T.location.lng=e.lng,T.location.lat=e.lat;const a=new T.qq.maps.LatLng(e.lat,e.lng);x({latLng:a}),K({lat:e.lat,lng:e.lng})}else console.log("用户不允许获取地理位置"),T.location.lng=113.275,T.location.lat=23.117},K=e=>{const a=T.qq;var t=new a.maps.LatLng(e.lat,e.lng);T.centrePoint=t,T.map.panTo(t);const n=new a.maps.Marker({position:t,map:T.map});T.markers.push(n)},N=e=>{for(var a;a=e.pop();)a.setMap(null)},b=()=>{T.markers&&T.markers.length&&N(T.markers),T.markers=[]},x=(e={})=>{const a=T.qq,t=e.latLng,n=new a.maps.Geocoder;n.setComplete((e=>{if("GEO_INFO"===e.type){var t=new a.maps.LatLngBounds,n=e.detail.nearPois||[];b(),T.addressList=n||[];for(let e=0;e<n.length;e++){const o=n[e];var s=new a.maps.Marker({map:T.map});s.setPosition(o.latLng),s.setTitle(e+1),T.markers.push(s),t.extend(o.latLng)}T.map.fitBounds(t)}var o=e.detail.location||{};K(o)})),n.setError((function(){alert("出错了,请输入正确的经纬度!!!")})),n.getAddress(t)},A=()=>{let e=T.searchKey;e&&(T.markers&&T.markers.length&&N(T.markers),T.searchService.setLocation(""),T.searchService.setPageCapacity(50),T.searchService.search(e))},G=(e,a)=>{const t=T.qq,{name:n,address:s,latLng:o}=e,{lat:r,lng:l}=o,i=new t.maps.Geocoder;i.setComplete((function(e){if("GEO_INFO"===e.type){const{addressComponents:{province:a,city:t,district:o,country:i}}=e.detail,c=JSON.stringify({name:n,address:s,province:a,city:t,district:o,country:i,lat:r,lng:l});C("selectLocation",{locationProp:c,isInit:!1})}})),i.setError((function(){alert("出错了,请输入正确的经纬度!!!")})),i.getAddress(o)},J=e=>{var a={zoom:12,center:new e.maps.LatLng(39.916527,116.397128),mapTypeId:e.maps.MapTypeId.ROADMAP};T.map=new e.maps.Map(document.getElementById("map-core"),a);const{lat:t,lng:n,address:s}=I.value||{};if(t&&n){const a=new e.maps.LatLng(t,n);x({latLng:a})}else s?setTimeout((()=>{A()}),300):new T.qq.maps.Geolocation(O.ak,"qqmap").getLocation(E,(function(e){console.log(e)}),{timeout:9e3});T.qq.maps.event.addDomListener(T.map,"click",(function(e){x({latLng:e.latLng})}))},Y=e=>{T.qq=e,setTimeout((()=>{J(e),(()=>{const e=T.qq;T.searchService=new e.maps.SearchService({complete:function(a){var t,n,s=a.detail.pois||[],o=new e.maps.LatLngBounds;if("CITY_LIST"===a.type)return T.searchService.setLocation(a.detail.cities[0].cityName),void T.searchService.search(T.searchKey);if(T.addressList=s||[],b(),"POI_LIST"===a.type)for(var r=0,l=s.length;r<l;r++){var i=s[r];o.extend(i.latLng),t=r,n=void 0,(n=new e.maps.Marker({map:T.map})).setPosition(s[t].latLng),n.setTitle(r+1),T.markers.push(n)}T.map.fitBounds(o)},error:function(e){console.log(e),"NO_RESULTS"!==e?B.warning("地址检索先输入城市名称"):B.warning("查无结果!")},autoExtend:!0})})()}),0)},j=()=>{(()=>{var e,a;let t=window;if(t.qq)return t.qq._preloader?t.qq._preloader:Promise.resolve(t.qq);{const n=O.ak||(null==(a=null==(e=t._qq)?void 0:e.call(t))?void 0:a.ak);return t.qq={},t.qq._preloader=new Promise((e=>{t._initBaiduMap=function(){e(t.qq),t.document.body.removeChild(a),t.qq._preloader=null,t._initBaiduMap=null};const a=document.createElement("script");window.document.body.appendChild(a),a.src=`https://map.qq.com/api/js?v=2.exp&key=${n}&callback=_initBaiduMap`;const s=document.createElement("script");window.document.body.appendChild(s),s.src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"})),t.qq._preloader}})().then(Y)};return n((()=>{setTimeout((()=>{j()}),200)})),(e,a)=>(s(),o("div",h,[r("div",y,[r("div",f,[l(i(q),{value:T.searchKey,"onUpdate:value":a[0]||(a[0]=e=>T.searchKey=e),placeholder:"请输入地址","enter-button":"检索"},null,8,["value"]),r("span",k,[l(i(L),{type:"primary",size:"small",onClick:A},{default:c((()=>[d("检索")])),_:1})])])]),w,T.addressList&&T.addressList.length?(s(),o("ul",_,[r("li",null,[d(" 地址:"+p(i(M))+" ",1),l(i(L),{type:"primary",size:"small",onClick:a[1]||(a[1]=e=>G(T.addressList[0]))},{default:c((()=>[d("确定")])),_:1})]),(s(!0),o(m,null,u(T.addressList,((e,a)=>(s(),o("li",{class:"address-item",key:a},[r("div",{onClick:a=>G(e)},[r("div",P,p(e.name),1),r("span",null,p(e.address),1)],8,S)])))),128))])):g("v-if",!0)]))}});export{C as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as a,watch as t,nextTick as n,onBeforeUnmount as c,openBlock as i,createElementBlock as r,createElementVNode as s,createVNode as l,unref as o,withCtx as u,createTextVNode as v}from"vue";import{fabric as p}from"../../../shared/utils/fabricjs/index.js";import{NButton as f}from"naive-ui";import{isString as h}from"lodash-es";const d={class:"c-picture-clipper"},m={class:"canvas-right"},g={key:0,class:"preview-border"},w=["src"],y={class:"btns"};var C=e({__name:"PictureClipper",props:{source:{type:[String,File]}},emits:["save"],setup(e,{emit:C}){const P=e,b=500,k={x:250,y:270},R={originX:"center",originY:"center",left:k.x,top:k.y},_=a(null),j=a(),L={canvas:null,img:null,clipPath:null};function S(){var e;if(!L.canvas)return;const{width:a=0,height:t=0,left:n=0,top:c=0,scaleX:i=1,scaleY:r=1}=L.clipPath,s=a*i,l=t*r;j.value=null==(e=L.canvas)?void 0:e.toDataURL({left:n-s/2,top:c-l/2,width:s,height:l})}function U(){L.canvas&&C("save",j.value)}function x(e){var a;L.canvas&&(null==(a=L.clipPath)||a.setCoords().set({...R,...e,scaleX:1,scaleY:1}),F(),j.value="")}function F(){const{canvas:e,clipPath:a}=L;e&&a&&(L.canvas.discardActiveObject(),L.clipPath.bringToFront(),L.canvas.setActiveObject(L.clipPath))}return t((()=>P.source),(async e=>{e&&(await n(),async function(){const{minLength:e,sourceScale:a,sourceUrl:t}=await function(){return new Promise(((a,t)=>{if(h(P.source))e(P.source).then((e=>a(e)));else if(Object.prototype.toString.call(P.source).includes("File")){const t=new FileReader;t.onload=n=>{e(t.result).then((e=>a(e)))},t.readAsDataURL(P.source)}}));function e(e){return new Promise(((a,t)=>{const n=p.util.createImage();n.src=e,n.onload=t=>{const{width:c,height:i}=n;a({sourceScale:c>=i?b/c:b/i,minLength:Math.min(c,i),sourceUrl:e})}}))}}();L.canvas||(L.canvas=new p.Canvas(_.value,{width:b,height:b,backgroundColor:"#fff",selection:!1,containerClass:"c-picture-clipper__canvas",fireRightClick:!0}));L.img&&L.canvas.remove(L.img),p.Image.fromURL(t,(function(e){e.scale(a).set({...R,evented:!1,selectable:!1}),L.canvas.add(e),L.img=e,F()}));const n=e*a;L.clipPath?x({width:n,height:n}):(L.clipPath=new p.Rect({...R,width:n,height:n,fill:"transparent",lockRotation:!0,borderColor:"#5585f5",cornerColor:"#5585f5",cornerSize:10,transparentCorners:!1}),L.canvas.add(L.clipPath),F(),L.canvas.on("mouse:down",(e=>{F()})))}())}),{immediate:!0}),c((()=>{var e,a;null==(e=L.canvas)||e.off(),null==(a=L.canvas)||a.clear()})),(e,a)=>(i(),r("div",d,[s("canvas",{ref_key:"canvasRef",ref:_},null,512),s("div",m,[j.value?(i(),r("img",{key:1,src:j.value,alt:""},null,8,w)):(i(),r("span",g)),s("div",y,[l(o(f),{onClick:a[0]||(a[0]=()=>x())},{default:u((()=>[v("撤销")])),_:1}),l(o(f),{type:"primary",onClick:S},{default:u((()=>[v("预览")])),_:1}),l(o(f),{type:"primary",onClick:U},{default:u((()=>[v("保存")])),_:1})])])]))}});export{C as default};
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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 +0,0 @@
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};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as t,toRefs as l,ref as n,watch as s,openBlock as o,createElementBlock as i,normalizeStyle as p,unref as r,normalizeClass as a,createElementVNode as d,Fragment as u,renderList as c,createCommentVNode as m,withDirectives as f,renderSlot as h,toDisplayString as v,vShow as g,createBlock as I,withCtx as x,createVNode as y,createTextVNode as B}from"vue";import{NTooltip as w,NEmpty as T}from"naive-ui";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import{defaultCssVars as k}from"./constants/index.js";const _={class:"stepBox"},b=["title"],C=d("ul",{class:"nodeTipContent"},[d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(1)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是测试案例,请使用插槽:#nodeTipBox 自定义")]),d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(2)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是个测试案例,请使用插槽:#nodeTipBox 自定义")])],-1),$=["title"],L=["title"],R=["title"],M={key:0,style:{height:"48px"}},N={key:1},j={key:1};var D=e({__name:"StepsWheel",props:{stepInfo:{type:Object,default:()=>({list:[],cols:6})},currentStep:{type:Number,default:1},toolTipShow:{type:Boolean,default:!0},lastNodeRender:{type:Boolean,default:!1},noDataMsg:{type:String,default:"暂无节点数据"},placement:{type:String,default:"center"}},setup(e){const B=e,D=S(k,"StepsWheel"),A=t((()=>Math.ceil(P.value.length/B.stepInfo.cols))),E=t((()=>B.lastNodeRender)),{noDataMsg:O}=l(B),W=n(null),F=t((()=>{var e;let t=72;if(null==(e=null==W?void 0:W.value)?void 0:e.length){let e=W.value[0],l=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle;t=isNaN(parseInt(l["min-width"]))?72:parseInt(l["min-width"])}return`${20+B.stepInfo.cols*t}px`})),P=n([]),q=n([]),z=e=>{if(q.value.length){if(e.rowIndex===q.value.length)return!0;if(e.rowIndex<q.value.length)return q.value[e.rowIndex].some((e=>null==e?void 0:e.title))}return!1},G=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2==0&&"frist"==e.nodeType&&e.nodeIndex!==t.length},H=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2!=0&&"last"==e.nodeType&&e.nodeIndex!==t.length},J=(e,t)=>e.rowIndex%2==0?B.currentStep>=t+(B.stepInfo.cols-2*e.sort):B.currentStep>=t+2,K=(e,t)=>{let l=e.length,n=l%t==0?l/t:Math.floor(l/t+1),s=[];for(let l=0;l<n;l++){let n=e.slice(l*t,l*t+t);s.push(n)}return s},Q=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return A.value%2==0?e!=n[n.length-1].nodeIndex-(t-2*n[n.length-1].sort):e!=n[n.length-1].nodeIndex-1},U=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return A.value%2==0?E.value&&e==n[0].nodeIndex-(t-2*n[0].sort):E.value&&e==n[n.length-1].nodeIndex-1},V=(e,t)=>{const{cols:l}=B.stepInfo;let n=K(P.value,l),s=n[n.length-1].filter((e=>e));return A.value%2==0?"circle"===t?E.value&&e==s[0].nodeIndex-(l-2*s[0].sort)-l:E.value&&e==s[0].nodeIndex-(l-2*s[0].sort):"circle"===t?E.value&&e==s[s.length-1].nodeIndex-1-l:E.value&&e==s[s.length-1].nodeIndex-2};return s((()=>B.stepInfo),(e=>{var t;(null==(t=null==e?void 0:e.list)?void 0:t.length)&&((e,t)=>{let l=e.length+1,n=Math.ceil(e.length/t),s=!0,o=[];for(var i=0;i<n;i++)o[i]=new Array(t),o[i].fill(null);let p=0,r=0;for(let n=1;n<l;n++)o[p][r]=Object.assign(e[n-1],{nodeIndex:n,rowIndex:p+1}),s?n%t!=0?r++:(s=!s,p++):n%t!=0?r--:(s=!s,p++);let a=[];o.map((e=>{e.map(((e,t)=>e&&(e.sort=t))),e[0]&&(e[0].nodeType="frist"),e[e.length-1]&&(e[e.length-1].nodeType="last"),a=[...a,...e]})),P.value=a,q.value=o})(e.list,e.cols)}),{immediate:!0,deep:!0}),(t,l)=>(o(),i("div",{class:"step-wheel-box",style:p({minWidth:r(F),...r(D)})},[P.value.length?(o(),i("div",{key:0,class:a(["stepOut",{placementLeft:"left"===e.placement,placementRight:"right"===e.placement}])},[d("ul",_,[(o(!0),i(u,null,c(P.value,((l,n)=>(o(),i("li",{ref_for:!0,ref_key:"stepItemRef",ref:W,key:(null==l?void 0:l.stepId)||n,class:a(["stepItem",{[`stepItem_${n+1}`]:!0,[`${null==l?void 0:l.stepId}`]:!!(null==l?void 0:l.stepId)}])},[l?(o(),i(u,{key:0},[m(" 步骤头部信息 "),f(d("div",{class:a(["stepTopBox",{finished:U(n),stepTopBox_right:"right"===e.placement,stepTopBox_left:"left"===e.placement}])},[h(t.$slots,"stepTopBox",{stepItem:l},(()=>[d("span",{title:l.title},v(l.title),9,b)]))],2),[[g,l.title]]),m(" 步骤条的节点,此处为圆圈 "),e.toolTipShow?(o(),I(r(w),{key:0,placement:"top","show-arrow":!0,trigger:"hover",style:p({opacity:"0.88"})},{trigger:x((()=>[d("div",{class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)])),default:x((()=>[h(t.$slots,"nodeTipBox",{stepItem:l,stepId:l.stepId},(()=>[C]))])),_:2},1032,["style"])):(o(),i("div",{key:1,class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)),m(" 步骤条连接线,动态显示 "),"last"!==l.nodeType?f((o(),i("div",{key:2,class:a(["line",{lineActive:J(l,n),finished:V(n)}])},null,2)),[[g,Q(n)]]):m("v-if",!0),m(" 步骤条弯曲连线,动态渲染 "),G(l)||H(l)?(o(),i("div",{key:3,class:a({lineCircleActive:e.currentStep>l.nodeIndex,lineCircleFinished:V(n,"circle"),lineCircleRight:H(l),lineCircleLeft:G(l),lineCirclePlacementRight:H(l)&&"right"===e.placement,lineCirclePlacementLeft:G(l)&&"left"===e.placement})},null,2)):m("v-if",!0),m(" 步骤底部信息 "),d("div",{class:a(["stepBottomBox",{stepBottomBox_right:"right"===e.placement,stepBottomBox_left:"left"===e.placement}])},[h(t.$slots,"stepBottomBox",{stepItem:l},(()=>[m(" 步骤名称 "),f(d("p",{class:a(["stepLabel",{labelFinsh:U(n),stepLabel_right:"right"===e.placement,stepLabel_left:"left"===e.placement}]),title:l.label},v(l.label),11,$),[[g,l.label]]),d("div",{class:a({stepBottomCustomBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement})},[h(t.$slots,"stepBottomCustomBox",{stepItem:l},(()=>[d("div",{class:a({stepBottomDefaultBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement}),style:{width:"100%",display:"flex",flexDirection:"column"}},[f(d("p",{class:"stepExtra",title:l.person},v(l.person),9,L),[[g,l.person]]),m(" 步骤时间 "),f(d("p",{class:"statusTime",title:l.statusTime},v(l.statusTime),9,R),[[g,l.statusTime]])],2)]))],2)])),z(l)?(o(),i("div",M)):m("v-if",!0)],2)],64)):(o(),i("div",N,[m("null元素占位")]))],2)))),128))])],2)):(o(),i("div",j,[y(r(T),{description:r(O)},null,8,["description"])]))],4))}});export{D as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as l,openBlock as a,createElementBlock as u,createCommentVNode as p,unref as m,createBlock as t,isRef as d}from"vue";import{InputNumber as o,InputFilter as r,SelectFilter as n,Date as V,SelectDynamic as f,InputNumberGroup as g,DateRange as s,SelectLabel as C}from"./components/index.js";import{WidgetTypeEnums as v}from"../../types/enums.js";const i={class:"value-cfg_wrapper"};var E=e({__name:"ValueCfg",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:E}){const y=e,U=l({set(e){E("update:modelValue",e)},get:()=>y.modelValue}),N=l({set(e){E("update:presetVal",e)},get:()=>y.presetVal}),T=l((()=>{var e;return null==(e=y.paramCfg)?void 0:e.type}));return(l,E)=>(a(),u("div",i,[p(" 数字框 "),m(T)===m(v).INPUT_NUMBER?(a(),t(m(o),{key:0,modelValue:m(U),"onUpdate:modelValue":E[0]||(E[0]=e=>d(U)?U.value=e:null)},null,8,["modelValue"])):p("v-if",!0),p(" 文本框 "),m(T)===m(v).INPUT?(a(),t(m(r),{key:1,modelValue:m(U),"onUpdate:modelValue":E[1]||(E[1]=e=>d(U)?U.value=e:null)},null,8,["modelValue"])):p("v-if",!0),p(" 下拉框 "),m(T)===m(v).SELECT?(a(),t(m(n),{key:2,paramCfg:e.paramCfg,widgetType:m(T),modelValue:m(U),"onUpdate:modelValue":E[2]||(E[2]=e=>d(U)?U.value=e:null)},null,8,["paramCfg","widgetType","modelValue"])):p("v-if",!0),p(" 日期框、日期时间框 "),m(T)===m(v).DATE||m(T)===m(v).DATE_TIME?(a(),t(m(V),{key:3,paramCfg:e.paramCfg,modelValue:m(U),"onUpdate:modelValue":E[3]||(E[3]=e=>d(U)?U.value=e:null),presetVal:m(N),"onUpdate:presetVal":E[4]||(E[4]=e=>d(N)?N.value=e:null)},null,8,["paramCfg","modelValue","presetVal"])):p("v-if",!0),p(" 异步数据源下拉框 "),m(T)===m(v).SELECTDYNAMIC?(a(),t(m(f),{key:4,paramCfg:e.paramCfg,modelValue:m(U),"onUpdate:modelValue":E[5]||(E[5]=e=>d(U)?U.value=e:null)},null,8,["paramCfg","modelValue"])):p("v-if",!0),p(" 数字框范围 "),m(T)===m(v).INPUTNUMBER_RANGE?(a(),t(m(g),{key:5,paramCfg:e.paramCfg,modelValue:m(U),"onUpdate:modelValue":E[6]||(E[6]=e=>d(U)?U.value=e:null)},null,8,["paramCfg","modelValue"])):p("v-if",!0),p(" 日期、日期时间范围 "),m(T)===m(v).DATE_RANGE_INNER||m(T)===m(v).DATETIME_RANGE_INNER?(a(),t(m(s),{key:6,paramCfg:e.paramCfg,modelValue:m(U),"onUpdate:modelValue":E[7]||(E[7]=e=>d(U)?U.value=e:null),presetVal:m(N),"onUpdate:presetVal":E[8]||(E[8]=e=>d(N)?N.value=e:null)},null,8,["paramCfg","modelValue","presetVal"])):p("v-if",!0),p(" label标签选择 "),m(T)===m(v).SELECTLABEL?(a(),t(m(C),{key:7,paramCfg:e.paramCfg,modelValue:m(U),"onUpdate:modelValue":E[9]||(E[9]=e=>d(U)?U.value=e:null)},null,8,["paramCfg","modelValue"])):p("v-if",!0)]))}});export{E as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as t,openBlock as a,createElementBlock as l,Fragment as r,createVNode as u,unref as o,isRef as p,createBlock as m,createCommentVNode as s}from"vue";import n from"../../../../../date-picker/index.js";import{NSelect as d}from"naive-ui";import{WidgetTypeEnums as i,WidgetValEnums as v}from"../../../types/enums.js";import{generateDefOptionsInApi as f}from"../../../tool/generateDefOptions.js";var y=e({__name:"Date",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:y}){const c=e,g=t({set(e){y("update:modelValue",e)},get:()=>c.modelValue}),T=t({set(e){y("update:presetVal",e)},get:()=>c.presetVal}),C=t((()=>M.value.toLowerCase()||i.DATE.toLowerCase())),D=t((()=>{let e="";switch(M.value){case i.DATE:e="yyyy-MM-dd";break;case i.DATE_TIME:e="yyyy-MM-dd HH:mm:ss"}return e})),M=t((()=>c.paramCfg._rawData.type)),V=t((()=>{var e;return null==(e=c.paramCfg)?void 0:e.mappingConfig})),b=t((()=>{const e=f(M.value,V.value).slice(0);return M.value!==i.DATE&&M.value!==i.DATE_TIME||e.unshift({label:"自定义输入",value:v.CUSTOM}),e}));return(e,t)=>(a(),l(r,null,[u(o(d),{style:{width:"120px"},class:"form-item",to:"body",value:o(T),"onUpdate:value":t[0]||(t[0]=e=>p(T)?T.value=e:null),options:o(b)},null,8,["value","options"]),o(T)===o(v).CUSTOM?(a(),m(o(n),{key:0,class:"form-item",type:o(C),clearable:"",to:"body",valueFormat:o(D),"formatted-value":o(g),"onUpdate:formatted-value":t[1]||(t[1]=e=>p(g)?g.value=e:null)},null,8,["type","valueFormat","formatted-value"])):s("v-if",!0)],64))}});export{y as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as o,createVNode as s,unref as n,isRef as m,createCommentVNode as i}from"vue";import{NSelect as v}from"naive-ui";import d from"../../../../../date-picker/index.js";import p from"moment";import{cloneDeep as f,isString as c}from"lodash-es";import{WidgetTypeEnums as y,WidgetValEnums as b}from"../../../types/enums.js";import{widgetDateRangeOptions as D}from"../../../tool/baseOptions.js";const M={key:0,style:{display:"flex"}};var T=e({__name:"DateRange",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:T}){const h=e,E=a(),A=a(),V=l((()=>{let e="";switch(g.value){case y.DATE:e="yyyy-MM-dd";break;case y.DATE_TIME:e="yyyy-MM-dd HH:mm:ss"}return e})),Y=l((()=>{let e="";switch(g.value){case y.DATE:e="YYYY-MM-DD";break;case y.DATE_TIME:e="YYYY-MM-DD HH:mm:ss"}return e})),g=l((()=>h.paramCfg._rawData.type)),w=l((()=>g.value===y.DATE?"初始日期":"初始时间")),C=l((()=>g.value===y.DATE?"截止日期":"截止时间")),O=l((()=>g.value.toLowerCase()||y.DATE.toLowerCase())),k=l((()=>{const e=f(D);return e.unshift({label:"自定义输入",value:b.CUSTOM}),e})),x=l({set(e){T("update:presetVal",e)},get:()=>h.presetVal});function U(e,a){switch(a){case"start":E.value=e;break;case"end":A.value=e}const l=E.value?p(E.value).format(Y.value):null,t=A.value?p(A.value).format(Y.value):null;T("update:modelValue",l||t?`${null!=l?l:""} ~ ${null!=t?t:""}`:"")}function _(e){return!!A.value&&e>A.value}function j(e){return!!E.value&&e<E.value}return t((()=>h.modelValue),(e=>{if(e&&c(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(E.value=p(a.trim()).valueOf()),void(l.trim()&&(A.value=p(l.trim()).valueOf()))}E.value=A.value=null}),{immediate:!0}),(e,a)=>(u(),r(o,null,[s(n(v),{style:{width:"120px"},class:"form-item",to:"body",value:n(x),"onUpdate:value":a[0]||(a[0]=e=>m(x)?x.value=e:null),options:n(k)},null,8,["value","options"]),n(x)===n(b).CUSTOM?(u(),r("div",M,[s(n(d),{type:n(O),"default-time":"00:00:00",clearable:"",to:"body",valueFormat:n(V),placeholder:n(w),value:E.value,"is-date-disabled":_,"onUpdate:value":a[1]||(a[1]=e=>U(e,"start"))},null,8,["type","valueFormat","placeholder","value"]),s(n(d),{style:{"margin-left":"5px"},type:n(O),"default-time":"23:59:59",clearable:"",to:"body",valueFormat:n(V),placeholder:n(C),value:A.value,"is-date-disabled":j,"onUpdate:value":a[2]||(a[2]=e=>U(e,"end"))},null,8,["type","valueFormat","placeholder","value"])])):i("v-if",!0)],64))}});export{T as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as l,openBlock as a,createBlock as u,unref as t,isRef as r}from"vue";import{NInput as m}from"naive-ui";var o=e({__name:"InputFilter",props:{modelValue:{type:[String,Number,Array],default:null}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,p=l({set(e){o("update:modelValue",e)},get:()=>n.modelValue});return(e,l)=>(a(),u(t(m),{value:t(p),"onUpdate:value":l[0]||(l[0]=e=>r(p)?p.value=e:null),maxlength:"255",clearable:""},null,8,["value"]))}});export{o as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as u,openBlock as l,createBlock as a,unref as t,isRef as m}from"vue";import{NInputNumber as r}from"naive-ui";var o=e({__name:"InputNumber",props:{modelValue:{type:[String,Number,Array],default:null}},emits:["update:modelValue"],setup(e,{emit:o}){const p=e,n=u({set(e){o("update:modelValue",e)},get:()=>p.modelValue});return(e,u)=>(l(),a(t(r),{class:"form-item",value:t(n),"onUpdate:value":u[0]||(u[0]=e=>m(n)?n.value=e:null)},null,8,["value"]))}});export{o as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as l,watch as u,openBlock as t,createBlock as a,unref as r,withCtx as m,createVNode as n,createElementVNode as i}from"vue";import{NInputGroup as d,NInputNumber as o}from"naive-ui";import{isString as s}from"lodash-es";const p=i("span",{class:"divider"}," ~ ",-1);var v=e({__name:"InputNumberGroup",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null}},emits:["update:modelValue"],setup(e,{emit:i}){const v=e,c=l(),b=l();function f(e,l){var u,t;let a="";switch(l){case"startNumber":a=`${null!=e?e:""} ~ ${null!=(u=b.value)?u:""}`;break;case"endNumber":a=`${null!=(t=c.value)?t:""} ~ ${null!=e?e:""}`}const r=a.split(" ~ ").some((e=>e.trim()));i("update:modelValue",r?a:"")}return u((()=>v.modelValue),(e=>{if(c.value=b.value=null,e&&s(e)&&e.includes("~")){const[l,u]=e.split("~");return l.trim()&&(c.value=Number(l.trim())),void(u.trim()&&(b.value=Number(u.trim())))}}),{immediate:!0}),(e,l)=>(t(),a(r(d),{class:"render-widget-input-number-group"},{default:m((()=>[n(r(o),{style:{width:"106px"},placeholder:"最小值",value:c.value,"onUpdate:value":l[0]||(l[0]=e=>f(e,"startNumber"))},null,8,["value"]),p,n(r(o),{style:{width:"106px"},placeholder:"最大值",value:b.value,"onUpdate:value":l[1]||(l[1]=e=>f(e,"endNumber"))},null,8,["value"])])),_:1}))}});export{v as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as a,ref as t,inject as o,computed as n,openBlock as l,createBlock as i,unref as r,isRef as s,h as u}from"vue";import{NSelect as p,NTag as c}from"naive-ui";import{WidgetOptionEnums as d}from"../../../types/enums.js";import{useDebounceFn as m}from"@vueuse/core";import f from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as y}from"../../../constants/index.js";var g=e({__name:"SelectDynamic",props:{paramCfg:{type:Object,default:null},modelValue:{type:[Array,String,Number],default:null}},emits:["update:modelValue"],setup(e,{emit:g}){const v=e,{handleGetConfigApi:b}=f(),h=a(),w=t([]),C=t(!1),I=o(y),S=n({set(e){g("update:modelValue",e)},get:()=>v.modelValue}),x=n((()=>{var e;return null==(e=v.paramCfg)?void 0:e.optionSetting})),j=n((()=>x.value===d.MULTIPLE));async function K(e){try{const{dynamicOptionInfo:a}=v.paramCfg.optionInfo;if(a){const{autograph:t,dataSourceId:o,dataSourceType:n,filterKeys:l,showKeys:i,valueKey:r}=a;let s={wordbookId:o,autograph:t,wordbookType:n,fieldKeys:l,page:1};l.length>0&&(s[l[0]]=e),C.value=!0;let u=await b(s,"requestDynamicSelect",{},I);if(u){const{fieldList:e=[],rows:a=[]}=u,t=a.map((e=>({...e,label:e[i[0]],value:e[r]})));return w.value=t,t}}}catch(e){console.log(e)}finally{C.value=!1}}const O=m((async e=>{await async function(e){const{manualMapping:a}=h;if(!a){const a=e.trim();await K(a)}}(e)}),300);async function k(){const{dynamicOptionInfo:e}=v.paramCfg.optionInfo;Object.keys(e).length>0&&I&&await K("")}function T(e){const{dynamicOptionInfo:a}=v.paramCfg.optionInfo,{showKeys:t=[]}=a;return a&&t.length>0?u("div",{class:"select-widget-dynamic-option"},t.map((a=>u("span",{class:"select-widget-dynamic-item"},e[a])))):u("div",e.label)}function V({option:e,handleClose:a}){return j.value?u(c,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>u("div",e.label)}):u("div",e.label)}return k(),(e,a)=>(l(),i(r(p),{to:"body",value:r(S),"onUpdate:value":a[0]||(a[0]=e=>s(S)?S.value=e:null),loading:C.value,options:w.value,remote:!0,"render-label":T,"render-tag":V,multiple:r(j),clearable:"",filterable:"",maxTagCount:"responsive",style:{width:"200px"},onSearch:r(O),onClear:k},null,8,["value","loading","options","multiple","onSearch"]))}});export{g as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as t,openBlock as l,createBlock as a,unref as o,isRef as u}from"vue";import{NSelect as r}from"naive-ui";import{WidgetOptionEnums as p}from"../../../types/enums.js";import{generateDefOptionsInApi as i}from"../../../tool/generateDefOptions.js";var m=e({__name:"SelectFilter",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},widgetType:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:m}){const n=e,d=t({set(e){m("update:modelValue",e)},get:()=>n.modelValue}),s=t((()=>{var e;return null==(e=n.paramCfg)?void 0:e.optionSetting})),f=t((()=>{var e;return null==(e=n.paramCfg)?void 0:e.mappingConfig})),g=t((()=>i(n.widgetType,f.value).slice(0)));return(e,t)=>(l(),a(o(r),{style:{width:"200px"},class:"form-item",value:o(d),"onUpdate:value":t[0]||(t[0]=e=>u(d)?d.value=e:null),to:"body",filterable:"",options:o(g),multiple:o(s)===o(p).MULTIPLE,maxTagCount:1},null,8,["value","options","multiple"]))}});export{m as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as l,inject as t,computed as a,openBlock as o,createBlock as u,unref as s,isRef as i}from"vue";import{NSelect as n}from"naive-ui";import r from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as p}from"../../../constants/index.js";var m=e({__name:"SelectLabel",props:{paramCfg:{type:Object,default:null},modelValue:{type:String,default:null}},emits:["update:modelValue"],setup(e,{emit:m}){const f=e,{handleGetConfigApi:d}=r(),c=l([]),h=t(p),v=a({set(e){const l=e?e.join("|#|"):e;m("update:modelValue",l)},get:()=>f.modelValue?f.modelValue.split("|#|"):[]}),b=a((()=>{if(c.value&&c.value.length>0){let e=[],l=[];return c.value.forEach((t=>{t.labelList.forEach((t=>{e.includes(t.labelShowText)||(e.push(t.labelShowText),l.push({label:t.labelShowText,value:t.labelShowText}))}))})),l}return[]}));return(async()=>{try{const{defaultValue:e={}}=f.paramCfg._rawData,{classifyStr:l=""}=e;let t=await d({classifyStr:l},"requestListByClassify",{},h);if(t){const{data:e}=t,{list:l=[]}=e;c.value=l}}catch(e){console.log(e)}})(),(e,l)=>(o(),u(s(n),{to:"body",multiple:"",clearable:"",filterable:"",maxTagCount:"responsive",value:s(v),"onUpdate:value":l[0]||(l[0]=e=>i(v)?v.value=e:null),options:s(b),style:{width:"200px"}},null,8,["value","options"]))}});export{m as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as a,reactive as t,ref as l,toRef as i,openBlock as n,createElementBlock as o,createVNode as s,unref as d,withCtx as r,createElementVNode as c,createCommentVNode as p,Fragment as u,renderList as y,normalizeClass as m,toDisplayString as v,createBlock as f,withDirectives as g,createTextVNode as C,vShow as h}from"vue";import{useMessage as k,NSpin as b,NInput as A,NIcon as L,NButton as w,NSelect as _,NTooltip as U}from"naive-ui";import{CloseOutline as N,AddOutline as V,AddCircleSharp as D}from"@vicons/ionicons5";import x from"./ValueCfg.vue.js";import{DataTypeEnums as B,ConditionEnums as I}from"../../types/enums.js";import{useDisplayCategory as S}from"./hooks/useDisplayCategory.js";import{useFilterConditions as j}from"./hooks/useFilterConditions.js";import{conditionOptions as F}from"./helpers/options.js";const z={class:"searchConditionByApi_wrapper"},O={class:"class-filter-content"},P={key:0,class:"item-name"},q=c("span",{class:"label"},"筛选分类名称:",-1),E={key:1,class:"quickSearch-content"},R=c("span",{class:"label"},"父类名称:",-1),J=["onDblclick","onClick"],K={key:0,class:"s-content"},M={key:2,class:"item-name"},Q=c("span",{class:"label"}," 过滤条件: ",-1),G=c("span",null,"添加",-1),H={class:"select-item-list"},T={class:"index-span"},W=["onClick"];var X=e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:X,emit:Y}){const Z=e,$=k(),ee=a(),ae=t({className:"",displayCategory:"",filterConditions:[]}),te=l(!1),{State:le,isEnableAddDisplayCategory:ie,editDisplayCategory:ne,handleDisplayCategorySelect:oe,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:ce}=S(i(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:pe,paramOptions:ue,addFilterCondition:ye,delFilterCondition:me,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=j(i(ae,"filterConditions"),Z.searchFieldList,B.API);function ke(){ae.className="",ae.displayCategory="",ae.filterConditions=[]}async function be(){var e;try{if(ke(),te.value=!0,ce(ee.displayCategoryList,Z.actionList_prop.displayCategory||void 0),Z.actionList_prop){ae.className=Z.actionList_prop.name,await Ce(Z.tableId,null!=(e=Z.actionList_prop.conObj)?e:[]);ae.filterConditions.length<1&&ue.value&&ue.value.length>0&&ye()}}finally{te.value=!1}}return be(),X({handleInitConditions:be,saveAdd:function(){new Promise((e=>{ae.className||!Z.showItemName?0!==ae.filterConditions.length?ae.filterConditions.some((({key:e,condition:a,value:t,presetVal:l})=>!e||!a||a===I.EQUAL&&!t&&!l))?$.warning("请补充完整条件内容"):e(!0):$.warning("请至少添加一个条件"):$.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===Z.actionList_prop.from&&(a=Z.actionList_prop.displayCategory,e=null==Z?void 0:Z.conditionList.find((e=>e.displayCategory===a)));const t={displayCategory:ae.displayCategory,name:ae.className||"",conObj:he()},l={id:e?e.sid:"",tableId:Z.tableId,setting:JSON.stringify(t)};Y("saveAdd",l,!1)}))},cancelSaveAdd:function(){ke(),Y("cancelSaveAdd")},addAction:ye,checkActionList:function(){return ae.filterConditions.every((e=>!e.field_key))}}),(a,t)=>(n(),o("div",z,[s(d(b),{show:te.value},{default:r((()=>[c("div",O,[e.showItemName?(n(),o("div",P,[q,s(d(A),{value:ae.className,"onUpdate:value":t[0]||(t[0]=e=>ae.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):p("v-if",!0),e.showItemName?(n(),o("div",E,[R,(n(!0),o(u,null,y(d(le).displayCategories,((e,a)=>(n(),o("div",{class:m(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(ne)(a,e),onClick:a=>function(e){oe(e)}(e)},[e.disabled?(n(),o("div",K,[c("span",null,v(e.value),1)])):(n(),f(d(A),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),s(d(L),{component:d(N),class:"anticon-close",size:"20",onClick:t=>d(se)(a,e)},null,8,["component","onClick"])],42,J)))),128)),d(ie)?(n(),o(u,{key:0},[g(s(d(w),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(L),{component:d(V),size:"20"},null,8,["component"]),C(" "+v("添加父类"))])),_:1},8,["onClick"]),[[h,!d(le).showAdd]]),g(s(d(A),{class:"edit-tag",value:d(le).addDisplayCategory,"onUpdate:value":t[1]||(t[1]=e=>d(le).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:d(re),maxLength:10},null,8,["value","onBlur"]),[[h,d(le).showAdd]])],64)):p("v-if",!0)])):p("v-if",!0),e.hideAddBtn?p("v-if",!0):(n(),o("div",M,[Q,c("span",{class:"addAction",onClick:t[2]||(t[2]=(...e)=>d(ye)&&d(ye)(...e)),style:{cursor:"pointer"}},[s(d(L),{component:d(D),class:"blue",size:"18"},null,8,["component"]),G])])),c("ul",H,[(n(!0),o(u,null,y(ae.filterConditions,((e,a)=>(n(),o("li",{key:a},[c("span",T,v(a+1)+"   ",1),p(" 选择 field_key "),s(d(_),{class:"form-item",placeholder:"请选择",value:e.key,to:"body",filterable:"",options:d(ue),"onUpdate:value":e=>d(ve)(a,e)},null,8,["value","options","onUpdate:value"]),p(" 选择 关系 "),e.key?(n(),f(d(_),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:d(F),"onUpdate:value":e=>d(fe)(a,e)},null,8,["value","options","onUpdate:value"])):p("v-if",!0),p(" 自定义 "),e.key&&e.condition&&e.condition!==d(I).NULL?(n(),f(x,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":d(ge)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):p("v-if",!0),s(d(U),{title:"删除",trigger:"hover"},{trigger:r((()=>[c("i",{onClick:e=>d(me)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,W)])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}});export{X as default};