hy-dispatch-ui-v3 0.2.67 → 0.2.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tailwind.css +232 -20
- package/es/api/device.mjs +2 -3
- package/es/api/exportExcel.mjs +57 -0
- package/es/api/index.mjs +27 -16
- package/es/api/mapRail.mjs +31 -0
- package/es/api/organization.mjs +17 -9
- package/es/api/rule.mjs +30 -0
- package/es/api/sypct.mjs +2 -3
- package/es/api/task.mjs +2 -3
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +18 -19
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.mjs +511 -0
- package/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.mjs +178 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +316 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +119 -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/hyElectronicFence/style/electronicFenceAssociatedUsersDialog.scss +25 -0
- package/es/bussiness/hyMapAearchPlace/js/index.mjs +1 -1
- package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +4 -6
- package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/es/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.mjs +270 -0
- package/es/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.mjs +395 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +651 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +357 -0
- package/es/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.mjs +261 -0
- package/es/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.mjs +360 -0
- package/es/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.mjs +258 -0
- package/es/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/index.mjs +15 -0
- package/es/bussiness/hyRuleSetting/js/ruleSetting.mjs +65 -0
- package/es/bussiness/hyRuleSetting/ruleSetting.vue.mjs +129 -0
- package/es/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/es/bussiness/index.mjs +2 -0
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -13
- package/es/components/hyAudioPlayer/js/index.mjs +9 -14
- package/es/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/es/components/hyButton/button.vue.mjs +2 -2
- package/es/components/hyButton/style/button.scss +48 -74
- package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +119 -0
- package/es/components/hyCheckboxGroup/index.mjs +7 -0
- package/es/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/es/components/hyConfigProvider/configProvider.vue.mjs +51 -38
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +57 -62
- package/es/components/hyConfirmDialog/confirmMethod.mjs +24 -22
- package/es/components/hyCutter/cutter.vue.mjs +9 -23
- package/es/components/hyDatePicker/datePicker.vue.mjs +12 -17
- package/es/components/hyDialog/dialog.vue.mjs +5 -9
- package/es/components/hyDialog/style/dialog.scss +12 -13
- package/es/components/hyDrawer/drawer.vue.mjs +100 -0
- package/es/components/hyDrawer/index.mjs +7 -0
- package/es/components/hyDrawer/style/drawer.scss +0 -0
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +10 -28
- package/es/components/hyForm/cpns/arrayItem2.vue.mjs +198 -0
- package/es/components/hyForm/cpns/extraItem.vue.mjs +2 -3
- package/es/components/hyForm/cpns/formItem.vue.mjs +75 -37
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +58 -24
- package/es/components/hyForm/js/index.mjs +4 -8
- package/es/components/hyForm/js/useAppForm.mjs +5 -9
- package/es/components/hyForm/style/form.scss +4 -13
- package/es/components/hyIcon/icon.vue.mjs +3 -3
- package/es/components/hyIconBox/style/iconBox.scss +2 -6
- package/es/components/hyInput/inputSearch.vue.mjs +8 -11
- package/es/components/hyInput/style/inputSearch.scss +3 -0
- package/es/components/hyLoading/index.mjs +3 -5
- package/es/components/hyMap/js/index.mjs +29 -4
- package/es/components/hyMap/map.vue.mjs +17 -3
- package/es/components/hyMenu/style/menu.scss +5 -15
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +3 -4
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +3 -6
- package/es/components/hyOrgCascader/js/index.mjs +1 -5
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +25 -11
- package/es/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +48 -41
- package/es/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +33 -20
- package/es/components/hySearch/js/index.mjs +1 -4
- package/es/components/hySearch/js/useAppSearch.mjs +6 -10
- package/es/components/hySearch/search.vue.mjs +9 -16
- package/es/components/hySearch/style/search.scss +2 -0
- package/es/components/hyStatus/index.mjs +7 -0
- package/es/components/hyStatus/status.vue.mjs +110 -0
- package/es/components/hyStatus/style/status.scss +0 -0
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +24 -28
- package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +8 -9
- package/es/components/hyTable/cpns/headerItem.vue.mjs +2 -2
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +18 -28
- package/es/components/hyTable/js/index.mjs +56 -59
- package/es/components/hyTable/js/useAppTable.mjs +3 -4
- package/es/components/hyTable/style/table.scss +8 -0
- package/es/components/hyTable/table.vue.mjs +35 -41
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +4 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +3 -7
- package/es/components/hyTableForm/js/index.mjs +3 -11
- package/es/components/hyTableForm/js/useAppTableForm.mjs +2 -7
- package/es/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/es/components/hyTableForm/style/tableForm.scss +3 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +90 -46
- package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
- package/es/components/hyTree/js/index.mjs +13 -40
- package/es/components/hyTree/style/index.css +1 -1
- package/es/components/hyTree/tree.vue.mjs +17 -16
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +3 -6
- package/es/components/hyVideoPlayer/js/index.mjs +14 -23
- package/es/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +16 -26
- package/es/components/index.mjs +3 -0
- package/es/hooks/index.mjs +6 -2
- package/es/hooks/useAudioPlayerConfig.mjs +1 -3
- package/es/hooks/useBaseMainStore.mjs +29 -0
- package/es/hooks/useCurrentBus.mjs +20 -0
- package/es/hooks/useDialog.mjs +327 -0
- package/es/hooks/useExportFile.mjs +133 -0
- package/es/hooks/useGlobalConfig.mjs +10 -6
- package/es/hooks/useLocale.mjs +22 -12
- package/es/hooks/usePermissionMap.mjs +1 -3
- package/es/hooks/useResizeHandler.mjs +1 -4
- package/es/hooks/useResizeObserver.mjs +3 -1
- package/es/hooks/useSubscribe.mjs +2 -2
- package/es/hooks/useUserAvatarMap.mjs +1 -3
- package/es/hooks/useVideoPlayerConfig.mjs +1 -3
- package/es/index.mjs +11 -2
- package/es/locale/{en.mjs → en_US.mjs} +81 -5
- package/es/locale/index.mjs +2 -2
- package/es/locale/zh_CN.mjs +81 -3
- package/es/style/tailwind.scss +7 -3
- package/es/utils/adaptive.mjs +1 -3
- package/es/utils/form.mjs +19 -12
- package/es/utils/handler.mjs +4 -8
- package/es/utils/input.mjs +8 -9
- package/es/utils/map/hook/bigMap.mjs +14 -53
- package/es/utils/map/hook/gaode.mjs +5 -20
- package/es/utils/map/hook/leafletjs.mjs +23 -79
- package/es/utils/map/index.mjs +2 -8
- package/es/utils/map/js/webgis.mjs +12 -12
- package/es/version.mjs +1 -1
- package/lib/api/device.js +2 -3
- package/lib/api/exportExcel.js +62 -0
- package/lib/api/index.js +27 -16
- package/lib/api/mapRail.js +34 -0
- package/lib/api/organization.js +17 -8
- package/lib/api/rule.js +33 -0
- package/lib/api/sypct.js +2 -3
- package/lib/api/task.js +2 -3
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +17 -18
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +515 -0
- package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +182 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +320 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +123 -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/hyElectronicFence/style/electronicFenceAssociatedUsersDialog.scss +25 -0
- package/lib/bussiness/hyMapAearchPlace/js/index.js +1 -1
- package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +4 -6
- package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/lib/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.js +274 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.js +399 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +655 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +361 -0
- package/lib/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.js +265 -0
- package/lib/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.js +364 -0
- package/lib/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.js +262 -0
- package/lib/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/index.js +24 -0
- package/lib/bussiness/hyRuleSetting/js/ruleSetting.js +68 -0
- package/lib/bussiness/hyRuleSetting/ruleSetting.vue.js +133 -0
- package/lib/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/lib/bussiness/index.js +21 -10
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -13
- package/lib/components/hyAudioPlayer/js/index.js +9 -14
- package/lib/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/lib/components/hyButton/button.vue.js +2 -2
- package/lib/components/hyButton/style/button.scss +48 -74
- package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +123 -0
- package/lib/components/hyCheckboxGroup/index.js +12 -0
- package/lib/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/lib/components/hyConfigProvider/configProvider.vue.js +50 -56
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +56 -61
- package/lib/components/hyConfirmDialog/confirmMethod.js +23 -21
- package/lib/components/hyCutter/cutter.vue.js +8 -22
- package/lib/components/hyDatePicker/datePicker.vue.js +11 -16
- package/lib/components/hyDialog/dialog.vue.js +5 -9
- package/lib/components/hyDialog/style/dialog.scss +12 -13
- package/lib/components/hyDrawer/drawer.vue.js +104 -0
- package/lib/components/hyDrawer/index.js +12 -0
- package/lib/components/hyDrawer/style/drawer.scss +0 -0
- package/lib/components/hyForm/cpns/arrayItem.vue.js +9 -27
- package/lib/components/hyForm/cpns/arrayItem2.vue.js +202 -0
- package/lib/components/hyForm/cpns/extraItem.vue.js +2 -3
- package/lib/components/hyForm/cpns/formItem.vue.js +76 -38
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +53 -19
- package/lib/components/hyForm/js/index.js +3 -7
- package/lib/components/hyForm/js/useAppForm.js +5 -9
- package/lib/components/hyForm/style/form.scss +4 -13
- package/lib/components/hyIcon/icon.vue.js +3 -3
- package/lib/components/hyIconBox/style/iconBox.scss +2 -6
- package/lib/components/hyInput/inputSearch.vue.js +7 -10
- package/lib/components/hyInput/style/inputSearch.scss +3 -0
- package/lib/components/hyLoading/index.js +2 -4
- package/lib/components/hyMap/js/index.js +29 -4
- package/lib/components/hyMap/map.vue.js +17 -3
- package/lib/components/hyMenu/style/menu.scss +5 -15
- package/lib/components/hyNoPermissions/noPermissions.vue.js +3 -4
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +3 -6
- package/lib/components/hyOrgCascader/js/index.js +1 -5
- package/lib/components/hyOrgCascader/orgCascader.vue.js +23 -9
- package/lib/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +47 -40
- package/lib/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +33 -20
- package/lib/components/hySearch/js/index.js +1 -4
- package/lib/components/hySearch/js/useAppSearch.js +6 -10
- package/lib/components/hySearch/search.vue.js +9 -16
- package/lib/components/hySearch/style/search.scss +2 -0
- package/lib/components/hyStatus/index.js +12 -0
- package/lib/components/hyStatus/status.vue.js +114 -0
- package/lib/components/hyStatus/style/status.scss +0 -0
- package/lib/components/hyTable/cpns/columnSelect.vue.js +22 -26
- package/lib/components/hyTable/cpns/columnSelectItem.vue.js +7 -8
- package/lib/components/hyTable/cpns/headerItem.vue.js +2 -2
- package/lib/components/hyTable/cpns/virtualTable.vue.js +17 -27
- package/lib/components/hyTable/js/index.js +54 -57
- package/lib/components/hyTable/js/useAppTable.js +2 -3
- package/lib/components/hyTable/style/table.scss +8 -0
- package/lib/components/hyTable/table.vue.js +35 -41
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +4 -4
- package/lib/components/hyTableForm/batchTableForm.vue.js +3 -7
- package/lib/components/hyTableForm/js/index.js +3 -11
- package/lib/components/hyTableForm/js/useAppTableForm.js +2 -7
- package/lib/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/lib/components/hyTableForm/style/tableForm.scss +3 -2
- package/lib/components/hyTableForm/tableForm.vue.js +89 -45
- package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
- package/lib/components/hyTree/js/index.js +13 -40
- package/lib/components/hyTree/style/index.css +1 -1
- package/lib/components/hyTree/tree.vue.js +17 -16
- package/lib/components/hyUserAvatar/userAvatar.vue.js +3 -6
- package/lib/components/hyVideoPlayer/js/index.js +14 -23
- package/lib/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +16 -26
- package/lib/components/index.js +46 -40
- package/lib/hooks/index.js +17 -0
- package/lib/hooks/useAudioPlayerConfig.js +1 -3
- package/lib/hooks/useBaseMainStore.js +32 -0
- package/lib/hooks/useCurrentBus.js +23 -0
- package/lib/hooks/useDialog.js +331 -0
- package/lib/hooks/useExportFile.js +135 -0
- package/lib/hooks/useGlobalConfig.js +10 -6
- package/lib/hooks/useLocale.js +25 -11
- package/lib/hooks/usePermissionMap.js +1 -3
- package/lib/hooks/useResizeHandler.js +1 -4
- package/lib/hooks/useResizeObserver.js +3 -1
- package/lib/hooks/useSubscribe.js +2 -1
- package/lib/hooks/useUserAvatarMap.js +1 -3
- package/lib/hooks/useVideoPlayerConfig.js +1 -3
- package/lib/index.js +107 -73
- package/lib/locale/{en.js → en_US.js} +81 -5
- package/lib/locale/index.js +3 -3
- package/lib/locale/zh_CN.js +81 -3
- package/lib/style/tailwind.scss +7 -3
- package/lib/utils/adaptive.js +1 -3
- package/lib/utils/form.js +17 -10
- package/lib/utils/handler.js +3 -7
- package/lib/utils/input.js +7 -8
- package/lib/utils/map/hook/bigMap.js +14 -53
- package/lib/utils/map/hook/gaode.js +5 -20
- package/lib/utils/map/hook/leafletjs.js +23 -79
- package/lib/utils/map/index.js +2 -8
- package/lib/utils/map/js/webgis.js +12 -12
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
height: 340px;
|
|
8
8
|
position: relative;
|
|
9
9
|
border-radius: 8px;
|
|
10
|
-
border: 1px dashed rgba(var(--hy-auxiliary));
|
|
11
10
|
box-sizing: border-box;
|
|
12
11
|
&:hover {
|
|
13
12
|
border-color: rgba(var(--hy-theme));
|
|
@@ -29,34 +28,22 @@
|
|
|
29
28
|
height: 200%;
|
|
30
29
|
/* 绘制网格线:使用青色,透明度调低,让它融合在 #14273a 背景里 */
|
|
31
30
|
background-image:
|
|
32
|
-
/* 纵向线 */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
),
|
|
37
|
-
/* 横向线 */
|
|
38
|
-
linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px);
|
|
39
|
-
|
|
31
|
+
/* 纵向线 */
|
|
32
|
+
linear-gradient(90deg, rgba(0, 229, 255, 0.1) 1px, transparent 1px),
|
|
33
|
+
/* 横向线 */ linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px);
|
|
34
|
+
|
|
40
35
|
/* 网格尺寸 40px */
|
|
41
36
|
background-size: 40px 40px;
|
|
42
|
-
|
|
37
|
+
|
|
43
38
|
/* 3D 倒伏效果 */
|
|
44
39
|
transform: rotateX(60deg);
|
|
45
|
-
|
|
40
|
+
|
|
46
41
|
/* 动效:无限流动 */
|
|
47
42
|
animation: grid-flow 20s linear infinite;
|
|
48
|
-
|
|
43
|
+
|
|
49
44
|
/* 遮罩:四周渐隐,让网格不那么生硬 */
|
|
50
|
-
mask-image: radial-gradient(
|
|
51
|
-
|
|
52
|
-
black 10%,
|
|
53
|
-
transparent 80%
|
|
54
|
-
);
|
|
55
|
-
-webkit-mask-image: radial-gradient(
|
|
56
|
-
circle at 50% 50%,
|
|
57
|
-
black 10%,
|
|
58
|
-
transparent 80%
|
|
59
|
-
);
|
|
45
|
+
mask-image: radial-gradient(circle at 50% 50%, black 10%, transparent 80%);
|
|
46
|
+
-webkit-mask-image: radial-gradient(circle at 50% 50%, black 10%, transparent 80%);
|
|
60
47
|
}
|
|
61
48
|
&::after {
|
|
62
49
|
display: block;
|
|
@@ -66,14 +53,10 @@
|
|
|
66
53
|
left: 0;
|
|
67
54
|
width: 100%;
|
|
68
55
|
height: 100%;
|
|
69
|
-
background: radial-gradient(
|
|
70
|
-
circle at 50% 50%,
|
|
71
|
-
rgba(0, 229, 255, 0.05) 0%,
|
|
72
|
-
transparent 70%
|
|
73
|
-
);
|
|
56
|
+
background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 70%);
|
|
74
57
|
}
|
|
75
58
|
}
|
|
76
|
-
|
|
59
|
+
|
|
77
60
|
.hy-el-upload {
|
|
78
61
|
width: 100%;
|
|
79
62
|
height: 100%;
|
|
@@ -84,17 +67,21 @@
|
|
|
84
67
|
flex-direction: column;
|
|
85
68
|
align-items: center;
|
|
86
69
|
justify-content: center;
|
|
87
|
-
border:
|
|
70
|
+
border: 1px dashed rgba(var(--hy-auxiliary));
|
|
88
71
|
&:hover {
|
|
89
|
-
border-color: var(--theme);
|
|
90
72
|
.type-icon-box {
|
|
91
73
|
transform: translateY(-10px);
|
|
92
74
|
}
|
|
93
75
|
}
|
|
76
|
+
&.is-dragover {
|
|
77
|
+
border: 1px solid rgba(var(--hy-theme)) !important;
|
|
78
|
+
box-shadow: 0px 0px 6px 0px rgba(var(--hy-theme));
|
|
79
|
+
background-color: var(--hy-el-fill-color-blank) !important;
|
|
80
|
+
}
|
|
94
81
|
}
|
|
95
82
|
}
|
|
96
83
|
}
|
|
97
|
-
|
|
84
|
+
|
|
98
85
|
.hy-batch-table-form-step-box {
|
|
99
86
|
width: 100%;
|
|
100
87
|
height: 260px;
|
|
@@ -103,6 +90,7 @@
|
|
|
103
90
|
padding-top: 24px;
|
|
104
91
|
border-radius: 8px;
|
|
105
92
|
background-color: rgba(var(--hy-background-2), 0.5);
|
|
93
|
+
box-sizing: border-box;
|
|
106
94
|
.hy-el-step {
|
|
107
95
|
.hy-el-step__description {
|
|
108
96
|
padding-left: 0px !important;
|
|
@@ -122,6 +110,7 @@
|
|
|
122
110
|
border: 1px dashed rgba(var(--hy-auxiliary), 0.5);
|
|
123
111
|
border-radius: 4px;
|
|
124
112
|
background: rgba(var(--hy-background-2), 0.5);
|
|
113
|
+
box-sizing: border-box;
|
|
125
114
|
}
|
|
126
115
|
|
|
127
116
|
.hy-batch-table-form-upload-bg {
|
|
@@ -141,13 +130,9 @@
|
|
|
141
130
|
height: 200%;
|
|
142
131
|
/* 绘制网格线:使用青色,透明度调低,让它融合在 #14273a 背景里 */
|
|
143
132
|
background-image:
|
|
144
|
-
/* 纵向线 */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
transparent 1px
|
|
148
|
-
),
|
|
149
|
-
/* 横向线 */
|
|
150
|
-
linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px);
|
|
133
|
+
/* 纵向线 */
|
|
134
|
+
linear-gradient(90deg, rgba(0, 229, 255, 0.1) 1px, transparent 1px),
|
|
135
|
+
/* 横向线 */ linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px);
|
|
151
136
|
|
|
152
137
|
/* 网格尺寸 40px */
|
|
153
138
|
background-size: 40px 40px;
|
|
@@ -159,16 +144,8 @@
|
|
|
159
144
|
animation: grid-flow 20s linear infinite;
|
|
160
145
|
|
|
161
146
|
/* 遮罩:四周渐隐,让网格不那么生硬 */
|
|
162
|
-
mask-image: radial-gradient(
|
|
163
|
-
|
|
164
|
-
black 10%,
|
|
165
|
-
transparent 80%
|
|
166
|
-
);
|
|
167
|
-
-webkit-mask-image: radial-gradient(
|
|
168
|
-
circle at 50% 50%,
|
|
169
|
-
black 10%,
|
|
170
|
-
transparent 80%
|
|
171
|
-
);
|
|
147
|
+
mask-image: radial-gradient(circle at 50% 50%, black 10%, transparent 80%);
|
|
148
|
+
-webkit-mask-image: radial-gradient(circle at 50% 50%, black 10%, transparent 80%);
|
|
172
149
|
}
|
|
173
150
|
&::after {
|
|
174
151
|
display: block;
|
|
@@ -178,12 +155,7 @@
|
|
|
178
155
|
left: 0;
|
|
179
156
|
width: 100%;
|
|
180
157
|
height: 100%;
|
|
181
|
-
background: radial-gradient(
|
|
182
|
-
circle at 50% 50%,
|
|
183
|
-
rgba(0, 229, 255, 0.05) 0%,
|
|
184
|
-
transparent 70%
|
|
185
|
-
);
|
|
158
|
+
background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 70%);
|
|
186
159
|
}
|
|
187
160
|
}
|
|
188
161
|
}
|
|
189
|
-
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
border-radius: 4px;
|
|
20
20
|
padding: 2px;
|
|
21
21
|
font-size: 0.75rem;
|
|
22
|
+
box-sizing: border-box;
|
|
22
23
|
.hy-table-form-tab-button {
|
|
23
24
|
display: flex;
|
|
24
25
|
align-items: center;
|
|
@@ -28,15 +29,15 @@
|
|
|
28
29
|
border-radius: 2px;
|
|
29
30
|
cursor: pointer;
|
|
30
31
|
transition: all 0.3s linear;
|
|
32
|
+
box-sizing: border-box;
|
|
31
33
|
&:hover {
|
|
32
34
|
color: rgba(var(--hy-main));
|
|
33
35
|
}
|
|
34
36
|
&.is-select {
|
|
35
37
|
color: rgba(var(--hy-main));
|
|
36
|
-
background: linear-gradient(180deg, rgba(var(--hy-theme)) 0%, #
|
|
38
|
+
background: linear-gradient(180deg, rgba(var(--hy-theme)) 0%, #2a4968 100%);
|
|
37
39
|
border-image: linear-gradient(180deg, rgba(var(--hy-theme)) 80%, rgba(var(--hy-auxiliary))) 1 1;
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, computed, nextTick, onMounted, watch, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createBlock, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createVNode, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, withDirectives, vShow } from 'vue';
|
|
1
|
+
import { defineComponent, useTemplateRef, ref, computed, nextTick, provide, onMounted, watch, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createBlock, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createVNode, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, withDirectives, vShow } from 'vue';
|
|
2
2
|
import '../index.mjs';
|
|
3
3
|
import '../../utils/index.mjs';
|
|
4
|
+
import '../../hooks/index.mjs';
|
|
4
5
|
import { doValidate } from './js/index.mjs';
|
|
5
6
|
import { useAppTable } from '../hyTable/js/useAppTable.mjs';
|
|
7
|
+
import { useResizeObserver } from '../../hooks/useResizeObserver.mjs';
|
|
6
8
|
import { resetAppFormValue } from '../hyForm/js/useAppForm.mjs';
|
|
7
9
|
import { isArray, isObject } from '../../utils/is.mjs';
|
|
8
10
|
import { cloneDeep } from '../../utils/handler.mjs';
|
|
@@ -72,6 +74,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
72
74
|
const props = __props;
|
|
73
75
|
const emits = __emit;
|
|
74
76
|
const tableRef = useTemplateRef("tableRef");
|
|
77
|
+
const formContainerRef = useTemplateRef("formContainerRef");
|
|
75
78
|
const formRef = useTemplateRef("formRef");
|
|
76
79
|
const dataSource = ref([]);
|
|
77
80
|
const tabList = ref([
|
|
@@ -97,7 +100,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
97
100
|
}
|
|
98
101
|
]
|
|
99
102
|
});
|
|
100
|
-
const isExpandValidate = ref(false);
|
|
101
103
|
const statistics = ref({
|
|
102
104
|
success: 0,
|
|
103
105
|
failed: 0,
|
|
@@ -115,7 +117,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
115
117
|
tableRef.value.setData(dataSource2);
|
|
116
118
|
}
|
|
117
119
|
function rowClassName({ row, rowIndex }) {
|
|
118
|
-
if (row.errorMsg) {
|
|
120
|
+
if (row.errorMsg && row.errorMsg.message) {
|
|
119
121
|
return "hy-el-table-v2__row-error";
|
|
120
122
|
}
|
|
121
123
|
}
|
|
@@ -126,21 +128,40 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
126
128
|
setData(dataSource.value);
|
|
127
129
|
} else {
|
|
128
130
|
const data = dataSource.value.filter((data2) => {
|
|
129
|
-
return
|
|
131
|
+
return data2.errorMsg && data2.errorMsg.message;
|
|
130
132
|
});
|
|
131
133
|
setData(data);
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
|
-
|
|
136
|
+
let formClientHeight, removeResize, tableScrollTop, expanding;
|
|
137
|
+
async function onExpandRowChange2(row, isExpanded) {
|
|
135
138
|
if (props.onExpandRowChange) {
|
|
136
139
|
props.onExpandRowChange(row);
|
|
137
140
|
}
|
|
138
141
|
await nextTick();
|
|
139
|
-
if (!formRef.value)
|
|
142
|
+
if (!formRef.value || !isExpanded) {
|
|
143
|
+
removeResize && removeResize();
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const instance = useResizeObserver(formContainerRef.value, async () => {
|
|
147
|
+
if (!formContainerRef.value) return;
|
|
148
|
+
const [key] = tableRef.value.getRowExpansion();
|
|
149
|
+
if (formClientHeight === formContainerRef.value.clientHeight) return;
|
|
150
|
+
if (!key) return;
|
|
151
|
+
removeResize && removeResize();
|
|
152
|
+
expanding = true;
|
|
153
|
+
tableRef.value.toggleRowExpansion(key, false);
|
|
154
|
+
await nextTick();
|
|
155
|
+
tableRef.value.toggleRowExpansion(key, true);
|
|
156
|
+
await new Promise((resolve) => setTimeout(resolve, 1));
|
|
157
|
+
tableRef.value.scrollToTop(tableScrollTop);
|
|
158
|
+
expanding = false;
|
|
159
|
+
});
|
|
160
|
+
formClientHeight = formContainerRef.value.clientHeight;
|
|
161
|
+
removeResize = instance.removeResize;
|
|
140
162
|
const valid = await initValidateHandler([row]);
|
|
141
163
|
if (valid) return;
|
|
142
|
-
|
|
143
|
-
isExpandValidate.value = true;
|
|
164
|
+
triggerValidate();
|
|
144
165
|
}
|
|
145
166
|
function onDeleteRowHandler(params) {
|
|
146
167
|
const { $index } = params;
|
|
@@ -164,6 +185,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
164
185
|
...statistics.value
|
|
165
186
|
});
|
|
166
187
|
}
|
|
188
|
+
function onScrollHandler(params) {
|
|
189
|
+
if (expanding) return;
|
|
190
|
+
tableScrollTop = params.scrollTop;
|
|
191
|
+
}
|
|
192
|
+
const validateTriggerId = ref(0);
|
|
193
|
+
function triggerValidate() {
|
|
194
|
+
validateTriggerId.value++;
|
|
195
|
+
}
|
|
167
196
|
async function initValidateHandler(dataSource2) {
|
|
168
197
|
let promiseList = [];
|
|
169
198
|
for (const data of dataSource2) {
|
|
@@ -186,9 +215,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
186
215
|
prop: item.field,
|
|
187
216
|
message: item.message || `${item.field} is required`
|
|
188
217
|
};
|
|
189
|
-
if (!data.errorMsg) {
|
|
218
|
+
if (data && !data.errorMsg) {
|
|
190
219
|
data.errorMsg = errData;
|
|
191
|
-
} else if (!data.errorMsg.prop && !data.errorMsg.message) {
|
|
220
|
+
} else if (data && !data.errorMsg.prop && !data.errorMsg.message) {
|
|
192
221
|
data.errorMsg.prop = errData.errorMsg.prop;
|
|
193
222
|
data.errorMsg.message = errData.errorMsg.message;
|
|
194
223
|
}
|
|
@@ -238,6 +267,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
238
267
|
row.errorMsg.message = errMsg.message;
|
|
239
268
|
}
|
|
240
269
|
}
|
|
270
|
+
await nextTick();
|
|
241
271
|
const { onlyId, errorMsg, errorMap, children, ...data } = row;
|
|
242
272
|
emits("validate", {
|
|
243
273
|
row: data,
|
|
@@ -247,6 +277,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
247
277
|
...statistics.value
|
|
248
278
|
});
|
|
249
279
|
}
|
|
280
|
+
provide("validateTriggerId", validateTriggerId);
|
|
250
281
|
onMounted(() => {
|
|
251
282
|
watch(
|
|
252
283
|
() => dataSource.value,
|
|
@@ -254,10 +285,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
254
285
|
emits("tableDataChange", dataSource.value);
|
|
255
286
|
const { success, failed } = dataSource.value.reduce(
|
|
256
287
|
({ success: success2, failed: failed2 }, data) => {
|
|
257
|
-
if (
|
|
258
|
-
success2++;
|
|
259
|
-
} else {
|
|
288
|
+
if (data.errorMsg && data.errorMsg.message) {
|
|
260
289
|
failed2++;
|
|
290
|
+
} else {
|
|
291
|
+
success2++;
|
|
261
292
|
}
|
|
262
293
|
return { success: success2, failed: failed2 };
|
|
263
294
|
},
|
|
@@ -290,7 +321,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
290
321
|
if (item.onlyId) set.add(item.onlyId);
|
|
291
322
|
return set;
|
|
292
323
|
}, /* @__PURE__ */ new Set());
|
|
293
|
-
console.log("keySet", Array.from(keySet.values()));
|
|
294
324
|
if (!keySet.size) return;
|
|
295
325
|
for (let i = 0; i < dataSource.value.length; i++) {
|
|
296
326
|
const target = dataSource.value[i];
|
|
@@ -435,19 +465,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
435
465
|
showOperate: false,
|
|
436
466
|
showPagination: false,
|
|
437
467
|
expandMode: "accordion",
|
|
438
|
-
onExpandChange:
|
|
468
|
+
onExpandChange: onExpandRowChange2,
|
|
469
|
+
onScroll: onScrollHandler
|
|
439
470
|
}), createSlots({
|
|
440
471
|
validateStatus: withCtx(({ row }) => [
|
|
441
472
|
createElementVNode(
|
|
442
473
|
"div",
|
|
443
474
|
{
|
|
444
|
-
class: normalizeClass(["flex items-center gap-1.5", [row.errorMsg ? "text-danger-2" : "text-success"]])
|
|
475
|
+
class: normalizeClass(["flex items-center gap-1.5", [row.errorMsg && row.errorMsg.message ? "text-danger-2" : "text-success"]])
|
|
445
476
|
},
|
|
446
477
|
[
|
|
447
478
|
createElementVNode(
|
|
448
479
|
"div",
|
|
449
480
|
{
|
|
450
|
-
class: normalizeClass(["w-1.5 h-1.5 rounded-full", [row.errorMsg ? "bg-danger-2" : "bg-success"]])
|
|
481
|
+
class: normalizeClass(["w-1.5 h-1.5 rounded-full", [row.errorMsg && row.errorMsg.message ? "bg-danger-2" : "bg-success"]])
|
|
451
482
|
},
|
|
452
483
|
null,
|
|
453
484
|
2
|
|
@@ -456,7 +487,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
456
487
|
createElementVNode(
|
|
457
488
|
"div",
|
|
458
489
|
{ class: "text-sm" },
|
|
459
|
-
toDisplayString(
|
|
490
|
+
toDisplayString(row.errorMsg && row.errorMsg.message ? row.errorMsg.prop ? "\u5185\u5BB9\u6709\u8BEF" : "\u6821\u9A8C\u5931\u8D25" : "\u51C6\u5907\u5C31\u7EEA"),
|
|
460
491
|
1
|
|
461
492
|
/* TEXT */
|
|
462
493
|
)
|
|
@@ -484,7 +515,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
484
515
|
withDirectives(createElementVNode(
|
|
485
516
|
"div",
|
|
486
517
|
{
|
|
487
|
-
class: normalizeClass(["flex items-center gap-1.5 text-danger-2 transition-all duration-300 overflow-hidden", [row.errorMsg ? "h-full" : "h-0"]])
|
|
518
|
+
class: normalizeClass(["flex items-center gap-1.5 text-danger-2 transition-all duration-300 overflow-hidden", [row.errorMsg && row.errorMsg.message ? "h-full" : "h-0"]])
|
|
488
519
|
},
|
|
489
520
|
[
|
|
490
521
|
createVNode(unref(HyIcon), {
|
|
@@ -494,7 +525,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
494
525
|
createElementVNode(
|
|
495
526
|
"span",
|
|
496
527
|
null,
|
|
497
|
-
toDisplayString(row.errorMsg ? row.errorMsg.message : ""),
|
|
528
|
+
toDisplayString(row.errorMsg && row.errorMsg.message ? row.errorMsg.message : ""),
|
|
498
529
|
1
|
|
499
530
|
/* TEXT */
|
|
500
531
|
)
|
|
@@ -502,34 +533,47 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
502
533
|
2
|
|
503
534
|
/* CLASS */
|
|
504
535
|
), [
|
|
505
|
-
[vShow, row.errorMsg.message]
|
|
536
|
+
[vShow, row.errorMsg && row.errorMsg.message]
|
|
506
537
|
])
|
|
507
538
|
]),
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
539
|
+
createElementVNode(
|
|
540
|
+
"div",
|
|
541
|
+
{
|
|
542
|
+
ref_key: "formContainerRef",
|
|
543
|
+
ref: formContainerRef,
|
|
544
|
+
class: "w-full"
|
|
545
|
+
},
|
|
546
|
+
[
|
|
547
|
+
createVNode(unref(HyForm), {
|
|
548
|
+
ref_key: "formRef",
|
|
549
|
+
ref: formRef,
|
|
550
|
+
model: row,
|
|
551
|
+
columns: __props.formColumns,
|
|
552
|
+
rules: __props.rules,
|
|
553
|
+
"show-message": false,
|
|
554
|
+
class: "px-0",
|
|
555
|
+
columnNum: __props.columnNum,
|
|
556
|
+
size: __props.size,
|
|
557
|
+
business: "tableForm",
|
|
558
|
+
onValidate: (prop, isValid, message) => onValidateHandler(row, { prop, isValid, message }),
|
|
559
|
+
onOptionsStatus: _ctx.$attrs.onOptionsStatus
|
|
560
|
+
}, createSlots({
|
|
561
|
+
_: 2
|
|
562
|
+
/* DYNAMIC */
|
|
563
|
+
}, [
|
|
564
|
+
renderList(_ctx.$slots, (_, slotName) => {
|
|
565
|
+
return {
|
|
566
|
+
name: slotName,
|
|
567
|
+
fn: withCtx((scope) => [
|
|
568
|
+
renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps(scope)))
|
|
569
|
+
])
|
|
570
|
+
};
|
|
571
|
+
})
|
|
572
|
+
]), 1032, ["model", "columns", "rules", "columnNum", "size", "onValidate", "onOptionsStatus"])
|
|
573
|
+
],
|
|
574
|
+
512
|
|
575
|
+
/* NEED_PATCH */
|
|
576
|
+
)
|
|
533
577
|
])
|
|
534
578
|
]),
|
|
535
579
|
key: "0"
|
|
@@ -3,7 +3,7 @@ import dayjs from 'dayjs';
|
|
|
3
3
|
import { ElTimePicker } from 'element-plus';
|
|
4
4
|
import '../../utils/index.mjs';
|
|
5
5
|
import '../../hooks/index.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
7
7
|
import { isArray } from '../../utils/is.mjs';
|
|
8
8
|
|
|
9
9
|
import "./style/timePicker.scss";
|
|
@@ -41,7 +41,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
41
41
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42
42
|
const props = __props;
|
|
43
43
|
const emits = __emit;
|
|
44
|
-
const { t } = useLocale();
|
|
45
44
|
const appTimePicker = useTemplateRef("appTimePicker");
|
|
46
45
|
const timeValue = useModel(__props, "modelValue");
|
|
47
46
|
const startValue = useModel(__props, "start");
|
|
@@ -50,13 +49,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
50
49
|
if (props.startPlaceholder) {
|
|
51
50
|
return props.startPlaceholder;
|
|
52
51
|
}
|
|
53
|
-
return t("timePicker.startTime");
|
|
52
|
+
return $t("timePicker.startTime");
|
|
54
53
|
});
|
|
55
54
|
const endPlaceholder = computed(() => {
|
|
56
55
|
if (props.endPlaceholder) {
|
|
57
56
|
return props.endPlaceholder;
|
|
58
57
|
}
|
|
59
|
-
return t("timePicker.endTime");
|
|
58
|
+
return $t("timePicker.endTime");
|
|
60
59
|
});
|
|
61
60
|
const disabledSecondsHandler = computed(() => {
|
|
62
61
|
return (hour, minute, role, comparingDate) => {
|
|
@@ -145,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
145
144
|
valueFormat: timeFormHandler(__props.valueFormat),
|
|
146
145
|
disabledSeconds: disabledSecondsHandler.value,
|
|
147
146
|
"start-placeholder": startPlaceholder.value,
|
|
148
|
-
"range-separator": unref(t)("timePicker.to"),
|
|
147
|
+
"range-separator": unref($t)("timePicker.to"),
|
|
149
148
|
"end-placeholder": endPlaceholder.value,
|
|
150
149
|
onChange: onChangeHandler
|
|
151
150
|
}), createSlots({
|
|
@@ -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);
|
|
@@ -44,9 +42,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
44
42
|
return data[props.treeProps?.value];
|
|
45
43
|
}
|
|
46
44
|
function deleteNoTreeSelData(item) {
|
|
47
|
-
const index = hy.noTreeSelData.value.findIndex(
|
|
48
|
-
(v) => hy.getSelectedDataKey(v) === hy.getSelectedDataKey(item)
|
|
49
|
-
);
|
|
45
|
+
const index = hy.noTreeSelData.value.findIndex((v) => hy.getSelectedDataKey(v) === hy.getSelectedDataKey(item));
|
|
50
46
|
if (index !== -1) {
|
|
51
47
|
hy.noTreeSelData.value.splice(index, 1);
|
|
52
48
|
}
|
|
@@ -65,9 +61,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
65
61
|
treeMap.set(key, true);
|
|
66
62
|
}
|
|
67
63
|
});
|
|
68
|
-
hy.noTreeSelData.value = dataList.filter(
|
|
69
|
-
(item) => !treeMap.get(hy.getSelectedDataKey(item))
|
|
70
|
-
);
|
|
64
|
+
hy.noTreeSelData.value = dataList.filter((item) => !treeMap.get(hy.getSelectedDataKey(item)));
|
|
71
65
|
}
|
|
72
66
|
function mergeNoTreeSelData(dataList) {
|
|
73
67
|
return [...hy.noTreeSelData.value, ...dataList];
|
|
@@ -93,11 +87,11 @@ const useAppTreeWrapper = (hy) => {
|
|
|
93
87
|
// 数据
|
|
94
88
|
data: dataList,
|
|
95
89
|
// 每一项的高度
|
|
96
|
-
itemHeight: 30,
|
|
90
|
+
// itemHeight: 30, // 使用全局配置
|
|
97
91
|
// 可视区域外的缓冲项数量
|
|
98
|
-
bufferSize: 10,
|
|
92
|
+
// bufferSize: 10, // 使用全局配置
|
|
99
93
|
// 相邻级节点间的水平缩进,单位为像素
|
|
100
|
-
indent: 16,
|
|
94
|
+
// indent: 16, // 使用全局配置
|
|
101
95
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
102
96
|
// 树形业务类型
|
|
103
97
|
business: props.treeType,
|
|
@@ -179,13 +173,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
179
173
|
}
|
|
180
174
|
emits(
|
|
181
175
|
"on-check-tree",
|
|
182
|
-
JSON.parse(
|
|
183
|
-
JSON.stringify(
|
|
184
|
-
hy.mergeNoTreeSelData(
|
|
185
|
-
info.checkedBusinessNodes || info.checkedNodes
|
|
186
|
-
)
|
|
187
|
-
)
|
|
188
|
-
),
|
|
176
|
+
JSON.parse(JSON.stringify(hy.mergeNoTreeSelData(info.checkedBusinessNodes || info.checkedNodes))),
|
|
189
177
|
{
|
|
190
178
|
data,
|
|
191
179
|
info,
|
|
@@ -262,9 +250,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
262
250
|
}
|
|
263
251
|
]);
|
|
264
252
|
} else {
|
|
265
|
-
const channelList = data.videoChannelList?.filter(
|
|
266
|
-
(v) => v.onlineState === 1
|
|
267
|
-
);
|
|
253
|
+
const channelList = data.videoChannelList?.filter((v) => v.onlineState === 1);
|
|
268
254
|
if (channelList && channelList.length) {
|
|
269
255
|
emits(
|
|
270
256
|
"on-dblclick",
|
|
@@ -473,12 +459,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
473
459
|
} else if (props.treeType) {
|
|
474
460
|
hy.virtualTree.setChecked(row.id, false, true, isForce);
|
|
475
461
|
} else if (!props.treeType && props.treeProps) {
|
|
476
|
-
hy.virtualTree.setChecked(
|
|
477
|
-
row[`${props.treeProps.value}`],
|
|
478
|
-
false,
|
|
479
|
-
true,
|
|
480
|
-
isForce
|
|
481
|
-
);
|
|
462
|
+
hy.virtualTree.setChecked(row[`${props.treeProps.value}`], false, true, isForce);
|
|
482
463
|
}
|
|
483
464
|
hy.deleteNoTreeSelData(row);
|
|
484
465
|
}
|
|
@@ -543,19 +524,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
543
524
|
}
|
|
544
525
|
function getSelectedDataList(leafOnly = false) {
|
|
545
526
|
if (props.treeType) {
|
|
546
|
-
return hy.mergeNoTreeSelData(
|
|
547
|
-
hy.virtualTree?.getCheckedBusinessNodes(leafOnly) || []
|
|
548
|
-
);
|
|
527
|
+
return hy.mergeNoTreeSelData(hy.virtualTree?.getCheckedBusinessNodes(leafOnly) || []);
|
|
549
528
|
}
|
|
550
|
-
return hy.mergeNoTreeSelData(
|
|
551
|
-
hy.virtualTree?.getCheckedNodes(leafOnly) || []
|
|
552
|
-
);
|
|
529
|
+
return hy.mergeNoTreeSelData(hy.virtualTree?.getCheckedNodes(leafOnly) || []);
|
|
553
530
|
}
|
|
554
531
|
function setFilterListType(type) {
|
|
555
532
|
if (props.selectFilterList?.length) {
|
|
556
|
-
hy.selectFilterList.value = JSON.parse(
|
|
557
|
-
JSON.stringify(props.selectFilterList)
|
|
558
|
-
);
|
|
533
|
+
hy.selectFilterList.value = JSON.parse(JSON.stringify(props.selectFilterList));
|
|
559
534
|
return;
|
|
560
535
|
}
|
|
561
536
|
if (props.treeType === "device") {
|
|
@@ -597,9 +572,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
597
572
|
}
|
|
598
573
|
}
|
|
599
574
|
const getInputPlaceholder = computed(() => {
|
|
600
|
-
const item = hy.selectFilterList.value.find(
|
|
601
|
-
(v) => v.value === hy.selectFilterType.value
|
|
602
|
-
);
|
|
575
|
+
const item = hy.selectFilterList.value.find((v) => v.value === hy.selectFilterType.value);
|
|
603
576
|
if (item && item.placeholder) {
|
|
604
577
|
return item.placeholder;
|
|
605
578
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url('hy-virtual-tree/style');
|
|
1
|
+
@import url('hy-virtual-tree/style');
|