lsc 6 ay önce
ebeveyn
işleme
21640b04ba

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.4b2d9c4945599c6fb6b295be79faf56d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.8db9a3f753f5644e3c5e.js></script><script type=text/javascript src=./static/js/app.440931603a26e139331f.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.449d29f59dbf8ba2b38fe3c0a689e7f3.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.8db9a3f753f5644e3c5e.js></script><script type=text/javascript src=./static/js/app.eb10418b61763d564e80.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.449d29f59dbf8ba2b38fe3c0a689e7f3.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.449d29f59dbf8ba2b38fe3c0a689e7f3.css.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.eb10418b61763d564e80.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.eb10418b61763d564e80.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 65 - 10
src/components/pages/aiAddCourse/addCourse.vue

@@ -3138,8 +3138,8 @@
                             <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
                               AI生成教案
                             </button> -->
-                            <button class="c_pub_button_add pub_btn_add_img" @click="createTaskAn(itemTaskIndex)" v-loading="taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex]  == true">
-                              AI生成学历案
+                            <button class="c_pub_button_add pub_btn_add_img" @click="createTaskAn(itemTaskIndex)">
+                              {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex]  == true ? '停止生成' : 'AI生成学历案'}}
                             </button>
                             <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
                               智能检索视频
@@ -4889,7 +4889,7 @@
                               <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
                             </div>
                             <div>
-                              <MindTask  :showBar="false" :mindData="itemTask" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' "></MindTask>
+                              <MindTask  :showBar="false" :mindData="itemTask" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' " :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
                             </div>
                           </div>
                         </div>
@@ -7418,6 +7418,7 @@ export default {
       pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
       pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
       taskAnLoading: [],
+      taskAnCancelToken: [],
       dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
       taskCancelToken1: [],
       taskCancelToken2: [],
@@ -9036,7 +9037,8 @@ export default {
     async createTaskAn(index){
       // this.lineCount = index;
       if(this.taskAnLoading[index]){
-        this.$message.error('请等待当前学历案生成完成')
+        // this.$message.error('请等待当前学历案生成完成')
+        this.cancelAjax('taskAn', index)
         return
       }
       this.taskAnLoading[index] = true
@@ -9054,6 +9056,8 @@ Language: ${this.getLang()}
 ## 任务教案
 ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
 
+      _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
+
       let parm = {
         assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
         message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
@@ -9064,7 +9068,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
         temperature: this.mode == 3 ? 0.5 : 0.1,
       }
       this.ajax
-        .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
+        .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
         .then(async (response) => {
           console.log(response);
           let data = response.data.FunctionResponse
@@ -9075,14 +9079,17 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
             let _html =  md.render(data.message)
             await _this.generate(name, _html, index, ()=>{
               _this.taskAnLoading[index] = false
+              _this.taskAnCancelToken[index] = null
             })
           }else{
             _this.taskAnLoading[index] = false
+            _this.taskAnCancelToken[index] = null
           }
           
         }).catch((error) => {
           console.log(error);
           _this.taskAnLoading[index] = false
+          _this.taskAnCancelToken[index] = null
         });
     },
     async generate(a, html, index, callback) {
@@ -16419,7 +16426,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
         let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
         let name = _task.task+'-教案'
         let _html =  _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
-        if(!this.cid){
+        if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
           await this.generate(name, _html, i)
         }
         let file = await this.generateExport(name, _html, i)
@@ -16437,7 +16444,8 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
           if(!this.cid){
             this.addWork(3)
           }else{
-              this.steps = 4;
+            this.updateWork();
+            this.steps = 4;
           }
         }, 2000);
       });
@@ -18209,6 +18217,7 @@ ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考
         }
         this.$forceUpdate()
       }
+      
       if(type == 'aiTaskGL2'){
         this.$message.success("已经成功停止生成任务概述")
         if(this.taskCancelToken2 && this.taskCancelToken2[index]){
@@ -18220,6 +18229,18 @@ ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考
         }
         this.$forceUpdate()
       }
