update code

This commit is contained in:
lychang
2025-11-05 02:04:09 +08:00
parent 43cb0ff431
commit e81d9edbd5
9 changed files with 83 additions and 56 deletions

View File

@@ -80,6 +80,24 @@ function displayStatistics(stats) {
});
}
function exportReport() {
const reportContent = document.getElementById('report-content').textContent;
if (!reportContent) {
showError('请先生成日报');
return;
}
const blob = new Blob([reportContent], { type: 'text/markdown' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `运营日报_${document.getElementById('date').value}.md`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
}
// 页面加载时自动生成今日日报
window.addEventListener('load', function () {
generateTodayReport();