eli-video-interview 1.2.42-alpha.8 → 1.4.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/components/AiHeaderTitle/index.js +2 -10
- package/esm/components/AiHeaderTitleV2/index.d.ts +4 -0
- package/esm/components/AiHeaderTitleV2/index.js +39 -0
- package/esm/components/AiHeaderTitleV2/interface.d.ts +4 -0
- package/esm/components/AiHeaderTitleV2/interface.js +1 -0
- package/esm/components/Charts/ReportPie.js +13 -3
- package/esm/components/Charts/const.js +3 -3
- package/esm/components/ScoreBigBall/index.js +1 -1
- package/esm/constants/ai-question.d.ts +1 -1
- package/esm/constants/ai-question.js +3 -3
- package/esm/enum/ai-question.d.ts +11 -1
- package/esm/enum/ai-question.js +10 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +11 -46
- package/esm/modules/ai-ability/components/AddAbility/index.js +2 -20
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +6 -37
- package/esm/modules/ai-ability-select/Root.js +4 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
- package/esm/modules/ai-ability-select/interface.d.ts +1 -0
- package/esm/modules/ai-question/Root.js +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +13 -4
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +41 -2
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +42 -42
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/BaseAccordion/index.js +4 -4
- package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
- package/esm/modules/ai-question/components/BootVideo/index.js +12 -5
- package/esm/modules/ai-question/components/QuestionImport/index.js +2 -2
- package/esm/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +6 -2
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +13 -3
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +2 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -2
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
- package/esm/modules/ai-report/Root.js +6 -3
- package/esm/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
- package/esm/modules/ai-report/components/VideoQuestion/Video.js +208 -0
- package/esm/modules/ai-report/interface.d.ts +2 -0
- package/esm/modules/ai-report/useAiReport.d.ts +2 -0
- package/esm/modules/ai-report/useAiReport.js +3 -1
- package/esm/modules/ai-report-v2/Root.d.ts +2 -2
- package/esm/modules/ai-report-v2/Root.js +18 -11
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +33 -19
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +90 -25
- 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/Candidate/Interface.d.ts +3 -0
- package/esm/modules/ai-report-v2/components/Candidate/Podium.js +2 -2
- package/esm/modules/ai-report-v2/components/Form/Form.js +34 -13
- package/esm/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
- package/esm/modules/ai-report-v2/components/Form/Nps.js +2 -0
- package/esm/modules/ai-report-v2/components/NotFinish/index.js +13 -5
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +28 -10
- package/esm/modules/ai-report-v2/components/Suggestion/index.js +1 -1
- 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 +50 -25
- 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.d.ts +6 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
- package/esm/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
- package/esm/modules/ai-report-v2/components/WorkPlaces/index.js +1 -1
- package/esm/modules/ai-report-v2/components/styled.d.ts +4 -1
- package/esm/modules/ai-report-v2/components/styled.js +14 -3
- package/esm/modules/ai-report-v2/interface.d.ts +4 -1
- package/esm/modules/ai-report-v2/useAiReport.d.ts +4 -0
- package/esm/modules/ai-report-v2/useAiReport.js +3 -1
- package/esm/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
- package/esm/modules/ai-report-v2/useAiReportVersion.js +37 -0
- package/esm/services/ai-report.d.ts +10 -0
- package/esm/services/ai-report.js +2 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +3 -1
- package/esm/store/ai-question/ai-analysis-store.js +26 -1
- package/esm/store/ai-report/global-store.d.ts +3 -0
- package/lib/components/AiHeaderTitle/index.js +1 -9
- package/lib/components/AiHeaderTitleV2/index.d.ts +4 -0
- package/lib/components/AiHeaderTitleV2/index.js +41 -0
- package/lib/components/AiHeaderTitleV2/interface.d.ts +4 -0
- package/lib/components/AiHeaderTitleV2/interface.js +2 -0
- package/lib/components/Charts/ReportPie.js +13 -3
- package/lib/components/Charts/const.js +3 -3
- package/lib/components/ScoreBigBall/index.js +1 -1
- package/lib/constants/ai-question.d.ts +1 -1
- package/lib/constants/ai-question.js +3 -3
- package/lib/enum/ai-question.d.ts +11 -1
- package/lib/enum/ai-question.js +10 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +13 -45
- package/lib/modules/ai-ability/components/AddAbility/index.js +2 -20
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +6 -37
- package/lib/modules/ai-ability-select/Root.js +4 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
- package/lib/modules/ai-ability-select/interface.d.ts +1 -0
- package/lib/modules/ai-question/Root.js +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -3
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +42 -3
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +39 -39
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/BaseAccordion/index.js +4 -4
- package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
- package/lib/modules/ai-question/components/BootVideo/index.js +12 -5
- package/lib/modules/ai-question/components/QuestionImport/index.js +2 -2
- package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -1
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +2 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +3 -2
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
- package/lib/modules/ai-report/Root.js +6 -3
- package/lib/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
- package/lib/modules/ai-report/components/VideoQuestion/Video.js +213 -0
- package/lib/modules/ai-report/interface.d.ts +2 -0
- package/lib/modules/ai-report/useAiReport.d.ts +2 -0
- package/lib/modules/ai-report/useAiReport.js +6 -1
- package/lib/modules/ai-report-v2/Root.d.ts +2 -2
- package/lib/modules/ai-report-v2/Root.js +16 -9
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +30 -16
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +92 -24
- 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/Candidate/Interface.d.ts +3 -0
- package/lib/modules/ai-report-v2/components/Candidate/Podium.js +1 -1
- package/lib/modules/ai-report-v2/components/Form/Form.js +34 -13
- package/lib/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
- package/lib/modules/ai-report-v2/components/Form/Nps.js +2 -0
- package/lib/modules/ai-report-v2/components/NotFinish/index.js +12 -4
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +27 -9
- package/lib/modules/ai-report-v2/components/Suggestion/index.js +2 -2
- 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 +47 -22
- 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.d.ts +6 -3
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
- package/lib/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
- package/lib/modules/ai-report-v2/components/WorkPlaces/index.js +2 -2
- package/lib/modules/ai-report-v2/components/styled.d.ts +4 -1
- package/lib/modules/ai-report-v2/components/styled.js +18 -4
- package/lib/modules/ai-report-v2/interface.d.ts +4 -1
- package/lib/modules/ai-report-v2/useAiReport.d.ts +4 -0
- package/lib/modules/ai-report-v2/useAiReport.js +6 -1
- package/lib/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
- package/lib/modules/ai-report-v2/useAiReportVersion.js +41 -0
- package/lib/services/ai-report.d.ts +10 -0
- package/lib/services/ai-report.js +5 -1
- package/lib/store/ai-question/ai-analysis-store.d.ts +3 -1
- package/lib/store/ai-question/ai-analysis-store.js +26 -1
- package/lib/store/ai-report/global-store.d.ts +3 -0
- package/package.json +4 -2
|
@@ -26,48 +26,57 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
26
26
|
return ar;
|
|
27
27
|
};
|
|
28
28
|
import { createElement as _createElement } from "react";
|
|
29
|
-
import {
|
|
30
|
-
import { Video } from '../styled';
|
|
29
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
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';
|
|
36
37
|
import Workplaces from './Workplaces';
|
|
37
38
|
import { ADD_QUESTION_TYPE, QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
38
39
|
import { INTERVIEW_STEP_STATUS } from "../../../../enum/ai-report";
|
|
39
|
-
import FormatQuoteIcon from '@mui/icons-material/FormatQuote';
|
|
40
40
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
41
41
|
import { formatScore, highlighKeywords } from "../../../../utils/utils";
|
|
42
|
-
import { Box, Button, Typography } from 'fbm-ui';
|
|
42
|
+
import { Box, Button, Message, Typography } from 'fbm-ui';
|
|
43
43
|
import { theme } from 'fbm-ui/lib/components/ThemeProvider';
|
|
44
44
|
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
45
45
|
import update from 'immutability-helper';
|
|
46
46
|
import { useCallback, useMemo, useState } from 'react';
|
|
47
|
+
var isShowVideoMessage = function (type) { return [QUESTION_TYPE.SINGLECHIOCE, QUESTION_TYPE.ALPHABETIC_DICTATION, QUESTION_TYPE.COLOR_BLINDNESS].includes(type); };
|
|
47
48
|
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;
|
|
48
49
|
var QuestionItem = function (props) {
|
|
49
|
-
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName;
|
|
50
|
+
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, posterUrl = _a.posterUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName, isExportPdf = props.isExportPdf;
|
|
50
51
|
var _d = __read(useState(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
51
|
-
var _e = useAiReportStore(function (store) { return [
|
|
52
|
-
|
|
52
|
+
var _e = useAiReportStore(function (store) { return [
|
|
53
|
+
store.reportResult,
|
|
54
|
+
store.stepToken,
|
|
55
|
+
store.operableButtons,
|
|
56
|
+
store.showAbilitiesDetails,
|
|
57
|
+
]; }), reportResult = _e.reportResult, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, canEditAiDimension = _e.canEditAiDimension;
|
|
58
|
+
var _f = reportResult || {}, steps = _f.steps, isSimulated = _f.isSimulated;
|
|
59
|
+
var _g = __read(useState('show'), 2), internalMode = _g[0], setInternalMode = _g[1];
|
|
60
|
+
var handleModeChange = useCallback(function () {
|
|
61
|
+
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
62
|
+
}, [internalMode]);
|
|
53
63
|
var isAbilities = operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('abilities');
|
|
54
64
|
var isExistWeight = Number(weight) > 0;
|
|
55
65
|
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
56
|
-
var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
|
|
57
66
|
var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
|
|
58
67
|
var isSingleChoice = aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE;
|
|
59
68
|
var comprehensiveScore = useMemo(function () {
|
|
60
69
|
if (status === STEP_COMPLETED) {
|
|
61
|
-
return (
|
|
70
|
+
return (_jsxs(Typography, __assign({ variant: "body2", color: theme.palette.primary.main, fontSize: 16, fontWeight: 500 }, { children: [formatScore(score), "\u5206"] })));
|
|
62
71
|
}
|
|
63
72
|
else if (status === STEP_NO_ANSWER) {
|
|
64
|
-
return (_jsx(Typography, __assign({ variant: "
|
|
73
|
+
return (_jsx(Typography, __assign({ variant: "body2", color: "rgba(0,0,0,0.26)", fontSize: 16, fontWeight: 500 }, { children: "\u672A\u4F5C\u7B54" })));
|
|
65
74
|
}
|
|
66
75
|
else if (status === STEP_IN_CALCULATION) {
|
|
67
|
-
return (_jsx(Typography, __assign({ variant: "
|
|
76
|
+
return (_jsx(Typography, __assign({ variant: "body2", color: "#4CAF50", fontSize: 16, fontWeight: 500 }, { children: "\u8BA1\u7B97\u4E2D" })));
|
|
68
77
|
}
|
|
69
78
|
else if (status === STEP_FAILED) {
|
|
70
|
-
return (_jsx(Typography, __assign({ variant: "
|
|
79
|
+
return (_jsx(Typography, __assign({ variant: "body2", color: "error", fontSize: 16, fontWeight: 500 }, { children: "\u8BA1\u7B97\u5931\u8D25" })));
|
|
71
80
|
}
|
|
72
81
|
}, [score, status]);
|
|
73
82
|
var renderText = useMemo(function () {
|
|
@@ -98,20 +107,36 @@ var QuestionItem = function (props) {
|
|
|
98
107
|
score: score,
|
|
99
108
|
});
|
|
100
109
|
}, [index, reportResult, steps, updateReportResult, onScoreChange, isSingleChoice]);
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
if (videoUrl) {
|
|
104
|
-
|
|
105
|
-
onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(token);
|
|
110
|
+
var handleVideoClick = useCallback(function () {
|
|
111
|
+
// 如果没有视频URL且符合显示错误消息的条件,则显示错误提示
|
|
112
|
+
if (!videoUrl && isShowVideoMessage(type)) {
|
|
113
|
+
Message.error('因候选人回答时长过短,未获取到题目视频。');
|
|
106
114
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
// 其他视频点击逻辑可以在这里处理
|
|
116
|
+
}, [videoUrl, type]);
|
|
117
|
+
return (_jsxs(Stack, __assign({ component: Paper, elevation: 1, sx: {
|
|
118
|
+
padding: '16px 16px',
|
|
110
119
|
mt: 2,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
background: '#fff',
|
|
121
|
+
mx: 1,
|
|
122
|
+
borderRadius: '12px',
|
|
123
|
+
position: 'relative',
|
|
124
|
+
} }, { 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: {
|
|
125
|
+
background: 'linear-gradient( 136deg, #65EA6A 0%, #4CAF50 100%)',
|
|
126
|
+
color: '#fff',
|
|
127
|
+
borderRadius: '12px 0px 12px 0px',
|
|
128
|
+
width: 48,
|
|
129
|
+
height: 42,
|
|
130
|
+
position: 'absolute',
|
|
131
|
+
top: 0,
|
|
132
|
+
left: 0,
|
|
133
|
+
display: 'flex',
|
|
134
|
+
alignItems: 'center',
|
|
135
|
+
justifyContent: 'center',
|
|
136
|
+
} }, { 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) {
|
|
137
|
+
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 }))] })] }));
|
|
138
|
+
})] })), _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, poster: posterUrl, onClick: handleVideoClick, width: 135, onPlay: function (event) {
|
|
139
|
+
document.querySelectorAll('video').forEach(function (v) { return v !== event.target && v.pause(); });
|
|
140
|
+
} }))] }))] })), 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: [canEditAiDimension && ((workplaceEvaluation && !isSimulated) || (isSimulated && abilities.length > 0)) && (_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));
|
|
116
141
|
};
|
|
117
142
|
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;
|
|
@@ -9,15 +9,80 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
29
|
+
import { PostInterviewEvaluation } from "../../../../services/ai-report";
|
|
30
|
+
import { Box, Button, confirm, FormItem, Typography } from 'fbm-ui';
|
|
31
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
32
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
15
33
|
var Workplaces = function (_a) {
|
|
16
|
-
var suggestionAnswer = _a.suggestionAnswer, referenceAnswer = _a.referenceAnswer;
|
|
34
|
+
var token = _a.token, suggestionAnswer = _a.suggestionAnswer, referenceAnswer = _a.referenceAnswer, _b = _a.mode, mode = _b === void 0 ? 'show' : _b;
|
|
35
|
+
var _c = __read(useState(suggestionAnswer), 2), suggestionAnswerContent = _c[0], setSuggestionAnswerContent = _c[1];
|
|
36
|
+
var _d = __read(useState(referenceAnswer), 2), referenceAnswerContent = _d[0], setReferenceAnswerContent = _d[1];
|
|
37
|
+
var _e = __read(useState('show'), 2), internalMode = _e[0], setInternalMode = _e[1];
|
|
38
|
+
var handleSuggestionChange = useCallback(function (e) {
|
|
39
|
+
var value = e.target.value;
|
|
40
|
+
setSuggestionAnswerContent(value);
|
|
41
|
+
}, []);
|
|
42
|
+
var handleReferenceChange = useCallback(function (e) {
|
|
43
|
+
var value = e.target.value;
|
|
44
|
+
setReferenceAnswerContent(value);
|
|
45
|
+
}, []);
|
|
46
|
+
var handleModeChange = useCallback(function () {
|
|
47
|
+
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
48
|
+
}, [internalMode]);
|
|
49
|
+
var handleSubmit = useCallback(function () {
|
|
50
|
+
if (!suggestionAnswerContent.trim() || !referenceAnswerContent.trim())
|
|
51
|
+
return;
|
|
52
|
+
confirm({
|
|
53
|
+
header: null,
|
|
54
|
+
content: '确认将评价内容修改吗?该动作无法被撤销。',
|
|
55
|
+
okText: '修改',
|
|
56
|
+
okProps: {
|
|
57
|
+
color: 'error',
|
|
58
|
+
variant: 'contained',
|
|
59
|
+
},
|
|
60
|
+
onOk: function (_a) {
|
|
61
|
+
var onClose = _a.onClose;
|
|
62
|
+
var data = {
|
|
63
|
+
flowStepToken: token,
|
|
64
|
+
suggestionAnswer: suggestionAnswerContent,
|
|
65
|
+
referenceAnswer: referenceAnswerContent,
|
|
66
|
+
};
|
|
67
|
+
PostInterviewEvaluation(data).then(handleModeChange).then(onClose).catch(console.error);
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}, [token, suggestionAnswerContent, referenceAnswerContent, handleModeChange]);
|
|
71
|
+
useEffect(function () {
|
|
72
|
+
setInternalMode(mode);
|
|
73
|
+
}, [mode]);
|
|
17
74
|
if (suggestionAnswer || referenceAnswer) {
|
|
18
|
-
return (_jsxs(Stack, __assign({ sx: {
|
|
19
|
-
|
|
20
|
-
|
|
75
|
+
return (_jsxs(Stack, { children: [suggestionAnswer && (_jsxs(_Fragment, { 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: "\u5206\u6790\u5EFA\u8BAE" })) })), internalMode === 'edit' && (_jsx(Box, __assign({ width: 1, pr: 2 }, { children: _jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", error: !suggestionAnswerContent.trim(), value: suggestionAnswerContent, onChange: handleSuggestionChange }) }))), internalMode === 'show' && (_jsx(Typography, { variant: "body2", sx: {
|
|
76
|
+
color: '#424242',
|
|
77
|
+
whiteSpace: 'pre-wrap',
|
|
78
|
+
}, dangerouslySetInnerHTML: { __html: suggestionAnswerContent } }))] })), referenceAnswer && (_jsxs(_Fragment, { 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: "\u53C2\u8003\u6A21\u677F" })) })), 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: "", error: !referenceAnswerContent.trim(), value: referenceAnswerContent, onChange: handleReferenceChange }), _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 () {
|
|
79
|
+
handleModeChange();
|
|
80
|
+
setReferenceAnswerContent(referenceAnswer);
|
|
81
|
+
setSuggestionAnswerContent(suggestionAnswer);
|
|
82
|
+
} }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, { variant: "body2", sx: {
|
|
83
|
+
color: '#424242',
|
|
84
|
+
whiteSpace: 'pre-wrap',
|
|
85
|
+
}, dangerouslySetInnerHTML: { __html: referenceAnswerContent } }))] }))] }));
|
|
21
86
|
}
|
|
22
87
|
else {
|
|
23
88
|
return null;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface VideoQuestionProps {
|
|
3
|
+
isExportPdf?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: React.NamedExoticComponent<VideoQuestionProps>;
|
|
6
|
+
export default _default;
|
|
@@ -11,12 +11,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import QuestionItem from './QuestionItem';
|
|
14
|
-
import AiHeaderTitle from "../../../../components/
|
|
14
|
+
import AiHeaderTitle from "../../../../components/AiHeaderTitleV2";
|
|
15
15
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
16
16
|
import { Box, Empty } from 'fbm-ui';
|
|
17
|
-
|
|
17
|
+
import { memo } from 'react';
|
|
18
|
+
var VideoQuestion = function (_a) {
|
|
19
|
+
var _b = _a.isExportPdf, isExportPdf = _b === void 0 ? false : _b;
|
|
18
20
|
var reportResult = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }).reportResult;
|
|
19
21
|
var steps = (reportResult || {}).steps;
|
|
20
|
-
return (_jsxs(Box, __assign({ id: "report-question"
|
|
22
|
+
return (_jsxs(Box, __assign({ id: "report-question" }, { children: [_jsx(AiHeaderTitle, { name: "\u89C6\u9891\u9898" }), _jsx(Box, __assign({ mt: 2 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return _jsx(QuestionItem, __assign({ index: index }, item, { isExportPdf: isExportPdf }), item.token); })) : (_jsx(Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
|
|
21
23
|
};
|
|
22
|
-
export default VideoQuestion;
|
|
24
|
+
export default memo(VideoQuestion);
|
|
@@ -60,9 +60,9 @@ export var QuestionDesc = styled(Box)({
|
|
|
60
60
|
'& >.MuiSvgIcon-root': {
|
|
61
61
|
position: 'absolute',
|
|
62
62
|
left: 8,
|
|
63
|
-
top: -
|
|
63
|
+
top: -6,
|
|
64
64
|
color: 'rgb(230, 230, 230)',
|
|
65
|
-
transform: 'rotate(180deg)',
|
|
65
|
+
// transform: 'rotate(180deg)',
|
|
66
66
|
},
|
|
67
67
|
});
|
|
68
68
|
export var AiScoreRoot = styled(Box)({
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import ScoreSlider from './ScoreSlider';
|
|
14
14
|
import WorkPlace from './WorkPlace';
|
|
15
15
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
16
|
-
import AiHeaderTitle from "../../../../components/
|
|
16
|
+
import AiHeaderTitle from "../../../../components/AiHeaderTitleV2";
|
|
17
17
|
import { blue, orange, purple } from '@mui/material/colors';
|
|
18
18
|
import { Chip, InfoOutlineIcon, styled, Tooltip, Typography } from 'fbm-ui';
|
|
19
19
|
import { Box, Collapse, Stack } from 'fbm-ui/lib/mui';
|
|
@@ -32,7 +32,10 @@ export declare const ReportEvaluate: import("@emotion/styled").StyledComponent<i
|
|
|
32
32
|
export declare const Podium: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
33
33
|
children?: import("react").ReactNode;
|
|
34
34
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
35
|
-
export declare const Video: import("@emotion/styled").StyledComponent<import("
|
|
35
|
+
export declare const Video: import("@emotion/styled").StyledComponent<import("../../ai-report/components/VideoQuestion/Video").VideoProps & {
|
|
36
|
+
children?: import("react").ReactNode;
|
|
37
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
38
|
+
export declare const ExportButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
36
39
|
export declare const BeatProgressBar: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
37
40
|
children?: import("react").ReactNode;
|
|
38
41
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -9,6 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
import VideoPlayer from '../../ai-report/components/VideoQuestion/Video';
|
|
12
13
|
import { Box, styled, Typography } from 'fbm-ui';
|
|
13
14
|
export var ReportHeader = styled(Box)({
|
|
14
15
|
height: '595px',
|
|
@@ -53,7 +54,8 @@ export var ReportAvatar = styled(Box)(function (_a) {
|
|
|
53
54
|
});
|
|
54
55
|
});
|
|
55
56
|
export var DinTypography = styled(Typography)({
|
|
56
|
-
fontFamily: 'MiSans
|
|
57
|
+
fontFamily: 'MiSans TC',
|
|
58
|
+
fontWeight: 500,
|
|
57
59
|
});
|
|
58
60
|
var ReportTagStyles = [
|
|
59
61
|
{
|
|
@@ -80,7 +82,7 @@ function hashString(str) {
|
|
|
80
82
|
export var ReportTag = styled(DinTypography)(function (_a) {
|
|
81
83
|
var children = _a.children;
|
|
82
84
|
var hash = children ? Math.abs(hashString(children.toString())) % 3 : 0;
|
|
83
|
-
return __assign(__assign({ flex: '0 1 auto', padding: '2px 8px', fontSize: '12px', lineHeight: '16px',
|
|
85
|
+
return __assign(__assign({ flex: '0 1 auto', padding: '2px 8px', fontSize: '12px', lineHeight: '16px', borderRadius: '177px 177px 177px 177px', border: '1px solid #FFFFFF' }, ReportTagStyles[hash]), { mb: 8 });
|
|
84
86
|
});
|
|
85
87
|
export var ReportEvaluate = styled(Box)({
|
|
86
88
|
// margin: 24,
|
|
@@ -104,7 +106,16 @@ export var Podium = styled(Box)({
|
|
|
104
106
|
backgroundSize: 'cover',
|
|
105
107
|
color: '#119E45',
|
|
106
108
|
});
|
|
107
|
-
export var Video = styled(
|
|
109
|
+
export var Video = styled(VideoPlayer)(function (_a) {
|
|
110
|
+
var theme = _a.theme;
|
|
111
|
+
return ({
|
|
112
|
+
width: 166,
|
|
113
|
+
height: 296,
|
|
114
|
+
borderRadius: 8,
|
|
115
|
+
boxShadow: theme.shadows[6],
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
export var ExportButton = styled('a')(function (_a) {
|
|
108
119
|
var theme = _a.theme;
|
|
109
120
|
return ({
|
|
110
121
|
width: 166,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CandidateInfo } from './components/Candidate/Interface';
|
|
1
|
+
import { AiReportUrl, CandidateInfo } from './components/Candidate/Interface';
|
|
2
2
|
import { FormReports } from './components/Form/interface';
|
|
3
3
|
import { ScoreRankInterval, ScoreRankIntervals } from './components/RankingRange/interface';
|
|
4
4
|
import { ADD_QUESTION_TYPE } from '@@/src/enum/ai-question';
|
|
@@ -46,6 +46,7 @@ export interface AnalysisResult {
|
|
|
46
46
|
selected?: number[];
|
|
47
47
|
}
|
|
48
48
|
export interface Answer {
|
|
49
|
+
posterUrl?: string;
|
|
49
50
|
videoUrl: string;
|
|
50
51
|
media: {
|
|
51
52
|
durationTime: number;
|
|
@@ -191,6 +192,7 @@ export interface AiReportProps {
|
|
|
191
192
|
showAbilitiesDetails?: boolean;
|
|
192
193
|
showAiDimension?: boolean;
|
|
193
194
|
canEditAiDimension?: boolean;
|
|
195
|
+
isExportPdf?: boolean;
|
|
194
196
|
operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
|
|
195
197
|
stepToken?: string;
|
|
196
198
|
interviewCheat?: InterviewCheat;
|
|
@@ -208,6 +210,7 @@ export interface AiReportProps {
|
|
|
208
210
|
onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
|
|
209
211
|
fetchFormResult?: () => Promise<FormReports>;
|
|
210
212
|
fetchCandidateInfo?: () => Promise<CandidateInfo>;
|
|
213
|
+
fetchReportUrl?: () => Promise<AiReportUrl>;
|
|
211
214
|
}
|
|
212
215
|
export interface AiReportRef {
|
|
213
216
|
handleRefresh: () => void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AiReportProps, AiReportRef } from './interface';
|
|
3
3
|
export declare const useAiReportV2: (props: AiReportProps) => {
|
|
4
|
+
version: number;
|
|
5
|
+
reloadReportVersion: () => void;
|
|
4
6
|
handleRefresh?: (() => void) | undefined;
|
|
5
7
|
token: string;
|
|
6
8
|
customScore?: number | undefined;
|
|
@@ -10,6 +12,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
10
12
|
showAbilitiesDetails?: boolean | undefined;
|
|
11
13
|
showAiDimension?: boolean | undefined;
|
|
12
14
|
canEditAiDimension?: boolean | undefined;
|
|
15
|
+
isExportPdf?: boolean | undefined;
|
|
13
16
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
14
17
|
stepToken?: string | undefined;
|
|
15
18
|
interviewCheat?: import("./interface").InterviewCheat | undefined;
|
|
@@ -27,5 +30,6 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
27
30
|
onScoreRankIntervalsSubmit?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => Promise<any>) | undefined;
|
|
28
31
|
fetchFormResult?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
|
|
29
32
|
fetchCandidateInfo?: (() => Promise<import("./components/Candidate/Interface").CandidateInfo>) | undefined;
|
|
33
|
+
fetchReportUrl?: (() => Promise<import("./components/Candidate/Interface").AiReportUrl>) | undefined;
|
|
30
34
|
ref: import("react").MutableRefObject<AiReportRef | undefined>;
|
|
31
35
|
};
|
|
@@ -9,8 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
import useAiReportVersion from './useAiReportVersion';
|
|
12
13
|
import { useRef } from 'react';
|
|
13
14
|
export var useAiReportV2 = function (props) {
|
|
14
15
|
var ref = useRef();
|
|
15
|
-
|
|
16
|
+
var reportVersion = useAiReportVersion(props.token);
|
|
17
|
+
return __assign(__assign(__assign({ ref: ref }, props), ref === null || ref === void 0 ? void 0 : ref.current), reportVersion);
|
|
16
18
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
2
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3
|
+
if (!m) return o;
|
|
4
|
+
var i = m.call(o), r, ar = [], e;
|
|
5
|
+
try {
|
|
6
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
7
|
+
}
|
|
8
|
+
catch (error) { e = { error: error }; }
|
|
9
|
+
finally {
|
|
10
|
+
try {
|
|
11
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12
|
+
}
|
|
13
|
+
finally { if (e) throw e.error; }
|
|
14
|
+
}
|
|
15
|
+
return ar;
|
|
16
|
+
};
|
|
17
|
+
import { GetReportVersion } from "../../services/ai-report";
|
|
18
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
19
|
+
export var useAiReportVersion = function (token) {
|
|
20
|
+
var _a = __read(useState(-1), 2), version = _a[0], setVersion = _a[1];
|
|
21
|
+
var reloadReportVersion = useCallback(function () {
|
|
22
|
+
GetReportVersion(token)
|
|
23
|
+
.then(function (res) {
|
|
24
|
+
var _a = res, code = _a.code, data = _a.data;
|
|
25
|
+
if (code === 0) {
|
|
26
|
+
var _b = data.isNewVersion, isNewVersion = _b === void 0 ? false : _b;
|
|
27
|
+
setVersion(isNewVersion ? 2 : 1);
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
.catch(console.log);
|
|
31
|
+
}, [token]);
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
reloadReportVersion();
|
|
34
|
+
}, [reloadReportVersion]);
|
|
35
|
+
return { version: version, reloadReportVersion: reloadReportVersion };
|
|
36
|
+
};
|
|
37
|
+
export default useAiReportVersion;
|
|
@@ -6,6 +6,15 @@ interface PostAiInterviewEvaluationData {
|
|
|
6
6
|
manualSuggestions?: Array<string>;
|
|
7
7
|
}
|
|
8
8
|
export declare const PostAiInterviewEvaluation: <R>(data: PostAiInterviewEvaluationData) => import("axios").AxiosPromise<R>;
|
|
9
|
+
interface PostInterviewEvaluationData {
|
|
10
|
+
orderToken?: string;
|
|
11
|
+
flowStepToken?: string;
|
|
12
|
+
manualEvaluation?: string;
|
|
13
|
+
scoreManualEvaluation?: string;
|
|
14
|
+
suggestionAnswer?: string;
|
|
15
|
+
referenceAnswer?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const PostInterviewEvaluation: <R>(data: PostInterviewEvaluationData) => import("axios").AxiosPromise<R>;
|
|
9
18
|
interface PostAiInterviewWorkplaceData {
|
|
10
19
|
thirdOrderID: string;
|
|
11
20
|
token: string;
|
|
@@ -17,4 +26,5 @@ interface SwitchReportModelParams {
|
|
|
17
26
|
thirdOrderID: string;
|
|
18
27
|
}
|
|
19
28
|
export declare const SwitchReportModel: (data: SwitchReportModelParams) => import("axios").AxiosPromise<unknown>;
|
|
29
|
+
export declare const GetReportVersion: <R>(orderToken: string) => import("axios").AxiosPromise<R>;
|
|
20
30
|
export {};
|
|
@@ -7,8 +7,10 @@ export var PostAiInterviewRefresh = function (orderID) { return POST({ url: "/st
|
|
|
7
7
|
export var PostAiInterviewEvaluation = function (data) {
|
|
8
8
|
return POST({ url: "/standard/b/aiInterview/aiEvaluation/modify", data: data });
|
|
9
9
|
};
|
|
10
|
+
export var PostInterviewEvaluation = function (data) { return POST({ url: "/standard/b/aiInterview/evaluation/modify", data: data }); };
|
|
10
11
|
// 更新职场能力回答
|
|
11
12
|
export var PostAiInterviewWorkplace = function (data) {
|
|
12
13
|
return POST({ url: "/standard/b/aiInterview/workplace/answer/modify", data: data });
|
|
13
14
|
};
|
|
14
15
|
export var SwitchReportModel = function (data) { return POST({ url: "standard/b/reports/switch-model", data: data }); };
|
|
16
|
+
export var GetReportVersion = function (orderToken) { return POST({ url: "standard/b/aiInterview/getVersion", data: { orderToken: orderToken } }); };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AiAbilityItem, WorkplaceItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
|
|
3
3
|
import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/interface';
|
|
4
|
-
interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language'> {
|
|
4
|
+
interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language' | 'voiceLanguage'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
7
7
|
aiAbilities: AiAbilityItem[];
|
|
@@ -11,6 +11,7 @@ export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn
|
|
|
11
11
|
updateState: (params: Partial<AnalysisStateParams>) => void;
|
|
12
12
|
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
13
13
|
updateAiAbilitiesWeight: (value: string, index: number) => void;
|
|
14
|
+
updateAiAbilitiesChildWeight: (value: string, index: number, childIndex: number) => void;
|
|
14
15
|
removeAiAbilities: (index: number) => void;
|
|
15
16
|
updateWorkplaces: (data: WorkplaceItem[]) => void;
|
|
16
17
|
setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
@@ -22,6 +23,7 @@ export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn
|
|
|
22
23
|
updateState: (params: Partial<AnalysisStateParams>) => void;
|
|
23
24
|
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
24
25
|
updateAiAbilitiesWeight: (value: string, index: number) => void;
|
|
26
|
+
updateAiAbilitiesChildWeight: (value: string, index: number, childIndex: number) => void;
|
|
25
27
|
removeAiAbilities: (index: number) => void;
|
|
26
28
|
updateWorkplaces: (data: WorkplaceItem[]) => void;
|
|
27
29
|
setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
@@ -32,7 +32,7 @@ import { useSetState } from 'ahooks';
|
|
|
32
32
|
import { createStore } from 'hox';
|
|
33
33
|
import update from 'immutability-helper';
|
|
34
34
|
import { useCallback, useEffect, useState } from 'react';
|
|
35
|
-
var defaultAnalysisState = { aiSwitch: 2, language: 1 };
|
|
35
|
+
var defaultAnalysisState = { aiSwitch: 2, language: 1, voiceLanguage: 1 };
|
|
36
36
|
export var useAiAnalysisStore = (_a = __read(createStore(function () {
|
|
37
37
|
var questionState = useUpdateQuestionStore(function (store) { return [store.questionState]; }).questionState;
|
|
38
38
|
var _a = __read(useState([]), 2), aiAbilities = _a[0], setAiAbilities = _a[1];
|
|
@@ -127,6 +127,30 @@ export var useAiAnalysisStore = (_a = __read(createStore(function () {
|
|
|
127
127
|
computeWeight(newAiAbilities);
|
|
128
128
|
}
|
|
129
129
|
}, [aiAbilities, computeWeight]);
|
|
130
|
+
var updateAiAbilitiesChildWeight = useCallback(function (value, index, childIndex) {
|
|
131
|
+
var _a, _b, _c;
|
|
132
|
+
var formatValue = formatNumberDecimal(value);
|
|
133
|
+
var child = aiAbilities[index].child;
|
|
134
|
+
var curOriginalWeight = Number(child === null || child === void 0 ? void 0 : child[childIndex].weight);
|
|
135
|
+
var disabledWeight = Number(child === null || child === void 0 ? void 0 : child[(child === null || child === void 0 ? void 0 : child.length) - 1].weight);
|
|
136
|
+
var maxInputValue = computeDecimalValue((curOriginalWeight + disabledWeight).toString());
|
|
137
|
+
if (Number(formatValue) <= maxInputValue) {
|
|
138
|
+
var childLength = (child === null || child === void 0 ? void 0 : child.length) || 0;
|
|
139
|
+
// 如果 child 的长度大于 2,则修改最后一个子项的 weight
|
|
140
|
+
var updateLastChild = childLength > 1
|
|
141
|
+
? (_a = {},
|
|
142
|
+
_a[childLength - 1] = {
|
|
143
|
+
weight: { $set: maxInputValue - Number(formatValue) },
|
|
144
|
+
},
|
|
145
|
+
_a) : {};
|
|
146
|
+
var newAiAbilities = update(aiAbilities, (_b = {},
|
|
147
|
+
_b[index] = {
|
|
148
|
+
child: __assign((_c = {}, _c[childIndex] = { weight: { $set: formatValue } }, _c), updateLastChild),
|
|
149
|
+
},
|
|
150
|
+
_b));
|
|
151
|
+
setAiAbilities(newAiAbilities);
|
|
152
|
+
}
|
|
153
|
+
}, [aiAbilities]);
|
|
130
154
|
/**
|
|
131
155
|
* 删除AI分析维度
|
|
132
156
|
*/
|
|
@@ -166,6 +190,7 @@ export var useAiAnalysisStore = (_a = __read(createStore(function () {
|
|
|
166
190
|
updateState: updateState,
|
|
167
191
|
updateAiAbilities: updateAiAbilities,
|
|
168
192
|
updateAiAbilitiesWeight: updateAiAbilitiesWeight,
|
|
193
|
+
updateAiAbilitiesChildWeight: updateAiAbilitiesChildWeight,
|
|
169
194
|
removeAiAbilities: removeAiAbilities,
|
|
170
195
|
updateWorkplaces: updateWorkplaces,
|
|
171
196
|
setKeyPointAnalysisError: setKeyPointAnalysisError,
|