eli-video-interview 1.2.41-alpha.0 → 1.2.41-alpha.2

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.
Files changed (33) hide show
  1. package/esm/components/Charts/ReportPie.js +0 -3
  2. package/esm/constants/ai-question.d.ts +1 -7
  3. package/esm/constants/ai-question.js +7 -7
  4. package/esm/modules/ai-question/components/BootVideo/CustomVideos.d.ts +6 -0
  5. package/esm/modules/ai-question/components/BootVideo/CustomVideos.js +93 -0
  6. package/esm/modules/ai-question/components/BootVideo/UploadPreview.d.ts +11 -0
  7. package/esm/modules/ai-question/components/BootVideo/UploadPreview.js +18 -0
  8. package/esm/modules/ai-question/components/BootVideo/index.js +85 -31
  9. package/esm/modules/ai-question/components/BootVideo/styled.js +1 -1
  10. package/esm/modules/ai-question/components/QuestionModel/Item.js +1 -1
  11. package/esm/modules/ai-question/components/QuestionModel/index.js +8 -3
  12. package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +2 -1
  13. package/esm/modules/ai-question/interface.d.ts +37 -0
  14. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +2 -2
  15. package/esm/store/ai-question/interview-room-store.d.ts +6 -0
  16. package/esm/store/ai-question/interview-room-store.js +1 -0
  17. package/lib/components/Charts/ReportPie.js +0 -3
  18. package/lib/constants/ai-question.d.ts +1 -7
  19. package/lib/constants/ai-question.js +7 -7
  20. package/lib/modules/ai-question/components/BootVideo/CustomVideos.d.ts +6 -0
  21. package/lib/modules/ai-question/components/BootVideo/CustomVideos.js +98 -0
  22. package/lib/modules/ai-question/components/BootVideo/UploadPreview.d.ts +11 -0
  23. package/lib/modules/ai-question/components/BootVideo/UploadPreview.js +20 -0
  24. package/lib/modules/ai-question/components/BootVideo/index.js +81 -27
  25. package/lib/modules/ai-question/components/BootVideo/styled.js +1 -1
  26. package/lib/modules/ai-question/components/QuestionModel/Item.js +1 -1
  27. package/lib/modules/ai-question/components/QuestionModel/index.js +8 -3
  28. package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +2 -1
  29. package/lib/modules/ai-question/interface.d.ts +37 -0
  30. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +2 -2
  31. package/lib/store/ai-question/interview-room-store.d.ts +6 -0
  32. package/lib/store/ai-question/interview-room-store.js +1 -0
  33. package/package.json +1 -1
@@ -66,9 +66,6 @@ var ReportPie = function (props) {
66
66
  var name = _a.name, score = _a.score, params = __rest(_a, ["name", "score"]);
67
67
  return (__assign({ name: formateTitle(name), originalName: name, value: score }, params));
68
68
  });
