@vtx/modals2 6.0.0-beta.3 → 6.0.0-beta.31
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/lib/_components/index.js +1 -0
- package/lib/_components/vm-appraisal-info/api.js +55 -0
- package/lib/_components/vm-appraisal-info/imgs/count.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/count_light.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/subtract.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/subtract_light.png +0 -0
- package/lib/_components/vm-appraisal-info/index.js +205 -0
- package/lib/_components/vm-appraisal-info/index.less +7 -0
- package/lib/_components/vm-bar-charts/index.js +4 -4
- package/lib/_components/vm-calendar/index.js +1 -1
- package/lib/_components/vm-card-statistics/index.less +27 -27
- package/lib/_components/vm-empty/index.js +1 -1
- package/lib/_components/vm-factor/index.js +1 -1
- package/lib/_components/vm-factor-list/index.less +11 -11
- package/lib/_components/vm-filter/index.js +1 -1
- package/lib/_components/vm-filter/style/index.less +7 -11
- package/lib/_components/vm-info-collection/index.js +1 -1
- package/lib/_components/vm-line-charts/index.js +4 -1
- package/lib/_components/vm-map/index.js +1 -1
- package/lib/_components/vm-progress/index.js +1 -1
- package/lib/_components/vm-repair-maintain/RmInfoSummary.js +1 -1
- package/lib/_components/vm-repair-maintain/RmMonthTrend.js +1 -1
- package/lib/_components/vm-repair-maintain/RmRecord.js +1 -1
- package/lib/_components/vm-repair-maintain/RmType.js +1 -1
- package/lib/_components/vm-repair-maintain/index.js +35 -3
- package/lib/_components/vm-table/index.js +1 -1
- package/lib/_components/vm-tag/index.js +1 -1
- package/lib/_components/vm-title/index.js +1 -1
- package/lib/_components/vm-video/HistoryGrid.js +53 -3
- package/lib/_components/vm-video/RealtimeGrid.js +24 -3
- package/lib/_components/vm-video/index.js +100 -38
- package/lib/_components/vm-video/index.less +6 -2
- package/lib/_components/vm-wrapper/index.js +1 -1
- package/lib/_hooks/useGetChannels.js +20 -6
- package/lib/_hooks/useUmsService.js +36 -0
- package/lib/_service/index.js +7 -33
- package/lib/_util/http.js +31 -4
- package/lib/_util/iconSvgHtml.js +15 -5
- package/lib/_util/index.js +1 -1
- package/lib/locales/en.json +1517 -1516
- package/lib/locales/zh-CN.json +1517 -1516
- package/lib/vtx-area-modal/api.js +1 -1
- package/lib/vtx-area-modal/components/BaseInfo/Lcfx.js +1 -1
- package/lib/vtx-area-modal/components/BaseInfo/ListZymx.js +1 -1
- package/lib/vtx-area-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-base-modal/Header/index.js +2 -77
- package/lib/vtx-base-modal/Header/index.less +1 -0
- package/lib/vtx-base-modal/Tabs/index.js +2 -1
- package/lib/vtx-base-modal/index.js +1 -1
- package/lib/vtx-base-modal/style/index.less +4 -1
- package/lib/vtx-car-modal/api.js +257 -165
- package/lib/vtx-car-modal/components/Info/index.js +2 -2
- package/lib/vtx-car-modal/components/Info/index.less +6 -6
- package/lib/vtx-car-modal/content/Cc/AlarmInfo/List.js +1 -1
- package/lib/vtx-car-modal/content/Cc/AlarmInfo/StaticInfo.js +1 -1
- package/lib/vtx-car-modal/content/Cc/AlarmInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Cc/BaseInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Cc/OrderInfo/Detail.js +1 -1
- package/lib/vtx-car-modal/content/Cc/OrderInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Cc/StaticInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Cc/WorkRecord/Detail.js +1 -1
- package/lib/vtx-car-modal/content/Cc/WorkRecord/Summary.js +1 -1
- package/lib/vtx-car-modal/content/Cc/WorkRecord/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/AlarmInfo/List.js +1 -1
- package/lib/vtx-car-modal/content/Common/AlarmInfo/StaticInfo.js +1 -1
- package/lib/vtx-car-modal/content/Common/AlarmInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/DetailInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/DeviceInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/EleUse/index.js +20 -8
- package/lib/vtx-car-modal/content/Common/Maintenance/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/OilConsumption/List.js +1 -1
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/OilUse/index.js +18 -6
- package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.less +169 -169
- package/lib/vtx-car-modal/content/Common/StaticInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/WaterUse/index.js +10 -5
- package/lib/vtx-car-modal/content/JXH/AlarmInfo/List.js +1 -1
- package/lib/vtx-car-modal/content/JXH/AlarmInfo/StaticInfo.js +1 -1
- package/lib/vtx-car-modal/content/JXH/AlarmInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/List.js +1 -1
- package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/StaticInfo.js +1 -1
- package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/JXH/Hw2BaseInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/JXH/Hw2StaticInfo/index.js +2 -2
- package/lib/vtx-car-modal/content/JXH/Hw2WorkRecord/index.js +1 -1
- package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +3 -3
- package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/Alarm/Bottom.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/Alarm/index.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/BaseInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/Collection/Chart.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/Collection/index.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/Dispose/Pies.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/Dispose/index.js +1 -1
- package/lib/vtx-car-modal/content/Jzlj/RunCalendar/index.js +1 -1
- package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/List.js +1 -1
- package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/StaticInfo.js +1 -1
- package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Ljsy/StaticInfo/index.js +1 -1
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Detail.js +3 -2
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Summary.js +1 -1
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/index.js +1 -1
- package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +10 -9
- package/lib/vtx-car-modal/content/Ljzy/StaticInfo/index.js +12 -12
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Detail.js +6 -5
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +9 -7
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/index.js +7 -4
- package/lib/vtx-car-modal/content/Unmanned/Analysis/index.js +1 -1
- package/lib/vtx-car-modal/content/Unmanned/Calendar/index.js +2 -2
- package/lib/vtx-car-modal/content/Unmanned/Monitor/index.js +1 -1
- package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.js +1 -1
- package/lib/vtx-car-modal/index.js +33 -22
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmRecord.js +1 -1
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTrend.js +1 -1
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTypeAnalysis.js +1 -1
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/StaticInfo.js +1 -1
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/index.js +1 -1
- package/lib/vtx-cc-cp-modal/components/BaseInfo/AllWork.js +1 -1
- package/lib/vtx-cc-cp-modal/components/BaseInfo/Info.js +1 -1
- package/lib/vtx-cc-cp-modal/components/BaseInfo/Rules.js +1 -1
- package/lib/vtx-cc-cp-modal/components/BaseInfo/SyRecord.js +1 -1
- package/lib/vtx-cc-cp-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-cc-cp-modal/components/Calendar/index.js +1 -1
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTrend.js +1 -1
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTypeAnalysis.js +1 -1
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExeceptionRecord.js +1 -1
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/StaticInfo.js +1 -1
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/index.js +1 -1
- package/lib/vtx-cc-cp-modal/components/Restaurant/index.js +1 -1
- package/lib/vtx-cc-cp-modal/components/SyInfo/Ljcsl.js +1 -1
- package/lib/vtx-cc-cp-modal/components/SyInfo/SummaryInfo.js +1 -1
- package/lib/vtx-cc-cp-modal/components/SyInfo/index.js +1 -1
- package/lib/vtx-cc-cp-modal/index.js +1 -1
- package/lib/vtx-cc-unit-modal/components/BaseInfo/CollectRecord.js +1 -1
- package/lib/vtx-cc-unit-modal/components/BaseInfo/DetailList.js +1 -1
- package/lib/vtx-cc-unit-modal/components/BaseInfo/Factory.js +1 -1
- package/lib/vtx-cc-unit-modal/components/BaseInfo/Statistics.js +1 -1
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
- package/lib/vtx-cc-unit-modal/components/CarList/index.js +1 -1
- package/lib/vtx-cc-unit-modal/components/Collection/index.js +1 -1
- package/lib/vtx-cc-unit-modal/components/DetailInfo/index.js +1 -1
- package/lib/vtx-cc-unit-modal/components/Factory/index.js +1 -1
- package/lib/vtx-cc-unit-modal/components/RestaurantList/index.js +1 -1
- package/lib/vtx-cc-unit-modal/index.js +1 -1
- package/lib/vtx-cp-modal/api.js +1 -1
- package/lib/vtx-cp-modal/components/AlarmInfo/AlarmRecord.js +1 -1
- package/lib/vtx-cp-modal/components/AlarmInfo/MonthTrend.js +1 -1
- package/lib/vtx-cp-modal/components/AlarmInfo/Summary.js +1 -1
- package/lib/vtx-cp-modal/components/BaseInfo/CarWork.js +3 -6
- package/lib/vtx-cp-modal/components/BaseInfo/Rules.js +1 -1
- package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +8 -2
- package/lib/vtx-cp-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-cp-modal/components/ExeceptionInfo/AlarmRecord.js +9 -5
- package/lib/vtx-cp-modal/components/ExeceptionInfo/MonthTrend.js +1 -1
- package/lib/vtx-cp-modal/components/ExeceptionInfo/Summary.js +1 -1
- package/lib/vtx-cp-modal/components/SyInfo/Ljcsl.js +3 -3
- package/lib/vtx-cp-modal/components/SyInfo/index.js +1 -1
- package/lib/vtx-cp-modal/index.js +13 -13
- package/lib/vtx-default-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-default-modal/index.js +8 -7
- package/lib/vtx-device-modal/components/BaseInfo/PreviewAndDownload.js +1 -1
- package/lib/vtx-device-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-device-modal/components/DataAnalysis/AlarmAnalysis.js +1 -1
- package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +1 -1
- package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
- package/lib/vtx-device-modal/index.js +4 -4
- package/lib/vtx-df-modal/components/BaseInfo/Jcqsfx.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfo/Jczbqs.js +3 -3
- package/lib/vtx-df-modal/components/BaseInfo/Qyjcl.js +12 -6
- package/lib/vtx-df-modal/components/BaseInfo/RealtimeMonitor.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfo/Situation.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jcqsfx.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +3 -3
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Qyjcl.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/RealtimeMonitor.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Situation.js +1 -1
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.js +1 -1
- package/lib/vtx-df-modal/components/Calendar/index.js +10 -3
- package/lib/vtx-df-modal/components/Calendar/zd-reborn.js +10 -3
- package/lib/vtx-df-modal/components/Metering/ChartJccc.js +1 -1
- package/lib/vtx-df-modal/components/Metering/ChartJcqs.js +1 -1
- package/lib/vtx-df-modal/components/Metering/List.js +1 -1
- package/lib/vtx-df-modal/components/Metering/index.js +1 -1
- package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJccc.js +1 -1
- package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJcqs.js +1 -1
- package/lib/vtx-df-modal/components/MeteringZdReborn/List.js +1 -1
- package/lib/vtx-df-modal/components/MeteringZdReborn/index.js +1 -1
- package/lib/vtx-df-modal/components/WorkCondition/Monitor.js +1 -1
- package/lib/vtx-df-modal/components/WorkCondition/Table.js +3 -3
- package/lib/vtx-df-modal/components/WorkCondition/index.js +1 -1
- package/lib/vtx-df-modal/index.js +20 -25
- package/lib/vtx-housing-estate-modal/components/Alarm/CYLJTF.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/Distribute.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/FLZL_TREND.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/FSCSFB.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/FSSD.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/FSYZQS.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/HTLJPH.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_FB.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_GD.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_PIE.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_TREND.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Alarm/index.js +1 -1
- package/lib/vtx-housing-estate-modal/components/OverView/Hot.js +1 -1
- package/lib/vtx-housing-estate-modal/components/OverView/Left.js +1 -1
- package/lib/vtx-housing-estate-modal/components/OverView/Manage.js +1 -1
- package/lib/vtx-housing-estate-modal/components/OverView/RightBottom.js +1 -1
- package/lib/vtx-housing-estate-modal/components/Sbzj/index.js +1 -1
- package/lib/vtx-housing-estate-modal/components/TFRD/index.js +1 -1
- package/lib/vtx-housing-estate-modal/components/WGGS/index.js +1 -1
- package/lib/vtx-housing-estate-modal/components/WGXW/Content.js +1 -1
- package/lib/vtx-housing-estate-modal/components/WGXW/index.js +1 -1
- package/lib/vtx-housing-estate-modal/index.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Collection/Chart.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Collection/index.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Dispose/FlowMap.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Dispose/index.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CTL.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CTYL.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CZZ.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/components/Overview/index.js +1 -1
- package/lib/vtx-jzlj-df-tpd-modal/index.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Alarm/Bottom.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Alarm/index.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Collection/Chart.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Collection/index.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Dispose/FlowMap.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Dispose/index.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Overview/CTL.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Overview/CTYL.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Overview/CZZ.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Overview/index.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/index.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Collection/Chart.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Collection/index.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Dispose/FlowMap.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Dispose/index.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Overview/CTL.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Overview/CTYL.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Overview/CZZ.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Overview/index.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/index.js +1 -1
- package/lib/vtx-jzlj-ysqy-modal/components/Overview/index.js +1 -1
- package/lib/vtx-jzlj-ysqy-modal/index.js +1 -1
- package/lib/vtx-kh-modal/api2.js +1 -1
- package/lib/vtx-kh-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-kh-modal/components/Record/index.js +1 -205
- package/lib/vtx-kh-modal/index.js +1 -1
- package/lib/vtx-qyry-modal/api.js +1 -1
- package/lib/vtx-qyry-modal/index.js +2 -2
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmRecord.js +1 -1
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmTrend.js +1 -1
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmTypeAnalysis.js +1 -1
- package/lib/vtx-restaurant-modal/components/Alarm/StaticInfo.js +1 -1
- package/lib/vtx-restaurant-modal/components/Alarm/index.js +1 -1
- package/lib/vtx-restaurant-modal/components/Basic/CollectRule.js +1 -1
- package/lib/vtx-restaurant-modal/components/Basic/DetailList.js +1 -1
- package/lib/vtx-restaurant-modal/components/Basic/Info.js +1 -1
- package/lib/vtx-restaurant-modal/components/Basic/Summary.js +1 -1
- package/lib/vtx-restaurant-modal/components/Basic/SummaryStatistics.js +1 -1
- package/lib/vtx-restaurant-modal/components/Basic/index.js +1 -1
- package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
- package/lib/vtx-restaurant-modal/components/Calendar/index.js +1 -1
- package/lib/vtx-restaurant-modal/components/Collection/index.js +1 -1
- package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +3 -0
- package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +1 -1
- package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +1 -1
- package/lib/vtx-restaurant-modal/config.js +11 -3
- package/lib/vtx-restaurant-modal/index.js +1 -1
- package/lib/vtx-road-modal/api.js +6 -2
- package/lib/vtx-road-modal/components/BaseInfo/Rules.js +1 -1
- package/lib/vtx-road-modal/components/BaseInfo/Work.js +11 -2
- package/lib/vtx-road-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-road-modal/components/Calendar/index.js +4 -4
- package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +9 -2
- package/lib/vtx-road-modal/components/LaneBaseInfo/index.js +1 -1
- package/lib/vtx-road-modal/components/LaneCalendar/index.js +5 -2
- package/lib/vtx-road-modal/components/LaneStatistical/index.js +1 -1
- package/lib/vtx-road-modal/components/Statistical/index.js +1 -1
- package/lib/vtx-road-modal/index.js +21 -5
- package/lib/vtx-road-modal/utils/url.js +12 -0
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/CYLJTF.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/Distribute.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/FLZL_TREND.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSCSFB.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSSD.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSYZQS.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/GDCLXL.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/HTLJPH.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_FB.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_GD.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_PIE.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_TREND.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Alarm/index.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/OverView/Hot.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/OverView/Left.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/OverView/Manage.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/OverView/RightBottom.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/Sbzj/index.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/TFRD/index.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/WGGS/index.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/components/WGXW/Content.js +1 -1
- package/lib/vtx-sdyd-tfd-modal/index.js +1 -1
- package/lib/vtx-shxq-modal/api.js +6 -6
- package/lib/vtx-shxq-modal/components/AlarmRecord/List.js +1 -1
- package/lib/vtx-shxq-modal/components/AlarmRecord/index.js +1 -1
- package/lib/vtx-shxq-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-shxq-modal/components/Tfd/index.js +1 -1
- package/lib/vtx-shxq-modal/components/ThrowCalendar/Chart.js +1 -1
- package/lib/vtx-shxq-modal/components/ThrowCalendar/List.js +3 -3
- package/lib/vtx-shxq-modal/components/ThrowCalendar/index.js +1 -1
- package/lib/vtx-shxq-modal/components/ThrowRecord/List.js +20 -7
- package/lib/vtx-shxq-modal/components/ThrowRecord/index.js +1 -1
- package/lib/vtx-shxq-modal/index.js +21 -4
- package/lib/vtx-staff-modal/api.js +1 -1
- package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +5 -2
- package/lib/vtx-staff-modal/components/AlarmInfo/List.js +1 -1
- package/lib/vtx-staff-modal/components/AlarmInfo/index.js +1 -1
- package/lib/vtx-staff-modal/components/Attendance/Exeception.js +1 -1
- package/lib/vtx-staff-modal/components/Attendance/Record.js +1 -1
- package/lib/vtx-staff-modal/components/Attendance/WorkingHours.js +1 -1
- package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +1 -1
- package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +1 -1
- package/lib/vtx-staff-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-staff-modal/components/Calendar/index.js +1 -1
- package/lib/vtx-staff-modal/components/Calendar/index.less +1 -1
- package/lib/vtx-staff-modal/components/Equipment/index.js +1 -1
- package/lib/vtx-staff-modal/index.js +1 -1
- package/lib/vtx-tfd-modal/api.js +3 -3
- package/lib/vtx-tfd-modal/components/BaseInfo/Jczbqs.js +3 -3
- package/lib/vtx-tfd-modal/components/BaseInfo/Qyjcl.js +1 -1
- package/lib/vtx-tfd-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-wr-modal/components/Appraise/index.js +3 -3
- package/lib/vtx-wr-modal/components/Base/Jbxx.js +4 -47
- package/lib/vtx-wr-modal/components/Base/Ptss.js +42 -8
- package/lib/vtx-wr-modal/components/Base/Sjjg.js +1 -1
- package/lib/vtx-wr-modal/components/Base/index.js +45 -14
- package/lib/vtx-wr-modal/components/Base/index.less +87 -4
- package/lib/vtx-wr-modal/components/Build/index.js +1 -1
- package/lib/vtx-wr-modal/components/File/index.js +1 -1
- package/lib/vtx-wr-modal/components/Score/index.js +3 -3
- package/lib/vtx-wr-modal/index.js +34 -6
- package/lib/vtx-zf-modal/components/Base/index.js +1 -1
- package/lib/vtx-zf-modal/components/Base/index.less +9 -0
- package/lib/vtx-zf-modal/components/CkEditorCustom/index.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/view.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/CKModal.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/FormView.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/index.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/FormView.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/date.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/index.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/FormView.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/checkbox.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/index.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/FormView.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/index.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/FormView.js +1 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/index.js +1 -1
- package/lib/vtx-zf-modal/components/File/index.js +1 -1
- package/lib/vtx-zf-modal/components/Process/index.js +1 -1
- package/lib/vtx-zf-modal/components/Process/index.less +7 -0
- package/lib/vtx-zf-modal/components/Record/index.js +1 -1
- package/lib/vtx-zf-modal/components/Right/index.js +1 -1
- package/lib/vtx-zg-modal/api.js +1 -1
- package/lib/vtx-zg-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-zg-modal/index.js +1 -1
- package/lib/vtx-zzz-modal/index.js +29 -22
- package/package.json +92 -92
|
@@ -1,15 +1,61 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
import { HistoryPlayer } from '@vtx/player';
|
|
2
|
-
import { forwardRef, useRef } from 'react';
|
|
8
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
3
9
|
import VmEmpty from "../vm-empty";
|
|
4
10
|
import "./index.less";
|
|
5
11
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
12
|
var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
7
|
-
var _channel$list;
|
|
8
13
|
var channel = props.channel,
|
|
9
14
|
onClose = props.onClose;
|
|
15
|
+
var _useState = useState(''),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
url = _useState2[0],
|
|
18
|
+
setUrl = _useState2[1];
|
|
19
|
+
var _useState3 = useState(''),
|
|
20
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21
|
+
startTime = _useState4[0],
|
|
22
|
+
setStartTime = _useState4[1];
|
|
23
|
+
var _useState5 = useState(''),
|
|
24
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
25
|
+
endTime = _useState6[0],
|
|
26
|
+
setEndTime = _useState6[1];
|
|
10
27
|
var name = "".concat(channel === null || channel === void 0 ? void 0 : channel.deviceName, "-").concat(channel === null || channel === void 0 ? void 0 : channel.channelName);
|
|
11
|
-
var url = (channel === null || channel === void 0 ? void 0 : channel.totalTimeUrl) || (channel === null || channel === void 0 || (_channel$list = channel.list) === null || _channel$list === void 0 || (_channel$list = _channel$list[0]) === null || _channel$list === void 0 ? void 0 : _channel$list.playbackUrl);
|
|
12
28
|
var gridItemRef = useRef(null);
|
|
29
|
+
useEffect(function () {
|
|
30
|
+
var _channel$list;
|
|
31
|
+
var src = (channel === null || channel === void 0 ? void 0 : channel.totalTimeUrl) || (channel === null || channel === void 0 || (_channel$list = channel.list) === null || _channel$list === void 0 || (_channel$list = _channel$list[0]) === null || _channel$list === void 0 ? void 0 : _channel$list.playbackUrl);
|
|
32
|
+
if (channel.enableAgent) {
|
|
33
|
+
if (src.indexOf('http') === -1) {
|
|
34
|
+
setUrl("".concat(window.location.origin).concat(src));
|
|
35
|
+
}
|
|
36
|
+
} else {
|
|
37
|
+
setUrl(src);
|
|
38
|
+
}
|
|
39
|
+
if (channel !== null && channel !== void 0 && channel.totalTimeUrl) {
|
|
40
|
+
setStartTime(props === null || props === void 0 ? void 0 : props.startTime);
|
|
41
|
+
setEndTime(props === null || props === void 0 ? void 0 : props.endTime);
|
|
42
|
+
} else {
|
|
43
|
+
var _channel$list2, _channel$list3;
|
|
44
|
+
setStartTime(channel === null || channel === void 0 || (_channel$list2 = channel.list) === null || _channel$list2 === void 0 || (_channel$list2 = _channel$list2[0]) === null || _channel$list2 === void 0 ? void 0 : _channel$list2.beginTime);
|
|
45
|
+
setEndTime(channel === null || channel === void 0 || (_channel$list3 = channel.list) === null || _channel$list3 === void 0 || (_channel$list3 = _channel$list3[0]) === null || _channel$list3 === void 0 ? void 0 : _channel$list3.endTime);
|
|
46
|
+
}
|
|
47
|
+
}, [channel.enableAgent, props.startTime, JSON.stringify(channel)]);
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
var _channel$list4;
|
|
50
|
+
var src = (channel === null || channel === void 0 ? void 0 : channel.totalTimeUrl) || (channel === null || channel === void 0 || (_channel$list4 = channel.list) === null || _channel$list4 === void 0 || (_channel$list4 = _channel$list4[0]) === null || _channel$list4 === void 0 ? void 0 : _channel$list4.playbackUrl);
|
|
51
|
+
if (channel.enableAgent) {
|
|
52
|
+
if (src.indexOf('http') === -1) {
|
|
53
|
+
setUrl("".concat(window.location.origin).concat(src));
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
setUrl(src);
|
|
57
|
+
}
|
|
58
|
+
}, [JSON.stringify(channel)]);
|
|
13
59
|
return /*#__PURE__*/_jsx("div", {
|
|
14
60
|
className: "vm-video-content-container",
|
|
15
61
|
ref: gridItemRef,
|
|
@@ -31,7 +77,11 @@ var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
31
77
|
ref: ref,
|
|
32
78
|
beenHasVideo: channel.beenHasVideo // 对讲
|
|
33
79
|
,
|
|
80
|
+
beenHasAudio: channel.beenHasAudio // 音频
|
|
81
|
+
,
|
|
34
82
|
url: url,
|
|
83
|
+
startTime: startTime,
|
|
84
|
+
endTime: endTime,
|
|
35
85
|
type: channel === null || channel === void 0 ? void 0 : channel.player,
|
|
36
86
|
deviceIp: channel.deviceIp,
|
|
37
87
|
devicePort: channel.devicePort,
|
|
@@ -1,17 +1,36 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
import { LivePlayer } from '@vtx/player';
|
|
2
|
-
import { forwardRef, useRef } from 'react';
|
|
8
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
3
9
|
import VmEmpty from "../vm-empty";
|
|
4
10
|
import "./index.less";
|
|
5
11
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
12
|
var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
7
13
|
var channel = props.channel,
|
|
8
14
|
onClose = props.onClose;
|
|
15
|
+
var _useState = useState(''),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
url = _useState2[0],
|
|
18
|
+
setUrl = _useState2[1];
|
|
9
19
|
var name = "".concat(channel === null || channel === void 0 ? void 0 : channel.deviceName, "-").concat(channel === null || channel === void 0 ? void 0 : channel.channelName);
|
|
10
20
|
var gridItemRef = useRef(null);
|
|
21
|
+
useEffect(function () {
|
|
22
|
+
if (channel.enableAgent) {
|
|
23
|
+
if ((channel === null || channel === void 0 ? void 0 : channel.url.indexOf('http')) === -1) {
|
|
24
|
+
setUrl("".concat(window.location.origin).concat(channel.url));
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
setUrl(channel.url);
|
|
28
|
+
}
|
|
29
|
+
}, [channel.enableAgent, channel === null || channel === void 0 ? void 0 : channel.url]);
|
|
11
30
|
return /*#__PURE__*/_jsx("div", {
|
|
12
31
|
className: "vm-video-content-container",
|
|
13
32
|
ref: gridItemRef,
|
|
14
|
-
children:
|
|
33
|
+
children: url ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
15
34
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
16
35
|
className: "vm-video-content-container-header",
|
|
17
36
|
children: [/*#__PURE__*/_jsx("span", {
|
|
@@ -29,7 +48,9 @@ var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
29
48
|
ref: ref,
|
|
30
49
|
beenHasVideo: channel.beenHasVideo // 对讲
|
|
31
50
|
,
|
|
32
|
-
|
|
51
|
+
beenHasAudio: channel.beenHasAudio // 音频
|
|
52
|
+
,
|
|
53
|
+
url: url,
|
|
33
54
|
type: channel === null || channel === void 0 ? void 0 : channel.player,
|
|
34
55
|
deviceIp: channel.deviceIp,
|
|
35
56
|
devicePort: channel.devicePort,
|
|
@@ -24,8 +24,31 @@ import { VmTabs } from "../vm-tabs";
|
|
|
24
24
|
import HistoryGrid from "./HistoryGrid";
|
|
25
25
|
import "./index.less";
|
|
26
26
|
import RealtimeGrid from "./RealtimeGrid";
|
|
27
|
-
import { translateLocaleText } from "./../../hooks/useTranslation.
|
|
27
|
+
import { translateLocaleText } from "./../../hooks/useTranslation.js";
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
|
+
export var VIDEO_TAB_KEY = 'video';
|
|
30
|
+
export var getVideoTab = function getVideoTab() {
|
|
31
|
+
return {
|
|
32
|
+
key: VIDEO_TAB_KEY,
|
|
33
|
+
title: translateLocaleText("t('vtxdevicemodal.video')")
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export var isVideoTab = function isVideoTab(tab) {
|
|
37
|
+
return (tab === null || tab === void 0 ? void 0 : tab.key) === VIDEO_TAB_KEY || "".concat((tab === null || tab === void 0 ? void 0 : tab.key) || '').endsWith('video');
|
|
38
|
+
};
|
|
39
|
+
export var insertVideoTab = function insertVideoTab() {
|
|
40
|
+
var tabs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
41
|
+
var channels = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
42
|
+
if (!Array.isArray(tabs) || tabs.length === 0) {
|
|
43
|
+
return tabs;
|
|
44
|
+
}
|
|
45
|
+
if (!(channels !== null && channels !== void 0 && channels.length)) {
|
|
46
|
+
return tabs.filter(function (tab) {
|
|
47
|
+
return !isVideoTab(tab);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return tabs;
|
|
51
|
+
};
|
|
29
52
|
var VmVideo = function VmVideo(_ref) {
|
|
30
53
|
var _ref$channels = _ref.channels,
|
|
31
54
|
channels = _ref$channels === void 0 ? [] : _ref$channels;
|
|
@@ -62,6 +85,8 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
62
85
|
endTime = state.endTime,
|
|
63
86
|
history = state.history;
|
|
64
87
|
useEffect(function () {
|
|
88
|
+
var s,
|
|
89
|
+
e = '';
|
|
65
90
|
if (dateType === 'custom') {
|
|
66
91
|
setState({
|
|
67
92
|
datePickerDisabled: false
|
|
@@ -70,42 +95,47 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
70
95
|
setState({
|
|
71
96
|
datePickerDisabled: true
|
|
72
97
|
});
|
|
73
|
-
if (dateType === 'dayBeforeYesterday') {
|
|
74
|
-
setState({
|
|
75
|
-
startTime: dayjs().subtract(2, 'day').format('YYYY-MM-DD 00:00:00'),
|
|
76
|
-
endTime: dayjs().subtract(2, 'day').format('YYYY-MM-DD 23:59:59')
|
|
77
|
-
});
|
|
78
|
-
} else if (dateType === 'yesterday') {
|
|
79
|
-
setState({
|
|
80
|
-
startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD 00:00:00'),
|
|
81
|
-
endTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD 23:59:59')
|
|
82
|
-
});
|
|
83
|
-
} else if (dateType === 'today') {
|
|
84
|
-
setState({
|
|
85
|
-
startTime: dayjs().format('YYYY-MM-DD 00:00:00'),
|
|
86
|
-
endTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
98
|
}
|
|
99
|
+
if (dateType === 'dayBeforeYesterday') {
|
|
100
|
+
s = dayjs().subtract(2, 'day').format('YYYY-MM-DD 00:00:00');
|
|
101
|
+
e = dayjs().subtract(2, 'day').format('YYYY-MM-DD 23:59:59');
|
|
102
|
+
} else if (dateType === 'yesterday') {
|
|
103
|
+
s = dayjs().subtract(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
104
|
+
e = dayjs().subtract(1, 'day').format('YYYY-MM-DD 23:59:59');
|
|
105
|
+
} else {
|
|
106
|
+
s = dayjs().format('YYYY-MM-DD 00:00:00');
|
|
107
|
+
e = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
108
|
+
}
|
|
109
|
+
setState({
|
|
110
|
+
startTime: s,
|
|
111
|
+
endTime: e
|
|
112
|
+
});
|
|
113
|
+
form.setFieldsValue({
|
|
114
|
+
beginTime: dayjs(s),
|
|
115
|
+
endTime: dayjs(e)
|
|
116
|
+
});
|
|
90
117
|
}, [dateType]);
|
|
91
118
|
useEffect(function () {
|
|
92
119
|
if (channels !== null && channels !== void 0 && channels.length && tabKey === '1') {
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
120
|
+
var defaultCheckedChannels = channels.map(function (channel, index) {
|
|
121
|
+
return _objectSpread(_objectSpread({}, channel), {}, {
|
|
122
|
+
checked: index < 4
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
Promise.all(channels.slice(0, 4).map(function (ele) {
|
|
97
126
|
return getPreviewUrl({
|
|
98
127
|
channelNum: ele.channelNum,
|
|
99
128
|
deviceId: ele.videoDeviceId
|
|
100
129
|
});
|
|
101
130
|
})).then(function (res) {
|
|
102
|
-
setCheckedChannels(
|
|
103
|
-
|
|
131
|
+
setCheckedChannels(defaultCheckedChannels.map(function (channel, index) {
|
|
132
|
+
var _res$index;
|
|
133
|
+
return _objectSpread(_objectSpread(_objectSpread({}, channel), index < 4 ? (_res$index = res[index]) === null || _res$index === void 0 ? void 0 : _res$index.data : {}), {}, {
|
|
104
134
|
checked: index < 4
|
|
105
135
|
});
|
|
106
136
|
}));
|
|
107
137
|
});
|
|
108
|
-
}
|
|
138
|
+
}
|
|
109
139
|
if (tabKey === '2') {
|
|
110
140
|
var _channels$;
|
|
111
141
|
form.setFieldsValue({
|
|
@@ -158,13 +188,27 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
158
188
|
onChange: function onChange(e) {
|
|
159
189
|
var list = cloneDeep(checkedChannels);
|
|
160
190
|
if (e.target.checked) {
|
|
191
|
+
var selectedCount = list.filter(function (channel) {
|
|
192
|
+
return channel.checked;
|
|
193
|
+
}).length + 1;
|
|
194
|
+
if (selectedCount > 9) {
|
|
195
|
+
message.warning('同时播放通道不能超过9路');
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (selectedCount > Number(mode)) {
|
|
199
|
+
setMode(selectedCount <= 4 ? '4' : '9');
|
|
200
|
+
}
|
|
161
201
|
getPreviewUrl({
|
|
162
202
|
channelNum: ele.channelNum,
|
|
163
|
-
deviceId: ele.deviceId
|
|
203
|
+
deviceId: ele.videoDeviceId || ele.deviceId
|
|
164
204
|
}).then(function (res) {
|
|
165
|
-
|
|
205
|
+
var _res$data, _res$data2;
|
|
206
|
+
var currentChannel = list[index];
|
|
207
|
+
list[index] = _objectSpread(_objectSpread(_objectSpread({}, currentChannel), res.data), {}, {
|
|
208
|
+
channelName: currentChannel.channelName || ((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.channelName),
|
|
209
|
+
deviceName: currentChannel.deviceName || ((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.deviceName),
|
|
166
210
|
checked: true
|
|
167
|
-
}
|
|
211
|
+
});
|
|
168
212
|
setCheckedChannels(list);
|
|
169
213
|
});
|
|
170
214
|
} else {
|
|
@@ -200,8 +244,8 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
200
244
|
requiredMark: false,
|
|
201
245
|
colon: true,
|
|
202
246
|
initialValues: {
|
|
203
|
-
beginTime: startTime ? dayjs(startTime) : dayjs().
|
|
204
|
-
endTime: endTime ? dayjs(endTime) : dayjs().
|
|
247
|
+
beginTime: startTime ? dayjs(startTime) : dayjs().startOf('day'),
|
|
248
|
+
endTime: endTime ? dayjs(endTime) : dayjs().endOf('day')
|
|
205
249
|
},
|
|
206
250
|
autoComplete: "off",
|
|
207
251
|
children: [/*#__PURE__*/_jsx(Form.Item, {
|
|
@@ -353,15 +397,23 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
353
397
|
key: '9'
|
|
354
398
|
}],
|
|
355
399
|
onChange: function onChange(key) {
|
|
356
|
-
|
|
400
|
+
var selectedCount = checkedChannels.filter(function (channel) {
|
|
401
|
+
return channel.checked;
|
|
402
|
+
}).length;
|
|
403
|
+
setMode(selectedCount > Number(key) ? selectedCount <= 4 ? '4' : '9' : key);
|
|
357
404
|
}
|
|
358
405
|
}) : /*#__PURE__*/_jsx(_Fragment, {})
|
|
359
406
|
}), /*#__PURE__*/_jsx("div", {
|
|
360
407
|
className: "vm-video-content _".concat(mode),
|
|
361
|
-
children: tabKey === '1' ? getGridItems(mode, checkedChannels
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
408
|
+
children: tabKey === '1' ? getGridItems(mode, checkedChannels, setCheckedChannels) : /*#__PURE__*/_jsx(HistoryGrid, {
|
|
409
|
+
channel: history,
|
|
410
|
+
startTime: startTime,
|
|
411
|
+
endTime: endTime,
|
|
412
|
+
onClose: function onClose() {
|
|
413
|
+
setState({
|
|
414
|
+
history: {}
|
|
415
|
+
});
|
|
416
|
+
}
|
|
365
417
|
})
|
|
366
418
|
})]
|
|
367
419
|
})]
|
|
@@ -369,18 +421,28 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
369
421
|
};
|
|
370
422
|
export default VmVideo;
|
|
371
423
|
var getGridItems = function getGridItems(latestGrid, channels, setCheckedChannels) {
|
|
424
|
+
var selectedChannels = channels.filter(function (channel) {
|
|
425
|
+
return channel.checked;
|
|
426
|
+
});
|
|
372
427
|
var items = [];
|
|
373
428
|
var _loop = function _loop(i) {
|
|
374
429
|
var element = /*#__PURE__*/_jsx(RealtimeGrid, {
|
|
375
|
-
channel:
|
|
430
|
+
channel: selectedChannels[i] || {
|
|
376
431
|
channelNum: '',
|
|
377
432
|
channelId: ''
|
|
378
433
|
},
|
|
379
434
|
onClose: function onClose() {
|
|
380
435
|
var list = cloneDeep(channels);
|
|
381
|
-
list
|
|
382
|
-
|
|
383
|
-
|
|
436
|
+
var channelIndex = list.findIndex(function (channel) {
|
|
437
|
+
var _selectedChannels$i;
|
|
438
|
+
return channel.channelNum === ((_selectedChannels$i = selectedChannels[i]) === null || _selectedChannels$i === void 0 ? void 0 : _selectedChannels$i.channelNum);
|
|
439
|
+
});
|
|
440
|
+
if (channelIndex === -1) {
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
list[channelIndex].checked = false;
|
|
444
|
+
list[channelIndex].url = '';
|
|
445
|
+
list[channelIndex].player = '';
|
|
384
446
|
setCheckedChannels(list);
|
|
385
447
|
},
|
|
386
448
|
scale: 1
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
|
|
62
62
|
.channels--item {
|
|
63
63
|
svg {
|
|
64
|
-
|
|
64
|
+
display: block;
|
|
65
65
|
margin-right: 2px;
|
|
66
66
|
}
|
|
67
67
|
.ant-checkbox {
|
|
68
|
-
|
|
68
|
+
top: 0;
|
|
69
69
|
}
|
|
70
70
|
.ant-checkbox-checked .ant-checkbox-inner {
|
|
71
71
|
background-color: var(--check-bg);
|
|
@@ -79,10 +79,14 @@
|
|
|
79
79
|
height: 15px;
|
|
80
80
|
}
|
|
81
81
|
.ant-checkbox-wrapper {
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
align-items: center;
|
|
82
84
|
font-size: 15px;
|
|
83
85
|
// color: var(--modal-title-color);
|
|
84
86
|
}
|
|
85
87
|
.ant-checkbox + span {
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
86
90
|
padding: 0 4px;
|
|
87
91
|
}
|
|
88
92
|
}
|
|
@@ -18,7 +18,7 @@ import useSettings from "../../_hooks/useSettings";
|
|
|
18
18
|
import { ChartIcon, DateIcon, ListIcon } from "../../_util/iconSvgHtml";
|
|
19
19
|
import VmFilter from "../vm-filter";
|
|
20
20
|
import "./style";
|
|
21
|
-
import { translateLocaleText } from "./../../hooks/useTranslation.
|
|
21
|
+
import { translateLocaleText } from "./../../hooks/useTranslation.js";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
var VMDatePicker = VmFilter.VMDatePicker,
|
|
24
24
|
VMMonthPicker = VmFilter.VMMonthPicker,
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
1
5
|
import { useRequest } from 'ahooks';
|
|
2
6
|
import http from "../_util/http";
|
|
3
7
|
export default (function (billId, ready) {
|
|
4
|
-
var _useRequest = useRequest(function () {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
var _useRequest = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9
|
+
var url;
|
|
10
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12
|
+
case 0:
|
|
13
|
+
url = "".concat(process.env.PREFIX || '', "/cloud/vis/base/np/videoDevice/loadVideoChannelByBillId.smvc");
|
|
14
|
+
return _context.abrupt("return", http.get(url, {
|
|
15
|
+
body: {
|
|
16
|
+
billId: billId
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
case 2:
|
|
20
|
+
case "end":
|
|
21
|
+
return _context.stop();
|
|
8
22
|
}
|
|
9
|
-
});
|
|
10
|
-
}, {
|
|
23
|
+
}, _callee);
|
|
24
|
+
})), {
|
|
11
25
|
ready: ready,
|
|
12
26
|
refreshDeps: [billId]
|
|
13
27
|
}),
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { request } from '@vtx/utils';
|
|
8
|
+
import { useRequest } from 'ahooks';
|
|
9
|
+
import { useState } from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* 获取终端、人员服务配置信息
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export var useZdService = function useZdService() {
|
|
15
|
+
var _useState = useState({
|
|
16
|
+
zdService: 'zd',
|
|
17
|
+
ryService: 'staff'
|
|
18
|
+
}),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
serviceConfig = _useState2[0],
|
|
21
|
+
setServiceConfig = _useState2[1];
|
|
22
|
+
useRequest(function () {
|
|
23
|
+
return request.get('/cloud/management/api/v101/user/config/component/get', {
|
|
24
|
+
data: {
|
|
25
|
+
componentCode: 'POPUP_MODAL_SERVICE'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, {
|
|
29
|
+
onSuccess: function onSuccess(data) {
|
|
30
|
+
var _data$data;
|
|
31
|
+
var json = data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.configInfo;
|
|
32
|
+
if (json) setServiceConfig(JSON.parse(json));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return serviceConfig;
|
|
36
|
+
};
|
package/lib/_service/index.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
1
|
import { request } from '@vtx/utils';
|
|
8
2
|
import { useRequest } from 'ahooks';
|
|
9
3
|
var CommonService = {
|
|
10
4
|
useBaseInfo: function useBaseInfo(id) {
|
|
11
|
-
var _baseInfoRes$data, _baseInfoRes$data2, _tabConfig$data;
|
|
12
5
|
var coordType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'wgs84';
|
|
13
6
|
var _useRequest = useRequest(function () {
|
|
14
7
|
return request.get('/cloud/jcss-reborn/facility/get', {
|
|
@@ -22,36 +15,17 @@ var CommonService = {
|
|
|
22
15
|
}),
|
|
23
16
|
baseInfoRes = _useRequest.data;
|
|
24
17
|
var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
|
|
25
|
-
var _useRequest2 = useRequest(function () {
|
|
26
|
-
return request.get('/cloud/jcss-reborn/facility/type/config/getByCode', {
|
|
27
|
-
data: {
|
|
28
|
-
code: baseInfoRes.data.typeCode
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}, {
|
|
32
|
-
ready: !!(baseInfoRes !== null && baseInfoRes !== void 0 && (_baseInfoRes$data = baseInfoRes.data) !== null && _baseInfoRes$data !== void 0 && _baseInfoRes$data.typeCode),
|
|
33
|
-
refreshDeps: [baseInfoRes === null || baseInfoRes === void 0 || (_baseInfoRes$data2 = baseInfoRes.data) === null || _baseInfoRes$data2 === void 0 ? void 0 : _baseInfoRes$data2.typeCode]
|
|
34
|
-
}),
|
|
35
|
-
tabConfig = _useRequest2.data;
|
|
36
18
|
var photos = info !== null && info !== void 0 && info.photoIds ? JSON.parse(info.photoIds) : info !== null && info !== void 0 && info.typePhotoIds ? JSON.parse(info.typePhotoIds) : [];
|
|
37
19
|
return {
|
|
38
20
|
photos: photos,
|
|
39
21
|
code: info === null || info === void 0 ? void 0 : info.code,
|
|
40
|
-
info: info
|
|
41
|
-
tabConfig: (tabConfig === null || tabConfig === void 0 || (_tabConfig$data = tabConfig.data) === null || _tabConfig$data === void 0 || (_tabConfig$data = _tabConfig$data.popupConfigJson) === null || _tabConfig$data === void 0 ? void 0 : _tabConfig$data.filter(function (ele) {
|
|
42
|
-
return ele.display;
|
|
43
|
-
}).map(function (ele) {
|
|
44
|
-
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
45
|
-
key: ele.code,
|
|
46
|
-
title: ele.name
|
|
47
|
-
});
|
|
48
|
-
})) || []
|
|
22
|
+
info: info
|
|
49
23
|
};
|
|
50
24
|
},
|
|
51
25
|
//基础设施详情展示字段
|
|
52
26
|
useGetFields: function useGetFields(code) {
|
|
53
27
|
var _data$data$baseFields;
|
|
54
|
-
var
|
|
28
|
+
var _useRequest2 = useRequest(function () {
|
|
55
29
|
return request.get('/cloud/jcss-reborn/facility/type/view/detail', {
|
|
56
30
|
data: {
|
|
57
31
|
code: code
|
|
@@ -61,14 +35,14 @@ var CommonService = {
|
|
|
61
35
|
refreshDeps: [code],
|
|
62
36
|
ready: !!code
|
|
63
37
|
}),
|
|
64
|
-
data =
|
|
38
|
+
data = _useRequest2.data;
|
|
65
39
|
return data !== null && data !== void 0 && data.data ? ((_data$data$baseFields = data.data.baseFields) === null || _data$data$baseFields === void 0 ? void 0 : _data$data$baseFields.filter(function (ele) {
|
|
66
40
|
return !['photoIds', 'geometryInfo', 'orderIndex', 'geoPointLocation', 'geoLineLocation', 'geoPolygonLocation'].includes(ele.key);
|
|
67
41
|
}).concat(data.data.customFields)) || [] : [];
|
|
68
42
|
},
|
|
69
43
|
// 计量详情
|
|
70
44
|
useLmDetail: function useLmDetail(id, hasConfig) {
|
|
71
|
-
var
|
|
45
|
+
var _useRequest3 = useRequest(function () {
|
|
72
46
|
return request.get('/cloud/zd/base/api/cp/commonFactory/getCommonFactoryById.smvc', {
|
|
73
47
|
data: {
|
|
74
48
|
factoryId: id
|
|
@@ -78,14 +52,14 @@ var CommonService = {
|
|
|
78
52
|
refreshDeps: [id],
|
|
79
53
|
ready: hasConfig
|
|
80
54
|
}),
|
|
81
|
-
res =
|
|
55
|
+
res = _useRequest3.data;
|
|
82
56
|
return {
|
|
83
57
|
detail: (res === null || res === void 0 ? void 0 : res.data) || {}
|
|
84
58
|
};
|
|
85
59
|
},
|
|
86
60
|
// 计量详情
|
|
87
61
|
useLmDetailZdReborn: function useLmDetailZdReborn(id) {
|
|
88
|
-
var
|
|
62
|
+
var _useRequest4 = useRequest(function () {
|
|
89
63
|
return request.post('/cloud/zd-reborn/api/base/commonFactory/getCommonFactoryById?factoryId=' + id, {
|
|
90
64
|
data: JSON.stringify({
|
|
91
65
|
factoryId: id
|
|
@@ -94,7 +68,7 @@ var CommonService = {
|
|
|
94
68
|
}, {
|
|
95
69
|
refreshDeps: [id]
|
|
96
70
|
}),
|
|
97
|
-
res =
|
|
71
|
+
res = _useRequest4.data;
|
|
98
72
|
return {
|
|
99
73
|
detail: (res === null || res === void 0 ? void 0 : res.data) || {}
|
|
100
74
|
};
|
package/lib/_util/http.js
CHANGED
|
@@ -15,7 +15,7 @@ import { message } from 'antd';
|
|
|
15
15
|
import isObject from 'lodash/isObject';
|
|
16
16
|
import pickBy from 'lodash/pickBy';
|
|
17
17
|
import qs from 'qs';
|
|
18
|
-
import { translateLocaleText } from "../hooks/useTranslation.
|
|
18
|
+
import { translateLocaleText } from "../hooks/useTranslation.js";
|
|
19
19
|
var SECOND = 30;
|
|
20
20
|
var MILL_SECOND = 1000;
|
|
21
21
|
var baseUrlPrefix = process.env.PREFIX ? "/".concat(process.env.PREFIX) : '';
|
|
@@ -78,6 +78,32 @@ var Http = /*#__PURE__*/function () {
|
|
|
78
78
|
} : {})
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 判断接口是否存在
|
|
84
|
+
* @param {*} url
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "exists",
|
|
88
|
+
value: function exists(url) {
|
|
89
|
+
var _url = baseUrlPrefix + url;
|
|
90
|
+
var token = getVtxToken('token');
|
|
91
|
+
return axios.head(_url, {
|
|
92
|
+
validateStatus: function validateStatus() {
|
|
93
|
+
return true;
|
|
94
|
+
},
|
|
95
|
+
headers: {
|
|
96
|
+
Authorization: token ? "Bearer ".concat(token) : '',
|
|
97
|
+
tenantId: getVtxToken('tenantId'),
|
|
98
|
+
userId: getVtxToken('userId')
|
|
99
|
+
}
|
|
100
|
+
}).then(function (res) {
|
|
101
|
+
return res.status !== 404;
|
|
102
|
+
}).catch(function (error) {
|
|
103
|
+
var _error$response;
|
|
104
|
+
return (error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) !== 404;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
81
107
|
/**
|
|
82
108
|
* get 请求
|
|
83
109
|
* @param {*} url
|
|
@@ -225,13 +251,14 @@ var Http = /*#__PURE__*/function () {
|
|
|
225
251
|
value: function _responseHandler(response) {
|
|
226
252
|
var status = response.status,
|
|
227
253
|
data = response.data,
|
|
228
|
-
statusText = response.statusText
|
|
254
|
+
statusText = response.statusText,
|
|
255
|
+
config = response.config;
|
|
229
256
|
if (status >= 200 && status < 300) {
|
|
230
257
|
if (data.result === 0) {
|
|
231
258
|
return data;
|
|
232
259
|
} else {
|
|
233
|
-
var _config,
|
|
234
|
-
if ((
|
|
260
|
+
var _config$url, _config$url2;
|
|
261
|
+
if ((config === null || config === void 0 || (_config$url = config.url) === null || _config$url === void 0 ? void 0 : _config$url.indexOf('zdjg/jg/data/getJgDataStatistics')) > -1 || (config === null || config === void 0 || (_config$url2 = config.url) === null || _config$url2 === void 0 ? void 0 : _config$url2.indexOf('/cloud/zd/base/api/cp/commonFactory')) > -1) {
|
|
235
262
|
return;
|
|
236
263
|
}
|
|
237
264
|
message.error(data.msg || translateLocaleText("t('common.requestInfoError')"));
|