sonar qube

This commit is contained in:
Cindy Chang
2024-07-22 14:14:57 +08:00
parent 3c81356fa2
commit e5b15957cc
8 changed files with 34 additions and 46 deletions

View File

@@ -502,6 +502,7 @@ export async function leaveAccountManagementToRemind(){
}
});
if(result.isConfirmed) {
return;
} else {
modalStore.openModal();
}

View File

@@ -26,11 +26,23 @@ export function setLineChartData(baseData, xMax, xMin, isPercent, yMax, yMin) {
let e = 2;
let f = baseData[1].y;
b = (e*d - a*d - f*a - f*c) / (e - c - a)
if(isPercent) {
b = b >= 1 ? 1 : b <= 0 ? 0 : b;
if(isPercent) { // sonar-qube
if (b >= 1) {
b = 1;
} else if (b <= 0) {
b = 0;
} else {
b = b;
}
}
else {
b = b >= yMax ? yMax : b <= yMin ? yMin : b;
if (b >= yMax) {
b = yMax;
} else if (b <= yMin) {
b = yMin;
} else {
b = b;
}
}
// y 軸最大值
@@ -41,17 +53,16 @@ export function setLineChartData(baseData, xMax, xMin, isPercent, yMax, yMin) {
let me = 11;
let mf;
mf = (mb*me - mb*mc -md*me + md*ma) / (ma - mc);
if(isPercent) {
mf = mf >= 1 ? 1 : mf <= 0 ? 0 : mf;
}
else {
if (mf >= yMax) {
mf = yMax;
} else if (mf <= yMin) {
mf = yMin;
} else {
mf = mf;
if (isPercent) {
if (mf >= 1) {
mf = 1;
} else if (mf <= 0) {
mf = 0;
}
} else if (mf >= yMax) {
mf = yMax;
} else if (mf <= yMin) {
mf = yMin;
}
// 添加最小值

View File

@@ -234,7 +234,6 @@ export function getDateLabelByMinMaxDate(date, maxDate, minDate) {
// 計算相差的小時、分鐘、秒
const diffHours = Math.floor(timeDiff / (60 * 60));
const diffMinutes = Math.floor(timeDiff / 60);
const diffSeconds = Math.floor(timeDiff);
// 顯示結果
if (diffMonths > 1) {