Browse Source

Merge branch 'beta'

lsc 1 year ago
parent
commit
be95130b28

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.0a244d8ed7b630a0e7defc6f9ad5b003.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.d5f0d79dbb0d92c052d4.js></script><script type=text/javascript src=./static/js/app.feafa4415508799db9a3.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.dcc3f419e9c2716208ea7bd5d1e0f0d1.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.d5f0d79dbb0d92c052d4.js></script><script type=text/javascript src=./static/js/app.5b24da4b1d497a6c43b5.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.dcc3f419e9c2716208ea7bd5d1e0f0d1.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.dcc3f419e9c2716208ea7bd5d1e0f0d1.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.5b24da4b1d497a6c43b5.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.5b24da4b1d497a6c43b5.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


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

@@ -1398,7 +1398,7 @@
                 </div>
                 <div class="addTaskBorder" @click="addTaskBorder">
                   <div>
-                    <img src="../../assets/icon/addHw.png" alt />
+                    <img src="../../assets/icon/addHW.png" alt />
                     <span>添加任务</span>
                   </div>
                 </div>

+ 233 - 120
src/components/pages/aiAddCourse/addCourse.vue

@@ -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">
                   任务簇
@@ -1603,7 +1603,16 @@
                     }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
                       v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
                       <div style="background: #fff; border-radius: 5px">
-                        <div class="taskTitle">任务{{ itemTaskIndex + 1 }}</div>
+                        <div class="taskTitle">
+                          <div style="display: flex;width: 100%;justify-content: space-between;">
+                            <span>任务{{ itemTaskIndex + 1 }}</span>
+                            <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && courseState == 5">
+                              <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
+                                @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{loading = false})"
+                                @click="openAiDialog(2, 'aiTask',()=>{loading = false})">生成任务</button>
+                            </el-tooltip>
+                          </div>
+                        </div>
                         <!-- padding: 20px; -->
                         <div v-if="unitJson[unitIndex].easy != 1">
                           <div :style="{
@@ -5698,7 +5707,7 @@
     <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
     </aiDialog>
     <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
-      @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
+      @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
     <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
     <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
   </div>
@@ -5729,6 +5738,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 +5764,7 @@ export default {
     aiTips,
     tipsDialog,
     aiCreateDialog,
-    aiCreateVideoDialog
+    aiCreateVideoDialog,
   },
   data() {
     return {
@@ -6004,7 +6014,7 @@ export default {
       newIndex: "",
       englishList: {},
       typeIndex: "",
-      courseState: 4,
+      courseState: 5,
       taskJSONa: [
         {
           task: "",
@@ -6072,7 +6082,7 @@ export default {
         "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
         "aiTask": "请根据<教学任务教案>。",
         "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
-        "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述和任务名:<任务名>:<任务描述>",
+        "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
         "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
         "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
         "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
@@ -6115,6 +6125,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: {
@@ -6808,7 +6819,7 @@ export default {
       // if (this.cidType == 1) {
       if (this.steps == 1) {
         if (this.courseName != "") {
-          if (this.ttaskDetailLoading5.indexOf('task-') !== -1 || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
+          if ((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
             this.$message({
               message: "请回答完毕后再次发送",
               type: "warning"
@@ -6837,6 +6848,12 @@ export default {
             return;
           }
 
+          // if (!this.isOutline2) {
+          //   this.openAiDialog(clickType, 'aiTeacher')
+          //   return;
+          // }
+
+
           if (!this.isOutline2 && this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
             this.openAiDialog(clickType, 'aiTeacher')
             return;
@@ -7383,10 +7400,19 @@ export default {
           await this.generate(name, _html, i)
         }
       }else if(this.courseState == 5){
-        let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
-        let name = _task.task+'-教案'
-        let _html =  _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
-        await this.generate(name, _html, index)
+        if(index == 0 || index){
+          let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
+          let name = _task.task+'-教案'
+          let _html =  _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
+          await this.generate(name, _html, index)
+        }else {
+          for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
+            let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
+            let name = _task.task+'-教案'
+            let _html =  _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
+            await this.generate(name, _html, i)
+          }
+        }
       }
 
     },
@@ -9106,7 +9132,11 @@ export default {
         this.$forceUpdate();
       }
     },
-    addWork() {
+    addWork(type) {
+      if(type == 2 && this.courseName == "") {
+          this.$message.error("请补充填写课程名称");
+          return;
+      }
       let cPan = 1;
       for (var i = 0; i < this.unitJson.length; i++) {
         for (
@@ -9200,9 +9230,12 @@ 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()
+          if(type == 2){
+            this.retrunCourse()
+          }
         })
         .catch((err) => {
           this.$message.error("网络不佳");
@@ -13485,9 +13518,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;
@@ -13750,11 +13783,12 @@ ${msg} 为**每个教学任务分别输出**以下内容。
 ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
 
 ## 格式要求
-任务数量:${this.teacherText.length}个
+任务数量:${this.unitJson[0].chapterInfo[0].taskJson}个
 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动
 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
-工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
+工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
+出现选择题和问答题的概率提高
 
 ## 参考资料
 教学任务教案:${_text}
@@ -13806,7 +13840,7 @@ ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 目标层\n'+t
 
 
 ## Format example
-[{"task": "任务名称1","detail": "教案输出为文本格式就行"},{"task": "任务名称2","detail": "教案输出为文本格式就行"}]`
+[{"task": "任务名称1","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称2","detail": "教案输出为文本或markdown格式就行"}]`
         this.aiGet4(message, () => {
           this.loading = false
           this.isOutline2 = true
@@ -13858,11 +13892,13 @@ ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 目标层\n'+t
 // 补充资料:${url.join(",")}
 // 补充描述:${this.courseText2} ##补充参考资料和
 
-      let msg = `
+      let msg = `NOTICE
+Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
 ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content.
 
---------
+#Context
 ## 参考资料
 课程名字:${this.courseName}
 ${sub.length ? '学科:' + sub.join(",") : ''}
@@ -13870,15 +13906,13 @@ ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
 ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
 ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
 
---------
 ## 要求
-${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品,格式参考## Format example
+${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品
 
---------
 ## Format example
--课程简要描述:
--驱动性问题:**1个**驱动整个项目的问题
--最终作品:对应解决驱动性问题的作品,可个人可团队`
+课程简要描述:课程内容的简单叙述。
+驱动性问题:1个驱动整个项目的问题
+最终作品:对应解决驱动性问题的作品,可个人可团队`
       this.aiGet(msg)
     },
     setUnitJson() {
@@ -13922,7 +13956,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
       // })
       let params = {
         assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
-        message: [{"type":"text", "text":messages}],
+        message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
         session_name: _uuid,
         userId: _this.userid,
         uid: _uuid,
@@ -13968,6 +14002,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]") {
@@ -13979,6 +14014,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
           this.ttextLoading = false
           return;
         } else {
+          _iindex++
           //对话还在继续
           let _text = "";
           _text = _eData.replaceAll("'", "");
@@ -13992,7 +14028,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
           // 处理流数据
         }
@@ -14788,50 +14827,16 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
                   // dArray = JSON.parse(jsonString);
               } catch (error) {
                 console.log("error_________________" + error);
+                _this.loading = false
               }
             }
-
-            _this.teacherText = JSON.parse(JSON.stringify(dArray))
-            if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
-              _this.unitJson[0].chapterInfo[0].taskJson = []
-              for (var i = 0; i < dArray.length; i++) {
-                let _task = dArray[i]
-                _this.unitJson[0].chapterInfo[0].taskJson.push({
-                  task: _task.task,
-                  taskDetail: "",
-                  taskDetail2: "",
-                  taskDetail3: _task.detail,
-                  chapterData: [],
-                  toolText: "",
-                  toolChoose: [
-                    {
-                      tool: [],
-                      toolDetail: "",
-                      toolType: 0,
-                      askCount: 1,
-                      askTitle: "",
-                      askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
-                    },
-                  ],
-                  isShowTools: false,
-                  askCount: 1,
-                  isFold: 2,
-                  askTitle: "",
-                  askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
-                  checkJson: [{ checkCount: [], checkPerent: [] }],
-                  homeworkList: [],
-                })
-              }
-              _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
-              _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
-              _this.$forceUpdate();
-            } else {
-              for (var i = 0; i < dArray.length; i++) {
-                let _task = dArray[i]
-                if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
-                  _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
-                }else {
-                  _this.unitJson[0].chapterInfo[0].taskJson[i] = {
+            try {
+              _this.teacherText = JSON.parse(JSON.stringify(dArray))
+              if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
+                _this.unitJson[0].chapterInfo[0].taskJson = []
+                for (var i = 0; i < dArray.length; i++) {
+                  let _task = dArray[i]
+                  _this.unitJson[0].chapterInfo[0].taskJson.push({
                     task: _task.task,
                     taskDetail: "",
                     taskDetail2: "",
@@ -14855,12 +14860,52 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
                     askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
                     checkJson: [{ checkCount: [], checkPerent: [] }],
                     homeworkList: [],
+                  })
+                }
+                _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
+                _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
+                _this.$forceUpdate();
+              } else {
+                for (var i = 0; i < dArray.length; i++) {
+                  let _task = dArray[i]
+                  if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
+                    _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
+                  }else {
+                    _this.unitJson[0].chapterInfo[0].taskJson[i] = {
+                      task: _task.task,
+                      taskDetail: "",
+                      taskDetail2: "",
+                      taskDetail3: _task.detail,
+                      chapterData: [],
+                      toolText: "",
+                      toolChoose: [
+                        {
+                          tool: [],
+                          toolDetail: "",
+                          toolType: 0,
+                          askCount: 1,
+                          askTitle: "",
+                          askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
+                        },
+                      ],
+                      isShowTools: false,
+                      askCount: 1,
+                      isFold: 2,
+                      askTitle: "",
+                      askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
+                      checkJson: [{ checkCount: [], checkPerent: [] }],
+                      homeworkList: [],
+                    }
                   }
                 }
+                _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
+                _this.$forceUpdate();
               }
-              _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
-              _this.$forceUpdate();
+            } catch (error) {
+              console.log("error_________________" + error);
+              _this.loading = false
             }
+            
           }
           callback ? callback() : ''
         })
@@ -14896,18 +14941,21 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
           url.push(this.infoData[i].url)
         }
       }
-      let messages = `
+      let messages = `NOTICE
+Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content.
 
---------
+#Context
 ## 要求
-${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
+${msg}
 
---------
-## 教学任务描述
+## 参考信息
 任务名称:${_this.aiCallBack.task}
-大纲描述:${_this.aiCallBack.taskDetail2}`
+
+## 优化内容
+大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
 
 // -------- #补充参考资料和
 // ## 补充参考资料
@@ -14933,7 +14981,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
       // })
       let params = {
         assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
-        message: [{"type":"text", "text":messages}],
+        message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
         session_name: _uuid,
         userId: _this.userid,
         uid: _uuid,
@@ -14983,6 +15031,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]") {
@@ -14994,6 +15043,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
           this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
           return;
         } else {
+          _iindex++
           //对话还在继续
           let _text = "";
           _text = _eData.replaceAll("'", "");
@@ -15006,8 +15056,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)
           // 处理流数据
         }
@@ -15036,22 +15089,24 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
       }
 
 
-      let messages = `
+      let messages = `NOTICE
+Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content.
 
---------
+#Context
 ## 要求
 ${msg} 
 
---------
-## 优化信息
+## 参考资料
 任务名字: ${_this.aiCallBack.task}
-任务描述: ${_this.aiCallBack.taskDetail}
 
-# 格式与要求
-- 任务名:
-- 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
+## 优化信息
+${_this.aiCallBack.taskDetail}
+
+# Format example
+任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
       _this.taskDetailLoading2.push(_tindex)
       _this.ttaskDetailLoading2.push(_tindex)
       let _uuid = uuidv4();
@@ -15072,7 +15127,7 @@ ${msg}
       // })
       let params = {
         assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
-        message: [{"type":"text", "text":messages}],
+        message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
         session_name: _uuid,
         userId: _this.userid,
         uid: _uuid,
@@ -15120,6 +15175,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]") {
@@ -15131,6 +15187,7 @@ ${msg}
           this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
           return;
         } else {
+          _iindex++
           //对话还在继续
           let _text = "";
           _text = _eData.replaceAll("'", "");
@@ -15144,7 +15201,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)
           // 处理流数据
         }
@@ -15174,23 +15234,24 @@ ${msg}
       }
 
       // **重点考虑该任务及工具名和工具内容的情况下*
-      let messages = `
+      let messages = `NOTICE
+Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content.
 
---------
+#Context
 ## 参考内容
 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
-工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]] : '无'}
+工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]].name : '无'}
 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
 
---------
 ## 要求
 ${msg} 输出格式和内容要求参考#格式与要求
 
-# 格式与要求
--工具指引:以友好,明确的口吻告诉学生该如何使用该工具`
+# Format example
+工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
       _this.taskDetailLoading3.push(_tindex)
       _this.ttaskDetailLoading3.push(_tindex)
       let _uuid = uuidv4();
@@ -15211,7 +15272,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
       // })
       let params = {
         assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
-        message: [{"type":"text", "text":messages}],
+        message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
         session_name: _uuid,
         userId: _this.userid,
         uid: _uuid,
@@ -15259,6 +15320,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]") {
@@ -15270,6 +15332,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
           this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
           return;
         } else {
+          _iindex++
           //对话还在继续
           let _text = "";
           _text = _eData.replaceAll("'", "");
@@ -15283,7 +15346,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)
           // 处理流数据
         }
@@ -15547,6 +15613,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]") {
@@ -15558,6 +15625,7 @@ ${_text2}`
           this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
           return;
         } else {
+          _iindex++
           //对话还在继续
           let _text = "";
           _text = _eData.replaceAll("'", "");
@@ -15571,8 +15639,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();
@@ -15606,15 +15679,14 @@ ${_text2}`
         }
       }
 
-      let messages = `
+      let messages = `NOTICE
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
 
---------
+#Context
 ## 要求
 ${msg} 
         
--------
 ## 补充描述
 课程简要描述:${_this.courseText}
 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
@@ -15691,7 +15763,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]") {
           //对话已经完成
@@ -15702,6 +15777,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("'", "");
@@ -15715,13 +15791,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")
@@ -15767,9 +15875,9 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
 // ${this.getListClassC(this.checkboxList2) ?  '班级:' + this.getListClassC(this.checkboxList2) : "无"}
 // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
 
-      let messages = `
+      let messages = `NOTICE
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
 
 ${msg} 
 
@@ -15853,6 +15961,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]") {
@@ -15865,6 +15974,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
           callback ? callback() : ''
           return;
         } else {
+          _iindex++
           //对话还在继续
           let _text = "";
           _text = _eData.replaceAll("'", "");
@@ -15878,7 +15988,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
           // 处理流数据
         }

+ 1 - 1
src/components/pages/aiAddCourse/aiCreateDialog.vue

@@ -361,7 +361,7 @@ ${mclass.length ? "面向年级:" + mclass.join(",") : ""}
                     type == 1
                         ? "6063369f-289a-11ef-8bf4-12e77c4cb76b"
                         : "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
-                message: [{ type: "text", text: message }],
+                message: [{ type: "text", text: message.replaceAll('\n', " ") }],
                 session_name: uuidv4(),
                 userId: this.userid,
                 file_ids: fileid.length ? [...fileid] : "",

+ 3 - 3
src/components/pages/aiAddCourse/templateDialog.vue

@@ -10,7 +10,7 @@
                 </el-input>
             </div>
             <div class="a-d-t-right">
-                <!-- <el-button @click="open2()" type="primary" size="small" style="margin-right: 10px;">设置模板</el-button> -->
+                <el-button @click="open2()" type="primary" size="small" style="margin-right: 10px;">设置模板</el-button>
                 <span @click.stop="close">×</span>
             </div>
         </div>
@@ -48,9 +48,9 @@
                             </el-tooltip>
                         </div>
                         <div class="a-d-b-i-top" v-if="item.uname">创建人:{{ item.uname }}</div>
-                        <el-tooltip :content="item.detail" placement="top" effect="dark">
+                        <!-- <el-tooltip :content="item.detail" placement="top" effect="dark"> -->
                             <div class="a-d-b-i-bottom">{{ item.detail }}</div>
-                        </el-tooltip>
+                        <!-- </el-tooltip> -->
                         <div class="a-d-b-i-bottomBtn">
                             <div style="
 										display: flex;

+ 19 - 7
src/components/pages/aiAddCourse/tipsDialog.vue

@@ -21,6 +21,7 @@
             </div>
         </div>
         <span slot="footer" class="dialog-footer">
+            <el-button @click="selectT(2)" type="primary">确定并保存课程</el-button>
             <el-button @click="selectT" type="primary">确 定</el-button>
             <el-button @click="close">关 闭</el-button>
         </span>
@@ -82,7 +83,7 @@ export default {
         close() {
             this.$emit('update:dialogVisibleTips', false)
         },
-        selectT() {
+        selectT(type) {
             if (!this.title) {
                 this.$message.error('请输入模板名称');
                 return
@@ -98,13 +99,13 @@ export default {
                     }
                 )
                     .then(() => {
-                        this.updateTipsTemplate();
+                        this.updateTipsTemplate(type);
                     })
                     .catch(() => {
                         return;
                     });
             }else{
-                this.addTipsTemplate();
+                this.addTipsTemplate(type);
             }
             // let params = {
             //     userid: this.userid,
@@ -138,7 +139,7 @@ export default {
             //         console.error(err);
             //     });
         },
-        addTipsTemplate() {
+        addTipsTemplate(type) {
             let params = [{
                 n: this.title,
                 d: this.detail,
@@ -150,7 +151,14 @@ export default {
                 .post(this.$store.state.api + "addTipsTemplate", params)
                 .then((res) => {
                     this.$message.success("保存成功");
-                    this.$emit('retrunCourse')
+                    console.log(res.data);
+                    this.$emit('update:templateid', res.data[0][0].id)
+                    console.log(this.templateid)
+                    if(type == 2){
+                        this.$emit('addWork', type)
+                    }else{
+                        this.$emit('retrunCourse')
+                    }
                     this.close();
                 })
                 .catch((err) => {
@@ -158,7 +166,7 @@ export default {
                     console.error(err);
                 });
         },
-        updateTipsTemplate() {
+        updateTipsTemplate(type) {
             let params = [{
                 n: this.title,
                 d: this.detail,
@@ -170,7 +178,11 @@ export default {
                 .post(this.$store.state.api + "addTipsTemplate", params)
                 .then((res) => {
                     this.$message.success("修改成功");
-                    this.$emit('retrunCourse')
+                    if(type == 2){
+                        this.$emit('addWork', type)
+                    }else{
+                        this.$emit('retrunCourse')
+                    }
                     this.close();
                 })
                 .catch((err) => {

+ 2 - 2
src/components/pages/race/addRace/projectProcess.vue

@@ -564,7 +564,7 @@
                 v-if="raIndex == racePro.stageBox[saIndex].actBox.length - 1"
               >
                 <div>
-                  <img src="../../../../assets/icon/addHw.png" alt />
+                  <img src="../../../../assets/icon/addHW.png" alt />
                   <span>添加任务</span>
                 </div>
               </div>
@@ -575,7 +575,7 @@
               v-if="saIndex == racePro.stageBox.length - 1"
             >
               <div>
-                <img src="../../../../assets/icon/addHw.png" alt />
+                <img src="../../../../assets/icon/addHW.png" alt />
                 <span>添加阶段</span>
               </div>
             </div>

+ 1 - 1
src/components/pages/student/addCourseJiu.vue

@@ -1315,7 +1315,7 @@
                 </div>
                 <div class="addTaskBorder" @click="addTaskBorder">
                   <div>
-                    <img src="../../../assets/icon/addHw.png" alt />
+                    <img src="../../../assets/icon/addHW.png" alt />
                     <span>添加任务</span>
                   </div>
                 </div>

+ 1 - 1
src/components/pages/studio/addCourse.vue

@@ -1920,7 +1920,7 @@
                 </div>
                 <div class="addTaskBorder" @click="addTaskBorder">
                   <div>
-                    <img src="../../../assets/icon/addHw.png" alt />
+                    <img src="../../../assets/icon/addHW.png" alt />
                     <span>添加任务</span>
                   </div>
                 </div>

+ 1 - 1
src/components/pages/task/addCourse.vue

@@ -6156,7 +6156,7 @@
                   v-if="!unitJson[unitIndex].easy"
                 >
                   <div>
-                    <img src="../../../assets/icon/addHw.png" alt />
+                    <img src="../../../assets/icon/addHW.png" alt />
                     <span>添加任务</span>
                   </div>
                 </div>

+ 137 - 0
src/components/pages/test/aggregate/index.vue

@@ -0,0 +1,137 @@
+<template>
+  <div class="aggregate">
+    <el-table :data="tableData" border style="width: 100%" v-loading="tabLoading" @header-click="handleHeaderClick">
+      <el-table-column fixed align="center" type="index" width="50">
+      </el-table-column>
+
+      <el-table-column fixed align="center" prop="username" label="教师姓名" width="150">
+      </el-table-column>
+      <el-table-column fixed align="center" label="教研室" width="130">
+        <template slot-scope="scope">
+          <div class="TabBtn" v-if="!scope.row.tea">/</div>
+          <div class="TabBtn" v-else>{{ scope.row.tea }}</div>
+        </template>
+      </el-table-column>
+
+      <div v-for="item in titList" :key="item.id">
+        <el-table-column align="center" :label="item.name">
+          <div v-for="e in allFrom" :key="e.courseId">
+            <el-table-column v-if="e.typeid == item.id" align="center" :prop="e.courseId" :label="e.title"
+              :cell-style="{ color: '#000' }" width="130">
+              <template slot-scope="scope">
+                <div v-if="e.juri2 && arrayToArray(scope.row.teaId ? scope.row.teaId.split(',') : [],e.juri2 ? e.juri2.split(',') : []).length && scope.row.works.indexOf(e.courseId) !== -1"
+                  class="yuan blacky"></div>
+                <div v-else-if="scope.row.works.indexOf(e.courseId) !== -1" class="yuan blacky"></div>
+                <div v-else-if="e.juri2 && arrayToArray(scope.row.teaId ? scope.row.teaId.split(',') : [],e.juri2 ? e.juri2.split(',') : []).length == 0" class="yuan greyy"></div>
+                <div v-else class="yuan"></div>
+              </template>
+            </el-table-column>
+          </div>
+        </el-table-column>
+      </div>
+    </el-table>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      tableData: [],
+      titList: [],
+      allFrom: [],
+      tabLoading: false
+    };
+  },
+
+  mounted() {
+    this.getData();
+  },
+
+  methods: {
+    arrayToArray(arrayo, arrayt) {
+      let array1 = arrayo;
+      let array2 = arrayt;
+
+      let commonElements = [];
+
+      for (let i = 0; i < array1.length; i++) {
+        for (let j = 0; j < array2.length; j++) {
+          if (array1[i] === array2[j]) {
+            commonElements.push(array1[i]);
+          }
+        }
+      }
+      return commonElements;
+    },
+    getData() {
+      this.tabLoading = true;
+
+      let params = {
+        oid: this.oid,
+        org: this.org
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTestWorksAggregate", params)
+        .then(res => {
+          let data = res.data[0]; //所有老师
+          this.titList = res.data[1]; // 所有分类
+          this.allFrom = res.data[2]; //所有表单
+          let data3 = res.data[3]; //所有老师填写表单
+          data.forEach(e => {
+            e.works = [];
+            data3.forEach(k => {
+              if (e.userid == k.userid) {
+                e.works.push(k.courseid);
+              }
+            });
+          });
+          this.tableData = data;
+          this.tabLoading = false;
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    handleHeaderClick(column, event) {
+      // console.log("表头被点击", column, event);
+      this.$router.push(
+        "/checkToTest?cid=" +
+        column.property +
+        "&oid=" +
+        this.oid +
+        "&org=" +
+        this.org +
+        "&type=" +
+        2 +
+        "&role=" +
+        this.role
+      );
+      // 在这里处理点击事件
+    }
+  }
+};
+</script>
+
+<style scoped>
+.yuan {
+  width: 13px;
+  height: 13px;
+  border: 1px solid #000;
+  border-radius: 100%;
+  box-sizing: border-box;
+  margin: 0 auto;
+}
+
+.blacky {
+  background-color: #000;
+}
+
+.greyy {
+  background-color: #eee;
+  border: 1px solid #eee;
+}
+</style>

+ 271 - 58
src/components/pages/test/examine/conpoments/personPage.vue

@@ -1,19 +1,30 @@
 <template>
   <div>
     <div class="personPage">
-      <!-- <div style="width: 100%;display: flex;justify-content: flex-end;">
+      <!-- <div
+        style="width: 100%;display: flex;justify-content: flex-end;align-items: center;"
+      >
         <el-select v-model="teas" multiple placeholder="请选择">
           <el-option
-            v-for="item in TeaOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
+            v-for="item in TeaList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
           >
           </el-option>
         </el-select>
-        <div><el-button type="primary" size="mini">提醒</el-button></div>
+        <div style="margin-left: 10px;">
+          <el-button type="primary" @click="remindExamine" size="mini"
+            >提醒</el-button
+          >
+        </div>
       </div> -->
-      <el-table :data="tableData" class="scoTab" style="width: 100%">
+      <el-table
+        :data="tableData"
+        class="scoTab"
+        v-loading="tabLoading"
+        style="width: 100%"
+      >
         <el-table-column type="index" align="center" label="序号" width="180">
         </el-table-column>
         <el-table-column prop="username" align="center" label="教师姓名">
@@ -21,24 +32,51 @@
         <el-table-column
           prop="tea"
           show-overflow-tooltip
+          :filters="TeachingOptions"
+          :filter-method="filterTea"
           align="center"
           label="教研室"
           width="180"
         >
         </el-table-column>
-        <el-table-column align="center" label="考核进度">
+        <el-table-column
+          :filters="[
+            { text: '已完成', value: '已完成' },
+            { text: '未完成', value: '未完成' }
+          ]"
+          :filter-method="filterExa"
+          :filter-multiple="false"
+          prop="state"
+          align="center"
+          label="考核进度"
+        >
           <template slot-scope="scope">
             <div v-if="scope.row.step == scope.row.allStep">√</div>
             <div v-else>{{ scope.row.step }}/{{ scope.row.allStep }}</div>
           </template>
         </el-table-column>
-        <el-table-column prop="evaSca" align="center" label="自评分数">
+        <el-table-column
+          prop="evaSca"
+          :sortable="true"
+          :sort-method="sortEvaMethod"
+          align="center"
+          label="自评分数"
+        >
         </el-table-column>
-        <el-table-column prop="cogSco" align="center" label="考核分数">
+        <el-table-column
+          prop="cogSco"
+          :sortable="true"
+          :sort-method="sortCogMethod"
+          align="center"
+          label="考核分数"
+        >
         </el-table-column>
-        <el-table-column align="center" label="评分">
+        <el-table-column align="center" label="操作">
           <template slot-scope="scope">
-            <div class="TabBtn" @click="lookScore(scope.row)">评分</div>
+            <div style="display: flex;justify-content: center;">
+              <div class="TabBtn" @click="lookScore(scope.row)">评分</div>
+              <div class="TabBtn" @click="withdraw(scope.row.id)">退回</div>
+            </div>
           </template>
         </el-table-column>
       </el-table>
@@ -171,6 +209,10 @@
                       <div style="display: flex;justify-content: center;">
                         <div v-if="tableData.length > 0" class="ScoreStep">
                           <input
+                            :style="{
+                              color: k.sco1 == k.sco2 ? '#000' : 'red'
+                            }"
+                            :readonly="txtLoading"
                             @blur="
                               saveTab(
                                 k.sco2 > k.score ? (k.sco2 = k.score) : ''
@@ -179,11 +221,11 @@
                             type="number"
                             v-model="k.sco2"
                           />
-                          <!-- @blur="Submit(scope.row)" -->
                         </div>
                       </div>
                       <div style="display: flex;justify-content: center;">
                         <textarea
+                          :readonly="txtLoading"
                           v-if="tableData.length > 0"
                           @blur="saveTab()"
                           v-model.trim="k.cogSum"
@@ -205,7 +247,7 @@
       :visible.sync="diaIframe"
       :append-to-body="true"
       width="95%"
-      :before-close="handleClose"
+      :before-close="handleClose2"
       class="dialog_diy"
     >
       <div style="height: 100%;">
@@ -216,6 +258,51 @@
         ></iframe>
       </div>
     </el-dialog>
+
+    <!-- 提醒弹框 -->
+    <el-dialog
+      title="提醒"
+      :visible.sync="remDig"
+      :append-to-body="true"
+      width="600"
+      :before-close="handleClose3"
+      class="dialog_remDig"
+    >
+      <div v-loading="digLoading" style="height: 100%;padding: 15px;">
+        <div class="remFlex" style="align-items: center;">
+          <div class="remFlexTit">填写范围:</div>
+          <el-select disabled v-model="teas" multiple placeholder="请选择">
+            <el-option
+              v-for="item in TeaList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div class="remFlex">
+          <div class="remFlexTit">需提交人数:</div>
+          <div>{{ remindNum }}</div>
+        </div>
+        <div class="remFlex">
+          <div class="remFlexTit">未完成人数:</div>
+          <div>{{ remindList.length }}</div>
+        </div>
+        <div class="remFlex">
+          <div class="remFlexTit">需提交人数:</div>
+          <div class="remFlex" style="flex-wrap: wrap;">
+            <div
+              v-for="(item, index) in remindList"
+              :key="index"
+              style="margin-right: 2px;"
+            >
+              {{ item }},
+            </div>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -247,34 +334,18 @@ export default {
       computedScoData: 0,
       computedStepData: 0,
       computedCogSCoData: 0,
-
+      TeaList: [],
+      tabLoading: false,
       userid: this.$route.query.userid, //用户id
       oid: this.$route.query.oid, //学校id
       org: this.$route.query.org, //组织id
       tableData: [],
-      TeaOptions: [
-        {
-          value: "选项1",
-          label: "黄金糕"
-        },
-        {
-          value: "选项2",
-          label: "双皮奶"
-        },
-        {
-          value: "选项3",
-          label: "蚵仔煎"
-        },
-        {
-          value: "选项4",
-          label: "龙须面"
-        },
-        {
-          value: "选项5",
-          label: "北京烤鸭"
-        }
-      ],
-      teas: []
+      teas: [],
+      TeachingOptions: [],
+      txtLoading: false,
+      remindNum: 0,
+      remindList: [],
+      remDig: false
     };
   },
   watch: {
@@ -333,10 +404,12 @@ export default {
   },
   mounted() {
     this.getData();
+    this.getTeaList();
   },
   methods: {
     // 获取页面数据
     getData() {
+      this.tabLoading = true;
       let params = {
         oid: this.oid,
         org: this.org,
@@ -371,16 +444,25 @@ export default {
           });
 
           data.forEach(e => {
+            if (e.step == e.allStep) {
+              e.state = "已完成";
+            } else {
+              e.state = "未完成";
+            }
+            if (!e.tea) {
+              e.tea = "";
+            }
             e.evaSca = e.evaSca.toFixed(2);
             e.cogSco = e.cogSco.toFixed(2);
           });
           this.tableData = data;
+          this.tabLoading = false;
         })
         .catch(error => {
+          this.tabLoading = false;
           console.log(error);
         });
     },
-
     // 点击评分
     lookScore(val) {
       this.digLoading = true;
@@ -398,24 +480,124 @@ export default {
       this.cutPerson();
       this.getPageBase();
     },
-    // getTeaList() {
-    // let params = {
-    //     oid: this.oid,
-    // };
-    // this.ajax
-    //     .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
-    //     .then((res) => {
-    //         this.TeachingOptions = res.data[0];
-    //         console.log('this.TeachingOptions',this.TeachingOptions);
-    //     })
-    //     .catch((err) => {
-    //         this.isLoading = false;
-    //         console.error(err);
-    //     });
-    // },
+    // 获取教研室
+    getTeaList() {
+      let params = {
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+        .then(res => {
+          // return console.log("this.TeachingOptions", res.data[0]);
+          let data = res.data[0];
+          let dataCopy = [];
+
+          data.forEach(e => {
+            let a = {};
+            a.value = e.name;
+            a.text = e.name;
+            dataCopy.push(a);
+          });
+          data.forEach(e => {
+            let a = {};
+            a.id = e.id;
+            a.name = e.name;
+            this.TeaList.push(a);
+          });
+
+          this.TeachingOptions = dataCopy;
+          // console.log("this.TeachingOptions", this.TeachingOptions);
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    // 撤回
+    withdraw(id) {
+      let params = [
+        {
+          tid: id
+        }
+      ];
+
+      this.$confirm("是否确认退回?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: " info"
+      })
+        .then(() => {
+          this.ajax
+            .post(this.$store.state.api + "updateExamineState", params)
+            .then(res => {
+              this.getData();
+            })
+            .catch(error => {
+              console.log(error);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消退回"
+          });
+        });
+    },
+    // 提醒
+    remindExamine() {
+      this.remindList = [];
+      this.remindNum = 0;
+      this.remDig = true;
+      this.digLoading = true;
+
+      let params = {
+        oid: this.oid,
+        org: this.org,
+        tea: this.teas.join(","),
+        ptype: this.pType
+      };
+      // return console.log(params);
+
+      this.ajax
+        .get(this.$store.state.api + "selectExamineTeaRemind", params)
+        .then(res => {
+          let data = res.data[0];
+          this.remindNum = data.length > 0 ? data[0].num : 0;
+          data.forEach(e => {
+            this.remindList.push(e.username);
+          });
+          this.digLoading = false;
+
+          console.log(this.remindList);
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    // 按照数字大小排序 方法-
+    sortCogMethod(before, after) {
+      return Number(before.cogSco) - Number(after.cogSco);
+    },
+    sortEvaMethod(before, after) {
+      return Number(before.evaSca) - Number(after.evaSca);
+    },
+    // 教研室筛选
+    filterTea(value, row, column) {
+      // console.log(value, row, column);
+      const property = column["property"];
+      return row[property].includes(value);
+    },
+    // 是否完成筛选
+    filterExa(value, row, column) {
+      // console.log(value, row, column);
+      const property = column["property"];
+      return row[property] == value;
+    },
     // ----------------
+
     // 保存修改
     saveTab() {
+      this.txtLoading = true;
+
       let PageBaseDataCopy = JSON.parse(JSON.stringify(this.PageBaseData));
 
       for (const e of PageBaseDataCopy) {
@@ -452,7 +634,7 @@ export default {
         return this.$message.error("暂无人员提交");
       // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.userid}`;
 
-      this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${cid}&oid=${this.oid}&org=${this.oid}&type=2&role=0&peopleId=${this.digUserid}`;
+      this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${cid}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.digUserid}`;
       // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/test?userid=${this.userid}&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=&role=0`;
       this.diaIframe = true;
     },
@@ -615,6 +797,7 @@ export default {
             this.DigSelfSco = 0;
             this.twoTarget = 0;
           }
+          this.txtLoading = false;
           this.digLoading = false;
         })
         .catch(error => {
@@ -645,12 +828,20 @@ export default {
         }
       });
     },
-    // 关闭弹框
+    // 评分关闭弹框
     handleClose(done) {
       this.getData();
       done();
     },
-
+    // 数据来源关闭弹框
+    handleClose2(done) {
+      this.digLoading = true;
+      this.getPageBase();
+      done();
+    },
+    handleClose3(done) {
+      done();
+    },
     // 处理数据来源
     async handleData() {
       for (const e of this.PageBaseData) {
@@ -665,7 +856,7 @@ export default {
     computedTest(val) {
       let params = [
         {
-          uid: this.uid,
+          uid: this.digUserid,
           testId: val.join(",")
         }
       ];
@@ -693,6 +884,15 @@ export default {
   white-space: nowrap;
   text-overflow: ellipsis;
 }
+/* .remFlex {
+  display: flex;
+  justify-content: flex-start;
+  margin-bottom: 20px;
+}
+.remFlexTit {
+  width: 80px;
+  flex-shrink: 0;
+} */
 .digTop {
   display: flex;
   justify-content: space-between;
@@ -702,7 +902,20 @@ export default {
 .TabBtn {
   cursor: pointer;
   color: #528df6;
+  margin: 0 10px;
+}
+/* .dialog_remDig >>> .el-dialog {
+  height: 700px;
+  margin: 0 auto !important;
+  margin-top: 20px !important;
+  overflow: hidden;
+  min-width: 800px !important;
 }
+
+.dialog_remDig >>> .el-dialog__header {
+  background: #454545 !important;
+  padding: 15px 20px;
+} */
 .dialog_diy >>> .el-dialog {
   height: 95%;
   margin: 0 auto !important;

+ 103 - 24
src/components/pages/test/examine/conpoments/targetPage.vue

@@ -124,7 +124,7 @@
       :visible.sync="diaIframe"
       :append-to-body="true"
       width="95%"
-      :before-close="handleClose"
+      :before-close="handleClose2"
       class="dialog_diy"
     >
       <div style="height: 100%;">
@@ -177,13 +177,21 @@
           <el-table-column
             :show-overflow-tooltip="true"
             prop="tea"
+            :filters="TeachingOptions"
+            :filter-method="filterTea"
             align="center"
             label="教研室"
           >
           </el-table-column>
           <el-table-column prop="score" align="center" label="分值">
           </el-table-column>
-          <el-table-column prop="evaSca" align="center" label="自评分数">
+          <el-table-column
+            :sortable="true"
+            :sort-method="sortEvaMethod"
+            prop="evaSca"
+            align="center"
+            label="自评分数"
+          >
           </el-table-column>
           <el-table-column
             prop="evaMed"
@@ -218,11 +226,19 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column width="200px" align="center" label="认定分数">
+          <el-table-column
+            :sortable="true"
+            :sort-method="sortCogMethod"
+            prop="cogSco"
+            width="200px"
+            align="center"
+            label="认定分数"
+          >
             <template slot-scope="scope">
               <div class="ScoreStep">
                 <input
                   type="number"
+                  :readonly="TxtDig"
                   v-if="scope.row.judge == 1"
                   style=" color :#A7AAB2;"
                   @blur="Submit(scope.row)"
@@ -250,6 +266,7 @@
               <textarea
                 @blur="Submit2(scope.row)"
                 class="tArea"
+                :readonly="TxtDig"
                 v-model.trim="scope.row.cogSummary"
               />
             </template>
@@ -275,6 +292,7 @@ export default {
       evaScoDigSvg: 0,
       evaScoDigCog: 0,
       evaScoDigPerC: 0,
+      TxtDig: false,
 
       diaIframe: false, //数据来源弹框
       diaScore: false, //查看分数弹框
@@ -1309,7 +1327,8 @@ export default {
       //     ]
       //   }
       // ],
-      tableData: [] //弹框数据
+      tableData: [], //弹框数据
+      TeachingOptions: []
     };
   },
   computed: {},
@@ -1321,11 +1340,39 @@ export default {
   },
   mounted() {
     this.getPageBase();
+    this.getTeaList();
     // console.log(JSON.stringify(this.TeaTabJson));
     // console.log(JSON.stringify(this.tableJsonCon));
   },
 
   methods: {
+    // 获取教研室
+    getTeaList() {
+      let params = {
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+        .then(res => {
+          // return console.log("this.TeachingOptions", res.data[0]);
+          let data = res.data[0];
+          let dataCopy = [];
+
+          data.forEach(e => {
+            let a = {};
+            a.value = e.name;
+            a.text = e.name;
+            dataCopy.push(a);
+          });
+
+          this.TeachingOptions = dataCopy;
+          // console.log("this.TeachingOptions", this.TeachingOptions);
+        })
+        .catch(err => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
     // 获取基础页面数据
     getPageBase() {
       this.tabLoad = true;
@@ -1442,6 +1489,20 @@ export default {
       this.diaIframe = true;
     },
     // ----------------------------首页操作与弹框操作分界线
+
+    // 按照数字大小排序 方法-
+    sortCogMethod(before, after) {
+      return Number(before.cogSco) - Number(after.cogSco);
+    },
+    sortEvaMethod(before, after) {
+      return Number(before.evaSca) - Number(after.evaSca);
+    },
+    // 教研室筛选
+    filterTea(value, row, column) {
+      console.log(value, row, column);
+      const property = column["property"];
+      return row[property].includes(value);
+    },
     // 查看评分
     lookScore(val, oneName, twoName) {
       this.evaScoDig = true;
@@ -1479,6 +1540,9 @@ export default {
             e.cogSummary = ""; //认定概述
             e.score = 0; //分值
             e.judge = 0; //是否填充为默认分数 1:默认等于自评分
+            if (!e.tea) {
+              e.tea = "";
+            }
             e.json.forEach(i => {
               i.children.forEach(k => {
                 if (k.id == this.secondId) {
@@ -1506,6 +1570,7 @@ export default {
           // 获取数据来源
           this.handleScoData();
           this.evaScoDig = false;
+          this.TxtDig = false;
         })
         .catch(error => {
           console.log(error);
@@ -1583,6 +1648,8 @@ export default {
       //   }
       // });
       //#endregion
+      this.TxtDig = true;
+
       if (val.cogSco > val.score) {
         val.cogSco = val.score;
       }
@@ -1616,6 +1683,8 @@ export default {
 
     // 概述提交
     Submit2(val) {
+      this.TxtDig = true;
+
       val.json.forEach(e => {
         e.children.forEach(i => {
           if (i.id == this.secondId) {
@@ -1651,18 +1720,7 @@ export default {
       })
         .then(() => {
           this.evaScoDig = true;
-          let promiseChain = Promise.resolve(); // 初始空Promise
-
-          for (const e of this.tableData) {
-            if (e.judge == 1) {
-              promiseChain = promiseChain.then(() => this.Submit3(e)); // 链式调用Promise
-            }
-          }
-
-          promiseChain.then(() => {
-            this.getSecondData(); // 循环结束后执行getSecondData函数
-            this.$message.success("已保存");
-          });
+          this.handleAllSubmit();
         })
         .catch(() => {
           this.handleData();
@@ -1673,7 +1731,17 @@ export default {
           });
         });
     },
-    Submit3(val) {
+    // 处理一键保存
+    async handleAllSubmit() {
+      for (const e of this.tableData) {
+        if (e.judge == 1) {
+          await this.computedAllSubmit(e);
+        }
+      }
+      this.getSecondData(); // 循环结束后执行getSecondData函数
+      this.$message.success("已保存");
+    },
+    computedAllSubmit(val) {
       if (val.cogSco > val.score) {
         val.cogSco = val.score;
       }
@@ -1695,18 +1763,29 @@ export default {
         }
       ];
       // return console.log(params);
-      this.ajax
-        .post(this.$store.state.api + "updateExamineCogData", params)
-        .then(res => {})
-        .catch(error => {
-          console.log(error);
-        });
+
+      return new Promise(resolve => {
+        this.ajax
+          .post(this.$store.state.api + "updateExamineCogData", params)
+          .then(res => {
+            resolve(res);
+          })
+          .catch(error => {
+            console.log(error);
+          });
+      });
     },
 
-    // 关闭弹框
+    // 关闭评分弹框
     handleClose(done) {
       this.getPageBase();
       done();
+    },
+    // 关闭数据来源弹框
+    handleClose2(done) {
+      this.evaScoDig = true;
+      this.getSecondData();
+      done();
     }
   }
 };

+ 10 - 3
src/components/pages/test/index.vue

@@ -25,7 +25,7 @@
             <span :class="{ active: cutNumber == 1}" v-if="examineData.length" @click="cutNumber = 1">年度考核</span>
         </div>
         <div class="bbox" v-if="cutNumber==0">
-            <div class="test_data_box" v-loading="isLoadingData">
+            <div v-if="!oidArray.includes(oid)" class="test_data_box" v-loading="isLoadingData">
                 <div class="data_box">
                     <div class="left">
                         <div class="title">表单状态总览</div>
@@ -80,6 +80,7 @@
             </div>
             <div class="search_nav">
                 <div class="right">
+                    <span :class="{ active: stype == 3 }" v-show="orgArray2.includes(org) || oidArray.includes(oid)" @click="checkDataType(3)">数据汇总</span>
                     <span :class="{ active: stype == 1 }" @click="checkDataType(1)">按问卷查看</span>
                     <span :class="{ active: stype == 2 }" @click="checkDataType(2)">按人员查看</span>
                 </div>
@@ -123,6 +124,7 @@
                 </div>
             </div>
             <div class="pb_content_body" style="height: 100%;width: 100%;">
+                <aggregate v-if="stype == 3"></aggregate>
                 <div class="student_table" v-loading="isLoading" v-if="stype == 1 && stype2 == 1">
                     <div class="course_box">
                         <div class="test_box" v-for="(item, index) in course" :key="index">
@@ -394,9 +396,10 @@ import randar1 from "./data/randar1.vue";
 import randar2 from "./data/randar2.vue";
 import shareBox from './shareBox/index.vue'
 import examine from './examine/index.vue'
+import aggregate from './aggregate/index'
 export default {
     name: 'test',
-    components: { EditorBar, CourseProblem, pie1, pie2, randar1, randar2, shareBox, examine },
+    components: { EditorBar, CourseProblem, pie1, pie2, randar1, randar2, shareBox, examine, aggregate },
     data() {
         return {
             examineData: [],
@@ -421,7 +424,8 @@ export default {
             org: this.$route.query.org,
             role: this.$route.query.role,
             orgArray: ["150e3120-9195-11ed-b13d-005056b86db5"],
-            oidArray: [],
+            orgArray2: ["0fec3a8a-ad04-11ed-b13d-005056b86db5"],
+            oidArray: ["d67940a5-510c-40ea-9c9a-2631ab03013a"],
             Juri: "",
             groupList: [],
             JuriList: [],
@@ -1303,6 +1307,9 @@ export default {
     mounted() {
         this.getPageBase()
         console.log(2);
+        if (this.orgArray2.includes(this.org) || this.oidArray.includes(this.oid)) {
+            this.stype = 3
+        }
         if (this.role == '1') {
             this.groupA = '0'
         }

+ 22 - 2
src/components/pages/testPerson/info/infoDialog/index.vue

@@ -75,7 +75,7 @@ export default {
         dialogVisibleInfo(newVal) {
             if (newVal) {
                 this.getClass2();
-                this.getData();
+
             }
         }
     },
@@ -144,12 +144,31 @@ export default {
                 .then((res) => {
                     this.info = res.data[0][0]
                     this.info.teacherOffice = []
-                    this.info.teacherOffice = this.info.cclassid.split(',')
+                    let array = []
+                    for(var i = 0; i < this.classJuri.length; i++){
+                        array.push(this.classJuri[i].id)
+                    }
+                    this.info.teacherOffice = this.arrayToArray(this.info.cclassid.split(','), array)
                 })
                 .catch((err) => {
                     console.error(err);
                 });
         },
+        arrayToArray(arrayo, arrayt) {
+            let array1 = arrayo;
+            let array2 = arrayt;
+
+            let commonElements = [];
+
+            for (let i = 0; i < array1.length; i++) {
+                for (let j = 0; j < array2.length; j++) {
+                if (array1[i] === array2[j]) {
+                    commonElements.push(array1[i]);
+                }
+                }
+            }
+            return commonElements;
+        },
         addImg(e) {
             var el = e.currentTarget;
             el.getElementsByTagName("input")[0].click();
@@ -232,6 +251,7 @@ export default {
                 .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
                 .then((res) => {
                     this.classJuri = res.data[0];
+                    this.getData();
                 })
                 .catch((err) => {
                     this.isLoading = false;

Some files were not shown because too many files changed in this diff