hy-dispatch-ui-v3 0.2.66 → 0.2.68

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 (288) hide show
  1. package/dist/tailwind.css +257 -21
  2. package/es/api/device.mjs +2 -3
  3. package/es/api/exportExcel.mjs +57 -0
  4. package/es/api/index.mjs +27 -16
  5. package/es/api/mapRail.mjs +31 -0
  6. package/es/api/organization.mjs +17 -9
  7. package/es/api/rule.mjs +30 -0
  8. package/es/api/sypct.mjs +2 -3
  9. package/es/api/task.mjs +2 -3
  10. package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +18 -19
  11. package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
  12. package/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.mjs +511 -0
  13. package/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.mjs +169 -0
  14. package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +318 -0
  15. package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +123 -0
  16. package/es/bussiness/hyElectronicFence/electronicFence.vue.mjs +358 -0
  17. package/es/bussiness/hyElectronicFence/index.mjs +13 -0
  18. package/es/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
  19. package/es/bussiness/hyMapAearchPlace/js/index.mjs +1 -1
  20. package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +4 -6
  21. package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
  22. package/es/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.mjs +270 -0
  23. package/es/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.mjs +251 -0
  24. package/es/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.mjs +251 -0
  25. package/es/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.mjs +395 -0
  26. package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +651 -0
  27. package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +357 -0
  28. package/es/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.mjs +261 -0
  29. package/es/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.mjs +360 -0
  30. package/es/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.mjs +240 -0
  31. package/es/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.mjs +258 -0
  32. package/es/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.mjs +240 -0
  33. package/es/bussiness/hyRuleSetting/index.mjs +15 -0
  34. package/es/bussiness/hyRuleSetting/js/ruleSetting.mjs +65 -0
  35. package/es/bussiness/hyRuleSetting/ruleSetting.vue.mjs +129 -0
  36. package/es/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
  37. package/es/bussiness/index.mjs +2 -0
  38. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -13
  39. package/es/components/hyAudioPlayer/js/index.mjs +9 -14
  40. package/es/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
  41. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +174 -142
  42. package/es/components/hyButton/button.vue.mjs +18 -5
  43. package/es/components/hyButton/style/button.scss +50 -74
  44. package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +119 -0
  45. package/es/components/hyCheckboxGroup/index.mjs +7 -0
  46. package/es/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
  47. package/es/components/hyConfigProvider/configProvider.vue.mjs +51 -38
  48. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +57 -62
  49. package/es/components/hyConfirmDialog/confirmMethod.mjs +24 -22
  50. package/es/components/hyCutter/cutter.vue.mjs +9 -23
  51. package/es/components/hyDatePicker/datePicker.vue.mjs +12 -17
  52. package/es/components/hyDialog/dialog.vue.mjs +5 -9
  53. package/es/components/hyDialog/style/dialog.scss +12 -13
  54. package/es/components/hyDrawer/drawer.vue.mjs +100 -0
  55. package/es/components/hyDrawer/index.mjs +7 -0
  56. package/es/components/hyDrawer/style/drawer.scss +0 -0
  57. package/es/components/hyForm/cpns/arrayItem.vue.mjs +10 -28
  58. package/es/components/hyForm/cpns/arrayItem2.vue.mjs +198 -0
  59. package/es/components/hyForm/cpns/extraItem.vue.mjs +2 -3
  60. package/es/components/hyForm/cpns/formItem.vue.mjs +149 -69
  61. package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
  62. package/es/components/hyForm/form.vue.mjs +74 -28
  63. package/es/components/hyForm/js/index.mjs +4 -8
  64. package/es/components/hyForm/js/useAppForm.mjs +4 -9
  65. package/es/components/hyForm/style/form.scss +4 -13
  66. package/es/components/hyIcon/icon.vue.mjs +3 -3
  67. package/es/components/hyIconBox/style/iconBox.scss +2 -6
  68. package/es/components/hyInput/inputSearch.vue.mjs +8 -11
  69. package/es/components/hyInput/style/inputSearch.scss +3 -0
  70. package/es/components/hyLoading/index.mjs +3 -5
  71. package/es/components/hyMap/js/index.mjs +35 -10
  72. package/es/components/hyMap/map.vue.mjs +30 -6
  73. package/es/components/hyMenu/style/menu.scss +5 -15
  74. package/es/components/hyNoPermissions/noPermissions.vue.mjs +3 -4
  75. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +3 -6
  76. package/es/components/hyOrgCascader/js/index.mjs +1 -5
  77. package/es/components/hyOrgCascader/orgCascader.vue.mjs +31 -12
  78. package/es/components/hyOrgCascader/style/orgCascader.scss +7 -0
  79. package/es/components/hyRadioGroup/radioGroup.vue.mjs +48 -41
  80. package/es/components/hyRadioGroup/style/radioGroup.scss +9 -0
  81. package/es/components/hySearch/cpns/searchItem.vue.mjs +409 -324
  82. package/es/components/hySearch/js/index.mjs +1 -4
  83. package/es/components/hySearch/js/useAppSearch.mjs +5 -10
  84. package/es/components/hySearch/search.vue.mjs +23 -20
  85. package/es/components/hySearch/style/search.scss +9 -0
  86. package/es/components/hyStatus/index.mjs +7 -0
  87. package/es/components/hyStatus/status.vue.mjs +110 -0
  88. package/es/components/hyStatus/style/status.scss +0 -0
  89. package/es/components/hyTable/cpns/columnSelect.vue.mjs +24 -28
  90. package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +8 -9
  91. package/es/components/hyTable/cpns/headerItem.vue.mjs +2 -2
  92. package/es/components/hyTable/cpns/virtualTable.vue.mjs +43 -34
  93. package/es/components/hyTable/js/index.mjs +67 -64
  94. package/es/components/hyTable/js/search.mjs +25 -1
  95. package/es/components/hyTable/js/useAppTable.mjs +3 -4
  96. package/es/components/hyTable/style/table.scss +8 -0
  97. package/es/components/hyTable/table.vue.mjs +68 -53
  98. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +13 -6
  99. package/es/components/hyTableForm/batchTableForm.vue.mjs +26 -9
  100. package/es/components/hyTableForm/js/index.mjs +2 -8
  101. package/es/components/hyTableForm/js/useAppTableForm.mjs +3 -8
  102. package/es/components/hyTableForm/style/batchTableForm.scss +26 -54
  103. package/es/components/hyTableForm/style/tableForm.scss +3 -2
  104. package/es/components/hyTableForm/tableForm.vue.mjs +160 -70
  105. package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
  106. package/es/components/hyTree/js/index.mjs +113 -72
  107. package/es/components/hyTree/style/index.css +1 -1
  108. package/es/components/hyTree/tree.vue.mjs +21 -18
  109. package/es/components/hyUserAvatar/userAvatar.vue.mjs +3 -6
  110. package/es/components/hyVideoPlayer/js/index.mjs +14 -23
  111. package/es/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
  112. package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +16 -26
  113. package/es/components/index.mjs +3 -0
  114. package/es/hooks/index.mjs +6 -2
  115. package/es/hooks/useAudioPlayerConfig.mjs +1 -3
  116. package/es/hooks/useBaseMainStore.mjs +29 -0
  117. package/es/hooks/useCurrentBus.mjs +20 -0
  118. package/es/hooks/useDialog.mjs +327 -0
  119. package/es/hooks/useExportFile.mjs +133 -0
  120. package/es/hooks/useGlobalConfig.mjs +10 -6
  121. package/es/hooks/useLocale.mjs +22 -12
  122. package/es/hooks/usePermissionMap.mjs +1 -3
  123. package/es/hooks/useResizeHandler.mjs +1 -4
  124. package/es/hooks/useResizeObserver.mjs +3 -1
  125. package/es/hooks/useSubscribe.mjs +2 -2
  126. package/es/hooks/useUserAvatarMap.mjs +1 -3
  127. package/es/hooks/useVideoPlayerConfig.mjs +1 -3
  128. package/es/index.mjs +11 -2
  129. package/es/locale/{en.mjs → en_US.mjs} +79 -4
  130. package/es/locale/index.mjs +2 -2
  131. package/es/locale/zh_CN.mjs +79 -2
  132. package/es/style/index.scss +0 -1
  133. package/es/style/tailwind.scss +7 -4
  134. package/es/utils/adaptive.mjs +1 -3
  135. package/es/utils/form.mjs +7 -10
  136. package/es/utils/handler.mjs +4 -8
  137. package/es/utils/input.mjs +8 -9
  138. package/es/utils/is.mjs +3 -1
  139. package/es/utils/map/hook/bigMap.mjs +16 -53
  140. package/es/utils/map/hook/gaode.mjs +53 -33
  141. package/es/utils/map/hook/leafletjs.mjs +38 -82
  142. package/es/utils/map/index.mjs +3 -9
  143. package/es/utils/map/js/webgis.mjs +12 -12
  144. package/es/version.mjs +1 -1
  145. package/lib/api/device.js +2 -3
  146. package/lib/api/exportExcel.js +62 -0
  147. package/lib/api/index.js +27 -16
  148. package/lib/api/mapRail.js +34 -0
  149. package/lib/api/organization.js +17 -8
  150. package/lib/api/rule.js +33 -0
  151. package/lib/api/sypct.js +2 -3
  152. package/lib/api/task.js +2 -3
  153. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +17 -18
  154. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
  155. package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +515 -0
  156. package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +173 -0
  157. package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +322 -0
  158. package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +127 -0
  159. package/lib/bussiness/hyElectronicFence/electronicFence.vue.js +362 -0
  160. package/lib/bussiness/hyElectronicFence/index.js +21 -0
  161. package/lib/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
  162. package/lib/bussiness/hyMapAearchPlace/js/index.js +1 -1
  163. package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +4 -6
  164. package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
  165. package/lib/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.js +274 -0
  166. package/lib/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.js +255 -0
  167. package/lib/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.js +255 -0
  168. package/lib/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.js +399 -0
  169. package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +655 -0
  170. package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +361 -0
  171. package/lib/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.js +265 -0
  172. package/lib/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.js +364 -0
  173. package/lib/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.js +244 -0
  174. package/lib/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.js +262 -0
  175. package/lib/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.js +244 -0
  176. package/lib/bussiness/hyRuleSetting/index.js +24 -0
  177. package/lib/bussiness/hyRuleSetting/js/ruleSetting.js +68 -0
  178. package/lib/bussiness/hyRuleSetting/ruleSetting.vue.js +133 -0
  179. package/lib/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
  180. package/lib/bussiness/index.js +21 -10
  181. package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -13
  182. package/lib/components/hyAudioPlayer/js/index.js +9 -14
  183. package/lib/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
  184. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +173 -141
  185. package/lib/components/hyButton/button.vue.js +17 -4
  186. package/lib/components/hyButton/style/button.scss +50 -74
  187. package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +123 -0
  188. package/lib/components/hyCheckboxGroup/index.js +12 -0
  189. package/lib/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
  190. package/lib/components/hyConfigProvider/configProvider.vue.js +50 -56
  191. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +56 -61
  192. package/lib/components/hyConfirmDialog/confirmMethod.js +23 -21
  193. package/lib/components/hyCutter/cutter.vue.js +8 -22
  194. package/lib/components/hyDatePicker/datePicker.vue.js +11 -16
  195. package/lib/components/hyDialog/dialog.vue.js +5 -9
  196. package/lib/components/hyDialog/style/dialog.scss +12 -13
  197. package/lib/components/hyDrawer/drawer.vue.js +104 -0
  198. package/lib/components/hyDrawer/index.js +12 -0
  199. package/lib/components/hyDrawer/style/drawer.scss +0 -0
  200. package/lib/components/hyForm/cpns/arrayItem.vue.js +9 -27
  201. package/lib/components/hyForm/cpns/arrayItem2.vue.js +202 -0
  202. package/lib/components/hyForm/cpns/extraItem.vue.js +2 -3
  203. package/lib/components/hyForm/cpns/formItem.vue.js +148 -68
  204. package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
  205. package/lib/components/hyForm/form.vue.js +69 -23
  206. package/lib/components/hyForm/js/index.js +3 -7
  207. package/lib/components/hyForm/js/useAppForm.js +4 -9
  208. package/lib/components/hyForm/style/form.scss +4 -13
  209. package/lib/components/hyIcon/icon.vue.js +3 -3
  210. package/lib/components/hyIconBox/style/iconBox.scss +2 -6
  211. package/lib/components/hyInput/inputSearch.vue.js +7 -10
  212. package/lib/components/hyInput/style/inputSearch.scss +3 -0
  213. package/lib/components/hyLoading/index.js +2 -4
  214. package/lib/components/hyMap/js/index.js +34 -9
  215. package/lib/components/hyMap/map.vue.js +29 -5
  216. package/lib/components/hyMenu/style/menu.scss +5 -15
  217. package/lib/components/hyNoPermissions/noPermissions.vue.js +3 -4
  218. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +3 -6
  219. package/lib/components/hyOrgCascader/js/index.js +1 -5
  220. package/lib/components/hyOrgCascader/orgCascader.vue.js +29 -10
  221. package/lib/components/hyOrgCascader/style/orgCascader.scss +7 -0
  222. package/lib/components/hyRadioGroup/radioGroup.vue.js +47 -40
  223. package/lib/components/hyRadioGroup/style/radioGroup.scss +9 -0
  224. package/lib/components/hySearch/cpns/searchItem.vue.js +407 -322
  225. package/lib/components/hySearch/js/index.js +1 -4
  226. package/lib/components/hySearch/js/useAppSearch.js +5 -10
  227. package/lib/components/hySearch/search.vue.js +23 -20
  228. package/lib/components/hySearch/style/search.scss +9 -0
  229. package/lib/components/hyStatus/index.js +12 -0
  230. package/lib/components/hyStatus/status.vue.js +114 -0
  231. package/lib/components/hyStatus/style/status.scss +0 -0
  232. package/lib/components/hyTable/cpns/columnSelect.vue.js +22 -26
  233. package/lib/components/hyTable/cpns/columnSelectItem.vue.js +7 -8
  234. package/lib/components/hyTable/cpns/headerItem.vue.js +2 -2
  235. package/lib/components/hyTable/cpns/virtualTable.vue.js +41 -32
  236. package/lib/components/hyTable/js/index.js +65 -61
  237. package/lib/components/hyTable/js/search.js +25 -1
  238. package/lib/components/hyTable/js/useAppTable.js +2 -3
  239. package/lib/components/hyTable/style/table.scss +8 -0
  240. package/lib/components/hyTable/table.vue.js +67 -52
  241. package/lib/components/hyTableActionButton/tableActionButton.vue.js +13 -6
  242. package/lib/components/hyTableForm/batchTableForm.vue.js +26 -9
  243. package/lib/components/hyTableForm/js/index.js +2 -8
  244. package/lib/components/hyTableForm/js/useAppTableForm.js +3 -8
  245. package/lib/components/hyTableForm/style/batchTableForm.scss +26 -54
  246. package/lib/components/hyTableForm/style/tableForm.scss +3 -2
  247. package/lib/components/hyTableForm/tableForm.vue.js +159 -69
  248. package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
  249. package/lib/components/hyTree/js/index.js +113 -72
  250. package/lib/components/hyTree/style/index.css +1 -1
  251. package/lib/components/hyTree/tree.vue.js +21 -18
  252. package/lib/components/hyUserAvatar/userAvatar.vue.js +3 -6
  253. package/lib/components/hyVideoPlayer/js/index.js +14 -23
  254. package/lib/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
  255. package/lib/components/hyVideoPlayer/videoPlayer.vue.js +16 -26
  256. package/lib/components/index.js +46 -40
  257. package/lib/hooks/index.js +17 -0
  258. package/lib/hooks/useAudioPlayerConfig.js +1 -3
  259. package/lib/hooks/useBaseMainStore.js +32 -0
  260. package/lib/hooks/useCurrentBus.js +23 -0
  261. package/lib/hooks/useDialog.js +331 -0
  262. package/lib/hooks/useExportFile.js +135 -0
  263. package/lib/hooks/useGlobalConfig.js +10 -6
  264. package/lib/hooks/useLocale.js +25 -11
  265. package/lib/hooks/usePermissionMap.js +1 -3
  266. package/lib/hooks/useResizeHandler.js +1 -4
  267. package/lib/hooks/useResizeObserver.js +3 -1
  268. package/lib/hooks/useSubscribe.js +2 -1
  269. package/lib/hooks/useUserAvatarMap.js +1 -3
  270. package/lib/hooks/useVideoPlayerConfig.js +1 -3
  271. package/lib/index.js +107 -73
  272. package/lib/locale/{en.js → en_US.js} +79 -4
  273. package/lib/locale/index.js +3 -3
  274. package/lib/locale/zh_CN.js +79 -2
  275. package/lib/style/index.scss +0 -1
  276. package/lib/style/tailwind.scss +7 -4
  277. package/lib/utils/adaptive.js +1 -3
  278. package/lib/utils/form.js +6 -9
  279. package/lib/utils/handler.js +3 -7
  280. package/lib/utils/input.js +7 -8
  281. package/lib/utils/is.js +5 -3
  282. package/lib/utils/map/hook/bigMap.js +16 -53
  283. package/lib/utils/map/hook/gaode.js +53 -33
  284. package/lib/utils/map/hook/leafletjs.js +38 -82
  285. package/lib/utils/map/index.js +3 -9
  286. package/lib/utils/map/js/webgis.js +12 -12
  287. package/lib/version.js +1 -1
  288. package/package.json +3 -2
