refactor(wizard): bifurcation MainView selon route.query.mode + i18n Private
- MainView.vue lit route.query.mode (public|private) et bifurque après graph build
- État Private remonté dans MainView (privateForm, privateSimStatus, timers...)
- Cleanup timers sur onBeforeRouteLeave + onBeforeRouteUpdate + onUnmounted
- currentStep reset sur changement de mode via watcher isPrivateMode
- Step1GraphBuild reçoit mode prop ('public'|'private'), gate createSimulation+router.push en Public, emit('next-step') en Private
- Ajout clés i18n public.stepNames, public.modeBadge, private.stepNames, private.modeBadge (EN + ZH)
- Hardcode "PRIVATE IMPACT" et arrays privateStepNames/privateBreadcrumb migrés vers tm()
Prompts N°24 + N°27 — Roadmap refactoring wizard
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
e4fe3f91aa
commit
75d5a9bf64
|
|
@ -201,10 +201,11 @@ const props = defineProps({
|
|||
ontologyProgress: Object,
|
||||
buildProgress: Object,
|
||||
graphData: Object,
|
||||
systemLogs: { type: Array, default: () => [] }
|
||||
systemLogs: { type: Array, default: () => [] },
|
||||
mode: { type: String, default: 'public' }
|
||||
})
|
||||
|
||||
defineEmits(['next-step'])
|
||||
const emit = defineEmits(['next-step'])
|
||||
|
||||
const selectedOntologyItem = ref(null)
|
||||
const logContent = ref(null)
|
||||
|
|
@ -216,9 +217,15 @@ const handleEnterEnvSetup = async () => {
|
|||
console.error('缺少项目或图谱信息')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// Mode privé : pas de simulation publique, on passe directement à l'étape 2 (Requirement)
|
||||
if (props.mode === 'private') {
|
||||
emit('next-step')
|
||||
return
|
||||
}
|
||||
|
||||
creatingSimulation.value = true
|
||||
|
||||
|
||||
try {
|
||||
const res = await createSimulation({
|
||||
project_id: props.projectData.project_id,
|
||||
|
|
@ -226,7 +233,7 @@ const handleEnterEnvSetup = async () => {
|
|||
enable_twitter: true,
|
||||
enable_reddit: true
|
||||
})
|
||||
|
||||
|
||||
if (res.success && res.data?.simulation_id) {
|
||||
// 跳转到 simulation 页面
|
||||
router.push({
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -77,6 +77,14 @@
|
|||
"layoutWorkbench": "Workbench",
|
||||
"stepNames": ["Graph Build", "Env Setup", "Run Simulation", "Report Generation", "Deep Interaction"]
|
||||
},
|
||||
"public": {
|
||||
"stepNames": ["Graph Build", "Env Setup", "Run Simulation", "Report Generation", "Deep Interaction"],
|
||||
"modeBadge": "PUBLIC OPINION"
|
||||
},
|
||||
"private": {
|
||||
"stepNames": ["Requirement", "Prepare", "Run", "Report", "Interact"],
|
||||
"modeBadge": "PRIVATE IMPACT"
|
||||
},
|
||||
"step1": {
|
||||
"ontologyGeneration": "Ontology Generation",
|
||||
"ontologyCompleted": "Completed",
|
||||
|
|
|
|||
|
|
@ -77,6 +77,14 @@
|
|||
"layoutWorkbench": "工作台",
|
||||
"stepNames": ["图谱构建", "环境搭建", "开始模拟", "报告生成", "深度互动"]
|
||||
},
|
||||
"public": {
|
||||
"stepNames": ["图谱构建", "环境搭建", "开始模拟", "报告生成", "深度互动"],
|
||||
"modeBadge": "公共舆论"
|
||||
},
|
||||
"private": {
|
||||
"stepNames": ["需求", "准备", "运行", "报告", "互动"],
|
||||
"modeBadge": "私域影响"
|
||||
},
|
||||
"step1": {
|
||||
"ontologyGeneration": "本体生成",
|
||||
"ontologyCompleted": "已完成",
|
||||
|
|
|
|||
Loading…
Reference in New Issue