69
- // .sort(function (a, b) {
70
- // return a.weight - b.weight;
71
- // });
72
69
  var options = {
73
70
  tooltip: {
74
71
  trigger: 'item',
@@ -28,13 +28,7 @@ export declare const DEFAULT_GUIDE_VIDEO: {
28
28
  videoUrl: string;
29
29
  frameUrl: string;
30
30
  }[];
31
- export declare const DEFAULT_VITUAL_HUMAN_LIST: {
32
- name: string;
33
- humanToken: string;
34
- humanType: number;
35
- virtualHumanAvatar: string;
36
- virtualPreviewMedia: string;
37
- }[];
31
+ export declare const DEFAULT_VITUAL_HUMAN_LIST: never[];
38
32
  export declare const InteractiveModes: {
39
33
  1: string;
40
34
  2: string;
@@ -60,13 +60,13 @@ export var DEFAULT_GUIDE_VIDEO = [
60
60
  },
61
61
  ];
62
62
  export var DEFAULT_VITUAL_HUMAN_LIST = [
63
- {
64
- name: 'xuanxuan',
65
- humanToken: '71c932a2db9e420ab8782d68861ad0ff',
66
- humanType: 2,
67
- virtualHumanAvatar: 'https://alicdn.fbmms.cn/virtual-human-20230720-112709.png',
68
- virtualPreviewMedia: 'https://demo1-landing-page.oss-cn-beijing.aliyuncs.com/d5bcc15e-f42f-4bad-bde9-2d6c300bf9ca.mp4',
69
- },
63
+ // {
64
+ // name: 'xuanxuan', // 虚拟人名字
65
+ // humanToken: '71c932a2db9e420ab8782d68861ad0ff', // 数智虚拟人token
66
+ // humanType: 2, // 类型 1: 小面 2:虚拟人
67
+ // virtualHumanAvatar: 'https://alicdn.fbmms.cn/virtual-human-20230720-112709.png',
68
+ // virtualPreviewMedia: 'https://demo1-landing-page.oss-cn-beijing.aliyuncs.com/d5bcc15e-f42f-4bad-bde9-2d6c300bf9ca.mp4',
69
+ // },
70
70
  ];
71
71
  export var InteractiveModes = {
72
72
  1: '传统读题模式',
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const CustomVideos: ({ mediaList, setMediaList }: {
3
+ mediaList: any;
4
+ setMediaList: any;
5
+ }) => JSX.Element;
6
+ export default CustomVideos;
@@ -0,0 +1,93 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
29
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
30
+ if (ar || !(i in from)) {
31
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
32
+ ar[i] = from[i];
33
+ }
34
+ }
35
+ return to.concat(ar || Array.prototype.slice.call(from));
36
+ };
37
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
38
+ import { CustomUploadButtonRoot, CustomUploadedImgRoot } from './styled';
39
+ import UploadPreview from './UploadPreview';
40
+ import { PostCommonUpload } from "../../../../services/ai-question";
41
+ import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
42
+ import { useRequest } from 'ahooks';
43
+ import { AddIcon, Box, Button, InfoOutlineIcon, Message, Typography, Upload } from 'fbm-ui';
44
+ import { Stack, Tooltip } from 'fbm-ui/lib/mui';
45
+ import { useCallback } from 'react';
46
+ var CustomVideos = function (_a) {
47
+ var mediaList = _a.mediaList, setMediaList = _a.setMediaList;
48
+ var _b = useRequest(PostCommonUpload, {
49
+ manual: true,
50
+ onSuccess: function (_a) {
51
+ var data = _a.data;
52
+ var _b = __read(data, 1), item = _b[0];
53
+ setMediaList(__spreadArray(__spreadArray([], __read(mediaList.map(function (v) { return (__assign(__assign({}, v), { selected: false })); })), false), [
54
+ {
55
+ url: item.url,
56
+ selected: true,
57
+ },
58
+ ], false));
59
+ },
60
+ }), loading = _b.loading, postCommonUpload = _b.run;
61
+ var uploadProps = {
62
+ type: 'custom',
63
+ showUploadList: false,
64
+ accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
65
+ maxCount: 7,
66
+ customRequest: function (_a) {
67
+ var file = _a.file;
68
+ console.log('customRequest file', file);
69
+ if (isExceedMaxVideoFileSize(file.size)) {
70
+ Message.error('视频大小超过500M,请重新上传!');
71
+ }
72
+ else {
73
+ var formData = new FormData();
74
+ formData.append('files', file);
75
+ postCommonUpload(formData);
76
+ }
77
+ },
78
+ };
79
+ var handleSelectVideo = useCallback(function (i) {
80
+ setMediaList(__spreadArray([], __read(mediaList.map(function (v, ii) { return (__assign(__assign({}, v), { selected: i === ii })); })), false));
81
+ }, [mediaList, setMediaList]);
82
+ var handleRemoveVideo = useCallback(function (index) {
83
+ var newMediaList = __spreadArray([], __read(mediaList), false);
84
+ newMediaList.splice(index, 1);
85
+ setMediaList(newMediaList);
86
+ }, [mediaList, setMediaList]);
87
+ console.log(mediaList);
88
+ return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsxs(CustomUploadedImgRoot, __assign({ sx: { minHeight: 0 } }, { children: [mediaList === null || mediaList === void 0 ? void 0 : mediaList.map(function (_a, i) {
89
+ var url = _a.url, selected = _a.selected;
90
+ return (_jsx(UploadPreview, { src: "".concat(url, "?x-oss-process=video/snapshot,t_0,f_jpg"), style: { borderColor: selected ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(i); }, onRemove: function () { return handleRemoveVideo(i); } }, url));
91
+ }), loading && _jsx(Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsx(CustomUploadButtonRoot, { children: _jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), _jsx(Tooltip, __assign({ title: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm", placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] })), mediaList.length === 0 && (_jsx(Typography, __assign({ variant: "caption", color: "error" }, { children: "\u4E0A\u4F20\u89C6\u9891\u4E0D\u53EF\u4E3A\u7A7A" })))] }));
92
+ };
93
+ export default CustomVideos;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare const UploadPreview: ({ src, style, onClick, onRemove, height, alt, disabledRemove }: {
3
+ src: any;
4
+ style: any;
5
+ onClick: any;
6
+ onRemove: any;
7
+ height: any;
8
+ alt: any;
9
+ disabledRemove?: boolean | undefined;
10
+ }) => JSX.Element;
11
+ export default UploadPreview;
@@ -0,0 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { Box, CancelIcon, IconButton } from 'fbm-ui';
14
+ var UploadPreview = function (_a) {
15
+ var src = _a.src, style = _a.style, onClick = _a.onClick, onRemove = _a.onRemove, height = _a.height, alt = _a.alt, _b = _a.disabledRemove, disabledRemove = _b === void 0 ? false : _b;
16
+ return (_jsxs(Box, { children: [_jsx("img", { src: src, height: height, style: style, alt: alt, onClick: onClick }), !disabledRemove && (_jsx(IconButton, __assign({ onClick: onRemove, size: "small", sx: { position: 'absolute', top: -14, right: -16 } }, { children: _jsx(CancelIcon, {}) })))] }));
17
+ };
18
+ export default UploadPreview;
@@ -35,28 +35,34 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
35
35
  return to.concat(ar || Array.prototype.slice.call(from));
36
36
  };
37
37
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
38
- import { CustomUploadButtonRoot, CustomUploadCardRoot, CustomUploadCardTitle, CustomUploadedImgRoot } from './styled';
38
+ import CustomVideos from './CustomVideos';
39
+ import { CustomUploadButtonRoot, CustomUploadedImgRoot } from './styled';
39
40
  import ScrollDialogContent from "../../../../components/ScrollDialogContent";
40
- import SvgIcon from "../../../../components/SvgIcon";
41
41
  import { DEFAULT_GUIDE_VIDEO, DEFAULT_VITUAL_HUMAN_LIST } from "../../../../constants/ai-question";
42
42
  import { GetAiInterviewerProfileList, PostCommonUpload } from "../../../../services/ai-question";
43
43
  import { useBootVideoStore } from "../../../../store/ai-question/boot-video-store";
44
44
  import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
45
45
  import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
46
46
  import { useRequest, useSetState } from 'ahooks';
47
- import { AddIcon, Box, Button, Checkbox, Dialog, Message, Radio, RadioGroup, Typography, Upload } from 'fbm-ui';
48
- import { Stack } from 'fbm-ui/lib/mui';
49
- import { useCallback, useEffect, useState } from 'react';
47
+ import { AddIcon, Box, Button, Dialog, InfoOutlineIcon, Message, Radio, RadioGroup, Select, TextField, Typography, Upload, } from 'fbm-ui';
48
+ import { Stack, Tooltip } from 'fbm-ui/lib/mui';
49
+ import { useCallback, useEffect, useMemo, useState } from 'react';
50
+ var Options = [
51
+ { label: '小面播报', value: 1 },
52
+ { label: '虚拟人播报', value: 2 },
53
+ { label: '自定义播报', value: 3 },
54
+ ];
50
55
  var BootVideo = function (props) {
51
- var _a;
56
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
52
57
  var open = props.open, onClose = props.onClose;
53
- var _b = useInterviewRoomStore(), interactType = _b.interactType, aiInterviewerProfile = _b.aiInterviewerProfile, updateInterviewRoom = _b.updateInterviewRoom;
54
- var _c = __read(useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile }), 2), interviewRoomState = _c[0], setInterviewRoomState = _c[1];
55
- var _d = __read(useState(DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _d[0], setVirtualManList = _d[1];
56
- var _e = useBootVideoStore(), mediaUrl = _e.mediaUrl, thumbUrl = _e.thumbUrl, updateBootVideo = _e.updateBootVideo;
57
- var _f = __read(useState(DEFAULT_GUIDE_VIDEO), 2), mediaList = _f[0], setMediaList = _f[1];
58
- var _g = __read(useSetState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _g[0], setMediaState = _g[1];
59
- var _h = useRequest(PostCommonUpload, {
58
+ var _k = useInterviewRoomStore(), interactType = _k.interactType, aiInterviewerProfile = _k.aiInterviewerProfile, updateInterviewRoom = _k.updateInterviewRoom, interactionMethods = _k.interactionMethods;
59
+ console.log(interactionMethods);
60
+ var _l = __read(useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _l[0], setInterviewRoomState = _l[1];
61
+ var _m = __read(useState(interactionMethods || DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _m[0], setVirtualManList = _m[1];
62
+ var _o = useBootVideoStore(), mediaUrl = _o.mediaUrl, thumbUrl = _o.thumbUrl, updateBootVideo = _o.updateBootVideo;
63
+ var _p = __read(useState(DEFAULT_GUIDE_VIDEO), 2), mediaList = _p[0], setMediaList = _p[1];
64
+ var _q = __read(useSetState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
65
+ var postCommonUpload = useRequest(PostCommonUpload, {
60
66
  manual: true,
61
67
  onSuccess: function (_a) {
62
68
  var data = _a.data;
@@ -71,37 +77,67 @@ var BootVideo = function (props) {
71
77
  ]);
72
78
  setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
73
79
  },
74
- }), loading = _h.loading, postCommonUpload = _h.run;
80
+ }).run;
75
81
  var getAiInterviewerProfileList = useRequest(GetAiInterviewerProfileList, {
76
82
  manual: true,
77
83
  onSuccess: function (_a) {
78
- var list = _a.data.list;
79
- setVirtualManList(list);
84
+ var init = _a.data.interactionMethods;
85
+ if (interactionMethods && interactionMethods.length === 0) {
86
+ setVirtualManList(init);
87
+ }
80
88
  },
81
89
  }).run;
82
90
  var handleSelectVideo = useCallback(function (mediaUrl, thumbUrl) {
83
91
  setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
84
92
  }, [setMediaState]);
85
- var handleInteractTypeChange = useCallback(function (e) {
93
+ var handleSetVideo = useCallback(function (data) {
94
+ setVirtualManList(virtualManList.map(function (v) {
95
+ if (v.selected) {
96
+ return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), { tutorialVideos: data }) });
97
+ }
98
+ return v;
99
+ }));
100
+ }, [virtualManList]);
101
+ var broadcastType = useMemo(function () {
86
102
  var _a;
103
+ return ((_a = virtualManList.find(function (v) { return v.selected; })) === null || _a === void 0 ? void 0 : _a.type) || 1;
104
+ }, [virtualManList]);
105
+ var virtualMan = virtualManList.find(function (v) { return v.selected; });
106
+ var handleInteractTypeChange = useCallback(function (e) {
107
+ var _a, _b;
87
108
  var value = Number(e.target.value);
88
109
  if (value === 1) {
89
- setInterviewRoomState({ interactType: value });
110
+ setInterviewRoomState({ interactType: value, interactionMethods: virtualManList });
90
111
  }
91
112
  else {
92
113
  setInterviewRoomState({
93
114
  interactType: value,
94
- aiInterviewerProfile: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanType) ? interviewRoomState.aiInterviewerProfile : virtualManList[0],
115
+ interactionMethods: virtualManList,
116
+ // @ts-ignore
117
+ aiInterviewerProfile: ((_b = (_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _a === void 0 ? void 0 : _a.interviewerShows) === null || _b === void 0 ? void 0 : _b.find(function (v) { return v.selected; })) || (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail),
95
118
  });
96
119
  }
97
- }, [setInterviewRoomState, interviewRoomState, virtualManList]);
120
+ }, [virtualMan, virtualManList]);
98
121
  var handleSelectHumanType = useCallback(function (value) {
99
- setInterviewRoomState({ interactType: interviewRoomState.interactType, aiInterviewerProfile: value });
100
- }, [setInterviewRoomState, interviewRoomState]);
122
+ setVirtualManList(virtualManList.map(function (v) {
123
+ var _a, _b;
124
+ if (v.selected) {
125
+ return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), { interviewerShows: (_b = (_a = v === null || v === void 0 ? void 0 : v.detail) === null || _a === void 0 ? void 0 : _a.interviewerShows) === null || _b === void 0 ? void 0 : _b.map(function (human) { return (__assign(__assign({}, human), { selected: human.humanToken === value.humanToken })); }) }) });
126
+ }
127
+ return v;
128
+ }));
129
+ setInterviewRoomState(__assign(__assign({}, interviewRoomState), { aiInterviewerProfile: __assign(__assign({}, value), { humanType: value.type }) }));
130
+ }, [interviewRoomState, virtualManList]);
101
131
  var handleOk = function () {
102
- console.log(mediaState);
132
+ var _a, _b;
133
+ if (interviewRoomState.interactType === 2) {
134
+ if (broadcastType === 3 && ((_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.tutorialVideos) === null || _a === void 0 ? void 0 : _a.length) === 0)
135
+ return;
136
+ if ([1, 2].includes(broadcastType) && ((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) === 0)
137
+ return;
138
+ }
103
139
  updateBootVideo(mediaState);
104
- updateInterviewRoom(interviewRoomState);
140
+ updateInterviewRoom(__assign(__assign({}, interviewRoomState), { interactionMethods: virtualManList }));
105
141
  onClose();
106
142
  };
107
143
  var uploadProps = {
@@ -122,6 +158,14 @@ var BootVideo = function (props) {
122
158
  }
123
159
  },
124
160
  };
161
+ var handleGuidanceText = useCallback(function (e) {
162
+ setVirtualManList(virtualManList.map(function (v) {
163
+ if (v.selected) {
164
+ return __assign(__assign({}, v), { guidanceText: e.target.value });
165
+ }
166
+ return v;
167
+ }));
168
+ }, [virtualManList]);
125
169
  useEffect(function () {
126
170
  if (open) {
127
171
  getAiInterviewerProfileList();
@@ -141,12 +185,22 @@ var BootVideo = function (props) {
141
185
  }
142
186
  // eslint-disable-next-line react-hooks/exhaustive-deps
143
187
  }, [open]);
144
- return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 768 }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(Stack, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsxs(RadioGroup, __assign({ defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [_jsx(Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), _jsx(Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u9762\u8BD5\u5B98\u5F62\u8C61" })), _jsx(CustomUploadedImgRoot, { children: virtualManList.map(function (human) {
145
- var _a;
146
- return (_jsxs(Box, { children: [_jsx("img", { src: human.virtualHumanAvatar, style: { borderColor: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) === human.humanToken ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), _jsx(Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken));
147
- }) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "disabled", mb: 1 }, { children: "\u8BF4\u660E\uFF1A\u6B65\u9AA4\u4E0B\u7684\u6240\u6709\u9898\u76EE\u7684\u865A\u62DF\u4EBA\u64AD\u653E\u89C6\u9891\u5747\u751F\u6210\u540E\uFF0C\u624D\u80FD\u751F\u6548\u865A\u62DF\u4EBA\u6548\u679C\u3002\u5426\u5219\uFF0C\u5C06\u4EE5\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F\u8FDB\u884C\u4EA4\u4E92\u3002\u76EE\u524D\u53EA\u6709\u5C0F\u9762\u652F\u6301\u5BF9\u9898\u76EE\u8FFD\u95EE\uFF0C\u5176\u4ED6\u5F62\u8C61\u6682\u4E0D\u652F\u6301\u3002" }))] })), interviewRoomState.interactType === 1 && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
148
- var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
149
- return (_jsx("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
150
- }) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "text.disabled", mb: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsx(CustomUploadButtonRoot, { children: _jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), _jsx(Box, __assign({ ml: 2 }, { children: _jsx(Checkbox, { checked: mediaState.appliedAllPosition, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] }))] }), interviewRoomState.interactType === 1 && (_jsx(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(CustomUploadCardRoot, { children: [_jsxs(CustomUploadCardTitle, { children: [_jsx(SvgIcon, { name: "video" }), _jsx(Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), _jsx(Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))), interviewRoomState.interactType === 2 && (_jsx(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: _jsx(Box, __assign({ sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 160, height: 286, src: (_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.virtualPreviewMedia, controls: true }) })) })))] })) }) })));
188
+ return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588 }, { children: _jsx(ScrollDialogContent, { children: _jsx(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: _jsxs(Stack, __assign({ width: "100%" }, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsxs(RadioGroup, __assign({ defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [_jsx(Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), _jsx(Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && (_jsxs(_Fragment, { children: [_jsx(Select, { options: Options, value: broadcastType, onChange: function (e) {
189
+ var _a;
190
+ var value = e.target.value;
191
+ setVirtualManList(__spreadArray([], __read(virtualManList.map(function (v) { return (__assign(__assign({}, v), { selected: v.type === value })); })), false));
192
+ if (value !== 3) {
193
+ setInterviewRoomState(__assign(__assign({}, interviewRoomState), {
194
+ // @ts-ignore
195
+ aiInterviewerProfile: (_a = virtualManList.find(function (v) { return v.type === value; })) === null || _a === void 0 ? void 0 : _a.detail }));
196
+ }
197
+ }, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && (_jsxs(Stack, { children: [_jsx(CustomVideos, { mediaList: (_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _a === void 0 ? void 0 : _a.tutorialVideos, setMediaList: handleSetVideo }), _jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u6587\u672C\u6846\u5185\u5BB9" })), _jsx(TextField, { multiline: true, error: (((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, sx: { mb: 2 }, onChange: handleGuidanceText })] })), _jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 3 }, { children: broadcastType !== 3 ? '面试官形象' : '面试官形象(播报题目)' })), broadcastType !== 3 && (_jsx(CustomUploadedImgRoot, { children: _jsx(Box, { children: _jsx("img", { src: (_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _c === void 0 ? void 0 : _c.virtualHumanAvatar, style: {
198
+ borderColor: 'transparent',
199
+ }, height: 100, alt: "" }) }) })), broadcastType === 3 && (_jsx(CustomUploadedImgRoot, { children: (_e = (_d = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _d === void 0 ? void 0 : _d.interviewerShows) === null || _e === void 0 ? void 0 : _e.map(function (human) { return (_jsxs(Box, { children: [_jsx("img", { src: human.virtualHumanAvatar, style: {
200
+ borderColor: human.selected ? '#4CAF50' : 'transparent',
201
+ }, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), _jsx(Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken)); }) })), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", color: "disabled", mb: 3 }, { children: (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.desc) || ((_h = (_g = (_f = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _f === void 0 ? void 0 : _f.interviewerShows) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.desc) })), broadcastType !== 3 && (_jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u64AD\u62A5\u5185\u5BB9" })), _jsx(TextField, { multiline: true, error: ((_j = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _j === void 0 ? void 0 : _j.length) === 0, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, onChange: handleGuidanceText })] }))] })), interviewRoomState.interactType === 1 && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
202
+ var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
203
+ return (_jsx("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
204
+ }) }), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [mediaList.length <= 5 && (_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), mediaList.length > 5 && (_jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })))] }), _jsx(Tooltip, __assign({ title: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm", placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] }))] }))] })) })) }) })));
151
205
  };
152
206
  export default BootVideo;
@@ -36,7 +36,7 @@ export var CustomUploadedImgRoot = styled(Box)({
36
36
  alignItems: 'center',
37
37
  padding: '8px 0',
38
38
  boxSizing: 'content-box',
39
- '& img': {
39
+ '& img, & div': {
40
40
  boxSizing: 'border-box',
41
41
  width: 56,
42
42
  objectFit: 'cover',
@@ -54,7 +54,7 @@ import { getSecondToTime } from "../../../../utils/utils";
54
54
  import { Box, Chip, confirm, DeleteIcon, DragHandleIcon, EditIcon, IconButton, InfoIcon, Input, Select, Switch, Tooltip, Typography } from 'fbm-ui';
55
55
  import { Paper, Stack } from 'fbm-ui/lib/mui';
56
56
  import { memo, useCallback, useMemo } from 'react';
57
- var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(6).keys()), false).map(function (v) {
57
+ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(7).keys()), false).map(function (v) {
58
58
  return { label: "\u6700\u591A\u8FFD\u95EE".concat(v + 1, "\u6B21"), value: v + 1 };
59
59
  })), false), [
60
60
  { label: '直到充分为止', value: -1 },
@@ -36,8 +36,13 @@ var Question = function () {
36
36
  onSuccess: function (_a) {
37
37
  var data = _a.data;
38
38
  updateModel(data);
39
- var _b = data.interactType, interactType = _b === void 0 ? 1 : _b, aiInterviewerProfile = data.aiInterviewerProfile, aiVideoStatus = data.aiVideoStatus;
40
- updateInterviewRoom({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, aiVideoStatus: interactType === 1 ? 0 : aiVideoStatus });
39
+ var _b = data.interactType, interactType = _b === void 0 ? 1 : _b, aiInterviewerProfile = data.aiInterviewerProfile, aiVideoStatus = data.aiVideoStatus, interactionMethods = data.interactionMethods;
40
+ updateInterviewRoom({
41
+ interactType: interactType,
42
+ aiInterviewerProfile: aiInterviewerProfile,
43
+ aiVideoStatus: interactType === 1 ? 0 : aiVideoStatus,
44
+ interactionMethods: interactionMethods || [],
45
+ });
41
46
  setSelctedAbilitys((data === null || data === void 0 ? void 0 : data.selectAbilities) || []);
42
47
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(data.steps);
43
48
  },
@@ -47,7 +52,7 @@ var Question = function () {
47
52
  postAiModelDetails();
48
53
  }
49
54
  else {
50
- updateModel({ name: name || '暂无名称', token: '', duration: 0, steps: [] });
55
+ updateModel({ name: name || '暂无名称', token: '', duration: 0, steps: [], interactionMethods: [] });
51
56
  }
52
57
  }, [name, token, postAiModelDetails, updateModel]);
53
58
  useEffect(function () {
@@ -1,5 +1,5 @@
1
1
  import { QuestionParams } from '../QuestionUpdate/interface';
2
- import { AiInterviewerProfile } from '@/modules/ai-question/interface';
2
+ import { AiInterviewerProfile, InteractionMethod } from '@/modules/ai-question/interface';
3
3
  export interface QuestionModelStep extends QuestionParams {
4
4
  uniqueId?: string;
5
5
  isNotCompute?: boolean;
@@ -13,6 +13,7 @@ export interface QuestionModelData {
13
13
  aiVideoStatus?: number;
14
14
  aiInterviewerProfile?: AiInterviewerProfile;
15
15
  steps: QuestionModelStep[];
16
+ interactionMethods?: InteractionMethod[];
16
17
  }
17
18
  export interface QuestionModelDataRes {
18
19
  data: QuestionModelData;
@@ -88,10 +88,47 @@ export interface AiInterviewerProfile {
88
88
  export interface InterviewRoomProps {
89
89
  interactType: number;
90
90
  aiVideoStatus?: number;
91
+ broadcastType?: number;
91
92
  aiInterviewerProfile?: AiInterviewerProfile;
93
+ interactionMethods: InteractionMethod[];
94
+ }
95
+ export interface InteractionMethod {
96
+ guidanceText: string;
97
+ defaultGuidanceText: string;
98
+ type: number;
99
+ selected: boolean;
100
+ detail: Detail;
101
+ }
102
+ export interface Detail {
103
+ name?: string;
104
+ humanToken?: string;
105
+ humanType?: number;
106
+ virtualHumanAvatar?: string;
107
+ virtualPreviewMedia?: string;
108
+ xmSoundUrl?: string;
109
+ desc?: string;
110
+ tutorialVideos?: TutorialVideo[];
111
+ interviewerShows?: InterviewerShow[];
112
+ }
113
+ export interface TutorialVideo {
114
+ token: string;
115
+ isDefault: boolean;
116
+ url: string;
117
+ selected: boolean;
118
+ }
119
+ export interface InterviewerShow {
120
+ selected: boolean;
121
+ name: string;
122
+ humanToken: string;
123
+ humanType: number;
124
+ virtualHumanAvatar: string;
125
+ virtualPreviewMedia: string;
126
+ xmSoundUrl: string;
127
+ desc: string;
92
128
  }
93
129
  export interface AiInterviewerProfileList {
94
130
  data: {
95
131
  list: AiInterviewerProfile[];
132
+ interactionMethods: InteractionMethod[];
96
133
  };
97
134
  }
@@ -43,7 +43,7 @@ import update from 'immutability-helper';
43
43
  import { useCallback, useMemo, useState } from 'react';
44
44
  var STEP_NO_ANSWER = INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
45
45
  var QuestionItem = function (props) {
46
- var token = props.token, reviewImgs = props.reviewImgs, followupQuestion = props.followupQuestion, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
46
+ var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
47
47
  var _d = __read(useState(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
48
48
  var _e = useAiReportStore(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
49
49
  var steps = (reportResult || {}).steps;
@@ -109,6 +109,6 @@ var QuestionItem = function (props) {
109
109
  borderColor: token === stepToken ? theme.palette.primary.main : '',
110
110
  }, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", desc] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
111
111
  return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
112
- }), followupQuestion && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.answer }))] })] })), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
112
+ }), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
113
113
  };
