eli-video-interview 1.2.37-beta.0 → 1.2.37-beta.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.
@@ -27,6 +27,16 @@ export declare const DEFAULT_VITUAL_HUMAN_LIST: {
27
27
  virtualHumanAvatar: string;
28
28
  virtualPreviewMedia: string;
29
29
  }[];
30
+ export declare const InteractiveModes: {
31
+ 1: string;
32
+ 2: string;
33
+ };
34
+ export declare const AiVideoStatus: {
35
+ 0: string;
36
+ 1: string;
37
+ 2: string;
38
+ 3: string;
39
+ };
30
40
  export declare const MAX_UPLOAD_FILE_SIZE: number;
31
41
  export declare const MAX_UPLOAD_VIDEO_FILE_SIZE: number;
32
42
  export declare const TEST_TYPE_READONLY: number[];
@@ -40,6 +40,16 @@ export var DEFAULT_VITUAL_HUMAN_LIST = [
40
40
  virtualPreviewMedia: 'https://demo1-landing-page.oss-cn-beijing.aliyuncs.com/d5bcc15e-f42f-4bad-bde9-2d6c300bf9ca.mp4',
41
41
  },
42
42
  ];
43
+ export var InteractiveModes = {
44
+ 1: '传统读题模式',
45
+ 2: 'AI面试官对话模式',
46
+ };
47
+ export var AiVideoStatus = {
48
+ 0: '播报视频生成中...',
49
+ 1: '播报视频生成中...',
50
+ 2: '播报视频已生成',
51
+ 3: '播报视频生成中...',
52
+ };
43
53
  export var MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
44
54
  export var MAX_UPLOAD_VIDEO_FILE_SIZE = 1024 * 1024 * 500;
45
55
  export var TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12];
@@ -67,14 +67,18 @@ var BootVideo = function (props) {
67
67
  setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
68
68
  }, [setMediaState]);
69
69
  var handleInteractTypeChange = useCallback(function (e) {
70
+ var _a;
70
71
  var value = Number(e.target.value);
71
72
  if (value === 1) {
72
73
  setInterviewRoomState({ interactType: value });
73
74
  }
74
75
  else {
75
- setInterviewRoomState({ interactType: value, aiInterviewerProfile: interviewRoomState.aiInterviewerProfile });
76
+ setInterviewRoomState({
77
+ interactType: value,
78
+ aiInterviewerProfile: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanType) ? interviewRoomState.aiInterviewerProfile : virtualManList[0],
79
+ });
76
80
  }
77
- }, [setInterviewRoomState, interviewRoomState]);
81
+ }, [setInterviewRoomState, interviewRoomState, virtualManList]);
78
82
  var handleSelectHumanType = useCallback(function (value) {
79
83
  setInterviewRoomState({ interactType: interviewRoomState.interactType, aiInterviewerProfile: value });
80
84
  }, [setInterviewRoomState, interviewRoomState]);
@@ -121,12 +125,12 @@ var BootVideo = function (props) {
121
125
  }
122
126
  // eslint-disable-next-line react-hooks/exhaustive-deps
123
127
  }, [open]);
124
- return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u4FDD\u5B58", 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({ 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: [_jsxs(Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 1 }, { children: ["\u9762\u8BD5\u5B98\u5F62\u8C61", _jsx(Typography, __assign({ variant: "caption", ml: 1, color: "disabled" }, { children: "\u76EE\u524D\u53EA\u6709\u5C0F\u9762\u53EF\u652F\u6301\u5BF9\u9898\u76EE\u8FFD\u95EE\uFF0C\u5176\u4ED6\u5F62\u8C61\u6682\u4E0D\u652F\u6301\u8FFD\u95EE" }))] })), _jsx(CustomUploadedImgRoot, { children: virtualManList.map(function (human) {
128
+ return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u4FDD\u5B58", 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) {
125
129
  var _a;
126
130
  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));
127
- }) })] })), interviewRoomState.interactType === 1 && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
131
+ }) }), _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" }))] })), 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) {
128
132
  var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
129
133
  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));
130
- }) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, 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 }) })) })))] })) }) })));
134
+ }) }), _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 }) })) })))] })) }) })));
131
135
  };
