|
@@ -5335,6 +5335,7 @@ export default {
|
|
|
taskDetailLoading2: [],
|
|
|
taskDetailLoading3: [],
|
|
|
taskDetailLoading4: [],
|
|
|
+ dArray: {},
|
|
|
};
|
|
|
},
|
|
|
directives: {
|
|
@@ -6071,32 +6072,123 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
this.loading = true
|
|
|
- setTimeout(() => {
|
|
|
- this.loading = false
|
|
|
- this.steps = 3;
|
|
|
- }, 0)
|
|
|
- this.isClickColor = 1;
|
|
|
- this.unitJson[
|
|
|
- this.unitIndex
|
|
|
- ].chapterInfo[0].taskJson[0].toolOpen = true;
|
|
|
- this.$forceUpdate();
|
|
|
- setTimeout(() => {
|
|
|
- this.checkEva(this.checkId);
|
|
|
+
|
|
|
+ const functionA = () => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loading = false
|
|
|
+ this.steps = 3;
|
|
|
+ }, 0)
|
|
|
+ this.isClickColor = 1;
|
|
|
+ this.unitJson[
|
|
|
+ this.unitIndex
|
|
|
+ ].chapterInfo[0].taskJson[0].toolOpen = true;
|
|
|
+ this.$forceUpdate();
|
|
|
setTimeout(() => {
|
|
|
this.checkEva(this.checkId);
|
|
|
- }, 100);
|
|
|
- }, 1000);
|
|
|
- if (this.cid == "" || this.cid == undefined) {
|
|
|
- this.addWork();
|
|
|
- } else {
|
|
|
- if (this.userid != this.courseUserid && this.role != "1") {
|
|
|
- this.updateWork2();
|
|
|
+ setTimeout(() => {
|
|
|
+ this.checkEva(this.checkId);
|
|
|
+ }, 100);
|
|
|
+ }, 1000);
|
|
|
+ if (this.cid == "" || this.cid == undefined) {
|
|
|
+ this.addWork();
|
|
|
} else {
|
|
|
- this.updateWork();
|
|
|
+ if (this.userid != this.courseUserid && this.role != "1") {
|
|
|
+ this.updateWork2();
|
|
|
+ } else {
|
|
|
+ this.updateWork();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if(this.cid){
|
|
|
+ functionA()
|
|
|
+ }else {
|
|
|
+ let url = []
|
|
|
+ if (this.infoData.length) {
|
|
|
+ for (var i = 0; i < this.infoData.length; i++) {
|
|
|
+ url.push(this.infoData[i].url)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let msg = `
|
|
|
+ ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
|
|
|
+
|
|
|
+ --------
|
|
|
+ ## 要求
|
|
|
+ 请根据${JSON.stringify(this.dArray)}以及##补充参考资料。输出格式和内容要求参考##输出格式与要求
|
|
|
+
|
|
|
+ --------
|
|
|
+ ## 输出格式与要求
|
|
|
+ [
|
|
|
+ {
|
|
|
+ detail: "面向学生的任务描述",
|
|
|
+ elist:[
|
|
|
+ {"value":"评价名字1","detail":"评价维度1","score":5},
|
|
|
+ {"value":"评价名字2","detail":"评价维度2","score":5},
|
|
|
+ {"value":"评价名字3","detail":"评价维度3","score":5}
|
|
|
+ ],//至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool: "工具", //电子白板,文档,思维导图,表格,作业提交中选择其中一个工具
|
|
|
+ detail: "工具描述"
|
|
|
+ }
|
|
|
+ ] //可0~2个工具
|
|
|
+ }
|
|
|
+ ]
|
|
|
+
|
|
|
+ --------
|
|
|
+ ## 补充参考资料
|
|
|
+ 补充资料:${url.join(",")}
|
|
|
+ 补充描述:${this.courseText2}
|
|
|
+
|
|
|
+ --------
|
|
|
+ ## 示例
|
|
|
+ [
|
|
|
+ {
|
|
|
+ detail: "面向学生的任务描述",
|
|
|
+ elist:[
|
|
|
+ {"value":"评价名字1","detail":"评价维度1", "score": 5},
|
|
|
+ {"value":"评价名字2","detail":"评价维度2", "score": 5},
|
|
|
+ {"value":"评价名字3","detail":"评价维度3", "score": 5}
|
|
|
+ ],
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool:"电子白板",
|
|
|
+ detail: "工具描述"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tool:"思维大图",
|
|
|
+ detail: "工具描述"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ detail: "面向学生的任务描述",
|
|
|
+ elist:[
|
|
|
+ {"value":"评价名字1","detail":"评价维度1", "score": 5},
|
|
|
+ {"value":"评价名字2","detail":"评价维度2", "score": 5},
|
|
|
+ {"value":"评价名字3","detail":"评价维度3", "score": 5}
|
|
|
+ ],
|
|
|
+ toolChoose: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ detail: "面向学生的任务描述",
|
|
|
+ elist:[
|
|
|
+ {"value":"评价名字1","detail":"评价维度1", "score": 5},
|
|
|
+ {"value":"评价名字2","detail":"评价维度2", "score": 5},
|
|
|
+ {"value":"评价名字3","detail":"评价维度3", "score": 5}
|
|
|
+ ],
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool:"文档",
|
|
|
+ detail: "工具描述"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]`
|
|
|
+ this.aiGet3(msg, functionA)
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
this.$message.error("请补充填写课程名称");
|
|
|
return;
|
|
@@ -12368,6 +12460,7 @@ export default {
|
|
|
if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
console.log(data.choices[0].message.content);
|
|
|
let dArray = JSON.parse(data.choices[0].message.content)
|
|
|
+ _this.dArray = dArray
|
|
|
_this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
|
|
|
for (var i = 0; i < dArray.length; i++) {
|
|
@@ -12399,91 +12492,8 @@ export default {
|
|
|
}
|
|
|
_this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
_this.$forceUpdate();
|
|
|
- let url = []
|
|
|
- if (_this.infoData.length) {
|
|
|
- for (var i = 0; i < this.infoData.length; i++) {
|
|
|
- url.push(_this.infoData[i].url)
|
|
|
- }
|
|
|
- }
|
|
|
- let msg = `
|
|
|
- ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
|
|
|
-
|
|
|
- --------
|
|
|
- ## 要求
|
|
|
- 请根据${JSON.stringify(dArray)}以及##补充参考资料。输出格式和内容要求参考##输出格式与要求
|
|
|
-
|
|
|
- --------
|
|
|
- ## 输出格式与要求
|
|
|
- [
|
|
|
- {
|
|
|
- detail: "面向学生的任务描述",
|
|
|
- elist:[
|
|
|
- {"value":"评价名字1","detail":"评价维度1","score":5},
|
|
|
- {"value":"评价名字2","detail":"评价维度2","score":5},
|
|
|
- {"value":"评价名字3","detail":"评价维度3","score":5}
|
|
|
- ],//至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
|
|
|
- toolChoose: [
|
|
|
- {
|
|
|
- tool: "工具", //电子白板,文档,思维导图,表格,作业提交中选择其中一个工具
|
|
|
- detail: "工具描述"
|
|
|
- }
|
|
|
- ] //可0~2个工具
|
|
|
- }
|
|
|
- ]
|
|
|
-
|
|
|
- --------
|
|
|
- ## 补充参考资料
|
|
|
- 补充资料:${url.join(",")}
|
|
|
- 补充描述:${_this.courseText2}
|
|
|
-
|
|
|
- --------
|
|
|
- ## 示例
|
|
|
- [
|
|
|
- {
|
|
|
- detail: "面向学生的任务描述",
|
|
|
- elist:[
|
|
|
- {"value":"评价名字1","detail":"评价维度1", "score": 5},
|
|
|
- {"value":"评价名字2","detail":"评价维度2", "score": 5},
|
|
|
- {"value":"评价名字3","detail":"评价维度3", "score": 5}
|
|
|
- ],
|
|
|
- toolChoose: [
|
|
|
- {
|
|
|
- tool:"电子白板",
|
|
|
- detail: "工具描述"
|
|
|
- },
|
|
|
- {
|
|
|
- tool:"思维大图",
|
|
|
- detail: "工具描述"
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- detail: "面向学生的任务描述",
|
|
|
- elist:[
|
|
|
- {"value":"评价名字1","detail":"评价维度1", "score": 5},
|
|
|
- {"value":"评价名字2","detail":"评价维度2", "score": 5},
|
|
|
- {"value":"评价名字3","detail":"评价维度3", "score": 5}
|
|
|
- ],
|
|
|
- toolChoose: []
|
|
|
- },
|
|
|
- {
|
|
|
- detail: "面向学生的任务描述",
|
|
|
- elist:[
|
|
|
- {"value":"评价名字1","detail":"评价维度1", "score": 5},
|
|
|
- {"value":"评价名字2","detail":"评价维度2", "score": 5},
|
|
|
- {"value":"评价名字3","detail":"评价维度3", "score": 5}
|
|
|
- ],
|
|
|
- toolChoose: [
|
|
|
- {
|
|
|
- tool:"文档",
|
|
|
- detail: "工具描述"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]`
|
|
|
-
|
|
|
- _this.aiGet3(msg, callback)
|
|
|
}
|
|
|
+ callback ? callback() : ''
|
|
|
}).catch(function (error) {
|
|
|
_this.loading = false
|
|
|
console.log(error);
|
|
@@ -12531,9 +12541,9 @@ export default {
|
|
|
for(var j = 0;j < _task.toolChoose.length; j++){
|
|
|
_this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
|
|
|
{
|
|
|
- tool: [toolsJson[_task.toolChoose[j].tool].tool],
|
|
|
+ tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
|
|
|
toolDetail: _task.toolChoose[j].detail,
|
|
|
- toolType: toolsJson[_task.toolChoose[j].tool].type,
|
|
|
+ toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
|
|
|
askCount: 1,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
@@ -12746,7 +12756,7 @@ export default {
|
|
|
let data = response.data.FunctionResponse
|
|
|
if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
console.log(data.choices[0].message.content);
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].elist = JSON.parse(data.choices[0].message.content)
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
|
|
|
_this.$forceUpdate()
|
|
|
}
|
|
|
_this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
|