Bläddra i källkod

'页面优化'

gyj 2 år sedan
förälder
incheckning
38ac830a62
8 ändrade filer med 1390 tillägg och 301 borttagningar
  1. 5
    1
      .gitignore
  2. 41
    43
      package-lock.json
  3. 1
    1
      src/api/room.js
  4. 22
    10
      src/router/index.js
  5. 191
    163
      src/views/components/roomFooter.vue
  6. 164
    83
      src/views/room.vue
  7. 112
    0
      src/views/test.vue
  8. 854
    0
      src/views/testRoom.vue

+ 5
- 1
.gitignore Visa fil

@@ -21,4 +21,8 @@ pnpm-debug.log*
21 21
 *.ntvs*
22 22
 *.njsproj
23 23
 *.sln
24
-*.sw?
24
+*.sw?
25
+node_modules
26
+node_modules
27
+node_modules
28
+node_modules

+ 41
- 43
package-lock.json Visa fil

@@ -2044,49 +2044,6 @@
2044 2044
         "webpack-merge": "^5.7.3",
2045 2045
         "webpack-virtual-modules": "^0.4.2",
2046 2046
         "whatwg-fetch": "^3.6.2"
2047
-      },
2048
-      "dependencies": {
2049
-        "@vue/vue-loader-v15": {
2050
-          "version": "npm:vue-loader@15.11.1",
2051
-          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
2052
-          "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
2053
-          "dev": true,
2054
-          "requires": {
2055
-            "@vue/component-compiler-utils": "^3.1.0",
2056
-            "hash-sum": "^1.0.2",
2057
-            "loader-utils": "^1.1.0",
2058
-            "vue-hot-reload-api": "^2.3.0",
2059
-            "vue-style-loader": "^4.1.0"
2060
-          },
2061
-          "dependencies": {
2062
-            "hash-sum": {
2063
-              "version": "1.0.2",
2064
-              "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
2065
-              "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
2066
-              "dev": true
2067
-            }
2068
-          }
2069
-        },
2070
-        "json5": {
2071
-          "version": "1.0.2",
2072
-          "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
2073
-          "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
2074
-          "dev": true,
2075
-          "requires": {
2076
-            "minimist": "^1.2.0"
2077
-          }
2078
-        },
2079
-        "loader-utils": {
2080
-          "version": "1.4.2",
2081
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
2082
-          "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
2083
-          "dev": true,
2084
-          "requires": {
2085
-            "big.js": "^5.2.2",
2086
-            "emojis-list": "^3.0.0",
2087
-            "json5": "^1.0.1"
2088
-          }
2089
-        }
2090 2047
       }
2091 2048
     },
2092 2049
     "@vue/cli-shared-utils": {
@@ -2251,6 +2208,47 @@
2251 2208
         }
2252 2209
       }
2253 2210
     },
2211
+    "@vue/vue-loader-v15": {
2212
+      "version": "npm:vue-loader@15.11.1",
2213
+      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
2214
+      "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
2215
+      "dev": true,
2216
+      "requires": {
2217
+        "@vue/component-compiler-utils": "^3.1.0",
2218
+        "hash-sum": "^1.0.2",
2219
+        "loader-utils": "^1.1.0",
2220
+        "vue-hot-reload-api": "^2.3.0",
2221
+        "vue-style-loader": "^4.1.0"
2222
+      },
2223
+      "dependencies": {
2224
+        "hash-sum": {
2225
+          "version": "1.0.2",
2226
+          "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
2227
+          "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
2228
+          "dev": true
2229
+        },
2230
+        "json5": {
2231
+          "version": "1.0.2",
2232
+          "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
2233
+          "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
2234
+          "dev": true,
2235
+          "requires": {
2236
+            "minimist": "^1.2.0"
2237
+          }
2238
+        },
2239
+        "loader-utils": {
2240
+          "version": "1.4.2",
2241
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
2242
+          "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
2243
+          "dev": true,
2244
+          "requires": {
2245
+            "big.js": "^5.2.2",
2246
+            "emojis-list": "^3.0.0",
2247
+            "json5": "^1.0.1"
2248
+          }
2249
+        }
2250
+      }
2251
+    },
2254 2252
     "@vue/web-component-wrapper": {
2255 2253
       "version": "1.3.0",
2256 2254
       "resolved": "https://registry.npmjs.org/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz",

+ 1
- 1
src/api/room.js Visa fil

@@ -1,6 +1,6 @@
1 1
 import axios from "@/utils/request";
2 2
 let baseUrlZC = 'https://api.xayunmei.com/zhongcaiapi';
3
-let baseUrl = 'https://api.xayunmei.com/tiaojieapitest';
3
+let baseUrl = 'https://api.xayunmei.com/tiaojieapi';
4 4
 // let baseUrl = 'http://121.40.189.20:6001';
5 5
 // 开始云端录制
6 6
 export function startVideo(data) {

+ 22
- 10
src/router/index.js Visa fil

@@ -6,7 +6,7 @@ const routes = [
6 6
     {
7 7
         path: "/",
8 8
         component: () => import("../views/home.vue"),
9
-        redirect:'home'
9
+        redirect: 'home'
10 10
     },
11 11
     {
12 12
         path: "/home",
@@ -16,17 +16,29 @@ const routes = [
16 16
 
17 17
     },
18 18
     {
19
-      path:"/room",
20
-      name:"Room",
21
-      component:()=>import("../views/room.vue"),
22
-      meta:{title:"房间"}
19
+        path: "/room",
20
+        name: "Room",
21
+        component: () => import("../views/room.vue"),
22
+        meta: { title: "房间" }
23 23
     },
24 24
     {
25
-        path:"/onlyOffice",
26
-        name:"onlyOffice",
27
-        component:()=>import("../views/onlyOffice.vue"),
28
-        meta:{title:"在线文档"}
29
-      }
25
+        path: "/onlyOffice",
26
+        name: "onlyOffice",
27
+        component: () => import("../views/onlyOffice.vue"),
28
+        meta: { title: "在线文档" }
29
+    },
30
+    {
31
+        path: "/test",
32
+        name: "test",
33
+        component: () => import("../views/test.vue"),
34
+        meta: { title: "test" }
35
+    },
36
+    {
37
+        path: "/testRoom",
38
+        name: "testRoom",
39
+        component: () => import("../views/testRoom.vue"),
40
+        meta: { title: "testRoom" }
41
+    }
30 42
 ]
31 43
 
32 44
 const router = new VueRouter({

+ 191
- 163
src/views/components/roomFooter.vue Visa fil

@@ -1,176 +1,204 @@
1 1
 <template>
2
-    <div class="roomFooter">
3
-      <div class="outRoom">
4
-        <el-button type="danger" @click="exitRoom" v-if="!roleFlag">退出房间</el-button>
5
-        <el-button type="danger" @click="exitRoom" v-if="roleFlag">解散房间</el-button>
2
+  <div class="roomFooter">
3
+    <div class="outRoom">
4
+      <el-button type="danger" @click="exitRoom" v-if="!roleFlag"
5
+        >退出房间</el-button
6
+      >
7
+      <el-button type="danger" @click="exitRoom" v-if="roleFlag"
8
+        >解散房间</el-button
9
+      >
10
+    </div>
11
+    <div class="operation">
12
+      <div class="mic">
13
+        <img
14
+          class="micImg"
15
+          src="@/assets/mic_on.png"
16
+          alt=""
17
+          v-if="micFlag"
18
+          @click="micClickOn"
19
+        />
20
+        <img
21
+          class="micImg"
22
+          src="@/assets/mic_off.png"
23
+          alt=""
24
+          v-else
25
+          @click="micClickOff"
26
+        />
27
+      </div>
28
+      <div class="video">
29
+        <img
30
+          class="videoImg"
31
+          src="@/assets/video_on.png"
32
+          alt=""
33
+          v-if="videoFlag"
34
+          @click="videoClickOn"
35
+        />
36
+        <img
37
+          class="videoImg"
38
+          src="@/assets/video_off.png"
39
+          alt=""
40
+          v-else
41
+          @click="videoClickOff"
42
+        />
6 43
       </div>
7
-      <div class="operation">
8
-        <div class="mic">
9
-          <img class="micImg" src="@/assets/mic_on.png" alt="" v-if="micFlag" @click="micClickOn">
10
-          <img class="micImg" src="@/assets/mic_off.png" alt="" v-else @click="micClickOff">
11
-        </div>
12
-        <div class="video">
13
-          <img class="videoImg" src="@/assets/video_on.png" alt="" v-if="videoFlag" @click="videoClickOn">
14
-          <img class="videoImg" src="@/assets/video_off.png" alt="" v-else @click="videoClickOff">
15
-        </div>
16
-        <div class="sharing">
17
-          <img class="sharImg" src="@/assets/screenShare_on.png" alt="" v-if="sharFlag" @click="sharClickOn">
18
-          <img class="sharImg" src="@/assets/screenShare_off.png" alt="" v-else @click="sharClickOff">
19
-        </div>
44
+      <div class="sharing">
45
+        <img
46
+          class="sharImg"
47
+          src="@/assets/screenShare_on.png"
48
+          alt=""
49
+          v-if="sharFlag"
50
+          @click="sharClickOn"
51
+        />
52
+        <img
53
+          class="sharImg"
54
+          src="@/assets/screenShare_off.png"
55
+          alt=""
56
+          v-else
57
+          @click="sharClickOff"
58
+        />
20 59
       </div>
21 60
     </div>
22
-  </template>
61
+  </div>
62
+</template>
23 63
   
24 64
   <script>
25
-  import { startVideo, stopVideo, destructionRoom } from '@/api/room.js'
26
-  export default {
27
-    name: 'Footer',
28
-    // props: [
29
-    //     "roomId"
30
-    // ],
31
-    components: {
32
-  
65
+import { startVideo, stopVideo, destructionRoom } from "@/api/room.js";
66
+export default {
67
+  name: "Footer",
68
+  props: ["micFlag","videoFlag","sharFlag"],
69
+  components: {},
70
+  data() {
71
+    return {
72
+      roomId: null,
73
+      taskId: null,
74
+      roleFlag: true,
75
+      caseId: "",
76
+    };
77
+  },
78
+  methods: {
79
+    // 解散房间
80
+    destructionRoomFn(data) {
81
+      destructionRoom(data).then((res) => {
82
+        console.log(res, "解散房间");
83
+      });
84
+    },
85
+    /**开启麦克风 */
86
+    micClickOn() {
87
+      this.$emit("micClickOn");
33 88
     },
34
-    data() {
35
-      return {
36
-        roomId: null,
37
-        taskId: null,
38
-        roleFlag: true,
39
-        caseId: "",
40
-        micFlag: true,
41
-        videoFlag: true,
42
-        sharFlag: true,
43
-      };
89
+    /**关闭麦克风 */
90
+    micClickOff() {
91
+      this.$emit("micClickOff");
44 92
     },
45
-    methods: {
46
-      // 解散房间
47
-      destructionRoomFn(data) {
48
-        destructionRoom(data).then(res => {
49
-          console.log(res, "解散房间");
50
-        })
51
-      },
52
-      /**开启麦克风 */
53
-      micClickOn() {
54
-        this.micFlag = false;
55
-        this.$emit('micClickOn');
56
-      },
57
-      /**关闭麦克风 */
58
-      micClickOff() {
59
-        this.micFlag = true;
60
-        this.$emit('micClickOff');
61
-      },
62
-      /**开启摄像头 */
63
-      videoClickOn() {
64
-        this.videoFlag = false;
65
-        this.$emit('videoClickOn');
66
-      },
67
-      /**关闭摄像头 */
68
-      videoClickOff() {
69
-        this.videoFlag = true;
70
-        this.$emit('videoClickOff');
71
-      },
72
-      /**共享屏幕 */
73
-      sharClickOn(){
74
-        this.sharFlag = false;
75
-        this.$emit('sharClickOn');
76
-      },
77
-      /**关闭共享屏幕 */
78
-      sharClickOff(){
79
-        this.sharFlag = true;
80
-        this.$emit('sharClickOff');
81
-      },
82
-      exitRoom() {
83
-        if (this.roleFlag) {
84
-          this.stopVideoFn();
85
-          this.destructionRoomFn({ roomId: this.roomId })
86
-          this.$emit('exitRoom');
87
-        } else {
88
-          this.$emit('exitRoom');
89
-        }
90
-      },
91
-      async startVideoFn() {
92
-        await startVideo({
93
-          caseId: this.caseId,
94
-          roomId: this.roomId
95
-        }).then(res => {
96
-          this.taskId = res.data.taskId
97
-          console.log(res.data.taskId, "pppppp");
98
-        })
99
-      },
100
-      stopVideoFn() {
101
-        stopVideo(this.taskId).then(res => {
102
-          console.log(res, "KKKKKK");
103
-        })
104
-      },
93
+    /**开启摄像头 */
94
+    videoClickOn() {
95
+      this.$emit("videoClickOn");
105 96
     },
106
-    async mounted() {
107
-      this.roomId = this.$route.query.roomId;
108
-      this.caseId = this.$route.query.caseId;
109
-      let roleFlag = this.$route.query.flag;
110
-      this.roleFlag = roleFlag;
111
-      if (roleFlag) {
112
-        await this.startVideoFn();
97
+    /**关闭摄像头 */
98
+    videoClickOff() {
99
+      this.$emit("videoClickOff");
100
+    },
101
+    /**共享屏幕 */
102
+    sharClickOn() {
103
+      this.$emit("sharClickOn");
104
+    },
105
+    /**关闭共享屏幕 */
106
+    sharClickOff() {
107
+      this.sharFlag = true;
108
+      this.$emit("sharClickOff");
109
+    },
110
+    exitRoom() {
111
+      if (this.roleFlag) {
112
+        this.stopVideoFn();
113
+        this.destructionRoomFn({ roomId: this.roomId });
114
+        this.$emit("exitRoom");
115
+      } else {
116
+        this.$emit("exitRoom");
113 117
       }
114
-      // setTimeout(() => {
115
-      //     console.log(this.roomId, "房间号房间哈房间号房间哈房间号");
116
-      // });
117 118
     },
118
-  };
119
-  </script>
119
+    async startVideoFn() {
120
+      await startVideo({
121
+        caseId: this.caseId,
122
+        roomId: this.roomId,
123
+      }).then((res) => {
124
+        this.taskId = res.data.taskId;
125
+        console.log(res.data.taskId, "pppppp");
126
+      });
127
+    },
128
+    stopVideoFn() {
129
+      stopVideo(this.taskId).then((res) => {
130
+        console.log(res, "KKKKKK");
131
+      });
132
+    },
133
+  },
134
+  async mounted() {
135
+    this.roomId = this.$route.query.roomId;
136
+    this.caseId = this.$route.query.caseId;
137
+    let roleFlag = this.$route.query.flag;
138
+    this.roleFlag = roleFlag;
139
+    if (roleFlag) {
140
+      await this.startVideoFn();
141
+    }
142
+    // setTimeout(() => {
143
+    //     console.log(this.roomId, "房间号房间哈房间号房间哈房间号");
144
+    // });
145
+  },
146
+};
147
+</script>
120 148
   
121 149
   <style scoped>
122
-  .roomFooter {
123
-    width: 100%;
124
-    height: 100%;
125
-    display: flex;
126
-    flex-direction: row-reverse;
127
-  }
128
-  
129
-  .mic,
130
-  .video,
131
-  .sharing,
132
-  .outRoom {
133
-    cursor: pointer;
134
-    width: 10%;
135
-    height: 100%;
136
-    display: flex;
137
-    align-items: center;
138
-    justify-content: center;
139
-  }
140
-  
141
-  .operation {
142
-    width: 90%;
143
-    height: 100%;
144
-    display: flex;
145
-    align-items: center;
146
-  }
147
-  
148
-  .iconImg {
149
-    width: 30%;
150
-    height: 60%;
151
-  }
152
-  
153
-  .title {
154
-    color: aliceblue;
155
-  }
156
-  
157
-  .empty {
158
-    width: 60%;
159
-    height: 100%;
160
-  }
161
-  
162
-  .mic,
163
-  .video,
164
-  .sharing {
165
-    width: 60px;
166
-    height: 60px;
167
-    margin-left: 20px;
168
-  }
169
-  
170
-  .micImg,
171
-  .videoImg,
172
-  .sharImg {
173
-    width: 40px;
174
-    height: 40px;
175
-  }
176
-  </style>
150
+.roomFooter {
151
+  width: 100%;
152
+  height: 100%;
153
+  display: flex;
154
+  flex-direction: row-reverse;
155
+}
156
+
157
+.mic,
158
+.video,
159
+.sharing,
160
+.outRoom {
161
+  cursor: pointer;
162
+  width: 10%;
163
+  height: 100%;
164
+  display: flex;
165
+  align-items: center;
166
+  justify-content: center;
167
+}
168
+
169
+.operation {
170
+  width: 90%;
171
+  height: 100%;
172
+  display: flex;
173
+  align-items: center;
174
+}
175
+
176
+.iconImg {
177
+  width: 30%;
178
+  height: 60%;
179
+}
180
+
181
+.title {
182
+  color: aliceblue;
183
+}
184
+
185
+.empty {
186
+  width: 60%;
187
+  height: 100%;
188
+}
189
+
190
+.mic,
191
+.video,
192
+.sharing {
193
+  width: 60px;
194
+  height: 60px;
195
+  margin-left: 20px;
196
+}
197
+
198
+.micImg,
199
+.videoImg,
200
+.sharImg {
201
+  width: 40px;
202
+  height: 40px;
203
+}
204
+</style>

+ 164
- 83
src/views/room.vue Visa fil

@@ -1,39 +1,43 @@
1 1
 <template>
2
-    <div class="page">
3
-        <div class="roompage" @mouseover="mouseHover" v-if="modileFlag">
4
-            <div class="txtContent">
5
-                <el-tag type="danger" @click="txtContent">会议内容</el-tag>
6
-            </div>
7
-            <div :class="userClass" :style="{ height: userHeight }" id="localStream">
8
-                <div class="userName">{{ userId }}</div>
9
-            </div>
10
-            <div :class="userClass" :style="{ height: userHeight }" v-for="(item, index) in userList" :key="index"
11
-                :id="item">
12
-                <div class="userName">{{ item }}</div>
13
-            </div>
14
-            <div class="footer">
15
-                <roomFooter @exitRoom="exitRoom" :roomId="roomId"></roomFooter>
16
-            </div>
17
-        </div>
18
-        <div class="roomPhone" v-if="!modileFlag">
19
-            <div class="header">
20
-                <roomFooterPhone @exitRoom="exitRoom"></roomFooterPhone>
21
-            </div>
22
-            <div class="bodyVideo">
23
-                <div :class="userClassPhone" id="localStream">
24
-                    <div class="userNamePhone">{{ userId }}</div>
25
-                </div>
26
-                <div :class="userClassPhone" v-for="(item, index) in userList" :key="index" :id="item">
27
-                    <div class="userNamePhone">{{ item }}</div>
28
-                </div>
29
-            </div>
2
+  <div class="page">
3
+    <div class="roompage" @mouseover="mouseHover" v-if="modileFlag">
4
+      <div class="txtContent">
5
+        <el-tag type="danger" @click="txtContent" v-if="modileFlag"
6
+          >会议内容</el-tag
7
+        >
8
+      </div>
9
+      <div class="content">
10
+        <div class="screenShare" v-if="screenShareFlag"></div>
11
+
12
+        <div :class="videoList">
13
+          <div :class="videoClass" id="localStream">
14
+            <div class="userName">{{ userId }}</div>
15
+          </div>
16
+          <div
17
+            :class="videoClass"
18
+            v-for="(item, index) in userList"
19
+            :key="index"
20
+            :id="item"
21
+          >
22
+            <div class="userName">{{ item }}</div>
23
+          </div>
30 24
         </div>
31
-        <!-- 语音转文字弹窗 -->
32
-        <el-drawer title="会议内容" :visible.sync="textVisible" :modal="false">
33
-            <quill-editor ref="myQuillEditor" v-model="contentValue" :options="editorOption" @blur="onEditorBlur($event)"
34
-                @focus="onEditorFocus($event)" @ready="onEditorReady($event)"></quill-editor>
35
-            <el-button class="updataBtn" @click="updataClick" type="primary" :disabled="!updataFlag">确认修改内容</el-button>
36
-        </el-drawer>
25
+      </div>
26
+      <div class="footerList">
27
+        <roomFooter
28
+          @exitRoom="exitRoom"
29
+          @micClickOn="micClickOn"
30
+          @micClickOff="micClickOff"
31
+          @videoClickOn="videoClickOn"
32
+          @videoClickOff="videoClickOff"
33
+          @sharClickOn="sharClickOn"
34
+          @sharClickOff="sharClickOff"
35
+          :roomId="roomId"
36
+          :micFlag="micFlag"
37
+          :videoFlag="videoFlag"
38
+          :sharFlag="sharFlag"
39
+        ></roomFooter>
40
+      </div>
37 41
     </div>
38 42
     <div class="roomPhone" v-if="!modileFlag">
39 43
       <div class="header">
@@ -118,7 +122,7 @@
118 122
               style="color: #104fad; cursor: pointer"
119 123
               v-for="(item, index) in applicantFile"
120 124
               :key="index"
121
-              @click="preview(item,0)"
125
+              @click="preview(item, 0)"
122 126
             >
123 127
               {{ item.annexName }}
124 128
             </div>
@@ -129,7 +133,7 @@
129 133
               style="color: #104fad; cursor: pointer"
130 134
               v-for="(item, index) in resFile"
131 135
               :key="index"
132
-              @click="preview(item,0)"
136
+              @click="preview(item, 0)"
133 137
             >
134 138
               {{ item.annexName }}
135 139
             </div>
@@ -140,7 +144,7 @@
140 144
               style="color: #104fad; cursor: pointer"
141 145
               v-for="(item, index) in mediateFile"
142 146
               :key="index"
143
-              @click="preview(item,1)"
147
+              @click="preview(item, 1)"
144 148
             >
145 149
               {{ item.annexName }}
146 150
             </div>
@@ -163,6 +167,7 @@
163 167
         >确认修改内容</el-button
164 168
       >
165 169
     </el-drawer>
170
+  </div>
166 171
 </template>
167 172
   
168 173
 <script>
@@ -193,9 +198,10 @@ export default {
193 198
   },
194 199
   data() {
195 200
     return {
201
+      videoList: "videoList",
202
+      videoClass: "videoItem",
196 203
       resFlag: null,
197 204
       appFlag: null,
198
-      userClass: "userVideo5",
199 205
       userClassPhone: "userVideoPhone",
200 206
       userList: [],
201 207
       userHeight: "100%",
@@ -209,6 +215,7 @@ export default {
209 215
       localStreamAsr: null,
210 216
       contentValue: "",
211 217
       textVisible: false,
218
+      screenShareFlag: false,
212 219
       editorOption: {
213 220
         // Some Quill options...
214 221
       },
@@ -217,7 +224,7 @@ export default {
217 224
       token: "",
218 225
       applicantFile: [],
219 226
       resFile: [],
220
-      mediateFile:[],
227
+      mediateFile: [],
221 228
       headers: {
222 229
         // Authorization: "Bearer " + token,
223 230
         Authorization: "",
@@ -249,13 +256,73 @@ export default {
249 256
       },
250 257
       fileList3: [],
251 258
       editFlag: false,
259
+      micFlag: true,
260
+      videoFlag: true,
261
+      sharFlag: true,
252 262
     };
253 263
   },
254 264
   methods: {
265
+    /**点击开启麦克风图标,关闭麦克风 */
266
+    micClickOn() {
267
+      trtc.updateLocalAudio({ mute: true }).then(() => {
268
+        this.micFlag = false;
269
+        this.$message({
270
+          message: "麦克风关闭",
271
+          type: "success",
272
+        });
273
+      });
274
+    },
275
+    /**点击关闭麦克风图标,开启麦克风 */
276
+    micClickOff() {
277
+      trtc.updateLocalAudio({ mute: false }).then(() => {
278
+        this.micFlag = true;
279
+        this.$message({
280
+          message: "麦克风开启",
281
+          type: "success",
282
+        });
283
+      });
284
+    },
285
+    /**点击开启摄像头图标,关闭摄像头 */
286
+    videoClickOn() {
287
+      trtc.updateLocalVideo({ mute: true }).then(() => {
288
+        this.videoFlag = false;
289
+        this.$message({
290
+          message: "摄像头已关闭",
291
+          type: "success",
292
+        });
293
+      });
294
+    },
295
+    /**点击关闭摄像头图标,开启摄像头 */
296
+    videoClickOff() {
297
+      trtc.updateLocalVideo({ mute: false }).then(() => {
298
+        this.videoFlag = true;
299
+        this.$message({
300
+          message: "摄像头已开启",
301
+          type: "success",
302
+        });
303
+      });
304
+    },
305
+    /**共享屏幕 */
306
+    sharClickOn() {
307
+      this.sharFlag = false;
308
+      this.videoList = "videoList1";
309
+      this.videoClass = "videoItem2";
310
+      this.screenShareFlag = true;
311
+    },
312
+    /**关闭共享屏幕 */
313
+    sharClickOff() {
314
+      this.sharFlag = true;
315
+      this.videoList = "videoList";
316
+      this.screenShareFlag = false;
317
+      if(this.userList.length >= 1){
318
+        this.videoClass = "videoItem1";
319
+      }else{
320
+        this.videoClass = "videoItem";
321
+      }
322
+    },
255 323
     /**获取当前用户操作权限 */
256 324
     getMenuPermsByUserFn() {
257 325
       getMenuPermsByUser().then((res) => {
258
-        // console.log(res.perms, "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK");
259 326
         this.editFlag = res.perms.includes("caseManagement:list:editOffice");
260 327
       });
261 328
     },
@@ -306,11 +373,11 @@ export default {
306 373
       this.$refs.upload3.clearFiles();
307 374
       this.selectByIdFn(this.caseId);
308 375
     },
309
-    preview(item,flag) {
376
+    preview(item, flag) {
310 377
       if (item.onlyOfficeFileId) {
311 378
         this.$router.push({
312 379
           path: "/onlyoffice",
313
-          query: { id: item.onlyOfficeFileId,flag:flag },
380
+          query: { id: item.onlyOfficeFileId, flag: flag },
314 381
         });
315 382
       } else {
316 383
         window.open(
@@ -378,8 +445,8 @@ export default {
378 445
             this.applicantFile.push(item);
379 446
           } else if (item.annexType == 12) {
380 447
             this.resFile.push(item);
381
-          }else if (item.annexType == 7){
382
-            this.mediateFile.push(item)
448
+          } else if (item.annexType == 7) {
449
+            this.mediateFile.push(item);
383 450
           }
384 451
         });
385 452
       });
@@ -444,13 +511,6 @@ export default {
444 511
                 `<span>${res.result.voice_text_str}</span>`;
445 512
             };
446 513
         }, 2000);
447
-
448
-        if (this.modileFlag) {
449
-          this.userClass = getWidth(this.userList);
450
-          this.userHeight = getHeight(this.userList);
451
-        } else {
452
-          this.userClassPhone = getWidthPhone(this.userList);
453
-        }
454 514
         setTimeout(() => {
455 515
           trtc.startRemoteVideo({ userId, streamType, view: `${userId}` });
456 516
         });
@@ -476,7 +536,6 @@ export default {
476 536
           this.userList.splice(deleteIndex, 1);
477 537
         }
478 538
         if (this.modileFlag) {
479
-          this.userClass = getWidth(this.userList);
480 539
           this.userHeight = getHeight(this.userList);
481 540
         } else {
482 541
           this.userClassPhone = getWidthPhone(this.userList);
@@ -517,6 +576,11 @@ export default {
517 576
     },
518 577
   },
519 578
   async mounted() {
579
+    if (this.userList.length == 1) {
580
+      this.videoClass = "videoItem";
581
+    } else if (this.userList.length > 1) {
582
+      this.videoClass = "videoItem1";
583
+    }
520 584
     // 判断设备类型
521 585
     this.modileFlag = getModile();
522 586
     let roomId = this.$route.query.roomId;
@@ -608,13 +672,34 @@ export default {
608 672
 .roompage {
609 673
   width: 100%;
610 674
   height: 100vh;
675
+}
676
+.content {
677
+  width: 100%;
678
+  height: 90%;
611 679
   display: flex;
680
+}
681
+.videoList {
682
+  width: 100%;
683
+  height: 100%;
684
+  display: flex;
685
+  justify-content: space-around;
686
+  flex-wrap: wrap;
612 687
   align-items: center;
688
+  overflow-y: scroll;
689
+  margin-bottom: 20px;
690
+  position: relative;
691
+}
692
+.videoList1 {
693
+  width: 20%;
694
+  height: 100%;
695
+  display: flex;
613 696
   justify-content: space-around;
614 697
   flex-wrap: wrap;
698
+  align-items: center;
699
+  overflow-y: scroll;
700
+  margin-bottom: 20px;
615 701
   position: relative;
616 702
 }
617
-
618 703
 .txtContent {
619 704
   width: 100px;
620 705
   height: 50px;
@@ -625,37 +710,25 @@ export default {
625 710
   cursor: pointer;
626 711
 }
627 712
 
628
-.userVideo,
629
-.userVideo1,
630
-.userVideo2,
631
-.userVideo3,
632
-.userVideo4,
633
-.userVideo5 {
634
-  position: relative;
635
-}
636
-
637
-.userVideo5 {
713
+.videoItem {
638 714
   width: 100%;
715
+  height: 100%;
716
+  background: red;
717
+  border-radius: 20px;
639 718
 }
640
-
641
-.userVideo {
642
-  width: 48%;
643
-}
644
-
645
-.userVideo1 {
646
-  width: 33%;
647
-}
648
-
649
-.userVideo2 {
650
-  width: 33%;
651
-}
652
-
653
-.userVideo3 {
654
-  width: 33%;
719
+.videoItem1 {
720
+  width: 32%;
721
+  height: 32%;
722
+  background: red;
723
+  border-radius: 20px;
655 724
 }
656
-
657
-.userVideo4 {
658
-  width: 100%;
725
+.videoItem2 {
726
+  width: 90%;
727
+  height: 25%;
728
+  background: red;
729
+  border-radius: 20px;
730
+  margin-bottom: 20px;
731
+  position: relative;
659 732
 }
660 733
 
661 734
 .footer {
@@ -666,7 +739,11 @@ export default {
666 739
   bottom: 0;
667 740
   z-index: 10;
668 741
 }
669
-
742
+.screenShare {
743
+  width: 80%;
744
+  height: 100%;
745
+  background: yellow;
746
+}
670 747
 .userName {
671 748
   border-radius: 10px;
672 749
   width: 90px;
@@ -680,7 +757,11 @@ export default {
680 757
   z-index: 9;
681 758
   color: #ffffff;
682 759
 }
683
-
760
+.footerList {
761
+  width: 100%;
762
+  height: 10%;
763
+  background: green;
764
+}
684 765
 .userNamePhone {
685 766
   border-radius: 10px;
686 767
   min-width: 20%;

+ 112
- 0
src/views/test.vue Visa fil

@@ -0,0 +1,112 @@
1
+<template>
2
+  <div class="page">
3
+    <div class="content">
4
+      <div class="screenShare" v-if="screenShareFlag"></div>
5
+      <div :class="videoList">
6
+        <div :class="videoClass" v-for="(item, index) in vivdeoList"></div>
7
+      </div>
8
+    </div>
9
+    <div class="footerList">
10
+      <button @click="screenShare">分享</button>
11
+      <button @click="screenShareQ">取消分享</button>
12
+    </div>
13
+  </div>
14
+</template>
15
+
16
+<script>
17
+export default {
18
+  props: [],
19
+  data() {
20
+    return {
21
+      vivdeoList: [1],
22
+      videoClass: "videoItem",
23
+      videoList: "videoList",
24
+      screenShareFlag: false,
25
+    };
26
+  },
27
+  methods: {
28
+    screenShare() {
29
+      this.videoList = "videoList1";
30
+      this.screenShareFlag = true;
31
+      this.videoClass = "videoItem2";
32
+    },
33
+    screenShareQ(){
34
+       this.videoList = "videoList";
35
+       if(this.vivdeoList.length > 1){
36
+         this.videoClass = "videoItem1";
37
+       }else{
38
+         this.videoClass = "videoItem";
39
+       }
40
+      this.screenShareFlag = false;
41
+    }
42
+  },
43
+  mounted() {
44
+    if (this.vivdeoList.length == 1) {
45
+      this.videoClass = "videoItem";
46
+    } else if(this.vivdeoList.length > 1){
47
+      this.videoClass = "videoItem1";
48
+    }
49
+  },
50
+  watch: {},
51
+};
52
+</script>
53
+<style scoped>
54
+.page {
55
+  width: 100%;
56
+  height: 100vh;
57
+}
58
+.content {
59
+  width: 100%;
60
+  height: 90%;
61
+  display: flex;
62
+}
63
+.videoList {
64
+  width: 100%;
65
+  height: 100%;
66
+  display: flex;
67
+  justify-content: space-around;
68
+  flex-wrap: wrap;
69
+  align-items: center;
70
+  overflow-y: scroll;
71
+  margin-bottom: 20px;
72
+}
73
+.videoList1 {
74
+  width: 20%;
75
+  height: 100%;
76
+  display: flex;
77
+  justify-content: space-around;
78
+  flex-wrap: wrap;
79
+  align-items: center;
80
+  overflow-y: scroll;
81
+  margin-bottom: 20px;
82
+}
83
+.screenShare {
84
+  width: 80%;
85
+  height: 90%;
86
+  background: yellow;
87
+}
88
+.footerList {
89
+  width: 100%;
90
+  height: 10%;
91
+  background: green;
92
+}
93
+.videoItem {
94
+  width: 100%;
95
+  height: 100%;
96
+  background: red;
97
+  border-radius: 20px;
98
+}
99
+.videoItem1 {
100
+  width: 32%;
101
+  height: 32%;
102
+  background: red;
103
+  border-radius: 20px;
104
+}
105
+.videoItem2 {
106
+  width: 90%;
107
+  height: 25%;
108
+  background: red;
109
+  border-radius: 20px;
110
+  margin-bottom: 20px;
111
+}
112
+</style>

+ 854
- 0
src/views/testRoom.vue Visa fil

@@ -0,0 +1,854 @@
1
+<template>
2
+  <div class="page">
3
+    <div class="roompage" @mouseover="mouseHover" v-if="modileFlag">
4
+      <div class="txtContent">
5
+        <el-tag type="danger" @click="txtContent" v-if="modileFlag"
6
+          >会议内容</el-tag
7
+        >
8
+      </div>
9
+      <div class="content">
10
+        <div class="screenShare" v-if="screenShareFlag"></div>
11
+
12
+        <div :class="videoList">
13
+          <div :class="videoClass" id="localStream">
14
+            <div class="userName">{{ userId }}</div>
15
+          </div>
16
+          <div
17
+            :class="videoClass"
18
+            v-for="(item, index) in userList"
19
+            :key="index"
20
+            :id="item"
21
+          >
22
+            <div class="userName">{{ item }}</div>
23
+          </div>
24
+        </div>
25
+      </div>
26
+      <div class="footerList">
27
+        <roomFooter
28
+          @exitRoom="exitRoom"
29
+          @micClickOn="micClickOn"
30
+          @micClickOff="micClickOff"
31
+          @videoClickOn="videoClickOn"
32
+          @videoClickOff="videoClickOff"
33
+          @sharClickOn="sharClickOn"
34
+          @sharClickOff="sharClickOff"
35
+          :roomId="roomId"
36
+          :micFlag="micFlag"
37
+          :videoFlag="videoFlag"
38
+          :sharFlag="sharFlag"
39
+        ></roomFooter>
40
+      </div>
41
+    </div>
42
+    <div class="roomPhone" v-if="!modileFlag">
43
+      <div class="header">
44
+        <roomFooterPhone @exitRoom="exitRoom"></roomFooterPhone>
45
+      </div>
46
+      <div class="bodyVideo">
47
+        <div :class="userClassPhone" id="localStream">
48
+          <div class="userNamePhone">{{ userId }}</div>
49
+        </div>
50
+        <div
51
+          :class="userClassPhone"
52
+          v-for="(item, index) in userList"
53
+          :key="index"
54
+          :id="item"
55
+        >
56
+          <div class="userNamePhone">{{ item }}</div>
57
+        </div>
58
+      </div>
59
+    </div>
60
+    <!-- 语音转文字弹窗 -->
61
+    <el-drawer title="会议内容" :visible.sync="textVisible" :modal="false">
62
+      <div style="margin-left: 20px; margin-bottom: 10px">
63
+        <div
64
+          style="
65
+            width: 100%;
66
+            display: flex;
67
+            justify-content: space-around;
68
+            margin-bottom: 10px;
69
+          "
70
+        >
71
+          <el-upload
72
+            ref="upload"
73
+            :limit="1"
74
+            action="https://api.xayunmei.com/tiaojieapi/video/upload"
75
+            :headers="headers"
76
+            :data="filedata"
77
+            :on-change="beforeUpload"
78
+            :on-success="handlSuccess"
79
+            :file-list="fileList"
80
+            v-if="appFlag"
81
+          >
82
+            <el-button slot="trigger" size="small" type="primary"
83
+              >申请人上传证据</el-button
84
+            >
85
+          </el-upload>
86
+          <el-upload
87
+            v-if="resFlag"
88
+            ref="upload1"
89
+            :limit="1"
90
+            action="https://api.xayunmei.com/tiaojieapi/video/upload"
91
+            :headers="headers1"
92
+            :data="filedata1"
93
+            :on-change="beforeUpload1"
94
+            :on-success="handlSuccess1"
95
+            :file-list="fileList1"
96
+          >
97
+            <el-button slot="trigger" size="small" type="primary"
98
+              >被申请人上传证据</el-button
99
+            >
100
+          </el-upload>
101
+          <el-upload
102
+            v-if="editFlag"
103
+            ref="upload3"
104
+            :limit="1"
105
+            action="https://api.xayunmei.com/tiaojieapi/video/upload"
106
+            :headers="headers3"
107
+            :data="filedata3"
108
+            :on-change="beforeUpload3"
109
+            :on-success="handlSuccess3"
110
+            :file-list="fileList3"
111
+            accept=".doc,.docx"
112
+          >
113
+            <el-button slot="trigger" size="small" type="primary"
114
+              >上传调解书</el-button
115
+            >
116
+          </el-upload>
117
+        </div>
118
+        <div class="list">
119
+          <div class="applicant" v-if="applicantFile.length > 0">
120
+            <div>申请人证据</div>
121
+            <div
122
+              style="color: #104fad; cursor: pointer"
123
+              v-for="(item, index) in applicantFile"
124
+              :key="index"
125
+              @click="preview(item, 0)"
126
+            >
127
+              {{ item.annexName }}
128
+            </div>
129
+          </div>
130
+          <div class="res" v-if="resFile.length > 0">
131
+            <div>被申请人证据</div>
132
+            <div
133
+              style="color: #104fad; cursor: pointer"
134
+              v-for="(item, index) in resFile"
135
+              :key="index"
136
+              @click="preview(item, 0)"
137
+            >
138
+              {{ item.annexName }}
139
+            </div>
140
+          </div>
141
+          <div class="mediate" v-if="mediateFile.length > 0">
142
+            <div>调解书</div>
143
+            <div
144
+              style="color: #104fad; cursor: pointer"
145
+              v-for="(item, index) in mediateFile"
146
+              :key="index"
147
+              @click="preview(item, 1)"
148
+            >
149
+              {{ item.annexName }}
150
+            </div>
151
+          </div>
152
+        </div>
153
+      </div>
154
+      <quill-editor
155
+        ref="myQuillEditor"
156
+        v-model="contentValue"
157
+        :options="editorOption"
158
+        @blur="onEditorBlur($event)"
159
+        @focus="onEditorFocus($event)"
160
+        @ready="onEditorReady($event)"
161
+      ></quill-editor>
162
+      <el-button
163
+        class="updataBtn"
164
+        @click="updataClick"
165
+        type="primary"
166
+        :disabled="!updataFlag"
167
+        >确认修改内容</el-button
168
+      >
169
+    </el-drawer>
170
+  </div>
171
+</template>
172
+  
173
+<script>
174
+import { getUsersig, reserveConferenceList } from "@/api/home";
175
+import {
176
+  secretaryRoleByUserId,
177
+  htmlToPDF,
178
+  selectById,
179
+  selectRoleMenuByCaseId,
180
+  getMenuPermsByUser,
181
+} from "@/api/room";
182
+import { getWidth, getHeight, getWidthPhone, getModile } from "@/utils/utils";
183
+import roomFooter from "./components/roomFooter.vue";
184
+import roomFooterPhone from "./components/footerPhone.vue";
185
+import ASR from "../utils/asr.esm.js";
186
+import TRTC from "trtc-sdk-v5";
187
+let trtc = null;
188
+import "quill/dist/quill.core.css";
189
+import "quill/dist/quill.snow.css";
190
+import "quill/dist/quill.bubble.css";
191
+import { quillEditor } from "vue-quill-editor";
192
+export default {
193
+  name: "App",
194
+  components: {
195
+    roomFooter,
196
+    roomFooterPhone,
197
+    quillEditor,
198
+  },
199
+  data() {
200
+    return {
201
+      videoList: "videoList",
202
+      videoClass: "videoItem",
203
+      resFlag: null,
204
+      appFlag: null,
205
+      userClassPhone: "userVideoPhone",
206
+      userList: [],
207
+      userHeight: "100%",
208
+      userPhoneHeight: "92%",
209
+      userSign: "",
210
+      roomId: "",
211
+      userId: null,
212
+      id: null,
213
+      showFlag: false,
214
+      modileFlag: false,
215
+      localStreamAsr: null,
216
+      contentValue: "",
217
+      textVisible: false,
218
+      screenShareFlag: false,
219
+      editorOption: {
220
+        // Some Quill options...
221
+      },
222
+      asrList: {},
223
+      updataFlag: true,
224
+      token: "",
225
+      applicantFile: [],
226
+      resFile: [],
227
+      mediateFile: [],
228
+      headers: {
229
+        // Authorization: "Bearer " + token,
230
+        Authorization: "",
231
+      },
232
+      filedata: {
233
+        annexType: 2,
234
+        officeFlag: 0,
235
+        caseId: null,
236
+      },
237
+      fileList: [],
238
+      headers1: {
239
+        // Authorization: "Bearer " + token,
240
+        Authorization: "",
241
+      },
242
+      filedata1: {
243
+        annexType: 12,
244
+        officeFlag: 0,
245
+        caseId: null,
246
+      },
247
+      fileList1: [],
248
+      headers3: {
249
+        // Authorization: "Bearer " + token,
250
+        Authorization: "",
251
+      },
252
+      filedata3: {
253
+        annexType: 7,
254
+        officeFlag: 0,
255
+        caseId: null,
256
+      },
257
+      fileList3: [],
258
+      editFlag: false,
259
+      micFlag: true,
260
+      videoFlag: true,
261
+      sharFlag: true,
262
+    };
263
+  },
264
+  methods: {
265
+    /**点击开启麦克风图标,关闭麦克风 */
266
+    micClickOn() {
267
+      trtc.updateLocalAudio({ mute: true }).then(() => {
268
+        this.micFlag = false;
269
+        this.$message({
270
+          message: "麦克风关闭",
271
+          type: "success",
272
+        });
273
+      });
274
+    },
275
+    /**点击关闭麦克风图标,开启麦克风 */
276
+    micClickOff() {
277
+      trtc.updateLocalAudio({ mute: false }).then(() => {
278
+        this.micFlag = true;
279
+        this.$message({
280
+          message: "麦克风开启",
281
+          type: "success",
282
+        });
283
+      });
284
+    },
285
+    /**点击开启摄像头图标,关闭摄像头 */
286
+    videoClickOn() {
287
+      trtc.updateLocalVideo({ mute: true }).then(() => {
288
+        this.videoFlag = false;
289
+        this.$message({
290
+          message: "摄像头已关闭",
291
+          type: "success",
292
+        });
293
+      });
294
+    },
295
+    /**点击关闭摄像头图标,开启摄像头 */
296
+    videoClickOff() {
297
+      trtc.updateLocalVideo({ mute: false }).then(() => {
298
+        this.videoFlag = true;
299
+        this.$message({
300
+          message: "摄像头已开启",
301
+          type: "success",
302
+        });
303
+      });
304
+    },
305
+    /**共享屏幕 */
306
+    sharClickOn() {
307
+      this.sharFlag = false;
308
+      this.videoList = "videoList1";
309
+      this.videoClass = "videoItem2";
310
+      this.screenShareFlag = true;
311
+    },
312
+    /**关闭共享屏幕 */
313
+    sharClickOff() {
314
+      this.sharFlag = true;
315
+      this.videoList = "videoList";
316
+      this.screenShareFlag = false;
317
+      if(this.userList.length >= 1){
318
+        this.videoClass = "videoItem1";
319
+      }else{
320
+        this.videoClass = "videoItem";
321
+      }
322
+    },
323
+    /**获取当前用户操作权限 */
324
+    getMenuPermsByUserFn() {
325
+      getMenuPermsByUser().then((res) => {
326
+        this.editFlag = res.perms.includes("caseManagement:list:editOffice");
327
+      });
328
+    },
329
+    beforeUpload(file, fileList) {
330
+      this.fileList = fileList;
331
+      if (file.name.indexOf("docx") == -1) {
332
+        this.filedata.officeFlag = 0;
333
+      } else {
334
+        this.filedata.officeFlag = 1;
335
+      }
336
+    },
337
+    // 文件上传成功
338
+    handlSuccess(res, file) {
339
+      this.$message({
340
+        message: "上传成功",
341
+        type: "success",
342
+      });
343
+      this.$refs.upload.clearFiles();
344
+      this.selectByIdFn(this.caseId);
345
+    },
346
+    beforeUpload1(file, fileList) {
347
+      this.fileList1 = fileList;
348
+      if (file.name.indexOf("docx") == -1) {
349
+        this.filedata1.officeFlag = 0;
350
+      } else {
351
+        this.filedata1.officeFlag = 1;
352
+      }
353
+    },
354
+    // 文件上传成功
355
+    handlSuccess1(res, file) {
356
+      this.$message({
357
+        message: "上传成功",
358
+        type: "success",
359
+      });
360
+      this.$refs.upload1.clearFiles();
361
+      this.selectByIdFn(this.caseId);
362
+    },
363
+    beforeUpload3(file, fileList) {
364
+      this.fileList3 = fileList;
365
+      this.filedata3.officeFlag = 1;
366
+    },
367
+    // 文件上传成功
368
+    handlSuccess3(res, file) {
369
+      this.$message({
370
+        message: "上传成功",
371
+        type: "success",
372
+      });
373
+      this.$refs.upload3.clearFiles();
374
+      this.selectByIdFn(this.caseId);
375
+    },
376
+    preview(item, flag) {
377
+      if (item.onlyOfficeFileId) {
378
+        this.$router.push({
379
+          path: "/onlyoffice",
380
+          query: { id: item.onlyOfficeFileId, flag: flag },
381
+        });
382
+      } else {
383
+        window.open(
384
+          "https://api.xayunmei.com/tiaojieapi" + item.annexPath,
385
+          "_black"
386
+        );
387
+      }
388
+    },
389
+    // 点击提交修改后的内容
390
+    updataClick() {
391
+      this.contentValue = this.contentValue.replace(/<br>/g, "");
392
+      htmlToPDF({
393
+        caseId: this.caseId,
394
+        htmlContent: this.contentValue,
395
+      }).then((res) => {
396
+        if (res.code == 200) {
397
+          this.$message({
398
+            message: "提交修改成功",
399
+            type: "success",
400
+          });
401
+        } else {
402
+          this.$message({
403
+            message: res.msg,
404
+            type: "error",
405
+          });
406
+        }
407
+      });
408
+    },
409
+    onEditorBlur(quill) {
410
+      console.log("editor blur!", this.content, quill);
411
+    },
412
+    onEditorFocus(quill) {
413
+      if (!this.updataFlag) {
414
+        quill.enable(false);
415
+      } else {
416
+        quill.enable(true);
417
+      }
418
+      console.log("editor focus!", quill);
419
+    },
420
+    onEditorReady(quill) {
421
+      console.log("editor ready!", quill);
422
+    },
423
+    onEditorChange({ quill, html, text }) {
424
+      console.log("editor change!", quill, html, text);
425
+      this.content = html;
426
+    },
427
+    // 点击显示修改的文本框
428
+    txtContent() {
429
+      this.textVisible = true;
430
+      setInterval(() => {
431
+        this.selectByIdFn(this.caseId);
432
+      }, 8000);
433
+      this.selectRoleMenuByCaseIdFn(this.caseId);
434
+      this.getMenuPermsByUserFn();
435
+    },
436
+    /** 获取证据列表 */
437
+    selectByIdFn(id) {
438
+      selectById(id).then((res) => {
439
+        this.applicantFile = [];
440
+        this.resFile = [];
441
+        this.mediateFile = [];
442
+        let fileList = res.data.caseAttachList;
443
+        fileList.forEach((item) => {
444
+          if (item.annexType == 2) {
445
+            this.applicantFile.push(item);
446
+          } else if (item.annexType == 12) {
447
+            this.resFile.push(item);
448
+          } else if (item.annexType == 7) {
449
+            this.mediateFile.push(item);
450
+          }
451
+        });
452
+      });
453
+    },
454
+    // 鼠标滑过显示操作栏
455
+    mouseHover() {
456
+      this.showFlag = true;
457
+      setTimeout(() => {
458
+        this.showFlag = false;
459
+      }, 4000);
460
+    },
461
+    async exitRoom() {
462
+      // // 关闭识别
463
+      Object.keys(this.asrList).forEach((key) => {
464
+        this.asrList[key].stop();
465
+      });
466
+      this.localStreamAsr.stop();
467
+      await trtc.exitRoom();
468
+      await trtc.updateLocalVideo({ publish: false });
469
+      await trtc.updateLocalAudio({ publish: false });
470
+      await trtc.destroy();
471
+      this.$router.push({
472
+        name: "Home",
473
+      });
474
+    },
475
+    // 获取拉流信息
476
+    getPushVideo() {
477
+      trtc.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE, (event) => {
478
+        const userId = event.userId;
479
+        const streamType = event.streamType;
480
+        this.userList.push(userId);
481
+        setTimeout(() => {
482
+          let aoido = trtc.getAudioTrack(userId);
483
+          this.asrList[this.userList[this.userList.length - 1]] = new ASR({
484
+            secretKey: "INDrIXcT8YmomZBcsy0oNirnU0LTN4X7",
485
+            secretId: "AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv",
486
+            appId: 1304001529,
487
+            engine_model_type: "16k_zh",
488
+            voice_format: 1,
489
+            needvad: 1,
490
+            audioTrack: aoido,
491
+          });
492
+          this.asrList[this.userList[this.userList.length - 1]].start();
493
+          // 开始识别
494
+          this.asrList[
495
+            this.userList[this.userList.length - 1]
496
+          ].OnRecognitionStart = (res) => {
497
+            console.log("远端流:开始识别", res);
498
+          };
499
+          this.asrList[this.userList[this.userList.length - 1]].OnError = (
500
+            res
501
+          ) => {
502
+            console.log("远端流:识别失败", res);
503
+          };
504
+          // 一句话结束
505
+          this.asrList[this.userList[this.userList.length - 1]].OnSentenceEnd =
506
+            (res) => {
507
+              console.log("远端流:一句话结束", res);
508
+              this.contentValue =
509
+                this.contentValue +
510
+                `<h2>${userId}</h2>` +
511
+                `<span>${res.result.voice_text_str}</span>`;
512
+            };
513
+        }, 2000);
514
+
515
+        if (this.modileFlag) {
516
+          this.userHeight = getHeight(this.userList);
517
+        } else {
518
+          this.userClassPhone = getWidthPhone(this.userList);
519
+        }
520
+        setTimeout(() => {
521
+          trtc.startRemoteVideo({ userId, streamType, view: `${userId}` });
522
+        });
523
+
524
+        // })
525
+      });
526
+    },
527
+    // 删除退出会议人员列表
528
+    deletePushVideo() {
529
+      trtc.on(TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE, (event) => {
530
+        const userId = event.userId;
531
+        if (this.hostId == userId) {
532
+          alert("主持人已经解散会议");
533
+          this.$router.push({
534
+            name: "Home",
535
+          });
536
+          this.userList = [];
537
+          return;
538
+        }
539
+        let deleteIndex = this.userList.indexOf(userId);
540
+        this.userList = this.userList.filter((item) => item !== userId);
541
+        if (deleteIndex !== -1) {
542
+          this.userList.splice(deleteIndex, 1);
543
+        }
544
+        if (this.modileFlag) {
545
+          this.userHeight = getHeight(this.userList);
546
+        } else {
547
+          this.userClassPhone = getWidthPhone(this.userList);
548
+        }
549
+        Object.keys(this.asrList).forEach((key) => {
550
+          this.asrList[userId].stop();
551
+        });
552
+      });
553
+    },
554
+    // 根据caseId查询房间相关信息
555
+    reserveConferenceListFn(data) {
556
+      reserveConferenceList(data).then((res) => {
557
+        this.hostId = res.data[0].userName;
558
+      });
559
+    },
560
+    // 根据userid查询是否是秘书角色
561
+    secretaryRoleByUserIdFn(data, data1) {
562
+      secretaryRoleByUserId(data, data1).then((res) => {
563
+        this.updataFlag = res.data.isSecretaryRole;
564
+      });
565
+    },
566
+    /**获取申请人被申请人权限 */
567
+    selectRoleMenuByCaseIdFn(caseId) {
568
+      selectRoleMenuByCaseId(caseId).then((res) => {
569
+        if (res.appFlag && res.appFlag == "1") {
570
+          this.appFlag = true;
571
+          this.resFlag = false;
572
+        } else if (res.resFlag && res.resFlag == "1") {
573
+          this.resFlag = true;
574
+          this.appFlag = false;
575
+        }
576
+      });
577
+    },
578
+  },
579
+  computed: {
580
+    editor() {
581
+      return this.$refs.myQuillEditor.quill;
582
+    },
583
+  },
584
+  async mounted() {
585
+    if (this.userList.length == 1) {
586
+      this.videoClass = "videoItem";
587
+    } else if (this.userList.length > 1) {
588
+      this.videoClass = "videoItem1";
589
+    }
590
+    // 判断设备类型
591
+    this.modileFlag = getModile();
592
+    let roomId = this.$route.query.roomId;
593
+    this.roomId = this.$route.query.roomId;
594
+    let userId = this.$route.query.userId;
595
+    this.userId = this.$route.query.userId;
596
+    this.caseId = this.$route.query.caseId;
597
+    this.id = this.$route.query.id;
598
+    this.token = this.$route.query.token;
599
+    this.headers.Authorization = "Bearer " + this.token;
600
+    this.headers1.Authorization = "Bearer " + this.token;
601
+    this.headers3.Authorization = "Bearer " + this.token;
602
+    this.filedata.caseId = this.caseId;
603
+    this.filedata1.caseId = this.caseId;
604
+    this.filedata3.caseId = this.caseId;
605
+    window.sessionStorage.setItem("token", this.token);
606
+    window.sessionStorage.setItem("userId", this.id);
607
+    this.secretaryRoleByUserIdFn(this.id, this.caseId);
608
+    // 获取主持人的userId
609
+    this.reserveConferenceListFn(this.caseId);
610
+    const sdkAppId = 1600011167;
611
+    // 获取usersign
612
+    await getUsersig(userId).then((res) => {
613
+      this.userSign = res.msg;
614
+    });
615
+    this.getPushVideo();
616
+    this.deletePushVideo();
617
+    try {
618
+      await trtc.enterRoom({
619
+        roomId: Number(roomId),
620
+        scene: "rtc",
621
+        sdkAppId,
622
+        userId,
623
+        userSig: this.userSign,
624
+      });
625
+      await trtc.startLocalVideo({
626
+        view: document.getElementById("localStream"), // 在 DOM 中的 elementId 为 localStream 的标签上预览视频。
627
+      });
628
+      await trtc.startLocalAudio();
629
+      console.log("进房成功");
630
+      this.$message({
631
+        message: "进房成功",
632
+        type: "success",
633
+      });
634
+    } catch (error) {
635
+      console.error("进房失败 " + error);
636
+      this.$message({
637
+        message: "进房失败",
638
+        type: "error",
639
+      });
640
+      // this.$router.push({
641
+      //     name: 'Home'
642
+      // })
643
+    }
644
+    this.localStreamAsr = new ASR({
645
+      secretKey: "INDrIXcT8YmomZBcsy0oNirnU0LTN4X7",
646
+      secretId: "AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv",
647
+      appId: 1304001529,
648
+      engine_model_type: "16k_zh",
649
+      voice_format: 1,
650
+      needvad: 1,
651
+      audioTrack: trtc.getAudioTrack(),
652
+    });
653
+    this.localStreamAsr.start();
654
+    // 开始识别
655
+    this.localStreamAsr.OnRecognitionStart = (res) => {
656
+      console.log("本地流:开始识别", res);
657
+    };
658
+    this.localStreamAsr.OnError = (res) => {
659
+      console.log("本地流:识别失败", res);
660
+    };
661
+    // 一句话结束
662
+    this.localStreamAsr.OnSentenceEnd = (res) => {
663
+      console.log("本地流:一句话结束", res);
664
+      // this.contentValue = `<h2>${this.userId}</h2>` + `<span>${res.result.voice_text_str}</span>`;
665
+      this.contentValue =
666
+        this.contentValue +
667
+        `<h2>${this.userId}</h2>` +
668
+        `<span>${res.result.voice_text_str}</span>`;
669
+    };
670
+  },
671
+  created() {
672
+    trtc = TRTC.create();
673
+  },
674
+};
675
+</script>
676
+  
677
+<style scoped>
678
+.roompage {
679
+  width: 100%;
680
+  height: 100vh;
681
+}
682
+.content {
683
+  width: 100%;
684
+  height: 90%;
685
+  display: flex;
686
+}
687
+.videoList {
688
+  width: 100%;
689
+  height: 100%;
690
+  display: flex;
691
+  justify-content: space-around;
692
+  flex-wrap: wrap;
693
+  align-items: center;
694
+  overflow-y: scroll;
695
+  margin-bottom: 20px;
696
+  position: relative;
697
+}
698
+.videoList1 {
699
+  width: 20%;
700
+  height: 100%;
701
+  display: flex;
702
+  justify-content: space-around;
703
+  flex-wrap: wrap;
704
+  align-items: center;
705
+  overflow-y: scroll;
706
+  margin-bottom: 20px;
707
+  position: relative;
708
+}
709
+.txtContent {
710
+  width: 100px;
711
+  height: 50px;
712
+  position: absolute;
713
+  right: 5px;
714
+  top: 20px;
715
+  z-index: 10;
716
+  cursor: pointer;
717
+}
718
+
719
+.videoItem {
720
+  width: 100%;
721
+  height: 100%;
722
+  background: red;
723
+  border-radius: 20px;
724
+}
725
+.videoItem1 {
726
+  width: 32%;
727
+  height: 32%;
728
+  background: red;
729
+  border-radius: 20px;
730
+}
731
+.videoItem2 {
732
+  width: 90%;
733
+  height: 25%;
734
+  background: red;
735
+  border-radius: 20px;
736
+  margin-bottom: 20px;
737
+  position: relative;
738
+}
739
+
740
+.footer {
741
+  width: 100%;
742
+  height: 10%;
743
+  background: rgb(46 43 43 / 90%);
744
+  position: absolute;
745
+  bottom: 0;
746
+  z-index: 10;
747
+}
748
+.screenShare {
749
+  width: 80%;
750
+  height: 100%;
751
+  background: yellow;
752
+}
753
+.userName {
754
+  border-radius: 10px;
755
+  width: 90px;
756
+  height: 40px;
757
+  text-align: center;
758
+  line-height: 40px;
759
+  background-color: black;
760
+  position: absolute;
761
+  right: 0;
762
+  bottom: 0;
763
+  z-index: 9;
764
+  color: #ffffff;
765
+}
766
+.footerList {
767
+  width: 100%;
768
+  height: 10%;
769
+  background: green;
770
+}
771
+.userNamePhone {
772
+  border-radius: 10px;
773
+  min-width: 20%;
774
+  height: 30px;
775
+  line-height: 30px;
776
+  text-align: center;
777
+  background-color: black;
778
+  font-size: 12px;
779
+  position: absolute;
780
+  right: 0;
781
+  bottom: 0;
782
+  z-index: 9;
783
+  color: #ffffff;
784
+}
785
+
786
+.header {
787
+  width: 100%;
788
+  height: 8%;
789
+  background-color: #716c6c;
790
+  display: flex;
791
+  flex-direction: row-reverse;
792
+  align-items: center;
793
+}
794
+
795
+.roomPhone {
796
+  width: 100%;
797
+  height: 100vh;
798
+}
799
+
800
+.bodyVideo {
801
+  width: 100%;
802
+  height: 92%;
803
+  display: flex;
804
+  flex-wrap: wrap;
805
+  /* justify-content: space-between; */
806
+}
807
+
808
+.userVideoPhone {
809
+  width: 100%;
810
+  height: 100%;
811
+  background-color: yellow;
812
+  position: relative;
813
+}
814
+
815
+.userVideoPhone1 {
816
+  width: 50%;
817
+  flex-basis: calc(33.333% - 3px);
818
+  max-width: calc(33.333% - 3px);
819
+  height: 200px;
820
+  /* height: 0; */
821
+  /* padding-bottom: calc(33.333% - 3px); */
822
+  margin-bottom: 3px;
823
+  position: relative;
824
+}
825
+
826
+.quill-editor {
827
+  height: 70%;
828
+}
829
+
830
+.updataBtn {
831
+  width: 100%;
832
+  position: absolute;
833
+  bottom: 8px;
834
+}
835
+.fileList {
836
+  /* max-height: 300px; */
837
+  /* overflow-y: scroll; */
838
+}
839
+.list {
840
+  display: flex;
841
+  flex-wrap: wrap;
842
+}
843
+.applicant,
844
+.res,
845
+.mediate {
846
+  width: 100%;
847
+  margin-left: 20px;
848
+  margin-bottom: 10px;
849
+  color: #38393b;
850
+}
851
+</style>
852
+  
853
+  
854
+