Commit 32194cc2 authored by neo's avatar neo

[Bugfix] fix report gen mult result

parent 70012bb6
......@@ -323,18 +323,27 @@
});
if (unstarted) {
var readyTasks;
var isGenedAll = false;
var isReport = false;
if (!_.isEmpty($scope.resolveRef)) {
readyTasks = _.reject($scope.tasks[task.seqNo + 1].items, function (t) {
return _.some($scope.resolveRef, function (x) {
if($scope.tasks[task.seqNo + 1].isReportTask)isReport=true;
return !x.resolved && x.referTo === t.id;
});
});
}
else {
readyTasks = $scope.tasks[task.seqNo + 1].items;
if($scope.tasks[task.seqNo + 1].isReportTask)isReport=true;
}
readyTasks.forEach(function (t) {
t.doTask();
if(isReport&&!isGenedAll){
t.doTask();
isGenedAll=true;
}
t.status = 'processing';
t.text = $translate.instant(t.status);
});
......@@ -376,8 +385,16 @@
var updateProgress = function (data, task, ifWriteLog) {
if (data && data.result) {
task.status = 'completed';
task.text = $translate.instant(task.status);
if( $scope.tasks[task.seqNo].isReportTask){
$scope.tasks[task.seqNo].items.forEach(function (t) {
t.status = 'completed';
t.text = $translate.instant(t.status);
});
}else{
task.status = 'completed';
task.text = $translate.instant(task.status);
}
}
else {
task.status = 'error';
......
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