132
136
  export default BootVideo;
@@ -1,6 +1,3 @@
1
- /// <reference types="react" />
2
- interface InteractiveProps {
3
- mode: 'Traditional' | 'Chat';
4
- }
5
- declare const Interactive: React.FC<InteractiveProps>;
1
+ import { FC } from 'react';
2
+ declare const Interactive: FC;
6
3
  export default Interactive;
@@ -9,18 +9,18 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import BootVideo from '../BootVideo';
14
- import { Button, Typography, VideocamOutlineIcon } from 'fbm-ui';
14
+ import { AiVideoStatus, InteractiveModes } from "../../../../constants/ai-question";
15
+ import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
16
+ import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
17
+ import { Button, CheckCircleOutlineIcon, Typography, VideocamOutlineIcon } from 'fbm-ui';
15
18
  import { Paper, Stack } from 'fbm-ui/lib/mui';
16
19
  import { useState } from 'react';
17
- var InteractiveModes = {
18
- Traditional: '传统读题模式',
19
- Chat: 'AI面试官对话模式',
20
- };
21
- var Interactive = function (_a) {
22
- var mode = _a.mode;
20
+ var Interactive = function () {
21
+ var questionModelData = useQuestionModelStore().questionModelData;
22
+ var _a = useInterviewRoomStore(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
23
23
  var _b = useState(false), bootVideoOpen = _b[0], setBootVideoOpen = _b[1];
24
- return (_jsxs(_Fragment, { children: [_jsx(BootVideo, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", component: Paper, variant: "outlined", height: 54, alignItems: "center", px: 2, mt: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F\uFF1A".concat(InteractiveModes[mode]) })), _jsx(Button, __assign({ icon: _jsx(VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5B9A\u5236\u9762\u8BD5\u95F4" }))] }))] }));
24
+ return (_jsxs(_Fragment, { children: [bootVideoOpen && _jsx(BootVideo, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", component: Paper, variant: "outlined", height: 54, alignItems: "center", px: 2, mt: 2 }, { children: [_jsxs(Typography, __assign({ display: "flex", alignItems: "center", variant: "body1", fontWeight: 500 }, { children: ["\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F\uFF1A".concat(InteractiveModes[interactType]), interactType === 2 && (_jsxs(_Fragment, { children: ["-".concat(aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.name), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 2 }, { children: AiVideoStatus[(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) || 1] })), (questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) === 2 && interactType === questionModelData.interactType ? (_jsx(CheckCircleOutlineIcon, { sx: { fontSize: '16px', ml: 1, color: 'RGBA(0, 0, 0, 0.56)' } })) : ('')] }))] })), _jsx(Button, __assign({ icon: _jsx(VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5B9A\u5236\u9762\u8BD5\u95F4" }))] }))] }));
25
25
  };
26
26
  export default Interactive;
@@ -19,6 +19,7 @@ import { QuestionModelRoot } from './styled';
19
19
  import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
20
20
  import { PostAiModelDetails } from "../../../../services/ai-question";
21
21
  import { useAiQuestionStore } from "../../../../store/ai-question/global-store";
22
+ import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
22
23
  import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
23
24
  import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
24
25
  import { useRequest } from 'ahooks';
@@ -27,6 +28,7 @@ var Question = function () {
27
28
  var isDefaultAdded = useRef(false);
28
29
  var _a = useAiQuestionStore(function (store) { return [store.token, store.name, store.templateList]; }), token = _a.token, name = _a.name, templateList = _a.templateList, onLoad = _a.onLoad;
29
30
  var aiEvaluationData = useQuestionTemplateStore(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
31
+ var updateInterviewRoom = useInterviewRoomStore().updateInterviewRoom;
30
32
  var _b = useQuestionModelStore(function (store) { return [store.questionModelData]; }), questionModelData = _b.questionModelData, updateModel = _b.updateModel, addModel = _b.addModel;
31
33
  var setSelctedAbilitys = useAiAbilityListStore().setSelctedAbilitys;
32
34
  var _c = useRequest(function () { return PostAiModelDetails(token); }, {
@@ -34,6 +36,8 @@ var Question = function () {
34
36
  onSuccess: function (_a) {
35
37
  var data = _a.data;
36
38
  updateModel(data);
39
+ var _b = data.interactType, interactType = _b === void 0 ? 1 : _b, aiInterviewerProfile = data.aiInterviewerProfile;
40
+ updateInterviewRoom({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile });
37
41
  setSelctedAbilitys((data === null || data === void 0 ? void 0 : data.selectAbilities) || []);
38
42
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(data.steps);
39
43
  },
@@ -70,6 +74,6 @@ var Question = function () {
70
74
  }
71
75
  }
72
76
  }, [token, aiEvaluationData, questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps, templateList, addModel]);
73
- return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(Interactive, { mode: "Traditional" }), _jsx(QuestionModelList, {})] })) }));
77
+ return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(Interactive, {}), _jsx(QuestionModelList, {})] })) }));
74
78
  };
