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
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
color: rgba(var(--hy-main));
|
|
92
92
|
padding: 0 10px;
|
|
93
93
|
margin-top: 16px;
|
|
94
|
+
box-sizing: border-box;
|
|
94
95
|
|
|
95
96
|
.progress-box {
|
|
96
97
|
width: 100%;
|
|
@@ -187,6 +188,7 @@
|
|
|
187
188
|
border: 1px solid rgba(var(--hy-border));
|
|
188
189
|
border-radius: 4px;
|
|
189
190
|
background-color: rgba(var(--hy-background-2));
|
|
191
|
+
box-sizing: border-box;
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
.hy-icon {
|
|
@@ -231,26 +233,22 @@
|
|
|
231
233
|
position: absolute;
|
|
232
234
|
top: 0;
|
|
233
235
|
bottom: 0;
|
|
234
|
-
background: linear-gradient(
|
|
235
|
-
to bottom,
|
|
236
|
-
rgba(28, 51, 74, 0) 0%,
|
|
237
|
-
#1c334ac4 50%,
|
|
238
|
-
rgba(28, 51, 74, 0) 100%
|
|
239
|
-
);
|
|
236
|
+
background: linear-gradient(to bottom, rgba(28, 51, 74, 0) 0%, #1c334ac4 50%, rgba(28, 51, 74, 0) 100%);
|
|
240
237
|
}
|
|
241
|
-
|
|
242
238
|
}
|
|
243
239
|
|
|
244
240
|
.hy-video-player-popover-volume-slider {
|
|
245
241
|
min-width: auto !important;
|
|
246
242
|
width: 40px !important;
|
|
247
243
|
padding: 16px 0;
|
|
244
|
+
box-sizing: border-box;
|
|
248
245
|
}
|
|
249
246
|
|
|
250
247
|
.hy-video-player-popover-speed {
|
|
251
248
|
min-width: auto !important;
|
|
252
249
|
width: 62px !important;
|
|
253
250
|
padding: 0px !important;
|
|
251
|
+
box-sizing: border-box;
|
|
254
252
|
.speed-list {
|
|
255
253
|
width: 100%;
|
|
256
254
|
color: rgba(var(--hy-auxiliary));
|
|
@@ -5,8 +5,8 @@ import '../../utils/index.mjs';
|
|
|
5
5
|
import '../index.mjs';
|
|
6
6
|
import _sfc_main$1 from './cpns/mediaLoading.vue.mjs';
|
|
7
7
|
import { useVideoPlayer, useVideoResize } from './js/index.mjs';
|
|
8
|
-
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
9
8
|
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
9
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
10
10
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
11
11
|
import { HyButton } from '../hyButton/index.mjs';
|
|
12
12
|
import { HyTooltip } from '../hyTooltip/index.mjs';
|
|
@@ -113,18 +113,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
113
113
|
type: Function
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
emits: [
|
|
117
|
-
"canplay",
|
|
118
|
-
"timeupdate",
|
|
119
|
-
"play-start",
|
|
120
|
-
"play-ended",
|
|
121
|
-
"play-previous",
|
|
122
|
-
"play-next"
|
|
123
|
-
],
|
|
116
|
+
emits: ["canplay", "timeupdate", "play-start", "play-ended", "play-previous", "play-next"],
|
|
124
117
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
125
118
|
const props = __props;
|
|
126
119
|
const emits = __emit;
|
|
127
|
-
const { t } = useLocale();
|
|
128
120
|
const videoWrapperRef = useTemplateRef("videoWrapperRef");
|
|
129
121
|
const videoRef = useTemplateRef("videoRef");
|
|
130
122
|
const {
|
|
@@ -218,7 +210,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
218
210
|
createElementVNode(
|
|
219
211
|
"span",
|
|
220
212
|
{ class: "text-xs text-theme mt-4" },
|
|
221
|
-
"..." + toDisplayString(unref(t)("videoPlayer.videoResourcesAreLoading")) + "...",
|
|
213
|
+
"..." + toDisplayString(unref($t)("videoPlayer.videoResourcesAreLoading")) + "...",
|
|
222
214
|
1
|
|
223
215
|
/* TEXT */
|
|
224
216
|
)
|
|
@@ -226,7 +218,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
226
218
|
createCommentVNode(" \u65E0\u6CD5\u64AD\u653E "),
|
|
227
219
|
unref(videoState) === "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("div", {
|
|
228
220
|
key: 1,
|
|
229
|
-
class: "w-full h-full flex flex-col justify-center items-center px-[34px]"
|
|
221
|
+
class: "w-full h-full flex flex-col justify-center items-center px-[34px] box-border"
|
|
230
222
|
}, [
|
|
231
223
|
createCommentVNode(" \u91C7\u96C6\u7AD9\u6587\u4EF6 "),
|
|
232
224
|
unref(videoItem) && unref(videoItem).csFile === 1 && unref(videoItem).onlineState !== 1 ? (openBlock(), createElementBlock(
|
|
@@ -244,16 +236,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
244
236
|
createElementVNode(
|
|
245
237
|
"span",
|
|
246
238
|
{ class: "text-xs text-auxiliary mt-4" },
|
|
247
|
-
toDisplayString(unref(t)("videoPlayer.fileLoadingFailed")),
|
|
239
|
+
toDisplayString(unref($t)("videoPlayer.fileLoadingFailed")),
|
|
248
240
|
1
|
|
249
241
|
/* TEXT */
|
|
250
242
|
),
|
|
251
243
|
createElementVNode(
|
|
252
244
|
"span",
|
|
253
245
|
{ class: "text-xs text-auxiliary" },
|
|
254
|
-
toDisplayString(
|
|
255
|
-
"pleaseCheckWhetherTheCollectionStationIsOnlineAndWhetherTheFileExists"
|
|
256
|
-
)),
|
|
246
|
+
toDisplayString(unref($t)("pleaseCheckWhetherTheCollectionStationIsOnlineAndWhetherTheFileExists")),
|
|
257
247
|
1
|
|
258
248
|
/* TEXT */
|
|
259
249
|
)
|
|
@@ -282,7 +272,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
282
272
|
createElementVNode(
|
|
283
273
|
"div",
|
|
284
274
|
{ class: "text-theme text-center mt-3 mb-[14px]" },
|
|
285
|
-
toDisplayString(unref(isCanNotPlayType) ? unref(t)("videoPlayer.vlcPlayerTip") : unref(t)("videoPlayer.theVideoCannotBePlayed")),
|
|
275
|
+
toDisplayString(unref(isCanNotPlayType) ? unref($t)("videoPlayer.vlcPlayerTip") : unref($t)("videoPlayer.theVideoCannotBePlayed")),
|
|
286
276
|
1
|
|
287
277
|
/* TEXT */
|
|
288
278
|
),
|
|
@@ -296,7 +286,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
296
286
|
}, {
|
|
297
287
|
default: withCtx(() => [
|
|
298
288
|
createTextVNode(
|
|
299
|
-
toDisplayString(unref(t)("videoPlayer.clickPlay")),
|
|
289
|
+
toDisplayString(unref($t)("videoPlayer.clickPlay")),
|
|
300
290
|
1
|
|
301
291
|
/* TEXT */
|
|
302
292
|
)
|
|
@@ -309,7 +299,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
309
299
|
}, {
|
|
310
300
|
default: withCtx(() => [
|
|
311
301
|
createTextVNode(
|
|
312
|
-
toDisplayString(unref(t)("videoPlayer.toDownloadVlc")),
|
|
302
|
+
toDisplayString(unref($t)("videoPlayer.toDownloadVlc")),
|
|
313
303
|
1
|
|
314
304
|
/* TEXT */
|
|
315
305
|
)
|
|
@@ -331,7 +321,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
331
321
|
createVNode(unref(HyTooltip), {
|
|
332
322
|
isAlways: "",
|
|
333
323
|
overLine: 1,
|
|
334
|
-
content: unref(t)("videoPlayer.viewThePreviousVideo")
|
|
324
|
+
content: unref($t)("videoPlayer.viewThePreviousVideo")
|
|
335
325
|
}, {
|
|
336
326
|
default: withCtx(() => [
|
|
337
327
|
createElementVNode("div", {
|
|
@@ -352,7 +342,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
352
342
|
createVNode(unref(HyTooltip), {
|
|
353
343
|
isAlways: "",
|
|
354
344
|
overLine: 1,
|
|
355
|
-
content: unref(t)("videoPlayer.viewTheNextVideo")
|
|
345
|
+
content: unref($t)("videoPlayer.viewTheNextVideo")
|
|
356
346
|
}, {
|
|
357
347
|
default: withCtx(() => [
|
|
358
348
|
createElementVNode("div", {
|
|
@@ -390,7 +380,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
390
380
|
createElementVNode("source", { type: "video/webm" }),
|
|
391
381
|
createElementVNode("source", { type: "video/ogg" }),
|
|
392
382
|
createTextVNode(
|
|
393
|
-
" " + toDisplayString(unref(t)("videoPlayer.yourBrowserDoesNotSupportHTMLVideoPlayback")),
|
|
383
|
+
" " + toDisplayString(unref($t)("videoPlayer.yourBrowserDoesNotSupportHTMLVideoPlayback")),
|
|
394
384
|
1
|
|
395
385
|
/* TEXT */
|
|
396
386
|
)
|
|
@@ -519,7 +509,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
519
509
|
createVNode(unref(HyTooltip), {
|
|
520
510
|
isAlways: "",
|
|
521
511
|
overLine: 1,
|
|
522
|
-
content: unref(t)("videoPlayer.adjustPlaybackVolume")
|
|
512
|
+
content: unref($t)("videoPlayer.adjustPlaybackVolume")
|
|
523
513
|
}, {
|
|
524
514
|
default: withCtx(() => [
|
|
525
515
|
createVNode(unref(HyIcon), {
|
|
@@ -551,7 +541,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
551
541
|
key: 0,
|
|
552
542
|
isAlways: "",
|
|
553
543
|
overLine: 1,
|
|
554
|
-
content: unref(t)("videoPlayer.fullScreenSwitch")
|
|
544
|
+
content: unref($t)("videoPlayer.fullScreenSwitch")
|
|
555
545
|
}, {
|
|
556
546
|
default: withCtx(() => [
|
|
557
547
|
createVNode(unref(HyIcon), {
|
|
@@ -567,7 +557,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
567
557
|
key: 1,
|
|
568
558
|
isAlways: "",
|
|
569
559
|
overLine: 1,
|
|
570
|
-
content: unref(isExpand) ? unref(t)("videoPlayer.packUp") : unref(t)("videoPlayer.expand")
|
|
560
|
+
content: unref(isExpand) ? unref($t)("videoPlayer.packUp") : unref($t)("videoPlayer.expand")
|
|
571
561
|
}, {
|
|
572
562
|
default: withCtx(() => [
|
|
573
563
|
createVNode(unref(HyIcon), {
|
|
@@ -599,7 +589,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
599
589
|
key: 0,
|
|
600
590
|
isAlways: "",
|
|
601
591
|
overLine: 1,
|
|
602
|
-
content: unref(t)("videoPlayer.downloadFile")
|
|
592
|
+
content: unref($t)("videoPlayer.downloadFile")
|
|
603
593
|
}, {
|
|
604
594
|
default: withCtx(() => [
|
|
605
595
|
createVNode(unref(HyIcon), {
|
package/es/components/index.mjs
CHANGED
|
@@ -27,6 +27,9 @@ export { HyMap } from './hyMap/index.mjs';
|
|
|
27
27
|
export { HyRadioGroup } from './hyRadioGroup/index.mjs';
|
|
28
28
|
export { ElLoading, ElLoading as HyLoading } from './hyLoading/index.mjs';
|
|
29
29
|
export { HyTour } from './hyTour/index.mjs';
|
|
30
|
+
export { HyDrawer } from './hyDrawer/index.mjs';
|
|
31
|
+
export { HyStatus } from './hyStatus/index.mjs';
|
|
32
|
+
export { HyCheckboxGroup } from './hyCheckboxGroup/index.mjs';
|
|
30
33
|
export { resetAppFormValue, useAppForm } from './hyForm/js/useAppForm.mjs';
|
|
31
34
|
export { resetAppSearchValue, useAppSearch } from './hySearch/js/useAppSearch.mjs';
|
|
32
35
|
export { useAppTable } from './hyTable/js/useAppTable.mjs';
|
package/es/hooks/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { defaultAxios, localApiKey, useApi } from './useApi.mjs';
|
|
2
|
-
export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './useLocale.mjs';
|
|
2
|
+
export { $t, buildLocaleContext, buildTranslator, getLang, getLanguage, lang, localeContextKey, setLang, translate, useLocale } from './useLocale.mjs';
|
|
3
3
|
export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './useGlobalConfig.mjs';
|
|
4
4
|
export { useMixins } from './useMixins.mjs';
|
|
5
5
|
export { localPermissionMapKey, usePermissionMap } from './usePermissionMap.mjs';
|
|
@@ -10,5 +10,9 @@ export { localAudioPlayerConfigKey, useAudioPlayerConfig } from './useAudioPlaye
|
|
|
10
10
|
export { localVideoPlayerConfigKey, useVideoPlayerConfig } from './useVideoPlayerConfig.mjs';
|
|
11
11
|
export { localEnsureHyIconMapKey, useEnsureHyIcon } from './useEnsureHyIcon.mjs';
|
|
12
12
|
export { localTooltipConfigKey, useTooltipConfig } from './useTooltipConfig.mjs';
|
|
13
|
-
export { usePublish, useSubscribe } from './useSubscribe.mjs';
|
|
13
|
+
export { bus, usePublish, useSubscribe } from './useSubscribe.mjs';
|
|
14
14
|
export { localMapConfigKey, useMapConfig } from './useMapConfig.mjs';
|
|
15
|
+
export { useBatchDialog, useDialog, useDialogIsEdit } from './useDialog.mjs';
|
|
16
|
+
export { useExportFile } from './useExportFile.mjs';
|
|
17
|
+
export { localBaseMainStoreKey, useBaseMainStore } from './useBaseMainStore.mjs';
|
|
18
|
+
export { localCurrentBusKey, useCurrentBus } from './useCurrentBus.mjs';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getCurrentInstance, inject, ref, unref } from 'vue';
|
|
2
|
+
import { useGlobalConfig } from './useGlobalConfig.mjs';
|
|
3
|
+
|
|
4
|
+
const localBaseMainStoreKey = /* @__PURE__ */ Symbol("baseMainStore");
|
|
5
|
+
const defaultBaseMainStore = () => ({
|
|
6
|
+
getters: {
|
|
7
|
+
dragLevel: 1e3
|
|
8
|
+
},
|
|
9
|
+
commit(key) {
|
|
10
|
+
this[key]();
|
|
11
|
+
},
|
|
12
|
+
setDragLevel() {
|
|
13
|
+
this.getters.dragLevel++;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const useBaseMainStore = () => {
|
|
17
|
+
if (getCurrentInstance()) {
|
|
18
|
+
const baseMainStore = inject(localBaseMainStoreKey, ref());
|
|
19
|
+
return {
|
|
20
|
+
baseMainStore: unref(baseMainStore) ? unref(baseMainStore) : (unref(useGlobalConfig()).baseMainStore || defaultBaseMainStore)()
|
|
21
|
+
};
|
|
22
|
+
} else {
|
|
23
|
+
return {
|
|
24
|
+
baseMainStore: (unref(useGlobalConfig()).baseMainStore || defaultBaseMainStore)()
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { localBaseMainStoreKey, useBaseMainStore };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getCurrentInstance, inject, ref, unref, computed } from 'vue';
|
|
2
|
+
import { useGlobalConfig } from './useGlobalConfig.mjs';
|
|
3
|
+
import { bus } from './useSubscribe.mjs';
|
|
4
|
+
|
|
5
|
+
const localCurrentBusKey = /* @__PURE__ */ Symbol("currentBus");
|
|
6
|
+
const defaultCurrentBus = bus;
|
|
7
|
+
const useCurrentBus = () => {
|
|
8
|
+
if (getCurrentInstance()) {
|
|
9
|
+
const currentBus = inject(localCurrentBusKey, ref());
|
|
10
|
+
return {
|
|
11
|
+
currentBus: unref(currentBus) ? currentBus : computed(() => unref(useGlobalConfig()).currentBus || defaultCurrentBus)
|
|
12
|
+
};
|
|
13
|
+
} else {
|
|
14
|
+
return {
|
|
15
|
+
currentBus: computed(() => unref(useGlobalConfig()).currentBus || defaultCurrentBus)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { localCurrentBusKey, useCurrentBus };
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { getCurrentInstance, ref, onMounted, watch } from 'vue';
|
|
2
|
+
import '../components/index.mjs';
|
|
3
|
+
import { useLocale } from './useLocale.mjs';
|
|
4
|
+
import './index.mjs';
|
|
5
|
+
import { useBaseMainStore } from './useBaseMainStore.mjs';
|
|
6
|
+
import { useCurrentBus } from './useCurrentBus.mjs';
|
|
7
|
+
import { HyConfirmDialog } from '../components/hyConfirmDialog/index.mjs';
|
|
8
|
+
|
|
9
|
+
function useDialog(hy) {
|
|
10
|
+
const instance = getCurrentInstance();
|
|
11
|
+
const loading = ref(false);
|
|
12
|
+
const isEdit = ref(false);
|
|
13
|
+
const minimized = ref(false);
|
|
14
|
+
const minimizedTitle = ref("");
|
|
15
|
+
function setDragLevelIndex(dialogComponents) {
|
|
16
|
+
const { baseMainStore } = useBaseMainStore();
|
|
17
|
+
const dragLevel = baseMainStore.getters.dragLevel;
|
|
18
|
+
hy[`${dialogComponents}`].value.setDragLevelIndex(dragLevel);
|
|
19
|
+
baseMainStore.commit("setDragLevel");
|
|
20
|
+
}
|
|
21
|
+
function onMinimized(params) {
|
|
22
|
+
hy.minimized.value = params.type;
|
|
23
|
+
hy.minimizedTitle.value = params.title;
|
|
24
|
+
if (hy.minimized.value) {
|
|
25
|
+
hy.minimizedClose();
|
|
26
|
+
} else {
|
|
27
|
+
hy.minimizedRemove();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function minimizedRemove() {
|
|
31
|
+
const { currentBus } = useCurrentBus();
|
|
32
|
+
const unique = instance?.attrs?.unique || null;
|
|
33
|
+
currentBus.value.emit("workbenchOperation", {
|
|
34
|
+
type: "delete",
|
|
35
|
+
row: unique
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function minimizedClose() {
|
|
39
|
+
const { currentBus } = useCurrentBus();
|
|
40
|
+
const unique = instance?.attrs?.unique || null;
|
|
41
|
+
if (unique) {
|
|
42
|
+
currentBus.value.emit("workbenchOperation", {
|
|
43
|
+
type: "add",
|
|
44
|
+
row: {
|
|
45
|
+
component: unique,
|
|
46
|
+
labelName: hy.minimizedTitle.value,
|
|
47
|
+
valueJson: {
|
|
48
|
+
isEdit: hy.getIsEdit(),
|
|
49
|
+
...hy.getCacheData()
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function minimizedShow(params) {
|
|
56
|
+
if (params.id) {
|
|
57
|
+
const value = params.valueJson;
|
|
58
|
+
hy.setIsEdit(false);
|
|
59
|
+
await hy.restoreCache(value);
|
|
60
|
+
hy.setIsEdit(value.isEdit);
|
|
61
|
+
} else {
|
|
62
|
+
hy.setDragLevelIndex("HyDialogRef");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function setIsEdit(newIsEdit) {
|
|
66
|
+
hy.isEdit.value = newIsEdit;
|
|
67
|
+
}
|
|
68
|
+
function getIsEdit() {
|
|
69
|
+
return hy.isEdit.value;
|
|
70
|
+
}
|
|
71
|
+
function getCacheData() {
|
|
72
|
+
return {
|
|
73
|
+
// formModel: hy.formModel.value,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function restoreCache(params = {}) {
|
|
77
|
+
return Promise.resolve();
|
|
78
|
+
}
|
|
79
|
+
function confirmReplace(type) {
|
|
80
|
+
const { t } = useLocale();
|
|
81
|
+
return new Promise((resolve, reject) => {
|
|
82
|
+
if (type === "close") {
|
|
83
|
+
HyConfirmDialog.confirm({
|
|
84
|
+
content: `<div>
|
|
85
|
+
<p>\u786E\u8BA4\u79BB\u5F00\u7F16\u8F91</p>
|
|
86
|
+
<p>\u79BB\u5F00\u540E\u5DF2\u586B\u5199\u7684\u5185\u5BB9\u5C06\u4E0D\u505A\u4FDD\u5B58</p>
|
|
87
|
+
</div>`,
|
|
88
|
+
onCancel: () => {
|
|
89
|
+
hy.loading.value = false;
|
|
90
|
+
reject(false);
|
|
91
|
+
},
|
|
92
|
+
submitText: "\u786E\u8BA4\u79BB\u5F00",
|
|
93
|
+
onSubmit: () => {
|
|
94
|
+
resolve(true);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
HyConfirmDialog.confirm({
|
|
99
|
+
content: `<div>
|
|
100
|
+
<p>\u68C0\u6D4B\u5230\u60A8\u4E0A\u6B21\u6709\u672A\u5B8C\u6210\u7684\u7F16\u8F91\u5185\u5BB9\u3002</p>
|
|
101
|
+
<p>\u662F\u5426\u7EE7\u7EED\u8FDB\u884C\u7F16\u8F91\uFF1F</p>
|
|
102
|
+
</div>`,
|
|
103
|
+
cancelText: "\u7EE7\u7EED\u7F16\u8F91\u5185\u5BB9",
|
|
104
|
+
onCancel: () => {
|
|
105
|
+
hy.setDragLevelIndex("HyDialogRef");
|
|
106
|
+
hy.loading.value = false;
|
|
107
|
+
reject(false);
|
|
108
|
+
},
|
|
109
|
+
submitText: "\u6E05\u7A7A\u91CD\u65B0\u7F16\u8F91",
|
|
110
|
+
onSubmit: () => {
|
|
111
|
+
resolve(true);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
onMounted(() => {
|
|
118
|
+
watch(
|
|
119
|
+
() => hy.dialogVisible?.value,
|
|
120
|
+
(newVal) => {
|
|
121
|
+
if (!newVal) {
|
|
122
|
+
if (hy.minimized) {
|
|
123
|
+
hy.minimized.value = false;
|
|
124
|
+
}
|
|
125
|
+
if (hy.loading) {
|
|
126
|
+
hy.loading.value = false;
|
|
127
|
+
}
|
|
128
|
+
hy.setIsEdit(false);
|
|
129
|
+
} else {
|
|
130
|
+
hy.minimizedRemove();
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{ deep: true }
|
|
134
|
+
);
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
loading,
|
|
138
|
+
isEdit,
|
|
139
|
+
instance,
|
|
140
|
+
minimized,
|
|
141
|
+
minimizedTitle,
|
|
142
|
+
setDragLevelIndex,
|
|
143
|
+
onMinimized,
|
|
144
|
+
minimizedRemove,
|
|
145
|
+
minimizedClose,
|
|
146
|
+
minimizedShow,
|
|
147
|
+
setIsEdit,
|
|
148
|
+
getIsEdit,
|
|
149
|
+
getCacheData,
|
|
150
|
+
restoreCache,
|
|
151
|
+
confirmReplace
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function useDialogIsEdit(hy) {
|
|
155
|
+
const isWatchForm = ref(false);
|
|
156
|
+
function watchPause(type = "show") {
|
|
157
|
+
return new Promise(async (resolve, reject) => {
|
|
158
|
+
if (hy.getIsEdit()) {
|
|
159
|
+
if (type === "close") {
|
|
160
|
+
const eplaceType = await hy.confirmReplace(type).catch((err) => {
|
|
161
|
+
return reject(err);
|
|
162
|
+
});
|
|
163
|
+
if (!eplaceType) {
|
|
164
|
+
return reject();
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
await hy.confirmReplace(type);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
hy?.setIsEdit(false);
|
|
171
|
+
hy.isWatchForm.value = false;
|
|
172
|
+
resolve({});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function watchResume() {
|
|
176
|
+
hy.isWatchForm.value = true;
|
|
177
|
+
}
|
|
178
|
+
onMounted(() => {
|
|
179
|
+
if (hy.formModel && hy.formModel.value) {
|
|
180
|
+
watch(
|
|
181
|
+
() => hy.formModel?.value,
|
|
182
|
+
() => {
|
|
183
|
+
if (hy.isWatchForm?.value && !hy.getIsEdit()) {
|
|
184
|
+
hy.setIsEdit(true);
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{ deep: true }
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
hy.setIsEdit(false);
|
|
191
|
+
});
|
|
192
|
+
return {
|
|
193
|
+
isWatchForm,
|
|
194
|
+
watchPause,
|
|
195
|
+
watchResume
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function useBatchDialog(hy) {
|
|
199
|
+
const instance = getCurrentInstance();
|
|
200
|
+
const tableDataChange = ref([]);
|
|
201
|
+
const progress = ref(0);
|
|
202
|
+
function onTableDataChange(data) {
|
|
203
|
+
hy.tableDataChange.value = data;
|
|
204
|
+
}
|
|
205
|
+
function confirmReplace(type) {
|
|
206
|
+
const { t } = useLocale();
|
|
207
|
+
return new Promise((resolve, reject) => {
|
|
208
|
+
if (type === "close") {
|
|
209
|
+
HyConfirmDialog.confirm({
|
|
210
|
+
content: `<div>
|
|
211
|
+
<p>\u786E\u8BA4\u79BB\u5F00\u7F16\u8F91</p>
|
|
212
|
+
<p>\u79BB\u5F00\u540E\u5DF2\u586B\u5199\u7684\u5185\u5BB9\u5C06\u4E0D\u505A\u4FDD\u5B58</p>
|
|
213
|
+
</div>`,
|
|
214
|
+
onCancel: () => {
|
|
215
|
+
hy.loading.value = false;
|
|
216
|
+
reject(false);
|
|
217
|
+
},
|
|
218
|
+
submitText: "\u786E\u8BA4\u79BB\u5F00",
|
|
219
|
+
onSubmit: () => {
|
|
220
|
+
resolve(true);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
} else {
|
|
224
|
+
HyConfirmDialog.confirm({
|
|
225
|
+
content: `<div>
|
|
226
|
+
<p>\u68C0\u6D4B\u5230\u60A8\u4E0A\u6B21\u6709\u672A\u5B8C\u6210\u7684\u7F16\u8F91\u5185\u5BB9\u3002</p>
|
|
227
|
+
<p>\u662F\u5426\u7EE7\u7EED\u8FDB\u884C\u7F16\u8F91\uFF1F</p>
|
|
228
|
+
</div>`,
|
|
229
|
+
cancelText: "\u7EE7\u7EED\u7F16\u8F91\u5185\u5BB9",
|
|
230
|
+
onCancel: () => {
|
|
231
|
+
hy.setDragLevelIndex("HyBatchUploadDialogRef");
|
|
232
|
+
hy.loading.value = false;
|
|
233
|
+
reject(false);
|
|
234
|
+
},
|
|
235
|
+
submitText: "\u6E05\u7A7A\u91CD\u65B0\u7F16\u8F91",
|
|
236
|
+
onSubmit: () => {
|
|
237
|
+
resolve(true);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
function minimizedClose() {
|
|
244
|
+
const unique = instance?.attrs?.unique || null;
|
|
245
|
+
if (unique) {
|
|
246
|
+
const { currentBus } = useCurrentBus();
|
|
247
|
+
currentBus.value.emit("workbenchOperation", {
|
|
248
|
+
type: "add",
|
|
249
|
+
row: {
|
|
250
|
+
component: unique,
|
|
251
|
+
labelName: hy.minimizedTitle.value,
|
|
252
|
+
valueJson: {
|
|
253
|
+
isBatch: true,
|
|
254
|
+
isEdit: hy.getIsEdit(),
|
|
255
|
+
uploadStatus: true,
|
|
256
|
+
loading: hy.HyBatchUploadDialogRef.value.getIsSubmitting(),
|
|
257
|
+
updateProgress: hy.progress.value,
|
|
258
|
+
...hy.getCacheData()
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
async function minimizedShow(params) {
|
|
265
|
+
hy.setDragLevelIndex("HyBatchUploadDialogRef");
|
|
266
|
+
}
|
|
267
|
+
async function onClose() {
|
|
268
|
+
await hy.watchPause("close");
|
|
269
|
+
}
|
|
270
|
+
function onSubmitProgress(newProgress) {
|
|
271
|
+
const unique = instance?.attrs?.unique || null;
|
|
272
|
+
hy.progress.value = newProgress;
|
|
273
|
+
const { currentBus } = useCurrentBus();
|
|
274
|
+
currentBus.value.emit("workbenchOperation", {
|
|
275
|
+
type: "update",
|
|
276
|
+
row: {
|
|
277
|
+
component: unique,
|
|
278
|
+
valueJson: {
|
|
279
|
+
loading: true,
|
|
280
|
+
uploadStatus: true,
|
|
281
|
+
updateProgress: hy.progress.value
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
function uploadProgress(params = {}) {
|
|
287
|
+
const unique = instance?.attrs?.unique || null;
|
|
288
|
+
const { total, success, failed, result } = params;
|
|
289
|
+
if (result) {
|
|
290
|
+
hy.minimizedRemove();
|
|
291
|
+
}
|
|
292
|
+
const { currentBus } = useCurrentBus();
|
|
293
|
+
currentBus.value.emit("workbenchOperation", {
|
|
294
|
+
type: "update",
|
|
295
|
+
row: {
|
|
296
|
+
component: unique,
|
|
297
|
+
valueJson: {
|
|
298
|
+
uploadStatus: result
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
onMounted(() => {
|
|
304
|
+
watch(
|
|
305
|
+
() => hy.tableDataChange.value,
|
|
306
|
+
() => {
|
|
307
|
+
hy.setIsEdit(hy.tableDataChange.value.length !== 0);
|
|
308
|
+
},
|
|
309
|
+
{ deep: true, immediate: true }
|
|
310
|
+
);
|
|
311
|
+
hy.setIsEdit(false);
|
|
312
|
+
});
|
|
313
|
+
return {
|
|
314
|
+
instance,
|
|
315
|
+
tableDataChange,
|
|
316
|
+
progress,
|
|
317
|
+
onTableDataChange,
|
|
318
|
+
confirmReplace,
|
|
319
|
+
minimizedClose,
|
|
320
|
+
minimizedShow,
|
|
321
|
+
onClose,
|
|
322
|
+
onSubmitProgress,
|
|
323
|
+
uploadProgress
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export { useBatchDialog, useDialog, useDialogIsEdit };
|