antd-management-fast-framework 1.12.103 → 2.1.0
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/es/components/ApplicationWrapper/index.d.ts +9 -0
- package/es/components/Bootstrap/index.d.ts +3 -0
- package/es/components/DataPreviewDrawer/index.d.ts +31 -0
- package/es/{customComponents/Exception → components/LoadingOverlay}/index.d.ts +1 -3
- package/es/components/MobileContainor/MobileHtmlPreviewBox/index.d.ts +10 -0
- package/es/components/MobileContainor/MobilePreviewArea/index.d.ts +75 -0
- package/es/components/MobileContainor/MobilePreviewDrawer/index.d.ts +54 -0
- package/es/components/MobileContainor/index.d.ts +8 -0
- package/es/components/index.d.ts +5 -0
- package/es/configGroup/configGeneral.d.ts +27 -55
- package/es/configGroup/configGeneral.js +31 -138
- package/es/configGroup/index.d.ts +2 -0
- package/es/configGroup/themeCollection.d.ts +3 -25
- package/es/configGroup/themeCollection.js +1 -109
- package/es/configGroup/webpackPlugin.d.ts +0 -7
- package/es/configGroup/webpackPlugin.js +236 -51
- package/es/configs/index.d.ts +2 -0
- package/es/configs/themeCollection.d.ts +7 -0
- package/es/configs/webpackPlugin.d.ts +4 -0
- package/es/customComponents/ApplicationProvider/index.d.ts +12 -0
- package/es/customComponents/ApplicationWrapper/index.d.ts +9 -0
- package/es/customComponents/Bootstrap/index.d.ts +3 -0
- package/es/customComponents/Bootstrap/index.js +67 -0
- package/es/customComponents/DataPreviewDrawer/index.d.ts +5 -6
- package/es/customComponents/DataPreviewDrawer/index.js +78 -87
- package/es/customComponents/LoadingOverlay/index.d.ts +6 -0
- package/es/customComponents/LoadingOverloay/index.d.ts +3 -0
- package/es/customComponents/MobileContainor/MobileHtmlPreviewBox/index.d.ts +4 -6
- package/es/customComponents/MobileContainor/MobileHtmlPreviewBox/index.js +57 -54
- package/es/customComponents/MobileContainor/MobilePreviewArea/index.d.ts +38 -12
- package/es/customComponents/MobileContainor/MobilePreviewArea/index.js +84 -111
- package/es/customComponents/MobileContainor/MobilePreviewDrawer/index.d.ts +8 -8
- package/es/customComponents/MobileContainor/MobilePreviewDrawer/index.js +76 -95
- package/es/customComponents/MobileContainor/index.d.ts +8 -0
- package/es/customComponents/index.d.ts +5 -7
- package/es/framework/AuthorizationWrapper/index.d.ts +8 -5
- package/es/framework/AuthorizationWrapper/index.js +50 -59
- package/es/framework/ButtonExtension/SelectButton/Base/index.d.ts +5 -6
- package/es/framework/ButtonExtension/SelectButton/Base/index.js +52 -70
- package/es/framework/ButtonExtension/SelectButton/InteractiveBase/index.d.ts +6 -7
- package/es/framework/ButtonExtension/SelectButton/InteractiveBase/index.js +57 -85
- package/es/framework/ButtonExtension/SelectButton/index.d.ts +6 -0
- package/es/framework/ButtonExtension/index.d.ts +1 -0
- package/es/framework/Common/CardCollectionItemContent/index.d.ts +14 -0
- package/es/framework/Common/CommonInternal/index.d.ts +167 -0
- package/es/framework/Common/InternalBuild/index.d.ts +26 -0
- package/es/framework/Common/InternalFlow/index.d.ts +149 -0
- package/es/framework/Common/InternalLayout/index.d.ts +9 -0
- package/es/framework/Common/InternalMake/index.d.ts +9 -0
- package/es/framework/Common/InternalTabFlow/index.d.ts +12 -0
- package/es/framework/Common/index.d.ts +2 -205
- package/es/framework/Common/index.js +39 -2481
- package/es/framework/Core/index.d.ts +17 -6
- package/es/framework/Core/index.js +15 -56
- package/es/framework/CustomWrapper/Supplement/index.d.ts +2 -3
- package/es/framework/CustomWrapper/Supplement/index.js +43 -40
- package/es/framework/CustomWrapper/SupplementCore/index.d.ts +2 -4
- package/es/framework/CustomWrapper/SupplementCore/index.js +47 -66
- package/es/framework/CustomWrapper/SupplementWrapper/index.d.ts +2 -3
- package/es/framework/CustomWrapper/SupplementWrapper/index.js +44 -41
- package/es/framework/CustomWrapper/index.d.ts +3 -0
- package/es/framework/DataDrawer/Base/index.d.ts +16 -18
- package/es/framework/DataDrawer/Base/index.js +126 -238
- package/es/framework/DataDrawer/BaseAddDrawer/index.d.ts +3 -4
- package/es/framework/DataDrawer/BaseAddDrawer/index.js +57 -60
- package/es/framework/DataDrawer/BaseLoadDrawer/index.d.ts +3 -4
- package/es/framework/DataDrawer/BaseLoadDrawer/index.js +54 -47
- package/es/framework/DataDrawer/BaseNeedlessLoadDrawer/index.d.ts +3 -4
- package/es/framework/DataDrawer/BaseNeedlessLoadDrawer/index.js +57 -63
- package/es/framework/DataDrawer/BaseSaveDrawer/index.d.ts +2 -3
- package/es/framework/DataDrawer/BaseSaveDrawer/index.js +55 -57
- package/es/framework/DataDrawer/BaseUpdateDrawer/index.d.ts +2 -3
- package/es/framework/DataDrawer/BaseUpdateDrawer/index.js +56 -56
- package/es/framework/DataDrawer/index.d.ts +14 -0
- package/es/framework/DataForm/BaseAddForm/index.d.ts +7 -7
- package/es/framework/DataForm/BaseAddForm/index.js +95 -162
- package/es/framework/DataForm/BaseUpdateForm/index.d.ts +3 -4
- package/es/framework/DataForm/BaseUpdateForm/index.js +66 -85
- package/es/framework/DataForm/BaseUpdateFormContent/index.d.ts +2 -3
- package/es/framework/DataForm/BaseUpdateFormContent/index.js +55 -45
- package/es/framework/DataForm/BaseUpdateFormTab/index.d.ts +3 -3
- package/es/framework/DataForm/BaseUpdateFormTab/index.js +54 -37
- package/es/framework/DataForm/index.d.ts +10 -0
- package/es/framework/DataListView/Base/index.d.ts +38 -82
- package/es/framework/DataListView/Base/index.js +317 -634
- package/es/framework/DataListView/BatchAction/index.d.ts +3 -3
- package/es/framework/DataListView/BatchAction/index.js +38 -68
- package/es/framework/DataListView/ColumnSetting/DndItem.d.ts +1 -2
- package/es/framework/DataListView/ColumnSetting/DndItem.js +87 -110
- package/es/framework/DataListView/ColumnSetting/index.d.ts +1 -2
- package/es/framework/DataListView/ColumnSetting/index.js +111 -160
- package/es/framework/DataListView/DensityAction/index.d.ts +2 -3
- package/es/framework/DataListView/DensityAction/index.js +29 -84
- package/es/framework/DataListView/index.d.ts +10 -0
- package/es/framework/DataMenuContainer/index.d.ts +8 -10
- package/es/framework/DataMenuContainer/index.js +96 -155
- package/es/framework/DataModal/Base/index.d.ts +10 -12
- package/es/framework/DataModal/Base/index.js +74 -128
- package/es/framework/DataModal/BaseAddModal/index.d.ts +2 -3
- package/es/framework/DataModal/BaseAddModal/index.js +52 -50
- package/es/framework/DataModal/BaseLoadModal/index.d.ts +3 -4
- package/es/framework/DataModal/BaseLoadModal/index.js +49 -44
- package/es/framework/DataModal/BaseNeedlessLoadModal/index.d.ts +6 -6
- package/es/framework/DataModal/BaseNeedlessLoadModal/index.js +55 -62
- package/es/framework/DataModal/BaseSelectModal/index.d.ts +4 -4
- package/es/framework/DataModal/BaseSelectModal/index.js +52 -51
- package/es/framework/DataModal/BaseUpdateModal/index.d.ts +2 -3
- package/es/framework/DataModal/BaseUpdateModal/index.js +50 -37
- package/es/framework/DataModal/BaseUpdateTransferModal/index.d.ts +5 -5
- package/es/framework/DataModal/BaseUpdateTransferModal/index.js +63 -85
- package/es/framework/DataModal/index.d.ts +16 -0
- package/es/framework/DataMultiPageView/InnerMultiPage/index.d.ts +3 -3
- package/es/framework/DataMultiPageView/InnerMultiPage/index.js +66 -46
- package/es/framework/DataMultiPageView/MultiPage/index.d.ts +4 -3
- package/es/framework/DataMultiPageView/MultiPage/index.js +109 -143
- package/es/framework/DataMultiPageView/MultiPageDrawer/index.d.ts +19 -21
- package/es/framework/DataMultiPageView/MultiPageDrawer/index.js +179 -233
- package/es/framework/DataMultiPageView/MultiPageSelectDrawer/index.d.ts +4 -5
- package/es/framework/DataMultiPageView/MultiPageSelectDrawer/index.js +79 -73
- package/es/framework/DataMultiPageView/index.d.ts +10 -0
- package/es/framework/DataOperation/Base/index.d.ts +2 -3
- package/es/framework/DataOperation/Base/index.js +156 -214
- package/es/framework/DataOperation/BaseView/index.d.ts +2 -3
- package/es/framework/DataOperation/BaseView/index.js +56 -51
- package/es/framework/DataOperation/BaseWindow/index.d.ts +13 -14
- package/es/framework/DataOperation/BaseWindow/index.js +115 -163
- package/es/framework/DataOperation/index.d.ts +8 -0
- package/es/framework/DataSinglePageView/InnerSinglePage/index.d.ts +3 -3
- package/es/framework/DataSinglePageView/InnerSinglePage/index.js +66 -46
- package/es/framework/DataSinglePageView/SinglePage/index.d.ts +9 -4
- package/es/framework/DataSinglePageView/SinglePage/index.js +97 -121
- package/es/framework/DataSinglePageView/SinglePageDrawer/index.d.ts +19 -21
- package/es/framework/DataSinglePageView/SinglePageDrawer/index.js +173 -224
- package/es/framework/DataSinglePageView/SinglePageSelectDrawer/index.d.ts +4 -5
- package/es/framework/DataSinglePageView/SinglePageSelectDrawer/index.js +81 -75
- package/es/framework/DataSinglePageView/index.d.ts +10 -0
- package/es/framework/DataSingleView/DataCore/index.d.ts +13 -40
- package/es/framework/DataSingleView/DataCore/index.js +90 -160
- package/es/framework/DataSingleView/DataLoad/index.d.ts +5 -5
- package/es/framework/DataSingleView/DataLoad/index.js +74 -92
- package/es/framework/DataSingleView/index.d.ts +6 -0
- package/es/framework/DataTabContainer/index.d.ts +6 -29
- package/es/framework/DataTabContainer/index.js +133 -159
- package/es/framework/FieldExtension/SelectFieldDrawer/SelectFieldBase/index.d.ts +6 -7
- package/es/framework/FieldExtension/SelectFieldDrawer/SelectFieldBase/index.js +69 -96
- package/es/framework/FieldExtension/SelectFieldDrawer/SelectFieldDrawerBase/index.js +65 -97
- package/es/framework/FieldExtension/SelectFieldDrawer/{SelectFieldDrawerBase → SelectFieldInteractiveBase}/index.d.ts +6 -7
- package/es/framework/FieldExtension/SelectFieldDrawer/index.d.ts +6 -0
- package/es/framework/FieldExtension/index.d.ts +4 -0
- package/es/framework/LayoutWrapper/index.d.ts +2 -0
- package/es/framework/Wrapper/index.d.ts +2 -3
- package/es/framework/Wrapper/index.js +42 -41
- package/es/framework/index.d.ts +17 -7
- package/es/get.js +28 -0
- package/es/getPrototypeOf.js +76 -0
- package/es/index.css +12 -0
- package/es/index.d.ts +5 -1
- package/es/index.js +9769 -6
- package/es/index2.js +2075 -0
- package/es/index3.js +383 -0
- package/es/modelBuilders/index.d.ts +1 -0
- package/es/modelBuilders/schedulingControl.d.ts +68 -0
- package/es/models/index.d.ts +1 -0
- package/es/models/schedulingControl.d.ts +46 -0
- package/es/models/schedulingControl.js +171 -0
- package/es/objectSpread2.js +40 -0
- package/es/services/schedulingControl.d.ts +4 -0
- package/es/services/schedulingControl.js +135 -0
- package/es/slicedToArray.js +43 -0
- package/es/toConsumableArray.js +19 -0
- package/es/toPropertyKey.js +19 -0
- package/es/typeof.js +11 -0
- package/es/unsupportedIterableToArray.js +16 -0
- package/es/utils/appListDataAssist.js +69 -0
- package/es/utils/applicationAssist.js +28 -0
- package/es/utils/applicationListDataAssist.d.ts +4 -0
- package/es/utils/applicationListDataCacheAssist.d.ts +24 -0
- package/es/utils/bootstrap.d.ts +4 -0
- package/es/utils/bootstrap.js +58 -0
- package/es/utils/configAssist.d.ts +1 -0
- package/es/utils/currentOperatorAssist.d.ts +5 -0
- package/es/utils/definition.d.ts +4 -0
- package/es/utils/index.d.ts +8 -0
- package/es/utils/layoutSettingAssist.d.ts +2 -0
- package/es/utils/layoutSettingAssist.js +60 -0
- package/es/utils/metaDataAssist.d.ts +5 -0
- package/es/utils/metaDataAssist.js +69 -0
- package/es/utils/schedulingControlAssist.d.ts +10 -0
- package/es/utils/storageAssist.js +153 -0
- package/package.json +122 -195
- package/License.txt +0 -21
- package/README.md +0 -35
- package/es/customComponents/AMap/UIPoiPicker.d.ts +0 -8
- package/es/customComponents/AMap/UIPoiPicker.js +0 -78
- package/es/customComponents/AMap/UIPositionPicker.d.ts +0 -8
- package/es/customComponents/AMap/UIPositionPicker.js +0 -87
- package/es/customComponents/ActiveChart/index.d.ts +0 -17
- package/es/customComponents/ActiveChart/index.js +0 -168
- package/es/customComponents/ActiveChart/index.less +0 -58
- package/es/customComponents/AnimalBox/FadeBox/index.d.ts +0 -14
- package/es/customComponents/AnimalBox/FadeBox/index.js +0 -82
- package/es/customComponents/AnimalBox/FadeBox/index.less +0 -61
- package/es/customComponents/AnimalBox/QueueBox/index.d.ts +0 -12
- package/es/customComponents/AnimalBox/QueueBox/index.js +0 -76
- package/es/customComponents/AnimalBox/QueueListBox/index.d.ts +0 -15
- package/es/customComponents/AnimalBox/QueueListBox/index.js +0 -117
- package/es/customComponents/AnimalBox/QueueListBox/index.less +0 -16
- package/es/customComponents/AnimalBox/RotateBox/index.d.ts +0 -14
- package/es/customComponents/AnimalBox/RotateBox/index.js +0 -85
- package/es/customComponents/ArticleListContent/index.d.ts +0 -10
- package/es/customComponents/ArticleListContent/index.js +0 -49
- package/es/customComponents/ArticleListContent/index.less +0 -41
- package/es/customComponents/AudioUpload/index.d.ts +0 -39
- package/es/customComponents/AudioUpload/index.js +0 -478
- package/es/customComponents/Authorized/Authorized.d.ts +0 -6
- package/es/customComponents/Authorized/Authorized.js +0 -33
- package/es/customComponents/Authorized/AuthorizedRoute.d.ts +0 -8
- package/es/customComponents/Authorized/AuthorizedRoute.js +0 -50
- package/es/customComponents/Authorized/CheckPermissions.d.ts +0 -11
- package/es/customComponents/Authorized/CheckPermissions.js +0 -106
- package/es/customComponents/Authorized/PromiseRender.d.ts +0 -13
- package/es/customComponents/Authorized/PromiseRender.js +0 -151
- package/es/customComponents/Authorized/Secured.d.ts +0 -18
- package/es/customComponents/Authorized/Secured.js +0 -95
- package/es/customComponents/Authorized/index.d.ts +0 -2
- package/es/customComponents/Authorized/index.js +0 -22
- package/es/customComponents/Authorized/renderAuthorize.d.ts +0 -3
- package/es/customComponents/Authorized/renderAuthorize.js +0 -37
- package/es/customComponents/AvatarList/index.d.ts +0 -17
- package/es/customComponents/AvatarList/index.js +0 -99
- package/es/customComponents/AvatarList/index.less +0 -53
- package/es/customComponents/AvatarList/index.test.d.ts +0 -1
- package/es/customComponents/Canvas/Bubbly/index.d.ts +0 -20
- package/es/customComponents/Canvas/Bubbly/index.js +0 -182
- package/es/customComponents/Canvas/Core/index.d.ts +0 -28
- package/es/customComponents/Canvas/Core/index.js +0 -163
- package/es/customComponents/Canvas/RadarScanning/index.d.ts +0 -20
- package/es/customComponents/Canvas/RadarScanning/index.js +0 -251
- package/es/customComponents/Canvas/Ribbon.7z +0 -0
- package/es/customComponents/Canvas/Spirit/index.d.ts +0 -23
- package/es/customComponents/Canvas/Spirit/index.js +0 -119
- package/es/customComponents/Canvas/index.d.ts +0 -12
- package/es/customComponents/Canvas/index.js +0 -27
- package/es/customComponents/CenterBox/index.d.ts +0 -7
- package/es/customComponents/CenterBox/index.js +0 -70
- package/es/customComponents/Charts/Bar/index.d.ts +0 -10
- package/es/customComponents/Charts/Bar/index.js +0 -129
- package/es/customComponents/Charts/ChartCard/index.d.ts +0 -8
- package/es/customComponents/Charts/ChartCard/index.js +0 -160
- package/es/customComponents/Charts/ChartCard/index.less +0 -90
- package/es/customComponents/Charts/Field/index.d.ts +0 -6
- package/es/customComponents/Charts/Field/index.js +0 -37
- package/es/customComponents/Charts/Field/index.less +0 -19
- package/es/customComponents/Charts/Gauge/index.d.ts +0 -2
- package/es/customComponents/Charts/Gauge/index.js +0 -185
- package/es/customComponents/Charts/MiniArea/index.d.ts +0 -2
- package/es/customComponents/Charts/MiniArea/index.js +0 -107
- package/es/customComponents/Charts/MiniBar/index.d.ts +0 -2
- package/es/customComponents/Charts/MiniBar/index.js +0 -62
- package/es/customComponents/Charts/MiniProgress/index.d.ts +0 -8
- package/es/customComponents/Charts/MiniProgress/index.js +0 -55
- package/es/customComponents/Charts/MiniProgress/index.less +0 -42
- package/es/customComponents/Charts/Pie/index.d.ts +0 -10
- package/es/customComponents/Charts/Pie/index.js +0 -195
- package/es/customComponents/Charts/Pie/index.less +0 -104
- package/es/customComponents/Charts/TagCloud/index.d.ts +0 -23
- package/es/customComponents/Charts/TagCloud/index.js +0 -276
- package/es/customComponents/Charts/TagCloud/index.less +0 -7
- package/es/customComponents/Charts/TimelineChart/index.d.ts +0 -2
- package/es/customComponents/Charts/TimelineChart/index.js +0 -173
- package/es/customComponents/Charts/TimelineChart/index.less +0 -5
- package/es/customComponents/Charts/WaterWave/index.d.ts +0 -18
- package/es/customComponents/Charts/WaterWave/index.js +0 -319
- package/es/customComponents/Charts/WaterWave/index.less +0 -32
- package/es/customComponents/Charts/autoHeight.d.ts +0 -13
- package/es/customComponents/Charts/autoHeight.js +0 -123
- package/es/customComponents/Charts/bizcharts.d.ts +0 -2
- package/es/customComponents/Charts/bizcharts.js +0 -17
- package/es/customComponents/Charts/index.d.ts +0 -27
- package/es/customComponents/Charts/index.js +0 -119
- package/es/customComponents/Charts/index.less +0 -26
- package/es/customComponents/ColorText/index.d.ts +0 -22
- package/es/customComponents/ColorText/index.js +0 -139
- package/es/customComponents/Countdown/index.d.ts +0 -22
- package/es/customComponents/Countdown/index.js +0 -158
- package/es/customComponents/Countdown/index.less +0 -5
- package/es/customComponents/DataPreviewDrawer/index.less +0 -10
- package/es/customComponents/DecorateAvatar/index.d.ts +0 -37
- package/es/customComponents/DecorateAvatar/index.js +0 -199
- package/es/customComponents/DisplayCopyData/index.d.ts +0 -10
- package/es/customComponents/DisplayCopyData/index.js +0 -86
- package/es/customComponents/EditableItem/index.d.ts +0 -12
- package/es/customComponents/EditableItem/index.js +0 -121
- package/es/customComponents/EditableItem/index.less +0 -25
- package/es/customComponents/EditableLinkGroup/index.d.ts +0 -23
- package/es/customComponents/EditableLinkGroup/index.js +0 -99
- package/es/customComponents/EditableLinkGroup/index.less +0 -18
- package/es/customComponents/Editor/TinymceWrapper/index.d.ts +0 -19
- package/es/customComponents/Editor/TinymceWrapper/index.js +0 -254
- package/es/customComponents/Ellipsis/index.d.ts +0 -26
- package/es/customComponents/Ellipsis/index.js +0 -389
- package/es/customComponents/Ellipsis/index.less +0 -28
- package/es/customComponents/Ellipsis/index.test.d.ts +0 -1
- package/es/customComponents/EllipsisCustom/index.d.ts +0 -26
- package/es/customComponents/EllipsisCustom/index.js +0 -355
- package/es/customComponents/EllipsisCustom/index.less +0 -27
- package/es/customComponents/EverySpace/index.d.ts +0 -16
- package/es/customComponents/EverySpace/index.js +0 -105
- package/es/customComponents/Exception/index.js +0 -121
- package/es/customComponents/Exception/index.less +0 -92
- package/es/customComponents/Exception/typeConfig.d.ts +0 -18
- package/es/customComponents/Exception/typeConfig.js +0 -25
- package/es/customComponents/FigureRange/index.d.ts +0 -133
- package/es/customComponents/FigureRange/index.js +0 -335
- package/es/customComponents/FigureRange/index.less +0 -73
- package/es/customComponents/FileBase64Upload/index.d.ts +0 -27
- package/es/customComponents/FileBase64Upload/index.js +0 -205
- package/es/customComponents/FileUpload/index.d.ts +0 -35
- package/es/customComponents/FileUpload/index.js +0 -402
- package/es/customComponents/FlexBox/index.d.ts +0 -24
- package/es/customComponents/FlexBox/index.js +0 -186
- package/es/customComponents/FlexText/index.d.ts +0 -21
- package/es/customComponents/FlexText/index.js +0 -109
- package/es/customComponents/FlexText/index.less +0 -3
- package/es/customComponents/FooterToolbar/index.d.ts +0 -16
- package/es/customComponents/FooterToolbar/index.js +0 -132
- package/es/customComponents/FooterToolbar/index.less +0 -33
- package/es/customComponents/FromDisplayItem/index.d.ts +0 -14
- package/es/customComponents/FromDisplayItem/index.js +0 -73
- package/es/customComponents/FromDisplayItem/index.less +0 -5
- package/es/customComponents/FunctionComponent/index.d.ts +0 -443
- package/es/customComponents/FunctionComponent/index.js +0 -3404
- package/es/customComponents/FunctionComponent/index.less +0 -63
- package/es/customComponents/FunctionSupplement/Whether/index.d.ts +0 -46
- package/es/customComponents/FunctionSupplement/Whether/index.js +0 -181
- package/es/customComponents/GlobalFooter/index.d.ts +0 -6
- package/es/customComponents/GlobalFooter/index.js +0 -39
- package/es/customComponents/GlobalFooter/index.less +0 -29
- package/es/customComponents/HelpBox/index.d.ts +0 -18
- package/es/customComponents/HelpBox/index.js +0 -192
- package/es/customComponents/HelpBox/index.less +0 -16
- package/es/customComponents/HelpCard/index.d.ts +0 -18
- package/es/customComponents/HelpCard/index.js +0 -91
- package/es/customComponents/HtmlBox/index.d.ts +0 -20
- package/es/customComponents/HtmlBox/index.js +0 -118
- package/es/customComponents/HtmlBox/index.less +0 -7
- package/es/customComponents/IconFont/index.d.ts +0 -2
- package/es/customComponents/IconFont/index.js +0 -14
- package/es/customComponents/IconInfo/index.d.ts +0 -32
- package/es/customComponents/IconInfo/index.js +0 -373
- package/es/customComponents/IconInfo/index.less +0 -5
- package/es/customComponents/ImageBox/index.d.ts +0 -60
- package/es/customComponents/ImageBox/index.js +0 -376
- package/es/customComponents/ImageBox/index.less +0 -114
- package/es/customComponents/ImageContentPreview/index.d.ts +0 -21
- package/es/customComponents/ImageContentPreview/index.js +0 -173
- package/es/customComponents/ImageContentPreview/index.less +0 -9
- package/es/customComponents/ImageUpload/index.d.ts +0 -45
- package/es/customComponents/ImageUpload/index.js +0 -413
- package/es/customComponents/ImageUpload/index.less +0 -81
- package/es/customComponents/MobileContainor/ContentView/index.d.ts +0 -20
- package/es/customComponents/MobileContainor/ContentView/index.js +0 -152
- package/es/customComponents/MobileContainor/ContentView/index.less +0 -30
- package/es/customComponents/MobileContainor/Devices/GalaxyNote8/index.d.ts +0 -19
- package/es/customComponents/MobileContainor/Devices/GalaxyNote8/index.js +0 -121
- package/es/customComponents/MobileContainor/Devices/IPhone5S/index.d.ts +0 -20
- package/es/customComponents/MobileContainor/Devices/IPhone5S/index.js +0 -124
- package/es/customComponents/MobileContainor/Devices/Iphone8/index.d.ts +0 -20
- package/es/customComponents/MobileContainor/Devices/Iphone8/index.js +0 -124
- package/es/customComponents/MobileContainor/Devices/Iphone8plus/index.d.ts +0 -20
- package/es/customComponents/MobileContainor/Devices/Iphone8plus/index.js +0 -124
- package/es/customComponents/MobileContainor/Devices/IphoneX/index.d.ts +0 -20
- package/es/customComponents/MobileContainor/Devices/IphoneX/index.js +0 -130
- package/es/customComponents/MobileContainor/Devices/RoughSketch/index.d.ts +0 -19
- package/es/customComponents/MobileContainor/Devices/RoughSketch/index.js +0 -97
- package/es/customComponents/MobileContainor/Devices/RoughSketch/index.less +0 -34
- package/es/customComponents/MobileContainor/Devices/devices.less +0 -2815
- package/es/customComponents/MobileContainor/MobileSimulation/index.d.ts +0 -23
- package/es/customComponents/MobileContainor/MobileSimulation/index.js +0 -243
- package/es/customComponents/NoticeIconCustom/NoticeList.d.ts +0 -10
- package/es/customComponents/NoticeIconCustom/NoticeList.js +0 -81
- package/es/customComponents/NoticeIconCustom/NoticeList.less +0 -90
- package/es/customComponents/NoticeIconCustom/index.d.ts +0 -25
- package/es/customComponents/NoticeIconCustom/index.js +0 -201
- package/es/customComponents/NoticeIconCustom/index.less +0 -31
- package/es/customComponents/NumberInfo/index.d.ts +0 -12
- package/es/customComponents/NumberInfo/index.js +0 -60
- package/es/customComponents/NumberInfo/index.less +0 -77
- package/es/customComponents/PageLoading/index.d.ts +0 -2
- package/es/customComponents/PageLoading/index.js +0 -13
- package/es/customComponents/PercentageBox/index.d.ts +0 -12
- package/es/customComponents/PercentageBox/index.js +0 -70
- package/es/customComponents/PriceBox/index.d.ts +0 -18
- package/es/customComponents/PriceBox/index.js +0 -115
- package/es/customComponents/Result/index.d.ts +0 -9
- package/es/customComponents/Result/index.js +0 -57
- package/es/customComponents/Result/index.less +0 -58
- package/es/customComponents/StandardFormRow/index.d.ts +0 -9
- package/es/customComponents/StandardFormRow/index.js +0 -47
- package/es/customComponents/StandardFormRow/index.less +0 -81
- package/es/customComponents/StandardTable/index.d.ts +0 -17
- package/es/customComponents/StandardTable/index.js +0 -217
- package/es/customComponents/StandardTable/index.less +0 -7
- package/es/customComponents/StandardTableCustom/index.d.ts +0 -22
- package/es/customComponents/StandardTableCustom/index.js +0 -234
- package/es/customComponents/StandardTableCustom/index.less +0 -21
- package/es/customComponents/StatusBar/index.d.ts +0 -13
- package/es/customComponents/StatusBar/index.js +0 -128
- package/es/customComponents/TagSelect/index.d.ts +0 -34
- package/es/customComponents/TagSelect/index.js +0 -226
- package/es/customComponents/TagSelect/index.less +0 -38
- package/es/customComponents/TimeLineCustom/index.d.ts +0 -37
- package/es/customComponents/TimeLineCustom/index.js +0 -273
- package/es/customComponents/TimeLineCustom/index.less +0 -180
- package/es/customComponents/Trend/index.d.ts +0 -10
- package/es/customComponents/Trend/index.js +0 -49
- package/es/customComponents/Trend/index.less +0 -41
- package/es/customComponents/VerticalBox/index.d.ts +0 -15
- package/es/customComponents/VerticalBox/index.js +0 -138
- package/es/customComponents/VerticalBox/index.less +0 -7
- package/es/customComponents/VideoUpload/index.d.ts +0 -39
- package/es/customComponents/VideoUpload/index.js +0 -472
- package/es/customComponents/_utils/pathTools.d.ts +0 -1
- package/es/customComponents/_utils/pathTools.js +0 -15
- package/es/customComponents/_utils/pathTools.test.d.ts +0 -1
- package/es/customComponents/index.js +0 -16
- package/es/framework/Base/index.d.ts +0 -68
- package/es/framework/Base/index.js +0 -338
- package/es/framework/Common/index.less +0 -13
- package/es/framework/CustomBase/index.d.ts +0 -8
- package/es/framework/CustomBase/index.js +0 -77
- package/es/framework/DataDrawer/Base/index.less +0 -27
- package/es/framework/DataForm/BaseAddForm/index.less +0 -51
- package/es/framework/DataListView/Base/index.less +0 -161
- package/es/framework/DataListView/BatchAction/index.less +0 -5
- package/es/framework/DataListView/ColumnSetting/index.less +0 -60
- package/es/framework/DataMenuContainer/index.less +0 -100
- package/es/framework/DataModal/Base/index.less +0 -6
- package/es/framework/DataMultiPageView/InnerMultiPage/index.less +0 -125
- package/es/framework/DataMultiPageView/MultiPageDrawer/index.less +0 -65
- package/es/framework/DataSinglePageView/InnerSinglePage/index.less +0 -50
- package/es/framework/DataSinglePageView/SinglePageDrawer/index.less +0 -33
- package/es/framework/DataSingleView/DataCore/index.less +0 -7
- package/es/framework/DataTabContainer/index.less +0 -51
- package/es/framework/index.js +0 -60
- package/es/utils/Authorized.d.ts +0 -4
- package/es/utils/Authorized.js +0 -52
- package/es/utils/Yuan.d.ts +0 -13
- package/es/utils/Yuan.js +0 -92
- package/es/utils/actionAssist.d.ts +0 -44
- package/es/utils/actionAssist.js +0 -467
- package/es/utils/appConfiguration.d.ts +0 -70
- package/es/utils/appConfiguration.js +0 -403
- package/es/utils/authority.d.ts +0 -7
- package/es/utils/authority.js +0 -259
- package/es/utils/cacheAssist.d.ts +0 -85
- package/es/utils/cacheAssist.js +0 -317
- package/es/utils/constants.d.ts +0 -859
- package/es/utils/constants.js +0 -1540
- package/es/utils/core.d.ts +0 -25
- package/es/utils/core.js +0 -95
- package/es/utils/defaultSettingsSpecial.d.ts +0 -67
- package/es/utils/defaultSettingsSpecial.js +0 -53
- package/es/utils/developAssist.d.ts +0 -41
- package/es/utils/developAssist.js +0 -224
- package/es/utils/dva.d.ts +0 -31
- package/es/utils/dva.js +0 -54
- package/es/utils/globalModel.d.ts +0 -17
- package/es/utils/globalModel.js +0 -40
- package/es/utils/globalStorageAssist.d.ts +0 -78
- package/es/utils/globalStorageAssist.js +0 -239
- package/es/utils/localStorageAssist.d.ts +0 -47
- package/es/utils/localStorageAssist.js +0 -116
- package/es/utils/mediaDefault.d.ts +0 -11
- package/es/utils/mediaDefault.js +0 -24
- package/es/utils/proLayoutCollection.d.ts +0 -12
- package/es/utils/proLayoutCollection.js +0 -76
- package/es/utils/request.d.ts +0 -5
- package/es/utils/request.js +0 -243
- package/es/utils/requestAssistor.d.ts +0 -79
- package/es/utils/requestAssistor.js +0 -596
- package/es/utils/sessionStorageAssist.d.ts +0 -47
- package/es/utils/sessionStorageAssist.js +0 -116
- package/es/utils/tools.d.ts +0 -698
- package/es/utils/tools.js +0 -2205
- package/es/utils/typeCheck.d.ts +0 -21
- package/es/utils/typeCheck.js +0 -58
- package/es/utils/typeConvert.d.ts +0 -7
- package/es/utils/typeConvert.js +0 -16
- package/es/utils/utils.d.ts +0 -5
- package/es/utils/utils.js +0 -70
- package/es/utils/utils.less +0 -63
- package/es/utils/utils.test.d.ts +0 -1
- package/es/utils/virtualRequest.d.ts +0 -51
- package/es/utils/virtualRequest.js +0 -320
package/es/utils/tools.js
DELETED
|
@@ -1,2205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.arrayMove = arrayMove;
|
|
7
|
-
exports.arrayMoveMutate = arrayMoveMutate;
|
|
8
|
-
exports.buildFieldDescription = buildFieldDescription;
|
|
9
|
-
exports.buildFieldHelper = buildFieldHelper;
|
|
10
|
-
exports.calculateTimeInterval = calculateTimeInterval;
|
|
11
|
-
exports.checkDevelopment = checkDevelopment;
|
|
12
|
-
exports.checkExist = checkExist;
|
|
13
|
-
exports.checkFromConfig = checkFromConfig;
|
|
14
|
-
exports.checkLocalhost = checkLocalhost;
|
|
15
|
-
exports.clearSessionStorage = clearSessionStorage;
|
|
16
|
-
exports.cloneWithoutMethod = cloneWithoutMethod;
|
|
17
|
-
exports.convertTarget = convertTarget;
|
|
18
|
-
exports.copyToClipboard = copyToClipboard;
|
|
19
|
-
exports.corsTarget = corsTarget;
|
|
20
|
-
exports.dateToMoment = dateToMoment;
|
|
21
|
-
exports.decodeBase64 = decodeBase64;
|
|
22
|
-
exports.defaultBaseState = defaultBaseState;
|
|
23
|
-
exports.defaultCommonState = defaultCommonState;
|
|
24
|
-
exports.defaultCoreState = defaultCoreState;
|
|
25
|
-
exports.defaultFormState = defaultFormState;
|
|
26
|
-
exports.defaultListState = defaultListState;
|
|
27
|
-
exports.defaultPageListState = defaultPageListState;
|
|
28
|
-
exports.difference = difference;
|
|
29
|
-
exports.ellipsis = ellipsis;
|
|
30
|
-
exports.empty = empty;
|
|
31
|
-
exports.encodeBase64 = encodeBase64;
|
|
32
|
-
exports.endsWith = endsWith;
|
|
33
|
-
exports.evil = evil;
|
|
34
|
-
exports.filter = filter;
|
|
35
|
-
exports.find = find;
|
|
36
|
-
exports.findIndex = findIndex;
|
|
37
|
-
exports.fixedZero = fixedZero;
|
|
38
|
-
exports.formatDatetime = formatDatetime;
|
|
39
|
-
exports.formatDecimal = formatDecimal;
|
|
40
|
-
exports.formatMoney = formatMoney;
|
|
41
|
-
exports.formatMoneyToChinese = formatMoneyToChinese;
|
|
42
|
-
exports.formatTarget = formatTarget;
|
|
43
|
-
exports.getBrowserInfo = getBrowserInfo;
|
|
44
|
-
exports.getDerivedStateFromPropsForUrlParams = getDerivedStateFromPropsForUrlParams;
|
|
45
|
-
exports.getDerivedStateFromPropsForUrlParamsCore = getDerivedStateFromPropsForUrlParamsCore;
|
|
46
|
-
exports.getGuid = getGuid;
|
|
47
|
-
exports.getMomentNow = getMomentNow;
|
|
48
|
-
exports.getPathValue = getPathValue;
|
|
49
|
-
exports.getQueue = getQueue;
|
|
50
|
-
exports.getRandomColor = getRandomColor;
|
|
51
|
-
exports.getTimeDistance = getTimeDistance;
|
|
52
|
-
exports.getValue = getValue;
|
|
53
|
-
exports.getValueByKey = getValueByKey;
|
|
54
|
-
exports.goToPath = goToPath;
|
|
55
|
-
exports.inCollection = inCollection;
|
|
56
|
-
exports.isArray = isArray;
|
|
57
|
-
exports.isBoolean = isBoolean;
|
|
58
|
-
exports.isDate = isDate;
|
|
59
|
-
exports.isDatetime = isDatetime;
|
|
60
|
-
exports.isEqual = isEqual;
|
|
61
|
-
exports.isEqualBySerialize = isEqualBySerialize;
|
|
62
|
-
exports.isFunction = isFunction;
|
|
63
|
-
exports.isInvalid = isInvalid;
|
|
64
|
-
exports.isMoney = isMoney;
|
|
65
|
-
exports.isNull = isNull;
|
|
66
|
-
exports.isNumber = isNumber;
|
|
67
|
-
exports.isObject = isObject;
|
|
68
|
-
exports.isString = isString;
|
|
69
|
-
exports.isUndefined = isUndefined;
|
|
70
|
-
exports.lowerFirst = lowerFirst;
|
|
71
|
-
exports.notify = notify;
|
|
72
|
-
exports.notifyError = notifyError;
|
|
73
|
-
exports.notifyInfo = notifyInfo;
|
|
74
|
-
exports.notifySuccess = notifySuccess;
|
|
75
|
-
exports.notifyWarn = notifyWarn;
|
|
76
|
-
exports.numeralFormat = numeralFormat;
|
|
77
|
-
exports.queryStringParse = queryStringParse;
|
|
78
|
-
exports.queryStringify = queryStringify;
|
|
79
|
-
exports.recordDebug = recordDebug;
|
|
80
|
-
exports.recordError = recordError;
|
|
81
|
-
exports.recordInfo = recordInfo;
|
|
82
|
-
exports.recordLog = recordLog;
|
|
83
|
-
exports.recordObject = recordObject;
|
|
84
|
-
exports.recordText = recordText;
|
|
85
|
-
exports.recordWarn = recordWarn;
|
|
86
|
-
exports.redirectToPath = redirectToPath;
|
|
87
|
-
exports.refitCommonData = refitCommonData;
|
|
88
|
-
exports.refitFieldDecoratorOption = refitFieldDecoratorOption;
|
|
89
|
-
exports.removeEndMatch = removeEndMatch;
|
|
90
|
-
exports.removeFromArray = removeFromArray;
|
|
91
|
-
exports.removeLastMatch = removeLastMatch;
|
|
92
|
-
exports.replace = replace;
|
|
93
|
-
exports.replaceTargetText = replaceTargetText;
|
|
94
|
-
exports.requestAnimFrame = void 0;
|
|
95
|
-
exports.reverse = reverse;
|
|
96
|
-
exports.roundToTarget = roundToTarget;
|
|
97
|
-
exports.searchFromList = searchFromList;
|
|
98
|
-
exports.seededRandom = seededRandom;
|
|
99
|
-
exports.showError = showError;
|
|
100
|
-
exports.showErrorMessage = showErrorMessage;
|
|
101
|
-
exports.showInfoMessage = showInfoMessage;
|
|
102
|
-
exports.showLoadingMessage = showLoadingMessage;
|
|
103
|
-
exports.showMessage = showMessage;
|
|
104
|
-
exports.showOpenMessage = showOpenMessage;
|
|
105
|
-
exports.showRuntimeError = showRuntimeError;
|
|
106
|
-
exports.showSuccessMessage = showSuccessMessage;
|
|
107
|
-
exports.showWarnMessage = showWarnMessage;
|
|
108
|
-
exports.showWarningMessage = showWarningMessage;
|
|
109
|
-
exports.sortBy = sortBy;
|
|
110
|
-
exports.sortCollectionByKey = sortCollectionByKey;
|
|
111
|
-
exports.sortedUnique = sortedUnique;
|
|
112
|
-
exports.split = split;
|
|
113
|
-
exports.stringIsEmpty = stringIsEmpty;
|
|
114
|
-
exports.stringIsNullOrWhiteSpace = stringIsNullOrWhiteSpace;
|
|
115
|
-
exports.stringToMoment = stringToMoment;
|
|
116
|
-
exports.toDatetime = toDatetime;
|
|
117
|
-
exports.toMoment = toMoment;
|
|
118
|
-
exports.toMoney = toMoney;
|
|
119
|
-
exports.toNumber = toNumber;
|
|
120
|
-
exports.toPercentage = toPercentage;
|
|
121
|
-
exports.toString = toString;
|
|
122
|
-
exports.transformData = transformData;
|
|
123
|
-
exports.transformListData = transformListData;
|
|
124
|
-
exports.trim = trim;
|
|
125
|
-
exports.trySendNearestLocalhostNotify = trySendNearestLocalhostNotify;
|
|
126
|
-
exports.upperFirst = upperFirst;
|
|
127
|
-
|
|
128
|
-
require("antd/es/notification/style");
|
|
129
|
-
|
|
130
|
-
var _notification2 = _interopRequireDefault(require("antd/es/notification"));
|
|
131
|
-
|
|
132
|
-
require("antd/es/message/style");
|
|
133
|
-
|
|
134
|
-
var _message2 = _interopRequireDefault(require("antd/es/message"));
|
|
135
|
-
|
|
136
|
-
var _arrayMove = require("array-move");
|
|
137
|
-
|
|
138
|
-
var _copyToClipboard = _interopRequireDefault(require("copy-to-clipboard"));
|
|
139
|
-
|
|
140
|
-
var _lodash = require("lodash");
|
|
141
|
-
|
|
142
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
143
|
-
|
|
144
|
-
var _numeral = _interopRequireDefault(require("numeral"));
|
|
145
|
-
|
|
146
|
-
var _nzh = _interopRequireDefault(require("nzh"));
|
|
147
|
-
|
|
148
|
-
var _qs = require("qs");
|
|
149
|
-
|
|
150
|
-
var _queue = _interopRequireDefault(require("queue"));
|
|
151
|
-
|
|
152
|
-
var _randomcolor = _interopRequireDefault(require("randomcolor"));
|
|
153
|
-
|
|
154
|
-
var _umi = require("umi");
|
|
155
|
-
|
|
156
|
-
var _uuid = require("uuid");
|
|
157
|
-
|
|
158
|
-
var _appConfiguration = require("./appConfiguration");
|
|
159
|
-
|
|
160
|
-
var _constants = require("./constants");
|
|
161
|
-
|
|
162
|
-
var _core = require("./core");
|
|
163
|
-
|
|
164
|
-
var _developAssist = require("./developAssist");
|
|
165
|
-
|
|
166
|
-
var _typeCheck = require("./typeCheck");
|
|
167
|
-
|
|
168
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
169
|
-
|
|
170
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
171
|
-
|
|
172
|
-
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."); }
|
|
173
|
-
|
|
174
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
175
|
-
|
|
176
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
177
|
-
|
|
178
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
179
|
-
|
|
180
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
181
|
-
|
|
182
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
183
|
-
|
|
184
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
185
|
-
|
|
186
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
187
|
-
|
|
188
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
189
|
-
|
|
190
|
-
function defaultBaseState() {
|
|
191
|
-
return {
|
|
192
|
-
dataLoading: false,
|
|
193
|
-
processing: false,
|
|
194
|
-
reloading: false,
|
|
195
|
-
searching: false,
|
|
196
|
-
refreshing: false,
|
|
197
|
-
paging: false,
|
|
198
|
-
firstLoadSuccess: false,
|
|
199
|
-
loadSuccess: false,
|
|
200
|
-
urlParams: null,
|
|
201
|
-
externalData: null
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function defaultCoreState() {
|
|
206
|
-
var data = _objectSpread(_objectSpread({}, defaultBaseState()), {
|
|
207
|
-
dataLoading: true
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
return data;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
function defaultCommonState() {
|
|
214
|
-
var data = _objectSpread(_objectSpread({}, defaultCoreState()), {
|
|
215
|
-
loadApiPath: '',
|
|
216
|
-
pageName: '',
|
|
217
|
-
metaData: null,
|
|
218
|
-
metaExtra: null,
|
|
219
|
-
metaListData: [],
|
|
220
|
-
metaOriginalData: null
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
return data;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function defaultListState() {
|
|
227
|
-
var data = _objectSpread(_objectSpread({}, defaultCommonState()), {
|
|
228
|
-
dateRangeFieldName: '发生时间',
|
|
229
|
-
tableScroll: {
|
|
230
|
-
x: 1520
|
|
231
|
-
},
|
|
232
|
-
formValues: {},
|
|
233
|
-
pageNo: 1,
|
|
234
|
-
pageSize: 10,
|
|
235
|
-
startTimeAlias: '',
|
|
236
|
-
endTimeAlias: '',
|
|
237
|
-
startTime: '',
|
|
238
|
-
endTime: '',
|
|
239
|
-
listViewMode: _constants.listViewConfig.viewMode.table,
|
|
240
|
-
showSelect: false,
|
|
241
|
-
selectedDataTableDataRows: []
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
return data;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function defaultPageListState() {
|
|
248
|
-
var data = _objectSpread(_objectSpread({}, defaultCommonState()), {
|
|
249
|
-
paramsKey: '',
|
|
250
|
-
loadApiPath: '',
|
|
251
|
-
dateRangeFieldName: '发生时间',
|
|
252
|
-
tableScroll: {
|
|
253
|
-
x: 1520
|
|
254
|
-
},
|
|
255
|
-
formValues: {},
|
|
256
|
-
pageNo: 1,
|
|
257
|
-
pageSize: 10,
|
|
258
|
-
startTime: '',
|
|
259
|
-
endTime: '',
|
|
260
|
-
listViewMode: _constants.listViewConfig.viewMode.table,
|
|
261
|
-
showSelect: false,
|
|
262
|
-
selectedDataTableDataRows: []
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
return data;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
function defaultFormState() {
|
|
269
|
-
var data = _objectSpread(_objectSpread({}, defaultCommonState()), {
|
|
270
|
-
errorFieldName: '',
|
|
271
|
-
submitApiPath: ''
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
return data;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function getValue(obj) {
|
|
278
|
-
return Object.keys(obj).map(function (key) {
|
|
279
|
-
return obj[key];
|
|
280
|
-
}).join(',');
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* 复制到剪贴板
|
|
284
|
-
* @param {*} text
|
|
285
|
-
* @param {*} showText
|
|
286
|
-
*/
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
function copyToClipboard(text) {
|
|
290
|
-
var showCopyText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
291
|
-
var otherShowText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
292
|
-
(0, _copyToClipboard.default)(text);
|
|
293
|
-
|
|
294
|
-
if (showCopyText) {
|
|
295
|
-
_message2.default.success("\u5DF2\u7ECF\u5C06 ".concat(text, " \u590D\u5236\u5230\u526A\u8D34\u677F\uFF01"));
|
|
296
|
-
} else if (stringIsNullOrWhiteSpace(otherShowText)) {
|
|
297
|
-
_message2.default.success('已经复制到剪贴板!');
|
|
298
|
-
} else {
|
|
299
|
-
_message2.default.success("\u5DF2\u7ECF\u5C06".concat(otherShowText, "\u590D\u5236\u5230\u526A\u8D34\u677F\uFF01"));
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* 复制到剪贴板
|
|
304
|
-
* @param {*} text
|
|
305
|
-
*/
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
function stringIsEmpty(text) {
|
|
309
|
-
return (0, _lodash.isEmpty)(toString(text || '').replace(' ', ''));
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
*替换指定字符串
|
|
313
|
-
*
|
|
314
|
-
* @export
|
|
315
|
-
* @param {*} text
|
|
316
|
-
* @param {*} replaceText
|
|
317
|
-
* @param {*} beforeKeepNumber
|
|
318
|
-
* @param {*} afterKeepNumber
|
|
319
|
-
* @returns
|
|
320
|
-
*/
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
function replaceTargetText(text, replaceText, beforeKeepNumber, afterKeepNumber) {
|
|
324
|
-
var result = toString(text);
|
|
325
|
-
var textLength = (text || '').length;
|
|
326
|
-
|
|
327
|
-
if (textLength > 0 && (beforeKeepNumber >= 0 || afterKeepNumber >= 0)) {
|
|
328
|
-
if (beforeKeepNumber >= textLength || afterKeepNumber >= textLength || (beforeKeepNumber || 0) + (afterKeepNumber || 0) >= textLength) {
|
|
329
|
-
result = text;
|
|
330
|
-
} else {
|
|
331
|
-
var beforeKeep = text.substr(0, beforeKeepNumber);
|
|
332
|
-
var afterKeep = text.substr(textLength - afterKeepNumber, afterKeepNumber); // const replaceTargetLength = textLength - (beforeKeepNumber || 0) - (afterKeepNumber || 0);
|
|
333
|
-
// const replaceTarget = text.substring(
|
|
334
|
-
// (beforeKeepNumber || 0) <= 0 ? 0 : beforeKeepNumber - 1,
|
|
335
|
-
// textLength - (beforeKeepNumber || 0) - (afterKeepNumber || 0)
|
|
336
|
-
// );
|
|
337
|
-
// const replaced = [];
|
|
338
|
-
// let i = 1;
|
|
339
|
-
// while (i <= replaceTargetLength) {
|
|
340
|
-
// replaced.push(replaceText);
|
|
341
|
-
// i += 1;
|
|
342
|
-
// }
|
|
343
|
-
|
|
344
|
-
result = beforeKeep + replaceText + afterKeep;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return result || '';
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
function checkDevelopment() {
|
|
352
|
-
return process.env.NODE_ENV === 'development';
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* corsTarget
|
|
356
|
-
* 跨域域名配置
|
|
357
|
-
* @export
|
|
358
|
-
* @param {*} v
|
|
359
|
-
* @returns
|
|
360
|
-
*/
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
function corsTarget() {
|
|
364
|
-
var appInit = (0, _appConfiguration.getAppInitConfigData)();
|
|
365
|
-
var corsTargetDomain = '';
|
|
366
|
-
|
|
367
|
-
if (appInit.apiPrefix != null) {
|
|
368
|
-
if (appInit.apiPrefix.corsTargetDomain != null) {
|
|
369
|
-
var corsTargetDomainRemote = appInit.apiPrefix.corsTargetDomain;
|
|
370
|
-
corsTargetDomain = corsTargetDomainRemote;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
return corsTargetDomain;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
function goToPath(path) {
|
|
378
|
-
_umi.history.push(path);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
function redirectToPath(path) {
|
|
382
|
-
_umi.history.replace(path);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
function showError(text) {
|
|
386
|
-
showErrorMessage({
|
|
387
|
-
message: text
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
function showRuntimeError(_ref) {
|
|
392
|
-
var messageText = _ref.message,
|
|
393
|
-
_ref$showStack = _ref.showStack,
|
|
394
|
-
showStack = _ref$showStack === void 0 ? true : _ref$showStack;
|
|
395
|
-
|
|
396
|
-
try {
|
|
397
|
-
if (!stringIsNullOrWhiteSpace(messageText || '')) {
|
|
398
|
-
showErrorMessage({
|
|
399
|
-
message: messageText
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
if (showStack) {
|
|
404
|
-
throw new Error("".concat(stringIsNullOrWhiteSpace(messageText || '') ? '' : "".concat(toString(messageText), ","), "\u8C03\u7528\u5806\u6808:"));
|
|
405
|
-
}
|
|
406
|
-
} catch (e) {
|
|
407
|
-
// eslint-disable-next-line no-console
|
|
408
|
-
console.log(e.stack);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
function showSuccessMessage(_ref2) {
|
|
413
|
-
var _ref2$duration = _ref2.duration,
|
|
414
|
-
duration = _ref2$duration === void 0 ? 3 : _ref2$duration,
|
|
415
|
-
messageText = _ref2.message,
|
|
416
|
-
_ref2$onClose = _ref2.onClose,
|
|
417
|
-
onClose = _ref2$onClose === void 0 ? function () {} : _ref2$onClose;
|
|
418
|
-
showMessage({
|
|
419
|
-
type: _constants.messageTypeCollection.success,
|
|
420
|
-
message: messageText,
|
|
421
|
-
duration: duration,
|
|
422
|
-
onClose: onClose
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
function showErrorMessage(_ref3) {
|
|
427
|
-
var _ref3$duration = _ref3.duration,
|
|
428
|
-
duration = _ref3$duration === void 0 ? 3 : _ref3$duration,
|
|
429
|
-
messageText = _ref3.message,
|
|
430
|
-
_ref3$onClose = _ref3.onClose,
|
|
431
|
-
onClose = _ref3$onClose === void 0 ? function () {} : _ref3$onClose;
|
|
432
|
-
showMessage({
|
|
433
|
-
type: _constants.messageTypeCollection.error,
|
|
434
|
-
message: messageText,
|
|
435
|
-
duration: duration,
|
|
436
|
-
onClose: onClose
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
function showWarnMessage(_ref4) {
|
|
441
|
-
var _ref4$duration = _ref4.duration,
|
|
442
|
-
duration = _ref4$duration === void 0 ? 3 : _ref4$duration,
|
|
443
|
-
messageText = _ref4.message,
|
|
444
|
-
_ref4$onClose = _ref4.onClose,
|
|
445
|
-
onClose = _ref4$onClose === void 0 ? function () {} : _ref4$onClose;
|
|
446
|
-
showMessage({
|
|
447
|
-
type: _constants.messageTypeCollection.warn,
|
|
448
|
-
message: messageText,
|
|
449
|
-
duration: duration,
|
|
450
|
-
onClose: onClose
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* 显示警告信息框
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
function showWarningMessage(_ref5) {
|
|
459
|
-
var _ref5$duration = _ref5.duration,
|
|
460
|
-
duration = _ref5$duration === void 0 ? 3 : _ref5$duration,
|
|
461
|
-
messageText = _ref5.message,
|
|
462
|
-
_ref5$onClose = _ref5.onClose,
|
|
463
|
-
onClose = _ref5$onClose === void 0 ? function () {} : _ref5$onClose;
|
|
464
|
-
showMessage({
|
|
465
|
-
type: _constants.messageTypeCollection.warning,
|
|
466
|
-
message: messageText,
|
|
467
|
-
duration: duration,
|
|
468
|
-
onClose: onClose
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* 显示消息信息
|
|
473
|
-
*/
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
function showInfoMessage(_ref6) {
|
|
477
|
-
var _ref6$duration = _ref6.duration,
|
|
478
|
-
duration = _ref6$duration === void 0 ? 3 : _ref6$duration,
|
|
479
|
-
messageText = _ref6.message,
|
|
480
|
-
_ref6$onClose = _ref6.onClose,
|
|
481
|
-
onClose = _ref6$onClose === void 0 ? function () {} : _ref6$onClose;
|
|
482
|
-
showMessage({
|
|
483
|
-
type: _constants.messageTypeCollection.info,
|
|
484
|
-
message: messageText,
|
|
485
|
-
duration: duration,
|
|
486
|
-
onClose: onClose
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
function showLoadingMessage(_ref7) {
|
|
491
|
-
var _ref7$duration = _ref7.duration,
|
|
492
|
-
duration = _ref7$duration === void 0 ? 3 : _ref7$duration,
|
|
493
|
-
messageText = _ref7.message,
|
|
494
|
-
_ref7$onClose = _ref7.onClose,
|
|
495
|
-
onClose = _ref7$onClose === void 0 ? function () {} : _ref7$onClose;
|
|
496
|
-
showMessage({
|
|
497
|
-
type: _constants.messageTypeCollection.loading,
|
|
498
|
-
message: messageText,
|
|
499
|
-
duration: duration,
|
|
500
|
-
onClose: onClose
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
function showOpenMessage(_ref8) {
|
|
505
|
-
var _ref8$duration = _ref8.duration,
|
|
506
|
-
duration = _ref8$duration === void 0 ? 3 : _ref8$duration,
|
|
507
|
-
messageText = _ref8.message,
|
|
508
|
-
_ref8$onClose = _ref8.onClose,
|
|
509
|
-
onClose = _ref8$onClose === void 0 ? function () {} : _ref8$onClose;
|
|
510
|
-
showMessage({
|
|
511
|
-
type: _constants.messageTypeCollection.open,
|
|
512
|
-
message: messageText,
|
|
513
|
-
duration: duration,
|
|
514
|
-
onClose: onClose
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
function showMessage(_ref9) {
|
|
519
|
-
var type = _ref9.type,
|
|
520
|
-
_ref9$duration = _ref9.duration,
|
|
521
|
-
duration = _ref9$duration === void 0 ? 3 : _ref9$duration,
|
|
522
|
-
messageText = _ref9.message,
|
|
523
|
-
_ref9$onClose = _ref9.onClose,
|
|
524
|
-
onClose = _ref9$onClose === void 0 ? function () {} : _ref9$onClose;
|
|
525
|
-
requestAnimationFrame(function () {
|
|
526
|
-
switch (type) {
|
|
527
|
-
case _constants.messageTypeCollection.success:
|
|
528
|
-
_message2.default.success(messageText, duration, onClose);
|
|
529
|
-
|
|
530
|
-
break;
|
|
531
|
-
|
|
532
|
-
case _constants.messageTypeCollection.error:
|
|
533
|
-
_message2.default.warn(messageText, duration, onClose);
|
|
534
|
-
|
|
535
|
-
break;
|
|
536
|
-
|
|
537
|
-
case _constants.messageTypeCollection.info:
|
|
538
|
-
_message2.default.info(messageText, duration, onClose);
|
|
539
|
-
|
|
540
|
-
break;
|
|
541
|
-
|
|
542
|
-
case _constants.messageTypeCollection.warning:
|
|
543
|
-
_message2.default.warning(messageText, duration, onClose);
|
|
544
|
-
|
|
545
|
-
break;
|
|
546
|
-
|
|
547
|
-
case _constants.messageTypeCollection.warn:
|
|
548
|
-
_message2.default.warn(messageText, duration, onClose);
|
|
549
|
-
|
|
550
|
-
break;
|
|
551
|
-
|
|
552
|
-
case _constants.messageTypeCollection.loading:
|
|
553
|
-
_message2.default.loading(messageText, duration, onClose);
|
|
554
|
-
|
|
555
|
-
break;
|
|
556
|
-
|
|
557
|
-
default:
|
|
558
|
-
_message2.default.open(messageText, duration, onClose);
|
|
559
|
-
|
|
560
|
-
break;
|
|
561
|
-
}
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* 获取Guid
|
|
566
|
-
*
|
|
567
|
-
* @export
|
|
568
|
-
* @param {*} v
|
|
569
|
-
* @returns
|
|
570
|
-
*/
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
function getGuid() {
|
|
574
|
-
return (0, _uuid.v4)();
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* 检测目标是否在数组址之中
|
|
578
|
-
*/
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
function inCollection(collection, value) {
|
|
582
|
-
return (0, _core.inCollection)(collection, value);
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* 格式化时间
|
|
586
|
-
*
|
|
587
|
-
* @export
|
|
588
|
-
* @param {*} v
|
|
589
|
-
* @returns
|
|
590
|
-
*/
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
function isInvalid(v) {
|
|
594
|
-
return typeof v === 'undefined';
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
function toDatetime(v) {
|
|
598
|
-
if ((v || null) == null) {
|
|
599
|
-
return null;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
if (isDate(v)) {
|
|
603
|
-
return v;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
if (isString(v)) {
|
|
607
|
-
var i = v.indexOf('T');
|
|
608
|
-
|
|
609
|
-
if (i < 0) {
|
|
610
|
-
// eslint-disable-next-line no-useless-escape
|
|
611
|
-
var value = v.replace(/\-/g, '/');
|
|
612
|
-
var result = new Date(value);
|
|
613
|
-
return result;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
return new Date(v);
|
|
618
|
-
}
|
|
619
|
-
/**
|
|
620
|
-
* 格式化时间
|
|
621
|
-
*
|
|
622
|
-
* @export
|
|
623
|
-
* @param {*} v
|
|
624
|
-
* @returns
|
|
625
|
-
*/
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
function formatDatetime(_ref10) {
|
|
629
|
-
var data = _ref10.data,
|
|
630
|
-
_ref10$format = _ref10.format,
|
|
631
|
-
format = _ref10$format === void 0 ? _constants.datetimeFormat.yearMonthDayHourMinuteSecond : _ref10$format,
|
|
632
|
-
_ref10$defaultValue = _ref10.defaultValue,
|
|
633
|
-
defaultValue = _ref10$defaultValue === void 0 ? '' : _ref10$defaultValue,
|
|
634
|
-
_ref10$timeZone = _ref10.timeZone,
|
|
635
|
-
timeZone = _ref10$timeZone === void 0 ? 8 : _ref10$timeZone;
|
|
636
|
-
|
|
637
|
-
if ((data || '') === '') {
|
|
638
|
-
return defaultValue;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
var m = (0, _moment.default)(_typeof(data) === 'object' ? data : new Date(data.replace('/', '-'))).utcOffset(timeZone);
|
|
642
|
-
|
|
643
|
-
if (m.isSame(_constants.emptyDatetime)) {
|
|
644
|
-
return defaultValue;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
return m.format(format);
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* 格式化数字
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
function numeralFormat(v, formatString) {
|
|
655
|
-
return (0, _numeral.default)(v).format(formatString);
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* 当前Moment时间
|
|
659
|
-
*
|
|
660
|
-
* @export
|
|
661
|
-
* @param {*} v
|
|
662
|
-
* @returns
|
|
663
|
-
*/
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
function getMomentNow() {
|
|
667
|
-
var timeZone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;
|
|
668
|
-
return (0, _moment.default)().utcOffset(timeZone);
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* 转化为Moment时间
|
|
672
|
-
*
|
|
673
|
-
* @export
|
|
674
|
-
* @param {*} v
|
|
675
|
-
* @returns
|
|
676
|
-
*/
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
function toMoment(_ref11) {
|
|
680
|
-
var data = _ref11.data,
|
|
681
|
-
_ref11$timeZone = _ref11.timeZone,
|
|
682
|
-
timeZone = _ref11$timeZone === void 0 ? 8 : _ref11$timeZone;
|
|
683
|
-
|
|
684
|
-
if (isString(data)) {
|
|
685
|
-
return stringToMoment({
|
|
686
|
-
data: data,
|
|
687
|
-
timeZone: timeZone
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
if (isDate(data)) {
|
|
692
|
-
return dateToMoment({
|
|
693
|
-
data: data,
|
|
694
|
-
timeZone: timeZone
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
throw new Error('toMoment only support string and date');
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
* 转化为Moment时间
|
|
702
|
-
*
|
|
703
|
-
* @export
|
|
704
|
-
* @param {*} v
|
|
705
|
-
* @returns
|
|
706
|
-
*/
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
function stringToMoment(_ref12) {
|
|
710
|
-
var data = _ref12.data,
|
|
711
|
-
_ref12$timeZone = _ref12.timeZone,
|
|
712
|
-
timeZone = _ref12$timeZone === void 0 ? 8 : _ref12$timeZone;
|
|
713
|
-
if (_moment.default.isMoment(data)) return data;
|
|
714
|
-
var d = (data || '').toString();
|
|
715
|
-
|
|
716
|
-
if (stringIsNullOrWhiteSpace(d)) {
|
|
717
|
-
return null;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
return (0, _moment.default)(new Date(d.replace('/', '-'))).utcOffset(timeZone);
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* 转化为Moment时间
|
|
724
|
-
*
|
|
725
|
-
* @export
|
|
726
|
-
* @param {*} v
|
|
727
|
-
* @returns
|
|
728
|
-
*/
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
function dateToMoment(_ref13) {
|
|
732
|
-
var data = _ref13.data,
|
|
733
|
-
_ref13$timeZone = _ref13.timeZone,
|
|
734
|
-
timeZone = _ref13$timeZone === void 0 ? 8 : _ref13$timeZone;
|
|
735
|
-
var m = (0, _moment.default)(data).utcOffset(timeZone);
|
|
736
|
-
|
|
737
|
-
if (m.isSame(_constants.emptyDatetime)) {
|
|
738
|
-
return null;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
return m;
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* 判断是否是时间字符串
|
|
745
|
-
*
|
|
746
|
-
* @export
|
|
747
|
-
* @param {*} v
|
|
748
|
-
* @returns
|
|
749
|
-
*/
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
function isDatetime(v) {
|
|
753
|
-
var date = "".concat(typeof v === 'undefined' ? null : v);
|
|
754
|
-
var result = date.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
|
|
755
|
-
|
|
756
|
-
if (result == null) {
|
|
757
|
-
return false;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
var d = new Date(result[1], result[3] - 1, result[4]);
|
|
761
|
-
return d.getFullYear() === parseInt(result[1], 10) && d.getMonth() + 1 === parseInt(result[3], 10) && d.getDate() === parseInt(result[4], 10);
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* 判断是否是数字字符串
|
|
765
|
-
*
|
|
766
|
-
* @export
|
|
767
|
-
* @param {*} str
|
|
768
|
-
* @returns
|
|
769
|
-
*/
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
function isNumber(v) {
|
|
773
|
-
return (0, _typeCheck.isNumber)(v);
|
|
774
|
-
}
|
|
775
|
-
/**
|
|
776
|
-
* 转换为数字
|
|
777
|
-
*
|
|
778
|
-
* @export
|
|
779
|
-
* @param {*} str
|
|
780
|
-
* @returns
|
|
781
|
-
*/
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
function toNumber(v) {
|
|
785
|
-
var value = (0, _lodash.toNumber)(v);
|
|
786
|
-
return Number.isNaN(value) ? 0 : value;
|
|
787
|
-
}
|
|
788
|
-
/**
|
|
789
|
-
* 转换为数字
|
|
790
|
-
*
|
|
791
|
-
* @export
|
|
792
|
-
* @param {*} str
|
|
793
|
-
* @returns
|
|
794
|
-
*/
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
function split(source, separator) {
|
|
798
|
-
var limit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
|
|
799
|
-
return (0, _lodash.split)(source, separator, limit);
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
* 转换为文本
|
|
803
|
-
*
|
|
804
|
-
* @export
|
|
805
|
-
* @param {*} str
|
|
806
|
-
* @returns
|
|
807
|
-
*/
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
function toString(value) {
|
|
811
|
-
return (0, _lodash.toString)(value);
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* 去除重复数据并排序(升序)
|
|
815
|
-
*/
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
function sortedUnique(array) {
|
|
819
|
-
return (0, _lodash.sortedUniq)(array);
|
|
820
|
-
}
|
|
821
|
-
/**
|
|
822
|
-
*
|
|
823
|
-
*@param val 值 len保留小数位数
|
|
824
|
-
*
|
|
825
|
-
*/
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
function roundToTarget(v, len) {
|
|
829
|
-
if (!isMoney(v)) {
|
|
830
|
-
return 0;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
var temp = Math.pow(10, len);
|
|
834
|
-
return Math.round(toMoney(v) * temp) / temp;
|
|
835
|
-
}
|
|
836
|
-
/**
|
|
837
|
-
* 判断是否是数字字符串
|
|
838
|
-
*
|
|
839
|
-
* @export
|
|
840
|
-
* @param {*} str
|
|
841
|
-
* @returns
|
|
842
|
-
*/
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
function isMoney(v) {
|
|
846
|
-
var str = "".concat(typeof v === 'undefined' ? null : v);
|
|
847
|
-
|
|
848
|
-
if (str === '') {
|
|
849
|
-
return false;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
var regular = /^([1-9][\d]{0,15}|0)(\.[\d]{1,2})?$/;
|
|
853
|
-
var re = new RegExp(regular);
|
|
854
|
-
return re.test(str);
|
|
855
|
-
}
|
|
856
|
-
/**
|
|
857
|
-
* 转换为数字
|
|
858
|
-
*
|
|
859
|
-
* @export
|
|
860
|
-
* @param {*} str
|
|
861
|
-
* @returns
|
|
862
|
-
*/
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
function toMoney(v) {
|
|
866
|
-
if (isMoney(v)) {
|
|
867
|
-
return parseFloat(v, 10);
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
return 0;
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* 通过 key 获取对应得值
|
|
874
|
-
*/
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
function getValueByKey(_ref14) {
|
|
878
|
-
var data = _ref14.data,
|
|
879
|
-
key = _ref14.key,
|
|
880
|
-
_ref14$defaultValue = _ref14.defaultValue,
|
|
881
|
-
defaultValue = _ref14$defaultValue === void 0 ? null : _ref14$defaultValue,
|
|
882
|
-
_ref14$convert = _ref14.convert,
|
|
883
|
-
convert = _ref14$convert === void 0 ? null : _ref14$convert,
|
|
884
|
-
_ref14$convertBuilder = _ref14.convertBuilder,
|
|
885
|
-
convertBuilder = _ref14$convertBuilder === void 0 ? null : _ref14$convertBuilder,
|
|
886
|
-
_ref14$format = _ref14.format,
|
|
887
|
-
format = _ref14$format === void 0 ? null : _ref14$format,
|
|
888
|
-
_ref14$formatBuilder = _ref14.formatBuilder,
|
|
889
|
-
formatBuilder = _ref14$formatBuilder === void 0 ? null : _ref14$formatBuilder;
|
|
890
|
-
var v = getPathValue(data, key, defaultValue);
|
|
891
|
-
var result = v;
|
|
892
|
-
|
|
893
|
-
if ((convertBuilder || null) != null || (convert || null) != null) {
|
|
894
|
-
if (isFunction(convertBuilder)) {
|
|
895
|
-
result = convertTarget({
|
|
896
|
-
target: v,
|
|
897
|
-
convert: convertBuilder
|
|
898
|
-
});
|
|
899
|
-
} else {
|
|
900
|
-
result = convertTarget({
|
|
901
|
-
target: v,
|
|
902
|
-
convert: convert
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
if ((formatBuilder || null) != null || (format || null) != null) {
|
|
908
|
-
if (isFunction(formatBuilder)) {
|
|
909
|
-
result = formatTarget({
|
|
910
|
-
target: result,
|
|
911
|
-
format: formatBuilder
|
|
912
|
-
});
|
|
913
|
-
} else {
|
|
914
|
-
result = formatTarget({
|
|
915
|
-
target: result,
|
|
916
|
-
format: format
|
|
917
|
-
});
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
return result;
|
|
922
|
-
}
|
|
923
|
-
/**
|
|
924
|
-
* convertTarget
|
|
925
|
-
* @param {*} param0
|
|
926
|
-
* @returns
|
|
927
|
-
*/
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
function convertTarget(_ref15) {
|
|
931
|
-
var target = _ref15.target,
|
|
932
|
-
convert = _ref15.convert;
|
|
933
|
-
|
|
934
|
-
if (isFunction(convert)) {
|
|
935
|
-
return convert(target);
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
if (isString(convert)) {
|
|
939
|
-
switch (convert) {
|
|
940
|
-
case _constants.convertCollection.number:
|
|
941
|
-
return toNumber(target);
|
|
942
|
-
|
|
943
|
-
case _constants.convertCollection.datetime:
|
|
944
|
-
return toDatetime(target);
|
|
945
|
-
|
|
946
|
-
case _constants.convertCollection.string:
|
|
947
|
-
return toString(target);
|
|
948
|
-
|
|
949
|
-
case _constants.convertCollection.moment:
|
|
950
|
-
return toMoment({
|
|
951
|
-
data: toString(target)
|
|
952
|
-
});
|
|
953
|
-
|
|
954
|
-
case _constants.convertCollection.money:
|
|
955
|
-
return toMoney(target);
|
|
956
|
-
|
|
957
|
-
case _constants.convertCollection.array:
|
|
958
|
-
return (target || null) == null ? [] : isArray(target) ? target : [target];
|
|
959
|
-
|
|
960
|
-
default:
|
|
961
|
-
return target;
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
return target;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
function formatTarget(_ref16) {
|
|
969
|
-
var target = _ref16.target,
|
|
970
|
-
format = _ref16.format,
|
|
971
|
-
_ref16$option = _ref16.option,
|
|
972
|
-
option = _ref16$option === void 0 ? {} : _ref16$option;
|
|
973
|
-
|
|
974
|
-
if (isFunction(format)) {
|
|
975
|
-
return format(target);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
if (isString(format)) {
|
|
979
|
-
switch (format) {
|
|
980
|
-
case _constants.formatCollection.money:
|
|
981
|
-
return formatMoney(target);
|
|
982
|
-
|
|
983
|
-
case _constants.formatCollection.datetime:
|
|
984
|
-
return formatDatetime({
|
|
985
|
-
data: target
|
|
986
|
-
});
|
|
987
|
-
|
|
988
|
-
case _constants.formatCollection.chineseMoney:
|
|
989
|
-
return formatMoneyToChinese({
|
|
990
|
-
target: target,
|
|
991
|
-
option: option
|
|
992
|
-
});
|
|
993
|
-
|
|
994
|
-
case _constants.formatCollection.percentage:
|
|
995
|
-
return "".concat(roundToTarget(target * 100, 1), "%");
|
|
996
|
-
|
|
997
|
-
default:
|
|
998
|
-
return target;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
return target;
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* 通过 path 获取对应得值
|
|
1006
|
-
*/
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
function getPathValue(o, path) {
|
|
1010
|
-
var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
1011
|
-
|
|
1012
|
-
if (isUndefined(o)) {
|
|
1013
|
-
return null || defaultValue;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
if (o == null) {
|
|
1017
|
-
return null || defaultValue;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
if (!isString(path)) {
|
|
1021
|
-
recordError({
|
|
1022
|
-
path: path
|
|
1023
|
-
});
|
|
1024
|
-
var text = 'getPathValue Function param path must be string';
|
|
1025
|
-
showRuntimeError({
|
|
1026
|
-
message: text
|
|
1027
|
-
});
|
|
1028
|
-
return null;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
var v = (0, _lodash.get)(o, path, defaultValue);
|
|
1032
|
-
|
|
1033
|
-
if (isUndefined(defaultValue) || isNull(defaultValue)) {
|
|
1034
|
-
return v;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
return v || defaultValue;
|
|
1038
|
-
}
|
|
1039
|
-
/**
|
|
1040
|
-
*计算时间间隔
|
|
1041
|
-
* @param {startTime} 起始时间
|
|
1042
|
-
* @param {endTime} 结束时间
|
|
1043
|
-
*/
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
function calculateTimeInterval(startTime, endTime) {
|
|
1047
|
-
var timeBegin = startTime.getTime();
|
|
1048
|
-
var timeEnd = endTime.getTime();
|
|
1049
|
-
var total = (timeEnd - timeBegin) / 1000;
|
|
1050
|
-
var day = parseInt(total / (24 * 60 * 60)); //计算整数天数
|
|
1051
|
-
|
|
1052
|
-
var afterDay = total - day * 24 * 60 * 60; //取得算出天数后剩余的秒数
|
|
1053
|
-
|
|
1054
|
-
var hour = parseInt(afterDay / (60 * 60)); //计算整数小时数
|
|
1055
|
-
|
|
1056
|
-
var afterHour = total - day * 24 * 60 * 60 - hour * 60 * 60; //取得算出小时数后剩余的秒数
|
|
1057
|
-
|
|
1058
|
-
var min = parseInt(afterHour / 60); //计算整数分
|
|
1059
|
-
|
|
1060
|
-
var afterMin = total - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60; //取得算出分后剩余的秒数
|
|
1061
|
-
|
|
1062
|
-
return {
|
|
1063
|
-
day: day,
|
|
1064
|
-
hour: hour,
|
|
1065
|
-
minute: min,
|
|
1066
|
-
second: afterMin
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
/**
|
|
1070
|
-
* 格式化货币
|
|
1071
|
-
*
|
|
1072
|
-
* @export
|
|
1073
|
-
* @param {*} str
|
|
1074
|
-
* @returns
|
|
1075
|
-
*/
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
function formatDecimal(numberSource) {
|
|
1079
|
-
var placesSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
1080
|
-
var thousandSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ',';
|
|
1081
|
-
var decimalSource = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';
|
|
1082
|
-
return formatMoney(numberSource, placesSource, '', thousandSource, decimalSource);
|
|
1083
|
-
}
|
|
1084
|
-
/**
|
|
1085
|
-
* 格式化货币
|
|
1086
|
-
*
|
|
1087
|
-
* @export
|
|
1088
|
-
* @param {*} str
|
|
1089
|
-
* @returns
|
|
1090
|
-
*/
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
function formatMoney(numberSource) {
|
|
1094
|
-
var symbolSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '¥';
|
|
1095
|
-
var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0,0.00';
|
|
1096
|
-
return "".concat(symbolSource).concat((0, _numeral.default)(numberSource).format(format));
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
function toPercentage(val) {
|
|
1100
|
-
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0,0.00';
|
|
1101
|
-
return "".concat((0, _numeral.default)(toNumber((0, _numeral.default)(val).value() * 1000) / 10).format(format), "%");
|
|
1102
|
-
}
|
|
1103
|
-
/**
|
|
1104
|
-
* 检查字符串string是否以给定的target字符串结尾
|
|
1105
|
-
*/
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
function endsWith(source, target, position) {
|
|
1109
|
-
return (0, _lodash.endsWith)(source, target, position);
|
|
1110
|
-
}
|
|
1111
|
-
/**
|
|
1112
|
-
* 如果字符串末尾匹配目标字符串,则从源字符串末尾移除匹配项
|
|
1113
|
-
*/
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
function removeEndMatch(source, target) {
|
|
1117
|
-
if (!isString(source)) {
|
|
1118
|
-
throw new Error('removeEndMatch only use for string source');
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
if (!isString(target)) {
|
|
1122
|
-
throw new Error('removeEndMatch only use for string target');
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
if (stringIsNullOrWhiteSpace(source)) {
|
|
1126
|
-
return source;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
if (stringIsNullOrWhiteSpace(target)) {
|
|
1130
|
-
return source;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
var lastIndex = source.lastIndexOf(target);
|
|
1134
|
-
|
|
1135
|
-
if (lastIndex >= 0 && source.length === lastIndex + target.length) {
|
|
1136
|
-
return source.substr(lastIndex, target.length);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
return source;
|
|
1140
|
-
}
|
|
1141
|
-
/**
|
|
1142
|
-
* 从源字符串移除最后一个匹配项
|
|
1143
|
-
*/
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
function removeLastMatch(source, target) {
|
|
1147
|
-
if (!isString(source)) {
|
|
1148
|
-
throw new Error('removeEndMatch only use for string source');
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
if (!isString(target)) {
|
|
1152
|
-
throw new Error('removeEndMatch only use for string target');
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
if (stringIsNullOrWhiteSpace(source)) {
|
|
1156
|
-
return source;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
if (stringIsNullOrWhiteSpace(target)) {
|
|
1160
|
-
return source;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
var lastIndex = source.lastIndexOf(target);
|
|
1164
|
-
|
|
1165
|
-
if (lastIndex >= 0) {
|
|
1166
|
-
return source.substr(lastIndex, target.length);
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
return source;
|
|
1170
|
-
}
|
|
1171
|
-
/**
|
|
1172
|
-
* 转换金额为人民币大写
|
|
1173
|
-
*
|
|
1174
|
-
* @export
|
|
1175
|
-
* @param {*} target 转换的目标
|
|
1176
|
-
* @param {*} option 转换配置, 参看Nzh包
|
|
1177
|
-
* @returns
|
|
1178
|
-
*/
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
function formatMoneyToChinese(_ref17) {
|
|
1182
|
-
var target = _ref17.target,
|
|
1183
|
-
_ref17$option = _ref17.option,
|
|
1184
|
-
option = _ref17$option === void 0 ? {} : _ref17$option;
|
|
1185
|
-
|
|
1186
|
-
var o = _objectSpread(_objectSpread({}, {
|
|
1187
|
-
mode: 'cn',
|
|
1188
|
-
complete: false,
|
|
1189
|
-
outSymbol: true
|
|
1190
|
-
}), option || {});
|
|
1191
|
-
|
|
1192
|
-
var mode = o.mode;
|
|
1193
|
-
var nzhLocal = _nzh.default.cn;
|
|
1194
|
-
|
|
1195
|
-
switch (mode) {
|
|
1196
|
-
case 'hk':
|
|
1197
|
-
nzhLocal = _nzh.default.hk;
|
|
1198
|
-
break;
|
|
1199
|
-
|
|
1200
|
-
default:
|
|
1201
|
-
break;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
return nzhLocal.toMoney(target, o);
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
function seededRandom(_ref18) {
|
|
1208
|
-
var seed = _ref18.seed,
|
|
1209
|
-
min = _ref18.min,
|
|
1210
|
-
max = _ref18.max;
|
|
1211
|
-
var maxValue = max || 1;
|
|
1212
|
-
var minValue = min || 0;
|
|
1213
|
-
var seedValue = (seed * 9301 + 49297) % 233280;
|
|
1214
|
-
var rnd = seedValue / 233280.0;
|
|
1215
|
-
return minValue + rnd * (maxValue - minValue);
|
|
1216
|
-
}
|
|
1217
|
-
/**
|
|
1218
|
-
* 通过种子等配置返回随机颜色值
|
|
1219
|
-
*
|
|
1220
|
-
* @export
|
|
1221
|
-
* @param {*} seed
|
|
1222
|
-
* @returns
|
|
1223
|
-
*/
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
function getRandomColor(_ref19) {
|
|
1227
|
-
var seed = _ref19.seed,
|
|
1228
|
-
_ref19$hue = _ref19.hue,
|
|
1229
|
-
hue = _ref19$hue === void 0 ? null : _ref19$hue,
|
|
1230
|
-
_ref19$luminosity = _ref19.luminosity,
|
|
1231
|
-
luminosity = _ref19$luminosity === void 0 ? null : _ref19$luminosity,
|
|
1232
|
-
_ref19$count = _ref19.count,
|
|
1233
|
-
count = _ref19$count === void 0 ? null : _ref19$count,
|
|
1234
|
-
_ref19$format = _ref19.format,
|
|
1235
|
-
format = _ref19$format === void 0 ? null : _ref19$format,
|
|
1236
|
-
_ref19$alpha = _ref19.alpha,
|
|
1237
|
-
alpha = _ref19$alpha === void 0 ? null : _ref19$alpha;
|
|
1238
|
-
return (0, _randomcolor.default)({
|
|
1239
|
-
seed: seed,
|
|
1240
|
-
hue: hue,
|
|
1241
|
-
luminosity: luminosity,
|
|
1242
|
-
count: count,
|
|
1243
|
-
format: format,
|
|
1244
|
-
alpha: alpha
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
function getBrowserInfoCore() {
|
|
1249
|
-
var getBrowserVersion = function getBrowserVersion() {
|
|
1250
|
-
var u = navigator.userAgent;
|
|
1251
|
-
return {
|
|
1252
|
-
// 移动终端浏览器版本信息
|
|
1253
|
-
trident: u.indexOf('Trident') > -1,
|
|
1254
|
-
// IE内核
|
|
1255
|
-
presto: u.indexOf('Presto') > -1,
|
|
1256
|
-
// opera内核
|
|
1257
|
-
webKit: u.indexOf('AppleWebKit') > -1,
|
|
1258
|
-
// 苹果、谷歌内核
|
|
1259
|
-
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') === -1,
|
|
1260
|
-
// 火狐内核
|
|
1261
|
-
mobile: !!u.match(/AppleWebKit.*Mobile.*/),
|
|
1262
|
-
// 是否为移动终端
|
|
1263
|
-
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
|
1264
|
-
// ios终端
|
|
1265
|
-
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
|
|
1266
|
-
// android 终端或uc浏览器
|
|
1267
|
-
iPhone: u.indexOf('iPhone') > -1,
|
|
1268
|
-
// 是否为 iPhone 或者 QQHD 浏览器
|
|
1269
|
-
iPad: u.indexOf('iPad') > -1,
|
|
1270
|
-
// 是否iPad
|
|
1271
|
-
webApp: u.indexOf('Safari') === -1 // 是否web应该程序,没有头部与底部
|
|
1272
|
-
|
|
1273
|
-
};
|
|
1274
|
-
};
|
|
1275
|
-
|
|
1276
|
-
return {
|
|
1277
|
-
versions: getBrowserVersion(),
|
|
1278
|
-
language: (navigator.browserLanguage || navigator.language).toLowerCase()
|
|
1279
|
-
};
|
|
1280
|
-
}
|
|
1281
|
-
/**
|
|
1282
|
-
* 获取浏览器信息
|
|
1283
|
-
*
|
|
1284
|
-
* @export
|
|
1285
|
-
* @returns
|
|
1286
|
-
*/
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
function getBrowserInfo() {
|
|
1290
|
-
return getBrowserInfoCore();
|
|
1291
|
-
}
|
|
1292
|
-
/**
|
|
1293
|
-
* 封装表单项配置
|
|
1294
|
-
*
|
|
1295
|
-
* @export
|
|
1296
|
-
* @param {*} v
|
|
1297
|
-
* @param {*} justice
|
|
1298
|
-
* @param {*} defaultValue
|
|
1299
|
-
* @param {*} originalOption
|
|
1300
|
-
* @param {*} convertCallback
|
|
1301
|
-
*/
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
function refitFieldDecoratorOption(v, justice, defaultValue, originalOption, convertCallback) {
|
|
1305
|
-
var result = originalOption;
|
|
1306
|
-
var justiceV = typeof justice !== 'undefined' && justice !== null;
|
|
1307
|
-
var defaultV = typeof defaultValue === 'undefined' ? null : defaultValue;
|
|
1308
|
-
|
|
1309
|
-
if (justiceV) {
|
|
1310
|
-
if (typeof convertValue === 'function') {
|
|
1311
|
-
result.initialValue = convertCallback(v) || defaultV;
|
|
1312
|
-
} else {
|
|
1313
|
-
result.initialValue = v || defaultV;
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
return result;
|
|
1318
|
-
}
|
|
1319
|
-
/**
|
|
1320
|
-
* 封装公共数据
|
|
1321
|
-
*
|
|
1322
|
-
* @export 数据集合
|
|
1323
|
-
* @param {*} listData 源数据集合
|
|
1324
|
-
* @param {*} empty 要添加的首个数据
|
|
1325
|
-
* @param {*} otherListData 要添加的其他数据集合
|
|
1326
|
-
* @returns 封装后的数据集合
|
|
1327
|
-
*/
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
function refitCommonData(listData, empty, otherListData) {
|
|
1331
|
-
var result = [];
|
|
1332
|
-
|
|
1333
|
-
if (typeof listData !== 'undefined') {
|
|
1334
|
-
if (listData !== null) {
|
|
1335
|
-
result = _toConsumableArray(listData);
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
if (typeof otherListData !== 'undefined') {
|
|
1340
|
-
if (otherListData !== null) {
|
|
1341
|
-
result = [].concat(_toConsumableArray(result), _toConsumableArray(otherListData));
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
if (typeof empty !== 'undefined') {
|
|
1346
|
-
if (empty !== null) {
|
|
1347
|
-
result = [empty].concat(_toConsumableArray(result));
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
return result;
|
|
1352
|
-
}
|
|
1353
|
-
/**
|
|
1354
|
-
* 计算表达式的值
|
|
1355
|
-
*
|
|
1356
|
-
* @export
|
|
1357
|
-
* @param {*} fn
|
|
1358
|
-
* @returns
|
|
1359
|
-
*/
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
function evil(fn) {
|
|
1363
|
-
// 一个变量指向Function,防止有些前端编译工具报错
|
|
1364
|
-
var Fn = Function;
|
|
1365
|
-
return new Fn("return ".concat(fn))();
|
|
1366
|
-
}
|
|
1367
|
-
/**
|
|
1368
|
-
* 搜索集合中的匹配项
|
|
1369
|
-
*
|
|
1370
|
-
* @export
|
|
1371
|
-
* @param {*} itemKey
|
|
1372
|
-
* @param {*} itemValue
|
|
1373
|
-
* @param {*} sourceData
|
|
1374
|
-
* @returns
|
|
1375
|
-
*/
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
function searchFromList(itemKey, itemValue, sourceData) {
|
|
1379
|
-
var d = sourceData || [];
|
|
1380
|
-
var result = null;
|
|
1381
|
-
|
|
1382
|
-
if (itemValue == null) {
|
|
1383
|
-
return result;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
d.forEach(function (o) {
|
|
1387
|
-
if (o[itemKey] === itemValue) {
|
|
1388
|
-
result = o;
|
|
1389
|
-
}
|
|
1390
|
-
});
|
|
1391
|
-
return result;
|
|
1392
|
-
}
|
|
1393
|
-
/**
|
|
1394
|
-
* 转换列表数据
|
|
1395
|
-
*/
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
function transformListData(_ref20) {
|
|
1399
|
-
var _ref20$list = _ref20.list,
|
|
1400
|
-
list = _ref20$list === void 0 ? [] : _ref20$list,
|
|
1401
|
-
_ref20$convert = _ref20.convert,
|
|
1402
|
-
convert = _ref20$convert === void 0 ? null : _ref20$convert,
|
|
1403
|
-
_ref20$recursiveKey = _ref20.recursiveKey,
|
|
1404
|
-
recursiveKey = _ref20$recursiveKey === void 0 ? 'children' : _ref20$recursiveKey;
|
|
1405
|
-
var listData = isArray(list) ? list : [list];
|
|
1406
|
-
var l = listData.map(function (one) {
|
|
1407
|
-
return transformData({
|
|
1408
|
-
data: one,
|
|
1409
|
-
convert: convert,
|
|
1410
|
-
target: recursiveKey
|
|
1411
|
-
});
|
|
1412
|
-
});
|
|
1413
|
-
return l;
|
|
1414
|
-
}
|
|
1415
|
-
/**
|
|
1416
|
-
* 转换数据
|
|
1417
|
-
*/
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
function transformData(_ref21) {
|
|
1421
|
-
var data = _ref21.data,
|
|
1422
|
-
_ref21$convert = _ref21.convert,
|
|
1423
|
-
convert = _ref21$convert === void 0 ? null : _ref21$convert,
|
|
1424
|
-
_ref21$recursiveKey = _ref21.recursiveKey,
|
|
1425
|
-
recursiveKey = _ref21$recursiveKey === void 0 ? 'children' : _ref21$recursiveKey;
|
|
1426
|
-
|
|
1427
|
-
if (!isFunction(convert)) {
|
|
1428
|
-
return data;
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
var d = convert(data);
|
|
1432
|
-
var children = data[recursiveKey];
|
|
1433
|
-
var listData = [];
|
|
1434
|
-
|
|
1435
|
-
if (isArray(children)) {
|
|
1436
|
-
listData = children.map(function (one) {
|
|
1437
|
-
return transformData({
|
|
1438
|
-
data: one,
|
|
1439
|
-
convert: convert,
|
|
1440
|
-
target: recursiveKey
|
|
1441
|
-
});
|
|
1442
|
-
});
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
d[recursiveKey] = listData;
|
|
1446
|
-
return d;
|
|
1447
|
-
}
|
|
1448
|
-
/**
|
|
1449
|
-
* 构建描述文本
|
|
1450
|
-
* @param {*} v
|
|
1451
|
-
* @param {*} op
|
|
1452
|
-
* @param {*} other
|
|
1453
|
-
*/
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
function buildFieldDescription(v, op, other) {
|
|
1457
|
-
var o = (other || '') === '' ? '' : ",".concat(other);
|
|
1458
|
-
return "\u8BF7".concat(op || '输入').concat(v).concat(o);
|
|
1459
|
-
}
|
|
1460
|
-
/**
|
|
1461
|
-
* 清空SessionStorage数据
|
|
1462
|
-
* @export
|
|
1463
|
-
* @param {*} key
|
|
1464
|
-
*/
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
function clearSessionStorage() {
|
|
1468
|
-
var storage = window.sessionStorage;
|
|
1469
|
-
storage.clear();
|
|
1470
|
-
}
|
|
1471
|
-
/**
|
|
1472
|
-
* 获取工作队列
|
|
1473
|
-
* @export
|
|
1474
|
-
*/
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
function getQueue() {
|
|
1478
|
-
if (typeof window.queue === 'undefined') {
|
|
1479
|
-
window.queueCustom = (0, _queue.default)({
|
|
1480
|
-
concurrency: 3
|
|
1481
|
-
});
|
|
1482
|
-
window.queueCustom.start();
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
return window.queueCustom;
|
|
1486
|
-
}
|
|
1487
|
-
/**
|
|
1488
|
-
* Reacts生命周期getDerivedStateFromProps 辅助函数用于将url参数解析到返回值中用于设定state,
|
|
1489
|
-
* @export
|
|
1490
|
-
*/
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
function getDerivedStateFromPropsForUrlParamsCore(nextProps) {
|
|
1494
|
-
var match = nextProps.match;
|
|
1495
|
-
|
|
1496
|
-
if ((match || null) != null) {
|
|
1497
|
-
var params = match.params;
|
|
1498
|
-
|
|
1499
|
-
if ((params || null) != null) {
|
|
1500
|
-
return {
|
|
1501
|
-
urlParams: params
|
|
1502
|
-
};
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
return null;
|
|
1507
|
-
}
|
|
1508
|
-
/**
|
|
1509
|
-
* Reacts生命周期getDerivedStateFromProps 辅助函数用于将url参数解析到返回值中用于设定state,如果值重复,则返回null,
|
|
1510
|
-
* @export
|
|
1511
|
-
*/
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
function getDerivedStateFromPropsForUrlParams(nextProps, prevState) {
|
|
1515
|
-
var defaultUrlParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
1516
|
-
id: ''
|
|
1517
|
-
};
|
|
1518
|
-
var parseUrlParamsForSetState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1519
|
-
var stateUrlParams = getDerivedStateFromPropsForUrlParamsCore(nextProps, prevState);
|
|
1520
|
-
stateUrlParams = stateUrlParams || {
|
|
1521
|
-
urlParams: defaultUrlParams
|
|
1522
|
-
};
|
|
1523
|
-
var urlParamsPrev = prevState.urlParams;
|
|
1524
|
-
var _stateUrlParams = stateUrlParams,
|
|
1525
|
-
urlParams = _stateUrlParams.urlParams;
|
|
1526
|
-
|
|
1527
|
-
if (isEqualBySerialize(_objectSpread(_objectSpread({}, urlParamsPrev || {}), {}), _objectSpread(_objectSpread({}, urlParams || {}), {}))) {
|
|
1528
|
-
return prevState;
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
if (isFunction(parseUrlParamsForSetState)) {
|
|
1532
|
-
var data = parseUrlParamsForSetState(stateUrlParams);
|
|
1533
|
-
return _objectSpread(_objectSpread(_objectSpread({}, prevState), stateUrlParams), data);
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
return _objectSpread(_objectSpread({}, prevState), stateUrlParams);
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
function arrayMove(array, from, to) {
|
|
1540
|
-
return (0, _arrayMove.arrayMoveImmutable)(array, from, to);
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
function arrayMoveMutate(array, from, to) {
|
|
1544
|
-
return (0, _arrayMove.arrayMoveMutable)(array, from, to);
|
|
1545
|
-
}
|
|
1546
|
-
/**
|
|
1547
|
-
* 获取本地数据
|
|
1548
|
-
* @export
|
|
1549
|
-
* @param {value} 对比源
|
|
1550
|
-
* @param {other} 对比对象
|
|
1551
|
-
* 执行深比较来确定两者的值是否相等。
|
|
1552
|
-
* 这个方法支持比较 arrays, array buffers, booleans, date objects, error objects, maps, numbers, Object objects, regexes, sets, strings, symbols, 以及 typed arrays. Object 对象值比较自身的属性,不包括继承的和可枚举的属性。 不支持函数和DOM节点比较。
|
|
1553
|
-
*/
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
function isEqual(value, other) {
|
|
1557
|
-
return (0, _lodash.isEqual)(value, other);
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
function isEqualBySerialize(value, other) {
|
|
1561
|
-
var d1 = JSON.stringify(value || {});
|
|
1562
|
-
var d2 = JSON.stringify(other || {});
|
|
1563
|
-
return d1 === d2;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
function cloneWithoutMethod(value) {
|
|
1567
|
-
if (value == null) {
|
|
1568
|
-
return null;
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
return JSON.parse(JSON.stringify(value));
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
function isFunction(value) {
|
|
1575
|
-
return (0, _typeCheck.isFunction)(value);
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
function isArray(value) {
|
|
1579
|
-
return (0, _typeCheck.isArray)(value);
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
function isObject(o) {
|
|
1583
|
-
return (0, _lodash.isObject)(o);
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
function difference(array, values) {
|
|
1587
|
-
return (0, _lodash.difference)(array, values);
|
|
1588
|
-
}
|
|
1589
|
-
/**
|
|
1590
|
-
* 筛选需要的集合
|
|
1591
|
-
* @param {collection} 可筛选的对象,例如数组
|
|
1592
|
-
* @param {predicateFunction} 每次迭代调用的筛选函数
|
|
1593
|
-
*/
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
function filter(collection, predicateFunction) {
|
|
1597
|
-
return (0, _lodash.filter)(collection, predicateFunction);
|
|
1598
|
-
}
|
|
1599
|
-
/**
|
|
1600
|
-
* 创建一个元素数组。 以 iteratee 处理的结果升序排序。 这个方法执行稳定排序,也就是说相同元素会保持原始排序。 iteratees 调用1个参数: (value)。
|
|
1601
|
-
* @param {collection} (Array|Object), 用来迭代的集合。
|
|
1602
|
-
* @param {predicateFunction} 这个函数决定排序
|
|
1603
|
-
*/
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
function sortBy(collection, predicateFunction) {
|
|
1607
|
-
return (0, _lodash.sortBy)(collection, predicateFunction);
|
|
1608
|
-
}
|
|
1609
|
-
/**
|
|
1610
|
-
* 该方法返回第一个通过 predicateFunction 判断为真值的元素的索引值(index),而不是元素本身。
|
|
1611
|
-
* @param {array} (Array): 要搜索的数组。
|
|
1612
|
-
* @param {predicateFunction} 这个函数会在每一次迭代调用
|
|
1613
|
-
* @param {fromIndex} (number): The index to search from.
|
|
1614
|
-
*/
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
function findIndex(array, predicateFunction) {
|
|
1618
|
-
var fromIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1619
|
-
return (0, _lodash.findIndex)(array, predicateFunction, fromIndex);
|
|
1620
|
-
}
|
|
1621
|
-
/**
|
|
1622
|
-
* 该方法返回第一个通过 predicateFunction 判断为真值的元素的索引值(index),而不是元素本身,返回匹配元素,否则返回 undefined。。
|
|
1623
|
-
* @param {array} (Array): 要搜索的数组。
|
|
1624
|
-
* @param {predicateFunction} 这个函数会在每一次迭代调用
|
|
1625
|
-
* @param {fromIndex} (number): The index to search from.
|
|
1626
|
-
*/
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
function find(array, predicateFunction) {
|
|
1630
|
-
var fromIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1631
|
-
return (0, _lodash.find)(array, predicateFunction, fromIndex);
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
function checkExist(array, predicateFunction) {
|
|
1635
|
-
var fromIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1636
|
-
var result = find(array, predicateFunction, fromIndex);
|
|
1637
|
-
return !isUndefined(result);
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
function reverse(array) {
|
|
1641
|
-
return (0, _lodash.reverse)(array);
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
function trim(source) {
|
|
1645
|
-
return (0, _core.trim)(source);
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
function replace(source, pattern, replacement) {
|
|
1649
|
-
return (0, _core.replace)(source, pattern, replacement);
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
function isBoolean(value) {
|
|
1653
|
-
return (0, _lodash.isBoolean)(value);
|
|
1654
|
-
}
|
|
1655
|
-
/**
|
|
1656
|
-
* check value is undefined
|
|
1657
|
-
*/
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
function isUndefined(value) {
|
|
1661
|
-
return (0, _lodash.isUndefined)(value);
|
|
1662
|
-
}
|
|
1663
|
-
/**
|
|
1664
|
-
* check value is null
|
|
1665
|
-
*/
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
function isNull(value) {
|
|
1669
|
-
return (0, _lodash.isNull)(value);
|
|
1670
|
-
}
|
|
1671
|
-
/**
|
|
1672
|
-
* check value is date
|
|
1673
|
-
*/
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
function isDate(value) {
|
|
1677
|
-
return (0, _lodash.isDate)(value);
|
|
1678
|
-
}
|
|
1679
|
-
/**
|
|
1680
|
-
* check value is string
|
|
1681
|
-
*/
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
function isString(value) {
|
|
1685
|
-
return (0, _typeCheck.isString)(value);
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
function upperFirst(value) {
|
|
1689
|
-
return (0, _core.upperFirst)(value);
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
function lowerFirst(value) {
|
|
1693
|
-
return (0, _core.lowerFirst)(value);
|
|
1694
|
-
}
|
|
1695
|
-
/**
|
|
1696
|
-
* 移除数组中predicate(断言)返回为真值的所有元素,并返回移除元素组成的数组。predicate(断言) 会传入3个参数: (value, index, array)。
|
|
1697
|
-
* @param {*} array
|
|
1698
|
-
* @param {*} predicate (Array|Function|Object|string): 每次迭代调用的函数
|
|
1699
|
-
*/
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
function removeFromArray(array, predicate) {
|
|
1703
|
-
return (0, _lodash.remove)(array, predicate);
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
function stringIsNullOrWhiteSpace(value) {
|
|
1707
|
-
return (0, _core.stringIsNullOrWhiteSpace)(value);
|
|
1708
|
-
}
|
|
1709
|
-
/**
|
|
1710
|
-
* base64解码
|
|
1711
|
-
*/
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
function decodeBase64(target) {
|
|
1715
|
-
return (0, _core.decodeBase64)(target);
|
|
1716
|
-
}
|
|
1717
|
-
/**
|
|
1718
|
-
* base64编码
|
|
1719
|
-
*/
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
function encodeBase64(target) {
|
|
1723
|
-
return (0, _core.encodeBase64)(target);
|
|
1724
|
-
}
|
|
1725
|
-
/**
|
|
1726
|
-
* 补零
|
|
1727
|
-
* @param {*} val
|
|
1728
|
-
* @returns
|
|
1729
|
-
*/
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
function fixedZero(val) {
|
|
1733
|
-
return val * 1 < 10 ? "0".concat(val) : val;
|
|
1734
|
-
}
|
|
1735
|
-
/**
|
|
1736
|
-
* getTimeDistance
|
|
1737
|
-
*/
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
function getTimeDistance(type) {
|
|
1741
|
-
var now = new Date();
|
|
1742
|
-
var oneDay = 1000 * 60 * 60 * 24;
|
|
1743
|
-
|
|
1744
|
-
if (type === 'today') {
|
|
1745
|
-
now.setHours(0);
|
|
1746
|
-
now.setMinutes(0);
|
|
1747
|
-
now.setSeconds(0);
|
|
1748
|
-
return [(0, _moment.default)(now).utcOffset(8), (0, _moment.default)(now.getTime() + (oneDay - 1000)).utcOffset(8)];
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
if (type === 'week') {
|
|
1752
|
-
var day = now.getDay();
|
|
1753
|
-
now.setHours(0);
|
|
1754
|
-
now.setMinutes(0);
|
|
1755
|
-
now.setSeconds(0);
|
|
1756
|
-
|
|
1757
|
-
if (day === 0) {
|
|
1758
|
-
day = 6;
|
|
1759
|
-
} else {
|
|
1760
|
-
day -= 1;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
var beginTime = now.getTime() - day * oneDay;
|
|
1764
|
-
return [(0, _moment.default)(beginTime).utcOffset(8), (0, _moment.default)(beginTime + (7 * oneDay - 1000)).utcOffset(8)];
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
if (type === 'month') {
|
|
1768
|
-
var _year = now.getFullYear();
|
|
1769
|
-
|
|
1770
|
-
var month = now.getMonth();
|
|
1771
|
-
var nextDate = (0, _moment.default)(now).add(1, 'months');
|
|
1772
|
-
var nextYear = nextDate.year();
|
|
1773
|
-
var nextMonth = nextDate.month();
|
|
1774
|
-
return [(0, _moment.default)("".concat(_year, "-").concat(fixedZero(month + 1), "-01 00:00:00")).utcOffset(8), (0, _moment.default)((0, _moment.default)("".concat(nextYear, "-").concat(fixedZero(nextMonth + 1), "-01 00:00:00")).utcOffset(8).valueOf() - 1000).utcOffset(8)];
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
var year = now.getFullYear();
|
|
1778
|
-
return [(0, _moment.default)("".concat(year, "-01-01 00:00:00")).utcOffset(8), (0, _moment.default)("".concat(year, "-12-31 23:59:59")).utcOffset(8)];
|
|
1779
|
-
}
|
|
1780
|
-
/**
|
|
1781
|
-
* 构建描述文本
|
|
1782
|
-
* @param {*} v
|
|
1783
|
-
* @param {*} op
|
|
1784
|
-
* @param {*} other
|
|
1785
|
-
*/
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
function buildFieldHelper(v) {
|
|
1789
|
-
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '注:';
|
|
1790
|
-
return "".concat(prefix).concat(v, "\u3002");
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
function checkLocalhost() {
|
|
1794
|
-
var hostname = (0, _lodash.toLower)(window.location.hostname);
|
|
1795
|
-
return hostname === '127.0.0.1' || hostname === 'localhost';
|
|
1796
|
-
}
|
|
1797
|
-
/**
|
|
1798
|
-
* 尝试发送最近一次本地调用通知(一般用于开发阶段,提示调用的接口域)
|
|
1799
|
-
*/
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
function trySendNearestLocalhostNotify(_ref22) {
|
|
1803
|
-
var text = _ref22.text;
|
|
1804
|
-
var needSend = false;
|
|
1805
|
-
var nearestTime = 0;
|
|
1806
|
-
|
|
1807
|
-
if (checkLocalhost()) {
|
|
1808
|
-
var nearestLocalhostNotify = (0, _developAssist.getNearestLocalhostNotifyCache)() || null;
|
|
1809
|
-
|
|
1810
|
-
if (nearestLocalhostNotify == null) {
|
|
1811
|
-
needSend = true;
|
|
1812
|
-
} else {
|
|
1813
|
-
nearestTime = nearestLocalhostNotify.nearestTime || 0;
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
var now = parseInt(new Date().getTime() / 1000, 10);
|
|
1817
|
-
|
|
1818
|
-
try {
|
|
1819
|
-
if (nearestTime + 30 < now) {
|
|
1820
|
-
needSend = true;
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
if (needSend) {
|
|
1824
|
-
_notification2.default.open({
|
|
1825
|
-
placement: 'bottomLeft',
|
|
1826
|
-
message: '开发提示',
|
|
1827
|
-
description: "\u5F53\u524D\u63A5\u53E3\u57DF\u540D\uFF1A".concat(text, "\u3002")
|
|
1828
|
-
});
|
|
1829
|
-
|
|
1830
|
-
(0, _developAssist.setNearestLocalhostNotifyCache)();
|
|
1831
|
-
}
|
|
1832
|
-
} catch (error) {
|
|
1833
|
-
recordLog(error);
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
/**
|
|
1838
|
-
* 文本缩略
|
|
1839
|
-
*/
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
function ellipsis(value, length) {
|
|
1843
|
-
var symbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '...';
|
|
1844
|
-
|
|
1845
|
-
if (value && value.length > length) {
|
|
1846
|
-
return "".concat(toString(value).substr(0, length)).concat(symbol);
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
return toString(value);
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
function notifySuccess(text) {
|
|
1853
|
-
var description = text || '数据已经操作成功,请进行后续操作。';
|
|
1854
|
-
notify({
|
|
1855
|
-
type: _constants.notificationTypeCollection.success,
|
|
1856
|
-
placement: 'bottomRight',
|
|
1857
|
-
message: '操作结果',
|
|
1858
|
-
description: description
|
|
1859
|
-
});
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
function notifyInfo(text) {
|
|
1863
|
-
var description = text || '';
|
|
1864
|
-
|
|
1865
|
-
if (stringIsNullOrWhiteSpace(description)) {
|
|
1866
|
-
return;
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
notify({
|
|
1870
|
-
type: _constants.notificationTypeCollection.info,
|
|
1871
|
-
placement: 'bottomRight',
|
|
1872
|
-
message: '操作结果',
|
|
1873
|
-
description: description
|
|
1874
|
-
});
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
function notifyWarn(text) {
|
|
1878
|
-
var description = text || '';
|
|
1879
|
-
|
|
1880
|
-
if (stringIsNullOrWhiteSpace(description)) {
|
|
1881
|
-
return;
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
notify({
|
|
1885
|
-
type: _constants.notificationTypeCollection.warn,
|
|
1886
|
-
placement: 'bottomRight',
|
|
1887
|
-
message: '警告信息',
|
|
1888
|
-
description: description
|
|
1889
|
-
});
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
function notifyError(text) {
|
|
1893
|
-
var description = text || '';
|
|
1894
|
-
|
|
1895
|
-
if (stringIsNullOrWhiteSpace(description)) {
|
|
1896
|
-
return;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
notify({
|
|
1900
|
-
type: _constants.notificationTypeCollection.error,
|
|
1901
|
-
placement: 'bottomRight',
|
|
1902
|
-
message: '错误信息',
|
|
1903
|
-
description: description
|
|
1904
|
-
});
|
|
1905
|
-
}
|
|
1906
|
-
/**
|
|
1907
|
-
* 发送页面通知
|
|
1908
|
-
*/
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
function notify(_ref23) {
|
|
1912
|
-
var type = _ref23.type,
|
|
1913
|
-
placementValue = _ref23.placement,
|
|
1914
|
-
messageValue = _ref23.message,
|
|
1915
|
-
descriptionValue = _ref23.description;
|
|
1916
|
-
|
|
1917
|
-
var _placement$message$de = _objectSpread(_objectSpread({}, {
|
|
1918
|
-
placement: 'bottomRight',
|
|
1919
|
-
message: '操作结果',
|
|
1920
|
-
description: '操作结果描述'
|
|
1921
|
-
}), {
|
|
1922
|
-
placement: placementValue,
|
|
1923
|
-
message: messageValue,
|
|
1924
|
-
description: descriptionValue
|
|
1925
|
-
}),
|
|
1926
|
-
placement = _placement$message$de.placement,
|
|
1927
|
-
messageText = _placement$message$de.message,
|
|
1928
|
-
description = _placement$message$de.description;
|
|
1929
|
-
|
|
1930
|
-
setTimeout(function () {
|
|
1931
|
-
switch (type) {
|
|
1932
|
-
case _constants.notificationTypeCollection.success:
|
|
1933
|
-
_notification2.default.success({
|
|
1934
|
-
placement: placement,
|
|
1935
|
-
message: messageText,
|
|
1936
|
-
description: description
|
|
1937
|
-
});
|
|
1938
|
-
|
|
1939
|
-
break;
|
|
1940
|
-
|
|
1941
|
-
case _constants.notificationTypeCollection.warning:
|
|
1942
|
-
_notification2.default.warning({
|
|
1943
|
-
placement: placement,
|
|
1944
|
-
message: messageText,
|
|
1945
|
-
description: description
|
|
1946
|
-
});
|
|
1947
|
-
|
|
1948
|
-
break;
|
|
1949
|
-
|
|
1950
|
-
case _constants.notificationTypeCollection.error:
|
|
1951
|
-
_notification2.default.error({
|
|
1952
|
-
placement: placement,
|
|
1953
|
-
message: messageText,
|
|
1954
|
-
description: description
|
|
1955
|
-
});
|
|
1956
|
-
|
|
1957
|
-
break;
|
|
1958
|
-
|
|
1959
|
-
case _constants.notificationTypeCollection.info:
|
|
1960
|
-
_notification2.default.info({
|
|
1961
|
-
placement: placement,
|
|
1962
|
-
message: messageText,
|
|
1963
|
-
description: description
|
|
1964
|
-
});
|
|
1965
|
-
|
|
1966
|
-
break;
|
|
1967
|
-
|
|
1968
|
-
case _constants.notificationTypeCollection.warn:
|
|
1969
|
-
_notification2.default.warn({
|
|
1970
|
-
placement: placement,
|
|
1971
|
-
message: messageText,
|
|
1972
|
-
description: description
|
|
1973
|
-
});
|
|
1974
|
-
|
|
1975
|
-
break;
|
|
1976
|
-
|
|
1977
|
-
default:
|
|
1978
|
-
_notification2.default.open({
|
|
1979
|
-
placement: placement,
|
|
1980
|
-
message: messageText,
|
|
1981
|
-
description: description
|
|
1982
|
-
});
|
|
1983
|
-
|
|
1984
|
-
break;
|
|
1985
|
-
}
|
|
1986
|
-
}, 600);
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
function recordLog(record, showMode) {
|
|
1990
|
-
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants.logLevel.debug;
|
|
1991
|
-
(0, _developAssist.recordLog)(record, showMode, level);
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
function recordWarn(record) {
|
|
1995
|
-
(0, _developAssist.recordWarn)(record);
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
function recordInfo(record) {
|
|
1999
|
-
(0, _developAssist.recordInfo)(record);
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
function recordDebug(record) {
|
|
2003
|
-
(0, _developAssist.recordDebug)(record);
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
function recordError(record) {
|
|
2007
|
-
(0, _developAssist.recordError)(record);
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
function recordText(record) {
|
|
2011
|
-
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.logLevel.debug;
|
|
2012
|
-
(0, _developAssist.recordText)(record, level);
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
function recordObject(record) {
|
|
2016
|
-
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.logLevel.debug;
|
|
2017
|
-
(0, _developAssist.recordObject)(record, level);
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
function checkFromConfig(_ref24) {
|
|
2021
|
-
var label = _ref24.label,
|
|
2022
|
-
name = _ref24.name,
|
|
2023
|
-
helper = _ref24.helper;
|
|
2024
|
-
var labelText = 'object';
|
|
2025
|
-
var nameText = 'object';
|
|
2026
|
-
var helperText = 'object';
|
|
2027
|
-
|
|
2028
|
-
if (isObject(label)) {
|
|
2029
|
-
var text = 'label必须为文本';
|
|
2030
|
-
showRuntimeError({
|
|
2031
|
-
message: text
|
|
2032
|
-
});
|
|
2033
|
-
recordObject(label);
|
|
2034
|
-
} else {
|
|
2035
|
-
labelText = label;
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
if (isObject(name)) {
|
|
2039
|
-
var _text = 'name必须为文本';
|
|
2040
|
-
showRuntimeError({
|
|
2041
|
-
message: _text
|
|
2042
|
-
});
|
|
2043
|
-
recordObject(name);
|
|
2044
|
-
} else {
|
|
2045
|
-
nameText = name;
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
if (isObject(helper)) {
|
|
2049
|
-
var _text2 = 'helper必须为文本';
|
|
2050
|
-
showRuntimeError({
|
|
2051
|
-
message: _text2
|
|
2052
|
-
});
|
|
2053
|
-
recordObject(helper);
|
|
2054
|
-
} else {
|
|
2055
|
-
helperText = helper;
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
return {
|
|
2059
|
-
label: labelText,
|
|
2060
|
-
name: nameText,
|
|
2061
|
-
helper: helperText
|
|
2062
|
-
};
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
var requestAnimFrameCustom = function () {
|
|
2066
|
-
if ((0, _core.isBrowser)()) {
|
|
2067
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) {
|
|
2068
|
-
window.setTimeout(a, 1e3 / 60);
|
|
2069
|
-
};
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
return function () {};
|
|
2073
|
-
}();
|
|
2074
|
-
|
|
2075
|
-
var requestAnimFrame = requestAnimFrameCustom;
|
|
2076
|
-
/**
|
|
2077
|
-
* 依照某个键的值进行排序,请确保键的值为数字型
|
|
2078
|
-
*/
|
|
2079
|
-
|
|
2080
|
-
exports.requestAnimFrame = requestAnimFrame;
|
|
2081
|
-
|
|
2082
|
-
function sortCollectionByKey(_ref25) {
|
|
2083
|
-
var operate = _ref25.operate,
|
|
2084
|
-
item = _ref25.item,
|
|
2085
|
-
list = _ref25.list,
|
|
2086
|
-
sortKey = _ref25.sortKey,
|
|
2087
|
-
_ref25$sortMin = _ref25.sortMin,
|
|
2088
|
-
sortMin = _ref25$sortMin === void 0 ? 0 : _ref25$sortMin;
|
|
2089
|
-
|
|
2090
|
-
if ((item || null) == null) {
|
|
2091
|
-
return list;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
var beforeList = [];
|
|
2095
|
-
var afterList = [];
|
|
2096
|
-
var result = [];
|
|
2097
|
-
|
|
2098
|
-
if ((list || []).length <= 1) {
|
|
2099
|
-
var text = '无需排序!';
|
|
2100
|
-
showWarnMessage({
|
|
2101
|
-
message: text
|
|
2102
|
-
});
|
|
2103
|
-
return list;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
var itemSort = getValueByKey({
|
|
2107
|
-
data: item,
|
|
2108
|
-
key: sortKey,
|
|
2109
|
-
convert: _constants.convertCollection.number
|
|
2110
|
-
});
|
|
2111
|
-
(list || []).forEach(function (o) {
|
|
2112
|
-
var sort = getValueByKey({
|
|
2113
|
-
data: o,
|
|
2114
|
-
key: sortKey,
|
|
2115
|
-
convert: _constants.convertCollection.number
|
|
2116
|
-
});
|
|
2117
|
-
|
|
2118
|
-
if (sort < itemSort) {
|
|
2119
|
-
beforeList.push(o);
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
|
-
if (sort > itemSort) {
|
|
2123
|
-
afterList.push(o);
|
|
2124
|
-
}
|
|
2125
|
-
});
|
|
2126
|
-
|
|
2127
|
-
switch (operate) {
|
|
2128
|
-
case _constants.sortOperate.moveUp:
|
|
2129
|
-
if (itemSort === sortMin) {
|
|
2130
|
-
var _text4 = '已经排在首位!';
|
|
2131
|
-
showWarnMessage({
|
|
2132
|
-
message: _text4
|
|
2133
|
-
});
|
|
2134
|
-
return list;
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
(beforeList || []).forEach(function (o, index) {
|
|
2138
|
-
if (index < beforeList.length - 1) {
|
|
2139
|
-
result.push(o);
|
|
2140
|
-
} else {
|
|
2141
|
-
var o1 = item;
|
|
2142
|
-
o1[sortKey] -= 1;
|
|
2143
|
-
result.push(o1);
|
|
2144
|
-
var o2 = o;
|
|
2145
|
-
o2[sortKey] += 1;
|
|
2146
|
-
result.push(o2);
|
|
2147
|
-
}
|
|
2148
|
-
});
|
|
2149
|
-
result = result.concat(afterList);
|
|
2150
|
-
break;
|
|
2151
|
-
|
|
2152
|
-
case _constants.sortOperate.moveDown:
|
|
2153
|
-
if (itemSort === (list || []).length + sortMin - 1) {
|
|
2154
|
-
var _text5 = '已经排在末位!';
|
|
2155
|
-
showWarnMessage({
|
|
2156
|
-
message: _text5
|
|
2157
|
-
});
|
|
2158
|
-
return list;
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
result = result.concat(beforeList);
|
|
2162
|
-
(afterList || []).forEach(function (o, index) {
|
|
2163
|
-
if (index === 0) {
|
|
2164
|
-
var o2 = o;
|
|
2165
|
-
o2[sortKey] -= 1;
|
|
2166
|
-
result.push(o2);
|
|
2167
|
-
var o1 = item;
|
|
2168
|
-
o1[sortKey] += 1;
|
|
2169
|
-
result.push(o1);
|
|
2170
|
-
} else {
|
|
2171
|
-
result.push(o);
|
|
2172
|
-
}
|
|
2173
|
-
});
|
|
2174
|
-
break;
|
|
2175
|
-
|
|
2176
|
-
default:
|
|
2177
|
-
var _text3 = "\u4E0D\u7B26\u5408\u7684\u64CD\u4F5C\uFF0C\u5141\u8BB8\u7684\u64CD\u4F5C\u4E3A['".concat(_constants.sortOperate.moveUp, "','").concat(_constants.sortOperate.moveDown, "']!");
|
|
2178
|
-
|
|
2179
|
-
showWarnMessage({
|
|
2180
|
-
message: _text3
|
|
2181
|
-
});
|
|
2182
|
-
break;
|
|
2183
|
-
}
|
|
2184
|
-
|
|
2185
|
-
return result;
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
function queryStringify(data) {
|
|
2189
|
-
return (0, _qs.stringify)(data);
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
function queryStringParse(data) {
|
|
2193
|
-
return (0, _qs.parse)(data);
|
|
2194
|
-
}
|
|
2195
|
-
/**
|
|
2196
|
-
* 占位函数
|
|
2197
|
-
*
|
|
2198
|
-
* @export
|
|
2199
|
-
* @returns
|
|
2200
|
-
*/
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
function empty() {
|
|
2204
|
-
return {};
|
|
2205
|
-
}
|