调整PDF等待提示文案

This commit is contained in:
2026-06-23 13:10:26 +08:00
parent 1e9404cc7d
commit b6be8b4593
5 changed files with 6 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ class PdfGenerationLimiter:
while self._active >= limit: while self._active >= limit:
remaining = deadline - monotonic() remaining = deadline - monotonic()
if remaining <= 0: if remaining <= 0:
raise PdfGenerationBusy("当前PDF生成任务较多,请稍后重试") raise PdfGenerationBusy("当前查询人数较多,请稍后重试")
self._condition.wait(remaining) self._condition.wait(remaining)
self._active += 1 self._active += 1

View File

@@ -63,7 +63,7 @@ PDF 由服务端按需生成,并使用 30 天缓存。这样可以保证模板
后台 PDF 下载不能用简单的 `window.location` 直接跳转,因为后台接口需要登录态。如果直接打开下载地址,浏览器不会自动带上前端保存的 Authorization token容易出现下载失败。当前后台已改为通过带 token 的请求下载 blob 文件,再在浏览器里保存。 后台 PDF 下载不能用简单的 `window.location` 直接跳转,因为后台接口需要登录态。如果直接打开下载地址,浏览器不会自动带上前端保存的 Authorization token容易出现下载失败。当前后台已改为通过带 token 的请求下载 blob 文件,再在浏览器里保存。
首次生成 PDF 会占用 CPU。后台“系统设置”里的 `PDF 生成并发限制` 默认是 `2`,用于防止多人同时首次下载 PDF 时把 2 核 4G 服务器打满。前端下载和预览时会显示“PDF正在排队或生成”,避免用户误以为页面卡死。 首次生成 PDF 会占用 CPU。后台“系统设置”里的 `PDF 生成并发限制` 默认是 `2`,用于防止多人同时首次下载 PDF 时把 2 核 4G 服务器打满。前端下载和预览时会显示“当前查询人数较多,请稍后。。。”,避免用户误以为页面卡死。
## 正式部署准备 ## 正式部署准备

View File

@@ -163,7 +163,7 @@ async function downloadCertificate(row: AdminCertificate) {
downloadingCertificateId.value = row.id; downloadingCertificateId.value = row.id;
const loading = ElLoading.service({ const loading = ElLoading.service({
lock: true, lock: true,
text: "PDF正在排队或生成请稍候...", text: "当前查询人数较多,请稍后。。。",
background: "rgba(255, 255, 255, 0.72)", background: "rgba(255, 255, 255, 0.72)",
}); });
try { try {

View File

@@ -120,7 +120,7 @@
</div> </div>
<div v-else-if="previewLoading" class="pdf-loading"> <div v-else-if="previewLoading" class="pdf-loading">
<el-icon class="is-loading"><Loading /></el-icon> <el-icon class="is-loading"><Loading /></el-icon>
<p>PDF正在排队或生成请稍候...</p> <p>当前查询人数较多请稍后</p>
</div> </div>
<div v-else-if="current" class="preview-card"> <div v-else-if="current" class="preview-card">
<p class="preview-kicker">Training Completion Certificate</p> <p class="preview-kicker">Training Completion Certificate</p>
@@ -340,7 +340,7 @@ async function downloadPdf(item: PublicCertificate) {
downloadingCertificateNo.value = item.certificate_no; downloadingCertificateNo.value = item.certificate_no;
const loading = ElLoading.service({ const loading = ElLoading.service({
lock: true, lock: true,
text: "PDF正在排队或生成请稍候...", text: "当前查询人数较多,请稍后。。。",
background: "rgba(255, 255, 255, 0.72)", background: "rgba(255, 255, 255, 0.72)",
}); });
try { try {

View File

@@ -70,7 +70,7 @@ async function downloadPdf() {
downloading.value = true; downloading.value = true;
const loading = ElLoading.service({ const loading = ElLoading.service({
lock: true, lock: true,
text: "PDF正在排队或生成请稍候...", text: "当前查询人数较多,请稍后。。。",
background: "rgba(255, 255, 255, 0.72)", background: "rgba(255, 255, 255, 0.72)",
}); });
try { try {