lsc 11 mesiacov pred
rodič
commit
fa3f45c0d4

+ 116 - 33
src/components/pages/aiAddCourse/addCourse.vue

@@ -1991,7 +1991,7 @@
                 <!-- <div class="rb_c_box_btn">
                   <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
                 </div> -->
-                <div class="basic_box" ref="unitBox">
+                <div class="basic_box" ref="unitBox" @scroll="taskScroll">
                   <div v-if="false" style="
                       display: flex;
                       flex-direction: row;
@@ -5055,14 +5055,15 @@
                                     <!-- <span>核心素养:</span> -->
                                     <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标"  style="width: calc(100% - 280px);"/>
                                     <el-switch
+                                      @change="forceUpdate"
                                       class="rateSwitch"
                                       style="margin-left: auto;"
                                       v-model="itemTask.eList[eIndex].isai"
                                       active-color="#0061FF"
-                                      active-text="人工评分"
-                                      inactive-text="AI评分"
-                                      active-value="2"
-                                      inactive-value="1">
+                                      active-text="AI评分"
+                                      inactive-text=""
+                                      active-value="1"
+                                      inactive-value="2">
                                     </el-switch>
                                   </div>
                                   <div class="elist_inptu_text" v-show="false">
@@ -14520,9 +14521,10 @@ export default {
           value: "",
           detail: "",
           score: 5,
+          isai: "1",
         })
         : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
-          { value: "", detail: "", score: 5 },
+          { value: "", detail: "", score: 5,isai: "1", },
         ]);
       this.$forceUpdate();
     },
@@ -14605,6 +14607,10 @@ export default {
         });
     },
     updateEvaJson(array) {
+      array = array.filter((item) => {
+        item.isai = "1"
+        return item;
+      });
       this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
         this.evatIndex
       ].eList = array;
@@ -14834,6 +14840,19 @@ export default {
       // }
       this.$forceUpdate();
     },
