فهرست منبع

Merge branch 'beta'

lsc 1 سال پیش
والد
کامیت
185d53b92f

+ 1 - 1
dist/index.html

@@ -27,7 +27,7 @@
     html,
     body{
       font-family: '黑体';
-    }</style><link href=./static/css/app.8916b2fdc7f35e58c61c9cd58890ddc5.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.733814fc48c2bd2222aa.js></script><script type=text/javascript src=./static/js/app.1905b0a53bdd6220e8bf.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.7ace9aabdb3bb28f145303780039848d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.733814fc48c2bd2222aa.js></script><script type=text/javascript src=./static/js/app.155ed678ce42d7c7ce80.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.7ace9aabdb3bb28f145303780039848d.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.7ace9aabdb3bb28f145303780039848d.css.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.8916b2fdc7f35e58c61c9cd58890ddc5.css.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.155ed678ce42d7c7ce80.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.155ed678ce42d7c7ce80.js.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 3 - 0
src/assets/icon/course/back.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="16" viewBox="0 0 20 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M0.614027 1.426C0.727567 1.15188 0.919852 0.917585 1.16656 0.752756C1.41327 0.587927 1.70332 0.499966 2.00003 0.5H12C13.9892 0.5 15.8968 1.29018 17.3033 2.6967C18.7099 4.10322 19.5 6.01088 19.5 8C19.5 9.98912 18.7099 11.8968 17.3033 13.3033C15.8968 14.7098 13.9892 15.5 12 15.5H3.00003C2.6022 15.5 2.22067 15.342 1.93937 15.0607C1.65806 14.7794 1.50003 14.3978 1.50003 14C1.50003 13.6022 1.65806 13.2206 1.93937 12.9393C2.22067 12.658 2.6022 12.5 3.00003 12.5H12C13.1935 12.5 14.3381 12.0259 15.182 11.182C16.0259 10.3381 16.5 9.19347 16.5 8C16.5 6.80653 16.0259 5.66193 15.182 4.81802C14.3381 3.97411 13.1935 3.5 12 3.5H5.62103L6.56103 4.44C6.83413 4.72303 6.98515 5.10201 6.98155 5.4953C6.97795 5.8886 6.82001 6.26474 6.54177 6.54273C6.26353 6.82071 5.88723 6.97828 5.49393 6.98151C5.10063 6.98475 4.7218 6.83337 4.43903 6.56L0.939027 3.06C0.729412 2.85026 0.586665 2.5831 0.528819 2.29227C0.470973 2.00144 0.500625 1.69999 0.614027 1.426Z" fill="#699BF7"/>
+</svg>

+ 1 - 0
src/components/classRoomHelper/component/dialogArea.vue

@@ -80,6 +80,7 @@
               :disabled="loading || chatLoading"
               v-loading="loading || chatLoading"
               @keyup.enter.native="send()"
+							placeholder="请在此输入您想了解的内容"
               class="d_b_i_left"
               v-model="text"
             ></el-input>

+ 651 - 52
src/components/classRoomHelper/component/searchArea.vue

@@ -154,7 +154,7 @@
         </div>
       </div>
 
-      <div class="s_b_atBox" v-if="openAtBox">
+      <div class="s_b_atBox" v-if="openAtBox" v-loading="loading">
         <div class="s_b_at_tag">
           <span
             :class="[atTagIndex == 0 ? 's_b_at_tag_active' : '']"
@@ -259,32 +259,147 @@
               </div>
             </div>
           </template>
-          <template v-if="atTagIndex == 1">
+          <template v-if="atTagIndex == 1 && workSum!=0">
+            <div v-if="userList.length == 0">暂无成员...</div>
             <div
               class="s_b_ab_user"
               v-for="(item, index) in userList"
               :key="item.id"
+              v-else
             >
               <div class="s_b_ab_u_name">
                 <el-tooltip
                   class="item"
                   effect="light:"
-                  :content="item.userName"
+                  :content="item.username"
                   placement="top"
                 >
-                  <span>{{ item.userName }}</span>
+                  <span>{{ item.username }}</span>
                 </el-tooltip>
               </div>
               <div class="s_b_ab_u_message">
                 <span>作业提交情况</span>
                 <div>
-                  <span>已提交:{{ item.isSubmit }}</span>
-                  <span>未提交:{{ item.noSubmit }}</span>
+                  <span>已提交:{{ item.count }}</span>
+                  <span>未提交:{{ (workSum-item.count) }}</span>
                 </div>
               </div>
               <div class="s_b_ab_u_btnArea">
-                <span>总结分析</span>
-                <span>作业详细</span>
+                <span @click="sumUpStudent(item)">总结分析</span>
+                <span @click.stop="lookStudentDetail(item)">作业详细</span>
+              </div>
+            </div>
+          </template>
+          <template v-if="atTagIndex == 2">
+            <div class="s_b_at_studentDetail">
+              <img
+                :src="require('../../../assets/icon/course/back.svg')"
+                @click.stop="atTagIndex = 1"
+              />
+              <span>学生:{{ lookStudentData.userName }}</span>
+            </div>
+            <div class="s_b_at_studentList">
+              <div
+                class="s_b_at_sl_item"
+                v-if="[3, 2, 8].includes(item.type)"
+                v-for="(item, index) in lookStudentData.list"
+                @click.stop="sumUpStudent2(item)"
+              >
+                <div class="s_b_at_sl_phase">
+                  {{
+                    `阶段${item.stage + 1}/任务${item.task +
+                      1}/工具${item.tool + 1}`
+                  }}
+                </div>
+                <div class="s_b_at_sl_message" v-if="item.type === 3">
+                  <div>
+                    题目:
+                    <el-tooltip
+                      class="item"
+                      effect="light:"
+                      :content="item.content.answerTitle"
+                      placement="top"
+                      ><span>{{ item.content.answerTitle }}</span></el-tooltip
+                    >
+                  </div>
+                  <div>
+                    答题:
+                    <span>{{ item.content.answer }}</span>
+                  </div>
+                </div>
+
+                <div
+                  class="s_b_at_sl_message"
+                  v-if="item.type === 8"
+                  v-for="(item1, index1) in item.content.testJson
+                    ? item.content.testJson.testJson
+                    : []"
+                  :key="index1"
+                >
+                  <div>
+                    题目:
+                    <el-tooltip
+                      class="item"
+                      effect="light:"
+                      :content="item1.teststitle"
+                      placement="top"
+                      ><span>{{ item1.teststitle }}</span></el-tooltip
+                    >
+                  </div>
+
+                  <div>
+                    选项:
+                    <span>
+                      <div v-for="(item2, index2) in item1.checkList">
+                        {{ index2 + 1 }}、{{ item2.src ? item2.src : item2 }}
+                      </div>
+                    </span>
+                  </div>
+                  <div>
+                    答案:{{ answerData(item1.checkList, item1.answer) }}
+                  </div>
+                  <div>
+                    答题:
+                    <span>{{
+                      answerData(item1.checkList, item.content.anwer[index1])
+                    }}</span>
+                  </div>
+                </div>
+
+                <div
+                  class="s_b_at_sl_message"
+                  v-if="item.type === 2"
+                  v-for="(item1, index1) in item.content.askJson
+                    ? item.content.askJson.askJson
+                    : []"
+                  :key="index1"
+                >
+                  <div>
+                    题目:
+                    <el-tooltip
+                      class="item"
+                      effect="light:"
+                      :content="item1.askstitle"
+                      placement="top"
+                      ><span>{{ item1.askstitle }}</span></el-tooltip
+                    >
+                  </div>
+
+                  <div>
+                    选项:
+                    <span>
+                      <div v-for="(item2, index2) in item1.checkList">
+                        {{ index2 + 1 }}、{{ item2.src ? item2.src : item2 }}
+                      </div>
+                    </span>
+                  </div>
+                  <div>
+                    答题:
+                    <span>{{
+                      answerData(item1.checkList, item.content.anwer[index1])
+                    }}</span>
+                  </div>
+                </div>
               </div>
             </div>
           </template>
@@ -298,6 +413,7 @@
             :disabled="loading || chatLoading"
             v-loading="loading || chatLoading"
             @keyup.enter.native="send()"
+						placeholder="输入@可以分析任务和作业情况"
             class="s_b_i_left"
             v-model="text"
             ref="textRef"
