refactor(channel): 重构供应渠道相关页面样式与布局

1. 统一使用新的墨黑极简主题变量替换旧的蓝色主题样式
2. 重构任务头部区域,新增可展开的实训目标要求折叠面板
3. 优化步骤导航样式与交互逻辑
4. 移除冗余的TrainingTaskBrief组件引用,改用原生实现
5. 调整表格、卡片等组件的样式风格适配新主题
fix/exam-question-access-material-excel-delete-draft
qinzhenpen 2 months ago
parent 30bc72da8c
commit 3630721945

@ -1,10 +1,29 @@
<template>
<template>
<div class="channel student-training-shell">
<main class="training-core">
<section class="task-header"><div class="task-badge"><el-icon><TrendCharts /></el-icon> 核心实训 · 供应渠道管理</div><h1 class="task-title">{{ taskTitle }}</h1></section>
<TrainingTaskBrief :background="taskBackground" :goals="taskGoals" :requirements="taskRequirement" :show-material="false" />
<section class="task-header">
<div class="task-head-main">
<span class="task-badge"><el-icon><TrendCharts /></el-icon> 产品开发与测试验证</span>
<h1 class="task-title">{{ taskTitle }}</h1>
<p class="task-brief">
<span class="task-brief-text">{{ taskBackground }}</span>
<button type="button" class="task-brief-toggle" @click="briefOpen = !briefOpen">
{{ briefOpen ? "收起" : "展开目标与要求" }}
</button>
<span v-if="briefOpen" class="task-brief-more">
<b>实训目标</b>
<ul><li v-for="goal in taskGoals" :key="goal">{{ goal }}</li></ul>
<b>实训要求</b>
<p>{{ taskRequirement }}</p>
</span>
</p>
</div>
<div class="channel-toolbar">
<TrainingMaterialButton :material-name="taskConfig?.materialName" :material-url="taskConfig?.materialUrl" />
<button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon>导出实训成果</button>
</div>
</section>
<section class="task-card">
<div class="workbench-head workbench-head--actions-only"><div class="workbench-actions"><TrainingMaterialButton :material-name="taskConfig?.materialName" :material-url="taskConfig?.materialUrl" /><button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon>导出实训成果</button></div></div>
<nav v-if="hasConfiguredSteps" class="step-indicator" aria-label="采购需求预测步骤"><template v-for="(step,index) in configuredSteps" :key="`${step}-${index}`"><button type="button" :class="['step-tab',{active:activeStep===index+1,complete:activeStep>index+1}]" :aria-current="activeStep===index+1?'step':undefined" :aria-label="`第${index+1}步:${step}`" @click="setCurrentStep(index+1)"><span class="step-marker">{{ String(index+1).padStart(2,'0') }}</span><span class="step-copy"><strong class="step-name" :title="step">{{ step }}</strong><span class="step-action">{{ activeStep===index+1?'当前步骤':'点击切换' }} <span aria-hidden="true">→</span></span></span></button><span v-if="index<configuredSteps.length-1" class="step-connector" aria-hidden="true"></span></template></nav>
<section v-show="isSectionVisible(1)" class="step-card"><div class="step-title-row"><div><p class="section-eyebrow">Step {{ String(activeStep).padStart(2,'0') }}</p><h3>{{ activeStepName }}</h3></div></div>
@ -103,7 +122,7 @@
:header-cell-style="{
color: '#fff',
fontSize: '14px',
backgroundColor: '#1e88e5!important',
backgroundColor: '#1f2937!important',
}"
>
<el-table-column prop="month" label="月份" align="center"></el-table-column>
@ -139,7 +158,6 @@
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskBrief from "@/views/components/TrainingTaskBrief.vue";
import * as analysisAPI from "@/api/market-demand-mining.js";
import * as echarts from "echarts";
import useUserStore from "@/store/modules/user";
@ -158,6 +176,7 @@ const PURCHASE_DEMAND_FORECAST_GUIDE_URL = "/file/training-materials/purchase-de
const taskConfig = ref(null);
const activeStep = ref(1);
const saving = ref(false);
const briefOpen = ref(false);
const taskTitle = computed(() => taskConfig.value?.taskName || "采购需求预测");
const taskBackground = computed(() => taskConfig.value?.background || "电商产品采购需求预测用于确定未来一段时间的商品需求量,帮助企业合理安排采购计划,避免库存积压或缺货。" );
const taskRequirement = computed(() => taskConfig.value?.requirements || "使用季节指数预测法,根据历史月度采购数据预测未来一年的采购量。" );
@ -799,39 +818,56 @@ onMounted(async () => {
await loadSavedProgress();
});
</script>
<style lang="scss" scoped>
.channel {
--channel-panel: #f0f6fd;
--channel-panel-strong: #ffffff;
--channel-line: #cfe2f5;
--student-accent: #1f2937;
--student-accent-deep: #111827;
--student-accent-light: #4b5563;
--student-accent-soft: #f3f4f6;
--student-danger: #d9554c;
--student-success: #4a9d6e;
--student-layer-1: #374151;
--student-layer-2: #43a294;
--student-layer-3: #8b6fc0;
--student-panel-border: #e5e7eb;
--student-card-bg: #ffffff;
--student-panel-bg: #fafbfc;
--student-text: #1f2937;
--student-text-secondary: #6b7280;
--student-fs-display: 17px;
--student-fs-h1: 15px;
--student-fs-h2: 14px;
--student-fs-h3: 13px;
--student-fs-body: 13px;
--student-fs-body-sm: 12px;
--student-fs-caption: 11px;
min-height: calc(100vh - 84px);
padding: 0 0 32px;
color: #2c4a6a;
background:
radial-gradient(circle at 10% 0%, rgba(30, 136, 229, 0.12), transparent 34%),
linear-gradient(180deg, #f0f6fd, #ffffff);
color: var(--student-text);
background: var(--student-panel-bg);
:deep(.training-step-area) {
margin-top: 0 !important;
border-color: var(--channel-line) !important;
background: var(--channel-panel) !important;
box-shadow: inset 0 1px 0 rgba(30, 136, 229, 0.12), 0 18px 38px rgba(0, 0, 0, 0.2) !important;
border-color: var(--student-panel-border) !important;
background: var(--student-panel-bg) !important;
box-shadow: inset 0 1px 0 rgba(31, 41, 55, 0.06), 0 12px 28px rgba(0, 0, 0, 0.06) !important;
}
:deep(.el-table) {
--el-table-border-color: #cfe2f5;
--el-table-header-bg-color: #dcebfb;
--el-table-header-text-color: #1e3a5f;
--el-table-row-hover-bg-color: rgba(30, 136, 229, 0.08);
--el-table-bg-color: #ffffff;
--el-table-tr-bg-color: #ffffff;
--el-table-text-color: #2c4a6a;
--el-table-border-color: var(--student-panel-border);
--el-table-header-bg-color: #fafbfc;
--el-table-header-text-color: var(--student-text);
--el-table-row-hover-bg-color: rgba(31, 41, 55, 0.05);
--el-table-bg-color: transparent;
--el-table-tr-bg-color: transparent;
--el-table-text-color: var(--student-text);
overflow: hidden;
margin-top: 12px;
border: 1px solid var(--channel-line);
border: 1px solid var(--student-panel-border);
border-radius: 12px;
background: var(--channel-panel-strong);
background: var(--student-card-bg);
}
:deep(.el-table::before),
@ -840,15 +876,15 @@ onMounted(async () => {
}
:deep(.el-table th.el-table__cell) {
color: #1e3a5f !important;
background: linear-gradient(180deg, #1e88e5, #1565c0) !important;
color: var(--student-text) !important;
background: #fafbfc !important;
font-weight: 800;
}
:deep(.el-table td.el-table__cell),
:deep(.el-table tr) {
color: #2c4a6a !important;
background: #ffffff !important;
color: var(--student-text) !important;
background: transparent !important;
}
:deep(.el-table .cell) {
@ -857,35 +893,35 @@ onMounted(async () => {
:deep(.el-input__wrapper) {
min-height: 36px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 7px;
box-shadow: none !important;
background: var(--channel-panel-strong);
background: var(--student-card-bg);
}
:deep(.el-input__inner) {
color: #1e3a5f;
color: var(--student-text);
}
:deep(.el-input__inner::placeholder) {
color: #5a7a9a;
color: var(--student-text-secondary);
}
:deep(.el-input__wrapper.is-focus) {
border-color: #4edbff;
box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12) !important;
border-color: var(--student-accent);
box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.08) !important;
}
:deep(.el-button) {
border-color: #1e88e5 !important;
color: #1e3a5f !important;
background: linear-gradient(180deg, #1e88e5, #1565c0) !important;
border-color: var(--student-accent) !important;
color: #ffffff !important;
background: var(--student-accent) !important;
}
:deep(.el-button:hover) {
border-color: #65e5ff !important;
color: #1e3a5f !important;
background: linear-gradient(180deg, #42a5f5, #1e88e5) !important;
border-color: var(--student-accent-light) !important;
color: #ffffff !important;
background: var(--student-accent-light) !important;
}
.online {
@ -894,13 +930,13 @@ onMounted(async () => {
align-items: center;
gap: 10px;
padding: 10px 12px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 10px;
background: #f0f6fd;
background: var(--student-panel-bg);
}
.online span {
color: #2c4a6a;
color: var(--student-text);
}
.taskfooter {
@ -910,7 +946,7 @@ onMounted(async () => {
gap: 28px;
margin-top: 32px;
padding-top: 28px;
border-top: 1px solid #1e88e5;
border-top: 1px solid var(--student-panel-border);
}
.taskfooter :deep(.el-button) {
@ -923,33 +959,41 @@ onMounted(async () => {
}
.channel {
display: grid; grid-template-columns: minmax(720px, 1fr) 340px; gap: 24px; min-height: calc(100vh - 76px); padding: 24px 24px 32px; color: #1e3a5f; background: #ffffff;
.training-core { min-width: 0; padding: 28px; border: 1px solid #cfe2f5; border-radius: 36px; background: #f0f6fd; box-shadow: inset 0 1px 0 rgba(30, 136, 229, 0.1), 0 22px 48px rgba(0,0,0,.22); }
.task-header { margin-bottom: 24px; }.task-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 4px 14px; border: 1px solid #cfe2f5; border-radius: 999px; color: #2c4a6a; background: #e3f2fd; font-size: var(--student-fs-caption); font-weight: 700; }.task-title { margin: 12px 0 0; color: #1e3a5f; font-size: var(--student-fs-display); font-weight: 900; line-height: 1.3; }
.task-card,.step-card { border: 1px solid #cfe2f5; border-radius: 26px; background: #f0f6fd; }.task-card { margin-top: 28px; padding: 18px 22px 22px; }.workbench-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid #cfe2f5; }.section-eyebrow { margin: 0; color: #1e88e5; font-size: var(--student-fs-caption); font-weight: 800; line-height: 1.4; }.workbench-head h3 { margin: 4px 0 8px; color: #1e3a5f; font-size: var(--student-fs-h1); font-weight: 800; line-height: 1.3; }.workbench-description { margin: 0; color: #2c4a6a; font-size: var(--student-fs-body); line-height: 1.8; }.workbench-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; gap: 10px; flex-shrink: 0; }
.outline-action,.btn-nav { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid #cfe2f5; border-radius: 999px; color: #1e3a5f; background: #e3f2fd; font: inherit; font-size: var(--student-fs-button); font-weight: 800; cursor: pointer; }.step-indicator { display:flex; align-items:center; gap:12px; width:calc(100% + 24px); min-height:0; margin:0 -12px 32px; padding:18px 22px; overflow-x:auto; border:1px solid #cfe2f5; border-radius:18px; background:linear-gradient(110deg,#f0f6fd,#ffffff); box-shadow:inset 0 1px 0 rgba(30, 136, 229, 0.1); }.step-tab { display:flex; flex:1 0 145px; align-items:center; min-height:66px; padding:8px 10px; border:1px solid #cfe2f5; border-radius:8px; color:#5a7a9a; background:#f0f6fd; font:inherit; font-size:var(--student-fs-body); font-weight:800; text-align:left; cursor:pointer; transition:transform .2s,color .2s,background .2s,border-color .2s,box-shadow .2s; }.step-tab:hover,.step-tab:focus-visible { transform:translateY(-2px); border-color:#1e88e5; color:#1e3a5f; background:#bbdefb; box-shadow:0 8px 18px rgba(0,0,0,.2); outline:none; }.step-tab.active { border-color:#1e88e5; color:#ffffff; background:linear-gradient(95deg,#1e88e5,#1565c0); box-shadow:0 8px 20px rgba(30, 136, 229, 0.18); }.step-marker { display:inline-flex; flex:0 0 38px; align-items:center; justify-content:center; width:38px; height:38px; border:1px solid #cfe2f5; border-radius:50%; color:#1565c0; background:#f0f6fd; font-size:var(--student-fs-body-sm); font-weight:900; }.step-copy { display:grid; min-width:0; gap:4px; margin-left:10px; }.step-copy strong { display:-webkit-box; overflow:hidden; color:inherit; font-size:var(--student-fs-body); line-height:1.25; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.step-copy span { color:#1565c0; font-size:var(--student-fs-caption); font-weight:700; }.step-tab.active .step-marker { border-color:#1e88e5; color:#ffffff; background:linear-gradient(135deg,#1e88e5,#1e88e5); box-shadow:0 0 0 4px rgba(30, 136, 229, 0.15),0 0 18px rgba(30, 136, 229, 0.15); }.step-tab.complete .step-marker { border-color:#59e0ca; color:#2c4a6a; background:rgba(13,132,119,.5); }.step-connector { flex:0 0 28px; height:2px; background:#cfe2f5; color:#1565c0; font-size:var(--student-fs-h2); line-height:0; text-align:right; }.step-connector.complete { background:#55ddcc; color:#75f0df; }.step-card { margin-top: 32px; padding: 18px 22px 22px; }.step-indicator + .step-card,.workbench-head + .step-card { margin-top: 0; }.step-title-row { margin-bottom: 14px; }.step-title-row h3 { margin: 4px 0 0; color: #1e3a5f; font-size: var(--student-fs-h2); font-weight: 900; line-height: 1.3; }.caseBacktitle { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; color: #2c4a6a; font-size: var(--student-fs-h2); font-weight: 800; }.caseBacktitle img { display: none; }.step-card > p { color: #2c4a6a; font-size: var(--student-fs-body); line-height: 1.8; }
:deep(.el-table) { width: 100% !important; max-width: 100%; border-radius: 18px; }:deep(.el-table th.el-table__cell) { background: #1565c0 !important; }:deep(.el-input__wrapper) { min-height: 42px; border-radius: 14px; background: #ffffff; }.online { border-radius: 14px; background: #f0f6fd; }.step-navigation { display: flex; justify-content: center; gap: 14px; margin-top: 22px; }.btn-nav.btn-save,.btn-nav.btn-primary { border-color: #1e88e5; color: #ffffff; background: linear-gradient(95deg,#1e88e5,#1565c0); }.btn-nav:disabled { cursor: not-allowed; opacity: .45; }.taskfooter { gap: 52px; margin-top: 36px; padding-top: 0; border-top: 0; }.taskfooter :deep(.el-button) { min-width: 172px; height: 64px; border: 1px solid #1e88e5 !important; border-radius: 6px; color: #2c4a6a !important; background: #e3f2fd !important; font-size: var(--student-fs-h1); font-weight: 900; }
display: grid; gap: 24px; min-height: calc(100vh - 76px); padding: 24px 24px 32px; color: var(--student-text); background: var(--student-card-bg);
.training-core { min-width: 0; padding: 28px; border: 1px solid var(--student-panel-border); border-radius: 36px; background: var(--student-card-bg); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.task-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--student-panel-border); border-radius: 16px; background: var(--student-card-bg); }
.task-head-main { display: grid; justify-items: start; gap: 8px; min-width: 0; flex: 1 1 auto; }
.task-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border: 1px solid var(--student-panel-border); border-radius: 999px; color: var(--student-accent-deep); background: var(--student-accent-soft); font-size: 12px; font-weight: 700; }
.task-title { margin: 0; color: var(--student-text); font-size: var(--student-fs-display); font-weight: 700; line-height: 1.35; }
.task-brief { margin: 0; color: var(--student-text-secondary); font-size: 12px; line-height: 1.6; }
.task-brief-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.task-brief-toggle { padding: 0; border: 0; color: var(--student-accent-deep); background: transparent; font: inherit; font-weight: 700; cursor: pointer; &:hover { text-decoration: underline; } }
.task-brief-more { display: grid; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--student-panel-border); b { color: var(--student-text); font-size: 12px; } ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; } p { margin: 0; } }
.channel-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.task-card,.step-card { border: 1px solid var(--student-panel-border); border-radius: 26px; background: var(--student-card-bg); }.task-card { margin-top: 28px; padding: 18px 22px 22px; }.workbench-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--student-panel-border); }.section-eyebrow { margin: 0; color: var(--student-accent); font-size: var(--student-fs-caption); font-weight: 800; line-height: 1.4; }.workbench-head h3 { margin: 4px 0 8px; color: var(--student-text); font-size: var(--student-fs-h1); font-weight: 800; line-height: 1.3; }.workbench-description { margin: 0; color: var(--student-text-secondary); font-size: var(--student-fs-body); line-height: 1.8; }.workbench-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; gap: 10px; flex-shrink: 0; }
.outline-action,.btn-nav { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid var(--student-panel-border); border-radius: 999px; color: var(--student-text); background: var(--student-accent-soft); font: inherit; font-size: var(--student-fs-button); font-weight: 800; cursor: pointer; }.step-indicator { display:flex; align-items:center; gap:12px; width:calc(100% + 24px); min-height:0; margin:0 -12px 32px; padding:18px 22px; overflow-x:auto; border:1px solid var(--student-panel-border); border-radius:18px; background:var(--student-card-bg); box-shadow:inset 0 1px 0 rgba(31, 41, 55, 0.04); }.step-tab { display:flex; flex:1 0 145px; align-items:center; min-height:66px; padding:8px 10px; border:1px solid var(--student-panel-border); border-radius:8px; color:var(--student-text-secondary); background:var(--student-card-bg); font:inherit; font-size:var(--student-fs-body); font-weight:800; text-align:left; cursor:pointer; transition:transform .2s,color .2s,background .2s,border-color .2s,box-shadow .2s; }.step-tab:hover,.step-tab:focus-visible { transform:translateY(-2px); border-color:var(--student-accent); color:#ffffff; background:var(--student-accent-light); box-shadow:0 8px 18px rgba(0,0,0,.1); outline:none; }.step-tab.active { border-color:var(--student-accent); color:#ffffff; background:var(--student-accent); box-shadow:0 8px 20px rgba(31, 41, 55, 0.18); }.step-marker { display:inline-flex; flex:0 0 38px; align-items:center; justify-content:center; width:38px; height:38px; border:1px solid var(--student-panel-border); border-radius:50%; color:var(--student-text-secondary); background:var(--student-card-bg); font-size:var(--student-fs-body-sm); font-weight:900; }.step-copy { display:grid; min-width:0; gap:4px; margin-left:10px; }.step-copy strong { display:-webkit-box; overflow:hidden; color:inherit; font-size:var(--student-fs-body); line-height:1.25; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.step-copy span { color:var(--student-text-secondary); font-size:var(--student-fs-caption); font-weight:700; }.step-tab.active .step-marker { border-color:var(--student-accent); color:#ffffff; background:var(--student-accent); box-shadow:0 0 0 4px rgba(31, 41, 55, 0.1); }.step-tab.complete .step-marker { border-color:var(--student-success); color:#ffffff; background:var(--student-success); }.step-connector { flex:0 0 28px; height:2px; background:var(--student-panel-border); color:var(--student-text-secondary); font-size:var(--student-fs-h2); line-height:0; text-align:right; }.step-connector.complete { background:var(--student-success); color:var(--student-success); }.step-card { margin-top: 32px; padding: 18px 22px 22px; }.step-indicator + .step-card,.workbench-head + .step-card { margin-top: 0; }.step-title-row { margin-bottom: 14px; }.step-title-row h3 { margin: 4px 0 0; color: var(--student-text); font-size: var(--student-fs-h2); font-weight: 900; line-height: 1.3; }.caseBacktitle { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; color: var(--student-text-secondary); font-size: var(--student-fs-h2); font-weight: 800; }.caseBacktitle img { display: none; }.step-card > p { color: var(--student-text-secondary); font-size: var(--student-fs-body); line-height: 1.8; }
:deep(.el-table) { width: 100% !important; max-width: 100%; border-radius: 18px; }:deep(.el-table th.el-table__cell) { background: #fafbfc !important; }:deep(.el-input__wrapper) { min-height: 42px; border-radius: 14px; background: #ffffff; }.online { border-radius: 14px; background: var(--student-panel-bg); }.step-navigation { display: flex; justify-content: center; gap: 14px; margin-top: 22px; }.btn-nav.btn-save,.btn-nav.btn-primary { border-color: var(--student-accent); color: #ffffff; background: var(--student-accent); }.btn-nav:disabled { cursor: not-allowed; opacity: .45; }.taskfooter { gap: 52px; margin-top: 36px; padding-top: 0; border-top: 0; }.taskfooter :deep(.el-button) { min-width: 172px; height: 64px; border: 1px solid var(--student-panel-border) !important; border-radius: 6px; color: var(--student-text) !important; background: var(--student-accent-soft) !important; font-size: var(--student-fs-h1); font-weight: 900; }
}
@media (max-width: 1100px) { .channel { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .channel { padding: 14px; .training-core { padding: 18px; border-radius: 24px; }.workbench-head,.workbench-actions,.step-navigation { flex-direction: column; align-items: stretch; }.workbench-actions,.outline-action,.btn-nav,.taskfooter :deep(.el-button) { width: 100%; }.step-indicator { align-items:stretch; flex-direction:column; width:100%; margin-right:0; margin-left:0; overflow:visible; border-radius:20px; }.step-tab { flex:0 0 auto; width:100%; }.step-connector { flex:0 0 22px; width:2px; height:22px; margin-left:29px; text-align:center; writing-mode:vertical-rl; }.taskfooter { gap: 14px; } } }
.step-tab.active { border-color:#1e88e5; color:#ffffff; background:linear-gradient(115deg,#1e88e5,#1565c0); box-shadow:0 0 18px rgba(30, 136, 229, 0.2),inset 0 1px 0 rgba(30, 136, 229, 0.15); }.step-tab.active .step-marker { border-color:#1e88e5; color:#ffffff; background:linear-gradient(135deg,#1e88e5,#1565c0); box-shadow:0 0 0 5px rgba(30, 136, 229, 0.12),0 0 18px rgba(30, 136, 229, 0.35); }.step-tab.complete { color:#2c4a6a; }.step-tab.complete .step-marker { border-color:rgba(84,230,221,.85); color:#ffffff; background:#6ef0e1; box-shadow:0 0 12px rgba(79,231,218,.35); }.step-connector.complete { background:linear-gradient(90deg,#6ef0e1,#1e88e5); color:#63e6f1; box-shadow:0 0 9px rgba(53,218,235,.46); }
.step-tab.active { border-color:var(--student-accent); color:#ffffff; background:var(--student-accent); box-shadow:0 0 14px rgba(31, 41, 55, 0.12); }.step-tab.active .step-marker { border-color:var(--student-accent); color:#ffffff; background:var(--student-accent); box-shadow:0 0 0 5px rgba(31, 41, 55, 0.1); }.step-tab.complete { color:var(--student-text-secondary); }.step-tab.complete .step-marker { border-color:var(--student-success); color:#ffffff; background:var(--student-success); }.step-connector.complete { background:var(--student-success); color:var(--student-success); }
/* Standard page step navigation */
.step-indicator { position:relative; display:flex; align-items:center; gap:0; width:calc(100% + 24px); margin:0 -12px 32px; padding:18px 22px; overflow-x:auto; border:1px solid #cfe2f5; border-radius:18px; background:linear-gradient(90deg,#f0f6fd,#f0f6fd),rgba(0, 0, 0, 0.05); box-shadow:inset 0 1px 0 rgba(30, 136, 229, 0.08); scrollbar-width:thin; }
.step-tab { display:flex; flex:1 0 145px; align-items:center; min-width:0; min-height:66px; padding:8px 10px; border:1px solid #cfe2f5; border-radius:8px; color:#5a7a9a; background:#f0f6fd; box-shadow:inset 0 1px 0 rgba(30, 136, 229, 0.05); font:inherit; font-size:var(--student-fs-body); font-weight:800; text-align:left; cursor:pointer; transition:transform .2s ease,color .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease; }
.step-tab:hover { transform:translateY(-2px); border-color:#1e88e5; color:#1e3a5f; background:#bbdefb; box-shadow:0 7px 18px rgba(0,0,0,.24),inset 0 1px 0 rgba(30, 136, 229, 0.12); }
.step-tab:hover .step-action { color:#9bf4ff; }
.step-tab:focus-visible { outline:2px solid #1e88e5; outline-offset:2px; }
.step-tab.active { border-color:#1e88e5; color:#ffffff; background:linear-gradient(115deg,#1e88e5,#1565c0); box-shadow:0 0 18px rgba(30, 136, 229, 0.2),inset 0 1px 0 rgba(30, 136, 229, 0.15); }
.step-marker { display:inline-flex; flex:0 0 38px; align-items:center; justify-content:center; width:38px; height:38px; border:1px solid #cfe2f5; border-radius:50%; color:#5a7a9a; background:#e3f2fd; box-shadow:inset 0 0 12px rgba(30, 136, 229, 0.08); font-size:var(--student-fs-caption); font-weight:900; letter-spacing:.04em; }
.step-indicator { position:relative; display:flex; align-items:center; gap:0; width:calc(100% + 24px); margin:0 -12px 32px; padding:18px 22px; overflow-x:auto; border:1px solid var(--student-panel-border); border-radius:18px; background:var(--student-card-bg); box-shadow:inset 0 1px 0 rgba(31, 41, 55, 0.04); scrollbar-width:thin; }
.step-tab { display:flex; flex:1 0 145px; align-items:center; min-width:0; min-height:66px; padding:8px 10px; border:1px solid var(--student-panel-border); border-radius:8px; color:var(--student-text-secondary); background:var(--student-card-bg); box-shadow:inset 0 1px 0 rgba(31, 41, 55, 0.03); font:inherit; font-size:var(--student-fs-body); font-weight:800; text-align:left; cursor:pointer; transition:transform .2s ease,color .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease; }
.step-tab:hover { transform:translateY(-2px); border-color:var(--student-accent); color:#ffffff; background:var(--student-accent-light); box-shadow:0 7px 18px rgba(0,0,0,.1); }
.step-tab:hover .step-action { color:#ffffff; }
.step-tab:focus-visible { outline:2px solid var(--student-accent); outline-offset:2px; }
.step-tab.active { border-color:var(--student-accent); color:#ffffff; background:var(--student-accent); box-shadow:0 0 14px rgba(31, 41, 55, 0.12); }
.step-marker { display:inline-flex; flex:0 0 38px; align-items:center; justify-content:center; width:38px; height:38px; border:1px solid var(--student-panel-border); border-radius:50%; color:var(--student-text-secondary); background:var(--student-accent-soft); box-shadow:inset 0 0 12px rgba(31, 41, 55, 0.04); font-size:var(--student-fs-caption); font-weight:900; letter-spacing:.04em; }
.step-copy { display:grid; min-width:0; gap:4px; margin-left:10px; }
.step-name { display:-webkit-box; overflow:hidden; color:inherit; font-size:var(--student-fs-body); font-weight:800; line-height:1.25; text-overflow:ellipsis; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.step-action { color:#1565c0; font-size:var(--student-fs-caption); font-weight:800; letter-spacing:.06em; line-height:1; }
.step-tab.active .step-marker { border-color:#1e88e5; color:#ffffff; background:linear-gradient(135deg,#1e88e5,#1565c0); box-shadow:0 0 0 5px rgba(30, 136, 229, 0.12),0 0 18px rgba(30, 136, 229, 0.35); }
.step-tab.complete .step-marker { border-color:rgba(84,230,221,.85); color:#ffffff; background:#6ef0e1; box-shadow:0 0 12px rgba(79,231,218,.35); }
.step-connector { position:relative; flex:0 1 40px; min-width:18px; height:2px; margin:0 8px; overflow:visible; background:#cfe2f5; }
.step-connector::after { position:absolute; top:50%; right:-1px; width:6px; height:6px; border-top:1px solid #5a7a9a; border-right:1px solid #5a7a9a; content:""; transform:translateY(-50%) rotate(45deg); }
.step-tab.complete + .step-connector { background:linear-gradient(90deg,#6ef0e1,#1e88e5); box-shadow:0 0 9px rgba(53,218,235,.46); }
.step-tab.complete + .step-connector::after { border-color:#63e6f1; }
.step-action { color:var(--student-text-secondary); font-size:var(--student-fs-caption); font-weight:800; letter-spacing:.06em; line-height:1; }
.step-tab.active .step-marker { border-color:var(--student-accent); color:#ffffff; background:var(--student-accent); box-shadow:0 0 0 5px rgba(31, 41, 55, 0.1); }
.step-tab.complete .step-marker { border-color:var(--student-success); color:#ffffff; background:var(--student-success); }
.step-connector { position:relative; flex:0 1 40px; min-width:18px; height:2px; margin:0 8px; overflow:visible; background:var(--student-panel-border); }
.step-connector::after { position:absolute; top:50%; right:-1px; width:6px; height:6px; border-top:1px solid var(--student-text-secondary); border-right:1px solid var(--student-text-secondary); content:""; transform:translateY(-50%) rotate(45deg); }
.step-tab.complete + .step-connector { background:var(--student-success); }
.step-tab.complete + .step-connector::after { border-color:var(--student-success); }
@media (max-width:900px) { .step-indicator { align-items:stretch; flex-direction:column; width:100%; margin-right:0; margin-left:0; overflow:visible; border-radius:20px; } .step-tab { flex:0 0 auto; width:100%; } .step-connector { flex:0 0 20px; min-width:0; width:2px; height:20px; margin-left:29px; } }
.workbench-head--actions-only {
@ -961,7 +1005,7 @@ onMounted(async () => {
.linear-forecast-intro {
margin: 0 0 22px;
color: #2c4a6a;
color: var(--student-text);
font-size: var(--student-fs-h2);
line-height: 1.85;
}
@ -987,21 +1031,21 @@ onMounted(async () => {
gap: 24px;
margin-top: 28px;
padding: 18px 20px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 14px;
background: #f0f6fd;
background: var(--student-panel-bg);
}
.linear-forecast-guide ol {
margin: 8px 0 0;
padding-left: 22px;
color: #b9d8e8;
color: var(--student-text-secondary);
line-height: 1.8;
}
.procurement-plan-intro {
margin: 0 0 18px;
color: #2c4a6a;
color: var(--student-text);
font-size: var(--student-fs-h2);
line-height: 1.85;
}
@ -1009,27 +1053,27 @@ onMounted(async () => {
.procurement-plan-rules {
margin-bottom: 20px;
padding: 16px 20px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 14px;
background: #f0f6fd;
background: var(--student-panel-bg);
}
.procurement-plan-rules h4 {
margin: 0;
color: #1e3a5f;
color: var(--student-text);
font-size: var(--student-fs-h2);
}
.procurement-plan-rules ol {
margin: 10px 0 8px;
padding-left: 22px;
color: #b9d8e8;
color: var(--student-text-secondary);
line-height: 1.8;
}
.procurement-plan-formula {
margin: 0;
color: #7ee6ff !important;
color: var(--student-accent) !important;
font-weight: 800;
}
@ -1044,7 +1088,7 @@ onMounted(async () => {
}
.procurement-plan-readonly {
color: #82e9ff;
color: var(--student-accent);
font-weight: 800;
}
@ -1054,14 +1098,14 @@ onMounted(async () => {
.procurement-plan-hint {
margin: 14px 0 0;
color: #8eb8ca !important;
color: var(--student-text-secondary) !important;
font-size: var(--student-fs-body) !important;
line-height: 1.7;
}
.guide-title {
margin: 0;
color: #1e3a5f !important;
color: var(--student-text) !important;
font-weight: 800;
}
@ -1071,7 +1115,7 @@ onMounted(async () => {
.forecast-visual-intro {
margin: 0 0 22px;
color: #2c4a6a;
color: var(--student-text);
font-size: var(--student-fs-h2);
line-height: 1.85;
}
@ -1080,9 +1124,9 @@ onMounted(async () => {
display: grid;
min-height: 330px;
padding: 28px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 16px;
background: radial-gradient(circle at 50% 40%, rgba(30, 136, 229, 0.08), #f0f6fd 68%);
background: var(--student-card-bg);
place-items: center;
}
@ -1093,10 +1137,10 @@ onMounted(async () => {
min-height: 210px;
padding: 28px;
overflow: hidden;
border: 1px dashed #1e88e5;
border: 1px dashed var(--student-panel-border);
border-radius: 14px;
color: #1e3a5f;
background: #e3f2fd;
color: var(--student-text);
background: var(--student-accent-soft);
cursor: pointer;
place-items: center;
gap: 10px;
@ -1105,9 +1149,8 @@ onMounted(async () => {
}
.forecast-visual-dropzone:hover {
border-color: #1565c0;
background: #bbdefb;
box-shadow: 0 0 24px rgba(30, 136, 229, 0.12);
border-color: var(--student-accent);
background: var(--student-accent-soft);
}
.forecast-visual-dropzone.is-uploading {
@ -1130,12 +1173,12 @@ onMounted(async () => {
}
.forecast-visual-dropzone span:last-child {
color: #5a7a9a;
color: var(--student-text-secondary);
font-size: var(--student-fs-body-sm);
}
.forecast-visual-upload-icon {
color: #1e88e5;
color: var(--student-accent);
font-size: 34px;
font-weight: 900;
line-height: 1;
@ -1148,7 +1191,7 @@ onMounted(async () => {
min-height: 210px;
gap: 24px;
padding: 18px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 14px;
background: #ffffff;
}
@ -1157,9 +1200,9 @@ onMounted(async () => {
flex: 0 0 330px;
width: 330px;
height: 190px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 10px;
background: #f0f6fd;
background: var(--student-panel-bg);
cursor: zoom-in;
}
@ -1171,23 +1214,23 @@ onMounted(async () => {
}
.forecast-visual-file-meta strong {
color: #1e3a5f;
color: var(--student-text);
line-height: 1.6;
word-break: break-all;
}
.forecast-visual-file-meta span {
color: #5a7a9a;
color: var(--student-text-secondary);
font-size: var(--student-fs-body-sm);
}
.forecast-visual-replace {
align-self: flex-start;
padding: 7px 13px;
border: 1px solid #1e88e5;
border: 1px solid var(--student-panel-border);
border-radius: 7px;
color: #1e3a5f;
background: #e3f2fd;
color: var(--student-text);
background: var(--student-accent-soft);
cursor: pointer;
font: inherit;
font-size: var(--student-fs-body-sm);
@ -1195,8 +1238,8 @@ onMounted(async () => {
}
.forecast-visual-replace:hover {
border-color: #1565c0;
background: #bbdefb;
border-color: var(--student-accent);
background: var(--student-accent-soft);
}
.forecast-visual-guide {
@ -1206,15 +1249,15 @@ onMounted(async () => {
gap: 24px;
margin-top: 28px;
padding: 18px 20px;
border: 1px solid #cfe2f5;
border: 1px solid var(--student-panel-border);
border-radius: 14px;
background: #f0f6fd;
background: var(--student-panel-bg);
}
.forecast-visual-guide ol {
margin: 8px 0 0;
padding-left: 22px;
color: #b9d8e8;
color: var(--student-text-secondary);
line-height: 1.8;
}
@ -1245,3 +1288,23 @@ onMounted(async () => {
}
}
</style>
<style lang="scss">
:has(.channel) {
.el-table {
--el-table-bg-color: #ffffff !important;
--el-table-tr-bg-color: transparent !important;
--el-table-header-bg-color: #fafbfc !important;
--el-table-row-hover-bg-color: rgba(31, 41, 55, 0.04) !important;
line-height: 1.55;
}
.step-indicator {
button,
.step-tab {
transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
}
}
</style>

@ -1,39 +1,40 @@
<template>
<template>
<div class="supplier-page student-training-shell" v-loading="loading">
<main class="training-core">
<section class="workspace-shell">
<header class="workspace-header">
<div>
<p class="eyebrow">SUPPLIER CHANNEL EVALUATION</p>
<h1>{{ taskTitle }}</h1>
<p>分别从试产与量产场景评估供应渠道,形成可执行的采购与风险管理建议。</p>
<main class="supplier-core">
<section class="task-header">
<div class="task-head-main">
<span class="task-badge"><el-icon><DataAnalysis /></el-icon> 核心实训 · 供应渠道评估</span>
<h1 class="task-title">{{ taskTitle }}</h1>
<p class="task-brief">
<span class="task-brief-text">{{ taskBackground }}</span>
<button type="button" class="task-brief-toggle" @click="briefOpen = !briefOpen">
{{ briefOpen ? "收起" : "展开目标与要求" }}
</button>
<span v-if="briefOpen" class="task-brief-more">
<b>实训目标</b>
<ul><li v-for="goal in taskGoals" :key="goal">{{ goal }}</li></ul>
<b>实训要求</b>
<p>{{ taskRequirement }}</p>
</span>
</p>
</div>
<div class="workspace-header__actions">
<div class="supplier-toolbar">
<TrainingMaterialButton :material-name="taskConfig?.materialName" :material-url="taskConfig?.materialUrl" />
<span class="task-badge">实训任务</span>
</div>
</header>
<TrainingTaskBrief
:background="taskBackground"
:goals="taskGoals"
:requirements="taskRequirement"
:show-material="false"
/>
<nav class="step-nav" aria-label="供应渠道评估步骤">
<button :class="['step-tab', { active: currentStep === 1, complete: currentStep > 1 }]" :aria-current="currentStep === 1 ? 'step' : undefined" @click="currentStep = 1">
<span class="step-marker">01</span><span class="step-copy"><b>设置评估权重</b><small>{{ currentStep === 1 ? '当前步骤 →' : '点击切换 →' }}</small></span>
</button>
<span class="step-connector" aria-hidden="true"></span>
<button :class="['step-tab', { active: currentStep === 2, complete: currentStep > 2 }]" :aria-current="currentStep === 2 ? 'step' : undefined" @click="openStepTwo">
<span class="step-marker">02</span><span class="step-copy"><b>渠道评分与对比</b><small>{{ currentStep === 2 ? '当前步骤 →' : '点击切换 →' }}</small></span>
</button>
<span class="step-connector" aria-hidden="true"></span>
<button :class="['step-tab', { active: currentStep === 3 }]" :aria-current="currentStep === 3 ? 'step' : undefined" @click="openStepThree">
<span class="step-marker">03</span><span class="step-copy"><b>采购建议与风险</b><small>{{ currentStep === 3 ? '当前步骤 →' : '点击切换 →' }}</small></span>
</button>
</nav>
</section>
<section class="supplier-workbench">
<nav class="step-indicator" aria-label="供应渠道评估步骤">
<button type="button" :class="['step-tab', { active: currentStep === 1, complete: currentStep > 1 }]" :aria-current="currentStep === 1 ? 'step' : undefined" @click="currentStep = 1">
<span class="step-marker">01</span><span class="step-copy"><strong class="step-name">设置评估权重</strong></span>
</button>
<button type="button" :class="['step-tab', { active: currentStep === 2, complete: currentStep > 2 }]" :aria-current="currentStep === 2 ? 'step' : undefined" @click="openStepTwo">
<span class="step-marker">02</span><span class="step-copy"><strong class="step-name">渠道评分与对比</strong></span>
</button>
<button type="button" :class="['step-tab', { active: currentStep === 3 }]" :aria-current="currentStep === 3 ? 'step' : undefined" @click="openStepThree">
<span class="step-marker">03</span><span class="step-copy"><strong class="step-name">采购建议与风险</strong></span>
</button>
</nav>
<template v-if="currentStep === 1">
<section class="intro-card">
@ -194,11 +195,10 @@
<script setup>
import { computed, onMounted, ref } from "vue";
import { CircleCheck, Delete, Plus } from "@element-plus/icons-vue";
import { CircleCheck, DataAnalysis, Delete, Plus } from "@element-plus/icons-vue";
import { ElMessage } from "element-plus";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskBrief from "@/views/components/TrainingTaskBrief.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import {
@ -211,6 +211,7 @@ import {
const TASK_KEY = "supplier-evaluation";
const loading = ref(false);
const briefOpen = ref(false);
const currentStep = ref(1);
const stepOneSaved = ref(false);
const stepTwoSaved = ref(false);
@ -524,46 +525,590 @@ onMounted(async () => {
});
</script>
<style scoped>
.supplier-page { min-height: 100%; padding: 24px; color: #2c4a6a; background: #ffffff; }
.workspace-shell { box-sizing: border-box; width: min(100%, 1520px); margin: 0 auto; padding: 28px; border: 1px solid #cfe2f5; border-radius: 36px; background: #f0f6fd; box-shadow: inset 0 1px 0 rgba(30, 136, 229, 0.1), 0 22px 48px rgba(0, 0, 0, .22); }
.supplier-page .training-core { box-sizing: border-box; min-width: 0; width: 100%; margin: 0; padding: 28px; border: 1px solid #cfe2f5; border-radius: 36px; background: #f0f6fd; box-shadow: inset 0 1px 0 rgba(30, 136, 229, 0.1), 0 22px 48px rgba(0, 0, 0, .22); }
.supplier-page .workspace-shell { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }.workspace-header__actions { display: flex; align-items: center; gap: 10px; }
.eyebrow, .step-caption { margin: 0 0 7px; color: #1e88e5; font-weight: 700; letter-spacing: .1em; }
.workspace-header h1, .intro-card h2 { margin: 0; color: #1e3a5f; }.workspace-header h1 { margin-top: 12px; font-size: var(--student-fs-display); font-weight: 900; line-height: 1.3; }
.workspace-header p:not(.eyebrow), .intro-card > p:last-child { margin: 10px 0 0; color: #5a7a9a; line-height: 1.75; }
.task-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 14px; border: 1px solid #cfe2f5; border-radius: 999px; color: #2c4a6a; background: #e3f2fd; white-space: nowrap; }
.step-nav { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 40px minmax(0, 1fr); align-items: center; gap: 8px; margin: 0 0 30px; padding: 18px 22px; border: 1px solid #cfe2f5; border-radius: 22px; background: #f0f6fd; }
.step-nav i { position: relative; height: 2px; background: #cfe2f5; }.step-nav i::after { position: absolute; top: 50%; right: 0; width: 7px; height: 7px; border-top: 1px solid #5a7a9a; border-right: 1px solid #5a7a9a; content: ''; transform: translateY(-50%) rotate(45deg); }
.step-tab { display: flex; align-items: center; min-width: 0; min-height: 66px; gap: 10px; padding: 8px 12px; border: 1px solid #cfe2f5; border-radius: 12px; color: #5a7a9a; background: #f0f6fd; cursor: pointer; font: inherit; text-align: left; transition: .2s ease; }
.step-tab:hover { border-color: #1e88e5; color: #1e3a5f; background: #bbdefb; transform: translateY(-1px); }.step-tab:focus-visible { outline: 2px solid #1e88e5; outline-offset: 3px; }
.step-marker { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border: 1px solid #cfe2f5; border-radius: 50%; color: #5a7a9a; background: #e3f2fd; font-size: var(--student-fs-caption); font-weight: 900; }.step-copy { display: grid; min-width: 0; gap: 4px; }.step-copy b { overflow: hidden; font-size: var(--student-fs-body); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.step-copy small { color: #1565c0; font-size: var(--student-fs-caption); font-weight: 800; letter-spacing: .06em; }
.step-tab.active { color: white; border-color: #1e88e5; background: linear-gradient(135deg, #1e88e5, #1565c0); box-shadow: inset 0 0 24px rgba(30, 136, 229, 0.18); }.step-tab.active .step-marker { border-color: #1e88e5; color: #ffffff; background: linear-gradient(135deg, #1e88e5, #1565c0); box-shadow: 0 0 0 5px rgba(30, 136, 229, 0.12), 0 0 18px rgba(30, 136, 229, 0.35); }.step-tab.complete { color: #2c4a6a; }.step-tab.complete .step-marker { border-color: rgba(84, 230, 221, .85); color: #ffffff; background: #6ef0e1; }
.intro-card, .analysis-panel { padding: 24px; border: 1px solid #cfe2f5; border-radius: 26px; background: #f0f6fd; }
.intro-card.compact { margin-bottom: 20px; }
.weights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.weight-card, .score-section { padding: 20px; border: 1px solid #cfe2f5; border-radius: 14px; background: #f0f6fd; }
.card-title, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.card-title span, .section-heading span { color: #1e88e5; font-size: var(--student-fs-body-sm); font-weight: 700; letter-spacing: .07em; }
.card-title h3, .section-heading h3 { margin: 4px 0 0; color: #1e3a5f; font-size: var(--student-fs-display); }
.card-title strong { color: #1e88e5; font-size: 25px; }.card-title strong.danger { color: #ff8888; }
.training-table { width: 100%; border-collapse: collapse; table-layout: fixed; overflow: hidden; border: 1px solid #cfe2f5; }
.training-table th { padding: 13px 10px; color: #ffffff; background: #1565c0; font-weight: 700; }
.training-table td { padding: 10px; border: 1px solid #cfe2f5; color: #2c4a6a; vertical-align: middle; text-align: center; }
.training-table tbody tr:nth-child(even) { background: #e3f2fd; }
.training-table :deep(.el-input__wrapper), .training-table :deep(.el-textarea__inner), .training-table :deep(.el-select__wrapper) { background: #ffffff; box-shadow: 0 0 0 1px #cfe2f5 inset; }
.training-table :deep(.el-input__inner), .training-table :deep(.el-textarea__inner), .training-table :deep(.el-select__selected-item), .training-table :deep(.el-input-number__decrease), .training-table :deep(.el-input-number__increase) { color: #1e3a5f; }
.training-table :deep(.el-textarea__inner) { min-height: 70px !important; resize: vertical; }
.page-actions { display: flex; justify-content: center; padding-top: 28px; }.split-actions { justify-content: space-between; }
.page-actions :deep(.el-button--primary), .row-actions :deep(.el-button) { border-color: #1e88e5; background: #1565c0; }
.score-section { margin-bottom: 20px; }.section-heading small { color: #5a7a9a; }.table-scroll { overflow-x: auto; }
.score-table { min-width: 960px; }.score-table th:first-child, .score-table td:first-child { width: 175px; }.score-table :deep(.el-input-number) { width: 100%; }.total-score { color: #1e88e5 !important; font-size: 17px; font-weight: 700; }
.analysis-panel + .analysis-panel { margin-top: 20px; }.ranking-table { min-width: 940px; }.ranking-table th:first-child { width: 18%; }.ranking-table th:nth-child(2), .ranking-table th:nth-child(3) { width: 19%; }.scene-name { color: #1e88e5 !important; font-weight: 700; }.rank-result { display: flex; flex-direction: column; gap: 5px; }.rank-result strong { color: #1e3a5f; }.rank-result span { color: #1565c0; font-size: var(--student-fs-body-sm); }
.recommendation-card { margin-top: 20px; }.recommendation-card label { display: block; margin-bottom: 9px; color: #1e3a5f; font-weight: 700; }.recommendation-card :deep(.el-textarea__inner) { min-height: 130px !important; color: #1e3a5f; background: #ffffff; box-shadow: 0 0 0 1px #cfe2f5 inset; }
.risk-heading { align-items: flex-end; }.row-actions { display: flex; gap: 10px; }.panel-tip { margin: -4px 0 16px; color: #5a7a9a; line-height: 1.7; }.risk-table { min-width: 1080px; }.risk-table th:nth-child(1) { width: 15%; }.risk-table th:nth-child(2) { width: 29%; }.risk-table th:nth-child(3) { width: 16%; }.risk-table :deep(.el-select) { width: 100%; }.default-risk-row :deep(.el-input__inner), .default-risk-row :deep(.el-textarea__inner), .default-risk-row :deep(.el-select__selected-item) { color: #5a7a9a; font-style: italic; }
@media (max-width: 980px) { .weights-grid { grid-template-columns: 1fr; }.step-nav { grid-template-columns: 1fr; gap: 8px; }.step-nav i { display: none; }.workspace-header { flex-direction: column; }.risk-heading { align-items: flex-start; flex-direction: column; }.split-actions { gap: 12px; }.supplier-page { padding: 12px; }.workspace-shell { padding: 16px; } }
.step-tab.active { background: linear-gradient(115deg, #1e88e5, #1565c0); }
.step-connector { position: relative; height: 2px; overflow: visible; background: #cfe2f5; }
.step-connector::after { position: absolute; top: 50%; right: -1px; width: 7px; height: 7px; border-top: 1px solid #5a7a9a; border-right: 1px solid #5a7a9a; content: ''; transform: translateY(-50%) rotate(45deg); }
<style lang="scss" scoped>
/* ===== 页面级令牌(墨黑极简主题) ===== */
.supplier-page {
--student-accent: #1f2937;
--student-accent-deep: #111827;
--student-accent-light: #4b5563;
--student-accent-soft: #f3f4f6;
--student-danger: #d9554c;
--student-success: #4a9d6e;
--student-layer-1: #374151;
--student-layer-2: #43a294;
--student-layer-3: #8b6fc0;
--student-panel-border: #e5e7eb;
--student-card-bg: #ffffff;
--student-panel-bg: #fafbfc;
--student-text: #1f2937;
--student-text-secondary: #6b7280;
--student-fs-display: 17px;
--student-fs-h1: 15px;
--student-fs-h2: 14px;
--student-fs-h3: 13px;
--student-fs-body: 13px;
--student-fs-body-sm: 12px;
--student-fs-caption: 11px;
--student-fs-button: 13px;
--student-fs-button-lg: 13px;
--student-fs-data: 14px;
min-height: 100%;
min-width: 0;
padding: 24px;
color: var(--student-text);
background: #ffffff;
}
/* supplier-core:只设 gap,无边框/背景/阴影 */
.supplier-core {
display: grid;
gap: 10px;
align-content: start;
min-width: 0;
border: 0;
background: transparent;
box-shadow: none;
padding: 0;
}
/* ===== task-header(独立白卡片) ===== */
.task-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin: 0;
padding: 16px;
border: 1px solid #e7e9ed;
border-radius: 16px;
background: #ffffff;
}
.task-head-main {
display: grid;
justify-items: start;
gap: 8px;
min-width: 0;
flex: 1 1 auto;
}
.task-badge {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 4px 12px;
border: 1px solid var(--student-panel-border);
border-radius: 999px;
color: var(--student-accent-deep);
background: var(--student-accent-soft);
font-size: 12px;
font-weight: 700;
white-space: nowrap;
}
.task-title {
margin: 0;
color: var(--student-text);
font-size: var(--student-fs-display);
font-weight: 700;
line-height: 1.35;
}
.task-brief {
margin: 0;
color: var(--student-text-secondary);
font-size: 12px;
line-height: 1.6;
}
.task-brief-text {
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.task-brief-toggle {
padding: 0;
border: 0;
color: var(--student-accent-deep);
background: transparent;
font: inherit;
font-weight: 700;
cursor: pointer;
&:hover { text-decoration: underline; }
}
.task-brief-more {
display: grid;
gap: 6px;
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid var(--student-panel-border);
b { color: var(--student-text); font-size: 12px; }
ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; }
p { margin: 0; }
}
.supplier-toolbar {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 8px;
}
/* ===== supplier-workbench(透明容器) ===== */
.supplier-workbench {
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
display: grid;
gap: 10px;
min-width: 0;
}
/* ===== intro-card:改为 section-eyebrow + step-desc 风格 ===== */
.intro-card {
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
display: grid;
gap: 4px;
}
.intro-card.compact { margin-bottom: 0; }
.step-caption {
margin: 0;
color: var(--student-text-secondary);
font-size: var(--student-fs-caption);
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.intro-card h2 {
margin: 0;
color: var(--student-text);
font-size: var(--student-fs-h1);
font-weight: 700;
line-height: 1.35;
}
.intro-card > p:last-child {
margin: 4px 0 0;
color: var(--student-text-secondary);
font-size: var(--student-fs-body);
line-height: 1.6;
}
/* ===== weights-grid:去掉双列 grid(改为单列 + 内部 weight-card 透明化) ===== */
.weights-grid {
display: grid;
gap: 10px;
margin-top: 0;
}
.weight-card, .score-section {
padding: 14px;
border: 1px solid var(--student-panel-border);
border-radius: 10px;
background: var(--student-card-bg);
}
.card-title, .section-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 10px;
}
.card-title span, .section-heading span {
color: var(--student-text-secondary);
font-size: var(--student-fs-body-sm);
font-weight: 700;
letter-spacing: 0.07em;
}
.card-title h3, .section-heading h3 {
margin: 2px 0 0;
color: var(--student-text);
font-size: var(--student-fs-h2);
font-weight: 700;
}
.card-title strong {
color: var(--student-accent);
font-size: var(--student-fs-data);
font-weight: 800;
&.danger { color: var(--student-danger); }
}
/* ===== 表格 ===== */
.training-table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
overflow: hidden;
border: 1px solid var(--student-panel-border);
}
.training-table th {
padding: 10px 12px;
color: var(--student-text);
background: #fafbfc;
font-size: var(--student-fs-body-sm);
font-weight: 800;
text-align: left;
}
.training-table td {
padding: 10px;
border: 1px solid var(--student-panel-border);
color: var(--student-text);
vertical-align: middle;
text-align: center;
background: transparent;
}
.training-table tbody tr:nth-child(even) { background: transparent; }
.training-table :deep(.el-input__wrapper),
.training-table :deep(.el-textarea__inner),
.training-table :deep(.el-select__wrapper) {
background: #ffffff;
box-shadow: 0 0 0 1px var(--student-panel-border) inset;
}
.training-table :deep(.el-input__inner),
.training-table :deep(.el-textarea__inner),
.training-table :deep(.el-select__selected-item),
.training-table :deep(.el-input-number__decrease),
.training-table :deep(.el-input-number__increase) {
color: var(--student-text);
}
.training-table :deep(.el-textarea__inner) {
min-height: 70px !important;
resize: vertical;
}
/* ===== 操作按钮区 ===== */
.page-actions {
display: flex;
justify-content: center;
padding-top: 8px;
}
.split-actions { justify-content: space-between; }
.page-actions :deep(.el-button),
.row-actions :deep(.el-button) {
height: 40px;
padding: 0 18px;
border: 1px solid rgba(31, 41, 55, 0.4);
border-radius: 10px;
color: var(--student-text);
background: #ffffff;
font-size: var(--student-fs-button);
font-weight: 700;
text-shadow: none;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.page-actions :deep(.el-button:hover),
.row-actions :deep(.el-button:hover) {
border-color: var(--student-accent);
background: var(--student-accent-soft);
color: var(--student-accent);
transform: translateY(-1px);
box-shadow: 0 3px 10px rgba(31, 41, 55, 0.12);
}
.page-actions :deep(.el-button--primary),
.row-actions :deep(.el-button--primary) {
border-color: var(--student-accent);
color: #ffffff;
background: var(--student-accent);
box-shadow: 0 3px 10px rgba(31, 41, 55, 0.28);
}
.page-actions :deep(.el-button--primary:hover),
.row-actions :deep(.el-button--primary:hover) {
border-color: var(--student-accent-deep);
background: var(--student-accent-deep);
color: #ffffff;
box-shadow: 0 5px 14px rgba(17, 24, 39, 0.32);
}
/* ===== score-section / analysis-panel ===== */
.score-section { margin-bottom: 10px; }
.section-heading small { color: var(--student-text-secondary); font-size: var(--student-fs-body-sm); }
.table-scroll { overflow-x: auto; }
.score-table { min-width: 960px; }
.score-table th:first-child, .score-table td:first-child { width: 175px; }
.score-table :deep(.el-input-number) { width: 100%; }
.total-score {
color: var(--student-accent) !important;
font-size: var(--student-fs-data);
font-weight: 700;
}
.analysis-panel {
padding: 14px;
border: 1px solid var(--student-panel-border);
border-radius: 10px;
background: var(--student-card-bg);
}
.analysis-panel + .analysis-panel { margin-top: 10px; }
.ranking-table { min-width: 940px; }
.ranking-table th:first-child { width: 18%; }
.ranking-table th:nth-child(2), .ranking-table th:nth-child(3) { width: 19%; }
.scene-name {
color: var(--student-accent) !important;
font-weight: 700;
}
.rank-result { display: flex; flex-direction: column; gap: 4px; }
.rank-result strong { color: var(--student-text); font-weight: 700; }
.rank-result span { color: var(--student-text-secondary); font-size: var(--student-fs-body-sm); }
.recommendation-card {
margin-top: 10px;
padding: 12px;
border: 1px solid var(--student-panel-border);
border-radius: 10px;
background: #ffffff;
}
.recommendation-card label {
display: block;
margin-bottom: 8px;
color: var(--student-text);
font-weight: 700;
font-size: var(--student-fs-body-sm);
}
.recommendation-card :deep(.el-textarea__inner) {
min-height: 120px !important;
color: var(--student-text);
background: #ffffff;
box-shadow: 0 0 0 1px var(--student-panel-border) inset;
}
.risk-heading { align-items: flex-end; }
.row-actions { display: flex; gap: 10px; }
.panel-tip {
margin: -2px 0 12px;
color: var(--student-text-secondary);
font-size: var(--student-fs-body-sm);
line-height: 1.6;
}
.risk-table { min-width: 1080px; }
.risk-table th:nth-child(1) { width: 15%; }
.risk-table th:nth-child(2) { width: 29%; }
.risk-table th:nth-child(3) { width: 16%; }
.risk-table :deep(.el-select) { width: 100%; }
.default-risk-row :deep(.el-input__inner),
.default-risk-row :deep(.el-textarea__inner),
.default-risk-row :deep(.el-select__selected-item) {
color: var(--student-text-secondary);
font-style: italic;
}
/* ===== 响应式(仅基础断点) ===== */
@media (max-width: 840px) {
.weights-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
.supplier-page { padding: 12px; }
.task-header { flex-direction: column; align-items: flex-start; }
.supplier-toolbar { width: 100%; justify-content: flex-start; }
.risk-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
.split-actions { gap: 12px; flex-wrap: wrap; }
}
</style>
<style lang="scss">
/* ===== 画布 + 行高 ===== */
#app .studentLayout .app-main:has(.supplier-page) {
background: #ffffff !important;
}
#app .studentLayout .app-main:has(.supplier-page) .supplier-page {
line-height: 1.55 !important;
}
/* ===== 步骤导航:按钮切换风 ===== */
#app .studentLayout section.app-main:has(.supplier-page) .step-indicator {
display: flex !important;
flex-wrap: nowrap !important;
align-items: stretch !important;
justify-content: center !important;
gap: 10px !important;
width: 100% !important;
margin: 4px 0 16px !important;
padding: 0 !important;
border: none !important;
border-radius: 0 !important;
background: transparent !important;
box-shadow: none !important;
.step-tab {
flex: 0 0 auto !important;
min-width: auto !important;
max-width: none !important;
display: flex !important;
flex-direction: row !important;
align-items: center !important;
justify-content: center !important;
gap: 8px !important;
height: auto !important;
min-height: 42px !important;
margin: 0 !important;
padding: 8px 14px !important;
border: 1px solid #e5e7eb !important;
border-radius: 8px !important;
background: #ffffff !important;
box-shadow: none !important;
color: #6b7280 !important;
font-size: 13px !important;
font-weight: 600 !important;
line-height: 1.3 !important;
letter-spacing: 0 !important;
white-space: nowrap !important;
text-align: center !important;
cursor: pointer;
transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease !important;
}
.step-marker {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
flex: 0 0 auto !important;
min-width: 22px !important;
width: auto !important;
height: 22px !important;
padding: 0 5px !important;
border: none !important;
border-radius: 6px !important;
background: #f3f4f6 !important;
color: #6b7280 !important;
font-family: ui-monospace, "SF Mono", Consolas, monospace !important;
font-size: 12px !important;
font-weight: 700 !important;
line-height: 1 !important;
transition: background-color 0.16s ease, color 0.16s ease !important;
}
.step-copy {
display: flex !important;
flex-direction: column !important;
gap: 0 !important;
min-width: 0 !important;
}
.step-name {
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: normal !important;
line-height: 1.3 !important;
color: inherit !important;
}
/* 未到达项 hover */
.step-tab:hover:not(.active):not(.complete) {
border-color: #1f2937 !important;
background: #f9fafb !important;
color: #1f2937 !important;
.step-marker { background: #1f2937 !important; color: #ffffff !important; }
}
/* 已完成 */
.step-tab.complete:not(.active) {
border-color: #dce9e2 !important;
color: #374151 !important;
.step-marker { background: rgba(74, 157, 110, 0.12) !important; color: #3f8a5f !important; }
&:hover {
border-color: #4a9d6e !important;
background: #f9fafb !important;
.step-marker { background: #4a9d6e !important; color: #ffffff !important; }
}
}
/* 当前步骤 */
.step-tab.active {
border-color: #1f2937 !important;
background: #1f2937 !important;
color: #ffffff !important;
font-weight: 700 !important;
.step-marker { background: #ffffff !important; color: #1f2937 !important; }
&:hover {
background: #111827 !important;
border-color: #111827 !important;
}
}
}
/* ===== 窄屏:900px 横向滑动 ===== */
@media (max-width: 900px) {
#app .studentLayout section.app-main:has(.supplier-page) .step-indicator {
justify-content: flex-start !important;
gap: 8px !important;
overflow-x: auto !important;
}
#app .studentLayout section.app-main:has(.supplier-page) .step-indicator .step-tab {
flex: 0 0 auto !important;
max-width: none !important;
}
}
/* ===== 顶部工具栏 el-button 换肤 ===== */
.supplier-page .material-button.el-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 36px;
height: 36px;
padding: 0 14px;
border: 1px solid #d1d5db;
border-radius: 8px;
color: #374151;
background: #ffffff;
box-shadow: none;
text-shadow: none;
font-size: 13px;
font-weight: 600;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.supplier-page .material-button.el-button .el-icon {
font-size: 14px;
color: inherit;
}
.supplier-page .material-button.el-button:hover,
.supplier-page .material-button.el-button:focus {
border-color: #1f2937;
color: #1f2937;
background: #f9fafb;
box-shadow: 0 2px 6px rgba(17, 24, 39, 0.1);
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save