From c68786ea6525b9b853999c2896b80c18e42448d6 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 15 八月 2024 11:36:31 +0800
Subject: [PATCH] 教师端恢复成员列表

---
 src/views/meet/index.vue |   96 ++++++++++++++++++++++++-----------------------
 1 files changed, 49 insertions(+), 47 deletions(-)

diff --git a/src/views/meet/index.vue b/src/views/meet/index.vue
index 8b86a28..0156789 100644
--- a/src/views/meet/index.vue
+++ b/src/views/meet/index.vue
@@ -9,7 +9,7 @@
           <el-row :gutter="5">
             <el-col :span="12">
               <el-input placeholder="鎼滅储瀛﹀憳" size="small" clearable @input="getStudentList" @clear="getStudentList"
-                v-model="searchForm.keyword" />
+                        v-model="searchForm.keyword"/>
             </el-col>
             <el-col :span="2">
               <el-button type="primary" size="small" @click="getStudentList">鎼滅储</el-button>
@@ -51,8 +51,9 @@
 
 <script>
 import { getStudentList } from '@/api/meet'
+
 export default {
-  data() {
+  data () {
     return {
       ws: null,
       jitsiApi: null,
@@ -72,80 +73,80 @@
       showStudentList: []
     }
   },
-  beforeDestroy() {
+  beforeDestroy () {
     if (this.ws) {
-      this.ws.close();
+      this.ws.close()
     }
   },
   methods: {
-    muteEveryone() {
-      this.jitsiApi.executeCommand('muteEveryone', 'audio');
+    muteEveryone () {
+      this.jitsiApi.executeCommand('muteEveryone', 'audio')
     },
-    videoEveryone() {
-      this.jitsiApi.executeCommand('muteEveryone', 'video');
+    videoEveryone () {
+      this.jitsiApi.executeCommand('muteEveryone', 'video')
     },
-    handleCommand(command) {
+    handleCommand (command) {
       this.sendMessage(JSON.stringify(command))
     },
-    initWebSocket() {
-      this.ws = new WebSocket('ws://127.0.0.1:8000/websocket/' + 1);
-      let ws = this.ws;
+    initWebSocket () {
+      this.ws = new WebSocket('ws://127.0.0.1:8000/websocket/' + 1)
+      let ws = this.ws
       ws.onopen = () => {
-        console.log('WebSocket 杩炴帴鎴愬姛');
+        console.log('WebSocket 杩炴帴鎴愬姛')
         // 鍙戦�佸績璺虫暟鎹�
-        ws.send('ping');
-      };
+        ws.send('ping')
+      }
       ws.onmessage = (event) => {
-        console.log('鏀跺埌鏈嶅姟鍣ㄦ秷鎭�:', event.data);
+        console.log('鏀跺埌鏈嶅姟鍣ㄦ秷鎭�:', event.data)
         // 澶勭悊鏈嶅姟鍣ㄥ彂鏉ョ殑娑堟伅
-      };
+      }
       ws.onerror = (error) => {
-        console.error('WebSocket 杩炴帴鍑洪敊:', error);
-      };
+        console.error('WebSocket 杩炴帴鍑洪敊:', error)
+      }
       ws.onclose = () => {
-        console.log('WebSocket 杩炴帴宸插叧闂�');
+        console.log('WebSocket 杩炴帴宸插叧闂�')
         // 鍙互鍦ㄨ繖閲屽皾璇曢噸鏂拌繛鎺�
-      };
+      }
 
       // 缁勪欢閿�姣佹椂鏂紑 WebSocket 杩炴帴
       this.$once('hook:beforeDestroy', () => {
-        ws.close();
-      });
+        ws.close()
+      })
     },
-    sendMessage(message) {
+    sendMessage (message) {
       if (this.ws.readyState === WebSocket.OPEN) {
-        this.ws.send(message);
+        this.ws.send(message)
       } else {
-        console.error('WebSocket 杩炴帴鏈墦寮�');
+        console.error('WebSocket 杩炴帴鏈墦寮�')
       }
     },
-    hiddenStudent() {
+    hiddenStudent () {
       this.showStudent = !this.showStudent
     },
-    changeJitsiWindowSize(width, height) {
+    changeJitsiWindowSize (width, height) {
       this.jitsiApi.resizeLargeVideo(width, height)
     },
-    getShowText() {
+    getShowText () {
       if (this.showStudent) {
         return '闅愯棌'
       } else {
         return '鏄剧ず'
       }
     },
-    getStatus(status) {
+    getStatus (status) {
       if (status === 1) {
         return '鍦ㄧ嚎'
       } else if (status === 0) {
         return '绂荤嚎'
       }
     },
-    handleTabChange(tab) {
+    handleTabChange (tab) {
       let status = parseInt(tab.name)
       this.showStudentList = this.studentList.filter(student => {
         return student.onlineStatus === status
       })
     },
-    getStudentList() {
+    getStudentList () {
       let params = {
         keyword: this.searchForm.keyword
       }
@@ -156,7 +157,7 @@
         })
       })
     },
-    getRoomInfo() {
+    getRoomInfo () {
       this.jitsiApi.getRoomsInfo().then(rooms => {
         rooms.rooms.forEach(room => {
           // 鎴块棿鐨刬d鏄竴涓瓙鍩熷悕锛屼笖@绗﹀墠鐨勪細璁悕绉版槸缁忚繃URL缂栫爜鐨�
@@ -186,7 +187,7 @@
       })
     }
   },
-  mounted() {
+  mounted () {
     this.height = window.innerHeight
     this.meetId = this.$route.query.meetId
     this.getStudentList()
@@ -219,14 +220,9 @@
           'camera',
           // 鑱婂ぉ
           'chat',
-          // 'closedcaptions',
           // 鍏变韩
           'desktop',
           'download',
-          // 'embedmeeting',
-          // 'etherpad',
-          // 'feedback',
-          // 'filmstrip',
           'fullscreen',
           'hangup',
           // 'help',
@@ -236,11 +232,7 @@
           'livestreaming',
           'microphone',
           'noisesuppression',
-          // 'participants-pane',
-          // 'profile',
-          // 'raisehand',
           'recording',
-          // 'security',
           'select-background',
           'settings',
           'shareaudio',
@@ -249,8 +241,18 @@
           'stats',
           'tileview',
           'toggle-camera',
-          // 'videoquality',
-          'whiteboard'
+          'whiteboard',
+
+          // 'closedcaptions',
+          // 'embedmeeting',
+          // 'etherpad',
+          // 'feedback',
+          // 'filmstrip',
+          'participants-pane',
+          // 'profile',
+          'raisehand',
+          // 'security',
+          'videoquality',
         ],
         whiteboard: {
           enabled: true
@@ -269,9 +271,9 @@
     }, 2500)
 
     // 鍒濆鍖�
-    this.initWebSocket();
+    this.initWebSocket()
   },
-  beforeDestroy() {
+  beforeDestroy () {
     // 娓呴櫎瀹氭椂鍣紝閬垮厤鍐呭瓨娉勬紡
     if (this.intervalId) {
       clearInterval(this.intervalId)

--
Gitblit v1.8.0