@@ -328,6 +444,10 @@ export default {
     navList: {
       type: Array,
       default: () => []
+    },
+    tcid: {
+      type: String,
+      default: ""
     }
   },
   data() {
@@ -387,31 +507,12 @@ export default {
       },
       lookStudentData: {},
       taskList: [],
-      userList: [
-        {
-          id: 0,
-          userName: "wufantest1",
-          isSubmit: 2,
-          noSubmit: 2
-        },
-        {
-          id: 1,
-          userName: "Chen",
-          isSubmit: 4,
-          noSubmit: 0
-        },
-        {
-          id: 2,
-          userName: "student04",
-          isSubmit: 1,
-          noSubmit: 3
-        }
-      ]
+      userList: []
     };
   },
   computed: {
     openAtBox() {
-			return false;
+      // return false;
       if (this.text.length == 0) return false;
       if (this.text.lastIndexOf("@") == this.text.length - 1) {
         return true;
@@ -425,6 +526,7 @@ export default {
         if (item1.dyName) {
           _result.push({
             name: `阶段${index1 + 1} ${item1.dyName}`,
+						tool:null,
             type: 0
           });
         }
@@ -432,6 +534,7 @@ export default {
           if (item2.taskName) {
             _result.push({
               name: `任务${index2 + 1}:${item2.taskName}`,
+							tool:null,
               type: 1,
               superiors: {
                 name: `阶段${index1 + 1} ${item1.dyName}`,
@@ -443,6 +546,7 @@ export default {
             if (item3.tool != undefined) {
               _result.push({
                 name: `工具${index3 + 1}:${this.toolsList[item3.tool]}`,
+								tool:item3.tool,
                 type: 2,
                 superiors: {
                   name: `任务${index2 + 1}:${item2.taskName}`,
@@ -473,7 +577,33 @@ export default {
       return _md => {
         return md.render(_md);
       };
-    }
+    },
+    answerData() {
+      return (checkList, answer) => {
+        if (typeof answer == "number") {
+          return answer + 1;
+        } else {
+          let _result = ``;
+          answer.forEach((item, index) => {
+            _result += `${item + 1}`;
+            if (index != answer.length - 1) {
+              _result += `、`;
+            }
+          });
+          return _result;
+        }
+      };
+    },
+		workSum(){
+			let sum = 0;
+			this.atTaskList.forEach(i=>{
+				if(i.type!=2)return;
+				if([4,15,45].includes(i.tool)){
+					return sum+=1;
+				}
+			})
+			return sum;
+		}
   },
   watch: {
     navList() {
@@ -482,20 +612,6 @@ export default {
     atTagIndex(newValue) {
       if (newValue != 2) {
         this.lookStudentData = {};
-      } else {
-        this.lookStudentData = {
-          userName: "qgt",
-          list: [
-            {
-              title: "题目题目题目题目题目题目题目题目题目",
-              phase: "阶段一/任务一/工具1"
-            },
-            {
-              title: "题目题目题目题目题目题目题目题目题目",
-              phase: "阶段一/任务一/工具2"
-            }
-          ]
-        };
       }
     }
   },
@@ -894,7 +1010,7 @@ ${_atList
       //   uid: _uuid,
       //   mind_map_question: noAtText
       // };
-			let params = {
+      let params = {
         message: {
           anthropic_version: "bedrock-2023-05-31",
           max_tokens: 4096,
@@ -909,7 +1025,7 @@ ${_atList
 
       this.ajax
         // .post("https://gpt4.cocorobo.cn/chat", params)
-				.post("https://claude3.cocorobo.cn/chat", params)
+        .post("https://claude3.cocorobo.cn/chat", params)
         .then(res => {
           if (res.data.FunctionResponse.result == "发送成功") {
           } else {
@@ -962,7 +1078,9 @@ ${_atList
     },
     // 获取ai对话
     getAiContent(_uid) {
-			this.source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`);
+      this.source = new EventSource(
+        `https://claude3.cocorobo.cn/streamChat/${_uid}`
+      );
       // this.source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
       let _allText = "";
       let _mdText = "";
@@ -1006,7 +1124,9 @@ ${_atList
       };
     },
     getWAntSearchContent(_uid) {
-			this.source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`);
+      this.source = new EventSource(
+        `https://claude3.cocorobo.cn/streamChat/${_uid}`
+      );
       // this.source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
       let _allText = "";
       let _mdText = "";
@@ -1204,7 +1324,7 @@ ${_atList
       //   uid: _uuid,
       //   mind_map_question: ""
       // };
-			let params = {
+      let params = {
         message: {
           anthropic_version: "bedrock-2023-05-31",
           max_tokens: 4096,
@@ -1219,7 +1339,7 @@ ${_atList
 
       this.ajax
         // .post("https://gpt4.cocorobo.cn/chat", params)
-				.post("https://claude3.cocorobo.cn/chat", params)
+        .post("https://claude3.cocorobo.cn/chat", params)
         .then(res => {
           if (res.data.FunctionResponse.result == "发送成功") {
           } else {
@@ -1250,6 +1370,396 @@ ${_atList
           });
         });
       });
+    },
+    getWorkData() {
+			if(this.workSum==0)return;
+      let params = {
+        cid: this.courseId,
+        classid: this.tcid
+      };
+      this.userList = [];
+
+      this.ajax
+        .get(this.$store.state.api + "selectWorkBycidAi", params)
+        .then(res => {
+          let _data = res.data[0];
+          console.log(_data);
+          if (_data.length > 0) {
+            this.userList = _data;
+          }
+        })
+        .catch(e => {
+          // this.$message.error()
+          this.userList = [];
+          console.log(e);
+        });
+    },
+    lookStudentDetail(_data) {
+      this.loading = true;
+      let params = {
+        cid: this.courseId,
+        uid: _data.userid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectWorkBycidAiByUid", params)
+        .then(res => {
+          let _result = res.data[0];
+          this.atTagIndex = 2;
+          this.loading = false;
+          _result.forEach(i => {
+            i.content = JSON.parse(i.content)[0];
+          });
+          this.lookStudentData = {
+            userName: _data.username,
+            list: _result ? _result : []
+          };
+          console.log(this.lookStudentData);
+        });
+    },
+    sumUpStudent(_data) {
+      let params = {
+        cid: this.courseId,
+        uid: _data.userid
+      };
+      this.loading = true;
+      this.ajax
+        .get(this.$store.state.api + "selectWorkBycidAiByUid", params)
+        .then(res => {
+          let _result = res.data[0];
+          console.log(_result);
+          console.log("👆");
+          this.text += `${_data.username} 总结分析`;
+          let _msg = ``;
+          this.chatLoading = true;
+          let _uuid = uuidv4();
+          this.chatList.push({
+            role: "user",
+            content: `${this.text}`,
+            uid: _uuid,
+            AI: "AI",
+            aiContent: "",
+            oldContent: "",
+            isShowSynchronization: false,
+            filename: "",
+            index: this.chatList.length,
+            is_mind_map: false,
+            loading: true
+          });
+          this.text = "";
+          let _wordData = "";
+          _result.forEach(i => {
+            if (i.type == 3) {
+              let content = JSON.parse(i.content)[0];
+              return (_wordData += `问答题:\n题目:${content.answerTitle}\n学生回答:${content.answer}\n\n`);
+            } else if (i.type == 8) {
+              let content = JSON.parse(i.content)[0];
+              _wordData += `选择题:\n`;
+              let _json = content.testJson ? content.testJson.testJson : [];
+              _json.forEach((i2, index2) => {
+                _wordData += `题目:${i2.teststitle}\n选项:\n`;
+                i2.checkList.forEach((item, index) => {
+                  _wordData += `${index + 1}:${item.src ? item.src : item}\n`;
+                });
+                if (typeof i2.answer != "number") {
+                  i2.answer.forEach(a => {
+                    a += 1;
+                  });
+                  content.anwer[index2].forEach(b => {
+                    b += 1;
+                  });
+                  _wordData += `答案:${i2.answer.join("、")}`;
+                  _wordData += `学生选择:${content.anwer[index2].join(
+                    "、"
+                  )}\n\n`;
+                } else {
+                  _wordData += `答案:${i2.answer + 1}`;
+                  _wordData += `学生选择:${content.anwer[index2] + 1}\n\n`;
+                }
+              });
+              return _wordData;
+            } else if (i.type == 2) {
+              let content = JSON.parse(i.content)[0];
+              _wordData += `问卷:${content.askJson.askTitle}\n`;
+              let _json = content.askJson ? content.askJson.askJson : [];
+              _json.forEach((i2, index2) => {
+                _wordData += `题目:${i2.askstitle}\n选项:\n`;
+                i2.checkList.forEach((item, index) => {
+                  _wordData += `${index + 1}:${item.src ? item.src : item}\n`;
+                });
+                if (typeof content.anwer[index2] != "number") {
+                  _wordData += `学生选择:${content.anwer[index2].join(
+                    "、"
+                  )}\n\n`;
+                } else {
+                  _wordData += `学生选择:${content.anwer[index2] + 1}\n\n`;
+                }
+              });
+            }
+          });
+          // console.log(_wordData)
+          // this.loading = false;
+          // return this.chatLoading = false;
+          _msg = `
+NOTICE
+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.
+
+## 目的
+你是教师用户的课堂助手,你需要基于提供给你的课程相关信息以及学生的作业数据,就某些具体作业对全班学生进行总结分析。
+---
+## 定义
+给你提供的课程发生在一个网络教学平台上,各元素存在以下的关系:课程⊇阶段⊇任务⊇工具。
+【课程】:课程通常是一个完整的项目,有一个或多个阶段。
+【阶段】:阶段表示课程的某一单独部分,包含一个或多个任务。
+【任务】:任务是课程的基本单元,包含一个或多个工具,通常写明了学生要具体完成的事项。
+【工具】:工具通常是指学生的作业(在课上要具体做的事情)。比如“提交作业”表示学生需要提交一份文件;又比如“问答”,表示学生需要输入一个回答;再比如“选择题”,表示学生需要根据题目要求选择正确的答案。工具中通常会包含学生的作业数据。
+---    
+## 工作流程与规则
+    1. 了解信息。读取【工具总览表格】以及【工具详情:总体数据】中的内容,了解学生作业详情。
+    2. 确保信息的完整性和可解读性。当面对不确定信息时,你应当积极提问。这一点适用于以下两种情况:
+        2.1 当用户的提问需要你对课程、任务或工具拥有完整的信息、而你又缺乏部分信息时,你应当向客户询问你缺少的信息,再回答用户的提问。
+        2.2 当你不理解某个工具的设置时(比如当你发现题目、选项的表述不完整或者有不符合中文表达规则的符号;又比如你发现缺乏必要的统计信息),你应当积极向用户询问。
+        2.3 **例外情况**:在告知用户并征得同意的情况下,你可以忽视上述问题并执行后续流程。
+    3. 进行总结。
+        3.1 对表格信息进行简单总结。包括任务、阶段、工具及其内容。
+        3.2 进行结果分析。对于每一个工具,都从全班的角度出发进行简单总结。
+        3.3 进行错因分析。仅仅针对于某些错误率较高的题目,从全班的角度出发,进行错因分析。
+    4. 提供扩展题目。针对错误的题目,向用户提供同等水平的题目以起到举一反三的练习效果。
+    5. 回答问题。当用户询问你某个【工具】的具体信息,这部分信息通常将就是学生的作业。你需要简单总结该部分信息,并就用户的问题进行回答。
+---
+## 做题信息
+学生名称:${_data.username}
+${_wordData}
+
+					`;
+
+          console.log(_msg);
+          // this.chatLoading = false;
+          // return;
+          let history = [];
+          this.nowChatList.forEach(i => {
+            if (i.content == "wanSearch") {
+              return;
+            } else if (i.content == "getImage") {
+              return history.push({
+                role: "assistant",
+                content: i.aiContent
+              });
+            }
+            if (i.content) {
+              history.push({
+                role: "user",
+                content: i.content
+              });
+            }
+            if (i.aiContent) {
+              history.push({
+                role: "assistant",
+                content: i.aiContent
+              });
+            }
+          });
+
+          // if (_msg) {
+          history.push({ role: "user", content: _msg });
+          let params = {
+            message: {
+              anthropic_version: "bedrock-2023-05-31",
+              max_tokens: 4096,
+              temperature: 0,
+              top_p: 1,
+              messages: history
+            },
+            uid: _uuid,
+            model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
+          };
+          this.ajax
+            // .post("https://gpt4.cocorobo.cn/chat", params)
+            .post("https://claude3.cocorobo.cn/chat", params)
+            .then(res => {
+              if (res.data.FunctionResponse.result == "发送成功") {
+                this.loading = false;
+              } else {
+                this.$message.warning(res.data.FunctionResponse.result);
+                this.chatLoading = false;
+                this.loading = false;
+              }
+            })
+            .catch(e => {
+              console.log(e);
+              this.chatLoading = false;
+              this.loading = false;
+            });
+          this.saveUid = _uuid;
+          this.getAiContent(_uuid);
+        });
+    },
+    sumUpStudent2(_data) {
+      this.text += `${_data.username} 作业分析`;
+      let _msg = ``;
+      this.chatLoading = true;
+      let _uuid = uuidv4();
+      this.chatList.push({
+        role: "user",
+        content: `${this.text}`,
+        uid: _uuid,
+        AI: "AI",
+        aiContent: "",
+        oldContent: "",
+        isShowSynchronization: false,
+        filename: "",
+        index: this.chatList.length,
+        is_mind_map: false,
+        loading: true
+      });
+      this.text = "";
+      let _wordData = "";
+
+      let content = _data.content;
+      if (_data.type == 3) {
+        _wordData += `问答题:\n题目:${content.answerTitle}\n学生回答:${content.answer}\n\n`;
+      } else if (_data.type == 8) {
+        _wordData += `选择题:\n`;
+        let _json = content.testJson ? content.testJson.testJson : [];
+        _json.forEach((i2, index2) => {
+          _wordData += `题目:${i2.teststitle}\n选项:\n`;
+          i2.checkList.forEach((item, index) => {
+            _wordData += `${index + 1}:${item.src ? item.src : item}\n`;
+          });
+          if (typeof i2.answer != "number") {
+            i2.answer.forEach(a => {
+              a += 1;
+            });
+            content.anwer[index2].forEach(b => {
+              b += 1;
+            });
+            _wordData += `答案:${i2.answer.join("、")}`;
+            _wordData += `学生选择:${content.anwer[index2].join("、")}\n\n`;
+          } else {
+            _wordData += `答案:${i2.answer + 1}`;
+            _wordData += `学生选择:${content.anwer[index2] + 1}\n\n`;
+          }
+        });
+        _wordData;
+      } else if (_data.type == 2) {
+        _wordData += `问卷:${content.askJson.askTitle}\n`;
+        let _json = content.askJson ? content.askJson.askJson : [];
+        _json.forEach((i2, index2) => {
+          _wordData += `题目:${i2.askstitle}\n选项:\n`;
+          i2.checkList.forEach((item, index) => {
+            _wordData += `${index + 1}:${item.src ? item.src : item}\n`;
+          });
+          if (typeof content.anwer[index2] != "number") {
+            _wordData += `学生选择:${content.anwer[index2].join("、")}\n\n`;
+          } else {
+            _wordData += `学生选择:${content.anwer[index2] + 1}\n\n`;
+          }
+        });
+      }
+      // if(_data.type==3){
+      // 	_wordData+=`问答题:\n题目:${content.answerTitle}\n学生回答:${content.answer}\n`
+      // }else if(_data.type==8){
+      // 	_wordData+=`选择题:\n`
+      // 	content.testJson.testJson.forEach((i2,index2)=>{
+      // 		_wordData += `题目:${i2.teststitle}\n选项:\n`
+      // 		i2.checkList.forEach((item,index)=>{
+      // 			_wordData+=`${index+1}:${item}\n`
+      // 		})
+      // 		_wordData +=`答案:${i2.answer}`
+      // 		_wordData +=`学生选择:${(content.anwer[index2])+1}\n`
+      // 	})
+      // }
+      // console.log("👇👇👇")
+      // console.log(_wordData)
+      // this.chatLoading = false;
+      // this.loading = false;
+      // return
+
+      _msg = `
+NOTICE
+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.
+
+## 目的
+你是教师用户的课堂助手,你需要基于提供给你的课程相关信息以及学生的作业数据,就某些具体作业对全班学生进行总结分析。
+---
+## 定义
+给你提供的课程发生在一个网络教学平台上,各元素存在以下的关系:课程⊇阶段⊇任务⊇工具。
+【课程】:课程通常是一个完整的项目,有一个或多个阶段。
+【阶段】:阶段表示课程的某一单独部分,包含一个或多个任务。
+【任务】:任务是课程的基本单元,包含一个或多个工具,通常写明了学生要具体完成的事项。
+【工具】:工具通常是指学生的作业(在课上要具体做的事情)。比如“提交作业”表示学生需要提交一份文件;又比如“问答”,表示学生需要输入一个回答;再比如“选择题”,表示学生需要根据题目要求选择正确的答案。工具中通常会包含学生的作业数据。
+---    
+## 工作流程与规则
+    1. 了解信息。读取【工具总览表格】以及【工具详情:总体数据】中的内容,了解学生作业详情。
+    2. 确保信息的完整性和可解读性。当面对不确定信息时,你应当积极提问。这一点适用于以下两种情况:
+        2.1 当用户的提问需要你对课程、任务或工具拥有完整的信息、而你又缺乏部分信息时,你应当向客户询问你缺少的信息,再回答用户的提问。
+        2.2 当你不理解某个工具的设置时(比如当你发现题目、选项的表述不完整或者有不符合中文表达规则的符号;又比如你发现缺乏必要的统计信息),你应当积极向用户询问。
+        2.3 **例外情况**:在告知用户并征得同意的情况下,你可以忽视上述问题并执行后续流程。
+    3. 进行总结。
+        3.1 对表格信息进行简单总结。包括任务、阶段、工具及其内容。
+        3.2 进行结果分析。对于每一个工具,都从全班的角度出发进行简单总结。
+        3.3 进行错因分析。仅仅针对于某些错误率较高的题目,从全班的角度出发,进行错因分析。
+    4. 提供扩展题目。针对错误的题目,向用户提供同等水平的题目以起到举一反三的练习效果。
+    5. 回答问题。当用户询问你某个【工具】的具体信息,这部分信息通常将就是学生的作业。你需要简单总结该部分信息,并就用户的问题进行回答。
+---
+## 做题信息
+学生名称:${_data.username}
+${_wordData}
+
+					`;
+      console.log(_msg);
+      let history = [];
+      this.nowChatList.forEach(i => {
+        if (i.content == "wanSearch") {
+          return;
+        } else if (i.content == "getImage") {
+          return history.push({
+            role: "assistant",
+            content: i.aiContent
+          });
+        }
+        if (i.content) {
+          history.push({
+            role: "user",
+            content: i.content
+          });
+        }
+        if (i.aiContent) {
+          history.push({
+            role: "assistant",
+            content: i.aiContent
+          });
+        }
+      });
+
+      // if (_msg) {
+      history.push({ role: "user", content: _msg });
+      let params = {
+        message: {
+          anthropic_version: "bedrock-2023-05-31",
+          max_tokens: 4096,
+          temperature: 0,
+          top_p: 1,
+          messages: history
+        },
+        uid: _uuid,
+        model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
+      };
+      this.ajax
+        // .post("https://gpt4.cocorobo.cn/chat", params)
+        .post("https://claude3.cocorobo.cn/chat", params)
+        .then(res => {
+          if (res.data.FunctionResponse.result == "发送成功") {
+          } else {
+            this.$message.warning(res.data.FunctionResponse.result);
+            this.chatLoading = false;
+          }
+        })
+        .catch(e => {
+          console.log(e);
+          this.chatLoading = false;
+        });
+      this.saveUid = _uuid;
+      this.getAiContent(_uuid);
     }
   },
   mounted() {
@@ -1259,6 +1769,7 @@ ${_atList
     });
     this.nowChatList = [];
     this.initTaskList();
+    this.getWorkData();
   }
 };
 </script>
@@ -1685,6 +2196,14 @@ ${_atList
   border-bottom: solid 1px #e2f5fc;
 }
 
+.s_b_at_l_top > span:nth-child(1) {
+  display: block;
+  width: calc(100% - 30px);
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
 .s_b_at_l_i_header {
   width: 100%;
   box-sizing: border-box;
@@ -1698,6 +2217,14 @@ ${_atList
   font-size: 16px;
 }
 
+.s_b_at_l_i_header > span:nth-child(2) {
+  display: block;
+  width: calc(100% - 30px);
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
 .s_b_at_l_top > hover {
   background-color: #3781fc;
   color: #fff;
@@ -1805,7 +2332,7 @@ ${_atList
 }
 
 .s_b_ab_u_message > span {
-  font-size: 18px;
+  font-size: 16px;
   font-weight: bold;
   display: flex;
   align-items: flex-end;
@@ -1817,7 +2344,7 @@ ${_atList
   display: flex;
   justify-content: space-between;
   align-items: center;
-  font-size: 18px;
+  font-size: 16px;
   font-weight: bold;
   flex: 1;
 }
@@ -1845,4 +2372,76 @@ ${_atList
   border: solid 1px #fff;
   background-color: #3681fc;
 }
+
+.s_b_at_studentDetail {
+  width: 100%;
+  height: 25px;
+  margin: 0 0 10px 0;
+  display: flex;
+  align-items: center;
+}
+
+.s_b_at_studentDetail > img {
+  width: 20px;
+  height: 15px;
+  margin-right: 10px;
+  cursor: pointer;
+}
+
+.s_b_at_studentDetail > span {
+  font-weight: bold;
+}
+
+.s_b_at_studentList {
+  width: 100%;
+  height: calc(100% - 25px);
+  overflow: auto;
+}
+
+.s_b_at_sl_item {
+  width: 100%;
+  height: auto;
+  box-sizing: border-box;
+  border: solid 1px #36a9fc;
+  padding: 10px;
+  margin-bottom: 10px;
+  cursor: pointer;
+}
+
+.s_b_at_sl_item > .s_b_at_sl_message:nth-child(n + 1) {
+  margin-top: 10px;
+}
+
+.s_b_at_sl_phase {
+  width: 100%;
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 10px;
+  margin-right: 10px;
+  font-size: 14px;
+  font-weight: bold;
+}
+
+.s_b_at_sl_message {
+  font-weight: bold;
+  margin: 10px;
+}
+
+.s_b_at_sl_message > div {
+  display: flex;
+  width: 100%;
+  margin: 10px;
+}
+
+.s_b_at_sl_message > div > span {
+  width: calc(100% - 50px);
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  display: block;
+}
+.s_b_at_sl_message > div > span > div {
+  margin: 5px 0;
+  white-space: wrap;
+}
 </style>

+ 1 - 0
src/components/classRoomHelper/component/taskArea.vue

@@ -122,6 +122,7 @@
             :disabled="loading || chatLoading"
             v-loading="loading || chatLoading"
             @keyup.enter.native="send()"
+						placeholder="请在此输入您想了解的内容"
             class="t_b_i_left"
             v-model="text"
           ></el-input>

+ 21 - 12
src/components/classRoomHelper/index.vue

@@ -4,6 +4,8 @@
       <searchArea
         :courseDetail="courseDetail"
         ref="searchAreaRef"
+				:navList="navList"
+				:tcid="tcid"
         v-if="itemType == 1"
       />
       <taskArea
@@ -34,7 +36,7 @@
           </el-tooltip>
         </div>
 
-        <div @click="$emit('review')">
+        <div @click="$emit('review')" v-if="tType==1">
           <el-tooltip class="item" effect="dark" content="评论" placement="top">
             <img
               :src="require('../../assets/icon/course/comment.png')"
@@ -43,8 +45,7 @@
             />
           </el-tooltip>
         </div>
-
-        <div @click="$emit('authority')" v-if="tType==1">
+        <div @click="$emit('authority')" v-if="(tType==1 || tType == 4)"><!-- -->
           <el-tooltip class="item" effect="dark" content="权限" placement="top">
             <img
               :src="require('../../assets/icon/course/setting.png')"
@@ -166,7 +167,15 @@ export default {
 		tType:{
 			type:Number,
 			default:0,
-		}
+		},
+		navList:{
+			type:Array,
+			default:()=>[]
+		},
+		tcid:{
+			type:String,
+			default:""
+		},
   },
   data() {
     return {
@@ -193,14 +202,14 @@ export default {
       this.type = 0;
       this.openSetting();
       this.$nextTick(() => {
-        if (this.itemType == 1 && type != 1) {
-          this.$refs.searchAreaRef.scrollBottom();
-          this.$refs.searchAreaRef.getWantSearch();
-        } else if (this.itemType == 2) {
-          this.$refs.taskAreaRef.scrollBottom();
-        } else if (this.itemType == 3) {
-          this.$refs.dialogAreaRef.scrollBottom();
-        }
+        // if (this.itemType == 1 && type != 1) {
+        //   this.$refs.searchAreaRef.scrollBottom();
+        //   this.$refs.searchAreaRef.getWantSearch();
+        // } else if (this.itemType == 2) {
+        //   this.$refs.taskAreaRef.scrollBottom();
+        // } else if (this.itemType == 3) {
+        //   this.$refs.dialogAreaRef.scrollBottom();
+        // }
         this.itemType = type;
       });
     }

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

@@ -310,7 +310,7 @@
                   />
                 </div>
               </div>
-              <!-- <div
+              <div
                 class="last"
                 @click="juriVisible = true"
                 v-if="tType == 1"
@@ -328,7 +328,7 @@
                   />
                 </div>
                 <div class="lastText">权限</div>
-              </div> -->
+              </div>
               <div
                 class="returnBtn1 returnIcon"
                 @click.stop="
@@ -8041,7 +8041,7 @@
       </div>
     </div>
 		<!-- v-show="org == '1973f6c7-1561-11ee-91d8-005056b86db5' || org == '777559d2-7239-11ee-b98c-005056b86db5' || org == '884c5665-a453-46f3-b7b6-01d575290aa9'" -->
-		<classRoomHelper v-show="orgArray.includes(org) || oidArray.includes(oid)" ref="classRoomHelperRef" :courseDetail="courseDetail" :tType="2" @setWidth="setClassRoomHelperWidth" @refresh="refreshCourse" @goStep="nextOrpreSteps" @authority="juriVisible = true" @review="setPz" @backPage="goTo(
+		<classRoomHelper :tcid="tcid" :navList="navList" v-show="orgArray.includes(org) || oidArray.includes(oid)" ref="classRoomHelperRef" :courseDetail="courseDetail" :tType="tType" @setWidth="setClassRoomHelperWidth" @refresh="refreshCourse" @goStep="nextOrpreSteps" @authority="juriVisible = true" @review="setPz" @backPage="goTo(
                     '/courseDetail?userid=' +
                       userid +
                       '&oid=' +

+ 54 - 4
src/components/easy3/studyStudent.vue

@@ -224,7 +224,7 @@
           </div>
         </div>
       </div>
-      <div class="body_student":style="{width: mlDialog ? 'calc(100% - '+classRoomHelperWidth+' - 20% - 40px)' : 'calc(100% - '+classRoomHelperWidth+' - 10px)', left: mlDialog ? 'calc(20% + 35px)' : '10px' }">
+      <div class="body_student" :style="{width: mlDialog ? 'calc(100% - '+classRoomHelperWidth+' - 20% - 40px)' : 'calc(100% - '+classRoomHelperWidth+' - 10px)', left: mlDialog ? 'calc(20% + 35px)' : '10px' }">
         <div class="new_topFixed" :style="{width: mlDialog ? 'calc(100% - '+classRoomHelperWidth+' - 20% - 40px)' : 'calc(100% - '+classRoomHelperWidth+' - 10px)', left: mlDialog ? 'calc(20% + 35px)' : '10px' }"></div>
         <div class="new_top" :style="{width: mlDialog ? 'calc(100% - '+classRoomHelperWidth+' - 20% - 40px)' : 'calc(100% - '+classRoomHelperWidth+' - 10px)', left: mlDialog ? 'calc(20% + 35px)' : '10px' }">
           <div class="courseIndex">
@@ -311,7 +311,7 @@
                   />
                 </div>
               </div>
-              <!-- <div
+              <div
                 class="last"
                 @click="juriVisible = true"
                 v-if="tType == 1"
@@ -329,7 +329,7 @@
                   />
                 </div>
                 <div class="lastText">权限</div>
-              </div> -->
+              </div>
               <div
                 class="returnBtn1 returnIcon"
                 @click.stop="
@@ -423,6 +423,8 @@
             </div> -->
           </div>
         </div>
+        <!-- !chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
+              .taskDetail3 && -->
         <div
           class="isNoMessage"
           v-if="
@@ -444,6 +446,8 @@
           <img src="../../assets/icon/isNoMessage.png" alt />
         </div>
         <div class="study_top" :class="{ pzClass: pzDialog }">
+          <!-- chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
+                .taskDetail3 || -->
           <div
             class="vedioBox"
             v-if="
@@ -454,6 +458,44 @@
             "
             style="border-radius: 0 0 20px 20px"
           >
+          <!-- <div
+              class="taskBox"
+              v-if="
+                chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
+                  .taskDetail3
+              "
+            >
+              <div
+                style="
+                  display: flex;
+                  flex-wrap: nowrap;
+                  flex-direction: column;
+                  position: relative;
+                "
+              >
+                <div
+                  style="
+                    padding: 15px 0;
+                    line-height: 29px;
+                    font-size: 18px;
+                    color: #0e1e33;
+                  "
+                  class="cont"
+                  v-if="
+                    chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
+                      .taskDetail3 != ''
+                  "
+                  v-html="
+                    chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
+                      .taskDetail3
+                      ? MarkdownT(chapInfoList[courseType].chapterInfo[0].taskJson[
+                          taskCount
+                        ].taskDetail3)
+                      : '暂无描述'
+                  "
+                ></div>
+              </div>
+            </div> -->
             <div
               class="taskBox"
               v-if="
@@ -8029,7 +8071,7 @@
       </div>
     </div>
 				<!-- v-show="org == '1973f6c7-1561-11ee-91d8-005056b86db5' || org == '777559d2-7239-11ee-b98c-005056b86db5' || org == '884c5665-a453-46f3-b7b6-01d575290aa9'" -->
-		<classRoomHelper v-show="orgArray.includes(org) || oidArray.includes(oid)" ref="classRoomHelperRef" :courseDetail="courseDetail" :tType="3" @setWidth="setClassRoomHelperWidth" @refresh="refreshCourse" @goStep="nextOrpreSteps" @authority="juriVisible = true" @review="setPz" @backPage="goTo(
+		<classRoomHelper :tcid="tcid" :navList="navList" v-show="orgArray.includes(org) || oidArray.includes(oid)" ref="classRoomHelperRef" :courseDetail="courseDetail" :tType="tType" @setWidth="setClassRoomHelperWidth" @refresh="refreshCourse" @goStep="nextOrpreSteps" @authority="juriVisible = true" @review="setPz" @backPage="goTo(
                     '/courseDetail?userid=' +
                       userid +
                       '&oid=' +
@@ -11896,6 +11938,7 @@ import correctText from '../components/correctText.vue'
 import scoreItem from '../scoreList/scoreItem.vue'
 import scoreZong from '../scoreZong/index.vue'
 import classRoomHelper from '../classRoomHelper/index.vue'
+import MarkdownIt from "markdown-it";
 
 const getFile = (url) => {
   return new Promise((resolve, reject) => {
@@ -19913,6 +19956,13 @@ export default {
               .replaceAll(/\s/g, " &nbsp")
           : "";
       };
+    },
+    MarkdownT() {
+      return function (c) {
+        let md = new MarkdownIt();
+        return c
+          ? md.render(c) : "";
+      };
     },
 		commentRight(){
 			if(!this.orgArray.includes(this.org) && !this.oidArray.includes(this.oid)){

+ 1 - 1
src/components/studyStudent.vue

@@ -8038,7 +8038,7 @@
         </el-dialog>
       </div>
 			<!-- v-show="org == '1973f6c7-1561-11ee-91d8-005056b86db5' || org == '777559d2-7239-11ee-b98c-005056b86db5' || org == '884c5665-a453-46f3-b7b6-01d575290aa9'" -->
-      <classRoomHelper v-show="orgArray.includes(org) || oidArray.includes(oid)"  ref="classRoomHelperRef" :courseDetail="courseDetail" :tType='1' @setWidth="setClassRoomHelperWidth" @refresh="refreshCourse" @goStep="nextOrpreSteps" @authority="juriVisible = true" @review="setPz" @backPage="goTo(
+      <classRoomHelper :tcid="tcid" :navList="navList" v-show="orgArray.includes(org) || oidArray.includes(oid)"  ref="classRoomHelperRef" :courseDetail="courseDetail" :tType="tType" @setWidth="setClassRoomHelperWidth" @refresh="refreshCourse" @goStep="nextOrpreSteps" @authority="juriVisible = true" @review="setPz" @backPage="goTo(
                     '/courseDetail?userid=' +
                       userid +
                       '&oid=' +

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است