xzw 4 years ago
parent
commit
04719eaabf
2 changed files with 32 additions and 43 deletions
  1. 28 39
      js/main_2020_show.js
  2. 4 4
      js/showHardware.js

+ 28 - 39
js/main_2020_show.js

@@ -15848,44 +15848,31 @@ window.Modernizr = function(n, e, t) {
                                                                     }, 
                                                                     (data3)=>{
                                                                         console.log(data3) 
-                                                                        if(data3.code == 0){
-                                                                            
-                                                                            /* address: null
-                                                                            creationTime: null
-                                                                            deviceId: null
-                                                                            endTime: "2021-05-13 12:00:01"
-                                                                            filePath: null
-                                                                            fileSize: null
-                                                                            id: null
-                                                                            name: null
-                                                                            secrecy: null
-                                                                            startTime: "2021-05-13 11:00:08"
-                                                                            sumNum: null
-                                                                            type: null */
+                                                                        if(data3.code == 0){ 
                                                                             var timeList = data3.data;
                                                                             if(timeList){ 
-                                                                                /* channelId: "34020000001320010059"
-                                                                                endTime: "2021-05-13 13:00:01"
-                                                                                startTime: "2021-05-13 12:00:01" */
-                                                                                
-                                                                                getAjax(`/api/device/camera/playBack`, {
-                                                                                    "channelId": hardware.code,
-                                                                                    "endTime": "2021-05-13 13:00:01",
-                                                                                    "startTime": "2021-05-13 12:00:01"
-                                                                                },(data4)=>{
-                                                                                    if (data4.code == 0) {
-                                                                                        loadMonitor({
-                                                                                            id: "monitor",
-                                                                                            url: data4.result.external.hls //'http://14.215.216.123:18080/rtp/00A153DF/hls.m3u8'
-                                                                                        })
-                                                                                    }
+                                                                                window.loadHistoryList({ 
+                                                                                    data:timeList, 
+                                                                                    clickItem:(item)=>{//点击时间
+                                                                                        console.log(item);
+                                                                                        getAjax(`/api/device/camera/playBack`, {
+                                                                                            "channelId": hardware.code,
+                                                                                            "endTime": item.endTime,//"2021-05-13 13:00:01",
+                                                                                            "startTime": item.startTime,//"2021-05-13 12:00:01"
+                                                                                        },(data4)=>{
+                                                                                            if (data4.code == 0) {
+                                                                                                loadMonitor({
+                                                                                                    id: "monitor",
+                                                                                                    url: data4.data.external.hls //'http://14.215.216.123:18080/rtp/00A153DF/hls.m3u8'
+                                                                                                })
+                                                                                            }
                                                                                     
-                                                                                }, "获取视频地址失败")
+                                                                                        }, "获取视频回放地址失败", 'POST')
+                                                                                    }
+                                                                                }) 
+                                                                                
                                                                             }
-                                                                        }
-                                                                            
-                                                                            
-                                                                            
+                                                                        }     
                                                                     
                                                                     }, '获取视频日历day失败', 'POST'
                                                                 )
@@ -15897,11 +15884,13 @@ window.Modernizr = function(n, e, t) {
                                                         monthCb: (item)=>{
                                                             console.log(item); 
                                                             console.log(calendar.options.currentDate)
-                                                            //getCalendar(item)
-                                                            
-
-                                                        }
-                                                      
+                                                            //getCalendar(item) 
+                                                        },
+                                                        yearSelect: (yearText)=> {
+                                                            console.log(yearText);
+                                                            console.log(calendar.options.currentDate)
+                                                            //getCalendar(item) 
+                                                        },
                                                     })
                                             }
                                         }, "获取视频日历month失败", 'POST')

+ 4 - 4
js/showHardware.js

@@ -431,7 +431,7 @@ $(function () {
   }
 
   
-  let ret = window.loadCalendar({
+  /* let ret = window.loadCalendar({
     data:[{
         'startDate': "2021-05-18",//有监控的日期
         id:'传对应的id'
@@ -448,11 +448,11 @@ $(function () {
       console.log(nextMonth);
     } 
  
-  })
+  }) */
  
     
   
-  window.loadHistoryList({
+ /*  window.loadHistoryList({
     data:[{
       startTime:'2021-05-13 11:00:08',
       endTime:'2021-05-13 11:00:08'
@@ -468,7 +468,7 @@ $(function () {
       console.log(data);
     }
   })
-  
+   */