merge: 合并dev-QQq按钮位置统一调整(工具栏带页面函数绑定+考试分页)到master;解决重复工具栏与重复import,保留保存当前进度按钮与超管浅色主题

fix/exam-question-access-material-excel-delete-draft
陈沅 2 months ago
parent 4319e2c980
commit 2586cb4bee

1
.gitignore vendored

@ -12,6 +12,7 @@ selenium-debug.log
# Editor directories and files
.idea
.cursor/
.vscode
*.suo
*.ntvs*

@ -1,7 +1,7 @@
#app {
.main-container {
height: calc(100% - 50px);
transition: margin-left .28s;
transition: margin-left 0.28s;
margin-left: $base-sidebar-width;
position: relative;
}
@ -9,10 +9,10 @@
margin-left: 0 !important;
}
.sidebar-container {
-webkit-transition: width .28s;
-webkit-transition: width 0.28s;
transition: width 0.28s;
width: 239px !important;
background: url('../images/sidebar-background.webp') no-repeat center;
background: url("../images/sidebar-background.webp") no-repeat center;
// background-color: $base-menu-background;
background-size: 100% 100%;
height: 100%;
@ -23,11 +23,14 @@
left: 0;
z-index: 1001;
overflow: hidden;
-webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
-webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
// reset element-ui css
.horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
transition:
0s width ease-in-out,
0s padding-left ease-in-out,
0s padding-right ease-in-out;
}
.scrollbar-wrapper {
overflow-x: hidden !important;
@ -72,7 +75,7 @@
.el-sub-menu__title {
height: 37px;
line-height: 37px;
background: url('../images/sidebar-normal.png') no-repeat;
background: url("../images/sidebar-normal.png") no-repeat;
background-size: 100% 100% !important;
}
.el-menu {
@ -90,7 +93,7 @@
}
}
}
.is-opened{
.is-opened {
margin-bottom: 0px !important;
}
.el-menu-item {
@ -100,25 +103,24 @@
height: 37px;
line-height: 37px;
color: #fff;
background: url('../images/sidebar-normal.png') no-repeat;
background: url("../images/sidebar-normal.png") no-repeat;
background-size: 100% 100% !important;
}
.is-active {
background: url('../images/sidebar-active.png') no-repeat !important;
.el-menu{
.nest-menu{
.is-active{
background: url("../images/sidebar-active.png") no-repeat !important;
.el-menu {
.nest-menu {
.is-active {
color: #008efe !important;
}
}
}
.el-sub-menu__title {
background: url('../images/sidebar-active.png') no-repeat !important;
background: url("../images/sidebar-active.png") no-repeat !important;
background-size: 100% 100% !important;
}
}
}
.el-menu-item,
@ -140,11 +142,11 @@
}
}
& .theme-dark .is-active>.el-sub-menu__title {
& .theme-dark .is-active > .el-sub-menu__title {
color: $base-menu-color-active !important;
}
& .nest-menu .el-sub-menu>.el-sub-menu__title,
& .nest-menu .el-sub-menu > .el-sub-menu__title,
& .el-sub-menu .el-menu-item {
min-width: $base-sidebar-width !important;
@ -153,7 +155,7 @@
}
}
& .theme-dark .nest-menu .el-sub-menu>.el-sub-menu__title,
& .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title,
& .theme-dark .el-sub-menu .el-menu-item {
background-color: $base-sub-menu-background !important;
@ -187,20 +189,19 @@
.el-sub-menu {
overflow: hidden;
&>.el-sub-menu__title {
& > .el-sub-menu__title {
padding: 0 !important;
.svg-icon {
margin-left: 20px;
}
}
}
.el-menu--collapse {
.el-sub-menu {
&>.el-sub-menu__title {
&>span {
& > .el-sub-menu__title {
& > span {
height: 0;
width: 0;
overflow: hidden;
@ -208,7 +209,7 @@
display: inline-block;
}
&>i {
& > i {
height: 0;
width: 0;
overflow: hidden;
@ -229,7 +230,7 @@
}
.sidebar-container {
transition: transform .28s;
transition: transform 0.28s;
width: $base-sidebar-width !important;
}
@ -252,10 +253,7 @@
.platform-admin-main {
height: calc(100vh - 50px);
overflow: auto !important;
background:
radial-gradient(circle at 12% 18%, rgba(14, 74, 112, 0.45), transparent 34%),
radial-gradient(circle at 78% 6%, rgba(25, 92, 170, 0.3), transparent 28%),
linear-gradient(135deg, #03070e 0%, #061827 48%, #02060d 100%) !important;
background: radial-gradient(circle at 12% 18%, rgba(14, 74, 112, 0.45), transparent 34%), radial-gradient(circle at 78% 6%, rgba(25, 92, 170, 0.3), transparent 28%), linear-gradient(135deg, #03070e 0%, #061827 48%, #02060d 100%) !important;
&::-webkit-scrollbar {
width: 5px;
@ -291,17 +289,11 @@
.studentLayout,
.teacherLayout {
background:
radial-gradient(circle at 10% 20%, rgba(11, 42, 74, 0.74), transparent 34%),
radial-gradient(circle at 88% 8%, rgba(0, 136, 210, 0.24), transparent 28%),
linear-gradient(135deg, #02050c 0%, #07101d 52%, #02060d 100%);
background: radial-gradient(circle at 10% 20%, rgba(11, 42, 74, 0.74), transparent 34%), radial-gradient(circle at 88% 8%, rgba(0, 136, 210, 0.24), transparent 28%), linear-gradient(135deg, #02050c 0%, #07101d 52%, #02060d 100%);
.main-container {
margin-left: 304px;
background:
radial-gradient(circle at 10% 20%, rgba(11, 42, 74, 0.72), transparent 34%),
radial-gradient(circle at 88% 8%, rgba(0, 136, 210, 0.22), transparent 28%),
linear-gradient(135deg, #02050c 0%, #07101d 52%, #02060d 100%);
background: radial-gradient(circle at 10% 20%, rgba(11, 42, 74, 0.72), transparent 34%), radial-gradient(circle at 88% 8%, rgba(0, 136, 210, 0.22), transparent 28%), linear-gradient(135deg, #02050c 0%, #07101d 52%, #02060d 100%);
}
.app-main,
@ -309,10 +301,7 @@
height: calc(100vh - 50px);
padding: 28px 32px 40px 24px;
overflow: auto;
background:
radial-gradient(circle at 12% 18%, rgba(14, 74, 112, 0.45), transparent 34%),
radial-gradient(circle at 78% 6%, rgba(25, 92, 170, 0.3), transparent 28%),
linear-gradient(135deg, #03070e 0%, #061827 48%, #02060d 100%) !important;
background: radial-gradient(circle at 12% 18%, rgba(14, 74, 112, 0.45), transparent 34%), radial-gradient(circle at 78% 6%, rgba(25, 92, 170, 0.3), transparent 28%), linear-gradient(135deg, #03070e 0%, #061827 48%, #02060d 100%) !important;
&::-webkit-scrollbar {
width: 5px;
@ -367,7 +356,9 @@
border: 1px solid rgba(0, 180, 255, 0.25);
border-radius: 32px;
background: rgba(8, 18, 28, 0.7);
box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(169, 229, 255, 0.08);
box-shadow:
0 22px 48px rgba(0, 0, 0, 0.22),
inset 0 1px 0 rgba(169, 229, 255, 0.08);
backdrop-filter: blur(12px);
}
@ -425,7 +416,12 @@
white-space: normal;
overflow: hidden;
cursor: pointer;
transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
transition:
color 0.2s ease,
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease,
box-shadow 0.2s ease;
}
.student-course-icon {
@ -440,10 +436,10 @@
border: 1px solid rgba(0, 170, 255, 0.26);
border-radius: 10px;
color: #7ee9ff;
background:
linear-gradient(135deg, rgba(0, 170, 255, 0.24), rgba(43, 110, 255, 0.08)),
rgba(1, 24, 36, 0.82);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 10px rgba(0, 170, 255, 0.08);
background: linear-gradient(135deg, rgba(0, 170, 255, 0.24), rgba(43, 110, 255, 0.08)), rgba(1, 24, 36, 0.82);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.08),
0 0 10px rgba(0, 170, 255, 0.08);
svg {
width: 15px;
@ -504,7 +500,9 @@
font-size: 14px;
font-weight: 800;
cursor: pointer;
transition: background 0.2s ease, box-shadow 0.2s ease;
transition:
background 0.2s ease,
box-shadow 0.2s ease;
&:hover,
&.active {
@ -574,10 +572,10 @@
box-sizing: border-box;
border: 0;
border-radius: 0;
background:
radial-gradient(circle at 18% 10%, rgba(0, 170, 255, 0.12), transparent 34%),
rgba(8, 18, 28, 0.82);
box-shadow: inset -1px 0 0 rgba(169, 229, 255, 0.06), 12px 0 32px rgba(0, 5, 16, 0.2);
background: radial-gradient(circle at 18% 10%, rgba(0, 170, 255, 0.12), transparent 34%), rgba(8, 18, 28, 0.82);
box-shadow:
inset -1px 0 0 rgba(169, 229, 255, 0.06),
12px 0 32px rgba(0, 5, 16, 0.2);
}
.student-course-list {
@ -606,7 +604,10 @@
font-size: 24px;
line-height: 1;
cursor: pointer;
transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
transition:
background 0.2s ease,
border-color 0.2s ease,
transform 0.2s ease;
&:hover {
border-color: #70e4ff;
@ -654,7 +655,6 @@
margin-left: 64px;
}
}
}
/* 仅学生实训任务页提供课程导航的图标轨道,离开任务页不改变原有学生布局。 */
@ -683,7 +683,10 @@
font-size: 24px;
line-height: 1;
cursor: pointer;
transition: background .2s ease, border-color .2s ease, transform .2s ease;
transition:
background 0.2s ease,
border-color 0.2s ease,
transform 0.2s ease;
&:hover,
&:focus-visible {
@ -707,9 +710,8 @@
padding: 58px 11px 24px;
border: 0;
border-radius: 0;
background:
linear-gradient(180deg, rgba(8, 31, 47, .92), rgba(3, 16, 28, .98));
box-shadow: inset -1px 0 0 rgba(132, 228, 255, .1);
background: linear-gradient(180deg, rgba(8, 31, 47, 0.92), rgba(3, 16, 28, 0.98));
box-shadow: inset -1px 0 0 rgba(132, 228, 255, 0.1);
}
.student-course-heading,
@ -735,7 +737,7 @@
min-height: 42px;
margin: 0 0 8px;
border-radius: 13px;
background: rgba(255, 255, 255, .025);
background: rgba(255, 255, 255, 0.025);
}
.student-course-list {
@ -752,9 +754,9 @@
}
.student-course-link.active {
border: 1px solid rgba(0, 190, 255, .85);
background: linear-gradient(135deg, rgba(0, 174, 255, .28), rgba(18, 95, 190, .14));
box-shadow: 0 0 14px rgba(0, 178, 255, .25);
border: 1px solid rgba(0, 190, 255, 0.85);
background: linear-gradient(135deg, rgba(0, 174, 255, 0.28), rgba(18, 95, 190, 0.14));
box-shadow: 0 0 14px rgba(0, 178, 255, 0.25);
transform: none;
}
@ -773,13 +775,13 @@
}
// when menu collapsed
.el-menu--vertical {
&>.el-menu {
& > .el-menu {
.svg-icon {
margin-right: 16px;
}
}
.nest-menu .el-sub-menu>.el-sub-menu__title,
.nest-menu .el-sub-menu > .el-sub-menu__title,
.el-menu-item {
&:hover {
// you can use $sub-menuHover
@ -788,7 +790,7 @@
}
// the scroll bar appears when the sub-menu is too long
>.el-menu--popup {
> .el-menu--popup {
max-height: 100vh;
overflow-y: auto;
@ -815,24 +817,15 @@
#app .studentLayout,
#app .teacherLayout {
// 整体浅色背景 + 蓝色点缀,营造明亮的科技感
background:
radial-gradient(circle at 10% 20%, rgba(30, 136, 229, 0.07), transparent 34%),
radial-gradient(circle at 88% 8%, rgba(66, 165, 245, 0.05), transparent 28%),
linear-gradient(135deg, #f5f8fc 0%, #eaf2fb 52%, #f3f8ff 100%) !important;
background: radial-gradient(circle at 10% 20%, rgba(30, 136, 229, 0.07), transparent 34%), radial-gradient(circle at 88% 8%, rgba(66, 165, 245, 0.05), transparent 28%), linear-gradient(135deg, #f5f8fc 0%, #eaf2fb 52%, #f3f8ff 100%) !important;
.main-container {
background:
radial-gradient(circle at 10% 20%, rgba(30, 136, 229, 0.06), transparent 34%),
radial-gradient(circle at 88% 8%, rgba(66, 165, 245, 0.04), transparent 28%),
linear-gradient(135deg, #f5f8fc 0%, #eaf2fb 52%, #f3f8ff 100%) !important;
background: radial-gradient(circle at 10% 20%, rgba(30, 136, 229, 0.06), transparent 34%), radial-gradient(circle at 88% 8%, rgba(66, 165, 245, 0.04), transparent 28%), linear-gradient(135deg, #f5f8fc 0%, #eaf2fb 52%, #f3f8ff 100%) !important;
}
.app-main,
.teacher-main {
background:
radial-gradient(circle at 12% 18%, rgba(30, 136, 229, 0.05), transparent 34%),
radial-gradient(circle at 78% 6%, rgba(66, 165, 245, 0.04), transparent 28%),
linear-gradient(135deg, #f7fafd 0%, #eef4fb 48%, #f5f8fc 100%) !important;
background: radial-gradient(circle at 12% 18%, rgba(30, 136, 229, 0.05), transparent 34%), radial-gradient(circle at 78% 6%, rgba(66, 165, 245, 0.04), transparent 28%), linear-gradient(135deg, #f7fafd 0%, #eef4fb 48%, #f5f8fc 100%) !important;
&::-webkit-scrollbar {
width: 6px;
@ -895,7 +888,9 @@
margin: 0 0 2px !important;
min-height: 40px !important;
padding: 0 12px !important;
transition: background-color 0.15s ease, color 0.15s ease;
transition:
background-color 0.15s ease,
color 0.15s ease;
&:hover {
color: #1f2937 !important;
@ -971,10 +966,16 @@
color: #9ca3af !important;
box-shadow: -2px 0 6px rgba(17, 24, 39, 0.08) !important;
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease;
transition:
background-color 0.15s ease,
color 0.15s ease;
.toggle-arrow { font-size: 10px; }
.toggle-arrow--right { display: none; }
.toggle-arrow {
font-size: 10px;
}
.toggle-arrow--right {
display: none;
}
&:hover,
&:focus-visible {
@ -987,8 +988,31 @@
// 折叠态:左箭头隐藏、右箭头显示(与 .sidebar-container 同级,避免嵌套出双容器)
.sidebar-container.is-collapse .course-sidebar-toggle {
.toggle-arrow--left { display: none; }
.toggle-arrow--right { display: inline-flex; }
.toggle-arrow--left {
display: none;
}
.toggle-arrow--right {
display: inline-flex;
}
}
}
/*
* 教师端 sidebar 宽度单独缩减 50%(304 → 152px)
* 教师端使用 el-menu 直显式布局,无需学生端的内嵌卡片空间,原 304px 造成大量空白
* 学生端保持 304px 不变(内部 .student-course-nav 卡片需要空间)
* 同时隐藏教师端唯一的分组标题"教学管理"(标识),仅保留菜单项
*/
#app .teacherLayout {
.main-container {
margin-left: 180px !important;
}
.sidebar-container {
width: 180px !important;
}
// 隐藏教师端顶部分组标题("教学管理"标识),不影响学生端多分组标题
.student-course-nav > .student-course-heading {
display: none !important;
}
}
@ -1018,7 +1042,9 @@
border-right: 1px solid #e5e7eb !important;
box-shadow: none !important;
&::after { display: none !important; }
&::after {
display: none !important;
}
/* 清除遗留背景图:sidebar-normal.png / sidebar-active.png / sidebar-background.webp
这些 !important 老规则在 L15/L75/L103/L107 会给 li/sub-menu-title/menu-item
@ -1062,13 +1088,19 @@
/* 侧边栏滚动条中性化 */
.el-scrollbar__wrap {
&::-webkit-scrollbar { width: 5px; }
&::-webkit-scrollbar-track { background: transparent; }
&::-webkit-scrollbar {
width: 5px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: #d1d5db;
border-radius: 10px;
}
&::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
&::-webkit-scrollbar-thumb:hover {
background: #9ca3af;
}
}
.el-scrollbar__bar.is-vertical {
@ -1077,7 +1109,9 @@
transition: opacity 0.2s ease;
}
&:hover .el-scrollbar__bar.is-vertical { opacity: 1; }
&:hover .el-scrollbar__bar.is-vertical {
opacity: 1;
}
}
/* el-menu 菜单容器:白底、紧凑行高 */
@ -1108,9 +1142,14 @@
background: transparent !important;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transition: background-color 0.15s ease, color 0.15s ease;
transition:
background-color 0.15s ease,
color 0.15s ease;
.student-menu-icon { color: #1f2937 !important; transition: color 0.15s ease; }
.student-menu-icon {
color: #1f2937 !important;
transition: color 0.15s ease;
}
&:hover,
&:focus {
@ -1118,7 +1157,9 @@
background: #f9fafb !important;
outline: none;
.student-menu-icon { color: #1f2937 !important; }
.student-menu-icon {
color: #1f2937 !important;
}
}
}
@ -1136,14 +1177,18 @@
background: #f3f4f6 !important;
box-shadow: none;
.student-menu-icon { color: #2563eb !important; }
.student-menu-icon {
color: #2563eb !important;
}
&:hover,
&:focus {
color: #111827 !important;
background: #e5e7eb !important;
.student-menu-icon { color: #2563eb !important; }
.student-menu-icon {
color: #2563eb !important;
}
}
}
@ -1155,14 +1200,18 @@
background: transparent !important;
box-shadow: none;
.student-menu-icon { color: #2563eb !important; }
.student-menu-icon {
color: #2563eb !important;
}
&:hover,
&:focus {
color: #2563eb !important;
background: #f9fafb !important;
.student-menu-icon { color: #2563eb !important; }
.student-menu-icon {
color: #2563eb !important;
}
}
}
@ -1174,14 +1223,18 @@
background: transparent !important;
box-shadow: none;
.student-menu-icon { color: #2563eb !important; }
.student-menu-icon {
color: #2563eb !important;
}
&:hover,
&:focus {
color: #2563eb !important;
background: #f9fafb !important;
.student-menu-icon { color: #2563eb !important; }
.student-menu-icon {
color: #2563eb !important;
}
}
}
@ -1204,7 +1257,9 @@
font-size: 13px;
font-weight: 400;
background: transparent;
transition: background-color 0.15s ease, color 0.15s ease;
transition:
background-color 0.15s ease,
color 0.15s ease;
.student-menu-icon {
color: #9ca3af !important;
@ -1218,7 +1273,9 @@
color: #1f2937;
outline: none;
.student-menu-icon { color: #6b7280 !important; }
.student-menu-icon {
color: #6b7280 !important;
}
}
&.is-active {
@ -1227,7 +1284,9 @@
font-weight: 600;
box-shadow: none;
.student-menu-icon { color: #2563eb !important; }
.student-menu-icon {
color: #2563eb !important;
}
&:hover {
background: #e5e7eb !important;
@ -1287,7 +1346,9 @@
padding: 0;
}
.student-menu-icon { margin-right: 0; }
.student-menu-icon {
margin-right: 0;
}
/* 恢复折叠模式下 sub-menu title 里的 icon 尺寸 ——
Element Plus 默认把 .hideSidebar 里 sub-menu title 的 <i> 也压成 0 宽高,
@ -1327,7 +1388,9 @@
font-size: 13px;
font-weight: 400;
background: transparent;
transition: background-color 0.15s ease, color 0.15s ease;
transition:
background-color 0.15s ease,
color 0.15s ease;
&:hover,
&:focus {
@ -1358,26 +1421,38 @@
#app .teacherLayout {
background: #ffffff !important;
.main-container { background: #ffffff !important; }
.main-container {
background: #ffffff !important;
}
.app-main,
.teacher-main {
background: #ffffff !important;
&::-webkit-scrollbar-track { background: transparent !important; }
&::-webkit-scrollbar-thumb { background: #d1d5db !important; }
&::-webkit-scrollbar-thumb:hover { background: #9ca3af !important; }
&::-webkit-scrollbar-track {
background: transparent !important;
}
&::-webkit-scrollbar-thumb {
background: #d1d5db !important;
}
&::-webkit-scrollbar-thumb:hover {
background: #9ca3af !important;
}
}
// 实训页背景一并收敛为纯白
.app-main:has(.student-training-shell) { background: #ffffff !important; }
.app-main:has(.student-training-shell) {
background: #ffffff !important;
}
.sidebar-container {
background: #ffffff !important;
border-right: 1px solid #e5e7eb !important;
box-shadow: none !important;
&::after { display: none !important; }
&::after {
display: none !important;
}
// 导航容器:去掉大圆角玻璃卡片,铺满侧栏
.student-course-nav {
@ -1402,10 +1477,14 @@
letter-spacing: 0;
text-transform: none;
&:hover { color: #1f2937 !important; }
&:hover {
color: #1f2937 !important;
}
}
.student-course-list { margin: 0 0 16px; }
.student-course-list {
margin: 0 0 16px;
}
// 菜单项:纯文字行、38px 高、8px 圆角
.student-course-link {
@ -1455,7 +1534,11 @@
background: #eff6ff !important;
}
.student-course-link:hover .student-course-icon { color: #4b5563 !important; }
.student-course-link.active .student-course-icon { color: #3b82f6 !important; }
.student-course-link:hover .student-course-icon {
color: #4b5563 !important;
}
.student-course-link.active .student-course-icon {
color: #3b82f6 !important;
}
}
}

@ -17,8 +17,12 @@
</span>
</p>
</div>
<TrainingTaskToolbar class="diagnosis-toolbar" :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportTrainingOutcome" />
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportTrainingOutcome" />
</section>
<section class="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"><b class="step-name">全链路漏斗诊断</b><small class="step-action">{{ currentStep === 1 ? '当前步骤 →' : '点击切换 →' }}</small></span></button><span class="step-connector" aria-hidden="true" /><button type="button" :class="['step-tab', { active: currentStep === 2, complete: currentStep > 2 }]" :aria-current="currentStep === 2 ? 'step' : undefined" @click="currentStep = 2"><span class="step-marker">02</span><span class="step-copy"><b class="step-name">用户评论根因分析</b><small class="step-action">{{ currentStep === 2 ? '当前步骤 →' : '点击切换 →' }}</small></span></button><span class="step-connector" aria-hidden="true" /><button type="button" :class="['step-tab', { active: currentStep === 3 }]" :aria-current="currentStep === 3 ? 'step' : undefined" @click="currentStep = 3"><span class="step-marker">03</span><span class="step-copy"><b class="step-name">AB测试验证</b><small class="step-action">{{ currentStep === 3 ? '当前步骤 →' : '点击切换 →' }}</small></span></button></nav>
@ -82,7 +86,11 @@
<section class="section-block"><div class="section-heading"><span>(3)</span><div><h3>可视化呈现</h3><p>绘制AB测试结果对比图,参考方法及工具如下:</p></div></div><input ref="abChartInput" class="visually-hidden" type="file" accept="image/png,image/jpeg,image/webp" @change="handleAbChartUpload" /><div class="chart-upload-area"><template v-if="abChart.url"><div class="chart-preview"><el-image :src="abChart.url" :preview-src-list="[abChart.url]" fit="cover" preview-teleported /><div><strong>{{ abChart.name || 'AB 测试结果对比图' }}</strong><span>点击缩略图可放大预览</span><button type="button" @click="clearAbChart">移除图片</button></div></div><button type="button" class="secondary-button" :disabled="uploading" @click="abChartInput?.click()">{{ uploading ? '上传中…' : '更换对比图' }}</button></template><template v-else><button type="button" class="upload-button" :disabled="uploading" @click="abChartInput?.click()">{{ uploading ? '上传中…' : '上传AB测试结果对比图' }}</button><p>支持 PNG、JPG、WEBP 格式,图片不超过 5MB;上传后可点击预览。</p></template></div><div class="ab-materials"><div><ol><li>1.使用Excel/WPS绘图功能,自主完成AB测试结果对比图,参考《实训操作说明》。</li><li>2.下载Excel模版,填写关键信息,自动计算AB测试数据,并生成测试结果对比图。</li><li>3.导出数据表上传到通用AI大模型,通过AI大模型辅助完成,参考步骤及提示词如下:请根据表格数据,进行对照组和实验组数据对比,采用组合柱状图生成可视化图形。</li></ol></div><div class="ab-materials__actions"><button type="button" class="secondary-button" @click="downloadAbGuide">下载实训操作说明</button><button type="button" class="secondary-button" @click="downloadAbTemplate">下载Excel模板</button></div></div></section>
<section class="section-block"><div class="section-heading"><span>(4)</span><div><h3>诊断结论与迭代优化建议</h3><p>结合全链路数据漏斗诊断、售后评论分析法及AB测试对照诊断,分析产品存在的问题,并提出具体的迭代优化建议。</p></div></div><el-input v-model="iterationRecommendation" type="textarea" :rows="6" maxlength="1200" show-word-limit placeholder="请填写产品问题诊断结论及具体迭代优化建议" /></section>
</template>
<div class="actions step-navigation"><button v-if="currentStep > 1" type="button" class="secondary-button" :disabled="saving" @click="currentStep -= 1">上一步</button><button type="button" class="submit-button" :disabled="saving || uploading || analyzing" @click="saveCurrentProgress">保存当前进度</button><button v-if="currentStep < 3" type="button" class="submit-button" :disabled="saving || uploading || analyzing" @click="nextStep">下一步</button></div>
<footer class="footer-actions">
<el-button v-if="currentStep > 1" @click="currentStep -= 1">上一步</el-button>
<el-button :loading="saving || uploading || analyzing" @click="saveCurrentProgress">保存当前进度</el-button>
<el-button v-if="currentStep < 3" type="primary" :disabled="saving || uploading || analyzing" @click="nextStep">下一步 <el-icon><ArrowRight /></el-icon></el-button>
</footer>
</section>
</main>
<TrainingAiSidebar :study-tip="currentStep === 1 ? '先从案例资料提取各渠道漏斗数据,计算转化率并与行业均值逐层对比。' : currentStep === 2 ? '先导入案例评论数据生成词云,再点击情感倾向分析,并用高频问题与情感占比解释漏斗异常。' : '基于前两步结论设计随机分流的 AB 测试,用五项指标的组间差异验证改进方案。'" :progress-items="progressItems" />
@ -91,7 +99,7 @@
<script setup>
import { computed, getCurrentInstance, nextTick, onBeforeUnmount, onMounted, ref } from "vue";
import { DataAnalysis } from "@element-plus/icons-vue";
import { ArrowRight, DataAnalysis } from "@element-plus/icons-vue";
import * as echarts from "echarts";
import "echarts-wordcloud";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
@ -459,11 +467,18 @@ onMounted(async () => { try { taskConfig.value = (await getTrainingTaskByKey(TAS
p { margin: 0; }
}
.diagnosis-toolbar {
flex: 0 0 auto;
justify-content: flex-end;
max-width: 100%;
align-self: center;
/* 操作工具栏横条:内联布局,去掉悬浮和边框 */
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* workbench:透明容器,去掉旧的 border/bg */
@ -764,16 +779,12 @@ button.is-disabled {
}
}
.actions {
/* ===== 底部步骤导航按钮 ===== */
.footer-actions {
display: flex;
justify-content: center;
gap: 12px;
margin-top: 20px;
.secondary-button,
.submit-button {
min-width: 142px;
min-height: 36px;
height: 36px;
}
}
/* ===== 参考资料区 ===== */
@ -1054,18 +1065,20 @@ button.is-disabled {
@media (max-width: 720px) {
.task-header { flex-direction: column; align-items: flex-start; }
.diagnosis-toolbar { width: 100%; justify-content: flex-start; }
.task-action-strip {
:deep(.training-task-toolbar) { justify-content: stretch; }
:deep(.training-task-toolbar > *) { flex: 1 1 auto; }
}
.table-toolbar,
.sentiment-actions {
align-items: stretch;
flex-direction: column;
}
.actions {
.footer-actions {
align-items: stretch;
flex-direction: column;
.secondary-button,
.submit-button { width: 100%; }
}
.footer-actions :deep(.el-button) { width: 100%; }
}
</style>
@ -1264,4 +1277,35 @@ button.is-disabled {
color: #2563eb;
background: #ffffff;
}
/* ===== 底部步骤导航按钮换肤 ===== */
.diagnosis-page .footer-actions .el-button {
border-radius: 8px !important;
font-size: 13px !important;
font-weight: 700 !important;
}
.diagnosis-page .footer-actions .el-button--primary {
border-color: #2563eb !important;
background: #2563eb !important;
color: #ffffff !important;
box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28) !important;
}
.diagnosis-page .footer-actions .el-button--primary:hover {
border-color: #1d4ed8 !important;
background: #1d4ed8 !important;
box-shadow: 0 5px 14px rgba(29, 78, 216, 0.32) !important;
}
.diagnosis-page .footer-actions .el-button:not(.el-button--primary) {
border-color: rgba(37, 99, 235, 0.35) !important;
background: #ffffff !important;
color: #2563eb !important;
}
.diagnosis-page .footer-actions .el-button:not(.el-button--primary):hover {
border-color: #2563eb !important;
background: #eff6ff !important;
}
</style>

@ -19,26 +19,11 @@
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTask" :on-export="exportOutcome" />
</section>
<section class="task-card">
<div class="workbench-head">
<div>
<p class="section-eyebrow">CATEGORY OPERATIONS</p>
<h2>{{ activeStepName }}</h2>
</div>
<div class="workbench-actions">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button class="outline-action" type="button" @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}`">
@ -193,10 +178,6 @@
<button type="button" class="nav-button nav-button--save" :disabled="saving" @click="saveCurrentProgress"><el-icon><CircleCheck /></el-icon>保存当前进度</button>
<button type="button" class="nav-button nav-button--primary" :disabled="activeStep === configuredSteps.length" @click="goNextStep">下一步<el-icon><ArrowRight /></el-icon></button>
</div>
<div class="training-actions">
<el-button class="training-action" :loading="saving" @click="submitTask">提交任务</el-button>
<el-button class="training-action" :loading="saving" @click="resetTask">清空填写</el-button>
</div>
</section>
</main>
<TrainingAiSidebar study-tip="先完成品类营收数据排序和占比校验,再开展后续分析。" :progress-items="progressItems" />
@ -205,12 +186,12 @@
<script setup>
import { computed, defineAsyncComponent, onMounted, ref } from "vue";
import { ArrowLeft, ArrowRight, CircleCheck, Delete, Download, Minus, Plus, TrendCharts, UploadFilled } from "@element-plus/icons-vue";
import { ArrowLeft, ArrowRight, CircleCheck, Delete, Minus, Plus, TrendCharts, UploadFilled } 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 TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile, validateCategoryOptimizationStepOne, validateCategoryOptimizationStepTwo, validateCategoryOptimizationStepThree, validateCategoryOptimizationStepFour, validateCategoryOptimizationStepFive } from "@/api/studentTrainingAnswer";
import { deleteStudentTrainingAnswer, getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile, validateCategoryOptimizationStepOne, validateCategoryOptimizationStepTwo, validateCategoryOptimizationStepThree, validateCategoryOptimizationStepFour, validateCategoryOptimizationStepFive } from "@/api/studentTrainingAnswer";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { isStudentDemo } from "@/utils/studentDemo";
@ -381,15 +362,22 @@ async function submitTask() {
}
async function resetTask() {
if (saving.value) return;
categoryRows.value = [];
removeParetoImage();
stepFour.value = createStepFour();
strategyRows.value = createStrategyRows();
activeStep.value = 1;
activeModule.value = 0;
workspaceKey.value += 1;
saving.value = true;
try { await persistProgress("RESET"); ElMessage.success("填写内容已清空"); } finally { saving.value = false; }
try {
await deleteStudentTrainingAnswer(TASK_KEY);
categoryRows.value = [];
removeParetoImage();
stepFour.value = createStepFour();
strategyRows.value = createStrategyRows();
activeStep.value = 1;
activeModule.value = 0;
workspaceKey.value += 1;
ElMessage.success("已清空全部实训步骤,可以重新开始");
} catch (error) {
ElMessage.error("重新实训失败,请稍后重试");
} finally {
saving.value = false;
}
}
function exportOutcome() {
const blob = new Blob([JSON.stringify(buildProgress(), null, 2)], { type: "application/json;charset=utf-8" });
@ -517,6 +505,19 @@ onMounted(async () => {
p { margin: 0; }
}
/* ===== task-action-strip(操作工具栏) ===== */
.task-action-strip {
margin: 0;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* ===== task-card(透明化) ===== */
.task-card {
overflow: visible;
@ -527,44 +528,6 @@ onMounted(async () => {
gap: 10px;
}
/* ===== workbench-head ===== */
.workbench-head {
display: flex;
justify-content: space-between;
gap: 18px;
padding: 0;
border-bottom: 0;
}
.section-eyebrow {
margin: 0;
color: var(--student-text-secondary);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.workbench-head h2 {
margin: 4px 0 0;
color: var(--student-text);
font-size: var(--student-fs-h1);
font-weight: 700;
line-height: 1.35;
}
.workbench-actions,
.table-toolbar > div {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}
.workbench-actions {
justify-content: flex-end;
}
/* ===== 按钮规范(白底灰边 / 墨黑实底 / 浅灰底) ===== */
.outline-action,
.action-button,
@ -1062,19 +1025,16 @@ button:disabled {
/* ===== 响应式 ===== */
@media (max-width: 720px) {
.task-header { flex-direction: column; align-items: flex-start; }
.workbench-head,
.table-toolbar,
.pareto-materials {
flex-direction: column;
align-items: stretch;
}
.workbench-actions,
.table-toolbar > div,
.step-navigation,
.training-actions {
justify-content: stretch;
}
.workbench-actions > *,
.action-button,
.nav-button,
.training-actions :deep(.training-action) {

@ -1,6 +1,5 @@
<template>
<div class="channel student-training-shell">
<TrainingTaskToolbar />
<main class="training-core">
<section class="task-header">
<div class="task-head-main">
@ -18,19 +17,9 @@
</span>
</p>
</div>
<div class="channel-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon>导出实训成果</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTask" :on-export="exportOutcome" />
</section>
<section class="task-card">
<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>
@ -149,7 +138,6 @@
<div id="forecastChart" ref="forecastChart" style="width: 80%; height: 400px"></div>
</section>
<div v-if="hasConfiguredSteps" class="step-navigation"><button type="button" class="btn-nav" :disabled="activeStep===1" @click="goPreviousStep"><el-icon><ArrowLeft /></el-icon>上一步</button><button type="button" class="btn-nav btn-save" :disabled="saving" @click="saveCurrentProgress"><el-icon><CircleCheck /></el-icon>保存当前进度</button><button type="button" class="btn-nav btn-primary" :disabled="activeStep===configuredSteps.length" @click="goNextStep">下一步<el-icon><ArrowRight /></el-icon></button></div>
<div class="taskfooter"><el-button @click="submitTask" :loading="saving">提交任务</el-button><el-button @click="resetTask" :loading="saving">清空填写</el-button></div>
<pop-model :showModel="runResultShow" title="设置代码" @closePop="closeCode">
<template v-slot:content>
<div>
@ -166,11 +154,11 @@
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import * as analysisAPI from "@/api/market-demand-mining.js";
import * as echarts from "echarts";
import useUserStore from "@/store/modules/user";
import { ArrowLeft, ArrowRight, CircleCheck, Download, TrendCharts } from "@element-plus/icons-vue";
import { ArrowLeft, ArrowRight, CircleCheck, TrendCharts } from "@element-plus/icons-vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile, validatePurchaseDemandForecastStepOne } from "@/api/studentTrainingAnswer";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
@ -200,7 +188,6 @@ import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
from sklearn.linear_model import LinearRegression
mpl.rcParams['font.sans-serif'] = ['SimHei']#SimHeri是中文字体名称
mpl.rcParams['axes.unicode_minus'] = False
@ -948,23 +935,17 @@ onMounted(async () => {
color: var(--student-text);
}
.taskfooter {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 28px;
margin-top: 32px;
padding-top: 28px;
border-top: 1px solid var(--student-panel-border);
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.taskfooter :deep(.el-button) {
min-width: 140px;
height: 36px;
padding: 0 14px;
border-radius: 8px;
font-size: var(--student-fs-h1);
font-weight: 800;
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
@ -978,13 +959,12 @@ onMounted(async () => {
.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: 36px; height: 36px; padding: 0 14px; border: 1px solid var(--student-panel-border); border-radius: 8px; 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); min-height: 36px; height: 36px; padding: 0 14px; border-radius: 8px; }.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: 112px; height: 34px; padding: 0 16px; border: 1px solid rgba(37, 99, 235, 0.35) !important; border-radius: 8px; color: #2563eb !important; background: #ffffff !important; font-size: 13px; font-weight: 600; }
: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); min-height: 36px; height: 36px; padding: 0 14px; border-radius: 8px; }.btn-nav:disabled { cursor: not-allowed; opacity: .45; }
}
@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; } } }
@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 { 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; } } }
.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 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; }

@ -1,6 +1,5 @@
<template>
<div class="supplier-page student-training-shell" v-loading="loading">
<TrainingTaskToolbar />
<main class="supplier-core">
<section class="task-header">
<div class="task-head-main">
@ -18,18 +17,9 @@
</span>
</p>
</div>
<div class="supplier-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="saveStepThree" />
</section>
<section class="supplier-workbench">
@ -218,10 +208,9 @@ import { computed, onMounted, ref } from "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 TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import {
getStudentTrainingAnswer,
saveStudentTrainingAnswer,
@ -674,11 +663,17 @@ onMounted(async () => {
p { margin: 0; }
}
.supplier-toolbar {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 8px;
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* ===== supplier-workbench(透明容器) ===== */
@ -990,7 +985,6 @@ onMounted(async () => {
@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; }
}

@ -394,7 +394,7 @@ function plainText(value) {
top: 64px;
right: 16px;
bottom: 16px;
width: min(390px, calc(100vw - 32px));
width: min(585px, calc(100vw - 32px));
/* 根透明:不铺任何背景色,白底仅限卡片本身 */
background: transparent;
display: flex;

@ -1,6 +1,5 @@
<template>
<div class="feasibility-page student-training-shell">
<TrainingTaskToolbar />
<main class="feasibility-core">
<section class="task-header">
<div class="task-head-main">
@ -20,16 +19,10 @@
</span>
</p>
</div>
<div class="workbench-actions">
<TrainingMaterialButton :material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl" :training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName" :guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName" :ai-manual-url="taskConfig?.aiManualUrl" />
<button class="action-button" type="button" @click="exportOutcome"><el-icon>
<Download />
</el-icon>导出实训成果</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="saveStepThree" :on-export="exportOutcome" />
</section>
<section class="workbench">
@ -379,9 +372,7 @@ import { checkBusinessFeasibilityStepOne, checkBusinessFeasibilityStepTwo, check
import { getTrainingTaskByKey } from "@/api/trainingTask"
import { parseTrainingArray } from "@/views/training/taskKeyMap"
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue"
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue"
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "business-feasibility"
const DEFAULT_STEPS = ["商业可行性论证", "项目初步决策", "可行性论证报告", "决策结论"]
const overviewFields = [
@ -548,6 +539,19 @@ function exportOutcome() { const blob = new Blob([JSON.stringify({ task: taskTit
min-width: 0;
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
.task-title {
margin: 0;

@ -17,19 +17,10 @@
</span>
</p>
</div>
<div class="analysis-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon> 导出实训成果</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="saveAndCompleteTraining" :on-reset="resetStepFour" :on-export="exportOutcome" />
</section>
<section class="analysis-workbench">
@ -62,7 +53,6 @@
<section class="decision-section"><h3>(1)优先策略排序</h3><p class="section-tip">策略内容由第 3 步填写的“具体策略建议”自动带入;请完成优先级排序并说明理由。</p><div class="priority-table-wrap"><table class="priority-table"><thead><tr><th>优先级排序</th><th>策略</th><th>理由</th></tr></thead><tbody><tr v-for="row in strategyDefinitions" :key="row.key"><td><el-select v-model="finalForm.priorities[row.key].priority" :disabled="!stepThreePassed" :aria-label="`${row.label} 的优先级排序`" placeholder="请选择" style="width:100%"><el-option :value="null" label="请选择" /><el-option v-for="rank in 4" :key="rank" :value="rank" :label="`${rank}`" /></el-select></td><td class="priority-strategy"><strong>{{ row.label }}</strong><p>{{ strategyForm[row.key].recommendation || '请先在第 3 步填写该策略建议' }}</p></td><td><el-input v-model.trim="finalForm.priorities[row.key].reason" type="textarea" :autosize="{ minRows: 2 }" :disabled="!stepThreePassed" placeholder="说明该策略的排序理由" /></td></tr></tbody></table></div></section>
<section class="decision-section"><h3>(2)需关注的风险点</h3><p>请至少指出 2 个风险点。</p><div class="risk-grid"><label><span>核心风险点 1</span><el-input v-model.trim="finalForm.coreRiskOne" type="textarea" :autosize="{ minRows: 2 }" :disabled="!stepThreePassed" placeholder="填写核心风险点" /></label><label><span>核心风险点 2</span><el-input v-model.trim="finalForm.coreRiskTwo" type="textarea" :autosize="{ minRows: 2 }" :disabled="!stepThreePassed" placeholder="填写核心风险点" /></label><label><span>其他风险点</span><el-input v-model.trim="finalForm.otherRisk" type="textarea" :autosize="{ minRows: 2 }" :disabled="!stepThreePassed" placeholder="可补充其他风险点" /></label></div></section>
<section class="decision-section"><h3>(3)总结 SWOT 竞争环境评估结论</h3><el-input v-model.trim="finalForm.conclusion" class="conclusion-textarea" type="textarea" :autosize="{ minRows: 3 }" :disabled="!stepThreePassed" placeholder="综合说明优先策略、风险应对方向及最终结论" /></section>
<div class="task-actions"><button type="button" class="btn btn-primary" :disabled="saving || !stepThreePassed" @click="saveAndCompleteTraining">保存并完成实训</button><button type="button" class="btn" :disabled="saving || !stepThreePassed" @click="resetStepFour"><el-icon><RefreshLeft /></el-icon> 清空填写</button></div>
</template>
<div v-else class="step-placeholder"><p>第 {{ currentStep }} 步内容待配置</p><span>第 1 步 SWOT 分类已保存,可从上方步骤栏返回查看。</span></div>
</section>
@ -73,13 +63,13 @@
</template>
<script setup>
import { Download, RefreshLeft, TrendCharts } from "@element-plus/icons-vue";
import { RefreshLeft, TrendCharts } from "@element-plus/icons-vue";
import { checkCompetitiveEnvironmentAnalysisStepOne, checkCompetitiveEnvironmentAnalysisStepTwo, checkCompetitiveEnvironmentAnalysisStepThree, checkCompetitiveEnvironmentAnalysisStepFour, getStudentTrainingAnswer, saveStudentTrainingAnswer } from "@/api/studentTrainingAnswer";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import useUserStore from "@/store/modules/user";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "competitive-environment-analysis";
const { proxy } = getCurrentInstance();
@ -289,6 +279,19 @@ function exportOutcome() { const blob = new Blob([JSON.stringify(buildDraft(), n
justify-content: flex-end;
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* workbench 层:透明容器 */
.analysis-workbench {
margin: 0;

@ -1,6 +1,5 @@
<template>
<template>
<div class="consumer-behavior-page student-training-shell">
<TrainingTaskToolbar />
<main class="training-core">
<section class="task-header">
<div class="task-head-main">
@ -18,22 +17,10 @@
</span>
</p>
</div>
<div class="workbench-actions">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome">
<el-icon><Download /></el-icon>
导出实训成果
</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-export="exportOutcome" />
</section>
<section class="task-card">
@ -273,10 +260,6 @@
</div>
<div class="training-actions">
<el-button class="training-action training-action--submit" :loading="saving" @click="submitTask">
提交任务
<el-icon><CircleCheck /></el-icon>
</el-button>
<el-button class="training-action training-action--reset" @click="resetTraining">
重新实训
</el-button>
@ -300,11 +283,10 @@ import { computed, getCurrentInstance, nextTick, onMounted, ref } from "vue";
import { useRouter } from "vue-router";
import { ArrowLeft, ArrowRight, CircleCheck, Document, Download, Upload } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { checkConsumerBehaviorStepOne, checkConsumerBehaviorStepTwo, checkConsumerBehaviorStepThree, checkConsumerBehaviorStepFour, getStudentTrainingAnswer, previewConsumerBehaviorQuestionnaireWord, saveStudentTrainingAnswer, uploadStudentTrainingFile } from "@/api/studentTrainingAnswer";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "consumer-behavior";
const QUESTIONNAIRE_TEMPLATE_URL = "/file/training-materials/consumer-behavior/9.问卷调查报告模板.docx";
@ -1107,6 +1089,22 @@ function downloadSurveyReportTemplate() {
gap: 8px;
}
/* ============================================================
* 操作工具栏横条:内联布局,去掉悬浮和边框
* ============================================================ */
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
.section-eyebrow {
margin: 0;
color: var(--student-text-secondary);

@ -1,6 +1,5 @@
<template>
<div class="consumer-scenario-page student-training-shell">
<TrainingTaskToolbar />
<main class="consumer-scenario-core">
<section class="task-header">
<div class="task-head-main">
@ -20,26 +19,11 @@
</div>
</section>
<section class="consumer-scenario-workbench">
<div class="workbench-head workbench-head--actions-only">
<div class="workbench-actions">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome">
<el-icon><Download /></el-icon>
导出实训成果
</button>
</div>
</div>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-export="exportOutcome" />
</section>
<section class="consumer-scenario-workbench">
<nav v-if="trainingSteps.length" class="step-indicator" aria-label="消费场景解构步骤">
<template v-for="(step, index) in trainingSteps" :key="`${index}-${step}`">
<button
@ -249,10 +233,6 @@
</div>
<div class="training-actions">
<el-button class="training-action training-action--submit" :loading="saving" @click="submitTask">
提交任务
<el-icon><CircleCheck /></el-icon>
</el-button>
<el-button class="training-action training-action--reset" @click="resetTraining">
重新实训
</el-button>
@ -275,12 +255,11 @@
import { computed, getCurrentInstance, onMounted, ref } from "vue";
import { ArrowLeft, ArrowRight, CircleCheck, Download, UploadFilled } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { checkConsumerScenarioStepOne, checkConsumerScenarioStepTwo, checkConsumerScenarioStepThree, checkConsumerScenarioStepFour, getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile } from "@/api/studentTrainingAnswer";
import { isStudentDemo } from "@/utils/studentDemo";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "consumer-scenario";
const JOURNEY_TEMPLATE_URL = "/file/training-materials/consumer-scenario/10.用户购买旅程模版.pptx";
@ -1061,6 +1040,19 @@ function exportOutcome() {
p { margin: 0; }
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* 顶部任务工具栏(保留 DOM,按钮由全局接管) */
.workbench-head--actions-only {
flex: 0 0 auto;

@ -19,26 +19,11 @@
</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"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome">
<el-icon><Download /></el-icon>
导出实训成果
</button>
</div>
</div>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-export="exportOutcome" />
</section>
<section class="task-card">
<nav v-if="flowSteps.length" class="step-indicator" aria-label="需求转化为功能步骤">
<template v-for="(step, index) in flowSteps" :key="`${step}-${index}`">
<button
@ -218,9 +203,6 @@
</div>
<div class="training-actions">
<el-button class="training-action training-action--submit" :loading="saving" @click="submitTask">
提交任务
</el-button>
<el-button class="training-action training-action--reset" @click="resetTraining">
清空填写
</el-button>
@ -240,9 +222,9 @@
<script setup>
import { computed, getCurrentInstance, onMounted, ref } from "vue";
import { ArrowLeft, ArrowRight, CircleCheck, Download } from "@element-plus/icons-vue";
import { ArrowLeft, ArrowRight, CircleCheck } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { checkFeatureConversionStepOne, checkFeatureConversionStepTwo, checkFeatureConversionStepThree, getStudentTrainingAnswer, saveStudentTrainingAnswer } from "@/api/studentTrainingAnswer";
@ -790,6 +772,19 @@ function exportOutcome() {
}
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
.task-head-main {
display: grid;
justify-items: start;

@ -17,7 +17,10 @@
</span>
</p>
</div>
<TrainingTaskToolbar class="industry-demand-toolbar" :task-key="TASK_KEY" :on-submit="submitTraining" :on-reset="resetTraining" :on-export="exportOutcome" />
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTraining" :on-reset="resetTraining" :on-export="exportOutcome" />
</section>
<section class="industry-workbench">
@ -360,10 +363,17 @@ function exportOutcome() { const blob = new Blob([JSON.stringify(buildDraft(), n
p { margin: 0; }
}
.industry-demand-toolbar {
flex: 0 0 auto;
justify-content: flex-end;
max-width: 100%;
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* step-card 层:透明容器,去掉旧的 border/bg(对齐 foundation 的 .task-card) */
@ -668,7 +678,6 @@ function exportOutcome() { const blob = new Blob([JSON.stringify(buildDraft(), n
@media (max-width: 720px) {
.task-header { flex-direction: column; align-items: flex-start; }
.industry-demand-toolbar { width: 100%; justify-content: flex-start; }
.step-chip { display: none; }
.step-navigation { flex-direction: column; }
.step-navigation .btn-nav { width: 100%; }

@ -1,6 +1,5 @@
<template>
<div class="target-profile-page student-training-shell">
<TrainingTaskToolbar />
<main class="training-core">
<section class="task-header">
<div class="task-head-main">
@ -22,24 +21,11 @@
</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" :training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl" :ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl" />
<button type="button" class="outline-action" @click="exportOutcome">
<el-icon>
<Download />
</el-icon>
导出实训成果
</button>
</div>
</div>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-export="exportOutcome" :on-reset="resetTraining" />
</section>
<section class="task-card">
<nav v-if="steps.length" class="step-indicator" aria-label="目标用户画像步骤">
<button v-for="(step, index) in steps" :key="step.no" type="button"
:class="['step-tab', { active: currentStep === step.no, complete: currentStep > step.no }]"
@ -353,10 +339,6 @@
</div>
<div class="training-actions">
<el-button class="training-action training-action--submit" :loading="saving"
@click="submitTask">
提交任务
</el-button>
<el-button class="training-action training-action--reset" @click="resetTraining">
重新实训
</el-button>
@ -375,11 +357,10 @@
import { ArrowLeft, ArrowRight, CircleCheck, Document, Download, Upload } from "@element-plus/icons-vue"
import * as XLSX from "xlsx"
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue"
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue"
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue"
import { getTrainingTaskByKey } from "@/api/trainingTask"
import { parseTrainingArray } from "@/views/training/taskKeyMap"
import { checkTargetUserProfileStepFive, checkTargetUserProfileStepFour, checkTargetUserProfileStepOne, checkTargetUserProfileStepThree, checkTargetUserProfileStepTwo, getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile } from "@/api/studentTrainingAnswer"
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "target-user-profile"
const RFM_INSTRUCTIONS_URL = "/file/training-materials/target-user-profile/8.实训操作说明.docx"
@ -928,6 +909,19 @@ function exportOutcome() {
box-shadow: none;
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
/* 任务头:白卡 + 左侧教育蓝竖条 + 12px 圆角 */
.task-header {
position: relative;

@ -19,7 +19,10 @@
</span>
</p>
</div>
<TrainingTaskToolbar class="new-product-survey-toolbar" :task-key="TASK_KEY" :on-export="exportOutcome" />
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-export="exportOutcome" />
</section>
<section class="task-card">
@ -946,14 +949,10 @@ function exportOutcome() {
}
/* ============================================================
* 任务头:白卡 + 左侧教育蓝竖条 + 徽章 + 标题 + 简介
* 任务头:白卡 + 左侧教育蓝竖条 + 标题 + 简介
* ============================================================ */
.task-header {
position: relative;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin: 0;
padding: 18px 20px 18px 24px;
border: 1px solid var(--student-panel-border);
@ -977,7 +976,6 @@ function exportOutcome() {
justify-items: start;
gap: 8px;
min-width: 0;
flex: 1 1 auto;
}
@ -1968,12 +1966,20 @@ function exportOutcome() {
.field-block.layer-extended { --bar: var(--student-layer-3); }
/* ============================================================
* 工具栏
* 操作工具栏横条:内联布局,去掉悬浮和边框
* ============================================================ */
.new-product-survey-toolbar {
flex: 0 0 auto;
justify-content: flex-end;
max-width: 100%;
.task-action-strip {
margin: 0;
padding: 10px 16px;
// 让 TrainingTaskToolbar 内部按钮在横条内右对齐
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* ============================================================
@ -1986,10 +1992,6 @@ function exportOutcome() {
}
@media (max-width: 900px) {
.task-header {
flex-direction: column;
}
.step-navigation {
flex-direction: column;
align-items: stretch;
@ -2010,6 +2012,14 @@ function exportOutcome() {
.classification-table {
min-width: 720px;
}
:deep(.training-task-toolbar) {
justify-content: stretch;
}
:deep(.training-task-toolbar > *) {
flex: 1 1 auto;
}
}
@media (max-width: 720px) {

@ -1,6 +1,5 @@
<template>
<div class="product-factors student-training-shell">
<TrainingTaskToolbar />
<main class="factors-core">
<section class="task-header">
<div class="task-head-main">
@ -22,26 +21,22 @@
</div>
</section>
<section class="factors-workbench">
<div class="workbench-head workbench-head--actions-only">
<div class="workbench-actions">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome">
<el-icon><Download /></el-icon>
导出实训成果
</button>
</div>
</div>
<section class="task-action-strip">
<TrainingTaskToolbar
:task-key="TASK_KEY"
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
:on-export="exportOutcome"
/>
</section>
<section class="factors-workbench">
<nav v-if="trainingSteps.length" class="step-indicator" aria-label="实训步骤">
<button
v-for="(step, index) in trainingSteps"
@ -135,7 +130,6 @@
<p class="factor-intro">结合案例信息及前述步骤,分析案例资料中产品一成功的关键因素是什么,产品二失败的关键因素是什么。</p>
<label class="factor-intro">产品成功的关键因素:</label><textarea v-model="stepFourForm.successFactors" class="table-textarea summary-textarea" />
<label class="factor-intro">产品失败的关键因素:</label><textarea v-model="stepFourForm.failedFactors" class="table-textarea summary-textarea" />
<div class="task-actions"><button type="button" class="btn-nav btn-submit" :disabled="saving" @click="submitTraining">提交任务<el-icon><CircleCheck /></el-icon></button><button type="button" class="btn-nav" :disabled="saving" @click="resetTraining">清空填写</button></div>
</template>
<div v-else class="step-placeholder">
<p>第 {{ currentStep + 1 }} 步内容待配置</p>
@ -156,13 +150,12 @@
</template>
<script setup>
import { ArrowRight, CircleCheck, Download, Operation, RefreshLeft } from "@element-plus/icons-vue";
import { ArrowRight, CircleCheck, Operation, RefreshLeft } from "@element-plus/icons-vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { checkProductDevelopmentFactorsStepOne, checkProductDevelopmentFactorsStepTwo, checkProductDevelopmentFactorsStepThree, checkProductDevelopmentFactorsStepFour, getStudentTrainingAnswer, saveStudentTrainingAnswer } from "@/api/studentTrainingAnswer";
import useUserStore from "@/store/modules/user";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const { proxy } = getCurrentInstance();
@ -653,21 +646,20 @@ function exportOutcome() {
}
}
/* 仅含操作按钮的头部:右对齐,无分隔线 */
.workbench-head--actions-only {
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
padding-bottom: 0;
border-bottom: 0;
}
.workbench-actions {
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
/* ============================================================
* 操作工具栏横条:内联布局,去掉悬浮和边框
* ============================================================ */
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* 步骤导航(极简文字下划线)的换肤见非 scoped 块 */
@ -918,36 +910,6 @@ function exportOutcome() {
}
}
/* 工作台顶部"导出实训成果"按钮:白底教育蓝描边次按钮 */
.outline-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 7px;
min-height: 36px;
height: 36px;
padding: 0 14px;
border: 1px solid rgba(37, 99, 235, 0.35);
border-radius: 8px;
color: #2563eb;
background: #ffffff;
font-family: inherit;
font-size: 13px;
font-weight: 600;
line-height: 1;
cursor: pointer;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
&:hover {
border-color: #2563eb;
color: #2563eb;
background: #eff6ff;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}
}
/* 案例资料按钮(TrainingMaterialButton 子组件)的换肤见非 scoped 块 */
@media (max-width: 900px) {
/* 窄屏全宽规则的强制覆盖见非 scoped 块(scoped 打不赢全局 !important) */
@ -962,44 +924,6 @@ function exportOutcome() {
<style lang="scss">
/* ===== AI 侧栏样式已收敛进 TrainingAiSidebar 组件(教育蓝极简),此处不再覆盖 ===== */
/* ===== 共用组件换肤:TrainingMaterialButton 资料按钮 → 教育蓝 ===== */
.product-factors .workbench-actions .material-button.el-button {
height: 34px !important;
min-height: 34px !important;
border: 1px solid rgba(37, 99, 235, 0.35) !important;
border-radius: 8px !important;
color: #2563eb !important;
background: #ffffff !important;
font-size: 13px !important;
font-weight: 600 !important;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
&:hover {
border-color: #2563eb !important;
color: #2563eb !important;
background: #eff6ff !important;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
}
/* is-plain:无资料,弱化态 */
&.is-plain {
border-color: #e5e7eb !important;
color: #9ca3af !important;
&:hover {
border-color: #e5e7eb !important;
color: #9ca3af !important;
background: #ffffff !important;
box-shadow: none !important;
}
}
}
.product-factors .workbench-actions .material-button.el-button .material-icon {
color: inherit !important;
font-size: 14px !important;
}
/* ============================================================
* 步骤导航:胶囊分段 + 连接(教育蓝主题)
* 与 new-product-survey.vue 完全一致,覆盖全局 !important 规则
@ -1139,42 +1063,10 @@ function exportOutcome() {
/* ============================================================
* 按钮风格强制同步:
* 全局 student-training.scss 用 !important 把 .workbench-actions /
* .task-actions 按钮锁成浅蓝大胶囊,scoped 规则无法取胜。
* 这里用 id 锚点(特异性含 #app)+ !important 稳定覆盖。
* 全局 student-training.scss 用 !important 把 .task-actions 按钮锁成浅蓝大胶囊,
* scoped 规则无法取胜。这里用 id 锚点(特异性含 #app)+ !important 稳定覆盖。
* ============================================================ */
/* 顶部"导出实训成果"原生按钮:全局 L592 锁为 34px 浅蓝胶囊 */
#app .studentLayout section.app-main:has(.product-factors) .workbench-actions > button.outline-action {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
gap: 6px !important;
width: auto !important;
height: 34px !important;
min-height: 34px !important;
max-height: none !important;
padding: 0 14px !important;
border: 1px solid rgba(37, 99, 235, 0.35) !important;
border-radius: 8px !important;
color: #2563eb !important;
background: #ffffff !important;
box-shadow: none !important;
text-shadow: none !important;
font-size: 13px !important;
font-weight: 600 !important;
line-height: 1 !important;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
}
#app .studentLayout section.app-main:has(.product-factors) .workbench-actions > button.outline-action:hover {
border-color: #2563eb !important;
color: #2563eb !important;
background: #eff6ff !important;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
transform: none !important;
}
/* --- 底部步骤按钮:36px 标准按钮(位置 A) --- */
#app .studentLayout section.app-main:has(.product-factors) .task-actions {
gap: 14px !important;
@ -1239,27 +1131,26 @@ function exportOutcome() {
/* 窄屏:按钮纵向全宽(全局容器 min-width/布局均为 !important,须在此覆盖) */
@media (max-width: 900px) {
#app .studentLayout section.app-main:has(.product-factors) .workbench-head,
#app .studentLayout section.app-main:has(.product-factors) .workbench-actions {
#app .studentLayout section.app-main:has(.product-factors) .task-actions {
flex-direction: column !important;
align-items: stretch !important;
min-width: 0 !important;
width: 100% !important;
}
#app .studentLayout section.app-main:has(.product-factors) .workbench-actions .material-actions {
display: grid !important;
#app .studentLayout section.app-main:has(.product-factors) .task-actions > button {
width: 100% !important;
}
#app .studentLayout section.app-main:has(.product-factors) .workbench-actions > button.outline-action,
#app .studentLayout section.app-main:has(.product-factors) .task-actions > button {
width: 100% !important;
/* task-action-strip 响应式 */
#app .studentLayout section.app-main:has(.product-factors) .task-action-strip {
position: static !important;
}
#app .studentLayout section.app-main:has(.product-factors) .task-actions {
flex-direction: column !important;
align-items: stretch !important;
#app .studentLayout section.app-main:has(.product-factors) .task-action-strip :deep(.training-task-toolbar) {
justify-content: stretch !important;
}
#app .studentLayout section.app-main:has(.product-factors) .task-action-strip :deep(.training-task-toolbar > *) {
flex: 1 1 auto !important;
}
}
</style>

@ -1,6 +1,5 @@
<template>
<template>
<div class="product-process student-training-shell">
<TrainingTaskToolbar />
<main class="process-core">
<section class="task-header">
<div class="task-head-main">
@ -20,21 +19,20 @@
</span>
</div>
</div>
<div class="workbench-head workbench-head--actions-only">
<div class="workbench-actions">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon>导出实训成果</button>
</div>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar
:task-key="TASK_KEY"
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
</section>
<section class="process-workbench">
@ -168,10 +166,6 @@
<label class="reflection-field"><span>场景2:</span><textarea v-model.trim="stepFourForm.aiScenarioTwo" :disabled="!stepThreePassed || checking" placeholder="例如:使用 AI 生成电商详情页文案、主图脚本或运营素材"></textarea></label>
</div>
</section>
<div class="task-actions">
<button type="button" class="btn-nav btn-submit" :disabled="checking || !stepThreePassed" @click="submitTraining">提交任务<el-icon><CircleCheck /></el-icon></button>
<button type="button" class="btn-nav" :disabled="checking" @click="resetStepFour"><el-icon><RefreshLeft /></el-icon>清空本步</button>
</div>
</template>
<div v-else class="step-placeholder"><p>第 {{ currentStep }} 步内容待配置</p><span>第 1 步答案已保存,可从上方步骤栏返回查看。</span></div>
</section>
@ -188,7 +182,7 @@
</template>
<script setup>
import { ArrowRight, CircleCheck, Download, Operation, RefreshLeft, Upload } from "@element-plus/icons-vue";
import { ArrowRight, CircleCheck, Operation, RefreshLeft, Upload } from "@element-plus/icons-vue";
import * as XLSX from "xlsx";
import { checkProductDevelopmentProcessStepOne, checkProductDevelopmentProcessStepTwo, checkProductDevelopmentProcessStepThree, checkProductDevelopmentProcessStepFour, getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile } from "@/api/studentTrainingAnswer";
import { getTrainingTaskByKey } from "@/api/trainingTask";
@ -196,7 +190,6 @@ import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { isExternal } from "@/utils/validate";
import useUserStore from "@/store/modules/user";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const { proxy } = getCurrentInstance();
@ -788,52 +781,22 @@ function exportOutcome() {
}
}
/* 仅含操作按钮的头部:右对齐,无分隔线 */
.workbench-head--actions-only {
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
padding-bottom: 0;
border-bottom: 0;
}
.workbench-actions {
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
}
/* 顶部"导出实训成果"按钮:白底教育蓝描边次按钮 */
.outline-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 7px;
min-height: 36px;
padding: 0 14px;
border: 1px solid rgba(37, 99, 235, 0.35);
border-radius: 8px;
color: #2563eb;
background: #ffffff;
font-family: inherit;
font-size: 13px;
font-weight: 600;
line-height: 1;
cursor: pointer;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
&:hover {
border-color: #2563eb;
color: #2563eb;
background: #eff6ff;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
/* ============================================================
* 操作工具栏横条:内联布局,去掉悬浮和边框
* ============================================================ */
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* 案例资料按钮(TrainingMaterialButton 子组件)的换肤见非 scoped 块 */
/* 步骤导航(极简文字下划线)的换肤见非 scoped 块 */
.step-name {
@ -1527,82 +1490,12 @@ tr.is-incorrect .classification-feedback {
}
}
/* ============================================================
* 共用组件换肤:TrainingMaterialButton 资料按钮 → 教育蓝
* ============================================================ */
.product-process .workbench-actions .material-button.el-button {
height: 34px !important;
min-height: 34px !important;
border: 1px solid rgba(37, 99, 235, 0.35) !important;
border-radius: 8px !important;
color: #2563eb !important;
background: #ffffff !important;
font-size: 13px !important;
font-weight: 600 !important;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
&:hover {
border-color: #2563eb !important;
color: #2563eb !important;
background: #eff6ff !important;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
}
&.is-plain {
border-color: #e5e7eb !important;
color: #9ca3af !important;
&:hover {
border-color: #e5e7eb !important;
color: #9ca3af !important;
background: #ffffff !important;
box-shadow: none !important;
}
}
}
.product-process .workbench-actions .material-button.el-button .material-icon {
color: inherit !important;
font-size: 14px !important;
}
/* ============================================================
* 按钮风格强制同步:教育蓝
* 全局 student-training.scss 用 !important 把 .workbench-actions /
* .task-actions 按钮锁成浅蓝大胶囊,scoped 规则无法取胜。
* 这里用 id 锚点(特异性含 #app)+ !important 稳定覆盖。
* 全局 student-training.scss 用 !important 把 .task-actions 按钮锁成浅蓝大胶囊,
* scoped 规则无法取胜。这里用 id 锚点(特异性含 #app)+ !important 稳定覆盖。
* ============================================================ */
/* 顶部"导出实训成果"原生按钮 */
#app .studentLayout section.app-main:has(.product-process) .workbench-actions > button.outline-action {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
gap: 6px !important;
width: auto !important;
height: 34px !important;
min-height: 34px !important;
max-height: none !important;
padding: 0 14px !important;
border: 1px solid rgba(37, 99, 235, 0.35) !important;
border-radius: 8px !important;
color: #2563eb !important;
background: #ffffff !important;
box-shadow: none !important;
text-shadow: none !important;
font-size: 13px !important;
font-weight: 600 !important;
line-height: 1 !important;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
}
#app .studentLayout section.app-main:has(.product-process) .workbench-actions > button.outline-action:hover {
border-color: #2563eb !important;
color: #2563eb !important;
background: #eff6ff !important;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
transform: none !important;
}
/* Step 02 标题行"导出列表":36px 紧凑小号 */
#app .studentLayout section.app-main:has(.product-process) .step-title-actions button.outline-action {
display: inline-flex !important;
@ -1701,20 +1594,6 @@ tr.is-incorrect .classification-feedback {
/* 窄屏:按钮纵向全宽(全局容器 min-width/布局均为 !important,须在此覆盖) */
@media (max-width: 900px) {
#app .studentLayout section.app-main:has(.product-process) .workbench-head,
#app .studentLayout section.app-main:has(.product-process) .workbench-actions {
flex-direction: column !important;
align-items: stretch !important;
min-width: 0 !important;
width: 100% !important;
}
#app .studentLayout section.app-main:has(.product-process) .workbench-actions .material-actions {
display: grid !important;
width: 100% !important;
}
#app .studentLayout section.app-main:has(.product-process) .workbench-actions > button.outline-action,
#app .studentLayout section.app-main:has(.product-process) .step-title-actions button.outline-action,
#app .studentLayout section.app-main:has(.product-process) .task-actions > button {
width: 100% !important;
@ -1724,5 +1603,18 @@ tr.is-incorrect .classification-feedback {
flex-direction: column !important;
align-items: stretch !important;
}
/* task-action-strip 响应式 */
#app .studentLayout section.app-main:has(.product-process) .task-action-strip {
position: static !important;
}
#app .studentLayout section.app-main:has(.product-process) .task-action-strip :deep(.training-task-toolbar) {
justify-content: stretch !important;
}
#app .studentLayout section.app-main:has(.product-process) .task-action-strip :deep(.training-task-toolbar > *) {
flex: 1 1 auto !important;
}
}
</style>

@ -1,6 +1,5 @@
<template>
<div class="after-sales-page student-training-shell">
<TrainingTaskToolbar />
<main class="after-sales-core">
<section class="task-header">
<div class="task-head-main">
@ -18,19 +17,10 @@
</span>
</p>
</div>
<div class="after-sales-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon>导出实训成果</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="validateAndSaveStepThree" :on-export="exportOutcome" />
</section>
<section class="after-sales-workbench">
@ -226,7 +216,6 @@
<p v-if="stepThreeResult" class="result-message" :class="{ success: stepThreeResult.valid }">{{ stepThreeResult.message }}</p>
<div class="task-actions">
<button type="button" class="btn-nav" :disabled="savingStepThree" @click="switchStep(2)"><el-icon><ArrowLeft /></el-icon>返回第 2 步</button>
<button type="button" class="btn-nav btn-submit" :disabled="savingStepThree" @click="validateAndSaveStepThree">{{ savingStepThree ? '提交中…' : '校验并提交任务' }}<el-icon><ArrowRight /></el-icon></button>
</div>
</section>
@ -250,14 +239,13 @@
<script setup>
import { computed, getCurrentInstance, onMounted, ref } from "vue";
import { ArrowLeft, ArrowRight, Download, RefreshLeft, Service } from "@element-plus/icons-vue";
import { ArrowLeft, ArrowRight, RefreshLeft, Service } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { checkAfterSalesServiceStepOne, checkAfterSalesServiceStepTwo, checkAfterSalesServiceStepThree, getStudentTrainingAnswer, saveStudentTrainingAnswer } from "@/api/studentTrainingAnswer";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { getStudentTrainingPage } from "@/views/training/studentTrainingPages";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "after-sales-service";
const { proxy } = getCurrentInstance();
@ -601,14 +589,17 @@ function exportOutcome() { const blob = new Blob([JSON.stringify({ currentStep:
.after-sales-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
flex: 0 0 auto;
justify-content: flex-end;
max-width: 100%;
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* ===== workbench:透明化 ===== */

@ -1,6 +1,5 @@
<template>
<div class="product-positioning-page student-training-shell">
<TrainingTaskToolbar />
<main class="product-positioning-core">
<section class="task-header">
<div class="task-head-main">
@ -20,26 +19,11 @@
</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"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome">
<el-icon><Download /></el-icon>
导出实训成果
</button>
</div>
</div>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-export="exportOutcome" />
</section>
<section class="task-card">
<nav v-if="configuredSteps.length" class="step-indicator" aria-label="产品价值主张及定位步骤">
<template v-for="(step, index) in configuredSteps" :key="`${step}-${index}`">
<button
@ -254,7 +238,6 @@
</div>
<div class="training-actions">
<el-button class="training-action training-action--submit" :loading="saving" @click="submitTask">提交任务</el-button>
<el-button class="training-action training-action--reset" @click="resetTraining">清空填写</el-button>
</div>
</section>
@ -273,12 +256,11 @@
import { computed, getCurrentInstance, onMounted, ref } from "vue";
import { ArrowLeft, ArrowRight, CircleCheck, Download, Operation, UploadFilled } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { checkProductValuePositioningStepOne, checkProductValuePositioningStepTwo, checkProductValuePositioningStepThree, checkProductValuePositioningStepFour, getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile } from "@/api/studentTrainingAnswer";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { isStudentDemo } from "@/utils/studentDemo";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "product-value-positioning";
const VALUE_PROPOSITION_CANVAS_TEMPLATE_URL = "/file/training-materials/product-value-positioning/12.产品价值主张画布模版.pptx";
@ -819,6 +801,19 @@ async function handleValueCanvasUpload(event) {
p { margin: 0; }
}
/* task-action-strip:TrainingTaskToolbar 横条 */
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
/* task-card / step-card 层:透明容器 */
.task-card,
.step-card {

@ -1,6 +1,5 @@
<template>
<div class="hardware-cost-page student-training-shell">
<TrainingTaskToolbar />
<main class="hardware-core">
<section class="task-header">
<div class="task-head-main">
@ -20,22 +19,16 @@
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="saveStepFour" />
</section>
<section class="hardware-workbench">
<div class="workbench-head hardware-workbench-head">
<div>
<p class="section-eyebrow">BOM cost workspace</p>
<h2>智能硬件成本估算</h2>
</div>
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
</div>
<nav class="step-indicator" aria-label="智能硬件成本估算步骤">
@ -328,12 +321,11 @@
import { computed, getCurrentInstance, onMounted, reactive, ref } from "vue";
import { DataAnalysis } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { getStudentTrainingAnswer, saveStudentTrainingAnswer, uploadStudentTrainingFile, validateHardwareCostStepOne, validateHardwareCostStepTwo, validateHardwareCostStepThree, validateHardwareCostStepFour } from "@/api/studentTrainingAnswer";
import { isStudentDemo } from "@/utils/studentDemo";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "hardware-cost";
const HARDWARE_COST_GUIDE_URL = "/file/training-materials/hardware-cost/16.饼图制作操作说明.docx";
@ -1435,6 +1427,19 @@ onMounted(async () => {
.step-chip { display: none; }
.bom-table-wrap .bom-table { min-width: 720px; }
}
/* ===== 操作工具栏横条 ===== */
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
</style>
<style lang="scss">

@ -17,19 +17,9 @@
</span>
</p>
</div>
<div class="opportunity-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button class="btn" type="button" @click="exportOutcome"><el-icon><Download /></el-icon> 导出实训成果</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="saveAndCompleteTraining" />
</section>
<section class="workbench">
@ -83,7 +73,7 @@
<p class="intro">结合前面的数据分析,请说明应该进行开发什么产品,具体原因是什么。</p>
<p v-if="!stepFivePassed" class="warning">请先完成并保存第 5 步的用户需求洞察,再填写本步骤。</p>
<div class="conclusion-field"><label for="market-opportunity-conclusion">开发建议与原因</label><el-input id="market-opportunity-conclusion" v-model.trim="developmentConclusion" type="textarea" :autosize="{ minRows: 4 }" :disabled="!stepFivePassed" placeholder="请结合综合得分、评论痛点与未被满足的需求,说明建议开发的产品及具体原因。" /></div>
<div class="step-actions"><button class="btn primary" type="button" :disabled="saving || !stepFivePassed" @click="saveAndCompleteTraining">保存并完成实训</button><button class="btn" type="button" :disabled="saving || !stepFivePassed" @click="resetStepSix"><el-icon><RefreshLeft /></el-icon> 清空填写</button></div>
<div class="step-actions"><button class="btn" type="button" :disabled="saving || !stepFivePassed" @click="resetStepSix"><el-icon><RefreshLeft /></el-icon> 清空填写</button></div>
</template>
<div v-else class="placeholder"><p>第 {{ currentStep }} 步内容待配置</p><span>已保存的步骤可从上方步骤栏返回查看。</span></div>
</section>
@ -101,7 +91,7 @@ import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { isStudentDemo } from "@/utils/studentDemo";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "market-opportunity-selection";
const SCORE_CALCULATION_GUIDE_URL = "/file/training-materials/market-opportunity-selection/6.综合得分计算操作说明.docx";
@ -273,6 +263,18 @@ function exportOutcome() { const blob = new Blob([JSON.stringify({ taskName: tas
box-shadow: none;
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
/* 任务头:独立卡片 + 左侧教育蓝竖条 */
.task-header {
position: relative;

@ -1,6 +1,5 @@
<template>
<div class="price-page student-training-shell">
<TrainingTaskToolbar />
<main class="price-core">
<section class="task-header">
<div class="task-head-main">
@ -18,21 +17,10 @@
</span>
</p>
</div>
<div class="price-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportPriceOutcome">
<el-icon><Download /></el-icon>导出实训成果
</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="saveStepFive" :on-export="exportPriceOutcome" />
</section>
<section class="price-workbench">
@ -349,11 +337,6 @@
</section>
<p v-if="validationMessage" class="validation-message">{{ validationMessage }}</p>
<div class="step-footer">
<button type="button" class="primary-button" :disabled="saving" @click="saveStepFive">
{{ saving ? labels.finalPricingSaving : labels.finalPricingSave }}
</button>
</div>
</section>
</template>
@ -469,10 +452,9 @@
</template>
<script setup>
import { Download } from "@element-plus/icons-vue";
import { computed, getCurrentInstance, onMounted, reactive, ref } from "vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import {
getStudentTrainingAnswer,
saveStudentTrainingAnswer,
@ -486,7 +468,6 @@ import {
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { isStudentDemo } from "@/utils/studentDemo";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "product-pricing";
const { proxy } = getCurrentInstance();
@ -1685,11 +1666,18 @@ onMounted(async () => {
p { margin: 0; }
}
.price-toolbar {
display: flex;
flex: 0 0 auto;
gap: 8px;
align-items: center;
.task-action-strip {
margin: 0;
padding: 10px 16px;
// 让 TrainingTaskToolbar 内部按钮在横条内右对齐
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* workbench:透明容器,去掉旧 border/bg */
@ -1743,34 +1731,7 @@ onMounted(async () => {
line-height: 1.6;
}
/* ===== 按钮(白底灰边 / outline-action) ===== */
.outline-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 36px;
height: 36px;
padding: 0 14px;
border: 1px solid rgba(31, 41, 55, 0.4);
border-radius: 8px;
color: var(--student-accent);
background: #ffffff;
font: inherit;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease,
transform 0.16s ease, box-shadow 0.16s ease;
&:hover, &:focus-visible {
border-color: var(--student-accent);
background: var(--student-accent-soft);
transform: translateY(-1px);
box-shadow: 0 3px 10px rgba(31, 41, 55, 0.12);
}
}
/* ===== 按钮 ===== */
.primary-button {
display: inline-flex;
align-items: center;
@ -2335,10 +2296,6 @@ onMounted(async () => {
.psm-point-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
.price-toolbar { width: 100%; }
}
</style>
<style lang="scss">
@ -2497,7 +2454,6 @@ onMounted(async () => {
/* ============================================================
* 共用组件换肤:TrainingMaterialButton 资料按钮
* ============================================================ */
.price-page .price-toolbar .material-button.el-button,
.price-page .workbench-actions .material-button.el-button {
height: 34px !important;
min-height: 34px !important;
@ -2535,7 +2491,6 @@ onMounted(async () => {
/* ============================================================
* 顶部导出按钮(outline-action)
* ============================================================ */
.price-page .price-toolbar > button.outline-action,
.price-page .workbench-actions > button.outline-action {
display: inline-flex !important;
align-items: center !important;

@ -1,6 +1,5 @@
<template>
<div class="requirements-doc-page student-training-shell">
<TrainingTaskToolbar />
<main class="requirements-core">
<section class="task-header">
<div class="task-head-main">
@ -18,19 +17,10 @@
</span>
</p>
</div>
<div class="requirements-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon>{{ currentStep === 3 ? '预览产品需求说明书' : '导出实训成果' }}</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-export="exportOutcome" />
</section>
<section class="task-card">
@ -194,7 +184,6 @@
<div class="task-actions">
<button type="button" class="btn-nav" :disabled="!isDocumentReady || saving || submitting || documentUploading" @click="saveStepThree">{{ saving ? '保存中…' : '保存文档' }}</button>
<button type="button" class="btn-nav btn-submit" :disabled="!isDocumentReady || documentUploading" @click="showDocumentPreview = true"><el-icon><View /></el-icon>预览文档</button>
<button type="button" class="btn-nav btn-primary" :disabled="!canSubmitTask || saving || submitting || documentUploading" @click="submitTask">{{ submitting ? '提交中…' : '提交任务' }}</button>
</div>
</section>
@ -228,12 +217,11 @@
import { computed, getCurrentInstance, onMounted, ref } from "vue";
import { ArrowRight, Close, Delete, Document, Download, InfoFilled, RefreshLeft, UploadFilled, View } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { checkRequirementsDocumentStepOne, getStudentTrainingAnswer, previewRequirementsDocumentFile, saveStudentTrainingAnswer, uploadStudentTrainingFile } from "@/api/studentTrainingAnswer";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import { isStudentDemo } from "@/utils/studentDemo";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "requirements-doc";
const { proxy } = getCurrentInstance();
@ -1408,6 +1396,19 @@ function exportOutcome() { if (currentStep.value === 2) { exportStepTwoTable();
.purpose-bank { padding: 14px; }
.example-bar { flex-direction: column; }
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
</style>
<style lang="scss">

@ -1,6 +1,5 @@
<template>
<div class="architecture-page student-training-shell">
<TrainingTaskToolbar />
<main class="architecture-core">
<section class="task-header">
<div class="task-head-main">
@ -18,19 +17,10 @@
</span>
</p>
</div>
<div class="architecture-toolbar">
<TrainingMaterialButton
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
<button type="button" class="outline-action" @click="exportOutcome"><el-icon><Download /></el-icon>导出实训成果</button>
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="checkAndSaveStepFour" :on-export="exportOutcome" />
</section>
<section class="architecture-workbench">
@ -156,7 +146,7 @@
</section>
<section class="architecture-guide"><h4>参考工具及方案</h4><ol><li>下载模板,按应用功能层、算法处理层、驱动感知层、硬件物理层补全逻辑调用关系。</li><li>每张图围绕一个核心功能绘制,使用箭头清晰标注信号流向。</li></ol><button type="button" @click="downloadArchitectureTemplate">下载模板</button></section>
<p v-if="stepFourCheckResult" class="result-message" :class="{ success: stepFourCheckResult.valid }">{{ stepFourCheckResult.message }}</p>
<div class="task-actions"><button type="button" class="btn-nav" :disabled="uploadingArchitectureImage !== null || checking" @click="saveStepFour">保存进度</button><button type="button" class="btn-nav btn-submit" :disabled="uploadingArchitectureImage !== null || checking" @click="checkAndSaveStepFour">{{ checking ? '校验中…' : '校验并完成实训' }}</button></div>
<div class="task-actions"><button type="button" class="btn-nav" :disabled="uploadingArchitectureImage !== null || checking" @click="saveStepFour">保存进度</button></div>
</section>
<section v-else class="architecture-step-card placeholder-card"><p class="section-eyebrow">Step {{ String(currentStep).padStart(2, '0') }}</p><h3>{{ trainingSteps[currentStep - 1] }}</h3></section>
</section>
@ -172,9 +162,8 @@ import { checkProductArchitectureDesignStepOne, checkProductArchitectureDesignSt
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
import { SCENARIO_FIELDS, getCompletedScenarioCount, getRowsForScenarioValidation, getScenarioValidationMessage } from "./productArchitectureScenarioValidation.mjs";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { SCENARIO_FIELDS, getCompletedScenarioCount, getRowsForScenarioValidation, getScenarioValidationMessage } from "./productArchitectureScenarioValidation.mjs";
const { proxy } = getCurrentInstance();
const TASK_KEY = "product-structure";
@ -1262,6 +1251,18 @@ button:disabled {
.task-header { flex-direction: column; align-items: flex-start; }
.architecture-toolbar { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}
.task-action-strip {
margin: 0;
padding: 10px 16px;
}
.task-action-strip :deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
</style>
<style lang="scss">

@ -28,7 +28,8 @@
<el-select v-model="questionQuery.type" placeholder="全部题型" clearable @change="loadQuestions">
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-select v-model="questionQuery.taskKey" placeholder="全部项目" clearable @change="loadQuestions" style="width: 190px">
<!-- 全部项目筛选暂时隐藏 -->
<el-select v-if="false" v-model="questionQuery.taskKey" placeholder="全部项目" clearable @change="loadQuestions" style="width: 190px">
<el-option v-for="item in projectOptions" :key="item.taskKey" :label="`${item.projectName} / ${item.taskName}`" :value="item.taskKey" />
</el-select>
<el-input v-model="questionQuery.keyword" placeholder="搜索题干" clearable :prefix-icon="Search" @keyup.enter="loadQuestions" />
@ -58,7 +59,7 @@
<input ref="importInput" class="import-file-input" type="file" :accept="importAccept" @change="handleImportFile" />
</div>
</section>
<el-table v-loading="loading" :data="questions" class="data-table">
<el-table v-loading="loading" :data="pagedQuestions" class="data-table">
<el-table-column label="题型" min-width="110"><template #default="{ row }"><el-tag :type="typeTone[row.type]">{{ typeName[row.type] }}</el-tag></template></el-table-column>
<el-table-column prop="stem" label="题干" min-width="420" show-overflow-tooltip />
<el-table-column label="题目来源" width="110"><template #default="{ row }"><el-tag :type="row.sourceType === 'PLATFORM' ? 'success' : 'info'">{{ row.sourceType === 'PLATFORM' ? '平台题库' : '教师自建' }}</el-tag></template></el-table-column>
@ -78,6 +79,16 @@
</div>
</template>
</el-table>
<div v-if="questions.length" class="question-pager">
<el-pagination
layout="total, prev, pager, next, sizes, jumper"
:total="questions.length"
v-model:current-page="questionPager.page"
v-model:page-size="questionPager.pageSize"
:page-sizes="[10, 20, 50, 100]"
background
/>
</div>
</el-tab-pane>
</el-tabs>
@ -130,6 +141,12 @@ const typeName = Object.fromEntries(typeOptions.map((item) => [item.value, item.
const typeTone = { SINGLE: "", MULTIPLE: "success", TRUE_FALSE: "warning", SHORT_ANSWER: "info" };
const statusMeta = { DRAFT: { label: "未发布", tone: "info" }, NOT_STARTED: { label: "未开始", tone: "" }, IN_PROGRESS: { label: "进行中", tone: "success" }, ENDED: { label: "已结束", tone: "warning" } };
const questionQuery = reactive({ type: "", taskKey: "", keyword: "" });
// 题库列表使用前端分页:后端一次返回全部,前端按页切片
const questionPager = reactive({ page: 1, pageSize: 10 });
const pagedQuestions = computed(() => {
const start = (questionPager.page - 1) * questionPager.pageSize;
return questions.value.slice(start, start + questionPager.pageSize);
});
const emptyQuestion = () => ({ id: null, taskKey: "", type: "SINGLE", stem: "", options: [{ label: "A", content: "" }, { label: "B", content: "" }, { label: "C", content: "" }, { label: "D", content: "" }], answer: [], analysis: "", attachmentName: "", attachmentUrl: "" });
const questionForm = reactive(emptyQuestion());
const questionRules = { type: [{ required: true, message: "请选择题型" }], stem: [{ required: true, message: "请输入题干" }], answer: [{ required: true, message: "请输入参考答案" }] };
@ -140,7 +157,7 @@ onMounted(() => Promise.all([loadQuestions(), loadExams(), loadProjects()]));
let examsMounted = false; // KeepAlive 缓存页面:再次进入时刷新考试列表(新建/发布后无需手动刷新),首次激活跳过避免与 onMounted 重复请求
onActivated(() => { if (examsMounted) loadExams(); examsMounted = true; });
async function loadProjects() { try { projectOptions.value = (await examApi.getQuestionProjects()).data || []; } catch (e) { projectOptions.value = []; } }
async function loadQuestions() { loading.value = true; try { questions.value = (await examApi.getQuestions(questionQuery)).data || []; } finally { loading.value = false; } }
async function loadQuestions() { loading.value = true; try { questionPager.page = 1; questions.value = (await examApi.getQuestions(questionQuery)).data || []; } finally { loading.value = false; } }
async function loadExams() { loading.value = true; try { exams.value = (await examApi.getTeacherExams({ keyword: examKeyword.value })).data || []; } finally { loading.value = false; } }
function openQuestion(row) { questionReadonly.value = row?.sourceType === 'PLATFORM'; Object.assign(questionForm, row ? JSON.parse(JSON.stringify(row)) : emptyQuestion()); if (!Array.isArray(questionForm.answer) && isChoice.value) questionForm.answer = []; questionDialog.value = true; }
function openAi() { router.push('/exam/ai-generate'); }
@ -234,6 +251,13 @@ function durationBetween(row) { if (!row.startTime || !row.endTime) return 0; re
display: none;
}
/* ===== 题库分页(外观继承自 teacher-light.scss 全局样式,仅控制布局)===== */
.question-pager {
display: flex;
justify-content: flex-end;
margin-top: var(--sp-4);
}
/* ===== 数据表格(纯白 + 灰线)===== */
.data-table {
width: 100%;

@ -308,7 +308,7 @@
<span class="section-number">03</span>
<div class="section-info">
<h4>资料与步骤</h4>
<p>上传案例资料、案例视频、实训指导手册与AI排错指导手册;步骤数量固定,仅可修改步骤名称</p>
<p>上传案例数据、实训指导手册与AI辅助指导手册;步骤数量固定,仅可修改步骤名称</p>
</div>
</div>
<div v-for="slot in materialSlots" :key="slot.key" class="material-row">
@ -327,6 +327,7 @@
</div>
<div class="material-ops">
<el-upload v-if="!isReadonly" action="#" :auto-upload="false" :show-file-list="false"
:accept="slot.accept || undefined"
:on-change="(file) => handleMaterialChange(slot.key, file)">
<el-button type="primary" :loading="uploadingField === slot.key"
class="upload-btn">
@ -426,11 +427,12 @@ const uploadingField = ref("")
const choiceEditorVisible = ref(false)
const bankPickerVisible = ref(false)
// 四类资料槽位:key 对应 taskForm 的 `${key}Name` / `${key}Url` 字段
// accept 为空表示不限制文件类型,否则按逗号分隔的扩展名校验
const materialSlots = [
{ key: "material", label: "案例资料" },
{ key: "trainingData", label: "案例视频" },
{ key: "material", label: "案例数据", accept: ".xls,.xlsx" },
{ key: "trainingData", label: "案例数据", accept: ".xls,.xlsx" },
{ key: "guideManual", label: "实训指导手册" },
{ key: "aiManual", label: "AI排错指导手册" },
{ key: "aiManual", label: "AI辅助指导手册" },
]
const tasks = ref([])
const classList = ref([])
@ -741,6 +743,19 @@ function removeObjective(index) {
async function handleMaterialChange(slotKey, file) {
const rawFile = file?.raw
if (!rawFile) return
const slot = materialSlots.find((item) => item.key === slotKey)
if (slot?.accept) {
const allowedExts = slot.accept
.split(",")
.map((item) => item.trim().toLowerCase())
.filter(Boolean)
const fileName = String(rawFile.name || file?.name || "").toLowerCase()
const isAllowed = allowedExts.some((ext) => fileName.endsWith(ext))
if (!isAllowed) {
proxy?.$modal?.msgError?.(`${slot.label}仅支持 ${allowedExts.join(" / ")} 格式`)
return
}
}
const data = new FormData()
data.append("file", rawFile)
uploadingField.value = slotKey

@ -1,6 +1,5 @@
<template>
<div class="release-channel-page student-training-shell">
<TrainingTaskToolbar />
<main class="release-channel-core">
<section class="task-header">
<div class="task-head-main">
@ -18,17 +17,10 @@
</span>
</p>
</div>
<TrainingMaterialButton
class="release-channel-toolbar"
:material-name="taskConfig?.materialName"
:material-url="taskConfig?.materialUrl"
:training-data-name="taskConfig?.trainingDataName"
:training-data-url="taskConfig?.trainingDataUrl"
:guide-manual-name="taskConfig?.guideManualName"
:guide-manual-url="taskConfig?.guideManualUrl"
:ai-manual-name="taskConfig?.aiManualName"
:ai-manual-url="taskConfig?.aiManualUrl"
/>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportOutcome" />
</section>
<section class="task-card">
@ -181,7 +173,6 @@
<footer class="footer-actions">
<el-button @click="activeStep = 3">上一步</el-button>
<el-button :loading="saving" @click="saveRankingStep">保存当前进度</el-button>
<el-button type="primary" :loading="validating" @click="validateRankingStep">提交任务</el-button>
</footer>
</section>
</section>
@ -195,11 +186,10 @@ import { computed, onMounted, ref } from "vue";
import { ArrowRight, Document, Download, Minus, 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 TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { getStudentTrainingAnswer, saveStudentTrainingAnswer, validateReleaseChannelEvaluationStepOne, validateReleaseChannelEvaluationStepTwo, validateReleaseChannelEvaluationStepThree, validateReleaseChannelEvaluationStepFour } from "@/api/studentTrainingAnswer";
import { deleteStudentTrainingAnswer, getStudentTrainingAnswer, saveStudentTrainingAnswer, validateReleaseChannelEvaluationStepOne, validateReleaseChannelEvaluationStepTwo, validateReleaseChannelEvaluationStepThree, validateReleaseChannelEvaluationStepFour } from "@/api/studentTrainingAnswer";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
const TASK_KEY = "release-channel-evaluation";
const RELEASE_CHANNEL_GUIDE_URL = "/file/training-materials/release-channel-evaluation/21.实训操作说明.docx";
@ -262,6 +252,9 @@ function syncRankingRows(savedRows = []) { const savedByChannel = new Map(savedR
function openStepFour() { syncRankingRows(rankingRows.value); activeStep.value = 4; }
async function saveRankingStep() { if (saving.value) return; saving.value = true; try { await saveAnswer(4, { step4Answer: JSON.stringify(rankingPayload()) }); ElMessage.success("当前进度已保存"); } finally { saving.value = false; } }
async function validateRankingStep() { if (validating.value) return; validating.value = true; try { await validateReleaseChannelEvaluationStepFour(rankingPayload()); await saveStudentTrainingAnswer(TASK_KEY, { saveAction: "SUBMIT", currentStep: 4, step4Answer: JSON.stringify(rankingPayload()) }); ElMessage.success("渠道排名校验通过,任务已提交"); } catch (error) { ElMessage.error(error?.message || "请检查渠道排名和核心渠道运营建议"); } finally { validating.value = false; } }
async function submitTask() { return validateRankingStep(); }
async function resetTraining() { if (saving.value || validating.value) return; try { await deleteStudentTrainingAnswer(TASK_KEY); weightRows.value = defaultWeightRows(); channelRows.value = defaultChannelRows(); scoreRows.value = []; rankingRows.value = []; coreChannelAnalysis.value = ""; activeStep.value = 1; ElMessage.success("已清空全部实训步骤,可以重新开始"); } catch (error) { ElMessage.error("重新实训失败,请稍后重试"); } }
function exportOutcome() { ElMessage.info("导出功能正在开发中"); }
function downloadPracticeGuide() {
downloadBuiltInFile(RELEASE_CHANNEL_GUIDE_URL, "21.实训操作说明.docx");
}
@ -393,16 +386,18 @@ onMounted(async () => { try { const result = await getTrainingTaskByKey(TASK_KEY
}
/* ===== 工具栏:一行不换行 ===== */
.task-header :deep(.material-actions) {
flex: 0 0 auto;
display: flex;
flex-wrap: nowrap;
gap: 6px;
}
.task-header :deep(.material-button) {
flex: 0 0 auto;
white-space: nowrap;
/* ===== 工具栏:TrainingTaskToolbar 按钮右对齐 ===== */
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* ===== task-card:透明容器 ===== */
@ -669,7 +664,10 @@ onMounted(async () => { try { const result = await getTrainingTaskByKey(TASK_KEY
/* ===== 响应式 ===== */
@media (max-width: 720px) {
.task-header { flex-direction: column; align-items: flex-start; }
.task-header :deep(.material-actions) { width: 100%; }
.task-action-strip {
:deep(.training-task-toolbar) { justify-content: stretch; }
:deep(.training-task-toolbar > *) { flex: 1 1 auto; }
}
.workbench-head { flex-direction: column; }
.table-actions,
.footer-actions { align-items: stretch; flex-direction: column; }
@ -821,36 +819,46 @@ onMounted(async () => { try { const result = await getTrainingTaskByKey(TASK_KEY
}
/* ============================================================
* 共用组件换肤:TrainingMaterialButton 资料按钮 → 教育蓝
* 共用组件换肤:TrainingTaskToolbar 工具栏按钮 → 教育蓝
* ============================================================ */
.release-channel-page .task-header .material-button.el-button {
height: 34px !important;
min-height: 34px !important;
border: 1px solid rgba(37, 99, 235, 0.35) !important;
border-radius: 8px !important;
color: #2563eb !important;
background: #ffffff !important;
font-size: 13px !important;
font-weight: 600 !important;
transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
&:hover {
border-color: #2563eb !important;
color: #2563eb !important;
background: #eff6ff !important;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
}
.release-channel-page .task-action-strip .task-toolbar-button.el-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 34px;
height: 34px;
padding: 0 14px;
border: 1px solid rgba(37, 99, 235, 0.35);
border-radius: 8px;
color: #2563eb;
background: #ffffff;
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;
}
&.is-plain {
border-color: #e5e7eb !important;
color: #9ca3af !important;
&:hover {
border-color: #e5e7eb !important;
color: #9ca3af !important;
background: #ffffff !important;
box-shadow: none !important;
}
}
.release-channel-page .task-action-strip .task-toolbar-button:hover,
.release-channel-page .task-action-strip .task-toolbar-button:focus {
border-color: #2563eb;
color: #1d4ed8;
background: #eff6ff;
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}
.release-channel-page .task-action-strip .task-toolbar-button--submit.el-button {
border-color: #2563eb;
color: #ffffff;
background: #2563eb;
box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35), 0 3px 10px rgba(37, 99, 235, 0.22);
}
.release-channel-page .task-action-strip .task-toolbar-button--submit:hover,
.release-channel-page .task-action-strip .task-toolbar-button--submit:focus {
border-color: #1d4ed8;
color: #ffffff;
background: #1d4ed8;
box-shadow: 0 2px 4px rgba(37, 99, 235, 0.4), 0 5px 14px rgba(29, 78, 216, 0.28);
}
/* ===== 表格操作按钮换肤 ===== */

@ -19,16 +19,11 @@
</div>
</section>
<section class="task-card promotion-phase">
<header class="workbench-head">
<div>
<p class="section-eyebrow">STEP {{ String(activeStep).padStart(2, "0") }}</p>
<h2>{{ stepTitle }}</h2>
</div>
<TrainingTaskToolbar class="promotion-toolbar" :task-key="TASK_KEY" />
</header>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportOutcome" />
</section>
<nav class="step-indicator" aria-label="投放效果评估与优化步骤">
<section class="task-workbench"> <nav class="step-indicator" aria-label="投放效果评估与优化步骤">
<button type="button" :class="['step-tab', { active: activeStep === 1, complete: activeStep > 1 }]" :aria-current="activeStep === 1 ? 'step' : undefined" @click="activeStep = 1">
<span class="step-marker">01</span>
<span class="step-copy"><strong class="step-name">预算分配</strong><span class="step-action">{{ activeStep === 1 ? '当前步骤' : '点击切换' }} →</span></span>
@ -189,7 +184,7 @@ import { ElMessage } from "element-plus";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
import { getTrainingTaskByKey } from "@/api/trainingTask";
import { getStudentTrainingAnswer, saveStudentTrainingAnswer, validatePromotionEffectOptimizationStepOne, validatePromotionEffectOptimizationStepTwo, validatePromotionEffectOptimizationStepThree, validatePromotionEffectOptimizationStepFour } from "@/api/studentTrainingAnswer";
import { deleteStudentTrainingAnswer, getStudentTrainingAnswer, saveStudentTrainingAnswer, validatePromotionEffectOptimizationStepOne, validatePromotionEffectOptimizationStepTwo, validatePromotionEffectOptimizationStepThree, validatePromotionEffectOptimizationStepFour } from "@/api/studentTrainingAnswer";
import { parseTrainingArray } from "@/views/training/taskKeyMap";
const TASK_KEY = "promotion-effect-optimization";
@ -281,6 +276,9 @@ async function validatePerformance() { if (validating.value) return; validating.
function restorePerformance(raw) { try { const saved = typeof raw === "string" ? JSON.parse(raw || "{}") : raw || {}; grossMargin.value = saved.grossMargin; breakEvenRoi.value = saved.breakEvenRoi; syncPerformanceRows(Array.isArray(saved.rows) ? saved.rows : []); } catch (error) { grossMargin.value = undefined; breakEvenRoi.value = undefined; syncPerformanceRows(); } }
async function saveEvaluationDraft() { if (saving.value) return; saving.value = true; try { await saveAnswer(4, { step4Answer: JSON.stringify(evaluationPayload()) }); ElMessage.success("当前进度已保存"); } finally { saving.value = false; } }
async function submitEvaluation() { if (validating.value) return; validating.value = true; try { await validatePromotionEffectOptimizationStepFour(evaluationPayload()); await saveStudentTrainingAnswer(TASK_KEY, { saveAction: "SUBMIT", currentStep: 4, step4Answer: JSON.stringify(evaluationPayload()) }); ElMessage.success("投放效果评估与优化任务已提交"); } catch (error) { ElMessage.error(error?.message || "请检查各渠道达标判断、未达标渠道的诊断与优化动作"); } finally { validating.value = false; } }
async function submitTask() { return submitEvaluation(); }
async function resetTraining() { if (saving.value || validating.value) return; try { await deleteStudentTrainingAnswer(TASK_KEY); restoreBudget(); syncStrategyRows(); restorePerformance(); restoreEvaluation(); ElMessage.success("已清空全部实训步骤,可以重新开始"); } catch (error) { ElMessage.error("重新实训失败,请稍后重试"); } }
function exportOutcome() { ElMessage.info("导出功能正在开发中"); }
function restoreEvaluation(raw) { try { const saved = typeof raw === "string" ? JSON.parse(raw || "{}") : raw || {}; optimizationDecision.value = String(saved.optimizationDecision || ""); syncEvaluationRows(Array.isArray(saved.rows) ? saved.rows : []); } catch (error) { optimizationDecision.value = ""; syncEvaluationRows(); } }
function restoreBudget(raw) { try { const saved = typeof raw === "string" ? JSON.parse(raw || "{}") : raw || {}; totalBudget.value = saved.totalBudget; if (Array.isArray(saved.rows) && saved.rows.length) budgetRows.value = saved.rows.slice(0, 5).map((row) => makeRow({ channel: row?.channel || "", channelPositioning: row?.channelPositioning || "", budgetPercentage: row?.budgetPercentage, coldStartBudget: row?.coldStartBudget, growthBudget: row?.growthBudget, stableBudget: row?.stableBudget })); } catch (error) { budgetRows.value = []; } if (!budgetRows.value.length) budgetRows.value = [makeRow()]; }
function readRows(raw) { try { const saved = typeof raw === "string" ? JSON.parse(raw || "{}") : raw || {}; return Array.isArray(saved.rows) ? saved.rows : []; } catch (error) { return []; } }
@ -401,51 +399,27 @@ onMounted(async () => { try { const result = await getTrainingTaskByKey(TASK_KEY
p { margin: 0; }
}
/* task-card 透明化 */
.task-card.promotion-phase {
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
/* task-workbench 透明容器 */
.task-workbench {
display: grid;
gap: 10px;
margin: 0;
}
.workbench-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
padding-bottom: 10px;
border-bottom: 1px solid var(--student-panel-border);
}
.promotion-toolbar {
flex: 0 0 auto;
align-self: center;
justify-content: flex-end;
max-width: 100%;
align-content: start;
}
.section-eyebrow {
/* 操作工具栏横条:内联布局,去掉悬浮和边框 */
.task-action-strip {
margin: 0;
color: var(--student-text-secondary);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.workbench-head h2 {
margin: 4px 0 0;
color: var(--student-text);
font-size: var(--student-fs-h1);
font-weight: 700;
line-height: 1.35;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
/* step-indicator 基础 reset(由非 scoped 块接管完整样式) */
.step-indicator { margin: 0; padding: 0; border: 0; background: transparent; }
.budget-form, .strategy-form, .performance-form, .evaluation-form { padding-top: 4px; }
@ -680,13 +654,19 @@ onMounted(async () => { try { const result = await getTrainingTaskByKey(TASK_KEY
/* ===== 响应式 ===== */
@media (max-width: 900px) {
.task-header { flex-direction: column; align-items: flex-start; }
.promotion-toolbar { width: 100%; justify-content: flex-start; }
.task-action-strip {
:deep(.training-task-toolbar) {
justify-content: stretch;
}
:deep(.training-task-toolbar > *) {
flex: 1 1 auto;
}
}
.promotion-page { padding: 14px; }
.workbench-head, .total-budget-field, .roi-inputs, .table-actions, .footer-actions {
.total-budget-field, .roi-inputs, .table-actions, .footer-actions {
align-items: stretch;
flex-direction: column;
}
.promotion-toolbar { width: 100%; justify-content: flex-start; }
.total-budget-field :deep(.el-input-number),
.roi-inputs :deep(.el-input-number),
.table-actions :deep(.el-button),

@ -23,21 +23,22 @@
</div>
</section>
<section class="task-action-strip">
<TrainingTaskToolbar
class="comprehensive-training-toolbar"
:material-name="page.material?.name"
:material-url="page.material?.url"
:task-key="pageKey"
:on-submit="submitTask"
:on-reset="resetTraining"
:on-export="exportOutcome"
/>
</section>
<section class="task-card">
<div class="workbench-head">
<div>
<p class="workbench-eyebrow">COMPREHENSIVE TRAINING · WORKFLOW</p>
<h2>{{ activeStepName || page.title }}</h2>
</div>
<TrainingTaskToolbar
class="comprehensive-training-toolbar"
:material-name="page.material?.name"
:material-url="page.material?.url"
:task-key="pageKey"
:on-submit="submitTask"
:on-reset="resetTraining"
:on-export="exportOutcome"
/>
<div class="task-card-head">
<p class="workbench-eyebrow">COMPREHENSIVE TRAINING · WORKFLOW</p>
<h2 class="task-card-title">{{ activeStepName || page.title }}</h2>
</div>
<nav
@ -1875,30 +1876,49 @@ function exportOutcome() {
background: transparent;
}
.workbench-head {
/* ============================================================
* 工具栏操作按钮区:task-action-strip
* ============================================================ */
.task-action-strip {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 18px;
justify-content: flex-end;
align-items: center;
gap: 12px;
margin: 0;
padding: 12px 20px;
background: #ffffff;
border: 1px solid #e5e7eb;
border-radius: 12px;
.comprehensive-training-toolbar {
flex: 0 0 auto;
max-width: 100%;
}
}
/* ============================================================
* 任务卡片头部信息
* ============================================================ */
.task-card-head {
margin-bottom: 18px;
padding-bottom: 14px;
border-bottom: 1px solid #e5e7eb;
h2,
h3 {
margin: 4px 0 6px;
color: #1f2937;
font-size: var(--student-fs-h1) !important;
.workbench-eyebrow {
margin: 0 0 6px !important;
color: #6b7280 !important;
font-size: var(--student-fs-caption) !important;
font-weight: 700 !important;
line-height: 1.35 !important;
letter-spacing: 0.12em;
line-height: 1.4 !important;
}
p {
.task-card-title {
margin: 0;
color: #6b7280;
font-size: var(--student-fs-body);
font-weight: 400;
line-height: 1.6;
color: #1f2937;
font-size: var(--student-fs-h1) !important;
font-weight: 700 !important;
line-height: 1.35 !important;
}
}
@ -2586,12 +2606,14 @@ function exportOutcome() {
background: #ffffff;
}
.task-card-head h3,
.workbench-head h3 {
font-size: var(--student-fs-h1) !important;
font-weight: 700 !important;
line-height: 1.35 !important;
}
.task-card-head .section-eyebrow,
.workbench-head .section-eyebrow {
color: #6b7280;
font-size: var(--student-fs-caption);
@ -2734,6 +2756,7 @@ function exportOutcome() {
border-radius: 16px;
}
.task-card-head,
.workbench-head,
.workbench-actions,
.step-title-row {
@ -2746,6 +2769,7 @@ function exportOutcome() {
width: 100%;
}
.task-card-head,
.workbench-head {
flex-direction: column;
}

@ -0,0 +1,321 @@
# 按钮位置统一调整执行文档
## 一、目的
将 \产品影响因素分析\ 和 \产品开发流程\ 实训页面的工具栏按钮(素材按钮 + 导出按钮)从 \workbench-head\ 内移到 \ ask-header\ 同级别的 \ ask-action-strip\ 区域,参考页面 \新产品需求调研\ 的标准布局。
## 二、参考页面结构
\
ew-product-survey.vue\ 的标准布局:
\\\html
<main class=\"xxx-core\">
<section class=\"task-header\"> <!-- 任务头部信息 + 标题 -->
...
</section>
<section class=\"task-action-strip\"> <!-- 工具栏操作按钮区 -->
<TrainingTaskToolbar :task-key=\"TASK_KEY\" :on-export=\"exportOutcome\" />
</section>
<section class=\"xxx-workbench\"> <!-- 工作台内容 + 步骤 -->
...
</section>
</main>
\\\
---
## 七、删除下方步骤中重复的\"提交任务\"按钮
### 问题描述
顶部 \TrainingTaskToolbar\ 组件已包含\"提交任务\"按钮,但 Step 4 步骤下方也出现了相同的按钮,导致按钮重复。
### 调整方案
| 按钮 | 位置 | 操作 |
|------|------|------|
| \"提交任务\" | 顶部 \TrainingTaskToolbar\ | 保留 |
| \"提交任务\" | 步骤下方 | **删除**(重复) |
| \"清空填写\"/\"清空本步\" | 步骤下方 | 保留 |
### 删除前必须检查的事项
> **重要**:删除按钮前,必须确认该按钮绑定的 \submitTraining\ 方法名是否与顶部组件一致,避免误删导致提交功能失效。
#### 检查清单
1. **确认方法名一致性**:
- 检查步骤内按钮绑定的提交方法名(如 \@click=\"submitTraining\"\)
- 对比 \TrainingTaskToolbar\ 组件内部的提交方法名
- **两者方法名必须一致才能安全删除重复按钮**
2. **检查功能绑定**:
- 确认删除后提交功能的调用链路是否完整
- 确保顶部组件的提交方法与当前页面的数据状态关联正确
3. **保留清空功能**:
- \"清空填写\"/\"清空本步\"按钮不调用提交方法,可以保留
### 具体修改
#### \product-development-factors.vue\(第133行附近)
**当前代码:**
\\\html
<div class=\"task-actions\">
<button type=\"button\" class=\"btn-nav btn-submit\" :disabled=\"saving\" @click=\"submitTraining\">
提交任务<el-icon><CircleCheck /></el-icon>
</button>
<button type=\"button\" class=\"btn-nav\" :disabled=\"saving\" @click=\"resetTraining\">
清空填写
</button>
</div>
\\\
**修改为:**
\\\html
<div class=\"task-actions\">
<button type=\"button\" class=\"btn-nav\" :disabled=\"saving\" @click=\"resetTraining\">
清空填写
</button>
</div>
\\\
#### \product-development-process.vue\(第170行附近)
**当前代码:**
\\\html
<div class=\"task-actions\">
<button type=\"button\" class=\"btn-nav btn-submit\" :disabled=\"checking || !stepThreePassed\" @click=\"submitTraining\">
提交任务<el-icon><CircleCheck /></el-icon>
</button>
<button type=\"button\" class=\"btn-nav\" :disabled=\"checking\" @click=\"resetStepFour\">
清空本步
</button>
</div>
\\\
**修改为:**
\\\html
<div class=\"task-actions\">
<button type=\"button\" class=\"btn-nav\" :disabled=\"checking\" @click=\"resetStepFour\">
清空本步
</button>
</div>
\\\
### 调整对照表
| 文件 | 位置 | 操作 | 保留功能 |
|------|------|------|----------|
| \product-development-factors.vue\ | Step 4 下方 task-actions | 删除\"提交任务\"按钮 | \"清空填写\"按钮 |
| \product-development-process.vue\ | Step 4 下方 task-actions | 删除\"提交任务\"按钮 | \"清空本步\"按钮 |
### 执行检查清单
- [ ] 确认步骤内按钮绑定的 \@click=\"submitTraining\"\ 与 \TrainingTaskToolbar\ 组件内的提交方法名一致
- [ ] 确认顶部 \TrainingTaskToolbar\ 的提交功能正常可用
- [ ] 确认删除后\"清空填写\"/\"清空本步\"按钮仍然保留
- [ ] 删除重复的\"提交任务\"按钮代码
- [ ] 测试提交功能是否正常工作
---
## 八、产品发布渠道评估 + 产品问题诊断与迭代 调整
### 8.1 diagnosis.vue(产品问题诊断与迭代)
#### 问题描述
`TrainingTaskToolbar` 组件嵌套在 `task-header` 内,导致工具栏随头部一起有边框和背景,不符合标准布局。
#### 调整方案
将 `TrainingTaskToolbar` 从 `task-header` 内移到 `task-header` 同级的独立 `task-action-strip` 区域。
#### 具体修改
**当前代码(第19-20行):**
```html
<section class="task-header">
...
<TrainingTaskToolbar class="diagnosis-toolbar" :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportTrainingOutcome" />
</section>
```
**修改为:**
```html
<section class="task-header">
...
</section>
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportTrainingOutcome" />
</section>
```
#### CSS 调整
**删除旧的 `.diagnosis-toolbar` 样式,替换为:**
```css
/* 操作工具栏横条:内联布局,去掉悬浮和边框 */
.task-action-strip {
margin: 0;
padding: 10px 16px;
:deep(.training-task-toolbar) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
}
```
**响应式样式更新(720px断点):**
```css
@media (max-width: 720px) {
.task-action-strip {
:deep(.training-task-toolbar) { justify-content: stretch; }
:deep(.training-task-toolbar > *) { flex: 1 1 auto; }
}
}
```
#### 调整对照表
| 文件 | 修改项 | 操作 |
|------|--------|------|
| diagnosis.vue | 模板结构 | 将 TrainingTaskToolbar 从 task-header 内移到 task-action-strip |
| diagnosis.vue | CSS 样式 | 删除 .diagnosis-toolbar,新增 .task-action-strip |
---
### 8.2 promotion.vue(产品发布渠道评估)
#### 问题描述
`TrainingTaskToolbar` 已有独立的 `task-action-strip` 区域,但缺少回调属性,导致点击"提交任务"按钮时无法正确调用页面内的提交方法。
#### 调整方案
添加 `:on-submit`、`on-reset` 和 `:on-export` 回调属性,并实现对应的方法。
#### 具体修改
**1. 导入 deleteStudentTrainingAnswer**
```javascript
import { deleteStudentTrainingAnswer, getStudentTrainingAnswer, saveStudentTrainingAnswer, ... } from "@/api/studentTrainingAnswer";
```
**2. 添加回调方法**
```javascript
async function submitTask() { return submitEvaluation(); }
async function resetTraining() {
if (saving.value || validating.value) return;
try {
await deleteStudentTrainingAnswer(TASK_KEY);
restoreBudget();
syncStrategyRows();
restorePerformance();
restoreEvaluation();
ElMessage.success("已清空全部实训步骤,可以重新开始");
} catch (error) {
ElMessage.error("重新实训失败,请稍后重试");
}
}
function exportOutcome() { ElMessage.info("导出功能正在开发中"); }
```
**3. 更新 TrainingTaskToolbar 模板**
```html
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportOutcome" />
```
#### 调整对照表
| 文件 | 修改项 | 操作 |
|------|--------|------|
| promotion.vue | 导入 | 添加 deleteStudentTrainingAnswer |
| promotion.vue | 方法 | 添加 submitTask、resetTraining、exportOutcome |
| promotion.vue | 模板 | 更新 TrainingTaskToolbar 添加回调属性 |
---
### 8.3 test/index.vue(产品发布渠道评估)
#### 问题描述
该页面原本使用 `TrainingMaterialButton` 组件而非标准的 `TrainingTaskToolbar`,导致缺少"提交任务"、"重新实训"和"导出实训成果"等按钮功能,不符合统一规范。
#### 调整方案
将 `TrainingMaterialButton` 替换为 `TrainingTaskToolbar`,并添加对应的回调方法。
#### 具体修改
**1. 替换导入**
```javascript
// 替换前
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
// 替换后
import TrainingTaskToolbar from "@/views/components/TrainingTaskToolbar.vue";
```
**2. 添加导入**
```javascript
import { deleteStudentTrainingAnswer, ... } from "@/api/studentTrainingAnswer";
```
**3. 添加回调方法**
```javascript
async function submitTask() { return validateRankingStep(); }
async function resetTraining() {
if (saving.value || validating.value) return;
try {
await deleteStudentTrainingAnswer(TASK_KEY);
weightRows.value = defaultWeightRows();
channelRows.value = defaultChannelRows();
scoreRows.value = [];
rankingRows.value = [];
coreChannelAnalysis.value = "";
activeStep.value = 1;
ElMessage.success("已清空全部实训步骤,可以重新开始");
} catch (error) {
ElMessage.error("重新实训失败,请稍后重试");
}
}
function exportOutcome() { ElMessage.info("导出功能正在开发中"); }
```
**4. 更新模板**
```html
<!-- 替换前 -->
<section class="task-action-strip">
<TrainingMaterialButton ... />
</section>
<!-- 替换后 -->
<section class="task-action-strip">
<TrainingTaskToolbar :task-key="TASK_KEY" :on-submit="submitTask" :on-reset="resetTraining" :on-export="exportOutcome" />
</section>
```
**5. CSS 样式更新**
- 移除 `.material-button` 相关样式
- 更新 `.task-action-strip` 为 TrainingTaskToolbar 布局样式
- 添加 `.task-toolbar-button` 和 `.task-toolbar-button--submit` 按钮样式
#### 调整对照表
| 文件 | 修改项 | 操作 |
|------|--------|------|
| test/index.vue | 导入 | 替换 TrainingMaterialButton 为 TrainingTaskToolbar,添加 deleteStudentTrainingAnswer |
| test/index.vue | 方法 | 添加 submitTask、resetTraining、exportOutcome |
| test/index.vue | 模板 | 更新 task-action-strip 使用 TrainingTaskToolbar |
| test/index.vue | CSS | 更新 task-action-strip 和按钮样式 |
Loading…
Cancel
Save