hy-dispatch-ui-v3 0.2.67 → 0.2.69

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 (282) hide show
  1. package/dist/tailwind.css +232 -20
  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 +178 -0
  14. package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +316 -0
  15. package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +119 -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/hyElectronicFence/style/electronicFenceAssociatedUsersDialog.scss +25 -0
  20. package/es/bussiness/hyMapAearchPlace/js/index.mjs +1 -1
  21. package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +4 -6
  22. package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
  23. package/es/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.mjs +270 -0
  24. package/es/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.mjs +251 -0
  25. package/es/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.mjs +251 -0
  26. package/es/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.mjs +395 -0
  27. package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +651 -0
  28. package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +357 -0
  29. package/es/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.mjs +261 -0
  30. package/es/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.mjs +360 -0
  31. package/es/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.mjs +240 -0
  32. package/es/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.mjs +258 -0
  33. package/es/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.mjs +240 -0
  34. package/es/bussiness/hyRuleSetting/index.mjs +15 -0
  35. package/es/bussiness/hyRuleSetting/js/ruleSetting.mjs +65 -0
  36. package/es/bussiness/hyRuleSetting/ruleSetting.vue.mjs +129 -0
  37. package/es/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
  38. package/es/bussiness/index.mjs +2 -0
  39. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -13
  40. package/es/components/hyAudioPlayer/js/index.mjs +9 -14
  41. package/es/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
  42. package/es/components/hyButton/button.vue.mjs +2 -2
  43. package/es/components/hyButton/style/button.scss +48 -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 +75 -37
  61. package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
  62. package/es/components/hyForm/form.vue.mjs +58 -24
  63. package/es/components/hyForm/js/index.mjs +4 -8
  64. package/es/components/hyForm/js/useAppForm.mjs +5 -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 +29 -4
  72. package/es/components/hyMap/map.vue.mjs +17 -3
  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 +25 -11
  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 +33 -20
  82. package/es/components/hySearch/js/index.mjs +1 -4
  83. package/es/components/hySearch/js/useAppSearch.mjs +6 -10
  84. package/es/components/hySearch/search.vue.mjs +9 -16
  85. package/es/components/hySearch/style/search.scss +2 -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 +18 -28
  93. package/es/components/hyTable/js/index.mjs +56 -59
  94. package/es/components/hyTable/js/useAppTable.mjs +3 -4
  95. package/es/components/hyTable/style/table.scss +8 -0
  96. package/es/components/hyTable/table.vue.mjs +35 -41
  97. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +4 -4
  98. package/es/components/hyTableForm/batchTableForm.vue.mjs +3 -7
  99. package/es/components/hyTableForm/js/index.mjs +3 -11
  100. package/es/components/hyTableForm/js/useAppTableForm.mjs +2 -7
  101. package/es/components/hyTableForm/style/batchTableForm.scss +26 -54
  102. package/es/components/hyTableForm/style/tableForm.scss +3 -2
  103. package/es/components/hyTableForm/tableForm.vue.mjs +90 -46
  104. package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
  105. package/es/components/hyTree/js/index.mjs +13 -40
  106. package/es/components/hyTree/style/index.css +1 -1
  107. package/es/components/hyTree/tree.vue.mjs +17 -16
  108. package/es/components/hyUserAvatar/userAvatar.vue.mjs +3 -6
  109. package/es/components/hyVideoPlayer/js/index.mjs +14 -23
  110. package/es/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
  111. package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +16 -26
  112. package/es/components/index.mjs +3 -0
  113. package/es/hooks/index.mjs +6 -2
  114. package/es/hooks/useAudioPlayerConfig.mjs +1 -3
  115. package/es/hooks/useBaseMainStore.mjs +29 -0
  116. package/es/hooks/useCurrentBus.mjs +20 -0
  117. package/es/hooks/useDialog.mjs +327 -0
  118. package/es/hooks/useExportFile.mjs +133 -0
  119. package/es/hooks/useGlobalConfig.mjs +10 -6
  120. package/es/hooks/useLocale.mjs +22 -12
  121. package/es/hooks/usePermissionMap.mjs +1 -3
  122. package/es/hooks/useResizeHandler.mjs +1 -4
  123. package/es/hooks/useResizeObserver.mjs +3 -1
  124. package/es/hooks/useSubscribe.mjs +2 -2
  125. package/es/hooks/useUserAvatarMap.mjs +1 -3
  126. package/es/hooks/useVideoPlayerConfig.mjs +1 -3
  127. package/es/index.mjs +11 -2
  128. package/es/locale/{en.mjs → en_US.mjs} +81 -5
  129. package/es/locale/index.mjs +2 -2
  130. package/es/locale/zh_CN.mjs +81 -3
  131. package/es/style/tailwind.scss +7 -3
  132. package/es/utils/adaptive.mjs +1 -3
  133. package/es/utils/form.mjs +19 -12
  134. package/es/utils/handler.mjs +4 -8
  135. package/es/utils/input.mjs +8 -9
  136. package/es/utils/map/hook/bigMap.mjs +14 -53
  137. package/es/utils/map/hook/gaode.mjs +5 -20
  138. package/es/utils/map/hook/leafletjs.mjs +23 -79
  139. package/es/utils/map/index.mjs +2 -8
  140. package/es/utils/map/js/webgis.mjs +12 -12
  141. package/es/version.mjs +1 -1
  142. package/lib/api/device.js +2 -3
  143. package/lib/api/exportExcel.js +62 -0
  144. package/lib/api/index.js +27 -16
  145. package/lib/api/mapRail.js +34 -0
  146. package/lib/api/organization.js +17 -8
  147. package/lib/api/rule.js +33 -0
  148. package/lib/api/sypct.js +2 -3
  149. package/lib/api/task.js +2 -3
  150. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +17 -18
  151. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
  152. package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +515 -0
  153. package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +182 -0
  154. package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +320 -0
  155. package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +123 -0
  156. package/lib/bussiness/hyElectronicFence/electronicFence.vue.js +362 -0
  157. package/lib/bussiness/hyElectronicFence/index.js +21 -0
  158. package/lib/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
  159. package/lib/bussiness/hyElectronicFence/style/electronicFenceAssociatedUsersDialog.scss +25 -0
  160. package/lib/bussiness/hyMapAearchPlace/js/index.js +1 -1
  161. package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +4 -6
  162. package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
  163. package/lib/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.js +274 -0
  164. package/lib/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.js +255 -0
  165. package/lib/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.js +255 -0
  166. package/lib/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.js +399 -0
  167. package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +655 -0
  168. package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +361 -0
  169. package/lib/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.js +265 -0
  170. package/lib/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.js +364 -0
  171. package/lib/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.js +244 -0
  172. package/lib/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.js +262 -0
  173. package/lib/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.js +244 -0
  174. package/lib/bussiness/hyRuleSetting/index.js +24 -0
  175. package/lib/bussiness/hyRuleSetting/js/ruleSetting.js +68 -0
  176. package/lib/bussiness/hyRuleSetting/ruleSetting.vue.js +133 -0
  177. package/lib/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
  178. package/lib/bussiness/index.js +21 -10
  179. package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -13
  180. package/lib/components/hyAudioPlayer/js/index.js +9 -14
  181. package/lib/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
  182. package/lib/components/hyButton/button.vue.js +2 -2
  183. package/lib/components/hyButton/style/button.scss +48 -74
  184. package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +123 -0
  185. package/lib/components/hyCheckboxGroup/index.js +12 -0
  186. package/lib/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
  187. package/lib/components/hyConfigProvider/configProvider.vue.js +50 -56
  188. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +56 -61
  189. package/lib/components/hyConfirmDialog/confirmMethod.js +23 -21
  190. package/lib/components/hyCutter/cutter.vue.js +8 -22
  191. package/lib/components/hyDatePicker/datePicker.vue.js +11 -16
  192. package/lib/components/hyDialog/dialog.vue.js +5 -9
  193. package/lib/components/hyDialog/style/dialog.scss +12 -13
  194. package/lib/components/hyDrawer/drawer.vue.js +104 -0
  195. package/lib/components/hyDrawer/index.js +12 -0
  196. package/lib/components/hyDrawer/style/drawer.scss +0 -0
  197. package/lib/components/hyForm/cpns/arrayItem.vue.js +9 -27
  198. package/lib/components/hyForm/cpns/arrayItem2.vue.js +202 -0
  199. package/lib/components/hyForm/cpns/extraItem.vue.js +2 -3
  200. package/lib/components/hyForm/cpns/formItem.vue.js +76 -38
  201. package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
  202. package/lib/components/hyForm/form.vue.js +53 -19
  203. package/lib/components/hyForm/js/index.js +3 -7
  204. package/lib/components/hyForm/js/useAppForm.js +5 -9
  205. package/lib/components/hyForm/style/form.scss +4 -13
  206. package/lib/components/hyIcon/icon.vue.js +3 -3
  207. package/lib/components/hyIconBox/style/iconBox.scss +2 -6
  208. package/lib/components/hyInput/inputSearch.vue.js +7 -10
  209. package/lib/components/hyInput/style/inputSearch.scss +3 -0
  210. package/lib/components/hyLoading/index.js +2 -4
  211. package/lib/components/hyMap/js/index.js +29 -4
  212. package/lib/components/hyMap/map.vue.js +17 -3
  213. package/lib/components/hyMenu/style/menu.scss +5 -15
  214. package/lib/components/hyNoPermissions/noPermissions.vue.js +3 -4
  215. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +3 -6
  216. package/lib/components/hyOrgCascader/js/index.js +1 -5
  217. package/lib/components/hyOrgCascader/orgCascader.vue.js +23 -9
  218. package/lib/components/hyOrgCascader/style/orgCascader.scss +7 -0
  219. package/lib/components/hyRadioGroup/radioGroup.vue.js +47 -40
  220. package/lib/components/hyRadioGroup/style/radioGroup.scss +9 -0
  221. package/lib/components/hySearch/cpns/searchItem.vue.js +33 -20
  222. package/lib/components/hySearch/js/index.js +1 -4
  223. package/lib/components/hySearch/js/useAppSearch.js +6 -10
  224. package/lib/components/hySearch/search.vue.js +9 -16
  225. package/lib/components/hySearch/style/search.scss +2 -0
  226. package/lib/components/hyStatus/index.js +12 -0
  227. package/lib/components/hyStatus/status.vue.js +114 -0
  228. package/lib/components/hyStatus/style/status.scss +0 -0
  229. package/lib/components/hyTable/cpns/columnSelect.vue.js +22 -26
  230. package/lib/components/hyTable/cpns/columnSelectItem.vue.js +7 -8
  231. package/lib/components/hyTable/cpns/headerItem.vue.js +2 -2
  232. package/lib/components/hyTable/cpns/virtualTable.vue.js +17 -27
  233. package/lib/components/hyTable/js/index.js +54 -57
  234. package/lib/components/hyTable/js/useAppTable.js +2 -3
  235. package/lib/components/hyTable/style/table.scss +8 -0
  236. package/lib/components/hyTable/table.vue.js +35 -41
  237. package/lib/components/hyTableActionButton/tableActionButton.vue.js +4 -4
  238. package/lib/components/hyTableForm/batchTableForm.vue.js +3 -7
  239. package/lib/components/hyTableForm/js/index.js +3 -11
  240. package/lib/components/hyTableForm/js/useAppTableForm.js +2 -7
  241. package/lib/components/hyTableForm/style/batchTableForm.scss +26 -54
  242. package/lib/components/hyTableForm/style/tableForm.scss +3 -2
  243. package/lib/components/hyTableForm/tableForm.vue.js +89 -45
  244. package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
  245. package/lib/components/hyTree/js/index.js +13 -40
  246. package/lib/components/hyTree/style/index.css +1 -1
  247. package/lib/components/hyTree/tree.vue.js +17 -16
  248. package/lib/components/hyUserAvatar/userAvatar.vue.js +3 -6
  249. package/lib/components/hyVideoPlayer/js/index.js +14 -23
  250. package/lib/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
  251. package/lib/components/hyVideoPlayer/videoPlayer.vue.js +16 -26
  252. package/lib/components/index.js +46 -40
  253. package/lib/hooks/index.js +17 -0
  254. package/lib/hooks/useAudioPlayerConfig.js +1 -3
  255. package/lib/hooks/useBaseMainStore.js +32 -0
  256. package/lib/hooks/useCurrentBus.js +23 -0
  257. package/lib/hooks/useDialog.js +331 -0
  258. package/lib/hooks/useExportFile.js +135 -0
  259. package/lib/hooks/useGlobalConfig.js +10 -6
  260. package/lib/hooks/useLocale.js +25 -11
  261. package/lib/hooks/usePermissionMap.js +1 -3
  262. package/lib/hooks/useResizeHandler.js +1 -4
  263. package/lib/hooks/useResizeObserver.js +3 -1
  264. package/lib/hooks/useSubscribe.js +2 -1
  265. package/lib/hooks/useUserAvatarMap.js +1 -3
  266. package/lib/hooks/useVideoPlayerConfig.js +1 -3
  267. package/lib/index.js +107 -73
  268. package/lib/locale/{en.js → en_US.js} +81 -5
  269. package/lib/locale/index.js +3 -3
  270. package/lib/locale/zh_CN.js +81 -3
  271. package/lib/style/tailwind.scss +7 -3
  272. package/lib/utils/adaptive.js +1 -3
  273. package/lib/utils/form.js +17 -10
  274. package/lib/utils/handler.js +3 -7
  275. package/lib/utils/input.js +7 -8
  276. package/lib/utils/map/hook/bigMap.js +14 -53
  277. package/lib/utils/map/hook/gaode.js +5 -20
  278. package/lib/utils/map/hook/leafletjs.js +23 -79
  279. package/lib/utils/map/index.js +2 -8
  280. package/lib/utils/map/js/webgis.js +12 -12
  281. package/lib/version.js +1 -1
  282. package/package.json +3 -2
