From b33e8d5f127c450cb5b5151967520b79d86051e7 Mon Sep 17 00:00:00 2001 From: yixian Date: Tue, 14 Jul 2020 12:34:02 +1000 Subject: [PATCH 1/2] ui improve for settle_tasks --- .../static/analysis/templates/settle_tasks_index.html | 11 ++++++++++- .../analysis/templates/settle_tasks_prioritylist.html | 7 ++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/ui/static/analysis/templates/settle_tasks_index.html b/src/main/ui/static/analysis/templates/settle_tasks_index.html index dd33537ac..2a634d358 100644 --- a/src/main/ui/static/analysis/templates/settle_tasks_index.html +++ b/src/main/ui/static/analysis/templates/settle_tasks_index.html @@ -15,7 +15,8 @@

{{progress.progress_id}} - {{progress.plan_remark}}|{{progress.current_step}}

- + {{progress.progress}}% +
@@ -70,14 +71,18 @@ ng-if="task.whitelist_clients.length"> + # Client Moniker + Company Name BD Name Clean Days + + @@ -105,7 +110,9 @@ + + @@ -113,7 +120,9 @@ + +
# Client MonikerCompany Name BD Name Clean Days Operation
diff --git a/src/main/ui/static/analysis/templates/settle_tasks_prioritylist.html b/src/main/ui/static/analysis/templates/settle_tasks_prioritylist.html index 76d20b887..68ef68088 100644 --- a/src/main/ui/static/analysis/templates/settle_tasks_prioritylist.html +++ b/src/main/ui/static/analysis/templates/settle_tasks_prioritylist.html @@ -27,12 +27,16 @@
- +
+
Clients: {{clients.length}}
+ +
+ @@ -42,6 +46,7 @@ + From 86eb49834eb0a960c3488de04fe6befcbd7e5007 Mon Sep 17 00:00:00 2001 From: yixian Date: Tue, 14 Jul 2020 12:43:26 +1000 Subject: [PATCH 2/2] ui improve for settle_tasks --- src/main/ui/manage.html | 2 +- src/main/ui/static/analysis/settle_tasks.js | 13 ++++++++++++- src/main/ui/static/menu/templates/main_menu.html | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main/ui/manage.html b/src/main/ui/manage.html index 7ae019c08..beee21dfb 100644 --- a/src/main/ui/manage.html +++ b/src/main/ui/manage.html @@ -566,7 +566,7 @@ margin-bottom: 10%;"/>
  • - + 清算任务|Settle Tasks
  • diff --git a/src/main/ui/static/analysis/settle_tasks.js b/src/main/ui/static/analysis/settle_tasks.js index 294d91159..d91c35a10 100644 --- a/src/main/ui/static/analysis/settle_tasks.js +++ b/src/main/ui/static/analysis/settle_tasks.js @@ -40,6 +40,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) { if (!$scope.currentTasks) { $scope.currentTasks = []; } + } else { + if (!ctrl.update_task) { + ctrl.update_task = $interval(function () { + $scope.checkProgressStatus(); + }) + } } let finished = $scope.progress.finished_sequence; if ($scope.currentTasks && finished) { @@ -149,7 +155,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) { }, function (resp) { commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message}) }) - } + }; + $scope.$on('$destroy', function () { + if (ctrl.update_task) { + $interval.cancel(ctrl.update_task) + } + }) }]); app.controller('batchAddMerchantsDialogCtrl', ['$scope', '$http', function ($scope, $http) { diff --git a/src/main/ui/static/menu/templates/main_menu.html b/src/main/ui/static/menu/templates/main_menu.html index dc944c6dc..1baeb605a 100644 --- a/src/main/ui/static/menu/templates/main_menu.html +++ b/src/main/ui/static/menu/templates/main_menu.html @@ -983,7 +983,7 @@
    # Client Moniker Merchant Name BD Name