hy-dispatch-ui-v3 0.2.67 → 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 +232 -20
- 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/hyButton/button.vue.mjs +2 -2
- package/es/components/hyButton/style/button.scss +48 -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 +65 -35
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +56 -24
- 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 +29 -4
- package/es/components/hyMap/map.vue.mjs +17 -3
- 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 +25 -11
- 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 +33 -20
- 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 +9 -16
- package/es/components/hySearch/style/search.scss +2 -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 +18 -28
- package/es/components/hyTable/js/index.mjs +56 -59
- 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 +35 -41
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +4 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +3 -7
- package/es/components/hyTableForm/js/index.mjs +2 -8
- package/es/components/hyTableForm/js/useAppTableForm.mjs +2 -7
- 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 +90 -46
- package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
- package/es/components/hyTree/js/index.mjs +13 -40
- package/es/components/hyTree/style/index.css +1 -1
- package/es/components/hyTree/tree.vue.mjs +17 -16
- 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/tailwind.scss +7 -3
- 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/map/hook/bigMap.mjs +14 -53
- package/es/utils/map/hook/gaode.mjs +5 -20
- package/es/utils/map/hook/leafletjs.mjs +23 -79
- package/es/utils/map/index.mjs +2 -8
- 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/hyButton/button.vue.js +2 -2
- package/lib/components/hyButton/style/button.scss +48 -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 +66 -36
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +51 -19
- 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 +29 -4
- package/lib/components/hyMap/map.vue.js +17 -3
- 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 +23 -9
- 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 +33 -20
- 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 +9 -16
- package/lib/components/hySearch/style/search.scss +2 -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 +17 -27
- package/lib/components/hyTable/js/index.js +54 -57
- 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 +35 -41
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +4 -4
- package/lib/components/hyTableForm/batchTableForm.vue.js +3 -7
- package/lib/components/hyTableForm/js/index.js +2 -8
- package/lib/components/hyTableForm/js/useAppTableForm.js +2 -7
- 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 +89 -45
- package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
- package/lib/components/hyTree/js/index.js +13 -40
- package/lib/components/hyTree/style/index.css +1 -1
- package/lib/components/hyTree/tree.vue.js +17 -16
- 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/tailwind.scss +7 -3
- 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/map/hook/bigMap.js +14 -53
- package/lib/utils/map/hook/gaode.js +5 -20
- package/lib/utils/map/hook/leafletjs.js +23 -79
- package/lib/utils/map/index.js +2 -8
- package/lib/utils/map/js/webgis.js +12 -12
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
import { useTemplateRef, ref, computed, nextTick, shallowRef, openBlock, createBlock, unref, isRef, withCtx, createElementVNode, createVNode, mergeProps, createTextVNode, createElementBlock, createCommentVNode } from 'vue';
|
|
2
|
+
import { ElMessage, ElCheckbox } from 'element-plus';
|
|
3
|
+
import { selectApi, saveApi } from '../../../../api/index.mjs';
|
|
4
|
+
import { findAllMapRailLocationApi } from '../../../../api/mapRail.mjs';
|
|
5
|
+
import '../../../../hooks/index.mjs';
|
|
6
|
+
import '../../../../utils/index.mjs';
|
|
7
|
+
import '../../../../components/index.mjs';
|
|
8
|
+
import '../../../index.mjs';
|
|
9
|
+
import { useCurrentBus } from '../../../../hooks/useCurrentBus.mjs';
|
|
10
|
+
import { $t } from '../../../../hooks/useLocale.mjs';
|
|
11
|
+
import { useAppForm } from '../../../../components/hyForm/js/useAppForm.mjs';
|
|
12
|
+
import { isPermission } from '../../../../utils/is.mjs';
|
|
13
|
+
import { useMixins } from '../../../../hooks/useMixins.mjs';
|
|
14
|
+
import { useDialog, useDialogIsEdit } from '../../../../hooks/useDialog.mjs';
|
|
15
|
+
import { HyDialog } from '../../../../components/hyDialog/index.mjs';
|
|
16
|
+
import { HyForm } from '../../../../components/hyForm/index.mjs';
|
|
17
|
+
import { HyInput } from '../../../../components/hyInput/index.mjs';
|
|
18
|
+
import { HyMapAearchPlace } from '../../../hyMapAearchPlace/index.mjs';
|
|
19
|
+
import { HyMap } from '../../../../components/hyMap/index.mjs';
|
|
20
|
+
import { HyIcon } from '../../../../components/hyIcon/index.mjs';
|
|
21
|
+
import { HyButton } from '../../../../components/hyButton/index.mjs';
|
|
22
|
+
|
|
23
|
+
const _sfc_main = {
|
|
24
|
+
__name: "addElectronicFenceDialog",
|
|
25
|
+
props: {
|
|
26
|
+
ifDraggable: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
ifShrink: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
setup(__props, { expose: __expose }) {
|
|
36
|
+
const props = __props;
|
|
37
|
+
const { currentBus } = useCurrentBus();
|
|
38
|
+
const useAddElectronicFenceDialog = (hy) => {
|
|
39
|
+
const HyDialogRef = useTemplateRef("HyDialogRef");
|
|
40
|
+
const formRef2 = useTemplateRef("formRef");
|
|
41
|
+
const dialogVisible2 = ref(false);
|
|
42
|
+
const loading2 = ref(false);
|
|
43
|
+
const title2 = computed(() => {
|
|
44
|
+
return hy.isAdd.value ? $t("electronicFence.addAnElectronicFence") : $t("electronicFence.editTheElectronicFence");
|
|
45
|
+
});
|
|
46
|
+
const isAdd = computed(() => !hy.formModel.value.id);
|
|
47
|
+
const { formModel: formModel2, formColumns: formColumns2 } = useAppForm([
|
|
48
|
+
{
|
|
49
|
+
type: "input",
|
|
50
|
+
prop: "railName",
|
|
51
|
+
label: $t("electronicFence.electronicFenceName"),
|
|
52
|
+
required: true,
|
|
53
|
+
span: 24,
|
|
54
|
+
attrs: {
|
|
55
|
+
clearable: true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
prop: "search",
|
|
60
|
+
label: "\u641C\u7D22\u4F4D\u7F6E",
|
|
61
|
+
span: 10,
|
|
62
|
+
slot: "search"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "select",
|
|
66
|
+
prop: "mouseToolName",
|
|
67
|
+
label: "\u7ED8\u5236\u65B9\u5F0F",
|
|
68
|
+
required: true,
|
|
69
|
+
span: 5,
|
|
70
|
+
attrs: {
|
|
71
|
+
options: [
|
|
72
|
+
{ label: "\u5B9A\u70B9\u8303\u56F4", value: "fixedPoint" },
|
|
73
|
+
{ label: "\u81EA\u5B9A\u5706\u5F62", value: "circle" },
|
|
74
|
+
{ label: "\u81EA\u5B9A\u591A\u8FB9\u5F62", value: "polygon" }
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: "input",
|
|
80
|
+
prop: "radius",
|
|
81
|
+
label: "\u8303\u56F4\u8DDD\u79BB",
|
|
82
|
+
required: true,
|
|
83
|
+
span: 5,
|
|
84
|
+
slot: "radius",
|
|
85
|
+
show: () => formModel2.value.mouseToolName === "fixedPoint",
|
|
86
|
+
attrs: {
|
|
87
|
+
type: "input-number",
|
|
88
|
+
placeholder: "\u5355\u4F4D\u7C73"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]);
|
|
92
|
+
const rules2 = ref({});
|
|
93
|
+
async function show2(data) {
|
|
94
|
+
if (hy.loading.value) {
|
|
95
|
+
ElMessage.error("\u6570\u636E\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u52FF\u91CD\u590D\u70B9\u51FB");
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
await hy.watchPause();
|
|
99
|
+
hy.loading.value = true;
|
|
100
|
+
hy.setDragLevelIndex("HyDialogRef");
|
|
101
|
+
hy.showOtherFence.value = true;
|
|
102
|
+
hy.dialogVisible.value = true;
|
|
103
|
+
if (data && data.id) {
|
|
104
|
+
try {
|
|
105
|
+
const res = await selectApi("mapRail", data.id);
|
|
106
|
+
if (res.code === 200) {
|
|
107
|
+
hy.formModel.value = {
|
|
108
|
+
...res.data || {},
|
|
109
|
+
search: "",
|
|
110
|
+
mouseToolName: "fixedPoint",
|
|
111
|
+
radius: 100
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
} catch (err) {
|
|
115
|
+
console.error(err);
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
hy.formModel.value = {
|
|
119
|
+
railName: "",
|
|
120
|
+
search: "",
|
|
121
|
+
mouseToolName: "fixedPoint",
|
|
122
|
+
radius: 100,
|
|
123
|
+
pointList: [],
|
|
124
|
+
...data || {}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
await nextTick();
|
|
128
|
+
hy.formRef.value.clearValidate();
|
|
129
|
+
if (hy.map.value && hy.hyMap.value) {
|
|
130
|
+
hy.CreateFence(hy.formModel.value.pointList);
|
|
131
|
+
}
|
|
132
|
+
hy.loading.value = false;
|
|
133
|
+
hy.watchResume();
|
|
134
|
+
}
|
|
135
|
+
function getCacheData() {
|
|
136
|
+
return {
|
|
137
|
+
formModel: hy.formModel.value,
|
|
138
|
+
showOtherFence: hy.showOtherFence.value
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
async function restoreCache(data = {}) {
|
|
142
|
+
hy.formModel.value = {
|
|
143
|
+
railName: "",
|
|
144
|
+
search: "",
|
|
145
|
+
mouseToolName: "fixedPoint",
|
|
146
|
+
radius: 100,
|
|
147
|
+
pointList: [],
|
|
148
|
+
...data.formModel || {}
|
|
149
|
+
};
|
|
150
|
+
hy.showOtherFence.value = data.showOtherFence;
|
|
151
|
+
hy.dialogVisible.value = true;
|
|
152
|
+
}
|
|
153
|
+
async function onClose2() {
|
|
154
|
+
if (hy.map.value) {
|
|
155
|
+
hy.fence?.remove(hy.map.value);
|
|
156
|
+
hy.clearOtherFenceLayer();
|
|
157
|
+
hy.map.value = null;
|
|
158
|
+
hy.hyMap.value = null;
|
|
159
|
+
hy.fence = null;
|
|
160
|
+
hy.otherFenceLayer = null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
async function onSubmit2() {
|
|
164
|
+
await hy.formRef.value.validate();
|
|
165
|
+
const res = await saveApi("mapRail", {
|
|
166
|
+
id: hy.formModel.value.id,
|
|
167
|
+
railName: hy.formModel.value.railName,
|
|
168
|
+
pointList: hy.formModel.value.pointList.map((item) => ({
|
|
169
|
+
...item,
|
|
170
|
+
mapRailId: hy.formModel.value.id
|
|
171
|
+
}))
|
|
172
|
+
});
|
|
173
|
+
if (res.code === 200) {
|
|
174
|
+
ElMessage.success($t("bussiness.operationSuccessful"));
|
|
175
|
+
hy.currentBus.value.emit("addElectronicFenceDialog", {
|
|
176
|
+
method: "onSubmit",
|
|
177
|
+
param: {
|
|
178
|
+
page: hy.isAdd.value ? null : 1
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
hy.onClose();
|
|
182
|
+
} else {
|
|
183
|
+
return Promise.reject();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
let map2 = shallowRef(null);
|
|
187
|
+
let hyMap2 = shallowRef(null);
|
|
188
|
+
let fence2 = null;
|
|
189
|
+
let _fenceTimer2 = null;
|
|
190
|
+
let otherFenceLayer2 = null;
|
|
191
|
+
const showOtherFence2 = ref(true);
|
|
192
|
+
let isFixedPoint2 = computed(() => hy.formModel.value.mouseToolName === "fixedPoint");
|
|
193
|
+
function onMapComplete2(hyMap3, map3) {
|
|
194
|
+
hy.hyMap.value = hyMap3;
|
|
195
|
+
hy.map.value = map3;
|
|
196
|
+
hy.CreateFence(hy.formModel.value.pointList);
|
|
197
|
+
hy.getFenceList();
|
|
198
|
+
hy.map.value.on("click", (e) => {
|
|
199
|
+
if (hy.isFixedPoint.value) {
|
|
200
|
+
hy.setFixedPoint({
|
|
201
|
+
lnglat: e.latlng,
|
|
202
|
+
radius: hy.formModel.value.radius
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
hy.map.value.on("moveend", () => {
|
|
207
|
+
if (isPermission("operator_electronicFence_showOtherFence")) {
|
|
208
|
+
clearTimeout(hy._fenceTimer);
|
|
209
|
+
hy._fenceTimer = setTimeout(hy.getFenceList, 500);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
hy.map.value.on("zoomend", () => {
|
|
213
|
+
if (isPermission("operator_electronicFence_showOtherFence")) {
|
|
214
|
+
clearTimeout(hy._fenceTimer);
|
|
215
|
+
hy._fenceTimer = setTimeout(hy.getFenceList, 500);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
function CreateFence2(pathList) {
|
|
220
|
+
if (hy.fence) {
|
|
221
|
+
hy.fence.remove(hy.map.value);
|
|
222
|
+
}
|
|
223
|
+
hy.fence = hy.hyMap.value.CreateFence(
|
|
224
|
+
"polygon",
|
|
225
|
+
{
|
|
226
|
+
fillColor: "#00b0ff",
|
|
227
|
+
color: "#80d8ff",
|
|
228
|
+
weight: 4,
|
|
229
|
+
fillOpacity: 0.5,
|
|
230
|
+
zIndex: 1e6
|
|
231
|
+
},
|
|
232
|
+
hy.map.value
|
|
233
|
+
);
|
|
234
|
+
if (pathList.length) {
|
|
235
|
+
hy.fence.setPolygon(pathList);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function startDraw2() {
|
|
239
|
+
const mouseToolName = hy.formModel.value.mouseToolName;
|
|
240
|
+
if (hy.isFixedPoint.value) {
|
|
241
|
+
hy.clearDraw();
|
|
242
|
+
hy.fence.close();
|
|
243
|
+
} else {
|
|
244
|
+
if (hy.fence && hy.fence.startDraw) {
|
|
245
|
+
hy.fence.startDraw(mouseToolName);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
let msg = "";
|
|
249
|
+
if (hy.isFixedPoint.value) {
|
|
250
|
+
msg = "\u9F20\u6807\u5728\u5730\u56FE\u70B9\u51FB\u4F4D\u7F6E\uFF0C\u677E\u624B\u7ED3\u675F";
|
|
251
|
+
} else if (hy.formModel.value.mouseToolName === "circle") {
|
|
252
|
+
msg = "\u9F20\u6807\u5728\u5730\u56FE\u70B9\u51FB\u6309\u4F4F\u62D6\u62FD\u7ED8\u5236\uFF0C\u677E\u624B\u7ED3\u675F";
|
|
253
|
+
} else if (hy.formModel.value.mouseToolName === "polygon") {
|
|
254
|
+
msg = "\u9F20\u6807\u70B9\u51FB\u5730\u56FE\u7ED8\u5236\uFF0C\u53F3\u952E\u7ED3\u675F";
|
|
255
|
+
}
|
|
256
|
+
ElMessage.success(msg);
|
|
257
|
+
}
|
|
258
|
+
function clearDraw2() {
|
|
259
|
+
if (hy.fence && hy.fence.clearDraw) {
|
|
260
|
+
hy.fence.clearDraw();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function getPath2() {
|
|
264
|
+
return hy.fence.getPath();
|
|
265
|
+
}
|
|
266
|
+
function setFixedPoint2({ lnglat, radius }) {
|
|
267
|
+
hy.fence.setFixedPoint({ lnglat, radius });
|
|
268
|
+
}
|
|
269
|
+
async function getFenceList2() {
|
|
270
|
+
if (!hy.showOtherFence.value || !hy.map.value) {
|
|
271
|
+
hy.clearOtherFenceLayer();
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const bounds = hy.map.value.getBounds();
|
|
275
|
+
const ne = bounds.getNorthEast();
|
|
276
|
+
const sw = bounds.getSouthWest();
|
|
277
|
+
const latLngList = [
|
|
278
|
+
{ lat: ne.lat, lng: ne.lng },
|
|
279
|
+
{ lat: ne.lat, lng: sw.lng },
|
|
280
|
+
{ lat: sw.lat, lng: sw.lng },
|
|
281
|
+
{ lat: sw.lat, lng: ne.lng }
|
|
282
|
+
];
|
|
283
|
+
const res = await findAllMapRailLocationApi({ latLngList });
|
|
284
|
+
if (res.code !== 200 || !hy.showOtherFence.value) return;
|
|
285
|
+
if (!hy.showOtherFence) {
|
|
286
|
+
hy.clearOtherFenceLayer();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
if (!hy.otherFenceLayer) {
|
|
290
|
+
hy.otherFenceLayer = hy.hyMap.value.layerGroup(hy.map.value, []);
|
|
291
|
+
} else {
|
|
292
|
+
hy.clearOtherFenceLayer();
|
|
293
|
+
}
|
|
294
|
+
const data = res.data || [];
|
|
295
|
+
data.forEach((fence3) => {
|
|
296
|
+
if (!fence3.pointList || !fence3.pointList.length) return;
|
|
297
|
+
if (hy.formModel.value.id && fence3.id === hy.formModel.value.id) return;
|
|
298
|
+
const layer = hy.hyMap.value.Polygon(fence3.pointList, {
|
|
299
|
+
color: "#32FFA2",
|
|
300
|
+
opacity: 1,
|
|
301
|
+
weight: 1,
|
|
302
|
+
fillColor: "#32FFA2",
|
|
303
|
+
fillOpacity: 0.2,
|
|
304
|
+
zIndex: 10
|
|
305
|
+
});
|
|
306
|
+
hy.otherFenceLayer.addLayer(layer);
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function clearOtherFenceLayer2() {
|
|
310
|
+
if (hy.otherFenceLayer) {
|
|
311
|
+
hy.otherFenceLayer.clearLayers();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return {
|
|
315
|
+
HyDialogRef,
|
|
316
|
+
formRef: formRef2,
|
|
317
|
+
dialogVisible: dialogVisible2,
|
|
318
|
+
loading: loading2,
|
|
319
|
+
title: title2,
|
|
320
|
+
formModel: formModel2,
|
|
321
|
+
formColumns: formColumns2,
|
|
322
|
+
rules: rules2,
|
|
323
|
+
isAdd,
|
|
324
|
+
show: show2,
|
|
325
|
+
getCacheData,
|
|
326
|
+
restoreCache,
|
|
327
|
+
onClose: onClose2,
|
|
328
|
+
onSubmit: onSubmit2,
|
|
329
|
+
// 地图功能
|
|
330
|
+
map: map2,
|
|
331
|
+
hyMap: hyMap2,
|
|
332
|
+
fence: fence2,
|
|
333
|
+
_fenceTimer: _fenceTimer2,
|
|
334
|
+
otherFenceLayer: otherFenceLayer2,
|
|
335
|
+
showOtherFence: showOtherFence2,
|
|
336
|
+
isFixedPoint: isFixedPoint2,
|
|
337
|
+
onMapComplete: onMapComplete2,
|
|
338
|
+
CreateFence: CreateFence2,
|
|
339
|
+
getPath: getPath2,
|
|
340
|
+
setFixedPoint: setFixedPoint2,
|
|
341
|
+
startDraw: startDraw2,
|
|
342
|
+
clearDraw: clearDraw2,
|
|
343
|
+
getFenceList: getFenceList2,
|
|
344
|
+
clearOtherFenceLayer: clearOtherFenceLayer2
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
const {
|
|
348
|
+
minimizedShow,
|
|
349
|
+
setDragLevelIndex,
|
|
350
|
+
onMinimized,
|
|
351
|
+
formRef,
|
|
352
|
+
dialogVisible,
|
|
353
|
+
loading,
|
|
354
|
+
title,
|
|
355
|
+
formModel,
|
|
356
|
+
formColumns,
|
|
357
|
+
rules,
|
|
358
|
+
show,
|
|
359
|
+
onClose,
|
|
360
|
+
onSubmit,
|
|
361
|
+
// 地图功能
|
|
362
|
+
map,
|
|
363
|
+
hyMap,
|
|
364
|
+
fence,
|
|
365
|
+
_fenceTimer,
|
|
366
|
+
otherFenceLayer,
|
|
367
|
+
showOtherFence,
|
|
368
|
+
isFixedPoint,
|
|
369
|
+
onMapComplete,
|
|
370
|
+
CreateFence,
|
|
371
|
+
getPath,
|
|
372
|
+
setFixedPoint,
|
|
373
|
+
startDraw,
|
|
374
|
+
clearDraw,
|
|
375
|
+
getFenceList,
|
|
376
|
+
clearOtherFenceLayer
|
|
377
|
+
} = useMixins({ currentBus }, [useDialog, useDialogIsEdit, useAddElectronicFenceDialog]);
|
|
378
|
+
__expose({
|
|
379
|
+
show,
|
|
380
|
+
minimizedShow,
|
|
381
|
+
setDragLevelIndex
|
|
382
|
+
});
|
|
383
|
+
return (_ctx, _cache) => {
|
|
384
|
+
return openBlock(), createBlock(unref(HyDialog), {
|
|
385
|
+
ref: "HyDialogRef",
|
|
386
|
+
modelValue: unref(dialogVisible),
|
|
387
|
+
"onUpdate:modelValue": ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null,
|
|
388
|
+
loading: unref(loading),
|
|
389
|
+
"onUpdate:loading": ($event) => isRef(loading) ? loading.value = $event : null,
|
|
390
|
+
title: unref(title),
|
|
391
|
+
width: "1000",
|
|
392
|
+
"dialog-type": "right",
|
|
393
|
+
"show-operate": true,
|
|
394
|
+
"if-draggable": __props.ifDraggable,
|
|
395
|
+
"if-shrink": __props.ifShrink,
|
|
396
|
+
"on-close": unref(onClose),
|
|
397
|
+
"on-cancel": unref(onClose),
|
|
398
|
+
"on-submit": unref(onSubmit),
|
|
399
|
+
onOnMinimized: unref(onMinimized),
|
|
400
|
+
onOnDialogMousedown: ($event) => unref(setDragLevelIndex)("HyDialogRef")
|
|
401
|
+
}, {
|
|
402
|
+
"operate-left-box": withCtx(() => [
|
|
403
|
+
createElementVNode("div", { class: "flex items-center mt-2 text-xs" }, [
|
|
404
|
+
createVNode(unref(HyIcon), {
|
|
405
|
+
"svg-name": "dispatch-share1-prompt",
|
|
406
|
+
"class-name": "!w-3 !h-3 text-auxiliary mr-1"
|
|
407
|
+
}),
|
|
408
|
+
createElementVNode("span", { class: "text-auxiliary" }, "\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u540E\uFF1A"),
|
|
409
|
+
unref(formModel).mouseToolName === "fixedPoint" ? (openBlock(), createElementBlock("span", {
|
|
410
|
+
key: 0,
|
|
411
|
+
class: "text-theme"
|
|
412
|
+
}, "\u9F20\u6807\u5728\u5730\u56FE\u70B9\u51FB\u4F4D\u7F6E\uFF0C\u677E\u624B\u7ED3\u675F")) : unref(formModel).mouseToolName === "circle" ? (openBlock(), createElementBlock("span", {
|
|
413
|
+
key: 1,
|
|
414
|
+
class: "text-theme"
|
|
415
|
+
}, "\u9F20\u6807\u5728\u5730\u56FE\u70B9\u51FB\u6309\u4F4F\u62D6\u62FD\u7ED8\u5236\uFF0C\u677E\u624B\u7ED3\u675F")) : unref(formModel).mouseToolName === "polygon" ? (openBlock(), createElementBlock("span", {
|
|
416
|
+
key: 2,
|
|
417
|
+
class: "text-theme"
|
|
418
|
+
}, "\u9F20\u6807\u70B9\u51FB\u5730\u56FE\u7ED8\u5236\uFF0C\u53F3\u952E\u7ED3\u675F")) : createCommentVNode("v-if", true)
|
|
419
|
+
])
|
|
420
|
+
]),
|
|
421
|
+
default: withCtx(() => [
|
|
422
|
+
createElementVNode("div", { class: "w-full h-full flex flex-col" }, [
|
|
423
|
+
createVNode(unref(HyForm), {
|
|
424
|
+
ref_key: "formRef",
|
|
425
|
+
ref: formRef,
|
|
426
|
+
model: unref(formModel),
|
|
427
|
+
columns: unref(formColumns),
|
|
428
|
+
rules: unref(rules),
|
|
429
|
+
"column-num": 24,
|
|
430
|
+
class: "relative z-[600]"
|
|
431
|
+
}, {
|
|
432
|
+
search: withCtx(() => [
|
|
433
|
+
createVNode(unref(HyMapAearchPlace), {
|
|
434
|
+
map: unref(map),
|
|
435
|
+
"hy-map": unref(hyMap)
|
|
436
|
+
}, null, 8, ["map", "hy-map"])
|
|
437
|
+
]),
|
|
438
|
+
radius: withCtx(({ column, model }) => [
|
|
439
|
+
createElementVNode("div", { class: "w-full flex items-center gap-2" }, [
|
|
440
|
+
createVNode(unref(HyInput), mergeProps({
|
|
441
|
+
modelValue: model[column.prop],
|
|
442
|
+
"onUpdate:modelValue": ($event) => model[column.prop] = $event
|
|
443
|
+
}, column.attrs), null, 16, ["modelValue", "onUpdate:modelValue"]),
|
|
444
|
+
createElementVNode("span", { class: "text-auxiliary" }, "M")
|
|
445
|
+
])
|
|
446
|
+
]),
|
|
447
|
+
_: 1
|
|
448
|
+
/* STABLE */
|
|
449
|
+
}, 8, ["model", "columns", "rules"]),
|
|
450
|
+
createElementVNode("div", { class: "w-full h-0 flex-1 relative border border-border rounded" }, [
|
|
451
|
+
createElementVNode("div", { class: "w-full h-full" }, [
|
|
452
|
+
createVNode(unref(HyMap), {
|
|
453
|
+
class: "!rounded-none",
|
|
454
|
+
onComplete: unref(onMapComplete)
|
|
455
|
+
}, null, 8, ["onComplete"])
|
|
456
|
+
]),
|
|
457
|
+
createElementVNode("div", { class: "w-full h-[60px] flex items-center justify-between border-b border-border pl-5 pr-4 box-border absolute left-0 top-0 z-[500] bg-[rgba(var(--hy-background-2),0.9)]" }, [
|
|
458
|
+
createElementVNode("div", { class: "flex items-center gap-2 text-auxiliary" }, [
|
|
459
|
+
createVNode(unref(HyIcon), {
|
|
460
|
+
"svg-name": "dispatch-share1-prompt",
|
|
461
|
+
"class-name": "!w-3 !h-3 text-auxiliary"
|
|
462
|
+
}),
|
|
463
|
+
createElementVNode("span", null, "\u7ED8\u5236\u524D\uFF0C\u9700\u8981\u5148\u70B9\u51FB\u53F3\u4FA7\u5F00\u59CB\u7ED8\u5236\u6309\u94AE")
|
|
464
|
+
]),
|
|
465
|
+
createElementVNode("div", { class: "flex items-center" }, [
|
|
466
|
+
createElementVNode("div", { class: "flex items-center mr-5" }, [
|
|
467
|
+
createVNode(unref(ElCheckbox), {
|
|
468
|
+
modelValue: unref(showOtherFence),
|
|
469
|
+
"onUpdate:modelValue": ($event) => isRef(showOtherFence) ? showOtherFence.value = $event : null,
|
|
470
|
+
onChange: ($event) => unref(getFenceList)()
|
|
471
|
+
}, {
|
|
472
|
+
default: withCtx(() => [
|
|
473
|
+
createElementVNode("span", { class: "text-xs text-main" }, "\u663E\u793A\u5176\u4ED6\u7535\u5B50\u56F4\u680F")
|
|
474
|
+
]),
|
|
475
|
+
_: 1
|
|
476
|
+
/* STABLE */
|
|
477
|
+
}, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
478
|
+
]),
|
|
479
|
+
createVNode(unref(HyButton), {
|
|
480
|
+
type: "primary",
|
|
481
|
+
onClick: unref(startDraw)
|
|
482
|
+
}, {
|
|
483
|
+
default: withCtx(() => [
|
|
484
|
+
createTextVNode("\u5F00\u59CB\u7ED8\u5236")
|
|
485
|
+
]),
|
|
486
|
+
_: 1
|
|
487
|
+
/* STABLE */
|
|
488
|
+
}, 8, ["onClick"]),
|
|
489
|
+
createVNode(unref(HyButton), {
|
|
490
|
+
type: "danger",
|
|
491
|
+
onClick: unref(clearDraw)
|
|
492
|
+
}, {
|
|
493
|
+
default: withCtx(() => [
|
|
494
|
+
createTextVNode("\u6E05\u7A7A\u7ED8\u5236")
|
|
495
|
+
]),
|
|
496
|
+
_: 1
|
|
497
|
+
/* STABLE */
|
|
498
|
+
}, 8, ["onClick"])
|
|
499
|
+
])
|
|
500
|
+
])
|
|
501
|
+
])
|
|
502
|
+
])
|
|
503
|
+
]),
|
|
504
|
+
_: 1
|
|
505
|
+
/* STABLE */
|
|
506
|
+
}, 8, ["modelValue", "onUpdate:modelValue", "loading", "onUpdate:loading", "title", "if-draggable", "if-shrink", "on-close", "on-cancel", "on-submit", "onOnMinimized", "onOnDialogMousedown"]);
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { useTemplateRef, ref, openBlock, createBlock, unref, withCtx, createCommentVNode, createElementVNode } from 'vue';
|
|
2
|
+
import { batchMapRailUserSaveApi } from '../../../../api/mapRail.mjs';
|
|
3
|
+
import '../../../../hooks/index.mjs';
|
|
4
|
+
import '../../../../components/index.mjs';
|
|
5
|
+
import { useCurrentBus } from '../../../../hooks/useCurrentBus.mjs';
|
|
6
|
+
import { useAppTableForm } from '../../../../components/hyTableForm/js/useAppTableForm.mjs';
|
|
7
|
+
import { $t } from '../../../../hooks/useLocale.mjs';
|
|
8
|
+
import { useMixins } from '../../../../hooks/useMixins.mjs';
|
|
9
|
+
import { useDialog, useDialogIsEdit } from '../../../../hooks/useDialog.mjs';
|
|
10
|
+
import { HyBatchUploadDialog } from '../../../../components/hyBatchUploadDialog/index.mjs';
|
|
11
|
+
|
|
12
|
+
const _sfc_main = {
|
|
13
|
+
__name: "batchSetElectronicFenceUserDialog",
|
|
14
|
+
props: {
|
|
15
|
+
ifDraggable: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
ifShrink: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(__props, { expose: __expose }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const { currentBus } = useCurrentBus();
|
|
27
|
+
function useBatchSetElectronicFenceUserDialog(hy) {
|
|
28
|
+
const HyBatchUploadDialogRef2 = useTemplateRef("HyBatchUploadDialogRef");
|
|
29
|
+
const { tableColumns: tableColumns2, formColumns: formColumns2 } = useAppTableForm({
|
|
30
|
+
columns: [
|
|
31
|
+
{
|
|
32
|
+
prop: "railName",
|
|
33
|
+
label: $t("electronicFence.electronicFenceName")
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
prop: "orgName",
|
|
37
|
+
label: $t("bussiness.department")
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
prop: "name",
|
|
41
|
+
label: $t("electronicFence.associatedUserName")
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
prop: "phone",
|
|
45
|
+
label: $t("electronicFence.associatedUserAccount")
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
formColumns: [
|
|
49
|
+
{
|
|
50
|
+
type: "input",
|
|
51
|
+
prop: "railName",
|
|
52
|
+
label: $t("electronicFence.electronicFenceName"),
|
|
53
|
+
required: true,
|
|
54
|
+
// import: {
|
|
55
|
+
// // excel的表头标题,不设置默认获取label
|
|
56
|
+
// title: $t('electronicFence.electronicFenceName'),
|
|
57
|
+
// },
|
|
58
|
+
attrs: {
|
|
59
|
+
clearable: true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "input",
|
|
64
|
+
prop: "orgName",
|
|
65
|
+
label: $t("bussiness.department"),
|
|
66
|
+
required: true,
|
|
67
|
+
attrs: {
|
|
68
|
+
clearable: true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "input",
|
|
73
|
+
prop: "name",
|
|
74
|
+
label: $t("electronicFence.associatedUserName"),
|
|
75
|
+
required: true,
|
|
76
|
+
attrs: {
|
|
77
|
+
clearable: true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: "input",
|
|
82
|
+
prop: "phone",
|
|
83
|
+
label: $t("electronicFence.associatedUserAccount"),
|
|
84
|
+
required: true,
|
|
85
|
+
attrs: {
|
|
86
|
+
clearable: true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
const rules2 = ref({});
|
|
92
|
+
async function show2() {
|
|
93
|
+
hy.setDragLevelIndex("HyBatchUploadDialogRef");
|
|
94
|
+
HyBatchUploadDialogRef2.value.show();
|
|
95
|
+
}
|
|
96
|
+
function submitHandler2(data) {
|
|
97
|
+
return batchMapRailUserSaveApi({
|
|
98
|
+
...data
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function onSubmit2(params) {
|
|
102
|
+
const { total, success, failed, result } = params;
|
|
103
|
+
if (success) {
|
|
104
|
+
hy.currentBus.value.emit("batchSetElectronicFenceUserDialog", {
|
|
105
|
+
method: "onSubmit",
|
|
106
|
+
param: {
|
|
107
|
+
page: 1
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
HyBatchUploadDialogRef: HyBatchUploadDialogRef2,
|
|
114
|
+
tableColumns: tableColumns2,
|
|
115
|
+
formColumns: formColumns2,
|
|
116
|
+
rules: rules2,
|
|
117
|
+
show: show2,
|
|
118
|
+
submitHandler: submitHandler2,
|
|
119
|
+
onSubmit: onSubmit2
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const {
|
|
123
|
+
setDragLevelIndex,
|
|
124
|
+
minimizedShow,
|
|
125
|
+
onMinimized,
|
|
126
|
+
HyBatchUploadDialogRef,
|
|
127
|
+
tableColumns,
|
|
128
|
+
formColumns,
|
|
129
|
+
rules,
|
|
130
|
+
show,
|
|
131
|
+
submitHandler,
|
|
132
|
+
onSubmit
|
|
133
|
+
} = useMixins({ currentBus }, [useDialog, useDialogIsEdit, useBatchSetElectronicFenceUserDialog]);
|
|
134
|
+
__expose({
|
|
135
|
+
show,
|
|
136
|
+
minimizedShow,
|
|
137
|
+
setDragLevelIndex
|
|
138
|
+
});
|
|
139
|
+
return (_ctx, _cache) => {
|
|
140
|
+
return openBlock(), createBlock(unref(HyBatchUploadDialog), {
|
|
141
|
+
ref_key: "HyBatchUploadDialogRef",
|
|
142
|
+
ref: HyBatchUploadDialogRef,
|
|
143
|
+
title: unref($t)("electronicFence.batchImportAssociatedUsers"),
|
|
144
|
+
width: "920",
|
|
145
|
+
"table-columns": unref(tableColumns),
|
|
146
|
+
"form-columns": unref(formColumns),
|
|
147
|
+
rules: unref(rules),
|
|
148
|
+
"row-click-expand": true,
|
|
149
|
+
"column-num": 2,
|
|
150
|
+
"submit-handler": unref(submitHandler),
|
|
151
|
+
"show-operate": true,
|
|
152
|
+
"if-draggable": __props.ifDraggable,
|
|
153
|
+
"if-shrink": __props.ifShrink,
|
|
154
|
+
onSubmit: unref(onSubmit),
|
|
155
|
+
onOnMinimized: unref(onMinimized),
|
|
156
|
+
onOnDialogMousedown: ($event) => unref(setDragLevelIndex)("HyBatchUploadDialogRef")
|
|
157
|
+
}, {
|
|
158
|
+
"template-down": withCtx(() => [
|
|
159
|
+
createCommentVNode(' <HyButton type="primary" link @click="downloadTemplate">\u4E0B\u8F7D\u7FA4\u7EC4\u6DFB\u52A0\u6A21\u677F</HyButton> '),
|
|
160
|
+
createElementVNode("span")
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
/* STABLE */
|
|
164
|
+
}, 8, ["title", "table-columns", "form-columns", "rules", "submit-handler", "if-draggable", "if-shrink", "onSubmit", "onOnMinimized", "onOnDialogMousedown"]);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export { _sfc_main as default };
|