eli-video-interview 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +10 -13
- package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +2 -17
- package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.js +4 -19
- package/esm/modules/ai-question/components/QuestionModel/Header.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +8 -7
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +8 -9
- package/esm/modules/ai-report/interface.d.ts +1 -0
- package/esm/modules/ai-report/useAiReport.d.ts +1 -0
- package/esm/store/ai-report/global-store.d.ts +3 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +8 -11
- package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +2 -17
- package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.js +4 -19
- package/lib/modules/ai-question/components/QuestionModel/Header.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +8 -7
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +2 -1
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +7 -8
- package/lib/modules/ai-report/interface.d.ts +1 -0
- package/lib/modules/ai-report/useAiReport.d.ts +1 -0
- package/lib/store/ai-report/global-store.d.ts +3 -0
- package/package.json +2 -2
|
@@ -9,10 +9,10 @@ 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 } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { useEffect, useCallback, useState } from 'react';
|
|
14
14
|
import { Dialog, Loading, Typography, RadioGroup, Radio, Checkbox } from 'fbm-ui';
|
|
15
|
-
import { Box, FormControl, FormLabel
|
|
15
|
+
import { Box, FormControl, FormLabel } from 'fbm-ui/lib/mui';
|
|
16
16
|
import { useRequest, useSetState } from 'ahooks';
|
|
17
17
|
import { groupCategory } from './utils';
|
|
18
18
|
import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
@@ -20,7 +20,6 @@ import { PostAiAbilities } from "../../../../services/ai-question";
|
|
|
20
20
|
import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
|
|
21
21
|
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
22
22
|
import { CATEGORY_NAME, SERVER_LANGUAGE_TYPE } from './const';
|
|
23
|
-
import { ListItemButtonRoot } from './styled';
|
|
24
23
|
var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE;
|
|
25
24
|
var AiAssessmentCriteria = function (props) {
|
|
26
25
|
var open = props.open, onClose = props.onClose;
|
|
@@ -80,7 +79,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
80
79
|
return (_jsxs(Box, { children: [(list.filter(function (_a) {
|
|
81
80
|
var type = _a.type;
|
|
82
81
|
return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
|
|
83
|
-
}).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsxs(FormLabel, __assign({ component: "legend", style: { fontSize: 14, color: 'rgba(0,0,0,0.86)' } }, { children: [name, type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [_jsx(Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), _jsx(RadioGroup, __assign({ value: language, sx: { ml:
|
|
82
|
+
}).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsxs(FormLabel, __assign({ component: "legend", style: { fontSize: 14, color: 'rgba(0,0,0,0.86)' } }, { children: [name, type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [_jsx(Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), _jsx(RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
|
|
84
83
|
.filter(function (_a) {
|
|
85
84
|
var type = _a.type;
|
|
86
85
|
return [MANDARIN, CANTONESE].includes(type);
|
|
@@ -96,19 +95,17 @@ var AiAssessmentCriteria = function (props) {
|
|
|
96
95
|
.map(function (_a) {
|
|
97
96
|
var name = _a.name, type = _a.type, token = _a.token;
|
|
98
97
|
return (_jsx(Radio, { value: type, label: name }, token));
|
|
99
|
-
})] }))) : (_jsx(
|
|
98
|
+
})] }))) : (_jsx(_Fragment, { children: list.map(function (item) {
|
|
100
99
|
var name = item.name, desc = item.desc, type = item.type, token = item.token;
|
|
101
100
|
if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return setCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
|
|
108
|
-
} }) }), _jsx(ListItemText, { primary: name, secondary: desc })] }), token));
|
|
101
|
+
var isLanguageAbility = [14, 15].includes(type);
|
|
102
|
+
return (_jsxs(Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [_jsx(Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
|
|
103
|
+
var _a;
|
|
104
|
+
return setCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
|
|
105
|
+
} }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
|
|
109
106
|
}
|
|
110
107
|
return null;
|
|
111
|
-
}) }))
|
|
108
|
+
}) }))] }, "".concat(name, "-").concat(type)));
|
|
112
109
|
})) }) })));
|
|
113
110
|
};
|
|
114
111
|
export default AiAssessmentCriteria;
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
3
|
-
action?: import("react").Ref<import("fbm-ui/lib/mui").ButtonBaseActions> | undefined;
|
|
4
|
-
centerRipple?: boolean | undefined;
|
|
2
|
+
export declare const ListItem: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
5
3
|
children?: import("react").ReactNode;
|
|
6
|
-
|
|
7
|
-
disabled?: boolean | undefined;
|
|
8
|
-
disableRipple?: boolean | undefined;
|
|
9
|
-
disableTouchRipple?: boolean | undefined;
|
|
10
|
-
focusRipple?: boolean | undefined;
|
|
11
|
-
focusVisibleClassName?: string | undefined;
|
|
12
|
-
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
13
|
-
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
14
|
-
sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
15
|
-
tabIndex?: number | undefined;
|
|
16
|
-
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
17
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
18
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
19
|
-
}, "children" | "style" | "className" | "tabIndex" | "classes" | "alignItems" | "sx" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
'& .MuiFormControlLabel-root': {
|
|
6
|
-
marginRight: 0,
|
|
7
|
-
},
|
|
8
|
-
'& .MuiCheckbox-root': {
|
|
9
|
-
padding: 0,
|
|
10
|
-
},
|
|
11
|
-
'& .MuiListItemText-primary': {
|
|
12
|
-
fontSize: 14,
|
|
13
|
-
},
|
|
14
|
-
'& .MuiListItemText-secondary': {
|
|
15
|
-
fontSize: 12,
|
|
16
|
-
},
|
|
17
|
-
'& .MuiListItemIcon-root': {
|
|
18
|
-
minWidth: 36,
|
|
19
|
-
},
|
|
1
|
+
import { Box, styled } from 'fbm-ui';
|
|
2
|
+
export var ListItem = styled(Box)({
|
|
3
|
+
padding: '4px 0',
|
|
4
|
+
display: 'flex',
|
|
20
5
|
});
|
|
@@ -18,6 +18,6 @@ import BootVideo from '../BootVideo';
|
|
|
18
18
|
var QuestionHeader = function () {
|
|
19
19
|
var questionModelData = useQuestionModelStore().questionModelData;
|
|
20
20
|
var _a = useState(false), bootVideoOpen = _a[0], setBootVideoOpen = _a[1];
|
|
21
|
-
return (_jsxs(Box, __assign({ width: "100%", display: "flex" }, { children: [_jsx(BootVideo, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), questionModelData && (_jsxs(_Fragment, { children: [_jsxs(Box, __assign({ flex: "1 0" }, { children: [
|
|
21
|
+
return (_jsxs(Box, __assign({ width: "100%", display: "flex" }, { children: [_jsx(BootVideo, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), questionModelData && (_jsxs(_Fragment, { children: [_jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsx(Typography, __assign({ variant: "body1", weight: "500", mb: 1 }, { children: _jsxs(Typography, __assign({ color: "secondary", variant: "caption" }, { children: ["\u9884\u8BA1\u9762\u8BD5\u65F6\u957F\uFF1A", getSecondToTime((questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.duration) || 0)] })) })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u62D6\u52A8\u8BD5\u9898\u5361\u7247\u53EF\u6539\u53D8\u8BD5\u9898\u987A\u5E8F" }))] })), _jsxs(Box, __assign({ width: 200, textAlign: "right" }, { children: [_jsx(Button, __assign({ icon: _jsx(VideocamOutlineIcon, {}), variant: "text", onClick: function () { return setBootVideoOpen(true); } }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "end", sx: { mt: '6px' } }, { children: [_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "AI\u6D4B\u8BC4\u6743\u91CD" })), _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: '4px' } }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.56)' } }) })) }))] }))] }))] }))] })));
|
|
22
22
|
};
|
|
23
23
|
export default QuestionHeader;
|
|
@@ -17,10 +17,10 @@ import { PostCommonUpload } from "../../../../services/ai-question";
|
|
|
17
17
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
18
18
|
import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
|
|
19
19
|
var VideoVoice = function () {
|
|
20
|
-
var _a, _b, _c, _d;
|
|
21
|
-
var
|
|
20
|
+
var _a, _b, _c, _d, _e;
|
|
21
|
+
var _f = useUpdateQuestionStore(function (store) { return [store.questionState]; }), questionState = _f.questionState, updateQuestionState = _f.updateQuestionState;
|
|
22
22
|
var item = questionState.item;
|
|
23
|
-
var
|
|
23
|
+
var _g = useRequest(PostCommonUpload, {
|
|
24
24
|
manual: true,
|
|
25
25
|
onSuccess: function (_a) {
|
|
26
26
|
var data = _a.data;
|
|
@@ -29,10 +29,11 @@ var VideoVoice = function () {
|
|
|
29
29
|
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoUrl: firstData.url }) }),
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
-
}), loading =
|
|
33
|
-
var
|
|
32
|
+
}), loading = _g.loading, postCommonUpload = _g.run;
|
|
33
|
+
var handleVideoBroadcastChange = function (key, checked) {
|
|
34
|
+
var _a;
|
|
34
35
|
updateQuestionState({
|
|
35
|
-
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), {
|
|
36
|
+
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
39
|
var uploadProps = {
|
|
@@ -58,6 +59,6 @@ var VideoVoice = function () {
|
|
|
58
59
|
multiline: true,
|
|
59
60
|
placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
|
|
60
61
|
sx: { padding: 0 },
|
|
61
|
-
} }), _jsx(FormGroup, __assign({ sx: { mt: 9 } }, { children: _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange:
|
|
62
|
+
} }), _jsx(FormGroup, __assign({ sx: { mt: 9 } }, { children: _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_e = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _e === void 0 ? void 0 : _e.videoSkip) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] })) })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", sx: { mb: 1 } }, { children: "\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8BF4\u660E\uFF1A" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "1.\u89C6\u9891\u7D20\u6750\u5C3A\u5BF8\u5EFA\u8BAE\u4E3A\u7AD6\u7248\uFF0C\u6BD4\u4F8B\u63A7\u5236\u57289\uFF1A16 \uFF0C\u683C\u5F0F\u9650\u4E8E.mp4" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "2.\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8FC7\u7A0B\u4E2D\uFF0C\u9762\u8BD5\u5185\u5BB9\u5C06\u4E0D\u8FDB\u884CAI\u8BED\u97F3\u64AD\u62A5\u5904\u7406" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "3.\u5982\u5141\u8BB8\u5019\u9009\u4EBA\u91CD\u590D\u542C\u9898\uFF0C\u5355\u9898\u5168\u7A0B\u91CD\u590D\u6B21\u6570\u4E3A3\u6B21\u3002" }))] }))] })));
|
|
62
63
|
};
|
|
63
64
|
export default VideoVoice;
|
|
@@ -114,7 +114,7 @@ var QuestionUpdate = function () {
|
|
|
114
114
|
var words = _a.words, score = _a.score, color = _a.color;
|
|
115
115
|
if (!words)
|
|
116
116
|
errorIndexes.push(index);
|
|
117
|
-
extra_1[words] = {
|
|
117
|
+
extra_1[words] = { color: color, score: score };
|
|
118
118
|
});
|
|
119
119
|
setKeyPointAnalysisError(errorIndexes);
|
|
120
120
|
if (!errorIndexes.length && isSubmit) {
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { useState, useCallback, useMemo } from 'react';
|
|
14
|
-
import { Box, Typography, Button
|
|
14
|
+
import { Box, Typography, Button } from 'fbm-ui';
|
|
15
15
|
import { theme } from 'fbm-ui/lib/components/ThemeProvider';
|
|
16
16
|
import { Paper } from 'fbm-ui/lib/mui';
|
|
17
17
|
import update from 'immutability-helper';
|
|
@@ -25,16 +25,15 @@ import ScoreSlider from './ScoreSlider';
|
|
|
25
25
|
import Abilities from './Abilities';
|
|
26
26
|
var STEP_NO_ANSWER = INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
|
|
27
27
|
var QuestionItem = function (props) {
|
|
28
|
-
var token = props.token, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, name = _b.name, type = _b.type,
|
|
28
|
+
var token = props.token, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, name = _b.name, type = _b.type, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
|
|
29
29
|
var _d = useState(false), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
30
|
-
var _e = useAiReportStore(function (store) { return [
|
|
31
|
-
store.reportResult,
|
|
32
|
-
store.stepToken,
|
|
33
|
-
store.operableButtons,
|
|
34
|
-
]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
30
|
+
var _e = useAiReportStore(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
35
31
|
var steps = (reportResult || {}).steps;
|
|
36
|
-
var
|
|
32
|
+
var isAbilities = operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('abilities');
|
|
37
33
|
var isExistWeight = weight > 0;
|
|
34
|
+
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
35
|
+
var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
|
|
36
|
+
var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
|
|
38
37
|
var comprehensiveScore = useMemo(function () {
|
|
39
38
|
if (status === STEP_COMPLETED) {
|
|
40
39
|
return (_jsx(Typography, __assign({ variant: "caption", color: theme.palette.primary.main, fontSize: 16, fontWeight: 500 }, { children: formatScore(score) })));
|
|
@@ -84,6 +83,6 @@ var QuestionItem = function (props) {
|
|
|
84
83
|
mt: 2,
|
|
85
84
|
cursor: videoUrl ? 'pointer' : 'inherit',
|
|
86
85
|
borderColor: token === stepToken ? theme.palette.primary.main : '',
|
|
87
|
-
}, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", name] })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }),
|
|
86
|
+
}, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", name] })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { originScore: originScore, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index })] }), token));
|
|
88
87
|
};
|
|
89
88
|
export default QuestionItem;
|
|
@@ -108,6 +108,7 @@ export interface AiReportProps {
|
|
|
108
108
|
scoreRankIntervals?: ScoreRankInterval[];
|
|
109
109
|
disabledScore?: boolean;
|
|
110
110
|
reminderSent?: boolean;
|
|
111
|
+
showAbilitiesDetails?: boolean;
|
|
111
112
|
operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
|
|
112
113
|
stepToken?: string;
|
|
113
114
|
interviewCheat?: InterviewCheat;
|
|
@@ -6,6 +6,7 @@ export declare const useAiReport: (props: AiReportProps) => {
|
|
|
6
6
|
scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
7
7
|
disabledScore?: boolean | undefined;
|
|
8
8
|
reminderSent?: boolean | undefined;
|
|
9
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
9
10
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
10
11
|
stepToken?: string | undefined;
|
|
11
12
|
interviewCheat?: import("./interface").InterviewCheat | undefined;
|
|
@@ -8,6 +8,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
8
8
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
9
9
|
disabledScore?: boolean | undefined;
|
|
10
10
|
reminderSent?: boolean | undefined;
|
|
11
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
11
12
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
12
13
|
stepToken?: string | undefined;
|
|
13
14
|
interviewCheat?: import("@/modules/ai-report/interface").InterviewCheat | undefined;
|
|
@@ -26,6 +27,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
26
27
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
27
28
|
disabledScore?: boolean | undefined;
|
|
28
29
|
reminderSent?: boolean | undefined;
|
|
30
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
29
31
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
30
32
|
stepToken?: string | undefined;
|
|
31
33
|
interviewCheat?: import("@/modules/ai-report/interface").InterviewCheat | undefined;
|
|
@@ -44,6 +46,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
44
46
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
45
47
|
disabledScore?: boolean | undefined;
|
|
46
48
|
reminderSent?: boolean | undefined;
|
|
49
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
47
50
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
48
51
|
stepToken?: string | undefined;
|
|
49
52
|
interviewCheat?: import("@/modules/ai-report/interface").InterviewCheat | undefined;
|
|
@@ -25,7 +25,6 @@ var ai_question_2 = require("../../../../services/ai-question");
|
|
|
25
25
|
var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
|
|
26
26
|
var ScrollDialogContent_1 = __importDefault(require("../../../../components/ScrollDialogContent"));
|
|
27
27
|
var const_1 = require("./const");
|
|
28
|
-
var styled_1 = require("./styled");
|
|
29
28
|
var MANDARIN = ai_question_1.LANGUAGE_TYPE.MANDARIN, CANTONESE = ai_question_1.LANGUAGE_TYPE.CANTONESE;
|
|
30
29
|
var AiAssessmentCriteria = function (props) {
|
|
31
30
|
var open = props.open, onClose = props.onClose;
|
|
@@ -85,7 +84,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
85
84
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(list.filter(function (_a) {
|
|
86
85
|
var type = _a.type;
|
|
87
86
|
return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
|
|
88
|
-
}).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsxs)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, color: 'rgba(0,0,0,0.86)' } }, { children: [name, type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioGroup, __assign({ value: language, sx: { ml:
|
|
87
|
+
}).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsxs)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, color: 'rgba(0,0,0,0.86)' } }, { children: [name, type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
|
|
89
88
|
.filter(function (_a) {
|
|
90
89
|
var type = _a.type;
|
|
91
90
|
return [MANDARIN, CANTONESE].includes(type);
|
|
@@ -101,19 +100,17 @@ var AiAssessmentCriteria = function (props) {
|
|
|
101
100
|
.map(function (_a) {
|
|
102
101
|
var name = _a.name, type = _a.type, token = _a.token;
|
|
103
102
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token));
|
|
104
|
-
})] }))) : ((0, jsx_runtime_1.jsx)(
|
|
103
|
+
})] }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: list.map(function (item) {
|
|
105
104
|
var name = item.name, desc = item.desc, type = item.type, token = item.token;
|
|
106
105
|
if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return setCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
|
|
113
|
-
} }) }), (0, jsx_runtime_1.jsx)(mui_1.ListItemText, { primary: name, secondary: desc })] }), token));
|
|
106
|
+
var isLanguageAbility = [14, 15].includes(type);
|
|
107
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
|
|
108
|
+
var _a;
|
|
109
|
+
return setCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
|
|
110
|
+
} }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
|
|
114
111
|
}
|
|
115
112
|
return null;
|
|
116
|
-
}) }))
|
|
113
|
+
}) }))] }, "".concat(name, "-").concat(type)));
|
|
117
114
|
})) }) })));
|
|
118
115
|
};
|
|
119
116
|
exports.default = AiAssessmentCriteria;
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
3
|
-
action?: import("react").Ref<import("fbm-ui/lib/mui").ButtonBaseActions> | undefined;
|
|
4
|
-
centerRipple?: boolean | undefined;
|
|
2
|
+
export declare const ListItem: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
5
3
|
children?: import("react").ReactNode;
|
|
6
|
-
|
|
7
|
-
disabled?: boolean | undefined;
|
|
8
|
-
disableRipple?: boolean | undefined;
|
|
9
|
-
disableTouchRipple?: boolean | undefined;
|
|
10
|
-
focusRipple?: boolean | undefined;
|
|
11
|
-
focusVisibleClassName?: string | undefined;
|
|
12
|
-
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
13
|
-
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
14
|
-
sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
15
|
-
tabIndex?: number | undefined;
|
|
16
|
-
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
17
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
18
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
19
|
-
}, "children" | "style" | "className" | "tabIndex" | "classes" | "alignItems" | "sx" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var mui_1 = require("fbm-ui/lib/mui");
|
|
3
|
+
exports.ListItem = void 0;
|
|
5
4
|
var fbm_ui_1 = require("fbm-ui");
|
|
6
|
-
exports.
|
|
7
|
-
padding: '4px 0
|
|
8
|
-
|
|
9
|
-
marginRight: 0,
|
|
10
|
-
},
|
|
11
|
-
'& .MuiCheckbox-root': {
|
|
12
|
-
padding: 0,
|
|
13
|
-
},
|
|
14
|
-
'& .MuiListItemText-primary': {
|
|
15
|
-
fontSize: 14,
|
|
16
|
-
},
|
|
17
|
-
'& .MuiListItemText-secondary': {
|
|
18
|
-
fontSize: 12,
|
|
19
|
-
},
|
|
20
|
-
'& .MuiListItemIcon-root': {
|
|
21
|
-
minWidth: 36,
|
|
22
|
-
},
|
|
5
|
+
exports.ListItem = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
|
|
6
|
+
padding: '4px 0',
|
|
7
|
+
display: 'flex',
|
|
23
8
|
});
|
|
@@ -23,6 +23,6 @@ var BootVideo_1 = __importDefault(require("../BootVideo"));
|
|
|
23
23
|
var QuestionHeader = function () {
|
|
24
24
|
var questionModelData = (0, question_model_store_1.useQuestionModelStore)().questionModelData;
|
|
25
25
|
var _a = (0, react_1.useState)(false), bootVideoOpen = _a[0], setBootVideoOpen = _a[1];
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(BootVideo_1.default, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), questionModelData && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(BootVideo_1.default, { open: bootVideoOpen, onClose: function () { return setBootVideoOpen(false); } }), questionModelData && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500", mb: 1 }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: "secondary", variant: "caption" }, { children: ["\u9884\u8BA1\u9762\u8BD5\u65F6\u957F\uFF1A", (0, utils_1.getSecondToTime)((questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.duration) || 0)] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u62D6\u52A8\u8BD5\u9898\u5361\u7247\u53EF\u6539\u53D8\u8BD5\u9898\u987A\u5E8F" }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 200, textAlign: "right" }, { children: [(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: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "end", sx: { mt: '6px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "AI\u6D4B\u8BC4\u6743\u91CD" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.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: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.56)' } }) })) }))] }))] }))] }))] })));
|
|
27
27
|
};
|
|
28
28
|
exports.default = QuestionHeader;
|
|
@@ -19,10 +19,10 @@ var ai_question_1 = require("../../../../services/ai-question");
|
|
|
19
19
|
var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
|
|
20
20
|
var utils_1 = require("../../../../utils/utils");
|
|
21
21
|
var VideoVoice = function () {
|
|
22
|
-
var _a, _b, _c, _d;
|
|
23
|
-
var
|
|
22
|
+
var _a, _b, _c, _d, _e;
|
|
23
|
+
var _f = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }), questionState = _f.questionState, updateQuestionState = _f.updateQuestionState;
|
|
24
24
|
var item = questionState.item;
|
|
25
|
-
var
|
|
25
|
+
var _g = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
|
|
26
26
|
manual: true,
|
|
27
27
|
onSuccess: function (_a) {
|
|
28
28
|
var data = _a.data;
|
|
@@ -31,10 +31,11 @@ var VideoVoice = function () {
|
|
|
31
31
|
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoUrl: firstData.url }) }),
|
|
32
32
|
});
|
|
33
33
|
},
|
|
34
|
-
}), loading =
|
|
35
|
-
var
|
|
34
|
+
}), loading = _g.loading, postCommonUpload = _g.run;
|
|
35
|
+
var handleVideoBroadcastChange = function (key, checked) {
|
|
36
|
+
var _a;
|
|
36
37
|
updateQuestionState({
|
|
37
|
-
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), {
|
|
38
|
+
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
|
|
38
39
|
});
|
|
39
40
|
};
|
|
40
41
|
var uploadProps = {
|
|
@@ -60,6 +61,6 @@ var VideoVoice = function () {
|
|
|
60
61
|
multiline: true,
|
|
61
62
|
placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
|
|
62
63
|
sx: { padding: 0 },
|
|
63
|
-
} }), (0, jsx_runtime_1.jsx)(mui_1.FormGroup, __assign({ sx: { mt: 9 } }, { children: (0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange:
|
|
64
|
+
} }), (0, jsx_runtime_1.jsx)(mui_1.FormGroup, __assign({ sx: { mt: 9 } }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), (0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_e = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _e === void 0 ? void 0 : _e.videoSkip) === 1 }), label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", sx: { mb: 1 } }, { children: "\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8BF4\u660E\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "1.\u89C6\u9891\u7D20\u6750\u5C3A\u5BF8\u5EFA\u8BAE\u4E3A\u7AD6\u7248\uFF0C\u6BD4\u4F8B\u63A7\u5236\u57289\uFF1A16 \uFF0C\u683C\u5F0F\u9650\u4E8E.mp4" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "2.\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8FC7\u7A0B\u4E2D\uFF0C\u9762\u8BD5\u5185\u5BB9\u5C06\u4E0D\u8FDB\u884CAI\u8BED\u97F3\u64AD\u62A5\u5904\u7406" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "3.\u5982\u5141\u8BB8\u5019\u9009\u4EBA\u91CD\u590D\u542C\u9898\uFF0C\u5355\u9898\u5168\u7A0B\u91CD\u590D\u6B21\u6570\u4E3A3\u6B21\u3002" }))] }))] })));
|
|
64
65
|
};
|
|
65
66
|
exports.default = VideoVoice;
|
|
@@ -119,7 +119,7 @@ var QuestionUpdate = function () {
|
|
|
119
119
|
var words = _a.words, score = _a.score, color = _a.color;
|
|
120
120
|
if (!words)
|
|
121
121
|
errorIndexes.push(index);
|
|
122
|
-
extra_1[words] = {
|
|
122
|
+
extra_1[words] = { color: color, score: score };
|
|
123
123
|
});
|
|
124
124
|
setKeyPointAnalysisError(errorIndexes);
|
|
125
125
|
if (!errorIndexes.length && isSubmit) {
|
|
@@ -30,16 +30,15 @@ var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
|
|
|
30
30
|
var Abilities_1 = __importDefault(require("./Abilities"));
|
|
31
31
|
var STEP_NO_ANSWER = ai_report_1.INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = ai_report_1.INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
|
|
32
32
|
var QuestionItem = function (props) {
|
|
33
|
-
var token = props.token, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, name = _b.name, type = _b.type,
|
|
33
|
+
var token = props.token, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, name = _b.name, type = _b.type, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
|
|
34
34
|
var _d = (0, react_1.useState)(false), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
35
|
-
var _e = (0, global_store_1.useAiReportStore)(function (store) { return [
|
|
36
|
-
store.reportResult,
|
|
37
|
-
store.stepToken,
|
|
38
|
-
store.operableButtons,
|
|
39
|
-
]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
35
|
+
var _e = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
40
36
|
var steps = (reportResult || {}).steps;
|
|
41
|
-
var
|
|
37
|
+
var isAbilities = operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('abilities');
|
|
42
38
|
var isExistWeight = weight > 0;
|
|
39
|
+
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
40
|
+
var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
|
|
41
|
+
var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
|
|
43
42
|
var comprehensiveScore = (0, react_1.useMemo)(function () {
|
|
44
43
|
if (status === STEP_COMPLETED) {
|
|
45
44
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: ThemeProvider_1.theme.palette.primary.main, fontSize: 16, fontWeight: 500 }, { children: (0, utils_1.formatScore)(score) })));
|
|
@@ -89,6 +88,6 @@ var QuestionItem = function (props) {
|
|
|
89
88
|
mt: 2,
|
|
90
89
|
cursor: videoUrl ? 'pointer' : 'inherit',
|
|
91
90
|
borderColor: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : '',
|
|
92
|
-
}, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", name] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }),
|
|
91
|
+
}, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", name] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { originScore: originScore, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index })] }), token));
|
|
93
92
|
};
|
|
94
93
|
exports.default = QuestionItem;
|
|
@@ -108,6 +108,7 @@ export interface AiReportProps {
|
|
|
108
108
|
scoreRankIntervals?: ScoreRankInterval[];
|
|
109
109
|
disabledScore?: boolean;
|
|
110
110
|
reminderSent?: boolean;
|
|
111
|
+
showAbilitiesDetails?: boolean;
|
|
111
112
|
operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
|
|
112
113
|
stepToken?: string;
|
|
113
114
|
interviewCheat?: InterviewCheat;
|
|
@@ -6,6 +6,7 @@ export declare const useAiReport: (props: AiReportProps) => {
|
|
|
6
6
|
scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
7
7
|
disabledScore?: boolean | undefined;
|
|
8
8
|
reminderSent?: boolean | undefined;
|
|
9
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
9
10
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
10
11
|
stepToken?: string | undefined;
|
|
11
12
|
interviewCheat?: import("./interface").InterviewCheat | undefined;
|
|
@@ -8,6 +8,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
8
8
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
9
9
|
disabledScore?: boolean | undefined;
|
|
10
10
|
reminderSent?: boolean | undefined;
|
|
11
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
11
12
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
12
13
|
stepToken?: string | undefined;
|
|
13
14
|
interviewCheat?: import("@/modules/ai-report/interface").InterviewCheat | undefined;
|
|
@@ -26,6 +27,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
26
27
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
27
28
|
disabledScore?: boolean | undefined;
|
|
28
29
|
reminderSent?: boolean | undefined;
|
|
30
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
29
31
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
30
32
|
stepToken?: string | undefined;
|
|
31
33
|
interviewCheat?: import("@/modules/ai-report/interface").InterviewCheat | undefined;
|
|
@@ -44,6 +46,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
44
46
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
45
47
|
disabledScore?: boolean | undefined;
|
|
46
48
|
reminderSent?: boolean | undefined;
|
|
49
|
+
showAbilitiesDetails?: boolean | undefined;
|
|
47
50
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
48
51
|
stepToken?: string | undefined;
|
|
49
52
|
interviewCheat?: import("@/modules/ai-report/interface").InterviewCheat | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eli-video-interview",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "鳄梨科技 AI视频面试 React SDK",
|
|
5
5
|
"author": "鳄梨科技",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"type": "git",
|
|
56
56
|
"url": "https://jihulab.com/elihr/elifront/open/lerna-avocado-sdk.git"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "a899beede4d71da37bfb3a4cb34bd745c4c29cef"
|
|
59
59
|
}
|