diff --git a/src/api/AI.js b/src/api/AI.js
index 2fa83f9..24895f9 100644
--- a/src/api/AI.js
+++ b/src/api/AI.js
@@ -217,10 +217,13 @@ export function uploadResourceFile(data) {
}
// 学情分析
export function getLearningAnalysis(params) {
- let { stuNeed,stuData}=params
+ const { stuNeed, stuData } = params
return request({
- url: import.meta.env.VITE_APP_AI_API+'learnAnalysis/getStuPersonLearnAnalysis?stuNeed='+stuNeed,
+ url: import.meta.env.VITE_APP_AI_API + 'learnAnalysis/getStuPersonLearnAnalysis',
method: 'POST',
- data:stuData
+ params: { stuNeed },
+ data: stuData,
+ // AI 服务使用独立鉴权,不能携带本系统的登录令牌。
+ headers: { isToken: false }
})
-}
\ No newline at end of file
+}
diff --git a/src/api/studentTrainingAnswer.js b/src/api/studentTrainingAnswer.js
index 218647b..7d19707 100644
--- a/src/api/studentTrainingAnswer.js
+++ b/src/api/studentTrainingAnswer.js
@@ -304,8 +304,8 @@ export function validateReleaseChannelEvaluationStepTwo(payload) {
&& [row.dailySearchVolume, row.supplyDemandRatio, row.averageCpc, row.existingVisitorCount]
.every((value) => Number.isFinite(value) && value >= 0)
&& [row.averageClickRate, row.averageConversionRate].every((value) => Number.isFinite(value) && value >= 0 && value <= 100)
- && Number.isInteger(row.matchingScore) && row.matchingScore >= 1 && row.matchingScore <= 5);
- if (!valid) return Promise.reject(new Error("请完整填写渠道数据;点击率和转化率为0-100%,匹配度为1-5分"));
+ && Number.isInteger(row.matchingScore) && row.matchingScore >= 1 && row.matchingScore <= 100);
+ if (!valid) return Promise.reject(new Error("请完整填写渠道数据;点击率和转化率为0-100%,匹配度为1-100分"));
return Promise.resolve({ code: 200, data: { valid: true, message: "渠道数据校验通过", rowCount: normalizedRows.length } });
}
return request({
@@ -332,6 +332,8 @@ export function validateReleaseChannelEvaluationStepThree(payload) {
];
if (!sourceRows.length || rows.length !== sourceRows.length) throw new Error("请先完成第二步全部渠道数据");
const submitted = new Map(rows.map((row) => [String(row?.channel || "").trim(), row]));
+ const incorrectItems = [];
+ let totalItemCount = 0;
for (const source of sourceRows) {
const channel = String(source?.channel || "").trim();
const row = submitted.get(channel);
@@ -346,12 +348,16 @@ export function validateReleaseChannelEvaluationStepThree(payload) {
const max = Math.max(...values);
const expectedScore = max === min ? 10 : Number((((reverse ? max - value : value - min) * 10) / (max - min)).toFixed(1));
const supplied = dimensions.get(dimension);
- if (!supplied || Number(supplied.weight) !== weight || Number(supplied.score) !== expectedScore) throw new Error(`“${channel}”的“${dimension}”得分或权重不正确`);
+ if (!supplied || Number(supplied.weight) !== weight) throw new Error(`“${channel}”的“${dimension}”权重不完整`);
+ totalItemCount += 1;
+ if (Number(supplied.score) !== expectedScore) incorrectItems.push(`“${channel}”的“${dimension}”得分`);
expectedTotal += expectedScore * weight / 100;
});
- if (Number(row.weightedScore) !== Number(expectedTotal.toFixed(2))) throw new Error(`“${channel}”的加权得分不正确`);
+ totalItemCount += 1;
+ if (Number(row.weightedScore) !== Number(expectedTotal.toFixed(2))) incorrectItems.push(`“${channel}”的加权得分`);
}
- return Promise.resolve({ code: 200, data: { valid: true, message: "归一化得分与加权得分校验通过", rowCount: rows.length } });
+ const calculationCorrect = incorrectItems.length === 0;
+ return Promise.resolve({ code: 200, data: { valid: true, calculationCorrect, totalItemCount, incorrectItemCount: incorrectItems.length, incorrectItems, message: calculationCorrect ? "计算结果已校验正确,可进入下一步" : `已保存并进入下一步。系统发现${incorrectItems.length}项计算结果与参考值不一致,AI助评时将据此扣分。`, rowCount: rows.length } });
} catch (error) {
return Promise.reject(error);
}
@@ -401,12 +407,19 @@ export function validateReleaseChannelEvaluationStepFour(payload) {
export function validateProductDiagnosisIterationStepOne(payload) {
const value = payload || {};
+ const submittedChannels = Array.isArray(value.channels) ? value.channels : null;
const conversionRates = Array.isArray(value.conversionRates) ? value.conversionRates : [];
const anomalyRows = Array.isArray(value.anomalyRows) ? value.anomalyRows : [];
if (isStudentDemo()) {
try {
const nodes = ["曝光-点击", "点击-加购", "加购-下单", "下单-好评", "好评-复购"];
- const channels = ["天猫", "京东", "抖音", "拼多多"];
+ const legacyChannels = [{ id: "tmall", name: "天猫" }, { id: "jd", name: "京东" }, { id: "douyin", name: "抖音" }, { id: "pinduoduo", name: "拼多多" }];
+ const channels = (submittedChannels || legacyChannels).map((channel) => ({ id: String(channel?.id || "").trim(), name: String(channel?.name || "").trim() }));
+ if (!channels.length || channels.some((channel) => !channel.id || !channel.name)
+ || new Set(channels.map((channel) => channel.id)).size !== channels.length
+ || new Set(channels.map((channel) => channel.name)).size !== channels.length) {
+ throw new Error("请至少保留一个渠道,并确保渠道名称不为空且不重复");
+ }
if (conversionRates.length !== nodes.length || new Set(conversionRates.map((row) => String(row?.linkNode || "").trim())).size !== nodes.length) {
throw new Error("请完整填写 5 个链路节点的转化率");
}
@@ -414,19 +427,22 @@ export function validateProductDiagnosisIterationStepOne(payload) {
conversionRates.forEach((row) => {
const node = String(row?.linkNode || "").trim();
if (!nodes.includes(node)) throw new Error("链路节点必须与题目中的 5 个节点一致");
- const values = [row?.tmall, row?.jd, row?.douyin, row?.pinduoduo, row?.industryAverage].map(Number);
+ const channelRates = row?.channelRates || row || {};
+ const rawValues = [...channels.map((channel) => channelRates[channel.id]), row?.industryAverage];
+ if (rawValues.some((item) => item === null || item === "" || typeof item === "undefined")) throw new Error("请填写 0 至 100 之间的转化率");
+ const values = rawValues.map(Number);
if (values.some((item) => !Number.isFinite(item) || item < 0 || item > 100)) throw new Error("请填写 0 至 100 之间的转化率");
- rates.set(node, { ...row, values });
+ rates.set(node, { ...row, channelRates });
});
if (!String(value.funnelChartUrl || "").trim()) throw new Error("请上传节点转化漏斗对比图");
if (anomalyRows.length < 1 || anomalyRows.length > 5) throw new Error("异常节点分析最少填写 1 行,最多填写 5 行");
anomalyRows.forEach((row, index) => {
- const channel = String(row?.channel || "").trim();
+ const channel = channels.find((item) => item.id === String(row?.channelId || "").trim()) || channels.find((item) => item.name === String(row?.channel || "").trim());
const node = String(row?.linkNode || "").trim();
const source = rates.get(node);
- if (!channels.includes(channel)) throw new Error(`第 ${index + 1} 行渠道必须来源于第一个表格`);
+ if (!channel) throw new Error(`第 ${index + 1} 行渠道必须来源于第一个表格`);
if (!source) throw new Error(`第 ${index + 1} 行链路节点必须来源于第一个表格`);
- const sourceRate = source[{ 天猫: "tmall", 京东: "jd", 抖音: "douyin", 拼多多: "pinduoduo" }[channel]];
+ const sourceRate = source.channelRates[channel.id];
if (Number(row?.storeConversionRate) !== Number(sourceRate) || Number(row?.industryAverageConversionRate) !== Number(source.industryAverage)) {
throw new Error(`第 ${index + 1} 行的店铺和行业转化率必须与第一个表格对应数据一致`);
}
@@ -438,8 +454,9 @@ export function validateProductDiagnosisIterationStepOne(payload) {
return request({
url: "/api/student-training-answers/product-diagnosis-iteration/step-1/validate",
method: "post",
- data: { conversionRates, funnelChartUrl: value.funnelChartUrl, anomalyRows },
+ data: { channels: submittedChannels, conversionRates, funnelChartUrl: value.funnelChartUrl, anomalyRows },
headers: { repeatSubmit: false },
+ skipErrorMessage: true,
});
}
@@ -479,11 +496,11 @@ export function validateProductDiagnosisIterationStepTwo(payload) {
if (sentiments.length !== 3) throw new Error("请填写正面、中性、负面三类情感数据");
const total = sentiments.reduce((sum, item) => sum + Number(item?.count), 0);
if (!Number.isFinite(total) || total <= 0) throw new Error("情感评论数量合计必须大于 0");
- sentiments.forEach((item) => { const expected = Number((Number(item?.count) * 100 / total).toFixed(2)); if (!Number.isFinite(Number(item?.count)) || Number(item?.count) < 0 || Number(item?.percentage) !== expected) throw new Error(`${item?.type || "情感"}评论占比计算不正确`); });
+ sentiments.forEach((item) => { const expected = Number((Number(item?.count) * 100 / total).toFixed(2)); if (!Number.isFinite(Number(item?.count)) || Number(item?.count) < 0 || Number(item?.percentage) !== expected) throw new Error("正面、中性、负面评论占比之和应为100%。"); });
return Promise.resolve({ code: 200, data: { valid: true, message: "情感评论占比计算校验通过" } });
} catch (error) { return Promise.reject(error); }
}
- return request({ url: "/api/student-training-answers/product-diagnosis-iteration/step-2/validate", method: "post", data: value, headers: { repeatSubmit: false } });
+ return request({ url: "/api/student-training-answers/product-diagnosis-iteration/step-2/validate", method: "post", data: value, headers: { repeatSubmit: false }, skipErrorMessage: true });
}
export function validateProductDiagnosisIterationStepThree(payload) {
@@ -499,7 +516,7 @@ export function validateProductDiagnosisIterationStepThree(payload) {
return Promise.resolve({ code: 200, data: { valid: true, message: "AB 测试方案、数据与对比图校验通过" } });
} catch (error) { return Promise.reject(error); }
}
- return request({ url: "/api/student-training-answers/product-diagnosis-iteration/step-3/validate", method: "post", data: value, headers: { repeatSubmit: false } });
+ return request({ url: "/api/student-training-answers/product-diagnosis-iteration/step-3/validate", method: "post", data: value, headers: { repeatSubmit: false }, skipErrorMessage: true });
}
export function validatePromotionEffectOptimizationStepOne(payload) {
diff --git a/src/api/teacher.js b/src/api/teacher.js
index ecf201c..5e910cc 100644
--- a/src/api/teacher.js
+++ b/src/api/teacher.js
@@ -225,6 +225,13 @@ export function getScoreStatisticsTrend(query) {
params: query,
});
}
+// 教师首页 - 可查看班级列表(教师管理员为本校全部教学班)
+export function getTeacherHomeClasses() {
+ return request({
+ url: "/api/score/getTeaHomeClasses",
+ method: "get",
+ });
+}
// 获取班级列表
export function getClasses(query) {
return request({
@@ -431,6 +438,14 @@ export function updateTeacher(data) {
},
});
}
+// 教师管理-初始化教师密码
+export function initializeTeacherPassword(params) {
+ return request({
+ url: "/api/user/updateTeacherPassword",
+ method: "POST",
+ params,
+ });
+}
// 教师管理-删除
export function deleteTeacher(params) {
return request({
@@ -627,6 +642,12 @@ export function getOwnedTeachingClasses() {
method: "get",
});
}
+export function getAccessibleTeachingClasses() {
+ return request({
+ url: "/api/weight/accessibleTeachingClasses",
+ method: "get",
+ });
+}
export function getTeachingClassWeight(teachingClassId) {
return request({
url: "/api/weight/selectTeachingClassWeight",
@@ -685,6 +706,14 @@ export function getScoreDetail(params) {
params,
});
}
+// 保存教师对单个实训任务的评分
+export function saveTaskTeacherScore(params) {
+ return request({
+ url: "/api/weight/saveTaskTeacherScore",
+ method: "POST",
+ params,
+ });
+}
// 更新成绩
export function doRankOne(params) {
return request({
diff --git a/src/router/index.js b/src/router/index.js
index 2871e53..ad586f5 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -164,7 +164,7 @@ export const dynamicRoutes = [
path: "index",
component: () => import("@/views/training/GenericTrainingPage.vue"),
name: "ComprehensiveCaseTraining",
- meta: { title: "综合实训", icon: "Finished", affix: true, pageKey: "comprehensive-case-training" },
+ meta: { title: "综合实训", icon: "Finished", affix: true, pageKey: "comprehensive-case-training", hideSupplementSteps: true },
},
],
},
diff --git a/src/views/analysis-of-students/analysis.vue b/src/views/analysis-of-students/analysis.vue
index 740d3f2..174562b 100644
--- a/src/views/analysis-of-students/analysis.vue
+++ b/src/views/analysis-of-students/analysis.vue
@@ -12,7 +12,8 @@
此处为AI根据学情数据进行的智能分析,从个人成绩和实训时长角度给出分析结果,仅供参考
-
+
+
{{ chid.name }}
@@ -57,39 +58,62 @@ const dialogue = ref([
},
]);
const scoreList = ref([]);
-const getScoreList = () => {
- if (roleId.value == 4) {
- indexApi.getStuModuleDetail({ userId: userStore.userInfo.userId }).then((res) => {
- scoreList.value = res.data;
- proxy.$cache.session.setJSON("scoreList", scoreList.value);
- });
- } else {
- scoreApi
- .getScoreList({
+const scoreLoaded = ref(false);
+const hasScoreData = ref(false);
+const hasTeacherScoreData = (row) => {
+ return Number(row.completedTaskCount || 0) > 0 || moduleMap.some(({ key }) => row[`${key}Score`] !== null && row[`${key}Score`] !== undefined);
+};
+const getScoreList = async () => {
+ scoreLoaded.value = false;
+ scoreList.value = [];
+ hasScoreData.value = false;
+ proxy.$cache.session.remove("scoreList");
+ try {
+ if (roleId.value == 4) {
+ const res = await indexApi.getStuModuleDetail({ userId: userStore.userInfo.userId });
+ scoreList.value = Array.isArray(res?.data) ? res.data : [];
+ hasScoreData.value = scoreList.value.length > 0;
+ } else {
+ const res = await scoreApi.getScoreList({
index: 1,
size: 1000,
schoolId: userStore.userInfo.schoolId,
- })
- .then((res) => {
- const transformedData = res.data.list.map((item) => ({
- name: item.name,
- className: item.className,
- schoolId: item.schoolId,
- scores: moduleMap.map(({ key, name }) => ({
- moduleName: name,
- score: item[`${key}Score`] || 0,
- // 总成绩
- totalScore: item.score || 0,
- // 总排名
- totalRank: item.stuRank || null,
- })),
- }));
- proxy.$cache.session.setJSON("scoreList", transformedData);
});
+ const rows = Array.isArray(res?.data?.list) ? res.data.list : [];
+ hasScoreData.value = rows.some(hasTeacherScoreData);
+ scoreList.value = rows.map((item) => ({
+ name: item.name,
+ className: item.className,
+ schoolId: item.schoolId,
+ scores: moduleMap.map(({ key, name }) => ({
+ moduleName: name,
+ score: item[`${key}Score`] || 0,
+ // 总成绩
+ totalScore: item.score || 0,
+ // 总排名
+ totalRank: item.stuRank || null,
+ })),
+ }));
+ }
+ if (hasScoreData.value) {
+ proxy.$cache.session.setJSON("scoreList", scoreList.value);
+ } else {
+ proxy.$message.warning("暂无成绩数据,暂时无法进行AI学情分析");
+ }
+ } catch (error) {
+ proxy.$message.error("成绩数据加载失败,请稍后重试");
+ } finally {
+ scoreLoaded.value = true;
}
};
// 分析
const analysis = (val) => {
+ if (!scoreLoaded.value) {
+ return proxy.$message.warning("成绩数据正在加载,请稍候");
+ }
+ if (!hasScoreData.value) {
+ return proxy.$message.warning("暂无成绩数据,暂时无法进行AI学情分析");
+ }
proxy.$cache.session.setJSON("msg", val.msg);
router.push("/ai/learning-situation-dialogue");
};
@@ -165,6 +189,13 @@ onMounted(() => {
background: linear-gradient(-90deg, #1160ff 0%, #1994ff 100%);
}
}
+ .empty-score {
+ height: 100%;
+ --el-empty-description-margin-top: 16px;
+ :deep(.el-empty__description p) {
+ color: #ffffff;
+ }
+ }
.brief-introduction {
display: flex;
justify-content: center;
@@ -176,4 +207,4 @@ onMounted(() => {
}
}
}
-
\ No newline at end of file
+
diff --git a/src/views/analysis-of-students/dialogue.vue b/src/views/analysis-of-students/dialogue.vue
index 3f42f89..337de72 100644
--- a/src/views/analysis-of-students/dialogue.vue
+++ b/src/views/analysis-of-students/dialogue.vue
@@ -159,16 +159,20 @@ const gInterrupt = () => {
}
};
// 获取分析
-const getAnalysis = () => {
+const getAnalysis = async () => {
loading.value = true;
- AI.getLearningAnalysis({ stuNeed: proxy.$cache.session.getJSON("msg"), stuData: proxy.$cache.session.getJSON("scoreList") }).then((res) => {
+ try {
+ const res = await AI.getLearningAnalysis({ stuNeed: proxy.$cache.session.getJSON("msg"), stuData: proxy.$cache.session.getJSON("scoreList") });
messages.value.push({
id: Date.now(),
role: "assistant",
content: res,
});
+ } catch (error) {
+ proxy.$message.error("AI学情分析暂时不可用,请稍后重试");
+ } finally {
loading.value = false;
- });
+ }
};
// 计算高度的函数
const updateHeight = () => {
@@ -425,4 +429,4 @@ onUnmounted(() => {
.el-scrollbar {
--el-scrollbar-bg-color: transparent !important;
}
-
\ No newline at end of file
+
diff --git a/src/views/analysis-of-students/lessonPlanPrompt.cjs b/src/views/analysis-of-students/lessonPlanPrompt.cjs
deleted file mode 100644
index 9a42701..0000000
--- a/src/views/analysis-of-students/lessonPlanPrompt.cjs
+++ /dev/null
@@ -1,21 +0,0 @@
-const LESSON_PLAN_MODULES = [
- "互联网产品开发基础认知",
- "市场洞察与需求分析",
- "产品规划与设计",
- "产品开发与测试验证",
- "产品上线与运营推广",
- "综合实训",
-];
-
-function buildTeachingPlanPrompt(moduleName) {
- return `请为“互联网产品开发实训课程”的“${moduleName}”模块生成一份实训教案。
-请按以下结构输出:
-1. 教学目标
-2. 实训任务
-3. 实施步骤
-4. 预期成果
-5. 评价要点
-内容应贴合互联网产品开发的真实业务场景,并给出可直接用于课堂组织的说明。`;
-}
-
-module.exports = { LESSON_PLAN_MODULES, buildTeachingPlanPrompt };
diff --git a/src/views/analysis-of-students/lessonPlanPrompt.mjs b/src/views/analysis-of-students/lessonPlanPrompt.mjs
new file mode 100644
index 0000000..b8bd904
--- /dev/null
+++ b/src/views/analysis-of-students/lessonPlanPrompt.mjs
@@ -0,0 +1,34 @@
+const LESSON_PLAN_MODULES = [
+ "互联网产品开发基础认知",
+ "市场洞察与需求分析",
+ "产品规划与设计",
+ "产品开发与测试验证",
+ "产品上线与运营推广",
+ "综合实训",
+];
+
+function buildTeachingPlanPrompt(moduleName) {
+ return `请为“互联网产品开发实训课程”的“${moduleName}”模块生成一份实训教案。
+请按以下结构输出:
+1. 教学目标
+2. 实训任务
+3. 实施步骤
+4. 预期成果
+5. 评价要点
+内容应贴合互联网产品开发的真实业务场景,并给出可直接用于课堂组织的说明。`;
+}
+
+function buildTeachingPlanRequest(moduleName, prompt, templateName, templateContent) {
+ const normalizedPrompt = String(prompt || buildTeachingPlanPrompt(moduleName)).trim();
+ const normalizedTemplate = String(templateContent || "").trim();
+ if (!normalizedTemplate) return normalizedPrompt;
+ return `${normalizedPrompt}
+
+以下为学校参考模板“${String(templateName || "未命名模板").trim()}”的正文内容。请优先遵循模板中的章节结构、字段和校内要求,不要遗漏必填项;模板中的示例内容仅作格式参考:
+
+--- 参考模板开始 ---
+${normalizedTemplate}
+--- 参考模板结束 ---`;
+}
+
+export { LESSON_PLAN_MODULES, buildTeachingPlanPrompt, buildTeachingPlanRequest };
diff --git a/src/views/analysis-of-students/training-lesson-plan.vue b/src/views/analysis-of-students/training-lesson-plan.vue
index b7a849f..256dbf9 100644
--- a/src/views/analysis-of-students/training-lesson-plan.vue
+++ b/src/views/analysis-of-students/training-lesson-plan.vue
@@ -1,106 +1,773 @@
-
-
-
-
此处为AI根据实训模块内容智能生成的实训教案,仅供参考
-
-
+
+ - 01选择模块
+ - 02配置要求
+ - 03确认生成
+
+
+
+
+
+
+ 实训课程模块
+
从一个模块开始备课
+
+
AI 生成内容仅供参考,请老师结合实际授课安排审核调整。
+
+
+
+
+
+
+
+
+
+
+
{{ selectedModuleNumber }}
+
+ 生成前配置
+
{{ selectedModule }}
+
+
+
+
+
+
+
+
+
参考提示词
+
可按学校课程标准、课时安排和评价方式直接修改。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/assessment/diagnosis.vue b/src/views/assessment/diagnosis.vue
index 40149e4..6001883 100644
--- a/src/views/assessment/diagnosis.vue
+++ b/src/views/assessment/diagnosis.vue
@@ -14,22 +14,56 @@
2.下载Excel模版,填写关键信息,自动计算各环节转化率。提供自动化模版。
3.导出数据表上传到通用AI大模型,通过AI大模型辅助完成计算,参考步骤及提示词如下:请根据表格数据,计算从曝光到复购链路节点转化率。
- 一计算各节点转化率
根据案例数据计算各个渠道链路节点转化率,参考方法及工具如下:
| 链路节点 | 天猫 | 京东 | 抖音 | 拼多多 | 行业均值 |
|---|
| {{ row.linkNode }} | % |
|---|
+
+ 一计算各节点转化率
根据案例数据计算各个渠道链路节点转化率,参考方法及工具如下:
+
+ 链路节点和行业均值固定,中间渠道可按案例数据增加或删除。
+
+
+
+
+
+
+ | 链路节点 |
+
+
+
+
+
+ |
+ 行业均值 |
+
+
+
+
+ | {{ row.linkNode }} |
+
+
+
+ %
+
+ |
+ % |
+
+
+
+
+
二全链路转化漏斗可视化
根据节点转化率计算结果,绘制各渠道转化率与行业均值的转化漏斗对比图,可视化呈现多环节情况,参考方法及工具如下:
1.使用Excel绘图功能,自主完成转化漏斗对比图,可参考《实训操作说明》。 2.下载Excel模版,填写关键信息,自动计算各环节转化率并生成转化漏斗对比图。 3.导出数据表上传到通用AI大模型,通过AI大模型辅助完成,参考步骤及提示词如下:请根据表格数据绘制漏斗图,并与行业均值漏斗图进行对比。
{{ funnelChart.name || '节点转化漏斗对比图' }}点击缩略图可放大预览
支持 PNG、JPG、WEBP 格式,图片不超过 5MB;上传后可点击预览。
- | 渠道 | 链路节点 | 店铺转化率 | 行业均值转化率 | 异常分析与判定 |
|---|
| | % | % | |
说明:这个表格默认展示一行可填写,最少一行,可以增加行,最多5行,这里填写的渠道需要来源于第一个表的渠道。
+ | 渠道 | 链路节点 | 店铺转化率 | 行业均值转化率 | 异常分析与判定 |
|---|
| | % | % | |
说明:这个表格默认展示一行可填写,最少一行,可以增加行,最多5行,这里填写的渠道需要来源于第一个表的渠道。
漏斗只能定位“哪个环节出了问题”,要回答为什么出问题,需要分析用户最真实的反馈。本步骤通过词云分析和情感倾向分析,从用户评价中提取高频问题,判断整体口碑倾向,验证漏斗异常背后的真实根因。
一词云分析
导入数据,生成词云,基于案例评论数据自动生成高频问题词云。
请根据词云图填写词云中出现频次最高的TOP3问题。
- 点击情感倾向分析后,系统会自动计算正面、中性、负面评论数量及占比,并按校验所需精度保留两位小数。
| 情感类型 | 评论数量(条) | 占比 |
|---|
| {{ row.type }} | {{ row.count ?? '—' }} | % |
|---|
+ 点击情感倾向分析后,系统会自动计算正面、中性、负面评论数量及占比,并按校验所需精度保留两位小数。
| 情感类型 | 评论数量(条) | 占比 |
|---|
| {{ row.type }} | {{ row.count ?? '—' }} | % |
|---|
请结合词云TOP3与情感分析结果,说明本案例的核心问题根本原因;说明高频问题与情感数据是如何验证步骤一漏斗异常结论的
找到根因后,还需验证“改进方案是否真的有效”,避免拍脑袋迭代。AB测试对照诊断法将用户随机分为对照组(维持原方案)和实验组(应用改进方案),对比两组的关键指标差异,用数据判断改进方案是否值得落地。
(1)确定测试方案
请基于案例资料,针对步骤一和步骤二分析结果,设计AB测试方案
- (2)AB测试数据填报
请从案例资料中获取AB测试两组数据,计算后填入下表并逐项判定:
| 测试指标 | 对照组数据 | 实验组数据 | 判定与分析 |
|---|
| {{ row.metric }} | % | % | |
|---|
+ (2)AB测试数据填报
请从案例资料中获取AB测试两组数据,计算后填入下表并逐项判定:
| 测试指标 | 对照组数据 | 实验组数据 | 判定与分析 |
|---|
| {{ row.metric }} | % | % | |
|---|
(3)可视化呈现
绘制AB测试结果对比图,参考方法及工具如下:
{{ abChart.name || 'AB 测试结果对比图' }}点击缩略图可放大预览
支持 PNG、JPG、WEBP 格式,图片不超过 5MB;上传后可点击预览。
- 1.使用Excel/WPS绘图功能,自主完成AB测试结果对比图,参考《实训操作说明》。
- 2.下载Excel模版,填写关键信息,自动计算AB测试数据,并生成测试结果对比图。
- 3.导出数据表上传到通用AI大模型,通过AI大模型辅助完成,参考步骤及提示词如下:请根据表格数据,进行对照组和实验组数据对比,采用组合柱状图生成可视化图形。
(4)诊断结论与迭代优化建议
结合全链路数据漏斗诊断、售后评论分析法及AB测试对照诊断,分析产品存在的问题,并提出具体的迭代优化建议。
@@ -65,14 +99,84 @@ function downloadFunnelGuide() { downloadBuiltInFile(FUNNEL_GUIDE_URL); }
function downloadFunnelTemplate() { downloadBuiltInFile(FUNNEL_TEMPLATE_URL); }
function downloadAbGuide() { downloadBuiltInFile(AB_TEST_GUIDE_URL); }
function downloadAbTemplate() { downloadBuiltInFile(AB_TEST_TEMPLATE_URL); }
-const TASK_KEY = "product-diagnosis-iteration"; const nodes = ["曝光-点击", "点击-加购", "加购-下单", "下单-好评", "好评-复购"]; const channels = [{ key: "tmall", label: "天猫" }, { key: "jd", label: "京东" }, { key: "douyin", label: "抖音" }, { key: "pinduoduo", label: "拼多多" }]; const rateFields = [...channels.map((item) => item.key), "industryAverage"];
+const TASK_KEY = "product-diagnosis-iteration";
+const nodes = ["曝光-点击", "点击-加购", "加购-下单", "下单-好评", "好评-复购"];
+const defaultChannels = [{ id: "tmall", name: "天猫" }, { id: "jd", name: "京东" }, { id: "douyin", name: "抖音" }, { id: "pinduoduo", name: "拼多多" }];
+let channelSerial = 0;
const { proxy } = getCurrentInstance(); const taskConfig = ref(null); const currentStep = ref(1); const saving = ref(false); const uploading = ref(false); const analyzing = ref(false); const chartInput = ref(null); const commentInput = ref(null); const abChartInput = ref(null); const wordCloudRef = ref(null); let wordCloudChart = null;
+const channels = ref(createDefaultChannels());
const conversionRates = ref(createConversionRates()); const anomalyRows = ref([createAnomalyRow()]); const funnelChart = ref({ url: "", name: "" }); const analysisResult = ref(null); const commentPreview = ref({ fileName: "", totalComments: 0, comments: [] }); const wordCloud = ref([]); const topIssues = ref(["", "", ""]); const sentiments = ref(createSentiments()); const rootCauseAnalysis = ref(""); const abTestPlan = ref(""); const abRows = ref(createAbRows()); const abChart = ref({ url: "", name: "" }); const iterationRecommendation = ref("");
const taskTitle = computed(() => taskConfig.value?.taskName || "产品问题诊断与迭代"); const taskBackground = computed(() => taskConfig.value?.background || "从曝光到复购的完整数据漏斗与用户评价出发,定位异常流失并形成迭代方向。"); const taskRequirement = computed(() => taskConfig.value?.requirements || "完成转化漏斗诊断、用户评论词云和情感根因分析。"); const taskGoals = computed(() => parseTrainingArray(taskConfig.value?.objectives, ["掌握全链路转化率计算方法", "能够将店铺数据与行业均值进行对比", "从用户评价中定位问题根因"]));
-const progressItems = computed(() => currentStep.value === 1 ? [{ text: "填写五个节点的渠道转化率", status: conversionRates.value.every((row) => rateFields.every((field) => row[field] !== null && row[field] !== "" && Number.isFinite(Number(row[field])))) ? "done" : "doing" }, { text: "上传节点转化漏斗对比图", status: funnelChart.value.url ? "done" : "" }, { text: "完成异常节点分析", status: anomalyRows.value.every((row) => row.anomalyAnalysis?.trim()) ? "done" : "" }] : currentStep.value === 2 ? [{ text: "导入评论数据并生成词云", status: analysisResult.value ? "done" : "doing" }, { text: "完成情感倾向分析", status: sentiments.value.every((row) => row.count !== null) ? "done" : "" }, { text: "填写根因分析", status: rootCauseAnalysis.value.trim() ? "done" : "" }] : [{ text: "设计 AB 测试方案", status: abTestPlan.value.trim() ? "done" : "doing" }, { text: "填写五项对照数据", status: abRows.value.every((row) => row.controlValue !== null && row.experimentValue !== null && row.analysis?.trim()) ? "done" : "" }, { text: "上传 AB 对比图", status: abChart.value.url ? "done" : "" }, { text: "提交迭代优化建议", status: iterationRecommendation.value.trim() ? "done" : "" }]);
-function createConversionRates() { return nodes.map((linkNode) => ({ linkNode, tmall: null, jd: null, douyin: null, pinduoduo: null, industryAverage: null })); } function createAnomalyRow() { return { channel: "", linkNode: "", storeConversionRate: null, industryAverageConversionRate: null, anomalyAnalysis: "" }; } function createSentiments() { return ["正面", "中性", "负面"].map((type) => ({ type, count: null, percentage: null })); } function createAbRows() { return ["点击-加购转化率", "加购-下单转化率", "下单-好评转化率", "详情页跳出率", "退货率"].map((metric) => ({ metric, controlValue: null, experimentValue: null, analysis: "" })); }
-function buildStepOne() { return { conversionRates: conversionRates.value.map((row) => ({ ...row })), funnelChartUrl: funnelChart.value.url, funnelChartName: funnelChart.value.name, anomalyRows: anomalyRows.value.map((row) => ({ ...row })) }; } function buildStepTwo() { return { sourceFileName: commentPreview.value.fileName, topIssues: [...topIssues.value], sentiments: sentiments.value.map((row) => ({ ...row })), rootCauseAnalysis: rootCauseAnalysis.value, wordCloud: wordCloud.value, previewComments: commentPreview.value.comments }; } function buildStepThree() { return { testPlan: abTestPlan.value, rows: abRows.value.map((row) => ({ ...row })), comparisonChartUrl: abChart.value.url, comparisonChartName: abChart.value.name, iterationRecommendation: iterationRecommendation.value }; }
-function addAnomalyRow() { if (anomalyRows.value.length < 5) anomalyRows.value.push(createAnomalyRow()); } function removeAnomalyRow() { if (anomalyRows.value.length > 1) anomalyRows.value.pop(); } function clearChart() { if (funnelChart.value.url.startsWith("blob:")) URL.revokeObjectURL(funnelChart.value.url); funnelChart.value = { url: "", name: "" }; }
+const availableChannels = computed(() => channels.value.filter((channel) => channel.name.trim()));
+const funnelRatesComplete = computed(() => {
+ const names = availableChannels.value.map((channel) => channel.name.trim());
+ if (!channels.value.length || names.length !== channels.value.length || new Set(names).size !== names.length) return false;
+ return conversionRates.value.every((row) => isRate(row.industryAverage) && channels.value.every((channel) => isRate(row.channelRates[channel.id])));
+});
+const progressItems = computed(() => currentStep.value === 1 ? [{ text: "填写五个节点的渠道转化率", status: funnelRatesComplete.value ? "done" : "doing" }, { text: "上传节点转化漏斗对比图", status: funnelChart.value.url ? "done" : "" }, { text: "完成异常节点分析", status: anomalyRows.value.every((row) => row.anomalyAnalysis?.trim()) ? "done" : "" }] : currentStep.value === 2 ? [{ text: "导入评论数据并生成词云", status: analysisResult.value ? "done" : "doing" }, { text: "完成情感倾向分析", status: sentiments.value.every((row) => row.count !== null) ? "done" : "" }, { text: "填写根因分析", status: rootCauseAnalysis.value.trim() ? "done" : "" }] : [{ text: "设计 AB 测试方案", status: abTestPlan.value.trim() ? "done" : "doing" }, { text: "填写五项对照数据", status: abRows.value.every((row) => row.controlValue !== null && row.experimentValue !== null && row.analysis?.trim()) ? "done" : "" }, { text: "上传 AB 对比图", status: abChart.value.url ? "done" : "" }, { text: "提交迭代优化建议", status: iterationRecommendation.value.trim() ? "done" : "" }]);
+function createDefaultChannels() { return defaultChannels.map((channel) => ({ ...channel })); }
+function createConversionRates(channelList = channels.value) { return nodes.map((linkNode) => ({ linkNode, channelRates: Object.fromEntries(channelList.map((channel) => [channel.id, null])), industryAverage: null })); }
+function createAnomalyRow() { return { channelId: "", channel: "", linkNode: "", storeConversionRate: null, industryAverageConversionRate: null, anomalyAnalysis: "" }; }
+function createSentiments() { return ["正面", "中性", "负面"].map((type) => ({ type, count: null, percentage: null })); }
+function createAbRows() { return ["点击-加购转化率", "加购-下单转化率", "下单-好评转化率", "详情页跳出率", "退货率"].map((metric) => ({ metric, controlValue: null, experimentValue: null, analysis: "" })); }
+function isRate(value) { return value !== null && value !== "" && Number.isFinite(Number(value)); }
+function diagnosisErrorMessage(error, fallback) {
+ const serverMessage = String(error?.response?.data?.msg || "").trim();
+ const message = serverMessage || String(error?.message || "").trim();
+ return /Request failed with status code|系统接口\d{3}异常/i.test(message) ? fallback : message || fallback;
+}
+function buildStepOne() {
+ const channelSnapshot = channels.value.map((channel) => ({ id: channel.id, name: channel.name.trim() }));
+ return {
+ channels: channelSnapshot,
+ conversionRates: conversionRates.value.map((row) => ({ linkNode: row.linkNode, channelRates: { ...row.channelRates }, industryAverage: row.industryAverage })),
+ funnelChartUrl: funnelChart.value.url,
+ funnelChartName: funnelChart.value.name,
+ anomalyRows: anomalyRows.value.map((row) => ({ ...row, channel: channelSnapshot.find((channel) => channel.id === row.channelId)?.name || row.channel || "" })),
+ };
+}
+function buildStepTwo() {
+ return {
+ sourceFileName: commentPreview.value.fileName,
+ totalComments: commentPreview.value.totalComments,
+ topIssues: [...topIssues.value],
+ sentiments: sentiments.value.map((row) => ({ ...row })),
+ rootCauseAnalysis: rootCauseAnalysis.value,
+ wordCloud: wordCloud.value,
+ previewComments: commentPreview.value.comments,
+ analysisResult: analysisResult.value ? { ...analysisResult.value } : null,
+ };
+}
+function buildStepTwoValidationPayload(stepTwo = buildStepTwo()) {
+ return {
+ sourceFileName: stepTwo.sourceFileName,
+ topIssues: stepTwo.topIssues,
+ sentiments: stepTwo.sentiments,
+ rootCauseAnalysis: stepTwo.rootCauseAnalysis,
+ };
+}
+function buildStepThree() { return { testPlan: abTestPlan.value, rows: abRows.value.map((row) => ({ ...row })), comparisonChartUrl: abChart.value.url, comparisonChartName: abChart.value.name, iterationRecommendation: iterationRecommendation.value }; }
+function addFunnelChannel() {
+ channelSerial += 1;
+ const channel = { id: `channel-${Date.now()}-${channelSerial}`, name: "" };
+ channels.value.push(channel);
+ conversionRates.value.forEach((row) => { row.channelRates[channel.id] = null; });
+}
+function removeFunnelChannel(channelId) {
+ channels.value = channels.value.filter((channel) => channel.id !== channelId);
+ conversionRates.value.forEach((row) => { delete row.channelRates[channelId]; });
+ anomalyRows.value.forEach((row) => {
+ if (row.channelId === channelId) {
+ row.channelId = "";
+ row.channel = "";
+ row.storeConversionRate = null;
+ }
+ });
+}
+function syncAnomalyChannel(row) { row.channel = channels.value.find((channel) => channel.id === row.channelId)?.name.trim() || ""; }
+function addAnomalyRow() { if (anomalyRows.value.length < 5) anomalyRows.value.push(createAnomalyRow()); }
+function removeAnomalyRow() { if (anomalyRows.value.length > 1) anomalyRows.value.pop(); }
+function clearChart() { if (funnelChart.value.url.startsWith("blob:")) URL.revokeObjectURL(funnelChart.value.url); funnelChart.value = { url: "", name: "" }; }
async function handleChartUpload(event) { const file = event.target?.files?.[0]; if (!file) return; const accepted = ["image/jpeg", "image/png", "image/webp"]; if (!accepted.includes(file.type) || file.size > 5 * 1024 * 1024) { proxy?.$modal?.msgError?.("请上传不超过 5MB 的 PNG、JPG 或 WEBP 图片"); event.target.value = ""; return; } uploading.value = true; try { let url = ""; if (isStudentDemo()) url = URL.createObjectURL(file); else { const data = new FormData(); data.append("file", file); const response = await uploadStudentTrainingFile(data); url = response?.url || response?.data?.url || ""; } if (!url) throw new Error("上传成功但未返回图片地址"); clearChart(); funnelChart.value = { url, name: file.name }; proxy?.$modal?.msgSuccess?.("漏斗对比图上传成功,可点击图片预览"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "图片上传失败,请重试"); } finally { uploading.value = false; event.target.value = ""; } }
async function saveStepOneDraft() { await persistStepOne(false); } async function validateStepOne() { if (saving.value) return; saving.value = true; try { const data = buildStepOne(); await validateProductDiagnosisIterationStepOne(data); await saveStudentTrainingAnswer(TASK_KEY, { step1Answer: JSON.stringify(data), currentStep: 2, submitted: false, saveAction: "SAVE" }); currentStep.value = 2; proxy?.$modal?.msgSuccess?.("第 1 步校验通过,已进入第 2 步"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "请检查第 1 步填写内容"); } finally { saving.value = false; } } async function persistStepOne(showMessage) { if (saving.value) return; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step1Answer: JSON.stringify(buildStepOne()), currentStep: 1, submitted: false, saveAction: "SAVE" }); if (showMessage !== false) proxy?.$modal?.msgSuccess?.("草稿已保存"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); } finally { saving.value = false; } }
async function handleCommentImport(event) { const file = event.target?.files?.[0]; if (!file) return; if (!/\.(csv|txt|xls|xlsx)$/i.test(file.name) || file.size > 5 * 1024 * 1024) { proxy?.$modal?.msgError?.("请上传不超过 5MB 的 CSV、TXT、XLS 或 XLSX 评论文件"); event.target.value = ""; return; } analyzing.value = true; try { const result = (await analyzeProductDiagnosisIterationStepTwo(file))?.data; if (!result) throw new Error("未获得评论分析结果"); analysisResult.value = result; commentPreview.value = { fileName: result.sourceFileName || file.name, totalComments: result.totalComments || 0, comments: result.previewComments || [] }; wordCloud.value = result.wordCloud || []; topIssues.value = [0, 1, 2].map((index) => result.topIssues?.[index] || ""); sentiments.value = createSentiments(); await nextTick(); renderWordCloud(); proxy?.$modal?.msgSuccess?.("评论数据已导入,词云已生成"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "评论数据分析失败,请检查文件格式"); } finally { analyzing.value = false; event.target.value = ""; } }
@@ -88,7 +192,7 @@ function runSentimentAnalysis() {
}));
proxy?.$modal?.msgSuccess?.("情感评论数量与占比已自动计算");
}
-async function saveStepTwoDraft() { if (saving.value) return false; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(buildStepTwo()), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("当前步骤已保存"); return true; } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); return false; } finally { saving.value = false; } } async function validateStepTwo() { if (saving.value) return false; saving.value = true; try { const data = buildStepTwo(); await validateProductDiagnosisIterationStepTwo(data); await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(data), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("第 2 步校验通过,已保存"); return true; } catch (error) { proxy?.$modal?.msgError?.(error?.message || "请检查词云、情感占比和根因分析"); return false; } finally { saving.value = false; } }
+async function saveStepTwoDraft() { if (saving.value) return false; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(buildStepTwo()), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("当前步骤已保存"); return true; } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); return false; } finally { saving.value = false; } } async function validateStepTwo() { if (saving.value) return false; saving.value = true; try { const data = buildStepTwo(); await validateProductDiagnosisIterationStepTwo(buildStepTwoValidationPayload(data)); await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(data), currentStep: 2, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("第 2 步校验通过,已保存"); return true; } catch (error) { proxy?.$modal?.msgError?.(diagnosisErrorMessage(error, "请检查词云、情感占比和根因分析")); return false; } finally { saving.value = false; } }
function clearAbChart() { if (abChart.value.url.startsWith("blob:")) URL.revokeObjectURL(abChart.value.url); abChart.value = { url: "", name: "" }; }
async function handleAbChartUpload(event) { const file = event.target?.files?.[0]; if (!file) return; const accepted = ["image/jpeg", "image/png", "image/webp"]; if (!accepted.includes(file.type) || file.size > 5 * 1024 * 1024) { proxy?.$modal?.msgError?.("请上传不超过 5MB 的 PNG、JPG 或 WEBP 图片"); event.target.value = ""; return; } uploading.value = true; try { let url = ""; if (isStudentDemo()) url = URL.createObjectURL(file); else { const data = new FormData(); data.append("file", file); const response = await uploadStudentTrainingFile(data); url = response?.url || response?.data?.url || ""; } if (!url) throw new Error("上传成功但未返回图片地址"); clearAbChart(); abChart.value = { url, name: file.name }; proxy?.$modal?.msgSuccess?.("AB 测试结果对比图上传成功,可点击图片预览"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "图片上传失败,请重试"); } finally { uploading.value = false; event.target.value = ""; } }
async function saveStepThreeDraft() { if (saving.value) return; saving.value = true; try { await saveStudentTrainingAnswer(TASK_KEY, { step3Answer: JSON.stringify(buildStepThree()), currentStep: 3, submitted: false, saveAction: "SAVE" }); proxy?.$modal?.msgSuccess?.("草稿已保存"); } catch (error) { proxy?.$modal?.msgError?.(error?.message || "保存失败,请重试"); } finally { saving.value = false; } }
@@ -110,7 +214,7 @@ async function submitTask() {
await validateProductDiagnosisIterationStepOne(stepOne);
await saveStudentTrainingAnswer(TASK_KEY, { step1Answer: JSON.stringify(stepOne), currentStep: 1, submitted: false, saveAction: "SAVE" });
const stepTwo = buildStepTwo();
- await validateProductDiagnosisIterationStepTwo(stepTwo);
+ await validateProductDiagnosisIterationStepTwo(buildStepTwoValidationPayload(stepTwo));
await saveStudentTrainingAnswer(TASK_KEY, { step2Answer: JSON.stringify(stepTwo), currentStep: 2, submitted: false, saveAction: "SAVE" });
const stepThree = buildStepThree();
await validateProductDiagnosisIterationStepThree(stepThree);
@@ -119,7 +223,7 @@ async function submitTask() {
proxy?.$modal?.msgSuccess?.("实训任务已提交");
return true;
} catch (error) {
- proxy?.$modal?.msgError?.(error?.message || "提交失败,请检查三个步骤的填写内容");
+ proxy?.$modal?.msgError?.(diagnosisErrorMessage(error, "提交失败,请检查三个步骤的填写内容"));
return false;
} finally {
saving.value = false;
@@ -130,7 +234,7 @@ async function resetTraining() {
try {
await deleteStudentTrainingAnswer(TASK_KEY);
clearChart(); clearAbChart(); wordCloudChart?.dispose(); wordCloudChart = null;
- conversionRates.value = createConversionRates(); anomalyRows.value = [createAnomalyRow()]; analysisResult.value = null;
+ channels.value = createDefaultChannels(); conversionRates.value = createConversionRates(); anomalyRows.value = [createAnomalyRow()]; analysisResult.value = null;
commentPreview.value = { fileName: "", totalComments: 0, comments: [] }; wordCloud.value = []; topIssues.value = ["", "", ""]; sentiments.value = createSentiments(); rootCauseAnalysis.value = "";
abTestPlan.value = ""; abRows.value = createAbRows(); iterationRecommendation.value = ""; currentStep.value = 1;
proxy?.$modal?.msgSuccess?.("已清空全部实训步骤,可以重新开始");
@@ -146,7 +250,81 @@ function exportTrainingOutcome() {
const link = document.createElement("a"); link.href = url; link.download = "产品问题诊断与迭代-实训成果.json"; document.body.appendChild(link); link.click(); document.body.removeChild(link); URL.revokeObjectURL(url);
proxy?.$modal?.msgSuccess?.("实训成果已导出");
}
-function restore(answer) { try { const stepOne = JSON.parse(answer?.step1Answer || "{}"); if (Array.isArray(stepOne.conversionRates) && stepOne.conversionRates.length === nodes.length) conversionRates.value = nodes.map((node) => ({ ...createConversionRates().find((row) => row.linkNode === node), ...(stepOne.conversionRates.find((row) => row?.linkNode === node) || {}) })); if (Array.isArray(stepOne.anomalyRows) && stepOne.anomalyRows.length) anomalyRows.value = stepOne.anomalyRows.slice(0, 5).map((row) => ({ ...createAnomalyRow(), ...row })); if (stepOne.funnelChartUrl) funnelChart.value = { url: stepOne.funnelChartUrl, name: stepOne.funnelChartName || "节点转化漏斗对比图" }; const stepTwo = JSON.parse(answer?.step2Answer || "{}"); if (stepTwo.sourceFileName) { commentPreview.value = { fileName: stepTwo.sourceFileName, totalComments: 0, comments: stepTwo.previewComments || [] }; wordCloud.value = stepTwo.wordCloud || []; topIssues.value = [0, 1, 2].map((index) => stepTwo.topIssues?.[index] || ""); sentiments.value = (stepTwo.sentiments || createSentiments()).map((row) => ({ ...createSentiments().find((item) => item.type === row.type), ...row })); rootCauseAnalysis.value = stepTwo.rootCauseAnalysis || ""; nextTick(renderWordCloud); } const stepThree = JSON.parse(answer?.step3Answer || "{}"); if (stepThree.testPlan || stepThree.comparisonChartUrl || stepThree.iterationRecommendation) { abTestPlan.value = stepThree.testPlan || ""; if (Array.isArray(stepThree.rows) && stepThree.rows.length === createAbRows().length) abRows.value = createAbRows().map((row) => ({ ...row, ...(stepThree.rows.find((item) => item?.metric === row.metric) || {}) })); if (stepThree.comparisonChartUrl) abChart.value = { url: stepThree.comparisonChartUrl, name: stepThree.comparisonChartName || "AB 测试结果对比图" }; iterationRecommendation.value = stepThree.iterationRecommendation || ""; } currentStep.value = [1, 2, 3].includes(Number(answer?.currentStep)) ? Number(answer.currentStep) : 1; } catch (error) {} }
+function restoreStepOne(stepOne) {
+ const hasSavedChannels = Array.isArray(stepOne.channels);
+ const seenIds = new Set();
+ const restoredChannels = hasSavedChannels
+ ? stepOne.channels.map((channel) => ({ id: String(channel?.id || "").trim(), name: String(channel?.name || "").trim() })).filter((channel) => {
+ if (!channel.id || seenIds.has(channel.id)) return false;
+ seenIds.add(channel.id);
+ return true;
+ })
+ : createDefaultChannels();
+ channels.value = restoredChannels;
+ if (Array.isArray(stepOne.conversionRates) && stepOne.conversionRates.length === nodes.length) {
+ conversionRates.value = nodes.map((linkNode) => {
+ const saved = stepOne.conversionRates.find((row) => row?.linkNode === linkNode) || {};
+ return {
+ linkNode,
+ channelRates: Object.fromEntries(restoredChannels.map((channel) => [channel.id, saved.channelRates?.[channel.id] ?? saved[channel.id] ?? null])),
+ industryAverage: saved.industryAverage ?? null,
+ };
+ });
+ } else {
+ conversionRates.value = createConversionRates(restoredChannels);
+ }
+ if (Array.isArray(stepOne.anomalyRows) && stepOne.anomalyRows.length) {
+ anomalyRows.value = stepOne.anomalyRows.slice(0, 5).map((row) => {
+ const channelId = String(row?.channelId || restoredChannels.find((channel) => channel.name === row?.channel)?.id || "");
+ return { ...createAnomalyRow(), ...row, channelId };
+ });
+ }
+ if (stepOne.funnelChartUrl) funnelChart.value = { url: stepOne.funnelChartUrl, name: stepOne.funnelChartName || "节点转化漏斗对比图" };
+}
+function parseSavedStep(value) {
+ if (!value) return {};
+ if (typeof value === "object") return value;
+ try { return JSON.parse(value); } catch (error) { return {}; }
+}
+function restoreStepTwo(stepTwo) {
+ if (!stepTwo || typeof stepTwo !== "object" || !Object.keys(stepTwo).length) return;
+ const savedAnalysis = stepTwo.analysisResult && typeof stepTwo.analysisResult === "object" ? stepTwo.analysisResult : {};
+ const restoredWordCloud = Array.isArray(stepTwo.wordCloud) ? stepTwo.wordCloud : Array.isArray(savedAnalysis.wordCloud) ? savedAnalysis.wordCloud : [];
+ const restoredComments = Array.isArray(stepTwo.previewComments) ? stepTwo.previewComments : Array.isArray(savedAnalysis.previewComments) ? savedAnalysis.previewComments : [];
+ const restoredTopIssues = [0, 1, 2].map((index) => stepTwo.topIssues?.[index] || savedAnalysis.topIssues?.[index] || "");
+ const savedSentiments = Array.isArray(stepTwo.sentiments) ? stepTwo.sentiments : [];
+ sentiments.value = createSentiments().map((row) => ({ ...row, ...(savedSentiments.find((item) => item?.type === row.type) || {}) }));
+ const count = (type, analysisKey) => {
+ const analysisCount = Number(savedAnalysis[analysisKey]);
+ if (Number.isFinite(analysisCount)) return analysisCount;
+ const sentimentCount = Number(sentiments.value.find((row) => row.type === type)?.count);
+ return Number.isFinite(sentimentCount) ? sentimentCount : 0;
+ };
+ const positiveCount = count("正面", "positiveCount");
+ const neutralCount = count("中性", "neutralCount");
+ const negativeCount = count("负面", "negativeCount");
+ const sourceFileName = String(stepTwo.sourceFileName || savedAnalysis.sourceFileName || "");
+ const inferredTotal = positiveCount + neutralCount + negativeCount;
+ const savedTotal = Number(stepTwo.totalComments ?? savedAnalysis.totalComments);
+ const totalComments = Number.isFinite(savedTotal) ? savedTotal : inferredTotal;
+
+ commentPreview.value = { fileName: sourceFileName, totalComments, comments: restoredComments };
+ wordCloud.value = restoredWordCloud;
+ topIssues.value = restoredTopIssues;
+ rootCauseAnalysis.value = stepTwo.rootCauseAnalysis || "";
+ if (sourceFileName || restoredWordCloud.length || restoredComments.length || restoredTopIssues.some(Boolean)) {
+ analysisResult.value = { sourceFileName, totalComments, positiveCount, neutralCount, negativeCount, topIssues: restoredTopIssues, wordCloud: restoredWordCloud, previewComments: restoredComments };
+ }
+ nextTick(renderWordCloud);
+}
+function restore(answer) {
+ const stepOne = parseSavedStep(answer?.step1Answer);
+ restoreStepOne(stepOne);
+ restoreStepTwo(parseSavedStep(answer?.step2Answer));
+ const stepThree = parseSavedStep(answer?.step3Answer);
+ if (stepThree.testPlan || stepThree.comparisonChartUrl || stepThree.iterationRecommendation) { abTestPlan.value = stepThree.testPlan || ""; if (Array.isArray(stepThree.rows) && stepThree.rows.length === createAbRows().length) abRows.value = createAbRows().map((row) => ({ ...row, ...(stepThree.rows.find((item) => item?.metric === row.metric) || {}) })); if (stepThree.comparisonChartUrl) abChart.value = { url: stepThree.comparisonChartUrl, name: stepThree.comparisonChartName || "AB 测试结果对比图" }; iterationRecommendation.value = stepThree.iterationRecommendation || ""; }
+ currentStep.value = [1, 2, 3].includes(Number(answer?.currentStep)) ? Number(answer.currentStep) : 1;
+}
onMounted(async () => { try { taskConfig.value = (await getTrainingTaskByKey(TASK_KEY))?.data || null; } catch (error) { taskConfig.value = null; } try { restore((await getStudentTrainingAnswer(TASK_KEY))?.data); } catch (error) {} }); onBeforeUnmount(() => { if (funnelChart.value.url.startsWith("blob:")) URL.revokeObjectURL(funnelChart.value.url); if (abChart.value.url.startsWith("blob:")) URL.revokeObjectURL(abChart.value.url); wordCloudChart?.dispose(); });
@@ -170,6 +348,7 @@ onMounted(async () => { try { taskConfig.value = (await getTrainingTaskByKey(TAS
.lead{margin:0 0 20px;color:#d4edf7;font-size:15px;line-height:1.9}.section-block{margin-top:20px;padding:20px;border:1px solid rgba(97,209,247,.25);border-radius:16px;background:rgba(3,28,43,.42)}.section-heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}.section-heading>span{display:grid;flex:0 0 30px;width:30px;height:30px;place-items:center;border-radius:8px;color:#eaffff;background:linear-gradient(135deg,#11b8e4,#1373c4);font-size:14px;font-weight:900}.section-heading h3{margin:1px 0 4px;color:#f0fbff;font-size:18px}.section-heading p{margin:0;color:var(--diagnosis-muted);font-size:13px;line-height:1.65}
.secondary-button,.table-button,.upload-button,.submit-button{min-height:36px;padding:0 13px;border:1px solid rgba(99,203,239,.58);border-radius:8px;color:#e7fbff;background:rgba(12,111,153,.46);font:inherit;font-size:13px;font-weight:800;cursor:pointer;transition:.2s ease}.secondary-button:hover,.table-button:hover,.upload-button:hover{border-color:#7deaff;background:rgba(19,145,192,.62)}.submit-button{border-color:#72e8ff;background:linear-gradient(100deg,#0d80b7,#09638f)}.submit-button:hover{filter:brightness(1.12)}button:disabled{cursor:not-allowed;opacity:.45}.table-button.ghost{border-color:rgba(163,197,211,.36);color:#bed6e0;background:rgba(75,101,112,.25)}
.table-wrap{overflow-x:auto;border:1px solid rgba(99,183,222,.43);border-radius:12px}.funnel-table,.diagnosis-table,.sentiment-table{width:100%;border-collapse:collapse}.funnel-table{min-width:900px}.diagnosis-table{min-width:1060px}.sentiment-table{min-width:640px}.funnel-table th,.funnel-table td,.diagnosis-table th,.diagnosis-table td,.sentiment-table th,.sentiment-table td{padding:11px;border-right:1px solid rgba(99,183,222,.31);border-bottom:1px solid rgba(99,183,222,.31);vertical-align:middle;text-align:center}.funnel-table thead th,.diagnosis-table thead th,.sentiment-table thead th{color:#effaff;background:linear-gradient(100deg,#0a96cc,#087daf);font-size:14px;white-space:nowrap}.funnel-table tbody th,.sentiment-table tbody th{color:#dff8ff;background:rgba(8,72,99,.34);font-weight:800}.funnel-table td,.diagnosis-table td,.sentiment-table td{background:rgba(2,18,29,.34)}.funnel-table :deep(.el-input-number),.diagnosis-table :deep(.el-input-number),.sentiment-table :deep(.el-input-number),.diagnosis-table :deep(.el-select){width:100%}.unit{margin-left:5px;color:#74ddf6;font-size:12px;font-weight:800}.auto-count{color:#82e7ff;font-size:16px;font-weight:900}
+.funnel-channel-toolbar>span{display:block}.funnel-table .fixed-column,.funnel-table tbody th{min-width:145px}.funnel-table .channel-column,.funnel-table tbody td{min-width:180px}.channel-heading{display:flex;align-items:center;gap:7px}.channel-heading :deep(.el-input){min-width:120px}.channel-heading :deep(.el-input__wrapper){background:rgba(2,45,66,.58);box-shadow:0 0 0 1px rgba(198,242,255,.42) inset}.channel-heading :deep(.el-input__inner){color:#fff;text-align:center;font-weight:800}.channel-remove{display:inline-grid;flex:0 0 24px;width:24px;height:24px;place-items:center;padding:0;border:1px solid rgba(255,164,172,.58);border-radius:6px;color:#ffd4d7;background:rgba(130,35,53,.32);font:inherit;font-size:17px;line-height:1;cursor:pointer}.channel-remove:hover,.channel-remove:focus-visible{border-color:#ff98a2;color:#fff;background:rgba(176,48,67,.5);outline:none}.rate-input{display:flex;align-items:center;gap:6px;width:100%;white-space:nowrap}.rate-input :deep(.el-input-number){flex:1 1 auto;width:calc(100% - 22px);min-width:0}.rate-input .unit{display:inline-flex;flex:0 0 auto;align-items:center;height:32px;margin-left:0;white-space:nowrap}
.table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px;color:var(--diagnosis-muted);font-size:13px}.table-toolbar>div,.actions,.diagnosis-materials__actions,.ab-materials__actions{display:flex;flex-wrap:wrap;gap:8px}.actions{justify-content:center;margin-top:24px}.actions .secondary-button,.actions .submit-button{min-width:142px;min-height:42px}
.chart-upload-area,.comment-import{display:grid;place-items:center;gap:10px;min-height:190px;padding:22px;border:1px dashed rgba(113,223,255,.66);border-radius:13px;background:linear-gradient(135deg,rgba(5,47,69,.66),rgba(4,23,35,.52));text-align:center}.chart-upload-area p,.comment-import>p{margin:0;color:var(--diagnosis-muted);font-size:13px}.upload-button{min-height:42px;padding:0 18px}.chart-preview{display:flex;align-items:center;gap:16px;width:100%;text-align:left}.chart-preview :deep(.el-image){width:180px;height:110px;border:1px solid var(--diagnosis-line);border-radius:8px}.chart-preview>div{display:grid;gap:7px}.chart-preview strong{color:#e8fbff}.chart-preview span{color:var(--diagnosis-muted);font-size:13px}.chart-preview button{width:max-content;padding:0;border:0;color:#ffadb1;background:transparent;font:inherit;cursor:pointer}
.data-preview,.word-cloud-card,.top-issues,.root-cause{margin-top:16px;padding:16px;border:1px solid rgba(99,183,222,.31);border-radius:12px;background:rgba(3,25,39,.58)}.data-preview>div,.word-cloud-title{display:flex;justify-content:space-between;gap:12px;color:#e6f9ff}.data-preview span,.word-cloud-title small{color:var(--diagnosis-muted);font-size:12px}.data-preview ul{max-height:130px;margin:12px 0 0;padding-left:20px;overflow:auto;color:#c8e5f1;line-height:1.7;text-align:left}.word-cloud{height:280px}.top-issues>p,.root-cause>p{margin:0 0 13px;color:#c8e5f1;line-height:1.7}.top-issues>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.top-issues label{display:grid;gap:7px;color:#8bdff5;font-weight:800}.sentiment-actions{display:flex;align-items:center;gap:14px;margin-bottom:16px}.sentiment-actions>span{color:var(--diagnosis-muted);font-size:13px}.visual-section,.diagnosis-section{margin-top:20px}
@@ -186,7 +365,6 @@ onMounted(async () => { try { taskConfig.value = (await getTrainingTaskByKey(TAS
.workbench .step-tabs .step-tab.complete .step-marker{border-color:#79eee4;color:#083342;background:#6deee1;box-shadow:none}
.workbench .step-tabs .step-connector{flex:0 0 30px;width:30px;height:1px;margin:0;background:rgba(94,193,229,.58)}
.workbench .step-tabs .step-connector::after{width:8px;height:8px;border-color:#73c8e7}
-.sentiment-table td:last-child{white-space:nowrap}.sentiment-table td:last-child :deep(.el-input-number){display:inline-flex;width:calc(100% - 32px);vertical-align:middle}.sentiment-table td:last-child .unit{display:inline-flex;align-items:center;height:32px;margin-left:6px;vertical-align:middle}
@media(max-width:1100px){.diagnosis-page{grid-template-columns:1fr}}@media(max-width:720px){.diagnosis-page{padding:12px}.diagnosis-core{padding:16px;border-radius:20px}.workbench{padding:16px}.workbench-top,.table-toolbar,.sentiment-actions{align-items:stretch;flex-direction:column}.step-tabs{align-items:stretch;flex-direction:column}.step-tabs button{flex:0 0 auto;width:100%}.step-tabs i{flex:0 0 12px;width:2px;height:12px;margin-left:17px}.diagnosis-materials__item,.ab-materials{align-items:stretch;flex-direction:column}.top-issues>div{grid-template-columns:1fr}.chart-preview{align-items:flex-start;flex-direction:column}.chart-preview :deep(.el-image){width:100%;height:170px}}
.diagnosis-toolbar{align-self:center;justify-content:flex-end;max-width:100%}
@media(max-width:720px){.diagnosis-toolbar{width:100%;justify-content:flex-start}}
diff --git a/src/views/assessment/optimization.vue b/src/views/assessment/optimization.vue
index c215a45..765a8be 100644
--- a/src/views/assessment/optimization.vue
+++ b/src/views/assessment/optimization.vue
@@ -38,7 +38,7 @@
- | 品类名称 | 近12个月营收(万元) | 营收占比(%) | 累计占比(%) | 库存资金占用(万元) | 资金占用率 | 近30天动销率 | 毛利率 |
+ | 品类名称 | 近12个月营收(万元) | 营收占比(%) | 累计占比(%) | 库存资金占用(万元) | 资金占用率(%) | 近30天动销率(%) | 毛利率 |
|
@@ -46,8 +46,8 @@
|
|
|
- |
- |
+ |
+ |
|
| 暂无数据,请根据案例资料增加行并填写。 |
@@ -226,7 +226,13 @@ const selectedProduct = computed(() => categoryRows.value.find((row) => row.cate
const currentClassificationLabel = computed(() => selectedProduct.value?.abcClassification ? `${selectedProduct.value.abcClassification}类${selectedProduct.value.abcClassification === "A" ? "核心品类" : selectedProduct.value.abcClassification === "B" ? "潜力品类" : "长尾品类"}` : "选择新品后自动带出");
const progressItems = computed(() => configuredSteps.value.map((text, index) => ({ text, status: index + 1 < activeStep.value ? "done" : index + 1 === activeStep.value ? "doing" : "" })));
-function createRow(source = {}) { return { id: source.id || `${Date.now()}-${Math.random().toString(16).slice(2)}`, categoryName: source.categoryName ?? "", revenue: source.revenue ?? "", revenueShare: source.revenueShare ?? "", cumulativeShare: source.cumulativeShare ?? "", inventoryCapital: source.inventoryCapital ?? "", capitalOccupancyRate: source.capitalOccupancyRate ?? "", sellThroughRate: source.sellThroughRate ?? "", grossMargin: source.grossMargin ?? "", abcClassification: source.abcClassification ?? "" }; }
+function normalizePercentageValue(value) {
+ const text = String(value ?? "").trim().replace(/%/g, "");
+ if (!text) return null;
+ const number = Number(text);
+ return Number.isFinite(number) ? Number(number.toFixed(2)) : null;
+}
+function createRow(source = {}) { return { id: source.id || `${Date.now()}-${Math.random().toString(16).slice(2)}`, categoryName: source.categoryName ?? "", revenue: source.revenue ?? "", revenueShare: source.revenueShare ?? "", cumulativeShare: source.cumulativeShare ?? "", inventoryCapital: source.inventoryCapital ?? "", capitalOccupancyRate: normalizePercentageValue(source.capitalOccupancyRate), sellThroughRate: normalizePercentageValue(source.sellThroughRate), grossMargin: source.grossMargin ?? "", abcClassification: source.abcClassification ?? "" }; }
function createStepFour(source = {}) { return { productName: source.productName ?? "", matrixQuadrant: source.matrixQuadrant ?? "", matrixReason: source.matrixReason ?? "", necessityAnalysis: source.necessityAnalysis ?? "", recommendedClassification: source.recommendedClassification ?? "", trafficSupportMeasures: source.trafficSupportMeasures ?? "" }; }
function createStrategyRows(savedRows = []) { const saved = new Map((Array.isArray(savedRows) ? savedRows : []).map((row) => [row?.layer, row])); return [{ layer: "A", label: "A类核心品类", operationPlaceholder: "例如:重点投入流量与推广预算,持续优化转化率", inventoryPlaceholder: "例如:安全库存上限,高频补货,优先保障供货稳定" }, { layer: "B", label: "B类潜力品类", operationPlaceholder: "例如:开展AB测试,针对潜力品类配置流量扶持", inventoryPlaceholder: "例如:密切关注运营效果,活动前适当备货" }, { layer: "C", label: "C类长尾品类", operationPlaceholder: "例如:控制流量预算,通过组合活动逐步清退滞销SKU", inventoryPlaceholder: "例如:停止主动补货,清退滞销SKU" }, { layer: "NEW", label: "新产品", operationPlaceholder: "例如:设置新品测试活动,重点推广运营", inventoryPlaceholder: "例如:提前备货,根据渠道测试情况重点备货" }].map((row) => ({ ...row, operationStrategy: saved.get(row.layer)?.operationStrategy ?? "", inventoryStrategy: saved.get(row.layer)?.inventoryStrategy ?? "", resourcePriority: saved.get(row.layer)?.resourcePriority ?? "" })); }
function normalizeActiveStep(value) { return !configuredSteps.value.length ? 1 : Math.min(Math.max(Number(value) || 1, 1), configuredSteps.value.length); }
@@ -378,7 +384,7 @@ onMounted(async () => {
.training-core { min-width:0; padding:28px; border:1px solid var(--line); border-radius:28px; background:rgba(5,25,37,.82); box-shadow:0 22px 48px rgba(0,0,0,.22); }.task-header{margin-bottom:20px}.task-badge{display:inline-flex;align-items:center;gap:8px;padding:5px 12px;border:1px solid rgba(99,217,255,.55);border-radius:999px;color:#dff5ff;background:rgba(17,126,178,.3);font-size:12px;font-weight:800}.task-header h1{margin:10px 0 0;font-size:30px}.task-card{margin-top:24px;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:rgba(3,22,34,.78)}
.workbench-head{display:flex;justify-content:space-between;gap:18px;padding:22px 24px;border-bottom:1px solid var(--line)}.section-eyebrow{margin:0;color:#71dfff;font-size:12px;font-weight:800;letter-spacing:.12em}.workbench-head h2{margin:5px 0 0;font-size:24px}.workbench-actions,.table-toolbar>div,.step-navigation,.training-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.workbench-actions{justify-content:flex-end}.outline-action,.action-button,.nav-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 16px;border:1px solid rgba(99,217,255,.5);border-radius:9px;color:#e9fbff;background:rgba(17,126,178,.34);font:inherit;font-weight:700;cursor:pointer}.outline-action:hover,.action-button:hover,.nav-button:hover{border-color:#7deaff;background:rgba(20,148,193,.48)}button:disabled{cursor:not-allowed;opacity:.45}
.step-indicator{display:flex;gap:9px;padding:16px 24px;border-bottom:1px solid var(--line);overflow-x:auto}.step-tab{display:inline-flex;align-items:center;gap:8px;min-width:max-content;padding:8px 12px;border:1px solid var(--line);border-radius:999px;color:var(--muted);background:transparent;font:inherit;cursor:pointer}.step-tab span{display:grid;width:21px;height:21px;place-items:center;border-radius:50%;color:#bdefff;background:rgba(16,117,154,.35);font-size:11px;font-weight:800}.step-tab.active{border-color:#71dfff;color:white;background:rgba(12,114,159,.48)}.step-tab.complete{color:#d5fff8}.step-tab.complete span{background:#2ba995}
-.category-step{padding:24px}.instruction{margin:0 0 20px;color:#d8edf5;font-size:15px;line-height:1.75}.table-toolbar{display:flex;justify-content:space-between;gap:14px;margin-bottom:12px;color:var(--muted);font-size:13px}.action-button--muted{border-color:rgba(158,192,207,.35);background:rgba(75,101,112,.25)}.category-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}.category-table{width:100%;min-width:1260px;border-collapse:collapse}.category-table th,.category-table td{padding:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center}.category-table th{color:#e6f9ff;background:rgba(23,112,150,.42);font-size:13px;white-space:nowrap}.category-table td{background:rgba(2,18,28,.32)}.category-table tr:last-child td{border-bottom:0}.category-table th:last-child,.category-table td:last-child{border-right:0}.empty-cell{height:88px;color:var(--muted)}.abc-table{min-width:900px}.abc-table :deep(.el-select){width:100%;min-width:180px}
+.category-step{padding:24px}.instruction{margin:0 0 20px;color:#d8edf5;font-size:15px;line-height:1.75}.table-toolbar{display:flex;justify-content:space-between;gap:14px;margin-bottom:12px;color:var(--muted);font-size:13px}.action-button--muted{border-color:rgba(158,192,207,.35);background:rgba(75,101,112,.25)}.category-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}.category-table{width:100%;min-width:1260px;border-collapse:collapse}.category-table th,.category-table td{padding:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center}.category-table th{color:#e6f9ff;background:rgba(23,112,150,.42);font-size:13px;white-space:nowrap}.category-table td{background:rgba(2,18,28,.32)}.category-table tr:last-child td{border-bottom:0}.category-table th:last-child,.category-table td:last-child{border-right:0}.category-table :deep(.el-input-number){width:100%}.empty-cell{height:88px;color:var(--muted)}.abc-table{min-width:900px}.abc-table :deep(.el-select){width:100%;min-width:180px}
.rule-notice{margin-top:20px;padding:16px 18px;border:1px solid rgba(255,112,112,.46);border-radius:12px;background:rgba(126,31,35,.15);color:#ffd5d5}.rule-notice strong{color:#ff9292}.rule-notice p{margin:8px 0 0;line-height:1.65}.analysis-step{padding:24px}.analysis-tabs{display:flex;gap:10px;margin-bottom:18px}.analysis-tabs button{padding:9px 14px;border:1px solid var(--line);border-radius:8px;color:var(--muted);background:transparent;font:inherit;cursor:pointer}.analysis-tabs button.active{color:white;border-color:#71dfff;background:rgba(12,114,159,.48)}.business-workspace{overflow:hidden;border:1px solid var(--line);border-radius:14px}.step-navigation{justify-content:center;padding:20px 24px 0}.nav-button--save,.nav-button--primary{border-color:#71dfff;background:linear-gradient(100deg,#0d80b7,#09638f)}.training-actions{justify-content:center;gap:28px;padding:26px 24px}.training-actions :deep(.training-action){min-width:160px;height:50px;border-color:#2c83aa;color:#dff7ff;background:rgba(13,64,88,.62);font-size:17px;font-weight:800}
.pareto-upload-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:330px;padding:26px;border:1px dashed rgba(113,223,255,.7);border-radius:16px;background:linear-gradient(135deg,rgba(5,47,69,.7),rgba(4,23,35,.58));text-align:center}.file-input{display:none}.upload-icon{font-size:42px;color:#71dfff}.pareto-upload-panel>strong{font-size:20px}.pareto-upload-panel>span,.upload-file-meta span{color:var(--muted);font-size:13px}.pareto-preview{width:min(100%,760px);height:270px;border:1px solid var(--line);border-radius:10px;background:rgba(0,10,18,.65);cursor:zoom-in}.upload-file-meta{display:grid;gap:5px;max-width:100%;word-break:break-all}.pareto-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.danger-action{border-color:rgba(255,145,145,.6);color:#ffd7d7;background:rgba(130,43,43,.23)}
.pareto-materials{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-top:20px;padding:18px 20px;border-left:3px solid var(--accent);border-radius:0 14px 14px 0;background:rgba(11,79,109,.22);color:#d8edf5}.pareto-materials h3{margin:0 0 8px;font-size:16px}.pareto-materials ol{margin:0;padding-left:20px;line-height:1.8}.pareto-materials__actions{display:grid;flex:0 0 178px;gap:10px}.action-button--primary{border-color:#71dfff;background:linear-gradient(100deg,#0d80b7,#09638f)}
diff --git a/src/views/channel/supplier.vue b/src/views/channel/supplier.vue
index a5a2898..74ad669 100644
--- a/src/views/channel/supplier.vue
+++ b/src/views/channel/supplier.vue
@@ -429,7 +429,7 @@ async function saveStepOne(showMessage = true) {
try {
const result = (await validateSupplierEvaluationStepOne(buildStepOnePayload()))?.data || {};
if (!result?.valid) throw new Error(result?.message || "权重校验未通过");
- await saveStudentTrainingAnswer({ taskKey: TASK_KEY, currentStep: 1, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step1Answer: JSON.stringify({ items: result.items }) });
+ await saveStudentTrainingAnswer(TASK_KEY, { currentStep: 1, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step1Answer: JSON.stringify({ items: result.items }) });
stepOneSaved.value = true;
if (showMessage) ElMessage.success("当前步骤已保存");
return true;
@@ -446,7 +446,7 @@ async function saveStepTwo(showMessage = true) {
if (!result?.valid) throw new Error(result?.message || "渠道评分校验未通过");
smallBatchRows.value = createScoreRows(result.smallBatchChannels);
largeBatchRows.value = createScoreRows(result.largeBatchChannels);
- await saveStudentTrainingAnswer({ taskKey: TASK_KEY, currentStep: 2, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step2Answer: JSON.stringify({ weights: result.weights, smallBatchChannels: result.smallBatchChannels, largeBatchChannels: result.largeBatchChannels }) });
+ await saveStudentTrainingAnswer(TASK_KEY, { currentStep: 2, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step2Answer: JSON.stringify({ weights: result.weights, smallBatchChannels: result.smallBatchChannels, largeBatchChannels: result.largeBatchChannels }) });
stepTwoSaved.value = true;
syncChannelNames();
if (showMessage) ElMessage.success("当前步骤已保存");
@@ -462,7 +462,7 @@ async function saveStepThree(showMessage = true) {
const result = (await validateSupplierEvaluationStepThree(buildStepThreePayload()))?.data || {};
if (!result?.valid) throw new Error(result?.message || "第 3 步校验未通过");
const step3Answer = { scenarioAnalyses: result.scenarioAnalyses, procurementRecommendation: result.procurementRecommendation, risks: result.risks };
- await saveStudentTrainingAnswer({ taskKey: TASK_KEY, currentStep: 3, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step3Answer: JSON.stringify(step3Answer) });
+ await saveStudentTrainingAnswer(TASK_KEY, { currentStep: 3, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step3Answer: JSON.stringify(step3Answer) });
applyStepThree({ step3Answer });
if (showMessage) ElMessage.success("当前步骤已保存");
return true;
diff --git a/src/views/components/TrainingAiEvaluation.vue b/src/views/components/TrainingAiEvaluation.vue
index 03f7573..183de9f 100644
--- a/src/views/components/TrainingAiEvaluation.vue
+++ b/src/views/components/TrainingAiEvaluation.vue
@@ -34,7 +34,7 @@
{{ statusLabel(assessmentStatus) }}
- AI将基于已填写的答案给出综合评分和改进方向。
+ AI根据已保存的答案评分。修改并保存答案后可重新助评;答案未变时保留上次结果。
{{ assessmentActionLabel }}
@@ -90,9 +90,11 @@ const assessmentReport = computed(() => normalizedReports.value.assessmentReport
const score = computed(() => normalizedReports.value.score);
const scoreCriteria = computed(() => normalizedReports.value.scoreCriteria);
const isHelpDisabled = computed(() => !props.hasAnyAnswer || helpLoading.value || isTerminal(helpStatus.value));
-const isAssessmentDisabled = computed(() => !props.hasAnyAnswer || assessmentLoading.value || isTerminal(assessmentStatus.value));
+const isAssessmentDisabled = computed(() => !props.hasAnyAnswer || assessmentLoading.value || assessmentStatus.value === "PROCESSING");
const helpActionLabel = computed(() => actionLabel(helpStatus.value, "生成助学建议", helpLoading.value));
-const assessmentActionLabel = computed(() => actionLabel(assessmentStatus.value, "请求AI助评", assessmentLoading.value));
+const assessmentActionLabel = computed(() => assessmentStatus.value === "SUCCEEDED" && !assessmentLoading.value
+ ? "重新助评"
+ : actionLabel(assessmentStatus.value, "请求AI助评", assessmentLoading.value));
onMounted(() => loadEvaluation());
@@ -136,7 +138,7 @@ async function requestHelp() {
async function confirmAssessment() {
if (isAssessmentDisabled.value || !props.taskKey) return;
try {
- await proxy?.$modal?.confirm("AI将根据当前已填写的内容进行评估,是否继续?", "提示");
+ await proxy?.$modal?.confirm("AI将根据当前已保存的答案进行评估,答案未变时保留上次结果,是否继续?", "提示");
} catch (error) {
return;
}
diff --git a/src/views/components/TrainingAiSidebar.vue b/src/views/components/TrainingAiSidebar.vue
index eb339e7..20e6ce5 100644
--- a/src/views/components/TrainingAiSidebar.vue
+++ b/src/views/components/TrainingAiSidebar.vue
@@ -36,16 +36,36 @@
AI助评
+
+ 综合评分
+ {{ displayFinalScore }}
+ / 100
+
+
-
{{ displayEvalMessage }}
-
- 综合评分:
{{ displayFinalScore }} / 100
+
+
{{ reports.assessmentSummary }}
+
+
+
+ {{ item.name }}
+ {{ item.score }} / {{ item.maxScore }}
+
+
{{ item.description }}
+
+
+
+
{{ displayEvalMessage }}
请先至少填写并保存一项实训内容,再请求 AI 助评。
-
AI智能评分
+
修改并保存答案后可重新助评;答案未变时保留上次结果。
+
{{ reports.assessment.status === "SUCCEEDED" ? "重新助评" : "AI智能评分" }}
@@ -109,13 +129,20 @@ const route = useRoute();
const currentTaskKey = computed(() => resolveTrainingTaskKey(route, props.taskKey));
const reports = computed(() => normalizeEvaluationReports(evaluation.value));
const currentStepContext = computed(() => [props.studyTip, props.referenceTitle, plainText(props.referenceText)].filter(Boolean).join("\n"));
+const displayScoreCriteria = computed(() => {
+ const criteria = reports.value.scoreCriteria;
+ const stepNames = props.progressItems.map((item) => String(item?.text || "").trim()).filter(Boolean);
+ if (!stepNames.length || stepNames.length !== criteria.length) return criteria;
+ return criteria.map((item, index) => ({ ...item, name: stepNames[index] }));
+});
const displayAssistMessage = computed(() => assistMessage.value || props.studyTip);
const displayScoreVisible = computed(() => props.scoreVisible || internalScoreVisible.value || reports.value.score !== null);
const displayFinalScore = computed(() => (props.scoreVisible ? props.finalScore : reports.value.score ?? internalScore.value));
+const hasStructuredAssessment = computed(() => Boolean(reports.value.assessmentSummary || displayScoreCriteria.value.length || reports.value.improvements.length));
const displayEvalMessage = computed(() => {
if (props.scoreVisible) return props.evalMessage;
- return reports.value.assessmentReport || internalEvalMessage.value || props.evalMessage;
+ return internalEvalMessage.value || props.evalMessage;
});
onMounted(loadEvaluation);
@@ -174,7 +201,7 @@ async function requestEvaluation() {
await loadEvaluation();
internalScoreVisible.value = reports.value.score !== null;
internalScore.value = reports.value.score ?? "--";
- internalEvalMessage.value = reports.value.assessmentReport || props.evalMessage;
+ internalEvalMessage.value = reports.value.assessmentSummary || "AI 评分已生成,请查看评分明细与改进建议。";
} catch (error) {
internalEvalMessage.value = "AI 助评暂时不可用,请稍后重试。";
} finally { assessmentLoading.value = false; }
@@ -266,6 +293,61 @@ function plainText(value) {
margin: 0;
}
}
+.ai-output--review {
+ max-height: 500px;
+ overflow-y: auto;
+}
+.assessment-result {
+ position: relative;
+ z-index: 1;
+ display: grid;
+ gap: 12px;
+}
+.assessment-summary {
+ margin: 0;
+ color: #e6f7ff;
+ font-weight: 650;
+ line-height: 1.8;
+}
+.assessment-criteria {
+ display: grid;
+ gap: 8px;
+}
+.assessment-criterion {
+ padding: 10px 11px;
+ border: 1px solid rgba(113, 225, 255, 0.22);
+ border-radius: 10px;
+ background: rgba(10, 43, 61, 0.4);
+}
+.assessment-criterion__heading {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 10px;
+ color: #f0fbff;
+}
+.assessment-criterion__heading span {
+ flex: 0 0 auto;
+ color: #71e8ff;
+ font-weight: 800;
+ font-variant-numeric: tabular-nums;
+}
+.assessment-criterion__heading small { color: #91bbcf; font-weight: 600; }
+.assessment-criterion p {
+ margin: 6px 0 0;
+ color: #afd3e3;
+ font-size: 13px;
+ line-height: 1.65;
+}
+.assessment-actions {
+ padding: 10px 11px;
+ border-left: 2px solid #5ce4ff;
+ color: #cceafa;
+ background: rgba(29, 114, 149, 0.14);
+}
+.assessment-actions strong { color: #7cecff; font-size: 13px; }
+.assessment-actions ul { margin: 6px 0 0; padding-left: 18px; }
+.assessment-actions li + li { margin-top: 4px; }
.study-messages {
position: relative;
z-index: 1;
@@ -380,17 +462,30 @@ function plainText(value) {
z-index: 1;
display: inline-flex;
align-items: center;
- gap: 6px;
- margin-top: 14px;
- padding: 8px 12px;
- border: 1px solid rgba(126, 233, 255, 0.38);
- border-radius: 999px;
+ width: 100%;
+ gap: 8px;
+ margin: -2px 0 14px;
+ padding: 12px 14px;
+ border: 1px solid rgba(101, 238, 255, 0.7);
+ border-radius: 12px;
color: #dff8ff;
- background: rgba(11, 42, 56, 0.78);
+ background:
+ linear-gradient(90deg, rgba(20, 169, 216, 0.4), rgba(8, 50, 70, 0.75)),
+ rgba(11, 42, 56, 0.78);
+ box-shadow: inset 0 1px 0 rgba(220, 253, 255, 0.23), 0 0 24px rgba(39, 209, 255, 0.16);
+ font-size: 14px;
+ font-weight: 800;
+ letter-spacing: 0.04em;
+
+ span { color: #dff8ff; }
+ em { color: #b8dce9; font-size: 13px; font-style: normal; font-weight: 700; }
strong {
color: #7ee9ff;
- font-size: 20px;
+ margin-left: auto;
+ font-size: 28px;
+ line-height: 1;
+ text-shadow: 0 0 14px rgba(102, 238, 255, 0.6);
}
}
diff --git a/src/views/components/trainingAiEvaluationReport.js b/src/views/components/trainingAiEvaluationReport.js
index 4961461..01e2c6c 100644
--- a/src/views/components/trainingAiEvaluationReport.js
+++ b/src/views/components/trainingAiEvaluationReport.js
@@ -8,6 +8,11 @@ function safeParseJson(value) {
}
}
+function criterionDisplayName(value) {
+ const name = String(value || "").trim();
+ return name || "评分项";
+}
+
function formatReport(value) {
if (value == null) return "";
const parsed = typeof value === "string" ? safeParseJson(value) : value;
@@ -24,13 +29,19 @@ function normalizeCriteria(value) {
return value.map((item) => {
if (typeof item === "string") return { name: item, score: "", description: "" };
return {
- name: String(item?.name || item?.criterion || item?.title || "评分项"),
+ name: criterionDisplayName(item?.name || item?.criterion || item?.title),
score: item?.score ?? item?.weight ?? "",
- description: String(item?.description || item?.detail || ""),
+ maxScore: item?.maxScore ?? item?.max ?? "",
+ description: String(item?.rationale || item?.description || item?.detail || ""),
};
});
}
+function normalizeTextList(value) {
+ if (!Array.isArray(value)) return [];
+ return value.map((item) => String(item || "").trim()).filter(Boolean);
+}
+
function normalizeOperation(operation, root, type) {
const value = operation && typeof operation === "object" ? operation : {};
const prefix = type === "help" ? "help" : "assessment";
@@ -47,15 +58,19 @@ function normalizeEvaluationReports(evaluation) {
const root = evaluation && typeof evaluation === "object" ? evaluation : {};
const help = normalizeOperation(root.help || root.helpEvaluation, root, "help");
const assessment = normalizeOperation(root.assessment || root.assessmentEvaluation, root, "assessment");
- const assessmentReportData = safeParseJson(root.assessmentReportJson);
+ const assessmentReportValue = assessment.report || assessment.content || assessment.feedback;
+ const assessmentReportData = safeParseJson(root.assessmentReportJson) || safeParseJson(assessmentReportValue) || {};
return {
help,
assessment,
helpReport: formatReport(help.report || help.content || help.suggestion),
- assessmentReport: formatReport(assessment.report || assessment.content || assessment.feedback),
+ assessmentReport: formatReport(assessmentReportValue),
score: root.assessmentScore ?? assessment.score ?? assessmentReportData?.score ?? root.score ?? null,
scoreCriteria: normalizeCriteria(assessmentReportData?.criteria || assessment.scoreCriteria || root.scoreCriteria),
+ assessmentSummary: String(assessmentReportData?.overallComment || assessmentReportData?.summary || "").trim(),
+ strengths: normalizeTextList(assessmentReportData?.strengths),
+ improvements: normalizeTextList(assessmentReportData?.improvements),
};
}
diff --git a/src/views/schoolAdmin/trainingTask/index.vue b/src/views/schoolAdmin/trainingTask/index.vue
index a03e5fb..3557550 100644
--- a/src/views/schoolAdmin/trainingTask/index.vue
+++ b/src/views/schoolAdmin/trainingTask/index.vue
@@ -72,7 +72,7 @@
{{ dialogMode === "view" ? "Training Task Preview" : "Training Task Editor" }}
{{ dialogMode === "view" ? "查看实训任务" : "编辑实训任务" }}
-
管理员维护系统默认实训配置,教学班未单独配置时学生端使用这里的实训背景、目标、要求和案例文档。
+
管理员维护系统默认实训配置;步骤数量与学生端保持一致,只能修改步骤名称。
-
+
@@ -198,6 +196,7 @@ import {
updateTrainingTask,
uploadTrainingTaskMaterial,
} from "@/api/trainingTask";
+import { getStudentTrainingStepCount } from "@/views/training/taskKeyMap";
const { proxy } = getCurrentInstance();
@@ -315,7 +314,7 @@ function normalizeTask(task) {
requirements: task.requirements || "",
materialName: material.name,
materialUrl: material.url,
- steps: normalizeSteps(parseArray(task.steps, createBuiltinSteps())),
+ steps: normalizeTaskSteps(task.taskKey, parseArray(task.steps, [])),
sort: task.sort || 0,
enabled: task.enabled !== false,
};
@@ -354,17 +353,16 @@ function parseArray(value, fallback) {
}
}
-function normalizeSteps(steps) {
+function normalizeTaskSteps(taskKey, steps) {
const source = Array.isArray(steps) ? steps : [];
- const result = source
- .map((item, index) => {
- const raw = item && typeof item === "object" ? item : {};
- const name = typeof item === "object" ? String(raw.name || "").trim() : String(item || "").trim();
- const kind = raw.kind === "custom" ? "custom" : index < 4 ? "builtin" : "custom";
- return createStep(name, kind, raw.id);
- })
- .filter((item) => item.name);
- return result.length ? result : [createStep()];
+ const expectedCount = getStudentTrainingStepCount(taskKey);
+ return Array.from({ length: expectedCount }, (_, index) => {
+ const item = source[index];
+ const raw = item && typeof item === "object" ? item : {};
+ const savedName = typeof item === "object" ? String(raw.name || "").trim() : String(item || "").trim();
+ const name = savedName || `步骤 ${String(index + 1).padStart(2, "0")}`;
+ return createStep(name, "builtin", `builtin-${index + 1}`);
+ });
}
function createBuiltinSteps() {
@@ -390,7 +388,7 @@ function cloneTask(task) {
return {
...task,
objectives: [...(task.objectives?.length ? task.objectives : [""])],
- steps: normalizeSteps(task.steps?.length ? task.steps : createBuiltinSteps()),
+ steps: normalizeTaskSteps(task.taskKey, task.steps),
};
}
@@ -403,15 +401,6 @@ function removeObjective(index) {
taskForm.objectives.splice(index, 1);
}
-function addStep() {
- taskForm.steps.push(createStep());
-}
-
-function removeStep(index) {
- if (taskForm.steps.length <= 1) return;
- taskForm.steps.splice(index, 1);
-}
-
async function handleImportChange(file) {
if (!file?.raw) return;
await importTrainingTasks(file.raw);
@@ -466,6 +455,7 @@ async function submitTask() {
}
function buildPayload() {
+ const fixedSteps = normalizeTaskSteps(taskForm.taskKey, taskForm.steps);
return {
projectName: taskForm.project,
taskKey: taskForm.taskKey,
@@ -473,7 +463,7 @@ function buildPayload() {
background: taskForm.background,
objectives: JSON.stringify(taskForm.objectives.map((item) => item.trim()).filter(Boolean)),
requirements: taskForm.requirements,
- steps: JSON.stringify(taskForm.steps.map((item) => ({ ...item, name: item.name.trim() })).filter((item) => item.name)),
+ steps: JSON.stringify(fixedSteps),
materialName: taskForm.materialName,
materialUrl: taskForm.materialUrl,
sort: taskForm.sort,
@@ -1195,10 +1185,6 @@ function buildPayload() {
flex: 1 1 260px;
}
- .add-step-button {
- border-style: dashed;
- }
-
.step-arrow {
color: #7ddaff;
font-weight: 800;
diff --git a/src/views/teacherEnd/class/index.vue b/src/views/teacherEnd/class/index.vue
index 8376ff9..463622b 100644
--- a/src/views/teacherEnd/class/index.vue
+++ b/src/views/teacherEnd/class/index.vue
@@ -91,20 +91,6 @@
-
-
-
- 导入名单创建
-
- 模板下载
-
-
-
+
+
@@ -48,8 +49,6 @@
diff --git a/src/views/teacherEnd/student/index.vue b/src/views/teacherEnd/student/index.vue
index 56f7e9c..cc84d8d 100644
--- a/src/views/teacherEnd/student/index.vue
+++ b/src/views/teacherEnd/student/index.vue
@@ -11,7 +11,7 @@
班级:
-
+
@@ -403,6 +403,11 @@ const normalizeClassType = (schoolClass) => {
return schoolClass?.createdBy ? "TEACHING" : "ADMIN";
};
const sameValue = (left, right) => String(left || "") === String(right || "");
+const classCreateTime = (schoolClass) => {
+ if (!schoolClass?.createTime) return Number.MAX_SAFE_INTEGER;
+ const value = new Date(schoolClass.createTime).getTime();
+ return Number.isNaN(value) ? Number.MAX_SAFE_INTEGER : value;
+};
const canUseAdminClassForStudent = (schoolClass) => {
if (normalizeClassType(schoolClass) !== "ADMIN") return false;
return !schoolClass?.schoolId || sameValue(schoolClass.schoolId, currentSchoolId.value);
@@ -414,7 +419,7 @@ const teachingClassOptions = computed(() =>
normalizeClassType(schoolClass) === "TEACHING" &&
sameValue(schoolClass.schoolId, currentSchoolId.value) &&
(isManagerTeacher.value || sameValue(schoolClass.createdBy, currentUserId.value))
- )
+ ).sort((left, right) => classCreateTime(left) - classCreateTime(right))
);
const studentClassOptions = computed(() => teachingClassOptions.value);
const currentTeachingClassId = () => {
@@ -430,10 +435,19 @@ const beforeImportStudents = (file) => {
return true;
};
const getClassList = () => {
- indexApi.getClassListBySchoolId({ schoolId: userStore.userInfo.schoolId }).then((res) => {
+ return indexApi.getClassListBySchoolId({ schoolId: userStore.userInfo.schoolId }).then((res) => {
classList.value = res.data;
});
};
+const selectDefaultStudentClass = () => {
+ if (!isManagerTeacher.value && !paramsquery.value.schoolClassId) {
+ paramsquery.value.schoolClassId = teachingClassOptions.value[0]?.schoolClassId || "";
+ }
+};
+const handleClassFilterChange = () => {
+ paramsquery.value.index = 1;
+ getList();
+};
const classList1 = ref([]);
// 根据专业查班级
const getClassByMajor = () => {
@@ -484,8 +498,9 @@ const initPassword = (row, status) => {
};
onMounted(async () => {
await userStore.ensureSchoolProductConfig().catch(() => null);
+ await getClassList();
+ selectDefaultStudentClass();
getList();
- getClassList();
if (!isTeacherRosterMode.value) {
getFacultyList();
}
diff --git a/src/views/teacherEnd/teacher/index.vue b/src/views/teacherEnd/teacher/index.vue
index 379ccc5..68ac928 100644
--- a/src/views/teacherEnd/teacher/index.vue
+++ b/src/views/teacherEnd/teacher/index.vue
@@ -45,8 +45,19 @@
>
-
-
+
+
+
+ {{ className }}
+
+ 暂无班级
+
+
+
+
+ {{ Number(row.ownedStudentCount || 0) }} 人
+
+
{{ formatDate(row.createTime) }}
@@ -57,6 +68,7 @@
编辑
删除
+ 密码初始化
该教师已创建班级,不允许编辑或删除
仅查看
@@ -101,6 +113,8 @@
支持 CSV、TXT、XLS、XLSX,文件不超过 5MB。