114
114
  export default QuestionItem;
@@ -4,17 +4,23 @@ export declare const useInterviewRoomStore: (depsFn?: import("hox/es/types").Dep
4
4
  updateInterviewRoom: import("ahooks/lib/useSetState").SetState<InterviewRoomProps>;
5
5
  interactType: number;
6
6
  aiVideoStatus?: number | undefined;
7
+ broadcastType?: number | undefined;
7
8
  aiInterviewerProfile?: import("@/modules/ai-question/interface").AiInterviewerProfile | undefined;
9
+ interactionMethods: import("@/modules/ai-question/interface").InteractionMethod[];
8
10
  }> | undefined) => {
9
11
  interviewRoomState: InterviewRoomProps;
10
12
  updateInterviewRoom: import("ahooks/lib/useSetState").SetState<InterviewRoomProps>;
11
13
  interactType: number;
12
14
  aiVideoStatus?: number | undefined;
15
+ broadcastType?: number | undefined;
13
16
  aiInterviewerProfile?: import("@/modules/ai-question/interface").AiInterviewerProfile | undefined;
17
+ interactionMethods: import("@/modules/ai-question/interface").InteractionMethod[];
14
18
  }, getInterviewRoomStore: () => {
15
19
  interviewRoomState: InterviewRoomProps;
16
20
  updateInterviewRoom: import("ahooks/lib/useSetState").SetState<InterviewRoomProps>;
17
21
  interactType: number;
18
22
  aiVideoStatus?: number | undefined;
23
+ broadcastType?: number | undefined;
19
24
  aiInterviewerProfile?: import("@/modules/ai-question/interface").AiInterviewerProfile | undefined;
25
+ interactionMethods: import("@/modules/ai-question/interface").InteractionMethod[];
20
26
  } | undefined;
