|
@@ -17,7 +17,7 @@
|
|
|
>分
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="allD">
|
|
|
+ <div class="allD" :style="{marginLeft: isMarkSco ? '0' :'17px'}">
|
|
|
<div class="scoreStar">
|
|
|
<div
|
|
|
v-show="reveal"
|
|
@@ -28,15 +28,15 @@
|
|
|
<el-tooltip
|
|
|
class="item"
|
|
|
effect="dark"
|
|
|
- :content="e.value"
|
|
|
+ :content="e.detail"
|
|
|
placement="top"
|
|
|
>
|
|
|
- <div class="briefTit">
|
|
|
- <img class="titRoot" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
|
|
|
- {{ e.value }}
|
|
|
+ <div class="briefTit" >
|
|
|
+ <img v-if="e.isai == 1 || !e.isai" class="titRoot" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
|
|
|
+ {{ e.detail }}
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
- <el-rate v-model="e.cog"></el-rate>
|
|
|
+ <el-rate @change="submit" v-model="e.cog"></el-rate>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
@@ -48,15 +48,15 @@
|
|
|
<el-tooltip
|
|
|
class="item"
|
|
|
effect="dark"
|
|
|
- :content="e.value"
|
|
|
+ :content="e.detail"
|
|
|
placement="top"
|
|
|
>
|
|
|
<div class="briefTit">
|
|
|
- <img class="titRoot" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
|
|
|
- {{ e.value }}
|
|
|
+ <img class="titRoot" v-if="e.isai == 1 || !e.isai" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
|
|
|
+ {{ e.detail }}
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
- <el-rate v-model="e.cog"></el-rate>
|
|
|
+ <el-rate @change="submit" v-model="e.cog"></el-rate>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -81,36 +81,16 @@
|
|
|
type="textarea"
|
|
|
placeholder="您可在此输入评语"
|
|
|
v-model="textarea"
|
|
|
- style="padding-bottom: 10px;"
|
|
|
+ @blur="submit"
|
|
|
>
|
|
|
</el-input>
|
|
|
- <div
|
|
|
- class="AreaBtn"
|
|
|
- v-if="
|
|
|
- currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1
|
|
|
- "
|
|
|
- @click="generateMsg(currentUid)"
|
|
|
- >
|
|
|
- <span>重新生成</span>
|
|
|
- </div>
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
style="width:100%;display:flex;height: 25px;;justify-content: space-between;"
|
|
|
>
|
|
|
- <div
|
|
|
- class="ScrBtn"
|
|
|
- @click="AIsubmit(currentUid)"
|
|
|
- v-if="
|
|
|
- currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1
|
|
|
- "
|
|
|
- >
|
|
|
- <img
|
|
|
- src="../../../assets/icon/newIcons/Brootper.svg"
|
|
|
- alt=""
|
|
|
- />AI评分
|
|
|
- </div>
|
|
|
- <div v-else></div>
|
|
|
+
|
|
|
+ <div ></div>
|
|
|
|
|
|
<div style="display: flex;">
|
|
|
<div
|
|
@@ -118,14 +98,34 @@
|
|
|
@click="reset"
|
|
|
style="color: rgba(0, 0, 0, 0.6);background-color: rgba(243, 247, 253, 1);border: none;"
|
|
|
>
|
|
|
- 重置
|
|
|
+ 清空
|
|
|
</div>
|
|
|
+
|
|
|
<div
|
|
|
class="ScrBtn"
|
|
|
- @click="submit"
|
|
|
- style="margin-left: 10px;color:#fff;border: none;background-color: rgba(54, 129, 252, 1);"
|
|
|
+ style="margin-left: 10px;"
|
|
|
+ @click="AIsubmit(currentUid)"
|
|
|
+ v-if="
|
|
|
+ (currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1) && !isMarkSco
|
|
|
+ "
|
|
|
>
|
|
|
- 确认
|
|
|
+ <img
|
|
|
+ src="../../../assets/icon/newIcons/rootImg.png"
|
|
|
+ alt=""
|
|
|
+ />AI评分
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="ScrBtn"
|
|
|
+ style="margin-left: 10px;"
|
|
|
+ v-if="
|
|
|
+ (currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1) && isMarkSco
|
|
|
+ "
|
|
|
+ @click="noIsAi"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="../../../assets/icon/newIcons/rootImg.png"
|
|
|
+ alt=""
|
|
|
+ />AI评分
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -143,7 +143,7 @@
|
|
|
:key="index"
|
|
|
:class="['schPer', i.userid == DgUid ? 'selBlock' : '']"
|
|
|
style="cursor: pointer;"
|
|
|
- @click="cutPer(i.userid)"
|
|
|
+ @click="cutPer(i.userid,index)"
|
|
|
>
|
|
|
<img v-if="i.headportrait" :src="i.headportrait" alt="" />
|
|
|
<img
|
|
@@ -210,10 +210,12 @@
|
|
|
</div>
|
|
|
<div class="cutStuBtn">
|
|
|
<div>
|
|
|
- <span @click="prevStu" style="cursor: pointer;">上一个</span>
|
|
|
+ <span v-if="current == 0" style="cursor: pointer;color:#ccc">上一个</span>
|
|
|
+ <span v-else @click="prevStu" style="cursor: pointer;color: rgba(54, 129, 252, 1)">上一个</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span @click="nextStu" style="cursor: pointer;">下一个</span>
|
|
|
+ <span v-if="current >= workList.length -1" style="cursor: pointer;color: #ccc">下一个</span>
|
|
|
+ <span v-else @click="nextStu" style="cursor: pointer;color: rgba(54, 129, 252, 1)">下一个</span>
|
|
|
</div>
|
|
|
<!-- <div><span @click="prevStu" v-if="this.current > 0">上一个</span></div>
|
|
|
<div><span @click="nextStu" v-if="this.current < this.workList.length-1">下一个</span></div> -->
|
|
@@ -278,15 +280,19 @@
|
|
|
></iframe>
|
|
|
</div>
|
|
|
<div v-if="currentUid.type == 12" style="height: 100%;">
|
|
|
- <div>
|
|
|
+ <!-- <div style="margin-bottom: 10px;">
|
|
|
<div
|
|
|
style="cursor: pointer;"
|
|
|
@click="downloadFile(currentUid.content)"
|
|
|
>
|
|
|
- 下载txt
|
|
|
+ 下载文件
|
|
|
</div>
|
|
|
- <!-- <div>{{ currentUid.content }}</div> -->
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
+ <div>{{ TxtMd }}</div>
|
|
|
+ <!-- <div
|
|
|
+ v-html="htmlContent(currentUid.content)"
|
|
|
+ ></div> -->
|
|
|
+
|
|
|
</div>
|
|
|
<div v-if="currentUid.type == 15" style="height: 100%;">
|
|
|
<div
|
|
@@ -370,7 +376,46 @@
|
|
|
|
|
|
<script>
|
|
|
import { v4 as uuidv4 } from "uuid";
|
|
|
-
|
|
|
+import MarkdownIt from "markdown-it";
|
|
|
+const getFile = (url) => {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ var credentials = {
|
|
|
+ accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
+ secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR",
|
|
|
+ }; //秘钥形式的登录上传
|
|
|
+ window.AWS.config.update(credentials);
|
|
|
+ window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
+ let url2 = url;
|
|
|
+ let _url2 = "";
|
|
|
+ if (
|
|
|
+ url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
|
|
|
+ ) {
|
|
|
+ _url2 = url2.split(
|
|
|
+ "https://view.officeapps.live.com/op/view.aspx?src="
|
|
|
+ )[1];
|
|
|
+ } else {
|
|
|
+ _url2 = url2;
|
|
|
+ }
|
|
|
+ var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
+ let name = decodeURIComponent(
|
|
|
+ _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
|
|
|
+ );
|
|
|
+ var params = {
|
|
|
+ Bucket: "ccrb",
|
|
|
+ Key: name,
|
|
|
+ };
|
|
|
+ s3.getObject(params, function (err, data) {
|
|
|
+ if (err) {
|
|
|
+ console.log(err, err.stack);
|
|
|
+ resolve({ data: 1 });
|
|
|
+ } else {
|
|
|
+ const fileContent = data.Body.toString('utf-8');
|
|
|
+ resolve({ data: fileContent });
|
|
|
+ } // sxuccessful response
|
|
|
+ });
|
|
|
+ // axios({
|
|
|
+ });
|
|
|
+};
|
|
|
export default {
|
|
|
props: [
|
|
|
"uid",
|
|
@@ -392,7 +437,8 @@ export default {
|
|
|
workList: [], //作业列表
|
|
|
cid: this.$route.query.courseId,
|
|
|
cUserid: this.$route.query.userid, //账号登录人id
|
|
|
- cuScoCon: "",
|
|
|
+ cuScoCon: "", //学生作业内容
|
|
|
+ TxtMd:'', //txt,md作业内容
|
|
|
currentUid: {}, //当前评分框学生信息
|
|
|
current: "", //上一位下一位中的第几位
|
|
|
DgUid: this.uid, //当前评分框学生id
|
|
@@ -444,7 +490,6 @@ export default {
|
|
|
computed: {
|
|
|
totalScore() {
|
|
|
let a = 0;
|
|
|
-
|
|
|
this.scoTitList.forEach(e => {
|
|
|
if (e.cog) {
|
|
|
a += e.cog * 1;
|
|
@@ -454,7 +499,6 @@ export default {
|
|
|
return (a / this.scoTit.length).toFixed(1);
|
|
|
},
|
|
|
isMarkCom() {
|
|
|
- // console.log('a',this.currentUid);
|
|
|
if (this.currentUid.type == 4 || this.currentUid.type == 12) {
|
|
|
let a = this.currentUid.content.slice(
|
|
|
this.currentUid.content.lastIndexOf(".") + 1
|
|
@@ -468,6 +512,20 @@ export default {
|
|
|
} else {
|
|
|
return 0;
|
|
|
}
|
|
|
+ },
|
|
|
+ isMarkSco(){
|
|
|
+ let c = 0
|
|
|
+
|
|
|
+ this.scoTitList.forEach(e=>{
|
|
|
+ if (e.isai == 2) {
|
|
|
+ c++
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(c , this.scoTitList.length);
|
|
|
+ this.$forceUpdate()
|
|
|
+ if (c == this.scoTitList.length) return c
|
|
|
+
|
|
|
+ return 0
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -476,6 +534,9 @@ export default {
|
|
|
this.selectSWorksData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ noIsAi(){
|
|
|
+ this.$message.info('您的评价维度未设置ai评分')
|
|
|
+ },
|
|
|
// 预览图片
|
|
|
previewImg(url) {
|
|
|
//预览图片
|
|
@@ -512,7 +573,7 @@ export default {
|
|
|
// 老师提交评分
|
|
|
submit() {
|
|
|
let data = this.scoTitList.map(e => {
|
|
|
- return e.value + ":" + e.cog;
|
|
|
+ return e.detail + ":" + e.cog;
|
|
|
});
|
|
|
// console.log("data", data);
|
|
|
const processedData = {};
|
|
@@ -535,13 +596,13 @@ export default {
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "updateWorksEva", params)
|
|
|
.then(res => {
|
|
|
- this.$message({
|
|
|
- message: "评价成功",
|
|
|
- type: "success"
|
|
|
- });
|
|
|
+ // this.$message({
|
|
|
+ // message: "评价成功",
|
|
|
+ // type: "success"
|
|
|
+ // });
|
|
|
this.ScLoading = false;
|
|
|
|
|
|
- this.selectSWorksData();
|
|
|
+ // this.selectSWorksData();
|
|
|
// this.$emit("refreshOther", this.toolIndex);
|
|
|
})
|
|
|
.catch(err => {
|
|
@@ -552,89 +613,22 @@ export default {
|
|
|
|
|
|
// 重置
|
|
|
reset() {
|
|
|
- this.scoTitList.forEach(e => {
|
|
|
- e.cog = 0;
|
|
|
- });
|
|
|
- this.textarea = "";
|
|
|
+ this.$confirm("是否清空评分和评语?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.scoTitList.forEach(e => {
|
|
|
+ e.cog = 0;
|
|
|
+ });
|
|
|
+ this.textarea = "";
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+
|
|
|
// 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);
|
|
@@ -654,7 +648,7 @@ export default {
|
|
|
let laws = "";
|
|
|
for (let i = 0; i < tit.length; i++) {
|
|
|
if (tit[i].isai == 1) {
|
|
|
- let a = tit[i].value
|
|
|
+ let a = tit[i].detail
|
|
|
let result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
|
|
|
|
|
|
laws += `评价维度:“${result}”, 评价细则:${tit[i].rule} \n`;
|
|
@@ -755,7 +749,39 @@ export default {
|
|
|
processedData[key] = value;
|
|
|
});
|
|
|
|
|
|
- // console.log(JSON.parse(JSON.stringify(processedData)));
|
|
|
+
|
|
|
+ // 判断返回数据正确数量
|
|
|
+ let IsAIsuccess = 0
|
|
|
+ for (const tKey in this.scoTitList) {
|
|
|
+ for (const key in processedData) {
|
|
|
+ let result = this.scoTitList[tKey].detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
|
|
|
+ let key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
|
|
|
+ if (key != "评语") {
|
|
|
+ let isNumK = /^\d+(\.\d+)?$/.test(processedData[key]);
|
|
|
+ if (result.indexOf(key2) != -1 && isNumK) {
|
|
|
+ IsAIsuccess++
|
|
|
+ }
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 计算可以ai评分的评价标准数量
|
|
|
+ let scotNum = 0
|
|
|
+ this.scoTitList.forEach(e=>{
|
|
|
+ if (e.isai == 1 || !e.isai) {
|
|
|
+ scotNum++
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ if (IsAIsuccess != scotNum) {
|
|
|
+ console.log('评价失败');
|
|
|
+
|
|
|
+ this.aiGet2(messages,_fileid)
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
for (const key in processedData) {
|
|
|
if (key == "评语") {
|
|
@@ -763,7 +789,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
delete processedData["评语"];
|
|
|
- console.log("processedData", processedData);
|
|
|
|
|
|
let params = {
|
|
|
cid: _this.cid,
|
|
@@ -772,7 +797,6 @@ export default {
|
|
|
rate: JSON.stringify(processedData),
|
|
|
uid: _this.DgUid
|
|
|
};
|
|
|
- // console.log("params", params);
|
|
|
_this.ajax
|
|
|
.get(_this.$store.state.api + "updateWorksEva", params)
|
|
|
.then(res => {
|
|
@@ -785,8 +809,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);
|
|
|
});
|
|
@@ -794,8 +819,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);
|
|
|
});
|
|
@@ -818,17 +844,18 @@ 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("已经是最后一位了");
|
|
|
}
|
|
|
},
|
|
|
// 提交列表点击切换
|
|
|
- cutPer(val) {
|
|
|
+ cutPer(val,index) {
|
|
|
if (this.ScLoading) return this.$message.info("请稍后,正在ai评价中");
|
|
|
|
|
|
+ this.current = index;
|
|
|
this.DgUid = val;
|
|
|
- this.selectSWorksData();
|
|
|
+ this.selectSWorksData2();
|
|
|
},
|
|
|
// 任务得分折叠
|
|
|
revealBtn() {
|
|
@@ -893,6 +920,8 @@ export default {
|
|
|
selectSWorksData() {
|
|
|
this.vLoading = true;
|
|
|
this.textarea = "";
|
|
|
+ console.log(this.scoTitList);
|
|
|
+
|
|
|
|
|
|
let params = {
|
|
|
uid: this.DgUid,
|
|
@@ -907,6 +936,7 @@ export default {
|
|
|
.then(res => {
|
|
|
let data = res.data[0];
|
|
|
|
|
|
+ // markSco为提交列表展示的分数
|
|
|
data.forEach(e => {
|
|
|
if (e.rate) {
|
|
|
let data2 = JSON.parse(e.rate);
|
|
@@ -931,11 +961,15 @@ export default {
|
|
|
e.markSco = null;
|
|
|
}
|
|
|
});
|
|
|
+ // 提交列表
|
|
|
this.workList = data;
|
|
|
|
|
|
data.forEach((e, index) => {
|
|
|
if (e.userid == this.DgUid) {
|
|
|
this.currentUid = e;
|
|
|
+ console.log('e',e);
|
|
|
+
|
|
|
+ // 1截图 3问答 4word文档类型 5视频 10表格 13文档
|
|
|
|
|
|
if (
|
|
|
this.currentUid.type == 3 ||
|
|
@@ -960,7 +994,14 @@ export default {
|
|
|
if (this.currentUid.type == 5) {
|
|
|
this.playerOptions.sources[0].src = this.currentUid.content;
|
|
|
}
|
|
|
- // this.current = index;
|
|
|
+ if (this.currentUid.type == 12) {
|
|
|
+ this.TxtMd = ''
|
|
|
+ getFile(this.currentUid.content).then(res=>{
|
|
|
+ this.TxtMd = res.data;
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ this.current = index;
|
|
|
this.workId = e.id;
|
|
|
this.appraise(e);
|
|
|
}
|
|
@@ -984,6 +1025,116 @@ export default {
|
|
|
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];
|
|
|
+ console.log('data',data);
|
|
|
+
|
|
|
+
|
|
|
+ // 计算markSco提交列表分数
|
|
|
+ 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;
|
|
|
+ // 1截图 3问答 4word文档类型 5视频 10表格 13文档
|
|
|
+ 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);
|
|
|
+
|
|
|
+ if (data == "pdf") {
|
|
|
+ this.ifPdf = 1;
|
|
|
+ } else {
|
|
|
+ this.ifPdf = 0;
|
|
|
+ }
|
|
|
+ this.cuScoCon = this.currentUid.content;
|
|
|
+
|
|
|
+ }
|
|
|
+ if (this.currentUid.type == 5) {
|
|
|
+ this.playerOptions.sources[0].src = this.currentUid.content;
|
|
|
+ }
|
|
|
+ if (this.currentUid.type == 12) {
|
|
|
+ this.TxtMd = ''
|
|
|
+ getFile(this.currentUid.content).then(res=>{
|
|
|
+ this.TxtMd = res.data;
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
downloadFile(url) {
|
|
|
var credentials = {
|
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
@@ -1033,22 +1184,15 @@ export default {
|
|
|
// 处理任务的分展示
|
|
|
appraise(val) {
|
|
|
if (val.rate) {
|
|
|
- // this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
|
|
|
- // console.log("val.rate", val.rate);
|
|
|
-
|
|
|
+
|
|
|
let data = JSON.parse(val.rate);
|
|
|
this.scoTitList.forEach((e, index) => {
|
|
|
e.cog = null;
|
|
|
for (const key in data) {
|
|
|
- // if (e.value.endsWith("。")) {
|
|
|
- // e.value = e.value.slice(0, -1); // 如果字符串以句号结尾,则去除最后一个字符
|
|
|
- // }
|
|
|
|
|
|
- let result = e.value.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
|
|
|
+ let result = e.detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
|
|
|
let key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if (result.indexOf(key2) != -1) {
|
|
|
e.cog = data[key];
|
|
|
}
|
|
@@ -1103,7 +1247,7 @@ export default {
|
|
|
.AreaCss >>> .el-textarea__inner {
|
|
|
min-height: 150px !important;
|
|
|
/* max-height: 150px; */
|
|
|
- padding-bottom: 20px;
|
|
|
+ /* padding-bottom: 20px; */
|
|
|
}
|
|
|
.AreaBtn {
|
|
|
position: absolute;
|
|
@@ -1187,8 +1331,6 @@ export default {
|
|
|
margin: 10px 0;
|
|
|
min-height: 60px;
|
|
|
background-color: #f3f7fd;
|
|
|
- margin-left: 17px;
|
|
|
-
|
|
|
}
|
|
|
.scoreStar2 {
|
|
|
padding: 0 10px 10px;
|
|
@@ -1220,7 +1362,8 @@ export default {
|
|
|
cursor: pointer;
|
|
|
padding: 2px 8px;
|
|
|
border-radius: 5px;
|
|
|
- color: rgba(54, 129, 252, 1);
|
|
|
+ color: #fff;
|
|
|
+ background-color: rgba(54, 129, 252, 1);
|
|
|
border: 1px rgba(54, 129, 252, 1) solid;
|
|
|
}
|
|
|
.worksAnswer {
|
|
@@ -1350,4 +1493,11 @@ export default {
|
|
|
.video-player >>> .video-js {
|
|
|
height: 100%;
|
|
|
}
|
|
|
+.markBox{
|
|
|
+ padding: 20px 14px;
|
|
|
+ line-height: 29px;
|
|
|
+ font-size: 16px;
|
|
|
+ background: #f4f4f4;
|
|
|
+ border-radius: 5px;
|
|
|
+}
|
|
|
</style>
|