+
+      if(type == 'taskAn'){
+        this.$message.success("已经成功停止生成任务概述")
+        if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
+          this.taskAnCancelToken[index].cancel('Request canceled by the user.');
+          this.taskAnCancelToken[index] = null;
+        }
+        if(this.taskAnLoading[index]){
+          this.taskAnLoading[index] = false
+        }
+        this.$forceUpdate()
+      }
     },
     async aiGetTask2(messages, callback) {
       let _this = this
@@ -18743,10 +18764,41 @@ ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考
             _this.$forceUpdate();
 
 
+            // setTimeout(()=>{
+            //   for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
+            //     this.aiDetail52(_this.aiJson['teacherDetail2'], i)
+            //   }
+            // }, 0)
             setTimeout(()=>{
               for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
-                this.aiDetail52(_this.aiJson['teacherDetail2'], i)
+                const _tindex = 'task-' + i;
+                if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
+                  _this.taskDetailLoading5.push(_tindex)
+                }
+                if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
+                  _this.ttaskDetailLoading5.push(_tindex)
+                }
+              }
+              let ij = 0;
+
+              function processNext() {
+                if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
+                  const _tindex = 'task-' + ij;
+                  if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
+                    ij++;
+                    processNext();
+                    return;
+                  }
+                  // 处理当前任务
+                  _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
+                    // 回调函数,当前任务完成后执行
+                    ij++;
+                    processNext(); // 处理下一个任务
+                  });
+                }
               }
+
+              processNext(); // 启动处理
             }, 0)
           }
           callback ? callback() : ''
