Add simulation API and environment setup components
- Introduced simulation.js API for creating and managing simulations, including methods for creating, preparing, and retrieving simulation statuses. - Added Step1GraphBuild.vue and Step2EnvSetup.vue components to facilitate the graph building and environment setup processes, enhancing user interaction and workflow. - Updated MainView.vue to integrate new components and manage the simulation workflow, including step indicators and navigation between steps. - Created SimulationView.vue for displaying simulation details and managing the simulation environment, improving overall user experience and functionality.
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
|
||||
<div class="header-right">
|
||||
<div class="workflow-step">
|
||||
<span class="step-num">Step 1/5</span>
|
||||
<span class="step-name">图谱构建</span>
|
||||
<span class="step-num">Step {{ currentStep }}/5</span>
|
||||
<span class="step-name">{{ stepNames[currentStep - 1] }}</span>
|
||||
</div>
|
||||
<div class="step-divider"></div>
|
||||
<span class="status-indicator" :class="statusClass">
|
||||
@@ -46,9 +46,11 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Right Panel: Workbench -->
|
||||
<!-- Right Panel: Step Components -->
|
||||
<div class="panel-wrapper right" :style="rightPanelStyle">
|
||||
<WorkbenchPanel
|
||||
<!-- Step 1: 图谱构建 -->
|
||||
<Step1GraphBuild
|
||||
v-if="currentStep === 1"
|
||||
:currentPhase="currentPhase"
|
||||
:projectData="projectData"
|
||||
:ontologyProgress="ontologyProgress"
|
||||
@@ -57,6 +59,16 @@
|
||||
:systemLogs="systemLogs"
|
||||
@next-step="handleNextStep"
|
||||
/>
|
||||
<!-- Step 2: 环境搭建 -->
|
||||
<Step2EnvSetup
|
||||
v-else-if="currentStep === 2"
|
||||
:projectData="projectData"
|
||||
:graphData="graphData"
|
||||
:systemLogs="systemLogs"
|
||||
@go-back="handleGoBack"
|
||||
@next-step="handleNextStep"
|
||||
@add-log="addLog"
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
@@ -66,7 +78,8 @@
|
||||
import { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import GraphPanel from '../components/GraphPanel.vue'
|
||||
import WorkbenchPanel from '../components/WorkbenchPanel.vue'
|
||||
import Step1GraphBuild from '../components/Step1GraphBuild.vue'
|
||||
import Step2EnvSetup from '../components/Step2EnvSetup.vue'
|
||||
import { generateOntology, getProject, buildGraph, getTaskStatus, getGraphData } from '../api/graph'
|
||||
import { getPendingUpload, clearPendingUpload } from '../store/pendingUpload'
|
||||
|
||||
@@ -76,6 +89,10 @@ const router = useRouter()
|
||||
// Layout State
|
||||
const viewMode = ref('split') // graph | split | workbench
|
||||
|
||||
// Step State
|
||||
const currentStep = ref(1) // 1: 图谱构建, 2: 环境搭建, 3: 开始模拟, 4: 报告生成, 5: 深度互动
|
||||
const stepNames = ['图谱构建', '环境搭建', '开始模拟', '报告生成', '深度互动']
|
||||
|
||||
// Data State
|
||||
const currentProjectId = ref(route.params.projectId)
|
||||
const loading = ref(false)
|
||||
@@ -140,7 +157,17 @@ const toggleMaximize = (target) => {
|
||||
}
|
||||
|
||||
const handleNextStep = () => {
|
||||
alert('Environment Setup coming soon...')
|
||||
if (currentStep.value < 5) {
|
||||
currentStep.value++
|
||||
addLog(`进入 Step ${currentStep.value}: ${stepNames[currentStep.value - 1]}`)
|
||||
}
|
||||
}
|
||||
|
||||
const handleGoBack = () => {
|
||||
if (currentStep.value > 1) {
|
||||
currentStep.value--
|
||||
addLog(`返回 Step ${currentStep.value}: ${stepNames[currentStep.value - 1]}`)
|
||||
}
|
||||
}
|
||||
|
||||
// --- Data Logic ---
|
||||
|
||||
Reference in New Issue
Block a user