cnhis-design-vue 3.3.3-beta.52 → 3.3.3-beta.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/button-print/index.d.ts +60 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +60 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +6 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +18 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +8 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +18 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +8 -0
- package/es/components/button-print/src/utils/print.d.ts +2 -2
- package/es/components/button-print/src/utils/print.js +8 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +2 -1
- package/es/components/iho-chat/index.d.ts +40 -49
- package/es/components/iho-chat/src/Index.vue.d.ts +40 -49
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +29 -28
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +240 -93
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +14 -24
- package/es/components/iho-chat/src/components/Video.vue2.js +35 -40
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +54 -10
- package/es/components/iho-chat/src/hooks/useVideo.js +422 -44
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +32 -4
- package/es/components/table-filter/src/tool/baseOptions.js +8 -1
- package/es/components/vertify/src/components/IdentityVerification.vue2.js +53 -11
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/vertify/style/index.css +0 -1
@@ -5,7 +5,7 @@ import { Close, Mic, MicOff, Videocam, VideocamOff, Call, PersonAdd, ResizeOutli
|
|
5
5
|
import { getUserDetailApi } from '../api/index.js';
|
6
6
|
import '@vueuse/core';
|
7
7
|
import { $message } from '../utils/index.js';
|
8
|
-
import
|
8
|
+
import 'lodash-es';
|
9
9
|
import { CHAT_TYPE, SUBSCRIBE_MESSAGE_TYPE } from '../constants/index.js';
|
10
10
|
import '../../../../shared/utils/index.js';
|
11
11
|
import 'date-fns';
|
@@ -17,7 +17,6 @@ import 'stompjs';
|
|
17
17
|
import 'sockjs-client/dist/sockjs.min.js';
|
18
18
|
import { useVideo } from '../hooks/useVideo.js';
|
19
19
|
import { useDraggable } from '../hooks/useDraggable.js';
|
20
|
-
import TRTC from 'trtc-sdk-v5';
|
21
20
|
|
22
21
|
const _hoisted_1 = {
|
23
22
|
class: "top-right-btns"
|
@@ -142,26 +141,37 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
142
141
|
__name: "MultipleVideo",
|
143
142
|
setup(__props) {
|
144
143
|
const selfVideoRef = ref();
|
145
|
-
const remoteUsers = ref([]);
|
146
144
|
const {
|
147
145
|
state,
|
148
146
|
sendMessage,
|
149
|
-
trtc,
|
150
|
-
trtcProxy,
|
151
147
|
voiceClose,
|
152
148
|
isAudio,
|
153
149
|
isCall,
|
154
150
|
startTimer,
|
155
|
-
resetTimer,
|
156
151
|
toggleAudio,
|
157
152
|
messageTypeText,
|
158
153
|
timing,
|
159
154
|
toggleVideo,
|
160
155
|
videocamClose,
|
161
156
|
installEventHandlers,
|
162
|
-
uninstallEventHandlers
|
163
|
-
|
164
|
-
|
157
|
+
uninstallEventHandlers,
|
158
|
+
isConnect,
|
159
|
+
remoteUsers,
|
160
|
+
enterRoom,
|
161
|
+
exitRoom,
|
162
|
+
startLocalMedia,
|
163
|
+
findUser,
|
164
|
+
addOrUpdateUser,
|
165
|
+
removeUser,
|
166
|
+
tryRenderRemoteVideo,
|
167
|
+
stopRemoteVideo,
|
168
|
+
setVideoRef,
|
169
|
+
checkAndRenderAllVideos,
|
170
|
+
MAIN_STREAM_TYPE
|
171
|
+
} = useVideo({
|
172
|
+
isMultiple: true,
|
173
|
+
enableRetry: true
|
174
|
+
});
|
165
175
|
const wrapperRef = ref(null);
|
166
176
|
const handleRef = ref(null);
|
167
177
|
const isMaxSize = ref(true);
|
@@ -191,18 +201,40 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
191
201
|
changeMiniPosition("top-right");
|
192
202
|
}
|
193
203
|
});
|
204
|
+
watch(() => remoteUsers.value.length, (newLength, oldLength) => {
|
205
|
+
console.log(`Remote users count changed: ${oldLength} -> ${newLength}`);
|
206
|
+
if (newLength > 0 && isConnect.value) {
|
207
|
+
setTimeout(() => {
|
208
|
+
checkAndRenderAllVideos();
|
209
|
+
}, 500);
|
210
|
+
}
|
211
|
+
});
|
194
212
|
function handleAddPerson({
|
195
213
|
checkedIds,
|
196
214
|
checkedOptions
|
197
215
|
}) {
|
198
|
-
|
199
|
-
|
200
|
-
|
216
|
+
if (!(checkedIds == null ? void 0 : checkedIds.length)) {
|
217
|
+
console.warn("No users selected to add");
|
218
|
+
return;
|
219
|
+
}
|
220
|
+
console.log("Adding persons to call:", checkedIds, checkedOptions);
|
221
|
+
try {
|
222
|
+
state.currentAVMsg.checkedIds.push(...checkedIds);
|
223
|
+
if (isConnect.value) {
|
224
|
+
sendInvitations(checkedIds);
|
225
|
+
} else {
|
226
|
+
handleCall();
|
227
|
+
}
|
228
|
+
} catch (error) {
|
229
|
+
console.error("Error adding persons to call:", error);
|
230
|
+
$message.error("\u6DFB\u52A0\u53C2\u4F1A\u4EBA\u5931\u8D25");
|
231
|
+
}
|
201
232
|
}
|
202
|
-
function
|
203
|
-
|
204
|
-
|
205
|
-
|
233
|
+
function sendInvitations(userIds) {
|
234
|
+
if (!(userIds == null ? void 0 : userIds.length))
|
235
|
+
return;
|
236
|
+
userIds.forEach((id) => {
|
237
|
+
try {
|
206
238
|
sendMessage({
|
207
239
|
chatType: CHAT_TYPE.SINGLE,
|
208
240
|
content: {
|
@@ -211,134 +243,247 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
211
243
|
},
|
212
244
|
receiver: id
|
213
245
|
});
|
214
|
-
})
|
215
|
-
|
216
|
-
|
246
|
+
} catch (error) {
|
247
|
+
console.error("Failed to send invitation to user:", id, error);
|
248
|
+
}
|
249
|
+
});
|
250
|
+
}
|
251
|
+
function handleCall() {
|
252
|
+
var _a;
|
253
|
+
if (isConnect.value) {
|
254
|
+
console.log("Already connected to call");
|
217
255
|
return;
|
218
|
-
|
256
|
+
}
|
257
|
+
try {
|
258
|
+
if ((_a = state.currentAVMsg.checkedIds) == null ? void 0 : _a.length) {
|
259
|
+
sendInvitations(state.currentAVMsg.checkedIds);
|
260
|
+
}
|
261
|
+
handleEnter();
|
262
|
+
} catch (error) {
|
263
|
+
console.error("Error starting call:", error);
|
264
|
+
$message.error("\u5F00\u59CB\u901A\u8BDD\u5931\u8D25");
|
265
|
+
}
|
219
266
|
}
|
220
267
|
async function handleEnter() {
|
221
|
-
const
|
222
|
-
if (!
|
223
|
-
console.log("checkResult :>> ", checkResult);
|
268
|
+
const success = await enterRoom();
|
269
|
+
if (!success) {
|
224
270
|
state.showMultipleVideo = false;
|
225
271
|
return;
|
226
272
|
}
|
227
273
|
try {
|
228
|
-
await trtc.enterRoom({
|
229
|
-
strRoomId: state.currentAVMsg.strRoomId,
|
230
|
-
sdkAppId: parseInt(state.userInfo.sdkAppID),
|
231
|
-
userId: state.userInfo.id,
|
232
|
-
userSig: state.userInfo.userSig,
|
233
|
-
proxy: trtcProxy.value
|
234
|
-
});
|
235
|
-
isConnect.value = true;
|
236
274
|
startTimer();
|
237
275
|
installEventHandlers({
|
238
276
|
handleError,
|
239
277
|
handleRemoteUserEnter,
|
240
278
|
handleRemoteAudioAvailable,
|
241
279
|
handleRemoteUserExit,
|
242
|
-
handleRemoteVideoAvailable
|
243
|
-
|
244
|
-
await trtc.startLocalAudio({
|
245
|
-
mute: voiceClose.value
|
246
|
-
});
|
247
|
-
if (isAudio.value)
|
248
|
-
return;
|
249
|
-
await trtc.startLocalVideo({
|
250
|
-
view: selfVideoRef.value,
|
251
|
-
mute: videocamClose.value
|
280
|
+
handleRemoteVideoAvailable,
|
281
|
+
handleRemoteVideoUnavailable
|
252
282
|
});
|
283
|
+
await startLocalMedia(selfVideoRef.value);
|
284
|
+
console.log("Successfully set up multiple video call");
|
285
|
+
setTimeout(() => {
|
286
|
+
checkAndRenderAllVideos();
|
287
|
+
}, 1e3);
|
288
|
+
periodicCheckInterval = setInterval(() => {
|
289
|
+
if (isConnect.value && remoteUsers.value.length > 0) {
|
290
|
+
console.log("Periodic video check, current users:", remoteUsers.value.map((u) => `${u.id}(video:${u.hasVideo})`));
|
291
|
+
checkAndRenderAllVideos();
|
292
|
+
} else if (!isConnect.value) {
|
293
|
+
console.log("Not connected, clearing check interval");
|
294
|
+
if (periodicCheckInterval) {
|
295
|
+
clearInterval(periodicCheckInterval);
|
296
|
+
periodicCheckInterval = null;
|
297
|
+
}
|
298
|
+
}
|
299
|
+
}, 5e3);
|
253
300
|
} catch (error) {
|
254
|
-
console.
|
255
|
-
$message.error(
|
301
|
+
console.error("Error setting up multiple video call:", error);
|
302
|
+
$message.error("\u8BBE\u7F6E\u591A\u4EBA\u89C6\u9891\u901A\u8BDD\u5931\u8D25");
|
256
303
|
state.showMultipleVideo = false;
|
257
304
|
}
|
258
305
|
}
|
259
306
|
async function handleExit() {
|
260
307
|
try {
|
261
308
|
state.showMultipleVideo = false;
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
await trtc.stopLocalVideo();
|
309
|
+
if (isConnect.value) {
|
310
|
+
uninstallEventHandlers({
|
311
|
+
handleError,
|
312
|
+
handleRemoteUserEnter,
|
313
|
+
handleRemoteAudioAvailable,
|
314
|
+
handleRemoteUserExit,
|
315
|
+
handleRemoteVideoAvailable,
|
316
|
+
handleRemoteVideoUnavailable
|
317
|
+
});
|
318
|
+
}
|
319
|
+
await exitRoom();
|
274
320
|
} catch (error) {
|
275
|
-
console.
|
321
|
+
console.error("Error during exit:", error);
|
276
322
|
}
|
277
323
|
}
|
278
324
|
async function handleRemoteVideoAvailable(event) {
|
279
325
|
const {
|
280
326
|
userId,
|
281
|
-
streamType
|
327
|
+
streamType,
|
328
|
+
available
|
282
329
|
} = event;
|
330
|
+
if (!userId) {
|
331
|
+
return;
|
332
|
+
}
|
333
|
+
const isMainStream = !streamType || streamType === MAIN_STREAM_TYPE;
|
334
|
+
if (!isMainStream) {
|
335
|
+
return;
|
336
|
+
}
|
283
337
|
try {
|
284
|
-
|
338
|
+
console.log(`Remote video ${available ? "available" : "unavailable"} for user:`, userId);
|
339
|
+
let user = findUser(userId);
|
340
|
+
if (!user) {
|
341
|
+
const name = await getUserName(userId);
|
342
|
+
addOrUpdateUser(userId, {
|
343
|
+
name,
|
344
|
+
hasVideo: true
|
345
|
+
});
|
346
|
+
console.log("Added user from video available event:", userId, name);
|
285
347
|
await nextTick();
|
286
|
-
|
287
|
-
userId
|
288
|
-
|
289
|
-
|
348
|
+
setTimeout(() => {
|
349
|
+
tryRenderRemoteVideo(userId);
|
350
|
+
}, 100);
|
351
|
+
} else {
|
352
|
+
addOrUpdateUser(userId, {
|
353
|
+
hasVideo: true
|
290
354
|
});
|
355
|
+
await nextTick();
|
356
|
+
await tryRenderRemoteVideo(userId);
|
291
357
|
}
|
292
358
|
} catch (error) {
|
293
|
-
console.
|
359
|
+
console.error("Error handling remote video available:", error);
|
294
360
|
}
|
295
361
|
}
|
362
|
+
async function handleRemoteVideoUnavailable(event) {
|
363
|
+
const {
|
364
|
+
userId,
|
365
|
+
streamType,
|
366
|
+
available
|
367
|
+
} = event;
|
368
|
+
addOrUpdateUser(userId, {
|
369
|
+
hasVideo: false
|
370
|
+
});
|
371
|
+
await stopRemoteVideo(userId);
|
372
|
+
}
|
296
373
|
async function handleRemoteAudioAvailable(event) {
|
297
|
-
var _a;
|
298
374
|
const {
|
299
|
-
userId
|
375
|
+
userId,
|
376
|
+
available
|
300
377
|
} = event;
|
301
|
-
if (
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
378
|
+
if (!userId)
|
379
|
+
return;
|
380
|
+
try {
|
381
|
+
console.log(`Remote audio ${available ? "available" : "unavailable"} for user:`, userId);
|
382
|
+
let user = findUser(userId);
|
383
|
+
if (!user && available) {
|
384
|
+
const name = await getUserName(userId);
|
385
|
+
addOrUpdateUser(userId, {
|
386
|
+
name,
|
387
|
+
hasAudio: true
|
388
|
+
});
|
389
|
+
console.log("Added user from audio available event:", userId, name);
|
390
|
+
} else {
|
391
|
+
addOrUpdateUser(userId, {
|
392
|
+
hasAudio: available
|
393
|
+
});
|
394
|
+
}
|
395
|
+
} catch (error) {
|
396
|
+
console.error("Error handling remote audio available:", error);
|
307
397
|
}
|
308
398
|
}
|
309
399
|
async function handleRemoteUserEnter(event) {
|
310
400
|
const {
|
311
401
|
userId
|
312
402
|
} = event;
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
403
|
+
if (!userId)
|
404
|
+
return;
|
405
|
+
try {
|
406
|
+
console.log("\u76D1\u542C\u5230\u8FDC\u7A0B\u7528\u6237\u8FDB\u623F\u95F4\u4E86\u300B\u300B\u300B\u300B\u300B", userId);
|
407
|
+
if (!findUser(userId)) {
|
408
|
+
const name = await getUserName(userId);
|
409
|
+
addOrUpdateUser(userId, {
|
410
|
+
name
|
411
|
+
});
|
412
|
+
console.log("Remote user entered:", userId, name);
|
413
|
+
await nextTick();
|
414
|
+
setTimeout(() => {
|
415
|
+
const user = findUser(userId);
|
416
|
+
if (user == null ? void 0 : user.hasVideo) {
|
417
|
+
console.log("User already has video stream, attempting to render");
|
418
|
+
tryRenderRemoteVideo(userId);
|
419
|
+
}
|
420
|
+
}, 100);
|
421
|
+
}
|
422
|
+
} catch (error) {
|
423
|
+
console.error("Error handling remote user enter:", error);
|
424
|
+
}
|
319
425
|
}
|
320
426
|
async function getUserName(userId) {
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
427
|
+
try {
|
428
|
+
const data = await getUserDetailApi({
|
429
|
+
userId
|
430
|
+
});
|
431
|
+
return (data == null ? void 0 : data.name) || userId;
|
432
|
+
} catch (error) {
|
433
|
+
console.warn("Failed to get user name for:", userId, error);
|
434
|
+
return userId;
|
435
|
+
}
|
325
436
|
}
|
326
437
|
function handleRemoteUserExit(event) {
|
327
|
-
console.log("event :>> \u9000\u623F", event);
|
328
438
|
const {
|
329
439
|
userId
|
330
440
|
} = event;
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
441
|
+
if (!userId)
|
442
|
+
return;
|
443
|
+
console.log("Remote user exited:", userId);
|
444
|
+
try {
|
445
|
+
removeUser(userId);
|
446
|
+
console.log("Cleaned up resources for user:", userId);
|
447
|
+
setTimeout(() => {
|
448
|
+
const user = findUser(userId);
|
449
|
+
if (user) {
|
450
|
+
console.warn("User still exists after removal, force removing:", userId);
|
451
|
+
const userIndex = remoteUsers.value.findIndex((u) => u.id === userId);
|
452
|
+
if (userIndex !== -1) {
|
453
|
+
remoteUsers.value.splice(userIndex, 1);
|
454
|
+
}
|
455
|
+
}
|
456
|
+
}, 100);
|
457
|
+
} catch (error) {
|
458
|
+
console.error("Error handling remote user exit:", error);
|
459
|
+
}
|
335
460
|
}
|
336
461
|
function handleError(error) {
|
337
|
-
console.
|
462
|
+
console.error("TRTC error occurred:", error);
|
463
|
+
if (error.code) {
|
464
|
+
switch (error.code) {
|
465
|
+
case -3301:
|
466
|
+
$message.error("\u8FDB\u5165\u623F\u95F4\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5");
|
467
|
+
break;
|
468
|
+
case -3302:
|
469
|
+
$message.error("\u7F51\u7EDC\u8FDE\u63A5\u65AD\u5F00\uFF0C\u6B63\u5728\u5C1D\u8BD5\u91CD\u8FDE...");
|
470
|
+
break;
|
471
|
+
default:
|
472
|
+
$message.error(`\u901A\u8BDD\u51FA\u73B0\u9519\u8BEF: ${error.message || "\u672A\u77E5\u9519\u8BEF"}`);
|
473
|
+
}
|
474
|
+
} else {
|
475
|
+
$message.error("\u901A\u8BDD\u51FA\u73B0\u672A\u77E5\u9519\u8BEF");
|
476
|
+
}
|
338
477
|
state.showMultipleVideo = false;
|
339
478
|
}
|
340
|
-
|
341
|
-
|
479
|
+
let periodicCheckInterval = null;
|
480
|
+
onBeforeUnmount(async () => {
|
481
|
+
console.log("Component unmounting, cleaning up...");
|
482
|
+
if (periodicCheckInterval) {
|
483
|
+
clearInterval(periodicCheckInterval);
|
484
|
+
periodicCheckInterval = null;
|
485
|
+
}
|
486
|
+
await handleExit();
|
342
487
|
});
|
343
488
|
return (_ctx, _cache) => {
|
344
489
|
return openBlock(), createElementBlock(Fragment, null, [withDirectives(createElementVNode("div", {
|
@@ -352,7 +497,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
352
497
|
ref: handleRef
|
353
498
|
}, [withDirectives(createElementVNode("span", {
|
354
499
|
class: "title"
|
355
|
-
}, toDisplayString(unref(title)), 513), [[vShow, isConnect
|
500
|
+
}, toDisplayString(unref(title)), 513), [[vShow, unref(isConnect)]]), createElementVNode("div", _hoisted_1, [createVNode(unref(NButton), {
|
356
501
|
quaternary: "",
|
357
502
|
size: "tiny",
|
358
503
|
class: "custom-btn",
|
@@ -367,7 +512,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
367
512
|
component: unref(Close)
|
368
513
|
}, null, 8, ["component"])]),
|
369
514
|
_: 1
|
370
|
-
})])], 512), isConnect
|
515
|
+
})])], 512), unref(isConnect) ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("div", {
|
371
516
|
ref_key: "selfVideoRef",
|
372
517
|
ref: selfVideoRef,
|
373
518
|
class: "video-view",
|
@@ -417,12 +562,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
417
562
|
_: 1
|
418
563
|
}), _hoisted_13])]),
|
419
564
|
_: 1
|
420
|
-
}, 8, ["disabledIds"])])])]), createElementVNode("div", _hoisted_14, [(openBlock(true), createElementBlock(Fragment, null, renderList(remoteUsers
|
565
|
+
}, 8, ["disabledIds"])])])]), createElementVNode("div", _hoisted_14, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(remoteUsers), (user) => {
|
421
566
|
return openBlock(), createElementBlock("div", {
|
422
567
|
key: user.id,
|
423
568
|
id: user.id,
|
424
569
|
class: "video-view",
|
425
|
-
"data-name": user.name
|
570
|
+
"data-name": user.name,
|
571
|
+
ref_for: true,
|
572
|
+
ref: (el) => unref(setVideoRef)(user.id, el)
|
426
573
|
}, null, 8, _hoisted_15);
|
427
574
|
}), 128))])])) : (openBlock(), createElementBlock(Fragment, {
|
428
575
|
key: 1
|
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
225
225
|
round: "",
|
226
226
|
size: 100,
|
227
227
|
onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
|
228
|
-
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\
|
228
|
+
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\n <n-upload-trigger #="{ handleClick }" abstract>\n <n-button\n circle\n secondary\n class="edit-avatar"\n v-show="userDetail.id === state.userInfo.id"\n @click="handleClick"\n >\n <template #icon>\n <n-icon size="16" color="#666666" :component="Camera" />\n </template>\n </n-button>\n </n-upload-trigger>\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
|
229
229
|
class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
|
230
230
|
}, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
|
231
231
|
strong: "",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { type TRTCEvent } from '../hooks';
|
2
2
|
import { AV_STATUS } from '../constants';
|
3
3
|
declare const _default: import("vue").DefineComponent<{}, {
|
4
4
|
sendMessage: (message: {
|
@@ -58,36 +58,26 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
58
58
|
};
|
59
59
|
isForward: boolean;
|
60
60
|
};
|
61
|
-
|
62
|
-
trtc: TRTC;
|
61
|
+
trtc: import("trtc-sdk-v5").default;
|
63
62
|
timing: import("vue").Ref<string>;
|
64
63
|
voiceClose: import("vue").Ref<boolean>;
|
65
64
|
isAudio: import("vue").ComputedRef<boolean>;
|
66
65
|
isCall: import("vue").ComputedRef<boolean>;
|
67
66
|
startTimer: () => void;
|
68
|
-
resetTimer: () => void;
|
69
67
|
toggleAudio: () => Promise<void>;
|
70
68
|
messageTypeText: import("vue").ComputedRef<"语音" | "视频">;
|
71
69
|
time: {
|
72
70
|
timer: any;
|
73
71
|
seconds: number;
|
74
72
|
};
|
75
|
-
installEventHandlers: (
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
handleError: import("../../../../shared/types").AnyFn;
|
84
|
-
handleRemoteUserEnter: import("../../../../shared/types").AnyFn;
|
85
|
-
handleRemoteAudioAvailable: import("../../../../shared/types").AnyFn;
|
86
|
-
handleRemoteUserExit: import("../../../../shared/types").AnyFn;
|
87
|
-
handleRemoteVideoAvailable: import("../../../../shared/types").AnyFn;
|
88
|
-
}) => void;
|
89
|
-
videoRef: import("vue").Ref<any>;
|
90
|
-
selfVideoRef: import("vue").Ref<any>;
|
73
|
+
installEventHandlers: (handlers: import("../hooks").VideoEventHandlers) => void;
|
74
|
+
uninstallEventHandlers: (handlers: import("../hooks").VideoEventHandlers) => void;
|
75
|
+
enterRoom: () => Promise<boolean>;
|
76
|
+
exitRoom: () => Promise<void>;
|
77
|
+
startLocalMedia: (selfVideoRef?: HTMLElement | undefined) => Promise<void>;
|
78
|
+
MAIN_STREAM_TYPE: any;
|
79
|
+
videoRef: import("vue").Ref<HTMLElement | undefined>;
|
80
|
+
selfVideoRef: import("vue").Ref<HTMLElement | undefined>;
|
91
81
|
isConnect: import("vue").Ref<boolean>;
|
92
82
|
timeout: any;
|
93
83
|
info: import("vue").ComputedRef<{
|
@@ -102,10 +92,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
102
92
|
handleEnter: () => Promise<void>;
|
103
93
|
handleFinish: () => void;
|
104
94
|
handleExit: () => Promise<void>;
|
105
|
-
handleRemoteVideoAvailable: (event:
|
106
|
-
handleRemoteAudioAvailable: (event:
|
107
|
-
handleRemoteUserEnter: () => void;
|
108
|
-
handleRemoteUserExit: (event:
|
95
|
+
handleRemoteVideoAvailable: (event: TRTCEvent) => Promise<void>;
|
96
|
+
handleRemoteAudioAvailable: (event: TRTCEvent) => void;
|
97
|
+
handleRemoteUserEnter: (event: TRTCEvent) => void;
|
98
|
+
handleRemoteUserExit: (event: TRTCEvent) => void;
|
109
99
|
handleError: (error: any) => void;
|
110
100
|
NButton: any;
|
111
101
|
NAvatar: any;
|