wenhongquan 8 жил өмнө
parent
commit
193ee62794

BIN
VisualInspection/images/movie.png


+ 1 - 1
VisualInspection/js/config.js

@@ -15,7 +15,7 @@ function getserveraddr(){
         return "http://server_yanhai.jsxt.jsjtyxt.com/";
     }
     else if(base_ui_url.indexOf("localhost")!=-1){
-        return "http://localhost:8089/"
+        return "http://server_yanhai.jsxt.jsjtyxt.com/"
     }
     else if(base_ui_url.indexOf("192.168.8.236")!=-1){
         return "http://192.168.8.236:8089/"

+ 12 - 0
VisualInspection/js/mytask/check.js

@@ -124,11 +124,21 @@ function fullscreen() {
         '                                </div>' +
         '                                <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">' +
         '                                    <select class="form-control" id="full_video_list" style="width:200px;float:left;display:none;"></select>' +
+        '                                      <div class="col-md-4" style="padding-left:0">' +
+        '                                                                      <div class="input-group" style="padding-left:0">' +
+        '                                                                          <input type="text" id="full_video_pos" style="height:42px" class="form-control" placeholder="时间偏移值">' +
+        '                                                                         <span class="input-group-btn">' +
+        '                                                                              <button class="btn btn-default" onclick="setVideoPos()" style="height:42px" type="button">校正</button>' +
+        '                                                                          </span>' +
+        '                                                                      </div>' +
+        '                                                                     </div>' +
         '                                    <div class="btn-group" style="float:right;">' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'start\')"><i class="icon icon-play-circle icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'stop\')"><i class="icon icon-pause icon-2x"></i></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'fast\')"><i class="icon icon-forward icon-2x"></i><span id=\"full_fast_info\"></span></button>' +
         '                                        <button type="button" class="btn btn-info" onclick="doAction(\'slow\')"><span id=\"full_slow_info\"></span><i class="icon icon-backward icon-2x"></i></button>' +
+        '                                        <button type="button" class="btn btn-danger " style="width:51px;height:42px" id="full_video_btn_start" onclick="doAction(\'video_start\')"><img style="width:30px" src="/images/movie.png"></img></i></button>'+
+        '                                        <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="full_video_btn_stop" onclick="doAction(\'video_stop\')"><i class="icon icon-stop icon-2x"></i></button>'+
         '                                        <button type="button" class="btn btn-success" onclick="doAction(\'screenshot\')"><i class="icon icon-camera icon-2x"></i></button>' +
         '                                    </div>' +
         '                                </div>';
@@ -144,6 +154,8 @@ function fullscreen() {
         content: "<div id='layer_content' >" + contenthtml + "</div>",
         success: function (layero, index) {
 
+            $("#full_video_pos").val($("#video_pos").val());
+
             $('#full_ex1').slider({ tooltip: 'hide' });
             $("#full_ex1").on("slideStop", function (slideEvt) {
                 setVideoProcess(slideEvt.value);

+ 36 - 2
VisualInspection/js/util/video.js

@@ -4,7 +4,41 @@ function setProgress(percent){
 }
 
 function doAction(func){
-    callFunc(func, '');
+    if(func.indexOf("video")!=-1){
+       if(func.indexOf("start")!=-1){
+            $("#video_btn_start").addClass("hidden");
+            $("#video_btn_stop").removeClass("hidden");
+            if($("#full_video_btn_start").length>0){
+               $("#full_video_btn_start").addClass("hidden");
+               $("#full_video_btn_stop").removeClass("hidden");
+            }
+       }
+        if(func.indexOf("stop")!=-1){
+            $("#video_btn_start").removeClass("hidden");
+            $("#video_btn_stop").addClass("hidden");
+            if($("#full_video_btn_start").length>0){
+               $("#full_video_btn_stop").addClass("hidden");
+               $("#full_video_btn_start").removeClass("hidden");
+            }
+       }
+       callFunc(func, '');
+    }else{
+       callFunc(func, '');
+    }
+   
+}
+
+function setVideoPos(){
+
+   var pos = $("#video_pos").val();
+   if($("#full_video_pos").length >0){
+       pos = $("#full_video_pos").val();
+   }
+   
+   if(/^(\+|-)?\d+($|\.\d+$)/.test(pos)){
+       callFunc("video_pos", pos);
+   }
+
 }
 
 function queryVideoList(){
@@ -65,7 +99,7 @@ function setCurrentProcessValue(value){
     var vv =maxVV*(value/100)
 
     $("#ex1").slider('setValue',parseInt(vv));
-     if($("#full_ex1")){
+     if($("#full_ex1").length>0){
          $("#full_ex1").slider('setValue',parseInt(vv));
     }
 }

+ 44 - 31
VisualInspection/view/mytask/check.html

@@ -12,7 +12,7 @@
                 <label for="exampleInputAccount1" class="col-sm-1">车道号</label>
                 <div class="col-sm-2">
                     <!--<select class="form-control" id="lane" disabled="disabled"></select>-->
-                    <input type="text" class="form-control" id="lane" disabled="disabled"/>
+                    <input type="text" class="form-control" id="lane" disabled="disabled" />
                 </div>
                 <label class="col-sm-1">考核人员</label>
                 <div class="col-sm-3" id="user_img_container">
@@ -23,7 +23,7 @@
                 <div class="col-sm-1">
                     <button class="btn btn-primary " type="button" onclick="showChangeUser()">更改考核人员</button>
                 </div>
-           
+
             </div>
         </form>
     </div>
@@ -46,34 +46,46 @@
                                     <li class="tab_lane"><a data-tab href="#tabContent3" bbb="2">广场</a></li>
                                     <li class="tab_not_lane"><a data-tab href="#tabContent4" bbb="3">值机室</a></li>
                                 </ul>
-                                <div id="video_content" >
-                                <div class="tab-content" id="tabcontent" style="height:400px;text-align: center;background:black;">
-                                    <p style="padding-top:180px;font-size:20px">加载中...</p>
-                                    <!--<i class="icon icon-spin icon-spinner  icon-5x" style="margin-top:100px"></i>-->
-                                </div>
-                                <div class="row" class="col-md-12" style="padding:5px 10px 5px 10px;text-align:center;margin:0px">
-                                    <input id="ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"
-                                    />
-                                </div>
-                                <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
-                                    <select class="form-control" id="video_list" style="width:200px;float:left;display:none"></select>
-                                    <div class="btn-group" style="float:right;">
-                                        <button type="button" class="btn btn-info" onclick="doAction('start')"><i class="icon icon-play-circle icon-2x"></i></button>
-                                        <button type="button" class="btn btn-info" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
-                                        <button type="button" class="btn btn-info" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
-                                        <button type="button" class="btn btn-info" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
-                                        <button type="button" class="btn btn-success" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
+                                <div id="video_content">
+                                    <div class="tab-content" id="tabcontent" style="height:400px;text-align: center;background:black;">
+                                        <p style="padding-top:180px;font-size:20px">加载中...</p>
+                                        <!--<i class="icon icon-spin icon-spinner  icon-5x" style="margin-top:100px"></i>-->
+                                    </div>
+                                    <div class="row" class="col-md-12" style="padding:5px 10px 5px 10px;text-align:center;margin:0px">
+                                        <input id="ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"
+                                        />
+                                    </div>
+                                    <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
+                                        <select class="form-control" id="video_list" style="width:200px;float:left;display:none"></select>
+                                        <div class="col-md-4" style="padding-left:0">
+                                        <div class="input-group" style="padding-left:0">
+                                            <input type="text" id="video_pos"  style="height:42px" class="form-control" placeholder="时间偏移值">
+                                            <span class="input-group-btn">
+                                                <button class="btn btn-default" style="height:42px" onclick="setVideoPos()" type="button">校正</button>
+                                             </span>
+                                        </div>
+                                        </div>
+                                        <div class="btn-group" style="float:right;">
+                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('start')"><i class="icon icon-play-circle icon-2x"></i></button>
+                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
+                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
+                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
+                                            <button type="button" class="btn btn-danger " style="width:51px;height:42px" id="video_btn_start" onclick="doAction('video_start')"><img style="width:30px" src="/images/movie.png"></img></i></button>
+                                            <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="video_btn_stop" onclick="doAction('video_stop')"><i class="icon icon-stop icon-2x"></i></button>
+                                            <button type="button" class="btn btn-success" style="width:51px;height:42px" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
+
+
+                                        </div>
                                     </div>
                                 </div>
-                                </div> 
                                 <!--<hr>-->
 
                             </div>
                         </div>
                     </div>
                 </section>
-               
-                
+
+
             </div>
 
         </div>
@@ -81,7 +93,7 @@
             <div id="score_datatable" style="height:350px;" data-checkable="true" data-sortable="true"></div>
             <div class="row">
                 <div id="dashboard" class="dashboard dashboard-draggable" data-height="300">
-                    
+
                     <div class="row" class="col-sm-11" style="margin:5px;">
                         <button class="btn btn-primary" type="button" onclick="clearAllImg()" style="margin-right:10px;">清空</button>
                         <button class="btn btn-danger" type="button" onclick="showScore()" style="margin-right:10px;">评分</button>
@@ -126,7 +138,8 @@
     <div>
         <table style="width:100%;">
             <tr>
-                <td width="50%"><button class="btn btn-primary" type="button" onclick="showPre4Appeal()">反馈</button></label></td>
+                <td width="50%"><button class="btn btn-primary" type="button" onclick="showPre4Appeal()">反馈</button></label>
+                </td>
             </tr>
             <tr>
                 <td width="50%">申诉时间:<label id="appeal_time"></label></td>
@@ -184,15 +197,15 @@
         </div>
     </div>
 </div>
-<img id="userBigImg" style="display:none;margin-right:20px;"/>
+<img id="userBigImg" style="display:none;margin-right:20px;" />
 <script>
     var curVideo;
     $(document).ready(function () {
-        if($.checkTask.checked_location_type==1){
+        if ($.checkTask.checked_location_type == 1) {
             $("li.tab_lane").hide();
             $("li.tab_not_lane").show();
             $("li.tab_not_lane").addClass("active");
-        }else{
+        } else {
             $("li.tab_lane").show();
             $("li.tab_not_lane").hide();
             $("li.tab_lane:first").addClass("active");
@@ -204,9 +217,9 @@
             // console.log('上一个标签页', e.relatedTarget);
             var i = $(e.target).attr('bbb');
             var showVideo;
-            if(i==3) {
+            if (i == 3) {
                 showVideo = $.checkTask.video_id;
-            }else {
+            } else {
                 var videos = $.checkTask.video_id.split(',');
                 showVideo = videos[i];
             }
@@ -230,7 +243,7 @@
     $("#box").click(function () {
         return $("#_f").click();
     });
-    
+
     $("#_f").change(function () {
         UpladFile();
     });
@@ -246,7 +259,7 @@
             addPic(base_image_server_url + data.path);
         }, function (error) {
             console.log(error)
-        },"task");
+        }, "task");
     }
 
 </script>