75
79
  export default Question;
@@ -10,6 +10,7 @@ export interface QuestionModelData {
10
10
  duration?: number;
11
11
  selectAbilities?: string[];
12
12
  interactType?: number;
13
+ aiVideoStatus?: number;
13
14
  aiInterviewerProfile?: AiInterviewerProfile;
14
15
  steps: QuestionModelStep[];
15
16
  }
@@ -29,7 +29,7 @@ var RandomQuestion = function (_a) {
29
29
  var handleClose = _a.handleClose;
30
30
  handleClose();
31
31
  if (!(category === null || category === void 0 ? void 0 : category.token)) {
32
- Message.error('题目未选择考察能力,不可快速选题');
32
+ Message.error('题目未选择考察能力或选择的能力不可参与AI分析时,不可快速选题');
33
33
  }
34
34
  else {
35
35
  setOpen(true);
@@ -10,15 +10,11 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  var _a;
13
- import { useQuestionModelStore } from "./question-model-store";
14
13
  import { useSetState } from 'ahooks';
15
14
  import { createGlobalStore } from 'hox';
16
15
  export var useInterviewRoomStore = (_a = createGlobalStore(function () {
17
- var questionModelData = useQuestionModelStore(function (store) { return [store.questionModelData]; }).questionModelData;
18
- console.log(questionModelData, 'questionModelData');
19
16
  var _a = useSetState({
20
- interactType: (questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.interactType) || 1,
21
- aiInterviewerProfile: questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile,
17
+ interactType: 1,
22
18
  }), interviewRoomState = _a[0], updateInterviewRoom = _a[1];
23
19
  return __assign(__assign({}, interviewRoomState), { interviewRoomState: interviewRoomState, updateInterviewRoom: updateInterviewRoom });
24
20
  }), _a[0]), getInterviewRoomStore = _a[1];
@@ -27,6 +27,16 @@ export declare const DEFAULT_VITUAL_HUMAN_LIST: {
27
27
  virtualHumanAvatar: string;
28
28
  virtualPreviewMedia: string;
29
29
  }[];
30
+ export declare const InteractiveModes: {
31
+ 1: string;
32
+ 2: string;
33
+ };
34
+ export declare const AiVideoStatus: {
35
+ 0: string;
36
+ 1: string;
37
+ 2: string;
38
+ 3: string;
39
+ };
30
40
  export declare const MAX_UPLOAD_FILE_SIZE: number;
31
41
  export declare const MAX_UPLOAD_VIDEO_FILE_SIZE: number;
32
42
  export declare const TEST_TYPE_READONLY: number[];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.IS_AI_ANALYSIS = exports.DISABLED_REPEAT_TYPE = exports.TEST_TYPE_READONLY = exports.MAX_UPLOAD_VIDEO_FILE_SIZE = exports.MAX_UPLOAD_FILE_SIZE = exports.DEFAULT_VITUAL_HUMAN_LIST = exports.DEFAULT_GUIDE_VIDEO = exports.DEFAULT_GUIDE_VIDEO_THUMB_URL = exports.DEFAULT_GUIDE_VIDEO_URL = exports.QUESTION_TYPE_MAPPING_LABEL = exports.ADD_QUESTION_TYPE_LIST = void 0;
4
+ exports.IS_AI_ANALYSIS = exports.DISABLED_REPEAT_TYPE = exports.TEST_TYPE_READONLY = exports.MAX_UPLOAD_VIDEO_FILE_SIZE = exports.MAX_UPLOAD_FILE_SIZE = exports.AiVideoStatus = exports.InteractiveModes = exports.DEFAULT_VITUAL_HUMAN_LIST = exports.DEFAULT_GUIDE_VIDEO = exports.DEFAULT_GUIDE_VIDEO_THUMB_URL = exports.DEFAULT_GUIDE_VIDEO_URL = exports.QUESTION_TYPE_MAPPING_LABEL = exports.ADD_QUESTION_TYPE_LIST = void 0;
5
5
  var ai_question_1 = require("../enum/ai-question");
6
6
  var FREE = ai_question_1.ADD_QUESTION_TYPE.FREE, LANGUAGE = ai_question_1.ADD_QUESTION_TYPE.LANGUAGE;
7
7
  var QA = ai_question_1.QUESTION_TYPE.QA, COLOR_BLINDNESS = ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS, ALPHABETIC_DICTATION = ai_question_1.QUESTION_TYPE.ALPHABETIC_DICTATION, AI_ANALYSIS = ai_question_1.QUESTION_TYPE.AI_ANALYSIS, POLICY_DECISION_GAME = ai_question_1.QUESTION_TYPE.POLICY_DECISION_GAME, MEMORY_GAME = ai_question_1.QUESTION_TYPE.MEMORY_GAME, EMOTION_GAME = ai_question_1.QUESTION_TYPE.EMOTION_GAME;
@@ -43,6 +43,16 @@ exports.DEFAULT_VITUAL_HUMAN_LIST = [
43
43
  virtualPreviewMedia: 'https://demo1-landing-page.oss-cn-beijing.aliyuncs.com/d5bcc15e-f42f-4bad-bde9-2d6c300bf9ca.mp4',
44
44
  },
45
45
  ];
46
+ exports.InteractiveModes = {
47
+ 1: '传统读题模式',
48
+ 2: 'AI面试官对话模式',
49
+ };
50
+ exports.AiVideoStatus = {
51
+ 0: '播报视频生成中...',
52
+ 1: '播报视频生成中...',
53
+ 2: '播报视频已生成',
54
+ 3: '播报视频生成中...',
55
+ };
46
56
  exports.MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
47
57
  exports.MAX_UPLOAD_VIDEO_FILE_SIZE = 1024 * 1024 * 500;
48
58
  exports.TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12];
