eli-video-interview 1.2.40-alpha.5 → 1.2.40-alpha.7
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/constants/ai-question.js +2 -2
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +7 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +2 -2
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +2 -2
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +2 -1
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +4 -4
- package/esm/modules/ai-report/components/VideoQuestion/interface.d.ts +2 -0
- package/lib/constants/ai-question.js +2 -2
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +7 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +2 -2
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +2 -1
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +4 -4
- package/lib/modules/ai-report/components/VideoQuestion/interface.d.ts +2 -0
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ export var ADD_QUESTION_TYPE_LIST = [
|
|
|
21
21
|
{
|
|
22
22
|
type: EVALUATION,
|
|
23
23
|
hide: true,
|
|
24
|
-
title: '
|
|
24
|
+
title: '评测题',
|
|
25
25
|
desc: '候选人根据所提供的文案进行朗读。',
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -81,7 +81,7 @@ export var AiVideoStatus = {
|
|
|
81
81
|
export var MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
|
|
82
82
|
export var MAX_UPLOAD_VIDEO_FILE_SIZE = 1024 * 1024 * 500;
|
|
83
83
|
export var TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12, 16];
|
|
84
|
-
export var DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16];
|
|
84
|
+
export var DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16, 17];
|
|
85
85
|
export var DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
|
|
86
86
|
// 是否开启AI分析
|
|
87
87
|
export var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
|
|
@@ -44,7 +44,13 @@ var AiEvaluation = function () {
|
|
|
44
44
|
var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
|
|
45
45
|
var handleClickAdd = useCallback(function (aiShowType) {
|
|
46
46
|
setState({ addQuestionOpen: false });
|
|
47
|
-
updateQuestionState({
|
|
47
|
+
updateQuestionState({
|
|
48
|
+
open: true,
|
|
49
|
+
aiShowType: aiShowType,
|
|
50
|
+
token: '',
|
|
51
|
+
index: -1,
|
|
52
|
+
item: __assign(__assign({}, defaultQuestionParams), { aiShowType: aiShowType, type: aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE ? 17 : 1, token: uniqueId() }),
|
|
53
|
+
});
|
|
48
54
|
}, [setState, updateQuestionState]);
|
|
49
55
|
var content = (_jsx(List, { children: ADD_QUESTION_TYPE_SHOW_LIST.map(function (_a) {
|
|
50
56
|
var title = _a.title, desc = _a.desc, type = _a.type;
|
|
@@ -21,7 +21,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { ChoiceIcon, ChoiceItem, ChoiceItemInput, ScoreInput } from './styled';
|
|
23
23
|
import { uniqueId } from "../../../../utils/utils";
|
|
24
|
-
import { AddIcon, Box, Button, CloseIcon, DragIndicatorIcon, FormItem, IconButton } from 'fbm-ui';
|
|
24
|
+
import { AddIcon, Box, Button, CloseIcon, DragIndicatorIcon, FormItem, IconButton, Typography } from 'fbm-ui';
|
|
25
25
|
import { FieldArray } from 'formik';
|
|
26
26
|
import { useCallback, useEffect, useRef } from 'react';
|
|
27
27
|
import Sortable from 'sortablejs';
|
|
@@ -90,7 +90,7 @@ var Choice = function (_a) {
|
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
onChange('options', __spreadArray([], ((item === null || item === void 0 ? void 0 : item.options) || []).map(function (v, index) { return (i === index ? __assign(__assign({}, v), { score: Number(value) }) : v); }), true), index);
|
|
93
|
-
} }, { children: _jsx(ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: "\u5206" }) }))] }, v.key || uniqueId()));
|
|
93
|
+
} }, { children: _jsx(ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: _jsx(Typography, __assign({ variant: "caption" }, { children: "\u5206" })) }) }))] }, v.key || uniqueId()));
|
|
94
94
|
});
|
|
95
95
|
} })) })), _jsx(ChoiceItem, { children: _jsx(Button, __assign({ icon: _jsx(AddIcon, {}), variant: "outlined", color: "inherit", size: "small", onClick: handleOptionAdd, sx: { ml: -2 } }, { children: "\u6DFB\u52A0\u9009\u9879" })) })] })));
|
|
96
96
|
};
|
|
@@ -16,7 +16,7 @@ import { Box, Typography } from 'fbm-ui';
|
|
|
16
16
|
import update from 'immutability-helper';
|
|
17
17
|
import { useCallback } from 'react';
|
|
18
18
|
var Abilities = function (_a) {
|
|
19
|
-
var stepIndex = _a.stepIndex;
|
|
19
|
+
var stepIndex = _a.stepIndex, disabledScore = _a.disabledScore;
|
|
20
20
|
var _b = useAiReportStore(function (store) { return [store.reportResult]; }), reportResult = _b.reportResult, updateReportResult = _b.updateReportResult, onScoreChange = _b.onScoreChange;
|
|
21
21
|
var steps = (reportResult || {}).steps;
|
|
22
22
|
var handleChangeCommitted = useCallback(function (score, index, type) {
|
|
@@ -34,7 +34,7 @@ var Abilities = function (_a) {
|
|
|
34
34
|
return (_jsxs(Box, __assign({ mt: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), _jsx(Box, __assign({ mt: 3 }, { children: steps &&
|
|
35
35
|
steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
|
|
36
36
|
var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
|
|
37
|
-
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 420, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto
|
|
37
|
+
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 420, disabledScore: disabledScore, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "".concat(disabledScore ? 'off' : 'auto'), onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
|
|
38
38
|
}) }))] })));
|
|
39
39
|
};
|
|
40
40
|
export default Abilities;
|
|
@@ -36,6 +36,7 @@ var QuestionItem = function (props) {
|
|
|
36
36
|
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
37
37
|
var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
|
|
38
38
|
var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
|
|
39
|
+
var isSingleChoice = aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE;
|
|
39
40
|
var comprehensiveScore = useMemo(function () {
|
|
40
41
|
if (status === STEP_COMPLETED) {
|
|
41
42
|
return (_jsx(Typography, __assign({ variant: "caption", color: theme.palette.primary.main, fontSize: 16, fontWeight: 500 }, { children: formatScore(score) })));
|
|
@@ -88,6 +89,6 @@ var QuestionItem = function (props) {
|
|
|
88
89
|
mt: 2,
|
|
89
90
|
cursor: videoUrl ? 'pointer' : 'inherit',
|
|
90
91
|
borderColor: token === stepToken ? theme.palette.primary.main : '',
|
|
91
|
-
}, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", desc] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [
|
|
92
|
+
}, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", desc] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestion && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.answer }))] })] })), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
|
|
92
93
|
};
|
|
93
94
|
export default QuestionItem;
|
|
@@ -16,13 +16,13 @@ import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
|
16
16
|
import { Tooltip, Typography } from 'fbm-ui';
|
|
17
17
|
import { useCallback, useEffect, useState } from 'react';
|
|
18
18
|
var ScoreSlider = function (props) {
|
|
19
|
-
var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted;
|
|
19
|
+
var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted, _e = props.disabledScore, sliderDisabledScore = _e === void 0 ? false : _e;
|
|
20
20
|
var aiScore = originScore.toFixed(0);
|
|
21
|
-
var
|
|
21
|
+
var _f = useState(0), score = _f[0], setScore = _f[1];
|
|
22
22
|
var disabledScore = useAiReportStore(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }).disabledScore;
|
|
23
23
|
var handleScoreChange = useCallback(function (e, v) {
|
|
24
|
-
!disabledScore && setScore(v);
|
|
25
|
-
}, [disabledScore]);
|
|
24
|
+
!disabledScore && !sliderDisabledScore && setScore(v);
|
|
25
|
+
}, [disabledScore, sliderDisabledScore]);
|
|
26
26
|
useEffect(function () {
|
|
27
27
|
setScore(Number(finalScore.toFixed(0)));
|
|
28
28
|
}, [finalScore]);
|
|
@@ -4,6 +4,7 @@ export interface ScoreSliderProps extends Pick<ScoreInfo, 'originScore' | 'final
|
|
|
4
4
|
valueLabelDisplay?: 'on' | 'off' | 'auto';
|
|
5
5
|
isShowLabel?: boolean;
|
|
6
6
|
isShowScoreRank?: boolean;
|
|
7
|
+
disabledScore?: boolean;
|
|
7
8
|
onChangeCommitted: (score: number) => void;
|
|
8
9
|
}
|
|
9
10
|
export interface QuestionItemProps extends AiInterviewReportStep {
|
|
@@ -11,4 +12,5 @@ export interface QuestionItemProps extends AiInterviewReportStep {
|
|
|
11
12
|
}
|
|
12
13
|
export interface AbilitiesProps {
|
|
13
14
|
stepIndex: number;
|
|
15
|
+
disabledScore?: boolean;
|
|
14
16
|
}
|
|
@@ -24,7 +24,7 @@ exports.ADD_QUESTION_TYPE_LIST = [
|
|
|
24
24
|
{
|
|
25
25
|
type: EVALUATION,
|
|
26
26
|
hide: true,
|
|
27
|
-
title: '
|
|
27
|
+
title: '评测题',
|
|
28
28
|
desc: '候选人根据所提供的文案进行朗读。',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -84,7 +84,7 @@ exports.AiVideoStatus = {
|
|
|
84
84
|
exports.MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
|
|
85
85
|
exports.MAX_UPLOAD_VIDEO_FILE_SIZE = 1024 * 1024 * 500;
|
|
86
86
|
exports.TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12, 16];
|
|
87
|
-
exports.DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16];
|
|
87
|
+
exports.DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16, 17];
|
|
88
88
|
exports.DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
|
|
89
89
|
// 是否开启AI分析
|
|
90
90
|
var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
|
|
@@ -49,7 +49,13 @@ var AiEvaluation = function () {
|
|
|
49
49
|
var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
|
|
50
50
|
var handleClickAdd = (0, react_1.useCallback)(function (aiShowType) {
|
|
51
51
|
setState({ addQuestionOpen: false });
|
|
52
|
-
updateQuestionState({
|
|
52
|
+
updateQuestionState({
|
|
53
|
+
open: true,
|
|
54
|
+
aiShowType: aiShowType,
|
|
55
|
+
token: '',
|
|
56
|
+
index: -1,
|
|
57
|
+
item: __assign(__assign({}, const_1.defaultQuestionParams), { aiShowType: aiShowType, type: aiShowType === ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE ? 17 : 1, token: (0, utils_1.uniqueId)() }),
|
|
58
|
+
});
|
|
53
59
|
}, [setState, updateQuestionState]);
|
|
54
60
|
var content = ((0, jsx_runtime_1.jsx)(mui_1.List, { children: ai_question_1.ADD_QUESTION_TYPE_SHOW_LIST.map(function (_a) {
|
|
55
61
|
var title = _a.title, desc = _a.desc, type = _a.type;
|
|
@@ -97,7 +97,7 @@ var Choice = function (_a) {
|
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
onChange('options', __spreadArray([], ((item === null || item === void 0 ? void 0 : item.options) || []).map(function (v, index) { return (i === index ? __assign(__assign({}, v), { score: Number(value) }) : v); }), true), index);
|
|
100
|
-
} }, { children: (0, jsx_runtime_1.jsx)(styled_1.ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: "\u5206" }) }))] }, v.key || (0, utils_1.uniqueId)()));
|
|
100
|
+
} }, { children: (0, jsx_runtime_1.jsx)(styled_1.ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption" }, { children: "\u5206" })) }) }))] }, v.key || (0, utils_1.uniqueId)()));
|
|
101
101
|
});
|
|
102
102
|
} })) })), (0, jsx_runtime_1.jsx)(styled_1.ChoiceItem, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), variant: "outlined", color: "inherit", size: "small", onClick: handleOptionAdd, sx: { ml: -2 } }, { children: "\u6DFB\u52A0\u9009\u9879" })) })] })));
|
|
103
103
|
};
|
|
@@ -21,7 +21,7 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
21
21
|
var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
22
22
|
var react_1 = require("react");
|
|
23
23
|
var Abilities = function (_a) {
|
|
24
|
-
var stepIndex = _a.stepIndex;
|
|
24
|
+
var stepIndex = _a.stepIndex, disabledScore = _a.disabledScore;
|
|
25
25
|
var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult]; }), reportResult = _b.reportResult, updateReportResult = _b.updateReportResult, onScoreChange = _b.onScoreChange;
|
|
26
26
|
var steps = (reportResult || {}).steps;
|
|
27
27
|
var handleChangeCommitted = (0, react_1.useCallback)(function (score, index, type) {
|
|
@@ -39,7 +39,7 @@ var Abilities = function (_a) {
|
|
|
39
39
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 3 }, { children: steps &&
|
|
40
40
|
steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
|
|
41
41
|
var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: name })), (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: 420, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: name })), (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: 420, disabledScore: disabledScore, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "".concat(disabledScore ? 'off' : 'auto'), onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
|
|
43
43
|
}) }))] })));
|
|
44
44
|
};
|
|
45
45
|
exports.default = Abilities;
|
|
@@ -41,6 +41,7 @@ var QuestionItem = function (props) {
|
|
|
41
41
|
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
42
42
|
var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
|
|
43
43
|
var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
|
|
44
|
+
var isSingleChoice = aiShowType === ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE;
|
|
44
45
|
var comprehensiveScore = (0, react_1.useMemo)(function () {
|
|
45
46
|
if (status === STEP_COMPLETED) {
|
|
46
47
|
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) })));
|
|
@@ -93,6 +94,6 @@ var QuestionItem = function (props) {
|
|
|
93
94
|
mt: 2,
|
|
94
95
|
cursor: videoUrl ? 'pointer' : 'inherit',
|
|
95
96
|
borderColor: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : '',
|
|
96
|
-
}, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [
|
|
97
|
+
}, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isSingleChoice && (0, jsx_runtime_1.jsx)(SingleChoice_1.default, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestion && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.desc) })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.answer }))] })] })), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
|
|
97
98
|
};
|
|
98
99
|
exports.default = QuestionItem;
|
|
@@ -18,13 +18,13 @@ var global_store_1 = require("../../../../store/ai-report/global-store");
|
|
|
18
18
|
var fbm_ui_1 = require("fbm-ui");
|
|
19
19
|
var react_1 = require("react");
|
|
20
20
|
var ScoreSlider = function (props) {
|
|
21
|
-
var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted;
|
|
21
|
+
var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted, _e = props.disabledScore, sliderDisabledScore = _e === void 0 ? false : _e;
|
|
22
22
|
var aiScore = originScore.toFixed(0);
|
|
23
|
-
var
|
|
23
|
+
var _f = (0, react_1.useState)(0), score = _f[0], setScore = _f[1];
|
|
24
24
|
var disabledScore = (0, global_store_1.useAiReportStore)(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }).disabledScore;
|
|
25
25
|
var handleScoreChange = (0, react_1.useCallback)(function (e, v) {
|
|
26
|
-
!disabledScore && setScore(v);
|
|
27
|
-
}, [disabledScore]);
|
|
26
|
+
!disabledScore && !sliderDisabledScore && setScore(v);
|
|
27
|
+
}, [disabledScore, sliderDisabledScore]);
|
|
28
28
|
(0, react_1.useEffect)(function () {
|
|
29
29
|
setScore(Number(finalScore.toFixed(0)));
|
|
30
30
|
}, [finalScore]);
|
|
@@ -4,6 +4,7 @@ export interface ScoreSliderProps extends Pick<ScoreInfo, 'originScore' | 'final
|
|
|
4
4
|
valueLabelDisplay?: 'on' | 'off' | 'auto';
|
|
5
5
|
isShowLabel?: boolean;
|
|
6
6
|
isShowScoreRank?: boolean;
|
|
7
|
+
disabledScore?: boolean;
|
|
7
8
|
onChangeCommitted: (score: number) => void;
|
|
8
9
|
}
|
|
9
10
|
export interface QuestionItemProps extends AiInterviewReportStep {
|
|
@@ -11,4 +12,5 @@ export interface QuestionItemProps extends AiInterviewReportStep {
|
|
|
11
12
|
}
|
|
12
13
|
export interface AbilitiesProps {
|
|
13
14
|
stepIndex: number;
|
|
15
|
+
disabledScore?: boolean;
|
|
14
16
|
}
|