Bläddra i källkod

评论数据修改

SanHQin 5 månader sedan
förälder
incheckning
ae5d3c3c4e

+ 137 - 2
src/components/classRoomHelper/component/reviewArea.vue

@@ -162,6 +162,43 @@
           确定
         </div>
       </div>
+    </div>
+		<div
+      v-if="replyDialogVisible == true"
+      class="addDialogCss"
+      v-el-drag-dialog
+    >
+      <div class="pzTop">
+        <div class="teacherPz">
+          <div class="teacherPzImg">
+            <img src="../../../assets/icon/teacherPz.png" alt="" />
+          </div>
+          <div style="margin-left: 10px; height: 25px">添加回复</div>
+        </div>
+        <div @click="replyDialogVisible = false">
+          <img src="../../../assets/close1.png" class="pzClose" alt="" />
+        </div>
+      </div>
+      <div class="addPzBox">
+        <!-- <div class="addPzCheck">
+          <span :class="{ isChooseActive: pzType == 1 }" @click="pzType = 1"
+            >文本</span
+          >
+          <span :class="{ isChooseActive: pzType == 2 }" @click="pzType = 2"
+            >音频</span
+          >
+        </div> -->
+        <div style="height: calc(100% - 50px)">
+          <editor-bar
+            class="binfo_input pzConText"
+            style="width: 100% !important; margin: 0 auto"
+            placeholder="请输入回复描述"
+            v-model="reply"
+            @change="change"
+          ></editor-bar>
+        </div>
+        <div class="addTextCss" @click="addHf">确定</div>
+      </div>
     </div>
   </div>
 </template>
@@ -209,13 +246,83 @@ export default {
 			addPzDialog:false,
 			pzType:0,
 			pzConText:"",
+			reply:"",
 			scoreList:{
 				datalist:[],
 				isScoreList:[]
 			},
+			replyIndex: 0,
+      replyPid: "",
+			replyDialogVisible: false,
     };
   },
   methods: {
+		deleteReply(id) {
+      this.$confirm("确定删除此回复吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [
+            {
+              id: id,
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "deleteReply", params)
+            .then((res) => {
+              this.$message({
+                message: "删除成功",
+                type: "success",
+              });
+              this.selectPz();
+            })
+            .catch((err) => {
+              this.$message.error("网络异常");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
+		addHf() {
+      if (this.reply == "") {
+        this.$message.error("回复不能为空!");
+        return;
+      }
+      let params = [
+        {
+          cid: this.id,
+          uid: this.userid,
+          s: this.courseType,
+          t: this.taskCount,
+          type: "1",
+          ct: 2,
+          pid: this.replyPid,
+          c: this.reply,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "addHf", params)
+        .then((res) => {
+          this.reply = "";
+          this.$message({
+            message: "回复成功",
+            type: "success",
+          });
+          this.replyDialogVisible = false;
+          this.selectPz();
+        })
+        .catch((err) => {
+          this.$message.error("回复失败");
+          console.error(err);
+        });
+    },
+		setReplyIndex(id, i) {
+      this.replyIndex = i;
+      this.replyPid = id;
+      this.replyDialogVisible = true;
+    },
 		insertMemorandum(_html) {
       //保存行为操作
       //variable
@@ -323,7 +430,35 @@ export default {
     },
 		change(val){
 			console.log(val);
-		}
+		},
+		deletePz(id) {
+      this.$confirm("确定删除此评论吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [
+            {
+              id: id,
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "deletePz", params)
+            .then((res) => {
+              this.$message({
+                message: "删除成功",
+                type: "success",
+              });
+              this.selectPz();
+            })
+            .catch((err) => {
+              this.$message.error("网络异常");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
   },
 	mounted() {
 		this.selectPz();
@@ -520,7 +655,7 @@ export default {
   border-radius: 15px;
   z-index: 999;
   left: 50%;
-  top: 50%;
+  top: 30%;
   margin: -18% 0 0 -300px;
 }
 

+ 315 - 209
src/components/classRoomHelper/index.vue

@@ -10,9 +10,9 @@
         :fileId="fileId"
         :recordType="recordType"
         v-if="itemType == 1"
-				:canShowTips="canShowTips"
-				:showTipsLoading="showTipsLoading"
-				:tipsList="tipsList"
+        :canShowTips="canShowTips"
+        :showTipsLoading="showTipsLoading"
+        :tipsList="tipsList"
       />
       <taskArea
         :courseDetail="courseDetail"
@@ -34,7 +34,12 @@
 
       <languageAssistant ref="languageAssistantRef" v-if="itemType == 4" />
 
-			<reviewArea ref="reviewAreaRef" v-if="itemType==5" :courseType="courseType" :taskCount="taskCount"/>
+      <reviewArea
+        ref="reviewAreaRef"
+        v-if="itemType == 5"
+        :courseType="courseType"
+        :taskCount="taskCount"
+      />
       <!-- <dialogArea
         :courseDetail="courseDetail"
 				:openMegaphone="openMegaphone"
@@ -44,6 +49,32 @@
       /> -->
     </div>
     <div class="ch_nav_box">
+      <div class="ch_nav_box_topFixed">
+        <div
+          class="ch_nav_box_topFixed_item"
+          :class="[
+            splitScreenData.isOpen ? 'ch_nav_box_topFixed_item_active' : ''
+          ]"
+          @click="splitScreen"
+        >
+          <svg
+            t="1730945943778"
+            class="icon"
+            viewBox="0 0 1024 1024"
+            version="1.1"
+            xmlns="http://www.w3.org/2000/svg"
+            p-id="4480"
+            width="200"
+            height="200"
+          >
+            <path
+              d="M213.333333 725.333333a85.333333 85.333333 0 0 1 85.333334 85.333334v85.333333a85.333333 85.333333 0 0 1-85.333334 85.333333h-85.333333a85.333333 85.333333 0 0 1-85.333333-85.333333v-85.333333a85.333333 85.333333 0 0 1 85.333333-85.333334h85.333333z m341.333334 0a85.333333 85.333333 0 0 1 85.333333 85.333334v85.333333a85.333333 85.333333 0 0 1-85.333333 85.333333h-85.333334a85.333333 85.333333 0 0 1-85.333333-85.333333v-85.333333a85.333333 85.333333 0 0 1 85.333333-85.333334h85.333334z m341.333333 0a85.333333 85.333333 0 0 1 85.333333 85.333334v85.333333a85.333333 85.333333 0 0 1-85.333333 85.333333h-85.333333a85.333333 85.333333 0 0 1-85.333334-85.333333v-85.333333a85.333333 85.333333 0 0 1 85.333334-85.333334h85.333333z m-682.666667 85.333334h-85.333333v85.333333h85.333333v-85.333333z m341.333334 0h-85.333334v85.333333h85.333334v-85.333333z m341.333333 0h-85.333333v85.333333h85.333333v-85.333333z m0-768a85.333333 85.333333 0 0 1 85.333333 85.333333v426.666667a85.333333 85.333333 0 0 1-85.333333 85.333333h-768a85.333333 85.333333 0 0 1-85.333333-85.333333v-426.666667a85.333333 85.333333 0 0 1 85.333333-85.333333h768z m0 85.333333h-768v426.666667h768v-426.666667z"
+              p-id="4481"
+            ></path>
+          </svg>
+          <span>分屏</span>
+        </div>
+      </div>
       <div class="ch_nav_box_top">
         <div @click.stop="changeFold(!fold)" ref="foldBtnRef">
           <el-tooltip
@@ -55,7 +86,7 @@
             <img
               :src="require('../../assets/icon/course/foldIcon.svg')"
               alt=""
-							:class="[!fold?'':'foldActive']"
+              :class="[!fold ? '' : 'foldActive']"
             />
           </el-tooltip>
         </div>
@@ -229,20 +260,25 @@
         </div>
       </div>
     </div>
-    <div v-if="fold" class="itemFold" ref="itemFoldRef"  v-click-outside="handleBlur">
+    <div
+      v-if="fold"
+      class="itemFold"
+      ref="itemFoldRef"
+      v-click-outside="handleBlur"
+    >
       <div @click="$emit('backPage')">
-          <img :src="require('../../assets/icon/course/return.png')" alt="" />
-				<span>返回</span>
+        <img :src="require('../../assets/icon/course/return.png')" alt="" />
+        <span>返回</span>
       </div>
 
       <div @click="$emit('refresh')">
-          <img :src="require('../../assets/icon/course/refresh.png')" alt="" />
-					<span>刷新</span>
+        <img :src="require('../../assets/icon/course/refresh.png')" alt="" />
+        <span>刷新</span>
       </div>
 
       <div @click="$emit('authority')" v-if="tType == 1 || tType == 4">
-          <img :src="require('../../assets/icon/course/setting2.svg')" alt="" />
-					<span>权限</span>
+        <img :src="require('../../assets/icon/course/setting2.svg')" alt="" />
+        <span>权限</span>
       </div>
     </div>
     <levitatedSphere ref="levitatedSphereRef" @startTime="startTime" />
@@ -270,7 +306,7 @@ import { v4 as uuidv4 } from "uuid";
 const clickOutside = {
   bind(el, binding) {
     // 在元素上绑定一个点击事件监听器
-    el.clickOutsideEvent = function (event) {
+    el.clickOutsideEvent = function(event) {
       // 检查点击事件是否发生在元素的内部
       if (!(el === event.target || el.contains(event.target))) {
         // 如果点击事件发生在元素的外部,则触发指令绑定的方法,将点击的event数据传过去
@@ -283,7 +319,7 @@ const clickOutside = {
   unbind(el) {
     // 在元素上解除点击事件监听器
     document.removeEventListener("click", el.clickOutsideEvent);
-  },
+  }
 };
 export default {
   emits: [
@@ -295,8 +331,8 @@ export default {
     "stopRecording",
     "startRecording"
   ],
-	directives: {
-    "click-outside": clickOutside, // 注册自定义指令
+  directives: {
+    "click-outside": clickOutside // 注册自定义指令
   },
   components: {
     searchArea,
@@ -307,7 +343,7 @@ export default {
     countdown,
     AnnotationCanvas,
     languageAssistant,
-		reviewArea
+    reviewArea
   },
   props: {
     courseDetail: {
@@ -315,7 +351,7 @@ export default {
       default: () => {}
     },
     tType: {
-      type:String,
+      type: String,
       default: 0
     },
     navList: {
@@ -345,13 +381,24 @@ export default {
     videoStart: {
       type: Boolean,
       default: false
+    },
+    splitScreenData: {
+      type: Object,
+      default: () => {
+        return {
+          isOpen: false,
+          userId: "",
+          uid: "",
+					myUid:"",
+        };
+      }
     }
   },
   data() {
     return {
       userid: this.$route.query.userid,
       courseId: this.$route.query.courseId,
-			tcid2: this.$route.query.tcid,
+      tcid2: this.$route.query.tcid,
       type: 0,
       itemType: 0, //0--无  1-搜索  2-任务 3-对话
       fileId: [],
@@ -361,66 +408,66 @@ export default {
       openMegaphone: false, //是否打开喇叭
       getFileIdLoading: false,
       AnnotationCanvasShow: false,
-			canShowTips:false,
-			showTipsLoading:false,
-			tipsList:[],
-			firstEnterTime:null,
-			canGetTips:true,
-			getTipsTimer:null,
-			getWangLoading:false,
-			canUseWangData:false,
-			wangData:"",
-			languageSetting:0,
+      canShowTips: false,
+      showTipsLoading: false,
+      tipsList: [],
+      firstEnterTime: null,
+      canGetTips: true,
+      getTipsTimer: null,
+      getWangLoading: false,
+      canUseWangData: false,
+      wangData: "",
+      languageSetting: 0
     };
   },
   mounted() {
-		let setting = this.courseDetail.setting;
-		if(setting){
-			setting = JSON.parse(setting);
-			if(setting.languageSetting){
-				this.languageSetting = setting.languageSetting;
-			}
-		}
+    let setting = this.courseDetail.setting;
+    if (setting) {
+      setting = JSON.parse(setting);
+      if (setting.languageSetting) {
+        this.languageSetting = setting.languageSetting;
+      }
+    }
     this.setWidth();
     this.getFileId();
-		this.firstEnterTime = new Date().getTime();
-		this.getWantSearch();
-		
-		setTimeout(()=>{
-			this.canGetTips = true;
-			this.getTipsList()
-		},3000)
+    this.firstEnterTime = new Date().getTime();
+    this.getWantSearch();
+
+    setTimeout(() => {
+      this.canGetTips = true;
+      this.getTipsList();
+    }, 3000);
   },
   methods: {
-		getTipsListTime(time = 5000){
-			if(this.getTipsTimer)clearTimeout(this.getTipsListTime)
-			this.getTipsTimer = setTimeout(()=>{
-				this.canGetTips = true;
-				this.getTipsList();
-				this.getTipsTimer = null;
-			},time)
-		},
-		getTipsList(){
-			return new Promise((resolve)=>{
-				if(!this.canGetTips)return;
-			this.showTipsLoading = true;
-			let nowTaskObj = this.navList[this.courseType].task[this.taskCount]
-			let nowTask = `【任务${this.taskCount+1}:${nowTaskObj.taskName}】`
-			let _textData = `课程名称:${this.courseDetail.title}\n分类:${this.courseDetail.name}\n\n`;
-      let _chapters = JSON.parse(this.courseDetail.chapters);
-      _chapters.forEach((i1, index1) => {
-        if (i1.dyName) {
-          _textData += `阶段${index1 + 1}:${i1.dyName}\n`;
-        }
-        i1.chapterInfo[0].taskJson.forEach((i2, index2) => {
-          if (i2.task) {
-            _textData += `任务${index2 + 1}:${i2.task}\n`;
-            _textData += `${i2.taskDetail}\n`;
+    getTipsListTime(time = 5000) {
+      if (this.getTipsTimer) clearTimeout(this.getTipsListTime);
+      this.getTipsTimer = setTimeout(() => {
+        this.canGetTips = true;
+        this.getTipsList();
+        this.getTipsTimer = null;
+      }, time);
+    },
+    getTipsList() {
+      return new Promise(resolve => {
+        if (!this.canGetTips) return;
+        this.showTipsLoading = true;
+        let nowTaskObj = this.navList[this.courseType].task[this.taskCount];
+        let nowTask = `【任务${this.taskCount + 1}:${nowTaskObj.taskName}】`;
+        let _textData = `课程名称:${this.courseDetail.title}\n分类:${this.courseDetail.name}\n\n`;
+        let _chapters = JSON.parse(this.courseDetail.chapters);
+        _chapters.forEach((i1, index1) => {
+          if (i1.dyName) {
+            _textData += `阶段${index1 + 1}:${i1.dyName}\n`;
           }
+          i1.chapterInfo[0].taskJson.forEach((i2, index2) => {
+            if (i2.task) {
+              _textData += `任务${index2 + 1}:${i2.task}\n`;
+              _textData += `${i2.taskDetail}\n`;
+            }
+          });
+          _textData += "\n";
         });
-        _textData += "\n";
-      });
-			let _msg = `Language: ${this.getLang()}
+        let _msg = `Language: ${this.getLang()}
 ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
 Instruction: Based on the context, follow "Format example", write content
 
@@ -447,55 +494,55 @@ Instruction: Based on the context, follow "Format example", write content
 ##Format example
 ["步骤的描述","步骤的描述","步骤的描述"]
 ${_textData}
-`
-let params = {
-        // assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
-        // userId: this.userid,
-        // message: [{ type: "text", text: _msg }],
-        // session_name: uuidv4(),
-        // // uid: _uuid,
-        // file_ids: this.fileId,
-				// model: "gpt-4o-2024-08-06",
-					model: "gpt-4o-2024-08-06",
-					temperature: 0,
-					max_tokens: 4096,
-					top_p: 1,
-					frequency_penalty: 0,
-					presence_penalty: 0,
-					messages: [{ role: "user", content: _msg }],
-					uid: uuidv4(),
-					mind_map_question: "",
-					stream: false,
-      };
-      this.ajax
-        // .post("https://gpt4.cocorobo.cn/chat", params)
-        // .post("https://claude3.cocorobo.cn/chat", params)
-        .post("https://gpt4.cocorobo.cn/chat", params)
-        .then(res => {
-          let _data = res.data.FunctionResponse.choices[0].message.content;
-          _data = _data.replaceAll("```json", "").replaceAll("```", "");
-					console.log(_data)
-          const match = _data.match(/\[\s*[^]*\s*\]/);
-          let _result = JSON.parse(match[0]) || [];
-					
-					this.tipsList.push(_result)
-					
-          this.showTipsLoading = false;
-					this.canShowTips = true;
-					this.canGetTips = false;
-					resolve()
-        })
-        .catch(e => {
-          this.showTipsLoading = false;
-          this.$message.error("获取课堂小贴士失败");
-          console.log(e);
-        });
-			})
-		},
-		handleBlur(){
-			// console.log(this.fold)
-			this.fold = !this.fold;
-		},
+`;
+        let params = {
+          // assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
+          // userId: this.userid,
+          // message: [{ type: "text", text: _msg }],
+          // session_name: uuidv4(),
+          // // uid: _uuid,
+          // file_ids: this.fileId,
+          // model: "gpt-4o-2024-08-06",
+          model: "gpt-4o-2024-08-06",
+          temperature: 0,
+          max_tokens: 4096,
+          top_p: 1,
+          frequency_penalty: 0,
+          presence_penalty: 0,
+          messages: [{ role: "user", content: _msg }],
+          uid: uuidv4(),
+          mind_map_question: "",
+          stream: false
+        };
+        this.ajax
+          // .post("https://gpt4.cocorobo.cn/chat", params)
+          // .post("https://claude3.cocorobo.cn/chat", params)
+          .post("https://gpt4.cocorobo.cn/chat", params)
+          .then(res => {
+            let _data = res.data.FunctionResponse.choices[0].message.content;
+            _data = _data.replaceAll("```json", "").replaceAll("```", "");
+            console.log(_data);
+            const match = _data.match(/\[\s*[^]*\s*\]/);
+            let _result = JSON.parse(match[0]) || [];
+
+            this.tipsList.push(_result);
+
+            this.showTipsLoading = false;
+            this.canShowTips = true;
+            this.canGetTips = false;
+            resolve();
+          })
+          .catch(e => {
+            this.showTipsLoading = false;
+            this.$message.error("获取课堂小贴士失败");
+            console.log(e);
+          });
+      });
+    },
+    handleBlur() {
+      // console.log(this.fold)
+      this.fold = !this.fold;
+    },
     changeAnnotationCanvasShow(newValue) {
       this.AnnotationCanvasShow = newValue;
     },
@@ -510,7 +557,7 @@ let params = {
       let params = [
         {
           uid: this.userid,
-          courseId: this.courseId+(this.tcid2?this.tcid2:""),
+          courseId: this.courseId + (this.tcid2 ? this.tcid2 : ""),
           content: _html
         }
       ];
@@ -540,23 +587,22 @@ let params = {
     openSetting() {
       this.type = this.type == 1 ? 0 : 1;
       this.$nextTick(() => {
-				if(this.type==1){
-					this.$parent.mlDialog = false
-				}
+        if (this.type == 1) {
+          this.$parent.mlDialog = false;
+        }
         this.setWidth();
       });
     },
     changeItemType(type) {
       this.type = 0;
-			
-      
-			if(this.itemType==type){
-				this.itemType = 0;
-				this.type = 1;
-				this.openSetting();
-				return;
-			}
-			this.openSetting();
+
+      if (this.itemType == type) {
+        this.itemType = 0;
+        this.type = 1;
+        this.openSetting();
+        return;
+      }
+      this.openSetting();
       // this.$message.info("切换到"+type)
       this.$nextTick(() => {
         // if (this.itemType == 1 && type != 1) {
@@ -635,7 +681,7 @@ let params = {
       } else if (this.recordType == 1) {
         // this.$message.info("关闭")
         this.$refs.levitatedSphereRef.stopTwo();
-				// this.changeRecordType(0)
+        // this.changeRecordType(0)
       }
     },
     changeMegaphone() {
@@ -650,14 +696,14 @@ let params = {
     changeFold(newValue) {
       // this.$message.info("展开");
       this.fold = newValue;
-			this.$nextTick(()=>{
-				let e1 = this.$refs.foldBtnRef.getBoundingClientRect();
-			let e2 = this.$refs.ch_box.getBoundingClientRect();
-			
-			console.log('👇👇')
-			console.log(e1.top - e2.top)
-			this.$refs.itemFoldRef.style.top = e1.top - e2.top + "px";
-			})
+      this.$nextTick(() => {
+        let e1 = this.$refs.foldBtnRef.getBoundingClientRect();
+        let e2 = this.$refs.ch_box.getBoundingClientRect();
+
+        console.log("👇👇");
+        console.log(e1.top - e2.top);
+        this.$refs.itemFoldRef.style.top = e1.top - e2.top + "px";
+      });
     },
     // 收起
     changeUnfold(newValue) {
@@ -672,30 +718,28 @@ let params = {
       this.$refs.levitatedSphereRef.stopTwo();
     },
     // 语音合成
-    startSpeak() {
-    },
+    startSpeak() {},
     changeRecordType(type) {
       this.recordLoading = false;
       this.recordType = type;
     },
     commentAndAnnotate() {
-			if(this.AnnotationCanvasShow){
-				this.$refs.AnnotationCanvasRef.close()
-			}else{
-				this.$refs.AnnotationCanvasRef.open();
-      	this.insertMemorandum(`开始使用<span class="btn">批注</span>功能`);
-			}
-      
+      if (this.AnnotationCanvasShow) {
+        this.$refs.AnnotationCanvasRef.close();
+      } else {
+        this.$refs.AnnotationCanvasRef.open();
+        this.insertMemorandum(`开始使用<span class="btn">批注</span>功能`);
+      }
     },
     endCommentAndAnnotate() {
       this.insertMemorandum(`结束使用<span class="btn">批注</span>功能`);
     },
-		getWantSearch() {
-			console.log("获取猜你想搜")
+    getWantSearch() {
+      console.log("获取猜你想搜");
       let _uuid = uuidv4();
-			this.getWangLoading = true
-			this.canUseWangData = false
-			this.wangData=""
+      this.getWangLoading = true;
+      this.canUseWangData = false;
+      this.wangData = "";
       let _msg = `
 Language: ${this.getLang()}
 ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
@@ -766,9 +810,9 @@ Instruction: Based on the context, follow "Format example", write content
           let _data = res.data.FunctionResponse.message;
           _data = _data.replaceAll("```json", "").replaceAll("```", "");
           const match = _data.match(/\[\s*{[^]*}\s*\]/);
-					this.wangData = match[0];
-					this.canUseWangData = true;
-					this.getWangLoading = false;
+          this.wangData = match[0];
+          this.canUseWangData = true;
+          this.getWangLoading = false;
           // console.log(_data);
           // console.log(match);
           // this.chatList.find(i => i.uid == _uuid).aiContent = JSON.parse(
@@ -782,32 +826,54 @@ Instruction: Based on the context, follow "Format example", write content
         })
         .catch(e => {
           this.chatLoading = false;
-					this.canUseWangData = false;
-					this.getWangLoading = false;
-					console.log(e);
+          this.canUseWangData = false;
+          this.getWangLoading = false;
+          console.log(e);
         });
       // this.getWAntSearchContent(_uuid);
     },
-		getLang(){
-      let lang = ''
-      if(this.languageSetting == 0){
-        lang = 'Chinese.'
-      }else if(this.languageSetting == 1){
-        lang = 'Traditional Chinese.'
-      }else if(this.languageSetting == 2){
-        lang = 'English.'
+    getLang() {
+      let lang = "";
+      if (this.languageSetting == 0) {
+        lang = "Chinese.";
+      } else if (this.languageSetting == 1) {
+        lang = "Traditional Chinese.";
+      } else if (this.languageSetting == 2) {
+        lang = "English.";
+      }
+      return lang;
+    },
+    getWanData() {
+      if (this.wangData && this.canUseWangData) {
+        const _result = this.wangData;
+        this.wangData = "";
+        this.canUseWangData = false;
+        this.getWantSearch();
+        return _result;
       }
-      return lang
-    },
-		getWanData(){
-			if(this.wangData && this.canUseWangData){
-				const _result = this.wangData;
-				this.wangData = "";
-				this.canUseWangData = false;
-				this.getWantSearch();
-				return _result;
+    },
+    splitScreen() {
+			if(this.tType==1){
+				if(this.splitScreenData.isOpen){
+					if(this.splitScreenData.userId==this.userid && this.splitScreenData.uid==this.splitScreenData.myUid){
+						// this.splitScreenData.isOpen = false;
+						this.$emit("splitScreenBehavior",0)//关闭分屏
+					}else{
+						if(this.splitScreenData.userId==this.userid && this.splitScreenData.uid!=this.splitScreenData.myUid){
+							this.$message.error("需要在开启分屏的设备上关闭分屏")
+						}else{
+							this.$message.error("你不是分屏的创建者,无法关闭分屏")
+						}
+					}
+				}else{
+					this.$message.info("开启分屏")
+					this.$emit("splitScreenBehavior",1)//打开分屏
+					// this.splitScreenData.isOpen = true;
+				}
+			}else{
+				this.$message.error("只有老师可以分屏")
 			}
-		}
+    }
   }
 };
 </script>
@@ -930,12 +996,12 @@ Instruction: Based on the context, follow "Format example", write content
   /* border-top: solid 1px #eaeaea; */
   z-index: 1000; /* 确保二级菜单在主菜单上层 */
   border-radius: 10px;
-	box-sizing: border-box;
-	padding:10px;
-	display:flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
+  box-sizing: border-box;
+  padding: 10px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
 }
 
 .itemFold > div {
@@ -945,12 +1011,12 @@ Instruction: Based on the context, follow "Format example", write content
   justify-content: center;
   align-items: center;
   cursor: pointer;
-	margin: 5px 0;
-	border-radius: 10px;
+  margin: 5px 0;
+  border-radius: 10px;
 }
 
-.itemFold > div:hover{
-	background:#F3F7FD;
+.itemFold > div:hover {
+  background: #f3f7fd;
 }
 
 .itemFold > div > img {
@@ -958,30 +1024,70 @@ Instruction: Based on the context, follow "Format example", write content
   height: 24px;
 }
 
-.itemFold > div > span{
-	margin-left:10px;
+.itemFold > div > span {
+  margin-left: 10px;
 }
 
 @media screen and (max-height: 820px) {
-	.ch_nav_box_bottom > div {
-		height: auto;
-		padding: 8px 0;
-	}
-
-	.ch_nav_box_middle_item{
-		height: auto;
-		padding: 8px 0;
-	}
-
-	.ch_nav_box_top > div{
-		height: auto;
-		padding: 8px 0;
-	}
+  .ch_nav_box_bottom > div {
+    height: auto;
+    padding: 8px 0;
+  }
+
+  .ch_nav_box_middle_item {
+    height: auto;
+    padding: 8px 0;
+  }
+
+  .ch_nav_box_top > div {
+    height: auto;
+    padding: 8px 0;
+  }
+}
+
+.foldActive {
+  background-color: #f0f2f5;
+  padding: 10px;
+  border-radius: 10px;
+}
+
+.ch_nav_box_topFixed {
+  width: 100%;
+  height: 65px;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.ch_nav_box_topFixed_item {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 65px;
+  padding-top: 5px;
+  cursor: pointer;
+  border-radius: 10px 10px 0 0;
+}
+
+.ch_nav_box_topFixed_item > svg {
+  width: 25px;
+  height: 25px;
+  fill: #000;
+}
+
+.ch_nav_box_topFixed_item > span {
+  margin-top: 5px;
+  font-size: 14px;
+}
+
+.ch_nav_box_topFixed_item_active {
+  background-color: #3681fc;
+  color: #fff;
 }
 
-.foldActive{
-	background-color: #F0F2F5;
-	padding: 10px;
-	border-radius: 10px;
+.ch_nav_box_topFixed_item_active > svg {
+  fill: #fff;
 }
 </style>