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
|
@@ -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('../../
|
|
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,11 +64,19 @@ 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");
|
|
70
70
|
const orgCascaderRef = vue.useTemplateRef("orgCascaderRef");
|
|
71
|
+
const showMessage = vue.computed(() => {
|
|
72
|
+
if (columnConfig.value.optionsError) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
if (is.isBoolean(columnConfig.value.showMessage)) {
|
|
76
|
+
return columnConfig.value.showMessage;
|
|
77
|
+
}
|
|
78
|
+
return formContext.showMessage;
|
|
79
|
+
});
|
|
71
80
|
const columnProp = vue.computed(() => {
|
|
72
81
|
let field = is.isArray(props.column.field) ? props.column.field[0] : props.column.field;
|
|
73
82
|
if (props.parentProp) {
|
|
@@ -112,36 +121,65 @@ const _sfc_main = {
|
|
|
112
121
|
placeholder: form.columnPlaceholderHandler(props.column, props.model)
|
|
113
122
|
};
|
|
114
123
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
124
|
+
async function obtainOptions(isMountedLoad = false) {
|
|
125
|
+
return new Promise(async (resolve, reject) => {
|
|
126
|
+
if (props.column.optionsFn) {
|
|
127
|
+
if (!props.column.optionsFn) return;
|
|
128
|
+
onRequesting();
|
|
129
|
+
if (!(isMountedLoad && props.column.isDefaultGetData === false)) {
|
|
130
|
+
try {
|
|
131
|
+
const options = await props.column.optionsFn(props.column, props.model);
|
|
132
|
+
onFulfilled(options);
|
|
133
|
+
resolve();
|
|
134
|
+
} catch (err) {
|
|
135
|
+
onRejected();
|
|
136
|
+
console.error(err);
|
|
137
|
+
reject();
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
resolve();
|
|
141
|
+
}
|
|
142
|
+
} else if (props.column.type === "org-cascader") {
|
|
143
|
+
if (orgCascaderRef.value) {
|
|
144
|
+
try {
|
|
145
|
+
onRequesting();
|
|
146
|
+
await orgCascaderRef.value.getData();
|
|
147
|
+
onFulfilled();
|
|
148
|
+
resolve();
|
|
149
|
+
} catch {
|
|
150
|
+
props.column.optionsError = "error";
|
|
151
|
+
onRejected();
|
|
152
|
+
reject();
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
155
|
+
resolve();
|
|
141
156
|
}
|
|
157
|
+
} else {
|
|
158
|
+
resolve();
|
|
142
159
|
}
|
|
160
|
+
props.column.optionsLoading = false;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
function onRequesting() {
|
|
164
|
+
props.column.optionsLoading = true;
|
|
165
|
+
props.column.optionsError = "";
|
|
166
|
+
props.column.attrs.options = [];
|
|
167
|
+
}
|
|
168
|
+
function onFulfilled(options = []) {
|
|
169
|
+
props.column.optionsLoading = false;
|
|
170
|
+
props.column.optionsError = "";
|
|
171
|
+
props.column.attrs.options = options;
|
|
172
|
+
}
|
|
173
|
+
function onRejected() {
|
|
174
|
+
props.column.optionsLoading = false;
|
|
175
|
+
props.column.optionsError = "error";
|
|
176
|
+
props.column.attrs.options = [];
|
|
177
|
+
}
|
|
178
|
+
function getOptionsHandler(props2, column) {
|
|
179
|
+
if (props2.column.optionsLoading) {
|
|
180
|
+
return [];
|
|
143
181
|
}
|
|
144
|
-
|
|
182
|
+
return index.optionsHandler(props2, props2.column);
|
|
145
183
|
}
|
|
146
184
|
function getColumnRuleHandler(column, model) {
|
|
147
185
|
if (!index.isRequired(props, column) && formItemRef.value) {
|
|
@@ -154,6 +192,15 @@ const _sfc_main = {
|
|
|
154
192
|
if (!onChange) return;
|
|
155
193
|
onChange(props.column, props.model, props.index);
|
|
156
194
|
}
|
|
195
|
+
async function onReloadOptions() {
|
|
196
|
+
if (props.column.optionsError === "error") {
|
|
197
|
+
try {
|
|
198
|
+
await obtainOptions();
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
formContext?.emitOptionsStatus();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
157
204
|
const context = vue.reactive({
|
|
158
205
|
...vue.toRefs(props),
|
|
159
206
|
columnProp,
|
|
@@ -161,16 +208,29 @@ const _sfc_main = {
|
|
|
161
208
|
columnConfig,
|
|
162
209
|
columnAttrs,
|
|
163
210
|
obtainOptions,
|
|
164
|
-
optionsLoading,
|
|
165
|
-
optionsError,
|
|
211
|
+
optionsLoading: vue.computed(() => props.column.optionsLoading),
|
|
212
|
+
optionsError: vue.computed(() => props.column.optionsError),
|
|
166
213
|
options: vue.computed(() => {
|
|
167
|
-
return
|
|
214
|
+
return getOptionsHandler(props, props.column);
|
|
168
215
|
})
|
|
169
216
|
});
|
|
170
217
|
vue.onMounted(() => {
|
|
171
218
|
if (propString.value) {
|
|
172
219
|
formContext?.addField(context);
|
|
173
220
|
}
|
|
221
|
+
vue.watch(
|
|
222
|
+
() => formContext.model.errorMsg,
|
|
223
|
+
() => {
|
|
224
|
+
const optionsError = props.column.optionsError;
|
|
225
|
+
if (optionsError === "error") {
|
|
226
|
+
props.column.optionsError = "";
|
|
227
|
+
setTimeout(() => {
|
|
228
|
+
props.column.optionsError = "error";
|
|
229
|
+
}, 1);
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{ immediate: true, deep: true }
|
|
233
|
+
);
|
|
174
234
|
});
|
|
175
235
|
vue.onBeforeUnmount(() => {
|
|
176
236
|
formContext?.removeField(context);
|
|
@@ -192,23 +252,24 @@ const _sfc_main = {
|
|
|
192
252
|
prop: columnProp.value,
|
|
193
253
|
rules: getColumnRuleHandler(__props.column, props.model),
|
|
194
254
|
style: vue.normalizeStyle(vue.unref(index.columnItemStyle)(props, __props.column)),
|
|
195
|
-
error: optionsError
|
|
255
|
+
error: __props.column.optionsError,
|
|
256
|
+
"show-message": showMessage.value
|
|
196
257
|
}, vue.createSlots({
|
|
197
258
|
default: vue.withCtx(() => [
|
|
198
259
|
vue.createElementVNode("div", { class: "w-full flex justify-between text-main" }, [
|
|
199
260
|
vue.createElementVNode("div", { class: "flex items-center" }, [
|
|
200
|
-
vue.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
)
|
|
261
|
+
vue.createElementVNode("span", { class: "text-main whitespace-nowrap" }, [
|
|
262
|
+
vue.renderSlot(_ctx.$slots, __props.column.labelSlot, {
|
|
263
|
+
column: columnConfig.value,
|
|
264
|
+
model: __props.model,
|
|
265
|
+
required: vue.unref(index.isRequired)(props, __props.column)
|
|
266
|
+
}, () => [
|
|
267
|
+
vue.createTextVNode(
|
|
268
|
+
vue.toDisplayString(vue.unref(form.columnLabelHandler)(__props.column, props.model) || "\xA0"),
|
|
269
|
+
1
|
|
270
|
+
/* TEXT */
|
|
271
|
+
)
|
|
272
|
+
])
|
|
212
273
|
]),
|
|
213
274
|
vue.unref(index.isRequired)(props, __props.column) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
214
275
|
key: 0,
|
|
@@ -242,7 +303,7 @@ const _sfc_main = {
|
|
|
242
303
|
vue.createElementVNode(
|
|
243
304
|
"span",
|
|
244
305
|
null,
|
|
245
|
-
vue.toDisplayString(vue.unref(t)("hy.help")),
|
|
306
|
+
vue.toDisplayString(vue.unref(useLocale.$t)("hy.help")),
|
|
246
307
|
1
|
|
247
308
|
/* TEXT */
|
|
248
309
|
)
|
|
@@ -267,7 +328,7 @@ const _sfc_main = {
|
|
|
267
328
|
"div",
|
|
268
329
|
{
|
|
269
330
|
key: 0,
|
|
270
|
-
class: vue.normalizeClass(["w-full flex items-center text-main px-2", {
|
|
331
|
+
class: vue.normalizeClass(["w-full flex items-center text-main px-2 box-border", {
|
|
271
332
|
"min-h-[40px]": __props.size === "large",
|
|
272
333
|
"min-h-[32px]": __props.size === "default",
|
|
273
334
|
"min-h-[24px]": __props.size === "small",
|
|
@@ -329,13 +390,13 @@ const _sfc_main = {
|
|
|
329
390
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
330
391
|
}, columnAttrs.value, {
|
|
331
392
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
332
|
-
options:
|
|
393
|
+
options: getOptionsHandler(props, __props.column),
|
|
333
394
|
onChange: onChangeHandler
|
|
334
395
|
}), vue.createSlots({
|
|
335
396
|
_: 2
|
|
336
397
|
/* DYNAMIC */
|
|
337
398
|
}, [
|
|
338
|
-
optionsLoading
|
|
399
|
+
__props.column.optionsLoading ? {
|
|
339
400
|
name: "empty",
|
|
340
401
|
fn: vue.withCtx(() => [
|
|
341
402
|
vue.createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
|
|
@@ -368,13 +429,13 @@ const _sfc_main = {
|
|
|
368
429
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
369
430
|
}, columnAttrs.value, {
|
|
370
431
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
371
|
-
options:
|
|
432
|
+
options: getOptionsHandler(props, __props.column),
|
|
372
433
|
onChange: onChangeHandler
|
|
373
434
|
}), vue.createSlots({
|
|
374
435
|
_: 2
|
|
375
436
|
/* DYNAMIC */
|
|
376
437
|
}, [
|
|
377
|
-
optionsLoading
|
|
438
|
+
__props.column.optionsLoading ? {
|
|
378
439
|
name: "empty",
|
|
379
440
|
fn: vue.withCtx(() => [
|
|
380
441
|
vue.createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
|
|
@@ -402,9 +463,7 @@ const _sfc_main = {
|
|
|
402
463
|
{ key: 4 },
|
|
403
464
|
[
|
|
404
465
|
vue.createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
|
|
405
|
-
["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
406
|
-
columnAttrs.value?.type
|
|
407
|
-
) && vue.unref(is.isArray)(__props.column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyDatePicker), vue.mergeProps({
|
|
466
|
+
["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({
|
|
408
467
|
key: 0,
|
|
409
468
|
start: bindValue.value,
|
|
410
469
|
"onUpdate:start": ($event) => bindValue.value = $event,
|
|
@@ -471,7 +530,7 @@ const _sfc_main = {
|
|
|
471
530
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
472
531
|
}, columnAttrs.value, {
|
|
473
532
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
474
|
-
options:
|
|
533
|
+
options: getOptionsHandler(props, __props.column),
|
|
475
534
|
onChange: onChangeHandler
|
|
476
535
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
|
|
477
536
|
],
|
|
@@ -487,7 +546,7 @@ const _sfc_main = {
|
|
|
487
546
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
488
547
|
}, columnAttrs.value, {
|
|
489
548
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
490
|
-
options:
|
|
549
|
+
options: getOptionsHandler(props, __props.column),
|
|
491
550
|
size: __props.size,
|
|
492
551
|
onChange: onChangeHandler
|
|
493
552
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
|
|
@@ -504,15 +563,32 @@ const _sfc_main = {
|
|
|
504
563
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
505
564
|
}, columnAttrs.value, {
|
|
506
565
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
507
|
-
options:
|
|
566
|
+
options: getOptionsHandler(props, __props.column),
|
|
508
567
|
onChange: onChangeHandler
|
|
509
568
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
|
|
510
569
|
],
|
|
511
570
|
2112
|
|
512
571
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
513
|
-
)) : __props.column.type === "
|
|
572
|
+
)) : __props.column.type === "checkbox-group" ? (vue.openBlock(), vue.createElementBlock(
|
|
514
573
|
vue.Fragment,
|
|
515
574
|
{ key: 9 },
|
|
575
|
+
[
|
|
576
|
+
vue.createCommentVNode(" \u591A\u9009\u6309\u94AE "),
|
|
577
|
+
vue.createVNode(vue.unref(index$7.HyCheckboxGroup), vue.mergeProps({
|
|
578
|
+
modelValue: bindValue.value,
|
|
579
|
+
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
580
|
+
}, columnAttrs.value, {
|
|
581
|
+
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
582
|
+
options: getOptionsHandler(props, __props.column),
|
|
583
|
+
size: __props.size,
|
|
584
|
+
onChange: onChangeHandler
|
|
585
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
|
|
586
|
+
],
|
|
587
|
+
2112
|
|
588
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
589
|
+
)) : __props.column.type === "switch" ? (vue.openBlock(), vue.createElementBlock(
|
|
590
|
+
vue.Fragment,
|
|
591
|
+
{ key: 10 },
|
|
516
592
|
[
|
|
517
593
|
vue.createCommentVNode(" \u5F00\u5173 "),
|
|
518
594
|
vue.createVNode(vue.unref(elementPlus.ElSwitch), vue.mergeProps({
|
|
@@ -530,7 +606,7 @@ const _sfc_main = {
|
|
|
530
606
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
531
607
|
)) : __props.column.type === "input-number" ? (vue.openBlock(), vue.createElementBlock(
|
|
532
608
|
vue.Fragment,
|
|
533
|
-
{ key:
|
|
609
|
+
{ key: 11 },
|
|
534
610
|
[
|
|
535
611
|
vue.createCommentVNode(" \u6570\u5B57\u8F93\u5165\u6846 "),
|
|
536
612
|
vue.createVNode(vue.unref(elementPlus.ElInputNumber), vue.mergeProps({
|
|
@@ -545,10 +621,10 @@ const _sfc_main = {
|
|
|
545
621
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
546
622
|
)) : __props.column.type === "org-cascader" ? (vue.openBlock(), vue.createElementBlock(
|
|
547
623
|
vue.Fragment,
|
|
548
|
-
{ key:
|
|
624
|
+
{ key: 12 },
|
|
549
625
|
[
|
|
550
626
|
vue.createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
551
|
-
vue.createVNode(vue.unref(index$
|
|
627
|
+
vue.createVNode(vue.unref(index$8.HyOrgCascader), vue.mergeProps({
|
|
552
628
|
ref_key: "orgCascaderRef",
|
|
553
629
|
ref: orgCascaderRef,
|
|
554
630
|
modelValue: bindValue.value,
|
|
@@ -556,6 +632,10 @@ const _sfc_main = {
|
|
|
556
632
|
class: "w-full"
|
|
557
633
|
}, columnAttrs.value, {
|
|
558
634
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
635
|
+
defaultGetData: false,
|
|
636
|
+
onRequesting,
|
|
637
|
+
onFulfilled,
|
|
638
|
+
onRejected,
|
|
559
639
|
onChange: onChangeHandler
|
|
560
640
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
561
641
|
],
|
|
@@ -563,7 +643,7 @@ const _sfc_main = {
|
|
|
563
643
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
564
644
|
)) : __props.column.type === "cascader" ? (vue.openBlock(), vue.createElementBlock(
|
|
565
645
|
vue.Fragment,
|
|
566
|
-
{ key:
|
|
646
|
+
{ key: 13 },
|
|
567
647
|
[
|
|
568
648
|
vue.createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
569
649
|
vue.createVNode(vue.unref(elementPlus.ElCascader), vue.mergeProps({
|
|
@@ -572,13 +652,13 @@ const _sfc_main = {
|
|
|
572
652
|
}, columnAttrs.value, {
|
|
573
653
|
class: "w-full",
|
|
574
654
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
575
|
-
options:
|
|
655
|
+
options: getOptionsHandler(props, __props.column),
|
|
576
656
|
onChange: onChangeHandler
|
|
577
657
|
}), vue.createSlots({
|
|
578
658
|
_: 2
|
|
579
659
|
/* DYNAMIC */
|
|
580
660
|
}, [
|
|
581
|
-
optionsLoading
|
|
661
|
+
__props.column.optionsLoading ? {
|
|
582
662
|
name: "empty",
|
|
583
663
|
fn: vue.withCtx(() => [
|
|
584
664
|
vue.createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
|
|
@@ -610,21 +690,21 @@ const _sfc_main = {
|
|
|
610
690
|
_: 2
|
|
611
691
|
/* DYNAMIC */
|
|
612
692
|
}, [
|
|
613
|
-
optionsError
|
|
693
|
+
__props.column.optionsError ? {
|
|
614
694
|
name: "error",
|
|
615
695
|
fn: vue.withCtx(() => [
|
|
616
696
|
vue.createElementVNode("div", { class: "hy-el-form-item__error" }, [
|
|
617
697
|
vue.createElementVNode("span", null, "\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7"),
|
|
618
698
|
vue.createElementVNode("span", {
|
|
619
699
|
class: "text-theme cursor-pointer",
|
|
620
|
-
onClick:
|
|
700
|
+
onClick: onReloadOptions
|
|
621
701
|
}, "[\u91CD\u65B0\u52A0\u8F7D]"),
|
|
622
702
|
vue.createElementVNode("span", null, "\u6216\u8054\u7CFB\u7BA1\u7406\u5458")
|
|
623
703
|
])
|
|
624
704
|
]),
|
|
625
705
|
key: "0"
|
|
626
706
|
} : void 0
|
|
627
|
-
]), 1032, ["id", "prop", "rules", "style", "error"])) : vue.createCommentVNode("v-if", true);
|
|
707
|
+
]), 1032, ["id", "prop", "rules", "style", "error", "show-message"])) : vue.createCommentVNode("v-if", true);
|
|
628
708
|
};
|
|
629
709
|
}
|
|
630
710
|
};
|
|
@@ -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
|
-
|
|
176
|
-
|
|
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
|
-
|
|
190
|
-
|
|
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
|
[
|