|
|
@@ -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
|
+
|