Commit 7c8138e8aa394b0c9d4932d0c85559bdacad6882

Authored by yiming
1 parent 15836e19

大客流自动打开临加班次界面

src/main/resources/static/real_control_v2/css/main.css
@@ -1029,6 +1029,14 @@ option.oil_station_opt { @@ -1029,6 +1029,14 @@ option.oil_station_opt {
1029 background: #ffffff 1029 background: #ffffff
1030 } 1030 }
1031 1031
  1032 +.multi_plat_msg_pop_klyj {
  1033 + position: absolute;
  1034 + right: 12px;
  1035 + bottom: 12px;
  1036 + z-index: 99;
  1037 + background: #ffffff
  1038 +}
  1039 +
1032 .multi_plat_msg_pops { 1040 .multi_plat_msg_pops {
1033 color: grey; 1041 color: grey;
1034 margin: 7px 0; 1042 margin: 7px 0;
src/main/resources/static/real_control_v2/js/stationcf/klyj.js
@@ -2,18 +2,27 @@ @@ -2,18 +2,27 @@
2 * 站点催发 2 * 站点催发
3 */ 3 */
4 var gb_klyj = (function () { 4 var gb_klyj = (function () {
5 - var $wrap = $('.multi_plat_msg_pop_cf');  
6 - var max = 5; 5 + var $wrap = $('.multi_plat_msg_pop_klyj');
  6 + var max = 1;
7 var dataMap = new Map(); 7 var dataMap = new Map();
8 var popcf = function (data) { 8 var popcf = function (data) {
9 dataMap.set(data.uuid,data); 9 dataMap.set(data.uuid,data);
  10 + gb_dataZndd.setDataMap(data.uuid,data);
10 //时间格式化 11 //时间格式化
11 var stm = moment(data.instructionsTime); 12 var stm = moment(data.instructionsTime);
12 data.timeStr = stm.format('HH时mm分ss秒'); 13 data.timeStr = stm.format('HH时mm分ss秒');
13 var htmlStr = template('klyj_plat_msg_template', data); 14 var htmlStr = template('klyj_plat_msg_template', data);
14 var items = $wrap.find('.multi_plat_msg_pops'), len = items.length; 15 var items = $wrap.find('.multi_plat_msg_pops'), len = items.length;
15 if (len >= max) 16 if (len >= max)
16 - $wrap.find('.multi_plat_msg_pops:lt(' + (len - max) + ')').remove(); 17 + return
  18 +
  19 + var $modal = $('#schedule-addsch-modal');
  20 + if (!$modal.hasClass('uk-open')) {
  21 + if (!gb_dataZndd.interval){
  22 + gb_dataZndd.interval = gb_dataZndd.snt(data.ids);
  23 + }
  24 + gb_dataZndd.setTimelist(data.uuid) //自动调度定时器
  25 + }
17 $wrap.append(htmlStr); 26 $wrap.append(htmlStr);
18 }; 27 };
19 28
@@ -24,6 +33,7 @@ var gb_klyj = (function () { @@ -24,6 +33,7 @@ var gb_klyj = (function () {
24 open_modal("/real_control_v2/zndd/type/dkl.html", { 33 open_modal("/real_control_v2/zndd/type/dkl.html", {
25 data: data 34 data: data
26 }, {center: true, bgclose: false, modal: true}); 35 }, {center: true, bgclose: false, modal: true});
  36 + $(this).parent().remove();
27 }); 37 });
28 38
29 var close = true; //关闭弹出框的时候不弹出 39 var close = true; //关闭弹出框的时候不弹出
src/main/resources/static/real_control_v2/js/zndd/data_zndd.js
@@ -309,6 +309,7 @@ var gb_dataZndd = (function (){ @@ -309,6 +309,7 @@ var gb_dataZndd = (function (){
309 function TimeChick(ele){ 309 function TimeChick(ele){
310 310
311 var thisall= $("#"+ele).parent(); 311 var thisall= $("#"+ele).parent();
  312 + var data=dataMap.get(ele);
312 var sch = dataMap.get(thisall.data('uuid')); 313 var sch = dataMap.get(thisall.data('uuid'));
313 if (thisall.length == 0) return; 314 if (thisall.length == 0) return;
314 var date = returnDate(thisall); 315 var date = returnDate(thisall);
@@ -354,6 +355,10 @@ var gb_dataZndd = (function (){ @@ -354,6 +355,10 @@ var gb_dataZndd = (function (){
354 UIkit.modal(modal).hide(); 355 UIkit.modal(modal).hide();
355 } 356 }
356 });*/ 357 });*/
  358 + } else if (type == "KLYJ"){
  359 + open_modal("/real_control_v2/zndd/type/dkl.html", {
  360 + data: data
  361 + }, {center: true, bgclose: false, modal: true});
357 } 362 }
358 } 363 }
359 function checkTime(i){ //将0-9的数字前面加上0,例1变为01 364 function checkTime(i){ //将0-9的数字前面加上0,例1变为01
@@ -366,8 +371,28 @@ var gb_dataZndd = (function (){ @@ -366,8 +371,28 @@ var gb_dataZndd = (function (){
366 371
367 } 372 }
368 373
  374 + function setDataMap(uuid,data){
  375 + dataMap.set(uuid,data);
  376 + }
  377 + function setTimelist(uuid){
  378 + timelist.push({ele:uuid,time:leftTime});
  379 + }
  380 + function removeTimelist(uuid){
  381 + for(var i = 0;i < timelist.length; i++) {
  382 + if (timelist[i].ele == uuid){
  383 + console.log("delete");
  384 + timelist.splice(i--, 1);
  385 + }
  386 + };
  387 + }
369 return { 388 return {
370 sop : sop, 389 sop : sop,
  390 + snt : snt,
  391 + setTimelist:setTimelist,
  392 + interval:interval,
  393 + leftTime:leftTime,
  394 + setDataMap:setDataMap,
  395 + removeTimelist:removeTimelist
371 }; 396 };
372 397
373 })(); 398 })();
374 \ No newline at end of file 399 \ No newline at end of file
src/main/resources/static/real_control_v2/main.html
@@ -307,8 +307,11 @@ @@ -307,8 +307,11 @@
307 <div class="multi_plat_msg_pop_zndd"> 307 <div class="multi_plat_msg_pop_zndd">
308 <!--<div id="timer"></div>--> 308 <!--<div id="timer"></div>-->
309 </div> 309 </div>
  310 +
  311 +<div class="multi_plat_msg_pop_klyj" ></div>
310 <script id="klyj_plat_msg_template" type="text/html"> 312 <script id="klyj_plat_msg_template" type="text/html">
311 - <div class="multi_plat_msg_pops uk-animation-slide-bottom " data-type="{{type}}" > 313 + <div class="multi_plat_msg_pops uk-animation-slide-bottom " data-type="{{type}}" data-uuid="{{uuid}}" >
  314 + <div id ={{uuid}} class="timer"></div>
312 <div> 315 <div>
313 <div class="msg-times" style="cursor: pointer;" >x</div> 316 <div class="msg-times" style="cursor: pointer;" >x</div>
314 <span class="reminder">大客流预警</span> 317 <span class="reminder">大客流预警</span>