|
@@ -1,10 +1,15 @@
|
|
|
<template>
|
|
|
<div class="pbl">
|
|
|
- <div class="pdfCon" ref="reportPdf" v-loading="loading" element-loading-text="小可正在生成报告,请稍等。"
|
|
|
- element-loading-spinner="el-icon-loading">
|
|
|
+ <div
|
|
|
+ class="pdfCon"
|
|
|
+ ref="reportPdf"
|
|
|
+ v-loading="loading"
|
|
|
+ element-loading-text="小可正在生成报告,请稍等。"
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
+ >
|
|
|
<div class="AiBtn" v-if="isDown">
|
|
|
<div style="display: flex;">
|
|
|
- <el-button type="primary" size="small" @click="getAiAnalysisCon2"
|
|
|
+ <el-button type="primary" size="small" @click="getAiAnalysisCon3"
|
|
|
>AI分析</el-button
|
|
|
>
|
|
|
<el-button type="primary" @click="isGetPdf" size="small"
|
|
@@ -1562,13 +1567,17 @@ export default {
|
|
|
JSON.stringify(this.AiAnalysisCon2)
|
|
|
);
|
|
|
}
|
|
|
+ // else{
|
|
|
+
|
|
|
+ // await this.getAiAnalysisCon2()
|
|
|
+ // }
|
|
|
// }
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
+ // setTimeout(() => {
|
|
|
this.loading = false;
|
|
|
|
|
|
- return resolve();
|
|
|
- }, 1500);
|
|
|
+ return resolve(1);
|
|
|
+ // }, 1500);
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err);
|
|
@@ -1810,22 +1819,32 @@ export default {
|
|
|
this.loading = false;
|
|
|
return this.$message.info("请选择数据后,再进行导出");
|
|
|
}
|
|
|
+console.log('this.tableData',this.tableData);
|
|
|
|
|
|
if (this.tableData.length == 1) {
|
|
|
this.uid2 = this.tableData[0].userid;
|
|
|
this.worksDialogCon2 = this.tableData[0];
|
|
|
await this.getData();
|
|
|
+ console.log('8888');
|
|
|
+
|
|
|
|
|
|
if (this.data10 && this.data10.length) {
|
|
|
+
|
|
|
this.loading = false;
|
|
|
this.isDown = false;
|
|
|
setTimeout(() => {
|
|
|
this.getPdf();
|
|
|
}, 500);
|
|
|
}else{
|
|
|
- await this.getAiAnalysisCon2()
|
|
|
- }
|
|
|
+ console.log('getAiAnalysisCon33333333333333333333');
|
|
|
|
|
|
+ await this.getAiAnalysisCon3()
|
|
|
+ this.loading = false;
|
|
|
+ this.isDown = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.getPdf();
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.circulatePdf();
|
|
|
}
|
|
@@ -2118,7 +2137,7 @@ export default {
|
|
|
uid: this.userid,
|
|
|
mind_map_question: ""
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/chat", params)
|
|
@@ -2263,123 +2282,132 @@ export default {
|
|
|
};
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.ajax
|
|
|
- .post("https://gpt4.cocorobo.cn/chat", params)
|
|
|
- .then(response => {
|
|
|
-
|
|
|
- let data = response.data.FunctionResponse;
|
|
|
- console.log("data", data);
|
|
|
-
|
|
|
- if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
- let content = data.choices[0].message.content;
|
|
|
- this.AiAnalysisCon2.allFx = content.replaceAll("<br>", "");
|
|
|
- }
|
|
|
+ .post("https://gpt4.cocorobo.cn/chat", params)
|
|
|
+ .then(response => {
|
|
|
+ let data = response.data.FunctionResponse;
|
|
|
+ console.log("data", data);
|
|
|
|
|
|
- this.loading = false;
|
|
|
- this.canvasLing.splice(6, 1, false);
|
|
|
+ if (
|
|
|
+ data.choices &&
|
|
|
+ data.choices.length &&
|
|
|
+ data.choices[0].message
|
|
|
+ ) {
|
|
|
+ let content = data.choices[0].message.content;
|
|
|
+ this.AiAnalysisCon2.allFx = content.replaceAll("<br>", "");
|
|
|
+ }
|
|
|
|
|
|
- if (this.digNum == 0) {
|
|
|
this.loading = false;
|
|
|
- this.isDown = false;
|
|
|
- setTimeout(() => {
|
|
|
- this.getPdf();
|
|
|
- }, 500);
|
|
|
- }
|
|
|
-
|
|
|
+ this.canvasLing.splice(6, 1, false);
|
|
|
+
|
|
|
+ // if (this.digNum == 0) {
|
|
|
+ // this.loading = false;
|
|
|
+ // this.isDown = false;
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.getPdf();
|
|
|
+ // }, 500);
|
|
|
+ // }
|
|
|
|
|
|
- this.uploadData();
|
|
|
- return resolve(1)
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- this.canvasLing.splice(6, 1, false);
|
|
|
+ this.uploadData();
|
|
|
+ return resolve(1);
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ this.canvasLing.splice(6, 1, false);
|
|
|
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- })
|
|
|
-
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async getAiAnalysisCon3() {
|
|
|
+ await this.getAiAnalysisCon2();
|
|
|
+ console.log("666");
|
|
|
+ await this.updateFx();
|
|
|
+
|
|
|
+ console.log("111");
|
|
|
},
|
|
|
// 处理学习行为记录ai分析数据
|
|
|
async getAiAnalysisCon2() {
|
|
|
- this.$message.info("开始分析中...");
|
|
|
- let realData = [
|
|
|
- { per: "", cla: "", nam: "zy" },
|
|
|
- { per: "", cla: "", nam: "zb" },
|
|
|
- { per: "", cla: "", nam: "shd" },
|
|
|
- { per: "", cla: "", nam: "sshZ" },
|
|
|
- { per: "", cla: "", nam: "sshB" },
|
|
|
- { per: "", cla: "", nam: "ach" }
|
|
|
- ];
|
|
|
- for (let index = 0; index < this.canvasLing.length; index++) {
|
|
|
- this.canvasLing.splice(index, 1, true);
|
|
|
- }
|
|
|
- // 作业提交率
|
|
|
- this.stageListPer.forEach((e, index) => {
|
|
|
- realData[0].per += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
- this.classStageListPer.forEach((e, index) => {
|
|
|
- realData[0].cla += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.$message.info("开始分析中...");
|
|
|
+ let realData = [
|
|
|
+ { per: "", cla: "", nam: "zy" },
|
|
|
+ { per: "", cla: "", nam: "zb" },
|
|
|
+ { per: "", cla: "", nam: "shd" },
|
|
|
+ { per: "", cla: "", nam: "sshZ" },
|
|
|
+ { per: "", cla: "", nam: "sshB" },
|
|
|
+ { per: "", cla: "", nam: "ach" }
|
|
|
+ ];
|
|
|
+ for (let index = 0; index < this.canvasLing.length; index++) {
|
|
|
+ this.canvasLing.splice(index, 1, true);
|
|
|
+ }
|
|
|
+ // 作业提交率
|
|
|
+ this.stageListPer.forEach((e, index) => {
|
|
|
+ realData[0].per += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
+ this.classStageListPer.forEach((e, index) => {
|
|
|
+ realData[0].cla += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
|
|
|
- // 完成任务方式占比
|
|
|
- this.columnData[0].data.forEach((e, index) => {
|
|
|
- realData[1].per += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
- this.columnData[1].data.forEach((e, index) => {
|
|
|
- realData[1].cla += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
+ // 完成任务方式占比
|
|
|
+ this.columnData[0].data.forEach((e, index) => {
|
|
|
+ realData[1].per += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
+ this.columnData[1].data.forEach((e, index) => {
|
|
|
+ realData[1].cla += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
|
|
|
- // 师生互动
|
|
|
- this.interactWork.forEach((e, index) => {
|
|
|
- realData[2].per += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
- this.claInteractWork.forEach((e, index) => {
|
|
|
- realData[2].cla += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
+ // 师生互动
|
|
|
+ this.interactWork.forEach((e, index) => {
|
|
|
+ realData[2].per += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
+ this.claInteractWork.forEach((e, index) => {
|
|
|
+ realData[2].cla += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
|
|
|
- // 生生互动(主动)
|
|
|
- this.stuInterAllLike.forEach((e, index) => {
|
|
|
- realData[3].per += `任务${index + 1}:${e.length},`;
|
|
|
- });
|
|
|
- this.claAtuInterAllLike.forEach((e, index) => {
|
|
|
- realData[3].cla += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
+ // 生生互动(主动)
|
|
|
+ this.stuInterAllLike.forEach((e, index) => {
|
|
|
+ realData[3].per += `任务${index + 1}:${e.length},`;
|
|
|
+ });
|
|
|
+ this.claAtuInterAllLike.forEach((e, index) => {
|
|
|
+ realData[3].cla += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
|
|
|
- // 生生互动(被动)
|
|
|
- this.bdStuInterAllLike.forEach((e, index) => {
|
|
|
- realData[4].per += `任务${index + 1}:${e.length},`;
|
|
|
- });
|
|
|
- this.claAtuInterAllLike.forEach((e, index) => {
|
|
|
- realData[4].cla += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
+ // 生生互动(被动)
|
|
|
+ this.bdStuInterAllLike.forEach((e, index) => {
|
|
|
+ realData[4].per += `任务${index + 1}:${e.length},`;
|
|
|
+ });
|
|
|
+ this.claAtuInterAllLike.forEach((e, index) => {
|
|
|
+ realData[4].cla += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
|
|
|
- // 任务成绩
|
|
|
- this.scoFoldLineData.forEach((e, index) => {
|
|
|
- realData[5].per += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
- this.claScoFoldLineData.forEach((e, index) => {
|
|
|
- realData[5].cla += `任务${index + 1}:${e},`;
|
|
|
- });
|
|
|
+ // 任务成绩
|
|
|
+ this.scoFoldLineData.forEach((e, index) => {
|
|
|
+ realData[5].per += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
+ this.claScoFoldLineData.forEach((e, index) => {
|
|
|
+ realData[5].cla += `任务${index + 1}:${e},`;
|
|
|
+ });
|
|
|
|
|
|
- // console.log("realData", realData);
|
|
|
- this.realData = realData;
|
|
|
+ // console.log("realData", realData);
|
|
|
+ this.realData = realData;
|
|
|
|
|
|
- let forAllList = [];
|
|
|
+ let forAllList = [];
|
|
|
|
|
|
- for (let i = 0; i < realData.length; i++) {
|
|
|
- let mkAwit = this.AIPdfComment(realData[i]);
|
|
|
- forAllList.push(mkAwit);
|
|
|
- }
|
|
|
- Promise.all(forAllList)
|
|
|
- .then(async values => {
|
|
|
- // console.log(" this.AiAnalysisCon2", this.AiAnalysisCon2);
|
|
|
- for (let index = 0; index < values.length; index++) {
|
|
|
- this.canvasLing.splice(index, 1, false);
|
|
|
+ for (let i = 0; i < realData.length; i++) {
|
|
|
+ let mkAwit = this.AIPdfComment(realData[i]);
|
|
|
+ forAllList.push(mkAwit);
|
|
|
}
|
|
|
- this.updateFx();
|
|
|
- })
|
|
|
- .catch(reason => {
|
|
|
- console.error("reason", reason);
|
|
|
+ Promise.all(forAllList)
|
|
|
+ .then(async values => {
|
|
|
+ // console.log(" this.AiAnalysisCon2", this.AiAnalysisCon2);
|
|
|
+ for (let index = 0; index < values.length; index++) {
|
|
|
+ this.canvasLing.splice(index, 1, false);
|
|
|
+ }
|
|
|
+ return resolve(1)
|
|
|
+ })
|
|
|
+ .catch(reason => {
|
|
|
+ console.error("reason", reason);
|
|
|
+ });
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
// 上传ai分析
|
|
|
uploadData() {
|
|
@@ -2461,6 +2489,8 @@ export default {
|
|
|
},
|
|
|
// 一键打包所有作业
|
|
|
async circulatePdf() {
|
|
|
+ console.log('circulatePdf');
|
|
|
+
|
|
|
let _this = this;
|
|
|
var zip = new JSZip();
|
|
|
let pdfList = [];
|
|
@@ -2479,12 +2509,16 @@ export default {
|
|
|
ClaNam = this.tableData[i].class.split(",");
|
|
|
this.claV = stuCla[0];
|
|
|
this.claOptions.push({ value: stuCla[0], label: ClaNam[0] });
|
|
|
- }
|
|
|
+ }
|
|
|
this.uid2 = this.tableData[i].userid;
|
|
|
this.worksDialogCon2 = this.tableData[i];
|
|
|
|
|
|
// await this.exportPdfSet();
|
|
|
await this.getData();
|
|
|
+ if (this.data10 && this.data10.length) {
|
|
|
+ }else{
|
|
|
+ await this.getAiAnalysisCon3();
|
|
|
+ }
|
|
|
|
|
|
let a = await this.getPdf2();
|
|
|
pdfList.push(a);
|
|
@@ -4219,10 +4253,10 @@ export default {
|
|
|
border-radius: 10px;
|
|
|
position: relative;
|
|
|
}
|
|
|
-.pbl >>> .el-loading-spinner{
|
|
|
+.pbl >>> .el-loading-spinner {
|
|
|
top: 500px !important;
|
|
|
}
|
|
|
-.zxt >>> .el-loading-spinner{
|
|
|
+.zxt >>> .el-loading-spinner {
|
|
|
top: 50% !important;
|
|
|
}
|
|
|
.pdfCon {
|