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
@@ -15,7 +15,6 @@ import '../../../../shared/hooks/useScrollLoading.js';
|
|
15
15
|
import 'stompjs';
|
16
16
|
import 'sockjs-client/dist/sockjs.min.js';
|
17
17
|
import { useVideo } from '../hooks/useVideo.js';
|
18
|
-
import TRTC from 'trtc-sdk-v5';
|
19
18
|
|
20
19
|
const _hoisted_1 = {
|
21
20
|
class: "video-wrapper"
|
@@ -76,20 +75,25 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
76
75
|
const {
|
77
76
|
sendMessage,
|
78
77
|
state,
|
79
|
-
trtcProxy,
|
80
78
|
trtc,
|
81
79
|
timing,
|
82
80
|
voiceClose,
|
83
81
|
isAudio,
|
84
82
|
isCall,
|
85
83
|
startTimer,
|
86
|
-
resetTimer,
|
87
84
|
toggleAudio,
|
88
85
|
messageTypeText,
|
89
86
|
time,
|
90
87
|
installEventHandlers,
|
91
|
-
uninstallEventHandlers
|
92
|
-
|
88
|
+
uninstallEventHandlers,
|
89
|
+
enterRoom,
|
90
|
+
exitRoom,
|
91
|
+
startLocalMedia,
|
92
|
+
MAIN_STREAM_TYPE
|
93
|
+
} = useVideo({
|
94
|
+
isMultiple: false,
|
95
|
+
enableRetry: false
|
96
|
+
});
|
93
97
|
const videoRef = ref();
|
94
98
|
const selfVideoRef = ref();
|
95
99
|
const isConnect = ref(false);
|
@@ -150,20 +154,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
150
154
|
}
|
151
155
|
}
|
152
156
|
async function handleEnter() {
|
153
|
-
const
|
154
|
-
if (!
|
155
|
-
console.log("checkResult :>> ", checkResult);
|
157
|
+
const success = await enterRoom();
|
158
|
+
if (!success) {
|
156
159
|
state.showVideo = false;
|
157
160
|
return;
|
158
161
|
}
|
159
162
|
try {
|
160
|
-
await trtc.enterRoom({
|
161
|
-
strRoomId: state.currentAVMsg.strRoomId,
|
162
|
-
sdkAppId: parseInt(state.userInfo.sdkAppID),
|
163
|
-
userId: state.userInfo.id,
|
164
|
-
userSig: state.userInfo.userSig,
|
165
|
-
proxy: trtcProxy.value
|
166
|
-
});
|
167
163
|
if (!isCall.value) {
|
168
164
|
isConnect.value = true;
|
169
165
|
startTimer();
|
@@ -175,15 +171,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
175
171
|
handleRemoteUserExit,
|
176
172
|
handleRemoteVideoAvailable
|
177
173
|
});
|
178
|
-
await
|
179
|
-
if (isAudio.value)
|
180
|
-
return;
|
181
|
-
await trtc.startLocalVideo({
|
182
|
-
view: selfVideoRef.value
|
183
|
-
});
|
174
|
+
await startLocalMedia(selfVideoRef.value);
|
184
175
|
} catch (error) {
|
185
|
-
console.
|
186
|
-
$message.error(
|
176
|
+
console.error("Error setting up single video call:", error);
|
177
|
+
$message.error("\u8BBE\u7F6E\u89C6\u9891\u901A\u8BDD\u5931\u8D25");
|
187
178
|
state.showVideo = false;
|
188
179
|
}
|
189
180
|
}
|
@@ -204,13 +195,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
204
195
|
handleRemoteUserExit,
|
205
196
|
handleRemoteVideoAvailable
|
206
197
|
});
|
207
|
-
await
|
208
|
-
await trtc.stopLocalAudio();
|
209
|
-
if (isAudio.value)
|
210
|
-
return;
|
211
|
-
await trtc.stopLocalVideo();
|
198
|
+
await exitRoom();
|
212
199
|
} catch (error) {
|
213
|
-
console.
|
200
|
+
console.error("Error during video exit:", error);
|
214
201
|
}
|
215
202
|
}
|
216
203
|
async function handleRemoteVideoAvailable(event) {
|
@@ -219,27 +206,35 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
219
206
|
streamType
|
220
207
|
} = event;
|
221
208
|
try {
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
209
|
+
if (streamType === MAIN_STREAM_TYPE && videoRef.value) {
|
210
|
+
await trtc.startRemoteVideo({
|
211
|
+
userId,
|
212
|
+
streamType,
|
213
|
+
view: videoRef.value
|
214
|
+
});
|
215
|
+
console.log("Remote video rendered for user:", userId);
|
216
|
+
}
|
227
217
|
} catch (error) {
|
228
|
-
console.
|
218
|
+
console.error("Error rendering remote video:", error);
|
229
219
|
}
|
230
220
|
}
|
231
221
|
function handleRemoteAudioAvailable(event) {
|
222
|
+
console.log("Remote audio available:", event.userId);
|
232
223
|
}
|
233
|
-
function handleRemoteUserEnter() {
|
234
|
-
|
235
|
-
|
224
|
+
function handleRemoteUserEnter(event) {
|
225
|
+
console.log("Remote user entered:", event.userId);
|
226
|
+
if (isCall.value) {
|
227
|
+
isConnect.value = true;
|
228
|
+
startTimer();
|
229
|
+
}
|
236
230
|
}
|
237
231
|
function handleRemoteUserExit(event) {
|
238
|
-
console.log("
|
232
|
+
console.log("Remote user exited:", event.userId);
|
239
233
|
handleExit();
|
240
234
|
}
|
241
235
|
function handleError(error) {
|
242
|
-
console.
|
236
|
+
console.error("TRTC error in single video:", error);
|
237
|
+
$message.error("\u89C6\u9891\u901A\u8BDD\u51FA\u73B0\u9519\u8BEF");
|
243
238
|
state.showVideo = false;
|
244
239
|
}
|
245
240
|
watch(() => status.value, (value) => {
|
@@ -1,13 +1,32 @@
|
|
1
1
|
import TRTC from 'trtc-sdk-v5';
|
2
2
|
import { AnyFn } from '../../../../shared/types';
|
3
|
-
|
3
|
+
export interface RemoteUser {
|
4
|
+
id: string;
|
5
|
+
name: string;
|
6
|
+
hasVideo?: boolean;
|
7
|
+
hasAudio?: boolean;
|
8
|
+
}
|
9
|
+
export interface TRTCEvent {
|
10
|
+
userId: string;
|
11
|
+
streamType?: any;
|
12
|
+
available?: boolean;
|
13
|
+
}
|
14
|
+
export interface VideoEventHandlers {
|
4
15
|
handleError: AnyFn;
|
5
16
|
handleRemoteUserEnter: AnyFn;
|
6
17
|
handleRemoteAudioAvailable: AnyFn;
|
7
18
|
handleRemoteUserExit: AnyFn;
|
8
19
|
handleRemoteVideoAvailable: AnyFn;
|
9
|
-
|
10
|
-
|
20
|
+
handleRemoteVideoUnavailable?: AnyFn;
|
21
|
+
handleRemoteAudioUnavailable?: AnyFn;
|
22
|
+
}
|
23
|
+
export interface VideoConfig {
|
24
|
+
isMultiple?: boolean;
|
25
|
+
enableRetry?: boolean;
|
26
|
+
retryDelay?: number;
|
27
|
+
maxRetries?: number;
|
28
|
+
}
|
29
|
+
export declare function useVideo(config?: VideoConfig): {
|
11
30
|
state: {
|
12
31
|
orgId: string | number;
|
13
32
|
currentSessionItem: import("../../../../shared/types").AnyObject;
|
@@ -70,18 +89,43 @@ export declare function useVideo(): {
|
|
70
89
|
timing: import("vue").Ref<string>;
|
71
90
|
voiceClose: import("vue").Ref<boolean>;
|
72
91
|
videocamClose: import("vue").Ref<boolean>;
|
92
|
+
isConnect: import("vue").Ref<boolean>;
|
73
93
|
isAudio: import("vue").ComputedRef<boolean>;
|
74
94
|
isCall: import("vue").ComputedRef<boolean>;
|
75
|
-
startTimer: () => void;
|
76
|
-
resetTimer: () => void;
|
77
|
-
toggleAudio: () => Promise<void>;
|
78
|
-
toggleVideo: () => Promise<void>;
|
79
95
|
messageTypeText: import("vue").ComputedRef<"语音" | "视频">;
|
80
96
|
time: {
|
81
97
|
timer: any;
|
82
98
|
seconds: number;
|
83
99
|
};
|
84
|
-
|
85
|
-
|
100
|
+
remoteUsers: import("vue").Ref<{
|
101
|
+
id: string;
|
102
|
+
name: string;
|
103
|
+
hasVideo?: boolean | undefined;
|
104
|
+
hasAudio?: boolean | undefined;
|
105
|
+
}[]>;
|
106
|
+
videoRefs: import("vue").Ref<Map<string, HTMLElement>>;
|
107
|
+
startTimer: () => void;
|
108
|
+
resetTimer: () => void;
|
109
|
+
toggleAudio: () => Promise<void>;
|
110
|
+
toggleVideo: () => Promise<void>;
|
111
|
+
enterRoom: () => Promise<boolean>;
|
112
|
+
exitRoom: () => Promise<void>;
|
113
|
+
startLocalMedia: (selfVideoRef?: HTMLElement) => Promise<void>;
|
114
|
+
checkTRTCSupport: () => Promise<boolean>;
|
115
|
+
findUser: (userId: string) => RemoteUser | undefined;
|
116
|
+
addOrUpdateUser: (userId: string, updates: Partial<RemoteUser>) => void;
|
117
|
+
removeUser: (userId: string) => void;
|
118
|
+
tryRenderRemoteVideo: (userId: string) => Promise<void>;
|
119
|
+
stopRemoteVideo: (userId: string) => Promise<void>;
|
120
|
+
setVideoRef: (userId: string, el: HTMLElement | null) => void;
|
121
|
+
installEventHandlers: (handlers: VideoEventHandlers) => void;
|
122
|
+
uninstallEventHandlers: (handlers: VideoEventHandlers) => void;
|
123
|
+
cleanupAllResources: () => void;
|
124
|
+
checkAndRenderAllVideos: () => void;
|
125
|
+
forceRenderAllVideos: () => Promise<void>;
|
126
|
+
cleanupInvalidUsers: () => void;
|
127
|
+
isUserValid: (userId: string) => boolean;
|
128
|
+
startUserConnectionMonitoring: () => void;
|
129
|
+
stopUserConnectionMonitoring: () => void;
|
130
|
+
MAIN_STREAM_TYPE: any;
|
86
131
|
};
|
87
|
-
export {};
|