@@ -32,6 +32,7 @@ export var useInterviewRoomStore = (_a = __read(createGlobalStore(function () {
32
32
  var _a = __read(useSetState({
33
33
  interactType: 1,
34
34
  aiVideoStatus: 0,
35
+ interactionMethods: [],
35
36
  }), 2), interviewRoomState = _a[0], updateInterviewRoom = _a[1];
36
37
  return __assign(__assign({}, interviewRoomState), { interviewRoomState: interviewRoomState, updateInterviewRoom: updateInterviewRoom });
37
38
  }), 2), _a[0]), getInterviewRoomStore = _a[1];
@@ -71,9 +71,6 @@ var ReportPie = function (props) {
71
71
  var name = _a.name, score = _a.score, params = __rest(_a, ["name", "score"]);
72
72
  return (__assign({ name: formateTitle(name), originalName: name, value: score }, params));
73
73
  });
74
- // .sort(function (a, b) {
75
- // return a.weight - b.weight;
76
- // });
77
74
  var options = {
78
75
  tooltip: {
79
76
  trigger: 'item',
@@ -28,13 +28,7 @@ export declare const DEFAULT_GUIDE_VIDEO: {
28
28
  videoUrl: string;
29
29
  frameUrl: string;
30
30
  }[];
31
- export declare const DEFAULT_VITUAL_HUMAN_LIST: {
32
- name: string;
33
- humanToken: string;
34
- humanType: number;
35
- virtualHumanAvatar: string;
36
- virtualPreviewMedia: string;
37
- }[];
31
+ export declare const DEFAULT_VITUAL_HUMAN_LIST: never[];
38
32
  export declare const InteractiveModes: {
39
33
  1: string;
40
34
  2: string;
@@ -63,13 +63,13 @@ exports.DEFAULT_GUIDE_VIDEO = [
63
63
  },
64
64
  ];
65
65
  exports.DEFAULT_VITUAL_HUMAN_LIST = [
66
- {
67
- name: 'xuanxuan',
68
- humanToken: '71c932a2db9e420ab8782d68861ad0ff',
69
- humanType: 2,
70
- virtualHumanAvatar: 'https://alicdn.fbmms.cn/virtual-human-20230720-112709.png',
71
- virtualPreviewMedia: 'https://demo1-landing-page.oss-cn-beijing.aliyuncs.com/d5bcc15e-f42f-4bad-bde9-2d6c300bf9ca.mp4',
72
- },
66
+ // {
67
+ // name: 'xuanxuan', // 虚拟人名字
68
+ // humanToken: '71c932a2db9e420ab8782d68861ad0ff', // 数智虚拟人token
69
+ // humanType: 2, // 类型 1: 小面 2:虚拟人
70
+ // virtualHumanAvatar: 'https://alicdn.fbmms.cn/virtual-human-20230720-112709.png',
71
+ // virtualPreviewMedia: 'https://demo1-landing-page.oss-cn-beijing.aliyuncs.com/d5bcc15e-f42f-4bad-bde9-2d6c300bf9ca.mp4',
72
+ // },
73
73
  ];
74
74
  exports.InteractiveModes = {
75
75
  1: '传统读题模式',
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const CustomVideos: ({ mediaList, setMediaList }: {
3
+ mediaList: any;
4
+ setMediaList: any;
5
+ }) => JSX.Element;
6
+ export default CustomVideos;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
29
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
30
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31
+ if (ar || !(i in from)) {
32
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
33
+ ar[i] = from[i];
34
+ }
35
+ }
36
+ return to.concat(ar || Array.prototype.slice.call(from));
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var jsx_runtime_1 = require("react/jsx-runtime");
43
+ var styled_1 = require("./styled");
44
+ var UploadPreview_1 = __importDefault(require("./UploadPreview"));
45
+ var ai_question_1 = require("../../../../services/ai-question");
46
+ var utils_1 = require("../../../../utils/utils");
47
+ var ahooks_1 = require("ahooks");
48
+ var fbm_ui_1 = require("fbm-ui");
49
+ var mui_1 = require("fbm-ui/lib/mui");
50
+ var react_1 = require("react");
51
+ var CustomVideos = function (_a) {
52
+ var mediaList = _a.mediaList, setMediaList = _a.setMediaList;
53
+ var _b = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
54
+ manual: true,
55
+ onSuccess: function (_a) {
56
+ var data = _a.data;
57
+ var _b = __read(data, 1), item = _b[0];
58
+ setMediaList(__spreadArray(__spreadArray([], __read(mediaList.map(function (v) { return (__assign(__assign({}, v), { selected: false })); })), false), [
59
+ {
60
+ url: item.url,
61
+ selected: true,
62
+ },
63
+ ], false));
64
+ },
65
+ }), loading = _b.loading, postCommonUpload = _b.run;
66
+ var uploadProps = {
67
+ type: 'custom',
68
+ showUploadList: false,
69
+ accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
70
+ maxCount: 7,
71
+ customRequest: function (_a) {
72
+ var file = _a.file;
73
+ console.log('customRequest file', file);
74
+ if ((0, utils_1.isExceedMaxVideoFileSize)(file.size)) {
75
+ fbm_ui_1.Message.error('视频大小超过500M,请重新上传!');
76
+ }
77
+ else {
78
+ var formData = new FormData();
79
+ formData.append('files', file);
80
+ postCommonUpload(formData);
81
+ }
82
+ },
83
+ };
84
+ var handleSelectVideo = (0, react_1.useCallback)(function (i) {
85
+ setMediaList(__spreadArray([], __read(mediaList.map(function (v, ii) { return (__assign(__assign({}, v), { selected: i === ii })); })), false));
86
+ }, [mediaList, setMediaList]);
87
+ var handleRemoveVideo = (0, react_1.useCallback)(function (index) {
88
+ var newMediaList = __spreadArray([], __read(mediaList), false);
89
+ newMediaList.splice(index, 1);
90
+ setMediaList(newMediaList);
91
+ }, [mediaList, setMediaList]);
92
+ console.log(mediaList);
93
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadedImgRoot, __assign({ sx: { minHeight: 0 } }, { children: [mediaList === null || mediaList === void 0 ? void 0 : mediaList.map(function (_a, i) {
94
+ var url = _a.url, selected = _a.selected;
95
+ return ((0, jsx_runtime_1.jsx)(UploadPreview_1.default, { src: "".concat(url, "?x-oss-process=video/snapshot,t_0,f_jpg"), style: { borderColor: selected ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(i); }, onRemove: function () { return handleRemoveVideo(i); } }, url));
96
+ }), loading && (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.CustomUploadButtonRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), (0, jsx_runtime_1.jsx)(mui_1.Tooltip, __assign({ title: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm", placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] })), mediaList.length === 0 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "error" }, { children: "\u4E0A\u4F20\u89C6\u9891\u4E0D\u53EF\u4E3A\u7A7A" })))] }));
97
+ };
98
+ exports.default = CustomVideos;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare const UploadPreview: ({ src, style, onClick, onRemove, height, alt, disabledRemove }: {
3
+ src: any;
4
+ style: any;
5
+ onClick: any;
6
+ onRemove: any;
7
+ height: any;
8
+ alt: any;
9
+ disabledRemove?: boolean | undefined;
10
+ }) => JSX.Element;
11
+ export default UploadPreview;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var fbm_ui_1 = require("fbm-ui");
16
+ var UploadPreview = function (_a) {
17
+ var src = _a.src, style = _a.style, onClick = _a.onClick, onRemove = _a.onRemove, height = _a.height, alt = _a.alt, _b = _a.disabledRemove, disabledRemove = _b === void 0 ? false : _b;
18
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { src: src, height: height, style: style, alt: alt, onClick: onClick }), !disabledRemove && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onRemove, size: "small", sx: { position: 'absolute', top: -14, right: -16 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CancelIcon, {}) })))] }));
19
+ };
20
+ exports.default = UploadPreview;
@@ -40,9 +40,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
42
  var jsx_runtime_1 = require("react/jsx-runtime");
43
+ var CustomVideos_1 = __importDefault(require("./CustomVideos"));
43
44
  var styled_1 = require("./styled");
44
45
  var ScrollDialogContent_1 = __importDefault(require("../../../../components/ScrollDialogContent"));
45
- var SvgIcon_1 = __importDefault(require("../../../../components/SvgIcon"));
46
46
  var ai_question_1 = require("../../../../constants/ai-question");
47
47
  var ai_question_2 = require("../../../../services/ai-question");
48
48
  var boot_video_store_1 = require("../../../../store/ai-question/boot-video-store");
@@ -52,16 +52,22 @@ var ahooks_1 = require("ahooks");
52
52
  var fbm_ui_1 = require("fbm-ui");
53
53
  var mui_1 = require("fbm-ui/lib/mui");
54
54
  var react_1 = require("react");
55
+ var Options = [
56
+ { label: '小面播报', value: 1 },
57
+ { label: '虚拟人播报', value: 2 },
58
+ { label: '自定义播报', value: 3 },
59
+ ];
55
60
  var BootVideo = function (props) {
56
- var _a;
61
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
57
62
  var open = props.open, onClose = props.onClose;
58
- var _b = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _b.interactType, aiInterviewerProfile = _b.aiInterviewerProfile, updateInterviewRoom = _b.updateInterviewRoom;
59
- var _c = __read((0, react_1.useState)({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile }), 2), interviewRoomState = _c[0], setInterviewRoomState = _c[1];
60
- var _d = __read((0, react_1.useState)(ai_question_1.DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _d[0], setVirtualManList = _d[1];
61
- var _e = (0, boot_video_store_1.useBootVideoStore)(), mediaUrl = _e.mediaUrl, thumbUrl = _e.thumbUrl, updateBootVideo = _e.updateBootVideo;
62
- var _f = __read((0, react_1.useState)(ai_question_1.DEFAULT_GUIDE_VIDEO), 2), mediaList = _f[0], setMediaList = _f[1];
63
- var _g = __read((0, ahooks_1.useSetState)({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _g[0], setMediaState = _g[1];
64
- var _h = (0, ahooks_1.useRequest)(ai_question_2.PostCommonUpload, {
63
+ var _k = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _k.interactType, aiInterviewerProfile = _k.aiInterviewerProfile, updateInterviewRoom = _k.updateInterviewRoom, interactionMethods = _k.interactionMethods;
64
+ console.log(interactionMethods);
65
+ var _l = __read((0, react_1.useState)({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _l[0], setInterviewRoomState = _l[1];
66
+ var _m = __read((0, react_1.useState)(interactionMethods || ai_question_1.DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _m[0], setVirtualManList = _m[1];
67
+ var _o = (0, boot_video_store_1.useBootVideoStore)(), mediaUrl = _o.mediaUrl, thumbUrl = _o.thumbUrl, updateBootVideo = _o.updateBootVideo;
68
+ var _p = __read((0, react_1.useState)(ai_question_1.DEFAULT_GUIDE_VIDEO), 2), mediaList = _p[0], setMediaList = _p[1];
69
+ var _q = __read((0, ahooks_1.useSetState)({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
70
+ var postCommonUpload = (0, ahooks_1.useRequest)(ai_question_2.PostCommonUpload, {
65
71
  manual: true,
66
72
  onSuccess: function (_a) {
67
73
  var data = _a.data;
@@ -76,37 +82,67 @@ var BootVideo = function (props) {
76
82
  ]);
77
83
  setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
78
84
  },
79
- }), loading = _h.loading, postCommonUpload = _h.run;
85
+ }).run;
80
86
  var getAiInterviewerProfileList = (0, ahooks_1.useRequest)(ai_question_2.GetAiInterviewerProfileList, {
81
87
  manual: true,
82
88
  onSuccess: function (_a) {
83
- var list = _a.data.list;
84
- setVirtualManList(list);
89
+ var init = _a.data.interactionMethods;
90
+ if (interactionMethods && interactionMethods.length === 0) {
91
+ setVirtualManList(init);
92
+ }
85
93
  },
86
94
  }).run;
87
95
  var handleSelectVideo = (0, react_1.useCallback)(function (mediaUrl, thumbUrl) {
88
96
  setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
89
97
  }, [setMediaState]);
90
- var handleInteractTypeChange = (0, react_1.useCallback)(function (e) {
98
+ var handleSetVideo = (0, react_1.useCallback)(function (data) {
99
+ setVirtualManList(virtualManList.map(function (v) {
100
+ if (v.selected) {
101
+ return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), { tutorialVideos: data }) });
102
+ }
103
+ return v;
104
+ }));
105
+ }, [virtualManList]);
106
+ var broadcastType = (0, react_1.useMemo)(function () {
91
107
  var _a;
108
+ return ((_a = virtualManList.find(function (v) { return v.selected; })) === null || _a === void 0 ? void 0 : _a.type) || 1;
109
+ }, [virtualManList]);
110
+ var virtualMan = virtualManList.find(function (v) { return v.selected; });
111
+ var handleInteractTypeChange = (0, react_1.useCallback)(function (e) {
112
+ var _a, _b;
92
113
  var value = Number(e.target.value);
93
114
  if (value === 1) {
94
- setInterviewRoomState({ interactType: value });
115
+ setInterviewRoomState({ interactType: value, interactionMethods: virtualManList });
95
116
  }
96
117
  else {
97
118
  setInterviewRoomState({
98
119
  interactType: value,
99
- aiInterviewerProfile: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanType) ? interviewRoomState.aiInterviewerProfile : virtualManList[0],
120
+ interactionMethods: virtualManList,
121
+ // @ts-ignore
122
+ aiInterviewerProfile: ((_b = (_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _a === void 0 ? void 0 : _a.interviewerShows) === null || _b === void 0 ? void 0 : _b.find(function (v) { return v.selected; })) || (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail),
100
123
  });
101
124
  }
102
- }, [setInterviewRoomState, interviewRoomState, virtualManList]);
125
+ }, [virtualMan, virtualManList]);
103
126
  var handleSelectHumanType = (0, react_1.useCallback)(function (value) {
104
- setInterviewRoomState({ interactType: interviewRoomState.interactType, aiInterviewerProfile: value });
105
- }, [setInterviewRoomState, interviewRoomState]);
127
+ setVirtualManList(virtualManList.map(function (v) {
128
+ var _a, _b;
129
+ if (v.selected) {
130
+ return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), { interviewerShows: (_b = (_a = v === null || v === void 0 ? void 0 : v.detail) === null || _a === void 0 ? void 0 : _a.interviewerShows) === null || _b === void 0 ? void 0 : _b.map(function (human) { return (__assign(__assign({}, human), { selected: human.humanToken === value.humanToken })); }) }) });
131
+ }
132
+ return v;
133
+ }));
134
+ setInterviewRoomState(__assign(__assign({}, interviewRoomState), { aiInterviewerProfile: __assign(__assign({}, value), { humanType: value.type }) }));
135
+ }, [interviewRoomState, virtualManList]);
106
136
  var handleOk = function () {
107
- console.log(mediaState);
137
+ var _a, _b;
138
+ if (interviewRoomState.interactType === 2) {
139
+ if (broadcastType === 3 && ((_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.tutorialVideos) === null || _a === void 0 ? void 0 : _a.length) === 0)
140
+ return;
141
+ if ([1, 2].includes(broadcastType) && ((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) === 0)
142
+ return;
143
+ }
108
144
  updateBootVideo(mediaState);
109
- updateInterviewRoom(interviewRoomState);
145
+ updateInterviewRoom(__assign(__assign({}, interviewRoomState), { interactionMethods: virtualManList }));
110
146
  onClose();
111
147
  };
112
148
  var uploadProps = {
@@ -127,6 +163,14 @@ var BootVideo = function (props) {
127
163
  }
128
164
  },
129
165
  };
166
+ var handleGuidanceText = (0, react_1.useCallback)(function (e) {
167
+ setVirtualManList(virtualManList.map(function (v) {
168
+ if (v.selected) {
169
+ return __assign(__assign({}, v), { guidanceText: e.target.value });
170
+ }
171
+ return v;
172
+ }));
173
+ }, [virtualManList]);
130
174
  (0, react_1.useEffect)(function () {
131
175
  if (open) {
132
176
  getAiInterviewerProfileList();
@@ -146,12 +190,22 @@ var BootVideo = function (props) {
146
190
  }
147
191
  // eslint-disable-next-line react-hooks/exhaustive-deps
148
192
  }, [open]);
149
- return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 768 }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u9762\u8BD5\u5B98\u5F62\u8C61" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: virtualManList.map(function (human) {
150
- var _a;
151
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { src: human.virtualHumanAvatar, style: { borderColor: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) === human.humanToken ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken));
152
- }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "disabled", mb: 1 }, { children: "\u8BF4\u660E\uFF1A\u6B65\u9AA4\u4E0B\u7684\u6240\u6709\u9898\u76EE\u7684\u865A\u62DF\u4EBA\u64AD\u653E\u89C6\u9891\u5747\u751F\u6210\u540E\uFF0C\u624D\u80FD\u751F\u6548\u865A\u62DF\u4EBA\u6548\u679C\u3002\u5426\u5219\uFF0C\u5C06\u4EE5\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F\u8FDB\u884C\u4EA4\u4E92\u3002\u76EE\u524D\u53EA\u6709\u5C0F\u9762\u652F\u6301\u5BF9\u9898\u76EE\u8FFD\u95EE\uFF0C\u5176\u4ED6\u5F62\u8C61\u6682\u4E0D\u652F\u6301\u3002" }))] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
153
- var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
154
- return ((0, jsx_runtime_1.jsx)("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
155
- }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "text.disabled", mb: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.CustomUploadButtonRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ ml: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: mediaState.appliedAllPosition, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] }))] }), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardRoot, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardTitle, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "video" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 160, height: 286, src: (_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.virtualPreviewMedia, controls: true }) })) })))] })) }) })));
193
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588 }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ width: "100%" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { options: Options, value: broadcastType, onChange: function (e) {
194
+ var _a;
195
+ var value = e.target.value;
196
+ setVirtualManList(__spreadArray([], __read(virtualManList.map(function (v) { return (__assign(__assign({}, v), { selected: v.type === value })); })), false));
197
+ if (value !== 3) {
198
+ setInterviewRoomState(__assign(__assign({}, interviewRoomState), {
199
+ // @ts-ignore
200
+ aiInterviewerProfile: (_a = virtualManList.find(function (v) { return v.type === value; })) === null || _a === void 0 ? void 0 : _a.detail }));
201
+ }
202
+ }, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(CustomVideos_1.default, { mediaList: (_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _a === void 0 ? void 0 : _a.tutorialVideos, setMediaList: handleSetVideo }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u6587\u672C\u6846\u5185\u5BB9" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, { multiline: true, error: (((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, sx: { mb: 2 }, onChange: handleGuidanceText })] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 3 }, { children: broadcastType !== 3 ? '面试官形象' : '面试官形象(播报题目)' })), broadcastType !== 3 && ((0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: (_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _c === void 0 ? void 0 : _c.virtualHumanAvatar, style: {
203
+ borderColor: 'transparent',
204
+ }, height: 100, alt: "" }) }) })), broadcastType === 3 && ((0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: (_e = (_d = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _d === void 0 ? void 0 : _d.interviewerShows) === null || _e === void 0 ? void 0 : _e.map(function (human) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { src: human.virtualHumanAvatar, style: {
205
+ borderColor: human.selected ? '#4CAF50' : 'transparent',
206
+ }, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken)); }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", color: "disabled", mb: 3 }, { children: (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.desc) || ((_h = (_g = (_f = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _f === void 0 ? void 0 : _f.interviewerShows) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.desc) })), broadcastType !== 3 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u64AD\u62A5\u5185\u5BB9" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, { multiline: true, error: ((_j = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _j === void 0 ? void 0 : _j.length) === 0, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, onChange: handleGuidanceText })] }))] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
207
+ var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
208
+ return ((0, jsx_runtime_1.jsx)("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
209
+ }) }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadButtonRoot, { children: [mediaList.length <= 5 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), mediaList.length > 5 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })))] }), (0, jsx_runtime_1.jsx)(mui_1.Tooltip, __assign({ title: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm", placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] }))] }))] })) })) }) })));
156
210
  };
157
211
  exports.default = BootVideo;
@@ -39,7 +39,7 @@ exports.CustomUploadedImgRoot = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
39
39
  alignItems: 'center',
40
40
  padding: '8px 0',
41
41
  boxSizing: 'content-box',
42
- '& img': {
42
+ '& img, & div': {
43
43
  boxSizing: 'border-box',
44
44
  width: 56,
45
45
  objectFit: 'cover',
@@ -56,7 +56,7 @@ var utils_1 = require("../../../../utils/utils");
56
56
  var fbm_ui_1 = require("fbm-ui");
57
57
  var mui_1 = require("fbm-ui/lib/mui");
58
58
  var react_1 = require("react");
59
- var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(6).keys()), false).map(function (v) {
59
+ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(7).keys()), false).map(function (v) {
60
60
  return { label: "\u6700\u591A\u8FFD\u95EE".concat(v + 1, "\u6B21"), value: v + 1 };
61
61
  })), false), [
62
62
  { label: '直到充分为止', value: -1 },
@@ -41,8 +41,13 @@ var Question = function () {
41
41
  onSuccess: function (_a) {
42
42
  var data = _a.data;
43
43
  updateModel(data);
44
- var _b = data.interactType, interactType = _b === void 0 ? 1 : _b, aiInterviewerProfile = data.aiInterviewerProfile, aiVideoStatus = data.aiVideoStatus;
45
- updateInterviewRoom({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, aiVideoStatus: interactType === 1 ? 0 : aiVideoStatus });
44
+ var _b = data.interactType, interactType = _b === void 0 ? 1 : _b, aiInterviewerProfile = data.aiInterviewerProfile, aiVideoStatus = data.aiVideoStatus, interactionMethods = data.interactionMethods;
45
+ updateInterviewRoom({
46
+ interactType: interactType,
47
+ aiInterviewerProfile: aiInterviewerProfile,
48
+ aiVideoStatus: interactType === 1 ? 0 : aiVideoStatus,
49
+ interactionMethods: interactionMethods || [],
50
+ });
46
51
  setSelctedAbilitys((data === null || data === void 0 ? void 0 : data.selectAbilities) || []);
47
52
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(data.steps);
48
53
  },
@@ -52,7 +57,7 @@ var Question = function () {
52
57
  postAiModelDetails();
53
58
  }
54
59
  else {
55
- updateModel({ name: name || '暂无名称', token: '', duration: 0, steps: [] });
60
+ updateModel({ name: name || '暂无名称', token: '', duration: 0, steps: [], interactionMethods: [] });
56
61
  }
57
62
  }, [name, token, postAiModelDetails, updateModel]);
58
63
  (0, react_1.useEffect)(function () {
@@ -1,5 +1,5 @@
1
1
  import { QuestionParams } from '../QuestionUpdate/interface';
2
- import { AiInterviewerProfile } from '@/modules/ai-question/interface';
2
+ import { AiInterviewerProfile, InteractionMethod } from '@/modules/ai-question/interface';
3
3
  export interface QuestionModelStep extends QuestionParams {
4
4
  uniqueId?: string;
5
5
  isNotCompute?: boolean;
@@ -13,6 +13,7 @@ export interface QuestionModelData {
13
13
  aiVideoStatus?: number;
14
14
  aiInterviewerProfile?: AiInterviewerProfile;
15
15
  steps: QuestionModelStep[];
16
+ interactionMethods?: InteractionMethod[];
16
17
  }
17
18
  export interface QuestionModelDataRes {
18
19
  data: QuestionModelData;
@@ -88,10 +88,47 @@ export interface AiInterviewerProfile {
88
88
  export interface InterviewRoomProps {
89
89
  interactType: number;
90
90
  aiVideoStatus?: number;
91
+ broadcastType?: number;
91
92
  aiInterviewerProfile?: AiInterviewerProfile;
93
+ interactionMethods: InteractionMethod[];
94
+ }
95
+ export interface InteractionMethod {
96
+ guidanceText: string;
97
+ defaultGuidanceText: string;
98
+ type: number;
99
+ selected: boolean;
100
+ detail: Detail;
101
+ }
102
+ export interface Detail {
103
+ name?: string;
104
+ humanToken?: string;
105
+ humanType?: number;
106
+ virtualHumanAvatar?: string;
107
+ virtualPreviewMedia?: string;
108
+ xmSoundUrl?: string;
109
+ desc?: string;
110
+ tutorialVideos?: TutorialVideo[];
111
+ interviewerShows?: InterviewerShow[];
112
+ }
113
+ export interface TutorialVideo {
114
+ token: string;
115
+ isDefault: boolean;
116
+ url: string;
117
+ selected: boolean;
118
+ }
119
+ export interface InterviewerShow {
120
+ selected: boolean;
121
+ name: string;
122
+ humanToken: string;
123
+ humanType: number;
124
+ virtualHumanAvatar: string;
125
+ virtualPreviewMedia: string;
126
+ xmSoundUrl: string;
127
+ desc: string;
92
128
  }
93
129
  export interface AiInterviewerProfileList {
94
130
  data: {
95
131
  list: AiInterviewerProfile[];
132
+ interactionMethods: InteractionMethod[];
96
133
  };
97
134
  }
@@ -48,7 +48,7 @@ var immutability_helper_1 = __importDefault(require("immutability-helper"));
48
48
  var react_1 = require("react");
49
49
  var STEP_NO_ANSWER = ai_report_1.INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = ai_report_1.INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
50
50
  var QuestionItem = function (props) {
51
- var token = props.token, reviewImgs = props.reviewImgs, followupQuestion = props.followupQuestion, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
51
+ var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
52
52
  var _d = __read((0, react_1.useState)(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
53
53
  var _e = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
54
54
  var steps = (reportResult || {}).steps;
@@ -114,6 +114,6 @@ var QuestionItem = function (props) {
114
114
  borderColor: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : '',
115
115
  }, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isSingleChoice && (0, jsx_runtime_1.jsx)(SingleChoice_1.default, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
116
116
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
117
- }), followupQuestion && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.desc) })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.answer }))] })] })), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
117
+ }), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
118
118
  };
