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
package/es/utils/form.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unref } from 'vue';
|
|
2
2
|
import '../hooks/index.mjs';
|
|
3
3
|
import { isString, isArray, isBoolean, isFunction, isObject, isEmpty } from './is.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { $t } from '../hooks/useLocale.mjs';
|
|
5
5
|
|
|
6
6
|
function getValueByProp(model, prop) {
|
|
7
7
|
if (isString(prop)) {
|
|
@@ -52,21 +52,20 @@ function clearSpace(value, type = "between") {
|
|
|
52
52
|
return value;
|
|
53
53
|
}
|
|
54
54
|
const genRuleRequiredMsgHandler = (column, model) => {
|
|
55
|
-
const { t } = useLocale();
|
|
56
55
|
const { type, prop } = column || {};
|
|
57
56
|
const label = columnLabelHandler(column, model);
|
|
58
57
|
if (!prop || !prop?.length) return "";
|
|
59
58
|
switch (type) {
|
|
60
59
|
case "input":
|
|
61
60
|
case "input-number":
|
|
62
|
-
return t("hy.pleaseEnterPlaceholder", [label]);
|
|
61
|
+
return $t("hy.pleaseEnterPlaceholder", [label]);
|
|
63
62
|
case "select":
|
|
64
63
|
case "radio":
|
|
65
64
|
case "checkbox":
|
|
66
65
|
case "date-picker":
|
|
67
|
-
return t("hy.pleaseSelectPlaceholder", [label]);
|
|
66
|
+
return $t("hy.pleaseSelectPlaceholder", [label]);
|
|
68
67
|
default:
|
|
69
|
-
return t("hy.cannotBeEmpty", [label]);
|
|
68
|
+
return $t("hy.cannotBeEmpty", [label]);
|
|
70
69
|
}
|
|
71
70
|
};
|
|
72
71
|
const requiredHandler = (column, model) => {
|
|
@@ -96,11 +95,10 @@ const columnRuleHandler = (column, model) => {
|
|
|
96
95
|
};
|
|
97
96
|
const genColumnDefaultLabel = (column) => {
|
|
98
97
|
if (column.label) return unref(column.label);
|
|
99
|
-
const { t } = useLocale();
|
|
100
98
|
switch (column.type) {
|
|
101
99
|
// 部门级联选择框
|
|
102
100
|
case "org-cascader":
|
|
103
|
-
return t("form.department");
|
|
101
|
+
return $t("form.department");
|
|
104
102
|
}
|
|
105
103
|
};
|
|
106
104
|
const columnLabelHandler = (column, model) => {
|
|
@@ -112,7 +110,6 @@ const columnLabelHandler = (column, model) => {
|
|
|
112
110
|
return label;
|
|
113
111
|
};
|
|
114
112
|
function columnPlaceholderHandler(column, model) {
|
|
115
|
-
const { t } = useLocale();
|
|
116
113
|
const { type, attrs = {} } = column || {};
|
|
117
114
|
if (isFunction(attrs.placeholder)) {
|
|
118
115
|
const placeholder2 = unref(attrs.placeholder);
|
|
@@ -125,13 +122,13 @@ function columnPlaceholderHandler(column, model) {
|
|
|
125
122
|
case "input-number":
|
|
126
123
|
case "lat":
|
|
127
124
|
case "lon":
|
|
128
|
-
placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
|
|
125
|
+
placeholder = placeholder || $t("hy.pleaseEnterPlaceholder", [label]);
|
|
129
126
|
break;
|
|
130
127
|
case "select":
|
|
131
128
|
case "date-picker":
|
|
132
129
|
case "time-picker":
|
|
133
130
|
case "org-cascader":
|
|
134
|
-
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
131
|
+
placeholder = placeholder || $t("hy.pleaseSelectPlaceholder", [label]);
|
|
135
132
|
break;
|
|
136
133
|
default:
|
|
137
134
|
placeholder = placeholder || label;
|
package/es/utils/handler.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import 'vue';
|
|
|
2
2
|
import { ElMessage } from 'element-plus';
|
|
3
3
|
import { isFunction, isVueProxy, isArray, isObject, isEmpty } from './is.mjs';
|
|
4
4
|
import '../index.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { $t } from '../hooks/useLocale.mjs';
|
|
6
6
|
|
|
7
7
|
function funRunHandler(target, ...args) {
|
|
8
8
|
if (isFunction(target)) {
|
|
@@ -39,10 +39,7 @@ const mergeDeep = (target, value) => {
|
|
|
39
39
|
if (isObject(target)) {
|
|
40
40
|
const obj = {};
|
|
41
41
|
Object.keys(target).forEach((key) => {
|
|
42
|
-
obj[key] = mergeDeep(
|
|
43
|
-
target[key],
|
|
44
|
-
isEmpty(value[key]) ? target[key] : value[key]
|
|
45
|
-
);
|
|
42
|
+
obj[key] = mergeDeep(target[key], isEmpty(value[key]) ? target[key] : value[key]);
|
|
46
43
|
});
|
|
47
44
|
Object.keys(value).forEach((key) => {
|
|
48
45
|
if (isEmpty(value[key])) return;
|
|
@@ -83,11 +80,10 @@ const withInstall = (comp, name) => {
|
|
|
83
80
|
return comp;
|
|
84
81
|
};
|
|
85
82
|
async function copyText(text) {
|
|
86
|
-
const { t } = useLocale();
|
|
87
83
|
if (navigator.clipboard) {
|
|
88
84
|
try {
|
|
89
85
|
await navigator.clipboard.writeText(text);
|
|
90
|
-
ElMessage.success(t("hy.copySuccessfully"));
|
|
86
|
+
ElMessage.success($t("hy.copySuccessfully"));
|
|
91
87
|
return;
|
|
92
88
|
} catch {
|
|
93
89
|
}
|
|
@@ -99,7 +95,7 @@ async function copyText(text) {
|
|
|
99
95
|
input.select();
|
|
100
96
|
document.execCommand("copy");
|
|
101
97
|
document.body.removeChild(input);
|
|
102
|
-
ElMessage.success(t("hy.copySuccessfully"));
|
|
98
|
+
ElMessage.success($t("hy.copySuccessfully"));
|
|
103
99
|
} catch (err) {
|
|
104
100
|
console.error(err);
|
|
105
101
|
return Promise.reject();
|
package/es/utils/input.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../hooks/index.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { $t } from '../hooks/useLocale.mjs';
|
|
3
3
|
|
|
4
4
|
function formatNumber(n) {
|
|
5
5
|
n = n.toString();
|
|
@@ -9,15 +9,14 @@ function formatTimeFn(number, format) {
|
|
|
9
9
|
const time = new Date(number);
|
|
10
10
|
const newArr = [];
|
|
11
11
|
const formatArr = ["Y", "M", "D", "day", "h", "m", "s"];
|
|
12
|
-
const { t } = useLocale();
|
|
13
12
|
const arrWeek = [
|
|
14
|
-
t("hy.sunday"),
|
|
15
|
-
t("hy.monday"),
|
|
16
|
-
t("hy.tuesday"),
|
|
17
|
-
t("hy.wednesday"),
|
|
18
|
-
t("hy.thursday"),
|
|
19
|
-
t("hy.friday"),
|
|
20
|
-
t("hy.saturday")
|
|
13
|
+
$t("hy.sunday"),
|
|
14
|
+
$t("hy.monday"),
|
|
15
|
+
$t("hy.tuesday"),
|
|
16
|
+
$t("hy.wednesday"),
|
|
17
|
+
$t("hy.thursday"),
|
|
18
|
+
$t("hy.friday"),
|
|
19
|
+
$t("hy.saturday")
|
|
21
20
|
];
|
|
22
21
|
newArr.push(time.getFullYear());
|
|
23
22
|
newArr.push(formatNumber(time.getMonth() + 1));
|
package/es/utils/is.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { isRef, isReactive, isReadonly, isProxy } from 'vue';
|
|
2
2
|
import '../hooks/index.mjs';
|
|
3
|
+
import './index.mjs';
|
|
3
4
|
import { usePermissionMap } from '../hooks/usePermissionMap.mjs';
|
|
5
|
+
import { PERMISSION } from './permission.mjs';
|
|
4
6
|
|
|
5
7
|
const isString = (e) => typeof e === "string";
|
|
6
8
|
const isNumber = (e) => typeof e === "number";
|
|
@@ -45,7 +47,7 @@ function isPermission(permission) {
|
|
|
45
47
|
if (!permission) {
|
|
46
48
|
return true;
|
|
47
49
|
}
|
|
48
|
-
return permissionMap.value.has(permission);
|
|
50
|
+
return permissionMap.value.has(PERMISSION[`${permission}`]);
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isObject, isOverflowing, isPermission, isString, isSupportH265, isSymbol, isUndefined, isVueProxy };
|
|
@@ -8,9 +8,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
8
8
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9
9
|
const CIRCLE_SEGMENTS = 36;
|
|
10
10
|
function remToPx(rem) {
|
|
11
|
-
const rootFontSize = parseFloat(
|
|
12
|
-
getComputedStyle(document.documentElement).fontSize
|
|
13
|
-
);
|
|
11
|
+
const rootFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
14
12
|
return rem * rootFontSize;
|
|
15
13
|
}
|
|
16
14
|
function rangingStartIconOption(options, dicId) {
|
|
@@ -308,11 +306,7 @@ class bigMap extends EventEmitter {
|
|
|
308
306
|
if (!newEvent.layer.getLatLngs) {
|
|
309
307
|
newEvent.layer.getLatLngs = () => {
|
|
310
308
|
const circle = newEvent.layer;
|
|
311
|
-
const points = circleToPolygonPoints(
|
|
312
|
-
circle.getLatLng(),
|
|
313
|
-
circle.getRadius() / 1e3,
|
|
314
|
-
true
|
|
315
|
-
);
|
|
309
|
+
const points = circleToPolygonPoints(circle.getLatLng(), circle.getRadius() / 1e3, true);
|
|
316
310
|
return [latLngListCheckExport(points)];
|
|
317
311
|
};
|
|
318
312
|
} else {
|
|
@@ -343,6 +337,8 @@ class bigMap extends EventEmitter {
|
|
|
343
337
|
off: function(target, types, fn, context) {
|
|
344
338
|
const wrappedFn = wrappedHandlers.take(types, fn);
|
|
345
339
|
return target.off(types, wrappedFn || fn, context);
|
|
340
|
+
},
|
|
341
|
+
satelliteMapFn: function() {
|
|
346
342
|
}
|
|
347
343
|
};
|
|
348
344
|
return createMapProxy(newMap, handlers);
|
|
@@ -443,9 +439,7 @@ class bigMap extends EventEmitter {
|
|
|
443
439
|
map.addLayer(displayCluster);
|
|
444
440
|
const toNativeMarkers = (list = []) => {
|
|
445
441
|
const markers = Array.isArray(list) ? list : [list];
|
|
446
|
-
return markers.map(
|
|
447
|
-
(marker) => marker?.getInitMarker ? marker.getInitMarker() : marker
|
|
448
|
-
).filter(Boolean);
|
|
442
|
+
return markers.map((marker) => marker?.getInitMarker ? marker.getInitMarker() : marker).filter(Boolean);
|
|
449
443
|
};
|
|
450
444
|
const handlers = {
|
|
451
445
|
remove: function(target) {
|
|
@@ -487,10 +481,7 @@ class bigMap extends EventEmitter {
|
|
|
487
481
|
},
|
|
488
482
|
// 圆形转多边形坐标
|
|
489
483
|
getLatLngs: function(target) {
|
|
490
|
-
const points = circleToPolygonPoints(
|
|
491
|
-
target.getLatLng(),
|
|
492
|
-
target.getRadius() / 1e3
|
|
493
|
-
);
|
|
484
|
+
const points = circleToPolygonPoints(target.getLatLng(), target.getRadius() / 1e3);
|
|
494
485
|
return [latLngListCheckExport(points)];
|
|
495
486
|
}
|
|
496
487
|
};
|
|
@@ -661,9 +652,7 @@ class bigMap extends EventEmitter {
|
|
|
661
652
|
layer = e.layer;
|
|
662
653
|
if (!layer._latlngs) {
|
|
663
654
|
const center = latAndLngCheckExport(layer.getLatLng());
|
|
664
|
-
layer._latlngs = [
|
|
665
|
-
circleToPolygonPoints(center, layer.getRadius() / 1e3, true)
|
|
666
|
-
];
|
|
655
|
+
layer._latlngs = [circleToPolygonPoints(center, layer.getRadius() / 1e3, true)];
|
|
667
656
|
} else {
|
|
668
657
|
layer._latlngs[0] = latLngListCheckExport(layer._latlngs[0]);
|
|
669
658
|
}
|
|
@@ -802,12 +791,8 @@ class bigMap extends EventEmitter {
|
|
|
802
791
|
function calcTotalDistance(index, preIndex) {
|
|
803
792
|
const current = rangingMarker[index].options.extData.latlng;
|
|
804
793
|
const previous = rangingMarker[preIndex].options.extData.latlng;
|
|
805
|
-
const distance = parseFloat(
|
|
806
|
-
|
|
807
|
-
);
|
|
808
|
-
const total = parseFloat(
|
|
809
|
-
rangingMarker[preIndex].options.extData.distance || 0
|
|
810
|
-
);
|
|
794
|
+
const distance = parseFloat((map.distance(current, previous) / 1e3).toFixed(2));
|
|
795
|
+
const total = parseFloat(rangingMarker[preIndex].options.extData.distance || 0);
|
|
811
796
|
return (distance + total).toFixed(2);
|
|
812
797
|
}
|
|
813
798
|
function removeLineBetween(groupIndex, aIndex, bIndex) {
|
|
@@ -823,9 +808,7 @@ class bigMap extends EventEmitter {
|
|
|
823
808
|
function setStartIcon(index) {
|
|
824
809
|
const markerItem = rangingMarker[index];
|
|
825
810
|
markerItem.setIcon({
|
|
826
|
-
divIcon: _this.DivIcon(
|
|
827
|
-
rangingStartIconOption(options, markerItem.options.extData.dicId)
|
|
828
|
-
)
|
|
811
|
+
divIcon: _this.DivIcon(rangingStartIconOption(options, markerItem.options.extData.dicId))
|
|
829
812
|
});
|
|
830
813
|
markerItem.options.extData.distance = 0;
|
|
831
814
|
}
|
|
@@ -833,14 +816,7 @@ class bigMap extends EventEmitter {
|
|
|
833
816
|
const markerItem = rangingMarker[index];
|
|
834
817
|
const isLast = showDeleteAll ?? !rangingMarker[index + 1]?.options?.extData?.distance;
|
|
835
818
|
markerItem.setIcon({
|
|
836
|
-
divIcon: _this.DivIcon(
|
|
837
|
-
rangingPointIconOption(
|
|
838
|
-
options,
|
|
839
|
-
distance,
|
|
840
|
-
markerItem.options.extData.dicId,
|
|
841
|
-
isLast
|
|
842
|
-
)
|
|
843
|
-
)
|
|
819
|
+
divIcon: _this.DivIcon(rangingPointIconOption(options, distance, markerItem.options.extData.dicId, isLast))
|
|
844
820
|
});
|
|
845
821
|
markerItem.options.extData.distance = distance;
|
|
846
822
|
}
|
|
@@ -868,10 +844,7 @@ class bigMap extends EventEmitter {
|
|
|
868
844
|
rangingPointsIng.push({ lat, lng });
|
|
869
845
|
} else {
|
|
870
846
|
const latlngs = [
|
|
871
|
-
[
|
|
872
|
-
rangingPointsIng[rangingPointsIng.length - 1].lat,
|
|
873
|
-
rangingPointsIng[rangingPointsIng.length - 1].lng
|
|
874
|
-
],
|
|
847
|
+
[rangingPointsIng[rangingPointsIng.length - 1].lat, rangingPointsIng[rangingPointsIng.length - 1].lng],
|
|
875
848
|
[lat, lng]
|
|
876
849
|
];
|
|
877
850
|
const polyline = _this.Polyline(latlngs, {
|
|
@@ -889,13 +862,9 @@ class bigMap extends EventEmitter {
|
|
|
889
862
|
{ lat: latlngs[1][0], lng: latlngs[1][1] }
|
|
890
863
|
);
|
|
891
864
|
distance = parseFloat((distance / 1e3).toFixed(2));
|
|
892
|
-
const total = parseFloat(
|
|
893
|
-
rangingMarker[rangingMarker.length - 1].options.extData.distance || 0
|
|
894
|
-
);
|
|
865
|
+
const total = parseFloat(rangingMarker[rangingMarker.length - 1].options.extData.distance || 0);
|
|
895
866
|
distance = (distance + total).toFixed(2);
|
|
896
|
-
const customIcon = _this.DivIcon(
|
|
897
|
-
rangingPointIconOption(options, distance, dicId)
|
|
898
|
-
);
|
|
867
|
+
const customIcon = _this.DivIcon(rangingPointIconOption(options, distance, dicId));
|
|
899
868
|
const markerItem = _this.Marker({
|
|
900
869
|
position: { lat, lng },
|
|
901
870
|
icon: customIcon,
|
|
@@ -961,10 +930,7 @@ class bigMap extends EventEmitter {
|
|
|
961
930
|
if (changeIndex - 1 === index) {
|
|
962
931
|
setStartIcon(changeIndex);
|
|
963
932
|
} else {
|
|
964
|
-
setPointIcon(
|
|
965
|
-
changeIndex,
|
|
966
|
-
calcTotalDistance(changeIndex, changeIndex - 1)
|
|
967
|
-
);
|
|
933
|
+
setPointIcon(changeIndex, calcTotalDistance(changeIndex, changeIndex - 1));
|
|
968
934
|
}
|
|
969
935
|
changeIndex++;
|
|
970
936
|
}
|
|
@@ -997,10 +963,7 @@ class bigMap extends EventEmitter {
|
|
|
997
963
|
let changeIndex = index + 1;
|
|
998
964
|
while (rangingMarker[changeIndex]?.options?.extData?.distance) {
|
|
999
965
|
const disIndex = changeIndex - 1 === index ? changeIndex - 2 : changeIndex - 1;
|
|
1000
|
-
setPointIcon(
|
|
1001
|
-
changeIndex,
|
|
1002
|
-
calcTotalDistance(changeIndex, disIndex)
|
|
1003
|
-
);
|
|
966
|
+
setPointIcon(changeIndex, calcTotalDistance(changeIndex, disIndex));
|
|
1004
967
|
changeIndex++;
|
|
1005
968
|
}
|
|
1006
969
|
setTimeout(() => {
|
|
@@ -94,6 +94,7 @@ class Google extends EventEmitter {
|
|
|
94
94
|
return createMapProxy(polygon, handlers);
|
|
95
95
|
});
|
|
96
96
|
this.initParams = request;
|
|
97
|
+
this.layerSateGroup = null;
|
|
97
98
|
}
|
|
98
99
|
InitMap(domId, option) {
|
|
99
100
|
const { center } = option;
|
|
@@ -110,31 +111,35 @@ class Google extends EventEmitter {
|
|
|
110
111
|
resizeEnable: true
|
|
111
112
|
});
|
|
112
113
|
newMap.on("complete", (e) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
newMap.plugin(
|
|
115
|
+
[
|
|
116
|
+
"AMap.MarkerClusterer",
|
|
117
|
+
"AMap.Scale",
|
|
118
|
+
"AMap.LayerGroup",
|
|
119
|
+
"AMap.Circle",
|
|
120
|
+
"AMap.TileLayer",
|
|
121
|
+
"AMap.GeometryUtil",
|
|
122
|
+
"AMap.MouseTool"
|
|
123
|
+
],
|
|
124
|
+
() => {
|
|
125
|
+
this.layerSateGroup = new window.AMap.LayerGroup([new window.AMap.TileLayer.Satellite()]);
|
|
126
|
+
this.layerSateGroup.setMap(newMap);
|
|
127
|
+
this.layerSateGroup.hide();
|
|
128
|
+
setTimeout(() => {
|
|
129
|
+
this.satelliteMapFn(newMap, option.satelliteMap);
|
|
130
|
+
if (option.completeCallbacks) {
|
|
131
|
+
option.completeCallbacks(e);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
);
|
|
116
136
|
});
|
|
117
|
-
newMap.plugin(
|
|
118
|
-
[
|
|
119
|
-
"AMap.MarkerClusterer",
|
|
120
|
-
"AMap.Scale",
|
|
121
|
-
"AMap.LayerGroup",
|
|
122
|
-
"AMap.Circle",
|
|
123
|
-
"AMap.TileLayer",
|
|
124
|
-
"AMap.GeometryUtil",
|
|
125
|
-
"AMap.MouseTool"
|
|
126
|
-
],
|
|
127
|
-
() => {
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
137
|
const wrappedHandlers = createWrappedHandlerStore();
|
|
138
|
+
const _this = this;
|
|
131
139
|
const handlers = {
|
|
132
140
|
// return 单位:m
|
|
133
141
|
distance: function(target, latAndlng1, latAndlng2) {
|
|
134
|
-
return AMap.GeometryUtil.distance(
|
|
135
|
-
[latAndlng1.lng, latAndlng1.lat],
|
|
136
|
-
[latAndlng2.lng, latAndlng2.lat]
|
|
137
|
-
);
|
|
142
|
+
return AMap.GeometryUtil.distance([latAndlng1.lng, latAndlng1.lat], [latAndlng2.lng, latAndlng2.lat]);
|
|
138
143
|
},
|
|
139
144
|
// 删除地图
|
|
140
145
|
removeMap: function(target) {
|
|
@@ -178,10 +183,35 @@ class Google extends EventEmitter {
|
|
|
178
183
|
// // 四个角
|
|
179
184
|
getBounds: function(target) {
|
|
180
185
|
return wrapBounds(target);
|
|
186
|
+
},
|
|
187
|
+
/* 判断地图颜色 */
|
|
188
|
+
satelliteMapFn: function(target, satelliteMap) {
|
|
189
|
+
if (satelliteMap === 3) {
|
|
190
|
+
_this.layerSateGroup.show();
|
|
191
|
+
} else {
|
|
192
|
+
if (satelliteMap === 1) {
|
|
193
|
+
target.setMapStyle(_this.initParams.defaultMapStyle);
|
|
194
|
+
} else {
|
|
195
|
+
target.setMapStyle(_this.initParams.currencyMapStyle);
|
|
196
|
+
}
|
|
197
|
+
_this.layerSateGroup.hide();
|
|
198
|
+
}
|
|
181
199
|
}
|
|
182
200
|
};
|
|
183
201
|
return createMapProxy(newMap, handlers);
|
|
184
202
|
}
|
|
203
|
+
satelliteMapFn(map, satelliteMap) {
|
|
204
|
+
if (satelliteMap === 3) {
|
|
205
|
+
this.layerSateGroup.show();
|
|
206
|
+
} else {
|
|
207
|
+
if (satelliteMap === 1) {
|
|
208
|
+
map.setMapStyle(this.initParams.defaultMapStyle);
|
|
209
|
+
} else {
|
|
210
|
+
map.setMapStyle(this.initParams.currencyMapStyle);
|
|
211
|
+
}
|
|
212
|
+
this.layerSateGroup.hide();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
185
215
|
// 地图图层
|
|
186
216
|
layerGroup(map, markers = []) {
|
|
187
217
|
const layerGroup = new window.AMap.LayerGroup(markers);
|
|
@@ -205,10 +235,7 @@ class Google extends EventEmitter {
|
|
|
205
235
|
let offset = null;
|
|
206
236
|
const { html, iconSize, iconAnchor } = markerOptions.icon.option;
|
|
207
237
|
if (markerOptions.offset) {
|
|
208
|
-
offset = new window.AMap.Pixel(
|
|
209
|
-
markerOptions.offset[0],
|
|
210
|
-
markerOptions.offset[1]
|
|
211
|
-
);
|
|
238
|
+
offset = new window.AMap.Pixel(markerOptions.offset[0], markerOptions.offset[1]);
|
|
212
239
|
} else {
|
|
213
240
|
const offsetX = iconAnchor[0] - iconSize[0] / 2;
|
|
214
241
|
const offsetY = -iconAnchor[1];
|
|
@@ -243,10 +270,7 @@ class Google extends EventEmitter {
|
|
|
243
270
|
target.setContent(html2);
|
|
244
271
|
let setOffset = null;
|
|
245
272
|
if (iconParams.offset) {
|
|
246
|
-
setOffset = new window.AMap.Pixel(
|
|
247
|
-
iconParams.offset[0],
|
|
248
|
-
iconParams.offset[1]
|
|
249
|
-
);
|
|
273
|
+
setOffset = new window.AMap.Pixel(iconParams.offset[0], iconParams.offset[1]);
|
|
250
274
|
} else {
|
|
251
275
|
const offsetX = iconAnchor2[0] - iconSize2[0] / 2;
|
|
252
276
|
const offsetY = -iconAnchor2[1];
|
|
@@ -280,11 +304,7 @@ class Google extends EventEmitter {
|
|
|
280
304
|
gridSize: option.maxClusterRadius
|
|
281
305
|
// 聚合计算时网格的像素大小,默认60
|
|
282
306
|
};
|
|
283
|
-
const displayCluster = new window.AMap.MarkerClusterer(
|
|
284
|
-
map,
|
|
285
|
-
markerList,
|
|
286
|
-
option
|
|
287
|
-
);
|
|
307
|
+
const displayCluster = new window.AMap.MarkerClusterer(map, markerList, option);
|
|
288
308
|
const handlers = {
|
|
289
309
|
// 清除聚合点
|
|
290
310
|
remove: function(target) {
|