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 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 1040 .multi_plat_msg_pops {
1033 1041 color: grey;
1034 1042 margin: 7px 0;
... ...
src/main/resources/static/real_control_v2/js/stationcf/klyj.js
... ... @@ -2,18 +2,27 @@
2 2 * 站点催发
3 3 */
4 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 7 var dataMap = new Map();
8 8 var popcf = function (data) {
9 9 dataMap.set(data.uuid,data);
  10 + gb_dataZndd.setDataMap(data.uuid,data);
10 11 //时间格式化
11 12 var stm = moment(data.instructionsTime);
12 13 data.timeStr = stm.format('HH时mm分ss秒');
13 14 var htmlStr = template('klyj_plat_msg_template', data);
14 15 var items = $wrap.find('.multi_plat_msg_pops'), len = items.length;
15 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 26 $wrap.append(htmlStr);
18 27 };
19 28  
... ... @@ -24,6 +33,7 @@ var gb_klyj = (function () {
24 33 open_modal("/real_control_v2/zndd/type/dkl.html", {
25 34 data: data
26 35 }, {center: true, bgclose: false, modal: true});
  36 + $(this).parent().remove();
27 37 });
28 38  
29 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 309 function TimeChick(ele){
310 310  
311 311 var thisall= $("#"+ele).parent();
  312 + var data=dataMap.get(ele);
312 313 var sch = dataMap.get(thisall.data('uuid'));
313 314 if (thisall.length == 0) return;
314 315 var date = returnDate(thisall);
... ... @@ -354,6 +355,10 @@ var gb_dataZndd = (function (){
354 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 364 function checkTime(i){ //将0-9的数字前面加上0,例1变为01
... ... @@ -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 388 return {
370 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 399 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/main.html
... ... @@ -307,8 +307,11 @@
307 307 <div class="multi_plat_msg_pop_zndd">
308 308 <!--<div id="timer"></div>-->
309 309 </div>
  310 +
  311 +<div class="multi_plat_msg_pop_klyj" ></div>
310 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 315 <div>
313 316 <div class="msg-times" style="cursor: pointer;" >x</div>
314 317 <span class="reminder">大客流预警</span>
... ...