diff --git a/src/App.vue b/src/App.vue index 549c19f..8efdd62 100644 --- a/src/App.vue +++ b/src/App.vue @@ -17,14 +17,6 @@ import cache from "@/plugins/cache"; import { removeUserInfo, removeToken } from "@/utils/auth.js"; const stepNameSelector = ".step-tab .step-copy > strong, .step-tab .step-copy > b, .step-tab .step-copy > .step-name"; -const stepActionSelector = [ - ".student-training-shell .step-actions > button", - ".student-training-shell .step-navigation > button", - ".student-training-shell .footer-actions > button", - ".student-training-shell .training-actions > button", - ".student-training-shell .task-actions > button", - ".student-training-shell .taskfooter > button", -].join(","); let stepNameObserver; let stepTitleRefreshQueued = false; @@ -35,24 +27,11 @@ function addStepNameTitles() { }); } -function normalizeStepActionStyles() { - document.querySelectorAll(stepActionSelector).forEach((button) => { - const label = String(button.textContent || "").replace(/\s+/g, " ").trim(); - const isPrevious = label.includes("上一步"); - const isPrimary = label.includes("保存当前进度") || label.includes("下一步"); - if (!isPrevious && !isPrimary) return; - button.classList.add("student-step-action"); - button.classList.toggle("student-step-action--primary", isPrimary); - button.classList.toggle("student-step-action--secondary", isPrevious); - }); -} - function queueStepNameTitleRefresh() { if (stepTitleRefreshQueued) return; stepTitleRefreshQueued = true; requestAnimationFrame(() => { addStepNameTitles(); - normalizeStepActionStyles(); stepTitleRefreshQueued = false; }); } diff --git a/src/assets/styles/student-training.scss b/src/assets/styles/student-training.scss index 9326be6..869b3ac 100644 --- a/src/assets/styles/student-training.scss +++ b/src/assets/styles/student-training.scss @@ -734,181 +734,3 @@ margin-left: 0 !important; } } - -/* - * 学生端所有步骤底部操作统一为同一视觉与布局契约。 - * 页面可以保留原有的按钮文案和业务处理函数,只需使用任一标准操作容器。 - */ -.student-training-shell .step-actions, -.student-training-shell .step-navigation, -.student-training-shell .footer-actions, -.student-training-shell .training-actions, -.student-training-shell .task-actions, -.student-training-shell .taskfooter { - display: flex !important; - flex-wrap: wrap !important; - align-items: center !important; - justify-content: center !important; - gap: 14px !important; - margin-top: 30px !important; - padding: 0 !important; -} - -.student-training-shell .step-actions > button, -.student-training-shell .step-actions .el-button, -.student-training-shell .step-navigation > button, -.student-training-shell .step-navigation .el-button, -.student-training-shell .footer-actions > button, -.student-training-shell .footer-actions .el-button, -.student-training-shell .training-actions .el-button.training-action, -.student-training-shell .training-actions button.training-action, -.student-training-shell .task-actions > button, -.student-training-shell .taskfooter .el-button { - box-sizing: border-box !important; - display: inline-flex !important; - align-items: center !important; - justify-content: center !important; - gap: 8px !important; - min-width: 132px !important; - width: auto !important; - height: 42px !important; - min-height: 42px !important; - margin: 0 !important; - padding: 0 18px !important; - border: 1px solid #2cc9ff !important; - border-radius: var(--student-radius-pill) !important; - color: #dff8ff !important; - background: rgba(8, 87, 121, 0.55) !important; - box-shadow: none !important; - font-size: 15px !important; - font-weight: 800 !important; - line-height: 1 !important; - letter-spacing: 0 !important; -} - -.student-training-shell .step-actions > button:hover:not(:disabled), -.student-training-shell .step-actions .el-button:hover:not(.is-disabled), -.student-training-shell .step-navigation > button:hover:not(:disabled), -.student-training-shell .step-navigation .el-button:hover:not(.is-disabled), -.student-training-shell .footer-actions > button:hover:not(:disabled), -.student-training-shell .footer-actions .el-button:hover:not(.is-disabled), -.student-training-shell .training-actions .el-button.training-action:hover:not(.is-disabled), -.student-training-shell .training-actions button.training-action:hover:not(:disabled), -.student-training-shell .task-actions > button:hover:not(:disabled), -.student-training-shell .taskfooter .el-button:hover:not(.is-disabled) { - border-color: #75e6ff !important; - color: #fff !important; - background: rgba(18, 146, 204, 0.58) !important; - transform: translateY(-1px); -} - -.student-training-shell .step-actions > .btn-primary, -.student-training-shell .step-actions > .primary, -.student-training-shell .step-actions > .action-button.primary, -.student-training-shell .step-actions .step-action--save, -.student-training-shell .step-actions .step-action--next, -.student-training-shell .step-actions .step-action-btn--save, -.student-training-shell .step-actions .step-action-btn--next, -.student-training-shell .step-navigation > .btn-primary, -.student-training-shell .step-navigation > .btn-save, -.student-training-shell .step-navigation > .nav-button--primary, -.student-training-shell .step-navigation > .nav-button--save, -.student-training-shell .footer-actions .el-button--primary, -.student-training-shell .training-actions .training-action--submit, -.student-training-shell .task-actions > .btn-submit, -.student-training-shell .task-actions > .btn-primary, -.student-training-shell .taskfooter .el-button:first-child { - border-color: #36d9ff !important; - color: #fff !important; - background: linear-gradient(110deg, #0eaae4, #0572ac) !important; -} - -.student-training-shell .step-actions > button:disabled, -.student-training-shell .step-actions .el-button.is-disabled, -.student-training-shell .step-navigation > button:disabled, -.student-training-shell .step-navigation .el-button.is-disabled, -.student-training-shell .footer-actions > button:disabled, -.student-training-shell .footer-actions .el-button.is-disabled, -.student-training-shell .training-actions .el-button.is-disabled, -.student-training-shell .task-actions > button:disabled, -.student-training-shell .taskfooter .el-button.is-disabled { - cursor: not-allowed !important; - opacity: .5 !important; - transform: none !important; -} - -@media (max-width: 720px) { - .student-training-shell .step-actions, - .student-training-shell .step-navigation, - .student-training-shell .footer-actions, - .student-training-shell .training-actions, - .student-training-shell .task-actions, - .student-training-shell .taskfooter { - align-items: stretch !important; - } - - .student-training-shell .step-actions > button, - .student-training-shell .step-actions .el-button, - .student-training-shell .step-navigation > button, - .student-training-shell .step-navigation .el-button, - .student-training-shell .footer-actions > button, - .student-training-shell .footer-actions .el-button, - .student-training-shell .training-actions .el-button.training-action, - .student-training-shell .training-actions button.training-action, - .student-training-shell .task-actions > button, - .student-training-shell .taskfooter .el-button { - width: 100% !important; - } -} - -/* - * 页面历史上使用了多套按钮类名。由 App.vue 为步骤操作标记统一语义类, - * 这里作为最终覆盖层,保证所有学生端底部导航的尺寸、圆角和主次层级一致。 - */ -.student-training-shell .step-actions > button.student-step-action, -.student-training-shell .step-navigation > button.student-step-action, -.student-training-shell .footer-actions > button.student-step-action, -.student-training-shell .training-actions > button.student-step-action, -.student-training-shell .task-actions > button.student-step-action, -.student-training-shell .taskfooter > button.student-step-action { - box-sizing: border-box !important; - display: inline-flex !important; - align-items: center !important; - justify-content: center !important; - min-width: 132px !important; - height: 42px !important; - min-height: 42px !important; - margin: 0 !important; - padding: 0 18px !important; - border: 1px solid #2cc9ff !important; - border-radius: 999px !important; - color: #dff8ff !important; - background: rgba(8, 87, 121, 0.55) !important; - box-shadow: none !important; - font-size: 15px !important; - font-weight: 800 !important; - line-height: 1 !important; - letter-spacing: 0 !important; -} - -.student-training-shell .step-actions > button.student-step-action--primary, -.student-training-shell .step-navigation > button.student-step-action--primary, -.student-training-shell .footer-actions > button.student-step-action--primary, -.student-training-shell .training-actions > button.student-step-action--primary, -.student-training-shell .task-actions > button.student-step-action--primary, -.student-training-shell .taskfooter > button.student-step-action--primary { - border-color: #36d9ff !important; - color: #ffffff !important; - background: linear-gradient(110deg, #0eaae4, #0572ac) !important; -} - -.student-training-shell .step-actions > button.student-step-action--secondary, -.student-training-shell .step-navigation > button.student-step-action--secondary, -.student-training-shell .footer-actions > button.student-step-action--secondary, -.student-training-shell .training-actions > button.student-step-action--secondary, -.student-training-shell .task-actions > button.student-step-action--secondary, -.student-training-shell .taskfooter > button.student-step-action--secondary { - border-color: #2cc9ff !important; - color: #dff8ff !important; - background: rgba(8, 87, 121, 0.55) !important; -} diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 2241ae6..9f10f75 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -14,6 +14,7 @@ +
正在加载当前实训配置 @@ -31,6 +32,7 @@ import * as indexApi from "@/api/index"; const { proxy } = getCurrentInstance(); import { dynamicRoutes } from "@/router"; import iframeToggle from "./IframeToggle/index"; +import DynamicTrainingStepNavigator from "@/views/components/DynamicTrainingStepNavigator.vue"; import useTagsViewStore from "@/store/modules/tagsView"; import { getUserInfo } from "@/utils/auth"; import useUserStore from "@/store/modules/user"; diff --git a/src/views/assessment/diagnosis.vue b/src/views/assessment/diagnosis.vue index 40149e4..5332304 100644 --- a/src/views/assessment/diagnosis.vue +++ b/src/views/assessment/diagnosis.vue @@ -2,9 +2,9 @@
核心实训 · 产品上线与运营推广

{{ taskTitle }}

- +
-

产品问题诊断与迭代

{{ currentStep === 1 ? '全链路转化漏斗诊断' : currentStep === 2 ? '用户评论根因分析' : 'AB 测试验证方案' }}

+

产品问题诊断与迭代

{{ currentStep === 1 ? '全链路转化漏斗诊断' : currentStep === 2 ? '用户评论根因分析' : 'AB 测试验证方案' }}

-
@@ -45,10 +47,10 @@ import { computed, getCurrentInstance, nextTick, onBeforeUnmount, onMounted, ref import * as echarts from "echarts"; import "echarts-wordcloud"; import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue"; -import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue"; +import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue"; import TrainingTaskBrief from "@/views/components/TrainingTaskBrief.vue"; import { getTrainingTaskByKey } from "@/api/trainingTask"; -import { analyzeProductDiagnosisIterationStepTwo, deleteStudentTrainingAnswer, getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile, validateProductDiagnosisIterationStepOne, validateProductDiagnosisIterationStepTwo, validateProductDiagnosisIterationStepThree } from "@/api/studentTrainingAnswer"; +import { analyzeProductDiagnosisIterationStepTwo, getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile, validateProductDiagnosisIterationStepOne, validateProductDiagnosisIterationStepTwo, validateProductDiagnosisIterationStepThree } from "@/api/studentTrainingAnswer"; import { parseTrainingArray } from "@/views/training/taskKeyMap"; import { isStudentDemo } from "@/utils/studentDemo"; @@ -77,75 +79,12 @@ async function handleChartUpload(event) { const file = event.target?.files?.[0]; async function saveStepOneDraft() { await persistStepOne(false); } async function validateStepOne() { if (saving.value) return; saving.value = true; try { const data = buildStepOne(); await validateProductDiagnosisIterationStepOne(data); await saveStudentTrainingAnswer(TASK_KEY, { step1Answer: JSON.stringify(data), currentStep: 2, submitted: false, saveAction: "SAVE" }); currentStep.value = 2; proxy?.$modal?.msgSuccess?.("第 1 步校验通过,已进入第 2 步"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "请检查第 1 步填写内容"); } finally { saving.value = false; } } async function persistStepOne(showMessage) { if (saving.value) return; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step1Answer: JSON.stringify(buildStepOne()), currentStep: 1, submitted: false, saveAction: "SAVE" }); if (showMessage !== false) proxy?.$modal?.msgSuccess?.("草稿已保存"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); } finally { saving.value = false; } } async function handleCommentImport(event) { const file = event.target?.files?.[0]; if (!file) return; if (!/\.(csv|txt|xls|xlsx)$/i.test(file.name) || file.size > 5 * 1024 * 1024) { proxy?.$modal?.msgError?.("请上传不超过 5MB 的 CSV、TXT、XLS 或 XLSX 评论文件"); event.target.value = ""; return; } analyzing.value = true; try { const result = (await analyzeProductDiagnosisIterationStepTwo(file))?.data; if (!result) throw new Error("未获得评论分析结果"); analysisResult.value = result; commentPreview.value = { fileName: result.sourceFileName || file.name, totalComments: result.totalComments || 0, comments: result.previewComments || [] }; wordCloud.value = result.wordCloud || []; topIssues.value = [0, 1, 2].map((index) => result.topIssues?.[index] || ""); sentiments.value = createSentiments(); await nextTick(); renderWordCloud(); proxy?.$modal?.msgSuccess?.("评论数据已导入,词云已生成"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "评论数据分析失败,请检查文件格式"); } finally { analyzing.value = false; event.target.value = ""; } } function renderWordCloud() { if (!wordCloudRef.value || !wordCloud.value.length) return; wordCloudChart?.dispose(); wordCloudChart = echarts.init(wordCloudRef.value); wordCloudChart.setOption({ backgroundColor: "transparent", tooltip: { show: true }, series: [{ type: "wordCloud", shape: "circle", gridSize: 5, sizeRange: [16, 58], rotationRange: [-35, 35], textStyle: { color: () => ["#53e2ff", "#6ae1bb", "#ffd06a", "#91b8ff", "#ff9e88"][Math.floor(Math.random() * 5)] }, data: wordCloud.value }] }); } -function runSentimentAnalysis() { - if (!analysisResult.value) return; - const counts = [analysisResult.value.positiveCount, analysisResult.value.neutralCount, analysisResult.value.negativeCount].map((value) => Number(value) || 0); - const total = counts.reduce((sum, value) => sum + value, 0); - sentiments.value = ["正面", "中性", "负面"].map((type, index) => ({ - type, - count: counts[index], - percentage: total > 0 ? Number((counts[index] * 100 / total).toFixed(2)) : null, - })); - proxy?.$modal?.msgSuccess?.("情感评论数量与占比已自动计算"); -} -async function saveStepTwoDraft() { if (saving.value) return false; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(buildStepTwo()), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("当前步骤已保存"); return true; } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); return false; } finally { saving.value = false; } } async function validateStepTwo() { if (saving.value) return false; saving.value = true; try { const data = buildStepTwo(); await validateProductDiagnosisIterationStepTwo(data); await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(data), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("第 2 步校验通过,已保存"); return true; } catch (error) { proxy?.$modal?.msgError?.(error?.message || "请检查词云、情感占比和根因分析"); return false; } finally { saving.value = false; } } +function runSentimentAnalysis() { if (!analysisResult.value) return; sentiments.value = [{ type: "正面", count: analysisResult.value.positiveCount, percentage: null }, { type: "中性", count: analysisResult.value.neutralCount, percentage: null }, { type: "负面", count: analysisResult.value.negativeCount, percentage: null }]; proxy?.$modal?.msgSuccess?.("评论数量已自动填充,请计算并填写各类情感占比"); } +async function saveStepTwoDraft() { if (saving.value) return; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(buildStepTwo()), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("草稿已保存"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); } finally { saving.value = false; } } async function validateStepTwo() { if (saving.value) return; saving.value = true; try { const data = buildStepTwo(); await validateProductDiagnosisIterationStepTwo(data); await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(data), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("第 2 步校验通过,已保存"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "请检查词云、情感占比和根因分析"); } finally { saving.value = false; } } function clearAbChart() { if (abChart.value.url.startsWith("blob:")) URL.revokeObjectURL(abChart.value.url); abChart.value = { url: "", name: "" }; } async function handleAbChartUpload(event) { const file = event.target?.files?.[0]; if (!file) return; const accepted = ["image/jpeg", "image/png", "image/webp"]; if (!accepted.includes(file.type) || file.size > 5 * 1024 * 1024) { proxy?.$modal?.msgError?.("请上传不超过 5MB 的 PNG、JPG 或 WEBP 图片"); event.target.value = ""; return; } uploading.value = true; try { let url = ""; if (isStudentDemo()) url = URL.createObjectURL(file); else { const data = new FormData(); data.append("file", file); const response = await uploadStudentTrainingFile(data); url = response?.url || response?.data?.url || ""; } if (!url) throw new Error("上传成功但未返回图片地址"); clearAbChart(); abChart.value = { url, name: file.name }; proxy?.$modal?.msgSuccess?.("AB 测试结果对比图上传成功,可点击图片预览"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "图片上传失败,请重试"); } finally { uploading.value = false; event.target.value = ""; } } async function saveStepThreeDraft() { if (saving.value) return; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step3Answer: JSON.stringify(buildStepThree()), currentStep: 3, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("草稿已保存"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); } finally { saving.value = false; } } -async function saveCurrentProgress() { - if (currentStep.value === 1) return persistStepOne(true); - if (currentStep.value === 2) return saveStepTwoDraft(); - return saveStepThreeDraft(); -} -async function nextStep() { - if (currentStep.value === 1) return validateStepOne(); - if (currentStep.value === 2 && await validateStepTwo()) currentStep.value = 3; -} async function validateStepThree() { if (saving.value) return; saving.value = true; try { const data = buildStepThree(); await validateProductDiagnosisIterationStepThree(data); await saveStudentTrainingAnswer(TASK_KEY, { step3Answer: JSON.stringify(data), currentStep: 3, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("第 3 步校验通过,已保存"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "请检查 AB 测试方案、指标数据和对比图"); } finally { saving.value = false; } } -async function submitTask() { - if (saving.value || uploading.value || analyzing.value) return false; - saving.value = true; - try { - const stepOne = buildStepOne(); - await validateProductDiagnosisIterationStepOne(stepOne); - await saveStudentTrainingAnswer(TASK_KEY, { step1Answer: JSON.stringify(stepOne), currentStep: 1, submitted: false, saveAction: "SAVE" }); - const stepTwo = buildStepTwo(); - await validateProductDiagnosisIterationStepTwo(stepTwo); - await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(stepTwo), currentStep: 2, submitted: false, saveAction: "SAVE" }); - const stepThree = buildStepThree(); - await validateProductDiagnosisIterationStepThree(stepThree); - await saveStudentTrainingAnswer(TASK_KEY, { step3Answer: JSON.stringify(stepThree), currentStep: 3, submitted: true, saveAction: "SUBMIT" }); - currentStep.value = 3; - proxy?.$modal?.msgSuccess?.("实训任务已提交"); - return true; - } catch (error) { - proxy?.$modal?.msgError?.(error?.message || "提交失败,请检查三个步骤的填写内容"); - return false; - } finally { - saving.value = false; - } -} -async function resetTraining() { - if (saving.value || uploading.value || analyzing.value) return false; - try { - await deleteStudentTrainingAnswer(TASK_KEY); - clearChart(); clearAbChart(); wordCloudChart?.dispose(); wordCloudChart = null; - conversionRates.value = createConversionRates(); anomalyRows.value = [createAnomalyRow()]; analysisResult.value = null; - commentPreview.value = { fileName: "", totalComments: 0, comments: [] }; wordCloud.value = []; topIssues.value = ["", "", ""]; sentiments.value = createSentiments(); rootCauseAnalysis.value = ""; - abTestPlan.value = ""; abRows.value = createAbRows(); iterationRecommendation.value = ""; currentStep.value = 1; - proxy?.$modal?.msgSuccess?.("已清空全部实训步骤,可以重新开始"); - return true; - } catch (error) { - proxy?.$modal?.msgError?.(error?.message || "重新实训失败,请稍后重试"); - return false; - } -} -function exportTrainingOutcome() { - const outcome = { taskName: taskTitle.value, exportedAt: new Date().toISOString(), step1: buildStepOne(), step2: buildStepTwo(), step3: buildStepThree() }; - const url = URL.createObjectURL(new Blob([JSON.stringify(outcome, null, 2)], { type: "application/json;charset=utf-8" })); - const link = document.createElement("a"); link.href = url; link.download = "产品问题诊断与迭代-实训成果.json"; document.body.appendChild(link); link.click(); document.body.removeChild(link); URL.revokeObjectURL(url); - proxy?.$modal?.msgSuccess?.("实训成果已导出"); -} function restore(answer) { try { const stepOne = JSON.parse(answer?.step1Answer || "{}"); if (Array.isArray(stepOne.conversionRates) && stepOne.conversionRates.length === nodes.length) conversionRates.value = nodes.map((node) => ({ ...createConversionRates().find((row) => row.linkNode === node), ...(stepOne.conversionRates.find((row) => row?.linkNode === node) || {}) })); if (Array.isArray(stepOne.anomalyRows) && stepOne.anomalyRows.length) anomalyRows.value = stepOne.anomalyRows.slice(0, 5).map((row) => ({ ...createAnomalyRow(), ...row })); if (stepOne.funnelChartUrl) funnelChart.value = { url: stepOne.funnelChartUrl, name: stepOne.funnelChartName || "节点转化漏斗对比图" }; const stepTwo = JSON.parse(answer?.step2Answer || "{}"); if (stepTwo.sourceFileName) { commentPreview.value = { fileName: stepTwo.sourceFileName, totalComments: 0, comments: stepTwo.previewComments || [] }; wordCloud.value = stepTwo.wordCloud || []; topIssues.value = [0, 1, 2].map((index) => stepTwo.topIssues?.[index] || ""); sentiments.value = (stepTwo.sentiments || createSentiments()).map((row) => ({ ...createSentiments().find((item) => item.type === row.type), ...row })); rootCauseAnalysis.value = stepTwo.rootCauseAnalysis || ""; nextTick(renderWordCloud); } const stepThree = JSON.parse(answer?.step3Answer || "{}"); if (stepThree.testPlan || stepThree.comparisonChartUrl || stepThree.iterationRecommendation) { abTestPlan.value = stepThree.testPlan || ""; if (Array.isArray(stepThree.rows) && stepThree.rows.length === createAbRows().length) abRows.value = createAbRows().map((row) => ({ ...row, ...(stepThree.rows.find((item) => item?.metric === row.metric) || {}) })); if (stepThree.comparisonChartUrl) abChart.value = { url: stepThree.comparisonChartUrl, name: stepThree.comparisonChartName || "AB 测试结果对比图" }; iterationRecommendation.value = stepThree.iterationRecommendation || ""; } currentStep.value = [1, 2, 3].includes(Number(answer?.currentStep)) ? Number(answer.currentStep) : 1; } catch (error) {} } onMounted(async () => { try { taskConfig.value = (await getTrainingTaskByKey(TASK_KEY))?.data || null; } catch (error) { taskConfig.value = null; } try { restore((await getStudentTrainingAnswer(TASK_KEY))?.data); } catch (error) {} }); onBeforeUnmount(() => { if (funnelChart.value.url.startsWith("blob:")) URL.revokeObjectURL(funnelChart.value.url); if (abChart.value.url.startsWith("blob:")) URL.revokeObjectURL(abChart.value.url); wordCloudChart?.dispose(); }); @@ -188,6 +127,4 @@ onMounted(async () => { try { taskConfig.value = (await getTrainingTaskByKey(TAS .workbench .step-tabs .step-connector::after{width:8px;height:8px;border-color:#73c8e7} .sentiment-table td:last-child{white-space:nowrap}.sentiment-table td:last-child :deep(.el-input-number){display:inline-flex;width:calc(100% - 32px);vertical-align:middle}.sentiment-table td:last-child .unit{display:inline-flex;align-items:center;height:32px;margin-left:6px;vertical-align:middle} @media(max-width:1100px){.diagnosis-page{grid-template-columns:1fr}}@media(max-width:720px){.diagnosis-page{padding:12px}.diagnosis-core{padding:16px;border-radius:20px}.workbench{padding:16px}.workbench-top,.table-toolbar,.sentiment-actions{align-items:stretch;flex-direction:column}.step-tabs{align-items:stretch;flex-direction:column}.step-tabs button{flex:0 0 auto;width:100%}.step-tabs i{flex:0 0 12px;width:2px;height:12px;margin-left:17px}.diagnosis-materials__item,.ab-materials{align-items:stretch;flex-direction:column}.top-issues>div{grid-template-columns:1fr}.chart-preview{align-items:flex-start;flex-direction:column}.chart-preview :deep(.el-image){width:100%;height:170px}} -.diagnosis-toolbar{align-self:center;justify-content:flex-end;max-width:100%} -@media(max-width:720px){.diagnosis-toolbar{width:100%;justify-content:flex-start}} diff --git a/src/views/assessment/five.vue b/src/views/assessment/five.vue index 5d4bfd0..f18116e 100644 --- a/src/views/assessment/five.vue +++ b/src/views/assessment/five.vue @@ -162,11 +162,16 @@

+
+ 提交任务 + 重新实训 +
diff --git a/src/views/demand/competitive-environment-analysis.vue b/src/views/demand/competitive-environment-analysis.vue index 60c6974..6892db2 100644 --- a/src/views/demand/competitive-environment-analysis.vue +++ b/src/views/demand/competitive-environment-analysis.vue @@ -2,33 +2,30 @@
核心实训 · 市场洞察与需求分析

{{ taskTitle }}

- +
-
-
-

MARKET INSIGHT · COMPETITIVE ANALYSIS

-

{{ trainingSteps[currentStep - 1] || taskTitle }}

-
- -
+