11wqe1 8 hónapja
szülő
commit
bea214f41e

+ 83 - 92
src/components/easy2/commpont/markDialog.vue

@@ -28,12 +28,12 @@
                   <el-tooltip
                     class="item"
                     effect="dark"
-                    :content="e.value"
+                    :content="e.detail"
                     placement="top"
                   >
                     <div class="briefTit">
                       <img class="titRoot" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
-                      {{ e.value }}
+                      {{ e.detail }}
                     </div>
                   </el-tooltip>
                   <el-rate @change="submit" v-model="e.cog"></el-rate>
@@ -48,12 +48,12 @@
                   <el-tooltip
                     class="item"
                     effect="dark"
-                    :content="e.value"
+                    :content="e.detail"
                     placement="top"
                   >
                     <div class="briefTit">
                       <img class="titRoot" src="../../../assets/icon/newIcons/blueRoot.png" alt="">
-                      {{ e.value }}
+                      {{ e.detail }}
                     </div>
                   </el-tooltip>
                   <el-rate @change="submit" v-model="e.cog"></el-rate>
@@ -518,7 +518,7 @@ export default {
     // 老师提交评分
     submit() {
       let data = this.scoTitList.map(e => {
-        return e.value + ":" + e.cog;
+        return e.detail + ":" + e.cog;
       });
       // console.log("data", data);
       const processedData = {};
@@ -574,82 +574,82 @@ export default {
       // this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
     },
 
-    async generateMsg(work) {
-      this.ScLoading = true;
-      let tit = this.scoTit;
-      tit.forEach((e, index) => {
-        if (!e.isai) {
-          e.isai = 1;
-        }
-      });
-      let _fileid = "";
-      if (work.type == 4 || work.type == 12) {
-        _fileid = await this.createFileid(work.content);
-      }
-      let con = this.cuScoCon;
-
-      let laws = "";
-      for (let i = 0; i < tit.length; i++) {
-        if (tit[i].isai == 1) {
-          laws += `评价维度:${tit[i].value} 评价细则:${tit[i].rule} \n`;
-        }
-      }
-      let msg = `NOTICE
-          Role:你是一个专业的项目式学习导师,你要对学生的评价高度负责。你要根据“六级评价细则”评价学生作业。
-          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
-          ##要求
-          根据<评价细则>和<作业内容>的相关性评价作业,只用输出作业的综合性“评语”,不要带标题,字数控制在150字左右,不要输出其他无关内容。
-
-
-          ##评分资料
-          评价细则:${laws}
-          作业内容:${_fileid ? "上传的文件内容" : con}
-
-
-          # Format example
-          学生能够全面且正确地描述光合作用中氧气和葡萄糖的生成过程,涵盖光反应和暗反应的每个阶段和主要反应物及产物。同时,学生也能够全面、准确地解释氧气和葡萄糖在植物生命活动中的重要作用,并展示了对光合作用的深入理解。论文结构良好,内容详实,逻辑清晰,论据充分。
-          `;
-      // return console.log(msg);
-
-      this.generateRemark(msg, _fileid);
-    },
+    // async generateMsg(work) {
+    //   this.ScLoading = true;
+    //   let tit = this.scoTit;
+    //   tit.forEach((e, index) => {
+    //     if (!e.isai) {
+    //       e.isai = 1;
+    //     }
+    //   });
+    //   let _fileid = "";
+    //   if (work.type == 4 || work.type == 12) {
+    //     _fileid = await this.createFileid(work.content);
+    //   }
+    //   let con = this.cuScoCon;
+
+    //   let laws = "";
+    //   for (let i = 0; i < tit.length; i++) {
+    //     if (tit[i].isai == 1) {
+    //       laws += `评价维度:${tit[i].value} 评价细则:${tit[i].rule} \n`;
+    //     }
+    //   }
+    //   let msg = `NOTICE
+    //       Role:你是一个专业的项目式学习导师,你要对学生的评价高度负责。你要根据“六级评价细则”评价学生作业。
+    //       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
+    //       ##要求
+    //       根据<评价细则>和<作业内容>的相关性评价作业,只用输出作业的综合性“评语”,不要带标题,字数控制在150字左右,不要输出其他无关内容。
+
+
+    //       ##评分资料
+    //       评价细则:${laws}
+    //       作业内容:${_fileid ? "上传的文件内容" : con}
+
+
+    //       # Format example
+    //       学生能够全面且正确地描述光合作用中氧气和葡萄糖的生成过程,涵盖光反应和暗反应的每个阶段和主要反应物及产物。同时,学生也能够全面、准确地解释氧气和葡萄糖在植物生命活动中的重要作用,并展示了对光合作用的深入理解。论文结构良好,内容详实,逻辑清晰,论据充分。
+    //       `;
+    //   // return console.log(msg);
+
+    //   this.generateRemark(msg, _fileid);
+    // },
     // 重新获取评语
-    generateRemark(messages, _fileid) {
-      let _this = this;
-
-      let params = {
-        assistant_id: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
-        message: [
-          {
-            type: "text",
-            text: messages.replaceAll("\n", " ").replaceAll("*", "")
-          }
-        ],
-        session_name: uuidv4(),
-        userId: this.cUserid,
-        file_ids: _fileid ? [_fileid] : [],
-        model: "gpt-4o-2024-08-06"
-      };
-      this.ajax
-        .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
-        .then(response => {
-          let data = response.data.FunctionResponse;
-          // console.log("data", data);
-          this.textarea = data.message;
-          // this.selectSWorksData()
-          this.ScLoading = false;
-        })
-        .catch(error => {
-          this.ScLoading = false;
-
-          _this.$message.error("评价失败");
-          console.log(error);
-        });
-    },
+    // generateRemark(messages, _fileid) {
+    //   let _this = this;
+
+    //   let params = {
+    //     assistant_id: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
+    //     message: [
+    //       {
+    //         type: "text",
+    //         text: messages.replaceAll("\n", " ").replaceAll("*", "")
+    //       }
+    //     ],
+    //     session_name: uuidv4(),
+    //     userId: this.cUserid,
+    //     file_ids: _fileid ? [_fileid] : [],
+    //     model: "gpt-4o-2024-08-06"
+    //   };
+    //   this.ajax
+    //     .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
+    //     .then(response => {
+    //       let data = response.data.FunctionResponse;
+    //       // console.log("data", data);
+    //       this.textarea = data.message;
+    //       // this.selectSWorksData()
+    //       this.ScLoading = false;
+    //     })
+    //     .catch(error => {
+    //       this.ScLoading = false;
+
+    //       _this.$message.error("评价失败");
+    //       console.log(error);
+    //     });
+    // },
     // ai评分
     async AIsubmit(work) {
       // return console.log("con", this.scoTit, this.cuScoCon);
@@ -669,7 +669,7 @@ export default {
       let laws = "";
       for (let i = 0; i < tit.length; i++) {
         if (tit[i].isai == 1) {
-          let a = tit[i].value
+          let a = tit[i].detail
           let result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
         
           laws += `评价维度:“${result}”, 评价细则:${tit[i].rule} \n`;
@@ -778,7 +778,6 @@ export default {
               }
             }
             delete processedData["评语"];
-            console.log("processedData", processedData);
 
             let params = {
               cid: _this.cid,
@@ -787,7 +786,6 @@ export default {
               rate: JSON.stringify(processedData),
               uid: _this.DgUid
             };
-            // console.log("params", params);
             _this.ajax
               .get(_this.$store.state.api + "updateWorksEva", params)
               .then(res => {
@@ -1049,22 +1047,15 @@ export default {
     // 处理任务的分展示
     appraise(val) {
       if (val.rate) {
-        // this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
-        // console.log("val.rate", val.rate);
-
+       
         let data = JSON.parse(val.rate);
         this.scoTitList.forEach((e, index) => {
           e.cog = null;
           for (const key in data) {
-            // if (e.value.endsWith("。")) {
-            //   e.value = e.value.slice(0, -1); // 如果字符串以句号结尾,则去除最后一个字符
-            // }
 
-            let result = e.value.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
+            let result = e.detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
             let key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
 
-
-
             if (result.indexOf(key2) != -1) {
               e.cog = data[key];
             }

+ 5 - 5
src/components/easy2/commpont/markScore.vue

@@ -26,11 +26,11 @@
               <el-tooltip
                 class="item"
                 effect="dark"
-                :content="e.value"
+                :content="e.detail"
                 placement="top"
               >
                 <div class="briefTit">
-                  {{ e.value }}
+                  {{ e.detail }}
                 </div>
               </el-tooltip>
               <el-rate
@@ -190,7 +190,7 @@ export default {
                   // if (e.value.endsWith('。')) {
                   //   e.value = e.value.slice(0, -1); // 如果字符串以句号结尾,则去除最后一个字符
                   // }
-                  let result = e.value.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
+                  let result = e.detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
                   let key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
 
                   if (result.indexOf(key2) != -1) {
@@ -227,14 +227,14 @@ export default {
     reset() {
       this.scoTitList.forEach(e => {
         e.cog = 0;
-        console.log(e.cog);
+        // console.log(e.cog);
       });
     },
 
     // 老师提交评分
     submit() {
       let data = this.scoTitList.map(e => {
-        return e.value + ":" + e.cog;
+        return e.detail + ":" + e.cog;
       });
       // console.log("data", data);
       const processedData = {};

+ 5 - 3
src/components/easy2/studyStudent.vue

@@ -8827,7 +8827,7 @@
                     stripe
                     style="width: 100%"
                   >
-                  <el-table-column width="150" label="目标" align="center">
+                  <el-table-column :width="courseDetail.state == 5? '230': '150'" label="目标" align="center">
                       <template slot-scope="scope"
                         >
                         <div style="display:flex;justify-content: center;align-items: center;">
@@ -8859,13 +8859,15 @@
                     <el-table-column
                       label="评价维度"
                       align="center"
+                      v-if="courseDetail.state != 5"
+
                     >
                       <template slot-scope="scope"
                         ><div>{{ scope.row.value }}</div></template
                       >
                     </el-table-column>
                     <el-table-column
-                      label="维度描述"
+                      :label="courseDetail.state == 5? '评价标准' : '维度描述'"
                       align="center"
                     >
                       <template slot-scope="scope"
@@ -13646,7 +13648,7 @@ export default {
       let laws = ""
       for (let i = 0; i < tit.length; i++) {
         if(tit[i].isai == 1){
-          let a = tit[i].value
+          let a = tit[i].detail
           let result = a.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
 
           laws += `评价维度:“${result}”, 评价细则:${tit[i].rule} \n`;