+    taskScroll(){
+      // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
+      const sections = document.querySelectorAll('.taskBorder');
+      const scrollPosition = document.querySelector('.basic_box').scrollTop;
+
+      sections.forEach((section, index) => {
+        const offsetTop = section.offsetTop;
+        const offsetHeight = section.offsetHeight;
+        if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
+          this.isClickColor = index +1;
+        }
+      });
+    },
     taskOpen(i, stageIndex) {
       if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
         this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
@@ -16900,6 +16919,9 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
         _this.textLoading = false
         _this.ttextLoading = false
         _this.isTextCancelToken = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiGetgetAiContent(_uuid)
@@ -16915,7 +16937,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           this.isTextCancelSource.close();
           this.isTextCancelSource = null;
           this.courseText = _mdText;
@@ -16952,7 +16974,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
       this.isTextCancelSource.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.textLoading = false
         _this.ttextLoading = false
         _this.isTextCancelToken = null
@@ -18078,6 +18100,10 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
             for (var i = 0; i < tArray.length; i++) {
               let _task = tArray[i]
               _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
+              _task.elist = _task.elist.filter(el=>{
+                el.isai = "1"
+                return el
+              })
               _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
               _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
               if (_task.toolChoose.length) {
@@ -18342,6 +18368,10 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
             // for (var i = 0; i < tArray.length; i++) {
               let _task = tArray
               _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
+              _task.elist = _task.elist.filter(el=>{
+                el.isai = 1
+                return el
+              })
               _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
               _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
               if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
@@ -18681,6 +18711,10 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
               _this.aiGet322(messages, index)
               return;
             }
+            _task.elist = _task.elist.filter(el=>{
+              el.isai = "1"
+              return el
+            })
             _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
             // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
             _this.$forceUpdate();
@@ -19473,6 +19507,9 @@ ${msg}
         _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
         _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
         _this.isOutlineTaskCancelToken[index] = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
@@ -19488,7 +19525,7 @@ ${msg}
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           this.isOutlineTaskCancelSource[_tindex2].close();
           this.isOutlineTaskCancelSource[_tindex2] = null;
           this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
@@ -19525,7 +19562,7 @@ ${msg}
       this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
         _this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
         _this.isOutlineTaskCancelToken[_tindex2] = null
@@ -19659,6 +19696,9 @@ ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').repl
         _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
         _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
         _this.isOutlineTaskCancelToken[index] = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
@@ -19797,6 +19837,9 @@ ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
         _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
         _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
         _this.isOutlineTaskCancelToken[index] = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
@@ -19812,7 +19855,7 @@ ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           this.isOutlineTaskCancelSource[_tindex2].close();
           this.isOutlineTaskCancelSource[_tindex2] = null;
           this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
@@ -19854,7 +19897,7 @@ ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
       this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
         _this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
         _this.isOutlineTaskCancelToken[_tindex2] = null
@@ -19964,6 +20007,9 @@ ${_this.aiCallBack.taskDetail}
       }).catch(function (error) {
         _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
         _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
@@ -19979,7 +20025,7 @@ ${_this.aiCallBack.taskDetail}
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           _source.close();
           this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
           this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
@@ -20013,7 +20059,7 @@ ${_this.aiCallBack.taskDetail}
       _source.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
         _this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
         _source.close();
@@ -20122,6 +20168,9 @@ ${msg} 输出格式和内容要求参考#格式与要求
       }).catch(function (error) {
         _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
         _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
@@ -20137,7 +20186,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           _source.close();
           this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
           this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
@@ -20172,7 +20221,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
       _source.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
         _this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
         _source.close();
@@ -20322,7 +20371,12 @@ ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求
               try {
                 let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
                 let match = data.message.match(regex);
-                _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
+                let elist = JSON.parse(match[0])
+                elist = elist.filter(el=>{
+                  el.isai = 1
+                  return el
+                })
+                _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
 
                 // var message = data.message;
                 // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
@@ -20347,6 +20401,9 @@ ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求
         _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
       }).catch(function (error) {
         _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
     },
@@ -20468,6 +20525,9 @@ ${_text2}`
       }).catch(function (error) {
         _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
         _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
@@ -20483,7 +20543,7 @@ ${_text2}`
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           _source.close();
           this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
           this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
@@ -20520,7 +20580,7 @@ ${_text2}`
       _source.onerror = function(event) {
           // 处理错误,可以尝试重新连接
           console.log('EventSource error:', event);
-          _this.$message.error("网络错误")
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
           _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
           _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
           _source.close();
@@ -20646,6 +20706,9 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
       }).catch(function (error) {
         _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
         _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
@@ -20663,7 +20726,7 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           _source.close();
           this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
           this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
@@ -20699,7 +20762,7 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
       _source.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
         _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
         _source.close();
@@ -20710,7 +20773,7 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
       let _eData = JSON.parse(_e.data).content;
       if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
         //对话已经完成
-        this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
+        this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
         _source.close();
         this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
         this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
@@ -20860,6 +20923,9 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
         _this.cpoteLoading[_index] = false
         _this.cpotetLoading[_index] = false
         callback ? callback() : ''
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiCpotegetAiContent(_uuid, _index, callback)
@@ -20875,7 +20941,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           _source.close();
           this.cpote[loading] = _mdText;
           this.cpoteLoading[loading] = false
@@ -20911,7 +20977,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
       _source.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.cpoteLoading[loading] = false
         _this.cpotetLoading[loading] = false
         _source.close();
@@ -21040,6 +21106,9 @@ ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         _this.teacherTextLoading = false
         _this.tteacherTextLoading = false
         _this.isTeacherTextCancelToken = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aiteacherTextDetailgetAiContent(_uuid)
@@ -21055,7 +21124,7 @@ ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           this.isTeacherTextCancelSource.close();
           this.isTeacherTextCancelSource = null;
           this.teacherCourseText = _mdText;
@@ -21096,7 +21165,7 @@ ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
       this.isTeacherTextCancelSource.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.teacherTextLoading = false
         _this.tteacherTextLoading = false
         _this.isTeacherTextCancelToken = null
@@ -21228,6 +21297,9 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         _this.targetTextLoading = false
         _this.ttargetTextLoading = false
         _this.isTargetCancelToken1 = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aitargetTextDetailgetAiContent(_uuid)
@@ -21243,7 +21315,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           this.isTargetCancelSource1.close();
           this.isTargetCancelSource1 = null;
           this.targetCourseText = _mdText;
@@ -21284,7 +21356,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
       this.isTargetCancelSource1.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.targetTextLoading = false
         _this.ttargetTextLoading = false
         _this.isTargetCancelToken1 = null
@@ -21420,6 +21492,9 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         _this.targetTextLoading2 = false
         _this.ttargetTextLoading2 = false
         _this.isTargetCancelToken2 = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aitargetTextDetail2getAiContent(_uuid)
@@ -21580,6 +21655,9 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         _this.targetTextLoading2 = false
         _this.ttargetTextLoading2 = false
         _this.isTargetCancelToken2 = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
       await _this.aitargetTextDetail2getAiContent(_uuid)
@@ -21595,7 +21673,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         let _eData = JSON.parse(_e.data).content;
         if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
           //对话已经完成
-          _mdText = _mdText.replace("_", "");
+          _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
           this.isTargetCancelSource2.close();
           this.isTargetCancelSource2 = null;
           this.targetCourseText2 = _mdText;
@@ -21635,7 +21713,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
       this.isTargetCancelSource2.onerror = function(event) {
         // 处理错误,可以尝试重新连接
         console.log('EventSource error:', event);
-        _this.$message.error("网络错误")
+        _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
         _this.targetTextLoading2 = false
         _this.ttargetTextLoading2 = false
         _this.isTargetCancelToken2 = null
@@ -21761,6 +21839,9 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
         _this.targetTextLoading2 = false
         _this.ttargetTextLoading2 = false
         _this.isTargetCancelToken2 = null
+        if(error && error.message != 'Request canceled by the user.'){
+          _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
+        }
         console.log(error);
       });
     },
@@ -26498,12 +26579,11 @@ ol {
   color: #0061FF;
 }
 
-.rateSwitch >>> .el-switch__label--left{
+.rateSwitch >>> .el-switch__label--right{
   display: flex;
   align-items: center;
 }
-
-.rateSwitch >>> .el-switch__label--left::before{
+.rateSwitch >>> .el-switch__label--right::before{
   content: "";
   width: 14px;
   height: 14px;
@@ -26512,6 +26592,9 @@ ol {
   background-size: 100% 100%;
   display: block;
   margin-right: 7px;
+  background-image: url(../../../assets/icon/new/u_op2.png);
+}
+.rateSwitch >>> .el-switch__label--right.is-active::before{
   background-image: url(../../../assets/icon/new/u_op.png);
 }
 </style>

+ 1 - 1
src/components/pages/components/studentWorksDetail.vue

@@ -3593,7 +3593,7 @@ export default {
           setTimeout(()=>{
             let scrollBody = document.querySelector(".zyBoxC").parentElement
             scrollBody.scrollTop = scrollBody.scrollTop - 70
-          }, 100);
+          }, 0);
           // function scrollToElement(elementA) {
           //   return new Promise((resolve) => {
           //     const observer = new IntersectionObserver((entries) => {