This commit is contained in:
2026-03-08 01:21:36 +08:00
parent 84e7ae4ef1
commit d08688dda3
2 changed files with 31 additions and 52 deletions
+23 -45
View File
@@ -580,61 +580,39 @@ body {
.btn-sm { .btn-sm {
padding: var(--space-1) var(--space-3); padding: var(--space-1) var(--space-3);
font-size: var(--text-xs); font-size: var(--text-xs);
border-radius: var(--radius-sm); border-radius: var(--radius-sm);
} }
/* ================================ .history-dropdown {
进度条 position: absolute;
================================ */ top: 100%;
.file-row { left: 0;
cursor: pointer; z-index: 1000;
transition: background-color var(--duration-fast) var(--ease-default); background: var(--bg-primary);
border-radius: var(--radius-md);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
max-height: 400px;
overflow-y: auto;
} }
.file-row:hover { .history-dropdown table {
background-color: var(--bg-secondary); width: 100%;
font-size: var(--text-xs);
} }
.expand-icon { .history-dropdown th {
display: inline-block; background: var(--bg-tertiary);
width: 20px; padding: var(--space-2) var(--space-3);
color: var(--text-tertiary); white-space: nowrap;
font-size: var(--text-xs);
transition: transform var(--duration-fast) var(--ease-default);
} }
.history-detail-row { .history-dropdown td {
background-color: var(--bg-secondary); padding: var(--space-2) var(--space-3);
} }
.history-detail-row td { .history-dropdown tr:hover {
padding: 0; background: var(--bg-secondary);
}
.history-detail {
padding: var(--space-4) var(--space-6);
}
.inner-table {
background: var(--bg-primary);
border-radius: var(--radius-md);
overflow: hidden;
border: 1px solid var(--border-light);
}
.inner-table th {
background: var(--bg-tertiary);
font-size: var(--text-xs);
}
.inner-table td {
font-size: var(--text-xs);
}
.action-buttons {
display: flex;
gap: var(--space-2);
} }
/* ================================ /* ================================
+8 -7
View File
@@ -899,6 +899,7 @@ const MoldInsightView = {
uploadFile, uploadFile,
formatFileSize, formatFileSize,
formatDateTime, formatDateTime,
formatNumber,
toggleFileHistory, toggleFileHistory,
viewResult viewResult
}; };
@@ -969,11 +970,8 @@ const MoldInsightView = {
</thead> </thead>
<tbody> <tbody>
<template v-for="file in state.history.files" :key="file.filename"> <template v-for="file in state.history.files" :key="file.filename">
<tr class="file-row" @click="toggleFileHistory(file.filename)"> <tr>
<td> <td>{{ file.filename }}</td>
<span class="expand-icon">{{ state.expandedFiles[file.filename] ? '▼' : '▶' }}</span>
{{ file.filename }}
</td>
<td> <td>
<span class="badge badge-info">{{ file.upload_count }} 次</span> <span class="badge badge-info">{{ file.upload_count }} 次</span>
</td> </td>
@@ -985,16 +983,19 @@ const MoldInsightView = {
</td> </td>
<td>{{ formatDateTime(file.latest_upload_time) }}</td> <td>{{ formatDateTime(file.latest_upload_time) }}</td>
<td> <td>
<div class="action-buttons" @click.stop> <div class="action-buttons">
<button v-if="file.latest_status === 'completed'" class="btn-sm btn-primary" @click="viewResult({task_id: file.latest_task_id})"> <button v-if="file.latest_status === 'completed'" class="btn-sm btn-primary" @click="viewResult({task_id: file.latest_task_id})">
查看最新 查看最新
</button> </button>
<button class="btn-sm btn-secondary" @click="toggleFileHistory(file.filename)">
{{ state.expandedFiles[file.filename] ? '收起' : '历史记录' }}
</button>
</div> </div>
</td> </td>
</tr> </tr>
<tr v-if="state.expandedFiles[file.filename]" class="history-detail-row"> <tr v-if="state.expandedFiles[file.filename]" class="history-detail-row">
<td colspan="6"> <td colspan="6">
<div class="history-detail"> <div class="history-dropdown">
<table class="data-table inner-table"> <table class="data-table inner-table">
<thead> <thead>
<tr> <tr>