This commit is contained in:
zhouxin
2024-04-02 13:26:41 +08:00
parent cd0e62a874
commit fc5243fddd
6 changed files with 22 additions and 5 deletions
+17 -5
View File
@@ -17,7 +17,7 @@ function recalculateAll(startDate, endDate)
{
if(index >= dateRange.length)
{
$('.recalculate-log').append(`<p>${noticeDeduplication}</p>`);
$('.recalculate-log').append(`<p class="deduplication">${noticeDeduplication}</p>`);
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(`<p>${noticeDeduplication}</p>`);
$('.recalculate-log').append(`<p class="deduplication">${noticeDeduplication}</p>`);
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 = `<p>${noticeDoneDeduplication} <i class="icon icon-check success"></i></p>`;
$('.recalculate-log').append(html);
scrollLog();
}
function scrollLog()
{
var logContainer = document.getElementById('recalculate-log');
+1
View File
@@ -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";
+1
View File
@@ -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";
+1
View File
@@ -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";
+1
View File
@@ -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计算完成";
+1
View File
@@ -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}");