@@ -72,14 +72,18 @@ var BootVideo = function (props) {
72
72
  setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
73
73
  }, [setMediaState]);
74
74
  var handleInteractTypeChange = (0, react_1.useCallback)(function (e) {
75
+ var _a;
75
76
  var value = Number(e.target.value);
76
77
  if (value === 1) {
77
78
  setInterviewRoomState({ interactType: value });
78
79
  }
79
80
  else {
80
- setInterviewRoomState({ interactType: value, aiInterviewerProfile: interviewRoomState.aiInterviewerProfile });
81
+ setInterviewRoomState({
82
+ interactType: value,
83
+ aiInterviewerProfile: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanType) ? interviewRoomState.aiInterviewerProfile : virtualManList[0],
84
+ });
81
85
  }
82
- }, [setInterviewRoomState, interviewRoomState]);
86
+ }, [setInterviewRoomState, interviewRoomState, virtualManList]);
83
87
  var handleSelectHumanType = (0, react_1.useCallback)(function (value) {
84
88
  setInterviewRoomState({ interactType: interviewRoomState.interactType, aiInterviewerProfile: value });
85
89
  }, [setInterviewRoomState, interviewRoomState]);
@@ -126,12 +130,12 @@ var BootVideo = function (props) {
126
130
  }
127
131
  // eslint-disable-next-line react-hooks/exhaustive-deps
128
132
  }, [open]);
