feat: 功能优化

This commit is contained in:
2025-11-14 02:15:14 +08:00
parent c652d0ddf3
commit 6624627802
10 changed files with 1224 additions and 223 deletions

View File

@@ -1,5 +1,6 @@
<script setup>
import { ref } from 'vue'
import GradientButton from '@/components/GradientButton.vue'
const props = defineProps({
modelValue: {
@@ -52,9 +53,13 @@ function handleReset() {
<div class="form-hint">数量越大越全面但分析时间更长建议 2030</div>
</a-form-item>
<a-space>
<a-button type="primary" :loading="loading" @click="handleAnalyze">
{{ loading ? '分析中' : '开始分析' }}
</a-button>
<GradientButton
text="开始分析"
:loading="loading"
loading-text="分析中"
size="middle"
@click="handleAnalyze"
/>
<a-button @click="handleReset">清空</a-button>
</a-space>
</a-form>

View File

@@ -3,8 +3,9 @@ import { reactive, h } from 'vue'
import { DownloadOutlined } from '@ant-design/icons-vue'
import { formatTime } from '../utils/benchmarkUtils'
import ExpandedRowContent from './ExpandedRowContent.vue'
import GradientButton from '@/components/GradientButton.vue'
const props = defineProps({
defineProps({
data: {
type: Array,
required: true,
@@ -81,9 +82,12 @@ function onExpandedRowKeysChange(keys) {
</template>
导出Excel ({{ selectedRowKeys.length }}/10)
</a-button>
<a-button size="small" type="primary" class="batch-btn" @click="$emit('batchAnalyze')">
批量分析 ({{ selectedRowKeys.length }})
</a-button>
<GradientButton
:text="`批量分析 (${selectedRowKeys.length})`"
size="small"
@click="$emit('batchAnalyze')"
:disabled="selectedRowKeys.length === 0"
/>
</a-space>
</div>
<a-table
@@ -145,9 +149,14 @@ function onExpandedRowKeysChange(keys) {
</template>
<template v-else-if="column.key === 'action'">
<a-space>
<a-button size="small" type="primary" :loading="record._analyzing" :disabled="record._analyzing" @click="$emit('analyze', record)">
{{ record._analyzing ? '分析中…' : '分析' }}
</a-button>
<GradientButton
text="分析"
size="small"
:loading="record._analyzing"
loading-text="分析中"
:disabled="record._analyzing"
@click="$emit('analyze', record)"
/>
</a-space>
</template>
</template>