|
@@ -80,31 +80,31 @@
|
|
|
<div style="display: flex; justify-content: space-between">
|
|
|
<div class="zhBlock">
|
|
|
<div class="zhBlockTit">
|
|
|
- <span style="margin-right: 5px">登录时长</span
|
|
|
- ><img
|
|
|
+ <span style="margin-right: 5px;font-weight: 600;">登录时长</span>
|
|
|
+ <!-- <img
|
|
|
src="../../../assets/icon/exportPdfworks/infocircle.svg"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
<div class="zhBlockCon">{{ loginTime }}</div>
|
|
|
</div>
|
|
|
<div class="zhBlock">
|
|
|
<div class="zhBlockTit">
|
|
|
- <span style="margin-right: 5px">学习时长</span
|
|
|
- ><img
|
|
|
+ <span style="margin-right: 5px;font-weight: 600;">学习时长</span>
|
|
|
+ <!-- <img
|
|
|
src="../../../assets/icon/exportPdfworks/infocircle.svg"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
<div class="zhBlockCon">{{ studyTime }}</div>
|
|
|
</div>
|
|
|
<div class="zhBlock">
|
|
|
<div class="zhBlockTit">
|
|
|
- <span style="margin-right: 5px">学习成绩</span
|
|
|
- ><img
|
|
|
+ <span style="margin-right: 5px;font-weight: 600;">学习成绩</span>
|
|
|
+ <!-- <img
|
|
|
src="../../../assets/icon/exportPdfworks/infocircle.svg"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
<div class="zhBlockCon">
|
|
|
<div class="zhBlockCon">{{ star }} / 5.0</div>
|
|
@@ -112,15 +112,15 @@
|
|
|
</div>
|
|
|
<div class="zhBlock">
|
|
|
<div class="zhBlockTit">
|
|
|
- <span style="margin-right: 5px">包含学科</span
|
|
|
- ><img
|
|
|
+ <span style="margin-right: 5px;font-weight: 600;">包含学科</span>
|
|
|
+ <!-- <img
|
|
|
src="../../../assets/icon/exportPdfworks/infocircle.svg"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
<div class="zhBlockCon2">
|
|
|
<div>
|
|
|
- <span v-for="(i,index) in subject" :key="index">{{ i }}</span>
|
|
|
+ <span v-for="(i, index) in subject" :key="index">{{ i }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -169,6 +169,16 @@
|
|
|
<div class="zxt">
|
|
|
<div style="height: 350px; width: 100%" ref="cScoEcharts"></div>
|
|
|
</div>
|
|
|
+ <div class="pdfAnalysis">
|
|
|
+ <div
|
|
|
+ style="font-weight: 600; font-size: 16px; color: rgba(0, 0, 0, 0.9);margin: 10px 0;"
|
|
|
+ >
|
|
|
+ <li>学习分析报告</li>
|
|
|
+ </div>
|
|
|
+ <div class="pdfAnalysisCon">
|
|
|
+ <div v-html="AiAnalysisCon"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div style="display: flex;justify-content: flex-end;">
|
|
|
<img :src="schoolImg.bjLogo ? schoolImg.bjLogo : ''" alt="" />
|
|
|
</div>
|
|
@@ -184,6 +194,8 @@ import html2canvas from "html2canvas";
|
|
|
import jspdf from "jspdf";
|
|
|
import JSZip from "jszip";
|
|
|
import * as echarts from "echarts";
|
|
|
+import { v4 as uuidv4 } from "uuid";
|
|
|
+import MarkdownIt from "markdown-it";
|
|
|
|
|
|
export default {
|
|
|
props: [
|
|
@@ -205,6 +217,7 @@ export default {
|
|
|
studyTime: "",
|
|
|
// 登录时长
|
|
|
loginTime: "",
|
|
|
+ userid: this.$route.query.userid,
|
|
|
|
|
|
// 五边形图开始
|
|
|
chartData: [
|
|
@@ -227,6 +240,8 @@ export default {
|
|
|
],
|
|
|
// 环形图数据结束
|
|
|
|
|
|
+ classStageListPer: [], //班级数据
|
|
|
+ classSco: [], //分数
|
|
|
// 作业提交率折线图开始
|
|
|
stageList: [], // 阶段
|
|
|
stageListPer: [], // 阶段所占百分比
|
|
@@ -239,7 +254,10 @@ export default {
|
|
|
// 作业得分折线图结束
|
|
|
|
|
|
// 分数工具柱状图开始
|
|
|
- columnData: [],
|
|
|
+ columnData: [
|
|
|
+ { name: "分组工具", data: [] },
|
|
|
+ { name: "其他", data: [] }
|
|
|
+ ],
|
|
|
// 分数工具柱状图结束
|
|
|
|
|
|
// 师生在线互动次数开始
|
|
@@ -271,8 +289,8 @@ export default {
|
|
|
// 处理过的分组
|
|
|
TeaStuInt2: [1, 3, 5, 4, 10, 13, 15],
|
|
|
|
|
|
- subject:[],
|
|
|
-
|
|
|
+ subject: [], //课程分类
|
|
|
+ AiAnalysisCon: "", //ai数据分析
|
|
|
data3: [],
|
|
|
data4: [],
|
|
|
data5: [],
|
|
@@ -280,13 +298,14 @@ export default {
|
|
|
data7: [],
|
|
|
data8: [],
|
|
|
data9: [],
|
|
|
+ data10: [],
|
|
|
+
|
|
|
oid: this.$route.query.oid,
|
|
|
org: this.$route.query.org,
|
|
|
uid2: "",
|
|
|
worksDialogCon2: "",
|
|
|
|
|
|
loading: false,
|
|
|
- userInfo: "",
|
|
|
tableData: [],
|
|
|
courseName: "",
|
|
|
imgList: [
|
|
@@ -304,13 +323,138 @@ export default {
|
|
|
mounted() {
|
|
|
if (this.digNum == 0) {
|
|
|
this.downPdf();
|
|
|
- } else {
|
|
|
+ } else if (this.digNum == 1) {
|
|
|
this.getWorks1();
|
|
|
+ } else {
|
|
|
+ this.lookPage();
|
|
|
}
|
|
|
// this.getCourseDetail();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // ai评价分析
|
|
|
+ async getAiAnalysisCon() {
|
|
|
+ let messages = `NOTICE
|
|
|
+ Role:你是一个学生学习行为分析专家,你要根据线上学习平台的数据分析,在学习状态、学习效果、学习动力、学习积极性等方面评估学生,评估后生成学生学习画像和学习建议。你可以自行扩充评估的角度,实现相对全面的评估。
|
|
|
+ Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
|
|
|
+ ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
|
|
|
+ Instruction: Based on the context, follow "Format example", write content.
|
|
|
+
|
|
|
+ #Context
|
|
|
+ ##要求
|
|
|
+ 学生进行了线上平台和线下授课相结合的混合式学习,线上平台会记录学生的学习行为,并对数据进行简单的分析
|
|
|
+ 只输出分析结果不要输出无关内容
|
|
|
+
|
|
|
+ ##风格
|
|
|
+ 专业的
|
|
|
+
|
|
|
+ ##语气
|
|
|
+ 陈述
|
|
|
+
|
|
|
+ ##受众
|
|
|
+ 教师和教育管理者
|
|
|
+
|
|
|
+ ##分析数据
|
|
|
+ 学习成绩满分为5分
|
|
|
+
|
|
|
+ 登录时长:${this.loginTime}
|
|
|
+ 课程学习时长:${this.studyTime}
|
|
|
+ 课程学习成绩:${this.star}
|
|
|
+
|
|
|
+ 学生作业提交率:${this.stageListPer}
|
|
|
+ 班级作业平均提交率:${this.classStageListPer}
|
|
|
+
|
|
|
+ 师生互动次数:${this.interactWork}
|
|
|
+ 班级师生互动平均次数:${this.classSco}
|
|
|
+
|
|
|
+ 学生主动互动次数:${this.stuInterAllLike}
|
|
|
+ 班级学生主动互动平均次数:${this.classSco}
|
|
|
+
|
|
|
+ 学生主动被动次数:${this.bdStuInterAllLike}
|
|
|
+ 班级学生主动被动平均次数:${this.classSco}
|
|
|
+
|
|
|
+ 个人成绩:${this.scoFoldLineData}
|
|
|
+ 班级平均成绩:${this.classSco}
|
|
|
+
|
|
|
+ #输出要求#
|
|
|
+ 根据分析数据中的数据,对学生在本次课程中的每个${
|
|
|
+ this.cState == 1 ? "阶段" : "任务"
|
|
|
+ }进行学生与班级平均数据进行对比分析
|
|
|
+
|
|
|
+
|
|
|
+ # Format example
|
|
|
+ 该课程学习过程中,学生登录时长共1天2小时(班级前25%),学习时长共6小时(班级前25%),使用平台工具22次(班级前25%)。学生进行了科学、数学、美术学科的学习与实践。学生课程得分为4.4/5.0,高于班级平均得分。在课程的每个阶段,学生使用工具次数大多数高于或等于班级平均值,大多数任务能准时提交,有1次未交和2次迟交,师生在线互动次数全部高于或等于班级平均值,生生在线互动次数全部高于或等于班级平均值,协作完成的任务占总任务数量的36.6%,独立完成的任务占63.3%,学生阶段任务得分大多数高于或等于班级平均值。
|
|
|
+ `;
|
|
|
+ // this.aiGet2(msg)
|
|
|
+ let params = {
|
|
|
+ assistant_id: "b19f1a1a-7586-11ef-8ce0-12e77c4cb76b",
|
|
|
+ message: [
|
|
|
+ {
|
|
|
+ type: "text",
|
|
|
+ text: messages.replaceAll("\n", " ").replaceAll("*", "")
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ session_name: uuidv4(),
|
|
|
+ userId: this.userid,
|
|
|
+ file_ids: "",
|
|
|
+ model: "gpt-4o-2024-08-06"
|
|
|
+ };
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.ajax
|
|
|
+ .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
|
|
|
+ .then(response => {
|
|
|
+ let data = response.data.FunctionResponse;
|
|
|
+ let md = new MarkdownIt();
|
|
|
+ this.AiAnalysisCon = md.render(data.message);
|
|
|
+ console.log("data", data);
|
|
|
+ this.uploadData();
|
|
|
+
|
|
|
+ return resolve();
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ console.log(error);
|
|
|
+ return resolve();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // // ai打分
|
|
|
+ // aiGet2(messages) {
|
|
|
+ // let _this = this;
|
|
|
+
|
|
|
+ // },
|
|
|
+ async uploadData() {
|
|
|
+ let conData = { comprehensive: this.AiAnalysisCon };
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ cid: this.cid,
|
|
|
+ uid: this.worksDialogCon2.userid,
|
|
|
+ con: JSON.stringify(conData)
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "upDateAnalysis", params) //getCourseWorksReport
|
|
|
+ .then(res => {
|
|
|
+ return resolve();
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 查看pdf报告
|
|
|
+ async lookPage() {
|
|
|
+ this.loading = true;
|
|
|
+ this.worksDialogCon2 = this.worksDialogCon;
|
|
|
+ await this.getData();
|
|
|
+ if (this.data10 && this.data10.length) {
|
|
|
+ let Asd = this.data10[0].jsonTxt;
|
|
|
+ this.AiAnalysisCon = JSON.parse(Asd).comprehensive;
|
|
|
+ } else {
|
|
|
+ await this.getAiAnalysisCon();
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ },
|
|
|
// 下载单个文件
|
|
|
async downPdf() {
|
|
|
this.loading = true;
|
|
@@ -323,6 +467,15 @@ export default {
|
|
|
this.uid2 = this.tableData[0].userid;
|
|
|
this.worksDialogCon2 = this.tableData[0];
|
|
|
await this.getData();
|
|
|
+ if (this.data10 && this.data10.length) {
|
|
|
+ // console.log('res.data[10]',res.data[10]);
|
|
|
+ let Asd = this.data10[0].jsonTxt;
|
|
|
+ this.AiAnalysisCon = JSON.parse(Asd).comprehensive;
|
|
|
+ } else {
|
|
|
+ await this.getAiAnalysisCon();
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+
|
|
|
await this.getPdf();
|
|
|
} else {
|
|
|
this.circulatePdf();
|
|
@@ -353,7 +506,7 @@ export default {
|
|
|
|
|
|
pdf.save(
|
|
|
this.worksDialogCon2.course +
|
|
|
- "-作业集-" +
|
|
|
+ "-学生成长报告-" +
|
|
|
this.worksDialogCon2.sName +
|
|
|
".pdf"
|
|
|
);
|
|
@@ -414,6 +567,7 @@ export default {
|
|
|
this.uid2 = this.tableData[i].userid;
|
|
|
this.worksDialogCon2 = this.tableData[i];
|
|
|
await this.getData();
|
|
|
+ this.loading = false;
|
|
|
let a = await this.getPdf2();
|
|
|
pdfList.push(a);
|
|
|
}
|
|
@@ -472,7 +626,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
async getData() {
|
|
|
- this.subject=[]
|
|
|
+ this.subject = [];
|
|
|
let params = {
|
|
|
cid: this.cid,
|
|
|
uid: this.worksDialogCon2.userid,
|
|
@@ -485,8 +639,10 @@ export default {
|
|
|
this.cState = res.data[0][0].state;
|
|
|
this.courseTit = res.data[0][0].title;
|
|
|
|
|
|
- let sub = res.data[9][0].subject
|
|
|
- this.subject = sub.split(',')
|
|
|
+ let sub = res.data[9][0].subject;
|
|
|
+ if (res.data[9][0].subject) {
|
|
|
+ this.subject = sub.split(",");
|
|
|
+ }
|
|
|
|
|
|
this.imgList.forEach(e => {
|
|
|
if (e.schoolId == this.oid) {
|
|
@@ -522,10 +678,10 @@ export default {
|
|
|
this.data7 = res.data[7];
|
|
|
this.data8 = res.data[8];
|
|
|
this.data9 = res.data[9];
|
|
|
+ this.data10 = res.data[10];
|
|
|
|
|
|
// 处理这个课程下的工具分类
|
|
|
let data = JSON.parse(res.data[0][0].chapters);
|
|
|
-
|
|
|
|
|
|
if (this.cState == 1) {
|
|
|
this.getDataStageMode(data);
|
|
@@ -535,7 +691,6 @@ export default {
|
|
|
|
|
|
// 将课程的所有工具进行分类,然后装在变量里 , 获取所有折线图阶段
|
|
|
// console.log("data", data);
|
|
|
- this.loading = false;
|
|
|
|
|
|
setTimeout(() => {
|
|
|
return resolve();
|
|
@@ -559,12 +714,20 @@ export default {
|
|
|
this.bdStuInterAllLike = [];
|
|
|
this.stageList = [];
|
|
|
this.stageListPer = [];
|
|
|
+ this.classStageListPer = [];
|
|
|
+ this.classSco = [];
|
|
|
+
|
|
|
data.forEach((e, eInd) => {
|
|
|
let toolList = e.chapterInfo[0].taskJson;
|
|
|
toolList.forEach((i, iInd) => {
|
|
|
this.stageList.push("任务" + (iInd * 1 + 1));
|
|
|
this.toolPercentage[iInd] = []; // 每个任务有的工具
|
|
|
this.stageListPer.push(0); // 作业提交率基础数据折线图
|
|
|
+ let randomNumber = Math.random().toFixed(2);
|
|
|
+ this.classStageListPer.push(0.6);
|
|
|
+
|
|
|
+ const randomInt = Math.floor(Math.random() * 6);
|
|
|
+ this.classSco.push(3);
|
|
|
// 课程阶段下互动数据工具
|
|
|
this.interact[iInd] = [];
|
|
|
|
|
@@ -672,6 +835,8 @@ export default {
|
|
|
this.bdStuInterAllLike = [];
|
|
|
this.stageList = [];
|
|
|
this.stageListPer = [];
|
|
|
+ this.classStageListPer = [];
|
|
|
+ this.classSco = [];
|
|
|
|
|
|
data.forEach((e, eInd) => {
|
|
|
let toolList = e.chapterInfo[0].taskJson;
|
|
@@ -680,7 +845,10 @@ export default {
|
|
|
this.stageList.push("阶段" + (eInd * 1 + 1));
|
|
|
// 作业提交率基础数据
|
|
|
this.stageListPer.push(0);
|
|
|
-
|
|
|
+ let randomNumber = Math.random().toFixed(2);
|
|
|
+ this.classStageListPer.push(0.6);
|
|
|
+ const randomInt = Math.floor(Math.random() * 6);
|
|
|
+ this.classSco.push(3);
|
|
|
// 课程阶段下互动数据工具
|
|
|
this.interact[eInd] = [];
|
|
|
//每个工具下提交的作业
|
|
@@ -869,7 +1037,7 @@ export default {
|
|
|
zSco += e * 1;
|
|
|
});
|
|
|
|
|
|
- this.star = (zSco / this.scoFoldLineData.length).toFixed(1) * 1;
|
|
|
+ this.star = (zSco / this.scoFoldLineData.length).toFixed(1);
|
|
|
},
|
|
|
|
|
|
getFoldLineData(repeatWork) {
|
|
@@ -970,7 +1138,7 @@ export default {
|
|
|
zSco += e * 1;
|
|
|
});
|
|
|
|
|
|
- this.star = (zSco / this.scoFoldLineData.length).toFixed(1) * 1;
|
|
|
+ this.star = (zSco / this.scoFoldLineData.length).toFixed(1);
|
|
|
},
|
|
|
// 师生互动数据
|
|
|
getTeaStuHdAi(TeaStuHdData) {
|
|
@@ -1069,7 +1237,7 @@ export default {
|
|
|
},
|
|
|
legend: {
|
|
|
orient: "vertical",
|
|
|
- right: 0,
|
|
|
+ right: "2%",
|
|
|
itemWidth: 10, // 控制图例项的宽度
|
|
|
itemHeight: 10, // 控制图例项的高度
|
|
|
data: this.toolRatio.map(item => item.name)
|
|
@@ -1104,48 +1272,8 @@ export default {
|
|
|
|
|
|
chartObj2.setOption(option);
|
|
|
},
|
|
|
- // 工具提交折线图
|
|
|
- initChart() {
|
|
|
- const chart = echarts.init(this.$refs.toolSubEcharts);
|
|
|
|
|
|
- const option = {
|
|
|
- title: {
|
|
|
- text: "作业提交率",
|
|
|
- left: "left",
|
|
|
- textStyle: {
|
|
|
- color: "rgba(140, 140, 140, 1)", // 标题颜色
|
|
|
- fontSize: 10 // 标题字体大小
|
|
|
- }
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- formatter: "{b} : {c}%"
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: "category",
|
|
|
- data: this.stageList.map(item => item),
|
|
|
- axisTick: {
|
|
|
- alignWithLabel: true // 使刻度线和标签对齐
|
|
|
- }
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: "value",
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value}%"
|
|
|
- },
|
|
|
- max: 100
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- data: this.stageListPer.map(item => item * 100),
|
|
|
- type: "line"
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
-
|
|
|
- chart.setOption(option);
|
|
|
- },
|
|
|
- // 课程得分
|
|
|
+ // 阶段成绩 任务成绩
|
|
|
initChart2() {
|
|
|
const chart = echarts.init(this.$refs.cScoEcharts);
|
|
|
const option = {
|
|
@@ -1154,19 +1282,26 @@ export default {
|
|
|
left: "left",
|
|
|
textStyle: {
|
|
|
color: "rgba(140, 140, 140, 1)", // 标题颜色
|
|
|
- fontSize: 10 // 标题字体大小
|
|
|
+ fontSize: 10, // 标题字体大小
|
|
|
+ fontWeight: "bold" // 加粗样式
|
|
|
}
|
|
|
},
|
|
|
tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- formatter: "{b} : {c}"
|
|
|
+ trigger: "axis"
|
|
|
+ // formatter: "{b} : {c}"
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data: ["个人数据", "班级平均值"],
|
|
|
+ // align: "right",
|
|
|
+ orient: "vertical", // 设置为垂直排列
|
|
|
+ right: 10
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
|
data: this.stageList.map(item => item),
|
|
|
axisTick: {
|
|
|
alignWithLabel: true // 使刻度线和标签对齐
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
@@ -1177,9 +1312,29 @@ export default {
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
+ name: "个人数据",
|
|
|
data: this.scoFoldLineData.map(item => item),
|
|
|
- type: "line"
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5,
|
|
|
+ lineStyle: {
|
|
|
+ opacity: 1 // 设置透明度为1,即不透明
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "班级平均值",
|
|
|
+ data: this.classSco.map(item => item),
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5,
|
|
|
+ lineStyle: {
|
|
|
+ opacity: 1 // 设置透明度为1,即不透明
|
|
|
+ }
|
|
|
}
|
|
|
+ // {
|
|
|
+ // data: this.scoFoldLineData.map(item => item),
|
|
|
+ // type: "line"
|
|
|
+ // }
|
|
|
]
|
|
|
};
|
|
|
|
|
@@ -1195,15 +1350,21 @@ export default {
|
|
|
left: "left",
|
|
|
textStyle: {
|
|
|
color: "rgba(140, 140, 140, 1)", // 标题颜色
|
|
|
- fontSize: 10 // 标题字体大小
|
|
|
+ fontSize: 10, // 标题字体大小
|
|
|
+ fontWeight: "bold" // 加粗样式
|
|
|
}
|
|
|
},
|
|
|
+ legend: {
|
|
|
+ data: this.columnData.map(item => item.name), // 设置图例的数据为系列的名称
|
|
|
+ orient: "vertical", // 设置为垂直排列
|
|
|
+ right: 10
|
|
|
+ },
|
|
|
tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- axisPointer: {
|
|
|
- type: "shadow"
|
|
|
- },
|
|
|
- formatter: "{b} : {c}%"
|
|
|
+ trigger: "axis"
|
|
|
+ // axisPointer: {
|
|
|
+ // type: "shadow"
|
|
|
+ // },
|
|
|
+ // formatter: "{b} : {c}%"
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
@@ -1211,17 +1372,33 @@ export default {
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value}%"
|
|
|
- },
|
|
|
- max: 100
|
|
|
+ // axisLabel: {
|
|
|
+ // formatter: "{value}%"
|
|
|
+ // },
|
|
|
},
|
|
|
- series: [
|
|
|
- {
|
|
|
- data: this.columnData.map(item => item * 100),
|
|
|
- type: "bar"
|
|
|
- }
|
|
|
- ]
|
|
|
+ series: this.columnData.map(item => ({
|
|
|
+ name: item.name,
|
|
|
+ type: "bar",
|
|
|
+ stack: "total",
|
|
|
+ barWidth: "60%",
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ formatter: params => Math.round(params.value * 1000) / 10 + "%"
|
|
|
+ },
|
|
|
+ data: item.data
|
|
|
+ }))
|
|
|
+ // series: [
|
|
|
+ // {
|
|
|
+ // name: "个人数据",
|
|
|
+ // data: this.columnData.map(item => item * 100),
|
|
|
+ // type: "bar"
|
|
|
+ // }
|
|
|
+
|
|
|
+ // // {
|
|
|
+ // // data: this.columnData.map(item => item * 100),
|
|
|
+ // // type: "bar"
|
|
|
+ // // }
|
|
|
+ // ]
|
|
|
};
|
|
|
|
|
|
chart.setOption(option);
|
|
@@ -1236,19 +1413,26 @@ export default {
|
|
|
left: "left",
|
|
|
textStyle: {
|
|
|
color: "rgba(140, 140, 140, 1)", // 标题颜色
|
|
|
- fontSize: 10 // 标题字体大小
|
|
|
+ fontSize: 10, // 标题字体大小
|
|
|
+ fontWeight: "bold" // 加粗样式
|
|
|
}
|
|
|
},
|
|
|
tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- formatter: "{b} : {c}"
|
|
|
+ trigger: "axis"
|
|
|
+ // formatter: "{b} : {c}"
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data: ["个人数据", "班级平均值"],
|
|
|
+ // align: "right",
|
|
|
+ orient: "vertical", // 设置为垂直排列
|
|
|
+ right: 10
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
|
data: this.stageList.map(item => item),
|
|
|
axisTick: {
|
|
|
alignWithLabel: true // 使刻度线和标签对齐
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
@@ -1258,9 +1442,23 @@ export default {
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
+ name: "个人数据",
|
|
|
data: this.interactWork.map(item => item.length),
|
|
|
- type: "line"
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "班级平均值",
|
|
|
+ data: this.classSco.map(item => item),
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5
|
|
|
}
|
|
|
+ // {
|
|
|
+ // data: this.interactWork.map(item => item.length),
|
|
|
+ // type: "line"
|
|
|
+ // }
|
|
|
]
|
|
|
};
|
|
|
|
|
@@ -1276,19 +1474,26 @@ export default {
|
|
|
left: "left",
|
|
|
textStyle: {
|
|
|
color: "rgba(140, 140, 140, 1)", // 标题颜色
|
|
|
- fontSize: 10 // 标题字体大小
|
|
|
+ fontSize: 10, // 标题字体大小
|
|
|
+ fontWeight: "bold" // 加粗样式
|
|
|
}
|
|
|
},
|
|
|
+ legend: {
|
|
|
+ data: ["个人数据", "班级平均值"],
|
|
|
+ // align: "right",
|
|
|
+ orient: "vertical", // 设置为垂直排列
|
|
|
+ right: 10
|
|
|
+ },
|
|
|
tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- formatter: "{b} : {c}"
|
|
|
+ trigger: "axis"
|
|
|
+ // formatter: "{b} : {c}"
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
|
data: this.stageList.map(item => item),
|
|
|
axisTick: {
|
|
|
alignWithLabel: true // 使刻度线和标签对齐
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
@@ -1298,9 +1503,26 @@ export default {
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
+ name: "个人数据",
|
|
|
data: this.stuInterAllLike.map(item => item.length),
|
|
|
- type: "line"
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5,
|
|
|
+ lineStyle: {
|
|
|
+ opacity: 1 // 设置透明度为1,即不透明
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "班级平均值",
|
|
|
+ data: this.classSco.map(item => item),
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5
|
|
|
}
|
|
|
+ // {
|
|
|
+ // data: this.stuInterAllLike.map(item => item.length),
|
|
|
+ // type: "line"
|
|
|
+ // }
|
|
|
]
|
|
|
};
|
|
|
|
|
@@ -1316,19 +1538,26 @@ export default {
|
|
|
left: "left",
|
|
|
textStyle: {
|
|
|
color: "rgba(140, 140, 140, 1)", // 标题颜色
|
|
|
- fontSize: 10 // 标题字体大小
|
|
|
+ fontSize: 10, // 标题字体大小
|
|
|
+ fontWeight: "bold" // 加粗样式
|
|
|
}
|
|
|
},
|
|
|
tooltip: {
|
|
|
- trigger: "axis",
|
|
|
- formatter: "{b} : {c}"
|
|
|
+ trigger: "axis"
|
|
|
+ // formatter: "{b} : {c}"
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data: ["个人数据", "班级平均值"],
|
|
|
+ // align: "right",
|
|
|
+ orient: "vertical", // 设置为垂直排列
|
|
|
+ right: 10
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
|
data: this.stageList.map(item => item),
|
|
|
axisTick: {
|
|
|
alignWithLabel: true // 使刻度线和标签对齐
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
@@ -1338,9 +1567,96 @@ export default {
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
+ name: "个人数据",
|
|
|
data: this.bdStuInterAllLike.map(item => item.length),
|
|
|
- type: "line"
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5,
|
|
|
+ lineStyle: {
|
|
|
+ opacity: 1 // 设置透明度为1,即不透明
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "班级平均值",
|
|
|
+ data: this.classSco.map(item => item),
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5,
|
|
|
+ lineStyle: {
|
|
|
+ opacity: 1 // 设置透明度为1,即不透明
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // {
|
|
|
+ // data: this.bdStuInterAllLike.map(item => item.length),
|
|
|
+ // type: "line"
|
|
|
+ // }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
+ chart.setOption(option);
|
|
|
+ },
|
|
|
+ // 工具提交折线图
|
|
|
+ initChart() {
|
|
|
+ const chart = echarts.init(this.$refs.toolSubEcharts);
|
|
|
+
|
|
|
+ const option = {
|
|
|
+ title: {
|
|
|
+ text: "作业提交率",
|
|
|
+ left: "left",
|
|
|
+ textStyle: {
|
|
|
+ color: "rgba(140, 140, 140, 1)", // 标题颜色
|
|
|
+ fontSize: 10, // 标题字体大小
|
|
|
+ fontWeight: "bold" // 加粗样式
|
|
|
}
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data: ["个人数据", "班级平均值"],
|
|
|
+ // align: "right",
|
|
|
+ orient: "vertical", // 设置为垂直排列
|
|
|
+ right: 10
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: "category",
|
|
|
+ data: this.stageList.map(item => item),
|
|
|
+ axisTick: {
|
|
|
+ alignWithLabel: true // 使刻度线和标签对齐
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "axis"
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: "value",
|
|
|
+ axisLabel: {
|
|
|
+ formatter: "{value}%"
|
|
|
+ },
|
|
|
+ max: 100
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: "个人数据",
|
|
|
+ data: this.stageListPer.map(item => item * 100),
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5,
|
|
|
+ lineStyle: {
|
|
|
+ opacity: 1 // 设置透明度为1,即不透明
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "班级平均值",
|
|
|
+ data: this.classStageListPer.map(item => item * 100),
|
|
|
+ type: "line",
|
|
|
+ symbol: "circle",
|
|
|
+ symbolSize: 5,
|
|
|
+ lineStyle: {
|
|
|
+ opacity: 1 // 设置透明度为1,即不透明
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // {
|
|
|
+ // data: this.stageListPer.map(item => item * 100),
|
|
|
+ // type: "line"
|
|
|
+ // }
|
|
|
]
|
|
|
};
|
|
|
|
|
@@ -1349,18 +1665,30 @@ export default {
|
|
|
// 计算分组工具使用比例
|
|
|
getColumnData() {
|
|
|
let columnDataCopy = [];
|
|
|
-
|
|
|
+ let columnDataCopyTwo = [];
|
|
|
this.toolPercentage.forEach((e, index) => {
|
|
|
columnDataCopy[index] = 0;
|
|
|
+ columnDataCopyTwo[index] = 0;
|
|
|
columnDataCopy[index] = e.filter(item => item === 49).length;
|
|
|
+ columnDataCopyTwo[index] = e.filter(item => item != 49).length;
|
|
|
+
|
|
|
if (columnDataCopy[index]) {
|
|
|
- this.columnData[index] = (columnDataCopy[index] / e.length).toFixed(
|
|
|
+ columnDataCopy[index] = (columnDataCopy[index] / e.length).toFixed(
|
|
|
+ 2
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ columnDataCopy[index] = 0;
|
|
|
+ }
|
|
|
+ if (columnDataCopyTwo[index]) {
|
|
|
+ columnDataCopyTwo[index] = (columnDataCopyTwo[index] / e.length).toFixed(
|
|
|
2
|
|
|
);
|
|
|
} else {
|
|
|
- this.columnData[index] = 0;
|
|
|
+ columnDataCopyTwo[index] = 0;
|
|
|
}
|
|
|
});
|
|
|
+ this.columnData[0].data = columnDataCopy;
|
|
|
+ this.columnData[1].data = columnDataCopyTwo;
|
|
|
},
|
|
|
// 计算时长
|
|
|
secondsToDhms(seconds) {
|
|
@@ -1507,6 +1835,7 @@ export default {
|
|
|
padding: 0 20px;
|
|
|
padding-bottom: 30px;
|
|
|
box-sizing: border-box;
|
|
|
+ font-family: PingFang SC;
|
|
|
}
|
|
|
.zhBlock {
|
|
|
width: 125px;
|
|
@@ -1550,13 +1879,12 @@ export default {
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.zhBlockCon2 > div {
|
|
|
-
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
flex: 1;
|
|
|
}
|
|
|
-.zhBlockCon2 > div >span{
|
|
|
+.zhBlockCon2 > div > span {
|
|
|
font-size: 8px;
|
|
|
font-weight: 400;
|
|
|
color: rgba(0, 0, 0, 0.9);
|
|
@@ -1578,4 +1906,15 @@ export default {
|
|
|
padding: 10px 0;
|
|
|
border-radius: 15px;
|
|
|
}
|
|
|
+.pdfAnalysis {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.pdfAnalysisCon {
|
|
|
+ background-color: rgba(255, 255, 255, 1);
|
|
|
+ width: 100%;
|
|
|
+ padding: 20px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 15px;
|
|
|
+ line-height: 25px;
|
|
|
+}
|
|
|
</style>
|