@@ -5,13 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var elementPlus = require('element-plus');
7
7
  var iconsVue = require('@element-plus/icons-vue');
8
- require('../../../hooks/index.js');
9
8
  require('../../index.js');
10
9
  require('../../../utils/index.js');
11
10
  var index = require('../js/index.js');
12
11
  var formItem = require('./formItem.vue.js');
13
12
  var useAppForm = require('../js/useAppForm.js');
14
- var useLocale = require('../../../hooks/useLocale.js');
15
13
  var form = require('../../../utils/form.js');
16
14
  var is = require('../../../utils/is.js');
17
15
  var index$1 = require('../../hyTooltip/index.js');
@@ -54,7 +52,6 @@ const _sfc_main = {
54
52
  },
55
53
  setup(__props) {
56
54
  const props = __props;
57
- const { t } = useLocale.useLocale();
58
55
  const bindValue = vue.computed({
59
56
  get() {
60
57
  const prop = props.column.field;
@@ -65,20 +62,6 @@ const _sfc_main = {
65
62
  form.setValueByProp(props.model, prop, val);
66
63
  }
67
64
  });
68
- const containerRef = vue.useTemplateRef("containerRef");
69
- const containerHeight = vue.ref(0);
70
- const isExpand = vue.ref(false);
71
- const isExpandHover = vue.ref(null);
72
- function onExpandHandler(column) {
73
- containerHeight.value = containerRef.value.clientHeight;
74
- isExpand.value = !isExpand.value;
75
- }
76
- function onExpandMouseenter(column) {
77
- isExpandHover.value = true;
78
- }
79
- function onExpandMouseleave(column) {
80
- isExpandHover.value = false;
81
- }
82
65
  const containerStyle = vue.computed(() => {
83
66
  const columnNum = is.isNumber(props.column.columnNum) && props.column.columnNum > 0 ? props.column.columnNum : is.isNumber(props.columnNum) && props.columnNum > 0 ? props.columnNum || 1 : 1;
84
67
  return {
@@ -161,8 +144,10 @@ const _sfc_main = {
161
144
  vue.createElementVNode(
162
145
  "div",
163
146
  {
164
- class: "overflow-y-auto scroll-body",
165
- style: vue.normalizeStyle({ maxHeight: `${__props.column.height || 500}px` })
147
+ class: vue.normalizeClass({ "overflow-y-auto scroll-body": __props.column.height > 0 }),
148
+ style: vue.normalizeStyle({
149
+ maxHeight: __props.column.height > 0 ? `${__props.column.height}px` : void 0
150
+ })
166
151
  },
167
152
  [
168
153
  (vue.openBlock(true), vue.createElementBlock(
@@ -173,7 +158,7 @@ const _sfc_main = {
173
158
  "div",
174
159
  {
175
160
  key: index$1,
176
- class: vue.normalizeClass(["bg-background-2 rounded-[6px] border border-border my-1.5", [__props.size === "small" ? "px-4 pt-2" : " pt-3 px-5"]])
161
+ class: vue.normalizeClass(["bg-background-2 rounded-[6px] border border-border my-1.5 box-border", [__props.size === "small" ? "px-4 pt-2" : " pt-3 px-5"]])
177
162
  },
178
163
  [
179
164
  vue.createElementVNode("div", { class: "flex items-center min-h-[36px]" }, [
@@ -191,7 +176,7 @@ const _sfc_main = {
191
176
  }, () => [
192
177
  vue.createElementVNode(
193
178
  "span",
194
- { class: "text-auxiliary" },
179
+ { class: "text-auxiliary whitespace-nowrap" },
195
180
  vue.toDisplayString(vue.unref(index.renderArrayItemLabel)(props, __props.column, index$1)),
196
181
  1
197
182
  /* TEXT */
@@ -201,7 +186,7 @@ const _sfc_main = {
201
186
  vue.createElementVNode("div", { class: "flex items-center gap-3 ml-auto" }, [
202
187
  bindValue.value.length > 1 || props.column.emptyChildren ? (vue.openBlock(), vue.createElementBlock("div", {
203
188
  key: 0,
204
- class: "clickBox bg-background py-0.5 px-1.5 rounded",
189
+ class: "clickBox bg-background py-0.5 px-1.5 rounded box-border",
205
190
  onClick: ($event) => onDeleteItemHandler(index$1)
206
191
  }, [
207
192
  vue.createVNode(vue.unref(elementPlus.ElIcon), {
@@ -249,9 +234,6 @@ const _sfc_main = {
249
234
  vue.createElementVNode(
250
235
  "div",
251
236
  {
252
- ref_for: true,
253
- ref_key: "containerRef",
254
- ref: containerRef,
255
237
  class: "grid gap-x-6",
256
238
  style: vue.normalizeStyle(containerStyle.value)
257
239
  },
@@ -302,8 +284,8 @@ const _sfc_main = {
302
284
  /* KEYED_FRAGMENT */
303
285
  ))
304
286
  ],
305
- 4
306
- /* STYLE */
287
+ 6
288
+ /* CLASS, STYLE */
307
289
  ),
308
290
  vue.createElementVNode("div", { class: "flex justify-center mt-2.5" }, [
309
291
  vue.createElementVNode("span", {
@@ -0,0 +1,202 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ require('../../index.js');
7
+ require('../../../utils/index.js');
8
+ require('../../../hooks/index.js');
9
+ var index$1 = require('../js/index.js');
10
+ var formItem = require('./formItem.vue.js');
11
+ var useAppForm = require('../js/useAppForm.js');
12
+ var useResizeObserver = require('../../../hooks/useResizeObserver.js');
13
+ var form = require('../../../utils/form.js');
14
+ var is = require('../../../utils/is.js');
15
+ var index = require('../../hyIcon/index.js');
16
+
17
+ const _sfc_main = {
18
+ __name: "arrayItem2",
19
+ props: {
20
+ model: {
21
+ type: Object,
22
+ default: () => ({})
23
+ },
24
+ column: {
25
+ type: Object,
26
+ default: () => ({})
27
+ },
28
+ rules: {
29
+ type: Object,
30
+ default: () => ({})
31
+ },
32
+ columnNum: {
33
+ type: Number,
34
+ default: 1
35
+ },
36
+ loading: {
37
+ type: Boolean,
38
+ default: false
39
+ },
40
+ disabled: {
41
+ type: Boolean,
42
+ default: false
43
+ },
44
+ readonly: {
45
+ type: Boolean,
46
+ default: false
47
+ },
48
+ size: {
49
+ type: String,
50
+ default: "default"
51
+ }
52
+ },
53
+ setup(__props) {
54
+ const props = __props;
55
+ const arrayItemRef = vue.useTemplateRef("arrayItemRef");
56
+ const { removeResize } = useResizeObserver.useResizeObserver(arrayItemRef, () => {
57
+ if (arrayItemRef.value) {
58
+ clientHeight.value = arrayItemRef.value.clientHeight;
59
+ }
60
+ });
61
+ const clientHeight = vue.ref(0);
62
+ const bindValue = vue.computed({
63
+ get() {
64
+ const prop = props.column.field;
65
+ return form.getValueByProp(props.model, prop);
66
+ },
67
+ set(val) {
68
+ const prop = props.column.field;
69
+ form.setValueByProp(props.model, prop, val);
70
+ }
71
+ });
72
+ const containerStyle = vue.computed(() => {
73
+ const columnNum = is.isNumber(props.column.columnNum) && props.column.columnNum > 0 ? props.column.columnNum : is.isNumber(props.columnNum) && props.columnNum > 0 ? props.columnNum || 1 : 1;
74
+ return {
75
+ gridTemplateColumns: `repeat(${columnNum}, minmax(0, 1fr))`
76
+ };
77
+ });
78
+ function onAddItemHandler() {
79
+ if (!is.isArray(bindValue.value)) {
80
+ bindValue.value = [];
81
+ }
82
+ bindValue.value.push(useAppForm.resetAppFormValue(props.column.children));
83
+ }
84
+ function onDeleteItemHandler(index) {
85
+ bindValue.value.splice(index, 1);
86
+ }
87
+ vue.onBeforeUnmount(() => {
88
+ removeResize && removeResize();
89
+ });
90
+ return (_ctx, _cache) => {
91
+ return vue.openBlock(), vue.createElementBlock(
92
+ "div",
93
+ {
94
+ ref_key: "arrayItemRef",
95
+ ref: arrayItemRef
96
+ },
97
+ [
98
+ vue.createElementVNode(
99
+ "div",
100
+ {
101
+ class: "absolute w-full bg-background-2 left-0",
102
+ style: vue.normalizeStyle({ height: clientHeight.value ? `${clientHeight.value}px` : void 0 })
103
+ },
104
+ null,
105
+ 4
106
+ /* STYLE */
107
+ ),
108
+ vue.createElementVNode("div", { class: "py-3" }, [
109
+ (vue.openBlock(true), vue.createElementBlock(
110
+ vue.Fragment,
111
+ null,
112
+ vue.renderList(bindValue.value, (item, index$1) => {
113
+ return vue.openBlock(), vue.createElementBlock("div", {
114
+ key: index$1,
115
+ class: "relative"
116
+ }, [
117
+ vue.createElementVNode(
118
+ "div",
119
+ {
120
+ class: "grid gap-x-6",
121
+ style: vue.normalizeStyle(containerStyle.value)
122
+ },
123
+ [
124
+ (vue.openBlock(true), vue.createElementBlock(
125
+ vue.Fragment,
126
+ null,
127
+ vue.renderList(__props.column.children, (citem, cindex) => {
128
+ return vue.openBlock(), vue.createBlock(formItem.default, {
129
+ key: cindex,
130
+ model: item,
131
+ column: citem,
132
+ rules: __props.rules,
133
+ "parent-prop": __props.column.field,
134
+ index: index$1,
135
+ loading: __props.loading,
136
+ size: __props.size,
137
+ disabled: __props.disabled,
138
+ readonly: __props.readonly,
139
+ level: 3
140
+ }, vue.createSlots({
141
+ _: 2
142
+ /* DYNAMIC */
143
+ }, [
144
+ vue.renderList(_ctx.$slots, (_, slotName) => {
145
+ return {
146
+ name: slotName,
147
+ fn: vue.withCtx((scope) => [
148
+ vue.renderSlot(_ctx.$slots, slotName, vue.mergeProps({ ref_for: true }, scope))
149
+ ])
150
+ };
151
+ })
152
+ ]), 1032, ["model", "column", "rules", "parent-prop", "index", "loading", "size", "disabled", "readonly"]);
153
+ }),
154
+ 128
155
+ /* KEYED_FRAGMENT */
156
+ ))
157
+ ],
158
+ 4
159
+ /* STYLE */
160
+ ),
161
+ vue.createElementVNode("div", {
162
+ class: "w-[32px] h-[32px] flex items-center justify-center bg-[rgba(var(--hy-danger-2),0.2)] clickBox rounded absolute top-[32px] -right-2 transform translate-x-full",
163
+ onClick: ($event) => onDeleteItemHandler(index$1)
164
+ }, [
165
+ vue.createVNode(vue.unref(index.HyIcon), {
166
+ "svg-name": "ops-linear-delete",
167
+ class: "!w-5 !h-5 text-danger-2"
168
+ })
169
+ ], 8, ["onClick"])
170
+ ]);
171
+ }),
172
+ 128
173
+ /* KEYED_FRAGMENT */
174
+ )),
175
+ vue.createElementVNode("div", { class: "flex items-center" }, [
176
+ vue.createElementVNode("span", {
177
+ onClick: ($event) => onAddItemHandler(),
178
+ class: "flex items-center justify-center clickBox text-success text-xs"
179
+ }, [
180
+ vue.createVNode(vue.unref(index.HyIcon), {
181
+ "svg-name": "ops-button-add",
182
+ class: "!w-3 !h-3"
183
+ }),
184
+ vue.createElementVNode(
185
+ "span",
186
+ { style: { "margin-left": "6px" } },
187
+ vue.toDisplayString(vue.unref(index$1.renderAddLabel)(props, __props.column)),
188
+ 1
189
+ /* TEXT */
190
+ )
191
+ ], 8, ["onClick"])
192
+ ])
193
+ ])
194
+ ],
195
+ 512
196
+ /* NEED_PATCH */
197
+ );
198
+ };
199
+ }
200
+ };
201
+
202
+ exports.default = _sfc_main;
@@ -8,8 +8,8 @@ var iconsVue = require('@element-plus/icons-vue');
8
8
  require('../../../hooks/index.js');
9
9
  require('../../../utils/index.js');
10
10
  var formItem = require('./formItem.vue.js');
11
- var useLocale = require('../../../hooks/useLocale.js');
12
11
  var is = require('../../../utils/is.js');
12
+ var useLocale = require('../../../hooks/useLocale.js');
13
13
 
14
14
  const _sfc_main = {
15
15
  __name: "extraItem",
@@ -49,7 +49,6 @@ const _sfc_main = {
49
49
  },
50
50
  setup(__props) {
51
51
  const props = __props;
52
- const { t } = useLocale.useLocale();
53
52
  const containerRef = vue.useTemplateRef("containerRef");
54
53
  const containerHeight = vue.ref(0);
55
54
  const isExpand = vue.ref(false);
@@ -92,7 +91,7 @@ const _sfc_main = {
92
91
  vue.createElementVNode(
93
92
  "span",
94
93
  { class: "ml-1.5" },
95
- vue.toDisplayString(isExpandHover.value ? vue.unref(t)("form.additionalInformationHoverTip") : vue.unref(t)("form.additionalInformationTip")),
94
+ vue.toDisplayString(isExpandHover.value ? vue.unref(useLocale.$t)("form.additionalInformationHoverTip") : vue.unref(useLocale.$t)("form.additionalInformationTip")),
96
95
  1
97
96
  /* TEXT */
98
97
  )
@@ -9,16 +9,17 @@ require('../../../utils/index.js');
9
9
  require('../../index.js');
10
10
  var index = require('../js/index.js');
11
11
  require('../../../hooks/index.js');
12
- var useLocale = require('../../../hooks/useLocale.js');
13
12
  var is = require('../../../utils/is.js');
14
13
  var form = require('../../../utils/form.js');
15
14
  var index$1 = require('../../hyTooltip/index.js');
16
15
  var index$2 = require('../../hyIcon/index.js');
16
+ var useLocale = require('../../../hooks/useLocale.js');
17
17
  var index$3 = require('../../hyInput/index.js');
18
18
  var index$4 = require('../../hyDatePicker/index.js');
19
19
  var index$5 = require('../../hyTimePicker/index.js');
20
20
  var index$6 = require('../../hyRadioGroup/index.js');
21
- var index$7 = require('../../hyOrgCascader/index.js');
21
+ var index$7 = require('../../hyCheckboxGroup/index.js');
22
+ var index$8 = require('../../hyOrgCascader/index.js');
22
23
 
23
24
  const _sfc_main = {
24
25
  __name: "formItem",
@@ -63,7 +64,6 @@ const _sfc_main = {
63
64
  }
64
65
  },
65
66
  setup(__props) {
66
- const { t } = useLocale.useLocale();
67
67
  const props = __props;
68
68
  const formContext = vue.inject(index.formContextKey);
69
69
  const formItemRef = vue.useTemplateRef("formItemRef");
@@ -115,8 +115,16 @@ const _sfc_main = {
115
115
  };
116
116
  });
117
117
  const columnAttrs = vue.computed(() => {
118
+ const attrs = props.column.attrs || {};
119
+ const config = {};
120
+ if (props.column.type === "input") {
121
+ if (attrs.type === "text" && vue.unref(formContext.business) !== "tableForm") {
122
+ config.maxlength = 255;
123
+ }
124
+ }
118
125
  return {
119
- ...props.column.attrs,
126
+ ...config,
127
+ ...attrs,
120
128
  label: form.columnLabelHandler(props.column, props.model),
121
129
  placeholder: form.columnPlaceholderHandler(props.column, props.model)
122
130
  };
@@ -125,19 +133,14 @@ const _sfc_main = {
125
133
  return new Promise(async (resolve, reject) => {
126
134
  if (props.column.optionsFn) {
127
135
  if (!props.column.optionsFn) return;
128
- props.column.optionsLoading = true;
129
- props.column.optionsError = "";
130
- props.column.attrs.options = [];
136
+ onRequesting();
131
137
  if (!(isMountedLoad && props.column.isDefaultGetData === false)) {
132
138
  try {
133
- props.column.attrs.options = await props.column.optionsFn(
134
- props.column,
135
- props.model
136
- );
137
- props.column.optionsError = "";
139
+ const options = await props.column.optionsFn(props.column, props.model);
140
+ onFulfilled(options);
138
141
  resolve();
139
142
  } catch (err) {
140
- props.column.optionsError = "error";
143
+ onRejected();
141
144
  console.error(err);
142
145
  reject();
143
146
  }
@@ -146,13 +149,14 @@ const _sfc_main = {
146
149
  }
147
150
  } else if (props.column.type === "org-cascader") {
148
151
  if (orgCascaderRef.value) {
149
- props.column.optionsLoading = true;
150
- props.column.optionsError = "";
151
152
  try {
153
+ onRequesting();
152
154
  await orgCascaderRef.value.getData();
155
+ onFulfilled();
153
156
  resolve();
154
157
  } catch {
155
158
  props.column.optionsError = "error";
159
+ onRejected();
156
160
  reject();
157
161
  }
158
162
  } else {
@@ -164,6 +168,21 @@ const _sfc_main = {
164
168
  props.column.optionsLoading = false;
165
169
  });
166
170
  }
171
+ function onRequesting() {
172
+ props.column.optionsLoading = true;
173
+ props.column.optionsError = "";
174
+ props.column.attrs.options = [];
175
+ }
176
+ function onFulfilled(options = []) {
177
+ props.column.optionsLoading = false;
178
+ props.column.optionsError = "";
179
+ props.column.attrs.options = options;
180
+ }
181
+ function onRejected() {
182
+ props.column.optionsLoading = false;
183
+ props.column.optionsError = "error";
184
+ props.column.attrs.options = [];
185
+ }
167
186
  function getOptionsHandler(props2, column) {
168
187
  if (props2.column.optionsLoading) {
169
188
  return [];
@@ -174,7 +193,7 @@ const _sfc_main = {
174
193
  if (!index.isRequired(props, column) && formItemRef.value) {
175
194
  formItemRef.value.clearValidate();
176
195
  }
177
- return form.columnRuleHandler(column, model);
196
+ return form.columnRuleHandler(column, model, { business: vue.unref(formContext.business) });
178
197
  }
179
198
  function onChangeHandler() {
180
199
  const { onChange } = props.column;
@@ -247,18 +266,18 @@ const _sfc_main = {
247
266
  default: vue.withCtx(() => [
248
267
  vue.createElementVNode("div", { class: "w-full flex justify-between text-main" }, [
249
268
  vue.createElementVNode("div", { class: "flex items-center" }, [
250
- vue.renderSlot(_ctx.$slots, __props.column.labelSlot, {
251
- column: columnConfig.value,
252
- model: __props.model,
253
- required: vue.unref(index.isRequired)(props, __props.column)
254
- }, () => [
255
- vue.createElementVNode(
256
- "span",
257
- { class: "text-main" },
258
- vue.toDisplayString(vue.unref(form.columnLabelHandler)(__props.column, props.model) || "\xA0"),
259
- 1
260
- /* TEXT */
261
- )
269
+ vue.createElementVNode("span", { class: "text-main whitespace-nowrap" }, [
270
+ vue.renderSlot(_ctx.$slots, __props.column.labelSlot, {
271
+ column: columnConfig.value,
272
+ model: __props.model,
273
+ required: vue.unref(index.isRequired)(props, __props.column)
274
+ }, () => [
275
+ vue.createTextVNode(
276
+ vue.toDisplayString(vue.unref(form.columnLabelHandler)(__props.column, props.model) || "\xA0"),
277
+ 1
278
+ /* TEXT */
279
+ )
280
+ ])
262
281
  ]),
263
282
  vue.unref(index.isRequired)(props, __props.column) ? (vue.openBlock(), vue.createElementBlock("span", {
264
283
  key: 0,
@@ -292,7 +311,7 @@ const _sfc_main = {
292
311
  vue.createElementVNode(
293
312
  "span",
294
313
  null,
295
- vue.toDisplayString(vue.unref(t)("hy.help")),
314
+ vue.toDisplayString(vue.unref(useLocale.$t)("hy.help")),
296
315
  1
297
316
  /* TEXT */
298
317
  )
@@ -317,7 +336,7 @@ const _sfc_main = {
317
336
  "div",
318
337
  {
319
338
  key: 0,
320
- class: vue.normalizeClass(["w-full flex items-center text-main px-2", {
339
+ class: vue.normalizeClass(["w-full flex items-center text-main px-2 box-border", {
321
340
  "min-h-[40px]": __props.size === "large",
322
341
  "min-h-[32px]": __props.size === "default",
323
342
  "min-h-[24px]": __props.size === "small",
@@ -452,9 +471,7 @@ const _sfc_main = {
452
471
  { key: 4 },
453
472
  [
454
473
  vue.createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
455
- ["datetimerange", "daterange", "monthrange", "yearrange"].includes(
456
- columnAttrs.value?.type
457
- ) && vue.unref(is.isArray)(__props.column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyDatePicker), vue.mergeProps({
474
+ ["datetimerange", "daterange", "monthrange", "yearrange"].includes(columnAttrs.value?.type) && vue.unref(is.isArray)(__props.column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyDatePicker), vue.mergeProps({
458
475
  key: 0,
459
476
  start: bindValue.value,
460
477
  "onUpdate:start": ($event) => bindValue.value = $event,
@@ -560,9 +577,26 @@ const _sfc_main = {
560
577
  ],
561
578
  2112
562
579
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
563
- )) : __props.column.type === "switch" ? (vue.openBlock(), vue.createElementBlock(
580
+ )) : __props.column.type === "checkbox-group" ? (vue.openBlock(), vue.createElementBlock(
564
581
  vue.Fragment,
565
582
  { key: 9 },
583
+ [
584
+ vue.createCommentVNode(" \u591A\u9009\u6309\u94AE "),
585
+ vue.createVNode(vue.unref(index$7.HyCheckboxGroup), vue.mergeProps({
586
+ modelValue: bindValue.value,
587
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
588
+ }, columnAttrs.value, {
589
+ disabled: vue.unref(index.isDisabled)(props, __props.column),
590
+ options: getOptionsHandler(props, __props.column),
591
+ size: __props.size,
592
+ onChange: onChangeHandler
593
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
594
+ ],
595
+ 2112
596
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
597
+ )) : __props.column.type === "switch" ? (vue.openBlock(), vue.createElementBlock(
598
+ vue.Fragment,
599
+ { key: 10 },
566
600
  [
567
601
  vue.createCommentVNode(" \u5F00\u5173 "),
568
602
  vue.createVNode(vue.unref(elementPlus.ElSwitch), vue.mergeProps({
@@ -580,7 +614,7 @@ const _sfc_main = {
580
614
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
581
615
  )) : __props.column.type === "input-number" ? (vue.openBlock(), vue.createElementBlock(
582
616
  vue.Fragment,
583
- { key: 10 },
617
+ { key: 11 },
584
618
  [
585
619
  vue.createCommentVNode(" \u6570\u5B57\u8F93\u5165\u6846 "),
586
620
  vue.createVNode(vue.unref(elementPlus.ElInputNumber), vue.mergeProps({
@@ -595,10 +629,10 @@ const _sfc_main = {
595
629
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
596
630
  )) : __props.column.type === "org-cascader" ? (vue.openBlock(), vue.createElementBlock(
597
631
  vue.Fragment,
598
- { key: 11 },
632
+ { key: 12 },
599
633
  [
600
634
  vue.createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
601
- vue.createVNode(vue.unref(index$7.HyOrgCascader), vue.mergeProps({
635
+ vue.createVNode(vue.unref(index$8.HyOrgCascader), vue.mergeProps({
602
636
  ref_key: "orgCascaderRef",
603
637
  ref: orgCascaderRef,
604
638
  modelValue: bindValue.value,
@@ -606,6 +640,10 @@ const _sfc_main = {
606
640
  class: "w-full"
607
641
  }, columnAttrs.value, {
608
642
  disabled: vue.unref(index.isDisabled)(props, __props.column),
643
+ defaultGetData: false,
644
+ onRequesting,
645
+ onFulfilled,
646
+ onRejected,
609
647
  onChange: onChangeHandler
610
648
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
611
649
  ],
@@ -613,7 +651,7 @@ const _sfc_main = {
613
651
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
614
652
  )) : __props.column.type === "cascader" ? (vue.openBlock(), vue.createElementBlock(
615
653
  vue.Fragment,
616
- { key: 12 },
654
+ { key: 13 },
617
655
  [
618
656
  vue.createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
619
657
  vue.createVNode(vue.unref(elementPlus.ElCascader), vue.mergeProps({
@@ -4,11 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
6
  var elementPlus = require('element-plus');
7
- require('../../../hooks/index.js');
8
7
  require('../../../utils/index.js');
9
8
  require('../../index.js');
10
9
  var formItem = require('./formItem.vue.js');
11
- var useLocale = require('../../../hooks/useLocale.js');
12
10
  var is = require('../../../utils/is.js');
13
11
  var form = require('../../../utils/form.js');
14
12
  var index = require('../../../utils/map/index.js');
@@ -60,7 +58,6 @@ const _sfc_main = {
60
58
  setup(__props, { expose: __expose, emit: __emit }) {
61
59
  const props = __props;
62
60
  const emits = __emit;
63
- const { t } = useLocale.useLocale();
64
61
  const containerRef = vue.useTemplateRef("containerRef");
65
62
  const addressValue = vue.computed({
66
63
  get() {
@@ -159,10 +156,7 @@ const _sfc_main = {
159
156
  console.log(results);
160
157
  if (results && results.length) {
161
158
  const geographicalPosition = results[0];
162
- throughCoordinatePosition(
163
- geographicalPosition.lng,
164
- geographicalPosition.lat
165
- );
159
+ throughCoordinatePosition(geographicalPosition.lng, geographicalPosition.lat);
166
160
  } else {
167
161
  elementPlus.ElMessage.error("\u6CA1\u6709\u627E\u5230\u641C\u7D22\u5730\u7406\u4F4D\u7F6E");
168
162
  }
@@ -172,22 +166,26 @@ const _sfc_main = {
172
166
  });
173
167
  }
174
168
  function throughCoordinatePosition(lng, lat) {
175
- poiServer.geocoderFormat({
176
- lat,
177
- lng
178
- }).then(({ results }) => {
179
- geographicalPositionFn({
180
- lng,
181
- lat,
182
- address: results.address,
183
- name: results.address
184
- });
185
- }).catch(() => {
186
- geographicalPositionFn({
187
- lng,
169
+ return new Promise((resolve) => {
170
+ poiServer.geocoderFormat({
188
171
  lat,
189
- address: `${Number(lat).toFixed(6)}\u3001${Number(lng).toFixed(6)}`,
190
- name: `${Number(lat).toFixed(6)}\u3001${Number(lng).toFixed(6)}`
172
+ lng
173
+ }).then(({ results }) => {
174
+ geographicalPositionFn({
175
+ lng,
176
+ lat,
177
+ address: results.address,
178
+ name: results.address
179
+ });
180
+ resolve(200);
181
+ }).catch(() => {
182
+ geographicalPositionFn({
183
+ lng,
184
+ lat,
185
+ address: `${Number(lat).toFixed(6)}\u3001${Number(lng).toFixed(6)}`,
186
+ name: `${Number(lat).toFixed(6)}\u3001${Number(lng).toFixed(6)}`
187
+ });
188
+ resolve(200);
191
189
  });
192
190
  });
193
191
  }
@@ -214,7 +212,7 @@ const _sfc_main = {
214
212
  });
215
213
  emits("complete");
216
214
  }
217
- function setMarker({ lat, lng }) {
215
+ async function setMarker({ lat, lng }, getAddress = false) {
218
216
  if (marker) {
219
217
  marker.setLatLng({ lat, lng });
220
218
  map.setView({ lat, lng }, mapConfig.maxZoom || 18);
@@ -235,6 +233,10 @@ const _sfc_main = {
235
233
  marker.addTo(map);
236
234
  map.setView({ lat, lng }, mapConfig.maxZoom || 18);
237
235
  }
236
+ if (getAddress) {
237
+ await throughCoordinatePosition(lng, lat);
238
+ }
239
+ return 200;
238
240
  }
239
241
  function clearMarker() {
240
242
  if (marker) {
@@ -342,9 +344,7 @@ const _sfc_main = {
342
344
  vue.createElementVNode(
343
345
  "div",
344
346
  {
345
- class: vue.normalizeClass(["z-20 cursor-pointer absolute rounded top-2 right-2 w-[110px] h-8 border bg-background/70 text-xs flex items-center justify-center gap-1", [
346
- __props.allMapSelect ? "border-theme text-theme" : "border-border/50 text-main"
347
- ]]),
347
+ class: vue.normalizeClass(["z-20 cursor-pointer absolute rounded top-2 right-2 w-[110px] h-8 border bg-background/70 text-xs flex items-center justify-center gap-1", [__props.allMapSelect ? "border-theme text-theme" : "border-border/50 text-main"]]),
348
348
  onClick: vue.withModifiers(setMapSize, ["stop"])
349
349
  },
350
350
  [