Commit 0131ec0ebb06a4110bacfd2fc05b270681cb6248

Authored by 潘钊
1 parent c9cf8588

安全驾驶 和 dvr 相关

src/main/resources/static/real_control_v2/fragments/north/nav/safeDriving.html
1 <div class="uk-modal ct_move_modal" id="safe_dring_list-modal" style="z-index: 99;"> 1 <div class="uk-modal ct_move_modal" id="safe_dring_list-modal" style="z-index: 99;">
2 - <div class="uk-modal-dialog" style="width: 1100px;"> 2 + <div class="uk-modal-dialog" style="width: 1150px;">
3 <a href="" class="uk-modal-close uk-close"></a> 3 <a href="" class="uk-modal-close uk-close"></a>
4 <div class="uk-modal-header"> 4 <div class="uk-modal-header">
5 <h2>安全驾驶图像信息(当日)</h2></div> 5 <h2>安全驾驶图像信息(当日)</h2></div>
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <option value="A7">行驶中与人交谈</option> 26 <option value="A7">行驶中与人交谈</option>
27 </select> 27 </select>
28 <button class="uk-button">检索</button> 28 <button class="uk-button">检索</button>
29 - <a id="showSSSpVedioModal" style="color: red;float: right;font-size: 12px;">查看实时视频</a> 29 + <!--<a id="showSSSpVedioModal" style="color: red;float: right;font-size: 12px;">查看实时视频</a>-->
30 </fieldset> 30 </fieldset>
31 </form> 31 </form>
32 </div> 32 </div>
@@ -34,14 +34,15 @@ @@ -34,14 +34,15 @@
34 <table class="ct-fixed-table uk-table uk-table-hover"> 34 <table class="ct-fixed-table uk-table uk-table-hover">
35 <thead> 35 <thead>
36 <tr> 36 <tr>
37 - <th style="width: 12%;">线路</th>  
38 - <th style="width: 13%;">车辆自编号</th>  
39 - <th style="width: 13%;">设备</th>  
40 - <th style="width: 13%;">异常类型</th>  
41 - <th style="width: 17%;">时间</th>  
42 - <th style="width: 11%;">检查属性</th>  
43 - <th style="width: 11%;">图像</th> 37 + <th style="width: 10%;">线路</th>
  38 + <th style="width: 11%;">车辆自编号</th>
  39 + <th style="width: 12%;">设备</th>
  40 + <th style="width: 12%;">异常类型</th>
  41 + <th style="width: 16%;">时间</th>
  42 + <th style="width: 10%;">检查属性</th>
  43 + <th style="width: 10%;">图像</th>
44 <th>视频</th> 44 <th>视频</th>
  45 + <th style="width: 8%;">实时视频</th>
45 </tr> 46 </tr>
46 </thead> 47 </thead>
47 <tbody data-uk-observe> 48 <tbody data-uk-observe>
@@ -75,7 +76,10 @@ @@ -75,7 +76,10 @@
75 <a class="image_link" href="{{sd.url}}.jpg" data-uk-lightbox="{group:'jpg_group1'}" title="{{sd.title}}">JPG</a> 76 <a class="image_link" href="{{sd.url}}.jpg" data-uk-lightbox="{group:'jpg_group1'}" title="{{sd.title}}">JPG</a>
76 </td> 77 </td>
77 <td> 78 <td>
78 - <a class="image_link" href="{{sd.url}}.gif" data-uk-lightbox="{group:'gif_group2'}" title="{{sd.title}}">查看视频</a> 79 + <a class="image_link" href="{{sd.url}}.gif" data-uk-lightbox="{group:'gif_group2'}" title="{{sd.title}}">查看</a>
  80 + </td>
  81 + <td>
  82 + <a data-type="{{sd.yczltype}}" class="show_vedio_modal">DVR</a>
79 </td> 83 </td>
80 </tr> 84 </tr>
81 {{/each}} 85 {{/each}}
@@ -88,9 +92,14 @@ @@ -88,9 +92,14 @@
88 var page = 0; 92 var page = 0;
89 var pageSize = 12; 93 var pageSize = 12;
90 94
91 - $('#showSSSpVedioModal', modal).on('click', function () { 95 + /*$('#showSSSpVedioModal', modal).on('click', function () {
92 gb_safe_driv.showVedioModal(); 96 gb_safe_driv.showVedioModal();
  97 + });*/
  98 + //show_vedio_modal
  99 + $(modal).on('click', '.show_vedio_modal', function () {
  100 + gb_safe_driv.showVedioModal($(this).data('type'));
93 }); 101 });
  102 +
