|
@@ -683,7 +683,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 0">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 0">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
概念群
|
|
@@ -709,7 +709,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 1">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 1">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
问题链
|
|
@@ -735,7 +735,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 2">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 2">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
目标层
|
|
@@ -761,7 +761,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 3">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 3">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
任务簇
|
|
@@ -814,9 +814,9 @@
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
|
|
|
<div style="display: flex;">
|
|
|
<el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
- <div class="r_pub_button_op"
|
|
|
+ <!-- <div class="r_pub_button_op"
|
|
|
@contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
|
|
|
- @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
|
|
|
+ @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div> -->
|
|
|
</el-tooltip>
|
|
|
<div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
|
|
|
item.isTask3 ? '确定' : '编辑'}}</div>
|
|
@@ -5729,6 +5729,7 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
import MarkdownIt from "markdown-it";
|
|
|
import aiCreateDialog from './aiCreateDialog.vue'
|
|
|
import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
|
|
|
+
|
|
|
var OpenCC = require("opencc-js");
|
|
|
let converter = OpenCC.Converter({
|
|
|
from:'hk',
|
|
@@ -5754,7 +5755,7 @@ export default {
|
|
|
aiTips,
|
|
|
tipsDialog,
|
|
|
aiCreateDialog,
|
|
|
- aiCreateVideoDialog
|
|
|
+ aiCreateVideoDialog,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -6115,6 +6116,7 @@ export default {
|
|
|
templatePan: ['0e7966d6-1e49-11ef-bee5-005056b86db5','60d153e3-1e49-11ef-bee5-005056b86db5','7f3e28b7-1e66-11ef-bee5-005056b86db5','9dd4bb76-1e48-11ef-bee5-005056b86db5','ab317f23-1e66-11ef-bee5-005056b86db5'],
|
|
|
courseJie:1,
|
|
|
courseTime:45,
|
|
|
+ allTextArray: [],
|
|
|
};
|
|
|
},
|
|
|
directives: {
|
|
@@ -6837,21 +6839,21 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (!this.isOutline2) {
|
|
|
- this.openAiDialog(clickType, 'aiTeacher')
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // if (!this.isOutline2 && this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
+ // if (!this.isOutline2) {
|
|
|
// this.openAiDialog(clickType, 'aiTeacher')
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
- // if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
- // this.openAiDialog(clickType, 'aiTeacher2')
|
|
|
- // return;
|
|
|
- // }
|
|
|
+
|
|
|
+ if (!this.isOutline2 && this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
+ this.openAiDialog(clickType, 'aiTeacher')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
+ this.openAiDialog(clickType, 'aiTeacher2')
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
const functionA = () => {
|
|
|
setTimeout(() => {
|
|
@@ -9206,8 +9208,8 @@ export default {
|
|
|
this.cid = res.data.courseId;
|
|
|
this.courseUserid = this.userid;
|
|
|
this.islogin = true;
|
|
|
- this.updateCourseState(4);
|
|
|
- // this.updateCourseState(5);
|
|
|
+ // this.updateCourseState(4);
|
|
|
+ this.updateCourseState(5);
|
|
|
this.addtips()
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -13491,9 +13493,9 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
openAiDialog(clickType, type, callback, index, tindex) {
|
|
|
- if(clickType == 1){
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if(clickType == 1){
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
if (this.courseName == "") {
|
|
|
this.$message.error("请补充填写课程名称");
|
|
|
return;
|
|
@@ -13974,6 +13976,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -13985,6 +13988,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
this.ttextLoading = false
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -13998,7 +14002,10 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.courseText = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.courseText = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.textLoading = false
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -14995,6 +15002,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15006,6 +15014,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15018,8 +15027,11 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
_mdText = _mdText.replace(/\\n/g, "\n");
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
- //转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
|
|
|
+ //转化返回的回复流数据.
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -15132,6 +15144,7 @@ ${msg}
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15143,6 +15156,7 @@ ${msg}
|
|
|
this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15156,7 +15170,10 @@ ${msg}
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -15271,6 +15288,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15282,6 +15300,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15295,7 +15314,10 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -15559,6 +15581,7 @@ ${_text2}`
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15570,6 +15593,7 @@ ${_text2}`
|
|
|
this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15583,8 +15607,13 @@ ${_text2}`
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
- this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
+ if(this.taskDetailLoading5.indexOf(loading) !== -1){
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ }
|
|
|
// 处理流数据
|
|
|
}
|
|
|
// this.$forceUpdate();
|
|
@@ -15703,7 +15732,10 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
- _source.onmessage = _e => {
|
|
|
+ this.allTextArray[_tindex2] = ""
|
|
|
+ let _iindex = 0
|
|
|
+ _source.onmessage = async (_e) => {
|
|
|
+ // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
//对话已经完成
|
|
@@ -15714,6 +15746,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
|
|
|
this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15727,13 +15760,45 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
- this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
+ if(this.taskDetailLoading5.indexOf(loading) !== -1){
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ }
|
|
|
// 处理流数据
|
|
|
}
|
|
|
- // this.$forceUpdate();
|
|
|
};
|
|
|
},
|
|
|
+ aiDetail52getAiContentText(_e, loading, _tindex2, _source){
|
|
|
+ let _mdText = "";
|
|
|
+ let _eData = JSON.parse(_e.data).content;
|
|
|
+ if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
+ //对话已经完成
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
|
|
|
+ _source.close();
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ //对话还在继续
|
|
|
+ let _text = "";
|
|
|
+ _text = _eData.replaceAll("'", "");
|
|
|
+ if (this.allTextArray[_tindex2] == "") {
|
|
|
+ this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
|
|
|
+ } else {
|
|
|
+ this.allTextArray[_tindex2] += _text;
|
|
|
+ }
|
|
|
+ _mdText = this.allTextArray[_tindex2] + "_";
|
|
|
+ _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
|
|
|
+ _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
|
|
|
+ if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ // 处理流数据
|
|
|
+ }
|
|
|
+ },
|
|
|
async aiCpote(msg, callback) {
|
|
|
let _this = this
|
|
|
let _index = _this.aitype.replace("aiC","c")
|
|
@@ -15865,6 +15930,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15877,6 +15943,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
callback ? callback() : ''
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15890,7 +15957,10 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.cpote[loading] = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.cpote[loading] = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.cpoteLoading[loading] = false
|
|
|
// 处理流数据
|
|
|
}
|