cnhis-design-vue 3.1.41-beta.4 → 3.1.41-beta.41

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 (313) hide show
  1. package/es/components/base-search/index.d.ts +293 -0
  2. package/es/components/base-search/index.js +1 -0
  3. package/es/components/base-search/src/index.vue.d.ts +294 -0
  4. package/es/components/base-search/src/index.vue.js +1 -0
  5. package/es/components/base-search/style/iconfont.ttf +0 -0
  6. package/es/components/base-search/style/index.css +1 -0
  7. package/es/components/big-table/index.d.ts +1 -0
  8. package/es/components/big-table/src/BigTable.vue.d.ts +1 -0
  9. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  10. package/es/components/big-table/style/index.css +1 -1
  11. package/es/components/button-print/index.d.ts +3 -2
  12. package/es/components/button-print/src/ButtonPrint.vue.d.ts +3 -2
  13. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  14. package/es/components/button-print/src/api.d.ts +3 -0
  15. package/es/components/button-print/src/api.js +1 -0
  16. package/es/components/button-print/src/utils/print.d.ts +1 -1
  17. package/es/components/button-print/src/utils/print.js +1 -1
  18. package/es/components/classification/index.d.ts +995 -0
  19. package/es/components/classification/index.js +1 -0
  20. package/es/components/classification/src/components/search-filter/index.vue.d.ts +373 -0
  21. package/es/components/classification/src/components/search-filter/index.vue.js +1 -0
  22. package/es/components/classification/src/components/set-classification/index.vue.d.ts +718 -0
  23. package/es/components/classification/src/components/set-classification/index.vue.js +1 -0
  24. package/es/components/{table-filter/src/components/table-modal/TableModal.vue.d.ts → classification/src/components/table-modal/index.vue.d.ts} +0 -42
  25. package/es/components/classification/src/components/table-modal/index.vue.js +1 -0
  26. package/es/components/classification/src/const/index.d.ts +2 -0
  27. package/es/components/classification/src/const/index.js +1 -0
  28. package/es/components/classification/src/index.vue.d.ts +996 -0
  29. package/es/components/classification/src/index.vue.js +1 -0
  30. package/es/components/classification/style/iconfont.ttf +0 -0
  31. package/es/components/classification/style/index.css +1 -0
  32. package/es/components/config-provider/index.d.ts +14 -0
  33. package/es/components/config-provider/index.js +1 -0
  34. package/es/components/config-provider/src/ConfigProvider.d.ts +14 -0
  35. package/es/components/config-provider/src/ConfigProvider.js +1 -0
  36. package/es/components/config-provider/src/interface.d.ts +18 -0
  37. package/es/components/config-provider/src/utils/index.d.ts +2 -0
  38. package/es/components/config-provider/src/utils/index.js +1 -0
  39. package/es/components/date-picker/index.d.ts +20 -0
  40. package/es/components/date-picker/index.js +1 -0
  41. package/es/components/date-picker/src/DatePicker.vue.d.ts +20 -0
  42. package/es/components/date-picker/src/DatePicker.vue.js +1 -0
  43. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -0
  46. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/useOther.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/useTop.js +1 -1
  50. package/es/components/field-set/index.d.ts +8 -0
  51. package/es/components/field-set/src/FieldSet.vue.d.ts +5 -0
  52. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  53. package/es/components/field-set/style/index.css +1 -1
  54. package/es/components/form-config/index.d.ts +6780 -69
  55. package/es/components/form-config/src/FormConfig.vue.d.ts +6918 -206
  56. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  57. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -13
  58. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  59. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +4 -4
  60. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  61. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3423 -71
  62. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  63. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +2 -2
  64. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  65. package/es/components/form-config/src/components/renderer/CloseButton.vue.d.ts +3 -3
  66. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  67. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +10 -10
  68. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  69. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +6 -6
  70. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  71. package/es/components/form-config/src/hooks/useConfigurationField.d.ts +2 -3
  72. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  73. package/es/components/form-config/src/hooks/useDataNormalize.d.ts +4 -2
  74. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
  75. package/es/components/form-config/src/hooks/usePresetRenderer.d.ts +1 -1
  76. package/es/components/form-config/src/types/index.d.ts +8 -2
  77. package/es/components/form-config/src/utils/index.d.ts +4 -1
  78. package/es/components/form-config/src/utils/index.js +1 -1
  79. package/es/components/form-config/style/index.css +1 -1
  80. package/es/components/form-render/index.d.ts +13 -13
  81. package/es/components/form-render/index.js +1 -1
  82. package/es/components/form-render/src/FormRender.vue.d.ts +12 -12
  83. package/es/components/form-render/src/FormRender.vue.js +1 -1
  84. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +33 -32
  85. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  86. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  87. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  88. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  89. package/es/components/form-render/src/components/renderer/select.js +1 -1
  90. package/es/components/form-render/src/constants/index.d.ts +0 -12
  91. package/es/components/form-render/src/constants/index.js +1 -1
  92. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +2 -6
  93. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  94. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
  95. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  96. package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
  97. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  98. package/es/components/form-render/src/hooks/useFormField.d.ts +1 -0
  99. package/es/components/form-render/src/hooks/useFormField.js +1 -1
  100. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -2
  101. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  102. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  103. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  104. package/es/components/form-render/src/types/index.d.ts +5 -3
  105. package/es/components/form-render/src/utils/dom.d.ts +2 -1
  106. package/es/components/form-render/src/utils/dom.js +1 -1
  107. package/es/components/iho-table/index.d.ts +8 -5
  108. package/es/components/iho-table/index.js +1 -1
  109. package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -5
  110. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  111. package/es/components/iho-table/src/constants/index.d.ts +6 -6
  112. package/es/components/iho-table/src/constants/index.js +1 -1
  113. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
  114. package/es/components/iho-table/src/hooks/useTableTheme.d.ts +4 -0
  115. package/es/components/iho-table/src/hooks/useTableTheme.js +1 -0
  116. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  117. package/es/components/iho-table/src/plugins/{filterPlugin → filterRenderPlugin}/filter.vue.d.ts +15 -74
  118. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -0
  119. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.d.ts +1 -0
  120. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -0
  121. package/es/components/iho-table/src/plugins/index.js +1 -1
  122. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +20 -7
  123. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  124. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +102 -0
  125. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -0
  126. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/{timeRendererPlugin.d.ts → timeRendererPlugin/index.d.ts} +1 -1
  127. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -0
  128. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -1
  129. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  130. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  131. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  132. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  133. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  134. package/es/components/iho-table/src/types/index.d.ts +21 -11
  135. package/es/components/iho-table/src/utils/index.d.ts +1 -0
  136. package/es/components/iho-table/src/utils/index.js +1 -1
  137. package/es/components/iho-table/style/index.css +1 -1
  138. package/es/components/index.css +1 -1
  139. package/es/components/index.d.ts +8 -2
  140. package/es/components/index.js +1 -1
  141. package/es/components/info-header/index.d.ts +3967 -190
  142. package/es/components/info-header/src/InfoHeader.vue.d.ts +3969 -192
  143. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  144. package/es/components/info-header/src/components/index.d.ts +3 -0
  145. package/es/components/info-header/src/components/index.js +1 -0
  146. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1842 -0
  147. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -0
  148. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1972 -0
  149. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -0
  150. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -0
  151. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -0
  152. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +2796 -0
  153. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -0
  154. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +783 -0
  155. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -0
  156. package/es/components/info-header/src/constants/index.d.ts +4 -0
  157. package/es/components/info-header/src/constants/index.js +1 -0
  158. package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +4 -0
  159. package/es/components/info-header/src/hooks/useThemeOverrides.js +1 -0
  160. package/es/components/info-header/src/types/index.d.ts +43 -0
  161. package/es/components/info-header/src/types/index.js +1 -0
  162. package/es/components/info-header/style/index.css +1 -1
  163. package/es/components/keyboard/index.d.ts +3 -1
  164. package/es/components/keyboard/src/Keyboard.vue.d.ts +3 -1
  165. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  166. package/es/components/keyboard/src/constants/index.d.ts +2 -0
  167. package/es/components/keyboard/src/constants/index.js +1 -0
  168. package/es/components/keyboard/style/index.css +1 -1
  169. package/es/components/quick-search/index.d.ts +713 -0
  170. package/es/components/quick-search/index.js +1 -0
  171. package/es/components/quick-search/src/index.vue.d.ts +715 -0
  172. package/es/components/quick-search/src/index.vue.js +1 -0
  173. package/es/components/quick-search/style/index.css +1 -0
  174. package/es/components/recommend-search/index.d.ts +12 -12
  175. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +12 -12
  176. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +2 -2
  177. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +4 -4
  178. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +5 -5
  179. package/es/components/scale-view/index.d.ts +1 -2
  180. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -5
  181. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  182. package/es/components/scale-view/src/components/formitem/sign-com.d.ts +1 -1
  183. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  184. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
  185. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  186. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  187. package/es/components/scale-view/src/hooks/use-component.d.ts +82 -116
  188. package/es/components/scale-view/src/utils/judge-types.js +1 -1
  189. package/es/components/scale-view/style/index.css +1 -1
  190. package/es/components/search-cascader/index.d.ts +2 -2
  191. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
  192. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  193. package/es/components/select-label/index.d.ts +83 -169
  194. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -53
  195. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  196. package/es/components/select-label/src/SelectLabel.vue.d.ts +83 -116
  197. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  198. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  199. package/es/components/select-label/style/iconfont.ttf +0 -0
  200. package/es/components/select-label/style/index.css +1 -1
  201. package/es/components/shortcut-setter/index.d.ts +14 -14
  202. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +14 -14
  203. package/es/components/steps-wheel/index.d.ts +2 -1
  204. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +2 -1
  205. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  206. package/es/components/steps-wheel/src/constants/index.d.ts +2 -0
  207. package/es/components/steps-wheel/src/constants/index.js +1 -0
  208. package/es/components/steps-wheel/style/index.css +1 -1
  209. package/es/components/table-filter/index.d.ts +0 -9098
  210. package/es/components/table-filter/index.js +1 -1
  211. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +3 -2
  212. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  213. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -42
  214. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  215. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +21 -49
  216. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  217. package/es/components/table-filter/src/components/render-widget/enums.d.ts +0 -8
  218. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  219. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +2 -1
  220. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  221. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  222. package/es/components/table-filter/src/hooks/export.js +1 -1
  223. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -3
  224. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  225. package/es/components/table-filter/src/hooks/useMixins.d.ts +2 -55
  226. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  227. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  228. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  229. package/es/components/table-filter/src/tool/transformData.d.ts +1 -37
  230. package/es/components/table-filter/src/tool/transformData.js +1 -1
  231. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  232. package/es/components/table-filter/src/types/enums.js +1 -1
  233. package/es/components/table-filter/src/types/index.d.ts +12 -178
  234. package/es/components/time-picker/index.d.ts +18 -0
  235. package/es/components/time-picker/index.js +1 -0
  236. package/es/components/time-picker/src/TimePicker.vue.d.ts +18 -0
  237. package/es/components/time-picker/src/TimePicker.vue.js +1 -0
  238. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  239. package/es/shared/components/no-data/NoData.vue.d.ts +5 -0
  240. package/es/shared/components/no-data/NoData.vue.js +1 -1
  241. package/es/shared/mixins/index.d.ts +1 -0
  242. package/es/shared/mixins/index.js +1 -0
  243. package/es/shared/mixins/useTheme.d.ts +3 -0
  244. package/es/shared/mixins/useTheme.js +1 -0
  245. package/es/shared/utils/index.d.ts +17 -0
  246. package/es/shared/utils/index.js +1 -1
  247. package/package.json +2 -2
  248. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +0 -1
  249. package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +0 -1
  250. package/es/components/iho-table/src/plugins/filterPlugin/index.js +0 -1
  251. package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +0 -7
  252. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +0 -1
  253. package/es/components/info-header/src/HiddenContent.vue.js +0 -1
  254. package/es/components/info-header/src/InfoEllipsis.vue.js +0 -1
  255. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +0 -3630
  256. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +0 -1
  257. package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +0 -3582
  258. package/es/components/table-filter/src/classification/Classification-com.vue.js +0 -1
  259. package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +0 -90
  260. package/es/components/table-filter/src/classification/search-class-name.vue.js +0 -1
  261. package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +0 -1472
  262. package/es/components/table-filter/src/classification/search-professional-model.vue.js +0 -1
  263. package/es/components/table-filter/src/components/age-com/index.vue.d.ts +0 -119
  264. package/es/components/table-filter/src/components/age-com/index.vue.js +0 -1
  265. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +0 -199
  266. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +0 -1
  267. package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +0 -2
  268. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +0 -1
  269. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +0 -90
  270. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +0 -1
  271. package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +0 -113
  272. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +0 -1
  273. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +0 -266
  274. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +0 -1
  275. package/es/components/table-filter/src/components/range-age/index.vue.d.ts +0 -248
  276. package/es/components/table-filter/src/components/range-age/index.vue.js +0 -1
  277. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.d.ts +0 -789
  278. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +0 -1
  279. package/es/components/table-filter/src/components/search-condition/fieldTypeList.d.ts +0 -18
  280. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +0 -1
  281. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +0 -1244
  282. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +0 -1
  283. package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +0 -1651
  284. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +0 -1
  285. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +0 -1
  286. package/es/components/table-filter/src/const/dataOptions.d.ts +0 -36
  287. package/es/components/table-filter/src/const/dataOptions.js +0 -1
  288. package/es/components/table-filter/src/const/index.d.ts +0 -5
  289. package/es/components/table-filter/src/const/index.js +0 -1
  290. package/es/components/table-filter/src/directive/preventReClick.d.ts +0 -4
  291. package/es/components/table-filter/src/directive/preventReClick.js +0 -1
  292. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +0 -8
  293. package/es/components/table-filter/src/hooks/useTableSearchCon.js +0 -1
  294. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +0 -12
  295. package/es/components/table-filter/src/hooks/useWordBookutils.js +0 -1
  296. package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +0 -1942
  297. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +0 -1
  298. package/es/components/table-filter/src/tool/time-domain.d.ts +0 -39
  299. package/es/components/table-filter/src/tool/time-domain.js +0 -1
  300. package/es/components/table-filter/src/tool/utils.d.ts +0 -4
  301. package/es/components/table-filter/src/tool/utils.js +0 -1
  302. package/es/components/table-filter/style/index.css +0 -1
  303. package/es/components/{table-filter → base-search}/src/directive/resize.d.ts +0 -0
  304. package/es/components/{table-filter → base-search}/src/directive/resize.js +0 -0
  305. package/es/components/{table-filter → base-search}/src/tool/resizeSensor.d.ts +0 -0
  306. package/es/components/{table-filter → base-search}/src/tool/resizeSensor.js +0 -0
  307. package/es/components/{table-filter → classification}/src/directive/flexibleResize.d.ts +0 -0
  308. package/es/components/{table-filter → classification}/src/directive/flexibleResize.js +0 -0
  309. package/es/components/{iho-table/src/plugins/filterPlugin/types.js → config-provider/src/interface.js} +0 -0
  310. package/es/components/info-header/src/{HiddenContent.vue.d.ts → components/infoDescription/HiddenContent.vue.d.ts} +2 -2
  311. package/es/components/info-header/src/{InfoEllipsis.vue.d.ts → components/infoDescription/InfoEllipsis.vue.d.ts} +1 -1
  312. /package/es/components/table-filter/src/tool/{options.d.ts → baseOptions.d.ts} +0 -0
  313. /package/es/components/table-filter/src/tool/{options.js → baseOptions.js} +0 -0
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as s}from"../../shared/global/variable.js";import{safeComponentRegister as c}from"../../shared/utils/index.js";export{useAdvanced}from"./src/hooks/useAdvanced.js";import o from"./src/base-search-com/BaseSearch.vue.js";import i from"./src/quick-search/QuickSearch.vue.js";import r from"./src/classification/Classification-com.vue.js";const a=o;a.install=function(o){c(o,a,s+"BaseSearch")};const e=i;e.install=function(o){c(o,e,s+"QuickSearch")};const t=r;t.install=function(o){c(o,t,s+"Classification")};export{a as CBaseSearch,t as CClassification,e as CQuickSearch};
1
+ import"./src/hooks/useAdvanced.js";
@@ -30,8 +30,8 @@ declare const _default: import("vue").DefineComponent<{
30
30
  "onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
31
31
  }>>;
32
32
  emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
33
- valueCp: import("vue").WritableComputedRef<unknown>;
34
- presetValCp: import("vue").WritableComputedRef<unknown>;
33
+ valueCp: import("vue").WritableComputedRef<any>;
34
+ presetValCp: import("vue").WritableComputedRef<string>;
35
35
  widgetType: import("vue").ComputedRef<any>;
36
36
  optionSetting: import("vue").ComputedRef<any>;
37
37
  mappingConfig: import("vue").ComputedRef<any>;
@@ -49,6 +49,7 @@ declare const _default: import("vue").DefineComponent<{
49
49
  SELECT: string;
50
50
  DATE: string;
51
51
  DATE_TIME: string;
52
+ CHECKBOX_GROUP: string;
52
53
  };
53
54
  WidgetValEnums: {
54
55
  CUSTOM: string;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,openBlock as a,createElementBlock as t,unref as u,createBlock as r,isRef as o,createCommentVNode as p,Fragment as n,createVNode as v}from"vue";import{NInputNumber as i,NInput as m,NSelect as s,NDatePicker as f}from"naive-ui";import{WidgetTypeEnums as d,WidgetValEnums as y,WidgetOptionEnums as g}from"../../types/enums.js";import{generateDefOptionsInApi as T}from"../../tool/generateDefOptions.js";import c from"../../../../../_virtual/plugin-vue_export-helper.js";const C={class:"value-cfg_wrapper"};var U=c(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:c}){const U=e,E=l({set(e){c("update:modelValue",e)},get:()=>U.modelValue}),V=l({set(e){c("update:presetVal",e)},get:()=>U.presetVal}),_=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.type})),M=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.optionSetting})),x=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.mappingConfig})),S=l((()=>{const e=T(_.value,x.value).slice(0);return _.value!==d.DATE&&_.value!==d.DATE_TIME||e.unshift({label:"自定义输入",value:y.CUSTOM}),e}));return(e,l)=>(a(),t("div",C,[u(_)===u(d).INPUT_NUMBER?(a(),r(u(i),{key:0,class:"form-item",value:u(E),"onUpdate:value":l[0]||(l[0]=e=>o(E)?E.value=e:null)},null,8,["value"])):p("v-if",!0),u(_)===u(d).INPUT?(a(),r(u(m),{key:1,value:u(E),"onUpdate:value":l[1]||(l[1]=e=>o(E)?E.value=e:null),maxlength:"255",clearable:""},null,8,["value"])):p("v-if",!0),u(_)===u(d).SELECT?(a(),r(u(s),{key:2,style:{width:"120px"},class:"form-item",value:u(E),"onUpdate:value":l[2]||(l[2]=e=>o(E)?E.value=e:null),filterable:"",options:u(S),multiple:u(M)===u(g).MULTIPLE,maxTagCount:1},null,8,["value","options","multiple"])):p("v-if",!0),u(_)===u(d).DATE||u(_)===u(d).DATE_TIME?(a(),t(n,{key:3},[v(u(s),{style:{width:"120px"},class:"form-item",value:u(V),"onUpdate:value":l[3]||(l[3]=e=>o(V)?V.value=e:null),options:u(S)},null,8,["value","options"]),u(V)===u(y).CUSTOM?(a(),r(u(f),{key:0,class:"form-item",type:u(_).toLowerCase(),format:"yyyy-MM-dd HH:mm:ss","formatted-value":u(E),"onUpdate:formatted-value":l[4]||(l[4]=e=>o(E)?E.value=e:null)},null,8,["type","formatted-value"])):p("v-if",!0)],64)):p("v-if",!0)]))}}),[["__file","ValueCfg.vue"]]);export{U as default};
1
+ import{defineComponent as e,computed as l,openBlock as a,createElementBlock as t,unref as u,createBlock as o,isRef as r,createCommentVNode as p,Fragment as n,createVNode as v}from"vue";import{NInputNumber as i,NInput as m,NSelect as s,NDatePicker as f}from"naive-ui";import{WidgetTypeEnums as d,WidgetValEnums as y,WidgetOptionEnums as g}from"../../types/enums.js";import{generateDefOptionsInApi as T}from"../../tool/generateDefOptions.js";import c from"../../../../../_virtual/plugin-vue_export-helper.js";const C={class:"value-cfg_wrapper"};var U=c(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:c}){const U=e,E=l({set(e){c("update:modelValue",e)},get:()=>U.modelValue}),V=l({set(e){c("update:presetVal",e)},get:()=>U.presetVal}),_=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.type})),b=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.optionSetting})),M=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.mappingConfig})),x=l((()=>{const e=T(_.value,M.value).slice(0);return _.value!==d.DATE&&_.value!==d.DATE_TIME||e.unshift({label:"自定义输入",value:y.CUSTOM}),e}));return(e,l)=>(a(),t("div",C,[u(_)===u(d).INPUT_NUMBER?(a(),o(u(i),{key:0,class:"form-item",value:u(E),"onUpdate:value":l[0]||(l[0]=e=>r(E)?E.value=e:null)},null,8,["value"])):p("v-if",!0),u(_)===u(d).INPUT?(a(),o(u(m),{key:1,value:u(E),"onUpdate:value":l[1]||(l[1]=e=>r(E)?E.value=e:null),maxlength:"255",clearable:""},null,8,["value"])):p("v-if",!0),u(_)===u(d).SELECT?(a(),o(u(s),{key:2,style:{width:"120px"},class:"form-item",value:u(E),"onUpdate:value":l[2]||(l[2]=e=>r(E)?E.value=e:null),to:"body",filterable:"",options:u(x),multiple:u(b)===u(g).MULTIPLE,maxTagCount:1},null,8,["value","options","multiple"])):p("v-if",!0),u(_)===u(d).DATE||u(_)===u(d).DATE_TIME?(a(),t(n,{key:3},[v(u(s),{style:{width:"120px"},class:"form-item",to:"body",value:u(V),"onUpdate:value":l[3]||(l[3]=e=>r(V)?V.value=e:null),options:u(x)},null,8,["value","options"]),u(V)===u(y).CUSTOM?(a(),o(u(f),{key:0,class:"form-item",type:u(_).toLowerCase(),format:"yyyy-MM-dd HH:mm:ss","formatted-value":u(E),"onUpdate:formatted-value":l[4]||(l[4]=e=>r(E)?E.value=e:null),to:"body"},null,8,["type","formatted-value"])):p("v-if",!0)],64)):p("v-if",!0)]))}}),[["__file","ValueCfg.vue"]]);export{U as default};
@@ -1,47 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  import { ISearchConfigType } from '../../../../../../../es/components/table-filter/src/types';
3
- export declare const getTableAdvancedFilterCfg: (tableListId: string) => Promise<({
4
- name: string;
5
- title: string;
6
- dataType: string;
7
- type: string;
8
- isShowSearch: boolean;
9
- filterExplicit: boolean;
10
- explicitRequired: boolean;
11
- optionType?: undefined;
12
- optionInfo?: undefined;
13
- defaultValue?: undefined;
14
- } | {
15
- name: string;
16
- title: string;
17
- dataType: string;
18
- type: string;
19
- optionType: string;
20
- isShowSearch: boolean;
21
- filterExplicit: boolean;
22
- explicitRequired: boolean;
23
- optionInfo: {
24
- list: {
25
- name: string;
26
- value: string;
27
- }[];
28
- };
29
- defaultValue?: undefined;
30
- } | {
31
- name: string;
32
- title: string;
33
- dataType: string;
34
- type: string;
35
- isShowSearch: boolean;
36
- filterExplicit: boolean;
37
- explicitRequired: boolean;
38
- defaultValue: {
39
- unit: string;
40
- };
41
- optionType?: undefined;
42
- optionInfo?: undefined;
43
- })[]>;
44
- export declare const useFilterConditions: (filterConditions: Ref, dataType: string) => {
3
+ export declare const useFilterConditions: (filterConditions: Ref, selectList: any, dataType: string) => {
45
4
  State: any;
46
5
  paramOptions: import("vue").ComputedRef<any>;
47
6
  addFilterCondition: () => void;
@@ -1 +1 @@
1
- import{reactive as e,computed as t,toRaw as i,unref as a}from"vue";import{ConditionEnums as l,WidgetTypeEnums as n,WidgetOptionEnums as r}from"../../../types/enums.js";import{transformConditions as o,transformRawConditions as p,transformDataToFront as u}from"../../../tool/transformData.js";const T=async e=>await([{name:"ruleCode",title:"规则标识",dataType:"TEXT",type:"TEXT",isShowSearch:!0,filterExplicit:!1,explicitRequired:!1},{name:"batchNumber",title:"批次号",dataType:"TEXT",type:"TEXT",isShowSearch:!0,filterExplicit:!0,explicitRequired:!1},{name:"result",title:"执行结果",dataType:"TEXT",type:"SELECT",optionType:"SELECT_SINGLE",isShowSearch:!0,filterExplicit:!0,explicitRequired:!1,optionInfo:{list:[{name:"成功下拉框",value:"true"},{name:"失败下拉框",value:"false"}]}},{name:"startTime",title:"开始时间",dataType:"DATE",type:"DATE",isShowSearch:!0,filterExplicit:!0,explicitRequired:!1,defaultValue:{unit:"THIS_WEEK_START"}},{name:"endTime",title:"结束时间",dataType:"DATETIME",type:"DATETIME",isShowSearch:!0,filterExplicit:!0,explicitRequired:!1,defaultValue:{unit:"THIS_WEEK_END"}},{name:"keyword",title:"关键字",dataType:"TEXT",type:"TEXT",isShowSearch:!0,filterExplicit:!0,explicitRequired:!1}]),s=(s,c)=>{const E=e({params:[]}),d=t((()=>E.params.map((({p_name:e,title:t})=>({label:t||e,value:e}))))),m=e=>E.params.find((t=>t.p_name===e)),y=(e,t)=>{const i=s.value[e];i&&(i.condition=t,(e=>{const t=m(e.key);e.value=(null==t?void 0:t.type)===n.SELECT&&(null==t?void 0:t.optionSetting)===r.MULTIPLE?[]:null,e.timeVal=null})(i))};return{State:E,paramOptions:d,addFilterCondition:()=>{s.value.push({key:null,condition:null,value:null,presetVal:null})},delFilterCondition:e=>{s.value.splice(e,1)},updateKey:(e,t)=>{const i=s.value[e];i&&(i.key=t,y(e,l.EQUAL))},updateCondition:y,getParamCfg:m,initFilterConditions:async(e,t)=>{const a=await(async e=>{try{const e=await T();return u(c,e)}catch(e){return[]}})();E.params=a,s.value=o(t,i(E.params))},getRawFilterConditions:()=>p(a(s))}};export{T as getTableAdvancedFilterCfg,s as useFilterConditions};
1
+ import{reactive as t,computed as n,toRaw as a,unref as e}from"vue";import{ConditionEnums as l,WidgetTypeEnums as o,WidgetOptionEnums as i}from"../../../types/enums.js";import{transformConditions as r,transformRawConditions as s,transformDataToFront as u}from"../../../tool/transformData.js";const p=(p,m,d)=>{const c=t({params:[]}),v=n((()=>c.params.map((({p_name:t,title:n})=>({label:n||t,value:t}))))),y=t=>c.params.find((n=>n.p_name===t)),C=(t,n)=>{const a=p.value[t];a&&(a.condition=n,(t=>{const n=y(t.key);t.value=(null==n?void 0:n.type)===o.SELECT&&(null==n?void 0:n.optionSetting)===i.MULTIPLE?[]:null,t.timeVal=null})(a))};return{State:c,paramOptions:v,addFilterCondition:()=>{p.value.push({key:null,condition:null,value:null,presetVal:null})},delFilterCondition:t=>{p.value.splice(t,1)},updateKey:(t,n)=>{const a=p.value[t];a&&(a.key=n,C(t,l.EQUAL))},updateCondition:C,getParamCfg:y,initFilterConditions:async(t,n)=>{const e=await(async t=>{try{return u(d,m)}catch(t){return[]}})();c.params=e,p.value=r(n,a(c.params))},getRawFilterConditions:()=>s(e(p))}};export{p as useFilterConditions};
@@ -13,6 +13,10 @@ declare const _default: import("vue").DefineComponent<{
13
13
  type: StringConstructor;
14
14
  default: string;
15
15
  };
16
+ searchFieldList: {
17
+ type: ArrayConstructor;
18
+ default: () => never[];
19
+ };
16
20
  showItemName: {
17
21
  type: BooleanConstructor;
18
22
  default: boolean;
@@ -36,6 +40,10 @@ declare const _default: import("vue").DefineComponent<{
36
40
  type: StringConstructor;
37
41
  default: string;
38
42
  };
43
+ searchFieldList: {
44
+ type: ArrayConstructor;
45
+ default: () => never[];
46
+ };
39
47
  showItemName: {
40
48
  type: BooleanConstructor;
41
49
  default: boolean;
@@ -45,10 +53,10 @@ declare const _default: import("vue").DefineComponent<{
45
53
  default: boolean;
46
54
  };
47
55
  }>> & {
48
- onSaveAdd?: ((...args: any[]) => any) | undefined;
49
56
  onCancelSaveAdd?: ((...args: any[]) => any) | undefined;
57
+ onSaveAdd?: ((...args: any[]) => any) | undefined;
50
58
  }>>;
51
- emit: (event: "saveAdd" | "cancelSaveAdd", ...args: any[]) => void;
59
+ emit: (event: "cancelSaveAdd" | "saveAdd", ...args: any[]) => void;
52
60
  $attrs: {
53
61
  [x: string]: unknown;
54
62
  };
@@ -110,48 +118,6 @@ declare const _default: import("vue").DefineComponent<{
110
118
  AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
111
119
  AddCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
112
120
  CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
113
- SvgIcon: import("vue").DefineComponent<{
114
- iconClass: {
115
- type: StringConstructor;
116
- required: true;
117
- default: string;
118
- };
119
- title: {
120
- type: StringConstructor;
121
- required: false;
122
- default: string;
123
- };
124
- className: {
125
- type: StringConstructor;
126
- required: false;
127
- };
128
- }, {
129
- props: {
130
- iconClass: string;
131
- title: string;
132
- className?: string | undefined;
133
- };
134
- iconName: import("vue").ComputedRef<string>;
135
- svgClass: import("vue").ComputedRef<string>;
136
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
137
- iconClass: {
138
- type: StringConstructor;
139
- required: true;
140
- default: string;
141
- };
142
- title: {
143
- type: StringConstructor;
144
- required: false;
145
- default: string;
146
- };
147
- className: {
148
- type: StringConstructor;
149
- required: false;
150
- };
151
- }>>, {
152
- title: string;
153
- iconClass: string;
154
- }>;
155
121
  ValueCfg: import("vue").DefineComponent<{
156
122
  paramCfg: {
157
123
  type: ObjectConstructor;
@@ -184,8 +150,8 @@ declare const _default: import("vue").DefineComponent<{
184
150
  "onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
185
151
  }>>;
186
152
  emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
187
- valueCp: import("vue").WritableComputedRef<unknown>;
188
- presetValCp: import("vue").WritableComputedRef<unknown>;
153
+ valueCp: import("vue").WritableComputedRef<any>;
154
+ presetValCp: import("vue").WritableComputedRef<string>;
189
155
  widgetType: import("vue").ComputedRef<any>;
190
156
  optionSetting: import("vue").ComputedRef<any>;
191
157
  mappingConfig: import("vue").ComputedRef<any>;
@@ -203,6 +169,7 @@ declare const _default: import("vue").DefineComponent<{
203
169
  SELECT: string;
204
170
  DATE: string;
205
171
  DATE_TIME: string;
172
+ CHECKBOX_GROUP: string;
206
173
  };
207
174
  WidgetValEnums: {
208
175
  CUSTOM: string;
@@ -271,7 +238,7 @@ declare const _default: import("vue").DefineComponent<{
271
238
  label: string;
272
239
  value: string;
273
240
  }[];
274
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("saveAdd" | "cancelSaveAdd")[], "saveAdd" | "cancelSaveAdd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
241
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancelSaveAdd" | "saveAdd")[], "cancelSaveAdd" | "saveAdd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
275
242
  actionList_prop: {
276
243
  type: PropType<IClassifyListType>;
277
244
  default: () => {};
@@ -284,6 +251,10 @@ declare const _default: import("vue").DefineComponent<{
284
251
  type: StringConstructor;
285
252
  default: string;
286
253
  };
254
+ searchFieldList: {
255
+ type: ArrayConstructor;
256
+ default: () => never[];
257
+ };
287
258
  showItemName: {
288
259
  type: BooleanConstructor;
289
260
  default: boolean;
@@ -293,13 +264,14 @@ declare const _default: import("vue").DefineComponent<{
293
264
  default: boolean;
294
265
  };
295
266
  }>> & {
296
- onSaveAdd?: ((...args: any[]) => any) | undefined;
297
267
  onCancelSaveAdd?: ((...args: any[]) => any) | undefined;
268
+ onSaveAdd?: ((...args: any[]) => any) | undefined;
298
269
  }, {
270
+ searchFieldList: unknown[];
299
271
  tableId: string;
272
+ conditionList: unknown[];
300
273
  actionList_prop: IClassifyListType;
301
274
  showItemName: boolean;
302
- conditionList: unknown[];
303
275
  hideAddBtn: boolean;
304
276
  }>;
305
277
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as a,reactive as i,ref as l,toRef as t,openBlock as o,createElementBlock as n,createVNode as s,unref as d,withCtx as r,createElementVNode as p,createCommentVNode as c,Fragment as u,renderList as m,normalizeClass as y,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 _,NButton as w,NSelect as L,NTooltip as x}from"naive-ui";import{CloseOutline as U,AddOutline as N,AddCircleSharp as I}from"@vicons/ionicons5";import V from"../../../../../shared/components/SvgIcon/SvgIcon.vue.js";import D from"./ValueCfg.vue.js";import{DataTypeEnums as j,ConditionEnums as B}from"../../types/enums.js";import{useDisplayCategory as S}from"./hooks/useDisplayCategory.js";import{useFilterConditions as F}from"./hooks/useFilterConditions.js";import{conditionOptions as O}from"./helpers/options.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const P={class:"searchConditionByApi_wrapper"},E={class:"inner-content"},R={key:0,class:"item-name"},J=p("span",{class:"label"},"筛选分类名称:",-1),K={key:1,class:"parent-names"},M=p("span",{class:"label"},"父类名称:",-1),Q=["onDblclick","onClick"],q={key:0,class:"s-content"},G={key:2,class:"item-name"},H=p("span",{class:"label"}," 过滤条件: ",-1),T=p("span",null,"添加",-1),W={class:"item-list"},X={class:"index-span"};var Y=z(e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:z,emit:Y}){const Z=e,$=k(),ee=a(),ae=i({className:"",displayCategory:"",filterConditions:[]}),ie=l(!1),{State:le,isEnableAddDisplayCategory:te,editDisplayCategory:oe,handleDisplayCategorySelect:ne,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:pe}=S(t(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:ce,paramOptions:ue,addFilterCondition:me,delFilterCondition:ye,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=F(t(ae,"filterConditions"),j.API);function ke(){ae.className="",ae.displayCategory="",ae.filterConditions=[]}async function be(){var e;try{if(ke(),ie.value=!0,pe(ee.displayCategoryList,Z.actionList_prop.displayCategory||"custom"),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&&me()}}finally{ie.value=!1}}return be(),z({handleInitConditions:be,saveAdd:function(){new Promise((e=>{ae.className||!Z.showItemName?0!==ae.filterConditions.length?ae.filterConditions.some((({key:e,condition:a,value:i,presetVal:l})=>!e||!a||a===B.EQUAL&&!i&&!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 i={displayCategory:ae.displayCategory,name:ae.className||"",conObj:he()},l={id:e?e.sid:"",tableId:Z.tableId,setting:JSON.stringify(i)};Y("saveAdd",l,!1)}))},cancelSaveAdd:function(){ke(),Y("cancelSaveAdd")},addAction:me,checkActionList:function(){return ae.filterConditions.every((e=>!e.field_key))}}),(a,i)=>(o(),n("div",P,[s(d(b),{show:ie.value},{default:r((()=>[p("div",E,[e.showItemName?(o(),n("div",R,[J,s(d(A),{value:ae.className,"onUpdate:value":i[0]||(i[0]=e=>ae.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):c("v-if",!0),e.showItemName?(o(),n("div",K,[M,(o(!0),n(u,null,m(d(le).displayCategories,((e,a)=>(o(),n("div",{class:y(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(oe)(a,e),onClick:a=>function(e){ne(e)}(e)},[e.disabled?(o(),n("div",q,[p("span",null,v(e.value),1)])):(o(),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(_),{component:d(U),class:"anticon-close",size:"20",onClick:i=>d(se)(a,e)},null,8,["component","onClick"])],42,Q)))),128)),d(te)?(o(),n(u,{key:0},[g(s(d(w),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(_),{component:d(N),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":i[1]||(i[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)):c("v-if",!0)])):c("v-if",!0),e.hideAddBtn?c("v-if",!0):(o(),n("div",G,[H,p("span",{class:"addAction",onClick:i[2]||(i[2]=(...e)=>d(me)&&d(me)(...e)),style:{cursor:"pointer"}},[s(d(_),{component:d(I),class:"blue",size:"18"},null,8,["component"]),T])])),p("ul",W,[(o(!0),n(u,null,m(ae.filterConditions,((e,a)=>(o(),n("li",{key:a},[p("span",X,v(a+1)+"   ",1),c(" 选择 field_key "),s(d(L),{class:"form-item",placeholder:"请选择",value:e.key,filterable:"",options:d(ue),"onUpdate:value":e=>d(ve)(a,e)},null,8,["value","options","onUpdate:value"]),c(" 选择 关系 "),e.key?(o(),f(d(L),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,filterable:"",options:d(O),"onUpdate:value":e=>d(fe)(a,e)},null,8,["value","options","onUpdate:value"])):c("v-if",!0),c(" 自定义 "),e.key&&e.condition&&e.condition!==d(B).NULL?(o(),f(D,{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"])):c("v-if",!0),s(d(x),{title:"删除",trigger:"hover"},{trigger:r((()=>[s(d(V),{onClick:e=>d(ye)(a),"class-name":"svg-icon-btn is-danger form-action","icon-class":"xitongtubiaoliebiaocaozuoanniushanchushixin"},null,8,["onClick"])])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{Y as default};
1
+ import{defineComponent as e,useAttrs as a,reactive as t,ref as l,toRef as i,openBlock as o,createElementBlock as n,createVNode as s,unref as d,withCtx as r,createElementVNode as p,createCommentVNode as c,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 _,NSelect as w,NTooltip as U}from"naive-ui";import{CloseOutline as N,AddOutline as x,AddCircleSharp as V}from"@vicons/ionicons5";import D from"./ValueCfg.vue.js";import{DataTypeEnums as B,ConditionEnums as I}from"../../types/enums.js";import{useDisplayCategory as j}from"./hooks/useDisplayCategory.js";import{useFilterConditions as S}from"./hooks/useFilterConditions.js";import{conditionOptions as F}from"./helpers/options.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const O={class:"searchConditionByApi_wrapper"},P={class:"class-filter-content"},q={key:0,class:"item-name"},E=p("span",{class:"label"},"筛选分类名称:",-1),R={key:1,class:"quickSearch-content"},J=p("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],M={key:0,class:"s-content"},Q={key:2,class:"item-name"},G=p("span",{class:"label"}," 过滤条件: ",-1),H=p("span",null,"添加",-1),T={class:"select-item-list"},W={class:"index-span"},X=["onClick"];var Y=z(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:z,emit:Y}){const Z=e,$=k(),ee=a(),ae=t({className:"",displayCategory:"",filterConditions:[]}),te=l(!1),{State:le,isEnableAddDisplayCategory:ie,editDisplayCategory:oe,handleDisplayCategorySelect:ne,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:pe}=j(i(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:ce,paramOptions:ue,addFilterCondition:ye,delFilterCondition:me,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=S(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,pe(ee.displayCategoryList,Z.actionList_prop.displayCategory||"custom"),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(),z({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)=>(o(),n("div",O,[s(d(b),{show:te.value},{default:r((()=>[p("div",P,[e.showItemName?(o(),n("div",q,[E,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"])])):c("v-if",!0),e.showItemName?(o(),n("div",R,[J,(o(!0),n(u,null,y(d(le).displayCategories,((e,a)=>(o(),n("div",{class:m(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(oe)(a,e),onClick:a=>function(e){ne(e)}(e)},[e.disabled?(o(),n("div",M,[p("span",null,v(e.value),1)])):(o(),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,K)))),128)),d(ie)?(o(),n(u,{key:0},[g(s(d(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(L),{component:d(x),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)):c("v-if",!0)])):c("v-if",!0),e.hideAddBtn?c("v-if",!0):(o(),n("div",Q,[G,p("span",{class:"addAction",onClick:t[2]||(t[2]=(...e)=>d(ye)&&d(ye)(...e)),style:{cursor:"pointer"}},[s(d(L),{component:d(V),class:"blue",size:"18"},null,8,["component"]),H])])),p("ul",T,[(o(!0),n(u,null,y(ae.filterConditions,((e,a)=>(o(),n("li",{key:a},[p("span",W,v(a+1)+"   ",1),c(" 选择 field_key "),s(d(w),{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"]),c(" 选择 关系 "),e.key?(o(),f(d(w),{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"])):c("v-if",!0),c(" 自定义 "),e.key&&e.condition&&e.condition!==d(I).NULL?(o(),f(D,{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"])):c("v-if",!0),s(d(U),{title:"删除",trigger:"hover"},{trigger:r((()=>[p("i",{onClick:e=>d(me)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,X)])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{Y as default};
@@ -1,11 +1,3 @@
1
- export declare const WidgetTypeEnums: {
2
- INPUT_NUMBER: string;
3
- INPUT: string;
4
- SELECT: string;
5
- DATE: string;
6
- DATE_TIME: string;
7
- CHECKBOX_GROUP: string;
8
- };
9
1
  export declare const DatePresetValEnums: {
10
2
  CUSTOM: string;
11
3
  NOW: string;
@@ -1 +1 @@
1
- const T={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME",CHECKBOX_GROUP:"CHECKBOX_GROUP"},E={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"};export{E as DatePresetValEnums,T as WidgetTypeEnums};
1
+ const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"};export{T as DatePresetValEnums};
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  [key: string]: any;
19
19
  }> | null;
20
20
  handleUpdate(val: any, widgetType: any, defValueUnit: any): void;
21
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange")[], "update:modelValue" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  cfg: {
23
23
  type: ObjectConstructor;
24
24
  required: true;
@@ -28,5 +28,6 @@ declare const _default: import("vue").DefineComponent<{
28
28
  };
29
29
  }>> & {
30
30
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
31
+ onOutFilterChange?: ((...args: any[]) => any) | undefined;
31
32
  }, {}>;
32
33
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"./enums.js";import{WidgetCfgMaps as r,formatItemData as a}from"./widgetCfgMaps.js";import l from"moment";import s from"../../../../../_virtual/plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var o=s(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue"],computed:{valueCp(){const{widgetType:e}=this.cfg;return[i.DATE,i.DATE_TIME].includes(e)?this.cfg.value?l(this.cfg.value).valueOf():null:this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t}=e;if(!n.includes(t))return`${e.advanceColWidth||200}px`},initComponentProps(e){const{widgetType:t,alias:i,title:a,placeholder:l,widgetCfg:s}=e,{props:n,handlerProps:o}=r.get(t);let p={...n};o&&(p=o(p,{...s,title:i||a})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e,{defValueUnit:a}=e.widgetCfg||{};if(!r.has(i))return null;const{value:l}=e,{component:s,style:n,eventsBySearch:o=[]}=r.get(i),p={...this.initialProps,value:l},u=o.reduce(((e,t)=>{const{name:i,handler:r}=t;let a=this.search;return r&&(a=e=>{r(e,this.search,p)}),{...e,[`on${i}`]:a}}),{});return t(s,{...n,...p,style:{width:this.getEleWidth(e)},value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e,i,a),...u})},handleUpdate(e,t,i){const r=a(e,t);this.$emit("update:modelValue",r)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{o as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r,formatItemData as a}from"./widgetCfgMaps.js";import l from"moment";import s from"../../../../../_virtual/plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var o=s(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","outFilterChange"],computed:{valueCp(){const{widgetType:e}=this.cfg;return[i.DATE,i.DATE_TIME].includes(e)?this.cfg.value?l(this.cfg.value).valueOf():null:this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t}=e;if(!n.includes(t))return`${e.advanceColWidth||200}px`},initComponentProps(e){const{widgetType:t,alias:i,title:a,placeholder:l,widgetCfg:s}=e,{props:n,handlerProps:o}=r.get(t);let p={...n};o&&(p=o(p,{...s,title:i||a})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e,{defValueUnit:a}=e.widgetCfg||{};if(!r.has(i))return null;const{value:l}=e,{component:s,style:n,eventsBySearch:o=[]}=r.get(i),p={...this.initialProps,value:l},u=o.reduce(((e,t)=>{const{name:i,handler:r}=t;let a=this.search;return r&&(a=e=>{r(e,this.search,p)}),{...e,[`on${i}`]:a}}),{});return t(s,{...n,...p,style:{width:this.getEleWidth(e)},value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e,i,a),...u})},handleUpdate(e,t,i){const r=a(e,t);this.$emit("update:modelValue",r)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{o as default};
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e,DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as o}from"naive-ui";import r from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import n from"moment";import{presetValToTimestamp as s}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&(console.log("点击keyup>>>>>",l),l())}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const o={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(o.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(o.multiple=!0),o},setDefaultValue:m}],[e.DATE,{component:o,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?s(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:o,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?s(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:r,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>t===e.DATE||t===e.DATE_TIME?n(l).format("YYYY-MM-DD HH:mm:ss"):l;export{u as WidgetCfgMaps,i as formatItemData};
1
+ import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as o}from"naive-ui";import r from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import s from"moment";import{presetValToTimestamp as n}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&(console.log("点击keyup>>>>>",l),l())}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const o={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(o.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(o.multiple=!0),o},setDefaultValue:m}],[e.DATE,{component:o,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:o,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:r,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>!l||t!==e.DATE&&t!==e.DATE_TIME?l:s(l).format("YYYY-MM-DD HH:mm:ss");export{u as WidgetCfgMaps,i as formatItemData};
@@ -1 +1 @@
1
- export{useAdvanced}from"./useAdvanced.js";
1
+ import"./useAdvanced.js";
@@ -1,5 +1,5 @@
1
- import { IApiServerType } from '../../../../../es/components/table-filter/src/types';
2
- export declare function useAdvanced(): {
1
+ import { IApiServerType, ISearchType } from '../../../../../es/components/table-filter/src/types';
2
+ export default function useAdvanced(): {
3
3
  transformData: (advancedFilterData: IApiServerType[]) => {
4
4
  fieldType: string;
5
5
  columnName: string;
@@ -22,7 +22,10 @@ export declare function useAdvanced(): {
22
22
  filterExplicit: number;
23
23
  explicitRequired: number;
24
24
  advanceOptionSetting: string;
25
- placeholder: string;
25
+ placeholder: string | undefined;
26
26
  advanceColWidth: string;
27
27
  }[];
28
+ getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
29
+ transformClassifyChild: (conObjList: any) => {};
30
+ transformParams: (paramsList: any) => {};
28
31
  };
@@ -1 +1 @@
1
- import{WidgetOptionEnums as t,WidgetTypeEnums as i}from"../types/enums.js";const e={[t.RADIO]:"0",[t.MULTIPLE]:"1",[t.ALL]:"0",[t.SELECT_TIME]:"1",[t.PAST_TIME]:"2",[t.FUTURE_TIME]:"3"};function l(){return{transformData:function(l){return l.map((l=>{var n,a;const{optionInfo:o={list:[]},type:u,defaultValue:r,optionType:d,filterExplicit:p}=l,s={},c={title:(v=l).title,alias:v.customTitle,isShowSearch:v.isShowSearch?1:0,filterExplicit:v.filterExplicit?1:0,explicitRequired:v.explicitRequired?1:0,advanceOptionSetting:e[v.optionType],placeholder:v.remark,advanceColWidth:String(v.width)};var v;let E,T,f=u;p?(E=u===i.SELECT&&d===t.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],T=null==r?void 0:r.unit):u===i.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(f="CHECKBOX_GROUP");const L={isRender:!0,widgetType:f,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:t,value:i})=>({value:i,label:t}))),defaultValue:E,defValueUnit:T,multiple:d===t.MULTIPLE};return{...c,fieldType:l.dataType,columnName:l.name,settingObj:s,setting:JSON.stringify(s),widgetCfg:L}}))}}}export{l as useAdvanced};
1
+ import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as l}from"../components/render-widget/enums.js";const n={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function o(){return{transformData:function(i){return i.map((i=>{var l,o;const{optionInfo:a={list:[]},type:r,defaultValue:u,optionType:s,filterExplicit:d}=i,p={},c={title:(f=i).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?n[f.optionType]:"",placeholder:f.remark,advanceColWidth:String(f.width)};var f;let m,v,T=r;d?(m=r===t.SELECT&&s===e.MULTIPLE?null==u?void 0:u.valueList:null==(l=null==u?void 0:u.valueList)?void 0:l[0],v=null==u?void 0:u.unit):r===t.SELECT&&(null==a?void 0:a.list)&&(null==a?void 0:a.list.length)<10&&(T="CHECKBOX_GROUP");const g={isRender:!0,widgetType:T,valueList:null==(o=null==a?void 0:a.list)?void 0:o.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:m,defValueUnit:v,multiple:s===e.MULTIPLE};return{...c,fieldType:i.dataType,columnName:i.name,settingObj:p,setting:JSON.stringify(p),widgetCfg:g}}))},getCacheDef:function(e,i){const{widgetType:l,widgetCfg:n}=e;return l===t.SELECT&&n.multiple?i:i[0]},transformClassifyChild:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const n=e.field_key,o=e.value&&e.value.length>1?e.value:e.value.toString();if(t[n]=o,e.unit&&e.unit!==l.CUSTOM){const l=i(e.unit,"YYYY-MM-DD HH:mm:ss");t[n]=l}})),t},transformParams:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,l=e.value&&e.value.length>1?e.value:e.value.toString();t[i]=l})),t}}}export{o as default};
@@ -1,61 +1,8 @@
1
- import { AnyObject } from '../../../../../es/shared/types';
2
- import { ISearchType, IbtnType } from '../../../../../es/components/table-filter/src/types';
1
+ import { ISearchType } from '../../../../../es/components/table-filter/src/types';
3
2
  export default function (): {
4
3
  filterApiConfig: import("vue").Ref<{}>;
5
4
  handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
6
- $utils: {
7
- /**
8
- * 获取按钮自定义颜色
9
- * @param {string} v
10
- */
11
- getBtnStyle(v: IbtnType): {
12
- 'border-color': string;
13
- color: string;
14
- 'background-color'?: undefined;
15
- } | {
16
- color: string;
17
- 'border-color'?: undefined;
18
- 'background-color'?: undefined;
19
- } | {
20
- 'background-color': string;
21
- 'border-color': string;
22
- color?: undefined;
23
- };
24
- /**
25
- * @param: 获取按钮的操作对象
26
- * @param {Object} row 行对象
27
- * @param {Object} btn 按钮
28
- */
29
- getRowOperatorIdSetting(row: any, btn: AnyObject): any;
30
- getAlphafloat(a: any, alpha?: any): number;
31
- hexToRGBA(hex: string, alpha?: any): "" | {
32
- r: any;
33
- g: any;
34
- b: any;
35
- a: number;
36
- };
37
- handleLabelColor(item: any, isSelect: boolean): {
38
- color: string;
39
- background: string;
40
- borderColor: string;
41
- };
42
- /**
43
- *
44
- * 时间转换
45
- * @param {type} type 时间戳类型
46
- * @param {time} time 时间戳
47
- */
48
- formatTime(type: string, time: any): string;
49
- isJSON(str: any): boolean;
50
- isArray(val: any): boolean;
51
- isEmpty(val: any): boolean;
52
- isString(val: any): boolean;
53
- isPlainObject(val: any): boolean;
54
- };
55
5
  outQuickSearchFn: {
56
- handleRequestedLabel(v: any): Promise<import("axios").AxiosResponse<any, any>>;
57
- handlerInitSearchItem(arr: ISearchType[], searchFieldLimit?: any): void;
58
- handleSetLabelOptions(labelType: any, el: ISearchType): void;
59
- getConObj(arr: any): any;
6
+ handlerInitSearchItem(arr: ISearchType[]): void;
60
7
  };
61
8
  };
@@ -1 +1 @@
1
- import{ref as e}from"vue";import t from"moment";import l from"../tool/time-domain.js";import r from"./useRenderWidget.js";import i from"./useTableSearchCon.js";import o from"axios";import a from"xe-utils";const{initRenderWidgetCfg:n,getRenderSearchConObj:s}=r(),{getSearchDefValueByLimit:c}=i(),u=[{label:"一星",value:"1",isSelect:!1},{label:"二星",value:"2",isSelect:!1},{label:"三星",value:"3",isSelect:!1},{label:"四星",value:"4",isSelect:!1},{label:"五星",value:"5",isSelect:!1}];function f(){const r=e({});const i={getBtnStyle:e=>"white_bg"==e.showStyle?{"border-color":e.color,color:e.color}:"none_bg"==e.showStyle?{color:e.color}:(e.showStyle,{"background-color":e.color,"border-color":e.color}),getRowOperatorIdSetting(e={},t){if(e.operatorColumn){const l=e.operatorColumn.find((e=>e.includes(t.sid)));if(t.setting&&"string"==typeof l&&l.includes("###")){const[e,r]=l.split("###");if(e&&r){const e=JSON.parse(t.setting);if(Array.isArray(e)){const l=e.find((e=>e.obj_id==r));if(l){const e=JSON.parse(JSON.stringify(t));return e.settingObj={...l},e.setting=JSON.stringify(l),e}}}}}const l=JSON.parse(JSON.stringify(t));if(this.isJSON(l.setting)){const e=JSON.parse(l.setting);if(Array.isArray(e)){const t=e[0]||{};return l.settingObj={...t},l.setting=JSON.stringify(t),l}return l}return t},getAlphafloat(e,t){if(void 0!==e)return parseFloat((e/256).toFixed(2));if(void 0!==t){if(1<t&&t<=100)return parseFloat((t/100).toFixed(2));if(0<=t&&t<=1)return parseFloat(t.toFixed(2))}return 1},hexToRGBA(e,t){if(!/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e))return console.log("Invalid HEX"),"";const l=Math.floor((e.length-1)/3),r=(i=e.slice(1),o=l,i.match(new RegExp(`.{${o}}`,"g")));var i,o;const[a,n,s,c]=r.map((e=>parseInt(e.repeat(2/e.length),16)));return{r:a,g:n,b:s,a:this.getAlphafloat(c,t)}},handleLabelColor(e,t){var l;let r="#5585f5";const i={blue:"#0000ff",sky:"#87ceeb",azure:"#f0ffff",palegreen:"#98fb98",yellow:"#ffff00",darkorange:"#ff8c00",magenta:"#ff00ff",purple:"#800080",maroon:"#800000",orange:"#ffa500",green:"#008000",red:"#ff0000",grey:"#808080"};if(null==(l=null==e?void 0:e.color)?void 0:l.includes("-")){r=i[e.color.split("-")[1]]||"#5585f5"}else r=e.color||"#5585f5";const o=this.hexToRGBA(r)||{r:85,g:133,b:245,a:1};if(t)return{color:"#fff",background:`rgba(${o.r}, ${o.g}, ${o.b})`,borderColor:`rgba(${o.r}, ${o.g}, ${o.b})`};if(e.isSelect)return{color:"#fff",background:`rgba(${o.r}, ${o.g}, ${o.b})`,borderColor:`rgba(${o.r}, ${o.g}, ${o.b})`};return{color:!(e.isPublic&&1==e.isPublic)?"rgba(28, 28, 28, 1)":"rgba(33, 33, 33, 0.6)",background:"rgba(250, 250, 250, 1)",borderColor:"rgba(213, 213, 213, 0.8)"}},formatTime(e,l){let r="";if(!l)return"";switch(e){case"DATE":r="yyyy-MM-dd";break;case"DATETIME":r="yyyy-MM-dd HH:mm:ss";break;case"TIME":r="HH:mm:ss";break;case"MOUTH":r="MM-dd";break;case"DATETIMESTR":r="yyyy年M月dd日 HH:mm";break;case"MOUTHTIME":r="M月d日 HH:mm";break;case"HM":r=" HH:mm"}return t(l).format(r)},isJSON(e){if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1},isArray:e=>Array.isArray(e),isEmpty(e){for(const t in e)return!1;return!0},isString:e=>"string"==typeof e,isPlainObject:e=>"object"==typeof e},f={handleRequestedLabel(e){const t={type:e,pageSize:1e4};return o.get("/label/list",{params:t})},handlerInitSearchItem(e,r){Array.isArray(e)&&e.forEach((e=>{var o,a,s,f,d,m,g,p,v,b;if(n(e))return;e.setting="string"==typeof e.setting?JSON.parse(e.setting):e.setting;const y=(null==(o=null==e?void 0:e.settingObj)?void 0:o.attr)||"",S=(null==(a=null==e?void 0:e.settingObj)?void 0:a.isPreciseSearch)||"",h=(null==(s=null==e?void 0:e.setting)?void 0:s.showSetting)||[],A="TEXT"==e.fieldType&&1==S?"EQ":"CL",T=e.advanceOptionSetting,E=null==(d=null==(f=null==e?void 0:e.setting)?void 0:f.wordbook)?void 0:d.id;if(null==h?void 0:h.length){let t=[];const l=e.explicitDefaultVal;if(l)if("firstOption"==l)t="0"===String(T)?0:[0];else if("0"===String(T)){const e=h.findIndex((e=>e.change_text==l));e>-1&&(t=e)}else if(Array.isArray(t)){l.split(",").forEach((e=>{const l=h.findIndex((t=>t.change_text==e));l>-1&&t.push(l)}))}e.con="CONVERT",e.com="SelectMui",e.comType="SelectMui",e.value=t;const r=null==(m=e.setting)?void 0:m.showSetting.map((e=>(e.labelName=e.change_text,e)));e.labelList=r}else if(!i.isEmpty(null==(g=e.setting)?void 0:g.wordbook)&&E){const t="tree"===(null==(v=null==(p=null==e?void 0:e.setting)?void 0:p.wordbook)?void 0:v.showType),l=t?"treeSelect":"SelectMuiWordBook",r=[];e.con="QUOTE",e.com="SelectMui",e.comType=l,e.value=r,e.dataSource=[],e.searchPageConfig={keyword:void 0,isRequest:!1,page:1,total:1,hasNextPage:!1}}else if(["MONEY","PERCENTAGE","AGE","NUMBER"].includes(y)||"NUMBER"==e.fieldType)e.con="BIGANDLESS",e.com="Number",e.lessValue="",e.bigValue="","AGE"==y&&"NUMBER"!=e.fieldType&&(e.AGEAttr=!0,e.inputUnit="岁"),"NUMBER"==e.fieldType&&"PERCENTAGE"==y&&(e.inputUnit="%");else if(["BIRTHDAY","DATE","TASKDATE"].includes(y)||["DATETIME","DATE"].includes((null==e?void 0:e.fieldType)||"")){let i=c(e,r)||[];if(e.explicitDefaultVal){const t=l.getTimeDomain(e.explicitDefaultVal);t.length>0&&(i=t)}if(e.con="IN",e.com="DatePicker",e.value=i,"BIRTHDAY"===y)e.showFormat="MM-DD",e.showTime=!1;else if(["TODAY","TOMORROW","YESTERDAY"].includes((null==e?void 0:e.explicitDefaultVal)||"")){const[l]=i;e.showFormat="YYYY-MM-DD",e.showTime=!1,e.com="DayPicker",e.value=l||t()}else e.showFormat="YYYY-MM-DD HH:mm:ss",e.showTime=!0}else if(["LABEL","EVALUATE"].includes(y))if(e.con="CL",e.com="SelectMui",e.value=[],"EVALUATE"==y){const t=u.map((e=>(e.labelName=e.label,e)));e.labelList=t}else this.handleSetLabelOptions(null==(b=e.setting)?void 0:b.labelType,e);else"PASSWORD"===y?(e.con="NUMBER"===e.fieldType?"EQ":A,e.comAttr="PASSWORD",e.PASSWORDTYPE=!0,e.value="",e.com="Text"):["DURATION"].includes(y)?(e.con="EQ",e.value="",e.com="Text",e.attr="DURATION"):(e.con=A,e.isPreciseSearch=1==S,e.value="",e.com="Text")}))},handleSetLabelOptions(e,t){this.handleRequestedLabel(e||"").then((({data:e})=>{if("SUCCESS"===e.result){const l=e.map.rows||[];t.labelList=l}})).catch((e=>console.log(e)))},getConObj(e){if(!Array.isArray(e))return[];const t=[];e.forEach((e=>{var l,r,i;const o=s(e);if(o)return void t.push(o);const n={field_key:e.columnName,con:e.con,value:"",limit_date:"",start_val:e.start_val||"",end_val:e.end_val||"",unit:e.unit||"",id:e.id};"Text"===e.com&&e.value&&(n.value=e.value,t.push(n));const c=e.advanceOptionSetting;if("SelectMui"===e.com&&a.anyNotEmpty(e.value)){"0"===String(c)&&(Array.isArray(e.value)||(e.value=[e.value]));const l=Array.isArray(e.value)&&e.value.length>0;if("SelectMuiWordBook"==e.comType&&l)n.value=e.value.join("|#|");else if("treeSelect"==e.comType){let t=e.value;"string"==typeof t?[t]=t.split("<&=&>"):Array.isArray(t)&&(t=t.map((e=>{const[t]="string"==typeof e?e.split("<&=&>"):[];return t})),t=t.join("|#|")),n.value=t}else if(l)if("CONVERT"==e.con){let t=[];t=e.value.map((t=>e.labelList[t].filter)),n.value=t}else{let t=[];t=e.value.map((t=>e.labelList[t].labelName)),n.value=t.join("|#|")}t.push(n)}if("DatePicker"===e.com&&e.value.length){const l=e.value[0].format(e.showFormat),r=e.value[1].format(e.showFormat);"BIRTHDAY"===e.settingObj.attr?n.limit_date=`${l}~${r}`:(n.start_val=l,n.end_val=r),t.push(n)}if("DayPicker"===e.com&&e.value){const l=e.value.startOf("day").format("YYYY-MM-DD HH:mm:ss"),r=e.value.endOf("day").format("YYYY-MM-DD HH:mm:ss");"BIRTHDAY"===e.settingObj.attr?n.limit_date=`${l}~${r}`:(n.start_val=l,n.end_val=r),t.push(n)}if(e.AGEAttr){n.value="",n.con="IN";const l=365*Number(e.lessValue),r=365*Number(e.bigValue);(l||0===l)&&r&&(n.start_val=l,n.end_val=r,t.push(JSON.parse(JSON.stringify(n))))}else if("Number"===e.com){let o=null!=(l=e.lessValue)?l:"",a=null!=(r=e.bigValue)?r:"";(o||a)&&("PERCENTAGE"===(null==(i=e.settingObj)?void 0:i.attr)&&(o=(o||0===o)&&Number(o)/100||"",a=(a||0===a)&&Number(a)/100),n.value=`${o}~${a}`),n.con="EQ",t.push(JSON.parse(JSON.stringify(n)))}"SelectQuote"===e.com&&e.value.length&&(n.value=e.value.join("|#|"),t.push(n))}));return t.filter((e=>e.value||e.limit_date||e.start_val||e.end_val))}};return{filterApiConfig:r,handleGetConfigApi:async function(e,t,l={},i){try{i&&(r.value=i);const o=r.value[t]||null;if("function"==typeof o){const t=await o(e,l);return Promise.resolve(t)}return Promise.reject(new Error(`${t} Is not a function`))}catch(e){return Promise.reject(e)}},$utils:i,outQuickSearchFn:f}}export{f as default};
1
+ import{ref as e}from"vue";import r from"./useRenderWidget.js";const{initRenderWidgetCfg:t,getRenderSearchConObj:n}=r();function o(){const r=e({});return{filterApiConfig:r,handleGetConfigApi:async function(e,t,n={},o){try{o&&(r.value=o);const i=r.value[t]||null;if("function"==typeof i){const r=await i(e,n);return Promise.resolve(r)}return Promise.reject(new Error(`${t} Is not a function`))}catch(e){return Promise.reject(e)}},outQuickSearchFn:{handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{t(e)}))}}}}export{o as default};
@@ -1 +1 @@
1
- import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{WidgetTypeEnums as n,DatePresetValEnums as t}from"../components/render-widget/enums.js";const r=[n.CHECKBOX_GROUP];function i(){function i(e){var n;return null==(n=e.widgetCfg)?void 0:n.isRender}function u(n){const{widgetType:t,defaultValue:r,defValueUnit:i}=n.widgetCfg||{},u=e.get(t);let l;if(u){const{setDefaultValue:e}=u;e&&(l=e(r,i))}return l}return{isRender:i,getDefValByRenderWidget:u,initRenderWidgetCfg:function(e){const n=i(e);if(!n)return n;const{widgetType:t}=e.widgetCfg||{};return e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})),e.isRender=n,e.widgetType=t,e.con="EQ",r.includes(t)&&(e._isBlock=!0),e.value=u(e),n},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:r,con:u,value:l,widgetType:d}=e;let o=null;[n.DATE,n.DATE_TIME].includes(d)&&(o=t.CUSTOM);const x=Array.isArray(l)?l:l?[l]:[];return{field_key:r,con:u,value:x.length>0?x:null,unit:o}},getDefValByRenderConObj:function(e,t){if(!i(t))return null;const{widgetType:r,multiple:u}=t.widgetCfg||{},{value:l}=e;return r!==n.SELECT&&r!==n.CHECKBOX_GROUP||!u?Array.isArray(l)?l[0]:l:Array.isArray(l)?l:l?[l]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:n,defValueUnit:t}=e.widgetCfg||{};return!(!n&&!t)},resetRenderWidgetValue:function(e){const n=i(e);return n?(e.value=null,n):n}}}export{i as default};
1
+ import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";import{WidgetTypeEnums as t}from"../types/enums.js";const r=[t.CHECKBOX_GROUP];function i(){function i(e){var n;return null==(n=e.widgetCfg)?void 0:n.isRender}function u(n){const{widgetType:t,defaultValue:r,defValueUnit:i}=n.widgetCfg||{},u=e.get(t);let l;if(u){const{setDefaultValue:e}=u;e&&(l=e(r,i))}return l}return{isRender:i,getDefValByRenderWidget:u,initRenderWidgetCfg:function(e){const n=i(e);if(!n)return n;const{widgetType:t}=e.widgetCfg||{};return e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})),e.isRender=n,e.widgetType=t,e.con="EQ",r.includes(t)&&(e._isBlock=!0),e.value=u(e),n},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:r,con:u,value:l,widgetType:o}=e;let d=null;[t.DATE,t.DATE_TIME].includes(o)&&(d=n.CUSTOM);const s=Array.isArray(l)?l:l?[l]:[];return{field_key:r,con:u,value:s.length>0?s:null,unit:d}},getDefValByRenderConObj:function(e,n){if(!i(n))return null;const{widgetType:r,multiple:u}=n.widgetCfg||{},{value:l}=e;return r!==t.SELECT&&r!==t.CHECKBOX_GROUP||!u?Array.isArray(l)?l[0]:l:Array.isArray(l)?l:l?[l]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:n,defValueUnit:t}=e.widgetCfg||{};return!(!n&&!t)},resetRenderWidgetValue:function(e){const n=i(e);return n?(e.value=null,n):n}}}export{i as default};
@@ -1 +1 @@
1
- import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as i,WidgetOptionEnums as l}from"../types/enums.js";import{widgetValOptions as t}from"./options.js";import{isNil as r}from"./utils.js";const e=(e,p={mappingMethod:null,mapping:[]},u=null)=>{var o,_;if(r(e))return[];if(e===T.SELECT){const{mapping:T,mappingMethod:i}=p;if(T&&i)return i===n.DICT?[{label:"默认选中第一项",value:E.FIRST_VAL}]:T}let A=null!=(_=null==(o=t[i.SQL])?void 0:o[e])?_:[];if(u===l.FUTURE_TIME){const T=[E.TODAY,E.TOMORROW,E.THIS_WEEK,E.NEXT_WEEK,E.THIS_MONTH,E.NEXT_MONTH,E.THIS_QUARTER,E.NEXT_QUARTER,E.THIS_YEAR,E.NEXT_YEAR];A=A.filter((({value:n})=>T.includes(n)))}if(u===l.PAST_TIME){const T=[E.TODAY,E.YESTERDAY,E.THIS_WEEK,E.LAST_WEEK,E.THIS_MONTH,E.LAST_MONTH,E.THIS_QUARTER,E.LAST_QUARTER,E.THIS_YEAR,E.LAST_YEAR];A=A.filter((({value:n})=>T.includes(n)))}return A},p=(n,E={mappingMethod:null,mapping:[]})=>{var l,e;if(r(n))return[];if(n===T.SELECT){const{mapping:T}=E;return T}return null!=(e=null==(l=t[i.API])?void 0:l[n])?e:[]};export{p as generateDefOptionsInApi,e as generateDefOptionsInSql};
1
+ import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as r,WidgetOptionEnums as t}from"../types/enums.js";import{widgetValOptions as i}from"./baseOptions.js";import{isNil as l}from"./transformData.js";const e=(e,p={mappingMethod:null,mapping:[]},o=null)=>{var u,_;if(l(e))return[];if(e===T.SELECT){const{mapping:T,mappingMethod:r}=p;if(T&&r)return r===n.DICT?[{label:"默认选中第一项",value:E.FIRST_VAL}]:T}let A=null!=(_=null==(u=i[r.SQL])?void 0:u[e])?_:[];if(o===t.FUTURE_TIME){const T=[E.TODAY,E.TOMORROW,E.THIS_WEEK,E.NEXT_WEEK,E.THIS_MONTH,E.NEXT_MONTH,E.THIS_QUARTER,E.NEXT_QUARTER,E.THIS_YEAR,E.NEXT_YEAR];A=A.filter((({value:n})=>T.includes(n)))}if(o===t.PAST_TIME){const T=[E.TODAY,E.YESTERDAY,E.THIS_WEEK,E.LAST_WEEK,E.THIS_MONTH,E.LAST_MONTH,E.THIS_QUARTER,E.LAST_QUARTER,E.THIS_YEAR,E.LAST_YEAR];A=A.filter((({value:n})=>T.includes(n)))}return A},p=(n,E={mappingMethod:null,mapping:[]})=>{var t,e;if(l(n))return[];if(n===T.SELECT){const{mapping:T}=E;return T}return null!=(e=null==(t=i[r.API])?void 0:t[n])?e:[]};export{p as generateDefOptionsInApi,e as generateDefOptionsInSql};
@@ -1,4 +1,5 @@
1
1
  import { IFilterConditionType } from '../../../../../es/components/table-filter/src/types';
2
+ export declare const isNil: (val: any) => boolean;
2
3
  /**
3
4
  * 高级筛选数据转换
4
5
  */
@@ -24,26 +25,6 @@ export declare const transformDataToFront: (dataType: string, rawData?: any[]) =
24
25
  };
25
26
  remark: any;
26
27
  _rawData: any;
27
- }[] | {
28
- dataType: string;
29
- fieldType: any;
30
- title: any;
31
- customTitle: any;
32
- optionSetting: any;
33
- openAdvancedFilter: any;
34
- filterOutDisplay: any;
35
- filterOutRequired: any;
36
- width: any;
37
- defValCfg: {
38
- value: any;
39
- presetVal: any;
40
- };
41
- mappingConfig: {
42
- mappingMethod: null;
43
- mapping: any;
44
- };
45
- remark: any;
46
- _rawData: any;
47
28
  }[];
48
29
  export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
49
30
  name: string | undefined;
@@ -65,23 +46,6 @@ export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
65
46
  list: any;
66
47
  };
67
48
  remark: string | undefined;
68
- } | {
69
- name: string | undefined;
70
- title: string;
71
- customTitle: string;
72
- type: string | undefined;
73
- dataType: string | undefined;
74
- isShowSearch: boolean;
75
- filterExplicit: boolean;
76
- explicitRequired: boolean;
77
- width: string | undefined;
78
- optionType: string | undefined;
79
- defaultValue: {
80
- valueList: any[];
81
- unit: any;
82
- };
83
- optionInfo: any;
84
- remark: string | undefined;
85
49
  } | null)[];
86
50
  export declare const transformConditions: (rawConditions: any, params: any[]) => any;
87
51
  export declare const transformRawConditions: (conditions: any[]) => {
@@ -1 +1 @@
1
- import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t,MappingMethodEnums as i}from"../types/enums.js";import{getWidgetTypeInSql as a}from"./getWidgetType.js";import{isNil as n}from"./utils.js";const u=(u,p=[])=>u===l.API?p.map((l=>{var i,a,n,p,o,r,d,y,f,m,v;const s=null!=(a=null==(i=l.optionInfo)?void 0:i.list)?a:[];return{dataType:u,p_name:l.name,p_type:l.dataType,title:l.title,customTitle:l.customTitle,type:l.type,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:l.type===e.SELECT&&l.optionType===t.MULTIPLE?null!=(p=null==(n=l.defaultValue)?void 0:n.valueList)?p:[]:null!=(d=null==(r=null==(o=l.defaultValue)?void 0:o.valueList)?void 0:r[0])?d:null,presetVal:l.type===e.SELECT&&l.optionType===t.MULTIPLE?(null==(y=l.defaultValue)?void 0:y.unit)?[null==(f=l.defaultValue)?void 0:f.unit]:[]:null!=(v=null==(m=l.defaultValue)?void 0:m.unit)?v:null},mappingConfig:{mappingMethod:null,mapping:s.map((({name:l,value:e})=>({label:l,value:e})))},remark:l.remark,_rawData:l}})):u===l.SQL?p.map((l=>{var p,o,r,d,y,f,m,v,s,T,c,g,L;let V=null;n(null==(p=l.optionInfo)?void 0:p.manualMapping)||(V=(null==(o=null==l?void 0:l.optionInfo)?void 0:o.manualMapping)?i.MANUAL:i.DICT);const A={mappingMethod:V,mapping:(null!=(d=null==(r=l.optionInfo)?void 0:r.list)?d:[]).map((({name:l,value:e})=>({label:l,value:e})))},E=a(l.dataType,A);return{dataType:u,fieldType:l.dataType,title:l.title,customTitle:l.customTitle,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:E===e.SELECT&&l.optionType===t.MULTIPLE?null!=(f=null==(y=l.defaultValue)?void 0:y.valueList)?f:[]:null!=(s=null==(v=null==(m=l.defaultValue)?void 0:m.valueList)?void 0:v[0])?s:null,presetVal:E===e.SELECT&&l.optionType===t.MULTIPLE?(null==(T=l.defaultValue)?void 0:T.unit)?[null==(c=l.defaultValue)?void 0:c.unit]:[]:null!=(L=null==(g=l.defaultValue)?void 0:g.unit)?L:null},mappingConfig:A,remark:l.remark,_rawData:l}})):[],p=e=>e.map((e=>{var t;const{title:i,customTitle:a,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:p,width:o,optionSetting:r,defValCfg:d,mappingConfig:y,remark:f,_rawData:m}=e,{value:v,presetVal:s}=d,{mapping:T}=y;if(e.dataType===l.API){const{p_name:l,p_type:d,type:y}=e;return{...m,name:l,title:i,customTitle:a,type:y,dataType:d,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(v)?v:v?[v]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:{manualMapping:null==(t=null==m?void 0:m.optionInfo)?void 0:t.manualMapping,list:T.map((({label:l,value:e})=>({name:l,value:e})))},remark:f}}if(e.dataType===l.SQL){const{title:l,fieldType:t}=e;return{...m,name:m&&m.name,title:l,customTitle:a,type:m&&m.type,dataType:t,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(v)?v:v?[v]:[],unit:Array.isArray(s)?s[0]:s},optionInfo:m&&m.optionInfo,remark:f}}return null})).filter((l=>!!l)),o=(l,i)=>l.map((l=>{var a,n;const u=((l,e)=>e.find((e=>e.p_name===l)))(l.field_key,i);let p=l.value;p&&!Array.isArray(p)&&(p=[p]);const o=(null==u?void 0:u.type)===e.SELECT&&(null==u?void 0:u.optionSetting)===t.MULTIPLE?null!=p?p:[]:null!=(a=null==p?void 0:p[0])?a:null;return{key:l.field_key,condition:l.con,value:o,presetVal:null!=(n=l.unit)?n:null}})),r=l=>l.map((l=>({field_key:l.key,con:l.condition,value:Array.isArray(l.value)?l.value:l.value?[l.value]:[],unit:l.presetVal})));export{o as transformConditions,p as transformDataToEnd,u as transformDataToFront,r as transformRawConditions};
1
+ import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t}from"../types/enums.js";const i=l=>null==l||null==l,a=(i,a=[])=>i===l.API?a.map((l=>{var a,n,u,p,o,r,d,v,y,m,s;const f=null!=(n=null==(a=l.optionInfo)?void 0:a.list)?n:[];return{dataType:i,p_name:l.name,p_type:l.dataType,title:l.title,customTitle:l.customTitle,type:l.type,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:l.type===e.SELECT&&l.optionType===t.MULTIPLE?null!=(p=null==(u=l.defaultValue)?void 0:u.valueList)?p:[]:null!=(d=null==(r=null==(o=l.defaultValue)?void 0:o.valueList)?void 0:r[0])?d:null,presetVal:l.type===e.SELECT&&l.optionType===t.MULTIPLE?(null==(v=l.defaultValue)?void 0:v.unit)?[null==(y=l.defaultValue)?void 0:y.unit]:[]:null!=(s=null==(m=l.defaultValue)?void 0:m.unit)?s:null},mappingConfig:{mappingMethod:null,mapping:f.map((({name:l,value:e})=>({label:l,value:e})))},remark:l.remark,_rawData:l}})):[],n=e=>e.map((e=>{var t;const{title:i,customTitle:a,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:p,width:o,optionSetting:r,defValCfg:d,mappingConfig:v,remark:y,_rawData:m}=e,{value:s,presetVal:f}=d,{mapping:c}=v;if(e.dataType===l.API){const{p_name:l,p_type:d,type:v}=e;return{...m,name:l,title:i,customTitle:a,type:v,dataType:d,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(s)?s:s?[s]:[],unit:Array.isArray(f)?f[0]:f},optionInfo:{manualMapping:null==(t=null==m?void 0:m.optionInfo)?void 0:t.manualMapping,list:c.map((({label:l,value:e})=>({name:l,value:e})))},remark:y}}return null})).filter((l=>!!l)),u=(l,i)=>l.map((l=>{var a,n;const u=((l,e)=>e.find((e=>e.p_name===l)))(l.field_key,i);let p=l.value;p&&!Array.isArray(p)&&(p=[p]);const o=(null==u?void 0:u.type)===e.SELECT&&(null==u?void 0:u.optionSetting)===t.MULTIPLE?null!=p?p:[]:null!=(a=null==p?void 0:p[0])?a:null;return{key:l.field_key,condition:l.con,value:o,presetVal:null!=(n=l.unit)?n:null}})),p=l=>l.map((l=>({field_key:l.key,con:l.condition,value:Array.isArray(l.value)?l.value:l.value?[l.value]:[],unit:l.presetVal})));export{i as isNil,u as transformConditions,n as transformDataToEnd,a as transformDataToFront,p as transformRawConditions};
@@ -20,6 +20,7 @@ export declare const WidgetTypeEnums: {
20
20
  SELECT: string;
21
21
  DATE: string;
22
22
  DATE_TIME: string;
23
+ CHECKBOX_GROUP: string;
23
24
  };
24
25
  export declare const WidgetOptionEnums: {
25
26
  RADIO: string;
@@ -1 +1 @@
1
- const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},S={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},O={NULL:"NULL",EQUAL:"EQ"};export{O as ConditionEnums,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,S as WidgetValEnums};
1
+ const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME",CHECKBOX_GROUP:"CHECKBOX_GROUP"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},S={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},O={NULL:"NULL",EQUAL:"EQ"};export{O as ConditionEnums,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,S as WidgetValEnums};