94 $(modal).on('init', function(e, data) { 103 $(modal).on('init', function(e, data) {
95 e.stopPropagation(); 104 e.stopPropagation();
96 105
src/main/resources/static/real_control_v2/js/safe_driv/safeDriv.js
@@ -10,7 +10,8 @@ var gb_safe_driv = (function () { @@ -10,7 +10,8 @@ var gb_safe_driv = (function () {
10 'A4': '未戴袖章', 10 'A4': '未戴袖章',
11 'A5': '眨眼/疲劳驾驶', 11 'A5': '眨眼/疲劳驾驶',
12 'A6': '打哈欠/打瞌睡', 12 'A6': '打哈欠/打瞌睡',
13 - 'A7': '与人交谈' 13 + 'A7': '与人交谈',
  14 + 'A9': '玩手机'
14 }; 15 };
15 16
16 var path = 'http://118.178.187.115/CurrentSafeDriving/'; 17 var path = 'http://118.178.187.115/CurrentSafeDriving/';
@@ -32,7 +33,7 @@ var gb_safe_driv = (function () { @@ -32,7 +33,7 @@ var gb_safe_driv = (function () {
32 //图片地址 33 //图片地址
33 var p = (sd.sbbh+'_'+sd.yczltype+'_'+stm.format('YYYYMMDDHHmmss')); 34 var p = (sd.sbbh+'_'+sd.yczltype+'_'+stm.format('YYYYMMDDHHmmss'));
34 var url = stm.format('YYYYMMDD')+'/'+p+'/'+p; 35 var url = stm.format('YYYYMMDD')+'/'+p+'/'+p;
35 - sd.url = path + url + '.jpg'; 36 + sd.url = path + url + '.gif';
36 37
37 var htmlStr = template('safe_driv_item-temp', sd); 38 var htmlStr = template('safe_driv_item-temp', sd);
38 var items = $wrap.find('.safe_driv_pop'), len = items.length; 39 var items = $wrap.find('.safe_driv_pop'), len = items.length;
@@ -46,12 +47,12 @@ var gb_safe_driv = (function () { @@ -46,12 +47,12 @@ var gb_safe_driv = (function () {
46 '<div class="uk-modal-dialog uk-modal-dialog-large">' + 47 '<div class="uk-modal-dialog uk-modal-dialog-large">' +
47 '<button type="button" class="uk-modal-close uk-close"></button>' + 48 '<button type="button" class="uk-modal-close uk-close"></button>' +
48 '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+ 49 '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+
49 - '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe id="vedioIframe" src="http://222.66.0.204:8910/transport_server/dvr_monitor1.jsp?deviceId=229L0650&channel=0"></iframe>' + 50 + '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe id="vedioIframe" src="http://222.66.0.204:8910/transport_server/dvr_monitor1.jsp?deviceId=229L0650&channel=^^channel^^"></iframe>' +
50 '</div>' + 51 '</div>' +
51 '</div>'; 52 '</div>';
52 53
53 $wrap.on('click', '.safe_driv_pop', function () { 54 $wrap.on('click', '.safe_driv_pop', function () {
54 - var title = $(this).data('title') + '&nbsp;<button class="uk-button uk-button-mini uk-button-primary" id="openVedioModalBtn" type="button">查看实时视频</button>'; 55 + var title = $(this).data('title') + '&nbsp;<button data-type="'+$(this).data('type')+'" class="uk-button uk-button-mini uk-button-primary" id="openVedioModalBtn" type="button">查看实时视频</button>';
55 var url = $(this).data('url'); 56 var url = $(this).data('url');
56 $(this).remove(); 57 $(this).remove();
57 var lightbox = UIkit.lightbox.create([ 58 var lightbox = UIkit.lightbox.create([
@@ -61,8 +62,19 @@ var gb_safe_driv = (function () { @@ -61,8 +62,19 @@ var gb_safe_driv = (function () {
61 lightbox.show(); 62 lightbox.show();
62 }); 63 });
63 64
64 - var showVedioModal = function () {  
65 - open_modal_dom(vedioModal ,{}, {modal: false}); 65 + var channelMap = {
  66 + 'A1': 1,
  67 + 'A2': 1,
  68 + 'A3': 1,
  69 + 'A9': 1,
  70 + 'A4': 2,
  71 + 'A5': 2,
  72 + 'A6': 2,
  73 + 'A7': 2
  74 + };
  75 + var showVedioModal = function (type) {
  76 + var channel = channelMap[type]?channelMap[type]:1;
  77 + open_modal_dom(vedioModal.replace('^^channel^^', channel) ,{}, {modal: false});
66 $('#ssspVedioModal #vedioIframe').on('load', function () { 78 $('#ssspVedioModal #vedioIframe').on('load', function () {
67 var that = this; 79 var that = this;
68 setTimeout(function () { 80 setTimeout(function () {
@@ -72,7 +84,9 @@ var gb_safe_driv = (function () { @@ -72,7 +84,9 @@ var gb_safe_driv = (function () {
72 }); 84 });
73 }; 85 };
74 86
75 - $(document).on('click', '#openVedioModalBtn', showVedioModal); 87 + $(document).on('click', '#openVedioModalBtn', function () {
  88 + showVedioModal($(this).data('type'));
  89 + });
76 90
77 91
78 return { 92 return {
src/main/resources/static/real_control_v2/main.html
@@ -206,7 +206,7 @@ @@ -206,7 +206,7 @@
206 <!-- #### 安全驾驶 start ### --> 206 <!-- #### 安全驾驶 start ### -->
207 <div class="safe_driv_pop_wrap" ></div> 207 <div class="safe_driv_pop_wrap" ></div>
208 <script id="safe_driv_item-temp" type="text/html"> 208 <script id="safe_driv_item-temp" type="text/html">
209 - <div class="safe_driv_pop uk-animation-slide-bottom" data-title="{{clzbh}} {{timeStr}} {{ycztText}}" data-url="{{url}}"> 209 + <div class="safe_driv_pop uk-animation-slide-bottom" data-type="{{yczltype}}" data-title="{{clzbh}} {{timeStr}} {{ycztText}}" data-url="{{url}}">
210 <div> 210 <div>
211 <span class="title">异常&nbsp;{{clzbh}}</span> 211 <span class="title">异常&nbsp;{{clzbh}}</span>
212 <span class="text"> {{timeStr}} 出现违规驾驶({{ycztText}})</span> 212 <span class="text"> {{timeStr}} 出现违规驾驶({{ycztText}})</span>