Enhance Step3Simulation and Step2EnvSetup components for improved clarity and user experience
- Updated estimated time messages in Step2EnvSetup.vue to specify agent scale for better context. - Refactored Step3Simulation.vue to improve action tracking, including clearer labels and enhanced UI elements. - Introduced a tooltip for available actions, providing users with quick reference during simulations. - Improved styling and layout for better readability and interaction, including adjustments to button and card designs.
This commit is contained in:
parent
c91dad30db
commit
f590784345
3 changed files with 413 additions and 424 deletions
|
|
@ -457,7 +457,7 @@
|
||||||
<span class="val-unit">轮</span>
|
<span class="val-unit">轮</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="slider-meta-info">
|
<div class="slider-meta-info">
|
||||||
<span>预计耗时约 {{ Math.round(customMaxRounds * 0.6) }} 分钟</span>
|
<span>若Agent规模为100:预计耗时约 {{ Math.round(customMaxRounds * 0.6) }} 分钟</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -497,7 +497,7 @@
|
||||||
<circle cx="12" cy="12" r="10"></circle>
|
<circle cx="12" cy="12" r="10"></circle>
|
||||||
<polyline points="12 6 12 12 16 14"></polyline>
|
<polyline points="12 6 12 12 16 14"></polyline>
|
||||||
</svg>
|
</svg>
|
||||||
预计耗时 {{ Math.round(autoGeneratedRounds * 0.6) }} 分钟
|
若Agent规模为100:预计耗时 {{ Math.round(autoGeneratedRounds * 0.6) }} 分钟
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="auto-desc">
|
<div class="auto-desc">
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -52,6 +52,7 @@
|
||||||
<Step3Simulation
|
<Step3Simulation
|
||||||
:simulationId="currentSimulationId"
|
:simulationId="currentSimulationId"
|
||||||
:maxRounds="maxRounds"
|
:maxRounds="maxRounds"
|
||||||
|
:minutesPerRound="minutesPerRound"
|
||||||
:projectData="projectData"
|
:projectData="projectData"
|
||||||
:graphData="graphData"
|
:graphData="graphData"
|
||||||
:systemLogs="systemLogs"
|
:systemLogs="systemLogs"
|
||||||
|
|
@ -71,7 +72,7 @@ import { useRoute, useRouter } from 'vue-router'
|
||||||
import GraphPanel from '../components/GraphPanel.vue'
|
import GraphPanel from '../components/GraphPanel.vue'
|
||||||
import Step3Simulation from '../components/Step3Simulation.vue'
|
import Step3Simulation from '../components/Step3Simulation.vue'
|
||||||
import { getProject, getGraphData } from '../api/graph'
|
import { getProject, getGraphData } from '../api/graph'
|
||||||
import { getSimulation, stopSimulation, closeSimulationEnv, getEnvStatus } from '../api/simulation'
|
import { getSimulation, getSimulationConfig, stopSimulation, closeSimulationEnv, getEnvStatus } from '../api/simulation'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
@ -88,6 +89,7 @@ const viewMode = ref('split')
|
||||||
const currentSimulationId = ref(route.params.simulationId)
|
const currentSimulationId = ref(route.params.simulationId)
|
||||||
// 直接在初始化时从 query 参数获取 maxRounds,确保子组件能立即获取到值
|
// 直接在初始化时从 query 参数获取 maxRounds,确保子组件能立即获取到值
|
||||||
const maxRounds = ref(route.query.maxRounds ? parseInt(route.query.maxRounds) : null)
|
const maxRounds = ref(route.query.maxRounds ? parseInt(route.query.maxRounds) : null)
|
||||||
|
const minutesPerRound = ref(30) // 默认每轮30分钟
|
||||||
const projectData = ref(null)
|
const projectData = ref(null)
|
||||||
const graphData = ref(null)
|
const graphData = ref(null)
|
||||||
const graphLoading = ref(false)
|
const graphLoading = ref(false)
|
||||||
|
|
@ -206,6 +208,17 @@ const loadSimulationData = async () => {
|
||||||
if (simRes.success && simRes.data) {
|
if (simRes.success && simRes.data) {
|
||||||
const simData = simRes.data
|
const simData = simRes.data
|
||||||
|
|
||||||
|
// 获取 simulation config 以获取 minutes_per_round
|
||||||
|
try {
|
||||||
|
const configRes = await getSimulationConfig(currentSimulationId.value)
|
||||||
|
if (configRes.success && configRes.data?.time_config?.minutes_per_round) {
|
||||||
|
minutesPerRound.value = configRes.data.time_config.minutes_per_round
|
||||||
|
addLog(`时间配置: 每轮 ${minutesPerRound.value} 分钟`)
|
||||||
|
}
|
||||||
|
} catch (configErr) {
|
||||||
|
addLog(`获取时间配置失败,使用默认值: ${minutesPerRound.value}分钟/轮`)
|
||||||
|
}
|
||||||
|
|
||||||
// 获取 project 信息
|
// 获取 project 信息
|
||||||
if (simData.project_id) {
|
if (simData.project_id) {
|
||||||
const projRes = await getProject(simData.project_id)
|
const projRes = await getProject(simData.project_id)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue