feat: 点击二维码缩略图可放大查看

This commit is contained in:
shen 2026-06-08 21:16:09 +08:00
parent 48fdca12bd
commit bdd79e3302

View File

@ -56,7 +56,7 @@
<template v-if="task.status === 'completed' && task.oss_url"> <template v-if="task.status === 'completed' && task.oss_url">
<img v-if="task.build_type === 'Ad_Hoc' && task.qr_code_path" <img v-if="task.build_type === 'Ad_Hoc' && task.qr_code_path"
:src="task.qr_code_path" alt="QR" class="qr-thumb" :src="task.qr_code_path" alt="QR" class="qr-thumb"
@click="task._showQr = !task._showQr"> @click="showQrPreview(task)">
<a v-if="task.build_type === 'App_Store'" :href="task.oss_url" target="_blank" class="download-link">下载 IPA</a> <a v-if="task.build_type === 'App_Store'" :href="task.oss_url" target="_blank" class="download-link">下载 IPA</a>
</template> </template>
<span v-else class="text-muted">-</span> <span v-else class="text-muted">-</span>
@ -75,6 +75,22 @@
</table> </table>
</div> </div>
<!-- 二维码放大弹窗 -->
<div v-if="qrPreview" class="modal-overlay" @click.self="qrPreview = null">
<div class="qr-preview-modal">
<div class="modal-header">
<h3>{{ qrPreview.app_name }} - 下载二维码</h3>
<button class="modal-close" @click="qrPreview = null">&times;</button>
</div>
<img :src="qrPreview.qr_code_path" alt="QR Code" class="qr-preview-img">
<div class="qr-preview-info">
<p><strong>App:</strong> {{ qrPreview.app_name }}</p>
<p><strong>Scheme:</strong> {{ qrPreview.scheme_name }}</p>
<p><strong>类型:</strong> {{ qrPreview.build_type }}</p>
</div>
</div>
</div>
<!-- 日志弹窗 --> <!-- 日志弹窗 -->
<Transition name="modal"> <Transition name="modal">
<div v-if="showLogModal" class="modal-overlay" @click.self="closeLogModal"> <div v-if="showLogModal" class="modal-overlay" @click.self="closeLogModal">
@ -163,8 +179,13 @@ const logTask = ref(null)
const logLines = ref([]) const logLines = ref([])
const logContainer = ref(null) const logContainer = ref(null)
const showVerboseLogs = ref(false) const showVerboseLogs = ref(false)
const qrPreview = ref(null)
let logWs = null let logWs = null
const showQrPreview = (task) => {
qrPreview.value = task
}
const filteredTasks = computed(() => { const filteredTasks = computed(() => {
return tasks.value.filter(task => { return tasks.value.filter(task => {
// //
@ -467,4 +488,10 @@ const errorCategoryLabel = (cat) => {
.qr-thumb:hover { border-color: #1890ff; } .qr-thumb:hover { border-color: #1890ff; }
.btn-danger { color: #ff4d4f; border-color: #ff4d4f; } .btn-danger { color: #ff4d4f; border-color: #ff4d4f; }
.btn-danger:hover { background: #ff4d4f; color: white; } .btn-danger:hover { background: #ff4d4f; color: white; }
/* 二维码放大弹窗 */
.qr-preview-modal { background: white; border-radius: 12px; padding: 24px; width: 380px; text-align: center; }
.qr-preview-img { width: 260px; height: 260px; border: 1px solid #f0f0f0; border-radius: 8px; margin: 16px 0; }
.qr-preview-info { text-align: left; padding: 12px 16px; background: #fafafa; border-radius: 8px; }
.qr-preview-info p { margin: 6px 0; font-size: 13px; color: #555; }
</style> </style>