@@ -1,9 +1,9 @@
1
- import { inject, useTemplateRef, computed, ref, reactive, toRefs, onMounted, onBeforeUnmount, unref, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, createCommentVNode, normalizeClass, renderSlot, createElementBlock, toDisplayString, Fragment, createVNode, mergeProps, withKeys, createSlots, renderList } from 'vue';
1
+ import { inject, useTemplateRef, computed, reactive, toRefs, onMounted, watch, onBeforeUnmount, unref, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode, renderSlot, createElementBlock, toDisplayString, Fragment, createVNode, mergeProps, withKeys, createSlots, renderList } from 'vue';
2
2
  import { ElFormItem, ElSelect, ElIcon, ElSelectV2, ElCascader } from 'element-plus';
3
3
  import { Loading } from '@element-plus/icons-vue';
4
4
  import '../../../utils/index.mjs';
5
5
  import '../../index.mjs';
6
- import { formContextKey, timeRangeHandler, optionsHandler, columnShowHandler, columnItemStyle, columnItemInputStyle, isDisabled, isSelectedTimeRange } from '../js/index.mjs';
6
+ import { formContextKey, optionsHandler, timeRangeHandler, columnShowHandler, columnItemStyle, columnItemInputStyle, isDisabled, isSelectedTimeRange } from '../js/index.mjs';
7
7
  import { isArray } from '../../../utils/is.mjs';