@@ -19532,8 +19584,8 @@ ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考
             _this.$nextTick(()=>{
               setTimeout(() => {
                 for (var j = 0; j < _task.toolChoose.length; j++) {
-                  if(_this.pjTemplateArray.indexOf(_this.templateid) !=-1 && toolsJson[_task.toolChoose[j].tool] && _this.pjIndex.indexOf(toolsJson[_task.toolChoose[j].tool].tool) != -1){
-                    _this.$refs['evalist'+index+j][0].openAiDialog();
+                  if(_this.pjTemplateArray.indexOf(_this.templateid) !=-1 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
+                    _this.$refs['evalist'+index+j][0].openAiDialog('elist');
                   }
                 }
               }, 2000);
@@ -23531,6 +23583,9 @@ ${msg}
     setEvaList(task, tool, elist){
       this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
       this.$forceUpdate()
+      if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
+        this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
+      }
     }
   },
   beforeDestroy() {

+ 7 - 7
src/components/pages/aiAddCourse/evaList.vue

@@ -122,7 +122,7 @@ export default {
             cancelToken: null,
             ruleLoading: [],
             cancelRuleToken: [],
-            interPan: false
+            interPan: true
         }
     },
     watch: {
@@ -219,7 +219,7 @@ export default {
             _this.loading = true
 
             let fileid = _this.knowFileids.length ? [..._this.knowFileids] : []
-            let taskDetail = _this.unitJson[0].chapterInfo[0].taskJson[_this.itemTaskIndex].taskDetail.replaceAll('\n', ' ')
+            let taskDetail = _this.unitJson[0].chapterInfo[0].taskJson[_this.itemTaskIndex].taskDetail ? _this.unitJson[0].chapterInfo[0].taskJson[_this.itemTaskIndex].taskDetail.replaceAll('\n', ' ') : ''
             let tool = _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_this.itemTaskIndex].toolChoose[_this.toolIndex].tool[0]].name
             let toolDetail = _this.unitJson[0].chapterInfo[0].taskJson[_this.itemTaskIndex].toolChoose[_this.toolIndex].toolDetail.replaceAll('\n', ' ')
             let messages = `
@@ -245,10 +245,10 @@ Language: ${this.getLang()}
 #目标#
 你需要完成以下五个步骤:
 1.你要结合<任务描述:${taskDetail}><工具名称:${tool}>和<工具描述:${toolDetail}>生成适合当前作业的评价标准。评价标准用于评估学生的能力。
-2.你要严格检索和匹配上传文件的核心素养和课程目标内容。你要先将评价标准对应到课程目标中,然后检索上传的文件中的“核心素养”与评价标准进行匹配。所有的核心素养信息必须以上传文件的内容为依据,不可以使用其他的默认信息或者模版!每个评价标准必须与文件中明确的核心素养对应。避免使用文件中未出现的任何术语。
+2.你要严格检索和匹配上传文件的核心素养和课程目标内容。你要先将评价标准对应到课程目标中,然后检索上传的文件中的“核心素养”与评价标准进行匹配。所有的核心素养信息必须以上传文件的内容为依据,不可以使用其他的默认信息或者模版!每个评价标准必须与文件中明确的核心素养对应。避免使用文件中未出现的任何术语,不允许输出范例内容!
 3.只有当上传的文件包含多个学科的课程标准时,允许你检索《跨学科素养参考资料》。你需要先检索学科的课程标准,如果你判断当前的评价标准无法对应具体学科的核心素养,可以检索《跨学科素养参考资料》,找到最合适的并输出。
 4.你要根据第一步生成的评价标准制定每一条标准的六级评价细则,这个评价细则将用于对学生能力的打分。
-5.你要将前四步生成的内容整理成json格式。
+5.只输出json格式的内容,其他的不要输出!不要输出范例内容!
 
 #风格#
 专业的教育教学用语,简练易懂,逻辑性强。
@@ -261,7 +261,7 @@ Language: ${this.getLang()}
 
 #输出要求#
 1.评价标准的个数为3个,最多不能超过5个。每一个评价标准不能超过30字。生成的评价标准只能和当前的工具描述相关。选择题、排序、选择匹配工具只生成1个评价标准。输出内容和格式要求参考#评价标准范例#。注意!输出内容不能复制范例内容。注意!不要出现#评价标准错误范例#中的情况。
-2.每1个评价标准只对应1个关联度最高的核心素养。学科核心素养输出参考#核心素养输出范例#。注意!1个评价标准不能对应多个核心素养。不允许出现上传文件中没有的核心素养。严格按照上传文件中检索到的核心素养输出。每个评价标准必须与文件中明确的核心素养对应。避免使用文件中未出现的任何术语。不要出现#核心素养错误范例#中的情况。
+2.每1个评价标准只对应1个关联度最高的核心素养。学科核心素养输出参考#核心素养输出范例#。注意!1个评价标准不能对应多个核心素养。不允许出现上传文件中没有的核心素养。严格按照上传文件中检索到的核心素养输出。每个评价标准必须与文件中明确的核心素养对应。避免使用文件中未出现的任何术语。不要出现#核心素养错误范例#中的情况,不允许输出范例内容!
 3.具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。输出格式参考#评价细则范例#。
 4.参考#json格式范例#,将内容整理成json格式。**之间的内容为json格式中的代码。以*[*开头,以*]*结尾。每一条评价标准、核心素养以及评价细则以*{*开头,以*}*结尾。核心素养前有*"core":*。评价标准前有*"std":*。评价细则前有*"rule":*。具体内容放在""之间。格式如下:
 [
@@ -269,7 +269,7 @@ Language: ${this.getLang()}
     {"std":"评价标准","core":"核心素养(识别上传文件对应的学科)","rule":"评价细则"},
     {"std":"评价标准","core":"核心素养(识别上传文件对应的学科)","rule":"评价细则"},
 ]
-5.只输出json格式的内容,其他的不要输出
+5.只输出json格式的内容,其他的不要输出!不要输出范例内容!
 
 #评价标准范例#
 学生能够准确描述红树林生态功能及动植物之间的关系。 
@@ -494,7 +494,7 @@ ${this.aiJson['aiRateRule']}
             this.$confirm('确定删除吗?').then(() => {
                 this.eList.splice(index, 1)
                 if (!this.eList.length) {
-                    this.$emit('setEvaList', this.itemTaskIndex, this.toolIndex, _this.eList)
+                    this.$emit('setEvaList', this.itemTaskIndex, this.toolIndex, this.eList)
                 }
             })
 

+ 20 - 0
src/components/pages/aiAddCourse/jsmind2.vue

@@ -118,6 +118,26 @@ export default {
     // this.mouseWheel();
   },
   methods: {
+    refresh(){
+      // console.log(cur.task);
+      let data = this.setMindData(this.mindData)
+      this.mind = data;
+      this.$forceUpdate()
+      if (data.data.length) {
+        if (data.data[0].topic === "" && data.data.length === 1) {
+          this.mindV = true;
+        } else {
+          this.mindV = false;
+        }
+        setTimeout(() => {
+          if (this.jm) {
+            this.jm.show(this.mind);
+          } else {
+            this.open_empty();
+          }
+        }, 1000);
+      }
+    },
     beforeUpload(file) {
       // 上传文件之前钩子
       if (file) {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor