Prechádzať zdrojové kódy

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

SanHQin 1 rok pred
rodič
commit
ed796f6685

+ 1 - 1
dist/index.html

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

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.23005539145db8456d0ed89f4c8e3cc5.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.23005539145db8456d0ed89f4c8e3cc5.css.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.a2298b8b3883c9abaa8f.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.a2298b8b3883c9abaa8f.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 67 - 36
src/components/pages/aiAddCourse/addCourse.vue

@@ -787,10 +787,10 @@
               <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
                 <div class="c_info_title">
                   教案
-                  <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
+                  <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length">
                     <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
                       @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
-                      @click="openAiDialog(2, 'aiTeacher2')" v-if="istemplate == 1">生成教案</button>
+                      @click="openAiDialog(2, 'aiTeacher2')" v-if="istemplate == 1 && dArray.length">生成教案</button>
                    </el-tooltip>
                   <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
                 </div>
@@ -5619,7 +5619,7 @@ export default {
       taskDetailLoading4: [],
       taskDetailLoading5: [],
       ttaskDetailLoading5: [],
-      dArray: {},
+      dArray: [],
       dialogVisibleAiD: false,
       aitype: "",
       aiJson: {
@@ -6363,6 +6363,14 @@ 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) {
+            this.$message({
+              message: "请回答完毕后再次发送",
+              type: "warning"
+            });
+            return;
+          }
+
           if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && !this.isOutline) {
             this.openAiDialog(clickType, 'aiOutline')
             return;
@@ -9042,6 +9050,7 @@ export default {
           if(res.data[0].length){
             this.tipsJson = res.data[0][0]
             this.aiJson = JSON.parse(res.data[0][0].tips)
+            this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
             this.$forceUpdate();
           }
         })
@@ -13009,9 +13018,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;
@@ -13121,7 +13130,7 @@ export default {
 
       } else if (type == "aiTeacher2") {
         this.aitype = "aiTeacher2"
-        this.aiText = this.aiJson.teacherDetail2
+        this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
       } else if (type == "teacherDetail") {
         if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
           this.$message({
@@ -13145,7 +13154,7 @@ export default {
         }
         this.aitype = "teacherDetail2"
         // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
-        this.aiText = this.aiJson.teacherDetail2
+        this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
         this.aiCallBack = callback
         this.aiIndex = index
       } else if (type == "aiCpote1") {
@@ -13196,7 +13205,7 @@ export default {
       }
       this.dialogVisibleAiD = true
     },
-    aiConfirm(msg) {
+    async aiConfirm(msg) {
       let sub = []
       if (this.courseTypeId.length) {
         for (var i = 0; i < this.courseTypeId.length; i++) {
@@ -13232,7 +13241,7 @@ export default {
 // ${this.getListClassC(this.checkboxList2) ?  '班级:' + this.getListClassC(this.checkboxList2) : "无"}
 // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
         let message = `NOTICE
-Role: 作为学生的学习指导Agent,你熟悉熟悉PBL(基于问题的学习)和5EX教学模型,能够根据学生的学情数据(当前的学习任务设计、学习表现数据、作业数据等)生成自适应的学习任务和对应的5道考核题目
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据
 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.
@@ -13258,30 +13267,45 @@ ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime
         })
       } else if (this.aitype == "aiTask") {
         var _text = ""
-        for (var i = 0; i < this.teacherText.length; i++) {
-          _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
-        }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
+        for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
+          _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
+        }
         let message = `NOTICE
-Role: 作为学生的学习指导Agent,你熟悉熟悉PBL(基于问题的学习)和5EX教学模型,能够根据学生的学情数据(当前的学习任务设计、学习表现数据、作业数据等)生成自适应的学习任务和对应的5道考核题目
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据
 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
 ## 要求
-${msg} 以及#教学任务教案 内容要求参考#格式要求
-
-## 教学任务教案
-${_text}
-
+${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}个
-任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动
-评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
-工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
-工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
+## 输出格式与要求
+•任务名:
+•任务描述:该描述是教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。
+•评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
+•平台工具:
+•工具名:**从工具列表**中选择0~2个工具用于学生阶段性成果提交:工具列表:[电子白板,文档,思维导图,表格,作业提交,调查问卷,问答,排序,选择匹配题,个人评价,英语写作,英语口语]
+•工具指引:以友好,明确的口吻告诉学生该如何使用该工具
+
+## 参考资料
+教学任务教案:${_text}
+## 示例
+任务一:探究热的传递方式
+•描述:亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
+工具:
+•工具1名称:作业提交
+•工具1指引:在工作单里详细记录你的实验步骤、观察到的现象以及你的分析和结论。请确保包含实验的目的、使用的材料、实验过程的描述和结果的解释。
+•工具2名称:问答
+•工具2指引:通过问答工具回答与热的传递方式相关的问题,以检验你对教学内容的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案。
+## 评价维度
+•实验设计和执行能力:学生应能够独立设计实验,清晰地描述实验步骤,并准确执行实验过程。
+•观察和记录技能:学生需要展示在实验中对热传递现象的观察能力,并能够详细记录实验数据和现象。
+•分析和解释能力:学生应能够对实验结果进行分析,解释热对流的形成原理,并能将实验结果与理论知识相联系。
 
 # Format example
 [{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]},{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[]},{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"}]}]`
@@ -13315,7 +13339,7 @@ ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '#目标层\n'+thi
           _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
         }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
         let message = ` NOTICE
-Role: 作为学生的学习指导Agent,你熟悉熟悉PBL(基于问题的学习)和5EX教学模型,能够根据学生的学情数据(当前的学习任务设计、学习表现数据、作业数据等)生成自适应的学习任务和对应的5道考核题目
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据
 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.
@@ -13484,7 +13508,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
         _this.ttextLoading = false
         console.log(error);
       });
-      _this.aiGetgetAiContent(_uuid)
+      await _this.aiGetgetAiContent(_uuid)
     },
     aiGetgetAiContent(_uid) {
       // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
@@ -13520,6 +13544,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
           this.textLoading = false
           // 处理流数据
         }
+        this.$forceUpdate();
       };
     },
     async aiGet2(messages, callback) {
@@ -14013,7 +14038,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
         let messages = ""
         if(type == 15){
           messages = `NOTICE
-Role: 作为学生的学习指导Agent,你熟悉熟悉PBL(基于问题的学习)和5EX教学模型,能够根据学生的学情数据(当前的学习任务设计、学习表现数据、作业数据等)生成自适应的学习任务和对应的5道考核题目
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据
 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.
@@ -14040,7 +14065,7 @@ ${this.teacherText[task].detail.replaceAll('#','').replaceAll('*','').replaceAll
 `
         }else if(type == 45){
           messages = `NOTICE
-Role: 作为学生的学习指导Agent,你熟悉熟悉PBL(基于问题的学习)和5EX教学模型,能够根据学生的学情数据(当前的学习任务设计、学习表现数据、作业数据等)生成自适应的学习任务和对应的5道考核题目
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据
 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.
@@ -14294,7 +14319,7 @@ ${this.teacherText[task].detail.replaceAll('#','').replaceAll('*','').replaceAll
           if (data.message) {
             console.log(data.message);
             // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
-            let dArray = {}
+            let dArray = []
             try {
               dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
             } catch (error) {
@@ -14498,7 +14523,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
         _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
         console.log(error);
       });
-      _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
+      await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
     },
     aiDetailgetAiContent(_uid, loading, _tindex2) {
       // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
@@ -14534,6 +14559,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
           this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
           // 处理流数据
         }
+        this.$forceUpdate();
       };
     },
     async aiDetail2(msg, index) {
@@ -14634,7 +14660,7 @@ ${msg}
         _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
         console.log(error);
       });
-      _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
+      await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
     },
     aiDetail2getAiContent(_uid, loading, _tindex2) {
       // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
@@ -14670,6 +14696,7 @@ ${msg}
           this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
           // 处理流数据
         }
+        this.$forceUpdate();
       };
     },
     async aiDetail3(msg, index, tindex) {
@@ -14772,7 +14799,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
         _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
         console.log(error);
       });
-      _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
+      await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
     },
     aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
       // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
@@ -14808,6 +14835,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
           this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
           // 处理流数据
         }
+        this.$forceUpdate();
       };
     },
     async aiDetail4(msg, index) {
@@ -15059,7 +15087,7 @@ ${_text2}`
         _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
         console.log(error);
       });
-      _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
+      await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
     },
     aiDetail5getAiContent(_uid, loading, _tindex2) {
       // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
@@ -15095,6 +15123,7 @@ ${_text2}`
           this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
           // 处理流数据
         }
+        this.$forceUpdate();
       };
     },
     async aiDetail52(msg, index) {
@@ -15202,7 +15231,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
         _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
         console.log(error);
       });
-      _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
+      await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
     },
     aiDetail52getAiContent(_uid, loading, _tindex2) {
       // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
@@ -15238,6 +15267,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
           this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
           // 处理流数据
         }
+        this.$forceUpdate();
       };
     },
     async aiCpote(msg, callback) {
@@ -15363,7 +15393,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
         callback ? callback() : ''
         console.log(error);
       });
-      _this.aiCpotegetAiContent(_uuid, _index, callback)
+      await _this.aiCpotegetAiContent(_uuid, _index, callback)
     },
     aiCpotegetAiContent(_uid, loading, callback) {
       // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
@@ -15400,6 +15430,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
           this.cpoteLoading[loading] = false
           // 处理流数据
         }
+        this.$forceUpdate();
       };
     },
     createFileid(url) {

+ 2 - 5
src/components/pages/aiAddCourse/aiCreateDialog.vue

@@ -44,7 +44,6 @@
 import Pptxgen from "pptxgenjs";
 import wOffice from "../components/wOffice.vue";
 import { v4 as uuidv4 } from "uuid";
-import { color } from "highcharts";
 
 export default {
     components: {
@@ -264,10 +263,10 @@ ${_this.outline.replaceAll('#','').replaceAll('*','').replaceAll('-','').replace
 请根据参考资料,生成关于${this.courseName},为教师生成这节课的教学ppt的大纲,大纲的主要内容课程知识点的讲解与相关练习和测试。你的输出应该符合#输出格式
 
 # 工作流
-1.从用户提供的参考资料中提取5个最重要的学科概念${mclass.length ? "(水平限制在{面向年级}中)" : ""},并输出。
+1.从用户提供的参考资料中提取3个最重要的学科概念${mclass.length ? "(水平限制在{面向年级}中)" : ""},并输出。
 2.分解每个学科概念为几个子知识点
 3.简要描述每个知识点
-4.生成5个测试题以考察学生的掌握情况
+4.生成3个测试题以考察学生的掌握情况
 
 ${mclass.length ? "#参考资料\n面向年级:" + mclass.join(",") : ""}
 
@@ -276,8 +275,6 @@ ${mclass.length ? "#参考资料\n面向年级:" + mclass.join(",") : ""}
   1.知识点:知识点1
   2.知识点:知识点2
   3.知识点:知识点3
-  4.知识点:知识点4
-  5.知识点:知识点5
 
 # 限制
 1.如果有参考资料请根据参考资料,如果没有无需根据参考资料进行,随意发挥。

+ 1 - 1
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>

+ 317 - 65
src/components/pages/test/examine/conpoments/personPage.vue

@@ -43,8 +43,9 @@
       width="95%"
       :before-close="handleClose"
       class="dialog_diy"
+      v-loading="digLoading"
     >
-      <div class="testPersonExamine">
+      <div class="testPersonExamine" >
         <div class="testTit">
           <div class="teaLis">
             <div
@@ -65,47 +66,59 @@
         </div>
         <div class="digTop">
           <div
-            style="width: 230px;display: flex;justify-content: space-between;align-items: center;"
+            style="width: 230px;display: flex;justify-content: space-between;align-items: center;margin-left: 15px;"
           >
-            <div>教师姓名</div>
-            <div><el-button type="primary" size="mini">上一个</el-button></div>
-            <div><el-button type="primary" size="mini">下一个</el-button></div>
+            <div class="digUsernameCss">{{ digUsername }}</div>
+            <div
+              style="display: flex;justify-content: space-between;width: 150px;"
+            >
+              <div>
+                <el-button type="primary" size="mini" @click="upTea"
+                  >上一个</el-button
+                >
+              </div>
+              <div>
+                <el-button type="primary" size="mini" @click="nextTea"
+                  >下一个</el-button
+                >
+              </div>
+            </div>
           </div>
           <div
             style="width: 650px;display: flex;justify-content: space-between;"
           >
-            <div>
+            <div style="display: flex;">
               <span>教研室:</span
               ><el-tooltip
                 class="item"
                 effect="dark"
-                content="深技师"
+                :content="disTeaClass"
                 placement="top"
               >
                 <div
-                  style="width: 100px;display: flex;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
+                  style="width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
                 >
-                  深技师
+                  {{ disTeaClass }}
                 </div>
               </el-tooltip>
             </div>
-            <div>审核进度:</div>
-            <div>自评分数:</div>
-            <div>考核分数:</div>
+            <div>审核进度:{{ computedStep }}/{{ twoTarget }}</div>
+            <div>自评分数:{{ DigSelfSco }}</div>
+            <div>考核分数:{{ computedSco }}</div>
           </div>
         </div>
         <div>
           <div class="sBox_table">
             <div class="table_title">
-              <div>一级指标</div>
-              <div>二级指标</div>
-              <div>评价方法</div>
-              <div>分值</div>
-              <div>自评</div>
-              <div>自评概述</div>
-              <div>数据来源</div>
-              <div>认定</div>
-              <div>认定概述</div>
+              <div style="width: 150px;">一级指标</div>
+              <div style="width: 160px;">二级指标</div>
+              <div style="width: 160px;">评价方法</div>
+              <div style="width: 110px;">分值</div>
+              <div style="width: 110px;">自评</div>
+              <div style="flex: 1;">自评概述</div>
+              <div style="width: 250px;">数据来源</div>
+              <div style="width: 110px;">认定</div>
+              <div style="flex: 1;">认定概述</div>
             </div>
             <div
               class="table_Content"
@@ -124,8 +137,10 @@
                     <div>
                       {{ k.sco1 }}
                     </div>
-                    <div class="tArea">
-                      {{ k.selfSummary }}
+                    <div>
+                      <div class="tArea">
+                        {{ k.selfSummary }}
+                      </div>
                     </div>
                     <div>
                       <div v-if="!k.testid.test.length">/</div>
@@ -144,12 +159,18 @@
                     </div>
                     <div style="display: flex;justify-content: center;">
                       <div class="ScoreStep">
-                        <input type="number" v-model="k.sco2" />
+                        <input
+                          @blur="
+                            saveTab(k.sco2 > k.score ? (k.sco2 = k.score) : '')
+                          "
+                          type="number"
+                          v-model="k.sco2"
+                        />
                         <!-- @blur="Submit(scope.row)" -->
                       </div>
                     </div>
                     <div style="display: flex;justify-content: center;">
-                      <textarea v-model.trim="k.cogSum" />
+                      <textarea @blur="saveTab()" v-model.trim="k.cogSum" />
                     </div>
                   </div>
                 </div>
@@ -171,36 +192,189 @@ export default {
       default: 0
     }
   },
-  watch: {
-    pType(newVal, oldVal) {
-      this.getData();
-    },
-    digType(newVal, oldVal) {
-      this.getPageBase();
-    }
-  },
+
   data() {
     return {
       digType: 2,
       diaSco: false,
       PageBaseData: [],
       digUserid: "", //用户id
-      digUserName: "",
       digOid: "", //学校id
       digOrg: "", //组织id
+      digTid: "", //表单id
+      cutTeaNum: 0, //第几位教师
+      disTeaClass: "", //教研室
+      digLoading: false,
+      DigSelfSco: 0,
+      digUsername: "",
+      twoTarget: 0,
+      computedScoData: 0,
+      computedStepData: 0,
+      computedCogSCoData: 0,
+
       userid: this.$route.query.userid, //用户id
       oid: this.$route.query.oid, //学校id
       org: this.$route.query.org, //组织id
       tableData: []
     };
   },
+  watch: {
+    pType(newVal, oldVal) {
+      this.getData();
+    },
+    digType(newVal, oldVal) {
+      this.getPageBase();
+    }
+  },
+  computed: {
+    computedSco() {
+      this.computedScoData = 0; // 初始化一个局部变量来存储累加结果
+
+      // 定义一个函数来执行累加操作
+      const accumulateSco = () => {
+        if (this.PageBaseData) {
+          // 确保 this.PageBaseData 存在
+          this.PageBaseData.forEach(e => {
+            // 假设 e.children 是一个可以迭代的数组或类似结构
+            e.children.forEach(i => {
+              if (!!i.sco2) {
+                this.computedScoData += i.sco2 * 1;
+              }
+            });
+          });
+        }
+        return this.computedScoData; // 返回累加结果
+      };
+
+      // 立即调用函数并返回结果
+      return accumulateSco();
+    },
+
+    computedStep() {
+      this.computedStepData = 0; // 初始化一个局部变量来存储累加结果
+
+      // 定义一个函数来执行累加操作
+      const accumulateSco2 = () => {
+        if (this.PageBaseData) {
+          this.PageBaseData.forEach(e => {
+            e.children.forEach(i => {
+              if (!!i.sco2) {
+                this.computedStepData++;
+              }
+            });
+          });
+        }
+        return this.computedStepData; // 返回累加结果
+      };
+
+      // 立即调用函数并返回结果
+      return accumulateSco2();
+    }
+  },
   mounted() {
     this.getData();
   },
   methods: {
+    saveTab() {
+      let PageBaseDataCopy = JSON.parse(JSON.stringify(this.PageBaseData));
+
+      for (const e of PageBaseDataCopy) {
+        for (const k of e.children) {
+          if (k.testid.test.length > 0) {
+            k.testid.test = k.testid.test.map(item => item.courseId);
+          }
+        }
+      }
+
+      let params = [
+        {
+          uid: this.digUserid,
+          tid: this.digTid,
+          json: JSON.stringify(PageBaseDataCopy)
+        }
+      ];
+      // return console.log(params);
+      this.ajax
+        .post(this.$store.state.api + "updateExamineCogData", params)
+        .then(res => {
+          // console.log("updateExamineCogData", res);
+          // this.CopDigSco();
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
     // 切换专任,班主任
     cutPage(e) {
       this.digType = e;
+      this.digLoading = true;
+
+      this.getDataDig();
+    },
+    // 点击弹框内数据切换页面数据
+    getDataDig() {
+      let params = {
+        oid: this.oid,
+        org: this.org,
+        type: this.digType
+      };
+      // console.log(params);
+      this.ajax
+        .get(this.$store.state.api + "selectTestExamineSecondData", params)
+        .then(res => {
+          let data = res.data[0];
+
+          data.forEach(e => {
+            e.json = JSON.parse(e.json);
+          });
+          // return console.log("selectTestExamineSecondData", data);
+
+          data.forEach(e => {
+            e.evaSca = 0;
+            e.cogSco = 0;
+            e.step = 0;
+            e.allStep = 0;
+
+            e.json.forEach(i => {
+              i.children.forEach(k => {
+                e.evaSca = e.evaSca + k.sco1 * 1;
+                e.cogSco = e.evaSca + k.sco2 * 1;
+                e.allStep++;
+                if (!!k.sco2 * 1) {
+                  e.step++;
+                }
+              });
+            });
+          });
+
+          this.tableData = data;
+          if (this.tableData.length > 0) {
+            this.DigSelfSco = 0;
+            this.twoTarget = 0;
+
+            this.digTid = this.tableData[0].id;
+            this.diaSco = true;
+            this.digUserid = this.tableData[0].userid;
+            this.digOid = this.tableData[0].organizeid;
+            this.digOrg = this.tableData[0].org;
+            this.disTeaClass = this.tableData[0].tea;
+            this.cutPerson();
+            this.getPageBase();
+          } else {
+            this.DigSelfSco = 0;
+            this.twoTarget = 0;
+            this.digTid = "";
+            // this.diaSco = true;
+            this.digUserid = "";
+            this.digOid = "";
+            this.digOrg = "";
+            this.disTeaClass = "";
+          }
+          // console.log("this.tableData", this.tableData);
+        })
+        .catch(error => {
+          console.log(error);
+        });
     },
     // 关闭弹框
     handleClose(done) {
@@ -253,7 +427,7 @@ export default {
     // 获取Dig弹框页面数据
     getDigData() {
       let params = {
-        uid: this.userid,
+        uid: this.digUserid,
         type: this.digType
       };
       this.ajax
@@ -267,37 +441,45 @@ export default {
             this.PageBaseData.forEach(e => {
               val.forEach(i => {
                 if (e.id == i.id) {
-                  e.name = i.name;
                   e.children.forEach(a => {
                     i.children.forEach(b => {
                       if (a.id == b.id) {
-                        a.name = b.name;
-                        a.score = b.score;
                         a.sco1 = b.sco1;
                         a.sco2 = b.sco2;
-                        a.evaStandard = b.evaStandard;
-                        a.evaMethod = b.evaMethod;
                         a.cogSum = b.cogSum;
                         a.selfSummary = b.selfSummary;
-                        a.dep = b.dep;
-                        a.type = b.type;
-                        a.testid = b.testid;
                       }
                     });
                   });
                 }
               });
             });
+
+            this.getTwoRigData();
+
             this.handleData();
-            return;
           } else {
+            this.getTwoRigData();
             this.handleData();
           }
+          this.digLoading = false;
         })
         .catch(error => {
           console.log(error);
         });
     },
+    getTwoRigData() {
+      this.DigSelfSco = 0;
+      this.twoTarget = 0;
+
+      // 计算自评分数,与二级指标个数
+      this.PageBaseData.forEach(e => {
+        e.children.forEach(i => {
+          this.DigSelfSco += i.sco1 * 1;
+          this.twoTarget++;
+        });
+      });
+    },
     // 获取页面基础ui信息
     getPageBase() {
       let params = {
@@ -309,6 +491,7 @@ export default {
         .get(this.$store.state.api + "selectTestExamineBase", params)
         .then(res => {
           console.log("selectTestExamineBase", res.data[0][0]);
+
           this.PageBaseData = JSON.parse(res.data[0][0].json);
           // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
           this.getDigData();
@@ -348,19 +531,61 @@ export default {
       });
     },
     // 切换教师
+    upTea() {
+      if (this.cutTeaNum <= 0) return this.$message.error("已经是第一个了");
+      this.digLoading = true;
+
+      this.cutTeaNum--;
+      this.digUsername = this.tableData[this.cutTeaNum].username;
+      this.disTeaClass = this.tableData[this.cutTeaNum].tea;
+      this.digUserid = this.tableData[this.cutTeaNum].userid;
+      this.digOid = this.tableData[this.cutTeaNum].organizeid;
+      this.digOrg = this.tableData[this.cutTeaNum].org;
+      this.digTid = this.tableData[this.cutTeaNum].id;
+
+      this.getDigData();
+    },
+    nextTea() {
+      // console.log("this.tableData", this.tableData);
+      if (this.cutTeaNum + 1 >= this.tableData.length)
+        return this.$message.error("已经是最后一个了");
+      this.digLoading = true;
+
+      this.cutTeaNum++;
+      this.digUsername = this.tableData[this.cutTeaNum].username;
+      this.disTeaClass = this.tableData[this.cutTeaNum].tea;
+      this.digUserid = this.tableData[this.cutTeaNum].userid;
+      this.digOid = this.tableData[this.cutTeaNum].organizeid;
+      this.digOrg = this.tableData[this.cutTeaNum].org;
+      this.digTid = this.tableData[this.cutTeaNum].id;
+
+      this.getDigData();
+    },
     cutPerson() {
-      this.tableData.forEach(e => {
+      this.tableData.forEach((e, index) => {
         if (e.userid == this.digUserid) {
-          this.digUserName = e.username;
+          this.cutTeaNum = index;
+          this.digUsername = e.username;
         }
       });
     },
+
     // 点击评分
     lookScore(val) {
+      this.digLoading = true;
+      // console.log("valvalvalval", val);
+      // 重置自评分,二级指标个数
+      this.DigSelfSco = 0;
+      this.twoTarget = 0;
+
+      this.digType = this.pType;
+
+      this.digTid = val.id;
       this.diaSco = true;
       this.digUserid = val.userid;
       this.digOid = val.organizeid;
       this.digOrg = val.org;
+      this.disTeaClass = val.tea;
       this.cutPerson();
       this.getPageBase();
     }
@@ -371,6 +596,12 @@ export default {
 .personPage >>> .el-table tr {
   height: 70px;
 }
+.digUsernameCss {
+  width: 70px;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
 .digTop {
   display: flex;
   justify-content: space-between;
@@ -422,12 +653,14 @@ export default {
 }
 .ScoreStep {
   height: 100%;
+  width: 100%;
 }
 .ScoreStep > input {
   height: 100% !important;
   outline-style: none;
   padding: 5px;
   width: 100%;
+  text-align: center;
   box-sizing: border-box;
   border-radius: 4px;
   border: 1px solid #dcdfe6 !important;
@@ -455,8 +688,12 @@ export default {
   background-color: #fff;
 }
 .tArea {
-  box-sizing: border-box;
+  width: 100%;
+  height: 100%;
   padding: 5px;
+  box-sizing: border-box;
+  display: block !important;
+  text-align: left;
 }
 .testPersonExamine > .testTit {
   height: 100px;
@@ -487,7 +724,7 @@ export default {
 }
 .sBox_table {
   width: 100%;
-  min-width: calc(100px * 9);
+  min-width: 1500px;
   margin: 0 auto;
   /* min-width: 1520px; */
   font-size: 14px;
@@ -495,7 +732,7 @@ export default {
 
 .table_title {
   width: 100%;
-  min-width: calc(100px * 9);
+  /* min-width: calc(100px * 9); */
   height: 50px;
   background: #e0eafb;
   border: 1px solid #d5d8df;
@@ -517,8 +754,8 @@ input[type="number"] {
   -moz-appearance: textfield;
 }
 .table_title > div {
-  width: calc(100% / 9);
-  min-width: 110px;
+  /* width: calc(100% / 9); */
+  /* min-width: 110px; */
   text-align: center;
   height: 100%;
   line-height: 50px;
@@ -546,8 +783,7 @@ input[type="number"] {
 }
 
 .ColTit {
-  width: calc(100% / 9);
-  min-width: 100px;
+  width: 150px !important;
   display: flex;
   justify-content: center;
   align-items: center;
@@ -556,12 +792,7 @@ input[type="number"] {
 .twoCon {
   display: flex;
 }
-.twoCon > div >>> .el-input-number {
-  height: 100% !important;
-}
-.twoCon > div >>> .el-input {
-  height: 100% !important;
-}
+
 .twoCon > div > input {
   border: none;
   width: 100%;
@@ -571,16 +802,19 @@ input[type="number"] {
 }
 .twoCon {
   display: flex;
+  width: 100%;
 }
 .twoCon > div > textarea {
   border: none;
   width: 100%;
   height: 100%;
   resize: none;
+  box-sizing: border-box;
+  padding: 5px;
   outline-style: none;
 }
 .twoCon > div {
-  width: calc(100% / 8);
+  /* width: 10%; */
   /* min-width: 110px; */
   min-height: 50px;
   /* line-height: 50px; */
@@ -590,11 +824,29 @@ input[type="number"] {
   border-left: 1px #ccc solid;
   border-bottom: 1px #ccc solid;
 }
-.twoCon > div >>> .el-input__inner {
-  height: 100%;
-  border: none;
-  padding-left: 15px;
-  padding-right: 15px;
+.twoCon > div:nth-child(1) {
+  width: 160px !important;
+}
+.twoCon > div:nth-child(2) {
+  width: 160px !important;
+}
+.twoCon > div:nth-child(3) {
+  width: 110px !important;
+}
+.twoCon > div:nth-child(4) {
+  width: 110px !important;
+}
+.twoCon > div:nth-child(5) {
+  flex: 1;
+}
+.twoCon > div:nth-child(6) {
+  width: 250px !important;
+}
+.twoCon > div:nth-child(7) {
+  width: 110px !important;
+}
+.twoCon > div:nth-child(8) {
+  flex: 1;
 }
 
 .ColCon {

+ 60 - 5
src/components/pages/test/examine/conpoments/targetPage.vue

@@ -196,7 +196,7 @@
                   :key="item2.courseId"
                   class="orgDataCss"
                 >
-                  <div>
+                  <div @click="lookUserPrize(scope.row, item2.courseId)">
                     <!-- @click="lookPrize(item2.courseId)" -->
                     {{ item2.title }}:{{ item2.num }}份
                   </div>
@@ -209,6 +209,7 @@
               <div class="ScoreStep">
                 <input
                   type="number"
+                  :style="{ color: scope.row.judge ? '#528DF7' : '' }"
                   @blur="Submit(scope.row)"
                   v-model="scope.row.cogSco"
                 />
@@ -223,7 +224,7 @@
           >
             <template slot-scope="scope">
               <textarea
-                @blur="Submit(scope.row)"
+                @blur="Submit2(scope.row)"
                 class="tArea"
                 v-model.trim="scope.row.cogSummary"
               />
@@ -1256,14 +1257,21 @@ export default {
   },
 
   methods: {
-    // 提交
+    // 分数提交
     Submit(val) {
       console.log("Submit", val);
       // val.cogSco = !val.cogSco ? 0 : val.cogSco;
+      this.tableData.forEach(e => {
+        if (e.id == val.id) {
+          e.judge = 0;
+        }
+      });
+      // return console.log(this.tableData);
 
       if (val.cogSco > val.score) {
         val.cogSco = val.score;
       }
+
       val.json.forEach(e => {
         e.children.forEach(i => {
           if (i.id == this.secondId) {
@@ -1293,6 +1301,38 @@ export default {
           console.log(error);
         });
     },
+
+    // 概述提交
+    Submit2(val) {
+      // val.cogSco = !val.cogSco ? 0 : val.cogSco;
+
+      val.json.forEach(e => {
+        e.children.forEach(i => {
+          if (i.id == this.secondId) {
+            i.cogSum = val.cogSummary;
+          }
+        });
+      });
+
+      let params = [
+        {
+          uid: this.userid,
+          tid: val.id,
+          json: JSON.stringify(val.json)
+        }
+      ];
+      // return console.log(params);
+      this.ajax
+        .post(this.$store.state.api + "updateExamineCogData", params)
+        .then(res => {
+          // console.log("updateExamineCogData", res);
+          // 计算评分弹框平均值等
+          // this.CopDigSco();
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
     // 查看评分
     lookScore(val, oneName, twoName) {
       this.evaScoDig = true;
@@ -1331,7 +1371,7 @@ export default {
             e.cogSco = "";
             e.cogSummary = "";
             e.score = 0;
-
+            e.judge = 0;
             e.json.forEach(i => {
               i.children.forEach(k => {
                 if (k.id == this.secondId) {
@@ -1339,8 +1379,15 @@ export default {
                   e.evaMed = k.selfSummary;
                   e.orgData = k.testid.test;
                   e.score = k.score;
-                  e.cogSco = k.sco2;
+                  // e.cogSco = k.sco2;
                   e.cogSummary = k.cogSum;
+                  console.log("k.sco2", typeof k.sco2);
+                  if (!!k.sco2) {
+                    e.cogSco = k.sco2;
+                  } else {
+                    e.cogSco = k.sco1;
+                    e.judge = 1;
+                  }
                 }
               });
             });
@@ -1461,7 +1508,15 @@ export default {
           console.log(error);
         });
     },
+    // 查看数据来源
+    lookUserPrize(val, cid) {
+      // return console.log(val);
+      // 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=${val.organizeid}&org=${val.org}&type=2&role=0&peopleId=${val.userid}`;
+      // 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;
+    },
     // 获取基础页面数据
     getPageBase() {
       this.tabLoad = true;

+ 4 - 4
src/components/pages/test/examine/index.vue

@@ -54,10 +54,10 @@ export default {
           value: 0,
           label: "按指标"
         },
-        // {
-        //   value: 1,
-        //   label: "按人员"
-        // }
+        {
+          value: 1,
+          label: "按人员"
+        }
       ]
     };
   },

+ 113 - 139
src/components/pages/testPerson/examine/index.vue

@@ -40,15 +40,15 @@
     <div v-loading="tabLoad">
       <div class="sBox_table">
         <div class="table_title">
-          <div>一级指标</div>
-          <div>二级指标</div>
-          <div>评价方法</div>
-          <div>分值</div>
-          <div>自评</div>
-          <div>自评概述</div>
-          <div>数据来源</div>
-          <div>认定</div>
-          <div>认定概述</div>
+          <div style="width: 110px;">一级指标</div>
+          <div style="width: 140px;">二级指标</div>
+          <div style="width: 140px;">评价方法</div>
+          <div style="width: 100px;">分值</div>
+          <div style="width: 100px;">自评</div>
+          <div style="flex: 1;">自评概述</div>
+          <div style="flex: 1;">数据来源</div>
+          <div style="width: 100px;">认定</div>
+          <div style="flex: 1;">认定概述</div>
         </div>
         <div class="table_Content" v-for="item in PageBaseData" :key="item.id">
           <div class="twoCol">
@@ -84,7 +84,12 @@
                       @blur="saveTab"
                       v-model.trim="k.selfSummary"
                     />
-                    <div v-else>{{ k.selfSummary }}</div>
+                    <div
+                      v-else
+                      style="width: 100%;padding: 5px;height: 100%;box-sizing: border-box;"
+                    >
+                      {{ k.selfSummary }}
+                    </div>
                   </div>
                   <div v-else class="ScoreStep">/</div>
                 </div>
@@ -122,67 +127,6 @@
       </div>
     </div>
 
-    <!-- <div v-if="pType == 1" v-loading="tabLoad">
-      <div class="sBox_table">
-        <div class="table_title2">
-          <div>一级指标</div>
-          <div>二级指标</div>
-          <div>评价方法</div>
-          <div>分值</div>
-          <div>自评</div>
-          <div>自评概述</div>
-          <div>数据来源</div>
-          <div>认定</div>
-          <div>认定概述</div>
-        </div>
-        <div class="table_Content2" v-for="item in PageBaseData" :key="item.id">
-          <div class="twoCol">
-            <div class="ColTit">{{ item.name }}</div>
-            <div class="ColCon">
-              <div class="twoCon" v-for="k in item.children" :key="k.id">
-                <div>{{ k.name }}</div>
-                <div>{{ k.evaMethod }}</div>
-                <div>{{ k.score }}</div>
-                <div>
-                  <el-input-number
-                    v-model="k.sco1"
-                    :controls="false"
-                    :min="0"
-                    :max="k.score"
-                  ></el-input-number>
-                </div>
-                <div class="tArea">
-                  <textarea v-model.trim="k.selfSummary" />
-                </div>
-                <div>
-                  <div v-if="!k.testid.test.length">/</div>
-                  <div v-else style="padding-top: 10px;">
-                    <div
-                      v-for="(item2, index) in k.testid.test"
-                      :key="item2.courseId"
-                      class="orgData"
-                    >
-                      <div @click="lookPrize(item2.courseId)">
-                        {{ item2.title }}:{{ item2.num }}份
-                      </div>
-                      <div
-                        style="color: black;"
-                        @click="goFillIn(item2.courseId)"
-                      >
-                        去填写
-                      </div>
-                    </div>
-                  </div>
-                </div>
-                <div>{{ k.sco2 }}</div>
-                <div>{{ k.cogSum }}</div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div> -->
-
     <!-- 点击数据来源 -->
     <el-dialog
       title=""
@@ -253,10 +197,29 @@ export default {
     },
     // 提交
     Submit() {
-      if (this.allData.type == 2) {
+      // if (this.allData.type == 2) {
+      //   this.$message({
+      //     type: "info",
+      //     message: "您已提交过,请勿重复提交"
+      //   });
+      //   return;
+      // }
+      let judgeNum = 0;
+
+      this.PageBaseData.forEach(e => {
+        e.children.forEach(i => {
+          if (i.type == 1) {
+            if (!i.sco1) {
+              judgeNum = 1;
+            }
+          }
+        });
+      });
+
+      if (judgeNum != 0) {
         this.$message({
-          type: "info",
-          message: "您已提交过,请勿重复提交"
+          message: "请将【自评】分数列填写完整后再提交。",
+          type: "warning"
         });
         return;
       }
@@ -453,6 +416,7 @@ export default {
     },
     // 关闭弹框
     handleClose(done) {
+      this.getPageBase();
       done();
     }
   }
@@ -464,19 +428,23 @@ export default {
   width: 100%;
   min-width: calc(100px * 10);
   min-height: 100%;
+  /* overflow-x: scroll; */
+  overflow: auto;
   padding: 10px;
   box-sizing: border-box;
   background-color: #fff;
 }
 .tArea {
-  box-sizing: border-box;
-  padding: 5px;
+  /* box-sizing: border-box; */
+  /* padding: 5px; */
 }
 .tArea > div > textarea {
   border: none;
   width: 100%;
   height: 100%;
   resize: none;
+  box-sizing: border-box;
+  padding: 5px;
   outline-style: none;
 }
 .testPersonExamine > .testTit {
@@ -494,6 +462,7 @@ export default {
   height: 100%;
   display: flex;
   width: 100%;
+  text-align: center;
   align-items: center;
   justify-content: center;
 }
@@ -502,9 +471,12 @@ export default {
   outline-style: none;
   width: 100%;
   padding: 5px;
+  text-align: center;
   box-sizing: border-box;
   border-radius: 4px;
-  border: 1px solid #dcdfe6 !important;
+  border: none !important;
+
+  /* border: 1px solid #dcdfe6 !important; */
 }
 .teaLis {
   display: flex;
@@ -557,9 +529,8 @@ export default {
 
 .sBox_table {
   width: 100%;
-  min-width: calc(110px * 9);
+  min-width: 1300px;
   margin: 0 auto;
-  /* min-width: 1520px; */
   font-size: 14px;
 }
 
@@ -584,7 +555,7 @@ export default {
   border-right: 1px solid #d5d8df;
 }
 
-.table_title2 {
+/* .table_title2 {
   width: 100%;
   min-width: calc(110px * 8);
   height: 50px;
@@ -602,7 +573,7 @@ export default {
   height: 100%;
   line-height: 50px;
   border-right: 1px solid #d5d8df;
-}
+} */
 
 .table_title > div:last-child {
   border: none;
@@ -618,7 +589,7 @@ export default {
   text-align: center;
   align-items: center;
 }
-.table_Content2 {
+/* .table_Content2 {
   width: 100%;
   min-width: calc(110px * 8);
   border: 1px solid #d5d8df;
@@ -627,7 +598,7 @@ export default {
   flex-wrap: nowrap;
   text-align: center;
   align-items: center;
-}
+} */
 
 .twoCol {
   width: 100%;
@@ -635,45 +606,12 @@ export default {
 }
 
 .ColTit {
-  width: calc(100% / 9);
-  min-width: 110px;
+  width: 110px !important;
   display: flex;
   justify-content: center;
   align-items: center;
 }
-.ColTit2 {
-  width: calc(100% / 8);
-  min-width: 110px;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-.twoCon {
-  display: flex;
-}
-.twoCon > div >>> .el-input-number {
-  height: 100% !important;
-}
-.twoCon > div >>> .el-input {
-  height: 100% !important;
-}
-.twoCon > div > input {
-  border: none;
-  width: 100%;
-  height: 100%;
-  outline-style: none;
-  text-align: center;
-}
-.twoCon {
-  display: flex;
-}
-.twoCon > div > textarea {
-  border: none;
-  width: 100%;
-  height: 100%;
-  resize: none;
-  outline-style: none;
-}
+
 /* 取消[type='number']的input的上下箭头 */
 input::-webkit-inner-spin-button {
   -webkit-appearance: none !important;
@@ -686,10 +624,13 @@ input::-webkit-outer-spin-button {
 input[type="number"] {
   -moz-appearance: textfield;
 }
-
+.twoCon {
+  display: flex;
+  width: 100%;
+}
 .twoCon > div {
-  width: calc(100% / 8);
-  /* min-width: 110px; */
+  /* width: 10%; */
+  min-width: 110px;
   min-height: 50px;
   /* line-height: 50px; */
   display: flex;
@@ -698,31 +639,64 @@ input[type="number"] {
   border-left: 1px #ccc solid;
   border-bottom: 1px #ccc solid;
 }
-.twoCon > div >>> .el-input__inner {
-  height: 100%;
-  border: none;
-  padding-left: 15px;
-  padding-right: 15px;
+
+.twoCon > div:nth-child(1) {
+  width: 140px !important;
 }
-.twoCon2 {
-  display: flex;
+.twoCon > div:nth-child(2) {
+  width: 140px !important;
 }
-.twoCon2 > div {
-  width: calc(100% / 7);
-  min-width: 110px;
-  min-height: 50px;
-  /* line-height: 50px; */
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  border-left: 1px #ccc solid;
-  border-bottom: 1px #ccc solid;
+.twoCon > div:nth-child(3) {
+  width: 100px !important;
+}
+.twoCon > div:nth-child(4) {
+  width: 100px !important;
+}
+.twoCon > div:nth-child(5) {
+  flex: 1;
+}
+.twoCon > div:nth-child(6) {
+  flex: 1;
+}
+.twoCon > div:nth-child(7) {
+  width: 100px !important;
+}
+.twoCon > div:nth-child(8) {
+  flex: 1;
 }
 
+/* .twoCon > div >>> .el-input-number {
+  height: 100% !important;
+} */
+/* .twoCon > div >>> .el-input {
+  height: 100% !important;
+} */
+.twoCon > div > input {
+  border: none;
+  width: 100%;
+  height: 100%;
+  outline-style: none;
+  text-align: center;
+}
+/* .twoCon > div >>> .el-input__inner {
+  height: 100%;
+  border: none;
+  padding-left: 15px;
+  padding-right: 15px;
+} */
 .ColCon {
   flex: 1;
 }
-
+.ColCon:nth-child(-1) > div {
+  border-bottom: none;
+}
+.twoCon > div > textarea {
+  border: none;
+  width: 100%;
+  height: 100%;
+  resize: none;
+  outline-style: none;
+}
 .dialog_diy >>> .el-dialog {
   height: 95%;
   margin: 0 auto !important;

+ 3 - 0
src/components/pages/testPerson/test/test.vue

@@ -279,6 +279,9 @@ export default {
                 .get(this.$store.state.api + "selectTestExamineBase", params)
                 .then(res => {
                     this.ExamineBase = res.data[0]
+                    if ( this.ExamineBase.length > 0) {
+                        this.type=1
+                    }
                     // console.log("selectTestExamineBase", res.data);
                 })
                 .catch(error => {

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov