wenhongquan 9 лет назад
Родитель
Сommit
e7fe02e0b5

+ 10 - 6
VisualInspection/js/mytask/check.js

@@ -1,6 +1,10 @@
 function initCheck() {
+      event = document.createEvent('MessageEvent');
+		var origin = window.location.protocol + '//' + window.location.host;
+		event.initMessageEvent ('setvideoposition', true, true, getVideoPosition(), origin, 1234, window, null);
+		document.dispatchEvent (event);
+
 
-    alert(getVideoPosition())
 
     // 仅选择日期
     $("#start-time").datetimepicker({
@@ -351,9 +355,9 @@ function agreeApply() {
 
 
 function getVideoPosition() {
-    var X = $('#tabContent1').offset().top;
-    var Y = $('#tabContent1').offset().left;
-    var width = $('#tabContent1').width();
-    var height = $('#tabContent1').height();
-    return X + "|" + Y+ "|" +width+ "|" + height;
+    var X = $('#tabcontent').offset().top;
+    var Y = $('#tabcontent').offset().left;
+    var width = $('#tabcontent').width();
+    var height = $('#tabcontent').height();
+    return parseInt(Y) + "|" + parseInt(X)+ "|" +parseInt(width)+ "|" + parseInt(height);
 }

+ 1 - 1
VisualInspection/js/mytask/unchecked.js

@@ -80,7 +80,7 @@ function showApplyDetail(id){
         btnAlign: 'c', //按钮居中
         shade: 0 ,//不显示遮罩
         yes: function(index){
-            aggreeApply(id,);
+            aggreeApply(id);
             layer.close(index);
         },
         btn2: function(index){

+ 1 - 1
VisualInspection/view/mytask/check.html

@@ -41,7 +41,7 @@
                             <li><a data-tab href="#tabContent2">车道</a></li>
                             <li><a data-tab href="#tabContent3">广场</a></li>
                         </ul>
-                        <div class="tab-content" style="height:330px;">
+                        <div class="tab-content" id="tabcontent" style="height:330px;">
                             <div class="tab-pane active" id="tabContent1" class="col-sm-12">
                             </div>
                             <div class="tab-pane" id="tabContent2" class="col-sm-12">