Commit 2a479cb1 sunke

超过10分钟未更新的任务,显示到左边

1 个父辈 c0d65a5f
...@@ -588,7 +588,7 @@ public class StorageDataController extends BaseController { ...@@ -588,7 +588,7 @@ public class StorageDataController extends BaseController {
resultMap.put("barcode",barcode.getBarcode()); resultMap.put("barcode",barcode.getBarcode());
Storage theStorage = dataCache.getStorageById(pos.getStorageId()); Storage theStorage = dataCache.getStorageById(pos.getStorageId());
resultMap.put("cid",theStorage.getCid()); resultMap.put("cid",theStorage.getCid());
okMsg = "["+rfid+"]["+barcode.getBarcode()+"]准备入库到["+pos.getPosName()+"],添加入库任务"; okMsg = "["+rfid+"]["+barcode.getBarcode()+"]准备入库到["+pos.getPosName()+"]";
taskService.addPutInTaskToExecute(theStorage, barcode, pos); taskService.addPutInTaskToExecute(theStorage, barcode, pos);
}else{ }else{
resultMap.put("result","104"); resultMap.put("result","104");
......
...@@ -136,6 +136,11 @@ ...@@ -136,6 +136,11 @@
.green{ .green{
color:green; color:green;
} }
.lobibox-notify-wrapper{
max-height: 100%;
overflow-y: auto;
}
</style> </style>
<link href="${ctx}/scripts/lobibox/css/lobibox.min.css?id=2" rel="stylesheet" type="text/css"/> <link href="${ctx}/scripts/lobibox/css/lobibox.min.css?id=2" rel="stylesheet" type="text/css"/>
...@@ -482,7 +487,6 @@ ...@@ -482,7 +487,6 @@
var status = data[item].status.toLowerCase(); var status = data[item].status.toLowerCase();
options['status'] = status; options['status'] = status;
options['showClass'] = 'label-'+status;
options['taskId'] = taskId; options['taskId'] = taskId;
options['barcode'] = barcode; options['barcode'] = barcode;
options['num'] = data[item].num; options['num'] = data[item].num;
...@@ -496,6 +500,23 @@ ...@@ -496,6 +500,23 @@
} }
var position = 'bottom right';
var showClass = 'label-'+status;
if(!data[item].wait){
//非等待任务超过5分钟还未完成,变红
var updateDate = new Date(data[item].updateDate);
var now = new Date();
var minutes = (now.getTime() - updateDate.getTime())/(1000*60) ; //时间差的分钟数
if(minutes > 10){
//超过8分钟变红,放左边
//showClass="label-pause";
position = 'bottom left';
}
}
options['position']= position;
//options['onClick']= modifyClick; //options['onClick']= modifyClick;
var statusMsg ="["+status+"]"; var statusMsg ="["+status+"]";
...@@ -510,6 +531,8 @@ ...@@ -510,6 +531,8 @@
options['onClose']= cancelTask; options['onClose']= cancelTask;
operate = '<a class="btn btn-xs default" href="#" onclick=cancelTask('+data[item].id+');><i class="fa fa-trash-o"></i> ${cancelTask_label} </a>'; operate = '<a class="btn btn-xs default" href="#" onclick=cancelTask('+data[item].id+');><i class="fa fa-trash-o"></i> ${cancelTask_label} </a>';
}else if(data[item].finished){ }else if(data[item].finished){
statusMsg ="[${taskFinished_label}]"; statusMsg ="[${taskFinished_label}]";
}else if(data[item].wait){ }else if(data[item].wait){
...@@ -525,12 +548,13 @@ ...@@ -525,12 +548,13 @@
sourceStr = "<br/>${source_label} " + data[item].sourceStr; sourceStr = "<br/>${source_label} " + data[item].sourceStr;
} }
options['msg']= showStr + statusMsg + data[item].locInfo + sourceStr; options['msg']= showStr + statusMsg + data[item].locInfo + sourceStr;
options['showClass'] = showClass;
var task = cidTasks[taskId]; var task = cidTasks[taskId];
if(!task){ if(!task){
cidTasks[taskId] = Lobibox.notify('success', options); cidTasks[taskId] = Lobibox.notify('success', options);
}else{ }else{
if(status != task.$options["status"]){ if(showClass != task.$options["showClass"]){
task.remove(); task.remove();
delete cidTasks[taskId]; delete cidTasks[taskId];
cidTasks[taskId] = Lobibox.notify('success', options); cidTasks[taskId] = Lobibox.notify('success', options);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!