@uni-sw/u-design 2.0.4
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/README.md +86 -0
- package/es/components/UAffix/index.d.ts +55 -0
- package/es/components/UAffix/index.js +272 -0
- package/es/components/UAffix/style/index.d.ts +2 -0
- package/es/components/UAffix/style/index.js +2 -0
- package/es/components/UAffix/style/index.less +6 -0
- package/es/components/UAffix/utils.d.ts +15 -0
- package/es/components/UAffix/utils.js +78 -0
- package/es/components/UAlert/ErrorBoundary.d.ts +23 -0
- package/es/components/UAlert/ErrorBoundary.js +62 -0
- package/es/components/UAlert/index.d.ts +39 -0
- package/es/components/UAlert/index.js +169 -0
- package/es/components/UAlert/style/index.d.ts +2 -0
- package/es/components/UAlert/style/index.js +2 -0
- package/es/components/UAlert/style/index.less +155 -0
- package/es/components/UAlert/style/rtl.less +40 -0
- package/es/components/UAnchor/Anchor.d.ts +44 -0
- package/es/components/UAnchor/Anchor.js +232 -0
- package/es/components/UAnchor/AnchorLink.d.ts +11 -0
- package/es/components/UAnchor/AnchorLink.js +54 -0
- package/es/components/UAnchor/context.d.ts +4 -0
- package/es/components/UAnchor/context.js +3 -0
- package/es/components/UAnchor/index.d.ts +11 -0
- package/es/components/UAnchor/index.js +6 -0
- package/es/components/UAnchor/style/index.d.ts +3 -0
- package/es/components/UAnchor/style/index.js +4 -0
- package/es/components/UAnchor/style/index.less +86 -0
- package/es/components/UAnchor/style/rtl.less +35 -0
- package/es/components/UAutoComplete/index.d.ts +36 -0
- package/es/components/UAutoComplete/index.js +96 -0
- package/es/components/UAutoComplete/style/index.d.ts +3 -0
- package/es/components/UAutoComplete/style/index.js +4 -0
- package/es/components/UAutoComplete/style/index.less +16 -0
- package/es/components/UAvatar/SizeContext.d.ts +10 -0
- package/es/components/UAvatar/SizeContext.js +12 -0
- package/es/components/UAvatar/avatar.d.ts +25 -0
- package/es/components/UAvatar/avatar.js +171 -0
- package/es/components/UAvatar/group.d.ts +15 -0
- package/es/components/UAvatar/group.js +62 -0
- package/es/components/UAvatar/index.d.ts +12 -0
- package/es/components/UAvatar/index.js +7 -0
- package/es/components/UAvatar/style/group.less +17 -0
- package/es/components/UAvatar/style/index.d.ts +3 -0
- package/es/components/UAvatar/style/index.js +5 -0
- package/es/components/UAvatar/style/index.less +70 -0
- package/es/components/UAvatar/style/rtl.less +15 -0
- package/es/components/UBackTop/index.d.ts +15 -0
- package/es/components/UBackTop/index.js +119 -0
- package/es/components/UBackTop/style/index.d.ts +2 -0
- package/es/components/UBackTop/style/index.js +2 -0
- package/es/components/UBackTop/style/index.less +49 -0
- package/es/components/UBackTop/style/responsive.less +21 -0
- package/es/components/UBadge/Ribbon.d.ts +15 -0
- package/es/components/UBadge/Ribbon.js +42 -0
- package/es/components/UBadge/ScrollNumber.d.ts +18 -0
- package/es/components/UBadge/ScrollNumber.js +60 -0
- package/es/components/UBadge/SingleNumber.d.ts +12 -0
- package/es/components/UBadge/SingleNumber.js +112 -0
- package/es/components/UBadge/index.d.ts +31 -0
- package/es/components/UBadge/index.js +152 -0
- package/es/components/UBadge/style/index.d.ts +2 -0
- package/es/components/UBadge/style/index.js +2 -0
- package/es/components/UBadge/style/index.less +281 -0
- package/es/components/UBadge/style/ribbon.less +86 -0
- package/es/components/UBadge/style/rtl.less +100 -0
- package/es/components/UBadge/utils.d.ts +1 -0
- package/es/components/UBadge/utils.js +5 -0
- package/es/components/UBreadcrumb/Breadcrumb.d.ts +24 -0
- package/es/components/UBreadcrumb/Breadcrumb.js +121 -0
- package/es/components/UBreadcrumb/BreadcrumbItem.d.ts +19 -0
- package/es/components/UBreadcrumb/BreadcrumbItem.js +56 -0
- package/es/components/UBreadcrumb/BreadcrumbSeparator.d.ts +6 -0
- package/es/components/UBreadcrumb/BreadcrumbSeparator.js +13 -0
- package/es/components/UBreadcrumb/index.d.ts +5 -0
- package/es/components/UBreadcrumb/index.js +3 -0
- package/es/components/UBreadcrumb/style/index.d.ts +4 -0
- package/es/components/UBreadcrumb/style/index.js +5 -0
- package/es/components/UBreadcrumb/style/index.less +64 -0
- package/es/components/UBreadcrumb/style/rtl.less +29 -0
- package/es/components/UButton/button/LoadingIcon.d.ts +8 -0
- package/es/components/UButton/button/LoadingIcon.js +51 -0
- package/es/components/UButton/button/button-group.d.ts +12 -0
- package/es/components/UButton/button/button-group.js +43 -0
- package/es/components/UButton/button/button.d.ts +47 -0
- package/es/components/UButton/button/button.js +226 -0
- package/es/components/UButton/button/index.d.ts +6 -0
- package/es/components/UButton/button/index.js +3 -0
- package/es/components/UButton/button/style/index.d.ts +2 -0
- package/es/components/UButton/button/style/index.js +3 -0
- package/es/components/UButton/button/style/index.less +293 -0
- package/es/components/UButton/button/style/mixin.less +484 -0
- package/es/components/UButton/button/style/rtl.less +90 -0
- package/es/components/UButton/button/style/space-compact.less +88 -0
- package/es/components/UButton/images/icon_add_default.png +0 -0
- package/es/components/UButton/images/icon_add_down.png +0 -0
- package/es/components/UButton/images/icon_add_hover.png +0 -0
- package/es/components/UButton/images/icon_arming_default.png +0 -0
- package/es/components/UButton/images/icon_arming_hover.png +0 -0
- package/es/components/UButton/images/icon_custom_default.png +0 -0
- package/es/components/UButton/images/icon_custom_hover.png +0 -0
- package/es/components/UButton/images/icon_delete-default.png +0 -0
- package/es/components/UButton/images/icon_delete_down.png +0 -0
- package/es/components/UButton/images/icon_delete_hover.png +0 -0
- package/es/components/UButton/images/icon_delete_no.png +0 -0
- package/es/components/UButton/images/icon_edit_default.png +0 -0
- package/es/components/UButton/images/icon_edit_down.png +0 -0
- package/es/components/UButton/images/icon_edit_hover.png +0 -0
- package/es/components/UButton/images/icon_export_default.png +0 -0
- package/es/components/UButton/images/icon_export_hover.png +0 -0
- package/es/components/UButton/images/icon_import_default.png +0 -0
- package/es/components/UButton/images/icon_import_hover.png +0 -0
- package/es/components/UButton/images/icon_modify.png +0 -0
- package/es/components/UButton/images/icon_refresh_default.png +0 -0
- package/es/components/UButton/images/icon_refresh_down.png +0 -0
- package/es/components/UButton/images/icon_refresh_hover.png +0 -0
- package/es/components/UButton/images/icon_template_default.png +0 -0
- package/es/components/UButton/images/icon_template_hover.png +0 -0
- package/es/components/UButton/images/icon_upload_default.png +0 -0
- package/es/components/UButton/images/icon_upload_hover.png +0 -0
- package/es/components/UButton/index.d.ts +43 -0
- package/es/components/UButton/index.js +163 -0
- package/es/components/UButton/style/index.d.ts +1 -0
- package/es/components/UButton/style/index.js +1 -0
- package/es/components/UButton/style/index.less +17 -0
- package/es/components/UButton/style/mixin.less +222 -0
- package/es/components/UButton/style/theme.less +144 -0
- package/es/components/UCalendar/Header.d.ts +16 -0
- package/es/components/UCalendar/Header.js +157 -0
- package/es/components/UCalendar/generateCalendar.d.ts +41 -0
- package/es/components/UCalendar/generateCalendar.js +177 -0
- package/es/components/UCalendar/index.d.ts +6 -0
- package/es/components/UCalendar/index.js +5 -0
- package/es/components/UCalendar/locale/en_US.d.ts +2 -0
- package/es/components/UCalendar/locale/en_US.js +2 -0
- package/es/components/UCalendar/locale/zh_CN.d.ts +2 -0
- package/es/components/UCalendar/locale/zh_CN.js +2 -0
- package/es/components/UCalendar/style/index.d.ts +5 -0
- package/es/components/UCalendar/style/index.js +7 -0
- package/es/components/UCalendar/style/index.less +196 -0
- package/es/components/UCalendar/style/rtl.less +46 -0
- package/es/components/UCard/Card.d.ts +35 -0
- package/es/components/UCard/Card.js +128 -0
- package/es/components/UCard/Grid.d.ts +9 -0
- package/es/components/UCard/Grid.js +24 -0
- package/es/components/UCard/Meta.d.ts +11 -0
- package/es/components/UCard/Meta.js +33 -0
- package/es/components/UCard/index.d.ts +14 -0
- package/es/components/UCard/index.js +8 -0
- package/es/components/UCard/style/index.d.ts +4 -0
- package/es/components/UCard/style/index.js +5 -0
- package/es/components/UCard/style/index.less +277 -0
- package/es/components/UCard/style/size.less +20 -0
- package/es/components/UCarousel/index.d.ts +25 -0
- package/es/components/UCarousel/index.js +69 -0
- package/es/components/UCarousel/style/index.d.ts +2 -0
- package/es/components/UCarousel/style/index.js +2 -0
- package/es/components/UCarousel/style/index.less +304 -0
- package/es/components/UCarousel/style/rtl.less +54 -0
- package/es/components/UCascader/index.d.ts +44 -0
- package/es/components/UCascader/index.js +210 -0
- package/es/components/UCascader/style/index.d.ts +4 -0
- package/es/components/UCascader/style/index.js +6 -0
- package/es/components/UCascader/style/index.less +169 -0
- package/es/components/UCascader/style/rtl.less +19 -0
- package/es/components/UCheckBoxGroup/UCheckBox.d.ts +14 -0
- package/es/components/UCheckBoxGroup/UCheckBox.js +66 -0
- package/es/components/UCheckBoxGroup/UCheckBoxGroup.d.ts +44 -0
- package/es/components/UCheckBoxGroup/UCheckBoxGroup.js +154 -0
- package/es/components/UCheckBoxGroup/checkbox/Checkbox.d.ts +37 -0
- package/es/components/UCheckBoxGroup/checkbox/Checkbox.js +93 -0
- package/es/components/UCheckBoxGroup/checkbox/Group.d.ts +35 -0
- package/es/components/UCheckBoxGroup/checkbox/Group.js +133 -0
- package/es/components/UCheckBoxGroup/checkbox/index.d.ts +11 -0
- package/es/components/UCheckBoxGroup/checkbox/index.js +7 -0
- package/es/components/UCheckBoxGroup/checkbox/style/index.d.ts +2 -0
- package/es/components/UCheckBoxGroup/checkbox/style/index.js +3 -0
- package/es/components/UCheckBoxGroup/checkbox/style/index.less +6 -0
- package/es/components/UCheckBoxGroup/checkbox/style/mixin.less +246 -0
- package/es/components/UCheckBoxGroup/checkbox/style/rtl.less +28 -0
- package/es/components/UCheckBoxGroup/index.d.ts +14 -0
- package/es/components/UCheckBoxGroup/index.js +12 -0
- package/es/components/UCheckBoxGroup/locale/en_US.d.ts +3 -0
- package/es/components/UCheckBoxGroup/locale/en_US.js +4 -0
- package/es/components/UCheckBoxGroup/locale/locale.d.ts +3 -0
- package/es/components/UCheckBoxGroup/locale/zh_CN.d.ts +3 -0
- package/es/components/UCheckBoxGroup/locale/zh_CN.js +4 -0
- package/es/components/UCheckBoxGroup/style/index.d.ts +1 -0
- package/es/components/UCheckBoxGroup/style/index.js +1 -0
- package/es/components/UCheckBoxGroup/style/index.less +26 -0
- package/es/components/UCheckBoxGroup/style/mixin.less +166 -0
- package/es/components/UCheckBoxGroup/style/theme.less +38 -0
- package/es/components/UCol/index.d.ts +4 -0
- package/es/components/UCol/index.js +3 -0
- package/es/components/UCol/style/index.d.ts +2 -0
- package/es/components/UCol/style/index.js +4 -0
- package/es/components/UCollapse/Collapse.d.ts +40 -0
- package/es/components/UCollapse/Collapse.js +82 -0
- package/es/components/UCollapse/CollapsePanel.d.ts +19 -0
- package/es/components/UCollapse/CollapsePanel.js +26 -0
- package/es/components/UCollapse/index.d.ts +5 -0
- package/es/components/UCollapse/index.js +3 -0
- package/es/components/UCollapse/style/index.d.ts +2 -0
- package/es/components/UCollapse/style/index.js +2 -0
- package/es/components/UCollapse/style/index.less +177 -0
- package/es/components/UCollapse/style/rtl.less +68 -0
- package/es/components/UColor/index.d.ts +15 -0
- package/es/components/UColor/index.js +248 -0
- package/es/components/UColor/style/index.d.ts +1 -0
- package/es/components/UColor/style/index.js +1 -0
- package/es/components/UColor/style/index.less +16 -0
- package/es/components/UColor/style/mixin.less +53 -0
- package/es/components/UColor/style/theme.less +9 -0
- package/es/components/UComment/index.d.ts +24 -0
- package/es/components/UComment/index.js +62 -0
- package/es/components/UComment/style/index.d.ts +2 -0
- package/es/components/UComment/style/index.js +2 -0
- package/es/components/UComment/style/index.less +105 -0
- package/es/components/UComment/style/rtl.less +51 -0
- package/es/components/UConfigProvider/CustomerContext.d.ts +11 -0
- package/es/components/UConfigProvider/CustomerContext.js +15 -0
- package/es/components/UConfigProvider/DisabledContext.d.ts +9 -0
- package/es/components/UConfigProvider/DisabledContext.js +11 -0
- package/es/components/UConfigProvider/SizeContext.d.ts +9 -0
- package/es/components/UConfigProvider/SizeContext.js +12 -0
- package/es/components/UConfigProvider/changeSkin.d.ts +62 -0
- package/es/components/UConfigProvider/changeSkin.js +197 -0
- package/es/components/UConfigProvider/changeTheme.d.ts +1 -0
- package/es/components/UConfigProvider/changeTheme.js +83 -0
- package/es/components/UConfigProvider/context.d.ts +60 -0
- package/es/components/UConfigProvider/context.js +35 -0
- package/es/components/UConfigProvider/convertColor.d.ts +4 -0
- package/es/components/UConfigProvider/convertColor.js +106 -0
- package/es/components/UConfigProvider/cssVariables.d.ts +3 -0
- package/es/components/UConfigProvider/cssVariables.js +72 -0
- package/es/components/UConfigProvider/defaultRenderEmpty.d.ts +4 -0
- package/es/components/UConfigProvider/defaultRenderEmpty.js +30 -0
- package/es/components/UConfigProvider/index.d.ts +64 -0
- package/es/components/UConfigProvider/index.js +195 -0
- package/es/components/UConfigProvider/style/index.d.ts +1 -0
- package/es/components/UConfigProvider/style/index.js +1 -0
- package/es/components/UConfigProvider/style/index.less +2 -0
- package/es/components/UConfigProvider/theme.d.ts +11 -0
- package/es/components/UConfigProvider/theme.js +27 -0
- package/es/components/UDatePicker/date-picker/PickerButton.d.ts +2 -0
- package/es/components/UDatePicker/date-picker/PickerButton.js +8 -0
- package/es/components/UDatePicker/date-picker/PickerTag.d.ts +2 -0
- package/es/components/UDatePicker/date-picker/PickerTag.js +7 -0
- package/es/components/UDatePicker/date-picker/generatePicker/generateRangePicker.d.ts +17 -0
- package/es/components/UDatePicker/date-picker/generatePicker/generateRangePicker.js +219 -0
- package/es/components/UDatePicker/date-picker/generatePicker/generateSinglePicker.d.ts +101 -0
- package/es/components/UDatePicker/date-picker/generatePicker/generateSinglePicker.js +393 -0
- package/es/components/UDatePicker/date-picker/generatePicker/index.d.ts +252 -0
- package/es/components/UDatePicker/date-picker/generatePicker/index.js +77 -0
- package/es/components/UDatePicker/date-picker/generatePicker/interface.d.ts +12 -0
- package/es/components/UDatePicker/date-picker/generatePicker/interface.js +1 -0
- package/es/components/UDatePicker/date-picker/locale/en_US.d.ts +3 -0
- package/es/components/UDatePicker/date-picker/locale/en_US.js +22 -0
- package/es/components/UDatePicker/date-picker/locale/example.json +47 -0
- package/es/components/UDatePicker/date-picker/locale/zh_CN.d.ts +3 -0
- package/es/components/UDatePicker/date-picker/locale/zh_CN.js +24 -0
- package/es/components/UDatePicker/date-picker/style/index.d.ts +3 -0
- package/es/components/UDatePicker/date-picker/style/index.js +5 -0
- package/es/components/UDatePicker/date-picker/style/index.less +372 -0
- package/es/components/UDatePicker/date-picker/style/panel.less +678 -0
- package/es/components/UDatePicker/date-picker/style/rtl.less +246 -0
- package/es/components/UDatePicker/date-picker/style/status.less +39 -0
- package/es/components/UDatePicker/date-picker/util.d.ts +15 -0
- package/es/components/UDatePicker/date-picker/util.js +121 -0
- package/es/components/UDatePicker/index.d.ts +199 -0
- package/es/components/UDatePicker/index.js +61 -0
- package/es/components/UDatePicker/locale/en_US.d.ts +3 -0
- package/es/components/UDatePicker/locale/en_US.js +6 -0
- package/es/components/UDatePicker/locale/locale.d.ts +5 -0
- package/es/components/UDatePicker/locale/zh_CN.d.ts +3 -0
- package/es/components/UDatePicker/locale/zh_CN.js +6 -0
- package/es/components/UDatePicker/style/index.d.ts +1 -0
- package/es/components/UDatePicker/style/index.js +1 -0
- package/es/components/UDatePicker/style/index.less +28 -0
- package/es/components/UDatePicker/style/mixin.less +217 -0
- package/es/components/UDatePicker/style/theme.less +72 -0
- package/es/components/UDatePicker/time-picker/locale/en_US.d.ts +3 -0
- package/es/components/UDatePicker/time-picker/locale/en_US.js +5 -0
- package/es/components/UDatePicker/time-picker/locale/zh_CN.d.ts +3 -0
- package/es/components/UDatePicker/time-picker/locale/zh_CN.js +5 -0
- package/es/components/UDatePicker/time-picker/style/index.d.ts +3 -0
- package/es/components/UDatePicker/time-picker/style/index.js +4 -0
- package/es/components/UDatePicker/time-picker/style/index.less +3 -0
- package/es/components/UDescriptions/Cell.d.ts +16 -0
- package/es/components/UDescriptions/Cell.js +48 -0
- package/es/components/UDescriptions/Item.d.ts +13 -0
- package/es/components/UDescriptions/Item.js +5 -0
- package/es/components/UDescriptions/Row.d.ts +13 -0
- package/es/components/UDescriptions/Row.js +99 -0
- package/es/components/UDescriptions/index.d.ts +28 -0
- package/es/components/UDescriptions/index.js +155 -0
- package/es/components/UDescriptions/style/index.d.ts +2 -0
- package/es/components/UDescriptions/style/index.js +2 -0
- package/es/components/UDescriptions/style/index.less +179 -0
- package/es/components/UDescriptions/style/rtl.less +33 -0
- package/es/components/UDivider/divider/index.d.ts +15 -0
- package/es/components/UDivider/divider/index.js +50 -0
- package/es/components/UDivider/divider/style/index.d.ts +2 -0
- package/es/components/UDivider/divider/style/index.js +2 -0
- package/es/components/UDivider/divider/style/index.less +133 -0
- package/es/components/UDivider/divider/style/rtl.less +38 -0
- package/es/components/UDivider/index.d.ts +16 -0
- package/es/components/UDivider/index.js +27 -0
- package/es/components/UDivider/style/index.d.ts +1 -0
- package/es/components/UDivider/style/index.js +1 -0
- package/es/components/UDivider/style/index.less +17 -0
- package/es/components/UDivider/style/mixin.less +8 -0
- package/es/components/UDivider/style/rtl.less +38 -0
- package/es/components/UDivider/style/theme.less +5 -0
- package/es/components/UDrawer/index.d.ts +39 -0
- package/es/components/UDrawer/index.js +168 -0
- package/es/components/UDrawer/style/drawer.less +160 -0
- package/es/components/UDrawer/style/index.d.ts +2 -0
- package/es/components/UDrawer/style/index.js +3 -0
- package/es/components/UDrawer/style/index.less +7 -0
- package/es/components/UDrawer/style/motion.less +146 -0
- package/es/components/UDrawer/style/rtl.less +16 -0
- package/es/components/UDropdown/dropdown-button.d.ts +22 -0
- package/es/components/UDropdown/dropdown-button.js +116 -0
- package/es/components/UDropdown/dropdown.d.ts +58 -0
- package/es/components/UDropdown/dropdown.js +171 -0
- package/es/components/UDropdown/index.d.ts +5 -0
- package/es/components/UDropdown/index.js +3 -0
- package/es/components/UDropdown/style/index.d.ts +5 -0
- package/es/components/UDropdown/style/index.js +6 -0
- package/es/components/UDropdown/style/index.less +390 -0
- package/es/components/UDropdown/style/rtl.less +90 -0
- package/es/components/UDropdown/style/status.less +14 -0
- package/es/components/UEcharts/index.d.ts +2 -0
- package/es/components/UEcharts/index.js +192 -0
- package/es/components/UEcharts/style/index.d.ts +1 -0
- package/es/components/UEcharts/style/index.js +1 -0
- package/es/components/UEcharts/style/index.less +16 -0
- package/es/components/UEcharts/style/mixin.less +7 -0
- package/es/components/UEcharts/style/theme.less +0 -0
- package/es/components/UEmpty/components/u404.d.ts +2 -0
- package/es/components/UEmpty/components/u404.js +18 -0
- package/es/components/UEmpty/components/uAccess.d.ts +2 -0
- package/es/components/UEmpty/components/uAccess.js +18 -0
- package/es/components/UEmpty/components/uDefault.d.ts +2 -0
- package/es/components/UEmpty/components/uDefault.js +18 -0
- package/es/components/UEmpty/components/uDeveloping.d.ts +2 -0
- package/es/components/UEmpty/components/uDeveloping.js +18 -0
- package/es/components/UEmpty/components/uFavorite.d.ts +2 -0
- package/es/components/UEmpty/components/uFavorite.js +18 -0
- package/es/components/UEmpty/components/uListDefault.d.ts +2 -0
- package/es/components/UEmpty/components/uListDefault.js +18 -0
- package/es/components/UEmpty/components/uListSearch.d.ts +2 -0
- package/es/components/UEmpty/components/uListSearch.js +18 -0
- package/es/components/UEmpty/components/uMap.d.ts +2 -0
- package/es/components/UEmpty/components/uMap.js +18 -0
- package/es/components/UEmpty/components/uSearch.d.ts +2 -0
- package/es/components/UEmpty/components/uSearch.js +18 -0
- package/es/components/UEmpty/empty.d.ts +2 -0
- package/es/components/UEmpty/empty.js +42 -0
- package/es/components/UEmpty/images/defaultnodata.png +0 -0
- package/es/components/UEmpty/images/developing.png +0 -0
- package/es/components/UEmpty/images/listdefaultnodata.png +0 -0
- package/es/components/UEmpty/images/listsearchnodata.png +0 -0
- package/es/components/UEmpty/images/noaccess.png +0 -0
- package/es/components/UEmpty/images/nofavoritedata.png +0 -0
- package/es/components/UEmpty/images/nomap.png +0 -0
- package/es/components/UEmpty/images/notfound.png +0 -0
- package/es/components/UEmpty/images/searchnodata.png +0 -0
- package/es/components/UEmpty/index.d.ts +30 -0
- package/es/components/UEmpty/index.js +83 -0
- package/es/components/UEmpty/simple.d.ts +2 -0
- package/es/components/UEmpty/simple.js +22 -0
- package/es/components/UEmpty/style/index.d.ts +2 -0
- package/es/components/UEmpty/style/index.js +2 -0
- package/es/components/UEmpty/style/index.less +60 -0
- package/es/components/UEmpty/style/rtl.less +10 -0
- package/es/components/UExportExcel/getGuid.d.ts +13 -0
- package/es/components/UExportExcel/getGuid.js +22 -0
- package/es/components/UExportExcel/index.d.ts +60 -0
- package/es/components/UExportExcel/index.js +205 -0
- package/es/components/UExportExcel/index.less +24 -0
- package/es/components/UExportExcel/isDate.d.ts +6 -0
- package/es/components/UExportExcel/isDate.js +8 -0
- package/es/components/UExportExcel/locale/en_US.d.ts +3 -0
- package/es/components/UExportExcel/locale/en_US.js +7 -0
- package/es/components/UExportExcel/locale/locale.d.ts +6 -0
- package/es/components/UExportExcel/locale/zh_CN.d.ts +3 -0
- package/es/components/UExportExcel/locale/zh_CN.js +7 -0
- package/es/components/UFeature/USingleFeafure.d.ts +2 -0
- package/es/components/UFeature/USingleFeafure.js +75 -0
- package/es/components/UFeature/USingleFeafure.less +24 -0
- package/es/components/UFeature/index.d.ts +33 -0
- package/es/components/UFeature/index.js +115 -0
- package/es/components/UFeature/style/index.d.ts +1 -0
- package/es/components/UFeature/style/index.js +1 -0
- package/es/components/UFeature/style/index.less +16 -0
- package/es/components/UFeature/style/mixin.less +26 -0
- package/es/components/UFeature/style/theme.less +2 -0
- package/es/components/UFileSelect/index.d.ts +16 -0
- package/es/components/UFileSelect/index.js +133 -0
- package/es/components/UFileSelect/locale/en_US.d.ts +3 -0
- package/es/components/UFileSelect/locale/en_US.js +5 -0
- package/es/components/UFileSelect/locale/locale.d.ts +4 -0
- package/es/components/UFileSelect/locale/zh_CN.d.ts +3 -0
- package/es/components/UFileSelect/locale/zh_CN.js +5 -0
- package/es/components/UFileSelect/style/index.d.ts +1 -0
- package/es/components/UFileSelect/style/index.js +1 -0
- package/es/components/UFileSelect/style/index.less +14 -0
- package/es/components/UFileSelect/style/mixin.less +65 -0
- package/es/components/UFileSelect/style/theme.less +24 -0
- package/es/components/UForm/ErrorList.d.ts +12 -0
- package/es/components/UForm/ErrorList.js +91 -0
- package/es/components/UForm/Form.d.ts +59 -0
- package/es/components/UForm/Form.js +318 -0
- package/es/components/UForm/FormItem/ItemHolder.d.ts +20 -0
- package/es/components/UForm/FormItem/ItemHolder.js +246 -0
- package/es/components/UForm/FormItem/index.d.ts +42 -0
- package/es/components/UForm/FormItem/index.js +360 -0
- package/es/components/UForm/FormItemInput.d.ts +27 -0
- package/es/components/UForm/FormItemInput.js +119 -0
- package/es/components/UForm/FormItemLabel.d.ts +24 -0
- package/es/components/UForm/FormItemLabel.js +105 -0
- package/es/components/UForm/FormList.d.ts +25 -0
- package/es/components/UForm/FormList.js +34 -0
- package/es/components/UForm/context.d.ts +57 -0
- package/es/components/UForm/context.js +39 -0
- package/es/components/UForm/hooks/useDebounce.d.ts +1 -0
- package/es/components/UForm/hooks/useDebounce.js +22 -0
- package/es/components/UForm/hooks/useForm.d.ts +7 -0
- package/es/components/UForm/hooks/useForm.js +53 -0
- package/es/components/UForm/hooks/useFormInstance.d.ts +2 -0
- package/es/components/UForm/hooks/useFormInstance.js +7 -0
- package/es/components/UForm/hooks/useFormItemStatus.d.ts +6 -0
- package/es/components/UForm/hooks/useFormItemStatus.js +12 -0
- package/es/components/UForm/hooks/useFrameState.d.ts +3 -0
- package/es/components/UForm/hooks/useFrameState.js +46 -0
- package/es/components/UForm/hooks/useItemRef.d.ts +3 -0
- package/es/components/UForm/hooks/useItemRef.js +20 -0
- package/es/components/UForm/index.d.ts +23 -0
- package/es/components/UForm/index.js +21 -0
- package/es/components/UForm/interface.d.ts +3 -0
- package/es/components/UForm/interface.js +1 -0
- package/es/components/UForm/style/components.less +16 -0
- package/es/components/UForm/style/horizontal.less +23 -0
- package/es/components/UForm/style/index.d.ts +4 -0
- package/es/components/UForm/style/index.js +5 -0
- package/es/components/UForm/style/index.less +457 -0
- package/es/components/UForm/style/inline.less +38 -0
- package/es/components/UForm/style/mixin.less +85 -0
- package/es/components/UForm/style/rtl.less +200 -0
- package/es/components/UForm/style/status.less +42 -0
- package/es/components/UForm/style/theme.less +5 -0
- package/es/components/UForm/style/vertical.less +93 -0
- package/es/components/UForm/util.d.ts +3 -0
- package/es/components/UForm/util.js +18 -0
- package/es/components/UFramePanel/images/pic01.png +0 -0
- package/es/components/UFramePanel/images/pic011.png +0 -0
- package/es/components/UFramePanel/images/pic02.png +0 -0
- package/es/components/UFramePanel/images/pic021.png +0 -0
- package/es/components/UFramePanel/images/pic03.png +0 -0
- package/es/components/UFramePanel/images/pic031.png +0 -0
- package/es/components/UFramePanel/images/pic04.png +0 -0
- package/es/components/UFramePanel/images/pic041.png +0 -0
- package/es/components/UFramePanel/index.d.ts +11 -0
- package/es/components/UFramePanel/index.js +130 -0
- package/es/components/UFramePanel/index.td.d.ts +17 -0
- package/es/components/UFramePanel/index.td.js +1 -0
- package/es/components/UFramePanel/style/index.d.ts +1 -0
- package/es/components/UFramePanel/style/index.js +1 -0
- package/es/components/UFramePanel/style/index.less +16 -0
- package/es/components/UFramePanel/style/mixin.less +87 -0
- package/es/components/UFramePanel/style/theme.less +21 -0
- package/es/components/UGrid/RowContext.d.ts +8 -0
- package/es/components/UGrid/RowContext.js +3 -0
- package/es/components/UGrid/col.d.ts +28 -0
- package/es/components/UGrid/col.js +83 -0
- package/es/components/UGrid/hooks/useBreakpoint.d.ts +3 -0
- package/es/components/UGrid/hooks/useBreakpoint.js +21 -0
- package/es/components/UGrid/index.d.ts +11 -0
- package/es/components/UGrid/index.js +12 -0
- package/es/components/UGrid/row.d.ts +20 -0
- package/es/components/UGrid/row.js +165 -0
- package/es/components/UGrid/style/index.d.ts +2 -0
- package/es/components/UGrid/style/index.js +2 -0
- package/es/components/UGrid/style/index.less +124 -0
- package/es/components/UGrid/style/mixin.less +56 -0
- package/es/components/UGrid/style/rtl.less +69 -0
- package/es/components/UIPInput/index.d.ts +19 -0
- package/es/components/UIPInput/index.js +392 -0
- package/es/components/UIPInput/locale/en_US.d.ts +3 -0
- package/es/components/UIPInput/locale/en_US.js +5 -0
- package/es/components/UIPInput/locale/locale.d.ts +4 -0
- package/es/components/UIPInput/locale/zh_CN.d.ts +3 -0
- package/es/components/UIPInput/locale/zh_CN.js +5 -0
- package/es/components/UIPInput/style/index.d.ts +1 -0
- package/es/components/UIPInput/style/index.js +1 -0
- package/es/components/UIPInput/style/index.less +14 -0
- package/es/components/UIPInput/style/mixin.less +115 -0
- package/es/components/UIPInput/style/theme.less +30 -0
- package/es/components/UIcon/icon/index.d.ts +4 -0
- package/es/components/UIcon/icon/index.js +7 -0
- package/es/components/UIcon/icon/style/index.d.ts +2 -0
- package/es/components/UIcon/icon/style/index.js +2 -0
- package/es/components/UIcon/icon/style/index.less +4 -0
- package/es/components/UIcon/icon.d.ts +916 -0
- package/es/components/UIcon/icon.js +4964 -0
- package/es/components/UIcon/index.d.ts +39 -0
- package/es/components/UIcon/index.js +75 -0
- package/es/components/UIcon/style/index.d.ts +1 -0
- package/es/components/UIcon/style/index.js +1 -0
- package/es/components/UIcon/style/index.less +16 -0
- package/es/components/UIcon/style/mixin.less +89 -0
- package/es/components/UIcon/style/theme.less +13 -0
- package/es/components/UImage/image/PreviewGroup.d.ts +13 -0
- package/es/components/UImage/image/PreviewGroup.js +47 -0
- package/es/components/UImage/image/index.d.ts +10 -0
- package/es/components/UImage/image/index.js +48 -0
- package/es/components/UImage/image/style/index.d.ts +2 -0
- package/es/components/UImage/image/style/index.js +2 -0
- package/es/components/UImage/image/style/index.less +203 -0
- package/es/components/UImage/index.d.ts +44 -0
- package/es/components/UImage/index.js +297 -0
- package/es/components/UImage/locale/en_US.d.ts +3 -0
- package/es/components/UImage/locale/en_US.js +4 -0
- package/es/components/UImage/locale/locale.d.ts +3 -0
- package/es/components/UImage/locale/zh_CN.d.ts +3 -0
- package/es/components/UImage/locale/zh_CN.js +4 -0
- package/es/components/UImage/style/index.d.ts +1 -0
- package/es/components/UImage/style/index.js +1 -0
- package/es/components/UImage/style/index.less +15 -0
- package/es/components/UImage/style/mixin.less +248 -0
- package/es/components/UImage/style/theme.less +7 -0
- package/es/components/UImageCropper/UImageCropper.js +300 -0
- package/es/components/UImageCropper/images/confirm.png +0 -0
- package/es/components/UImageCropper/images/empty.png +0 -0
- package/es/components/UImageCropper/images/enlarge.png +0 -0
- package/es/components/UImageCropper/images/frameSelection.png +0 -0
- package/es/components/UImageCropper/images/move.png +0 -0
- package/es/components/UImageCropper/images/narrow.png +0 -0
- package/es/components/UImageCropper/images/updata.png +0 -0
- package/es/components/UImageCropper/index.js +21 -0
- package/es/components/UImageCropper/locale/en_US.d.ts +3 -0
- package/es/components/UImageCropper/locale/en_US.js +12 -0
- package/es/components/UImageCropper/locale/locale.d.ts +11 -0
- package/es/components/UImageCropper/locale/zh_CN.d.ts +3 -0
- package/es/components/UImageCropper/locale/zh_CN.js +12 -0
- package/es/components/UImageCropper/style/index.d.ts +1 -0
- package/es/components/UImageCropper/style/index.js +1 -0
- package/es/components/UImageCropper/style/index.less +15 -0
- package/es/components/UImageCropper/style/mixin.less +57 -0
- package/es/components/UImageCropper/style/theme.less +2 -0
- package/es/components/UImageDetail/UImageBtm.d.ts +8 -0
- package/es/components/UImageDetail/UImageBtm.js +14 -0
- package/es/components/UImageDetail/UImageDetail.d.ts +25 -0
- package/es/components/UImageDetail/UImageDetail.js +105 -0
- package/es/components/UImageDetail/UImageHead.d.ts +8 -0
- package/es/components/UImageDetail/UImageHead.js +14 -0
- package/es/components/UImageDetail/UImageInfo.d.ts +8 -0
- package/es/components/UImageDetail/UImageInfo.js +14 -0
- package/es/components/UImageDetail/UImagePage.d.ts +12 -0
- package/es/components/UImageDetail/UImagePage.js +83 -0
- package/es/components/UImageDetail/UImageShow.d.ts +13 -0
- package/es/components/UImageDetail/UImageShow.js +97 -0
- package/es/components/UImageDetail/images/close_default.png +0 -0
- package/es/components/UImageDetail/images/close_hover.png +0 -0
- package/es/components/UImageDetail/images/empty.png +0 -0
- package/es/components/UImageDetail/images/next_default.png +0 -0
- package/es/components/UImageDetail/images/next_disable.png +0 -0
- package/es/components/UImageDetail/images/next_hover.png +0 -0
- package/es/components/UImageDetail/images/pre_default.png +0 -0
- package/es/components/UImageDetail/images/pre_disable.png +0 -0
- package/es/components/UImageDetail/images/pre_hover.png +0 -0
- package/es/components/UImageDetail/index.d.ts +3 -0
- package/es/components/UImageDetail/index.js +3 -0
- package/es/components/UImageDetail/locale/en_US.d.ts +3 -0
- package/es/components/UImageDetail/locale/en_US.js +11 -0
- package/es/components/UImageDetail/locale/locale.d.ts +7 -0
- package/es/components/UImageDetail/locale/zh_CN.d.ts +3 -0
- package/es/components/UImageDetail/locale/zh_CN.js +8 -0
- package/es/components/UImageDetail/style/index.d.ts +1 -0
- package/es/components/UImageDetail/style/index.js +1 -0
- package/es/components/UImageDetail/style/index.less +28 -0
- package/es/components/UImageDetail/style/mixin.less +210 -0
- package/es/components/UImageDetail/style/theme.less +21 -0
- package/es/components/UImportExcel/getGuid.d.ts +13 -0
- package/es/components/UImportExcel/getGuid.js +22 -0
- package/es/components/UImportExcel/index.d.ts +88 -0
- package/es/components/UImportExcel/index.js +1117 -0
- package/es/components/UImportExcel/isDate.d.ts +6 -0
- package/es/components/UImportExcel/isDate.js +8 -0
- package/es/components/UImportExcel/locale/en_US.d.ts +3 -0
- package/es/components/UImportExcel/locale/en_US.js +7 -0
- package/es/components/UImportExcel/locale/locale.d.ts +6 -0
- package/es/components/UImportExcel/locale/zh_CN.d.ts +3 -0
- package/es/components/UImportExcel/locale/zh_CN.js +7 -0
- package/es/components/UImportExcel/style/index.d.ts +1 -0
- package/es/components/UImportExcel/style/index.js +1 -0
- package/es/components/UImportExcel/style/index.less +33 -0
- package/es/components/UImportExcel/style/mixin.less +169 -0
- package/es/components/UImportExcel/style/theme.less +9 -0
- package/es/components/UInput/index.d.ts +36 -0
- package/es/components/UInput/index.js +256 -0
- package/es/components/UInput/input/ClearableLabeledInput.d.ts +39 -0
- package/es/components/UInput/input/ClearableLabeledInput.js +99 -0
- package/es/components/UInput/input/Group.d.ts +15 -0
- package/es/components/UInput/input/Group.js +36 -0
- package/es/components/UInput/input/Input.d.ts +20 -0
- package/es/components/UInput/input/Input.js +194 -0
- package/es/components/UInput/input/Password.d.ts +14 -0
- package/es/components/UInput/input/Password.js +111 -0
- package/es/components/UInput/input/Search.d.ts +10 -0
- package/es/components/UInput/input/Search.js +132 -0
- package/es/components/UInput/input/TextArea.d.ts +28 -0
- package/es/components/UInput/input/TextArea.js +206 -0
- package/es/components/UInput/input/hooks/useRemovePasswordTimeout.d.ts +3 -0
- package/es/components/UInput/input/hooks/useRemovePasswordTimeout.js +25 -0
- package/es/components/UInput/input/index.d.ts +20 -0
- package/es/components/UInput/input/index.js +12 -0
- package/es/components/UInput/input/style/IE11.less +20 -0
- package/es/components/UInput/input/style/affix.less +79 -0
- package/es/components/UInput/input/style/allow-clear.less +43 -0
- package/es/components/UInput/input/style/index.d.ts +3 -0
- package/es/components/UInput/input/style/index.js +5 -0
- package/es/components/UInput/input/style/index.less +88 -0
- package/es/components/UInput/input/style/mixin.less +457 -0
- package/es/components/UInput/input/style/rtl.less +210 -0
- package/es/components/UInput/input/style/search-input.less +121 -0
- package/es/components/UInput/input/style/status.less +42 -0
- package/es/components/UInput/input/utils.d.ts +3 -0
- package/es/components/UInput/input/utils.js +3 -0
- package/es/components/UInput/locale/en_US.d.ts +3 -0
- package/es/components/UInput/locale/en_US.js +4 -0
- package/es/components/UInput/locale/locale.d.ts +3 -0
- package/es/components/UInput/locale/zh_CN.d.ts +3 -0
- package/es/components/UInput/locale/zh_CN.js +4 -0
- package/es/components/UInput/style/index.d.ts +1 -0
- package/es/components/UInput/style/index.js +1 -0
- package/es/components/UInput/style/index.less +14 -0
- package/es/components/UInput/style/mixin.less +165 -0
- package/es/components/UInput/style/theme.less +46 -0
- package/es/components/UInputNumber/index.d.ts +31 -0
- package/es/components/UInputNumber/index.js +299 -0
- package/es/components/UInputNumber/input-number/index.d.ts +28 -0
- package/es/components/UInputNumber/input-number/index.js +148 -0
- package/es/components/UInputNumber/input-number/style/affix.less +84 -0
- package/es/components/UInputNumber/input-number/style/index.d.ts +2 -0
- package/es/components/UInputNumber/input-number/style/index.js +3 -0
- package/es/components/UInputNumber/input-number/style/index.less +249 -0
- package/es/components/UInputNumber/input-number/style/rtl.less +73 -0
- package/es/components/UInputNumber/input-number/style/status.less +31 -0
- package/es/components/UInputNumber/style/index.d.ts +1 -0
- package/es/components/UInputNumber/style/index.js +1 -0
- package/es/components/UInputNumber/style/index.less +16 -0
- package/es/components/UInputNumber/style/mixin.less +143 -0
- package/es/components/UInputNumber/style/theme.less +37 -0
- package/es/components/ULayout/Sider.d.ts +28 -0
- package/es/components/ULayout/Sider.js +184 -0
- package/es/components/ULayout/index.d.ts +14 -0
- package/es/components/ULayout/index.js +9 -0
- package/es/components/ULayout/layout.d.ts +23 -0
- package/es/components/ULayout/layout.js +124 -0
- package/es/components/ULayout/style/index.d.ts +2 -0
- package/es/components/ULayout/style/index.js +2 -0
- package/es/components/ULayout/style/index.less +145 -0
- package/es/components/ULayout/style/light.less +11 -0
- package/es/components/ULayout/style/rtl.less +10 -0
- package/es/components/ULazyPanel/LazyLoad.d.ts +42 -0
- package/es/components/ULazyPanel/LazyLoad.js +131 -0
- package/es/components/ULazyPanel/index.d.ts +21 -0
- package/es/components/ULazyPanel/index.js +336 -0
- package/es/components/ULazyPanel/style/index.d.ts +1 -0
- package/es/components/ULazyPanel/style/index.js +1 -0
- package/es/components/ULazyPanel/style/index.less +16 -0
- package/es/components/ULazyPanel/style/mixin.less +127 -0
- package/es/components/ULazyPanel/style/theme.less +71 -0
- package/es/components/ULazyPanel/utils/index.js +25 -0
- package/es/components/UList/Item.d.ts +26 -0
- package/es/components/UList/Item.js +101 -0
- package/es/components/UList/index.d.ts +55 -0
- package/es/components/UList/index.js +214 -0
- package/es/components/UList/style/bordered.less +44 -0
- package/es/components/UList/style/customize.less +4 -0
- package/es/components/UList/style/index.d.ts +6 -0
- package/es/components/UList/style/index.js +7 -0
- package/es/components/UList/style/index.less +249 -0
- package/es/components/UList/style/responsive.less +43 -0
- package/es/components/UList/style/rtl.less +139 -0
- package/es/components/ULoading/index.d.ts +15 -0
- package/es/components/ULoading/index.js +89 -0
- package/es/components/ULoading/style/index.d.ts +1 -0
- package/es/components/ULoading/style/index.js +1 -0
- package/es/components/ULoading/style/index.less +14 -0
- package/es/components/ULoading/style/mixin.less +144 -0
- package/es/components/ULoading/style/theme.less +7 -0
- package/es/components/UMap/index.js +30 -0
- package/es/components/UMap/locale/en_US.d.ts +3 -0
- package/es/components/UMap/locale/en_US.js +134 -0
- package/es/components/UMap/locale/locale.d.ts +148 -0
- package/es/components/UMap/locale/zh_CN.d.ts +3 -0
- package/es/components/UMap/locale/zh_CN.js +134 -0
- package/es/components/UMap/map/api/MapApi.js +299 -0
- package/es/components/UMap/map/assets/SvgIcon.js +1561 -0
- package/es/components/UMap/map/assets/images/bg.png +0 -0
- package/es/components/UMap/map/assets/images/cameraBg.png +0 -0
- package/es/components/UMap/map/assets/images/cluster.png +0 -0
- package/es/components/UMap/map/assets/images/deleteImg.png +0 -0
- package/es/components/UMap/map/assets/images/devIconDefault.png +0 -0
- package/es/components/UMap/map/assets/images/index.js +3 -0
- package/es/components/UMap/map/assets/images/location.png +0 -0
- package/es/components/UMap/map/assets/images/point-end.png +0 -0
- package/es/components/UMap/map/assets/images/point-start.png +0 -0
- package/es/components/UMap/map/assets/images/underfloor.png +0 -0
- package/es/components/UMap/map/assets/images/underfloorGrey.png +0 -0
- package/es/components/UMap/map/assets/images/underfloorHover.png +0 -0
- package/es/components/UMap/map/assets/images/upstair.png +0 -0
- package/es/components/UMap/map/assets/images/upstairGrey.png +0 -0
- package/es/components/UMap/map/assets/images/upstairHover.png +0 -0
- package/es/components/UMap/map/components/BuildFloor/index.js +166 -0
- package/es/components/UMap/map/components/BuildFloor/index.less +134 -0
- package/es/components/UMap/map/components/Bus/BusKey.d.ts +33 -0
- package/es/components/UMap/map/components/Bus/BusKey.js +51 -0
- package/es/components/UMap/map/components/Bus/DataBus.d.ts +34 -0
- package/es/components/UMap/map/components/Bus/DataBus.js +80 -0
- package/es/components/UMap/map/components/Bus/EventBus.d.ts +45 -0
- package/es/components/UMap/map/components/Bus/EventBus.js +145 -0
- package/es/components/UMap/map/components/ComInterface.d.ts +42 -0
- package/es/components/UMap/map/components/ComInterface.js +7 -0
- package/es/components/UMap/map/components/FloorSelect/index.js +92 -0
- package/es/components/UMap/map/components/FloorSelect/index.less +84 -0
- package/es/components/UMap/map/components/MapSelect/index.js +340 -0
- package/es/components/UMap/map/components/MapServerPointManage/CommonFunc.js +337 -0
- package/es/components/UMap/map/components/MapServerPointManage/Enum.js +133 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/GPS-Off-line.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/GPS-On-line.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/GPS32.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/GPS48.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/GPS64.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/btndel.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/btndelover.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/cam_qiang.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/cameraCluster48.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/cameraCluster64.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/commit.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/commitover.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/customer.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/customerImage.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/defence.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/folder.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/gps.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/rotate.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/tollgate.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/tollgateCluster48.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Image/tollgateCluster64.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/ArchivesCamera/ArchivesCamera.js +956 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Camera/Camera.js +856 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Camera/CameraMenu.js +467 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Camera/CameraViewShed.js +522 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Customer/Customer.js +526 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Customer/CustomerMenu.js +611 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Defence/Defence.js +234 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Defence/DefenceMenu.js +264 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Dictionary.js +259 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Gps/Gps.js +893 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Gps/GpsMenu.js +333 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Gps/SubSocketCenter.js +519 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/LayerTree.js +363 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Tollgate/Tollgate.js +456 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/Tollgate/TollgateMenu.js +593 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/ToolTipForm.js +15 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/ToolTipInfo.less +19 -0
- package/es/components/UMap/map/components/MapServerPointManage/Layers/layer.less +119 -0
- package/es/components/UMap/map/components/MapServerPointManage/MapLayer.js +541 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-1-2.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-2-2.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-3007-2.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-7-2.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20000-8-2.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20001-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20001-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20001-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20001-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20001-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20002-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20002-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20002-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20002-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20002-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20003-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20003-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20003-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20003-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20003-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20004-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20004-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20004-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20004-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20004-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20005-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20005-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20005-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20005-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20005-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20006-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20006-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20006-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20006-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20006-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20007-1-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20007-2-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20007-3007-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20007-7-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/20007-8-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CameraIcon/CameraIcon.js +93 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/10.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/11.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/12.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/13.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/14.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/15.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/16.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/17.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/18.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/19.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/2.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/20.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/21.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/22.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/23.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/24.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/25.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/26.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/27.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/28.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/29.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/3-offline.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/3-online.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/3.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/30.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/31.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/32.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/4.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/40.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/41.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/5.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/6.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/7.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/8.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/9.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/CustomIcon/CustomImg.js +77 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons/GpsImg.js +77 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons/point.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-351.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-363.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-364.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-365.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-366.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-367.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-368.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23724-369.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-733.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-734.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-735.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-736.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-737.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-738.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-739.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/345/257/23732-740.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-352.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-353.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-354.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-355.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-356.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-357.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-358.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-359.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-360.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24624-362.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-723.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-724.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-725.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-726.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-727.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-728.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-729.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-730.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-731.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/GpsIcons//350/255/246/350/275/24632-732.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30000-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30000-31-2.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30001-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30002-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30003-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30004-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30005-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30006-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/30007-31-1.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/TollgateIcon/TollgateIcon.js +21 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerIcon/upright.png +0 -0
- package/es/components/UMap/map/components/MapServerPointManage/MarkerMenu/MarkerMenu.js +95 -0
- package/es/components/UMap/map/components/MapServerPointManage/RequestFunc.js +803 -0
- package/es/components/UMap/map/components/MapServerPointManage/style/index.d.ts +1 -0
- package/es/components/UMap/map/components/MapServerPointManage/style/index.js +1 -0
- package/es/components/UMap/map/components/MapServerPointManage/style/index.less +26 -0
- package/es/components/UMap/map/components/MapServerPointManage/style/mixin.less +51 -0
- package/es/components/UMap/map/components/MapServerPointManage/style/theme.less +129 -0
- package/es/components/UMap/map/components/MapServerPointSearch/index.js +445 -0
- package/es/components/UMap/map/components/MapServerPointSearch/index.less +102 -0
- package/es/components/UMap/map/components/MapSwitch/index.d.ts +12 -0
- package/es/components/UMap/map/components/MapSwitch/index.js +525 -0
- package/es/components/UMap/map/components/MapSwitch/index.less +77 -0
- package/es/components/UMap/map/components/MapToolMenu/Map3D.js +1603 -0
- package/es/components/UMap/map/components/MapToolMenu/index.js +1267 -0
- package/es/components/UMap/map/components/MapToolMenu/index.less +537 -0
- package/es/components/UMap/map/components/PointDraw/PointStyle.d.ts +40 -0
- package/es/components/UMap/map/components/PointDraw/PointStyle.js +163 -0
- package/es/components/UMap/map/components/PointDraw/core.d.ts +330 -0
- package/es/components/UMap/map/components/PointDraw/core.js +364 -0
- package/es/components/UMap/map/components/PointDraw/index.d.ts +214 -0
- package/es/components/UMap/map/components/PointDraw/index.js +968 -0
- package/es/components/UMap/map/components/PointDraw/index.less +95 -0
- package/es/components/UMap/map/components/PointDraw/loaders/ILoader.d.ts +35 -0
- package/es/components/UMap/map/components/PointDraw/loaders/ILoader.js +16 -0
- package/es/components/UMap/map/components/PointDraw/loaders/index.d.ts +6 -0
- package/es/components/UMap/map/components/PointDraw/loaders/index.js +3 -0
- package/es/components/UMap/map/components/PointDraw/loaders/loader2d.d.ts +48 -0
- package/es/components/UMap/map/components/PointDraw/loaders/loader2d.js +243 -0
- package/es/components/UMap/map/components/PointDraw/loaders/loader3d.d.ts +33 -0
- package/es/components/UMap/map/components/PointDraw/loaders/loader3d.js +220 -0
- package/es/components/UMap/map/components/PointDraw/modelcluster/index.d.ts +107 -0
- package/es/components/UMap/map/components/PointDraw/modelcluster/index.js +534 -0
- package/es/components/UMap/map/components/PointDraw/renderers/DomPointRenderer.d.ts +17 -0
- package/es/components/UMap/map/components/PointDraw/renderers/DomPointRenderer.js +163 -0
- package/es/components/UMap/map/components/PointDraw/renderers/IPointRenderer.d.ts +81 -0
- package/es/components/UMap/map/components/PointDraw/renderers/IPointRenderer.js +38 -0
- package/es/components/UMap/map/components/PointDraw/renderers/LabelPointRenderer.d.ts +18 -0
- package/es/components/UMap/map/components/PointDraw/renderers/LabelPointRenderer.js +273 -0
- package/es/components/UMap/map/components/PointDraw/renderers/ModelPointRenderer.d.ts +18 -0
- package/es/components/UMap/map/components/PointDraw/renderers/ModelPointRenderer.js +341 -0
- package/es/components/UMap/map/components/PointDraw/renderers/index.d.ts +6 -0
- package/es/components/UMap/map/components/PointDraw/renderers/index.js +5 -0
- package/es/components/UMap/map/components/PointDraw/renderers/outBindPointRenderer.d.ts +14 -0
- package/es/components/UMap/map/components/PointDraw/renderers/outBindPointRenderer.js +96 -0
- package/es/components/UMap/map/components/Track/index.js +1051 -0
- package/es/components/UMap/map/components/Track/index.less +60 -0
- package/es/components/UMap/map/components/VisualConfig/index.d.ts +11 -0
- package/es/components/UMap/map/components/VisualConfig/index.js +179 -0
- package/es/components/UMap/map/components/VisualConfig/index.less +30 -0
- package/es/components/UMap/map/components/independentMode/index.d.ts +20 -0
- package/es/components/UMap/map/components/independentMode/index.js +57 -0
- package/es/components/UMap/map/images/CustomIcon/1.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/10.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/1000001.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/1000002.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/1001.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/11.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/12.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/13.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/14.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/15.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/16.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/17.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/18.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/19.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/2.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/20.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/21.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/22.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/23.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/24.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/25.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/26.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/27.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/28.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/29.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/3-offline.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/3-online.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/3.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/30.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/31.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/32.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/4.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/40.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/41.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/5.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/6.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/7.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/8.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/9.png +0 -0
- package/es/components/UMap/map/images/CustomIcon/CustomImg.js +81 -0
- package/es/components/UMap/map/images/centerPoint.png +0 -0
- package/es/components/UMap/map/images/icon16.png +0 -0
- package/es/components/UMap/map/images/icon24.png +0 -0
- package/es/components/UMap/map/images/imosMap24.png +0 -0
- package/es/components/UMap/map/images/layer.png +0 -0
- package/es/components/UMap/map/images/layer_hover.png +0 -0
- package/es/components/UMap/map/images/local-hover.png +0 -0
- package/es/components/UMap/map/images/local.png +0 -0
- package/es/components/UMap/map/images/mapLocationSecu.png +0 -0
- package/es/components/UMap/map/images/moveDefault.png +0 -0
- package/es/components/UMap/map/images/poi.png +0 -0
- package/es/components/UMap/map/images/point_blue.png +0 -0
- package/es/components/UMap/map/images/point_red.png +0 -0
- package/es/components/UMap/map/images/pop.png +0 -0
- package/es/components/UMap/map/images/searchEmpty.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_1_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_1_2.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_2_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_2_2.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_3007_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_3007_2.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_7_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_7_2.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_8_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/1001_8_2.png +0 -0
- package/es/components/UMap/map/images/searchIcon/119_42_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/119_42_2.png +0 -0
- package/es/components/UMap/map/images/searchIcon/2200_29_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/2200_30_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/31_31_1.png +0 -0
- package/es/components/UMap/map/images/searchIcon/31_31_2.png +0 -0
- package/es/components/UMap/map/images/sprites.png +0 -0
- package/es/components/UMap/map/index.js +1 -0
- package/es/components/UMap/map/pages/Map.js +2860 -0
- package/es/components/UMap/map/pages/Map.less +194 -0
- package/es/components/UMap/map/util/MapControl.d.ts +43 -0
- package/es/components/UMap/map/util/MapControl.js +90 -0
- package/es/components/UMap/map/util/ScreenMapControl.d.ts +511 -0
- package/es/components/UMap/map/util/ScreenMapControl.js +2162 -0
- package/es/components/UMap/map/util/StreamMapControl.d.ts +414 -0
- package/es/components/UMap/map/util/StreamMapControl.js +1315 -0
- package/es/components/UMap/map/util/constants.js +137 -0
- package/es/components/UMap/map/util/eventBus.js +26 -0
- package/es/components/UMap/map/util/log.d.ts +19 -0
- package/es/components/UMap/map/util/log.js +42 -0
- package/es/components/UMap/map/util/mapEnv.d.ts +34 -0
- package/es/components/UMap/map/util/mapEnv.js +53 -0
- package/es/components/UMap/map/util/publicFun.js +505 -0
- package/es/components/UMap/map/util/request.js +101 -0
- package/es/components/UMap/style/index.d.ts +1 -0
- package/es/components/UMap/style/index.js +1 -0
- package/es/components/UMap/style/index.less +26 -0
- package/es/components/UMap/style/mixin.less +257 -0
- package/es/components/UMap/style/theme.less +137 -0
- package/es/components/UMentions/index.d.ts +36 -0
- package/es/components/UMentions/index.js +159 -0
- package/es/components/UMentions/style/index.d.ts +3 -0
- package/es/components/UMentions/style/index.js +5 -0
- package/es/components/UMentions/style/index.less +179 -0
- package/es/components/UMentions/style/rtl.less +10 -0
- package/es/components/UMentions/style/status.less +16 -0
- package/es/components/UMenu/MenuContext.d.ts +12 -0
- package/es/components/UMenu/MenuContext.js +7 -0
- package/es/components/UMenu/MenuDivider.d.ts +9 -0
- package/es/components/UMenu/MenuDivider.js +23 -0
- package/es/components/UMenu/MenuItem.d.ts +16 -0
- package/es/components/UMenu/MenuItem.js +110 -0
- package/es/components/UMenu/OverrideContext.d.ts +11 -0
- package/es/components/UMenu/OverrideContext.js +21 -0
- package/es/components/UMenu/SubMenu.d.ts +23 -0
- package/es/components/UMenu/SubMenu.js +47 -0
- package/es/components/UMenu/hooks/useItems.d.ts +26 -0
- package/es/components/UMenu/hooks/useItems.js +62 -0
- package/es/components/UMenu/index.d.ts +27 -0
- package/es/components/UMenu/index.js +169 -0
- package/es/components/UMenu/style/dark.less +186 -0
- package/es/components/UMenu/style/index.d.ts +3 -0
- package/es/components/UMenu/style/index.js +5 -0
- package/es/components/UMenu/style/index.less +709 -0
- package/es/components/UMenu/style/light.less +12 -0
- package/es/components/UMenu/style/rtl.less +165 -0
- package/es/components/UMenu/style/status.less +49 -0
- package/es/components/UMessageBox/images/msgDark.png +0 -0
- package/es/components/UMessageBox/images/msgIcon.png +0 -0
- package/es/components/UMessageBox/index.d.ts +32 -0
- package/es/components/UMessageBox/index.js +118 -0
- package/es/components/UMessageBox/message/hooks/useMessage.d.ts +7 -0
- package/es/components/UMessageBox/message/hooks/useMessage.js +79 -0
- package/es/components/UMessageBox/message/index.d.ts +62 -0
- package/es/components/UMessageBox/message/index.js +226 -0
- package/es/components/UMessageBox/message/style/index.d.ts +2 -0
- package/es/components/UMessageBox/message/style/index.js +2 -0
- package/es/components/UMessageBox/message/style/index.less +98 -0
- package/es/components/UMessageBox/message/style/rtl.less +17 -0
- package/es/components/UMessageBox/style/index.d.ts +1 -0
- package/es/components/UMessageBox/style/index.js +1 -0
- package/es/components/UMessageBox/style/index.less +16 -0
- package/es/components/UMessageBox/style/mixin.less +86 -0
- package/es/components/UMessageBox/style/theme.less +12 -0
- package/es/components/UModal/images/form_delete_default.png +0 -0
- package/es/components/UModal/images/form_delete_hover.png +0 -0
- package/es/components/UModal/images/icon_delete_default.png +0 -0
- package/es/components/UModal/images/icon_delete_down.png +0 -0
- package/es/components/UModal/images/icon_delete_hover.png +0 -0
- package/es/components/UModal/index.d.ts +40 -0
- package/es/components/UModal/index.js +322 -0
- package/es/components/UModal/modal/ConfirmDialog.d.ts +12 -0
- package/es/components/UModal/modal/ConfirmDialog.js +125 -0
- package/es/components/UModal/modal/Modal.d.ts +120 -0
- package/es/components/UModal/modal/Modal.js +116 -0
- package/es/components/UModal/modal/confirm.d.ts +22 -0
- package/es/components/UModal/modal/confirm.js +179 -0
- package/es/components/UModal/modal/destroyFns.d.ts +2 -0
- package/es/components/UModal/modal/destroyFns.js +2 -0
- package/es/components/UModal/modal/index.d.ts +13 -0
- package/es/components/UModal/modal/index.js +34 -0
- package/es/components/UModal/modal/locale.d.ts +8 -0
- package/es/components/UModal/modal/locale.js +12 -0
- package/es/components/UModal/modal/style/confirm.less +79 -0
- package/es/components/UModal/modal/style/index.d.ts +3 -0
- package/es/components/UModal/modal/style/index.js +5 -0
- package/es/components/UModal/modal/style/index.less +7 -0
- package/es/components/UModal/modal/style/modal.less +134 -0
- package/es/components/UModal/modal/style/rtl.less +74 -0
- package/es/components/UModal/modal/useModal/HookModal.d.ts +12 -0
- package/es/components/UModal/modal/useModal/HookModal.js +71 -0
- package/es/components/UModal/modal/useModal/index.d.ts +3 -0
- package/es/components/UModal/modal/useModal/index.js +104 -0
- package/es/components/UModal/style/index.d.ts +1 -0
- package/es/components/UModal/style/index.js +1 -0
- package/es/components/UModal/style/index.less +14 -0
- package/es/components/UModal/style/mixin.less +401 -0
- package/es/components/UModal/style/theme.less +23 -0
- package/es/components/UNotification/hooks/useNotification.d.ts +7 -0
- package/es/components/UNotification/hooks/useNotification.js +55 -0
- package/es/components/UNotification/index.d.ts +56 -0
- package/es/components/UNotification/index.js +275 -0
- package/es/components/UNotification/style/index.d.ts +2 -0
- package/es/components/UNotification/style/index.js +2 -0
- package/es/components/UNotification/style/index.less +205 -0
- package/es/components/UNotification/style/placement.less +68 -0
- package/es/components/UNotification/style/rtl.less +53 -0
- package/es/components/UPageHeader/index.d.ts +25 -0
- package/es/components/UPageHeader/index.js +150 -0
- package/es/components/UPageHeader/style/index.d.ts +4 -0
- package/es/components/UPageHeader/style/index.js +5 -0
- package/es/components/UPageHeader/style/index.less +122 -0
- package/es/components/UPageHeader/style/rtl.less +77 -0
- package/es/components/UPagination/index.d.ts +20 -0
- package/es/components/UPagination/index.js +60 -0
- package/es/components/UPagination/pagination/Pagination.d.ts +19 -0
- package/es/components/UPagination/pagination/Pagination.js +99 -0
- package/es/components/UPagination/pagination/Select.d.ts +9 -0
- package/es/components/UPagination/pagination/Select.js +15 -0
- package/es/components/UPagination/pagination/index.d.ts +4 -0
- package/es/components/UPagination/pagination/index.js +3 -0
- package/es/components/UPagination/pagination/style/index.d.ts +3 -0
- package/es/components/UPagination/pagination/style/index.js +5 -0
- package/es/components/UPagination/pagination/style/index.less +482 -0
- package/es/components/UPagination/pagination/style/rtl.less +55 -0
- package/es/components/UPagination/style/index.d.ts +1 -0
- package/es/components/UPagination/style/index.js +1 -0
- package/es/components/UPagination/style/index.less +16 -0
- package/es/components/UPagination/style/mixin.less +249 -0
- package/es/components/UPagination/style/theme.less +148 -0
- package/es/components/UPanel/UContent.d.ts +3 -0
- package/es/components/UPanel/UContent.js +14 -0
- package/es/components/UPanel/UFooter.d.ts +3 -0
- package/es/components/UPanel/UFooter.js +14 -0
- package/es/components/UPanel/UHeader.d.ts +3 -0
- package/es/components/UPanel/UHeader.js +14 -0
- package/es/components/UPanel/UPanel.d.ts +13 -0
- package/es/components/UPanel/UPanel.js +37 -0
- package/es/components/UPanel/USider.d.ts +18 -0
- package/es/components/UPanel/USider.js +67 -0
- package/es/components/UPanel/images/cllapse.png +0 -0
- package/es/components/UPanel/images/cllapse_hover.png +0 -0
- package/es/components/UPanel/images/open.png +0 -0
- package/es/components/UPanel/images/open_hover.png +0 -0
- package/es/components/UPanel/index.d.ts +3 -0
- package/es/components/UPanel/index.js +3 -0
- package/es/components/UPanel/style/index.d.ts +1 -0
- package/es/components/UPanel/style/index.js +1 -0
- package/es/components/UPanel/style/index.less +15 -0
- package/es/components/UPanel/style/mixin.less +73 -0
- package/es/components/UPanel/style/theme.less +3 -0
- package/es/components/UPanel/td.d.ts +5 -0
- package/es/components/UPanel/td.js +1 -0
- package/es/components/UPopconfirm/PurePanel.d.ts +13 -0
- package/es/components/UPopconfirm/PurePanel.js +53 -0
- package/es/components/UPopconfirm/index.d.ts +31 -0
- package/es/components/UPopconfirm/index.js +111 -0
- package/es/components/UPopconfirm/style/index.d.ts +4 -0
- package/es/components/UPopconfirm/style/index.js +6 -0
- package/es/components/UPopconfirm/style/index.less +36 -0
- package/es/components/UPopover/index.d.ts +10 -0
- package/es/components/UPopover/index.js +61 -0
- package/es/components/UPopover/style/index.d.ts +2 -0
- package/es/components/UPopover/style/index.js +4 -0
- package/es/components/UPopover/style/index.less +262 -0
- package/es/components/UPopover/style/rtl.less +39 -0
- package/es/components/UProgress/image/progressDark.png +0 -0
- package/es/components/UProgress/image/progressIcon.png +0 -0
- package/es/components/UProgress/index.d.ts +38 -0
- package/es/components/UProgress/index.js +118 -0
- package/es/components/UProgress/progress/Circle.d.ts +10 -0
- package/es/components/UProgress/progress/Circle.js +80 -0
- package/es/components/UProgress/progress/Line.d.ts +38 -0
- package/es/components/UProgress/progress/Line.js +113 -0
- package/es/components/UProgress/progress/Steps.d.ts +10 -0
- package/es/components/UProgress/progress/Steps.js +38 -0
- package/es/components/UProgress/progress/index.d.ts +4 -0
- package/es/components/UProgress/progress/index.js +3 -0
- package/es/components/UProgress/progress/progress.d.ts +46 -0
- package/es/components/UProgress/progress/progress.js +104 -0
- package/es/components/UProgress/progress/style/index.d.ts +2 -0
- package/es/components/UProgress/progress/style/index.js +2 -0
- package/es/components/UProgress/progress/style/index.less +210 -0
- package/es/components/UProgress/progress/style/rtl.less +37 -0
- package/es/components/UProgress/progress/utils.d.ts +8 -0
- package/es/components/UProgress/progress/utils.js +24 -0
- package/es/components/UProgress/style/index.d.ts +1 -0
- package/es/components/UProgress/style/index.js +1 -0
- package/es/components/UProgress/style/index.less +50 -0
- package/es/components/UProgress/style/mixin.less +303 -0
- package/es/components/UProgress/style/theme.less +73 -0
- package/es/components/URadioGroup/UGroup.d.ts +23 -0
- package/es/components/URadioGroup/UGroup.js +78 -0
- package/es/components/URadioGroup/URadio.d.ts +11 -0
- package/es/components/URadioGroup/URadio.js +43 -0
- package/es/components/URadioGroup/index.d.ts +8 -0
- package/es/components/URadioGroup/index.js +6 -0
- package/es/components/URadioGroup/locale/en_US.d.ts +3 -0
- package/es/components/URadioGroup/locale/en_US.js +4 -0
- package/es/components/URadioGroup/locale/locale.d.ts +3 -0
- package/es/components/URadioGroup/locale/zh_CN.d.ts +3 -0
- package/es/components/URadioGroup/locale/zh_CN.js +4 -0
- package/es/components/URadioGroup/radio/context.d.ts +7 -0
- package/es/components/URadioGroup/radio/context.js +6 -0
- package/es/components/URadioGroup/radio/group.d.ts +4 -0
- package/es/components/URadioGroup/radio/group.js +104 -0
- package/es/components/URadioGroup/radio/index.d.ts +13 -0
- package/es/components/URadioGroup/radio/index.js +10 -0
- package/es/components/URadioGroup/radio/interface.d.ts +40 -0
- package/es/components/URadioGroup/radio/interface.js +1 -0
- package/es/components/URadioGroup/radio/radio.d.ts +4 -0
- package/es/components/URadioGroup/radio/radio.js +66 -0
- package/es/components/URadioGroup/radio/radioButton.d.ts +6 -0
- package/es/components/URadioGroup/radio/radioButton.js +21 -0
- package/es/components/URadioGroup/radio/style/index.d.ts +2 -0
- package/es/components/URadioGroup/radio/style/index.js +3 -0
- package/es/components/URadioGroup/radio/style/index.less +371 -0
- package/es/components/URadioGroup/radio/style/rtl.less +61 -0
- package/es/components/URadioGroup/style/index.d.ts +1 -0
- package/es/components/URadioGroup/style/index.js +1 -0
- package/es/components/URadioGroup/style/index.less +16 -0
- package/es/components/URadioGroup/style/mixin.less +88 -0
- package/es/components/URadioGroup/style/theme.less +29 -0
- package/es/components/URate/index.d.ts +8 -0
- package/es/components/URate/index.js +39 -0
- package/es/components/URate/style/index.d.ts +3 -0
- package/es/components/URate/style/index.js +4 -0
- package/es/components/URate/style/index.less +91 -0
- package/es/components/URate/style/rtl.less +21 -0
- package/es/components/UResTree/Component/LivePlayTreeLoader.js +79 -0
- package/es/components/UResTree/Component/LivePlayTreeLoader.js.bak +72 -0
- package/es/components/UResTree/Tree/Demo.js +56 -0
- package/es/components/UResTree/Tree/Tree.js +3917 -0
- package/es/components/UResTree/Tree/TreeIcon.js +36 -0
- package/es/components/UResTree/Tree/TreeLoader.js +140 -0
- package/es/components/UResTree/Tree/TreeNode.js +102 -0
- package/es/components/UResTree/Tree/UTreeIcon.js +647 -0
- package/es/components/UResTree/Tree/UTreeLoader.js +1081 -0
- package/es/components/UResTree/Tree/UTreeNode.js +94 -0
- package/es/components/UResTree/Tree/images/DVI.png +0 -0
- package/es/components/UResTree/Tree/images/DVIAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/DVIOffline.png +0 -0
- package/es/components/UResTree/Tree/images/DrivebyCamera.png +0 -0
- package/es/components/UResTree/Tree/images/DrivebyCameraOffline.png +0 -0
- package/es/components/UResTree/Tree/images/IPC.png +0 -0
- package/es/components/UResTree/Tree/images/IPC_offline.png +0 -0
- package/es/components/UResTree/Tree/images/Imagestitch.png +0 -0
- package/es/components/UResTree/Tree/images/LED.png +0 -0
- package/es/components/UResTree/Tree/images/LEDOffline.png +0 -0
- package/es/components/UResTree/Tree/images/NVR.png +0 -0
- package/es/components/UResTree/Tree/images/NVROffline.png +0 -0
- package/es/components/UResTree/Tree/images/NVR_offline.png +0 -0
- package/es/components/UResTree/Tree/images/VGA.png +0 -0
- package/es/components/UResTree/Tree/images/VGAOffline.png +0 -0
- package/es/components/UResTree/Tree/images/alarmOffline.png +0 -0
- package/es/components/UResTree/Tree/images/alarmshebei.png +0 -0
- package/es/components/UResTree/Tree/images/banqiubianjiao-err.png +0 -0
- package/es/components/UResTree/Tree/images/banqiubianjiao-offLine.png +0 -0
- package/es/components/UResTree/Tree/images/banqiubianjiao.png +0 -0
- package/es/components/UResTree/Tree/images/baojingshebei.png +0 -0
- package/es/components/UResTree/Tree/images/baojingshebeiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/bukekonggaoqingqiuji.png +0 -0
- package/es/components/UResTree/Tree/images/bukekonggaoqingqiujiOffLine.png +0 -0
- package/es/components/UResTree/Tree/images/bukekongqiuji.png +0 -0
- package/es/components/UResTree/Tree/images/bukekongqiujiAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/bukekongqiujiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/caijishebei.png +0 -0
- package/es/components/UResTree/Tree/images/caijishebeiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/caijixitong.png +0 -0
- package/es/components/UResTree/Tree/images/caijixitongOffline.png +0 -0
- package/es/components/UResTree/Tree/images/chezaishexiangji.png +0 -0
- package/es/components/UResTree/Tree/images/chezaishexiangjiAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/chezaishexiangjiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/dae.png +0 -0
- package/es/components/UResTree/Tree/images/daeOffline.png +0 -0
- package/es/components/UResTree/Tree/images/device_icon-24x24.png +0 -0
- package/es/components/UResTree/Tree/images/duijiangfenji.png +0 -0
- package/es/components/UResTree/Tree/images/duijiangfenjiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/fenxixitong.png +0 -0
- package/es/components/UResTree/Tree/images/fenxixitongOffline.png +0 -0
- package/es/components/UResTree/Tree/images/foldClose.png +0 -0
- package/es/components/UResTree/Tree/images/foldOpen.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingqiangji.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingqiangjiAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingqiangjiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingyuntai.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingyuntaiAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingyuntaiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingyuyan.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingyuyanAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/gaoqingyuyanOffline.png +0 -0
- package/es/components/UResTree/Tree/images/hemisphere-err.png +0 -0
- package/es/components/UResTree/Tree/images/hemisphere-offline.png +0 -0
- package/es/components/UResTree/Tree/images/hemisphere.png +0 -0
- package/es/components/UResTree/Tree/images/icon16.png +0 -0
- package/es/components/UResTree/Tree/images/kaiguanliang.png +0 -0
- package/es/components/UResTree/Tree/images/laiguanlaingOffline.png +0 -0
- package/es/components/UResTree/Tree/images/lunqie.png +0 -0
- package/es/components/UResTree/Tree/images/menjin.png +0 -0
- package/es/components/UResTree/Tree/images/menjinOffline.png +0 -0
- package/es/components/UResTree/Tree/images/monitor.png +0 -0
- package/es/components/UResTree/Tree/images/monitorOffLine.png +0 -0
- package/es/components/UResTree/Tree/images/qiangji.png +0 -0
- package/es/components/UResTree/Tree/images/qiangjiAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/qiangjiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/qiangqiuliandong.png +0 -0
- package/es/components/UResTree/Tree/images/qiangqiuliandongOffline.png +0 -0
- package/es/components/UResTree/Tree/images/radar-offline.png +0 -0
- package/es/components/UResTree/Tree/images/radar.png +0 -0
- package/es/components/UResTree/Tree/images/rfid.png +0 -0
- package/es/components/UResTree/Tree/images/root.png +0 -0
- package/es/components/UResTree/Tree/images/spriteIcon.png +0 -0
- package/es/components/UResTree/Tree/images/stkIcon.png +0 -0
- package/es/components/UResTree/Tree/images/stkTollgate.png +0 -0
- package/es/components/UResTree/Tree/images/tollgate.png +0 -0
- package/es/components/UResTree/Tree/images/tollgateOffLine.png +0 -0
- package/es/components/UResTree/Tree/images/user.png +0 -0
- package/es/components/UResTree/Tree/images/videoGroup.png +0 -0
- package/es/components/UResTree/Tree/images/waiyu.png +0 -0
- package/es/components/UResTree/Tree/images/waiyuOffline.png +0 -0
- package/es/components/UResTree/Tree/images/wifi.png +0 -0
- package/es/components/UResTree/Tree/images/yingyongpingtai.png +0 -0
- package/es/components/UResTree/Tree/images/yingyongpingtaiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/yuntai.png +0 -0
- package/es/components/UResTree/Tree/images/yuntaiOffline.png +0 -0
- package/es/components/UResTree/Tree/images/yuyan.png +0 -0
- package/es/components/UResTree/Tree/images/yuyanAlarm.png +0 -0
- package/es/components/UResTree/Tree/images/yuyanOffline.png +0 -0
- package/es/components/UResTree/Tree/images/ziyuanlunxun.png +0 -0
- package/es/components/UResTree/Tree/images/zulunxunTV.png +0 -0
- package/es/components/UResTree/Tree/images/zulunxunTVPlay.png +0 -0
- package/es/components/UResTree/Tree/images/zulunxunXP.png +0 -0
- package/es/components/UResTree/Tree/images/zulunxunXPPlay.png +0 -0
- package/es/components/UResTree/Tree/images/zulunxunziyuan.png +0 -0
- package/es/components/UResTree/Tree/images/zuxianshiTV.png +0 -0
- package/es/components/UResTree/Tree/images/zuxianshiXP.png +0 -0
- package/es/components/UResTree/Tree/style/index.js +2 -0
- package/es/components/UResTree/Tree/style/tree.less +278 -0
- package/es/components/UResTree/Tree/style/treeIcon.less +635 -0
- package/es/components/UResTree/Tree/treeResTypes.js +272 -0
- package/es/components/UResTree/index.js +405 -0
- package/es/components/UResTree/locale/en_US.d.ts +3 -0
- package/es/components/UResTree/locale/en_US.js +8 -0
- package/es/components/UResTree/locale/locale.d.ts +7 -0
- package/es/components/UResTree/locale/zh_CN.d.ts +3 -0
- package/es/components/UResTree/locale/zh_CN.js +8 -0
- package/es/components/UResTree/style/index.d.ts +1 -0
- package/es/components/UResTree/style/index.js +1 -0
- package/es/components/UResTree/style/index.less +16 -0
- package/es/components/UResTree/style/mixin.less +157 -0
- package/es/components/UResTree/style/theme.less +68 -0
- package/es/components/UResult/index.d.ts +33 -0
- package/es/components/UResult/index.js +97 -0
- package/es/components/UResult/noFound.d.ts +2 -0
- package/es/components/UResult/noFound.js +237 -0
- package/es/components/UResult/serverError.d.ts +2 -0
- package/es/components/UResult/serverError.js +277 -0
- package/es/components/UResult/style/index.d.ts +2 -0
- package/es/components/UResult/style/index.js +2 -0
- package/es/components/UResult/style/index.less +75 -0
- package/es/components/UResult/style/rtl.less +25 -0
- package/es/components/UResult/unauthorized.d.ts +2 -0
- package/es/components/UResult/unauthorized.js +227 -0
- package/es/components/URow/index.d.ts +4 -0
- package/es/components/URow/index.js +3 -0
- package/es/components/URow/style/index.d.ts +2 -0
- package/es/components/URow/style/index.js +4 -0
- package/es/components/USegmented/index.d.ts +23 -0
- package/es/components/USegmented/index.js +58 -0
- package/es/components/USegmented/style/index.d.ts +2 -0
- package/es/components/USegmented/style/index.js +2 -0
- package/es/components/USegmented/style/index.less +139 -0
- package/es/components/USegmented/style/mixins.less +24 -0
- package/es/components/USegmented/style/rtl.less +15 -0
- package/es/components/USelect/images/arrow.png +0 -0
- package/es/components/USelect/images/empty.png +0 -0
- package/es/components/USelect/index.d.ts +4 -0
- package/es/components/USelect/index.js +3 -0
- package/es/components/USelect/locale/en_US.d.ts +3 -0
- package/es/components/USelect/locale/en_US.js +4 -0
- package/es/components/USelect/locale/locale.d.ts +3 -0
- package/es/components/USelect/locale/zh_CN.d.ts +3 -0
- package/es/components/USelect/locale/zh_CN.js +4 -0
- package/es/components/USelect/select/index.d.ts +49 -0
- package/es/components/USelect/select/index.js +180 -0
- package/es/components/USelect/select/style/index.d.ts +3 -0
- package/es/components/USelect/select/style/index.js +5 -0
- package/es/components/USelect/select/style/index.less +342 -0
- package/es/components/USelect/select/style/multiple.less +222 -0
- package/es/components/USelect/select/style/rtl.less +170 -0
- package/es/components/USelect/select/style/single.less +172 -0
- package/es/components/USelect/select/style/status.less +51 -0
- package/es/components/USelect/select/utils/iconUtil.d.ts +21 -0
- package/es/components/USelect/select/utils/iconUtil.js +69 -0
- package/es/components/USelect/style/index.d.ts +1 -0
- package/es/components/USelect/style/index.js +1 -0
- package/es/components/USelect/style/index.less +25 -0
- package/es/components/USelect/style/mixin.less +264 -0
- package/es/components/USelect/style/theme.less +92 -0
- package/es/components/USkeleton/Avatar.d.ts +7 -0
- package/es/components/USkeleton/Avatar.js +31 -0
- package/es/components/USkeleton/Button.d.ts +8 -0
- package/es/components/USkeleton/Button.js +30 -0
- package/es/components/USkeleton/Element.d.ts +11 -0
- package/es/components/USkeleton/Element.js +27 -0
- package/es/components/USkeleton/Image.d.ts +6 -0
- package/es/components/USkeleton/Image.js +32 -0
- package/es/components/USkeleton/Input.d.ts +8 -0
- package/es/components/USkeleton/Input.js +29 -0
- package/es/components/USkeleton/Node.d.ts +8 -0
- package/es/components/USkeleton/Node.js +27 -0
- package/es/components/USkeleton/Paragraph.d.ts +11 -0
- package/es/components/USkeleton/Paragraph.js +44 -0
- package/es/components/USkeleton/Skeleton.d.ts +31 -0
- package/es/components/USkeleton/Skeleton.js +130 -0
- package/es/components/USkeleton/Title.d.ts +9 -0
- package/es/components/USkeleton/Title.js +16 -0
- package/es/components/USkeleton/index.d.ts +4 -0
- package/es/components/USkeleton/index.js +3 -0
- package/es/components/USkeleton/style/index.d.ts +2 -0
- package/es/components/USkeleton/style/index.js +2 -0
- package/es/components/USkeleton/style/index.less +290 -0
- package/es/components/USkeleton/style/rtl.less +48 -0
- package/es/components/USlider/index.d.ts +30 -0
- package/es/components/USlider/index.js +486 -0
- package/es/components/USlider/slider/SliderTooltip.d.ts +4 -0
- package/es/components/USlider/slider/SliderTooltip.js +33 -0
- package/es/components/USlider/slider/index.d.ts +90 -0
- package/es/components/USlider/slider/index.js +129 -0
- package/es/components/USlider/slider/style/index.d.ts +3 -0
- package/es/components/USlider/slider/style/index.js +4 -0
- package/es/components/USlider/slider/style/index.less +215 -0
- package/es/components/USlider/slider/style/rtl.less +49 -0
- package/es/components/USlider/style/index.d.ts +1 -0
- package/es/components/USlider/style/index.js +1 -0
- package/es/components/USlider/style/index.less +16 -0
- package/es/components/USlider/style/mixin.less +205 -0
- package/es/components/USlider/style/theme.less +38 -0
- package/es/components/USpace/Compact.d.ts +24 -0
- package/es/components/USpace/Compact.js +76 -0
- package/es/components/USpace/Item.d.ts +11 -0
- package/es/components/USpace/Item.js +44 -0
- package/es/components/USpace/index.d.ts +26 -0
- package/es/components/USpace/index.js +119 -0
- package/es/components/USpace/style/compact.less +17 -0
- package/es/components/USpace/style/index.d.ts +2 -0
- package/es/components/USpace/style/index.js +2 -0
- package/es/components/USpace/style/index.less +40 -0
- package/es/components/USpace/style/rtl.less +14 -0
- package/es/components/USpin/index.d.ts +25 -0
- package/es/components/USpin/index.js +131 -0
- package/es/components/USpin/style/index.d.ts +2 -0
- package/es/components/USpin/style/index.js +2 -0
- package/es/components/USpin/style/index.less +218 -0
- package/es/components/USpin/style/rtl.less +20 -0
- package/es/components/UStatistic/Countdown.d.ts +11 -0
- package/es/components/UStatistic/Countdown.js +61 -0
- package/es/components/UStatistic/Number.d.ts +7 -0
- package/es/components/UStatistic/Number.js +46 -0
- package/es/components/UStatistic/Statistic.d.ts +22 -0
- package/es/components/UStatistic/Statistic.js +60 -0
- package/es/components/UStatistic/index.d.ts +4 -0
- package/es/components/UStatistic/index.js +5 -0
- package/es/components/UStatistic/style/index.d.ts +3 -0
- package/es/components/UStatistic/style/index.js +4 -0
- package/es/components/UStatistic/style/index.less +44 -0
- package/es/components/UStatistic/style/rtl.less +21 -0
- package/es/components/UStatistic/utils.d.ts +16 -0
- package/es/components/UStatistic/utils.js +46 -0
- package/es/components/USteps/index.d.ts +39 -0
- package/es/components/USteps/index.js +83 -0
- package/es/components/USteps/style/custom-icon.less +32 -0
- package/es/components/USteps/style/index.d.ts +3 -0
- package/es/components/USteps/style/index.js +5 -0
- package/es/components/USteps/style/index.less +255 -0
- package/es/components/USteps/style/label-placement.less +45 -0
- package/es/components/USteps/style/nav.less +134 -0
- package/es/components/USteps/style/progress-dot.less +112 -0
- package/es/components/USteps/style/progress.less +49 -0
- package/es/components/USteps/style/rtl.less +287 -0
- package/es/components/USteps/style/small.less +48 -0
- package/es/components/USteps/style/vertical.less +73 -0
- package/es/components/USteps/useLegacyItems.d.ts +3 -0
- package/es/components/USteps/useLegacyItems.js +23 -0
- package/es/components/USwitch/index.d.ts +31 -0
- package/es/components/USwitch/index.js +95 -0
- package/es/components/USwitch/locale/en_US.d.ts +3 -0
- package/es/components/USwitch/locale/en_US.js +5 -0
- package/es/components/USwitch/locale/locale.d.ts +4 -0
- package/es/components/USwitch/locale/zh_CN.d.ts +3 -0
- package/es/components/USwitch/locale/zh_CN.js +5 -0
- package/es/components/USwitch/style/index.d.ts +1 -0
- package/es/components/USwitch/style/index.js +1 -0
- package/es/components/USwitch/style/index.less +16 -0
- package/es/components/USwitch/style/mixin.less +85 -0
- package/es/components/USwitch/style/theme.less +17 -0
- package/es/components/USwitch/switch/index.d.ts +26 -0
- package/es/components/USwitch/switch/index.js +53 -0
- package/es/components/USwitch/switch/style/index.d.ts +2 -0
- package/es/components/USwitch/switch/style/index.js +2 -0
- package/es/components/USwitch/switch/style/index.less +154 -0
- package/es/components/USwitch/switch/style/rtl.less +52 -0
- package/es/components/UTable/index.d.ts +52 -0
- package/es/components/UTable/index.js +420 -0
- package/es/components/UTable/style/index.d.ts +1 -0
- package/es/components/UTable/style/index.js +1 -0
- package/es/components/UTable/style/index.less +24 -0
- package/es/components/UTable/style/mixin.less +304 -0
- package/es/components/UTable/style/theme.less +87 -0
- package/es/components/UTable/table/Column.d.ts +7 -0
- package/es/components/UTable/table/Column.js +7 -0
- package/es/components/UTable/table/ColumnGroup.d.ts +9 -0
- package/es/components/UTable/table/ColumnGroup.js +7 -0
- package/es/components/UTable/table/ExpandIcon.d.ts +11 -0
- package/es/components/UTable/table/ExpandIcon.js +27 -0
- package/es/components/UTable/table/Table.d.ts +49 -0
- package/es/components/UTable/table/Table.js +400 -0
- package/es/components/UTable/table/hooks/useFilter/FilterDropdown.d.ts +27 -0
- package/es/components/UTable/table/hooks/useFilter/FilterDropdown.js +440 -0
- package/es/components/UTable/table/hooks/useFilter/FilterSearch.d.ts +11 -0
- package/es/components/UTable/table/hooks/useFilter/FilterSearch.js +25 -0
- package/es/components/UTable/table/hooks/useFilter/FilterWrapper.d.ts +7 -0
- package/es/components/UTable/table/hooks/useFilter/FilterWrapper.js +18 -0
- package/es/components/UTable/table/hooks/useFilter/index.d.ts +23 -0
- package/es/components/UTable/table/hooks/useFilter/index.js +193 -0
- package/es/components/UTable/table/hooks/useLazyKVMap.d.ts +2 -0
- package/es/components/UTable/table/hooks/useLazyKVMap.js +30 -0
- package/es/components/UTable/table/hooks/usePagination.d.ts +4 -0
- package/es/components/UTable/table/hooks/usePagination.js +86 -0
- package/es/components/UTable/table/hooks/useSelection.d.ts +19 -0
- package/es/components/UTable/table/hooks/useSelection.js +563 -0
- package/es/components/UTable/table/hooks/useSorter.d.ts +24 -0
- package/es/components/UTable/table/hooks/useSorter.js +337 -0
- package/es/components/UTable/table/hooks/useTitleColumns.d.ts +2 -0
- package/es/components/UTable/table/hooks/useTitleColumns.js +18 -0
- package/es/components/UTable/table/index.d.ts +6 -0
- package/es/components/UTable/table/index.js +3 -0
- package/es/components/UTable/table/interface.d.ts +165 -0
- package/es/components/UTable/table/interface.js +2 -0
- package/es/components/UTable/table/style/bordered.less +131 -0
- package/es/components/UTable/table/style/index.d.ts +12 -0
- package/es/components/UTable/table/style/index.js +15 -0
- package/es/components/UTable/table/style/index.less +854 -0
- package/es/components/UTable/table/style/radius.less +49 -0
- package/es/components/UTable/table/style/rtl.less +168 -0
- package/es/components/UTable/table/style/size.less +51 -0
- package/es/components/UTable/table/util.d.ts +14 -0
- package/es/components/UTable/table/util.js +31 -0
- package/es/components/UTabs/images/icon-delete-default.png +0 -0
- package/es/components/UTabs/images/icon-delete-hover.png +0 -0
- package/es/components/UTabs/index.d.ts +26 -0
- package/es/components/UTabs/index.js +53 -0
- package/es/components/UTabs/style/index.d.ts +1 -0
- package/es/components/UTabs/style/index.js +1 -0
- package/es/components/UTabs/style/index.less +24 -0
- package/es/components/UTabs/style/mixin.less +234 -0
- package/es/components/UTabs/style/theme.less +65 -0
- package/es/components/UTabs/tabs/TabPane.d.ts +5 -0
- package/es/components/UTabs/tabs/TabPane.js +7 -0
- package/es/components/UTabs/tabs/hooks/useAnimateConfig.d.ts +3 -0
- package/es/components/UTabs/tabs/hooks/useAnimateConfig.js +35 -0
- package/es/components/UTabs/tabs/hooks/useLegacyItems.d.ts +4 -0
- package/es/components/UTabs/tabs/hooks/useLegacyItems.js +32 -0
- package/es/components/UTabs/tabs/index.d.ts +22 -0
- package/es/components/UTabs/tabs/index.js +73 -0
- package/es/components/UTabs/tabs/style/card.less +98 -0
- package/es/components/UTabs/tabs/style/dropdown.less +82 -0
- package/es/components/UTabs/tabs/style/index.d.ts +2 -0
- package/es/components/UTabs/tabs/style/index.js +2 -0
- package/es/components/UTabs/tabs/style/index.less +253 -0
- package/es/components/UTabs/tabs/style/position.less +198 -0
- package/es/components/UTabs/tabs/style/rtl.less +86 -0
- package/es/components/UTabs/tabs/style/size.less +42 -0
- package/es/components/UTags/images/gray_select.png +0 -0
- package/es/components/UTags/images/option_selected.png +0 -0
- package/es/components/UTags/index.d.ts +27 -0
- package/es/components/UTags/index.js +100 -0
- package/es/components/UTags/style/index.d.ts +1 -0
- package/es/components/UTags/style/index.js +1 -0
- package/es/components/UTags/style/index.less +22 -0
- package/es/components/UTags/style/mixin.less +94 -0
- package/es/components/UTags/style/theme.less +32 -0
- package/es/components/UTags/tag/CheckableTag.d.ts +17 -0
- package/es/components/UTags/tag/CheckableTag.js +29 -0
- package/es/components/UTags/tag/index.d.ts +23 -0
- package/es/components/UTags/tag/index.js +102 -0
- package/es/components/UTags/tag/style/index.d.ts +2 -0
- package/es/components/UTags/tag/style/index.js +2 -0
- package/es/components/UTags/tag/style/index.less +133 -0
- package/es/components/UTags/tag/style/rtl.less +28 -0
- package/es/components/UTextArea/index.d.ts +21 -0
- package/es/components/UTextArea/index.js +125 -0
- package/es/components/UTextArea/locale/en_US.d.ts +3 -0
- package/es/components/UTextArea/locale/en_US.js +4 -0
- package/es/components/UTextArea/locale/locale.d.ts +3 -0
- package/es/components/UTextArea/locale/zh_CN.d.ts +3 -0
- package/es/components/UTextArea/locale/zh_CN.js +4 -0
- package/es/components/UTextArea/style/index.d.ts +1 -0
- package/es/components/UTextArea/style/index.js +1 -0
- package/es/components/UTextArea/style/index.less +16 -0
- package/es/components/UTextArea/style/mixin.less +145 -0
- package/es/components/UTextArea/style/theme.less +62 -0
- package/es/components/UTimeline/Timeline.d.ts +18 -0
- package/es/components/UTimeline/Timeline.js +72 -0
- package/es/components/UTimeline/TimelineItem.d.ts +17 -0
- package/es/components/UTimeline/TimelineItem.js +43 -0
- package/es/components/UTimeline/index.d.ts +5 -0
- package/es/components/UTimeline/index.js +3 -0
- package/es/components/UTimeline/style/index.d.ts +2 -0
- package/es/components/UTimeline/style/index.js +2 -0
- package/es/components/UTimeline/style/index.less +185 -0
- package/es/components/UTimeline/style/rtl.less +135 -0
- package/es/components/UTipForm/UTips.js +160 -0
- package/es/components/UTipForm/index.js +34 -0
- package/es/components/UTipForm/style/index.d.ts +1 -0
- package/es/components/UTipForm/style/index.js +1 -0
- package/es/components/UTipForm/style/index.less +57 -0
- package/es/components/UTipForm/style/mixin.less +85 -0
- package/es/components/UTipForm/style/theme.less +16 -0
- package/es/components/UTooltip/index.d.ts +4 -0
- package/es/components/UTooltip/index.js +3 -0
- package/es/components/UTooltip/style/index.d.ts +1 -0
- package/es/components/UTooltip/style/index.js +1 -0
- package/es/components/UTooltip/style/index.less +16 -0
- package/es/components/UTooltip/style/mixin.less +15 -0
- package/es/components/UTooltip/style/theme.less +7 -0
- package/es/components/UTooltip/tooltip/index.d.ts +72 -0
- package/es/components/UTooltip/tooltip/index.js +220 -0
- package/es/components/UTooltip/tooltip/style/index.d.ts +2 -0
- package/es/components/UTooltip/tooltip/style/index.js +2 -0
- package/es/components/UTooltip/tooltip/style/index.less +226 -0
- package/es/components/UTooltip/tooltip/style/rtl.less +14 -0
- package/es/components/UTransfer/TransferPanel.d.ts +6 -0
- package/es/components/UTransfer/TransferPanel.js +324 -0
- package/es/components/UTransfer/TransferTable.d.ts +5 -0
- package/es/components/UTransfer/TransferTable.js +172 -0
- package/es/components/UTransfer/TransferTree.d.ts +4 -0
- package/es/components/UTransfer/TransferTree.js +32 -0
- package/es/components/UTransfer/images/arrow_default.png +0 -0
- package/es/components/UTransfer/images/arrow_down.png +0 -0
- package/es/components/UTransfer/images/arrow_hover.png +0 -0
- package/es/components/UTransfer/images/icon_delete-default.png +0 -0
- package/es/components/UTransfer/images/icon_delete_down.png +0 -0
- package/es/components/UTransfer/images/icon_delete_hover.png +0 -0
- package/es/components/UTransfer/images/item_delete-default.png +0 -0
- package/es/components/UTransfer/images/item_delete_hover.png +0 -0
- package/es/components/UTransfer/index.d.ts +16 -0
- package/es/components/UTransfer/index.js +1346 -0
- package/es/components/UTransfer/index.td.d.ts +106 -0
- package/es/components/UTransfer/index.td.js +1 -0
- package/es/components/UTransfer/locale/en_US.d.ts +3 -0
- package/es/components/UTransfer/locale/en_US.js +7 -0
- package/es/components/UTransfer/locale/locale.d.ts +6 -0
- package/es/components/UTransfer/locale/zh_CN.d.ts +3 -0
- package/es/components/UTransfer/locale/zh_CN.js +7 -0
- package/es/components/UTransfer/style/index.d.ts +1 -0
- package/es/components/UTransfer/style/index.js +1 -0
- package/es/components/UTransfer/style/index.less +16 -0
- package/es/components/UTransfer/style/mixin.less +366 -0
- package/es/components/UTransfer/style/theme.less +140 -0
- package/es/components/UTransfer/transfer/ListBody.d.ts +29 -0
- package/es/components/UTransfer/transfer/ListBody.js +147 -0
- package/es/components/UTransfer/transfer/ListItem.d.ts +15 -0
- package/es/components/UTransfer/transfer/ListItem.js +60 -0
- package/es/components/UTransfer/transfer/index.d.ts +141 -0
- package/es/components/UTransfer/transfer/index.js +400 -0
- package/es/components/UTransfer/transfer/interface.d.ts +6 -0
- package/es/components/UTransfer/transfer/interface.js +1 -0
- package/es/components/UTransfer/transfer/list.d.ts +75 -0
- package/es/components/UTransfer/transfer/list.js +362 -0
- package/es/components/UTransfer/transfer/operation.d.ts +17 -0
- package/es/components/UTransfer/transfer/operation.js +36 -0
- package/es/components/UTransfer/transfer/search.d.ts +10 -0
- package/es/components/UTransfer/transfer/search.js +29 -0
- package/es/components/UTransfer/transfer/style/customize.less +52 -0
- package/es/components/UTransfer/transfer/style/index.d.ts +8 -0
- package/es/components/UTransfer/transfer/style/index.js +10 -0
- package/es/components/UTransfer/transfer/style/index.less +293 -0
- package/es/components/UTransfer/transfer/style/rtl.less +71 -0
- package/es/components/UTransfer/transfer/style/status.less +31 -0
- package/es/components/UTree/DirectoryTree.d.ts +20 -0
- package/es/components/UTree/DirectoryTree.js +165 -0
- package/es/components/UTree/Tree.d.ts +162 -0
- package/es/components/UTree/Tree.js +303 -0
- package/es/components/UTree/index.d.ts +23 -0
- package/es/components/UTree/index.js +10 -0
- package/es/components/UTree/style/directory.less +72 -0
- package/es/components/UTree/style/index.d.ts +2 -0
- package/es/components/UTree/style/index.js +2 -0
- package/es/components/UTree/style/index.less +16 -0
- package/es/components/UTree/style/mixin.less +443 -0
- package/es/components/UTree/style/rtl.less +77 -0
- package/es/components/UTree/style/svg/caretDown.svg +4 -0
- package/es/components/UTree/style/svg/caretRight.svg +4 -0
- package/es/components/UTree/utils/dictUtil.d.ts +9 -0
- package/es/components/UTree/utils/dictUtil.js +73 -0
- package/es/components/UTree/utils/dropIndicator.d.ts +8 -0
- package/es/components/UTree/utils/dropIndicator.js +34 -0
- package/es/components/UTree/utils/iconUtil.d.ts +5 -0
- package/es/components/UTree/utils/iconUtil.js +63 -0
- package/es/components/UTree/utils/transToTreeData.d.ts +39 -0
- package/es/components/UTree/utils/transToTreeData.js +97 -0
- package/es/components/UTreeSelect/index.d.ts +49 -0
- package/es/components/UTreeSelect/index.js +151 -0
- package/es/components/UTreeSelect/style/index.d.ts +4 -0
- package/es/components/UTreeSelect/style/index.js +6 -0
- package/es/components/UTreeSelect/style/index.less +59 -0
- package/es/components/UTypography/Base/Ellipsis.d.ts +15 -0
- package/es/components/UTypography/Base/Ellipsis.js +176 -0
- package/es/components/UTypography/Base/EllipsisTooltip.d.ts +13 -0
- package/es/components/UTypography/Base/EllipsisTooltip.js +18 -0
- package/es/components/UTypography/Base/index.d.ts +52 -0
- package/es/components/UTypography/Base/index.js +449 -0
- package/es/components/UTypography/Editable.d.ts +20 -0
- package/es/components/UTypography/Editable.js +111 -0
- package/es/components/UTypography/Link.d.ts +7 -0
- package/es/components/UTypography/Link.js +22 -0
- package/es/components/UTypography/Paragraph.d.ts +6 -0
- package/es/components/UTypography/Paragraph.js +10 -0
- package/es/components/UTypography/Text.d.ts +7 -0
- package/es/components/UTypography/Text.js +24 -0
- package/es/components/UTypography/Title.d.ts +8 -0
- package/es/components/UTypography/Title.js +24 -0
- package/es/components/UTypography/Typography.d.ts +17 -0
- package/es/components/UTypography/Typography.js +44 -0
- package/es/components/UTypography/hooks/useMergedConfig.d.ts +1 -0
- package/es/components/UTypography/hooks/useMergedConfig.js +8 -0
- package/es/components/UTypography/hooks/useUpdatedEffect.d.ts +4 -0
- package/es/components/UTypography/hooks/useUpdatedEffect.js +13 -0
- package/es/components/UTypography/index.d.ts +14 -0
- package/es/components/UTypography/index.js +12 -0
- package/es/components/UTypography/style/index.d.ts +4 -0
- package/es/components/UTypography/style/index.js +5 -0
- package/es/components/UTypography/style/index.less +314 -0
- package/es/components/UTypography/style/rtl.less +54 -0
- package/es/components/UUpload/Dragger.d.ts +9 -0
- package/es/components/UUpload/Dragger.js +20 -0
- package/es/components/UUpload/Upload.d.ts +6 -0
- package/es/components/UUpload/Upload.js +406 -0
- package/es/components/UUpload/UploadList/ListItem.d.ts +27 -0
- package/es/components/UUpload/UploadList/ListItem.js +201 -0
- package/es/components/UUpload/UploadList/index.d.ts +4 -0
- package/es/components/UUpload/UploadList/index.js +234 -0
- package/es/components/UUpload/index.d.ts +15 -0
- package/es/components/UUpload/index.js +7 -0
- package/es/components/UUpload/interface.d.ts +134 -0
- package/es/components/UUpload/interface.js +1 -0
- package/es/components/UUpload/style/index.d.ts +5 -0
- package/es/components/UUpload/style/index.js +7 -0
- package/es/components/UUpload/style/index.less +564 -0
- package/es/components/UUpload/style/rtl.less +165 -0
- package/es/components/UUpload/utils.d.ts +8 -0
- package/es/components/UUpload/utils.js +123 -0
- package/es/components/UUploadFile/ThumnNail/images/download.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/download_hover.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_close_default.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_close_down.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_close_hover.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_delete_default.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_delete_hover.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_delete_small_default.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_delete_small_hover.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_large_default.png +0 -0
- package/es/components/UUploadFile/ThumnNail/images/icon_large_hover.png +0 -0
- package/es/components/UUploadFile/ThumnNail/index.d.ts +24 -0
- package/es/components/UUploadFile/ThumnNail/index.js +90 -0
- package/es/components/UUploadFile/ThumnNail/index.less +111 -0
- package/es/components/UUploadFile/UploadFile.js +1340 -0
- package/es/components/UUploadFile/Uploader.swf +0 -0
- package/es/components/UUploadFile/api.js +57 -0
- package/es/components/UUploadFile/getByteLength.d.ts +7 -0
- package/es/components/UUploadFile/getByteLength.js +36 -0
- package/es/components/UUploadFile/images/fileIcon/excel.png +0 -0
- package/es/components/UUploadFile/images/fileIcon/exe.png +0 -0
- package/es/components/UUploadFile/images/fileIcon/pdf.png +0 -0
- package/es/components/UUploadFile/images/fileIcon/ppt.png +0 -0
- package/es/components/UUploadFile/images/fileIcon/txt.png +0 -0
- package/es/components/UUploadFile/images/fileIcon/word.png +0 -0
- package/es/components/UUploadFile/images/fileIcon/zip.png +0 -0
- package/es/components/UUploadFile/images/icon_add_default.png +0 -0
- package/es/components/UUploadFile/images/icon_add_hover.png +0 -0
- package/es/components/UUploadFile/index.js +153 -0
- package/es/components/UUploadFile/locale/en_US.d.ts +3 -0
- package/es/components/UUploadFile/locale/en_US.js +24 -0
- package/es/components/UUploadFile/locale/locale.d.ts +23 -0
- package/es/components/UUploadFile/locale/zh_CN.d.ts +3 -0
- package/es/components/UUploadFile/locale/zh_CN.js +24 -0
- package/es/components/UUploadFile/style/index.d.ts +1 -0
- package/es/components/UUploadFile/style/index.js +1 -0
- package/es/components/UUploadFile/style/index.less +15 -0
- package/es/components/UUploadFile/style/mixin.less +249 -0
- package/es/components/UUploadFile/style/theme.less +40 -0
- package/es/components/UUtils/index.d.ts +7 -0
- package/es/components/UUtils/index.js +152 -0
- package/es/components/UUtils/style/index.d.ts +1 -0
- package/es/components/UUtils/style/index.js +0 -0
- package/es/components/UVersion/index.d.ts +3 -0
- package/es/components/UVersion/index.js +3 -0
- package/es/components/UVersion/style/index.d.ts +1 -0
- package/es/components/UVersion/style/index.js +2 -0
- package/es/components/UVersion/token.d.ts +319 -0
- package/es/components/UVersion/token.js +318 -0
- package/es/components/UVersion/version.d.ts +2 -0
- package/es/components/UVersion/version.js +1 -0
- package/es/components/UVideo/HideDiv.js +260 -0
- package/es/components/UVideo/Images/3D_close.png +0 -0
- package/es/components/UVideo/Images/3D_close_gray.png +0 -0
- package/es/components/UVideo/Images/3D_close_hover.png +0 -0
- package/es/components/UVideo/Images/3D_open.png +0 -0
- package/es/components/UVideo/Images/3D_open_gray.png +0 -0
- package/es/components/UVideo/Images/3D_open_hover.png +0 -0
- package/es/components/UVideo/Images/3D_position.png +0 -0
- package/es/components/UVideo/Images/3D_position_active.png +0 -0
- package/es/components/UVideo/Images/3D_position_close.png +0 -0
- package/es/components/UVideo/Images/3D_position_close_active.png +0 -0
- package/es/components/UVideo/Images/3D_position_close_gray.png +0 -0
- package/es/components/UVideo/Images/3D_position_gray.png +0 -0
- package/es/components/UVideo/Images/@ant-designicons@2x.png +0 -0
- package/es/components/UVideo/Images/DVI.png +0 -0
- package/es/components/UVideo/Images/DVIAlarm.png +0 -0
- package/es/components/UVideo/Images/DVIOffline.png +0 -0
- package/es/components/UVideo/Images/DrivebyCamera.png +0 -0
- package/es/components/UVideo/Images/DrivebyCameraOffline.png +0 -0
- package/es/components/UVideo/Images/Imagestitch.png +0 -0
- package/es/components/UVideo/Images/LED.png +0 -0
- package/es/components/UVideo/Images/LEDOffline.png +0 -0
- package/es/components/UVideo/Images/NO VIDEO.bmp +0 -0
- package/es/components/UVideo/Images/NVR.png +0 -0
- package/es/components/UVideo/Images/NVROffline.png +0 -0
- package/es/components/UVideo/Images/VGA.png +0 -0
- package/es/components/UVideo/Images/VGAOffline.png +0 -0
- package/es/components/UVideo/Images/VideoReplayControl.png +0 -0
- package/es/components/UVideo/Images/VideoReplayNoTag.png +0 -0
- package/es/components/UVideo/Images/add_fav@2x.png +0 -0
- package/es/components/UVideo/Images/alarmOffline.png +0 -0
- package/es/components/UVideo/Images/alarmshebei.png +0 -0
- package/es/components/UVideo/Images/baojingshebei.png +0 -0
- package/es/components/UVideo/Images/baojingshebeiOffline.png +0 -0
- package/es/components/UVideo/Images/batch-live@2x.png +0 -0
- package/es/components/UVideo/Images/batchLiveWallBtn.png +0 -0
- package/es/components/UVideo/Images/batch_live_default@2x.png +0 -0
- package/es/components/UVideo/Images/bukekonggaoqingqiuji.png +0 -0
- package/es/components/UVideo/Images/bukekonggaoqingqiujiOffLine.png +0 -0
- package/es/components/UVideo/Images/bukekongqiuji.png +0 -0
- package/es/components/UVideo/Images/bukekongqiujiAlarm.png +0 -0
- package/es/components/UVideo/Images/bukekongqiujiOffline.png +0 -0
- package/es/components/UVideo/Images/caijishebei.png +0 -0
- package/es/components/UVideo/Images/caijishebeiOffline.png +0 -0
- package/es/components/UVideo/Images/caijixitong.png +0 -0
- package/es/components/UVideo/Images/caijixitongOffline.png +0 -0
- package/es/components/UVideo/Images/camera.png +0 -0
- package/es/components/UVideo/Images/camera_fix.png +0 -0
- package/es/components/UVideo/Images/camera_fix@2x.png +0 -0
- package/es/components/UVideo/Images/camera_fix_hd.png +0 -0
- package/es/components/UVideo/Images/camera_fix_hd@2x.png +0 -0
- package/es/components/UVideo/Images/camera_light.png +0 -0
- package/es/components/UVideo/Images/camera_ptz.png +0 -0
- package/es/components/UVideo/Images/camera_ptz@2x.png +0 -0
- package/es/components/UVideo/Images/camera_ptz_hd.png +0 -0
- package/es/components/UVideo/Images/camera_ptz_hd@2x.png +0 -0
- package/es/components/UVideo/Images/captureGrey.png +0 -0
- package/es/components/UVideo/Images/captureHover.png +0 -0
- package/es/components/UVideo/Images/captureIcon.png +0 -0
- package/es/components/UVideo/Images/centerPoint.png +0 -0
- package/es/components/UVideo/Images/chezaishexiangji.png +0 -0
- package/es/components/UVideo/Images/chezaishexiangjiAlarm.png +0 -0
- package/es/components/UVideo/Images/chezaishexiangjiOffline.png +0 -0
- package/es/components/UVideo/Images/choose@2x.png +0 -0
- package/es/components/UVideo/Images/choose@2x_light.png +0 -0
- package/es/components/UVideo/Images/choose_hover@2x.png +0 -0
- package/es/components/UVideo/Images/close.png +0 -0
- package/es/components/UVideo/Images/close_single.png +0 -0
- package/es/components/UVideo/Images/close_single_hover.png +0 -0
- package/es/components/UVideo/Images/closeall.png +0 -0
- package/es/components/UVideo/Images/closeall_light.png +0 -0
- package/es/components/UVideo/Images/closemodal.png +0 -0
- package/es/components/UVideo/Images/closemodal_light.png +0 -0
- package/es/components/UVideo/Images/confirm_fav.png +0 -0
- package/es/components/UVideo/Images/cruisePlan.png +0 -0
- package/es/components/UVideo/Images/cutimg.png +0 -0
- package/es/components/UVideo/Images/cutimg_hover.png +0 -0
- package/es/components/UVideo/Images/dae.png +0 -0
- package/es/components/UVideo/Images/daeOffline.png +0 -0
- package/es/components/UVideo/Images/defence@2x.png +0 -0
- package/es/components/UVideo/Images/defence_default@2x.png +0 -0
- package/es/components/UVideo/Images/defence_icon@2x.png +0 -0
- package/es/components/UVideo/Images/del_input@2x.png +0 -0
- package/es/components/UVideo/Images/delete.png +0 -0
- package/es/components/UVideo/Images/delete@2x.png +0 -0
- package/es/components/UVideo/Images/delete_img.png +0 -0
- package/es/components/UVideo/Images/delete_leve@2x.png +0 -0
- package/es/components/UVideo/Images/delete_light.png +0 -0
- package/es/components/UVideo/Images/detailFormIcon.png +0 -0
- package/es/components/UVideo/Images/device_icon-24x24.png +0 -0
- package/es/components/UVideo/Images/downLoadeGray.png +0 -0
- package/es/components/UVideo/Images/downLoadeHover.png +0 -0
- package/es/components/UVideo/Images/downLoadeIcon.png +0 -0
- package/es/components/UVideo/Images/download.png +0 -0
- package/es/components/UVideo/Images/download_light.png +0 -0
- package/es/components/UVideo/Images/duijiangfenji.png +0 -0
- package/es/components/UVideo/Images/duijiangfenjiOffline.png +0 -0
- package/es/components/UVideo/Images/emptyCamera.png +0 -0
- package/es/components/UVideo/Images/emptyMonitor.png +0 -0
- package/es/components/UVideo/Images/emptyPolice.png +0 -0
- package/es/components/UVideo/Images/emptyServer.png +0 -0
- package/es/components/UVideo/Images/favorites@2x.png +0 -0
- package/es/components/UVideo/Images/favorites_default@2x.png +0 -0
- package/es/components/UVideo/Images/fenxixitong.png +0 -0
- package/es/components/UVideo/Images/fenxixitongOffline.png +0 -0
- package/es/components/UVideo/Images/file_icon@2x.png +0 -0
- package/es/components/UVideo/Images/file_icon_open@2x.png +0 -0
- package/es/components/UVideo/Images/foldClose.png +0 -0
- package/es/components/UVideo/Images/foldOpen.png +0 -0
- package/es/components/UVideo/Images/fullscreen.png +0 -0
- package/es/components/UVideo/Images/fullscreen_light.png +0 -0
- package/es/components/UVideo/Images/gaoqingqiangji.png +0 -0
- package/es/components/UVideo/Images/gaoqingqiangjiAlarm.png +0 -0
- package/es/components/UVideo/Images/gaoqingqiangjiOffline.png +0 -0
- package/es/components/UVideo/Images/gaoqingyuntai.png +0 -0
- package/es/components/UVideo/Images/gaoqingyuntaiAlarm.png +0 -0
- package/es/components/UVideo/Images/gaoqingyuntaiOffline.png +0 -0
- package/es/components/UVideo/Images/gaoqingyuyan.png +0 -0
- package/es/components/UVideo/Images/gaoqingyuyanAlarm.png +0 -0
- package/es/components/UVideo/Images/gaoqingyuyanOffline.png +0 -0
- package/es/components/UVideo/Images/gpsEndIcon.png +0 -0
- package/es/components/UVideo/Images/gpsStartIcon.png +0 -0
- package/es/components/UVideo/Images/gridsPlay@2x.png +0 -0
- package/es/components/UVideo/Images/gridsRecord@2x.png +0 -0
- package/es/components/UVideo/Images/hide_left.png +0 -0
- package/es/components/UVideo/Images/hide_left_hover.png +0 -0
- package/es/components/UVideo/Images/hide_right.png +0 -0
- package/es/components/UVideo/Images/hide_right_hover.png +0 -0
- package/es/components/UVideo/Images/icon-close.png +0 -0
- package/es/components/UVideo/Images/icon16 copy.png +0 -0
- package/es/components/UVideo/Images/icon16.png +0 -0
- package/es/components/UVideo/Images/icon24.png +0 -0
- package/es/components/UVideo/Images/kaiguanliang.png +0 -0
- package/es/components/UVideo/Images/laiguanlaingOffline.png +0 -0
- package/es/components/UVideo/Images/last.png +0 -0
- package/es/components/UVideo/Images/last_disable.png +0 -0
- package/es/components/UVideo/Images/last_hover.png +0 -0
- package/es/components/UVideo/Images/liveUnderList.png +0 -0
- package/es/components/UVideo/Images/location1@2x.png +0 -0
- package/es/components/UVideo/Images/location@2x.png +0 -0
- package/es/components/UVideo/Images/location_default@2x.png +0 -0
- package/es/components/UVideo/Images/lunqie.png +0 -0
- package/es/components/UVideo/Images/markerIcons/hd_qiang.png +0 -0
- package/es/components/UVideo/Images/markerIcons/hd_qiu.png +0 -0
- package/es/components/UVideo/Images/markerIcons/qiang.png +0 -0
- package/es/components/UVideo/Images/markerIcons/qiu.png +0 -0
- package/es/components/UVideo/Images/markerIcons/tollgate.png +0 -0
- package/es/components/UVideo/Images/maxmodal.png +0 -0
- package/es/components/UVideo/Images/maxmodal_light.png +0 -0
- package/es/components/UVideo/Images/menjin.png +0 -0
- package/es/components/UVideo/Images/menjinOffline.png +0 -0
- package/es/components/UVideo/Images/minmodal.png +0 -0
- package/es/components/UVideo/Images/minmodal_light.png +0 -0
- package/es/components/UVideo/Images/minscreen.png +0 -0
- package/es/components/UVideo/Images/minscreen_light.png +0 -0
- package/es/components/UVideo/Images/monitor.png +0 -0
- package/es/components/UVideo/Images/monitorOffLine.png +0 -0
- package/es/components/UVideo/Images/more.png +0 -0
- package/es/components/UVideo/Images/more@2x.png +0 -0
- package/es/components/UVideo/Images/more_default@2x.png +0 -0
- package/es/components/UVideo/Images/more_light.png +0 -0
- package/es/components/UVideo/Images/moveDefault.png +0 -0
- package/es/components/UVideo/Images/netgrid@2x.png +0 -0
- package/es/components/UVideo/Images/netgrid_default@2x.png +0 -0
- package/es/components/UVideo/Images/new_no_data.png +0 -0
- package/es/components/UVideo/Images/next.png +0 -0
- package/es/components/UVideo/Images/next_disable.png +0 -0
- package/es/components/UVideo/Images/next_hover.png +0 -0
- package/es/components/UVideo/Images/no_data@2x.png +0 -0
- package/es/components/UVideo/Images/no_picture.png +0 -0
- package/es/components/UVideo/Images/org.png +0 -0
- package/es/components/UVideo/Images/patrol_last.png +0 -0
- package/es/components/UVideo/Images/patrol_last_disable.png +0 -0
- package/es/components/UVideo/Images/patrol_last_light.png +0 -0
- package/es/components/UVideo/Images/patrol_next.png +0 -0
- package/es/components/UVideo/Images/patrol_next_disable.png +0 -0
- package/es/components/UVideo/Images/patrol_next_light.png +0 -0
- package/es/components/UVideo/Images/patrol_start.png +0 -0
- package/es/components/UVideo/Images/patrol_start_light.png +0 -0
- package/es/components/UVideo/Images/patrol_stop.png +0 -0
- package/es/components/UVideo/Images/patrol_stop_light.png +0 -0
- package/es/components/UVideo/Images/piliangbeifen.png +0 -0
- package/es/components/UVideo/Images/piliangshangqiang.png +0 -0
- package/es/components/UVideo/Images/play_b@3x.png +0 -0
- package/es/components/UVideo/Images/play_buck@2x.png +0 -0
- package/es/components/UVideo/Images/play_live@2x.png +0 -0
- package/es/components/UVideo/Images/play_live_default@2x.png +0 -0
- package/es/components/UVideo/Images/point_blue.png +0 -0
- package/es/components/UVideo/Images/point_red.png +0 -0
- package/es/components/UVideo/Images/police.png +0 -0
- package/es/components/UVideo/Images/policeAvatar.png +0 -0
- package/es/components/UVideo/Images/pop.png +0 -0
- package/es/components/UVideo/Images/pop_hover.png +0 -0
- package/es/components/UVideo/Images/position@2x.png +0 -0
- package/es/components/UVideo/Images/ptz-dir-icon.png +0 -0
- package/es/components/UVideo/Images/ptz-icon16.png +0 -0
- package/es/components/UVideo/Images/ptz-icon24.png +0 -0
- package/es/components/UVideo/Images/ptz-icon32.png +0 -0
- package/es/components/UVideo/Images/ptz-icon48.png +0 -0
- package/es/components/UVideo/Images/ptz-synchro-icon.gif +0 -0
- package/es/components/UVideo/Images/ptzPanelIcon.png +0 -0
- package/es/components/UVideo/Images/ptzPanelIconGrey.png +0 -0
- package/es/components/UVideo/Images/ptzPanelIconHover.png +0 -0
- package/es/components/UVideo/Images/ptz_icon_close.png +0 -0
- package/es/components/UVideo/Images/ptz_icon_close_gray.png +0 -0
- package/es/components/UVideo/Images/ptz_icon_close_hover.png +0 -0
- package/es/components/UVideo/Images/ptz_icon_open.png +0 -0
- package/es/components/UVideo/Images/ptz_icon_open_hover.png +0 -0
- package/es/components/UVideo/Images/qiangji.png +0 -0
- package/es/components/UVideo/Images/qiangjiAlarm.png +0 -0
- package/es/components/UVideo/Images/qiangjiOffline.png +0 -0
- package/es/components/UVideo/Images/qiangqiuliandong.png +0 -0
- package/es/components/UVideo/Images/qiangqiuliandongOffline.png +0 -0
- package/es/components/UVideo/Images/rate_slider.svg +1 -0
- package/es/components/UVideo/Images/record_close.png +0 -0
- package/es/components/UVideo/Images/record_close_gray.png +0 -0
- package/es/components/UVideo/Images/record_close_hover.png +0 -0
- package/es/components/UVideo/Images/record_open.png +0 -0
- package/es/components/UVideo/Images/record_open_gray.png +0 -0
- package/es/components/UVideo/Images/record_open_hover.png +0 -0
- package/es/components/UVideo/Images/redPonit.png +0 -0
- package/es/components/UVideo/Images/refresh@2x.png +0 -0
- package/es/components/UVideo/Images/refresh_default@2x.png +0 -0
- package/es/components/UVideo/Images/replayCurrentTime.svg +1 -0
- package/es/components/UVideo/Images/replayRate.png +0 -0
- package/es/components/UVideo/Images/rfid.png +0 -0
- package/es/components/UVideo/Images/rightFullScreen.png +0 -0
- package/es/components/UVideo/Images/rightFullScreenHover.png +0 -0
- package/es/components/UVideo/Images/root.png +0 -0
- package/es/components/UVideo/Images/round-live@2x.png +0 -0
- package/es/components/UVideo/Images/round_live_default@2x.png +0 -0
- package/es/components/UVideo/Images/savesplit.png +0 -0
- package/es/components/UVideo/Images/savesplit_light.png +0 -0
- package/es/components/UVideo/Images/schicht-hover.png +0 -0
- package/es/components/UVideo/Images/schicht.png +0 -0
- package/es/components/UVideo/Images/schicht_checked.png +0 -0
- package/es/components/UVideo/Images/searchEmpty.png +0 -0
- package/es/components/UVideo/Images/securityAppDraw.png +0 -0
- package/es/components/UVideo/Images/setting.png +0 -0
- package/es/components/UVideo/Images/setting_light.png +0 -0
- package/es/components/UVideo/Images/shipinxunluo.png +0 -0
- package/es/components/UVideo/Images/sliceTooltip.png +0 -0
- package/es/components/UVideo/Images/sound.png +0 -0
- package/es/components/UVideo/Images/sound_active.png +0 -0
- package/es/components/UVideo/Images/sound_close.png +0 -0
- package/es/components/UVideo/Images/sound_close_active.png +0 -0
- package/es/components/UVideo/Images/sound_close_gray.png +0 -0
- package/es/components/UVideo/Images/sound_gray.png +0 -0
- package/es/components/UVideo/Images/spirit1.png +0 -0
- package/es/components/UVideo/Images/splitScreen.png +0 -0
- package/es/components/UVideo/Images/split_1.png +0 -0
- package/es/components/UVideo/Images/split_4.png +0 -0
- package/es/components/UVideo/Images/split_9.png +0 -0
- package/es/components/UVideo/Images/splitctr.png +0 -0
- package/es/components/UVideo/Images/splitctr_litght.png +0 -0
- package/es/components/UVideo/Images/spriteIcon copy.png +0 -0
- package/es/components/UVideo/Images/spriteIcon.png +0 -0
- package/es/components/UVideo/Images/sprites.png +0 -0
- package/es/components/UVideo/Images/sprites_image.png +0 -0
- package/es/components/UVideo/Images/startBackUpBtn.png +0 -0
- package/es/components/UVideo/Images/startPatrolBtn.png +0 -0
- package/es/components/UVideo/Images/stkIcon.png +0 -0
- package/es/components/UVideo/Images/stkTollgate.png +0 -0
- package/es/components/UVideo/Images/stream1.png +0 -0
- package/es/components/UVideo/Images/stream1_gray.png +0 -0
- package/es/components/UVideo/Images/stream1_hover.png +0 -0
- package/es/components/UVideo/Images/stream2.png +0 -0
- package/es/components/UVideo/Images/stream2_gray.png +0 -0
- package/es/components/UVideo/Images/stream2_hover.png +0 -0
- package/es/components/UVideo/Images/stream3.png +0 -0
- package/es/components/UVideo/Images/stream3_gray.png +0 -0
- package/es/components/UVideo/Images/stream3_hover.png +0 -0
- package/es/components/UVideo/Images/tableLine.png +0 -0
- package/es/components/UVideo/Images/tackEndIcon.png +0 -0
- package/es/components/UVideo/Images/tackStartIcon.png +0 -0
- package/es/components/UVideo/Images/textNoticeIcon.png +0 -0
- package/es/components/UVideo/Images/timeLarge.svg +1 -0
- package/es/components/UVideo/Images/timeSmall.svg +1 -0
- package/es/components/UVideo/Images/tollgate.png +0 -0
- package/es/components/UVideo/Images/tollgateOffLine.png +0 -0
- package/es/components/UVideo/Images/treeIcon.less +508 -0
- package/es/components/UVideo/Images/user.png +0 -0
- package/es/components/UVideo/Images/videoGroup.png +0 -0
- package/es/components/UVideo/Images/videoUnderList.png +0 -0
- package/es/components/UVideo/Images/viewLib-online.png +0 -0
- package/es/components/UVideo/Images/waiyu.png +0 -0
- package/es/components/UVideo/Images/waiyuOffline.png +0 -0
- package/es/components/UVideo/Images/warn.png +0 -0
- package/es/components/UVideo/Images/wifi.png +0 -0
- package/es/components/UVideo/Images/yidongjingwu.png +0 -0
- package/es/components/UVideo/Images/yingyongpingtai.png +0 -0
- package/es/components/UVideo/Images/yingyongpingtaiOffline.png +0 -0
- package/es/components/UVideo/Images/yuntai.png +0 -0
- package/es/components/UVideo/Images/yuntaiOffline.png +0 -0
- package/es/components/UVideo/Images/yuyan.png +0 -0
- package/es/components/UVideo/Images/yuyanAlarm.png +0 -0
- package/es/components/UVideo/Images/yuyanOffline.png +0 -0
- package/es/components/UVideo/Images/zhian@2x.png +0 -0
- package/es/components/UVideo/Images/zhian_default@2x.png +0 -0
- package/es/components/UVideo/Images/ziyuanlunxun.png +0 -0
- package/es/components/UVideo/Images/zoom_close.png +0 -0
- package/es/components/UVideo/Images/zoom_close_gray.png +0 -0
- package/es/components/UVideo/Images/zoom_close_hover.png +0 -0
- package/es/components/UVideo/Images/zoom_open.png +0 -0
- package/es/components/UVideo/Images/zoom_open_gray.png +0 -0
- package/es/components/UVideo/Images/zoom_open_hover.png +0 -0
- package/es/components/UVideo/Images/zulunxunTV.png +0 -0
- package/es/components/UVideo/Images/zulunxunTVPlay.png +0 -0
- package/es/components/UVideo/Images/zulunxunXP.png +0 -0
- package/es/components/UVideo/Images/zulunxunXPPlay.png +0 -0
- package/es/components/UVideo/Images/zulunxunziyuan.png +0 -0
- package/es/components/UVideo/Images/zuxianshiTV.png +0 -0
- package/es/components/UVideo/Images/zuxianshiXP.png +0 -0
- package/es/components/UVideo/InitFunc/GlobalFunc.js +662 -0
- package/es/components/UVideo/InitFunc/imosSdkInit.js +17 -0
- package/es/components/UVideo/TextInputNotice/TextInputNotice.js +419 -0
- package/es/components/UVideo/TextInputNotice/TextInputNotice.less +95 -0
- package/es/components/UVideo/Tree/TreeIcon.js +36 -0
- package/es/components/UVideo/Tree/UTreeIcon.js +512 -0
- package/es/components/UVideo/Tree/treeIcon.less +1057 -0
- package/es/components/UVideo/Tree/treeResTypes.js +258 -0
- package/es/components/UVideo/UVideo.js +1530 -0
- package/es/components/UVideo/VideoComponent/OperatorItems.js +1716 -0
- package/es/components/UVideo/VideoComponent/OperatorItems.less +1250 -0
- package/es/components/UVideo/VideoComponent/PlayPanel.js +1471 -0
- package/es/components/UVideo/VideoComponent/PlayPanel.less +292 -0
- package/es/components/UVideo/VideoComponent/PlayWindow.js +1342 -0
- package/es/components/UVideo/VideoComponent/PlayWindow.less +47 -0
- package/es/components/UVideo/VideoComponent/PtzControl/CardTimePicker.js +754 -0
- package/es/components/UVideo/VideoComponent/PtzControl/CardTimePicker.less +197 -0
- package/es/components/UVideo/VideoComponent/PtzControl/ConfigCruisePathPlan.js +904 -0
- package/es/components/UVideo/VideoComponent/PtzControl/ConfigCruisePathPlan.less +135 -0
- package/es/components/UVideo/VideoComponent/PtzControl/HttpRequest.js +665 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzAddCruisePathCtr.js +1473 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzAddCruisePathCtr.less +336 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzCmd.js +66 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzControlPanel.js +2537 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzControlPanel.less +1447 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzPresetAddCtr.js +171 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzPresetAddCtr.less +37 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzSetGuardCtr.js +475 -0
- package/es/components/UVideo/VideoComponent/PtzControl/PtzSetGuardCtr.less +184 -0
- package/es/components/UVideo/VideoComponent/PtzControl/TimePickerTable.js +611 -0
- package/es/components/UVideo/VideoComponent/PtzControl/TimePickerTable.less +193 -0
- package/es/components/UVideo/VideoComponent/PtzControl/applyBusiness.js +75 -0
- package/es/components/UVideo/VideoComponent/RateSelect/index.js +151 -0
- package/es/components/UVideo/VideoComponent/RateSelect/index.less +106 -0
- package/es/components/UVideo/VideoComponent/SplitScreen.js +72 -0
- package/es/components/UVideo/VideoComponent/SplitScreen.less +116 -0
- package/es/components/UVideo/VideoLive/VideoLive.js +723 -0
- package/es/components/UVideo/VideoLive/VideoLive.less +378 -0
- package/es/components/UVideo/VideoReply/VideoReply.js +937 -0
- package/es/components/UVideo/VideoReply/VideoReply.less +352 -0
- package/es/components/UVideo/VmsVideoComponent/Component/PtzControl/HttpRequest.js +580 -0
- package/es/components/UVideo/VmsVideoComponent/Component/PtzControl/PtzCmd.js +66 -0
- package/es/components/UVideo/VmsVideoComponent/Component/PtzControl/PtzControlPanel.js +1192 -0
- package/es/components/UVideo/VmsVideoComponent/Component/PtzControl/PtzControlPanel.less +1323 -0
- package/es/components/UVideo/VmsVideoComponent/Component/PtzControl/PtzPresetAddCtr.js +187 -0
- package/es/components/UVideo/VmsVideoComponent/Component/PtzControl/PtzPresetAddCtr.less +53 -0
- package/es/components/UVideo/VmsVideoComponent/Component/VmsOperatorItems.js +2500 -0
- package/es/components/UVideo/VmsVideoComponent/Component/VmsOperatorItems.less +1474 -0
- package/es/components/UVideo/VmsVideoComponent/Component/VmsVideoOperation.js +360 -0
- package/es/components/UVideo/VmsVideoComponent/Component/VmsVideoOperation.less +626 -0
- package/es/components/UVideo/VmsVideoComponent/Component/VmsVideoPanel.js +1774 -0
- package/es/components/UVideo/VmsVideoComponent/Component/download/index.js +628 -0
- package/es/components/UVideo/VmsVideoComponent/Component/download/index.less +18 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/enum.js +586 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/index.js +70 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/plugin.js +237 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/protocolcheck.js +223 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/sdkviewer.js +283 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/utils.js +206 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/wndControl.js +207 -0
- package/es/components/UVideo/VmsVideoComponent/NETPluginSDK/wsRequest.js +101 -0
- package/es/components/UVideo/VmsVideoLive/VmsVideoLive.js +557 -0
- package/es/components/UVideo/VmsVideoLive/VmsVideoLive.less +145 -0
- package/es/components/UVideo/VmsVideoReply/VmsVideoReplay.js +1012 -0
- package/es/components/UVideo/VmsVideoReply/VmsVideoReplay.less +273 -0
- package/es/components/UVideo/index.js +26 -0
- package/es/components/UVideo/index.less +265 -0
- package/es/components/UVideo/locale/en_US.d.ts +3 -0
- package/es/components/UVideo/locale/en_US.js +562 -0
- package/es/components/UVideo/locale/locale.d.ts +564 -0
- package/es/components/UVideo/locale/zh_CN.d.ts +3 -0
- package/es/components/UVideo/locale/zh_CN.js +562 -0
- package/es/components/UVideo/toolsFunc/ToolsFunc.js +125 -0
- package/es/components/_util/ActionButton.d.ts +15 -0
- package/es/components/_util/ActionButton.js +100 -0
- package/es/components/_util/colors.d.ts +5 -0
- package/es/components/_util/colors.js +4 -0
- package/es/components/_util/easings.d.ts +1 -0
- package/es/components/_util/easings.js +10 -0
- package/es/components/_util/getDataOrAriaProps.d.ts +1 -0
- package/es/components/_util/getDataOrAriaProps.js +8 -0
- package/es/components/_util/getRenderPropValue.d.ts +3 -0
- package/es/components/_util/getRenderPropValue.js +9 -0
- package/es/components/_util/getScroll.d.ts +2 -0
- package/es/components/_util/getScroll.js +29 -0
- package/es/components/_util/hooks/useFlexGapSupport.d.ts +2 -0
- package/es/components/_util/hooks/useFlexGapSupport.js +18 -0
- package/es/components/_util/hooks/useForceUpdate.d.ts +2 -0
- package/es/components/_util/hooks/useForceUpdate.js +15 -0
- package/es/components/_util/hooks/usePatchElement.d.ts +5 -0
- package/es/components/_util/hooks/usePatchElement.js +33 -0
- package/es/components/_util/hooks/useSyncState.d.ts +3 -0
- package/es/components/_util/hooks/useSyncState.js +13 -0
- package/es/components/_util/isNumeric.d.ts +2 -0
- package/es/components/_util/isNumeric.js +4 -0
- package/es/components/_util/motion.d.ts +8 -0
- package/es/components/_util/motion.js +51 -0
- package/es/components/_util/placements.d.ts +17 -0
- package/es/components/_util/placements.js +86 -0
- package/es/components/_util/raf.d.ts +9 -0
- package/es/components/_util/raf.js +26 -0
- package/es/components/_util/reactNode.d.ts +8 -0
- package/es/components/_util/reactNode.js +15 -0
- package/es/components/_util/responsiveObserve.d.ts +21 -0
- package/es/components/_util/responsiveObserve.js +64 -0
- package/es/components/_util/scrollTo.d.ts +10 -0
- package/es/components/_util/scrollTo.js +34 -0
- package/es/components/_util/statusUtils.d.ts +6 -0
- package/es/components/_util/statusUtils.js +13 -0
- package/es/components/_util/styleChecker.d.ts +4 -0
- package/es/components/_util/styleChecker.js +28 -0
- package/es/components/_util/throttleByAnimationFrame.d.ts +8 -0
- package/es/components/_util/throttleByAnimationFrame.js +57 -0
- package/es/components/_util/transButton.d.ts +9 -0
- package/es/components/_util/transButton.js +52 -0
- package/es/components/_util/type.d.ts +9 -0
- package/es/components/_util/type.js +13 -0
- package/es/components/_util/warning.d.ts +6 -0
- package/es/components/_util/warning.js +14 -0
- package/es/components/_util/wave.d.ts +32 -0
- package/es/components/_util/wave.js +207 -0
- package/es/components/locale/default.d.ts +2 -0
- package/es/components/locale/default.js +2 -0
- package/es/components/locale/en_US.d.ts +3 -0
- package/es/components/locale/en_US.js +136 -0
- package/es/components/locale/zh_CN.d.ts +3 -0
- package/es/components/locale/zh_CN.js +136 -0
- package/es/components/locale-provider/LocaleReceiver.d.ts +11 -0
- package/es/components/locale-provider/LocaleReceiver.js +36 -0
- package/es/components/locale-provider/context.d.ts +7 -0
- package/es/components/locale-provider/context.js +3 -0
- package/es/components/locale-provider/default.d.ts +2 -0
- package/es/components/locale-provider/default.js +2 -0
- package/es/components/locale-provider/en_US.d.ts +2 -0
- package/es/components/locale-provider/en_US.js +2 -0
- package/es/components/locale-provider/index.d.ts +54 -0
- package/es/components/locale-provider/index.js +30 -0
- package/es/components/locale-provider/style/index.d.ts +1 -0
- package/es/components/locale-provider/style/index.js +1 -0
- package/es/components/locale-provider/style/index.less +2 -0
- package/es/components/locale-provider/zh_CN.d.ts +2 -0
- package/es/components/locale-provider/zh_CN.js +2 -0
- package/es/components/style/color/bezierEasing.less +110 -0
- package/es/components/style/color/colorPalette.less +85 -0
- package/es/components/style/color/colors.less +162 -0
- package/es/components/style/color/tinyColor.less +1184 -0
- package/es/components/style/core/base.less +10 -0
- package/es/components/style/core/global.less +490 -0
- package/es/components/style/core/iconfont.less +22 -0
- package/es/components/style/core/index.less +5 -0
- package/es/components/style/core/motion/fade.less +34 -0
- package/es/components/style/core/motion/move.less +129 -0
- package/es/components/style/core/motion/other.less +51 -0
- package/es/components/style/core/motion/slide.less +131 -0
- package/es/components/style/core/motion/zoom.less +179 -0
- package/es/components/style/core/motion.less +22 -0
- package/es/components/style/index.d.ts +1 -0
- package/es/components/style/index.js +1 -0
- package/es/components/style/index.less +2 -0
- package/es/components/style/mixins/box.less +7 -0
- package/es/components/style/mixins/clearfix.less +16 -0
- package/es/components/style/mixins/compact-item-vertical.less +41 -0
- package/es/components/style/mixins/compact-item.less +133 -0
- package/es/components/style/mixins/compatibility.less +13 -0
- package/es/components/style/mixins/customize.less +181 -0
- package/es/components/style/mixins/iconfont.less +28 -0
- package/es/components/style/mixins/index.less +16 -0
- package/es/components/style/mixins/modal-mask.less +30 -0
- package/es/components/style/mixins/motion.less +33 -0
- package/es/components/style/mixins/operation-unit.less +15 -0
- package/es/components/style/mixins/reset.less +11 -0
- package/es/components/style/mixins/rounded-arrow.less +44 -0
- package/es/components/style/mixins/size.less +10 -0
- package/es/components/style/mixins/typography.less +58 -0
- package/es/components/style/themes/index.less +1 -0
- package/es/components/style/themes/variable.less +1064 -0
- package/es/darkTheme.js +77 -0
- package/es/defaultTheme.js +77 -0
- package/es/globalFunc/HOCConnect.js +41 -0
- package/es/globalFunc/index.d.ts +44 -0
- package/es/globalFunc/index.js +159 -0
- package/es/globalFunc/render.d.ts +16 -0
- package/es/globalFunc/render.js +91 -0
- package/es/globalVarious/index.d.ts +15 -0
- package/es/globalVarious/index.js +24 -0
- package/es/http/index.js +223 -0
- package/es/images/add_file_dark.png +0 -0
- package/es/images/add_file_dark_hover.png +0 -0
- package/es/images/clearIcon.png +0 -0
- package/es/images/clearIcon_hover.png +0 -0
- package/es/images/datePicker.png +0 -0
- package/es/images/datePicker_dark.png +0 -0
- package/es/images/emptyData.png +0 -0
- package/es/images/file_delete_dark.png +0 -0
- package/es/images/file_delete_dark_hover.png +0 -0
- package/es/images/fujian.png +0 -0
- package/es/images/noData.png +0 -0
- package/es/images/scrollDown.png +0 -0
- package/es/images/scrollDown_dark.png +0 -0
- package/es/images/scrollDown_dark_hover.png +0 -0
- package/es/images/scrollDown_light.png +0 -0
- package/es/images/scrollDown_light_hover.png +0 -0
- package/es/images/scrollLeft.png +0 -0
- package/es/images/scrollLeft_dark.png +0 -0
- package/es/images/scrollLeft_dark_hover.png +0 -0
- package/es/images/scrollLeft_light.png +0 -0
- package/es/images/scrollLeft_light_hover.png +0 -0
- package/es/images/scrollRight.png +0 -0
- package/es/images/scrollRight_dark.png +0 -0
- package/es/images/scrollRight_dark_hover.png +0 -0
- package/es/images/scrollRight_light.png +0 -0
- package/es/images/scrollRight_light_hover.png +0 -0
- package/es/images/scrollUp.png +0 -0
- package/es/images/scrollUp_dark.png +0 -0
- package/es/images/scrollUp_dark_hover.png +0 -0
- package/es/images/scrollUp_light.png +0 -0
- package/es/images/scrollUp_light_hover.png +0 -0
- package/es/images/timePicker.png +0 -0
- package/es/images/timePicker_dark.png +0 -0
- package/es/images/transfer_dark.png +0 -0
- package/es/images/transfer_dark_disable.png +0 -0
- package/es/images/transfer_dark_hover.png +0 -0
- package/es/images/trasfer_clear_dark.png +0 -0
- package/es/images/trasfer_clear_dark_hover.png +0 -0
- package/es/index.d.ts +127 -0
- package/es/index.js +90 -0
- package/es/locale/default.d.ts +2 -0
- package/es/locale/default.js +2 -0
- package/es/locale/en_US.d.ts +61 -0
- package/es/locale/en_US.js +46 -0
- package/es/locale/locale.d.ts +47 -0
- package/es/locale/zh_CN.d.ts +61 -0
- package/es/locale/zh_CN.js +46 -0
- package/es/style/global.less +97 -0
- package/es/style/globalVariabl.less +1 -0
- package/es/style/theme/cssvar.less +109 -0
- package/es/style/theme/dark.less +86 -0
- package/es/style/theme/default.less +87 -0
- package/es/style/theme/index-pure.less +2 -0
- package/es/style/theme/index.less +2 -0
- package/es/style/theme/variable.less +89 -0
- package/es/variableTheme.js +76 -0
- package/package.json +84 -0
|
@@ -0,0 +1,3917 @@
|
|
|
1
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2
|
+
function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
7
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
8
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
9
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
10
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
11
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
14
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
18
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
21
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
22
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
23
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
24
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
26
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
|
+
import React, { Component, Fragment, createRef } from 'react';
|
|
30
|
+
import PropTypes from 'prop-types';
|
|
31
|
+
import UTreeLoader from "./UTreeLoader";
|
|
32
|
+
import UTreeIcon from "./UTreeIcon";
|
|
33
|
+
import UTreeNode from "./UTreeNode";
|
|
34
|
+
import { _isIe } from "../../../globalFunc";
|
|
35
|
+
import UInput from "../../UInput";
|
|
36
|
+
import Checkbox from "../../UCheckBoxGroup/checkbox";
|
|
37
|
+
import { CUSTOM_PREFIX } from "../../../globalVarious";
|
|
38
|
+
import "./style";
|
|
39
|
+
|
|
40
|
+
// 拼接类名前缀
|
|
41
|
+
var treePrefix = "".concat(CUSTOM_PREFIX, "-tree");
|
|
42
|
+
|
|
43
|
+
// 勾选状态
|
|
44
|
+
var LOOP_CHECK_TYPE = {
|
|
45
|
+
// 无勾选状态
|
|
46
|
+
NONE: 0,
|
|
47
|
+
// 部分勾选
|
|
48
|
+
SOME: 1,
|
|
49
|
+
// 全部勾选
|
|
50
|
+
ALL: 2
|
|
51
|
+
};
|
|
52
|
+
var ORG_TYPE_ARR = ['1', '2', '3', '503', 1, 2, 3, 503];
|
|
53
|
+
|
|
54
|
+
// 队列查询树结构
|
|
55
|
+
var Queue = /*#__PURE__*/function () {
|
|
56
|
+
function Queue() {
|
|
57
|
+
_classCallCheck(this, Queue);
|
|
58
|
+
this.items = []; // 初始队列
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 添加到队列
|
|
63
|
+
* @param {Object} item 被点击文件夹节点
|
|
64
|
+
*/
|
|
65
|
+
return _createClass(Queue, [{
|
|
66
|
+
key: "enqueue",
|
|
67
|
+
value: function enqueue(item) {
|
|
68
|
+
if (item === 'refreshRoot' || item === 'search') {
|
|
69
|
+
// 当前请求
|
|
70
|
+
var nowData = this.items[0];
|
|
71
|
+
// 有请求
|
|
72
|
+
if (nowData) {
|
|
73
|
+
this.items = [];
|
|
74
|
+
this.items.push(nowData);
|
|
75
|
+
this.items.push({
|
|
76
|
+
type: item
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.items = [];
|
|
81
|
+
this.items.push({
|
|
82
|
+
type: item
|
|
83
|
+
});
|
|
84
|
+
} else {
|
|
85
|
+
var nowIndex = -1;
|
|
86
|
+
// 遍历当前队列,找到队列是否有当前请求,有则拿到其位置
|
|
87
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
88
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (item.item.id === this.items[i].item.id) {
|
|
92
|
+
nowIndex = i;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// 如果之前队列已有请求
|
|
96
|
+
if (nowIndex !== -1) {
|
|
97
|
+
// 如果传入的是当前队列真正的请求,直接返回不处理
|
|
98
|
+
if (nowIndex === 0) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
// 否则将其在队列中删除
|
|
102
|
+
this.items.splice(nowIndex, 1);
|
|
103
|
+
}
|
|
104
|
+
//在队列第一个请求后加入该请求
|
|
105
|
+
this.items.splice(1, 0, item);
|
|
106
|
+
}
|
|
107
|
+
// 当前节点在队列的位置,-1表示队列没有
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 请求完毕,删除队列第一项请求
|
|
112
|
+
*/
|
|
113
|
+
}, {
|
|
114
|
+
key: "dequeue",
|
|
115
|
+
value: function dequeue() {
|
|
116
|
+
this.items.shift();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 判断队列是否已经存在
|
|
121
|
+
* @param {String} id 请求id
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "isAlready",
|
|
125
|
+
value: function isAlready(id) {
|
|
126
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
127
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
128
|
+
if (this.items[i].type === id) {
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
// 找到后更改index
|
|
134
|
+
if (this.items[i].item.id === id) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* 更新请求index值,添加正在加载节点专用
|
|
143
|
+
* @param {Number} num 当前请求的index
|
|
144
|
+
* @param {Number} num 需要变化的值
|
|
145
|
+
*/
|
|
146
|
+
}, {
|
|
147
|
+
key: "upQueueIndex",
|
|
148
|
+
value: function upQueueIndex(index, num) {
|
|
149
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
150
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if (this.items[i].index > index) {
|
|
154
|
+
this.items[i].index += num;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* 更新队列请求index值,请求到数据专用
|
|
160
|
+
* @param {Number} num 需要变化的值
|
|
161
|
+
*/
|
|
162
|
+
}, {
|
|
163
|
+
key: "upIndex",
|
|
164
|
+
value: function upIndex(num) {
|
|
165
|
+
// 遍历当前请求,在当前请求后的index需要加上请求到的列表数量
|
|
166
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
167
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (this.items[i].index > this.items[0].index) {
|
|
171
|
+
this.items[i].index += num;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* 更新队列请求index值,请求到更多数据专用
|
|
178
|
+
* @param {Number} num 需要变化的值
|
|
179
|
+
*/
|
|
180
|
+
}, {
|
|
181
|
+
key: "upIndeLoadMore",
|
|
182
|
+
value: function upIndeLoadMore(num) {
|
|
183
|
+
for (var i = 1; i < this.items.length; i++) {
|
|
184
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if (this.items[i].index >= this.items[0].index) {
|
|
188
|
+
this.items[i].index += num;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* 更新关闭其他文件夹时当前队列里组织的index值
|
|
195
|
+
* @param {Number} index 关闭文件夹的位置
|
|
196
|
+
* @param {Number} num 需要变化的值
|
|
197
|
+
*/
|
|
198
|
+
}, {
|
|
199
|
+
key: "upCloseIndex",
|
|
200
|
+
value: function upCloseIndex(index, num) {
|
|
201
|
+
// 遍历当前请求,在当前请求后的index需要加上请求到的列表数量
|
|
202
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
203
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
// 在当前操作的节点后面的文件夹位置都减去关闭后减少的数量
|
|
207
|
+
if (this.items[i].index > index) {
|
|
208
|
+
this.items[i].index -= num;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 更新打开其他文件夹时当前队列里组织的index值
|
|
215
|
+
* @param {Number} index 打开文件夹的位置
|
|
216
|
+
* @param {Number} num 需要变化的值
|
|
217
|
+
*/
|
|
218
|
+
}, {
|
|
219
|
+
key: "upOpenIndex",
|
|
220
|
+
value: function upOpenIndex(index, num) {
|
|
221
|
+
// 遍历当前请求,在当前请求后的index需要加上请求到的列表数量
|
|
222
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
223
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
// 在当前操作的节点后面的文件夹位置都加上打开后新增的数量
|
|
227
|
+
if (this.items[i].index > index) {
|
|
228
|
+
this.items[i].index += num;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* 根据index判断当前请求到的数据是否要展示
|
|
235
|
+
* @param {String} bgIndex 需要隐藏任务的index范围开始值
|
|
236
|
+
* @param {String} endIndex 需要隐藏任务的index范围结束值
|
|
237
|
+
*/
|
|
238
|
+
}, {
|
|
239
|
+
key: "needHide",
|
|
240
|
+
value: function needHide(bgIndex, endIndex) {
|
|
241
|
+
// 遍历当前请求,找到需要更改的任务
|
|
242
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
243
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
// 找到后更改index
|
|
247
|
+
if (this.items[i].index > bgIndex && this.items[i].index <= endIndex) {
|
|
248
|
+
this.items[i].needShow = false;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* 根据id判断当前请求到的数据是否要展示并更新index
|
|
255
|
+
* @param {String} id 需要显示任务的id值
|
|
256
|
+
*/
|
|
257
|
+
}, {
|
|
258
|
+
key: "needShow",
|
|
259
|
+
value: function needShow(id, index) {
|
|
260
|
+
// 遍历当前请求,找到需要更改的任务
|
|
261
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
262
|
+
if (this.items[i].type === 'refreshRoot' || this.items[i].type === 'search') {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
// 找到后更改index
|
|
266
|
+
if (this.items[i].item.id === id) {
|
|
267
|
+
this.items[i].needShow = true;
|
|
268
|
+
this.items[i].index = index;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* 隐藏正在请求到的数据
|
|
275
|
+
*/
|
|
276
|
+
}, {
|
|
277
|
+
key: "hideTask",
|
|
278
|
+
value: function hideTask() {
|
|
279
|
+
if (this.items[0]) {
|
|
280
|
+
this.items[0].hideTask = true;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* 获取队列中等待的第一个请求
|
|
286
|
+
*/
|
|
287
|
+
}, {
|
|
288
|
+
key: "front",
|
|
289
|
+
value: function front() {
|
|
290
|
+
return this.items[0];
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* 获取队列中等待的请求更新后的index
|
|
295
|
+
*/
|
|
296
|
+
}, {
|
|
297
|
+
key: "frontIndex",
|
|
298
|
+
value: function frontIndex() {
|
|
299
|
+
return this.items[0].index;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* 判断队列是否为空
|
|
304
|
+
*/
|
|
305
|
+
}, {
|
|
306
|
+
key: "isEmpty",
|
|
307
|
+
get: function get() {
|
|
308
|
+
return !this.items.length;
|
|
309
|
+
}
|
|
310
|
+
}]);
|
|
311
|
+
}(); // 树控件只支持同时进行一个查询,如果此时在进行其他操作,都不会生效(组织节点点击、搜索、刷新)
|
|
312
|
+
// 根节点加载时,会把所有数据加载完成
|
|
313
|
+
// 组织节点加载时,先加载200,如果大于200,在尾部出现按钮 加载更多...
|
|
314
|
+
// 树勾选功能loopCheck字段说明: 0 表示不需要;1 表示不完全勾选,出现半选样式;2 表示完全勾选,保证后渲染出来的节点也是勾选情况
|
|
315
|
+
// TODO 组织节点双击之后,如果正在查询中,先出现‘正在加载’,加入等待队列中
|
|
316
|
+
// TODO 搜索操作时,如果正在查询中,保持最后一个搜索(前几个搜索不生效)
|
|
317
|
+
// TODO 如果有组织等待队列时,搜索了,清空组织等待队列
|
|
318
|
+
var Tree = /*#__PURE__*/function (_Component) {
|
|
319
|
+
function Tree(props) {
|
|
320
|
+
var _this;
|
|
321
|
+
_classCallCheck(this, Tree);
|
|
322
|
+
_this = _callSuper(this, Tree, [props]);
|
|
323
|
+
/**
|
|
324
|
+
* 点击上滚动条
|
|
325
|
+
*/
|
|
326
|
+
_this._scrollTop = function () {
|
|
327
|
+
var e = {
|
|
328
|
+
nativeEvent: {
|
|
329
|
+
wheelDelta: 120
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
_this._commonwheel(e);
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* 点击下滚动条
|
|
336
|
+
*/
|
|
337
|
+
_this._scrollBottom = function () {
|
|
338
|
+
var e = {
|
|
339
|
+
nativeEvent: {
|
|
340
|
+
wheelDelta: -120
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
_this._commonwheel(e);
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* 刷新父节点
|
|
347
|
+
* @param {Boolean} parentId 需要刷新父节点的id
|
|
348
|
+
* @param {String} resId 刷新后需要高亮选中的resId
|
|
349
|
+
*/
|
|
350
|
+
_this.refreshPrentNode = function (parentId, resId) {
|
|
351
|
+
if (parentId === _this.initRootNodeId || parentId === 'root') {
|
|
352
|
+
if (resId) {
|
|
353
|
+
_this.refreshRootNode(resId);
|
|
354
|
+
} else {
|
|
355
|
+
_this.refreshRootNode();
|
|
356
|
+
}
|
|
357
|
+
} else {
|
|
358
|
+
var index = -1;
|
|
359
|
+
var item = {};
|
|
360
|
+
for (var i = 0; i < _this.cameraArray.length; i++) {
|
|
361
|
+
var element = _this.cameraArray[i];
|
|
362
|
+
if (parentId === element.id) {
|
|
363
|
+
index = i;
|
|
364
|
+
item = element;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (!_this.dataObj[item.parentId] || index === -1) {
|
|
368
|
+
if (resId) {
|
|
369
|
+
_this.refreshRootNode(resId);
|
|
370
|
+
} else {
|
|
371
|
+
_this.refreshRootNode();
|
|
372
|
+
}
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
var temp = _this.dataObj[item.parentId];
|
|
376
|
+
if (resId) {
|
|
377
|
+
_this.refreshNormalNode(item.id, item.resId, index, temp.floor, resId);
|
|
378
|
+
} else {
|
|
379
|
+
_this.refreshNormalNode(item.id, item.resId, index, temp.floor);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* 鼠标移入移出事件
|
|
385
|
+
* @param {string} eventType 移入/移出
|
|
386
|
+
* @param {object} item 被点击节点对象
|
|
387
|
+
*/
|
|
388
|
+
_this._mouseEvent = function (eventType, item) {
|
|
389
|
+
_this.setState({
|
|
390
|
+
mouseEnterNode: eventType === 'mouseEnter' ? item.id : ''
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* 计算左右滚动条是否需要显示
|
|
395
|
+
*/
|
|
396
|
+
_this._leftDistance = function () {
|
|
397
|
+
// const { isNeedSearch } = this.props;
|
|
398
|
+
// let searchHeight = isNeedSearch ? '50px' : '0px'; // 搜索框的高度
|
|
399
|
+
// 如果存在组织
|
|
400
|
+
if (_this.refs.treeBoxUl.getElementsByClassName("".concat(treePrefix, "-icon")).length > 0) {
|
|
401
|
+
_this.leftDistance = 0;
|
|
402
|
+
// 获取所有图标
|
|
403
|
+
var allTitle = _this.refs.treeBoxUl.getElementsByClassName("".concat(treePrefix, "-node-desc"));
|
|
404
|
+
for (var i = 0; i < allTitle.length; i++) {
|
|
405
|
+
var maxLeft = allTitle[i].clientWidth + allTitle[i].getBoundingClientRect().left;
|
|
406
|
+
if (maxLeft > _this.leftDistance) {
|
|
407
|
+
// 取到最大的需要看见的位置离左侧的位置
|
|
408
|
+
_this.leftDistance = maxLeft;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
// 左右可以滚动的距离
|
|
412
|
+
var scrollBarLeft = _this.refs.scrollbar ? _this.refs.scrollbar.clientWidth + 5 : 5;
|
|
413
|
+
var canscroll = _this.leftDistance - (_this.refs.treeBoxUl.getBoundingClientRect().left + _this.treeBoxUlWidth) + scrollBarLeft;
|
|
414
|
+
if (canscroll >= 0) {
|
|
415
|
+
_this.treeUlBoxLeftCanDistamce = canscroll;
|
|
416
|
+
if (_this.refs.leftScrollBall) {
|
|
417
|
+
_this.refs.leftScrollBall.style.width = "".concat(_this.treeBoxUlWidth / (_this.treeBoxUlWidth + canscroll) * _this.leftScrollBoxWidth, "px");
|
|
418
|
+
_this.leftScrollBallWidth = _this.refs.leftScrollBall.clientWidth;
|
|
419
|
+
}
|
|
420
|
+
_this.needLeftScroll = true;
|
|
421
|
+
_this.refs.treeMain.style.paddingBottom = '15px';
|
|
422
|
+
// this.refs.treeMain.style.height = `calc(100% - ${searchHeight} + 15px)`;
|
|
423
|
+
if (_this.refs.leftScrollBox) {
|
|
424
|
+
_this.refs.leftScrollBox.style.opacity = 1;
|
|
425
|
+
}
|
|
426
|
+
} else if (canscroll < 0) {
|
|
427
|
+
_this.refs.treeMain.style.paddingBottom = '0px';
|
|
428
|
+
// this.refs.treeMain.style.height = `calc(100% - ${searchHeight})`;
|
|
429
|
+
_this.needLeftScroll = false;
|
|
430
|
+
_this._recoverLeftScroll();
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* 左右滚动条被按下
|
|
436
|
+
*/
|
|
437
|
+
_this._leftScrollDown = function (e) {
|
|
438
|
+
_this.leftScrollDownPos = e.pageX;
|
|
439
|
+
e.preventDefault();
|
|
440
|
+
document.addEventListener('mousemove', _this._leftScrollMove);
|
|
441
|
+
document.addEventListener('mouseup', _this._leftScrollUp);
|
|
442
|
+
if (window.self !== window.top && window.parent) {
|
|
443
|
+
document.addEventListener('mouseleave', _this._leftScrollLeave);
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
/**
|
|
447
|
+
* 左右滚动条正在移动
|
|
448
|
+
*/
|
|
449
|
+
_this._leftScrollMove = function (e) {
|
|
450
|
+
// 当前滚动条移动的距离
|
|
451
|
+
var distance = _this.leftScrollPos + (e.pageX - _this.leftScrollDownPos);
|
|
452
|
+
// 如果移到最左边
|
|
453
|
+
if (distance <= 0) {
|
|
454
|
+
distance = 0;
|
|
455
|
+
}
|
|
456
|
+
// 如果移到最右边
|
|
457
|
+
if (distance >= _this.leftScrollBoxWidth - _this.leftScrollBallWidth) {
|
|
458
|
+
distance = _this.leftScrollBoxWidth - _this.leftScrollBallWidth;
|
|
459
|
+
}
|
|
460
|
+
// 左右滚动条移动的占比
|
|
461
|
+
var leftScrollpProp = distance / (_this.leftScrollBoxWidth - _this.leftScrollBallWidth);
|
|
462
|
+
_this.treeUlBoxLeftPos = leftScrollpProp * _this.treeUlBoxLeftCanDistamce;
|
|
463
|
+
// 设置树组织滚动
|
|
464
|
+
_this.refs.leftScrollBall.style.transform = "translateX(".concat(distance, "px)");
|
|
465
|
+
_this.refs.treeBoxUl.style.width = "".concat(_this.treeBoxUlWidth + _this.treeUlBoxLeftPos, "px");
|
|
466
|
+
_this.refs.treeBoxUl.style.transform = "translateX(-".concat(_this.treeUlBoxLeftPos, "px)");
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* 左右滚动条移动结束
|
|
470
|
+
*/
|
|
471
|
+
_this._leftScrollUp = function (e, needScroll) {
|
|
472
|
+
// 当前滚动条移动的距离
|
|
473
|
+
var distance = 0;
|
|
474
|
+
if (needScroll) {
|
|
475
|
+
distance = _this.leftScrollPos + needScroll;
|
|
476
|
+
} else {
|
|
477
|
+
distance = _this.leftScrollPos + (e.pageX - _this.leftScrollDownPos);
|
|
478
|
+
}
|
|
479
|
+
// 如果移到最左边
|
|
480
|
+
if (distance <= 0) {
|
|
481
|
+
distance = 0;
|
|
482
|
+
}
|
|
483
|
+
// 如果移到最右边
|
|
484
|
+
if (distance >= _this.leftScrollBoxWidth - _this.leftScrollBallWidth) {
|
|
485
|
+
distance = _this.leftScrollBoxWidth - _this.leftScrollBallWidth;
|
|
486
|
+
}
|
|
487
|
+
// 设置树组织滚动
|
|
488
|
+
// 得到当前左右滚动条位置占比
|
|
489
|
+
var leftScrollpProp = distance / (_this.leftScrollBoxWidth - _this.leftScrollBallWidth);
|
|
490
|
+
_this.treeUlBoxLeftPos = leftScrollpProp * _this.treeUlBoxLeftCanDistamce;
|
|
491
|
+
// 设置树组织滚动
|
|
492
|
+
_this.refs.leftScrollBall.style.transform = "translateX(".concat(distance, "px)");
|
|
493
|
+
_this.refs.treeBoxUl.style.width = "".concat(_this.treeBoxUlWidth + _this.treeUlBoxLeftPos, "px");
|
|
494
|
+
_this.refs.treeBoxUl.style.transform = "translateX(-".concat(_this.treeUlBoxLeftPos, "px)");
|
|
495
|
+
_this.leftScrollPos = distance;
|
|
496
|
+
document.removeEventListener('mousemove', _this._leftScrollMove);
|
|
497
|
+
document.removeEventListener('mouseup', _this._leftScrollUp);
|
|
498
|
+
document.removeEventListener('mouseleave', _this._leftScrollLeave);
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* 在iframe里要监听移除文档事件
|
|
502
|
+
*/
|
|
503
|
+
_this._leftScrollLeave = function (e) {
|
|
504
|
+
_this._leftScrollUp(e);
|
|
505
|
+
document.removeEventListener('mousemove', _this._leftScrollMove);
|
|
506
|
+
document.removeEventListener('mouseup', _this._leftScrollUp);
|
|
507
|
+
document.removeEventListener('mouseleave', _this._leftScrollLeave);
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* 点击左滚动
|
|
511
|
+
*/
|
|
512
|
+
_this._leftScrollLeft = function () {
|
|
513
|
+
_this._leftScrollUp(true, -10);
|
|
514
|
+
};
|
|
515
|
+
/**
|
|
516
|
+
* 点击右滚动
|
|
517
|
+
*/
|
|
518
|
+
_this._leftScrollRight = function () {
|
|
519
|
+
_this._leftScrollUp(true, 10);
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* 重置滚动条位置
|
|
523
|
+
*/
|
|
524
|
+
_this._recoverLeftScroll = function () {
|
|
525
|
+
// 如果有滚动条
|
|
526
|
+
if (_this.refs.leftScrollBall) {
|
|
527
|
+
_this.leftScrollBoxWidth = _this.refs.leftScrollBox.clientWidth;
|
|
528
|
+
_this.leftScrollPos = 0;
|
|
529
|
+
_this.refs.leftScrollBall.style.transform = 'none';
|
|
530
|
+
_this.refs.treeBoxUl.style.width = '100%';
|
|
531
|
+
_this.refs.treeBoxUl.style.transform = 'none';
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
_this.state = {
|
|
535
|
+
//树可视最大容纳数
|
|
536
|
+
eachNum: 2,
|
|
537
|
+
//数组结束号数
|
|
538
|
+
endSum: 2,
|
|
539
|
+
//数组开始号数
|
|
540
|
+
beginSum: 0,
|
|
541
|
+
//滚动条是否需要显示
|
|
542
|
+
isScrollbarShow: false,
|
|
543
|
+
//input的value值
|
|
544
|
+
value: '',
|
|
545
|
+
// 滚动条的height
|
|
546
|
+
scrollbarHeight: 0,
|
|
547
|
+
// 滚动条的top
|
|
548
|
+
scrollbarTop: 0,
|
|
549
|
+
// 正在加载否
|
|
550
|
+
isLoading: false,
|
|
551
|
+
// 最后一个节点是否需要省略号
|
|
552
|
+
isLastNodeNeedEllipsis: false
|
|
553
|
+
};
|
|
554
|
+
// 储存请求获取的数据
|
|
555
|
+
_this.dataObj = {
|
|
556
|
+
root: {
|
|
557
|
+
data: [],
|
|
558
|
+
floor: 1
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
// 单个树节点高度
|
|
562
|
+
_this.perHeight = 30;
|
|
563
|
+
// 打开关闭文件夹标记数组
|
|
564
|
+
_this.openTagArr = [];
|
|
565
|
+
//文件夹数组
|
|
566
|
+
_this.floderArr = [];
|
|
567
|
+
//遍历用的数组
|
|
568
|
+
_this.cameraArray = [];
|
|
569
|
+
//滚动条距离上部高度
|
|
570
|
+
_this.scrollbarTop = 0;
|
|
571
|
+
//树的总高
|
|
572
|
+
_this.treeTotalHeight = 0;
|
|
573
|
+
//递归时暂存数组
|
|
574
|
+
_this.recursionArr = [];
|
|
575
|
+
//根节点是否展开
|
|
576
|
+
_this.isTreeRootExpand = true;
|
|
577
|
+
//需要初始加载的根节点id
|
|
578
|
+
_this.initRootNodeId = '';
|
|
579
|
+
//请求单通道
|
|
580
|
+
_this.channel = true;
|
|
581
|
+
// 是否有请求开始函数
|
|
582
|
+
_this.hasRequestStart = false;
|
|
583
|
+
// 是否有请求结束函数
|
|
584
|
+
_this.hasRequestFinish = false;
|
|
585
|
+
// 判断是否在搜索
|
|
586
|
+
_this.isSearching = false;
|
|
587
|
+
// 正在加载提示语
|
|
588
|
+
_this.loadingPrompt = '正在加载...'; // 正在加载...
|
|
589
|
+
// 更多加载提示语
|
|
590
|
+
_this.loadMorePrompt = '点击加载更多...'; // 点击加载更多...
|
|
591
|
+
_this.loadSearchNone = '无结果...'; // 无结果...
|
|
592
|
+
// 需要显示checkbox的类型
|
|
593
|
+
_this.showCheckboxTypes = [];
|
|
594
|
+
// 重新渲染时 0两次判断
|
|
595
|
+
_this.zeroTag = 0;
|
|
596
|
+
// ref创建
|
|
597
|
+
_this.treeBox = /*#__PURE__*/createRef();
|
|
598
|
+
// 实例化队列
|
|
599
|
+
_this.queue = new Queue();
|
|
600
|
+
// 是否正在请求数据
|
|
601
|
+
_this.isRequest = false;
|
|
602
|
+
// 新增子组织的数量
|
|
603
|
+
_this.newNodeNum = 0;
|
|
604
|
+
// 正在进行刷新子节点
|
|
605
|
+
// this.isRefreshNormal = false;
|
|
606
|
+
|
|
607
|
+
// 组织图标离左侧的距离
|
|
608
|
+
_this.leftDistance = 0;
|
|
609
|
+
// 左右滚动条可以滚动的距离
|
|
610
|
+
_this.treeUlBoxLeftCanDistamce = 0;
|
|
611
|
+
// 组织树当前的左右位置
|
|
612
|
+
_this.treeUlBoxLeftPos = 0;
|
|
613
|
+
// 组织树的宽
|
|
614
|
+
_this.treeBoxUlWidth = 0;
|
|
615
|
+
// 左右滚动条总的的宽
|
|
616
|
+
_this.leftScrollBoxWidth = 0;
|
|
617
|
+
//左右滚动条当前的宽
|
|
618
|
+
_this.leftScrollBallWidth;
|
|
619
|
+
// 左右滚动条当前被点击的位置
|
|
620
|
+
_this.leftScrollDownPos = 0;
|
|
621
|
+
// 左右滚动条当前的位置
|
|
622
|
+
_this.leftScrollPos = 0;
|
|
623
|
+
// 是否需要显示滚动条
|
|
624
|
+
_this.needLeftScroll = true;
|
|
625
|
+
// 搜索按下时的内容
|
|
626
|
+
_this.searchValue = '';
|
|
627
|
+
_this.defaultClickNode = '';
|
|
628
|
+
_this.selectNode = {};
|
|
629
|
+
|
|
630
|
+
// 上一次搜索的节点key值
|
|
631
|
+
_this.lastSearchKey = 'iccsid';
|
|
632
|
+
// 点击节点的key值
|
|
633
|
+
_this.clickOrgKey = 'iccsid';
|
|
634
|
+
_this._commonwheel = _this._commonwheel.bind(_this);
|
|
635
|
+
_this._moveScroll = _this._moveScroll.bind(_this);
|
|
636
|
+
_this._clickRoot = _this._clickRoot.bind(_this);
|
|
637
|
+
_this._down = _this._down.bind(_this);
|
|
638
|
+
_this._clickFloder = _this._clickFloder.bind(_this);
|
|
639
|
+
_this._mouseMove = _this._mouseMove.bind(_this);
|
|
640
|
+
_this._loadMore = _this._loadMore.bind(_this);
|
|
641
|
+
_this._onWindowResize = _this._onWindowResize.bind(_this);
|
|
642
|
+
_this.getChildrenNode = _this.getChildrenNode.bind(_this);
|
|
643
|
+
_this.getRootNode = _this.getRootNode.bind(_this);
|
|
644
|
+
_this.refreshRootNode = _this.refreshRootNode.bind(_this);
|
|
645
|
+
_this.refreshNormalNode = _this.refreshNormalNode.bind(_this);
|
|
646
|
+
_this._handleChange = _this._handleChange.bind(_this);
|
|
647
|
+
_this._clickSearch = _this._clickSearch.bind(_this);
|
|
648
|
+
_this._clickDelete = _this._clickDelete.bind(_this);
|
|
649
|
+
_this._getKey = _this._getKey.bind(_this);
|
|
650
|
+
_this.getIsTreeRootExpand = _this.getIsTreeRootExpand.bind(_this);
|
|
651
|
+
_this.isShowOrgInfo = false;
|
|
652
|
+
return _this;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
//#region 生命周期函数
|
|
656
|
+
_inherits(Tree, _Component);
|
|
657
|
+
return _createClass(Tree, [{
|
|
658
|
+
key: "componentWillMount",
|
|
659
|
+
value: function componentWillMount() {
|
|
660
|
+
var _this$props = this.props,
|
|
661
|
+
treeIcon = _this$props.treeIcon,
|
|
662
|
+
_this$props$treeLoade = _this$props.treeLoader,
|
|
663
|
+
treeLoader = _this$props$treeLoade === void 0 ? UTreeLoader : _this$props$treeLoade,
|
|
664
|
+
treeNode = _this$props.treeNode,
|
|
665
|
+
requestFinishedFunc = _this$props.requestFinishedFunc,
|
|
666
|
+
dataTypes = _this$props.dataTypes,
|
|
667
|
+
labelTypes = _this$props.labelTypes,
|
|
668
|
+
checkboxTypes = _this$props.checkboxTypes,
|
|
669
|
+
canDragType = _this$props.canDragType,
|
|
670
|
+
defaultSelect = _this$props.defaultSelect,
|
|
671
|
+
rootNode = _this$props.rootNode,
|
|
672
|
+
intoOrOutCity = _this$props.intoOrOutCity,
|
|
673
|
+
isSGK = _this$props.isSGK,
|
|
674
|
+
IOTSubType = _this$props.IOTSubType,
|
|
675
|
+
isUseOldTree = _this$props.isUseOldTree,
|
|
676
|
+
combineThreeCode = _this$props.combineThreeCode,
|
|
677
|
+
isShowOrgInfo = _this$props.isShowOrgInfo,
|
|
678
|
+
isSlectCmaedd = _this$props.isSlectCmaedd,
|
|
679
|
+
isPartCheckInfo = _this$props.isPartCheckInfo,
|
|
680
|
+
requestFailedFunc = _this$props.requestFailedFunc;
|
|
681
|
+
// 树组件加载方式
|
|
682
|
+
this.treeLoader = new treeLoader(dataTypes, labelTypes, canDragType, defaultSelect, rootNode, intoOrOutCity, isSGK, IOTSubType, isUseOldTree, combineThreeCode, isSlectCmaedd, isShowOrgInfo, isPartCheckInfo);
|
|
683
|
+
|
|
684
|
+
// 请求完成的需调用的方法
|
|
685
|
+
this.treeLoader.init(requestFinishedFunc, requestFailedFunc);
|
|
686
|
+
|
|
687
|
+
// 树组件icon
|
|
688
|
+
this.treeIcon = new treeIcon();
|
|
689
|
+
this.treeIcon.init();
|
|
690
|
+
|
|
691
|
+
// 树节点结构对象
|
|
692
|
+
this.treeNodeObj = treeNode;
|
|
693
|
+
this.isShowOrgInfo = isShowOrgInfo;
|
|
694
|
+
|
|
695
|
+
// 设置需要显示checkbox的类型
|
|
696
|
+
if (typeof checkboxTypes === 'string' || typeof checkboxTypes === 'number') {
|
|
697
|
+
this.showCheckboxTypes.push(parseInt(checkboxTypes, 10));
|
|
698
|
+
} else if (checkboxTypes instanceof Array) {
|
|
699
|
+
this.showCheckboxTypes = checkboxTypes;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}, {
|
|
703
|
+
key: "componentDidMount",
|
|
704
|
+
value: function componentDidMount() {
|
|
705
|
+
this.setState({
|
|
706
|
+
beginSum: 0,
|
|
707
|
+
eachNum: this._changeByTreeHeight()
|
|
708
|
+
});
|
|
709
|
+
this.queue.enqueue('refreshRoot');
|
|
710
|
+
this._addRoot();
|
|
711
|
+
|
|
712
|
+
//去除鼠标右键默认事件
|
|
713
|
+
document.addEventListener('contextmenu', this._preventDefault);
|
|
714
|
+
document.addEventListener('selectstart', this._selectStartF);
|
|
715
|
+
window.addEventListener('resize', this._onWindowResize);
|
|
716
|
+
this.treeBox.current.addEventListener('wheel', this._preventDefault);
|
|
717
|
+
this.treeBoxUlWidth = this.refs.treeBoxUl.clientWidth;
|
|
718
|
+
this.leftScrollBoxWidth = this.refs.leftScrollBox.clientWidth;
|
|
719
|
+
this.leftScrollBallWidth = this.refs.leftScrollBall.clientWidth;
|
|
720
|
+
}
|
|
721
|
+
}, {
|
|
722
|
+
key: "componentDidUpdate",
|
|
723
|
+
value: function componentDidUpdate() {
|
|
724
|
+
this._renderRecalcNum();
|
|
725
|
+
}
|
|
726
|
+
}, {
|
|
727
|
+
key: "componentWillUnmount",
|
|
728
|
+
value: function componentWillUnmount() {
|
|
729
|
+
//避免组件卸载后继续setState造成的内存泄露
|
|
730
|
+
this.setState = function (state, callback) {
|
|
731
|
+
return;
|
|
732
|
+
};
|
|
733
|
+
window.removeEventListener('resize', this._onWindowResize);
|
|
734
|
+
document.removeEventListener('contextmenu', this._preventDefault);
|
|
735
|
+
document.removeEventListener('selectstart', this._selectStartF);
|
|
736
|
+
this.treeBox.current.removeEventListener('wheel', this._preventDefault);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* 窗口大小变化 自适应
|
|
741
|
+
*/
|
|
742
|
+
}, {
|
|
743
|
+
key: "_onWindowResize",
|
|
744
|
+
value: function _onWindowResize() {
|
|
745
|
+
var _this2 = this;
|
|
746
|
+
var _this$state = this.state,
|
|
747
|
+
beginSum = _this$state.beginSum,
|
|
748
|
+
endSum = _this$state.endSum,
|
|
749
|
+
isScrollbarShow = _this$state.isScrollbarShow,
|
|
750
|
+
eachNum = _this$state.eachNum;
|
|
751
|
+
//监测窗口大小改变后 获取当前高度可容纳的条数,修改可容纳数
|
|
752
|
+
eachNum = this._changeByTreeHeight();
|
|
753
|
+
var changeNum = beginSum + eachNum;
|
|
754
|
+
//当窗口变大,数量不够显示,需要调整位置
|
|
755
|
+
if (changeNum > this.cameraArray.length) {
|
|
756
|
+
beginSum = this.cameraArray.length - eachNum;
|
|
757
|
+
}
|
|
758
|
+
beginSum = beginSum < 0 ? 0 : beginSum;
|
|
759
|
+
|
|
760
|
+
// 如果节点数量大于可容纳数量,显示滚动条
|
|
761
|
+
if (this.cameraArray.length > eachNum) {
|
|
762
|
+
isScrollbarShow = true;
|
|
763
|
+
endSum = beginSum + eachNum;
|
|
764
|
+
} else {
|
|
765
|
+
isScrollbarShow = false;
|
|
766
|
+
endSum = this.cameraArray.length;
|
|
767
|
+
}
|
|
768
|
+
this.setState({
|
|
769
|
+
beginSum: beginSum,
|
|
770
|
+
endSum: endSum,
|
|
771
|
+
isScrollbarShow: isScrollbarShow,
|
|
772
|
+
eachNum: eachNum
|
|
773
|
+
}, function () {
|
|
774
|
+
if (_this2.isTreeRootExpand) {
|
|
775
|
+
_this2._moveScroll();
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* 禁止默认事件
|
|
782
|
+
*/
|
|
783
|
+
}, {
|
|
784
|
+
key: "_preventDefault",
|
|
785
|
+
value: function _preventDefault(e) {
|
|
786
|
+
e.preventDefault();
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* 禁止左键选中
|
|
791
|
+
*/
|
|
792
|
+
}, {
|
|
793
|
+
key: "_selectStartF",
|
|
794
|
+
value: function _selectStartF() {
|
|
795
|
+
return false;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
//#endregion
|
|
799
|
+
|
|
800
|
+
//#region root相关部分代码
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* 根据当前用户,添加根节点
|
|
804
|
+
*/
|
|
805
|
+
}, {
|
|
806
|
+
key: "_addRoot",
|
|
807
|
+
value: function _addRoot() {
|
|
808
|
+
var _this3 = this;
|
|
809
|
+
this._removeLoadingNode(0);
|
|
810
|
+
var _this$props2 = this.props,
|
|
811
|
+
needRootNode = _this$props2.needRootNode,
|
|
812
|
+
autoSelectBase = _this$props2.autoSelectBase;
|
|
813
|
+
// 如果不需要根节点,表示没有根节点,数据直接保存在root对象中
|
|
814
|
+
if (!needRootNode) {
|
|
815
|
+
this.initRootNodeId = 'root';
|
|
816
|
+
if (autoSelectBase) {
|
|
817
|
+
this.setState({
|
|
818
|
+
isClickNode: 'root'
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
if (this.defaultClickNode) {
|
|
822
|
+
this.setState({
|
|
823
|
+
isClickNode: this.defaultClickNode
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
} else {
|
|
827
|
+
//添加根节点
|
|
828
|
+
this.treeLoader.initRoot().then(function (result) {
|
|
829
|
+
// 请求发生错误,设置为无根节点
|
|
830
|
+
if (result === false) {
|
|
831
|
+
_this3.queue.dequeue();
|
|
832
|
+
// 当前请求不为空
|
|
833
|
+
if (!_this3.queue.isEmpty) {
|
|
834
|
+
_this3._nextQueue();
|
|
835
|
+
}
|
|
836
|
+
_this3.initRootNodeId = 'root';
|
|
837
|
+
if (autoSelectBase) {
|
|
838
|
+
_this3.setState({
|
|
839
|
+
isClickNode: 'root'
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
if (_this3.defaultClickNode) {
|
|
843
|
+
_this3.setState({
|
|
844
|
+
isClickNode: _this3.defaultClickNode
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
} else {
|
|
848
|
+
_this3._addTreeRoot(result);
|
|
849
|
+
_this3.initRootNodeId = result.id;
|
|
850
|
+
if (autoSelectBase) {
|
|
851
|
+
_this3.setState({
|
|
852
|
+
isClickNode: result.id
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
if (_this3.defaultClickNode) {
|
|
856
|
+
_this3.setState({
|
|
857
|
+
isClickNode: _this3.defaultClickNode
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
_this3.setState({
|
|
861
|
+
endSum: _this3.dataObj.root.data.length + 1
|
|
862
|
+
});
|
|
863
|
+
//添加根节点标识
|
|
864
|
+
_this3.openTagArr.push(_this3.initRootNodeId);
|
|
865
|
+
_this3.floderArr.push(_this3.initRootNodeId);
|
|
866
|
+
//默认打开根节点
|
|
867
|
+
if (_this3.isTreeRootExpand) {
|
|
868
|
+
_this3._loadRoot();
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* 添加根节点
|
|
877
|
+
* @param {*} rootNode
|
|
878
|
+
*/
|
|
879
|
+
}, {
|
|
880
|
+
key: "_addTreeRoot",
|
|
881
|
+
value: function _addTreeRoot(rootNodeObj) {
|
|
882
|
+
// 当前请求的数据需要
|
|
883
|
+
if (this.queue.front().hideTask !== true) {
|
|
884
|
+
this.dataObj.root.data.push(rootNodeObj);
|
|
885
|
+
this.cameraArray.push(rootNodeObj);
|
|
886
|
+
}
|
|
887
|
+
this.dataObj[rootNodeObj.id] = {
|
|
888
|
+
data: [],
|
|
889
|
+
self: rootNodeObj,
|
|
890
|
+
floor: 2
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* 根节点首次加载
|
|
896
|
+
*/
|
|
897
|
+
}, {
|
|
898
|
+
key: "_loadRoot",
|
|
899
|
+
value: function _loadRoot() {
|
|
900
|
+
var _this4 = this;
|
|
901
|
+
var resArray = this.dataObj[this.initRootNodeId];
|
|
902
|
+
var cameraArray = this.cameraArray;
|
|
903
|
+
// 加载节点的index
|
|
904
|
+
var loadingIndex = cameraArray.length;
|
|
905
|
+
// 当前请求的数据需要
|
|
906
|
+
if (this.queue.front() && this.queue.front().hideTask !== true) {
|
|
907
|
+
this._addLoadingNode(loadingIndex, resArray.floor, 'root');
|
|
908
|
+
}
|
|
909
|
+
// 加载根节点的时候,初始化搜索域节点
|
|
910
|
+
this.lastSearchKey = 'iccsid';
|
|
911
|
+
// 加载根节点的时候,初始化店家节点信息
|
|
912
|
+
this.clickOrgKey = 'iccsid';
|
|
913
|
+
this.treeLoader.setRequestObj({
|
|
914
|
+
requestType: 'root'
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
// 请求根节点下的数据
|
|
918
|
+
this.treeLoader.getRootNode().then(function (responseData) {
|
|
919
|
+
if (responseData === false) {
|
|
920
|
+
if (_this4.isTreeRootExpand) {
|
|
921
|
+
_this4._removeLoadingNode(loadingIndex);
|
|
922
|
+
} else {
|
|
923
|
+
_this4.cameraArray.splice(loadingIndex, 1);
|
|
924
|
+
}
|
|
925
|
+
_this4.queue.upQueueIndex(loadingIndex, -1);
|
|
926
|
+
_this4.queue.dequeue();
|
|
927
|
+
// 当前请求不为空
|
|
928
|
+
if (!_this4.queue.isEmpty) {
|
|
929
|
+
_this4._nextQueue();
|
|
930
|
+
}
|
|
931
|
+
_this4.isSearching = false;
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
responseData = _this4.treeLoader.toTreeNode(responseData, _this4.initRootNodeId);
|
|
935
|
+
var _this4$state = _this4.state,
|
|
936
|
+
eachNum = _this4$state.eachNum,
|
|
937
|
+
endSum = _this4$state.endSum;
|
|
938
|
+
// 当前请求的数据需要
|
|
939
|
+
if (_this4.queue.front() && _this4.queue.front().hideTask !== true) {
|
|
940
|
+
// 如果父节点设置了需要勾选,那么新打开的子节点进行勾选操作
|
|
941
|
+
if (resArray.self.isCheck && _this4.props.isLoopCheck) {
|
|
942
|
+
for (var index = 0, length = responseData.length; index < length; index++) {
|
|
943
|
+
responseData[index].isCheck = true;
|
|
944
|
+
// 如果是组织节点,也添加上loopCheck
|
|
945
|
+
if (responseData[index].isOrgNode === true) {
|
|
946
|
+
responseData[index].loopCheck = LOOP_CHECK_TYPE.ALL;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
Array.prototype.push.apply(resArray.data, responseData);
|
|
951
|
+
cameraArray.splice.apply(cameraArray, [cameraArray.length, 0].concat(_toConsumableArray(responseData)));
|
|
952
|
+
_this4.props.requestFinishdeToNodeFunc(resArray.data, _this4.dataObj);
|
|
953
|
+
_this4.props.nodeLoadFinishedFunc(responseData, _this4.dataObj);
|
|
954
|
+
}
|
|
955
|
+
if (cameraArray.length < eachNum) {
|
|
956
|
+
endSum = cameraArray.length;
|
|
957
|
+
} else {
|
|
958
|
+
endSum = eachNum;
|
|
959
|
+
}
|
|
960
|
+
_this4.setState({
|
|
961
|
+
endSum: endSum,
|
|
962
|
+
beginSum: 0
|
|
963
|
+
}, function () {
|
|
964
|
+
_this4._moveScroll();
|
|
965
|
+
_this4._continueRoot(loadingIndex);
|
|
966
|
+
});
|
|
967
|
+
}).catch(function (err) {
|
|
968
|
+
if (_this4.isTreeRootExpand) {
|
|
969
|
+
_this4._removeLoadingNode(loadingIndex);
|
|
970
|
+
} else {
|
|
971
|
+
_this4.cameraArray.splice(loadingIndex, 1);
|
|
972
|
+
}
|
|
973
|
+
_this4.queue.upQueueIndex(loadingIndex, -1);
|
|
974
|
+
_this4.queue.dequeue();
|
|
975
|
+
// 当前请求不为空
|
|
976
|
+
if (!_this4.queue.isEmpty) {
|
|
977
|
+
_this4._nextQueue();
|
|
978
|
+
}
|
|
979
|
+
_this4.isSearching = false;
|
|
980
|
+
console.error(err);
|
|
981
|
+
}).finally(function () {
|
|
982
|
+
_this4._judgeScrollbarShow();
|
|
983
|
+
_this4._moveScroll();
|
|
984
|
+
_this4.checkNode();
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
// 节点信息更新后更新节点状态
|
|
989
|
+
}, {
|
|
990
|
+
key: "checkNode",
|
|
991
|
+
value: function checkNode() {
|
|
992
|
+
var _this$props3 = this.props,
|
|
993
|
+
onReset = _this$props3.onReset,
|
|
994
|
+
checkResList = _this$props3.checkResList;
|
|
995
|
+
for (var key in this.dataObj) {
|
|
996
|
+
var data = this.dataObj[key];
|
|
997
|
+
// 当前组织下是否有节点被选中
|
|
998
|
+
var tempCheck = false;
|
|
999
|
+
var _loop = function _loop() {
|
|
1000
|
+
var item = data.data[j];
|
|
1001
|
+
if (checkResList && checkResList.length > 0) {
|
|
1002
|
+
// 如果勾选了,把对应item的状态设置成checked
|
|
1003
|
+
if (checkResList.some(function (res) {
|
|
1004
|
+
return res.resId === item.resId;
|
|
1005
|
+
}) || checkResList.some(function (res) {
|
|
1006
|
+
return res.id === item.id;
|
|
1007
|
+
}) || checkResList.includes(item.resId) || checkResList.includes(item.id) || checkResList.some(function (res) {
|
|
1008
|
+
return typeof res === 'number' && res === item.resourceInfo.resType;
|
|
1009
|
+
})) {
|
|
1010
|
+
item.isCheck = true;
|
|
1011
|
+
tempCheck = true;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
};
|
|
1015
|
+
for (var j = 0, dataLen = data.data.length; j < dataLen; j++) {
|
|
1016
|
+
_loop();
|
|
1017
|
+
}
|
|
1018
|
+
// 如果有节点被选中,根据最后一个节点信息去设置其父节点选中状态
|
|
1019
|
+
if (tempCheck) {
|
|
1020
|
+
this._loopCheckParentItem(data.data[data.data.length - 1], true);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
this.forceUpdate();
|
|
1024
|
+
typeof onReset === 'function' && onReset();
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* 继续请求根节点
|
|
1029
|
+
* @param {number} loadingIndex 加载节点的序号
|
|
1030
|
+
*/
|
|
1031
|
+
}, {
|
|
1032
|
+
key: "_continueRoot",
|
|
1033
|
+
value: (function () {
|
|
1034
|
+
var _continueRoot2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(loadingIndex) {
|
|
1035
|
+
var _this5 = this;
|
|
1036
|
+
var resArray, _this$cameraArray, continueData, itemIndex;
|
|
1037
|
+
return _regenerator().w(function (_context) {
|
|
1038
|
+
while (1) switch (_context.n) {
|
|
1039
|
+
case 0:
|
|
1040
|
+
resArray = this.dataObj[this.initRootNodeId];
|
|
1041
|
+
case 1:
|
|
1042
|
+
// 继续请求根节点数据,直到结束
|
|
1043
|
+
this.treeLoader.setRequestObj({
|
|
1044
|
+
requestType: 'root'
|
|
1045
|
+
});
|
|
1046
|
+
_context.n = 2;
|
|
1047
|
+
return this.treeLoader.continueGetRootNode();
|
|
1048
|
+
case 2:
|
|
1049
|
+
continueData = _context.v;
|
|
1050
|
+
if (continueData) {
|
|
1051
|
+
_context.n = 3;
|
|
1052
|
+
break;
|
|
1053
|
+
}
|
|
1054
|
+
return _context.a(3, 5);
|
|
1055
|
+
case 3:
|
|
1056
|
+
continueData = this.treeLoader.toTreeNode(continueData, this.initRootNodeId);
|
|
1057
|
+
// 当前请求的数据不需要
|
|
1058
|
+
if (this.queue.front().hideTask !== true) {
|
|
1059
|
+
Array.prototype.push.apply(resArray.data, continueData);
|
|
1060
|
+
this.props.requestFinishdeToNodeFunc(resArray.data, this.dataObj);
|
|
1061
|
+
}
|
|
1062
|
+
(_this$cameraArray = this.cameraArray).splice.apply(_this$cameraArray, [this.cameraArray.length, 0].concat(_toConsumableArray(continueData)));
|
|
1063
|
+
this.props.nodeLoadFinishedFunc(continueData, this.dataObj);
|
|
1064
|
+
this.setState({
|
|
1065
|
+
eachNum: this.state.eachNum
|
|
1066
|
+
}, this._moveScroll);
|
|
1067
|
+
case 4:
|
|
1068
|
+
_context.n = 1;
|
|
1069
|
+
break;
|
|
1070
|
+
case 5:
|
|
1071
|
+
if (this.isTreeRootExpand) {
|
|
1072
|
+
this._removeLoadingNode(loadingIndex);
|
|
1073
|
+
this.queue.upQueueIndex(loadingIndex, -1);
|
|
1074
|
+
} else {
|
|
1075
|
+
this.cameraArray.splice(loadingIndex, 1);
|
|
1076
|
+
}
|
|
1077
|
+
this._judgeScrollbarShow();
|
|
1078
|
+
this.queue.upQueueIndex(loadingIndex, -1);
|
|
1079
|
+
this.queue.dequeue();
|
|
1080
|
+
// 当前请求不为空
|
|
1081
|
+
if (!this.queue.isEmpty) {
|
|
1082
|
+
this._nextQueue();
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
// 根节点展开时,自动展开第一个组织节点
|
|
1086
|
+
if (this.props.autoExpandFirstOrg) {
|
|
1087
|
+
itemIndex = this.cameraArray.findIndex(function (item) {
|
|
1088
|
+
return item.parentId === _this5.initRootNodeId && item.isOrgNode;
|
|
1089
|
+
});
|
|
1090
|
+
if (itemIndex > -1) {
|
|
1091
|
+
this._clickFloder(this.cameraArray[itemIndex], itemIndex);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
this.isSearching = false;
|
|
1095
|
+
case 6:
|
|
1096
|
+
return _context.a(2);
|
|
1097
|
+
}
|
|
1098
|
+
}, _callee, this);
|
|
1099
|
+
}));
|
|
1100
|
+
function _continueRoot(_x) {
|
|
1101
|
+
return _continueRoot2.apply(this, arguments);
|
|
1102
|
+
}
|
|
1103
|
+
return _continueRoot;
|
|
1104
|
+
}()
|
|
1105
|
+
/**
|
|
1106
|
+
* 根节点点击事件
|
|
1107
|
+
*/
|
|
1108
|
+
)
|
|
1109
|
+
}, {
|
|
1110
|
+
key: "_clickRoot",
|
|
1111
|
+
value: function _clickRoot() {
|
|
1112
|
+
var _this6 = this;
|
|
1113
|
+
var _this$state2 = this.state,
|
|
1114
|
+
eachNum = _this$state2.eachNum,
|
|
1115
|
+
beginSum = _this$state2.beginSum;
|
|
1116
|
+
//根节点处于展开情况,关闭根节点
|
|
1117
|
+
if (this.isTreeRootExpand) {
|
|
1118
|
+
this.openTagArr.splice(this.openTagArr.indexOf(this.initRootNodeId), 1);
|
|
1119
|
+
this.needLeftScroll = false;
|
|
1120
|
+
this._recoverLeftScroll();
|
|
1121
|
+
this.setState({
|
|
1122
|
+
beginSum: 0,
|
|
1123
|
+
endSum: this.dataObj.root.data.length,
|
|
1124
|
+
isScrollbarShow: false
|
|
1125
|
+
});
|
|
1126
|
+
this.isTreeRootExpand = false;
|
|
1127
|
+
} else {
|
|
1128
|
+
var root = this.dataObj[this.initRootNodeId];
|
|
1129
|
+
this.openTagArr.push(this.initRootNodeId);
|
|
1130
|
+
//如果是第一次打开
|
|
1131
|
+
if (root.data.length === 0) {
|
|
1132
|
+
this._loadRoot();
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
this.isTreeRootExpand = true;
|
|
1136
|
+
this.setState({
|
|
1137
|
+
beginSum: beginSum,
|
|
1138
|
+
endSum: eachNum
|
|
1139
|
+
}, function () {
|
|
1140
|
+
_this6._judgeScrollbarShow();
|
|
1141
|
+
_this6._moveScroll();
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* 根节点状态
|
|
1148
|
+
*/
|
|
1149
|
+
}, {
|
|
1150
|
+
key: "getIsTreeRootExpand",
|
|
1151
|
+
value: function getIsTreeRootExpand() {
|
|
1152
|
+
return this.isTreeRootExpand;
|
|
1153
|
+
}
|
|
1154
|
+
//#endregion
|
|
1155
|
+
|
|
1156
|
+
//#region 滚动条相关部分代码
|
|
1157
|
+
/**
|
|
1158
|
+
* 判断滚动条是否需要显示
|
|
1159
|
+
*/
|
|
1160
|
+
}, {
|
|
1161
|
+
key: "_judgeScrollbarShow",
|
|
1162
|
+
value: function _judgeScrollbarShow() {
|
|
1163
|
+
var eachNum = this.state.eachNum;
|
|
1164
|
+
var isShow = false;
|
|
1165
|
+
// 总数大于最大容纳数,显示滚动条
|
|
1166
|
+
if (this.cameraArray.length > eachNum) {
|
|
1167
|
+
isShow = true;
|
|
1168
|
+
} else {
|
|
1169
|
+
isShow = false;
|
|
1170
|
+
}
|
|
1171
|
+
this.setState({
|
|
1172
|
+
isScrollbarShow: isShow
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* 设置滚轮的高度
|
|
1178
|
+
* 根据显示的beginSum和总的树节点数,计算高度
|
|
1179
|
+
*/
|
|
1180
|
+
}, {
|
|
1181
|
+
key: "_moveScroll",
|
|
1182
|
+
value: function _moveScroll() {
|
|
1183
|
+
var _this$state3 = this.state,
|
|
1184
|
+
eachNum = _this$state3.eachNum,
|
|
1185
|
+
beginSum = _this$state3.beginSum,
|
|
1186
|
+
isScrollbarShow = _this$state3.isScrollbarShow;
|
|
1187
|
+
var totalNum = this.cameraArray.length;
|
|
1188
|
+
// 滚轮显示情况下
|
|
1189
|
+
if (isScrollbarShow) {
|
|
1190
|
+
this.maxTop = (totalNum - eachNum) / totalNum * (this.treeTotalHeight - 30);
|
|
1191
|
+
this.scrollbarTop = beginSum / totalNum * (this.treeTotalHeight - 30);
|
|
1192
|
+
// 滚动条超出最大高度时
|
|
1193
|
+
if (this.scrollbarTop > this.maxTop) {
|
|
1194
|
+
this.scrollbarTop = this.maxTop;
|
|
1195
|
+
} else if (this.scrollbarTop < 0) {
|
|
1196
|
+
this.scrollbarTop = 0;
|
|
1197
|
+
}
|
|
1198
|
+
// 设置滚动条的高度和top值
|
|
1199
|
+
this.setState({
|
|
1200
|
+
scrollbarHeight: eachNum / totalNum * 100 + '%',
|
|
1201
|
+
scrollbarTop: this.scrollbarTop + 'px'
|
|
1202
|
+
});
|
|
1203
|
+
} else {
|
|
1204
|
+
this.forceUpdate();
|
|
1205
|
+
}
|
|
1206
|
+
this.isLocating = false;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* 鼠标滚轮事件
|
|
1211
|
+
* @param {*} e react event事件对象
|
|
1212
|
+
*/
|
|
1213
|
+
}, {
|
|
1214
|
+
key: "_commonwheel",
|
|
1215
|
+
value: function _commonwheel(e) {
|
|
1216
|
+
if (!this.isTreeRootExpand) {
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1219
|
+
//chrome 滚轮wheelDelta属性 上120 下-120
|
|
1220
|
+
//firefox 滚轮deltaY属性 上-3 下3
|
|
1221
|
+
var wheelNum = e.nativeEvent.wheelDelta || -e.nativeEvent.deltaY;
|
|
1222
|
+
var _this$state4 = this.state,
|
|
1223
|
+
endSum = _this$state4.endSum,
|
|
1224
|
+
beginSum = _this$state4.beginSum;
|
|
1225
|
+
var dataSum = this.cameraArray.length;
|
|
1226
|
+
//向下滚动 设置起始和结束各 +1
|
|
1227
|
+
if (wheelNum < 0) {
|
|
1228
|
+
if (endSum < dataSum) {
|
|
1229
|
+
this.setState({
|
|
1230
|
+
endSum: endSum + 1,
|
|
1231
|
+
beginSum: beginSum + 1
|
|
1232
|
+
}, this._moveScroll);
|
|
1233
|
+
} else if (endSum === dataSum && this.isSearching && this.cameraArray[dataSum - 1].type === 'searchMore') {
|
|
1234
|
+
// 移动到最后,且正在搜索中,最后一个节点是更多加载
|
|
1235
|
+
// 执行搜索更多
|
|
1236
|
+
this._continueSearching();
|
|
1237
|
+
}
|
|
1238
|
+
} else {
|
|
1239
|
+
//向上滚动 设置起始和结束各 -1
|
|
1240
|
+
if (beginSum > 0) {
|
|
1241
|
+
this.setState({
|
|
1242
|
+
endSum: endSum - 1,
|
|
1243
|
+
beginSum: beginSum - 1
|
|
1244
|
+
}, this._moveScroll);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* 点击滚动条
|
|
1251
|
+
* @param {*} e react event事件对象
|
|
1252
|
+
*/
|
|
1253
|
+
}, {
|
|
1254
|
+
key: "_down",
|
|
1255
|
+
value: function _down(e) {
|
|
1256
|
+
var _this7 = this;
|
|
1257
|
+
//鼠标按下时的鼠标高度
|
|
1258
|
+
var startY = e.nativeEvent.clientY;
|
|
1259
|
+
e.preventDefault();
|
|
1260
|
+
//按下时的滚动条top
|
|
1261
|
+
var defaultY = this.scrollbarTop;
|
|
1262
|
+
document.onmousemove = function (e) {
|
|
1263
|
+
return _this7._mouseMove(e, startY, defaultY);
|
|
1264
|
+
};
|
|
1265
|
+
document.onmouseup = function () {
|
|
1266
|
+
document.onmousemove = null;
|
|
1267
|
+
document.onmouseup = null;
|
|
1268
|
+
};
|
|
1269
|
+
if (window.self !== window.top && window.parent) {
|
|
1270
|
+
document.onmouseleave = function () {
|
|
1271
|
+
document.onmousemove = null;
|
|
1272
|
+
document.onmouseup = null;
|
|
1273
|
+
document.onmouseleave = null;
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* 鼠标move 动态设置滚动条
|
|
1280
|
+
* 根据初始位置,计算移动鼠标后的滚动条clientY,然后计算出显示数组的起始和结束位置
|
|
1281
|
+
* @param {*} e react event事件对象
|
|
1282
|
+
* @param {number} startY 点击滚动条时,鼠标的clientY(距可视窗口的Y轴距离)
|
|
1283
|
+
* @param {number} defaultY 击滚动条时,滚动条高度
|
|
1284
|
+
*/
|
|
1285
|
+
}, {
|
|
1286
|
+
key: "_mouseMove",
|
|
1287
|
+
value: function _mouseMove(e, startY, defaultY) {
|
|
1288
|
+
var eachNum = this.state.eachNum;
|
|
1289
|
+
var nowTop = e.clientY;
|
|
1290
|
+
var dataSum = this.cameraArray.length;
|
|
1291
|
+
this.scrollbarTop = nowTop + defaultY - startY;
|
|
1292
|
+
this.maxTop = (dataSum - eachNum) / dataSum * (this.treeTotalHeight - 30);
|
|
1293
|
+
// 如果滚动条top超过最大top,则设置为最大高度
|
|
1294
|
+
if (this.scrollbarTop > this.maxTop) {
|
|
1295
|
+
this.scrollbarTop = this.maxTop;
|
|
1296
|
+
} else if (this.scrollbarTop < 0) {
|
|
1297
|
+
// 如果滚动条top小于0,则设置为0
|
|
1298
|
+
this.scrollbarTop = 0;
|
|
1299
|
+
}
|
|
1300
|
+
// 根据滚动条高度除以总高度,再乘总数,得到渲染起始数
|
|
1301
|
+
var beginSum = Math.ceil(this.scrollbarTop / (this.treeTotalHeight - 30) * dataSum);
|
|
1302
|
+
var endSum;
|
|
1303
|
+
// 防止起始数超过最大起始数
|
|
1304
|
+
if (beginSum > dataSum - eachNum) {
|
|
1305
|
+
beginSum = dataSum - eachNum;
|
|
1306
|
+
endSum = dataSum;
|
|
1307
|
+
} else {
|
|
1308
|
+
endSum = beginSum + eachNum;
|
|
1309
|
+
}
|
|
1310
|
+
// 如果是搜索情况,且最后一个节点是更多加载,则执行加载更多操作
|
|
1311
|
+
if (endSum === dataSum && this.isSearching && this.cameraArray[dataSum - 1].type === 'searchMore') {
|
|
1312
|
+
// 移动到最后,且正在搜索中,最后一个节点是更多加载
|
|
1313
|
+
// 执行搜索更多
|
|
1314
|
+
this._continueSearching();
|
|
1315
|
+
}
|
|
1316
|
+
this.setState({
|
|
1317
|
+
endSum: endSum,
|
|
1318
|
+
beginSum: beginSum,
|
|
1319
|
+
scrollbarTop: this.scrollbarTop + 'px'
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
}, {
|
|
1323
|
+
key: "_clickFloder",
|
|
1324
|
+
value:
|
|
1325
|
+
//#endregion
|
|
1326
|
+
|
|
1327
|
+
//#region 文件夹操作相关代码
|
|
1328
|
+
/**
|
|
1329
|
+
* 点击文件夹操作
|
|
1330
|
+
* @param {Object} item 被点击文件夹节点
|
|
1331
|
+
* @param {number} index 文件夹在cameraArray中的位置
|
|
1332
|
+
*/
|
|
1333
|
+
function _clickFloder(item, index) {
|
|
1334
|
+
console.log('12222');
|
|
1335
|
+
var id = item.id;
|
|
1336
|
+
var org = item.parentId;
|
|
1337
|
+
// 关闭文件夹
|
|
1338
|
+
if (this.openTagArr.indexOf(id) > -1) {
|
|
1339
|
+
if (this.isLocating) {
|
|
1340
|
+
this.isLocating = false;
|
|
1341
|
+
return;
|
|
1342
|
+
}
|
|
1343
|
+
this._closeFloder(id, index);
|
|
1344
|
+
} else {
|
|
1345
|
+
//展开文件夹
|
|
1346
|
+
//文件夹已经打开过
|
|
1347
|
+
if (this.dataObj[id] !== undefined) {
|
|
1348
|
+
this._openFloderAgain(id, index);
|
|
1349
|
+
} else {
|
|
1350
|
+
// 将当前请求加入队列
|
|
1351
|
+
// 如果没有正在请求队列则直接进行这次请求
|
|
1352
|
+
if (this.queue.isEmpty) {
|
|
1353
|
+
// 反馈正在加载
|
|
1354
|
+
this._addLoadingNode(index + 1, this.dataObj[org]['floor'] + 1, id);
|
|
1355
|
+
this._judgeScrollbarShow();
|
|
1356
|
+
this.queue.enqueue({
|
|
1357
|
+
item: item,
|
|
1358
|
+
index: index,
|
|
1359
|
+
type: 'floder',
|
|
1360
|
+
needShow: true,
|
|
1361
|
+
needLoadNode: true
|
|
1362
|
+
});
|
|
1363
|
+
this._openFloderFirst();
|
|
1364
|
+
// 正在进行请求
|
|
1365
|
+
this.isRequest = true;
|
|
1366
|
+
} else {
|
|
1367
|
+
// 有请求,反馈正在加载
|
|
1368
|
+
if (!this.queue.isAlready(id)) {
|
|
1369
|
+
this._addLoadingNode(index + 1, this.dataObj[org]['floor'] + 1, id);
|
|
1370
|
+
this._judgeScrollbarShow();
|
|
1371
|
+
this.queue.upQueueIndex(index, 1);
|
|
1372
|
+
}
|
|
1373
|
+
this.queue.enqueue({
|
|
1374
|
+
item: item,
|
|
1375
|
+
index: index,
|
|
1376
|
+
type: 'floder',
|
|
1377
|
+
needShow: true,
|
|
1378
|
+
needLoadNode: false
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* 首次点开文件夹,有请求数据操作
|
|
1387
|
+
*/
|
|
1388
|
+
}, {
|
|
1389
|
+
key: "_openFloderFirst",
|
|
1390
|
+
value: function _openFloderFirst() {
|
|
1391
|
+
var _this8 = this;
|
|
1392
|
+
// item 当前请求数据节点对象 index 当前请求数据节点的索引, 从队列中获取
|
|
1393
|
+
var _this$queue$front = this.queue.front(),
|
|
1394
|
+
item = _this$queue$front.item,
|
|
1395
|
+
index = _this$queue$front.index;
|
|
1396
|
+
var id = item.id,
|
|
1397
|
+
resId = item.resId;
|
|
1398
|
+
var org = item.parentId;
|
|
1399
|
+
var floor = this.dataObj[org]['floor'] + 1;
|
|
1400
|
+
this.dataObj[id] = {
|
|
1401
|
+
data: [],
|
|
1402
|
+
self: item
|
|
1403
|
+
};
|
|
1404
|
+
var resArray = this.dataObj[id];
|
|
1405
|
+
this.treeLoader.setRequestObj({
|
|
1406
|
+
item: item,
|
|
1407
|
+
index: index
|
|
1408
|
+
});
|
|
1409
|
+
this.treeLoader.getNormalNode(resId, item).then(function (responseData) {
|
|
1410
|
+
if (responseData === false) {
|
|
1411
|
+
_this8.newNodeNum = 0;
|
|
1412
|
+
return;
|
|
1413
|
+
}
|
|
1414
|
+
//请求有数据
|
|
1415
|
+
if (responseData.length > 0) {
|
|
1416
|
+
_this8.openTagArr.push(id);
|
|
1417
|
+
if (!_this8.floderArr.indexOf(id) > -1) {
|
|
1418
|
+
_this8.floderArr.push(id);
|
|
1419
|
+
}
|
|
1420
|
+
responseData = _this8.treeLoader.toTreeNode(responseData, id);
|
|
1421
|
+
// 如果父节点设置了需要勾选,那么新打开的子节点进行勾选操作
|
|
1422
|
+
if (
|
|
1423
|
+
//item.loopCheck === LOOP_CHECK_TYPE.ALL ||
|
|
1424
|
+
item.isCheck && _this8.props.isLoopCheck) {
|
|
1425
|
+
for (var _index = 0, length = responseData.length; _index < length; _index++) {
|
|
1426
|
+
responseData[_index].isCheck = true;
|
|
1427
|
+
// 如果是组织节点,也添加上loopCheck
|
|
1428
|
+
if (responseData[_index].isOrgNode === true) {
|
|
1429
|
+
responseData[_index].loopCheck = LOOP_CHECK_TYPE.ALL;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
// 二次请求,判断是否需要添加‘更多加载’
|
|
1434
|
+
// 表示还有数据,需要添加
|
|
1435
|
+
if (_this8.treeLoader.judgeNeedMore(resId)) {
|
|
1436
|
+
responseData.push({
|
|
1437
|
+
type: 'loadMore',
|
|
1438
|
+
id: id,
|
|
1439
|
+
resId: resId
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
_this8.newNodeNum = responseData.length;
|
|
1443
|
+
responseData[responseData.length - 1].endTag = id;
|
|
1444
|
+
Array.prototype.push.apply(resArray.data, responseData);
|
|
1445
|
+
resArray.floor = floor;
|
|
1446
|
+
// 挂载前如果有打开或者关闭文件夹需要更新节点插入的位置
|
|
1447
|
+
index = _this8.queue.frontIndex();
|
|
1448
|
+
// 如果当前加载的请求不需要加载,则不在数组中显示
|
|
1449
|
+
if (_this8.queue.front().needShow === false || _this8.queue.front().hideTask === true || !_this8.isTreeRootExpand) {
|
|
1450
|
+
_this8.newNodeNum = 0;
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1453
|
+
// 如果最后一个为正在加载,则插入位置 + 2
|
|
1454
|
+
if (_this8.cameraArray[index + 1] && _this8.cameraArray[index + 1].type === 'loading') {
|
|
1455
|
+
var _this8$cameraArray;
|
|
1456
|
+
(_this8$cameraArray = _this8.cameraArray).splice.apply(_this8$cameraArray, [index + 2, 0].concat(_toConsumableArray(resArray.data)));
|
|
1457
|
+
// 否则 + 1
|
|
1458
|
+
} else {
|
|
1459
|
+
var _this8$cameraArray2;
|
|
1460
|
+
(_this8$cameraArray2 = _this8.cameraArray).splice.apply(_this8$cameraArray2, [index + 1, 0].concat(_toConsumableArray(resArray.data)));
|
|
1461
|
+
}
|
|
1462
|
+
_this8._judgeScrollbarShow();
|
|
1463
|
+
var sumObj = _this8._openFloder(id, index);
|
|
1464
|
+
_this8.props.nodeLoadFinishedFunc(responseData, _this8.dataObj);
|
|
1465
|
+
_this8.setState({
|
|
1466
|
+
beginSum: sumObj.beginSum,
|
|
1467
|
+
endSum: sumObj.endSum
|
|
1468
|
+
}, _this8._moveScroll);
|
|
1469
|
+
} else {
|
|
1470
|
+
_this8.newNodeNum = 0;
|
|
1471
|
+
_this8.forceUpdate();
|
|
1472
|
+
}
|
|
1473
|
+
}).catch(function (err) {
|
|
1474
|
+
console.error(err);
|
|
1475
|
+
}).finally(function () {
|
|
1476
|
+
index = _this8.queue.frontIndex();
|
|
1477
|
+
// 当前数据需要展示
|
|
1478
|
+
if (_this8.queue.front().needShow !== false && _this8.queue.front().hideTask !== true && _this8.isTreeRootExpand) {
|
|
1479
|
+
_this8._removeLoadingNode(index + 1);
|
|
1480
|
+
_this8.queue.upQueueIndex(index, -1);
|
|
1481
|
+
}
|
|
1482
|
+
if (!_this8.isTreeRootExpand) {
|
|
1483
|
+
_this8.cameraArray.splice(index + 1, 1);
|
|
1484
|
+
}
|
|
1485
|
+
_this8._judgeScrollbarShow();
|
|
1486
|
+
// 没有高优先级任务,进行队列下一次请求
|
|
1487
|
+
_this8.queue.upIndex(_this8.newNodeNum);
|
|
1488
|
+
_this8.queue.dequeue();
|
|
1489
|
+
// 重置请求到的数量
|
|
1490
|
+
_this8.newNodeNum = 0;
|
|
1491
|
+
// 如果队列不为空,进行队列下一次请求
|
|
1492
|
+
if (!_this8.queue.isEmpty) {
|
|
1493
|
+
_this8._nextQueue();
|
|
1494
|
+
} else {
|
|
1495
|
+
// 如果队列为空,将正在进行请求关闭
|
|
1496
|
+
_this8.isRequest = false;
|
|
1497
|
+
}
|
|
1498
|
+
_this8.checkNode();
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* 再次打开文件夹
|
|
1504
|
+
* @param {string} res 节点id
|
|
1505
|
+
* @param {*} index 节点的索引
|
|
1506
|
+
*/
|
|
1507
|
+
}, {
|
|
1508
|
+
key: "_openFloderAgain",
|
|
1509
|
+
value: function _openFloderAgain(res, index) {
|
|
1510
|
+
// 如果当前请求打开的节点是正在刷新普通的节点
|
|
1511
|
+
if (!this.queue.isEmpty && res === this.queue.front().item.id) {
|
|
1512
|
+
return;
|
|
1513
|
+
}
|
|
1514
|
+
var resArray = this.dataObj[res];
|
|
1515
|
+
// 此文件夹下有数据
|
|
1516
|
+
if (resArray.data.length !== 0) {
|
|
1517
|
+
var _this$cameraArray2;
|
|
1518
|
+
this.openTagArr.push(res);
|
|
1519
|
+
//遍历数组,如果其中有打开的文件夹,则打开
|
|
1520
|
+
this._recursion(res);
|
|
1521
|
+
(_this$cameraArray2 = this.cameraArray).splice.apply(_this$cameraArray2, [index + 1, 0].concat(_toConsumableArray(this.recursionArr)));
|
|
1522
|
+
// 更新打开后队列中任务的index值
|
|
1523
|
+
this.queue.upOpenIndex(index, this.recursionArr.length);
|
|
1524
|
+
// 如果有正在进行的请求
|
|
1525
|
+
if (!this.queue.isEmpty) {
|
|
1526
|
+
// 如果打开的其中有正在加载的
|
|
1527
|
+
for (var i = 0; i < this.recursionArr.length; i++) {
|
|
1528
|
+
this.queue.needShow(this.recursionArr[i].id, index + i + 1);
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
this.recursionArr = [];
|
|
1532
|
+
}
|
|
1533
|
+
var sumObj = this._openFloder(res, index);
|
|
1534
|
+
this._judgeScrollbarShow();
|
|
1535
|
+
this.setState({
|
|
1536
|
+
beginSum: sumObj.beginSum,
|
|
1537
|
+
endSum: sumObj.endSum
|
|
1538
|
+
}, this._moveScroll);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* 关闭文件夹操作
|
|
1543
|
+
* @param {string} id 节点id
|
|
1544
|
+
* @param {number} index 文件夹在cameraArray中的位置
|
|
1545
|
+
*/
|
|
1546
|
+
}, {
|
|
1547
|
+
key: "_closeFloder",
|
|
1548
|
+
value: function _closeFloder(id, index) {
|
|
1549
|
+
// 如果当前文件夹正在请求数据
|
|
1550
|
+
if (!this.queue.isEmpty && id === this.queue.front().item.id) {
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1553
|
+
var cameraArray = this.cameraArray;
|
|
1554
|
+
var _this$state5 = this.state,
|
|
1555
|
+
endSum = _this$state5.endSum,
|
|
1556
|
+
beginSum = _this$state5.beginSum,
|
|
1557
|
+
eachNum = _this$state5.eachNum;
|
|
1558
|
+
this._closeChildren(index, id);
|
|
1559
|
+
this._judgeScrollbarShow();
|
|
1560
|
+
//文件夹关闭后,处于最后面,beginSum需要上移一段位置
|
|
1561
|
+
if (cameraArray[Math.ceil(endSum)] === undefined) {
|
|
1562
|
+
endSum = cameraArray.length;
|
|
1563
|
+
beginSum = cameraArray.length - eachNum;
|
|
1564
|
+
beginSum = beginSum < 0 ? 0 : beginSum;
|
|
1565
|
+
} else {
|
|
1566
|
+
endSum = beginSum + eachNum;
|
|
1567
|
+
}
|
|
1568
|
+
//删除this.index里的记录
|
|
1569
|
+
this.openTagArr.splice(this.openTagArr.indexOf(id), 1);
|
|
1570
|
+
this.setState({
|
|
1571
|
+
endSum: endSum,
|
|
1572
|
+
beginSum: beginSum
|
|
1573
|
+
}, this._moveScroll);
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* 遍历cameraArray,找到endTag,然后删除
|
|
1578
|
+
* @param {*} index 被点击的节点在cameraArray中的index
|
|
1579
|
+
* @param {*} res 被点击节点的id
|
|
1580
|
+
*/
|
|
1581
|
+
}, {
|
|
1582
|
+
key: "_closeChildren",
|
|
1583
|
+
value: function _closeChildren(index, res) {
|
|
1584
|
+
var cameraArray = this.cameraArray;
|
|
1585
|
+
var item = this.dataObj[res].data;
|
|
1586
|
+
var lastChildRes = item[item.length - 1].id;
|
|
1587
|
+
// 如果最后一个子节点不是打开情况下,或者最后一个节点是加载节点
|
|
1588
|
+
if (!this.openTagArr.indexOf(lastChildRes) > -1 || item[item.length - 1].type !== undefined) {
|
|
1589
|
+
for (var i = index, len = cameraArray.length; i < len; i++) {
|
|
1590
|
+
if (cameraArray[i].endTag === res) {
|
|
1591
|
+
var needDeleteCount = i - index;
|
|
1592
|
+
//判断最后一个节点是组织的情况 则再往下找一层id
|
|
1593
|
+
if (cameraArray[i + 1] && cameraArray[i].isOrgNode && cameraArray[i + 1].parentId === cameraArray[i].id) {
|
|
1594
|
+
this._closeChildren(index, cameraArray[i].id);
|
|
1595
|
+
} else {
|
|
1596
|
+
// 如果最后一个是加载中节点,则删除的数量+1
|
|
1597
|
+
if (this.cameraArray[i + 1] && this.cameraArray[i + 1].type === 'loading') {
|
|
1598
|
+
needDeleteCount += 1;
|
|
1599
|
+
}
|
|
1600
|
+
//删除数据
|
|
1601
|
+
cameraArray.splice(index + 1, needDeleteCount);
|
|
1602
|
+
// 如果有真正进行的请求
|
|
1603
|
+
if (!this.queue.isEmpty) {
|
|
1604
|
+
this.queue.needHide(index, index + needDeleteCount);
|
|
1605
|
+
}
|
|
1606
|
+
// 更新关闭后队列中任务的index值
|
|
1607
|
+
this.queue.upCloseIndex(index, needDeleteCount);
|
|
1608
|
+
}
|
|
1609
|
+
break;
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* 根据子节点数,确认被打开的文件夹的位置
|
|
1617
|
+
* @param {*} id 节点id
|
|
1618
|
+
* @param {*} index 被点击文件夹在cameraArray中的index
|
|
1619
|
+
*/
|
|
1620
|
+
}, {
|
|
1621
|
+
key: "_openFloder",
|
|
1622
|
+
value: function _openFloder(id, index) {
|
|
1623
|
+
var _this$state6 = this.state,
|
|
1624
|
+
endSum = _this$state6.endSum,
|
|
1625
|
+
beginSum = _this$state6.beginSum,
|
|
1626
|
+
eachNum = _this$state6.eachNum;
|
|
1627
|
+
var childNodesLength = this.dataObj[id].data.length;
|
|
1628
|
+
//子节点数量足够整个显示的数量,文件夹置顶
|
|
1629
|
+
if (childNodesLength >= eachNum - 1) {
|
|
1630
|
+
beginSum = index;
|
|
1631
|
+
endSum = beginSum + eachNum;
|
|
1632
|
+
} else {
|
|
1633
|
+
// 还未出现滚动条时
|
|
1634
|
+
if (endSum < eachNum) {
|
|
1635
|
+
//当子节点数量+之前树的节点还是小于树最大容纳数,扩大endsum
|
|
1636
|
+
if (childNodesLength + endSum < eachNum) {
|
|
1637
|
+
endSum += childNodesLength;
|
|
1638
|
+
} else {
|
|
1639
|
+
// 子节点数量+被点击序列大于树最大容纳数,显示全子节点内容
|
|
1640
|
+
if (childNodesLength + index + 1 > eachNum) {
|
|
1641
|
+
endSum = index + childNodesLength + 1;
|
|
1642
|
+
beginSum = endSum - eachNum;
|
|
1643
|
+
} else {
|
|
1644
|
+
endSum = eachNum;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
} else {
|
|
1648
|
+
// 已经出现滚动条
|
|
1649
|
+
//子节点树+被点击序列大于endSum,显示全子节点内容
|
|
1650
|
+
if (childNodesLength + index + 1 > endSum) {
|
|
1651
|
+
endSum = index + childNodesLength + 1;
|
|
1652
|
+
beginSum = endSum - eachNum;
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
return {
|
|
1657
|
+
beginSum: beginSum,
|
|
1658
|
+
endSum: endSum
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* 更多加载
|
|
1664
|
+
* @param {number} index 更多加载按钮的索引
|
|
1665
|
+
* @param {string} id 节点id
|
|
1666
|
+
* @param {string} resId 资源id
|
|
1667
|
+
* @param {string} parentId 父节点id
|
|
1668
|
+
*/
|
|
1669
|
+
}, {
|
|
1670
|
+
key: "_loadMore",
|
|
1671
|
+
value: function _loadMore(index, id, resId, parentId) {
|
|
1672
|
+
var item = {
|
|
1673
|
+
id: id,
|
|
1674
|
+
resId: resId,
|
|
1675
|
+
parentId: parentId
|
|
1676
|
+
};
|
|
1677
|
+
// 删除更多加载
|
|
1678
|
+
this.cameraArray.splice(index, 1);
|
|
1679
|
+
// 如果没有请求直接开始加载更多
|
|
1680
|
+
if (!this.isRequest) {
|
|
1681
|
+
// 添加正在加载
|
|
1682
|
+
this._addLoadingNode(index, this.dataObj[id].floor, id);
|
|
1683
|
+
this.queue.enqueue({
|
|
1684
|
+
item: item,
|
|
1685
|
+
index: index,
|
|
1686
|
+
type: 'loadMore',
|
|
1687
|
+
needShow: true,
|
|
1688
|
+
needLoadNode: true
|
|
1689
|
+
});
|
|
1690
|
+
this._loadMoreData();
|
|
1691
|
+
// 开启正在进行请求
|
|
1692
|
+
this.isRequest = true;
|
|
1693
|
+
} else {
|
|
1694
|
+
// 将加载请求排入队列
|
|
1695
|
+
this._addLoadingNode(index, this.dataObj[id].floor, id);
|
|
1696
|
+
this.queue.enqueue({
|
|
1697
|
+
item: item,
|
|
1698
|
+
index: index,
|
|
1699
|
+
type: 'loadMore',
|
|
1700
|
+
needShow: true,
|
|
1701
|
+
needLoadNode: false
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* 请求更多加载的数据
|
|
1708
|
+
*/
|
|
1709
|
+
}, {
|
|
1710
|
+
key: "_loadMoreData",
|
|
1711
|
+
value: function _loadMoreData() {
|
|
1712
|
+
var _this9 = this;
|
|
1713
|
+
var _this$queue$front2 = this.queue.front(),
|
|
1714
|
+
item = _this$queue$front2.item,
|
|
1715
|
+
index = _this$queue$front2.index;
|
|
1716
|
+
var id = item.id,
|
|
1717
|
+
resId = item.resId,
|
|
1718
|
+
parentId = item.parentId;
|
|
1719
|
+
var value = this.state.value;
|
|
1720
|
+
var resArray = this.dataObj[id];
|
|
1721
|
+
this.treeLoader.setRequestObj({
|
|
1722
|
+
item: item,
|
|
1723
|
+
index: index
|
|
1724
|
+
});
|
|
1725
|
+
this.treeLoader.continueGetNormalNode(resId, value).then(function (responseData) {
|
|
1726
|
+
var _resArray$data, _this9$cameraArray;
|
|
1727
|
+
// 挂载前如果有打开或者关闭文件夹需要更新节点插入的位置
|
|
1728
|
+
index = _this9.queue.frontIndex();
|
|
1729
|
+
if (responseData === false) {
|
|
1730
|
+
_this9.newNodeNum = 0;
|
|
1731
|
+
return false;
|
|
1732
|
+
}
|
|
1733
|
+
responseData = _this9.treeLoader.toTreeNode(responseData, id);
|
|
1734
|
+
|
|
1735
|
+
// 如果父节点设置了需要勾选,那么新打开的子节点进行勾选操作
|
|
1736
|
+
if (_this9.dataObj[parentId].self.isCheck && _this9.props.isLoopCheck
|
|
1737
|
+
//|| this.dataObj[parentId].self.loopCheck ===
|
|
1738
|
+
// LOOP_CHECK_TYPE.SOME
|
|
1739
|
+
) {
|
|
1740
|
+
for (var _index2 = 0, length = responseData.length; _index2 < length; _index2++) {
|
|
1741
|
+
responseData[_index2].isCheck = true;
|
|
1742
|
+
// 如果是组织节点,也添加上loopCheck
|
|
1743
|
+
if (responseData[_index2].isOrgNode === true) {
|
|
1744
|
+
responseData[_index2].loopCheck = LOOP_CHECK_TYPE.ALL;
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
// 二次请求,判断是否需要添加‘更多加载’
|
|
1750
|
+
// 表示还有数据,需要添加
|
|
1751
|
+
if (_this9.treeLoader.judgeNeedMore(resId)) {
|
|
1752
|
+
responseData.push({
|
|
1753
|
+
type: 'loadMore',
|
|
1754
|
+
id: id,
|
|
1755
|
+
resId: resId
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1758
|
+
_this9.newNodeNum = responseData.length;
|
|
1759
|
+
responseData[responseData.length - 1].endTag = id;
|
|
1760
|
+
(_resArray$data = resArray.data).splice.apply(_resArray$data, [resArray.data.length - 1, 1].concat(_toConsumableArray(responseData)));
|
|
1761
|
+
// 如果当前加载的请求不需要加载,则不在数组中显示
|
|
1762
|
+
if (_this9.queue.front().needShow === false || _this9.queue.front().hideTask === true || !_this9.isTreeRootExpand) {
|
|
1763
|
+
_this9.newNodeNum = 0;
|
|
1764
|
+
return;
|
|
1765
|
+
}
|
|
1766
|
+
(_this9$cameraArray = _this9.cameraArray).splice.apply(_this9$cameraArray, [index + 1, 0].concat(_toConsumableArray(responseData)));
|
|
1767
|
+
_this9.props.nodeLoadFinishedFunc(responseData, _this9.dataObj);
|
|
1768
|
+
_this9._moveScroll();
|
|
1769
|
+
}).catch(function (err) {
|
|
1770
|
+
console.error(err);
|
|
1771
|
+
}).finally(function () {
|
|
1772
|
+
index = _this9.queue.frontIndex();
|
|
1773
|
+
// 如果当前加载的请求不需要加载
|
|
1774
|
+
if (_this9.queue.front().needShow !== false && _this9.queue.front().hideTask !== true && _this9.isTreeRootExpand) {
|
|
1775
|
+
_this9._removeLoadingNode(index);
|
|
1776
|
+
_this9.queue.upQueueIndex(index, -1);
|
|
1777
|
+
}
|
|
1778
|
+
if (!_this9.isTreeRootExpand) {
|
|
1779
|
+
_this9.cameraArray.splice(index, 1);
|
|
1780
|
+
}
|
|
1781
|
+
_this9._judgeScrollbarShow();
|
|
1782
|
+
// 没有高优先级任务,进行队列下一次请求
|
|
1783
|
+
_this9.queue.upIndeLoadMore(_this9.newNodeNum);
|
|
1784
|
+
_this9.queue.dequeue();
|
|
1785
|
+
// 重置请求到的数量
|
|
1786
|
+
_this9.newNodeNum = 0;
|
|
1787
|
+
// 如果有高优先级任务则执行
|
|
1788
|
+
// 如果队列不为空,进行队列下一次请求
|
|
1789
|
+
if (!_this9.queue.isEmpty) {
|
|
1790
|
+
_this9._nextQueue();
|
|
1791
|
+
} else {
|
|
1792
|
+
// 如果队列为空,将正在进行请求关闭
|
|
1793
|
+
_this9.isRequest = false;
|
|
1794
|
+
}
|
|
1795
|
+
_this9.checkNode();
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* 递归添加数据
|
|
1801
|
+
* @param {String} res 节点id
|
|
1802
|
+
*/
|
|
1803
|
+
}, {
|
|
1804
|
+
key: "_recursion",
|
|
1805
|
+
value: function _recursion(res) {
|
|
1806
|
+
var resArray = this.dataObj[res];
|
|
1807
|
+
for (var i = 0; i < resArray.data.length; i++) {
|
|
1808
|
+
var resData = resArray.data[i];
|
|
1809
|
+
this.recursionArr.push(resData);
|
|
1810
|
+
//此文件夹处于打开状态
|
|
1811
|
+
if (resData.type !== 'loadMore' && this.openTagArr.indexOf(resData.id) > -1) {
|
|
1812
|
+
// 如果打开的文件夹正在刷新的,不在往下查询
|
|
1813
|
+
if (this.queue.isEmpty || resArray.data[i].id !== this.queue.front().item.id) {
|
|
1814
|
+
this._recursion(resData.id);
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
return true;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* 根据 调整数量,改变可显示区域(暂时只使用在 加载中..上)
|
|
1823
|
+
* @param {Number} changeNum 需要调整的数量
|
|
1824
|
+
*/
|
|
1825
|
+
}, {
|
|
1826
|
+
key: "_judgeShowRange",
|
|
1827
|
+
value: function _judgeShowRange(changeNum) {
|
|
1828
|
+
var _this$state7 = this.state,
|
|
1829
|
+
endSum = _this$state7.endSum,
|
|
1830
|
+
eachNum = _this$state7.eachNum;
|
|
1831
|
+
|
|
1832
|
+
// 如果显示部分还没出滚动条,修改可显示部分
|
|
1833
|
+
if (endSum < eachNum) {
|
|
1834
|
+
endSum += changeNum;
|
|
1835
|
+
}
|
|
1836
|
+
this.setState({
|
|
1837
|
+
endSum: endSum
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* 进行下一次请求
|
|
1843
|
+
*/
|
|
1844
|
+
}, {
|
|
1845
|
+
key: "_nextQueue",
|
|
1846
|
+
value: function _nextQueue() {
|
|
1847
|
+
// 下一个业务的类型,如果是文件夹则执行请求文件夹
|
|
1848
|
+
if (this.queue.front().type === 'floder') {
|
|
1849
|
+
this._openFloderFirst();
|
|
1850
|
+
// 下一个业务的类型,如果是加载则执行加载更多
|
|
1851
|
+
} else if (this.queue.front().type === 'loadMore') {
|
|
1852
|
+
this._loadMoreData();
|
|
1853
|
+
// 下一个业务的类型,如果是刷新普通节点则执行刷新普通节点
|
|
1854
|
+
} else if (this.queue.front().type === 'refreshNormal') {
|
|
1855
|
+
this._refreshNormalNodeData();
|
|
1856
|
+
// 下一个业务的类型,如果是刷新根节点
|
|
1857
|
+
} else if (this.queue.front().type === 'refreshRoot') {
|
|
1858
|
+
this.cameraArray = [];
|
|
1859
|
+
this.dataObj = {};
|
|
1860
|
+
this.dataObj.root = {
|
|
1861
|
+
data: [],
|
|
1862
|
+
floor: 1
|
|
1863
|
+
};
|
|
1864
|
+
this.isTreeRootExpand = true;
|
|
1865
|
+
this._addRoot();
|
|
1866
|
+
// 下一个业务的类型,如果是搜索
|
|
1867
|
+
} else if (this.queue.front().type === 'search') {
|
|
1868
|
+
this.cameraArray = [];
|
|
1869
|
+
this.isSearching = true;
|
|
1870
|
+
this.isTreeRootExpand = true;
|
|
1871
|
+
this.dataObj = {};
|
|
1872
|
+
this.dataObj.root = {
|
|
1873
|
+
data: [],
|
|
1874
|
+
floor: 1
|
|
1875
|
+
};
|
|
1876
|
+
this.floderArr = [];
|
|
1877
|
+
this.openTagArr = [];
|
|
1878
|
+
this.setState({
|
|
1879
|
+
isScrollbarShow: false,
|
|
1880
|
+
beginSum: 0
|
|
1881
|
+
});
|
|
1882
|
+
this._searchIng();
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
//#endregion
|
|
1887
|
+
|
|
1888
|
+
//#region 刷新部分代码
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* 刷新根节点
|
|
1892
|
+
* 刷新所有缓存信息
|
|
1893
|
+
* @param {Boolean} needSelectNode 刷新之后是否需要选中其中某个节点
|
|
1894
|
+
*/
|
|
1895
|
+
}, {
|
|
1896
|
+
key: "refreshRootNode",
|
|
1897
|
+
value: function refreshRootNode(needSelectNode) {
|
|
1898
|
+
if (needSelectNode) {
|
|
1899
|
+
this.defaultClickNode = needSelectNode;
|
|
1900
|
+
}
|
|
1901
|
+
this.queue.hideTask();
|
|
1902
|
+
this.cameraArray = [];
|
|
1903
|
+
this.dataObj = {};
|
|
1904
|
+
this.dataObj.root = {
|
|
1905
|
+
data: [],
|
|
1906
|
+
floor: 1
|
|
1907
|
+
};
|
|
1908
|
+
this.isTreeRootExpand = true;
|
|
1909
|
+
if (!this.cameraArray[0] || this.cameraArray[0].type !== 'loading') {
|
|
1910
|
+
this._addLoadingNode(0, 1, 'root');
|
|
1911
|
+
}
|
|
1912
|
+
if (this.queue.isEmpty) {
|
|
1913
|
+
this._addRoot();
|
|
1914
|
+
this.queue.enqueue('refreshRoot');
|
|
1915
|
+
} else {
|
|
1916
|
+
// 队列有任务,将当前任务排入队列
|
|
1917
|
+
this.queue.enqueue('refreshRoot');
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
/**
|
|
1922
|
+
* 刷新普通节点
|
|
1923
|
+
* @param {string} id 刷新节点的id
|
|
1924
|
+
* @param {string} resId 节点的资源id
|
|
1925
|
+
* @param {number} index 节点的index
|
|
1926
|
+
* @param {number} parentFloor 节点的floor
|
|
1927
|
+
* @param {Boolean} needSelectNode 刷新之后是否需要选中其中某个节点
|
|
1928
|
+
*/
|
|
1929
|
+
}, {
|
|
1930
|
+
key: "refreshNormalNode",
|
|
1931
|
+
value: function refreshNormalNode(id, resId, index, parentFloor, needSelectNode) {
|
|
1932
|
+
if (needSelectNode) {
|
|
1933
|
+
this.defaultClickNode = needSelectNode;
|
|
1934
|
+
}
|
|
1935
|
+
var item = {
|
|
1936
|
+
id: id,
|
|
1937
|
+
resId: resId,
|
|
1938
|
+
parentFloor: parentFloor
|
|
1939
|
+
};
|
|
1940
|
+
//loader中需要整个节点的信息,业务层通过方法传下来的只有id和resid,所以这里进行替换
|
|
1941
|
+
var refreshItem = this.cameraArray.find(function (item) {
|
|
1942
|
+
return item.id === id && item.resId === resId;
|
|
1943
|
+
});
|
|
1944
|
+
if (refreshItem) {
|
|
1945
|
+
item = _objectSpread(_objectSpread({}, refreshItem), {}, {
|
|
1946
|
+
parentFloor: parentFloor
|
|
1947
|
+
});
|
|
1948
|
+
}
|
|
1949
|
+
// 如果没有请求直接开始加载更多
|
|
1950
|
+
var isOpen = this.openTagArr.indexOf(id) > -1 ? true : false;
|
|
1951
|
+
// 节点处于展开状态
|
|
1952
|
+
if (isOpen) {
|
|
1953
|
+
this._closeFloder(id, index); //删除刷新节点的子节点
|
|
1954
|
+
this.openTagArr.push(id);
|
|
1955
|
+
}
|
|
1956
|
+
if (needSelectNode && !isOpen) {
|
|
1957
|
+
this.openTagArr.push(id);
|
|
1958
|
+
}
|
|
1959
|
+
if (this.queue.isEmpty) {
|
|
1960
|
+
this._addLoadingNode(index + 1, parentFloor + 1 + 1, id);
|
|
1961
|
+
this.queue.enqueue({
|
|
1962
|
+
item: item,
|
|
1963
|
+
index: index,
|
|
1964
|
+
type: 'refreshNormal',
|
|
1965
|
+
needShow: true,
|
|
1966
|
+
needLoadNode: true,
|
|
1967
|
+
needSelectNode: needSelectNode
|
|
1968
|
+
});
|
|
1969
|
+
this._refreshNormalNodeData();
|
|
1970
|
+
// 开启正在进行请求,下次的请求直接加入队列
|
|
1971
|
+
this.isRequest = true;
|
|
1972
|
+
} else {
|
|
1973
|
+
if (!this.queue.isAlready(id)) {
|
|
1974
|
+
this._addLoadingNode(index + 1, parentFloor + 1 + 1, id);
|
|
1975
|
+
this.queue.upQueueIndex(index, 1);
|
|
1976
|
+
}
|
|
1977
|
+
this.queue.enqueue({
|
|
1978
|
+
item: item,
|
|
1979
|
+
index: index,
|
|
1980
|
+
type: 'refreshNormal',
|
|
1981
|
+
needShow: true,
|
|
1982
|
+
needLoadNode: false
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
}, {
|
|
1987
|
+
key: "_refreshNormalNodeData",
|
|
1988
|
+
value:
|
|
1989
|
+
/**
|
|
1990
|
+
* 请求刷新普通节点数据
|
|
1991
|
+
*/
|
|
1992
|
+
function _refreshNormalNodeData() {
|
|
1993
|
+
var _this0 = this;
|
|
1994
|
+
var _this$queue$front3 = this.queue.front(),
|
|
1995
|
+
item = _this$queue$front3.item,
|
|
1996
|
+
index = _this$queue$front3.index,
|
|
1997
|
+
needSelectNode = _this$queue$front3.needSelectNode;
|
|
1998
|
+
var id = item.id,
|
|
1999
|
+
resId = item.resId,
|
|
2000
|
+
parentFloor = item.parentFloor;
|
|
2001
|
+
if (needSelectNode) {
|
|
2002
|
+
if (this.defaultClickNode) {
|
|
2003
|
+
this.setState({
|
|
2004
|
+
isClickNode: needSelectNode
|
|
2005
|
+
});
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
// 节点是否处于展开状态
|
|
2009
|
+
var isOpen = this.openTagArr.indexOf(id) > -1 ? true : false;
|
|
2010
|
+
this.treeLoader.setRequestObj({
|
|
2011
|
+
requestType: 'refresh',
|
|
2012
|
+
item: item,
|
|
2013
|
+
index: index
|
|
2014
|
+
});
|
|
2015
|
+
// this.isRefreshNormal = true;
|
|
2016
|
+
this.treeLoader.refreshNormalNode(resId, item).then(function (responseData) {
|
|
2017
|
+
// 挂载前如果有打开或者关闭文件夹需要更新节点插入的位置
|
|
2018
|
+
index = _this0.queue.frontIndex();
|
|
2019
|
+
if (responseData === false) {
|
|
2020
|
+
_this0.newNodeNum = 0;
|
|
2021
|
+
return;
|
|
2022
|
+
}
|
|
2023
|
+
//请求有数据
|
|
2024
|
+
if (responseData.length > 0) {
|
|
2025
|
+
if (_this0.dataObj[id]) {
|
|
2026
|
+
var selfObj = _this0.dataObj[id].self;
|
|
2027
|
+
_this0._clearChildrens(id);
|
|
2028
|
+
// 定义存储数据对象
|
|
2029
|
+
_this0.dataObj[id] = {
|
|
2030
|
+
data: [],
|
|
2031
|
+
floor: parentFloor + 1,
|
|
2032
|
+
self: selfObj
|
|
2033
|
+
};
|
|
2034
|
+
responseData = _this0.treeLoader.toTreeNode(responseData, id);
|
|
2035
|
+
// 判断是否需要加载更多
|
|
2036
|
+
if (_this0.treeLoader.judgeNeedMore(resId)) {
|
|
2037
|
+
responseData.push({
|
|
2038
|
+
type: 'loadMore',
|
|
2039
|
+
id: id,
|
|
2040
|
+
resId: resId
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
responseData[responseData.length - 1].endTag = id;
|
|
2044
|
+
_this0.dataObj[id].data = responseData;
|
|
2045
|
+
|
|
2046
|
+
// 节点处于展开状态
|
|
2047
|
+
if (isOpen) {
|
|
2048
|
+
_this0.newNodeNum = responseData.length;
|
|
2049
|
+
// 如果当前加载的请求不需要加载,则不在数组中显示
|
|
2050
|
+
if (_this0.queue.front().needShow === false || _this0.queue.front().hideTask === true || !_this0.isTreeRootExpand) {
|
|
2051
|
+
_this0.newNodeNum = 0;
|
|
2052
|
+
return;
|
|
2053
|
+
}
|
|
2054
|
+
// 如果最后一个为正在加载,则插入位置 + 2
|
|
2055
|
+
if (_this0.cameraArray[index + 1] && _this0.cameraArray[index + 1].type === 'loading') {
|
|
2056
|
+
var _this0$cameraArray;
|
|
2057
|
+
(_this0$cameraArray = _this0.cameraArray).splice.apply(_this0$cameraArray, [index + 2, 0].concat(_toConsumableArray(responseData)));
|
|
2058
|
+
// 否则 + 1
|
|
2059
|
+
} else {
|
|
2060
|
+
var _this0$cameraArray2;
|
|
2061
|
+
(_this0$cameraArray2 = _this0.cameraArray).splice.apply(_this0$cameraArray2, [index + 1, 0].concat(_toConsumableArray(responseData)));
|
|
2062
|
+
}
|
|
2063
|
+
_this0._judgeScrollbarShow();
|
|
2064
|
+
var showPosi = _this0._openFloder(id, index);
|
|
2065
|
+
_this0.setState(showPosi);
|
|
2066
|
+
_this0.props.nodeLoadFinishedFunc(responseData, _this0.dataObj);
|
|
2067
|
+
} else {
|
|
2068
|
+
_this0.floderArr.push(id);
|
|
2069
|
+
}
|
|
2070
|
+
_this0._moveScroll();
|
|
2071
|
+
} else {
|
|
2072
|
+
if (needSelectNode) {
|
|
2073
|
+
if (!_this0.floderArr.indexOf(id) > -1) {
|
|
2074
|
+
_this0.floderArr.push(id);
|
|
2075
|
+
}
|
|
2076
|
+
// 定义存储数据对象
|
|
2077
|
+
_this0.dataObj[id] = {
|
|
2078
|
+
data: [],
|
|
2079
|
+
floor: parentFloor + 1,
|
|
2080
|
+
self: _this0.cameraArray[index]
|
|
2081
|
+
};
|
|
2082
|
+
responseData = _this0.treeLoader.toTreeNode(responseData, id);
|
|
2083
|
+
// 判断是否需要加载更多
|
|
2084
|
+
if (_this0.treeLoader.judgeNeedMore(resId)) {
|
|
2085
|
+
responseData.push({
|
|
2086
|
+
type: 'loadMore',
|
|
2087
|
+
id: id,
|
|
2088
|
+
resId: resId
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
responseData[responseData.length - 1].endTag = id;
|
|
2092
|
+
_this0.dataObj[id].data = responseData;
|
|
2093
|
+
_this0.newNodeNum = responseData.length;
|
|
2094
|
+
// 如果当前加载的请求不需要加载,则不在数组中显示
|
|
2095
|
+
if (_this0.queue.front().needShow === false || _this0.queue.front().hideTask === true || !_this0.isTreeRootExpand) {
|
|
2096
|
+
_this0.newNodeNum = 0;
|
|
2097
|
+
return;
|
|
2098
|
+
}
|
|
2099
|
+
// 如果最后一个为正在加载,则插入位置 + 2
|
|
2100
|
+
if (_this0.cameraArray[index + 1] && _this0.cameraArray[index + 1].type === 'loading') {
|
|
2101
|
+
var _this0$cameraArray3;
|
|
2102
|
+
(_this0$cameraArray3 = _this0.cameraArray).splice.apply(_this0$cameraArray3, [index + 2, 0].concat(_toConsumableArray(responseData)));
|
|
2103
|
+
// 否则 + 1
|
|
2104
|
+
} else {
|
|
2105
|
+
var _this0$cameraArray4;
|
|
2106
|
+
(_this0$cameraArray4 = _this0.cameraArray).splice.apply(_this0$cameraArray4, [index + 1, 0].concat(_toConsumableArray(responseData)));
|
|
2107
|
+
}
|
|
2108
|
+
_this0._judgeScrollbarShow();
|
|
2109
|
+
var _showPosi = _this0._openFloder(id, index);
|
|
2110
|
+
_this0.setState(_showPosi);
|
|
2111
|
+
_this0._moveScroll();
|
|
2112
|
+
_this0.props.nodeLoadFinishedFunc(responseData, _this0.dataObj);
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
}).catch(function (err) {
|
|
2117
|
+
console.error(err);
|
|
2118
|
+
}).finally(function () {
|
|
2119
|
+
index = _this0.queue.frontIndex();
|
|
2120
|
+
if (_this0.queue.front().needShow !== false && _this0.queue.front().hideTask !== true && _this0.isTreeRootExpand) {
|
|
2121
|
+
_this0._removeLoadingNode(index + 1);
|
|
2122
|
+
_this0.queue.upQueueIndex(index, -1);
|
|
2123
|
+
}
|
|
2124
|
+
if (!_this0.isTreeRootExpand) {
|
|
2125
|
+
_this0.cameraArray.splice(index + 1, 1);
|
|
2126
|
+
}
|
|
2127
|
+
_this0._judgeScrollbarShow();
|
|
2128
|
+
_this0.queue.upIndex(_this0.newNodeNum);
|
|
2129
|
+
_this0.queue.dequeue();
|
|
2130
|
+
// 重置请求到的数量
|
|
2131
|
+
_this0.newNodeNum = 0;
|
|
2132
|
+
// 如果队列不为空,进行队列下一次请求
|
|
2133
|
+
if (!_this0.queue.isEmpty) {
|
|
2134
|
+
_this0._nextQueue();
|
|
2135
|
+
} else {
|
|
2136
|
+
// 如果队列为空,将正在进行请求关闭
|
|
2137
|
+
_this0.isRequest = false;
|
|
2138
|
+
}
|
|
2139
|
+
_this0.checkNode();
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* 递归删除清除子节点
|
|
2145
|
+
* @param {string} id 节点id
|
|
2146
|
+
*/
|
|
2147
|
+
}, {
|
|
2148
|
+
key: "_clearChildrens",
|
|
2149
|
+
value: function _clearChildrens(id) {
|
|
2150
|
+
// 如果节点对象存在
|
|
2151
|
+
if (this.dataObj[id] !== undefined) {
|
|
2152
|
+
var childrenNodes = this.dataObj[id].data;
|
|
2153
|
+
childrenNodes.forEach(function (node) {
|
|
2154
|
+
// 如果节点是组织节点
|
|
2155
|
+
if (node.isOrgNode) {
|
|
2156
|
+
var nodeId = node.id;
|
|
2157
|
+
// 如果节点已经含有子节点内容,则遍历子节点,清除里面内容
|
|
2158
|
+
if (this.floderArr.indexOf(nodeId) > -1) {
|
|
2159
|
+
this.floderArr.splice(this.floderArr.indexOf(nodeId), 1);
|
|
2160
|
+
this.openTagArr.indexOf(nodeId) > -1 && this.openTagArr.splice(this.openTagArr.indexOf(nodeId), 1);
|
|
2161
|
+
this._clearChildrens(nodeId);
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
}, this);
|
|
2165
|
+
this.dataObj[id] = {};
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
/**
|
|
2170
|
+
* 重新设置TreeLoader 还有对应的DataType
|
|
2171
|
+
* @param {TreeLoader} loader 为空则不变
|
|
2172
|
+
* @param {Array} dateType
|
|
2173
|
+
*/
|
|
2174
|
+
}, {
|
|
2175
|
+
key: "reloadTreeLoaderDataTypes",
|
|
2176
|
+
value: function reloadTreeLoaderDataTypes(loader, dateType) {
|
|
2177
|
+
this.setState({
|
|
2178
|
+
value: ''
|
|
2179
|
+
});
|
|
2180
|
+
if (loader && this.treeLoader !== loader) {
|
|
2181
|
+
this.treeLoader = loader;
|
|
2182
|
+
this.treeLoader.init(this.props.requestFinishedFunc, this.props.requestFailedFunc);
|
|
2183
|
+
}
|
|
2184
|
+
this.treeLoader.dataTypes = dateType;
|
|
2185
|
+
this.refreshRootNode();
|
|
2186
|
+
}
|
|
2187
|
+
//#endregion
|
|
2188
|
+
|
|
2189
|
+
//#region 搜索部分代码
|
|
2190
|
+
/**
|
|
2191
|
+
* 搜索框onchange事件
|
|
2192
|
+
* @param {*} e event
|
|
2193
|
+
*/
|
|
2194
|
+
}, {
|
|
2195
|
+
key: "_handleChange",
|
|
2196
|
+
value: function _handleChange(e) {
|
|
2197
|
+
this.setState({
|
|
2198
|
+
value: e
|
|
2199
|
+
});
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
/**
|
|
2203
|
+
* 点击搜索
|
|
2204
|
+
* 清空一些缓存信息,隐藏滚动条,起始位置归0
|
|
2205
|
+
*/
|
|
2206
|
+
}, {
|
|
2207
|
+
key: "_clickSearch",
|
|
2208
|
+
value: function _clickSearch() {
|
|
2209
|
+
var _this1 = this;
|
|
2210
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
2211
|
+
if (value === '') {
|
|
2212
|
+
//当搜索关键字为空(点击清空图标或空关键词时回车搜索),如果有备份的原组织树信息,则直接恢复数据,下一次再空值搜索就是刷新根节点了
|
|
2213
|
+
if (this.bakTreeInfo && this.bakTreeStateInfo) {
|
|
2214
|
+
this.setState(_objectSpread({}, this.bakTreeStateInfo));
|
|
2215
|
+
Object.keys(this.bakTreeInfo).forEach(function (item) {
|
|
2216
|
+
_this1[item] = _this1.bakTreeInfo[item];
|
|
2217
|
+
});
|
|
2218
|
+
this.searchValue = value;
|
|
2219
|
+
this.isSearching = false;
|
|
2220
|
+
this.bakTreeInfo = undefined;
|
|
2221
|
+
this.bakTreeStateInfo = undefined;
|
|
2222
|
+
if (this.isLocating) {
|
|
2223
|
+
this.isLocating = false;
|
|
2224
|
+
return;
|
|
2225
|
+
}
|
|
2226
|
+
} else {
|
|
2227
|
+
if (!this.queue.isAlready('refreshRoot')) {
|
|
2228
|
+
this.queue.hideTask();
|
|
2229
|
+
this.cameraArray = [];
|
|
2230
|
+
this.dataObj = {};
|
|
2231
|
+
this.dataObj.root = {
|
|
2232
|
+
data: [],
|
|
2233
|
+
floor: 1
|
|
2234
|
+
};
|
|
2235
|
+
this.isTreeRootExpand = true;
|
|
2236
|
+
this._addLoadingNode(0, 1, 'root');
|
|
2237
|
+
}
|
|
2238
|
+
this.refreshRootNode();
|
|
2239
|
+
}
|
|
2240
|
+
} else {
|
|
2241
|
+
this.queue.hideTask();
|
|
2242
|
+
this.searchValue = value;
|
|
2243
|
+
this.isSearching = true;
|
|
2244
|
+
this.isTreeRootExpand = true;
|
|
2245
|
+
|
|
2246
|
+
//有关键字进行搜索时只有在没有备份的情况下(非搜索模式下)进行备份
|
|
2247
|
+
if (!this.bakTreeInfo || !this.bakTreeStateInfo) {
|
|
2248
|
+
this.bakTreeInfo = {
|
|
2249
|
+
cameraArray: _toConsumableArray(this.cameraArray),
|
|
2250
|
+
dataObj: _objectSpread({}, this.dataObj),
|
|
2251
|
+
floderArr: _toConsumableArray(this.floderArr),
|
|
2252
|
+
openTagArr: _toConsumableArray(this.openTagArr)
|
|
2253
|
+
};
|
|
2254
|
+
this.bakTreeStateInfo = {
|
|
2255
|
+
isScrollbarShow: this.state.isScrollbarShow,
|
|
2256
|
+
beginSum: this.state.beginSum,
|
|
2257
|
+
endSum: this.state.endSum,
|
|
2258
|
+
eachNum: this.state.eachNum
|
|
2259
|
+
};
|
|
2260
|
+
}
|
|
2261
|
+
this.cameraArray = [];
|
|
2262
|
+
this.dataObj = {};
|
|
2263
|
+
this.dataObj.root = {
|
|
2264
|
+
data: [],
|
|
2265
|
+
floor: 1
|
|
2266
|
+
};
|
|
2267
|
+
this.floderArr = [];
|
|
2268
|
+
this.openTagArr = [];
|
|
2269
|
+
this.setState({
|
|
2270
|
+
isScrollbarShow: false,
|
|
2271
|
+
beginSum: 0
|
|
2272
|
+
});
|
|
2273
|
+
this._addLoadingNode(0, 1, 'search');
|
|
2274
|
+
this.queue.enqueue('search');
|
|
2275
|
+
if (!this.queue.isEmpty) {
|
|
2276
|
+
this._nextQueue();
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
var onSearch = this.props.onSearch;
|
|
2280
|
+
typeof onSearch === 'function' && onSearch(value);
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
/**
|
|
2284
|
+
* 开始搜索
|
|
2285
|
+
*/
|
|
2286
|
+
}, {
|
|
2287
|
+
key: "_searchIng",
|
|
2288
|
+
value: function _searchIng() {
|
|
2289
|
+
var _this10 = this;
|
|
2290
|
+
if (!this.cameraArray[0] || this.cameraArray[0].type !== 'loading') {
|
|
2291
|
+
this._addLoadingNode(0, 1, 'search');
|
|
2292
|
+
}
|
|
2293
|
+
var needFuzzySearch = this.props.needFuzzySearch;
|
|
2294
|
+
var newValue = Array.from(this.searchValue).join(' ');
|
|
2295
|
+
// 更新搜索目标域key值
|
|
2296
|
+
this.lastSearchKey = this.clickOrgKey;
|
|
2297
|
+
this.treeLoader.setRequestObj({
|
|
2298
|
+
requestType: 'search'
|
|
2299
|
+
});
|
|
2300
|
+
this.treeLoader.getSearchNode(needFuzzySearch ? newValue : this.searchValue, this.clickOrgKey).then(function (returnData) {
|
|
2301
|
+
_this10._removeLoadingNode(0);
|
|
2302
|
+
_this10.queue.upQueueIndex(0, -1);
|
|
2303
|
+
_this10.forceUpdate();
|
|
2304
|
+
if (returnData === false) {
|
|
2305
|
+
return;
|
|
2306
|
+
}
|
|
2307
|
+
//请求有数据
|
|
2308
|
+
if (returnData.length > 0) {
|
|
2309
|
+
returnData = _this10.treeLoader.toTreeNode(returnData, 'root');
|
|
2310
|
+
// 判断是否有更多数据,需要更多加载提示语
|
|
2311
|
+
if (_this10.treeLoader.judgeSearchMore()) {
|
|
2312
|
+
returnData.push({
|
|
2313
|
+
type: 'searchMore'
|
|
2314
|
+
});
|
|
2315
|
+
}
|
|
2316
|
+
if (_this10.queue.front().hideTask !== true) {
|
|
2317
|
+
_this10.cameraArray = returnData;
|
|
2318
|
+
_this10.dataObj.root.data = _toConsumableArray(returnData);
|
|
2319
|
+
}
|
|
2320
|
+
_this10._judgeScrollbarShow();
|
|
2321
|
+
_this10.props.nodeLoadFinishedFunc(returnData, _this10.dataObj);
|
|
2322
|
+
_this10.setState({
|
|
2323
|
+
beginSum: 0,
|
|
2324
|
+
endSum: _this10.state.eachNum
|
|
2325
|
+
}, _this10._moveScroll);
|
|
2326
|
+
}
|
|
2327
|
+
}).catch(function (err) {
|
|
2328
|
+
_this10._removeLoadingNode(0);
|
|
2329
|
+
_this10.queue.upQueueIndex(0, -1);
|
|
2330
|
+
console.error(err);
|
|
2331
|
+
}).finally(function () {
|
|
2332
|
+
_this10.queue.dequeue();
|
|
2333
|
+
_this10._removeLoadingNode(_this10.cameraArray.length - 1);
|
|
2334
|
+
_this10._judgeScrollbarShow();
|
|
2335
|
+
_this10.checkNode();
|
|
2336
|
+
if (!_this10.queue.isEmpty) {
|
|
2337
|
+
_this10._nextQueue();
|
|
2338
|
+
} else {
|
|
2339
|
+
// 如果队列为空,将正在进行请求关闭
|
|
2340
|
+
_this10.isRequest = false;
|
|
2341
|
+
}
|
|
2342
|
+
_this10.isSearching = true;
|
|
2343
|
+
});
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
/**
|
|
2347
|
+
* 继续搜索
|
|
2348
|
+
*/
|
|
2349
|
+
}, {
|
|
2350
|
+
key: "_continueSearching",
|
|
2351
|
+
value: function _continueSearching() {
|
|
2352
|
+
var _this11 = this;
|
|
2353
|
+
var value = this.state.value;
|
|
2354
|
+
var cameraArray = this.cameraArray;
|
|
2355
|
+
this.treeLoader.setRequestObj({
|
|
2356
|
+
requestType: 'search'
|
|
2357
|
+
});
|
|
2358
|
+
this.treeLoader.continueGetSearchNode(value, this.lastSearchKey).then(function (returnData) {
|
|
2359
|
+
if (returnData === false) {
|
|
2360
|
+
return;
|
|
2361
|
+
}
|
|
2362
|
+
//请求有数据
|
|
2363
|
+
if (returnData.length > 0) {
|
|
2364
|
+
var cameraArrayLength = cameraArray.length;
|
|
2365
|
+
returnData = _this11.treeLoader.toTreeNode(returnData, 'root');
|
|
2366
|
+
if (_this11.queue.front() === undefined || _this11.queue.front().hideTask !== true) {
|
|
2367
|
+
if (!_this11.treeLoader.judgeSearchMore()) {
|
|
2368
|
+
var _this11$dataObj$root$;
|
|
2369
|
+
cameraArray.splice.apply(cameraArray, [cameraArrayLength - 1, 1].concat(_toConsumableArray(returnData)));
|
|
2370
|
+
(_this11$dataObj$root$ = _this11.dataObj.root.data).splice.apply(_this11$dataObj$root$, [cameraArrayLength - 1, 1].concat(_toConsumableArray(returnData)));
|
|
2371
|
+
} else {
|
|
2372
|
+
var _this11$dataObj$root$2;
|
|
2373
|
+
cameraArray.splice.apply(cameraArray, [cameraArrayLength - 1, 0].concat(_toConsumableArray(returnData)));
|
|
2374
|
+
(_this11$dataObj$root$2 = _this11.dataObj.root.data).splice.apply(_this11$dataObj$root$2, [cameraArrayLength - 1, 0].concat(_toConsumableArray(returnData)));
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
_this11._moveScroll();
|
|
2378
|
+
_this11.props.nodeLoadFinishedFunc(returnData, _this11.dataObj);
|
|
2379
|
+
}
|
|
2380
|
+
}).catch(function (err) {
|
|
2381
|
+
return console.error(err);
|
|
2382
|
+
}).finally(function () {
|
|
2383
|
+
_this11.checkNode();
|
|
2384
|
+
});
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
/**
|
|
2388
|
+
* 点击删除value
|
|
2389
|
+
*/
|
|
2390
|
+
}, {
|
|
2391
|
+
key: "_clickDelete",
|
|
2392
|
+
value: function _clickDelete(value) {
|
|
2393
|
+
var _this12 = this;
|
|
2394
|
+
// 先进行删除,再判断是否需要查询
|
|
2395
|
+
this.setState({
|
|
2396
|
+
value: ''
|
|
2397
|
+
}, function () {
|
|
2398
|
+
var _this12$props = _this12.props,
|
|
2399
|
+
onReset = _this12$props.onReset,
|
|
2400
|
+
_this12$props$isClear = _this12$props.isClearAndSearch,
|
|
2401
|
+
isClearAndSearch = _this12$props$isClear === void 0 ? true : _this12$props$isClear;
|
|
2402
|
+
if (isClearAndSearch) {
|
|
2403
|
+
_this12._clickSearch(value);
|
|
2404
|
+
}
|
|
2405
|
+
typeof onReset === 'function' && onReset();
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
/**
|
|
2410
|
+
* 回车事件
|
|
2411
|
+
*/
|
|
2412
|
+
}, {
|
|
2413
|
+
key: "_getKey",
|
|
2414
|
+
value: function _getKey(value) {
|
|
2415
|
+
this._clickSearch(value);
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
//#endregion
|
|
2419
|
+
|
|
2420
|
+
//#region 节点相关
|
|
2421
|
+
/**
|
|
2422
|
+
* 添加正在加载节点
|
|
2423
|
+
* @param {number} index 在cameraArray中添加的位置
|
|
2424
|
+
* @param {number} floorNum 需要添加loading的层级,主要来计算padding的值
|
|
2425
|
+
* @param {String} id 正在加载唯一的key
|
|
2426
|
+
*/
|
|
2427
|
+
}, {
|
|
2428
|
+
key: "_addLoadingNode",
|
|
2429
|
+
value: function _addLoadingNode(index, floorNum, id) {
|
|
2430
|
+
var _this13 = this;
|
|
2431
|
+
this.cameraArray.splice(index, 0, {
|
|
2432
|
+
type: 'loading',
|
|
2433
|
+
floorNum: floorNum,
|
|
2434
|
+
id: id
|
|
2435
|
+
});
|
|
2436
|
+
this._judgeShowRange(1);
|
|
2437
|
+
this.setState({
|
|
2438
|
+
isLoading: true
|
|
2439
|
+
}, function () {
|
|
2440
|
+
_this13._judgeShowRange(1);
|
|
2441
|
+
});
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* 移除正在加载节点
|
|
2446
|
+
* @param {number} 在cameraArray中添加的位置
|
|
2447
|
+
*/
|
|
2448
|
+
}, {
|
|
2449
|
+
key: "_removeLoadingNode",
|
|
2450
|
+
value: function _removeLoadingNode(index) {
|
|
2451
|
+
var _this14 = this;
|
|
2452
|
+
if (this.cameraArray[index] && this.cameraArray[index].type === 'loading') {
|
|
2453
|
+
this.cameraArray.splice(index, 1);
|
|
2454
|
+
this.setState({
|
|
2455
|
+
isLoading: false
|
|
2456
|
+
}, function () {
|
|
2457
|
+
_this14._judgeShowRange(-1);
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
/**
|
|
2463
|
+
* 选中节点,添加选中样式
|
|
2464
|
+
* @param {Object} item 被点击节点对象
|
|
2465
|
+
*/
|
|
2466
|
+
}, {
|
|
2467
|
+
key: "_clickNode",
|
|
2468
|
+
value: function _clickNode(item) {
|
|
2469
|
+
this.setState({
|
|
2470
|
+
isClickNode: item.id
|
|
2471
|
+
});
|
|
2472
|
+
if (!this.isSearching) {
|
|
2473
|
+
// 如果点击的是组织,更新节点key,否则使用上一次搜索时的key值
|
|
2474
|
+
this.clickOrgKey = ORG_TYPE_ARR.includes(item.resourceInfo.resType) ? item.resId : this.lastSearchKey;
|
|
2475
|
+
}
|
|
2476
|
+
this.defaultClickNode = '';
|
|
2477
|
+
}
|
|
2478
|
+
}, {
|
|
2479
|
+
key: "setClickNode",
|
|
2480
|
+
value:
|
|
2481
|
+
/**
|
|
2482
|
+
* 根据resId高亮需要节点
|
|
2483
|
+
* @param {String} item 需要选中的resId
|
|
2484
|
+
*/
|
|
2485
|
+
function setClickNode(resId) {
|
|
2486
|
+
var id = '';
|
|
2487
|
+
for (var i = 0; i < this.cameraArray.length; i++) {
|
|
2488
|
+
var element = this.cameraArray[i];
|
|
2489
|
+
if (resId === element.resId) {
|
|
2490
|
+
id = element.id;
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
if (id) {
|
|
2494
|
+
this.setState({
|
|
2495
|
+
isClickNode: id
|
|
2496
|
+
});
|
|
2497
|
+
this.defaultClickNode = '';
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
}, {
|
|
2501
|
+
key: "_resetSearchToTree",
|
|
2502
|
+
value: function () {
|
|
2503
|
+
var _resetSearchToTree2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
2504
|
+
var _this15 = this;
|
|
2505
|
+
return _regenerator().w(function (_context3) {
|
|
2506
|
+
while (1) switch (_context3.n) {
|
|
2507
|
+
case 0:
|
|
2508
|
+
return _context3.a(2, new Promise(function (resolve) {
|
|
2509
|
+
if (_this15.state.value && _this15.isSearching) {
|
|
2510
|
+
_this15.setState({
|
|
2511
|
+
value: ''
|
|
2512
|
+
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
2513
|
+
return _regenerator().w(function (_context2) {
|
|
2514
|
+
while (1) switch (_context2.n) {
|
|
2515
|
+
case 0:
|
|
2516
|
+
_this15.isLocating = true;
|
|
2517
|
+
_this15._clickSearch();
|
|
2518
|
+
_context2.n = 1;
|
|
2519
|
+
return _this15._locateTreeNodeEnd();
|
|
2520
|
+
case 1:
|
|
2521
|
+
resolve();
|
|
2522
|
+
case 2:
|
|
2523
|
+
return _context2.a(2);
|
|
2524
|
+
}
|
|
2525
|
+
}, _callee2);
|
|
2526
|
+
})));
|
|
2527
|
+
} else {
|
|
2528
|
+
resolve();
|
|
2529
|
+
}
|
|
2530
|
+
}));
|
|
2531
|
+
}
|
|
2532
|
+
}, _callee3);
|
|
2533
|
+
}));
|
|
2534
|
+
function _resetSearchToTree() {
|
|
2535
|
+
return _resetSearchToTree2.apply(this, arguments);
|
|
2536
|
+
}
|
|
2537
|
+
return _resetSearchToTree;
|
|
2538
|
+
}()
|
|
2539
|
+
/**
|
|
2540
|
+
* 定位某个节点到资源树中(自动打开对应的父级文件夹),高亮选择该节点
|
|
2541
|
+
* resId 节点资源id 必填
|
|
2542
|
+
* path 该节点的父级组织路径,选填 如 iccsid>org1>org2
|
|
2543
|
+
* searchJumpToTree 如果是搜索模式下的定位,是否需要先切换为树模式
|
|
2544
|
+
*/
|
|
2545
|
+
}, {
|
|
2546
|
+
key: "locateTreeNode",
|
|
2547
|
+
value: (function () {
|
|
2548
|
+
var _locateTreeNode = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(resId) {
|
|
2549
|
+
var _this16 = this;
|
|
2550
|
+
var path,
|
|
2551
|
+
searchJumpToTree,
|
|
2552
|
+
pathArr,
|
|
2553
|
+
reversePathArr,
|
|
2554
|
+
itemIndex,
|
|
2555
|
+
_loop2,
|
|
2556
|
+
i,
|
|
2557
|
+
_args5 = arguments;
|
|
2558
|
+
return _regenerator().w(function (_context5) {
|
|
2559
|
+
while (1) switch (_context5.n) {
|
|
2560
|
+
case 0:
|
|
2561
|
+
path = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : '';
|
|
2562
|
+
searchJumpToTree = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : false;
|
|
2563
|
+
if (resId) {
|
|
2564
|
+
_context5.n = 1;
|
|
2565
|
+
break;
|
|
2566
|
+
}
|
|
2567
|
+
return _context5.a(2);
|
|
2568
|
+
case 1:
|
|
2569
|
+
if (!this.isSearching) {
|
|
2570
|
+
_context5.n = 4;
|
|
2571
|
+
break;
|
|
2572
|
+
}
|
|
2573
|
+
if (!searchJumpToTree) {
|
|
2574
|
+
_context5.n = 3;
|
|
2575
|
+
break;
|
|
2576
|
+
}
|
|
2577
|
+
_context5.n = 2;
|
|
2578
|
+
return this._resetSearchToTree();
|
|
2579
|
+
case 2:
|
|
2580
|
+
_context5.n = 4;
|
|
2581
|
+
break;
|
|
2582
|
+
case 3:
|
|
2583
|
+
return _context5.a(2);
|
|
2584
|
+
case 4:
|
|
2585
|
+
if (path) {
|
|
2586
|
+
_context5.n = 5;
|
|
2587
|
+
break;
|
|
2588
|
+
}
|
|
2589
|
+
//无父级路径时直接根据资源编码去匹配树节点
|
|
2590
|
+
this._selectClickNode(resId);
|
|
2591
|
+
_context5.n = 11;
|
|
2592
|
+
break;
|
|
2593
|
+
case 5:
|
|
2594
|
+
pathArr = path.split('/');
|
|
2595
|
+
if (pathArr[0] === '') {
|
|
2596
|
+
pathArr = pathArr.splice(1);
|
|
2597
|
+
}
|
|
2598
|
+
if (!(pathArr.length === 0)) {
|
|
2599
|
+
_context5.n = 6;
|
|
2600
|
+
break;
|
|
2601
|
+
}
|
|
2602
|
+
return _context5.a(2);
|
|
2603
|
+
case 6:
|
|
2604
|
+
reversePathArr = _toConsumableArray(pathArr).reverse();
|
|
2605
|
+
itemIndex = this.cameraArray.findIndex(function (item) {
|
|
2606
|
+
return item.resId === resId && item.resourceInfo.orgCode === reversePathArr[0];
|
|
2607
|
+
});
|
|
2608
|
+
if (!(itemIndex > -1)) {
|
|
2609
|
+
_context5.n = 7;
|
|
2610
|
+
break;
|
|
2611
|
+
}
|
|
2612
|
+
//当前树中已经渲染的节点直接能找到符合父级编码的设备时直接匹配定位即可
|
|
2613
|
+
this._selectClickNode(resId, reversePathArr[0]);
|
|
2614
|
+
return _context5.a(2);
|
|
2615
|
+
case 7:
|
|
2616
|
+
_loop2 = /*#__PURE__*/_regenerator().m(function _loop2(i) {
|
|
2617
|
+
var itemIndex, newPathArr;
|
|
2618
|
+
return _regenerator().w(function (_context4) {
|
|
2619
|
+
while (1) switch (_context4.n) {
|
|
2620
|
+
case 0:
|
|
2621
|
+
//从当前树已渲染节点从内部父级组织开始找,找到后就从此组织节点进入即可,如a->b->c->d,当前树渲染的节点直接能找到c,则只需要从c->d这样的组织结构去定位即可
|
|
2622
|
+
itemIndex = _this16.cameraArray.findIndex(function (item) {
|
|
2623
|
+
return item.resId === reversePathArr[i];
|
|
2624
|
+
});
|
|
2625
|
+
if (!(itemIndex > -1)) {
|
|
2626
|
+
_context4.n = 1;
|
|
2627
|
+
break;
|
|
2628
|
+
}
|
|
2629
|
+
newPathArr = pathArr.slice(pathArr.length - i - 1);
|
|
2630
|
+
_this16.findTreeNode(resId, newPathArr);
|
|
2631
|
+
return _context4.a(2, 1);
|
|
2632
|
+
case 1:
|
|
2633
|
+
return _context4.a(2);
|
|
2634
|
+
}
|
|
2635
|
+
}, _loop2);
|
|
2636
|
+
});
|
|
2637
|
+
i = 0;
|
|
2638
|
+
case 8:
|
|
2639
|
+
if (!(i < reversePathArr.length)) {
|
|
2640
|
+
_context5.n = 11;
|
|
2641
|
+
break;
|
|
2642
|
+
}
|
|
2643
|
+
return _context5.d(_regeneratorValues(_loop2(i)), 9);
|
|
2644
|
+
case 9:
|
|
2645
|
+
if (!_context5.v) {
|
|
2646
|
+
_context5.n = 10;
|
|
2647
|
+
break;
|
|
2648
|
+
}
|
|
2649
|
+
return _context5.a(3, 11);
|
|
2650
|
+
case 10:
|
|
2651
|
+
i++;
|
|
2652
|
+
_context5.n = 8;
|
|
2653
|
+
break;
|
|
2654
|
+
case 11:
|
|
2655
|
+
return _context5.a(2);
|
|
2656
|
+
}
|
|
2657
|
+
}, _callee4, this);
|
|
2658
|
+
}));
|
|
2659
|
+
function locateTreeNode(_x2) {
|
|
2660
|
+
return _locateTreeNode.apply(this, arguments);
|
|
2661
|
+
}
|
|
2662
|
+
return locateTreeNode;
|
|
2663
|
+
}()
|
|
2664
|
+
/**
|
|
2665
|
+
* 在资源树中高亮选中某个节点并且调整滚动条
|
|
2666
|
+
*/
|
|
2667
|
+
)
|
|
2668
|
+
}, {
|
|
2669
|
+
key: "_selectClickNode",
|
|
2670
|
+
value: function _selectClickNode(resId, resParentOrgId) {
|
|
2671
|
+
var _this17 = this;
|
|
2672
|
+
var _this$state8 = this.state,
|
|
2673
|
+
beginSum = _this$state8.beginSum,
|
|
2674
|
+
endSum = _this$state8.endSum,
|
|
2675
|
+
eachNum = _this$state8.eachNum;
|
|
2676
|
+
var clickIndex = this.cameraArray.findIndex(function (item) {
|
|
2677
|
+
return item.resId === resId;
|
|
2678
|
+
});
|
|
2679
|
+
if (resParentOrgId) {
|
|
2680
|
+
clickIndex = this.cameraArray.findIndex(function (item) {
|
|
2681
|
+
return item.resourceInfo.resCode === resId && item.resourceInfo.orgCode === resParentOrgId;
|
|
2682
|
+
});
|
|
2683
|
+
}
|
|
2684
|
+
if (clickIndex === -1) {
|
|
2685
|
+
if (resParentOrgId) {
|
|
2686
|
+
clickIndex = this.cameraArray.findIndex(function (item) {
|
|
2687
|
+
return item.resId === resParentOrgId;
|
|
2688
|
+
});
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
if (clickIndex === -1) {
|
|
2692
|
+
this.isLocating = false;
|
|
2693
|
+
return;
|
|
2694
|
+
}
|
|
2695
|
+
if (endSum >= eachNum && (clickIndex > endSum || clickIndex < beginSum)) {
|
|
2696
|
+
beginSum = clickIndex;
|
|
2697
|
+
//当窗口变大,数量不够显示,需要调整位置
|
|
2698
|
+
if (beginSum + eachNum > this.cameraArray.length) {
|
|
2699
|
+
beginSum = this.cameraArray.length - eachNum;
|
|
2700
|
+
}
|
|
2701
|
+
endSum = beginSum + eachNum;
|
|
2702
|
+
this.setState({
|
|
2703
|
+
beginSum: beginSum,
|
|
2704
|
+
endSum: endSum,
|
|
2705
|
+
isClickNode: this.cameraArray[clickIndex].id
|
|
2706
|
+
}, function () {
|
|
2707
|
+
_this17.isLocating = false;
|
|
2708
|
+
});
|
|
2709
|
+
} else {
|
|
2710
|
+
this.setState({
|
|
2711
|
+
isClickNode: this.cameraArray[clickIndex].id
|
|
2712
|
+
}, function () {
|
|
2713
|
+
_this17.isLocating = false;
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
/**
|
|
2719
|
+
* 按照组织路径依次打开对应文件夹
|
|
2720
|
+
*/
|
|
2721
|
+
}, {
|
|
2722
|
+
key: "findTreeNode",
|
|
2723
|
+
value: (function () {
|
|
2724
|
+
var _findTreeNode = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(resId, pathArr) {
|
|
2725
|
+
var _this18 = this;
|
|
2726
|
+
var resParentOrgId, _loop3, i;
|
|
2727
|
+
return _regenerator().w(function (_context7) {
|
|
2728
|
+
while (1) switch (_context7.n) {
|
|
2729
|
+
case 0:
|
|
2730
|
+
if (resId) {
|
|
2731
|
+
_context7.n = 1;
|
|
2732
|
+
break;
|
|
2733
|
+
}
|
|
2734
|
+
return _context7.a(2);
|
|
2735
|
+
case 1:
|
|
2736
|
+
if (!(pathArr.length === 0)) {
|
|
2737
|
+
_context7.n = 2;
|
|
2738
|
+
break;
|
|
2739
|
+
}
|
|
2740
|
+
return _context7.a(2);
|
|
2741
|
+
case 2:
|
|
2742
|
+
resParentOrgId = '';
|
|
2743
|
+
_loop3 = /*#__PURE__*/_regenerator().m(function _loop3(i) {
|
|
2744
|
+
var itemIndex, hasMore, childItems, moreItemIndex;
|
|
2745
|
+
return _regenerator().w(function (_context6) {
|
|
2746
|
+
while (1) switch (_context6.n) {
|
|
2747
|
+
case 0:
|
|
2748
|
+
itemIndex = _this18.cameraArray.findIndex(function (item) {
|
|
2749
|
+
return item.resId === pathArr[i];
|
|
2750
|
+
});
|
|
2751
|
+
if (!(itemIndex > -1)) {
|
|
2752
|
+
_context6.n = 8;
|
|
2753
|
+
break;
|
|
2754
|
+
}
|
|
2755
|
+
_this18.isLocating = true;
|
|
2756
|
+
_this18._selectClickNode(pathArr[i]);
|
|
2757
|
+
_context6.n = 1;
|
|
2758
|
+
return _this18._locateTreeNodeEnd();
|
|
2759
|
+
case 1:
|
|
2760
|
+
_this18.isLocating = true;
|
|
2761
|
+
_this18._clickFloder(_this18.cameraArray[itemIndex], itemIndex);
|
|
2762
|
+
_context6.n = 2;
|
|
2763
|
+
return _this18._locateTreeNodeEnd();
|
|
2764
|
+
case 2:
|
|
2765
|
+
//将加载更多处理完
|
|
2766
|
+
hasMore = true;
|
|
2767
|
+
case 3:
|
|
2768
|
+
if (!hasMore) {
|
|
2769
|
+
_context6.n = 7;
|
|
2770
|
+
break;
|
|
2771
|
+
}
|
|
2772
|
+
childItems = _this18.dataObj[_this18.cameraArray[itemIndex].id].data;
|
|
2773
|
+
moreItemIndex = childItems.findIndex(function (item) {
|
|
2774
|
+
return item.type === 'loadMore';
|
|
2775
|
+
});
|
|
2776
|
+
if (!(moreItemIndex > -1)) {
|
|
2777
|
+
_context6.n = 5;
|
|
2778
|
+
break;
|
|
2779
|
+
}
|
|
2780
|
+
_this18.isLocating = true;
|
|
2781
|
+
_this18._loadMore(itemIndex + moreItemIndex + 1, childItems[moreItemIndex].id, childItems[moreItemIndex].resId, childItems[moreItemIndex].id);
|
|
2782
|
+
_context6.n = 4;
|
|
2783
|
+
return _this18._locateTreeNodeEnd();
|
|
2784
|
+
case 4:
|
|
2785
|
+
_context6.n = 6;
|
|
2786
|
+
break;
|
|
2787
|
+
case 5:
|
|
2788
|
+
hasMore = false;
|
|
2789
|
+
case 6:
|
|
2790
|
+
_context6.n = 3;
|
|
2791
|
+
break;
|
|
2792
|
+
case 7:
|
|
2793
|
+
resParentOrgId = pathArr[i];
|
|
2794
|
+
_context6.n = 9;
|
|
2795
|
+
break;
|
|
2796
|
+
case 8:
|
|
2797
|
+
console.log('findTreeNode this.cameraArray has no org', pathArr[i]);
|
|
2798
|
+
return _context6.a(2, 1);
|
|
2799
|
+
case 9:
|
|
2800
|
+
return _context6.a(2);
|
|
2801
|
+
}
|
|
2802
|
+
}, _loop3);
|
|
2803
|
+
});
|
|
2804
|
+
i = 0;
|
|
2805
|
+
case 3:
|
|
2806
|
+
if (!(i < pathArr.length)) {
|
|
2807
|
+
_context7.n = 6;
|
|
2808
|
+
break;
|
|
2809
|
+
}
|
|
2810
|
+
return _context7.d(_regeneratorValues(_loop3(i)), 4);
|
|
2811
|
+
case 4:
|
|
2812
|
+
if (!_context7.v) {
|
|
2813
|
+
_context7.n = 5;
|
|
2814
|
+
break;
|
|
2815
|
+
}
|
|
2816
|
+
return _context7.a(3, 6);
|
|
2817
|
+
case 5:
|
|
2818
|
+
i++;
|
|
2819
|
+
_context7.n = 3;
|
|
2820
|
+
break;
|
|
2821
|
+
case 6:
|
|
2822
|
+
this._selectClickNode(resId, resParentOrgId);
|
|
2823
|
+
case 7:
|
|
2824
|
+
return _context7.a(2);
|
|
2825
|
+
}
|
|
2826
|
+
}, _callee5, this);
|
|
2827
|
+
}));
|
|
2828
|
+
function findTreeNode(_x3, _x4) {
|
|
2829
|
+
return _findTreeNode.apply(this, arguments);
|
|
2830
|
+
}
|
|
2831
|
+
return findTreeNode;
|
|
2832
|
+
}())
|
|
2833
|
+
}, {
|
|
2834
|
+
key: "_locateTreeNodeEnd",
|
|
2835
|
+
value: function () {
|
|
2836
|
+
var _locateTreeNodeEnd2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
2837
|
+
var _this19 = this;
|
|
2838
|
+
return _regenerator().w(function (_context8) {
|
|
2839
|
+
while (1) switch (_context8.n) {
|
|
2840
|
+
case 0:
|
|
2841
|
+
return _context8.a(2, new Promise(function (resolve, reject) {
|
|
2842
|
+
if (_this19.locateTimer) {
|
|
2843
|
+
clearInterval(_this19.locateTimer);
|
|
2844
|
+
_this19.locateTimer = null;
|
|
2845
|
+
}
|
|
2846
|
+
_this19.locateTimer = setInterval(function () {
|
|
2847
|
+
if (!_this19.isLocating) {
|
|
2848
|
+
_this19.isLocating = false;
|
|
2849
|
+
clearInterval(_this19.locateTimer);
|
|
2850
|
+
_this19.locateTimer = null;
|
|
2851
|
+
resolve(false);
|
|
2852
|
+
}
|
|
2853
|
+
}, 100);
|
|
2854
|
+
}));
|
|
2855
|
+
}
|
|
2856
|
+
}, _callee6);
|
|
2857
|
+
}));
|
|
2858
|
+
function _locateTreeNodeEnd() {
|
|
2859
|
+
return _locateTreeNodeEnd2.apply(this, arguments);
|
|
2860
|
+
}
|
|
2861
|
+
return _locateTreeNodeEnd;
|
|
2862
|
+
}() //#endregion
|
|
2863
|
+
//#region 提供父组件获取节点信息使用
|
|
2864
|
+
/**
|
|
2865
|
+
* 获取子节点信息
|
|
2866
|
+
* @param {string} id 节点id
|
|
2867
|
+
* @returns [Object] | null
|
|
2868
|
+
*/
|
|
2869
|
+
}, {
|
|
2870
|
+
key: "getChildrenNode",
|
|
2871
|
+
value: function getChildrenNode(id) {
|
|
2872
|
+
var returnData = null;
|
|
2873
|
+
// 子节点信息还未添加
|
|
2874
|
+
if (this.dataObj[id]) {
|
|
2875
|
+
returnData = Object.assign([], this.dataObj[id].data);
|
|
2876
|
+
}
|
|
2877
|
+
return returnData;
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2880
|
+
/**
|
|
2881
|
+
* 获取根节点信息
|
|
2882
|
+
*/
|
|
2883
|
+
}, {
|
|
2884
|
+
key: "getRootNode",
|
|
2885
|
+
value: function getRootNode() {
|
|
2886
|
+
return Object.assign([], this.dataObj[this.initRootNodeId].data);
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
/**
|
|
2890
|
+
* 获取选中的节点的位置信息
|
|
2891
|
+
*/
|
|
2892
|
+
}, {
|
|
2893
|
+
key: "getClickNode",
|
|
2894
|
+
value: function getClickNode() {
|
|
2895
|
+
return this.selectNode;
|
|
2896
|
+
}
|
|
2897
|
+
//#endregion
|
|
2898
|
+
|
|
2899
|
+
//#region 树勾选功能
|
|
2900
|
+
/**
|
|
2901
|
+
* 在cameraArray中设置check状态
|
|
2902
|
+
*/
|
|
2903
|
+
}, {
|
|
2904
|
+
key: "_setCheckInCameraArray",
|
|
2905
|
+
value: function _setCheckInCameraArray(item, isCheck) {
|
|
2906
|
+
// 直接修改勾选状态;
|
|
2907
|
+
item.isCheck = isCheck;
|
|
2908
|
+
// 如果是组织节点,或者根节点,有级联操作
|
|
2909
|
+
if (item.isOrgNode === true) {
|
|
2910
|
+
if (this.props.isLoopCheck) {
|
|
2911
|
+
// 组织节点保持全选
|
|
2912
|
+
item.loopCheck = LOOP_CHECK_TYPE.ALL;
|
|
2913
|
+
this._loopCheckChildItem(item, isCheck);
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
// 如果是根节点,不再继续操作
|
|
2918
|
+
if (item.id === this.initRootNodeId || 'root' === item.id) {
|
|
2919
|
+
this.forceUpdate();
|
|
2920
|
+
return;
|
|
2921
|
+
}
|
|
2922
|
+
if (this.props.isLoopCheck) {
|
|
2923
|
+
// 勾选后,对同级节点判断,是否需要勾选父节点
|
|
2924
|
+
this._loopCheckParentItem(item, isCheck);
|
|
2925
|
+
this.forceUpdate();
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
/**
|
|
2930
|
+
* 循环设置子辈check状态
|
|
2931
|
+
*/
|
|
2932
|
+
}, {
|
|
2933
|
+
key: "_loopCheckChildItem",
|
|
2934
|
+
value: function _loopCheckChildItem(item, check) {
|
|
2935
|
+
var dataObj = this.dataObj[item.id];
|
|
2936
|
+
// 如果无对应对象,或无数据
|
|
2937
|
+
if (!dataObj || dataObj.data.length === 0) {
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2940
|
+
var orgChildrenLength = dataObj.data.length;
|
|
2941
|
+
for (var index = 0; index < orgChildrenLength; index++) {
|
|
2942
|
+
var childItem = dataObj.data[index];
|
|
2943
|
+
// 如果是特殊类型,不勾选
|
|
2944
|
+
if (['loading', 'loadMore', 'searchMore'].indexOf(childItem.type) > -1) {
|
|
2945
|
+
continue;
|
|
2946
|
+
}
|
|
2947
|
+
childItem.isCheck = check;
|
|
2948
|
+
// 如果是组织节点,一直进行操作
|
|
2949
|
+
if (childItem.isOrgNode === true) {
|
|
2950
|
+
childItem.loopCheck = LOOP_CHECK_TYPE.ALL;
|
|
2951
|
+
this._loopCheckChildItem(childItem, check);
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
/**
|
|
2957
|
+
* 循环设置父辈check状态
|
|
2958
|
+
*/
|
|
2959
|
+
}, {
|
|
2960
|
+
key: "_loopCheckParentItem",
|
|
2961
|
+
value: function _loopCheckParentItem(item, check) {
|
|
2962
|
+
// 如果已经是根节点,不再操作
|
|
2963
|
+
if (item.id === this.initRootNodeId || 'root' === item.id) {
|
|
2964
|
+
return;
|
|
2965
|
+
}
|
|
2966
|
+
var parendObj = this.dataObj[item.parentId];
|
|
2967
|
+
if (!parendObj || !parendObj.self) {
|
|
2968
|
+
return;
|
|
2969
|
+
}
|
|
2970
|
+
var childrenObj = parendObj.data;
|
|
2971
|
+
var childrenObjLength = childrenObj.length;
|
|
2972
|
+
|
|
2973
|
+
// 如果设置为不勾选,所有对应的父辈节点都设为不勾选
|
|
2974
|
+
if (check === false) {
|
|
2975
|
+
parendObj.self.isCheck = false;
|
|
2976
|
+
// 记录状态
|
|
2977
|
+
var checkStatus = false;
|
|
2978
|
+
for (var index = 0; index < childrenObjLength; index++) {
|
|
2979
|
+
//只要有一个勾选,就是半勾选
|
|
2980
|
+
if (childrenObj[index].isCheck === true || childrenObj[index].loopCheck && childrenObj[index].loopCheck === LOOP_CHECK_TYPE.SOME) {
|
|
2981
|
+
checkStatus = true;
|
|
2982
|
+
break;
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
// 如果有其他勾选的,则是半选;如果没有,则去勾选
|
|
2986
|
+
parendObj.self.loopCheck = checkStatus ? LOOP_CHECK_TYPE.SOME : LOOP_CHECK_TYPE.NONE;
|
|
2987
|
+
} else {
|
|
2988
|
+
// 记录状态
|
|
2989
|
+
var _checkStatus = true;
|
|
2990
|
+
for (var _index3 = 0; _index3 < childrenObjLength; _index3++) {
|
|
2991
|
+
// 如果子节点中,有不是 勾选状态的,直接return
|
|
2992
|
+
if (!childrenObj[_index3].isCheck) {
|
|
2993
|
+
_checkStatus = false;
|
|
2994
|
+
break;
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
// 如果子节点都是勾选状态的话,父节点也勾选
|
|
2998
|
+
if (_checkStatus) {
|
|
2999
|
+
parendObj.self.loopCheck = LOOP_CHECK_TYPE.ALL;
|
|
3000
|
+
parendObj.self.isCheck = true;
|
|
3001
|
+
} else {
|
|
3002
|
+
// 如果不是全选,则设置为半选,异常保证
|
|
3003
|
+
parendObj.self.loopCheck = LOOP_CHECK_TYPE.SOME;
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
// 如果是根节点,不再循环
|
|
3008
|
+
if ('root' === parendObj.self.parentId) {
|
|
3009
|
+
this.forceUpdate();
|
|
3010
|
+
return;
|
|
3011
|
+
}
|
|
3012
|
+
this._loopCheckParentItem(parendObj.self, check);
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
/**
|
|
3016
|
+
* 获取组织树加载节点信息
|
|
3017
|
+
*/
|
|
3018
|
+
}, {
|
|
3019
|
+
key: "getCameraArray",
|
|
3020
|
+
value: function getCameraArray() {
|
|
3021
|
+
return this.cameraArray;
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
/**
|
|
3025
|
+
* 修改组织树节点信息
|
|
3026
|
+
*/
|
|
3027
|
+
}, {
|
|
3028
|
+
key: "setCameraArray",
|
|
3029
|
+
value: function setCameraArray(index, key, value) {
|
|
3030
|
+
if (this.cameraArray.length >= index + 1) {
|
|
3031
|
+
this.cameraArray[index][key] = value;
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
|
|
3035
|
+
/**
|
|
3036
|
+
* 返回被勾选的节点
|
|
3037
|
+
* @returns [all, org, noorg]
|
|
3038
|
+
* 返回的数组解释,第一个属性:返回所有被勾选的信息
|
|
3039
|
+
* 第二个属性:以组织为主进行返回。如果父组织勾选下,子节点不会返回;如果父组织无勾选,返回勾选的非组织节点
|
|
3040
|
+
* 第三个属性:以非组织节点为主,只返回非组织勾选节点
|
|
3041
|
+
*/
|
|
3042
|
+
}, {
|
|
3043
|
+
key: "getCheckedItem",
|
|
3044
|
+
value: function getCheckedItem() {
|
|
3045
|
+
// 如果没有显示勾选框,直接返回false
|
|
3046
|
+
if (this.props.checkboxTypes.length === 0) {
|
|
3047
|
+
console.warn('无勾选数据');
|
|
3048
|
+
return;
|
|
3049
|
+
}
|
|
3050
|
+
var all = [];
|
|
3051
|
+
var org = [];
|
|
3052
|
+
var node = [];
|
|
3053
|
+
var partCheck = []; //返回半选状态的组织信息
|
|
3054
|
+
var rootData = this.dataObj.root.data;
|
|
3055
|
+
// 除根节点无数据
|
|
3056
|
+
if (rootData.length === 0) {
|
|
3057
|
+
console.warn('无数据');
|
|
3058
|
+
return;
|
|
3059
|
+
}
|
|
3060
|
+
this._loopGetCheckedItem(this.dataObj.root.data, all, org, node, true, partCheck);
|
|
3061
|
+
if (this.props.isPartCheckInfo) {
|
|
3062
|
+
return [all, org, node, partCheck];
|
|
3063
|
+
}
|
|
3064
|
+
return [all, org, node];
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
/**
|
|
3068
|
+
* 外部更新查询条件
|
|
3069
|
+
*/
|
|
3070
|
+
}, {
|
|
3071
|
+
key: "updateConditions",
|
|
3072
|
+
value: function updateConditions(con) {
|
|
3073
|
+
this.treeLoader.updateConditionsFunc(con);
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* 查询组织内的所有资源(递归查)
|
|
3078
|
+
*/
|
|
3079
|
+
}, {
|
|
3080
|
+
key: "getCheckedOrgResource",
|
|
3081
|
+
value: function getCheckedOrgResource(data) {
|
|
3082
|
+
var _this20 = this;
|
|
3083
|
+
var _ref2 = data || {},
|
|
3084
|
+
orgCodes = _ref2.orgCodes,
|
|
3085
|
+
_ref2$searchValue = _ref2.searchValue,
|
|
3086
|
+
searchValue = _ref2$searchValue === void 0 ? '' : _ref2$searchValue;
|
|
3087
|
+
var blankResult = Promise.resolve([]);
|
|
3088
|
+
var queryOrgCodes = [];
|
|
3089
|
+
var resourceList = [];
|
|
3090
|
+
if (orgCodes && orgCodes.length > 0) {
|
|
3091
|
+
queryOrgCodes = orgCodes;
|
|
3092
|
+
} else {
|
|
3093
|
+
var checkData = this.getCheckedItem()[1];
|
|
3094
|
+
var checkResource = this.getCheckedItem()[2];
|
|
3095
|
+
if (!checkData || checkData.length === 0) {
|
|
3096
|
+
return blankResult;
|
|
3097
|
+
}
|
|
3098
|
+
var checkOrgData = checkData.filter(function (item) {
|
|
3099
|
+
return item.isOrgNode;
|
|
3100
|
+
});
|
|
3101
|
+
if (checkOrgData.length === 0) {
|
|
3102
|
+
return Promise.resolve(checkData);
|
|
3103
|
+
}
|
|
3104
|
+
var resource = checkResource === null || checkResource === void 0 ? void 0 : checkResource.filter(function (item) {
|
|
3105
|
+
return !item.isOrgNode && item.nodeText.indexOf(searchValue) > -1;
|
|
3106
|
+
});
|
|
3107
|
+
resourceList.push.apply(resourceList, _toConsumableArray(resource));
|
|
3108
|
+
queryOrgCodes = checkOrgData.map(function (item) {
|
|
3109
|
+
return item.resId;
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3112
|
+
function queryResource(_x5, _x6, _x7) {
|
|
3113
|
+
return _queryResource.apply(this, arguments);
|
|
3114
|
+
}
|
|
3115
|
+
function _queryResource() {
|
|
3116
|
+
_queryResource = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(loader, codes, key) {
|
|
3117
|
+
var data, _iterator, _step, code, returnData, _t;
|
|
3118
|
+
return _regenerator().w(function (_context0) {
|
|
3119
|
+
while (1) switch (_context0.p = _context0.n) {
|
|
3120
|
+
case 0:
|
|
3121
|
+
data = [];
|
|
3122
|
+
_iterator = _createForOfIteratorHelper(codes);
|
|
3123
|
+
_context0.p = 1;
|
|
3124
|
+
_iterator.s();
|
|
3125
|
+
case 2:
|
|
3126
|
+
if ((_step = _iterator.n()).done) {
|
|
3127
|
+
_context0.n = 5;
|
|
3128
|
+
break;
|
|
3129
|
+
}
|
|
3130
|
+
code = _step.value;
|
|
3131
|
+
_context0.n = 3;
|
|
3132
|
+
return loader.getCheckedOrgResource(code, key);
|
|
3133
|
+
case 3:
|
|
3134
|
+
returnData = _context0.v;
|
|
3135
|
+
if (returnData && returnData.length > 0) {
|
|
3136
|
+
returnData = loader.toTreeNode(returnData, '');
|
|
3137
|
+
data.push.apply(data, _toConsumableArray(returnData));
|
|
3138
|
+
}
|
|
3139
|
+
case 4:
|
|
3140
|
+
_context0.n = 2;
|
|
3141
|
+
break;
|
|
3142
|
+
case 5:
|
|
3143
|
+
_context0.n = 7;
|
|
3144
|
+
break;
|
|
3145
|
+
case 6:
|
|
3146
|
+
_context0.p = 6;
|
|
3147
|
+
_t = _context0.v;
|
|
3148
|
+
_iterator.e(_t);
|
|
3149
|
+
case 7:
|
|
3150
|
+
_context0.p = 7;
|
|
3151
|
+
_iterator.f();
|
|
3152
|
+
return _context0.f(7);
|
|
3153
|
+
case 8:
|
|
3154
|
+
return _context0.a(2, data);
|
|
3155
|
+
}
|
|
3156
|
+
}, _callee8, null, [[1, 6, 7, 8]]);
|
|
3157
|
+
}));
|
|
3158
|
+
return _queryResource.apply(this, arguments);
|
|
3159
|
+
}
|
|
3160
|
+
return new Promise(/*#__PURE__*/function () {
|
|
3161
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(resolve, reject) {
|
|
3162
|
+
var _data;
|
|
3163
|
+
var data;
|
|
3164
|
+
return _regenerator().w(function (_context9) {
|
|
3165
|
+
while (1) switch (_context9.n) {
|
|
3166
|
+
case 0:
|
|
3167
|
+
_context9.n = 1;
|
|
3168
|
+
return queryResource(_this20.treeLoader, queryOrgCodes, searchValue);
|
|
3169
|
+
case 1:
|
|
3170
|
+
data = _context9.v;
|
|
3171
|
+
//把在树上勾选的资源节点和递归查出来的资源进行去重(按照编码、资源类型两个维度去重)
|
|
3172
|
+
data = (_data = data) === null || _data === void 0 ? void 0 : _data.filter(function (item) {
|
|
3173
|
+
return resourceList.every(function (item1) {
|
|
3174
|
+
return item1.resourceInfo.resCode !== item.resourceInfo.resCode && item1.resourceInfo.resType !== item.resourceInfo.resType;
|
|
3175
|
+
});
|
|
3176
|
+
});
|
|
3177
|
+
resourceList.push.apply(resourceList, _toConsumableArray(data));
|
|
3178
|
+
resolve(resourceList);
|
|
3179
|
+
case 2:
|
|
3180
|
+
return _context9.a(2);
|
|
3181
|
+
}
|
|
3182
|
+
}, _callee7);
|
|
3183
|
+
}));
|
|
3184
|
+
return function (_x8, _x9) {
|
|
3185
|
+
return _ref3.apply(this, arguments);
|
|
3186
|
+
};
|
|
3187
|
+
}());
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
/**
|
|
3191
|
+
* 循环获取所有勾选信息
|
|
3192
|
+
* @param {Object} data 数据源
|
|
3193
|
+
* @param {Array} all
|
|
3194
|
+
* @param {Array} org
|
|
3195
|
+
* @param {Array} node
|
|
3196
|
+
* @param {Boolean} addOrg 子节点是否需要被添加
|
|
3197
|
+
*/
|
|
3198
|
+
}, {
|
|
3199
|
+
key: "_loopGetCheckedItem",
|
|
3200
|
+
value: function _loopGetCheckedItem(data, all, org, node, addOrg, partCheck) {
|
|
3201
|
+
// 循环所有字节点,获取勾选数据
|
|
3202
|
+
for (var index = 0, length = data.length; index < length; index++) {
|
|
3203
|
+
var childItem = data[index];
|
|
3204
|
+
var isOrgNode = childItem.isOrgNode,
|
|
3205
|
+
_childItem$isCheck = childItem.isCheck,
|
|
3206
|
+
isCheck = _childItem$isCheck === void 0 ? false : _childItem$isCheck,
|
|
3207
|
+
loopCheck = childItem.loopCheck;
|
|
3208
|
+
var needLoop = false; // 是否需要循环子节点
|
|
3209
|
+
var needAddOrg = true;
|
|
3210
|
+
if (!this.props.isLoopCheck) {
|
|
3211
|
+
needLoop = true;
|
|
3212
|
+
}
|
|
3213
|
+
// 如果是勾选情况,all直接添加
|
|
3214
|
+
if (isCheck === true) {
|
|
3215
|
+
all.push(childItem);
|
|
3216
|
+
if (addOrg) {
|
|
3217
|
+
org.push(childItem);
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
//组织节点部分勾选,则返回部分勾选的信息
|
|
3221
|
+
if (loopCheck === LOOP_CHECK_TYPE.SOME) {
|
|
3222
|
+
partCheck.push(childItem);
|
|
3223
|
+
}
|
|
3224
|
+
switch (true) {
|
|
3225
|
+
case isCheck === true && isOrgNode === true:
|
|
3226
|
+
// 组织节点勾选
|
|
3227
|
+
if (this.props.isLoopCheck) {
|
|
3228
|
+
needAddOrg = false;
|
|
3229
|
+
}
|
|
3230
|
+
needLoop = true;
|
|
3231
|
+
break;
|
|
3232
|
+
case isCheck === true && isOrgNode === false:
|
|
3233
|
+
// 非组织节点勾选
|
|
3234
|
+
node.push(childItem);
|
|
3235
|
+
break;
|
|
3236
|
+
case isCheck === false && isOrgNode === true && loopCheck === LOOP_CHECK_TYPE.SOME:
|
|
3237
|
+
// 组织节点部分勾选
|
|
3238
|
+
needLoop = true;
|
|
3239
|
+
break;
|
|
3240
|
+
default:
|
|
3241
|
+
break;
|
|
3242
|
+
}
|
|
3243
|
+
if (needLoop !== true) {
|
|
3244
|
+
continue;
|
|
3245
|
+
}
|
|
3246
|
+
var childObj = this.dataObj[childItem.id];
|
|
3247
|
+
// 如果该组织无子数据
|
|
3248
|
+
if (!childObj || childObj.data.length === 0) {
|
|
3249
|
+
continue;
|
|
3250
|
+
}
|
|
3251
|
+
this._loopGetCheckedItem(childObj.data, all, org, node, needAddOrg, partCheck);
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
|
|
3255
|
+
/**
|
|
3256
|
+
* 获取当前选中的节点(非勾选)
|
|
3257
|
+
*/
|
|
3258
|
+
}, {
|
|
3259
|
+
key: "getSelectItem",
|
|
3260
|
+
value: function getSelectItem() {
|
|
3261
|
+
var isClickNode = this.state.isClickNode;
|
|
3262
|
+
for (var key in this.dataObj) {
|
|
3263
|
+
if (this.dataObj[key].data && this.dataObj[key].data.length > 0) {
|
|
3264
|
+
var sonData = this.dataObj[key].data;
|
|
3265
|
+
for (var i = 0, dataLen = sonData.length; i < dataLen; i++) {
|
|
3266
|
+
var data = sonData[i];
|
|
3267
|
+
if (this.defaultClickNode) {
|
|
3268
|
+
if (data.resId === this.defaultClickNode) {
|
|
3269
|
+
return data;
|
|
3270
|
+
}
|
|
3271
|
+
} else {
|
|
3272
|
+
if (data.id === isClickNode) {
|
|
3273
|
+
return data;
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
/**
|
|
3282
|
+
* 取消所有勾选
|
|
3283
|
+
*/
|
|
3284
|
+
}, {
|
|
3285
|
+
key: "cancelAllCheckItem",
|
|
3286
|
+
value: function cancelAllCheckItem() {
|
|
3287
|
+
for (var key in this.dataObj) {
|
|
3288
|
+
var data = this.dataObj[key];
|
|
3289
|
+
for (var j = 0, dataLen = data.data.length; j < dataLen; j++) {
|
|
3290
|
+
data.data[j].isCheck = false;
|
|
3291
|
+
data.data[j].loopCheck = LOOP_CHECK_TYPE.NONE;
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
this.forceUpdate();
|
|
3295
|
+
var onReset = this.props.onReset;
|
|
3296
|
+
typeof onReset === 'function' && onReset();
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
/**
|
|
3300
|
+
* 业务中一键勾选节点类型
|
|
3301
|
+
* @param {Array} 一键勾选的节点类型
|
|
3302
|
+
*/
|
|
3303
|
+
}, {
|
|
3304
|
+
key: "checkNodeByTypes",
|
|
3305
|
+
value: function checkNodeByTypes(types) {
|
|
3306
|
+
var _this21 = this;
|
|
3307
|
+
var _this$props4 = this.props,
|
|
3308
|
+
onReset = _this$props4.onReset,
|
|
3309
|
+
checkboxTypes = _this$props4.checkboxTypes;
|
|
3310
|
+
for (var key in this.dataObj) {
|
|
3311
|
+
var data = this.dataObj[key];
|
|
3312
|
+
// 当前组织下是否有节点被选中
|
|
3313
|
+
var tempCheck = false;
|
|
3314
|
+
var _loop4 = function _loop4() {
|
|
3315
|
+
var item = data.data[j];
|
|
3316
|
+
// 当前节点是否被选中
|
|
3317
|
+
var isCheck = checkboxTypes.indexOf(item.resourceInfo.resType) > -1 && types.indexOf(item.resourceInfo.resType) > -1 || types.some(function (res) {
|
|
3318
|
+
return res.resId === item.resId;
|
|
3319
|
+
}) || types.some(function (res) {
|
|
3320
|
+
return res.id === item.id;
|
|
3321
|
+
}) || types.includes(item.resId) || types.includes(item.id) ? true : false;
|
|
3322
|
+
// 设置当前节点是否被选中
|
|
3323
|
+
item.isCheck = isCheck;
|
|
3324
|
+
// 当前组织下如果有节点被选中,保存一下,后边用来据此对父节点进行选中操作
|
|
3325
|
+
if (isCheck) {
|
|
3326
|
+
tempCheck = true;
|
|
3327
|
+
}
|
|
3328
|
+
// 如过当前节点是组织节点或者域节点,需要对当前节点子节点循环设置状态
|
|
3329
|
+
if (item.isOrgNode === true) {
|
|
3330
|
+
item.loopCheck = isCheck ? LOOP_CHECK_TYPE.ALL : LOOP_CHECK_TYPE.NONE;
|
|
3331
|
+
_this21._loopCheckChildItem(item, isCheck);
|
|
3332
|
+
}
|
|
3333
|
+
};
|
|
3334
|
+
for (var j = 0, dataLen = data.data.length; j < dataLen; j++) {
|
|
3335
|
+
_loop4();
|
|
3336
|
+
}
|
|
3337
|
+
// 如果有节点被选中,根据最后一个节点信息去设置其父节点选中状态
|
|
3338
|
+
if (tempCheck) {
|
|
3339
|
+
this._loopCheckParentItem(data.data[data.data.length - 1], true);
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
this.forceUpdate();
|
|
3343
|
+
typeof onReset === 'function' && onReset();
|
|
3344
|
+
}
|
|
3345
|
+
//#endregion
|
|
3346
|
+
|
|
3347
|
+
//#region 显示内容控制
|
|
3348
|
+
/**
|
|
3349
|
+
* 根据树框的高度改变可显示
|
|
3350
|
+
*/
|
|
3351
|
+
}, {
|
|
3352
|
+
key: "_changeByTreeHeight",
|
|
3353
|
+
value: function _changeByTreeHeight() {
|
|
3354
|
+
var _this$treeBox$current = this.treeBox.current,
|
|
3355
|
+
clientHeight = _this$treeBox$current.clientHeight,
|
|
3356
|
+
clientWidth = _this$treeBox$current.clientWidth;
|
|
3357
|
+
//获取树的宽
|
|
3358
|
+
if (this.treeBoxUlWidth !== clientWidth) {
|
|
3359
|
+
this._recoverLeftScroll();
|
|
3360
|
+
this.treeBoxUlWidth = clientWidth;
|
|
3361
|
+
}
|
|
3362
|
+
//获取树的高度
|
|
3363
|
+
if (this.treeTotalHeight !== clientHeight) {
|
|
3364
|
+
this.treeTotalHeight = clientHeight;
|
|
3365
|
+
//计算出可容纳的数据个数(向下取整),显示完整的节点
|
|
3366
|
+
return Math.floor(this.treeTotalHeight / this.perHeight);
|
|
3367
|
+
} else {
|
|
3368
|
+
return this.state.eachNum;
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
/**
|
|
3373
|
+
* 渲染的时候重新计算可显示数量
|
|
3374
|
+
*/
|
|
3375
|
+
}, {
|
|
3376
|
+
key: "_renderRecalcNum",
|
|
3377
|
+
value: function _renderRecalcNum() {
|
|
3378
|
+
var _this22 = this;
|
|
3379
|
+
this._leftDistance();
|
|
3380
|
+
var _this$state9 = this.state,
|
|
3381
|
+
eachNum = _this$state9.eachNum,
|
|
3382
|
+
beginSum = _this$state9.beginSum,
|
|
3383
|
+
isLastNodeNeedEllipsis = _this$state9.isLastNodeNeedEllipsis;
|
|
3384
|
+
var needShowNum = this._changeByTreeHeight();
|
|
3385
|
+
// 如果需要显示的和已显示数量相同,不操作
|
|
3386
|
+
if (eachNum === needShowNum) {
|
|
3387
|
+
if (this.zeroTag === 0 && needShowNum === 0) {
|
|
3388
|
+
this.zeroTag++;
|
|
3389
|
+
this.forceUpdate();
|
|
3390
|
+
} else {
|
|
3391
|
+
this.zeroTag = 0;
|
|
3392
|
+
}
|
|
3393
|
+
} else {
|
|
3394
|
+
this.zeroTag = 0;
|
|
3395
|
+
// 如果是出现的横向滚动条,且需要显示和已显示数量不相同了
|
|
3396
|
+
// 说明要出事情了,赶紧把最后一个节点显示设置成省略号,防止死循环
|
|
3397
|
+
if (this.needLeftScroll) {
|
|
3398
|
+
this.setState({
|
|
3399
|
+
isLastNodeNeedEllipsis: !isLastNodeNeedEllipsis
|
|
3400
|
+
});
|
|
3401
|
+
// 因为出现了省略号,还是之前的显示数量
|
|
3402
|
+
// needShowNum = eachNum;
|
|
3403
|
+
}
|
|
3404
|
+
this.setState({
|
|
3405
|
+
endSum: beginSum + needShowNum,
|
|
3406
|
+
eachNum: needShowNum
|
|
3407
|
+
}, function () {
|
|
3408
|
+
if (_this22.isTreeRootExpand) {
|
|
3409
|
+
_this22._judgeScrollbarShow();
|
|
3410
|
+
_this22._moveScroll();
|
|
3411
|
+
}
|
|
3412
|
+
});
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
}, {
|
|
3416
|
+
key: "render",
|
|
3417
|
+
value:
|
|
3418
|
+
// TODO 写一个自动计算显示区域、是否需要滚动条等功能完全的函数
|
|
3419
|
+
//#endregion
|
|
3420
|
+
|
|
3421
|
+
function render() {
|
|
3422
|
+
var _this23 = this;
|
|
3423
|
+
var _this$state0 = this.state,
|
|
3424
|
+
endSum = _this$state0.endSum,
|
|
3425
|
+
beginSum = _this$state0.beginSum,
|
|
3426
|
+
isScrollbarShow = _this$state0.isScrollbarShow,
|
|
3427
|
+
isClickNode = _this$state0.isClickNode,
|
|
3428
|
+
mouseEnterNode = _this$state0.mouseEnterNode,
|
|
3429
|
+
scrollbarHeight = _this$state0.scrollbarHeight,
|
|
3430
|
+
scrollbarTop = _this$state0.scrollbarTop,
|
|
3431
|
+
isLastNodeNeedEllipsis = _this$state0.isLastNodeNeedEllipsis;
|
|
3432
|
+
var _this$props5 = this.props,
|
|
3433
|
+
onDoubleClick = _this$props5.onDoubleClick,
|
|
3434
|
+
onRightClick = _this$props5.onRightClick,
|
|
3435
|
+
onMouseEnter = _this$props5.onMouseEnter,
|
|
3436
|
+
onMouseLeave = _this$props5.onMouseLeave,
|
|
3437
|
+
onClick = _this$props5.onClick,
|
|
3438
|
+
onDragStart = _this$props5.onDragStart,
|
|
3439
|
+
onDragEnd = _this$props5.onDragEnd,
|
|
3440
|
+
_this$props5$isNeedSe = _this$props5.isNeedSearch,
|
|
3441
|
+
isNeedSearch = _this$props5$isNeedSe === void 0 ? false : _this$props5$isNeedSe,
|
|
3442
|
+
treeTitleNode = _this$props5.treeTitleNode,
|
|
3443
|
+
onCheck = _this$props5.onCheck,
|
|
3444
|
+
theme = _this$props5.theme,
|
|
3445
|
+
searchPlaceholder = _this$props5.searchPlaceholder,
|
|
3446
|
+
textLocale = _this$props5.textLocale,
|
|
3447
|
+
hiddenResList = _this$props5.hiddenResList;
|
|
3448
|
+
var items = [];
|
|
3449
|
+
var renderArr = [];
|
|
3450
|
+
var renderArrLength = this.cameraArray.length >= endSum ? endSum : this.cameraArray.length;
|
|
3451
|
+
var searchHeight = isNeedSearch || treeTitleNode ? '50px' : '0px'; // 搜索框的高度
|
|
3452
|
+
var underlyingItem = 0;
|
|
3453
|
+
//获取渲染数组
|
|
3454
|
+
for (var i = beginSum; i < renderArrLength; i++) {
|
|
3455
|
+
renderArr.push(this.cameraArray[i]);
|
|
3456
|
+
}
|
|
3457
|
+
if (renderArr.length === 0) {
|
|
3458
|
+
//无结果
|
|
3459
|
+
items.push(/*#__PURE__*/React.createElement(LoadNode, {
|
|
3460
|
+
key: "loadNone",
|
|
3461
|
+
floorNum: 1,
|
|
3462
|
+
value: textLocale === null || textLocale === void 0 ? void 0 : textLocale.loadSearchNone
|
|
3463
|
+
}));
|
|
3464
|
+
}
|
|
3465
|
+
var _loop5 = function _loop5(_i) {
|
|
3466
|
+
var item = renderArr[_i];
|
|
3467
|
+
if (hiddenResList && hiddenResList.length > 0 && (hiddenResList.some(function (res) {
|
|
3468
|
+
return res.resId === item.resId;
|
|
3469
|
+
}) || hiddenResList.some(function (res) {
|
|
3470
|
+
return res.id === item.id;
|
|
3471
|
+
}) || hiddenResList.includes(item.resId) || hiddenResList.includes(item.id))) {
|
|
3472
|
+
return 1; // continue
|
|
3473
|
+
}
|
|
3474
|
+
if (_typeof(item) === 'object' && !item.type && _this23.dataObj[item.parentId]) {
|
|
3475
|
+
var treeKey = item.id;
|
|
3476
|
+
var treeParent = item.parentId;
|
|
3477
|
+
var treeValue = item.nodeText;
|
|
3478
|
+
var isFloder = _this23.floderArr.indexOf(treeKey) > -1 ? true : false;
|
|
3479
|
+
var isOpen = _this23.openTagArr.indexOf(treeKey) > -1 ? true : false;
|
|
3480
|
+
var needClickStyle = '';
|
|
3481
|
+
// 是否是最后一个节点
|
|
3482
|
+
var isLast = _i === renderArr.length - 1;
|
|
3483
|
+
if (_this23.defaultClickNode) {
|
|
3484
|
+
needClickStyle = isClickNode === item.resId ? 'clickedNodeOnTree' : '';
|
|
3485
|
+
} else {
|
|
3486
|
+
needClickStyle = isClickNode === treeKey ? 'clickedNodeOnTree' : '';
|
|
3487
|
+
}
|
|
3488
|
+
var needMouseEnterStyle = '';
|
|
3489
|
+
needMouseEnterStyle = mouseEnterNode === treeKey ? 'mouseEnterTreeNode' : '';
|
|
3490
|
+
var floorNum = _this23.dataObj[treeParent]['floor'];
|
|
3491
|
+
if (floorNum > underlyingItem) {
|
|
3492
|
+
underlyingItem = floorNum;
|
|
3493
|
+
}
|
|
3494
|
+
if (needClickStyle) {
|
|
3495
|
+
_this23.selectNode = {
|
|
3496
|
+
item: item,
|
|
3497
|
+
index: _i + beginSum,
|
|
3498
|
+
floor: floorNum
|
|
3499
|
+
};
|
|
3500
|
+
}
|
|
3501
|
+
// 点击节点的+-icon:节点是文件夹类型,则是点击文件夹功能;节点是根节点,则是点击根节点功能
|
|
3502
|
+
var iconLeftClick = treeParent === 'root' && _this23.isSearching === false ? _this23._clickRoot : item.isOrgNode || item.resourceInfo && item.resourceInfo.resType === 3002 ? function () {
|
|
3503
|
+
_this23._clickFloder(item, _i + beginSum);
|
|
3504
|
+
} : null;
|
|
3505
|
+
var iconClass = isOpen ? item.iconExpandedUrl : item.iconUrl;
|
|
3506
|
+
|
|
3507
|
+
/**
|
|
3508
|
+
* 勾选操作时触发
|
|
3509
|
+
* @param {Event} event 事件
|
|
3510
|
+
* @param {Boolean} checked 勾选状态
|
|
3511
|
+
*/
|
|
3512
|
+
var checkFunc = function checkFunc(event, checked) {
|
|
3513
|
+
// 如果勾选了,把对应item的状态设置成checked
|
|
3514
|
+
if (checked === true) {
|
|
3515
|
+
_this23._setCheckInCameraArray(item, true);
|
|
3516
|
+
} else {
|
|
3517
|
+
// 如果是去勾选,把对应item的状态设置成空
|
|
3518
|
+
_this23._setCheckInCameraArray(item, false);
|
|
3519
|
+
}
|
|
3520
|
+
event.stopPropagation();
|
|
3521
|
+
typeof onCheck === 'function' && onCheck(event, item, checked);
|
|
3522
|
+
_this23.forceUpdate();
|
|
3523
|
+
};
|
|
3524
|
+
|
|
3525
|
+
// 节点左击
|
|
3526
|
+
var click = function click(e) {
|
|
3527
|
+
// 如果点击的是选择框,不触发
|
|
3528
|
+
|
|
3529
|
+
if (e.target.getAttribute('type') === 'checkbox') {
|
|
3530
|
+
return;
|
|
3531
|
+
}
|
|
3532
|
+
_this23._clickNode(item);
|
|
3533
|
+
typeof onClick === 'function' && onClick(e, item, _i + beginSum, floorNum);
|
|
3534
|
+
if (_this23.showCheckboxTypes.indexOf(item.resourceInfo.resType) < 0) {
|
|
3535
|
+
return;
|
|
3536
|
+
}
|
|
3537
|
+
//checkFunc(e, !item.isCheck);
|
|
3538
|
+
};
|
|
3539
|
+
|
|
3540
|
+
// 节点双击
|
|
3541
|
+
var doubleClick = function doubleClick(e) {
|
|
3542
|
+
// 如果点击的是选择框,不触发
|
|
3543
|
+
if (e.target.getAttribute('type') === 'checkbox') {
|
|
3544
|
+
return;
|
|
3545
|
+
}
|
|
3546
|
+
(item.isOrgNode || item.parentId === 'root' && !_this23.isSearching || item.resourceInfo && item.resourceInfo.resType === 3002) && iconLeftClick();
|
|
3547
|
+
typeof onDoubleClick === 'function' && onDoubleClick(e, item, _this23.isSearching);
|
|
3548
|
+
};
|
|
3549
|
+
|
|
3550
|
+
// 节点右击
|
|
3551
|
+
var rightClick = function rightClick(e) {
|
|
3552
|
+
_this23._clickNode(item);
|
|
3553
|
+
typeof onRightClick === 'function' && onRightClick(e, item, _i + beginSum, floorNum);
|
|
3554
|
+
};
|
|
3555
|
+
|
|
3556
|
+
// 鼠标移入
|
|
3557
|
+
var mouseEnter = function mouseEnter(e) {
|
|
3558
|
+
_this23._mouseEvent('mouseEnter', item);
|
|
3559
|
+
typeof onMouseEnter === 'function' && onMouseEnter(e, item, _i + beginSum, floorNum);
|
|
3560
|
+
};
|
|
3561
|
+
|
|
3562
|
+
// 鼠标移出
|
|
3563
|
+
var mouseLeave = function mouseLeave(e) {
|
|
3564
|
+
_this23._mouseEvent('mouseLeave', item);
|
|
3565
|
+
typeof onMouseLeave === 'function' && onMouseLeave(e, item, _i + beginSum, floorNum);
|
|
3566
|
+
};
|
|
3567
|
+
|
|
3568
|
+
// 拖拽事件,添加当前拖拽节点对象,父节点获取data后需要JSON.parse解析
|
|
3569
|
+
var dragStart = function dragStart(e) {
|
|
3570
|
+
// 如果业务不允许拖拽则不拖拽
|
|
3571
|
+
if (item.canDrag === false) {
|
|
3572
|
+
e.preventDefault();
|
|
3573
|
+
return;
|
|
3574
|
+
}
|
|
3575
|
+
_this23._clickNode(item);
|
|
3576
|
+
var target = JSON.stringify(item);
|
|
3577
|
+
if (_isIe()) {
|
|
3578
|
+
var obj = {
|
|
3579
|
+
typetree: 'treeNode',
|
|
3580
|
+
targetnode: target
|
|
3581
|
+
};
|
|
3582
|
+
var objStr = JSON.stringify(obj);
|
|
3583
|
+
e.dataTransfer.setData('text', objStr);
|
|
3584
|
+
} else {
|
|
3585
|
+
e.dataTransfer.setData('typetree', 'treeNode');
|
|
3586
|
+
e.dataTransfer.setData('targetnode', target);
|
|
3587
|
+
}
|
|
3588
|
+
typeof onDragStart === 'function' && onDragStart(e, item);
|
|
3589
|
+
};
|
|
3590
|
+
var dragEnd = function dragEnd(e) {
|
|
3591
|
+
typeof onDragEnd === 'function' && onDragEnd(e, item);
|
|
3592
|
+
};
|
|
3593
|
+
|
|
3594
|
+
// 如果showCheckboxTypes中包含当前节点的type,则显示勾选框
|
|
3595
|
+
var showCheckbox = _this23.showCheckboxTypes.indexOf(item.resourceInfo.resType) > -1 ? true : false;
|
|
3596
|
+
if (_this23.isShowOrgInfo) {
|
|
3597
|
+
if (item.isDisPlay) {
|
|
3598
|
+
items.push(/*#__PURE__*/React.createElement(TreeNode, {
|
|
3599
|
+
key: treeKey,
|
|
3600
|
+
value: treeValue,
|
|
3601
|
+
iconClass: iconClass,
|
|
3602
|
+
isFloder: isFloder,
|
|
3603
|
+
isOpen: isOpen,
|
|
3604
|
+
iconLeftClick: iconLeftClick,
|
|
3605
|
+
click: click,
|
|
3606
|
+
rightClick: rightClick,
|
|
3607
|
+
dragStart: dragStart,
|
|
3608
|
+
dragEnd: dragEnd,
|
|
3609
|
+
mouseEnter: mouseEnter,
|
|
3610
|
+
mouseLeave: mouseLeave,
|
|
3611
|
+
doubleClick: doubleClick,
|
|
3612
|
+
floorNum: floorNum,
|
|
3613
|
+
needClickStyle: needClickStyle,
|
|
3614
|
+
needMouseEnterStyle: needMouseEnterStyle,
|
|
3615
|
+
targetNode: item,
|
|
3616
|
+
isSearching: _this23.isSearching,
|
|
3617
|
+
checkFunc: checkFunc,
|
|
3618
|
+
showCheckbox: showCheckbox,
|
|
3619
|
+
leftDistance: _this23._leftDistance,
|
|
3620
|
+
isNeedEllipsis: isLastNodeNeedEllipsis && isLast
|
|
3621
|
+
}));
|
|
3622
|
+
}
|
|
3623
|
+
} else {
|
|
3624
|
+
items.push(/*#__PURE__*/React.createElement(TreeNode, {
|
|
3625
|
+
key: treeKey,
|
|
3626
|
+
value: treeValue,
|
|
3627
|
+
iconClass: iconClass,
|
|
3628
|
+
isFloder: isFloder,
|
|
3629
|
+
isOpen: isOpen,
|
|
3630
|
+
iconLeftClick: iconLeftClick,
|
|
3631
|
+
click: click,
|
|
3632
|
+
rightClick: rightClick,
|
|
3633
|
+
dragStart: dragStart,
|
|
3634
|
+
dragEnd: dragEnd,
|
|
3635
|
+
mouseEnter: mouseEnter,
|
|
3636
|
+
mouseLeave: mouseLeave,
|
|
3637
|
+
doubleClick: doubleClick,
|
|
3638
|
+
floorNum: floorNum,
|
|
3639
|
+
needClickStyle: needClickStyle,
|
|
3640
|
+
targetNode: item,
|
|
3641
|
+
isSearching: _this23.isSearching,
|
|
3642
|
+
needMouseEnterStyle: needMouseEnterStyle,
|
|
3643
|
+
checkFunc: checkFunc,
|
|
3644
|
+
showCheckbox: showCheckbox,
|
|
3645
|
+
leftDistance: _this23._leftDistance,
|
|
3646
|
+
isNeedEllipsis: isLastNodeNeedEllipsis && isLast
|
|
3647
|
+
}));
|
|
3648
|
+
}
|
|
3649
|
+
} else if ((item === null || item === void 0 ? void 0 : item.type) === 'loading') {
|
|
3650
|
+
//正在加载
|
|
3651
|
+
items.push(/*#__PURE__*/React.createElement(LoadNode, {
|
|
3652
|
+
key: item.type + item.id,
|
|
3653
|
+
floorNum: item.floorNum,
|
|
3654
|
+
value: textLocale === null || textLocale === void 0 ? void 0 : textLocale.loadingPrompt
|
|
3655
|
+
}));
|
|
3656
|
+
} else if ((item === null || item === void 0 ? void 0 : item.type) === 'loadMore') {
|
|
3657
|
+
//加载更多
|
|
3658
|
+
var _floorNum = _this23.dataObj[item.id] ? _this23.dataObj[item.id].floor : 1;
|
|
3659
|
+
items.push(/*#__PURE__*/React.createElement(LoadNode, {
|
|
3660
|
+
key: item.type,
|
|
3661
|
+
floorNum: _floorNum,
|
|
3662
|
+
value: textLocale === null || textLocale === void 0 ? void 0 : textLocale.loadMorePrompt,
|
|
3663
|
+
click: function click() {
|
|
3664
|
+
_this23._loadMore(_i + beginSum, item.id, item.resId, item.id);
|
|
3665
|
+
}
|
|
3666
|
+
}));
|
|
3667
|
+
} else if ((item === null || item === void 0 ? void 0 : item.type) === 'searchMore') {
|
|
3668
|
+
items.push(/*#__PURE__*/React.createElement(LoadNode, {
|
|
3669
|
+
key: item.type,
|
|
3670
|
+
floorNum: 1,
|
|
3671
|
+
value: textLocale === null || textLocale === void 0 ? void 0 : textLocale.loadingPrompt,
|
|
3672
|
+
isSearching: _this23.isSearching
|
|
3673
|
+
}));
|
|
3674
|
+
}
|
|
3675
|
+
};
|
|
3676
|
+
for (var _i = 0; _i < renderArr.length; _i++) {
|
|
3677
|
+
if (_loop5(_i)) continue;
|
|
3678
|
+
}
|
|
3679
|
+
return /*#__PURE__*/React.createElement(Fragment, null, (isNeedSearch || treeTitleNode) && /*#__PURE__*/React.createElement("div", {
|
|
3680
|
+
className: "".concat(treePrefix, "-title-container")
|
|
3681
|
+
}, isNeedSearch === 'right' && treeTitleNode, isNeedSearch && /*#__PURE__*/React.createElement(UInput, {
|
|
3682
|
+
allowClear: true,
|
|
3683
|
+
theme: theme,
|
|
3684
|
+
className: "".concat(treePrefix, "-search"),
|
|
3685
|
+
placeholder: searchPlaceholder || (textLocale === null || textLocale === void 0 ? void 0 : textLocale.pleaseEnter),
|
|
3686
|
+
value: this.state.value,
|
|
3687
|
+
onChange: this._handleChange,
|
|
3688
|
+
onEnterPress: this._getKey,
|
|
3689
|
+
onSearch: this._getKey,
|
|
3690
|
+
isClearAndSearch: false,
|
|
3691
|
+
onClear: this._clickDelete
|
|
3692
|
+
}), (isNeedSearch === 'left' || typeof isNeedSearch === 'boolean') && treeTitleNode), /*#__PURE__*/React.createElement("div", {
|
|
3693
|
+
className: "".concat(treePrefix, "-box"),
|
|
3694
|
+
style: {
|
|
3695
|
+
height: "calc(100% - ".concat(searchHeight, ")")
|
|
3696
|
+
},
|
|
3697
|
+
ref: "treeMain"
|
|
3698
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3699
|
+
className: "".concat(treePrefix, "-box-main"),
|
|
3700
|
+
style: {
|
|
3701
|
+
height: '100%'
|
|
3702
|
+
},
|
|
3703
|
+
ref: this.treeBox,
|
|
3704
|
+
onWheel: this._commonwheel,
|
|
3705
|
+
id: "treeContent"
|
|
3706
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
3707
|
+
className: "".concat(treePrefix, "-box-ul"),
|
|
3708
|
+
ref: "treeBoxUl",
|
|
3709
|
+
style: {
|
|
3710
|
+
overflowX: this.props.isIllegalAnalysis ? 'hidden' : ''
|
|
3711
|
+
}
|
|
3712
|
+
}, items), isScrollbarShow && /*#__PURE__*/React.createElement("div", {
|
|
3713
|
+
className: "scrollbar",
|
|
3714
|
+
ref: "scrollbar"
|
|
3715
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3716
|
+
className: "moveScroll",
|
|
3717
|
+
style: {
|
|
3718
|
+
height: scrollbarHeight,
|
|
3719
|
+
top: scrollbarTop
|
|
3720
|
+
},
|
|
3721
|
+
onMouseDown: this._down
|
|
3722
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3723
|
+
className: "moveScroll-top",
|
|
3724
|
+
onClick: this._scrollTop
|
|
3725
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3726
|
+
className: "moveScroll-bottom",
|
|
3727
|
+
onClick: this._scrollBottom
|
|
3728
|
+
}))), this.needLeftScroll && /*#__PURE__*/React.createElement("div", {
|
|
3729
|
+
className: "tree-left-scroll-box",
|
|
3730
|
+
ref: "leftScrollBox"
|
|
3731
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3732
|
+
className: "tree-left-scroll-ball-left",
|
|
3733
|
+
onClick: this._leftScrollLeft
|
|
3734
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3735
|
+
className: "tree-left-scroll-ball-right",
|
|
3736
|
+
onClick: this._leftScrollRight
|
|
3737
|
+
}), isScrollbarShow && /*#__PURE__*/React.createElement("div", {
|
|
3738
|
+
className: "tree-left-scroll-ball-holder"
|
|
3739
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3740
|
+
className: "tree-left-scroll-ball",
|
|
3741
|
+
ref: "leftScrollBall",
|
|
3742
|
+
onMouseDown: this._leftScrollDown
|
|
3743
|
+
}))));
|
|
3744
|
+
}
|
|
3745
|
+
}]);
|
|
3746
|
+
}(Component);
|
|
3747
|
+
/**
|
|
3748
|
+
* 渲染树节点组件
|
|
3749
|
+
* @param {*} props
|
|
3750
|
+
*/
|
|
3751
|
+
Tree.propTypes = {
|
|
3752
|
+
// 是否需要根节点
|
|
3753
|
+
needRootNode: PropTypes.bool,
|
|
3754
|
+
//是否模糊搜索,用空格隔开搜索字符
|
|
3755
|
+
needFuzzySearch: PropTypes.bool,
|
|
3756
|
+
treeIcon: PropTypes.func,
|
|
3757
|
+
treeLoader: PropTypes.func,
|
|
3758
|
+
treeNode: PropTypes.func,
|
|
3759
|
+
// 请求结束需要执行的函数
|
|
3760
|
+
requestFinishedFunc: PropTypes.func,
|
|
3761
|
+
// 双击
|
|
3762
|
+
onDoubleClick: PropTypes.func,
|
|
3763
|
+
// 右键
|
|
3764
|
+
onRightClick: PropTypes.func,
|
|
3765
|
+
// 单击
|
|
3766
|
+
onClick: PropTypes.func,
|
|
3767
|
+
// 拖拽开始
|
|
3768
|
+
onDragStart: PropTypes.func,
|
|
3769
|
+
// 拖拽开始
|
|
3770
|
+
onDragEnd: PropTypes.func,
|
|
3771
|
+
// 鼠标移入事件
|
|
3772
|
+
onMouseEnter: PropTypes.func,
|
|
3773
|
+
// 鼠标移出事件
|
|
3774
|
+
onMouseLeave: PropTypes.func,
|
|
3775
|
+
// 搜索框
|
|
3776
|
+
isNeedSearch: PropTypes.bool || PropTypes.string,
|
|
3777
|
+
treeTitleNode: PropTypes.node,
|
|
3778
|
+
hiddenResList: PropTypes.array,
|
|
3779
|
+
checkResList: PropTypes.array,
|
|
3780
|
+
// 数据类型
|
|
3781
|
+
dataTypes: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]),
|
|
3782
|
+
// 标签类型
|
|
3783
|
+
labelTypes: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]),
|
|
3784
|
+
// 显示搜索框的数据类型
|
|
3785
|
+
checkboxTypes: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
|
|
3786
|
+
// 勾选组织时,是否请求组织下面所有的数据(使用此属性,会下降勾选的速率)
|
|
3787
|
+
isCheckAll: PropTypes.bool,
|
|
3788
|
+
// 获取被勾选的节点信息
|
|
3789
|
+
onCheck: PropTypes.func,
|
|
3790
|
+
// 重置树的事件
|
|
3791
|
+
onReset: PropTypes.func,
|
|
3792
|
+
// 能否拖拽
|
|
3793
|
+
canDragType: PropTypes.array,
|
|
3794
|
+
// 默认加载完成 根节点被选中高亮
|
|
3795
|
+
autoSelectBase: PropTypes.bool,
|
|
3796
|
+
// 默认选中的资源,仅在资源可勾选有效
|
|
3797
|
+
defaultSelect: PropTypes.array,
|
|
3798
|
+
// 根节点数据完成可视化操作后执行周期函数
|
|
3799
|
+
requestFinishdeToNodeFunc: PropTypes.func,
|
|
3800
|
+
//任意树节点有请求数据返回并且完成可视化后的回调函数 this.dataObj和cameraArray修改完毕后的回调,如果请求没有返回值,我也暂定不进回调
|
|
3801
|
+
nodeLoadFinishedFunc: PropTypes.func,
|
|
3802
|
+
requestFailedFunc: PropTypes.func,
|
|
3803
|
+
intoOrOutCity: PropTypes.string,
|
|
3804
|
+
isClearAndSearch: PropTypes.bool,
|
|
3805
|
+
//清空搜索框时是否同步查询
|
|
3806
|
+
//选中结点后,是否进行级联操作
|
|
3807
|
+
isLoopCheck: PropTypes.bool
|
|
3808
|
+
};
|
|
3809
|
+
Tree.defaultProps = {
|
|
3810
|
+
needRootNode: true,
|
|
3811
|
+
needFuzzySearch: false,
|
|
3812
|
+
treeIcon: UTreeIcon,
|
|
3813
|
+
treeLoader: UTreeLoader,
|
|
3814
|
+
treeNode: UTreeNode,
|
|
3815
|
+
checkboxTypes: [],
|
|
3816
|
+
isNeedSearch: false,
|
|
3817
|
+
treeTitleNode: undefined,
|
|
3818
|
+
hiddenResList: [],
|
|
3819
|
+
checkResList: [],
|
|
3820
|
+
isCheckAll: false,
|
|
3821
|
+
canDragType: [],
|
|
3822
|
+
autoSelectBase: false,
|
|
3823
|
+
defaultSelect: [],
|
|
3824
|
+
intoOrOutCity: '',
|
|
3825
|
+
isUseOldTree: false,
|
|
3826
|
+
combineThreeCode: false,
|
|
3827
|
+
isSlectCmaedd: false,
|
|
3828
|
+
//用来控制VMS情况下根组织是root,不随用户组织改动
|
|
3829
|
+
isShowOrgInfo: false,
|
|
3830
|
+
//用来过滤VMS情况下无权限的树节点不显示
|
|
3831
|
+
isPartCheckInfo: false,
|
|
3832
|
+
//用来控制是否返回半选状态的组织信息
|
|
3833
|
+
requestFinishdeToNodeFunc: function requestFinishdeToNodeFunc() {},
|
|
3834
|
+
isLoopCheck: true,
|
|
3835
|
+
nodeLoadFinishedFunc: function nodeLoadFinishedFunc() {}
|
|
3836
|
+
};
|
|
3837
|
+
export { Tree as default };
|
|
3838
|
+
function TreeNode(props) {
|
|
3839
|
+
var value = props.value,
|
|
3840
|
+
isFloder = props.isFloder,
|
|
3841
|
+
isOpen = props.isOpen,
|
|
3842
|
+
iconLeftClick = props.iconLeftClick,
|
|
3843
|
+
needClickStyle = props.needClickStyle,
|
|
3844
|
+
click = props.click,
|
|
3845
|
+
rightClick = props.rightClick,
|
|
3846
|
+
doubleClick = props.doubleClick,
|
|
3847
|
+
needMouseEnterStyle = props.needMouseEnterStyle,
|
|
3848
|
+
mouseEnter = props.mouseEnter,
|
|
3849
|
+
mouseLeave = props.mouseLeave,
|
|
3850
|
+
dragStart = props.dragStart,
|
|
3851
|
+
dragEnd = props.dragEnd,
|
|
3852
|
+
floorNum = props.floorNum,
|
|
3853
|
+
iconClass = props.iconClass,
|
|
3854
|
+
targetNode = props.targetNode,
|
|
3855
|
+
showCheckbox = props.showCheckbox,
|
|
3856
|
+
checkFunc = props.checkFunc,
|
|
3857
|
+
isNeedEllipsis = props.isNeedEllipsis;
|
|
3858
|
+
var _targetNode$isCheck = targetNode.isCheck,
|
|
3859
|
+
isCheck = _targetNode$isCheck === void 0 ? false : _targetNode$isCheck,
|
|
3860
|
+
isOrgNode = targetNode.isOrgNode,
|
|
3861
|
+
loopCheck = targetNode.loopCheck,
|
|
3862
|
+
isDisPlay = targetNode.isDisPlay;
|
|
3863
|
+
|
|
3864
|
+
/**
|
|
3865
|
+
* checkbox change事件
|
|
3866
|
+
* @param {*} event
|
|
3867
|
+
*/
|
|
3868
|
+
var cbChange = function cbChange(event) {
|
|
3869
|
+
checkFunc(event, event.target.checked);
|
|
3870
|
+
};
|
|
3871
|
+
var classFront = '';
|
|
3872
|
+
if (floorNum === 1) {
|
|
3873
|
+
classFront = isFloder ? isOpen ? 'fakeOut' : 'fakeIn' : 'fakeFloder';
|
|
3874
|
+
} else {
|
|
3875
|
+
classFront = isFloder ? isOpen ? 'minus' : 'plus' : 'fake';
|
|
3876
|
+
}
|
|
3877
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
3878
|
+
className: treePrefix + '-box-part' + floorNum + ' ' + needClickStyle + ' ' + needMouseEnterStyle,
|
|
3879
|
+
onClick: click,
|
|
3880
|
+
draggable: !isOrgNode ? true : false,
|
|
3881
|
+
onDoubleClick: doubleClick,
|
|
3882
|
+
onDragStart: dragStart,
|
|
3883
|
+
onDragEnd: dragEnd,
|
|
3884
|
+
onMouseEnter: mouseEnter,
|
|
3885
|
+
onMouseLeave: mouseLeave
|
|
3886
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
3887
|
+
className: classFront,
|
|
3888
|
+
type: "expand",
|
|
3889
|
+
onClick: iconLeftClick
|
|
3890
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3891
|
+
onContextMenu: rightClick
|
|
3892
|
+
}, showCheckbox && /*#__PURE__*/React.createElement(Checkbox, {
|
|
3893
|
+
onChange: cbChange,
|
|
3894
|
+
checked: isCheck,
|
|
3895
|
+
indeterminate: loopCheck === LOOP_CHECK_TYPE.SOME
|
|
3896
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3897
|
+
className: iconClass + " ".concat(treePrefix, "-icon")
|
|
3898
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3899
|
+
className: "".concat(treePrefix, "-node-desc") + (isNeedEllipsis ? " ".concat(treePrefix, "-node-desc-ellipsis") : ''),
|
|
3900
|
+
title: value
|
|
3901
|
+
}, value)));
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
/**
|
|
3905
|
+
* 渲染树加载节点组件
|
|
3906
|
+
* @param {*} props
|
|
3907
|
+
*/
|
|
3908
|
+
function LoadNode(props) {
|
|
3909
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
3910
|
+
className: "".concat(treePrefix, "-box-part") + props.floorNum + ' tree-loadnode'
|
|
3911
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
3912
|
+
className: props.isSearching ? 'search-load' : 'load'
|
|
3913
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3914
|
+
onClick: props.click,
|
|
3915
|
+
className: "tree-load-label"
|
|
3916
|
+
}, props.value));
|
|
3917
|
+
}
|