8
8
  import { setValueByProp, getValueByProp, columnPlaceholderHandler, columnLabelHandler } from '../../../utils/form.mjs';
9
9
  import { HyInput } from '../../hyInput/index.mjs';
@@ -36,7 +36,7 @@ const _sfc_main = {
36
36
  const props = __props;
37
37
  const emits = __emit;
38
38
  const formContext = inject(formContextKey);
39
- const orgCascaderRef = useTemplateRef("orgCascaderRef");
39
+ const componentRef = useTemplateRef("componentRef");
40
40
  const columnProp = computed(() => {
41
41
  let field = isArray(props.column.field) ? props.column.field[0] : props.column.field;
42
42
  return field;
@@ -75,39 +75,67 @@ const _sfc_main = {
75
75
  return {
76
76
  ...props.column.attrs,
77
77
  label: columnLabelHandler(props.column, props.model),
78
- placeholder: columnPlaceholderHandler(props.column, props.model)
78
+ placeholder: props.column.optionsError === "error" ? "\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D" : columnPlaceholderHandler(props.column, props.model)
79
79
  };
80
80
  });
81
- const optionsLoading = ref(false);
82
- const optionsError = ref("");
83
- async function obtainOptions() {
84
- if (props.column.optionsFn) {
85
- if (!props.column.optionsFn || optionsLoading.value) return;
86
- optionsLoading.value = true;
87
- optionsError.value = "";
88
- props.column.attrs.options = [];
89
- try {
90
- props.column.attrs.options = await props.column.optionsFn(
91
- props.column,
92
- props.model
93
- );
94
- optionsError.value = "";
95
- } catch (err) {
96
- optionsError.value = "error";
97
- console.error(err);
98
- }
99
- } else if (props.column.type === "org-cascader") {
100
- if (orgCascaderRef.value) {
101
- optionsLoading.value = true;
102
- optionsError.value = "";
103
- try {
104
- await orgCascaderRef.value.getData();
105
- } catch {
106
- optionsError.value = "error";
81
+ function obtainOptions(isMountedLoad = false) {
82
+ return new Promise(async (resolve, reject) => {
83
+ if (props.column.optionsFn) {
84
+ if (!props.column.optionsFn) return;
85
+ onRequesting();
86
+ if (!(isMountedLoad && props.column.isDefaultGetData === false)) {
87
+ try {
88
+ const options = await props.column.optionsFn(props.column, props.model);
89
+ onFulfilled(options);
90
+ resolve();
91
+ } catch (err) {
92
+ onRejected();
93
+ console.error(err);
94
+ reject();
95
+ }
96
+ } else {
97
+ resolve();
98
+ }
99
+ } else if (props.column.type === "org-cascader") {
100
+ if (componentRef.value) {
101
+ try {
102
+ onRequesting();
103
+ await componentRef.value.getData();
104
+ onFulfilled();
105
+ resolve();
106
+ } catch {
107
+ onRejected();
108
+ reject();
109
+ }
110
+ } else {
111
+ resolve();
107
112
  }
113
+ } else {
114
+ resolve();
108
115
  }
116
+ props.column.optionsLoading = false;
117
+ });
118
+ }
119
+ function onRequesting() {
120
+ props.column.optionsLoading = true;
121
+ props.column.optionsError = "";
122
+ props.column.attrs.options = [];
123
+ }
124
+ function onFulfilled(options = []) {
125
+ props.column.optionsLoading = false;
126
+ props.column.optionsError = "";
127
+ props.column.attrs.options = options;
128
+ }
129
+ function onRejected() {
130
+ props.column.optionsLoading = false;
131
+ props.column.optionsError = "error";
132
+ props.column.attrs.options = [];
133
+ }
134
+ function getOptionsHandler(props2, column) {
135
+ if (props2.column.optionsLoading) {
136
+ return [];
109
137
  }
110
- optionsLoading.value = false;
138
+ return optionsHandler(props2, props2.column);
111
139
  }
112
140
  function onChangeHandler(value, column) {
113
141
  const { onChange } = props.column;
@@ -115,6 +143,15 @@ const _sfc_main = {
115
143
  if (!onChange) return;
116
144
  onChange(props.column, props.model, props.index);
117
145
  }
146
+ async function onVisibleChange(value) {
147
+ if (value && props.column.optionsError === "error") {
148
+ try {
149
+ await obtainOptions();
150
+ } catch {
151
+ }
152
+ formContext?.emitOptionsStatus();
153
+ }
154
+ }
118
155
  function onKeydownEnterHander(e) {
119
156
  emits("search");
120
157
  }
@@ -140,16 +177,29 @@ const _sfc_main = {
140
177
  columnConfig,
141
178
  columnAttrs,
142
179
  obtainOptions,
143
- optionsLoading,
144
- optionsError,
180
+ optionsLoading: computed(() => columnConfig.value.optionsLoading),
181
+ optionsError: computed(() => columnConfig.value.optionsError),
145
182
  options: computed(() => {
146
- return optionsHandler(props, props.column);
183
+ return getOptionsHandler(props, props.column);
147
184
  })
148
185
  });
149
186
  onMounted(() => {
150
187
  if (propString.value) {
151
188
  formContext?.addField(context);
152
189
  }
190
+ watch(
191
+ () => formContext.model.errorMsg,
192
+ () => {
193
+ const optionsError = props.column.optionsError;
194
+ if (optionsError === "error") {
195
+ props.column.optionsError = "";
196
+ setTimeout(() => {
197
+ props.column.optionsError = "error";
198
+ }, 1);
199
+ }
200
+ },
201
+ { immediate: true, deep: true }
202
+ );
153
203
  });
154
204
  onBeforeUnmount(() => {
155
205
  formContext?.removeField(context);
@@ -160,297 +210,332 @@ const _sfc_main = {
160
210
  prop: columnProp.value
161
211
  }, {
162
212
  default: withCtx(() => [
163
- createElementVNode("div", { class: "flex bg-background-2 rounded outline outline-1 outline-transparent outline-offset-0 hover:outline-theme box-border" }, [
164
- createElementVNode(
165
- "div",
166
- {
167
- class: "flex",
168
- style: normalizeStyle(unref(columnItemStyle)(props, __props.column))
169
- },
170
- [
171
- createCommentVNode(" \u8868\u5355label "),
172
- createElementVNode(
173
- "div",
174
- {
175
- class: normalizeClass(["flex items-center text-auxiliary text-xs whitespace-nowrap", {
176
- "border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || unref(columnLabelHandler)(__props.column, props.model)
177
- }])
178
- },
179
- [
180
- __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? renderSlot(_ctx.$slots, __props.column.labelSlot, { column: columnConfig.value }, void 0, void 0, 0) : (openBlock(), createElementBlock(
181
- "span",
182
- { key: 1 },
183
- toDisplayString(unref(columnLabelHandler)(__props.column, props.model)),
184
- 1
185
- /* TEXT */
186
- ))
187
- ],
188
- 2
189
- /* CLASS */
190
- ),
191
- createCommentVNode(" \u8868\u5355\u7EC4\u4EF6 "),
192
- createElementVNode(
193
- "div",
194
- {
195
- class: normalizeClass({ "hy-search-custom-wrapper": __props.column.slot }),
196
- style: normalizeStyle(unref(columnItemInputStyle)(props, __props.column))
197
- },
198
- [
199
- createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
200
- __props.column.slot ? renderSlot(_ctx.$slots, __props.column.slot, { column: columnConfig.value }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
201
- Fragment,
202
- { key: 1 },
203
- [
204
- createCommentVNode(" \u8F93\u5165\u6846 "),
205
- createVNode(unref(HyInput), mergeProps({
206
- modelValue: bindValue.value,
207
- "onUpdate:modelValue": ($event) => bindValue.value = $event
208
- }, columnAttrs.value, {
209
- disabled: unref(isDisabled)(props, __props.column),
210
- onKeydown: withKeys(($event) => onKeydownEnterHander($event, __props.column), ["enter"]),
211
- onChange: ($event) => onChangeHandler($event, __props.column)
212
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onKeydown", "onChange"])
213
- ],
214
- 2112
215
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
216
- )) : __props.column.type === "select" ? (openBlock(), createElementBlock(
217
- Fragment,
218
- { key: 2 },
219
- [
220
- createCommentVNode(" \u9009\u62E9\u6846 "),
221
- createVNode(unref(ElSelect), mergeProps({
222
- modelValue: bindValue.value,
223
- "onUpdate:modelValue": ($event) => bindValue.value = $event
224
- }, columnAttrs.value, {
225
- disabled: unref(isDisabled)(props, __props.column),
226
- options: unref(optionsHandler)(props, __props.column),
227
- onChange: ($event) => onChangeHandler($event, __props.column)
228
- }), createSlots({
229
- _: 2
230
- /* DYNAMIC */
231
- }, [
232
- optionsLoading.value ? {
233
- name: "empty",
234
- fn: withCtx(() => [
235
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
236
- createVNode(unref(ElIcon), {
237
- size: "16",
238
- class: "is-loading text-theme"
239
- }, {
240
- default: withCtx(() => [
241
- createVNode(unref(Loading))
242
- ]),
243
- _: 1
244
- /* STABLE */
245
- }),
246
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
247
- ])
248
- ]),
249
- key: "0"
250
- } : void 0
251
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options", "onChange"])
252
- ],
253
- 2112
254
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
255
- )) : __props.column.type === "select-v2" ? (openBlock(), createElementBlock(
256
- Fragment,
257
- { key: 3 },
258
- [
259
- createCommentVNode(" \u865A\u62DF\u5316\u9009\u62E9\u6846 "),
260
- createVNode(unref(ElSelectV2), mergeProps({
261
- modelValue: bindValue.value,
262
- "onUpdate:modelValue": ($event) => bindValue.value = $event
263
- }, columnAttrs.value, {
264
- disabled: unref(isDisabled)(props, __props.column),
265
- options: unref(optionsHandler)(props, __props.column),
266
- onChange: onChangeHandler
267
- }), createSlots({
268
- _: 2
269
- /* DYNAMIC */
270
- }, [
271
- optionsLoading.value ? {
272
- name: "empty",
273
- fn: withCtx(() => [
274
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
275
- createVNode(unref(ElIcon), {
276
- size: "16",
277
- class: "is-loading text-theme"
278
- }, {
279
- default: withCtx(() => [
280
- createVNode(unref(Loading))
281
- ]),
282
- _: 1
283
- /* STABLE */
284
- }),
285
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
286
- ])
287
- ]),
288
- key: "0"
289
- } : void 0
290
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
291
- ],
292
- 2112
293
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
294
- )) : __props.column.type === "date-picker" ? (openBlock(), createElementBlock(
295
- Fragment,
296
- { key: 4 },
297
- [
298
- createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
213
+ createElementVNode(
214
+ "div",
215
+ {
216
+ class: normalizeClass(["flex bg-background-2 rounded outline outline-1 outline-transparent outline-offset-0 hover:outline-theme box-border", [
217
+ {
218
+ "!outline-danger-2 hy-el-search-item-error": __props.column.optionsError === "error"
219
+ }
220
+ ]])
221
+ },
222
+ [
223
+ createElementVNode(
224
+ "div",
225
+ {
226
+ class: "flex",
227
+ style: normalizeStyle(unref(columnItemStyle)(props, __props.column))
228
+ },
229
+ [
230
+ createCommentVNode(" \u8868\u5355label "),
231
+ createElementVNode(
232
+ "div",
233
+ {
234
+ class: normalizeClass(["flex items-center text-auxiliary text-sm whitespace-nowrap box-border", {
235
+ "border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || unref(columnLabelHandler)(__props.column, props.model)
236
+ }])
237
+ },
238
+ [
239
+ __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? renderSlot(_ctx.$slots, __props.column.labelSlot, { column: columnConfig.value }, void 0, void 0, 0) : (openBlock(), createElementBlock(
240
+ "span",
241
+ { key: 1 },
242
+ toDisplayString(unref(columnLabelHandler)(__props.column, props.model)),
243
+ 1
244
+ /* TEXT */
245
+ ))
246
+ ],
247
+ 2
248
+ /* CLASS */
249
+ ),
250
+ createCommentVNode(" \u8868\u5355\u7EC4\u4EF6 "),
251
+ createElementVNode(
252
+ "div",
253
+ {
254
+ class: normalizeClass({ "hy-search-custom-wrapper": __props.column.slot }),
255
+ style: normalizeStyle(unref(columnItemInputStyle)(props, __props.column))
256
+ },
257
+ [
258
+ createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
259
+ __props.column.slot ? renderSlot(_ctx.$slots, __props.column.slot, { column: columnConfig.value }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
260
+ Fragment,
261
+ { key: 1 },
262
+ [
263
+ createCommentVNode(" \u8F93\u5165\u6846 "),
264
+ createVNode(unref(HyInput), mergeProps({
265
+ ref_key: "componentRef",
266
+ ref: componentRef,
267
+ modelValue: bindValue.value,
268
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
269
+ }, columnAttrs.value, {
270
+ disabled: unref(isDisabled)(props, __props.column),
271
+ onKeydown: withKeys(($event) => onKeydownEnterHander($event, __props.column), ["enter"]),
272
+ onChange: ($event) => onChangeHandler($event, __props.column)
273
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onKeydown", "onChange"])
274
+ ],
275
+ 2112
276
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
277
+ )) : __props.column.type === "select" ? (openBlock(), createElementBlock(
278
+ Fragment,
279
+ { key: 2 },
280
+ [
281
+ createCommentVNode(" \u9009\u62E9\u6846 "),
282
+ createVNode(unref(ElSelect), mergeProps({
283
+ ref_key: "componentRef",
284
+ ref: componentRef,
285
+ modelValue: bindValue.value,
286
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
287
+ }, columnAttrs.value, {
288
+ disabled: unref(isDisabled)(props, __props.column),
289
+ options: getOptionsHandler(props, __props.column),
290
+ onChange: ($event) => onChangeHandler($event, __props.column),
291
+ onVisibleChange
292
+ }), createSlots({
293
+ _: 2
294
+ /* DYNAMIC */
295
+ }, [
296
+ __props.column.optionsLoading ? {
297
+ name: "empty",
298
+ fn: withCtx(() => [
299
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
300
+ createVNode(unref(ElIcon), {
301
+ size: "16",
302
+ class: "is-loading text-theme"
303
+ }, {
304
+ default: withCtx(() => [
305
+ createVNode(unref(Loading))
306
+ ]),
307
+ _: 1
308
+ /* STABLE */
309
+ }),
310
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
311
+ ])
312
+ ]),
313
+ key: "0"
314
+ } : void 0
315
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options", "onChange"])
316
+ ],
317
+ 2112
318
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
319
+ )) : __props.column.type === "select-v2" ? (openBlock(), createElementBlock(
320
+ Fragment,
321
+ { key: 3 },
322
+ [
323
+ createCommentVNode(" \u865A\u62DF\u5316\u9009\u62E9\u6846 "),
324
+ createVNode(unref(ElSelectV2), mergeProps({
325
+ ref_key: "componentRef",
326
+ ref: componentRef,
327
+ modelValue: bindValue.value,
328
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
329
+ }, columnAttrs.value, {
330
+ disabled: unref(isDisabled)(props, __props.column),
331
+ options: getOptionsHandler(props, __props.column),
332
+ onChange: onChangeHandler,
333
+ onVisibleChange
334
+ }), createSlots({
335
+ _: 2
336
+ /* DYNAMIC */
337
+ }, [
338
+ __props.column.optionsLoading ? {
339
+ name: "empty",
340
+ fn: withCtx(() => [
341
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
342
+ createVNode(unref(ElIcon), {
343
+ size: "16",
344
+ class: "is-loading text-theme"
345
+ }, {
346
+ default: withCtx(() => [
347
+ createVNode(unref(Loading))
348
+ ]),
349
+ _: 1
350
+ /* STABLE */
351
+ }),
352
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
353
+ ])
354
+ ]),
355
+ key: "0"
356
+ } : void 0
357
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
358
+ ],
359
+ 2112
360
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
361
+ )) : __props.column.type === "date-picker" ? (openBlock(), createElementBlock(
362
+ Fragment,
363
+ { key: 4 },
364
+ [
365
+ createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
366
+ ["datetimerange", "daterange", "monthrange", "yearrange"].includes(columnAttrs.value?.type) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
367
+ key: 0,
368
+ ref_key: "componentRef",
369
+ ref: componentRef,
370
+ start: bindValue.value,
371
+ "onUpdate:start": ($event) => bindValue.value = $event,
372
+ end: bindValue2.value,
373
+ "onUpdate:end": ($event) => bindValue2.value = $event,
374
+ "is-range": true,
375
+ class: "box-border",
376
+ style: { "width": "100%" },
377
+ timeRangeFill: __props.column.timeRangeFill
378
+ }, columnAttrs.value, {
379
+ disabled: unref(isDisabled)(props, __props.column),
380
+ onChange: ($event) => onChangeHandler($event, __props.column)
381
+ }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
382
+ key: 1,
383
+ ref_key: "componentRef",
384
+ ref: componentRef,
385
+ modelValue: bindValue.value,
386
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
387
+ "is-range": false,
388
+ class: "box-border",
389
+ style: { "width": "100%" },
390
+ timeRangeFill: __props.column.timeRangeFill
391
+ }, columnAttrs.value, {
392
+ disabled: unref(isDisabled)(props, __props.column),
393
+ onChange: ($event) => onChangeHandler($event, __props.column)
394
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "timeRangeFill", "disabled", "onChange"]))
395
+ ],
396
+ 64
397
+ /* STABLE_FRAGMENT */
398
+ )) : __props.column.type === "time-picker" ? (openBlock(), createElementBlock(
399
+ Fragment,
400
+ { key: 5 },
401
+ [
402
+ createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
403
+ columnAttrs.value.isRange ? (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
404
+ key: 0,
405
+ ref_key: "componentRef",
406
+ ref: componentRef,
407
+ start: bindValue.value,
408
+ "onUpdate:start": ($event) => bindValue.value = $event,
409
+ end: bindValue2.value,
410
+ "onUpdate:end": ($event) => bindValue2.value = $event,
411
+ "is-range": true,
412
+ class: "box-border",
413
+ style: { "width": "100%" }
414
+ }, columnAttrs.value, {
415
+ disabled: unref(isDisabled)(props, __props.column),
416
+ onChange: onChangeHandler
417
+ }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
418
+ key: 1,
419
+ ref_key: "componentRef",
420
+ ref: componentRef,
421
+ modelValue: bindValue.value,
422
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
423
+ "is-range": false,
424
+ class: "box-border",
425
+ style: { "width": "100%" }
426
+ }, columnAttrs.value, {
427
+ disabled: unref(isDisabled)(props, __props.column),
428
+ onChange: onChangeHandler
429
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
430
+ ],
431
+ 64
432
+ /* STABLE_FRAGMENT */
433
+ )) : __props.column.type === "org-cascader" ? (openBlock(), createElementBlock(
434
+ Fragment,
435
+ { key: 6 },
436
+ [
437
+ createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
438
+ createVNode(unref(HyOrgCascader), mergeProps({
439
+ ref_key: "componentRef",
440
+ ref: componentRef,
441
+ modelValue: bindValue.value,
442
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
443
+ }, columnAttrs.value, {
444
+ disabled: unref(isDisabled)(props, __props.column),
445
+ defaultGetData: false,
446
+ onRequesting,
447
+ onFulfilled,
448
+ onRejected,
449
+ onChange: onChangeHandler,
450
+ onVisibleChange
451
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
452
+ ],
453
+ 2112
454
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
455
+ )) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
456
+ Fragment,
457
+ { key: 7 },
299
458
  [
300
- "datetimerange",
301
- "daterange",
302
- "monthrange",
303
- "yearrange"
304
- ].includes(columnAttrs.value?.type) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
305
- key: 0,
306
- start: bindValue.value,
307
- "onUpdate:start": ($event) => bindValue.value = $event,
308
- end: bindValue2.value,
309
- "onUpdate:end": ($event) => bindValue2.value = $event,
310
- "is-range": true,
311
- style: { "width": "100%" },
312
- timeRangeFill: __props.column.timeRangeFill
313
- }, columnAttrs.value, {
314
- disabled: unref(isDisabled)(props, __props.column),
315
- onChange: ($event) => onChangeHandler($event, __props.column)
316
- }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
317
- key: 1,
318
- modelValue: bindValue.value,
319
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
320
- "is-range": false,
321
- style: { "width": "100%" },
322
- timeRangeFill: __props.column.timeRangeFill
323
- }, columnAttrs.value, {
324
- disabled: unref(isDisabled)(props, __props.column),
325
- onChange: ($event) => onChangeHandler($event, __props.column)
326
- }), null, 16, ["modelValue", "onUpdate:modelValue", "timeRangeFill", "disabled", "onChange"]))
327
- ],
328
- 64
329
- /* STABLE_FRAGMENT */
330
- )) : __props.column.type === "time-picker" ? (openBlock(), createElementBlock(
331
- Fragment,
332
- { key: 5 },
333
- [
334
- createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
335
- columnAttrs.value.isRange ? (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
336
- key: 0,
337
- start: bindValue.value,
338
- "onUpdate:start": ($event) => bindValue.value = $event,
339
- end: bindValue2.value,
340
- "onUpdate:end": ($event) => bindValue2.value = $event,
341
- "is-range": true,
342
- style: { "width": "100%" }
343
- }, columnAttrs.value, {
344
- disabled: unref(isDisabled)(props, __props.column),
345
- onChange: onChangeHandler
346
- }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
347
- key: 1,
348
- modelValue: bindValue.value,
349
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
350
- "is-range": false,
351
- style: { "width": "100%" }
352
- }, columnAttrs.value, {
353
- disabled: unref(isDisabled)(props, __props.column),
354
- onChange: onChangeHandler
355
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
356
- ],
357
- 64
358
- /* STABLE_FRAGMENT */
359
- )) : __props.column.type === "org-cascader" ? (openBlock(), createElementBlock(
360
- Fragment,
361
- { key: 6 },
362
- [
363
- createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
364
- createVNode(unref(HyOrgCascader), mergeProps({
365
- ref_key: "orgCascaderRef",
366
- ref: orgCascaderRef,
367
- modelValue: bindValue.value,
368
- "onUpdate:modelValue": ($event) => bindValue.value = $event
369
- }, columnAttrs.value, {
370
- disabled: unref(isDisabled)(props, __props.column),
371
- onChange: onChangeHandler
372
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
373
- ],
374
- 2112
375
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
376
- )) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
377
- Fragment,
378
- { key: 7 },
379
- [
380
- createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
381
- createVNode(unref(ElCascader), mergeProps({
382
- modelValue: bindValue.value,
383
- "onUpdate:modelValue": ($event) => bindValue.value = $event
384
- }, columnAttrs.value, {
385
- style: { "width": "100%" },
386
- disabled: unref(isDisabled)(props, __props.column),
387
- options: unref(optionsHandler)(props, __props.column),
388
- onChange: onChangeHandler
389
- }), createSlots({
390
- _: 2
391
- /* DYNAMIC */
392
- }, [
393
- optionsLoading.value ? {
394
- name: "empty",
395
- fn: withCtx(() => [
396
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
397
- createVNode(unref(ElIcon), {
398
- size: "16",
399
- class: "is-loading text-theme"
400
- }, {
401
- default: withCtx(() => [
402
- createVNode(unref(Loading))
403
- ]),
404
- _: 1
405
- /* STABLE */
406
- }),
407
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
408
- ])
409
- ]),
410
- key: "0"
411
- } : void 0
412
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
413
- ],
414
- 2112
415
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
416
- )) : createCommentVNode("v-if", true)
417
- ],
418
- 6
419
- /* CLASS, STYLE */
420
- )
421
- ],
422
- 4
423
- /* STYLE */
424
- ),
425
- __props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(columnAttrs.value?.type) && __props.column.timeRangeOptions?.length ? (openBlock(), createElementBlock("div", {
426
- key: 0,
427
- class: "flex text-main select-none"
428
- }, [
429
- (openBlock(true), createElementBlock(
430
- Fragment,
431
- null,
432
- renderList(__props.column.timeRangeOptions, (item, index) => {
433
- return openBlock(), createElementBlock("div", {
434
- key: index,
435
- class: normalizeClass(["border-l border-border px-[10px] cursor-pointer", {
436
- "bg-[rgba(var(--hy-theme),0.2)] text-theme font-bold": unref(isSelectedTimeRange)(__props.column, item, __props.model)
437
- }]),
438
- onClick: ($event) => onTimeRangeClickHandler(__props.column, item)
439
- }, [
440
- createElementVNode(
441
- "span",
442
- null,
443
- toDisplayString(item.label),
444
- 1
445
- /* TEXT */
446
- )
447
- ], 10, ["onClick"]);
448
- }),
449
- 128
450
- /* KEYED_FRAGMENT */
451
- ))
452
- ])) : createCommentVNode("v-if", true)
453
- ])
459
+ createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
460
+ createVNode(unref(ElCascader), mergeProps({
461
+ ref_key: "componentRef",
462
+ ref: componentRef,
463
+ modelValue: bindValue.value,
464
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
465
+ }, columnAttrs.value, {
466
+ style: { "width": "100%" },
467
+ disabled: unref(isDisabled)(props, __props.column),
468
+ options: getOptionsHandler(props, __props.column),
469
+ onChange: onChangeHandler,
470
+ onVisibleChange
471
+ }), createSlots({
472
+ _: 2
473
+ /* DYNAMIC */
474
+ }, [
475
+ __props.column.optionsLoading ? {
476
+ name: "empty",
477
+ fn: withCtx(() => [
478
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
479
+ createVNode(unref(ElIcon), {
480
+ size: "16",
481
+ class: "is-loading text-theme"
482
+ }, {
483
+ default: withCtx(() => [
484
+ createVNode(unref(Loading))
485
+ ]),
486
+ _: 1
487
+ /* STABLE */
488
+ }),
489
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
490
+ ])
491
+ ]),
492
+ key: "0"
493
+ } : void 0
494
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
495
+ ],
496
+ 2112
497
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
498
+ )) : createCommentVNode("v-if", true)
499
+ ],
500
+ 6
501
+ /* CLASS, STYLE */
502
+ )
503
+ ],
504
+ 4
505
+ /* STYLE */
506
+ ),
507
+ __props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(columnAttrs.value?.type) && __props.column.timeRangeOptions?.length ? (openBlock(), createElementBlock("div", {
508
+ key: 0,
509
+ class: "flex text-main select-none"
510
+ }, [
511
+ (openBlock(true), createElementBlock(
512
+ Fragment,
513
+ null,
514
+ renderList(__props.column.timeRangeOptions, (item, index) => {
515
+ return openBlock(), createElementBlock("div", {
516
+ key: index,
517
+ class: normalizeClass(["border-l border-border px-[10px] cursor-pointer box-border", {
518
+ "bg-[rgba(var(--hy-theme),0.2)] text-theme font-bold": unref(isSelectedTimeRange)(__props.column, item, __props.model)
519
+ }]),
520
+ onClick: ($event) => onTimeRangeClickHandler(__props.column, item)
521
+ }, [
522
+ createElementVNode(
523
+ "span",
524
+ null,
525
+ toDisplayString(item.label),
526
+ 1
527
+ /* TEXT */
528
+ )
529
+ ], 10, ["onClick"]);
530
+ }),
531
+ 128
532
+ /* KEYED_FRAGMENT */
533
+ ))
534
+ ])) : createCommentVNode("v-if", true)
535
+ ],
536
+ 2
537
+ /* CLASS */
538
+ )
454
539
  ]),
455
540
  _: 3
456
541
  /* FORWARDED */