Prechádzať zdrojové kódy

Merge branch 'beta'

lsc 4 mesiacov pred
rodič
commit
8e763e1712

+ 1 - 1
dist/index.html

@@ -27,7 +27,7 @@
     html,
     body{
       font-family: '黑体';
-    }</style><link href=./static/css/app.f9e19d1e37e573253b5230c7d5721dec.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.acbd8cb5870df69e0141.js></script><script type=text/javascript src=./static/js/app.eb050e9360d1be05745f.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.868d2882869ea487473eb3d35a3f5458.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.acbd8cb5870df69e0141.js></script><script type=text/javascript src=./static/js/app.ca85a1e3c492365bbf88.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.868d2882869ea487473eb3d35a3f5458.css


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


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


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


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


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


+ 1 - 0
src/assets/icon/newIcons/FullS.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743399786203" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4536" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M358.4 768H426.666667v85.333333H213.333333v-213.333333h85.333334v68.266667l128-128 59.733333 59.733333-128 128z m345.6 0l-128-128 59.733333-59.733333 132.266667 132.266666V640h85.333333v213.333333h-213.333333v-85.333333h64zM358.4 298.666667l128 128-59.733333 59.733333-128-128V426.666667H213.333333V213.333333h213.333334v85.333334H358.4z m345.6 0H640V213.333333h213.333333v213.333334h-85.333333V354.133333l-132.266667 132.266667-59.733333-59.733333 128-128z" fill="#ffffff" p-id="4537" data-spm-anchor-id="a313x.search_index.0.i0.55e73a81IZ3nPT" class="selected"></path></svg>

+ 69 - 55
src/components/classRoomHelper/component/levitatedSphere.vue

@@ -51,6 +51,7 @@
       src="https://beta.cloud.cocorobo.cn/browser/public/index1.html"
       ref="iiframe2"
       v-show="false"
+      v-if="show"
     ></iframe>
 
 		<mini-audio
@@ -97,7 +98,7 @@ export default {
   },
   methods: {
 		stopTwo(){
-			this.show = false;
+      this.show = false;
       this.showTextIndex = 3;
       this.aiStatus = 2;
       this.aiText = "";
@@ -156,7 +157,7 @@ export default {
         console.log("👇");
         console.log(_msg);
         // _msg = converter(_msg)
-        if (!_msg) return console.log("输出为空");
+        if (!_msg || _msg == '.') return console.log("输出为空");
         // if (_msg.indexOf(converter("可可同学")) != -1 && !this.show) {
         //   this.aiText = "您好,我是小可,有什么可以帮助您的?";
         //   this.aiStatus = 0;
@@ -234,19 +235,22 @@ export default {
 								let msgList = [];
 
 								msgList.push({
-									type:"text",
-									text: `请在150字以内回答以下问题:\n${this.userText}`
+									role:"user",
+									content: `请在150字以内回答以下问题:\n${this.userText}`
 								})
                 this.chatLoading = true;
                 const _uuid = uuidv4();
                 let params = {
-                  assistant_id: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
-                  userId: this.userId,
-                  message: msgList,
-                  session_name: _uuid + "-qgt",
-                  uid: _uuid,
-                  file_ids: [],
-									model: "gpt-4o-2024-11-20"
+                  model: "gpt-4o-2024-11-20",
+                  temperature: 0,
+                  max_tokens: 4096,
+                  top_p: 1,
+                  frequency_penalty: 0,
+                  presence_penalty: 0,
+                  messages: msgList,
+                  uid: this.userId,
+                  mind_map_question: "",
+                  stream:true
                 };
 
                   const md = new MarkdownIt();
@@ -267,31 +271,33 @@ export default {
                     onmessage(_e){
                       console.log('_e',_e)
 
-                      this.showIndex = 0;
-                      let _eData = JSON.parse(_e.data);
-                      if (_eData.content.replace("'", "").replace("'", "") == "[DONE]") {
+                      _this.showIndex = 0;
+                      if(!_e.data)return
+                      let _eData = _e.data;
+                      if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
                         // this.source.close();
                         // this.source = null;
-                        let _result = [];
-                        if ("result" in _eData) {
-                          _result = _eData.result;
-                          for (let i = 0; i < _result.length; i++) {
-                            _mdText = _mdText.replace(_result[i].text, _result[i].fileName);
-                          }
-                        }
+                        // let _result = [];
+                        // if ("result" in _eData) {
+                        //   _result = _eData.result;
+                        //   for (let i = 0; i < _result.length; i++) {
+                        //     _mdText = _mdText.replace(_result[i].text, _result[i].fileName);
+                        //   }
+                        // }
                         _mdText = _mdText.replace("_", "");
-                        this.aiText = _mdText;
-                        this.scrollBottom();
+                        _this.aiText = _mdText;
+                        // _this.scrollBottom();
                         if (_talkText != "") {
-                          let _resultText = this.removeMarkdown(_talkText);
-                          this.talkTextList.push(_resultText);
+                          let _resultText = _this.removeMarkdown(_talkText);
+                          _this.talkTextList.push(_resultText);
                           _talkText = "";
-                          if (!this.talkLoading) this.talkText();
+                          if (!_this.talkLoading) _this.talkText();
                         }
-                        this.chatLoading = false;
+                        _this.chatLoading = false;
+                        _this.userText = '';
                       } else {
                         // _talkIndex+=1;
-                        let _text = _eData.content.replace("'", "").replace("'", "");
+                        let _text = _eData.replace("'", "").replace("'", "");
                         if (_allText == "") {
                           _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
                           _talkText += _text.replace(/^\n+/, "");
@@ -304,14 +310,14 @@ export default {
                         _mdText = _mdText.replace(/\\n/g, "\n");
                         _mdText = _mdText.replace(/\\/g, "");
                         if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
-                        this.aiText = _mdText;
-                        this.showTextIndex = 0;
-                        this.scrollBottom();
+                        _this.aiText = _mdText;
+                        _this.showTextIndex = 0;
+                        // _this.scrollBottom();
                         if (/[,。:;?!)]/.test(_talkText)) {
-                          let _resultText = this.removeMarkdown(_talkText);
-                          this.talkTextList.push(_resultText);
+                          let _resultText = _this.removeMarkdown(_talkText);
+                          _this.talkTextList.push(_resultText);
                           _talkText = "";
-                          if (!this.talkLoading) this.talkText();
+                          if (!_this.talkLoading) _this.talkText();
                         }
                       }
 
@@ -326,6 +332,8 @@ export default {
                     },
                     onclose(){
                       _this.$forceUpdate();
+                      _this.userText = '';
+
                       // _this.stopTalkToken = null;
                       // // _this.faloading = false;
                       _this.curRequestController = null;
@@ -403,28 +411,34 @@ export default {
       // this.$parent.changeRecordType(0);
       // this.$message.success("已关闭语音助手")
       // return
-      let iiframe = this.$refs["iiframe"];
-      iiframe.contentWindow.window.document
-        .getElementById("scenarioStopButton")
-        .click();
-      if (this.talkLoading) {
-        this.stopTalk();
-      }
-      // this.stopTalk();
-      // 录音借宿
-      iiframe.contentWindow.onSessionStopped = (s, e) => {
-        this.isOpen = false;
-        this.show = false;
-        this.showTextIndex = 3;
-        this.showIndex = 2;
+      try {
+        let iiframe = this.$refs["iiframe"];
+        iiframe.contentWindow.window.document
+          .getElementById("scenarioStopButton")
+          .click();
+          if (this.talkLoading) {
+            this.$refs.iiframe2.contentWindow.closesynthesizer();
+          }
+        // this.stopTalk();
+        // 录音借宿
+        iiframe.contentWindow.onSessionStopped = (s, e) => {
+          this.isOpen = false;
+          this.show = false;
+          this.showTextIndex = 3;
+          this.showIndex = 2;
+          this.$parent.changeRecordType(0);
+          this.$message.success("已关闭语音助手");
+          if (this.talkLoading) {
+            this.stopTalk();
+          }
+          this.userText = "";
+          this.aiText = "";
+        };
+       
+      } catch (error) {
         this.$parent.changeRecordType(0);
-        this.$message.success("已关闭语音助手");
-        if (this.talkLoading) {
-          this.$refs.iiframe2.contentWindow.closesynthesizer();
-        }
-        this.userText = "";
-        this.aiText = "";
-      };
+      }
+
     },
     chineseToNumber(chinese) {
       var OpenCC = require("opencc-js");

+ 7 - 0
src/components/classRoomHelper/index.vue

@@ -557,6 +557,7 @@ export default {
   },
   data() {
     return {
+      isBtn:false,
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
       courseId: this.$route.query.courseId,
@@ -899,6 +900,12 @@ ${_textData}
       });
     },
     startAssistant() {
+      if(this.isBtn) return this.$message.info("点击过快,请稍等...");
+      this.isBtn = true
+      setTimeout(() => {
+          this.isBtn = false
+      }, 1000);
+      
       if (this.recordLoading) return this.$message.info("请稍等...");
       this.recordLoading = true;
       if (this.recordType == 0) {

+ 14 - 10
src/components/components/appStoreC.vue

@@ -9,16 +9,20 @@
             :show-close="false"
             class="dialog_diyCopy "
             >
-            <iframe
-                allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
-                allowfullscreen
-                frameborder
-                border= "0"
-                scrolling = "no"
-                :src="urlData"
-                ref="appStore"
-                style="width: 100%;height: 90%;"
-            ></iframe>
+            <div style="width: 100%;height: 90%;overflow: auto;">
+                <iframe
+                    allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
+                    allowfullscreen
+                    frameborder
+                    border= "0"
+                    scrolling = "no"
+                    :src="urlData"
+                    ref="appStore"
+                    style="width: 100%;height: 99%;"
+                ></iframe>
+            </div>
+            
+            
             <div style="display: flex;justify-content: flex-end;padding: 0 30px;box-sizing: border-box;">
                 <el-button type="primary" style="margin-right: 20px;" size="medium" @click="handleClose">关闭</el-button>
                 <el-button type="primary" @click="uploadWork" size="medium">提交作业</el-button>

+ 3 - 5
src/components/components/choseWorksDetailDialog.vue

@@ -30,7 +30,7 @@
             <div class="s_b_m_b_item" v-if="showType === 0 && dialogTypeList[0].showType.includes(toolType)">
               <div class="s_b_m_b_i_main" ref="imgWork">
                 <div class="s_b_m_b_i_m_title" v-if="testData">
-                  <div style="display: flex;justify-content: space-between;align-items: center;">
+                  <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 5px;">
                     <div class="titTop">
                       <img style="border-radius: 5px;" :src="toolList.find(item=>item.value===toolType).img" alt/>
                       <span>{{ toolList.find(item=>item.value===toolType).label }}</span>
@@ -3107,7 +3107,7 @@ export default {
 .s_b_m_b_i_main {
   width: 90%;
   margin: 0 auto;
-  min-width: 1000px;
+  min-width: 600px;
   padding: 10px 0 30px 0;
   height: calc(100% - 40px);
   display: flex;
@@ -3601,7 +3601,6 @@ export default {
 .s_b_m_b_i_m_selectiveMatching{
 	width: 100%;
 	height: auto;
-	padding-left: 15px;
 	display: flex;
 }
 
@@ -3654,7 +3653,6 @@ export default {
 	width: 100%;
 	height: auto;
 	box-sizing: border-box;
-	padding-left: 15px;
 }
 
 .sortingItem{
@@ -3759,7 +3757,7 @@ export default {
 
 .s_b_m_b_i_m_evaluation{
 	box-sizing: border-box;
-	padding-left: 15px;
+	/* padding-left: 15px; */
   width: 100%;
   height: 100%;
 }

+ 32 - 62
src/components/components/cocoFlowDia.vue

@@ -1,17 +1,24 @@
 <template>
     <div>
         <el-dialog
-            title="查看作业"
             :visible.sync="FlowVisible"
-            width="1200px"
+            width="90%"
             class="dialog_diy"
             :close-on-click-modal="false"
+            :fullscreen="markfullscreen"
             :before-close="handleClose">
+            <div slot="title">
+                <div class="markScore_diyTit">
+                <div>查看作业</div>
+                <img  @click="markFullScreenBtn" style="cursor: pointer;height: 20px;" src="../../assets/icon/newIcons/FullS.svg" alt="" />
+                </div>
+            </div>
+           
             <div  style="margin-bottom: 20px;" v-for="(item,index) in listData" :key="index">
                 <div style="margin-bottom: 15px;font-size: 20px;font-weight: 600;color: #000;">第{{ index + 1}}阶段</div>
                 <div v-for="po in item.messages" :key="item">
                     <div class="left" v-if="po.role == 'assistant'">
-                            <div class="TName">小可ai助手</div>:
+                            <div class="TName">小可AI助手</div>:
                             <div class="con" v-html="MarkdownT(po.content)"></div>
                     </div>
 
@@ -34,60 +41,8 @@ import MarkdownIt from "markdown-it";
             return {
                 username:'',
                 FlowVisible:false,
-                listData:[
-                    // {
-                    //     id: "c8fd3e4c-d39a-4aa9-a9b9-6d0b9b7139c5",
-                    //     messages: [
-                    //         {
-                    //             role: "assistant",
-                    //             type: "md",
-                    //             sender: "AI助手",
-                    //             content: "Hi~",
-                    //             createdAt: "2025-03-25T11:40:05.359Z"
-                    //         }
-                    //     ]
-                    // },
-                    // {
-                    //     id: "8e724dbe-04e6-48f5-b8b8-de4cfd3a1608",
-                    //     messages: [
-                    //         {
-                    //             role: "assistant",
-                    //             type: "md",
-                    //             sender: "课程描述",
-                    //             content: "**主题**:cs\n\n**授课年级**:cscc\n\n**关联学科**:scsc\n\n**驱动性问题**:  \n   - 如何利用科学与技术的知识设计一个解决实际问题的创新方案?  \n\n**课程概况**:  \n   - 本课程以\"cs\"为主题,结合科学与技术的知识,鼓励学生通过跨学科的视角解决实际问题。  \n   - 学生将学习如何运用科学原理、技术工具和工程方法,设计和开发创新的解决方案。课程将围绕驱动性问题展开,培养学生的批判性思维和问题解决能力。  \n\n**课程目标**:  \n   - 理解科学与技术在解决实际问题中的重要性。  \n   - 掌握科学研究方法和技术工具的基本使用。  \n   - 培养团队合作和创新能力,通过跨学科的方式解决复杂问题。  \n\n**预期成果**:  \n   - 学生将完成一个创新设计方案,可能包括模型、报告或演示文稿,展示他们如何结合科学与技术的知识解决实际问题。  \n\n<Q>\n\n---\n\n对我生成的内容满意吗?如果满意,可以点击【采纳】将内容置于工作区进行编辑,然后点击“下一步”按钮;也可以说出你的修改建议,我会按照你的想法重新生成。\n\n</Q>",
-                    //             createdAt: "2025-03-26T07:21:59.304Z",
-                    //             isLoading: false
-                    //         }
-                    //     ]
-                    // },
-                    // {
-                    //     id: "3e903e41-dd01-46ad-ac6a-9f4bbd5d48a6",
-                    //     messages: [
-                    //         {
-                    //             role: "assistant",
-                    //             type: "md",
-                    //             sender: "AI助手",
-                    //             content: "Hi~",
-                    //             createdAt: "2025-03-26T07:22:00.557Z"
-                    //         },
-                    //         {
-                    //             role: "user",
-                    //             type: "md",
-                    //             sender: "袁",
-                    //             content: "ccscs",
-                    //             createdAt: "2025-03-26T07:24:36.153Z"
-                    //         },
-                    //         {
-                    //             role: "assistant",
-                    //             type: "md",
-                    //             sender: "AI助手",
-                    //             content: "It seems that there are no direct matches for \"ccscs\" in the document you provided. Could you please provide more context or details about what you are looking for? This will help me assist you better.",
-                    //             createdAt: "2025-03-26T07:24:36.153Z",
-                    //             isLoading: false
-                    //         }
-                    //     ]
-                    // }
-                ]
+                listData:[],
+                markfullscreen:false
             }
         },
         computed: {
@@ -100,6 +55,10 @@ import MarkdownIt from "markdown-it";
             }
         },
         methods: {
+            // 评分弹框全屏
+            markFullScreenBtn() {
+                this.markfullscreen = !this.markfullscreen;
+            },
             openAppWork(val){
                 console.log(val);
                 this.username = val.sName
@@ -116,7 +75,7 @@ import MarkdownIt from "markdown-it";
 
 <style scoped>
     .TName{
-        font-size: 14px;
+        /* font-size: 14px; */
         color: #4472C4;
         margin-bottom: 5px;
         font-weight: 600;
@@ -128,17 +87,21 @@ import MarkdownIt from "markdown-it";
     }
     .con{
         margin-left: 10px;
-        font-size: 14px;
+        /* font-size: 14px; */
         color: #000;
     }
     .left{
         display: flex;
+        font-size: 16px !important;
         justify-content: flex-start;
         margin-bottom: 10px;
         line-height: 25px;
         flex: 1;
         border-bottom: 1px  #e7e7e7 solid;
     }
+    .dialog_diy {
+        min-width: 800px;
+    }
 
     .dialog_diy >>> .el-dialog__header {
     background: #454545 !important;
@@ -166,8 +129,15 @@ import MarkdownIt from "markdown-it";
     .dialog_diy >>> .el-dialog__body,
     .dialog_diy >>> .el-dialog__footer{
     background: #fafafa;
-    max-height: 850px;
-    overflow: auto;
+    /* max-height: 850px; */
+    /* overflow: auto; */
+    }
+    .markScore_diyTit {
+        color: #fff;
+        width: calc(100% - 50px);
+        display: flex;
+        height: 24px;
+        justify-content: space-between;
+        align-items: center;
     }
-    
 </style>

+ 5 - 4
src/components/components/studentWorkPreviewDialog.vue

@@ -270,7 +270,7 @@
                 <div style="margin-bottom: 15px;font-size: 20px;font-weight: 600;color: #000;">第{{ index + 1}}阶段</div>
                 <div v-for="po in item.messages" :key="item">
                     <div class="left" v-if="po.role == 'assistant'">
-                            <div class="TName">小可ai助手</div>:
+                            <div class="TName">小可AI助手</div>:
                             <div class="con"  v-html="MarkdownT(po.content)"></div>
                     </div>
 
@@ -515,7 +515,7 @@ export default {
   width: 70%;
   height: auto;
   margin: 0 auto;
-  min-width: 1000px;
+  min-width: 600px;
   padding: 10px 0 30px 0px;
 }
 
@@ -800,7 +800,7 @@ export default {
   font-size: 18px;
 }
 .TName{
-        font-size: 14px;
+        /* font-size: 14px; */
         color: #4472C4;
         margin-bottom: 5px;
         font-weight: 600;
@@ -812,11 +812,12 @@ export default {
     }
     .con{
         margin-left: 10px;
-        font-size: 14px;
+        /* font-size: 14px; */
         color: #000;
     }
     .left{
         display: flex;
+        font-size: 16px !important;
         justify-content: flex-start;
         margin-bottom: 10px;
         line-height: 25px;

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