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