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.
- package/dist/tailwind.css +257 -21
- package/es/api/device.mjs +2 -3
- package/es/api/exportExcel.mjs +57 -0
- package/es/api/index.mjs +27 -16
- package/es/api/mapRail.mjs +31 -0
- package/es/api/organization.mjs +17 -9
- package/es/api/rule.mjs +30 -0
- package/es/api/sypct.mjs +2 -3
- package/es/api/task.mjs +2 -3
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +18 -19
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.mjs +511 -0
- package/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.mjs +169 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +318 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +123 -0
- package/es/bussiness/hyElectronicFence/electronicFence.vue.mjs +358 -0
- package/es/bussiness/hyElectronicFence/index.mjs +13 -0
- package/es/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
- package/es/bussiness/hyMapAearchPlace/js/index.mjs +1 -1
- package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +4 -6
- package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/es/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.mjs +270 -0
- package/es/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.mjs +395 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +651 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +357 -0
- package/es/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.mjs +261 -0
- package/es/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.mjs +360 -0
- package/es/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.mjs +258 -0
- package/es/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/index.mjs +15 -0
- package/es/bussiness/hyRuleSetting/js/ruleSetting.mjs +65 -0
- package/es/bussiness/hyRuleSetting/ruleSetting.vue.mjs +129 -0
- package/es/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/es/bussiness/index.mjs +2 -0
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -13
- package/es/components/hyAudioPlayer/js/index.mjs +9 -14
- package/es/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +174 -142
- package/es/components/hyButton/button.vue.mjs +18 -5
- package/es/components/hyButton/style/button.scss +50 -74
- package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +119 -0
- package/es/components/hyCheckboxGroup/index.mjs +7 -0
- package/es/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/es/components/hyConfigProvider/configProvider.vue.mjs +51 -38
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +57 -62
- package/es/components/hyConfirmDialog/confirmMethod.mjs +24 -22
- package/es/components/hyCutter/cutter.vue.mjs +9 -23
- package/es/components/hyDatePicker/datePicker.vue.mjs +12 -17
- package/es/components/hyDialog/dialog.vue.mjs +5 -9
- package/es/components/hyDialog/style/dialog.scss +12 -13
- package/es/components/hyDrawer/drawer.vue.mjs +100 -0
- package/es/components/hyDrawer/index.mjs +7 -0
- package/es/components/hyDrawer/style/drawer.scss +0 -0
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +10 -28
- package/es/components/hyForm/cpns/arrayItem2.vue.mjs +198 -0
- package/es/components/hyForm/cpns/extraItem.vue.mjs +2 -3
- package/es/components/hyForm/cpns/formItem.vue.mjs +149 -69
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +74 -28
- package/es/components/hyForm/js/index.mjs +4 -8
- package/es/components/hyForm/js/useAppForm.mjs +4 -9
- package/es/components/hyForm/style/form.scss +4 -13
- package/es/components/hyIcon/icon.vue.mjs +3 -3
- package/es/components/hyIconBox/style/iconBox.scss +2 -6
- package/es/components/hyInput/inputSearch.vue.mjs +8 -11
- package/es/components/hyInput/style/inputSearch.scss +3 -0
- package/es/components/hyLoading/index.mjs +3 -5
- package/es/components/hyMap/js/index.mjs +35 -10
- package/es/components/hyMap/map.vue.mjs +30 -6
- package/es/components/hyMenu/style/menu.scss +5 -15
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +3 -4
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +3 -6
- package/es/components/hyOrgCascader/js/index.mjs +1 -5
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +31 -12
- package/es/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +48 -41
- package/es/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +409 -324
- package/es/components/hySearch/js/index.mjs +1 -4
- package/es/components/hySearch/js/useAppSearch.mjs +5 -10
- package/es/components/hySearch/search.vue.mjs +23 -20
- package/es/components/hySearch/style/search.scss +9 -0
- package/es/components/hyStatus/index.mjs +7 -0
- package/es/components/hyStatus/status.vue.mjs +110 -0
- package/es/components/hyStatus/style/status.scss +0 -0
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +24 -28
- package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +8 -9
- package/es/components/hyTable/cpns/headerItem.vue.mjs +2 -2
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +43 -34
- package/es/components/hyTable/js/index.mjs +67 -64
- package/es/components/hyTable/js/search.mjs +25 -1
- package/es/components/hyTable/js/useAppTable.mjs +3 -4
- package/es/components/hyTable/style/table.scss +8 -0
- package/es/components/hyTable/table.vue.mjs +68 -53
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +13 -6
- package/es/components/hyTableForm/batchTableForm.vue.mjs +26 -9
- package/es/components/hyTableForm/js/index.mjs +2 -8
- package/es/components/hyTableForm/js/useAppTableForm.mjs +3 -8
- package/es/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/es/components/hyTableForm/style/tableForm.scss +3 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +160 -70
- package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
- package/es/components/hyTree/js/index.mjs +113 -72
- package/es/components/hyTree/style/index.css +1 -1
- package/es/components/hyTree/tree.vue.mjs +21 -18
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +3 -6
- package/es/components/hyVideoPlayer/js/index.mjs +14 -23
- package/es/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +16 -26
- package/es/components/index.mjs +3 -0
- package/es/hooks/index.mjs +6 -2
- package/es/hooks/useAudioPlayerConfig.mjs +1 -3
- package/es/hooks/useBaseMainStore.mjs +29 -0
- package/es/hooks/useCurrentBus.mjs +20 -0
- package/es/hooks/useDialog.mjs +327 -0
- package/es/hooks/useExportFile.mjs +133 -0
- package/es/hooks/useGlobalConfig.mjs +10 -6
- package/es/hooks/useLocale.mjs +22 -12
- package/es/hooks/usePermissionMap.mjs +1 -3
- package/es/hooks/useResizeHandler.mjs +1 -4
- package/es/hooks/useResizeObserver.mjs +3 -1
- package/es/hooks/useSubscribe.mjs +2 -2
- package/es/hooks/useUserAvatarMap.mjs +1 -3
- package/es/hooks/useVideoPlayerConfig.mjs +1 -3
- package/es/index.mjs +11 -2
- package/es/locale/{en.mjs → en_US.mjs} +79 -4
- package/es/locale/index.mjs +2 -2
- package/es/locale/zh_CN.mjs +79 -2
- package/es/style/index.scss +0 -1
- package/es/style/tailwind.scss +7 -4
- package/es/utils/adaptive.mjs +1 -3
- package/es/utils/form.mjs +7 -10
- package/es/utils/handler.mjs +4 -8
- package/es/utils/input.mjs +8 -9
- package/es/utils/is.mjs +3 -1
- package/es/utils/map/hook/bigMap.mjs +16 -53
- package/es/utils/map/hook/gaode.mjs +53 -33
- package/es/utils/map/hook/leafletjs.mjs +38 -82
- package/es/utils/map/index.mjs +3 -9
- package/es/utils/map/js/webgis.mjs +12 -12
- package/es/version.mjs +1 -1
- package/lib/api/device.js +2 -3
- package/lib/api/exportExcel.js +62 -0
- package/lib/api/index.js +27 -16
- package/lib/api/mapRail.js +34 -0
- package/lib/api/organization.js +17 -8
- package/lib/api/rule.js +33 -0
- package/lib/api/sypct.js +2 -3
- package/lib/api/task.js +2 -3
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +17 -18
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +515 -0
- package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +173 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +322 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +127 -0
- package/lib/bussiness/hyElectronicFence/electronicFence.vue.js +362 -0
- package/lib/bussiness/hyElectronicFence/index.js +21 -0
- package/lib/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
- package/lib/bussiness/hyMapAearchPlace/js/index.js +1 -1
- package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +4 -6
- package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/lib/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.js +274 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.js +399 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +655 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +361 -0
- package/lib/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.js +265 -0
- package/lib/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.js +364 -0
- package/lib/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.js +262 -0
- package/lib/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/index.js +24 -0
- package/lib/bussiness/hyRuleSetting/js/ruleSetting.js +68 -0
- package/lib/bussiness/hyRuleSetting/ruleSetting.vue.js +133 -0
- package/lib/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/lib/bussiness/index.js +21 -10
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -13
- package/lib/components/hyAudioPlayer/js/index.js +9 -14
- package/lib/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +173 -141
- package/lib/components/hyButton/button.vue.js +17 -4
- package/lib/components/hyButton/style/button.scss +50 -74
- package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +123 -0
- package/lib/components/hyCheckboxGroup/index.js +12 -0
- package/lib/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/lib/components/hyConfigProvider/configProvider.vue.js +50 -56
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +56 -61
- package/lib/components/hyConfirmDialog/confirmMethod.js +23 -21
- package/lib/components/hyCutter/cutter.vue.js +8 -22
- package/lib/components/hyDatePicker/datePicker.vue.js +11 -16
- package/lib/components/hyDialog/dialog.vue.js +5 -9
- package/lib/components/hyDialog/style/dialog.scss +12 -13
- package/lib/components/hyDrawer/drawer.vue.js +104 -0
- package/lib/components/hyDrawer/index.js +12 -0
- package/lib/components/hyDrawer/style/drawer.scss +0 -0
- package/lib/components/hyForm/cpns/arrayItem.vue.js +9 -27
- package/lib/components/hyForm/cpns/arrayItem2.vue.js +202 -0
- package/lib/components/hyForm/cpns/extraItem.vue.js +2 -3
- package/lib/components/hyForm/cpns/formItem.vue.js +148 -68
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +69 -23
- package/lib/components/hyForm/js/index.js +3 -7
- package/lib/components/hyForm/js/useAppForm.js +4 -9
- package/lib/components/hyForm/style/form.scss +4 -13
- package/lib/components/hyIcon/icon.vue.js +3 -3
- package/lib/components/hyIconBox/style/iconBox.scss +2 -6
- package/lib/components/hyInput/inputSearch.vue.js +7 -10
- package/lib/components/hyInput/style/inputSearch.scss +3 -0
- package/lib/components/hyLoading/index.js +2 -4
- package/lib/components/hyMap/js/index.js +34 -9
- package/lib/components/hyMap/map.vue.js +29 -5
- package/lib/components/hyMenu/style/menu.scss +5 -15
- package/lib/components/hyNoPermissions/noPermissions.vue.js +3 -4
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +3 -6
- package/lib/components/hyOrgCascader/js/index.js +1 -5
- package/lib/components/hyOrgCascader/orgCascader.vue.js +29 -10
- package/lib/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +47 -40
- package/lib/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +407 -322
- package/lib/components/hySearch/js/index.js +1 -4
- package/lib/components/hySearch/js/useAppSearch.js +5 -10
- package/lib/components/hySearch/search.vue.js +23 -20
- package/lib/components/hySearch/style/search.scss +9 -0
- package/lib/components/hyStatus/index.js +12 -0
- package/lib/components/hyStatus/status.vue.js +114 -0
- package/lib/components/hyStatus/style/status.scss +0 -0
- package/lib/components/hyTable/cpns/columnSelect.vue.js +22 -26
- package/lib/components/hyTable/cpns/columnSelectItem.vue.js +7 -8
- package/lib/components/hyTable/cpns/headerItem.vue.js +2 -2
- package/lib/components/hyTable/cpns/virtualTable.vue.js +41 -32
- package/lib/components/hyTable/js/index.js +65 -61
- package/lib/components/hyTable/js/search.js +25 -1
- package/lib/components/hyTable/js/useAppTable.js +2 -3
- package/lib/components/hyTable/style/table.scss +8 -0
- package/lib/components/hyTable/table.vue.js +67 -52
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +13 -6
- package/lib/components/hyTableForm/batchTableForm.vue.js +26 -9
- package/lib/components/hyTableForm/js/index.js +2 -8
- package/lib/components/hyTableForm/js/useAppTableForm.js +3 -8
- package/lib/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/lib/components/hyTableForm/style/tableForm.scss +3 -2
- package/lib/components/hyTableForm/tableForm.vue.js +159 -69
- package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
- package/lib/components/hyTree/js/index.js +113 -72
- package/lib/components/hyTree/style/index.css +1 -1
- package/lib/components/hyTree/tree.vue.js +21 -18
- package/lib/components/hyUserAvatar/userAvatar.vue.js +3 -6
- package/lib/components/hyVideoPlayer/js/index.js +14 -23
- package/lib/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +16 -26
- package/lib/components/index.js +46 -40
- package/lib/hooks/index.js +17 -0
- package/lib/hooks/useAudioPlayerConfig.js +1 -3
- package/lib/hooks/useBaseMainStore.js +32 -0
- package/lib/hooks/useCurrentBus.js +23 -0
- package/lib/hooks/useDialog.js +331 -0
- package/lib/hooks/useExportFile.js +135 -0
- package/lib/hooks/useGlobalConfig.js +10 -6
- package/lib/hooks/useLocale.js +25 -11
- package/lib/hooks/usePermissionMap.js +1 -3
- package/lib/hooks/useResizeHandler.js +1 -4
- package/lib/hooks/useResizeObserver.js +3 -1
- package/lib/hooks/useSubscribe.js +2 -1
- package/lib/hooks/useUserAvatarMap.js +1 -3
- package/lib/hooks/useVideoPlayerConfig.js +1 -3
- package/lib/index.js +107 -73
- package/lib/locale/{en.js → en_US.js} +79 -4
- package/lib/locale/index.js +3 -3
- package/lib/locale/zh_CN.js +79 -2
- package/lib/style/index.scss +0 -1
- package/lib/style/tailwind.scss +7 -4
- package/lib/utils/adaptive.js +1 -3
- package/lib/utils/form.js +6 -9
- package/lib/utils/handler.js +3 -7
- package/lib/utils/input.js +7 -8
- package/lib/utils/is.js +5 -3
- package/lib/utils/map/hook/bigMap.js +16 -53
- package/lib/utils/map/hook/gaode.js +53 -33
- package/lib/utils/map/hook/leafletjs.js +38 -82
- package/lib/utils/map/index.js +3 -9
- package/lib/utils/map/js/webgis.js +12 -12
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { inject, useTemplateRef, computed,
|
|
1
|
+
import { inject, useTemplateRef, computed, reactive, toRefs, onMounted, watch, onBeforeUnmount, unref, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createSlots, withCtx, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, Fragment, mergeProps } from 'vue';
|
|
2
2
|
import { ElFormItem, ElSelect, ElIcon, ElSelectV2, ElRadioGroup, ElCheckboxGroup, ElSwitch, ElInputNumber, 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,
|
|
6
|
+
import { formContextKey, optionsHandler, isRequired, columnVisibleHandler, columnItemStyle, columnShowHandler, columnHelpHandler, isReadonly, renderText, isDisabled } from '../js/index.mjs';
|
|
7
7
|
import '../../../hooks/index.mjs';
|
|
8
|
-
import {
|
|
9
|
-
import { isArray } from '../../../utils/is.mjs';
|
|
8
|
+
import { isBoolean, isArray } from '../../../utils/is.mjs';
|
|
10
9
|
import { setValueByProp, getValueByProp, columnPlaceholderHandler, columnLabelHandler, columnRuleHandler } from '../../../utils/form.mjs';
|
|
11
10
|
import { HyTooltip } from '../../hyTooltip/index.mjs';
|
|
12
11
|
import { HyIcon } from '../../hyIcon/index.mjs';
|
|
12
|
+
import { $t } from '../../../hooks/useLocale.mjs';
|
|
13
13
|
import { HyInput } from '../../hyInput/index.mjs';
|
|
14
14
|
import { HyDatePicker } from '../../hyDatePicker/index.mjs';
|
|
15
15
|
import { HyTimePicker } from '../../hyTimePicker/index.mjs';
|
|
16
16
|
import { HyRadioGroup } from '../../hyRadioGroup/index.mjs';
|
|
17
|
+
import { HyCheckboxGroup } from '../../hyCheckboxGroup/index.mjs';
|
|
17
18
|
import { HyOrgCascader } from '../../hyOrgCascader/index.mjs';
|
|
18
19
|
|
|
19
20
|
const _sfc_main = {
|
|
@@ -59,11 +60,19 @@ const _sfc_main = {
|
|
|
59
60
|
}
|
|
60
61
|
},
|
|
61
62
|
setup(__props) {
|
|
62
|
-
const { t } = useLocale();
|
|
63
63
|
const props = __props;
|
|
64
64
|
const formContext = inject(formContextKey);
|
|
65
65
|
const formItemRef = useTemplateRef("formItemRef");
|
|
66
66
|
const orgCascaderRef = useTemplateRef("orgCascaderRef");
|
|
67
|
+
const showMessage = computed(() => {
|
|
68
|
+
if (columnConfig.value.optionsError) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
if (isBoolean(columnConfig.value.showMessage)) {
|
|
72
|
+
return columnConfig.value.showMessage;
|
|
73
|
+
}
|
|
74
|
+
return formContext.showMessage;
|
|
75
|
+
});
|
|
67
76
|
const columnProp = computed(() => {
|
|
68
77
|
let field = isArray(props.column.field) ? props.column.field[0] : props.column.field;
|
|
69
78
|
if (props.parentProp) {
|
|
@@ -108,36 +117,65 @@ const _sfc_main = {
|
|
|
108
117
|
placeholder: columnPlaceholderHandler(props.column, props.model)
|
|
109
118
|
};
|
|
110
119
|
});
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
} else if (props.column.type === "org-cascader") {
|
|
130
|
-
if (orgCascaderRef.value) {
|
|
131
|
-
optionsLoading.value = true;
|
|
132
|
-
optionsError.value = "";
|
|
133
|
-
try {
|
|
134
|
-
await orgCascaderRef.value.getData();
|
|
135
|
-
} catch {
|
|
136
|
-
optionsError.value = "error";
|
|
120
|
+
async function obtainOptions(isMountedLoad = false) {
|
|
121
|
+
return new Promise(async (resolve, reject) => {
|
|
122
|
+
if (props.column.optionsFn) {
|
|
123
|
+
if (!props.column.optionsFn) return;
|
|
124
|
+
onRequesting();
|
|
125
|
+
if (!(isMountedLoad && props.column.isDefaultGetData === false)) {
|
|
126
|
+
try {
|
|
127
|
+
const options = await props.column.optionsFn(props.column, props.model);
|
|
128
|
+
onFulfilled(options);
|
|
129
|
+
resolve();
|
|
130
|
+
} catch (err) {
|
|
131
|
+
onRejected();
|
|
132
|
+
console.error(err);
|
|
133
|
+
reject();
|
|
134
|
+
}
|
|
135
|
+
} else {
|
|
136
|
+
resolve();
|
|
137
137
|
}
|
|
138
|
+
} else if (props.column.type === "org-cascader") {
|
|
139
|
+
if (orgCascaderRef.value) {
|
|
140
|
+
try {
|
|
141
|
+
onRequesting();
|
|
142
|
+
await orgCascaderRef.value.getData();
|
|
143
|
+
onFulfilled();
|
|
144
|
+
resolve();
|
|
145
|
+
} catch {
|
|
146
|
+
props.column.optionsError = "error";
|
|
147
|
+
onRejected();
|
|
148
|
+
reject();
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
resolve();
|
|
152
|
+
}
|
|
153
|
+
} else {
|
|
154
|
+
resolve();
|
|
138
155
|
}
|
|
156
|
+
props.column.optionsLoading = false;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function onRequesting() {
|
|
160
|
+
props.column.optionsLoading = true;
|
|
161
|
+
props.column.optionsError = "";
|
|
162
|
+
props.column.attrs.options = [];
|
|
163
|
+
}
|
|
164
|
+
function onFulfilled(options = []) {
|
|
165
|
+
props.column.optionsLoading = false;
|
|
166
|
+
props.column.optionsError = "";
|
|
167
|
+
props.column.attrs.options = options;
|
|
168
|
+
}
|
|
169
|
+
function onRejected() {
|
|
170
|
+
props.column.optionsLoading = false;
|
|
171
|
+
props.column.optionsError = "error";
|
|
172
|
+
props.column.attrs.options = [];
|
|
173
|
+
}
|
|
174
|
+
function getOptionsHandler(props2, column) {
|
|
175
|
+
if (props2.column.optionsLoading) {
|
|
176
|
+
return [];
|
|
139
177
|
}
|
|
140
|
-
|
|
178
|
+
return optionsHandler(props2, props2.column);
|
|
141
179
|
}
|
|
142
180
|
function getColumnRuleHandler(column, model) {
|
|
143
181
|
if (!isRequired(props, column) && formItemRef.value) {
|
|
@@ -150,6 +188,15 @@ const _sfc_main = {
|
|
|
150
188
|
if (!onChange) return;
|
|
151
189
|
onChange(props.column, props.model, props.index);
|
|
152
190
|
}
|
|
191
|
+
async function onReloadOptions() {
|
|
192
|
+
if (props.column.optionsError === "error") {
|
|
193
|
+
try {
|
|
194
|
+
await obtainOptions();
|
|
195
|
+
} catch {
|
|
196
|
+
}
|
|
197
|
+
formContext?.emitOptionsStatus();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
153
200
|
const context = reactive({
|
|
154
201
|
...toRefs(props),
|
|
155
202
|
columnProp,
|
|
@@ -157,16 +204,29 @@ const _sfc_main = {
|
|
|
157
204
|
columnConfig,
|
|
158
205
|
columnAttrs,
|
|
159
206
|
obtainOptions,
|
|
160
|
-
optionsLoading,
|
|
161
|
-
optionsError,
|
|
207
|
+
optionsLoading: computed(() => props.column.optionsLoading),
|
|
208
|
+
optionsError: computed(() => props.column.optionsError),
|
|
162
209
|
options: computed(() => {
|
|
163
|
-
return
|
|
210
|
+
return getOptionsHandler(props, props.column);
|
|
164
211
|
})
|
|
165
212
|
});
|
|
166
213
|
onMounted(() => {
|
|
167
214
|
if (propString.value) {
|
|
168
215
|
formContext?.addField(context);
|
|
169
216
|
}
|
|
217
|
+
watch(
|
|
218
|
+
() => formContext.model.errorMsg,
|
|
219
|
+
() => {
|
|
220
|
+
const optionsError = props.column.optionsError;
|
|
221
|
+
if (optionsError === "error") {
|
|
222
|
+
props.column.optionsError = "";
|
|
223
|
+
setTimeout(() => {
|
|
224
|
+
props.column.optionsError = "error";
|
|
225
|
+
}, 1);
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{ immediate: true, deep: true }
|
|
229
|
+
);
|
|
170
230
|
});
|
|
171
231
|
onBeforeUnmount(() => {
|
|
172
232
|
formContext?.removeField(context);
|
|
@@ -188,23 +248,24 @@ const _sfc_main = {
|
|
|
188
248
|
prop: columnProp.value,
|
|
189
249
|
rules: getColumnRuleHandler(__props.column, props.model),
|
|
190
250
|
style: normalizeStyle(unref(columnItemStyle)(props, __props.column)),
|
|
191
|
-
error: optionsError
|
|
251
|
+
error: __props.column.optionsError,
|
|
252
|
+
"show-message": showMessage.value
|
|
192
253
|
}, createSlots({
|
|
193
254
|
default: withCtx(() => [
|
|
194
255
|
createElementVNode("div", { class: "w-full flex justify-between text-main" }, [
|
|
195
256
|
createElementVNode("div", { class: "flex items-center" }, [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
)
|
|
257
|
+
createElementVNode("span", { class: "text-main whitespace-nowrap" }, [
|
|
258
|
+
renderSlot(_ctx.$slots, __props.column.labelSlot, {
|
|
259
|
+
column: columnConfig.value,
|
|
260
|
+
model: __props.model,
|
|
261
|
+
required: unref(isRequired)(props, __props.column)
|
|
262
|
+
}, () => [
|
|
263
|
+
createTextVNode(
|
|
264
|
+
toDisplayString(unref(columnLabelHandler)(__props.column, props.model) || "\xA0"),
|
|
265
|
+
1
|
|
266
|
+
/* TEXT */
|
|
267
|
+
)
|
|
268
|
+
])
|
|
208
269
|
]),
|
|
209
270
|
unref(isRequired)(props, __props.column) ? (openBlock(), createElementBlock("span", {
|
|
210
271
|
key: 0,
|
|
@@ -238,7 +299,7 @@ const _sfc_main = {
|
|
|
238
299
|
createElementVNode(
|
|
239
300
|
"span",
|
|
240
301
|
null,
|
|
241
|
-
toDisplayString(unref(t)("hy.help")),
|
|
302
|
+
toDisplayString(unref($t)("hy.help")),
|
|
242
303
|
1
|
|
243
304
|
/* TEXT */
|
|
244
305
|
)
|
|
@@ -263,7 +324,7 @@ const _sfc_main = {
|
|
|
263
324
|
"div",
|
|
264
325
|
{
|
|
265
326
|
key: 0,
|
|
266
|
-
class: normalizeClass(["w-full flex items-center text-main px-2", {
|
|
327
|
+
class: normalizeClass(["w-full flex items-center text-main px-2 box-border", {
|
|
267
328
|
"min-h-[40px]": __props.size === "large",
|
|
268
329
|
"min-h-[32px]": __props.size === "default",
|
|
269
330
|
"min-h-[24px]": __props.size === "small",
|
|
@@ -325,13 +386,13 @@ const _sfc_main = {
|
|
|
325
386
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
326
387
|
}, columnAttrs.value, {
|
|
327
388
|
disabled: unref(isDisabled)(props, __props.column),
|
|
328
|
-
options:
|
|
389
|
+
options: getOptionsHandler(props, __props.column),
|
|
329
390
|
onChange: onChangeHandler
|
|
330
391
|
}), createSlots({
|
|
331
392
|
_: 2
|
|
332
393
|
/* DYNAMIC */
|
|
333
394
|
}, [
|
|
334
|
-
optionsLoading
|
|
395
|
+
__props.column.optionsLoading ? {
|
|
335
396
|
name: "empty",
|
|
336
397
|
fn: withCtx(() => [
|
|
337
398
|
createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
|
|
@@ -364,13 +425,13 @@ const _sfc_main = {
|
|
|
364
425
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
365
426
|
}, columnAttrs.value, {
|
|
366
427
|
disabled: unref(isDisabled)(props, __props.column),
|
|
367
|
-
options:
|
|
428
|
+
options: getOptionsHandler(props, __props.column),
|
|
368
429
|
onChange: onChangeHandler
|
|
369
430
|
}), createSlots({
|
|
370
431
|
_: 2
|
|
371
432
|
/* DYNAMIC */
|
|
372
433
|
}, [
|
|
373
|
-
optionsLoading
|
|
434
|
+
__props.column.optionsLoading ? {
|
|
374
435
|
name: "empty",
|
|
375
436
|
fn: withCtx(() => [
|
|
376
437
|
createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
|
|
@@ -398,9 +459,7 @@ const _sfc_main = {
|
|
|
398
459
|
{ key: 4 },
|
|
399
460
|
[
|
|
400
461
|
createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
|
|
401
|
-
["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
402
|
-
columnAttrs.value?.type
|
|
403
|
-
) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
|
|
462
|
+
["datetimerange", "daterange", "monthrange", "yearrange"].includes(columnAttrs.value?.type) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
|
|
404
463
|
key: 0,
|
|
405
464
|
start: bindValue.value,
|
|
406
465
|
"onUpdate:start": ($event) => bindValue.value = $event,
|
|
@@ -467,7 +526,7 @@ const _sfc_main = {
|
|
|
467
526
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
468
527
|
}, columnAttrs.value, {
|
|
469
528
|
disabled: unref(isDisabled)(props, __props.column),
|
|
470
|
-
options:
|
|
529
|
+
options: getOptionsHandler(props, __props.column),
|
|
471
530
|
onChange: onChangeHandler
|
|
472
531
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
|
|
473
532
|
],
|
|
@@ -483,7 +542,7 @@ const _sfc_main = {
|
|
|
483
542
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
484
543
|
}, columnAttrs.value, {
|
|
485
544
|
disabled: unref(isDisabled)(props, __props.column),
|
|
486
|
-
options:
|
|
545
|
+
options: getOptionsHandler(props, __props.column),
|
|
487
546
|
size: __props.size,
|
|
488
547
|
onChange: onChangeHandler
|
|
489
548
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
|
|
@@ -500,15 +559,32 @@ const _sfc_main = {
|
|
|
500
559
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
501
560
|
}, columnAttrs.value, {
|
|
502
561
|
disabled: unref(isDisabled)(props, __props.column),
|
|
503
|
-
options:
|
|
562
|
+
options: getOptionsHandler(props, __props.column),
|
|
504
563
|
onChange: onChangeHandler
|
|
505
564
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
|
|
506
565
|
],
|
|
507
566
|
2112
|
|
508
567
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
509
|
-
)) : __props.column.type === "
|
|
568
|
+
)) : __props.column.type === "checkbox-group" ? (openBlock(), createElementBlock(
|
|
510
569
|
Fragment,
|
|
511
570
|
{ key: 9 },
|
|
571
|
+
[
|
|
572
|
+
createCommentVNode(" \u591A\u9009\u6309\u94AE "),
|
|
573
|
+
createVNode(unref(HyCheckboxGroup), mergeProps({
|
|
574
|
+
modelValue: bindValue.value,
|
|
575
|
+
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
576
|
+
}, columnAttrs.value, {
|
|
577
|
+
disabled: unref(isDisabled)(props, __props.column),
|
|
578
|
+
options: getOptionsHandler(props, __props.column),
|
|
579
|
+
size: __props.size,
|
|
580
|
+
onChange: onChangeHandler
|
|
581
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
|
|
582
|
+
],
|
|
583
|
+
2112
|
|
584
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
585
|
+
)) : __props.column.type === "switch" ? (openBlock(), createElementBlock(
|
|
586
|
+
Fragment,
|
|
587
|
+
{ key: 10 },
|
|
512
588
|
[
|
|
513
589
|
createCommentVNode(" \u5F00\u5173 "),
|
|
514
590
|
createVNode(unref(ElSwitch), mergeProps({
|
|
@@ -526,7 +602,7 @@ const _sfc_main = {
|
|
|
526
602
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
527
603
|
)) : __props.column.type === "input-number" ? (openBlock(), createElementBlock(
|
|
528
604
|
Fragment,
|
|
529
|
-
{ key:
|
|
605
|
+
{ key: 11 },
|
|
530
606
|
[
|
|
531
607
|
createCommentVNode(" \u6570\u5B57\u8F93\u5165\u6846 "),
|
|
532
608
|
createVNode(unref(ElInputNumber), mergeProps({
|
|
@@ -541,7 +617,7 @@ const _sfc_main = {
|
|
|
541
617
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
542
618
|
)) : __props.column.type === "org-cascader" ? (openBlock(), createElementBlock(
|
|
543
619
|
Fragment,
|
|
544
|
-
{ key:
|
|
620
|
+
{ key: 12 },
|
|
545
621
|
[
|
|
546
622
|
createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
547
623
|
createVNode(unref(HyOrgCascader), mergeProps({
|
|
@@ -552,6 +628,10 @@ const _sfc_main = {
|
|
|
552
628
|
class: "w-full"
|
|
553
629
|
}, columnAttrs.value, {
|
|
554
630
|
disabled: unref(isDisabled)(props, __props.column),
|
|
631
|
+
defaultGetData: false,
|
|
632
|
+
onRequesting,
|
|
633
|
+
onFulfilled,
|
|
634
|
+
onRejected,
|
|
555
635
|
onChange: onChangeHandler
|
|
556
636
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
557
637
|
],
|
|
@@ -559,7 +639,7 @@ const _sfc_main = {
|
|
|
559
639
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
560
640
|
)) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
|
|
561
641
|
Fragment,
|
|
562
|
-
{ key:
|
|
642
|
+
{ key: 13 },
|
|
563
643
|
[
|
|
564
644
|
createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
565
645
|
createVNode(unref(ElCascader), mergeProps({
|
|
@@ -568,13 +648,13 @@ const _sfc_main = {
|
|
|
568
648
|
}, columnAttrs.value, {
|
|
569
649
|
class: "w-full",
|
|
570
650
|
disabled: unref(isDisabled)(props, __props.column),
|
|
571
|
-
options:
|
|
651
|
+
options: getOptionsHandler(props, __props.column),
|
|
572
652
|
onChange: onChangeHandler
|
|
573
653
|
}), createSlots({
|
|
574
654
|
_: 2
|
|
575
655
|
/* DYNAMIC */
|
|
576
656
|
}, [
|
|
577
|
-
optionsLoading
|
|
657
|
+
__props.column.optionsLoading ? {
|
|
578
658
|
name: "empty",
|
|
579
659
|
fn: withCtx(() => [
|
|
580
660
|
createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
|
|
@@ -606,21 +686,21 @@ const _sfc_main = {
|
|
|
606
686
|
_: 2
|
|
607
687
|
/* DYNAMIC */
|
|
608
688
|
}, [
|
|
609
|
-
optionsError
|
|
689
|
+
__props.column.optionsError ? {
|
|
610
690
|
name: "error",
|
|
611
691
|
fn: withCtx(() => [
|
|
612
692
|
createElementVNode("div", { class: "hy-el-form-item__error" }, [
|
|
613
693
|
createElementVNode("span", null, "\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7"),
|
|
614
694
|
createElementVNode("span", {
|
|
615
695
|
class: "text-theme cursor-pointer",
|
|
616
|
-
onClick:
|
|
696
|
+
onClick: onReloadOptions
|
|
617
697
|
}, "[\u91CD\u65B0\u52A0\u8F7D]"),
|
|
618
698
|
createElementVNode("span", null, "\u6216\u8054\u7CFB\u7BA1\u7406\u5458")
|
|
619
699
|
])
|
|
620
700
|
]),
|
|
621
701
|
key: "0"
|
|
622
702
|
} : void 0
|
|
623
|
-
]), 1032, ["id", "prop", "rules", "style", "error"])) : createCommentVNode("v-if", true);
|
|
703
|
+
]), 1032, ["id", "prop", "rules", "style", "error", "show-message"])) : createCommentVNode("v-if", true);
|
|
624
704
|
};
|
|
625
705
|
}
|
|
626
706
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { useTemplateRef, computed, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, createBlock, createSlots, withCtx, createVNode, unref, mergeProps, withKeys, renderSlot, normalizeClass, withModifiers, toDisplayString } from 'vue';
|
|
2
2
|
import { ElMessage } from 'element-plus';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
3
|
import '../../../utils/index.mjs';
|
|
5
4
|
import '../../index.mjs';
|
|
6
5
|
import _sfc_main$1 from './formItem.vue.mjs';
|
|
7
|
-
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
8
6
|
import { isArray, isNumber } from '../../../utils/is.mjs';
|
|
9
7
|
import { setValueByProp, getValueByProp } from '../../../utils/form.mjs';
|
|
10
8
|
import { setPoiServer } from '../../../utils/map/index.mjs';
|
|
@@ -56,7 +54,6 @@ const _sfc_main = {
|
|
|
56
54
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
57
55
|
const props = __props;
|
|
58
56
|
const emits = __emit;
|
|
59
|
-
const { t } = useLocale();
|
|
60
57
|
const containerRef = useTemplateRef("containerRef");
|
|
61
58
|
const addressValue = computed({
|
|
62
59
|
get() {
|
|
@@ -155,10 +152,7 @@ const _sfc_main = {
|
|
|
155
152
|
console.log(results);
|
|
156
153
|
if (results && results.length) {
|
|
157
154
|
const geographicalPosition = results[0];
|
|
158
|
-
throughCoordinatePosition(
|
|
159
|
-
geographicalPosition.lng,
|
|
160
|
-
geographicalPosition.lat
|
|
161
|
-
);
|
|
155
|
+
throughCoordinatePosition(geographicalPosition.lng, geographicalPosition.lat);
|
|
162
156
|
} else {
|
|
163
157
|
ElMessage.error("\u6CA1\u6709\u627E\u5230\u641C\u7D22\u5730\u7406\u4F4D\u7F6E");
|
|
164
158
|
}
|
|
@@ -168,22 +162,26 @@ const _sfc_main = {
|
|
|
168
162
|
});
|
|
169
163
|
}
|
|
170
164
|
function throughCoordinatePosition(lng, lat) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
lng
|
|
174
|
-
}).then(({ results }) => {
|
|
175
|
-
geographicalPositionFn({
|
|
176
|
-
lng,
|
|
177
|
-
lat,
|
|
178
|
-
address: results.address,
|
|
179
|
-
name: results.address
|
|
180
|
-
});
|
|
181
|
-
}).catch(() => {
|
|
182
|
-
geographicalPositionFn({
|
|
183
|
-
lng,
|
|
165
|
+
return new Promise((resolve) => {
|
|
166
|
+
poiServer.geocoderFormat({
|
|
184
167
|
lat,
|
|
185
|
-
|
|
186
|
-
|
|
168
|
+
lng
|
|
169
|
+
}).then(({ results }) => {
|
|
170
|
+
geographicalPositionFn({
|
|
171
|
+
lng,
|
|
172
|
+
lat,
|
|
173
|
+
address: results.address,
|
|
174
|
+
name: results.address
|
|
175
|
+
});
|
|
176
|
+
resolve(200);
|
|
177
|
+
}).catch(() => {
|
|
178
|
+
geographicalPositionFn({
|
|
179
|
+
lng,
|
|
180
|
+
lat,
|
|
181
|
+
address: `${Number(lat).toFixed(6)}\u3001${Number(lng).toFixed(6)}`,
|
|
182
|
+
name: `${Number(lat).toFixed(6)}\u3001${Number(lng).toFixed(6)}`
|
|
183
|
+
});
|
|
184
|
+
resolve(200);
|
|
187
185
|
});
|
|
188
186
|
});
|
|
189
187
|
}
|
|
@@ -210,7 +208,7 @@ const _sfc_main = {
|
|
|
210
208
|
});
|
|
211
209
|
emits("complete");
|
|
212
210
|
}
|
|
213
|
-
function setMarker({ lat, lng }) {
|
|
211
|
+
async function setMarker({ lat, lng }, getAddress = false) {
|
|
214
212
|
if (marker) {
|
|
215
213
|
marker.setLatLng({ lat, lng });
|
|
216
214
|
map.setView({ lat, lng }, mapConfig.maxZoom || 18);
|
|
@@ -231,6 +229,10 @@ const _sfc_main = {
|
|
|
231
229
|
marker.addTo(map);
|
|
232
230
|
map.setView({ lat, lng }, mapConfig.maxZoom || 18);
|
|
233
231
|
}
|
|
232
|
+
if (getAddress) {
|
|
233
|
+
await throughCoordinatePosition(lng, lat);
|
|
234
|
+
}
|
|
235
|
+
return 200;
|
|
234
236
|
}
|
|
235
237
|
function clearMarker() {
|
|
236
238
|
if (marker) {
|
|
@@ -338,9 +340,7 @@ const _sfc_main = {
|
|
|
338
340
|
createElementVNode(
|
|
339
341
|
"div",
|
|
340
342
|
{
|
|
341
|
-
class: 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", [
|
|
342
|
-
__props.allMapSelect ? "border-theme text-theme" : "border-border/50 text-main"
|
|
343
|
-
]]),
|
|
343
|
+
class: 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"]]),
|
|
344
344
|
onClick: withModifiers(setMapSize, ["stop"])
|
|
345
345
|
},
|
|
346
346
|
[
|