|
@@ -434,7 +434,7 @@ export default {
|
|
|
fullscreenToggle: true //全屏按钮
|
|
|
}
|
|
|
},
|
|
|
- xianObj: ["DOCX", "MD", "TXT", "PDF"]
|
|
|
+ xianObj: ["DOCX", "MD", "TXT", "PDF" ,"PPTX"]
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -574,82 +574,6 @@ export default {
|
|
|
// this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
|
|
|
},
|
|
|
|
|
|
- // async generateMsg(work) {
|
|
|
- // this.ScLoading = true;
|
|
|
- // let tit = this.scoTit;
|
|
|
- // tit.forEach((e, index) => {
|
|
|
- // if (!e.isai) {
|
|
|
- // e.isai = 1;
|
|
|
- // }
|
|
|
- // });
|
|
|
- // let _fileid = "";
|
|
|
- // if (work.type == 4 || work.type == 12) {
|
|
|
- // _fileid = await this.createFileid(work.content);
|
|
|
- // }
|
|
|
- // let con = this.cuScoCon;
|
|
|
-
|
|
|
- // let laws = "";
|
|
|
- // for (let i = 0; i < tit.length; i++) {
|
|
|
- // if (tit[i].isai == 1) {
|
|
|
- // laws += `评价维度:${tit[i].value} 评价细则:${tit[i].rule} \n`;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // let msg = `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
|
|
|
- // ##要求
|
|
|
- // 根据<评价细则>和<作业内容>的相关性评价作业,只用输出作业的综合性“评语”,不要带标题,字数控制在150字左右,不要输出其他无关内容。
|
|
|
-
|
|
|
-
|
|
|
- // ##评分资料
|
|
|
- // 评价细则:${laws}
|
|
|
- // 作业内容:${_fileid ? "上传的文件内容" : con}
|
|
|
-
|
|
|
-
|
|
|
- // # Format example
|
|
|
- // 学生能够全面且正确地描述光合作用中氧气和葡萄糖的生成过程,涵盖光反应和暗反应的每个阶段和主要反应物及产物。同时,学生也能够全面、准确地解释氧气和葡萄糖在植物生命活动中的重要作用,并展示了对光合作用的深入理解。论文结构良好,内容详实,逻辑清晰,论据充分。
|
|
|
- // `;
|
|
|
- // // return console.log(msg);
|
|
|
-
|
|
|
- // this.generateRemark(msg, _fileid);
|
|
|
- // },
|
|
|
- // 重新获取评语
|
|
|
- // generateRemark(messages, _fileid) {
|
|
|
- // let _this = this;
|
|
|
-
|
|
|
- // let params = {
|
|
|
- // assistant_id: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
|
|
|
- // message: [
|
|
|
- // {
|
|
|
- // type: "text",
|
|
|
- // text: messages.replaceAll("\n", " ").replaceAll("*", "")
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // session_name: uuidv4(),
|
|
|
- // userId: this.cUserid,
|
|
|
- // file_ids: _fileid ? [_fileid] : [],
|
|
|
- // model: "gpt-4o-2024-08-06"
|
|
|
- // };
|
|
|
- // this.ajax
|
|
|
- // .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
|
|
|
- // .then(response => {
|
|
|
- // let data = response.data.FunctionResponse;
|
|
|
- // // console.log("data", data);
|
|
|
- // this.textarea = data.message;
|
|
|
- // // this.selectSWorksData()
|
|
|
- // this.ScLoading = false;
|
|
|
- // })
|
|
|
- // .catch(error => {
|
|
|
- // this.ScLoading = false;
|
|
|
-
|
|
|
- // _this.$message.error("评价失败");
|
|
|
- // console.log(error);
|
|
|
- // });
|
|
|
- // },
|
|
|
// ai评分
|
|
|
async AIsubmit(work) {
|
|
|
// return console.log("con", this.scoTit, this.cuScoCon);
|
|
@@ -770,7 +694,6 @@ export default {
|
|
|
processedData[key] = value;
|
|
|
});
|
|
|
|
|
|
- console.log(JSON.parse(JSON.stringify(processedData)),this.scoTitList);
|
|
|
|
|
|
let IsAIsuccess = 0
|
|
|
|
|
@@ -787,9 +710,19 @@ export default {
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
- if (IsAIsuccess != this.scoTitList.length) {
|
|
|
- _this.$message.error("评价失败");
|
|
|
- _this.ScLoading = false;
|
|
|
+
|
|
|
+ let scotNum = 0
|
|
|
+ this.scoTitList.forEach(e=>{
|
|
|
+ if (e.isai == 1) {
|
|
|
+ scotNum++
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ if (IsAIsuccess != scotNum) {
|
|
|
+ // _this.$message.error("评价失败");
|
|
|
+ // _this.ScLoading = false;
|
|
|
+ this.aiGet2(messages,_fileid)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -819,8 +752,9 @@ export default {
|
|
|
_this.selectSWorksData();
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- _this.ScLoading = false;
|
|
|
- _this.$message.error("评价失败");
|
|
|
+ // _this.ScLoading = false;
|
|
|
+ // _this.$message.error("评价失败");
|
|
|
+ this.aiGet2(messages,_fileid)
|
|
|
|
|
|
console.error(err);
|
|
|
});
|
|
@@ -828,8 +762,9 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
})
|
|
|
.catch(error => {
|
|
|
- _this.$message.error("评价失败");
|
|
|
- _this.ScLoading = false;
|
|
|
+ // _this.$message.error("评价失败");
|
|
|
+ // _this.ScLoading = false;
|
|
|
+ this.aiGet2(messages,_fileid)
|
|
|
|
|
|
console.log(error);
|
|
|
});
|
|
@@ -852,7 +787,7 @@ export default {
|
|
|
if (this.current < this.workList.length - 1) {
|
|
|
this.current++;
|
|
|
this.DgUid = this.workList[this.current].userid;
|
|
|
- this.selectSWorksData();
|
|
|
+ this.selectSWorksData2();
|
|
|
} else {
|
|
|
this.$message.info("已经是最后一位了");
|
|
|
}
|
|
@@ -863,7 +798,7 @@ export default {
|
|
|
|
|
|
this.current = index;
|
|
|
this.DgUid = val;
|
|
|
- this.selectSWorksData();
|
|
|
+ this.selectSWorksData2();
|
|
|
},
|
|
|
// 任务得分折叠
|
|
|
revealBtn() {
|
|
@@ -995,7 +930,101 @@ export default {
|
|
|
if (this.currentUid.type == 5) {
|
|
|
this.playerOptions.sources[0].src = this.currentUid.content;
|
|
|
}
|
|
|
- // this.current = index;
|
|
|
+ this.current = index;
|
|
|
+ this.workId = e.id;
|
|
|
+ this.appraise(e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ let likeData = res.data[1];
|
|
|
+ this.likeList = [];
|
|
|
+ likeData.forEach(e => {
|
|
|
+ if (e.workId == this.workId) {
|
|
|
+ this.likeList.push(e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ let commentData = res.data[2];
|
|
|
+ this.commentList = [];
|
|
|
+ commentData.forEach(e => {
|
|
|
+ if (e.workId == this.workId) {
|
|
|
+ this.commentList.push(e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.vLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ selectSWorksData2() {
|
|
|
+ this.vLoading = true;
|
|
|
+ this.textarea = "";
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ uid: this.DgUid,
|
|
|
+ cid: this.cid,
|
|
|
+ s: this.stage,
|
|
|
+ t: this.task,
|
|
|
+ g: this.toolIndex
|
|
|
+ };
|
|
|
+ // return console.log(params);
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectMarkDialogWorks", params)
|
|
|
+ .then(res => {
|
|
|
+ let data = res.data[0];
|
|
|
+
|
|
|
+ data.forEach(e => {
|
|
|
+ if (e.rate) {
|
|
|
+ let data2 = JSON.parse(e.rate);
|
|
|
+
|
|
|
+ e.markSco = 0;
|
|
|
+ let k = 0
|
|
|
+
|
|
|
+ for (const key in data2) {
|
|
|
+ if (data2[key] && key != "content" || data2[key] == "0" ) {
|
|
|
+ e.markSco += data2[key] * 1;
|
|
|
+ }else{
|
|
|
+ k += 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (k > 1) {
|
|
|
+ e.markSco = null;
|
|
|
+ }else{
|
|
|
+ e.markSco = (e.markSco / this.scoTitList.length).toFixed(1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ e.markSco = null;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.workList = data;
|
|
|
+
|
|
|
+ data.forEach((e, index) => {
|
|
|
+ if (e.userid == this.DgUid) {
|
|
|
+ this.currentUid = e;
|
|
|
+
|
|
|
+ if (
|
|
|
+ this.currentUid.type == 3 ||
|
|
|
+ this.currentUid.type == 10 ||
|
|
|
+ this.currentUid.type == 13
|
|
|
+ // this.currentUid.type == 15
|
|
|
+ ) {
|
|
|
+ this.currentUid.content = JSON.parse(e.content);
|
|
|
+ this.cuScoCon = this.currentUid.content.text;
|
|
|
+ }
|
|
|
+ if (this.currentUid.type == 4) {
|
|
|
+ let a = this.currentUid.content;
|
|
|
+ let data = a.slice(a.lastIndexOf(".") + 1);
|
|
|
+ this.cuScoCon = this.currentUid.content;
|
|
|
+
|
|
|
+ if (data == "pdf") {
|
|
|
+ this.ifPdf = 1;
|
|
|
+ } else {
|
|
|
+ this.ifPdf = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.currentUid.type == 5) {
|
|
|
+ this.playerOptions.sources[0].src = this.currentUid.content;
|
|
|
+ }
|
|
|
this.workId = e.id;
|
|
|
this.appraise(e);
|
|
|
}
|
|
@@ -1019,6 +1048,7 @@ export default {
|
|
|
this.vLoading = false;
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
downloadFile(url) {
|
|
|
var credentials = {
|
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|