|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
- <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
|
|
|
+ <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
|
|
|
<div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
|
|
|
<div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
|
|
|
- <div class="pb_content_body" style="position: relative; margin: 0">
|
|
|
+ <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
|
|
|
<div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
|
|
|
<div class="courseTop">
|
|
|
<div class="stepsNav">
|
|
@@ -11253,11 +11253,45 @@ export default {
|
|
|
let _file = this.knowFileArray[fi]
|
|
|
let fileM = _file.grade ? converter(_file.grade).split('/') : 1
|
|
|
let fileS = _file.name ? converter(_file.name).split('/') : 1
|
|
|
- let _sub = fileS == 1 ? [1] : this.arrayToArray(fileS, sub)
|
|
|
- let _mclass = fileM == 1 ? [1] : this.arrayToArray(fileM, mclass)
|
|
|
+ let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
|
|
|
+ let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
|
|
|
let fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
|
|
|
- if(_sub.length > 0 && _mclass.length > 0 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ this.knowInfoData.push({
|
|
|
+ name: _file.filename,
|
|
|
+ url: _file.url,
|
|
|
+ uid: '',
|
|
|
+ type: 3,
|
|
|
+ fileid: _file.fileid,
|
|
|
+ });
|
|
|
+ this.knowFileids.push(_file.fileid)
|
|
|
+ }
|
|
|
+ fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
+ if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ this.knowInfoData.push({
|
|
|
+ name: _file.filename,
|
|
|
+ url: _file.url,
|
|
|
+ uid: '',
|
|
|
+ type: 3,
|
|
|
+ fileid: _file.fileid,
|
|
|
+ });
|
|
|
+ this.knowFileids.push(_file.fileid)
|
|
|
+ }
|
|
|
+ fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
+ if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ this.knowInfoData.push({
|
|
|
+ name: _file.filename,
|
|
|
+ url: _file.url,
|
|
|
+ uid: '',
|
|
|
+ type: 3,
|
|
|
+ fileid: _file.fileid,
|
|
|
+ });
|
|
|
+ this.knowFileids.push(_file.fileid)
|
|
|
+ }
|
|
|
+ fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
+
|
|
|
+ if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1){
|
|
|
this.knowInfoData.push({
|
|
|
name: _file.filename,
|
|
|
url: _file.url,
|
|
@@ -16554,12 +16588,23 @@ export default {
|
|
|
this.$message.error("请补充填写课程名称");
|
|
|
return;
|
|
|
}
|
|
|
- this.openAiDialog(2, 'aiDetail',1)
|
|
|
+ let functionA = ''
|
|
|
if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
|
|
|
- setTimeout(() => {
|
|
|
+ // setTimeout(() => {
|
|
|
// this.openAiDialog(2, 'aitargetTextDetail2',1)
|
|
|
+ // this.openAiDialog(2, 'aitargetTextDetail3',1)
|
|
|
+ // }, 500);
|
|
|
+ functionA = ()=>{
|
|
|
this.openAiDialog(2, 'aitargetTextDetail3',1)
|
|
|
- }, 500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.openAiDialog(2, 'aiDetail',1, functionA)
|
|
|
+ if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.openAiDialog(2, 'aitargetTextDetail2',1)
|
|
|
+ // this.openAiDialog(2, 'aitargetTextDetail3',1)
|
|
|
+ // }, 500);
|
|
|
}
|
|
|
|
|
|
this.courseTextBool = true
|
|
@@ -16680,7 +16725,7 @@ export default {
|
|
|
this.aitype = "aiDetail"
|
|
|
// this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
|
|
|
this.aiText = this.aiJson.aiDetail
|
|
|
- this.aiCallBack = callback
|
|
|
+ this.aiCallBack = [callback, index]
|
|
|
} else if (type == "aiOutline") {
|
|
|
this.aitype = "aiOutline"
|
|
|
// this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
|
|
@@ -16977,6 +17022,10 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ if(!this.courseText){
|
|
|
+ this.$message.error("请生成简要描述后再生成目标");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.aitype = type
|
|
|
this.aiText = this.aiJson.aiTargetGet
|
|
|
this.aiText2 = this.aiJson.aiTarget2
|
|
@@ -17694,16 +17743,14 @@ ${sub.length ? '学科:' + sub.join(",") : ''}
|
|
|
${mclass.length ? '面向年级:' + mclass.join(",") : ''}
|
|
|
${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
|
|
|
${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
|
|
|
-${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
|
|
|
+${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
|
|
|
|
|
|
## 要求
|
|
|
${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
|
|
|
|
|
|
${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
|
|
|
|
|
|
-${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
|
|
|
-
|
|
|
-如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
|
|
|
+${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
|
|
|
this.aiGet(msg)
|
|
|
},
|
|
|
setUnitJson() {
|
|
@@ -17859,6 +17906,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
this.ttextLoading = false
|
|
|
this.courseTextB = false
|
|
|
this.isTextCancelToken = null
|
|
|
+ this.aiCallBack[1] ? this.aiCallBack[1]() : ''
|
|
|
return;
|
|
|
} else {
|
|
|
_iindex++
|
|
@@ -22779,8 +22827,8 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
}
|
|
|
|
|
|
if(!msg2 && sub.length){
|
|
|
- let _fileid = _this.importFileid(sub)
|
|
|
- fileid = [...fileid, ..._fileid]
|
|
|
+ // let _fileid = _this.importFileid(sub)
|
|
|
+ // fileid = [...fileid, ..._fileid]
|
|
|
}
|
|
|
|
|
|
let messages = `NOTICE
|
|
@@ -22821,7 +22869,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
_this.isTargetCancelToken2 = _this.ajax.setCancelSource();
|
|
|
|
|
|
let params = {
|
|
|
- assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
+ assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
|
|
|
message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
session_name: _uuid,
|
|
|
userId: _this.userid,
|
|
@@ -22881,7 +22929,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
this.isTargetCancelToken2 = null
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -22892,7 +22940,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
_mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
|
|
|
this.isTargetCancelSource2.close();
|
|
|
this.isTargetCancelSource2 = null;
|
|
|
- this.targetCourseText2 = _mdText;
|
|
|
+ this.targetCourseText2 = text1+' \n '+_mdText;
|
|
|
this.targetTextLoading2 = false
|
|
|
this.ttargetTextLoading2 = false
|
|
|
this.targetCourseText2B = false
|
|
@@ -22914,7 +22962,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
if(_iindex == 10){
|
|
|
- this.targetCourseText2 = _mdText;
|
|
|
+ this.targetCourseText2 = text1+' \n '+_mdText;
|
|
|
_iindex = 0
|
|
|
}
|
|
|
if(this.targetTextLoading2){
|
|
@@ -23011,6 +23059,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
|
|
|
## 课程信息
|
|
|
课程名字:${this.courseName}
|
|
|
+课程概况:${this.courseText}
|
|
|
${sub.length ? '学科:' + sub.join(",") : ''}
|
|
|
${mclass.length ? '年级:' + mclass.join(",") : ''}`
|
|
|
let _uuid = uuidv4();
|
|
@@ -23070,6 +23119,7 @@ ${mclass.length ? '年级:' + mclass.join(",") : ''}`
|
|
|
// }
|
|
|
if (data.message) {
|
|
|
console.log('返回回来的目标:',data.message);
|
|
|
+ _this.targetCourseText2 = data.message
|
|
|
_this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
|
|
|
|
|
|
}
|