Commit a42f6e00 authored by neo's avatar neo

[Bugfix] fixed bugs for js status

parent 8db79f5a
...@@ -560,13 +560,17 @@ ...@@ -560,13 +560,17 @@
var items = $scope.tasks[1].items; var items = $scope.tasks[1].items;
if(job.jobStatus == 'End'){ if(job.jobStatus == 'End'){
items.forEach(function(item,index){
item.status = 'completed';
});
if($scope.timer){ if($scope.timer){
$interval.cancel($scope.timer); $interval.cancel($scope.timer);
vatCommonService.setProjectStatus(vatSessionService.project.id, vatSessionService.month, constant.ProjectStatusEnum.Generated vatCommonService.setProjectStatus(vatSessionService.project.id, vatSessionService.month, constant.ProjectStatusEnum.Generated
, constant.DictionaryDictKey.WFDataProcess, enums.FinishStatusEnum.Finished); , constant.DictionaryDictKey.WFDataProcess, enums.FinishStatusEnum.Finished);
} }
}else if(job.jobStatus=='Running'){ }else if(job.jobStatus=='Running'|| job.jobStatus=='Error'){
var tasks = JSON.parse(job) var tasks = JSON.parse(job)
items.forEach(function(item,index){ items.forEach(function(item,index){
tasks.forEach(function(task){ tasks.forEach(function(task){
if(task.code==item.code){ if(task.code==item.code){
...@@ -581,10 +585,12 @@ ...@@ -581,10 +585,12 @@
} }
}) })
}); });
}else if(job.jobStatus == 'Error'){
if($scope.timer)$interval.cancel($scope.timer); if(job.jobStatus == 'Error'){
} if($scope.timer)$interval.cancel($scope.timer);
}
} }
}
} }
var getInitTaskStatus = function(){ var getInitTaskStatus = function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment