eli-video-interview 1.2.41-alpha.1 → 1.2.41-alpha.11

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 (35) hide show
  1. package/esm/constants/ai-question.d.ts +4 -7
  2. package/esm/constants/ai-question.js +17 -7
  3. package/esm/modules/ai-question/components/BootVideo/CustomVideos.d.ts +6 -0
  4. package/esm/modules/ai-question/components/BootVideo/CustomVideos.js +93 -0
  5. package/esm/modules/ai-question/components/BootVideo/UploadPreview.d.ts +11 -0
  6. package/esm/modules/ai-question/components/BootVideo/UploadPreview.js +26 -0
  7. package/esm/modules/ai-question/components/BootVideo/index.js +94 -31
  8. package/esm/modules/ai-question/components/BootVideo/styled.js +1 -1
  9. package/esm/modules/ai-question/components/QuestionModel/Item.js +4 -4
  10. package/esm/modules/ai-question/components/QuestionModel/index.js +8 -3
  11. package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +2 -1
  12. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +2 -1
  13. package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -3
  14. package/esm/modules/ai-question/interface.d.ts +37 -0
  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/esm/store/enterprise/enterprise-store.js +2 -2
  18. package/lib/constants/ai-question.d.ts +4 -7
  19. package/lib/constants/ai-question.js +19 -8
  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 +28 -0
  24. package/lib/modules/ai-question/components/BootVideo/index.js +90 -27
  25. package/lib/modules/ai-question/components/BootVideo/styled.js +1 -1
  26. package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
  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/components/QuestionUpdate/RandomQuestion.js +4 -3
  30. package/lib/modules/ai-question/components/QuestionUpdate/index.js +2 -2
  31. package/lib/modules/ai-question/interface.d.ts +37 -0
  32. package/lib/store/ai-question/interview-room-store.d.ts +6 -0
  33. package/lib/store/ai-question/interview-room-store.js +1 -0
  34. package/lib/store/enterprise/enterprise-store.js +2 -2
  35. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { InteractionMethod } from '../modules/ai-question/interface';
1
2
  import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/interface';
2
3
  import { ADD_QUESTION_TYPE } from '@enum/ai-question';
3
4
  export declare const ADD_QUESTION_TYPE_LIST: {
@@ -28,13 +29,7 @@ export declare const DEFAULT_GUIDE_VIDEO: {
28
29
  videoUrl: string;
29
30
  frameUrl: string;
30
31
  }[];
31
- export declare const DEFAULT_VITUAL_HUMAN_LIST: {
32
- name: string;
33
- humanToken: string;
34
- humanType: number;
35
- virtualHumanAvatar: string;
36
- virtualPreviewMedia: string;
37
- }[];
32
+ export declare const DEFAULT_VITUAL_HUMAN_LIST: never[];
38
33
  export declare const InteractiveModes: {
39
34
  1: string;
40
35
  2: string;
@@ -51,3 +46,5 @@ export declare const TEST_TYPE_READONLY: number[];
51
46
  export declare const DISABLED_REPEAT_TYPE: number[];
52
47
  export declare const DISABLED_COST_TYPE: number[];
53
48
  export declare const IS_AI_ANALYSIS: (step: Pick<QuestionParams, 'aiType'>) => boolean;
49
+ export declare const IS_AI_FOLLOW_UP: (step: QuestionParams, interaction: InteractionMethod[]) => boolean;
50
+ export declare const MAX_RANDOM_QUESTION_NUM = 50;
@@ -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: '传统读题模式',
@@ -85,3 +85,13 @@ export var DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16, 17];
85
85
  export var DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
86
86
  // 是否开启AI分析
87
87
  export var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
88
+ // 是否可以追问
89
+ export var IS_AI_FOLLOW_UP = function (step, interaction) {
90
+ return step.aiShowType === 1 && (step.broadcastType === 2 || !IS_VIRTUAL_HUMAN(interaction));
91
+ };
92
+ var IS_VIRTUAL_HUMAN = function (interaction) {
93
+ if (interaction.length === 0)
94
+ return false;
95
+ return interaction.some(function (v) { var _a; return v.selected && (v.type === 2 || (v.type === 3 && ((_a = v.detail.interviewerShows) === null || _a === void 0 ? void 0 : _a.some(function (v) { return v.selected && v.humanType === 2; }))) || false); });
96
+ };
97
+ export var MAX_RANDOM_QUESTION_NUM = 50;
@@ -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: [_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: true, 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,26 @@
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, __assign({ sx: {
17
+ height: height,
18
+ '& .remove': {
19
+ display: 'none',
20
+ },
21
+ '&:hover .remove': {
22
+ display: 'block',
23
+ },
24
+ } }, { children: [_jsx("img", { src: src, height: height, style: style, alt: alt, onClick: onClick }), !disabledRemove && (_jsx(IconButton, __assign({ className: "remove", onClick: onRemove, size: "small", sx: { position: 'absolute', top: -14, right: -16 } }, { children: _jsx(CancelIcon, {}) })))] })));
25
+ };
26
+ export default UploadPreview;
@@ -35,28 +35,33 @@ 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
+ var _l = __read(useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _l[0], setInterviewRoomState = _l[1];
60
+ var _m = __read(useState(interactionMethods || DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _m[0], setVirtualManList = _m[1];
61
+ var _o = useBootVideoStore(), mediaUrl = _o.mediaUrl, thumbUrl = _o.thumbUrl, updateBootVideo = _o.updateBootVideo;
62
+ var _p = __read(useState(DEFAULT_GUIDE_VIDEO), 2), mediaList = _p[0], setMediaList = _p[1];
63
+ var _q = __read(useSetState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
64
+ var postCommonUpload = useRequest(PostCommonUpload, {
60
65
  manual: true,
61
66
  onSuccess: function (_a) {
62
67
  var data = _a.data;
@@ -71,37 +76,67 @@ var BootVideo = function (props) {
71
76
  ]);
72
77
  setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
73
78
  },
74
- }), loading = _h.loading, postCommonUpload = _h.run;
79
+ }).run;
75
80
  var getAiInterviewerProfileList = useRequest(GetAiInterviewerProfileList, {
76
81
  manual: true,
77
82
  onSuccess: function (_a) {
78
- var list = _a.data.list;
79
- setVirtualManList(list);
83
+ var init = _a.data.interactionMethods;
84
+ if (interactionMethods && interactionMethods.length === 0) {
85
+ setVirtualManList(init);
86
+ }
80
87
  },
81
88
  }).run;
82
89
  var handleSelectVideo = useCallback(function (mediaUrl, thumbUrl) {
83
90
  setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
84
91
  }, [setMediaState]);
85
- var handleInteractTypeChange = useCallback(function (e) {
92
+ var handleSetVideo = useCallback(function (data) {
93
+ setVirtualManList(virtualManList.map(function (v) {
94
+ if (v.selected) {
95
+ return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), { tutorialVideos: data }) });
96
+ }
97
+ return v;
98
+ }));
99
+ }, [virtualManList]);
100
+ var broadcastType = useMemo(function () {
86
101
  var _a;
102
+ return ((_a = virtualManList.find(function (v) { return v.selected; })) === null || _a === void 0 ? void 0 : _a.type) || 1;
103
+ }, [virtualManList]);
104
+ var virtualMan = virtualManList.find(function (v) { return v.selected; });
105
+ var handleInteractTypeChange = useCallback(function (e) {
106
+ var _a, _b;
87
107
  var value = Number(e.target.value);
88
108
  if (value === 1) {
89
- setInterviewRoomState({ interactType: value });
109
+ setInterviewRoomState({ interactType: value, interactionMethods: virtualManList });
90
110
  }
91
111
  else {
92
112
  setInterviewRoomState({
93
113
  interactType: value,
94
- aiInterviewerProfile: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanType) ? interviewRoomState.aiInterviewerProfile : virtualManList[0],
114
+ interactionMethods: virtualManList,
115
+ // @ts-ignore
116
+ 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
117
  });
96
118
  }
97
- }, [setInterviewRoomState, interviewRoomState, virtualManList]);
119
+ }, [virtualMan, virtualManList]);
98
120
  var handleSelectHumanType = useCallback(function (value) {
99
- setInterviewRoomState({ interactType: interviewRoomState.interactType, aiInterviewerProfile: value });
100
- }, [setInterviewRoomState, interviewRoomState]);
121
+ setVirtualManList(virtualManList.map(function (v) {
122
+ var _a, _b;
123
+ if (v.selected) {
124
+ 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 })); }) }) });
125
+ }
126
+ return v;
127
+ }));
128
+ setInterviewRoomState(__assign(__assign({}, interviewRoomState), { aiInterviewerProfile: __assign(__assign({}, value), { humanType: value.type }) }));
129
+ }, [interviewRoomState, virtualManList]);
101
130
  var handleOk = function () {
102
- console.log(mediaState);
131
+ var _a, _b, _c;
132
+ if (interviewRoomState.interactType === 2) {
133
+ if (broadcastType === 3 && (((_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.tutorialVideos) === null || _a === void 0 ? void 0 : _a.length) === 0 || (((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) || 0) > 300))
134
+ return;
135
+ if ([1, 2].includes(broadcastType) && (((_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _c === void 0 ? void 0 : _c.length) || 0) > 300)
136
+ return;
137
+ }
103
138
  updateBootVideo(mediaState);
104
- updateInterviewRoom(interviewRoomState);
139
+ updateInterviewRoom(__assign(__assign({}, interviewRoomState), { interactionMethods: virtualManList }));
105
140
  onClose();
106
141
  };
107
142
  var uploadProps = {
@@ -122,6 +157,14 @@ var BootVideo = function (props) {
122
157
  }
123
158
  },
124
159
  };
160
+ var handleGuidanceText = useCallback(function (e) {
161
+ setVirtualManList(virtualManList.map(function (v) {
162
+ if (v.selected) {
163
+ return __assign(__assign({}, v), { guidanceText: e.target.value });
164
+ }
165
+ return v;
166
+ }));
167
+ }, [virtualManList]);
125
168
  useEffect(function () {
126
169
  if (open) {
127
170
  getAiInterviewerProfileList();
@@ -141,12 +184,32 @@ var BootVideo = function (props) {
141
184
  }
142
185
  // eslint-disable-next-line react-hooks/exhaustive-deps
143
186
  }, [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 }) })) })))] })) }) })));
187
+ return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588,
188
+ // @ts-ignore
189
+ sx: {
190
+ '& .FuiDialog-content': {
191
+ pb: 4.5,
192
+ },
193
+ } }, { 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({ sx: {
194
+ '& .MuiFormControlLabel-root': {
195
+ mr: 4.5,
196
+ },
197
+ }, 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) {
198
+ var _a;
199
+ var value = e.target.value;
200
+ setVirtualManList(__spreadArray([], __read(virtualManList.map(function (v) { return (__assign(__assign({}, v), { selected: v.type === value })); })), false));
201
+ if (value !== 3) {
202
+ setInterviewRoomState(__assign(__assign({}, interviewRoomState), {
203
+ // @ts-ignore
204
+ aiInterviewerProfile: (_a = virtualManList.find(function (v) { return v.type === value; })) === null || _a === void 0 ? void 0 : _a.detail }));
205
+ }
206
+ }, 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, max: 300 })] })), _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: {
207
+ borderColor: 'transparent',
208
+ }, 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: {
209
+ borderColor: human.selected ? '#4CAF50' : 'transparent',
210
+ }, 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) > 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, onChange: handleGuidanceText, max: 300 })] }))] })), 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) {
211
+ var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
212
+ 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));
213
+ }) }), _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
214
  };
152
215
  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',
@@ -47,7 +47,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
47
47
  };
48
48
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
49
49
  import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
50
- import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, QUESTION_TYPE_TITLE_MAP, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
50
+ import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, IS_AI_FOLLOW_UP, QUESTION_TYPE_TITLE_MAP, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
51
51
  import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
52
52
  import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
53
53
  import { getSecondToTime } from "../../../../utils/utils";
@@ -60,11 +60,11 @@ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Ar
60
60
  { label: '直到充分为止', value: -1 },
61
61
  ], false);
62
62
  var QuestionModelListItem = function (props) {
63
- var _a = useInterviewRoomStore(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
63
+ var interactionMethods = useInterviewRoomStore().interactionMethods;
64
64
  var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
65
65
  var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp, followUpMaximum = step.followUpMaximum;
66
66
  var isAiAnalysis = IS_AI_ANALYSIS(step);
67
- var _b = useQuestionModelStore(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
67
+ var _a = useQuestionModelStore(), editModel = _a.editModel, removeModel = _a.removeModel, updateModelWeight = _a.updateModelWeight;
68
68
  var updateQuestionState = useUpdateQuestionStore().updateQuestionState;
69
69
  var handleEdit = useCallback(function () {
70
70
  updateQuestionState({ open: true, token: token, index: index, aiShowType: aiShowType, item: step });
@@ -113,6 +113,6 @@ var QuestionModelListItem = function (props) {
113
113
  }, [questions]);
114
114
  return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsx(Box, __assign({ display: "flex", borderBottom: !DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: _jsxs(Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), _jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragHandleIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), _jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
115
115
  return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
116
- }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), type === 1 && aiShowType === 1 && ((aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) !== 2 || interactType === 1) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
116
+ }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), IS_AI_FOLLOW_UP(step, interactionMethods) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
117
117
  };
118
118
  export default memo(QuestionModelListItem);
@@ -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;
@@ -27,6 +27,7 @@ var __read = (this && this.__read) || function (o, n) {
27
27
  };
28
28
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
29
29
  import SelectQuestion from './SelectQuestion';
30
+ import { MAX_RANDOM_QUESTION_NUM } from "../../../../constants/ai-question";
30
31
  import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
31
32
  import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
32
33
  import { AddIcon, Box, Button, Checkbox, InfoIcon, Layout, Message, Popactions, Tooltip } from 'fbm-ui';
@@ -63,7 +64,7 @@ var RandomQuestion = function (_a) {
63
64
  },
64
65
  ];
65
66
  var isVideoBroadcast = broadcastType === 2;
66
- var desc = isVideoBroadcast ? (_jsxs(_Fragment, { children: ["1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898 \u6700\u591A\u91CD\u590D3\u6B21\u3002", _jsx("br", {}), "2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F", _jsx("br", {}), "3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A5\u4E2A\u9009\u9879\u3002"] })) : ('每位候选人随机1题,最多5个选项。');
67
+ var desc = isVideoBroadcast ? (_jsx(_Fragment, { children: "\n 1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898 \u6700\u591A\u91CD\u590D3\u6B21\u3002\n <br />\n 2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F\n <br />\n 3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A".concat(MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9009\u9879\u3002") })) : ("\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A".concat(MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9009\u9879\u3002"));
67
68
  var handleVideoBroadcastChange = function (key, checked) {
68
69
  var _a;
69
70
  updateQuestionState({
@@ -75,7 +75,7 @@ var __read = (this && this.__read) || function (o, n) {
75
75
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
76
76
  import { defaultQuestionParams } from './const';
77
77
  import Form from './Form';
78
- import { ADD_QUESTION_TYPE_SHOW_LIST, QUESTION_TYPE_TITLE_MAP } from "../../../../constants/ai-question";
78
+ import { ADD_QUESTION_TYPE_SHOW_LIST, MAX_RANDOM_QUESTION_NUM, QUESTION_TYPE_TITLE_MAP } from "../../../../constants/ai-question";
79
79
  import { ADD_QUESTION_TYPE, QUESTION_TYPE } from "../../../../enum/ai-question";
80
80
  import { useQuestionCollectionListStore } from "../../../../store/ai-ability/question-ability-store";
81
81
  import ScrollDialogContent from "../../../../components/ScrollDialogContent";
@@ -228,8 +228,8 @@ var QuestionUpdate = function () {
228
228
  case 0: return [4 /*yield*/, getModelParams(values, true)];
229
229
  case 1:
230
230
  _a = _c.sent(), errorIndexes = _a.errorIndexes, params = _a.params;
231
- if ((values === null || values === void 0 ? void 0 : values.questions.length) > 5) {
232
- Message.error('最多可添加5个面试内容。');
231
+ if ((values === null || values === void 0 ? void 0 : values.questions.length) > MAX_RANDOM_QUESTION_NUM) {
232
+ Message.error("\u6700\u591A\u53EF\u6DFB\u52A0".concat(MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9762\u8BD5\u5185\u5BB9\u3002"));
233
233
  return [2 /*return*/, false];
234
234
  }
235
235
  if (values.broadcastType === 2 && !(values === null || values === void 0 ? void 0 : values.questions.every(function (v) { return v.videoUrl !== ''; }))) {
@@ -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
  }
@@ -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;