diff --git a/module/metric/js/recalculate.ui.js b/module/metric/js/recalculate.ui.js index 649e722730..3cc07cc397 100644 --- a/module/metric/js/recalculate.ui.js +++ b/module/metric/js/recalculate.ui.js @@ -17,7 +17,7 @@ function recalculateAll(startDate, endDate) { if(index >= dateRange.length) { - $('.recalculate-log').append(`

${noticeDeduplication}

`); + $('.recalculate-log').append(`

${noticeDeduplication}

`); scrollLog(); var deduplication = $.createLink('metric', 'ajaxDeduplicateRecord'); @@ -25,12 +25,13 @@ function recalculateAll(startDate, endDate) { displayExitButton(); hideRecalculateNotice(); + deduplicationLog(); }); return; } var date = dateToString(dateRange[index]); - var $html = recalculateLog(date); + var $html = getRecalculateLog(date); var link = $.createLink('metric', 'ajaxUpdateHistoryMetricLib', 'date=' + date + '&calcType=' + calcType); $.get(link, function(result){ @@ -48,7 +49,7 @@ function recalculateSingle(code, dateType, startDate, endDate) { if(index >= dateRange.length) { - $('.recalculate-log').append(`

${noticeDeduplication}

`); + $('.recalculate-log').append(`

${noticeDeduplication}

`); scrollLog(); var deduplication = $.createLink('metric', 'ajaxDeduplicateRecord'); @@ -56,12 +57,13 @@ function recalculateSingle(code, dateType, startDate, endDate) { displayExitButton(); hideRecalculateNotice(); + deduplicationLog(); }); return; } var date = dateToString(dateRange[index]); - var $html = recalculateLog(date); + var $html = getRecalculateLog(date); var link = $.createLink('metric', 'ajaxUpdateSingleMetricLib', 'code=' + code + '&date=' + date + '&calcType=' + calcType); $.get(link, function(result){ @@ -71,7 +73,7 @@ function recalculateSingle(code, dateType, startDate, endDate) } } -function recalculateLog(date) +function getRecalculateLog(date) { var dateStr = date.split('_').join('-'); @@ -85,6 +87,16 @@ function recalculateLog(date) return html; } +function deduplicationLog() +{ + $('.deduplication').remove(); + + var html = `

${noticeDoneDeduplication}

`; + $('.recalculate-log').append(html); + + scrollLog(); +} + function scrollLog() { var logContainer = document.getElementById('recalculate-log'); diff --git a/module/metric/lang/de.php b/module/metric/lang/de.php index 5eb2e3fded..38f26462e3 100755 --- a/module/metric/lang/de.php +++ b/module/metric/lang/de.php @@ -399,6 +399,7 @@ $lang->metric->tips->noticeRepublish = "If there are multiple releases, $lang->metric->tips->noticeRewriteHistoryLib = "(When checked, the system will recalculate published metric with date type based on historical data and overwrite all existing metric records)"; $lang->metric->tips->banRecalculate = "The metric has not been published or has no date type"; $lang->metric->tips->noticeDeduplication = "Deduplication..."; +$lang->metric->tips->noticeDoneDeduplication = "Deduplication done"; $lang->metric->recalculateLog = "%s has been calculated"; diff --git a/module/metric/lang/en.php b/module/metric/lang/en.php index f59ffed70b..c1d9ce74b1 100755 --- a/module/metric/lang/en.php +++ b/module/metric/lang/en.php @@ -399,6 +399,7 @@ $lang->metric->tips->noticeRepublish = "If there are multiple releases, $lang->metric->tips->noticeRewriteHistoryLib = "(When checked, the system will recalculate published metric with date type based on historical data and overwrite all existing metric records)"; $lang->metric->tips->banRecalculate = "The metric has not been published or has no date type"; $lang->metric->tips->noticeDeduplication = "Deduplication..."; +$lang->metric->tips->noticeDoneDeduplication = "Deduplication done"; $lang->metric->recalculateLog = "%s has been calculated"; diff --git a/module/metric/lang/fr.php b/module/metric/lang/fr.php index 5eb2e3fded..38f26462e3 100755 --- a/module/metric/lang/fr.php +++ b/module/metric/lang/fr.php @@ -399,6 +399,7 @@ $lang->metric->tips->noticeRepublish = "If there are multiple releases, $lang->metric->tips->noticeRewriteHistoryLib = "(When checked, the system will recalculate published metric with date type based on historical data and overwrite all existing metric records)"; $lang->metric->tips->banRecalculate = "The metric has not been published or has no date type"; $lang->metric->tips->noticeDeduplication = "Deduplication..."; +$lang->metric->tips->noticeDoneDeduplication = "Deduplication done"; $lang->metric->recalculateLog = "%s has been calculated"; diff --git a/module/metric/lang/zh-cn.php b/module/metric/lang/zh-cn.php index 5e0dd72e0d..5975a9a493 100755 --- a/module/metric/lang/zh-cn.php +++ b/module/metric/lang/zh-cn.php @@ -399,6 +399,7 @@ $lang->metric->tips->noticeRepublish = "若存在多次发布情况, $lang->metric->tips->noticeRewriteHistoryLib = "(勾选后,系统会基于历史数据重新计算已发布且有时间属性的度量项,并覆盖已存在的全部度量值)"; $lang->metric->tips->banRecalculate = "该度量项尚未发布或无时间属性。"; $lang->metric->tips->noticeDeduplication = "去除重复数据中..."; +$lang->metric->tips->noticeDoneDeduplication = "去除重复数据完成"; $lang->metric->recalculateLog = "%s计算完成"; diff --git a/module/metric/ui/recalculate.html.php b/module/metric/ui/recalculate.html.php index 932231b126..98b0a1cdd2 100644 --- a/module/metric/ui/recalculate.html.php +++ b/module/metric/ui/recalculate.html.php @@ -17,6 +17,7 @@ jsVar('dateType', $dateType); jsVar('calcType', $calcType); jsVar('calcRange', $calcRange); jsVar('noticeDeduplication', $lang->metric->tips->noticeDeduplication); +jsVar('noticeDoneDeduplication', $lang->metric->tips->noticeDoneDeduplication); if($calcRange == 'single') { jsVar('recalculateLogText', "$metric->name {$lang->metric->recalculateLog}");