eli-video-interview 1.2.42-alpha.30 → 1.2.42-alpha.32
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/components/AiHeaderTitleV2/index.js +18 -7
- package/esm/constants/ai-question.d.ts +1 -1
- package/esm/constants/ai-question.js +3 -3
- package/esm/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/esm/modules/ai-report-v2/Root.d.ts +2 -2
- package/esm/modules/ai-report-v2/Root.js +2 -2
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +20 -20
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +9 -4
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
- package/esm/modules/ai-report-v2/components/Form/Form.js +20 -10
- package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +79 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +24 -11
- package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
- package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +71 -6
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +1 -1
- package/esm/modules/ai-report-v2/components/styled.js +8 -15
- package/esm/services/ai-report.d.ts +9 -0
- package/esm/services/ai-report.js +17 -0
- package/lib/components/AiHeaderTitleV2/index.js +18 -7
- package/lib/constants/ai-question.d.ts +1 -1
- package/lib/constants/ai-question.js +3 -3
- package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/lib/modules/ai-report-v2/Root.d.ts +2 -2
- package/lib/modules/ai-report-v2/Root.js +1 -1
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +17 -17
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +9 -4
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
- package/lib/modules/ai-report-v2/components/Form/Form.js +20 -10
- package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +81 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +24 -11
- package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
- package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +69 -4
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +1 -1
- package/lib/modules/ai-report-v2/components/styled.js +8 -15
- package/lib/services/ai-report.d.ts +9 -0
- package/lib/services/ai-report.js +19 -1
- package/package.json +1 -1
|
@@ -15,14 +15,25 @@ import { Stack } from 'fbm-ui/lib/mui';
|
|
|
15
15
|
var AiHeaderTitle = function (_a) {
|
|
16
16
|
var name = _a.name;
|
|
17
17
|
return (_jsxs(Stack, __assign({ display: "inline-flex", direction: "row", spacing: 1, sx: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
left: -12,
|
|
19
|
+
top: -8,
|
|
20
|
+
height: 48,
|
|
21
|
+
position: 'relative',
|
|
20
22
|
color: '#009D56',
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
width:
|
|
24
|
-
dispoly: 'flex',
|
|
23
|
+
borderRadius: '8px 0px 8px 8px',
|
|
24
|
+
background: 'linear-gradient( 360deg, #98F79C 0%, #C2FCC4 100%)',
|
|
25
|
+
width: 155,
|
|
25
26
|
alignItems: 'center',
|
|
26
|
-
|
|
27
|
+
'&:after': {
|
|
28
|
+
content: "''",
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
top: 0,
|
|
31
|
+
right: -5,
|
|
32
|
+
width: 0,
|
|
33
|
+
height: 0,
|
|
34
|
+
borderTop: '8px solid transparent',
|
|
35
|
+
borderLeft: '5px solid #6CD970',
|
|
36
|
+
},
|
|
37
|
+
} }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/H4yH/zOBWGb2Np_QoyQk_EH_eZ", alt: "", style: { marginLeft: 16, width: 32, height: 20 } }), _jsx(DinTypography, __assign({ variant: "h6", color: "inherit" }, { children: name }))] })));
|
|
27
38
|
};
|
|
28
39
|
export default AiHeaderTitle;
|
|
@@ -54,5 +54,5 @@ export declare const TEST_TYPE_READONLY: number[];
|
|
|
54
54
|
export declare const DISABLED_REPEAT_TYPE: number[];
|
|
55
55
|
export declare const DISABLED_COST_TYPE: number[];
|
|
56
56
|
export declare const IS_AI_ANALYSIS: (step: Pick<QuestionParams, 'aiType'>) => boolean;
|
|
57
|
-
export declare const IS_AI_FOLLOW_UP: (step: QuestionParams, interaction: InteractionMethod[]) => boolean;
|
|
57
|
+
export declare const IS_AI_FOLLOW_UP: (step: QuestionParams, interaction: InteractionMethod[], interactType: number) => boolean;
|
|
58
58
|
export declare const MAX_RANDOM_QUESTION_NUM = 50;
|
|
@@ -96,12 +96,12 @@ export var DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
|
|
|
96
96
|
// 是否开启AI分析
|
|
97
97
|
export var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
|
|
98
98
|
// 是否可以追问
|
|
99
|
-
export var IS_AI_FOLLOW_UP = function (step, interaction) {
|
|
100
|
-
return step.aiShowType === 1 && (
|
|
99
|
+
export var IS_AI_FOLLOW_UP = function (step, interaction, interactType) {
|
|
100
|
+
return step.aiShowType === 1 && (interactType === 1 || !IS_VIRTUAL_HUMAN(interaction) || step.broadcastType === 2);
|
|
101
101
|
};
|
|
102
102
|
var IS_VIRTUAL_HUMAN = function (interaction) {
|
|
103
103
|
if (interaction.length === 0)
|
|
104
104
|
return false;
|
|
105
|
-
return interaction.some(function (v) { var _a; return v.selected && (v.type === 2 || (v.type === 3 && ((_a = v.detail.interviewerShows) === null || _a === void 0 ? void 0 : _a.some(function (v) { return v.selected && v.humanType === 2; })))
|
|
105
|
+
return interaction.some(function (v) { var _a; return v.selected && (v.type === 2 || (v.type === 3 && ((_a = v.detail.interviewerShows) === null || _a === void 0 ? void 0 : _a.some(function (v) { return v.selected && v.humanType === 2; })))); });
|
|
106
106
|
};
|
|
107
107
|
export var MAX_RANDOM_QUESTION_NUM = 50;
|
|
@@ -60,11 +60,11 @@ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Ar
|
|
|
60
60
|
{ label: '直到充分为止', value: -1 },
|
|
61
61
|
], false);
|
|
62
62
|
var QuestionModelListItem = function (props) {
|
|
63
|
-
var
|
|
63
|
+
var _a = useInterviewRoomStore(), interactionMethods = _a.interactionMethods, interactType = _a.interactType;
|
|
64
64
|
var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
|
|
65
65
|
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp, followUpMaximum = step.followUpMaximum;
|
|
66
66
|
var isAiAnalysis = IS_AI_ANALYSIS(step);
|
|
67
|
-
var
|
|
67
|
+
var _b = useQuestionModelStore(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
|
|
68
68
|
var updateQuestionState = useUpdateQuestionStore().updateQuestionState;
|
|
69
69
|
var handleEdit = useCallback(function () {
|
|
70
70
|
updateQuestionState({ open: true, token: token, index: index, aiShowType: aiShowType, item: step });
|
|
@@ -113,6 +113,6 @@ var QuestionModelListItem = function (props) {
|
|
|
113
113
|
}, [questions]);
|
|
114
114
|
return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsx(Box, __assign({ display: "flex", borderBottom: !DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: _jsxs(Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), _jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragHandleIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), _jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
115
115
|
return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
116
|
-
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), IS_AI_FOLLOW_UP(step, interactionMethods) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
|
|
116
|
+
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), IS_AI_FOLLOW_UP(step, interactionMethods, interactType) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
|
|
117
117
|
};
|
|
118
118
|
export default memo(QuestionModelListItem);
|
|
@@ -25,7 +25,7 @@ var QuestionTemplate = function (_a) {
|
|
|
25
25
|
var enterprise = useEnterpriseStore().enterprise;
|
|
26
26
|
var loading = useRequest(function () { return PostAiModelQuestions(__assign({ extraAbilityTokens: selctedAbilitys }, enterprise)); }, {
|
|
27
27
|
manual: false,
|
|
28
|
-
refreshDeps: [selctedAbilitys, enterprise],
|
|
28
|
+
refreshDeps: [JSON.stringify(selctedAbilitys), JSON.stringify(enterprise)],
|
|
29
29
|
onSuccess: function (_a) {
|
|
30
30
|
var data = _a.data;
|
|
31
31
|
return updateAiEvaluationData(data);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AiReportProps } from './interface';
|
|
2
|
-
|
|
3
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<AiReportProps & React.RefAttributes<any>>>;
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<AiReportProps & import("react").RefAttributes<any>>>;
|
|
4
4
|
export default _default;
|
|
@@ -18,7 +18,7 @@ import { INTERVIEW_STATUS } from "../../enum/ai-report";
|
|
|
18
18
|
import { PostAiInterviewResult } from "../../services/ai-report";
|
|
19
19
|
import { useAiReportStore } from "../../store/ai-report/global-store";
|
|
20
20
|
import { useRequest } from 'ahooks';
|
|
21
|
-
import { Box, Button,
|
|
21
|
+
import { Box, Button, Typography } from 'fbm-ui';
|
|
22
22
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
23
23
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
24
24
|
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
@@ -74,7 +74,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
74
74
|
backgroundRepeat: 'no-repeat',
|
|
75
75
|
backgroundPosition: 'center top',
|
|
76
76
|
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
77
|
-
} }, { children: [(collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status, fetchReportUrl: fetchReportUrl })), _jsx(FormReport, { fetchFormResult: fetchFormResult }), _jsx(
|
|
77
|
+
} }, { children: [(collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status, fetchReportUrl: fetchReportUrl })), _jsx(FormReport, { fetchFormResult: fetchFormResult }), _jsx(Box, __assign({ sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4, border: '2px solid #FFFFFF', pb: 1 } }, { children: _jsx(VideoQuestion, { isExportPdf: isExportPdf }) }))] }))] }));
|
|
78
78
|
}
|
|
79
79
|
}, [
|
|
80
80
|
status,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type Mode = 'edit' | 'show';
|
|
3
|
-
declare type Field = 'evaluations' | 'suggestions';
|
|
4
3
|
interface EvaluateProps {
|
|
5
4
|
title: string;
|
|
6
|
-
|
|
7
|
-
field: Field;
|
|
8
|
-
evaluations: string;
|
|
5
|
+
evaluation: string;
|
|
9
6
|
mode?: Mode;
|
|
10
7
|
canEdit?: boolean;
|
|
8
|
+
orderToken: string;
|
|
11
9
|
}
|
|
12
10
|
declare const Evaluate: React.FC<EvaluateProps>;
|
|
13
11
|
export default Evaluate;
|
|
@@ -26,13 +26,13 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
26
26
|
return ar;
|
|
27
27
|
};
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
import {
|
|
30
|
-
import { Button, confirm,
|
|
29
|
+
import { PostInterviewEvaluation } from "../../../../services/ai-report";
|
|
30
|
+
import { Button, confirm, FormItem, Typography } from 'fbm-ui';
|
|
31
31
|
import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
32
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
32
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
33
33
|
var Evaluate = function (_a) {
|
|
34
|
-
var title = _a.title,
|
|
35
|
-
var _d = __read(useState(
|
|
34
|
+
var title = _a.title, evaluation = _a.evaluation, orderToken = _a.orderToken, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'false' : _c;
|
|
35
|
+
var _d = __read(useState(evaluation), 2), content = _d[0], setContent = _d[1];
|
|
36
36
|
var _e = __read(useState('show'), 2), internalMode = _e[0], setInternalMode = _e[1];
|
|
37
37
|
var handleChange = useCallback(function (e) {
|
|
38
38
|
var value = e.target.value;
|
|
@@ -41,7 +41,12 @@ var Evaluate = function (_a) {
|
|
|
41
41
|
var handleModeChange = useCallback(function () {
|
|
42
42
|
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
43
43
|
}, [internalMode]);
|
|
44
|
+
var isValidate = useMemo(function () {
|
|
45
|
+
return content.trim().length > 0;
|
|
46
|
+
}, [content]);
|
|
44
47
|
var handleSubmit = useCallback(function () {
|
|
48
|
+
if (!isValidate)
|
|
49
|
+
return;
|
|
45
50
|
confirm({
|
|
46
51
|
header: null,
|
|
47
52
|
content: '确认将评价内容修改吗?该动作无法被撤销。',
|
|
@@ -52,19 +57,14 @@ var Evaluate = function (_a) {
|
|
|
52
57
|
},
|
|
53
58
|
onOk: function (_a) {
|
|
54
59
|
var onClose = _a.onClose;
|
|
55
|
-
var data =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
: {
|
|
61
|
-
evaluationToken: token,
|
|
62
|
-
manualSuggestions: [content],
|
|
63
|
-
};
|
|
64
|
-
PostAiInterviewEvaluation(data).then(handleModeChange).then(onClose).catch(console.log);
|
|
60
|
+
var data = {
|
|
61
|
+
orderToken: orderToken,
|
|
62
|
+
manualEvaluation: content,
|
|
63
|
+
};
|
|
64
|
+
PostInterviewEvaluation(data).then(handleModeChange).then(onClose).catch(console.error);
|
|
65
65
|
},
|
|
66
66
|
});
|
|
67
|
-
}, [
|
|
67
|
+
}, [isValidate, orderToken, content, handleModeChange]);
|
|
68
68
|
useEffect(function () {
|
|
69
69
|
setInternalMode(mode);
|
|
70
70
|
}, [mode]);
|
|
@@ -73,8 +73,8 @@ var Evaluate = function (_a) {
|
|
|
73
73
|
background: '#FFFBE8',
|
|
74
74
|
boxShadow: ' 0px 2px 6px 0px rgba(91,108,95,0.15)',
|
|
75
75
|
padding: '8px 24px',
|
|
76
|
-
borderRadius:
|
|
77
|
-
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", height: 36, mb: 1 }, { children: [_jsx(Box, __assign({ sx: {
|
|
76
|
+
borderRadius: 3,
|
|
77
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", height: 36, mb: 1, position: "relative" }, { children: [_jsx(Box, __assign({ sx: {
|
|
78
78
|
position: 'relative',
|
|
79
79
|
'&:after': {
|
|
80
80
|
position: 'absolute',
|
|
@@ -88,9 +88,9 @@ var Evaluate = function (_a) {
|
|
|
88
88
|
display: 'inline-block',
|
|
89
89
|
margin: '0 4px',
|
|
90
90
|
},
|
|
91
|
-
} }, { children: _jsx(Typography, __assign({ fontWeight: "medium", zIndex: 1, sx: { position: 'relative', zIndex: 1 } }, { children: title })) })), canEdit && (_jsx(
|
|
91
|
+
} }, { children: _jsx(Typography, __assign({ fontWeight: "medium", zIndex: 1, sx: { position: 'relative', zIndex: 1 } }, { children: title })) })), canEdit && (_jsx("img", { onClick: handleModeChange, src: "https://webcdn.fbmms.cn/assets/pWED/KpgryvNScI7XZdjNBgTNC", alt: "", style: { width: 36, height: 36, position: 'absolute', top: -8, right: -24, cursor: 'pointer' } }))] })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange, error: !isValidate }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
|
|
92
92
|
handleModeChange();
|
|
93
|
-
|
|
93
|
+
setContent(evaluation);
|
|
94
94
|
} }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] })));
|
|
95
95
|
};
|
|
96
96
|
export default Evaluate;
|
|
@@ -25,6 +25,11 @@ function setupCanvas(canvas) {
|
|
|
25
25
|
ctx.scale(dpr, dpr);
|
|
26
26
|
return ctx;
|
|
27
27
|
}
|
|
28
|
+
// interface GradeColor {
|
|
29
|
+
// Bad: Array<number>;
|
|
30
|
+
// Good: Array<number>;
|
|
31
|
+
// Best: Array<number>;
|
|
32
|
+
// }
|
|
28
33
|
var MAX_WIDTH = 315;
|
|
29
34
|
var MAX_HEIGHT = 24;
|
|
30
35
|
var levelOrder = ['Bad', 'Good', 'Best'];
|
|
@@ -105,7 +110,7 @@ var drawTop = function (layout, ctx) {
|
|
|
105
110
|
// 绘制结束的虚线和文本 '100'
|
|
106
111
|
if (i === levelOrder.length - 1) {
|
|
107
112
|
drawVerticalDashedLine(ctx, offset - 2, 0, height + topLableHeight - 54, 2, 2);
|
|
108
|
-
ctx.fillText('100', offset - 2 -
|
|
113
|
+
ctx.fillText('100', offset - 2 - 24, height + topLableHeight - 40);
|
|
109
114
|
}
|
|
110
115
|
});
|
|
111
116
|
};
|
|
@@ -227,9 +232,9 @@ var Graph = function (_a) {
|
|
|
227
232
|
draw(layout, items, pathRef.current, ctx);
|
|
228
233
|
}
|
|
229
234
|
}, [ctx, items, height]);
|
|
230
|
-
useEffect(
|
|
231
|
-
|
|
232
|
-
}, [pathRef]);
|
|
235
|
+
// useEffect(() => {
|
|
236
|
+
// console.log(pathRef);
|
|
237
|
+
// }, [pathRef]);
|
|
233
238
|
var handleMouseMove = useCallback(function (e) {
|
|
234
239
|
if (ctx) {
|
|
235
240
|
var p = pathRef.current.find(function (p) { return isInPath(e.nativeEvent.offsetX, e.nativeEvent.offsetY, p.x, p.y, ctx); });
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const _default: import("react").MemoExoticComponent<() => JSX.Element | null>;
|
|
3
|
+
export default _default;
|
|
@@ -15,15 +15,19 @@ import Evaluate from './Evaluate';
|
|
|
15
15
|
import Graph from './Graph';
|
|
16
16
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
17
17
|
import { Box, Paper, Stack } from 'fbm-ui/lib/mui';
|
|
18
|
+
import { memo, useMemo } from 'react';
|
|
18
19
|
var Index = function () {
|
|
19
20
|
var _a = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _a.reportResult, showAiDimension = _a.showAiDimension, canEditAiDimension = _a.canEditAiDimension;
|
|
20
|
-
var _b =
|
|
21
|
-
var items =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaceEvaluation, workplaceEvaluation = _d === void 0 ? '' : _d, _e = _b.orderToken, orderToken = _e === void 0 ? '' : _e;
|
|
22
|
+
var items = useMemo(function () {
|
|
23
|
+
return collection.map(function (item) { return ({
|
|
24
|
+
name: item.name,
|
|
25
|
+
score: item.avgScore,
|
|
26
|
+
}); });
|
|
27
|
+
}, [collection]);
|
|
28
|
+
console.log('reportResult', reportResult, workplaceEvaluation);
|
|
25
29
|
if (!showAiDimension)
|
|
26
30
|
return null;
|
|
27
|
-
return (_jsx(Box, __assign({ id: "report-evaluate", px: 2, width: 1 }, { children: _jsx(Box, __assign({ component: Paper, elevation: 0, bgcolor: "transparent", mb: 3 }, { children: _jsxs(Stack, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Box, __assign({ mt: 2, flex: 1 }, { children: _jsx(Graph, { items: items }) })), _jsx(Report, {})] })),
|
|
31
|
+
return (_jsx(Box, __assign({ id: "report-evaluate", px: 2, width: 1 }, { children: _jsx(Box, __assign({ component: Paper, elevation: 0, bgcolor: "transparent", mb: 3 }, { children: _jsxs(Stack, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Box, __assign({ mt: 2, flex: 1 }, { children: _jsx(Graph, { items: items }) })), _jsx(Report, {})] })), workplaceEvaluation && (_jsx(Evaluate, { orderToken: orderToken, canEdit: canEditAiDimension, evaluation: workplaceEvaluation, title: "\u7EFC\u5408\u8BC4\u4EF7", mode: "show" }))] }) })) })));
|
|
28
32
|
};
|
|
29
|
-
export default Index;
|
|
33
|
+
export default memo(Index);
|
|
@@ -59,23 +59,33 @@ var template = (_a = {},
|
|
|
59
59
|
_a);
|
|
60
60
|
var Form = function (_a) {
|
|
61
61
|
var answers = _a.answers, _b = _a.customProcessName, customProcessName = _b === void 0 ? '资料收集' : _b;
|
|
62
|
-
return (_jsxs(Box, __assign({ component: Paper, m: 3,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
return (_jsxs(Box, __assign({ component: Paper, m: 3, borderRadius: 3 }, { children: [_jsxs(Box, __assign({ display: "flex", sx: {
|
|
63
|
+
left: -12,
|
|
64
|
+
top: -8,
|
|
65
|
+
height: 48,
|
|
66
|
+
position: 'relative',
|
|
66
67
|
color: '#009D56',
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
borderRadius: '8px 0px 8px 8px',
|
|
69
|
+
background: 'linear-gradient( 360deg, #98F79C 0%, #C2FCC4 100%)',
|
|
69
70
|
width: 'fit-content',
|
|
70
|
-
overflow: 'hidden',
|
|
71
|
-
mb: 2,
|
|
72
71
|
alignItems: 'center',
|
|
73
|
-
|
|
72
|
+
'&:after': {
|
|
73
|
+
content: "''",
|
|
74
|
+
position: 'absolute',
|
|
75
|
+
top: 0,
|
|
76
|
+
right: -5,
|
|
77
|
+
width: 0,
|
|
78
|
+
height: 0,
|
|
79
|
+
borderTop: '8px solid transparent',
|
|
80
|
+
borderLeft: '5px solid #6CD970',
|
|
81
|
+
},
|
|
82
|
+
} }, { children: [_jsx("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/5ex_/K7bDo1Qy6FdGVUIrXQksl", alt: "", width: 20, height: 20, style: { marginLeft: 16 } }), _jsx(DinTypography, __assign({ variant: "h6", sx: {
|
|
74
83
|
ml: 1,
|
|
75
84
|
color: '#009D56',
|
|
76
85
|
lineHeight: '24px',
|
|
77
86
|
width: 'auto',
|
|
78
|
-
|
|
87
|
+
marginRight: 4,
|
|
88
|
+
} }, { children: customProcessName }))] })), _jsxs(Stack, __assign({ p: 3, pt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", sx: {
|
|
79
89
|
background: '#E5FDE6',
|
|
80
90
|
color: '#009D56',
|
|
81
91
|
borderRadius: 20,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Mode = 'edit' | 'show';
|
|
3
|
+
interface EvaluateProps {
|
|
4
|
+
title: string;
|
|
5
|
+
token: string;
|
|
6
|
+
evaluation: string;
|
|
7
|
+
mode?: Mode;
|
|
8
|
+
canEdit?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Evaluate: React.FC<EvaluateProps>;
|
|
11
|
+
export default Evaluate;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import { PostInterviewEvaluation } from "../../../../services/ai-report";
|
|
30
|
+
import { Button, confirm, FormItem, Typography } from 'fbm-ui';
|
|
31
|
+
import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
32
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
33
|
+
var Evaluate = function (_a) {
|
|
34
|
+
var title = _a.title, evaluation = _a.evaluation, token = _a.token, _b = _a.mode, mode = _b === void 0 ? 'show' : _b;
|
|
35
|
+
var _c = __read(useState(evaluation), 2), content = _c[0], setContent = _c[1];
|
|
36
|
+
var _d = __read(useState('show'), 2), internalMode = _d[0], setInternalMode = _d[1];
|
|
37
|
+
var handleChange = useCallback(function (e) {
|
|
38
|
+
var value = e.target.value;
|
|
39
|
+
setContent(value);
|
|
40
|
+
}, []);
|
|
41
|
+
var handleModeChange = useCallback(function () {
|
|
42
|
+
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
43
|
+
}, [internalMode]);
|
|
44
|
+
var isValidate = useMemo(function () {
|
|
45
|
+
return content.trim().length > 0;
|
|
46
|
+
}, [content]);
|
|
47
|
+
var handleSubmit = useCallback(function () {
|
|
48
|
+
if (!isValidate)
|
|
49
|
+
return;
|
|
50
|
+
confirm({
|
|
51
|
+
header: null,
|
|
52
|
+
content: '确认将评价内容修改吗?该动作无法被撤销。',
|
|
53
|
+
okText: '修改',
|
|
54
|
+
okProps: {
|
|
55
|
+
color: 'error',
|
|
56
|
+
variant: 'contained',
|
|
57
|
+
},
|
|
58
|
+
onOk: function (_a) {
|
|
59
|
+
var onClose = _a.onClose;
|
|
60
|
+
var data = {
|
|
61
|
+
flowStepToken: token,
|
|
62
|
+
scoreManualEvaluation: content,
|
|
63
|
+
};
|
|
64
|
+
PostInterviewEvaluation(data).then(handleModeChange).then(onClose).catch(console.error);
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}, [isValidate, token, content, handleModeChange]);
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
setInternalMode(mode);
|
|
70
|
+
}, [mode]);
|
|
71
|
+
return (_jsxs(Stack, { children: [_jsx(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", height: 36, mb: 1 }, { children: _jsx(Typography, __assign({ variant: "body1", fontWeight: 700, sx: { color: '#4caf50' } }, { children: title })) })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, error: !isValidate, onChange: handleChange }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
|
|
72
|
+
handleModeChange();
|
|
73
|
+
setContent(evaluation);
|
|
74
|
+
} }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, { variant: "body2", sx: {
|
|
75
|
+
color: '#424242',
|
|
76
|
+
whiteSpace: 'pre-wrap',
|
|
77
|
+
}, dangerouslySetInnerHTML: { __html: content } }))] }));
|
|
78
|
+
};
|
|
79
|
+
export default Evaluate;
|
|
@@ -30,6 +30,7 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
30
30
|
import { ExportButton, Video } from '../styled';
|
|
31
31
|
import Abilities from './Abilities';
|
|
32
32
|
import BodyImages from './BodyImages';
|
|
33
|
+
import Evaluate from './Evaluate';
|
|
33
34
|
import ScoreSlider from './ScoreSlider';
|
|
34
35
|
import SingleChoice from './SingleChoice';
|
|
35
36
|
import { QuestionDesc } from './styled';
|
|
@@ -54,6 +55,10 @@ var QuestionItem = function (props) {
|
|
|
54
55
|
store.showAbilitiesDetails,
|
|
55
56
|
]; }), reportResult = _e.reportResult, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange;
|
|
56
57
|
var _f = reportResult || {}, steps = _f.steps, isSimulated = _f.isSimulated;
|
|
58
|
+
var _g = __read(useState('show'), 2), internalMode = _g[0], setInternalMode = _g[1];
|
|
59
|
+
var handleModeChange = useCallback(function () {
|
|
60
|
+
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
61
|
+
}, [internalMode]);
|
|
57
62
|
var isAbilities = operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('abilities');
|
|
58
63
|
var isExistWeight = Number(weight) > 0;
|
|
59
64
|
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
@@ -101,19 +106,27 @@ var QuestionItem = function (props) {
|
|
|
101
106
|
score: score,
|
|
102
107
|
});
|
|
103
108
|
}, [index, reportResult, steps, updateReportResult, onScoreChange, isSingleChoice]);
|
|
104
|
-
return (_jsxs(Stack, __assign({ sx: {
|
|
105
|
-
padding: '16px
|
|
109
|
+
return (_jsxs(Stack, __assign({ component: Paper, elevation: 1, sx: {
|
|
110
|
+
padding: '16px 16px',
|
|
106
111
|
mt: 2,
|
|
107
|
-
|
|
108
|
-
|
|
112
|
+
background: '#fff',
|
|
113
|
+
mx: 1,
|
|
114
|
+
borderRadius: '12px',
|
|
115
|
+
position: 'relative',
|
|
116
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [_jsxs(Stack, __assign({ flex: 1, mt: 1 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "h6", fontWeight: "500", sx: {
|
|
117
|
+
background: 'linear-gradient( 136deg, #65EA6A 0%, #4CAF50 100%)',
|
|
109
118
|
color: '#fff',
|
|
110
|
-
borderRadius: '
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
borderRadius: '12px 0px 12px 0px',
|
|
120
|
+
width: 48,
|
|
121
|
+
height: 42,
|
|
122
|
+
position: 'absolute',
|
|
123
|
+
top: 0,
|
|
124
|
+
left: 0,
|
|
125
|
+
display: 'flex',
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
justifyContent: 'center',
|
|
128
|
+
} }, { children: index + 1 })), _jsx(Typography, __assign({ ml: 5, variant: "body1", color: theme.palette.primary.main }, { children: desc }))] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "body2", 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: "body2", 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: "body2", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
114
129
|
return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, variant: "body1", color: theme.palette.primary.main }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
115
|
-
})] })), _jsxs(Box, __assign({ position: "relative" }, { children: [_jsx(
|
|
116
|
-
color: '#424242',
|
|
117
|
-
}, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
|
|
130
|
+
})] })), _jsxs(Box, __assign({ position: "relative" }, { children: [isExportPdf && (_jsx(ExportButton, __assign({ href: videoUrl, target: "_blank" }, { children: _jsx("img", { src: "//webcdn.fbmms.cn/assets/htyk/jjn4TDJ1eW5akU_lblzYe", alt: "", style: { width: 166, height: 296 } }) }))), !isExportPdf && _jsx(Video, { src: videoUrl, controls: true })] }))] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true, display: "flex" }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7', position: 'relative', borderRadius: 3 }, p: 2 }, { children: [_jsx("img", { onClick: handleModeChange, src: "//webcdn.fbmms.cn/assets/CVlD/V8fHAovf4X6wfXN75KkI9", alt: "", style: { width: 36, height: 36, position: 'absolute', top: 0, right: 0, cursor: 'pointer' } }), workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body1", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body1" }, { children: workplaceName }))] }))), 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"] })), _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", fontWeight: 500, noWrap: true, display: "flex" }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), isSimulated && (_jsx(_Fragment, { children: abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token, mode: internalMode, token: token }))); }) })), workplaceEvaluation && !isSimulated && (_jsx(_Fragment, { children: _jsx(Evaluate, { token: token, evaluation: workplaceEvaluation, title: " AI\u8BC4\u4EF7", mode: internalMode }) }))] })))] }), token));
|
|
118
131
|
};
|
|
119
132
|
export default QuestionItem;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
declare type Mode = 'edit' | 'show';
|
|
3
|
+
interface WorkplacesProps {
|
|
4
|
+
token: string;
|
|
5
|
+
suggestionAnswer: string;
|
|
6
|
+
referenceAnswer: string;
|
|
7
|
+
mode?: Mode;
|
|
8
|
+
}
|
|
9
|
+
declare const Workplaces: FC<WorkplacesProps>;
|
|
6
10
|
export default Workplaces;
|