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
|
@@ -23,9 +23,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
23
23
|
// 用实例的 provides 链覆盖应用级 provides,才能拿到 ElConfigProvider 注入的 namespace
|
|
24
24
|
provides: instance.provides
|
|
25
25
|
} : null;
|
|
26
|
-
const permissionIdList = JSON.parse(
|
|
27
|
-
window.sessionStorage.getItem("permissionIdList") || "[]"
|
|
28
|
-
);
|
|
26
|
+
const permissionIdList = JSON.parse(window.sessionStorage.getItem("permissionIdList") || "[]");
|
|
29
27
|
let virtualTree = null;
|
|
30
28
|
const filterValue = vue.ref("");
|
|
31
29
|
const disableSelectionMap = vue.ref(null);
|
|
@@ -34,10 +32,46 @@ const useAppTreeWrapper = (hy) => {
|
|
|
34
32
|
const selectFilterType = vue.ref(null);
|
|
35
33
|
const selectFilterList = vue.ref([]);
|
|
36
34
|
const loading = vue.ref(true);
|
|
35
|
+
const noTreeSelData = vue.ref([]);
|
|
36
|
+
function getSelectedDataKey(data) {
|
|
37
|
+
if (!data) return void 0;
|
|
38
|
+
if (props.treeType === "device" || props.treeType === "channel") {
|
|
39
|
+
return data.channelId || data.deviceId;
|
|
40
|
+
}
|
|
41
|
+
if (props.treeType) {
|
|
42
|
+
return data.id;
|
|
43
|
+
}
|
|
44
|
+
return data[props.treeProps?.value];
|
|
45
|
+
}
|
|
46
|
+
function deleteNoTreeSelData(item) {
|
|
47
|
+
const index = hy.noTreeSelData.value.findIndex((v) => hy.getSelectedDataKey(v) === hy.getSelectedDataKey(item));
|
|
48
|
+
if (index !== -1) {
|
|
49
|
+
hy.noTreeSelData.value.splice(index, 1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function updateNoTreeSelData(dataList) {
|
|
53
|
+
let selList = [];
|
|
54
|
+
if (props.treeType) {
|
|
55
|
+
selList = hy.virtualTree?.getCheckedBusinessNodes(true) || [];
|
|
56
|
+
} else {
|
|
57
|
+
selList = hy.virtualTree?.getCheckedNodes(true) || [];
|
|
58
|
+
}
|
|
59
|
+
const treeMap = /* @__PURE__ */ new Map();
|
|
60
|
+
selList.forEach((item) => {
|
|
61
|
+
const key = hy.getSelectedDataKey(item);
|
|
62
|
+
if (key) {
|
|
63
|
+
treeMap.set(key, true);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
hy.noTreeSelData.value = dataList.filter((item) => !treeMap.get(hy.getSelectedDataKey(item)));
|
|
67
|
+
}
|
|
68
|
+
function mergeNoTreeSelData(dataList) {
|
|
69
|
+
return [...hy.noTreeSelData.value, ...dataList];
|
|
70
|
+
}
|
|
37
71
|
vue.watch(
|
|
38
72
|
() => props.showCheckbox,
|
|
39
73
|
(newVal) => {
|
|
40
|
-
virtualTree?.setRowSelection({
|
|
74
|
+
hy.virtualTree?.setRowSelection({
|
|
41
75
|
type: props.showCheckbox ? "checkbox" : "radio"
|
|
42
76
|
});
|
|
43
77
|
}
|
|
@@ -46,43 +80,43 @@ const useAppTreeWrapper = (hy) => {
|
|
|
46
80
|
return new Promise((resolve) => {
|
|
47
81
|
hy.loading.value = true;
|
|
48
82
|
if (props.disableSelection?.length) {
|
|
49
|
-
setDisAbleSelectionMap();
|
|
83
|
+
hy.setDisAbleSelectionMap();
|
|
50
84
|
}
|
|
51
|
-
if (!virtualTree) {
|
|
52
|
-
virtualTree = new VirtualTree({
|
|
85
|
+
if (!hy.virtualTree) {
|
|
86
|
+
hy.virtualTree = new VirtualTree({
|
|
53
87
|
// 指定容器
|
|
54
88
|
container: treeRef.value,
|
|
55
89
|
// 数据
|
|
56
90
|
data: dataList,
|
|
57
91
|
// 每一项的高度
|
|
58
|
-
itemHeight: 30,
|
|
92
|
+
// itemHeight: 30, // 使用全局配置
|
|
59
93
|
// 可视区域外的缓冲项数量
|
|
60
|
-
bufferSize: 10,
|
|
94
|
+
// bufferSize: 10, // 使用全局配置
|
|
61
95
|
// 相邻级节点间的水平缩进,单位为像素
|
|
62
|
-
indent: 16,
|
|
96
|
+
// indent: 16, // 使用全局配置
|
|
63
97
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
64
98
|
// 树形业务类型
|
|
65
99
|
business: props.treeType,
|
|
66
100
|
// 自定义整体的插槽
|
|
67
|
-
renderItem: props.treeType === treeConfig.treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
|
|
101
|
+
renderItem: props.treeType === treeConfig.treeTypeConfig.user ? (data, node) => hy.setUserSlot(data, node) : props.treeType === treeConfig.treeTypeConfig.group ? (data, node) => hy.setGroupRenderItem(data, node) : hy.setSlot("treeParentSlot"),
|
|
68
102
|
// // 自定义状态右侧插槽
|
|
69
103
|
renderRight: (data) => {
|
|
70
|
-
let renderRight = setSlot("renderRight");
|
|
104
|
+
let renderRight = hy.setSlot("renderRight");
|
|
71
105
|
if (renderRight) return renderRight(data);
|
|
72
106
|
if (data.dataType === 1) {
|
|
73
|
-
let departmentRight = setSlot("departmentRight");
|
|
107
|
+
let departmentRight = hy.setSlot("departmentRight");
|
|
74
108
|
if (departmentRight) {
|
|
75
109
|
return departmentRight(data);
|
|
76
110
|
}
|
|
77
111
|
}
|
|
78
112
|
if (data.dataType === 3) {
|
|
79
|
-
let deviceOnlineRight = setSlot("deviceOnlineRight");
|
|
113
|
+
let deviceOnlineRight = hy.setSlot("deviceOnlineRight");
|
|
80
114
|
if (deviceOnlineRight) {
|
|
81
115
|
return deviceOnlineRight(data);
|
|
82
116
|
}
|
|
83
117
|
}
|
|
84
118
|
if ([11].includes(data.dataType)) {
|
|
85
|
-
let planGroupRight = setSlot("planGroupRight");
|
|
119
|
+
let planGroupRight = hy.setSlot("planGroupRight");
|
|
86
120
|
if (planGroupRight) {
|
|
87
121
|
return planGroupRight(data);
|
|
88
122
|
}
|
|
@@ -90,16 +124,16 @@ const useAppTreeWrapper = (hy) => {
|
|
|
90
124
|
return true;
|
|
91
125
|
},
|
|
92
126
|
// // 自定义状态模块
|
|
93
|
-
renderStatus: props.treeType === treeConfig.treeTypeConfig.device || props.treeType === treeConfig.treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
|
|
127
|
+
renderStatus: props.treeType === treeConfig.treeTypeConfig.device || props.treeType === treeConfig.treeTypeConfig.channel ? (data) => hy.setRenderStatus(data) : null,
|
|
94
128
|
// 暂无数据插槽
|
|
95
129
|
renderEmpty: () => {
|
|
96
130
|
if (!props.showCustomEmpty || hy.filterValue.value) return true;
|
|
97
|
-
let renderEmpty = setSlot("renderEmpty");
|
|
131
|
+
let renderEmpty = hy.setSlot("renderEmpty");
|
|
98
132
|
if (renderEmpty) {
|
|
99
133
|
const target = renderEmpty();
|
|
100
134
|
return target.el;
|
|
101
135
|
}
|
|
102
|
-
return setEmpty();
|
|
136
|
+
return hy.setEmpty();
|
|
103
137
|
},
|
|
104
138
|
props: {
|
|
105
139
|
// 是否显示右侧业务状态
|
|
@@ -134,7 +168,6 @@ const useAppTreeWrapper = (hy) => {
|
|
|
134
168
|
showSelectBox: props.showSelectBox,
|
|
135
169
|
// 选中回调
|
|
136
170
|
onCheckChange: (data, info, checked) => {
|
|
137
|
-
console.log("onCheckChange", info);
|
|
138
171
|
if (data.dataType === 3 && !checked) {
|
|
139
172
|
emits("on-click-delete", JSON.parse(JSON.stringify(data)));
|
|
140
173
|
} else if (data.dataType === 3) {
|
|
@@ -142,9 +175,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
142
175
|
}
|
|
143
176
|
emits(
|
|
144
177
|
"on-check-tree",
|
|
145
|
-
JSON.parse(
|
|
146
|
-
JSON.stringify(info.checkedBusinessNodes || info.checkedNodes)
|
|
147
|
-
),
|
|
178
|
+
JSON.parse(JSON.stringify(hy.mergeNoTreeSelData(info.checkedBusinessNodes || info.checkedNodes))),
|
|
148
179
|
{
|
|
149
180
|
data,
|
|
150
181
|
info,
|
|
@@ -221,9 +252,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
221
252
|
}
|
|
222
253
|
]);
|
|
223
254
|
} else {
|
|
224
|
-
const channelList = data.videoChannelList?.filter(
|
|
225
|
-
(v) => v.onlineState === 1
|
|
226
|
-
);
|
|
255
|
+
const channelList = data.videoChannelList?.filter((v) => v.onlineState === 1);
|
|
227
256
|
if (channelList && channelList.length) {
|
|
228
257
|
emits(
|
|
229
258
|
"on-dblclick",
|
|
@@ -248,16 +277,16 @@ const useAppTreeWrapper = (hy) => {
|
|
|
248
277
|
document.body.click();
|
|
249
278
|
},
|
|
250
279
|
onLoad: () => {
|
|
251
|
-
if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
280
|
+
if (props.showOnlineOnly && !hy.virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
252
281
|
elementPlus.ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
253
282
|
}
|
|
254
283
|
if (props.defaultSelectedOrgID && props.showCheckbox && props.treeType === "device") {
|
|
255
|
-
setSelectedOrg(dataList);
|
|
284
|
+
hy.setSelectedOrg(dataList);
|
|
256
285
|
} else if (props.selectedByDefault?.length) {
|
|
257
|
-
setCheckedKeys(props.selectedByDefault);
|
|
286
|
+
hy.setCheckedKeys(props.selectedByDefault);
|
|
258
287
|
}
|
|
259
288
|
if (hy.filterValue.value) {
|
|
260
|
-
getFilterValue();
|
|
289
|
+
hy.getFilterValue();
|
|
261
290
|
}
|
|
262
291
|
setTimeout(() => {
|
|
263
292
|
hy.loading.value = false;
|
|
@@ -266,7 +295,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
266
295
|
}
|
|
267
296
|
});
|
|
268
297
|
} else {
|
|
269
|
-
virtualTree.setData(
|
|
298
|
+
hy.virtualTree.setData(
|
|
270
299
|
{
|
|
271
300
|
data: dataList,
|
|
272
301
|
businessConfig: {
|
|
@@ -276,11 +305,11 @@ const useAppTreeWrapper = (hy) => {
|
|
|
276
305
|
}
|
|
277
306
|
},
|
|
278
307
|
() => {
|
|
279
|
-
if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
308
|
+
if (props.showOnlineOnly && !hy.virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
280
309
|
elementPlus.ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
281
310
|
}
|
|
282
311
|
if (hy.filterValue.value) {
|
|
283
|
-
getFilterValue();
|
|
312
|
+
hy.getFilterValue();
|
|
284
313
|
}
|
|
285
314
|
setTimeout(() => {
|
|
286
315
|
hy.loading.value = false;
|
|
@@ -318,7 +347,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
318
347
|
return content;
|
|
319
348
|
}
|
|
320
349
|
function getFilterValue() {
|
|
321
|
-
virtualTree.filter({ filterValue: hy.filterValue.value }, false);
|
|
350
|
+
hy.virtualTree.filter({ filterValue: hy.filterValue.value }, false);
|
|
322
351
|
}
|
|
323
352
|
function setDisAbleSelectionMap() {
|
|
324
353
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -332,7 +361,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
332
361
|
emits("on-refreshData");
|
|
333
362
|
}
|
|
334
363
|
function setRenderStatus(data) {
|
|
335
|
-
const slot = setSlot("renderStatus");
|
|
364
|
+
const slot = hy.setSlot("renderStatus");
|
|
336
365
|
if (slot) {
|
|
337
366
|
return slot(data);
|
|
338
367
|
}
|
|
@@ -362,22 +391,24 @@ const useAppTreeWrapper = (hy) => {
|
|
|
362
391
|
}
|
|
363
392
|
function setUserSlot(data) {
|
|
364
393
|
if (data.dataType === 1) {
|
|
365
|
-
const slot2 = setSlot("treeParentSlot");
|
|
394
|
+
const slot2 = hy.setSlot("treeParentSlot");
|
|
366
395
|
if (slot2) {
|
|
367
396
|
return slot2(data);
|
|
368
397
|
}
|
|
369
398
|
return true;
|
|
370
399
|
}
|
|
371
|
-
const slot = setSlot("treeSelectedSlot");
|
|
400
|
+
const slot = hy.setSlot("treeSelectedSlot");
|
|
372
401
|
if (slot) {
|
|
373
402
|
return slot(data);
|
|
374
403
|
}
|
|
375
404
|
return true;
|
|
376
405
|
}
|
|
377
406
|
function setGroupRenderItem(data, node) {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
407
|
+
if (data.dataType === 4) {
|
|
408
|
+
const slot = hy.setSlot("treeGroupSlot");
|
|
409
|
+
if (slot) {
|
|
410
|
+
return slot(data, node);
|
|
411
|
+
}
|
|
381
412
|
}
|
|
382
413
|
return true;
|
|
383
414
|
}
|
|
@@ -422,87 +453,86 @@ const useAppTreeWrapper = (hy) => {
|
|
|
422
453
|
emits("on-addDevice");
|
|
423
454
|
}
|
|
424
455
|
function setDeviceStatus(payload) {
|
|
425
|
-
virtualTree?.updateData([payload]);
|
|
456
|
+
hy.virtualTree?.updateData([payload]);
|
|
426
457
|
}
|
|
427
458
|
function singleRemovalFn(row, isForce = false) {
|
|
428
459
|
if (props.treeType === "device" || props.treeType === "channel") {
|
|
429
|
-
virtualTree.setChecked(row.channelId || row.deviceId, false, true);
|
|
460
|
+
hy.virtualTree.setChecked(row.channelId || row.deviceId, false, true);
|
|
430
461
|
} else if (props.treeType) {
|
|
431
|
-
virtualTree.setChecked(row.id, false, true, isForce);
|
|
462
|
+
hy.virtualTree.setChecked(row.id, false, true, isForce);
|
|
432
463
|
} else if (!props.treeType && props.treeProps) {
|
|
433
|
-
virtualTree.setChecked(
|
|
434
|
-
row[`${props.treeProps.value}`],
|
|
435
|
-
false,
|
|
436
|
-
true,
|
|
437
|
-
isForce
|
|
438
|
-
);
|
|
464
|
+
hy.virtualTree.setChecked(row[`${props.treeProps.value}`], false, true, isForce);
|
|
439
465
|
}
|
|
466
|
+
hy.deleteNoTreeSelData(row);
|
|
440
467
|
}
|
|
441
468
|
function setCheckedKeys(dataList, isForce = false) {
|
|
442
469
|
if (props.treeType === "device" || props.treeType === "channel") {
|
|
443
|
-
virtualTree?.setCheckedKeys(
|
|
470
|
+
hy.virtualTree?.setCheckedKeys(
|
|
444
471
|
dataList.map((v) => v.channelId || v.deviceId),
|
|
445
472
|
true,
|
|
446
473
|
isForce
|
|
447
474
|
);
|
|
448
475
|
} else if (props.treeType) {
|
|
449
|
-
virtualTree?.setCheckedKeys(
|
|
476
|
+
hy.virtualTree?.setCheckedKeys(
|
|
450
477
|
dataList.map((v) => v.id),
|
|
451
478
|
true,
|
|
452
479
|
isForce
|
|
453
480
|
);
|
|
454
481
|
} else if (!props.treeType && props.treeProps) {
|
|
455
|
-
|
|
456
|
-
"\u9009\u4E2D\u56DE\u8C03",
|
|
457
|
-
dataList.map((v) => v[`${props.treeProps.value}`])
|
|
458
|
-
);
|
|
459
|
-
virtualTree?.setCheckedKeys(
|
|
482
|
+
hy.virtualTree?.setCheckedKeys(
|
|
460
483
|
dataList.map((v) => v[`${props.treeProps.value}`]),
|
|
461
484
|
false,
|
|
462
485
|
isForce
|
|
463
486
|
);
|
|
464
487
|
}
|
|
488
|
+
hy.updateNoTreeSelData(dataList);
|
|
465
489
|
if (props.isBackDefaultSelected) {
|
|
466
490
|
setTimeout(() => {
|
|
467
|
-
|
|
468
|
-
|
|
491
|
+
let deviceList = [];
|
|
492
|
+
if (props.treeType) {
|
|
493
|
+
deviceList = hy.virtualTree?.getCheckedBusinessNodes(true) || [];
|
|
494
|
+
} else {
|
|
495
|
+
deviceList = hy.virtualTree?.getCheckedNodes(true) || [];
|
|
496
|
+
}
|
|
497
|
+
emits("on-selectedDataList", hy.mergeNoTreeSelData(deviceList));
|
|
469
498
|
});
|
|
470
499
|
}
|
|
471
500
|
}
|
|
472
501
|
function setChecked(data, type = true) {
|
|
473
502
|
if (props.treeType === "device") {
|
|
474
|
-
virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
|
|
503
|
+
hy.virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
|
|
475
504
|
} else if (props.treeType) {
|
|
476
|
-
virtualTree?.setChecked(data.id, type, true);
|
|
505
|
+
hy.virtualTree?.setChecked(data.id, type, true);
|
|
477
506
|
} else if (!props.treeType && props.treeProps) {
|
|
478
|
-
virtualTree?.setChecked(data[`${props.treeProps.value}`], type, false);
|
|
507
|
+
hy.virtualTree?.setChecked(data[`${props.treeProps.value}`], type, false);
|
|
508
|
+
}
|
|
509
|
+
if (!type) {
|
|
510
|
+
hy.deleteNoTreeSelData(data);
|
|
479
511
|
}
|
|
480
512
|
}
|
|
481
513
|
function setSelectedOrg(deviceList) {
|
|
482
514
|
for (let i = 0; i < deviceList.length; i++) {
|
|
483
515
|
if (props.defaultSelectedOrgID === deviceList[i].id) {
|
|
484
516
|
if (deviceList[i].deviceList?.length) {
|
|
485
|
-
setCheckedKeys(deviceList[i].deviceList);
|
|
517
|
+
hy.setCheckedKeys(deviceList[i].deviceList);
|
|
486
518
|
}
|
|
487
519
|
return true;
|
|
488
520
|
}
|
|
489
521
|
if (deviceList[i].children?.length) {
|
|
490
|
-
const org = setSelectedOrg(deviceList[i].children);
|
|
522
|
+
const org = hy.setSelectedOrg(deviceList[i].children);
|
|
491
523
|
if (org) return true;
|
|
492
524
|
}
|
|
493
525
|
}
|
|
494
526
|
}
|
|
495
527
|
function getSelectedDataList(leafOnly = false) {
|
|
496
528
|
if (props.treeType) {
|
|
497
|
-
return virtualTree?.getCheckedBusinessNodes(leafOnly) || [];
|
|
529
|
+
return hy.mergeNoTreeSelData(hy.virtualTree?.getCheckedBusinessNodes(leafOnly) || []);
|
|
498
530
|
}
|
|
499
|
-
return virtualTree?.getCheckedNodes(leafOnly) || [];
|
|
531
|
+
return hy.mergeNoTreeSelData(hy.virtualTree?.getCheckedNodes(leafOnly) || []);
|
|
500
532
|
}
|
|
501
533
|
function setFilterListType(type) {
|
|
502
534
|
if (props.selectFilterList?.length) {
|
|
503
|
-
hy.selectFilterList.value = JSON.parse(
|
|
504
|
-
JSON.stringify(props.selectFilterList)
|
|
505
|
-
);
|
|
535
|
+
hy.selectFilterList.value = JSON.parse(JSON.stringify(props.selectFilterList));
|
|
506
536
|
return;
|
|
507
537
|
}
|
|
508
538
|
if (props.treeType === "device") {
|
|
@@ -544,9 +574,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
544
574
|
}
|
|
545
575
|
}
|
|
546
576
|
const getInputPlaceholder = vue.computed(() => {
|
|
547
|
-
const item = hy.selectFilterList.value.find(
|
|
548
|
-
(v) => v.value === hy.selectFilterType.value
|
|
549
|
-
);
|
|
577
|
+
const item = hy.selectFilterList.value.find((v) => v.value === hy.selectFilterType.value);
|
|
550
578
|
if (item && item.placeholder) {
|
|
551
579
|
return item.placeholder;
|
|
552
580
|
}
|
|
@@ -558,7 +586,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
558
586
|
}
|
|
559
587
|
}
|
|
560
588
|
function getNode(id) {
|
|
561
|
-
return virtualTree.getNode(id);
|
|
589
|
+
return hy.virtualTree.getNode(id);
|
|
562
590
|
}
|
|
563
591
|
return {
|
|
564
592
|
filterValue,
|
|
@@ -566,6 +594,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
566
594
|
permissionIdList,
|
|
567
595
|
disableSelectionMap,
|
|
568
596
|
addDeviceDom,
|
|
597
|
+
setDisAbleSelectionMap,
|
|
569
598
|
getData,
|
|
570
599
|
getFilterValue,
|
|
571
600
|
refreshData,
|
|
@@ -573,6 +602,11 @@ const useAppTreeWrapper = (hy) => {
|
|
|
573
602
|
setCheckedKeys,
|
|
574
603
|
setChecked,
|
|
575
604
|
setFilterListType,
|
|
605
|
+
setSelectedOrg,
|
|
606
|
+
setUserSlot,
|
|
607
|
+
setSlot,
|
|
608
|
+
setRenderStatus,
|
|
609
|
+
setEmpty,
|
|
576
610
|
getInputPlaceholder,
|
|
577
611
|
onChange,
|
|
578
612
|
selectFilterList,
|
|
@@ -580,7 +614,14 @@ const useAppTreeWrapper = (hy) => {
|
|
|
580
614
|
selectedDataList,
|
|
581
615
|
getSelectedDataList,
|
|
582
616
|
loading,
|
|
583
|
-
getNode
|
|
617
|
+
getNode,
|
|
618
|
+
noTreeSelData,
|
|
619
|
+
updateNoTreeSelData,
|
|
620
|
+
mergeNoTreeSelData,
|
|
621
|
+
getSelectedDataKey,
|
|
622
|
+
deleteNoTreeSelData,
|
|
623
|
+
setDeviceStatus,
|
|
624
|
+
setGroupRenderItem
|
|
584
625
|
};
|
|
585
626
|
};
|
|
586
627
|
function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [], treeType }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url('hy-virtual-tree/style');
|
|
1
|
+
@import url('hy-virtual-tree/style');
|
|
@@ -120,7 +120,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
120
120
|
// 是否高亮选中节点
|
|
121
121
|
highlight: {
|
|
122
122
|
type: Boolean,
|
|
123
|
-
default:
|
|
123
|
+
default: true
|
|
124
124
|
},
|
|
125
125
|
// 是否严格的遵循父子不互相关联
|
|
126
126
|
checkStrictly: {
|
|
@@ -206,7 +206,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
206
206
|
onChange,
|
|
207
207
|
getSelectedDataList,
|
|
208
208
|
loading,
|
|
209
|
-
getNode
|
|
209
|
+
getNode,
|
|
210
|
+
setDeviceStatus
|
|
210
211
|
} = useMixins.useMixins(
|
|
211
212
|
{
|
|
212
213
|
props,
|
|
@@ -229,14 +230,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
229
230
|
setChecked,
|
|
230
231
|
getSelectedDataList,
|
|
231
232
|
refreshData,
|
|
232
|
-
getNode
|
|
233
|
+
getNode,
|
|
234
|
+
setDeviceStatus
|
|
233
235
|
});
|
|
234
236
|
return (_ctx, _cache) => {
|
|
235
237
|
const _directive_loading = vue.resolveDirective("loading");
|
|
236
238
|
return vue.openBlock(), vue.createElementBlock(
|
|
237
239
|
"div",
|
|
238
240
|
{
|
|
239
|
-
class: "w-full flex flex-col",
|
|
241
|
+
class: "w-full flex flex-col box-border",
|
|
240
242
|
style: vue.normalizeStyle({ height: `${__props.treeHeight}px` })
|
|
241
243
|
},
|
|
242
244
|
[
|
|
@@ -249,7 +251,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
249
251
|
"show-after": 500
|
|
250
252
|
}, {
|
|
251
253
|
default: vue.withCtx(() => [
|
|
252
|
-
vue.createElementVNode("div", { class: "search_lightColor flex min-w-full z-[3]" }, [
|
|
254
|
+
vue.createElementVNode("div", { class: "search_lightColor flex min-w-full z-[3] box-border" }, [
|
|
253
255
|
vue.createVNode(vue.unref(elementPlus.ElInput), {
|
|
254
256
|
size: "small",
|
|
255
257
|
clearable: "",
|
|
@@ -286,7 +288,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
286
288
|
placement: "bottom-start"
|
|
287
289
|
}, {
|
|
288
290
|
default: vue.withCtx(() => [
|
|
289
|
-
vue.createElementVNode("div", { class: "flex search_lightColor w-full" }, [
|
|
291
|
+
vue.createElementVNode("div", { class: "flex search_lightColor w-full box-border" }, [
|
|
290
292
|
vue.createElementVNode("div", { class: "flex flex-grow w-0" }, [
|
|
291
293
|
vue.createVNode(vue.unref(elementPlus.ElSelect), {
|
|
292
294
|
class: "!w-[37%] box-border rounded-[6px] flex-shrink-0",
|
|
@@ -339,18 +341,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
339
341
|
}, 8, ["content"])
|
|
340
342
|
])) : vue.createCommentVNode("v-if", true),
|
|
341
343
|
vue.renderSlot(_ctx.$slots, "input-bottom"),
|
|
342
|
-
vue.withDirectives(vue.
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
344
|
+
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", { class: "flex-grow h-0 w-full px-[10px] box-border" }, [
|
|
345
|
+
vue.createElementVNode(
|
|
346
|
+
"div",
|
|
347
|
+
{
|
|
348
|
+
ref_key: "treeRef",
|
|
349
|
+
ref: treeRef,
|
|
350
|
+
class: "w-full h-full"
|
|
351
|
+
},
|
|
352
|
+
null,
|
|
353
|
+
512
|
|
354
|
+
/* NEED_PATCH */
|
|
355
|
+
)
|
|
356
|
+
])), [
|
|
354
357
|
[_directive_loading, vue.unref(loading)]
|
|
355
358
|
])
|
|
356
359
|
],
|
|
@@ -6,9 +6,9 @@ var vue = require('vue');
|
|
|
6
6
|
require('../../utils/index.js');
|
|
7
7
|
require('../../hooks/index.js');
|
|
8
8
|
require('../index.js');
|
|
9
|
-
var useLocale = require('../../hooks/useLocale.js');
|
|
10
9
|
var useUserAvatarMap = require('../../hooks/useUserAvatarMap.js');
|
|
11
10
|
var adaptive = require('../../utils/adaptive.js');
|
|
11
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
12
12
|
var index = require('../hyIcon/index.js');
|
|
13
13
|
|
|
14
14
|
import "./style/userAvatar.scss";
|
|
@@ -61,7 +61,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
61
61
|
setup(__props, { emit: __emit }) {
|
|
62
62
|
const props = __props;
|
|
63
63
|
const emits = __emit;
|
|
64
|
-
const { t } = useLocale.useLocale();
|
|
65
64
|
const { userAvatarMap } = useUserAvatarMap.useUserAvatarMap();
|
|
66
65
|
const isGbDevice = vue.computed(
|
|
67
66
|
() => props.device?.gbDevice === 1 && (props.device?.deviceType || props.device?.type) !== 13
|
|
@@ -111,7 +110,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
111
110
|
headImg.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
112
111
|
key: 0,
|
|
113
112
|
src: headImg.value,
|
|
114
|
-
alt: vue.unref(t)("userAvatar.userAvatar")
|
|
113
|
+
alt: vue.unref(useLocale.$t)("userAvatar.userAvatar")
|
|
115
114
|
}, null, 8, ["src", "alt"])) : __props.device?.onlineState === 1 ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyIcon), {
|
|
116
115
|
key: 1,
|
|
117
116
|
"svg-name": __props.initSelectSvgName,
|
|
@@ -126,9 +125,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
126
125
|
"span",
|
|
127
126
|
{
|
|
128
127
|
key: 2,
|
|
129
|
-
class: vue.normalizeClass(
|
|
130
|
-
__props.device?.onlineState === 1 ? "bg-success shadow-[0_0_4px_0] shadow-success" : "bg-info"
|
|
131
|
-
)
|
|
128
|
+
class: vue.normalizeClass(__props.device?.onlineState === 1 ? "bg-success shadow-[0_0_4px_0] shadow-success" : "bg-info")
|
|
132
129
|
},
|
|
133
130
|
null,
|
|
134
131
|
2
|
|
@@ -6,8 +6,8 @@ require('dayjs');
|
|
|
6
6
|
require('../../../hooks/index.js');
|
|
7
7
|
require('../../../utils/index.js');
|
|
8
8
|
require('../../index.js');
|
|
9
|
-
var useLocale = require('../../../hooks/useLocale.js');
|
|
10
9
|
var useVideoPlayerConfig = require('../../../hooks/useVideoPlayerConfig.js');
|
|
10
|
+
var useLocale = require('../../../hooks/useLocale.js');
|
|
11
11
|
var date = require('../../../utils/date.js');
|
|
12
12
|
var is = require('../../../utils/is.js');
|
|
13
13
|
var index = require('../../hyConfirmDialog/index.js');
|
|
@@ -15,7 +15,6 @@ var handler = require('../../../utils/handler.js');
|
|
|
15
15
|
|
|
16
16
|
const useVideoPlayer = (hy) => {
|
|
17
17
|
const { props, emits, videoRef, videoWrapperRef } = hy;
|
|
18
|
-
const { t } = useLocale.useLocale();
|
|
19
18
|
const { videoPlayerConfig } = useVideoPlayerConfig.useVideoPlayerConfig();
|
|
20
19
|
const speed = vue.ref(1);
|
|
21
20
|
const playRules = vue.ref(1);
|
|
@@ -41,17 +40,17 @@ const useVideoPlayer = (hy) => {
|
|
|
41
40
|
const playRulesList = [
|
|
42
41
|
{
|
|
43
42
|
value: 1,
|
|
44
|
-
label: t("videoPlayer.stopAfterPlayback"),
|
|
43
|
+
label: useLocale.$t("videoPlayer.stopAfterPlayback"),
|
|
45
44
|
svgName: "ops-audio-media-center-stop-playing"
|
|
46
45
|
},
|
|
47
46
|
{
|
|
48
47
|
value: 2,
|
|
49
|
-
label: t("videoPlayer.continuousPlayback"),
|
|
48
|
+
label: useLocale.$t("videoPlayer.continuousPlayback"),
|
|
50
49
|
svgName: "ops-audio-media-center-autoplay"
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
52
|
value: 3,
|
|
54
|
-
label: t("videoPlayer.loopPlayback"),
|
|
53
|
+
label: useLocale.$t("videoPlayer.loopPlayback"),
|
|
55
54
|
svgName: "ops-audio-media-center-loop-playback"
|
|
56
55
|
}
|
|
57
56
|
];
|
|
@@ -60,7 +59,7 @@ const useVideoPlayer = (hy) => {
|
|
|
60
59
|
});
|
|
61
60
|
const speedLabel = vue.computed(() => {
|
|
62
61
|
if (speed.value === 1) {
|
|
63
|
-
return t("videoPlayer.multiples");
|
|
62
|
+
return useLocale.$t("videoPlayer.multiples");
|
|
64
63
|
} else {
|
|
65
64
|
return speedList.find((item) => item.value === speed.value).label;
|
|
66
65
|
}
|
|
@@ -190,15 +189,13 @@ const useVideoPlayer = (hy) => {
|
|
|
190
189
|
}
|
|
191
190
|
function playPrevious() {
|
|
192
191
|
if (props.type === "default") {
|
|
193
|
-
const index = props.playList.findIndex(
|
|
194
|
-
(item) => item.id === videoItem.value.id
|
|
195
|
-
);
|
|
192
|
+
const index = props.playList.findIndex((item) => item.id === videoItem.value.id);
|
|
196
193
|
if (index > 0 && index !== props.playList.length) {
|
|
197
194
|
const item = props.playList[index - 1];
|
|
198
195
|
playVideo(item.filePath, item);
|
|
199
196
|
emits("play-previous");
|
|
200
197
|
} else {
|
|
201
|
-
elementPlus.ElMessage.warning(t("videoPlayer.currentIsTheFirstItem"));
|
|
198
|
+
elementPlus.ElMessage.warning(useLocale.$t("videoPlayer.currentIsTheFirstItem"));
|
|
202
199
|
}
|
|
203
200
|
} else if (isAnalyseType.value) {
|
|
204
201
|
if (!isCanPlay.value) return;
|
|
@@ -207,15 +204,13 @@ const useVideoPlayer = (hy) => {
|
|
|
207
204
|
}
|
|
208
205
|
function playNext() {
|
|
209
206
|
if (props.type === "default") {
|
|
210
|
-
const index = props.playList.findIndex(
|
|
211
|
-
(item) => item.id === videoItem.value.id
|
|
212
|
-
);
|
|
207
|
+
const index = props.playList.findIndex((item) => item.id === videoItem.value.id);
|
|
213
208
|
if (index !== props.playList.length - 1) {
|
|
214
209
|
const item = props.playList[index + 1];
|
|
215
210
|
playVideo(item.filePath, item);
|
|
216
211
|
emits("play-next");
|
|
217
212
|
} else {
|
|
218
|
-
elementPlus.ElMessage.warning(t("videoPlayer.currentIsTheLastItem"));
|
|
213
|
+
elementPlus.ElMessage.warning(useLocale.$t("videoPlayer.currentIsTheLastItem"));
|
|
219
214
|
}
|
|
220
215
|
} else if (isAnalyseType.value) {
|
|
221
216
|
if (!isCanPlay.value) return;
|
|
@@ -320,14 +315,12 @@ const useVideoPlayer = (hy) => {
|
|
|
320
315
|
const url = `${props.vlcProtocol}:${videoUrl.value}`;
|
|
321
316
|
window.protocolCheck(url, () => {
|
|
322
317
|
hasVLC.value = false;
|
|
323
|
-
elementPlus.ElMessage.error(t("videoPlayer.notInstallVlcTips"));
|
|
318
|
+
elementPlus.ElMessage.error(useLocale.$t("videoPlayer.notInstallVlcTips"));
|
|
324
319
|
});
|
|
325
320
|
}
|
|
326
321
|
function downloadVLC() {
|
|
327
322
|
if (!props.vlcAddress) {
|
|
328
|
-
elementPlus.ElMessage.warning(
|
|
329
|
-
t("videoPlayer.pleaseConfigureTheAddressForDownloadingVLC")
|
|
330
|
-
);
|
|
323
|
+
elementPlus.ElMessage.warning(useLocale.$t("videoPlayer.pleaseConfigureTheAddressForDownloadingVLC"));
|
|
331
324
|
return;
|
|
332
325
|
}
|
|
333
326
|
const newOpenWindow = window.open("about:blank");
|
|
@@ -335,16 +328,14 @@ const useVideoPlayer = (hy) => {
|
|
|
335
328
|
newOpenWindow.location = props.vlcAddress;
|
|
336
329
|
}
|
|
337
330
|
if (newOpenWindow) {
|
|
338
|
-
elementPlus.ElMessage.success(t("videoPlayer.operationSuccessful"));
|
|
331
|
+
elementPlus.ElMessage.success(useLocale.$t("videoPlayer.operationSuccessful"));
|
|
339
332
|
} else {
|
|
340
333
|
index.HyConfirmDialog.confirm({
|
|
341
334
|
title: "\u8DF3\u8F6C\u63D0\u793A",
|
|
342
|
-
content: `<div><p>${t(
|
|
343
|
-
"videoPlayer.theCurrentBrowserBlocksTheOpeningOfNewWindows"
|
|
344
|
-
)}</p><p>${t(
|
|
335
|
+
content: `<div><p>${t("videoPlayer.theCurrentBrowserBlocksTheOpeningOfNewWindows")}</p><p>${t(
|
|
345
336
|
"videoPlayer.pleaseGoToTheBrowserSettingsAndClickOnTheDownloadOrCopyLinkToOpenInTheBrowser"
|
|
346
337
|
)}</p></div>`,
|
|
347
|
-
submitText: t("videoPlayer.copyLink"),
|
|
338
|
+
submitText: useLocale.$t("videoPlayer.copyLink"),
|
|
348
339
|
onSubmit: async () => {
|
|
349
340
|
await handler.copyText(props.vlcAddress);
|
|
350
341
|
}
|