119
119
  exports.default = QuestionItem;
@@ -4,17 +4,23 @@ export declare const useInterviewRoomStore: (depsFn?: import("hox/es/types").Dep
4
4
  updateInterviewRoom: import("ahooks/lib/useSetState").SetState<InterviewRoomProps>;
5
5
  interactType: number;
6
6
  aiVideoStatus?: number | undefined;
7
+ broadcastType?: number | undefined;
7
8
  aiInterviewerProfile?: import("@/modules/ai-question/interface").AiInterviewerProfile | undefined;
9
+ interactionMethods: import("@/modules/ai-question/interface").InteractionMethod[];
8
10
  }> | undefined) => {
9
11
  interviewRoomState: InterviewRoomProps;
10
12
  updateInterviewRoom: import("ahooks/lib/useSetState").SetState<InterviewRoomProps>;
11
13
  interactType: number;
12
14
  aiVideoStatus?: number | undefined;
15
+ broadcastType?: number | undefined;
13
16
  aiInterviewerProfile?: import("@/modules/ai-question/interface").AiInterviewerProfile | undefined;
17
+ interactionMethods: import("@/modules/ai-question/interface").InteractionMethod[];
14
18
  }, getInterviewRoomStore: () => {
15
19
  interviewRoomState: InterviewRoomProps;
16
20
  updateInterviewRoom: import("ahooks/lib/useSetState").SetState<InterviewRoomProps>;
17
21
  interactType: number;
18
22
  aiVideoStatus?: number | undefined;
23
+ broadcastType?: number | undefined;
19
24
  aiInterviewerProfile?: import("@/modules/ai-question/interface").AiInterviewerProfile | undefined;
25
+ interactionMethods: import("@/modules/ai-question/interface").InteractionMethod[];
20
26
  } | undefined;
@@ -35,6 +35,7 @@ exports.useInterviewRoomStore = (_a = __read((0, hox_1.createGlobalStore)(functi
35
35
  var _a = __read((0, ahooks_1.useSetState)({
36
36
  interactType: 1,
37
37
  aiVideoStatus: 0,
38
+ interactionMethods: [],
38
39
  }), 2), interviewRoomState = _a[0], updateInterviewRoom = _a[1];
39
40
  return __assign(__assign({}, interviewRoomState), { interviewRoomState: interviewRoomState, updateInterviewRoom: updateInterviewRoom });
40
41
  }), 2), _a[0]), exports.getInterviewRoomStore = _a[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.41-alpha.0",
3
+ "version": "1.2.41-alpha.2",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",