129
- return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u4FDD\u5B58", 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({ 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.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 1 }, { children: ["\u9762\u8BD5\u5B98\u5F62\u8C61", (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", ml: 1, color: "disabled" }, { children: "\u76EE\u524D\u53EA\u6709\u5C0F\u9762\u53EF\u652F\u6301\u5BF9\u9898\u76EE\u8FFD\u95EE\uFF0C\u5176\u4ED6\u5F62\u8C61\u6682\u4E0D\u652F\u6301\u8FFD\u95EE" }))] })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: virtualManList.map(function (human) {
133
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u4FDD\u5B58", 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) {
130
134
  var _a;
131
135
  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));
132
- }) })] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
136
+ }) }), (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" }))] })), 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) {
133
137
  var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
134
138
  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));
135
- }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, 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 }) })) })))] })) }) })));
139
+ }) }), (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 }) })) })))] })) }) })));
136
140
  };
137
141
  exports.default = BootVideo;
@@ -1,6 +1,3 @@
1
- /// <reference types="react" />
2
- interface InteractiveProps {
3
- mode: 'Traditional' | 'Chat';
4
- }
5
- declare const Interactive: React.FC<InteractiveProps>;
1
+ import { FC } from 'react';
2
+ declare const Interactive: FC;
6
3
  export default Interactive;
@@ -16,16 +16,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var BootVideo_1 = __importDefault(require("../BootVideo"));
19
+ var ai_question_1 = require("../../../../constants/ai-question");
20
+ var interview_room_store_1 = require("../../../../store/ai-question/interview-room-store");
21
+ var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
19
22
  var fbm_ui_1 = require("fbm-ui");
20
23
  var mui_1 = require("fbm-ui/lib/mui");
21
24
  var react_1 = require("react");
22
- var InteractiveModes = {
23
- Traditional: '传统读题模式',
24
- Chat: 'AI面试官对话模式',
25
- };
26
- var Interactive = function (_a) {
27
- var mode = _a.mode;
25
+ var Interactive = function () {
26
+ var questionModelData = (0, question_model_store_1.useQuestionModelStore)().questionModelData;
27
+ var _a = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
28
28
  var _b = (0, react_1.useState)(false), bootVideoOpen = _b[0], setBootVideoOpen = _b[1];
29
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(BootVideo_1.default, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", component: mui_1.Paper, variant: "outlined", height: 54, alignItems: "center", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F\uFF1A".concat(InteractiveModes[mode]) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5B9A\u5236\u9762\u8BD5\u95F4" }))] }))] }));
29
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [bootVideoOpen && (0, jsx_runtime_1.jsx)(BootVideo_1.default, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", component: mui_1.Paper, variant: "outlined", height: 54, alignItems: "center", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ display: "flex", alignItems: "center", variant: "body1", fontWeight: 500 }, { children: ["\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F\uFF1A".concat(ai_question_1.InteractiveModes[interactType]), interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["-".concat(aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.name), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 2 }, { children: ai_question_1.AiVideoStatus[(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) || 1] })), (questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiVideoStatus) === 2 && interactType === questionModelData.interactType ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.CheckCircleOutlineIcon, { sx: { fontSize: '16px', ml: 1, color: 'RGBA(0, 0, 0, 0.56)' } })) : ('')] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5B9A\u5236\u9762\u8BD5\u95F4" }))] }))] }));
30
30
  };
31
31
  exports.default = Interactive;
@@ -24,6 +24,7 @@ var styled_1 = require("./styled");
24
24
  var question_ability_store_1 = require("../../../../store/ai-ability-select/question-ability-store");
25
25
  var ai_question_1 = require("../../../../services/ai-question");
26
26
  var global_store_1 = require("../../../../store/ai-question/global-store");
27
+ var interview_room_store_1 = require("../../../../store/ai-question/interview-room-store");
27
28
  var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
28
29
  var question_template_store_1 = require("../../../../store/ai-question/question-template-store");
29
30
  var ahooks_1 = require("ahooks");
@@ -32,6 +33,7 @@ var Question = function () {
32
33
  var isDefaultAdded = (0, react_1.useRef)(false);
33
34
  var _a = (0, global_store_1.useAiQuestionStore)(function (store) { return [store.token, store.name, store.templateList]; }), token = _a.token, name = _a.name, templateList = _a.templateList, onLoad = _a.onLoad;
34
35
  var aiEvaluationData = (0, question_template_store_1.useQuestionTemplateStore)(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
36
+ var updateInterviewRoom = (0, interview_room_store_1.useInterviewRoomStore)().updateInterviewRoom;
35
37
  var _b = (0, question_model_store_1.useQuestionModelStore)(function (store) { return [store.questionModelData]; }), questionModelData = _b.questionModelData, updateModel = _b.updateModel, addModel = _b.addModel;
36
38
  var setSelctedAbilitys = (0, question_ability_store_1.useAiAbilityListStore)().setSelctedAbilitys;
37
39
  var _c = (0, ahooks_1.useRequest)(function () { return (0, ai_question_1.PostAiModelDetails)(token); }, {
@@ -39,6 +41,8 @@ var Question = function () {
39
41
  onSuccess: function (_a) {
40
42
  var data = _a.data;
41
43
  updateModel(data);
44
+ var _b = data.interactType, interactType = _b === void 0 ? 1 : _b, aiInterviewerProfile = data.aiInterviewerProfile;
45
+ updateInterviewRoom({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile });
42
46
  setSelctedAbilitys((data === null || data === void 0 ? void 0 : data.selectAbilities) || []);
43
47
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(data.steps);
44
48
  },
@@ -75,6 +79,6 @@ var Question = function () {
75
79
  }
76
80
  }
77
81
  }, [token, aiEvaluationData, questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps, templateList, addModel]);
78
- return ((0, jsx_runtime_1.jsx)(styled_1.QuestionModelRoot, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_1.default, {}), (0, jsx_runtime_1.jsx)(Interactive_1.default, { mode: "Traditional" }), (0, jsx_runtime_1.jsx)(List_1.default, {})] })) }));
82
+ return ((0, jsx_runtime_1.jsx)(styled_1.QuestionModelRoot, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_1.default, {}), (0, jsx_runtime_1.jsx)(Interactive_1.default, {}), (0, jsx_runtime_1.jsx)(List_1.default, {})] })) }));
79
83
  };
80
84
  exports.default = Question;
@@ -10,6 +10,7 @@ export interface QuestionModelData {
10
10
  duration?: number;
11
11
  selectAbilities?: string[];
12
12
  interactType?: number;
13
+ aiVideoStatus?: number;
13
14
  aiInterviewerProfile?: AiInterviewerProfile;
14
15
  steps: QuestionModelStep[];
15
16
  }
@@ -34,7 +34,7 @@ var RandomQuestion = function (_a) {
34
34
  var handleClose = _a.handleClose;
35
35
  handleClose();
36
36
  if (!(category === null || category === void 0 ? void 0 : category.token)) {
37
- fbm_ui_1.Message.error('题目未选择考察能力,不可快速选题');
37
+ fbm_ui_1.Message.error('题目未选择考察能力或选择的能力不可参与AI分析时,不可快速选题');
38
38
  }
39
39
  else {
40
40
  setOpen(true);
@@ -13,15 +13,11 @@ var __assign = (this && this.__assign) || function () {
13
13
  var _a;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.getInterviewRoomStore = exports.useInterviewRoomStore = void 0;
16
- var question_model_store_1 = require("./question-model-store");
17
16
  var ahooks_1 = require("ahooks");
18
17
  var hox_1 = require("hox");
19
18
  exports.useInterviewRoomStore = (_a = (0, hox_1.createGlobalStore)(function () {
20
- var questionModelData = (0, question_model_store_1.useQuestionModelStore)(function (store) { return [store.questionModelData]; }).questionModelData;
21
- console.log(questionModelData, 'questionModelData');
22
19
  var _a = (0, ahooks_1.useSetState)({
23
- interactType: (questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.interactType) || 1,
24
- aiInterviewerProfile: questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile,
20
+ interactType: 1,
25
21
  }), interviewRoomState = _a[0], updateInterviewRoom = _a[1];
26
22
  return __assign(__assign({}, interviewRoomState), { interviewRoomState: interviewRoomState, updateInterviewRoom: updateInterviewRoom });
27
23
  }), _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.37-beta.0",
3
+ "version": "1.2.37-beta.2",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",