新增評分項目設定、資料庫整合

This commit is contained in:
2025-09-22 00:33:12 +08:00
parent 8de09129be
commit 9d4c586ad3
20 changed files with 2321 additions and 79 deletions

View File

@@ -0,0 +1,23 @@
// 測試權重顯示格式
const testWeights = [25.00, 20.00, 20.00, 15.00, 20.00];
console.log('🔄 測試權重顯示格式...');
// 計算總權重
const totalWeight = testWeights.reduce((sum, weight) => sum + weight, 0);
console.log('個別權重:');
testWeights.forEach((weight, index) => {
console.log(` ${index + 1}. ${weight.toFixed(1)}%`);
});
console.log(`\n總權重: ${totalWeight.toFixed(1)}%`);
console.log(`是否等於 100%: ${totalWeight === 100 ? '✅' : '❌'}`);
// 測試權重顯示的各種格式
console.log('\n權重顯示格式測試:');
console.log(`原始格式: ${totalWeight}%`);
console.log(`toFixed(1): ${totalWeight.toFixed(1)}%`);
console.log(`toFixed(0): ${totalWeight.toFixed(0)}%`);
console.log('\n🎉 權重顯示格式測試完成!');