|
@@ -5149,10 +5149,10 @@
|
|
|
@click="addEList(unitIndex, itemTaskIndex)">
|
|
|
添加
|
|
|
</button>
|
|
|
- <button class="c_pub_button_add pub_btn_eval_source_img"
|
|
|
+ <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
|
|
|
@click="openEList(unitIndex, itemTaskIndex)">
|
|
|
资源
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
</div>
|
|
|
<button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
|
|
|
v-if="itemTask.eList && itemTask.eList.length">
|
|
@@ -7348,6 +7348,7 @@ export default {
|
|
|
isTeacherTextCancelSource: null,
|
|
|
isTargetCancelSource1: null,
|
|
|
isTargetCancelSource2: null,
|
|
|
+ fileidArray: []
|
|
|
};
|
|
|
},
|
|
|
directives: {
|
|
@@ -7564,7 +7565,7 @@ export default {
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
|
|
|
(ele) => {
|
|
|
- return ele.value != "";
|
|
|
+ return ele.value != "" || ele.detail != "" || ele.target != "";
|
|
|
}
|
|
|
);
|
|
|
}
|
|
@@ -7641,7 +7642,7 @@ export default {
|
|
|
this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
|
|
|
i
|
|
|
].chapterInfo[0].taskJson[j].eList.filter((ele) => {
|
|
|
- return ele.value != "";
|
|
|
+ return ele.value != "" || ele.detail != "" || ele.target != "";
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -8109,6 +8110,9 @@ export default {
|
|
|
this.$refs.stepBox.scrollTop = 0;
|
|
|
},
|
|
|
nextSteps(clickType, ttype) {
|
|
|
+ if(!this.time()){
|
|
|
+ return
|
|
|
+ }
|
|
|
// if (this.cidType == 1) {
|
|
|
if (this.steps == 1) {
|
|
|
if (this.courseName != "") {
|
|
@@ -8421,7 +8425,7 @@ export default {
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
|
|
|
(ele) => {
|
|
|
- return ele.value != "";
|
|
|
+ return ele.value != "" || ele.detail != "" || ele.target != "";
|
|
|
}
|
|
|
);
|
|
|
}
|
|
@@ -8502,7 +8506,7 @@ export default {
|
|
|
return true;
|
|
|
} else {
|
|
|
let time = new Date().getTime();
|
|
|
- if (time - this.now > 3000) {
|
|
|
+ if (time - this.now > 1000) {
|
|
|
this.now = time;
|
|
|
return true;
|
|
|
} else {
|
|
@@ -11272,7 +11276,7 @@ export default {
|
|
|
this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
|
|
|
i
|
|
|
].chapterInfo[0].taskJson[j].eList.filter((ele) => {
|
|
|
- return ele.value != "";
|
|
|
+ return ele.value != "" || ele.detail != "" || ele.target != "";
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -11404,7 +11408,7 @@ export default {
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
|
|
|
(ele) => {
|
|
|
- return ele.value != "";
|
|
|
+ return ele.value != "" || ele.detail != "" || ele.target != "";
|
|
|
}
|
|
|
);
|
|
|
}
|
|
@@ -11475,7 +11479,7 @@ export default {
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
|
|
|
this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
|
|
|
(ele) => {
|
|
|
- return ele.value != "";
|
|
|
+ return ele.value != "" || ele.detail != "" || ele.target != "";
|
|
|
}
|
|
|
);
|
|
|
}
|
|
@@ -11540,7 +11544,7 @@ export default {
|
|
|
this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
|
|
|
i
|
|
|
].chapterInfo[0].taskJson[j].eList.filter((ele) => {
|
|
|
- return ele.value != "";
|
|
|
+ return ele.value != "" || ele.detail != "" || ele.target != "";
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -13746,7 +13750,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.isFileSearch = res.data[0][0].iresearch == 1
|
|
|
- this.seleteCourseUpdate();
|
|
|
+ // this.seleteCourseUpdate();
|
|
|
this.setMan();
|
|
|
this.selectAllType();
|
|
|
this.unitJson[
|
|
@@ -16927,9 +16931,18 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
await _this.aiGetgetAiContent(_uuid)
|
|
|
},
|
|
|
aiGetgetAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.textLoading = false
|
|
|
+ this.ttextLoading = false
|
|
|
+ this.isTextCancelToken = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -19515,9 +19528,19 @@ ${msg}
|
|
|
await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetailgetAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.isOutlineTaskCancelToken[_tindex2] = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -19845,9 +19868,19 @@ ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
|
|
|
await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.isOutlineTaskCancelToken[_tindex2] = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20015,9 +20048,19 @@ ${_this.aiCallBack.taskDetail}
|
|
|
await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetail2getAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20176,9 +20219,19 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
|
|
|
},
|
|
|
aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', event);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20533,9 +20586,19 @@ ${_text2}`
|
|
|
await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetail5getAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20579,11 +20642,11 @@ ${_text2}`
|
|
|
let _this = this
|
|
|
_source.onerror = function(event) {
|
|
|
// 处理错误,可以尝试重新连接
|
|
|
- console.log('EventSource error:', event);
|
|
|
- _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
- _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
- _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
- _source.close();
|
|
|
+ console.log('EventSource error:', event);
|
|
|
+ _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ _source.close();
|
|
|
};
|
|
|
},
|
|
|
async aiDetail52(msg, index) {
|
|
@@ -20714,9 +20777,19 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetail52getAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
this.allTextArray[_tindex2] = ""
|
|
@@ -20931,9 +21004,19 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
await _this.aiCpotegetAiContent(_uuid, _index, callback)
|
|
|
},
|
|
|
aiCpotegetAiContent(_uid, loading, callback) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.cpoteLoading[loading] = false
|
|
|
+ this.cpotetLoading[loading] = false
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -21114,9 +21197,19 @@ ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
await _this.aiteacherTextDetailgetAiContent(_uuid)
|
|
|
},
|
|
|
aiteacherTextDetailgetAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', event);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.teacherTextLoading = false
|
|
|
+ this.tteacherTextLoading = false
|
|
|
+ this.isTeacherTextCancelToken = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -21305,9 +21398,19 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
await _this.aitargetTextDetailgetAiContent(_uuid)
|
|
|
},
|
|
|
aitargetTextDetailgetAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch (error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.targetTextLoading = false
|
|
|
+ this.ttargetTextLoading = false
|
|
|
+ this.isTargetCancelToken1 = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -21500,50 +21603,45 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
await _this.aitargetTextDetail2getAiContent(_uuid)
|
|
|
},
|
|
|
importFileid(sub){
|
|
|
- // file-SNthYVubrHGg4HjFcp3FPkZq 英语
|
|
|
- // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养
|
|
|
- // file-nkAUyRCEMncICGuFBC1WXnM1 科学素养内涵
|
|
|
- // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文
|
|
|
- // file-G1bRfSFnQaQtzA3c8dLshg0a 数学核心素养
|
|
|
- // file-35koyXrFO2T4FsrQe4qXm0io 数学素养内涵
|
|
|
+ // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
|
|
|
+ // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
|
|
|
+ // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
|
|
|
+ // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
|
|
|
+ // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
|
|
|
+ // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
|
|
|
let _sub = converter(sub.join(","))
|
|
|
let fileid = []
|
|
|
- if(_sub.indexOf(converter('STEM')) != -1){
|
|
|
- fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
|
|
|
- fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
|
|
|
- fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
|
|
|
- fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
|
|
|
- fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
|
|
|
- fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
|
|
|
- }
|
|
|
- if(_sub.indexOf(converter('语文')) != -1){
|
|
|
- if(fileid.indexOf('file-aQmfmgrwdrHa9sCTTZkjvK7Z') == -1){
|
|
|
- fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
|
|
|
- }
|
|
|
- }
|
|
|
- if(_sub.indexOf(converter('数学')) != -1){
|
|
|
- if(fileid.indexOf('file-G1bRfSFnQaQtzA3c8dLshg0a') == -1){
|
|
|
- fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
|
|
|
- }
|
|
|
- if(fileid.indexOf('file-35koyXrFO2T4FsrQe4qXm0io') == -1){
|
|
|
- fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
|
|
|
- }
|
|
|
- }
|
|
|
- if(_sub.indexOf(converter('英语')) != -1){
|
|
|
- if(fileid.indexOf('file-SNthYVubrHGg4HjFcp3FPkZq') == -1){
|
|
|
- fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
|
|
|
- }
|
|
|
- }
|
|
|
- if(_sub.indexOf(converter('科学')) != -1){
|
|
|
- if(fileid.indexOf('file-QOKhi8i84T8eR6DYhb9TaTlG') == -1){
|
|
|
- fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
|
|
|
- }
|
|
|
- if(fileid.indexOf('file-nkAUyRCEMncICGuFBC1WXnM1') == -1){
|
|
|
- fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
|
|
|
+
|
|
|
+ for(var i = 0; i < this.fileidArray.length; i++){
|
|
|
+ if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
|
|
|
+ if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
|
|
|
+ fileid.push(this.fileidArray[i].fileid)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return fileid
|
|
|
},
|
|
|
+ selectFileid(){
|
|
|
+ let params = {
|
|
|
+ oid: this.oid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectFileid", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.fileidArray = res.data[0]
|
|
|
+ if(res.data[1].length){
|
|
|
+ this.fileidArray = res.data[1]
|
|
|
+ }
|
|
|
+ if(res.data[2].length){
|
|
|
+ this.fileidArray = res.data[2]
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
async aitargetTextDetail22(msg,msg2) {
|
|
|
let _this = this
|
|
|
let fileid = []
|
|
@@ -21663,9 +21761,19 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
await _this.aitargetTextDetail2getAiContent(_uuid)
|
|
|
},
|
|
|
aitargetTextDetail2getAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.targetTextLoading2 = false
|
|
|
+ this.ttargetTextLoading2 = false
|
|
|
+ this.isTargetCancelToken2 = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -22138,7 +22246,9 @@ ${msg}
|
|
|
let dArray = []
|
|
|
try {
|
|
|
let regex2 = new RegExp("/([{,])(\w+):/g")
|
|
|
- dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":'))
|
|
|
+ let regex3 = new RegExp('/(?<!")content(?!")/g')
|
|
|
+ //
|
|
|
+ dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":').replace(regex3, '"content"'))
|
|
|
} catch (error) {
|
|
|
// callback ? callback() : ''
|
|
|
console.log("error_________________" + error);
|
|
@@ -22150,7 +22260,9 @@ ${msg}
|
|
|
// callback ? callback() : ''
|
|
|
_this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
|
|
|
console.log("error_________________" + error);
|
|
|
+ _this.isFileCancelToken = null;
|
|
|
_this.aiSearchFile(messages, callback)
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
for(let i = 0; i < dArray.length; i++){
|
|
@@ -22202,23 +22314,24 @@ ${msg}
|
|
|
}
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
- clearTimeout(this.timer);
|
|
|
- this.timer = null;
|
|
|
- clearInterval(this.timer2);
|
|
|
- this.timer2 = null;
|
|
|
- clearInterval(this.pasteTimer);
|
|
|
- this.pasteTimer = null;
|
|
|
+ // clearTimeout(this.timer);
|
|
|
+ // this.timer = null;
|
|
|
+ // clearInterval(this.timer2);
|
|
|
+ // this.timer2 = null;
|
|
|
+ // clearInterval(this.pasteTimer);
|
|
|
+ // this.pasteTimer = null;
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
- clearTimeout(this.timer);
|
|
|
- this.timer = null;
|
|
|
- clearInterval(this.timer2);
|
|
|
- this.timer2 = null;
|
|
|
- clearInterval(this.pasteTimer);
|
|
|
- this.pasteTimer = null;
|
|
|
+ // clearTimeout(this.timer);
|
|
|
+ // this.timer = null;
|
|
|
+ // clearInterval(this.timer2);
|
|
|
+ // this.timer2 = null;
|
|
|
+ // clearInterval(this.pasteTimer);
|
|
|
+ // this.pasteTimer = null;
|
|
|
next();
|
|
|
},
|
|
|
created() {
|
|
|
+ this.selectFileid();
|
|
|
this.getStudent();
|
|
|
this.getTeacher();
|
|
|
this.getClass();
|
|
@@ -22245,12 +22358,12 @@ ${msg}
|
|
|
|
|
|
}
|
|
|
this.loading = false;
|
|
|
- this.timer2 = setInterval(() => {
|
|
|
- this.selectEva();
|
|
|
- }, 5000);
|
|
|
- this.pasteTimer = setInterval(() => {
|
|
|
- this.getPaste();
|
|
|
- }, 1000);
|
|
|
+ // this.timer2 = setInterval(() => {
|
|
|
+ // this.selectEva();
|
|
|
+ // }, 5000);
|
|
|
+ // this.pasteTimer = setInterval(() => {
|
|
|
+ // this.getPaste();
|
|
|
+ // }, 1000);
|
|
|
setTimeout(() => {
|
|
|
// this.selectAllType();
|
|
|
|