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
+20 -42
View File
@@ -584,57 +584,35 @@ body {
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);
}
.file-row:hover {
background-color: var(--bg-secondary);
}
.expand-icon {
display: inline-block;
width: 20px;
color: var(--text-tertiary);
font-size: var(--text-xs);
transition: transform var(--duration-fast) var(--ease-default);
}
.history-detail-row {
background-color: var(--bg-secondary);
}
.history-detail-row td {
padding: 0;
}
.history-detail {
padding: var(--space-4) var(--space-6);
}
.inner-table {
background: var(--bg-primary); background: var(--bg-primary);
border-radius: var(--radius-md); border-radius: var(--radius-md);
overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border: 1px solid var(--border-light); max-height: 400px;
overflow-y: auto;
} }
.inner-table th { .history-dropdown table {
width: 100%;
font-size: var(--text-xs);
}
.history-dropdown th {
background: var(--bg-tertiary); background: var(--bg-tertiary);
font-size: var(--text-xs); padding: var(--space-2) var(--space-3);
white-space: nowrap;
} }
.inner-table td { .history-dropdown td {
font-size: var(--text-xs); padding: var(--space-2) var(--space-3);
} }
.action-buttons { .history-dropdown tr:hover {
display: flex; background: var(--bg-secondary);
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>