- 文件清单由变体列表构建期生成,新增变体自动纳入 - 命名 Resume-<企业>-<岗位>-<版本>.pdf,非法文件名字符自动替换 - 版本号记忆于 localStorage;Playwright e2e 验证 4 个下载文件名
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"backend": "native",
|
||||
"rasterEngine": "pdfium",
|
||||
"source": "saved",
|
||||
"inputPath": "D:\\Work\\resume\\.livecheck\\soe-support.pdf",
|
||||
"sourceSha256": "9f1195d09662f282dd7b9eff4bcec87c960a8c8ee60e7985dbe549757ee8591d",
|
||||
"dpi": 144,
|
||||
"pageCount": 2,
|
||||
"images": [
|
||||
{
|
||||
"index": 1,
|
||||
"page": 1,
|
||||
"path": "D:\\Work\\resume\\.livecheck\\r1\\page-0001.png",
|
||||
"width": 1190,
|
||||
"height": 1684,
|
||||
"rectangle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 793.2666666666667,
|
||||
"height": 1122.5333333333333
|
||||
},
|
||||
"byteLength": 557974
|
||||
}
|
||||
],
|
||||
"missingFonts": []
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 545 KiB |
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"backend": "native",
|
||||
"rasterEngine": "pdfium",
|
||||
"source": "saved",
|
||||
"inputPath": "D:\\Work\\resume\\.livecheck\\private-dev.pdf",
|
||||
"sourceSha256": "a56e8f42e562e313b2e587d4d792044b5e03ffd0b1f07c2f4366d9a2779bbefb",
|
||||
"dpi": 144,
|
||||
"pageCount": 1,
|
||||
"images": [
|
||||
{
|
||||
"index": 1,
|
||||
"page": 1,
|
||||
"path": "D:\\Work\\resume\\.livecheck\\r2\\page-0001.png",
|
||||
"width": 1190,
|
||||
"height": 1684,
|
||||
"rectangle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 793.2666666666667,
|
||||
"height": 1122.5333333333333
|
||||
},
|
||||
"byteLength": 690407
|
||||
}
|
||||
],
|
||||
"missingFonts": []
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 674 KiB |
Binary file not shown.
+45
@@ -201,6 +201,51 @@ h1 {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 批量下载 */
|
||||
.batch-bar {
|
||||
margin-top: 28px;
|
||||
padding: 18px;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.batch-bar input {
|
||||
width: 180px;
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #cbd5e1;
|
||||
border-radius: 6px;
|
||||
outline: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.batch-bar input:focus {
|
||||
border-color: #4478DF;
|
||||
}
|
||||
|
||||
.batch-bar button {
|
||||
margin-left: 10px;
|
||||
padding: 9px 20px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background: #4478DF;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.batch-bar button:hover {
|
||||
background: #3665c4;
|
||||
}
|
||||
|
||||
.batch-hint {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/* 页脚 */
|
||||
.nav-footer {
|
||||
margin-top: 36px;
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="batch-bar">
|
||||
<input id="ver" type="text" placeholder="版本号,如 v20" maxlength="24" autocomplete="off">
|
||||
<button id="batch" type="button">批量下载 4 份 PDF</button>
|
||||
<div class="batch-hint">命名格式:Resume-<企业>-<岗位>-<版本>.pdf;浏览器询问“允许多个文件下载”时请选择允许</div>
|
||||
</div>
|
||||
|
||||
<div class="nav-footer">
|
||||
<div class="nav-contact">{{contact.phone}} · {{contact.email}}</div>
|
||||
<div class="nav-links">
|
||||
@@ -38,5 +44,31 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var files = [
|
||||
{{#each matrix.rows}}{{#each cells}}{ url: '{{pdfUrl}}', name: 'Resume-{{companyId}}-{{roleId}}' },
|
||||
{{/each}}{{/each}}
|
||||
];
|
||||
var input = document.getElementById('ver');
|
||||
input.value = localStorage.getItem('resumeVer') || '';
|
||||
document.getElementById('batch').addEventListener('click', function () {
|
||||
var v = (input.value || '').trim().replace(/[\\/:*?"<>|]/g, '_');
|
||||
if (!v) { input.focus(); return; }
|
||||
localStorage.setItem('resumeVer', v);
|
||||
files.forEach(function (f, i) {
|
||||
setTimeout(function () {
|
||||
var a = document.createElement('a');
|
||||
a.href = f.url;
|
||||
a.download = f.name + '-' + v + '.pdf';
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
}, i * 300);
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user