eli-video-interview 1.2.42-alpha.2 → 1.2.42-alpha.21
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 +4 -3
- package/esm/components/Charts/ReportPie.js +1 -1
- package/esm/components/Charts/const.js +6 -6
- package/esm/components/ScoreBigBall/index.js +1 -1
- package/esm/modules/ai-report/interface.d.ts +5 -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.js +28 -15
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +15 -1
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +12 -10
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +2 -2
- package/esm/modules/ai-report-v2/components/Candidate/Candidate.js +14 -3
- 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 +21 -9
- package/esm/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
- package/esm/modules/ai-report-v2/components/Form/Forms.js +4 -4
- 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/ReportHeader/ReportHeader.d.ts +6 -2
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +32 -11
- package/esm/modules/ai-report-v2/components/VideoQuestion/Abilities.js +1 -1
- package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +24 -18
- package/esm/modules/ai-report-v2/components/VideoQuestion/ScoreSlider.js +1 -1
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +5 -3
- 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/styled.d.ts +2 -1
- package/esm/modules/ai-report-v2/components/styled.js +28 -5
- package/esm/modules/ai-report-v2/interface.d.ts +9 -2
- package/esm/modules/ai-report-v2/useAiReport.d.ts +5 -1
- 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 +1 -0
- package/esm/services/ai-report.js +1 -0
- package/lib/components/AiHeaderTitle/index.js +3 -2
- package/lib/components/Charts/ReportPie.js +1 -1
- package/lib/components/Charts/const.js +6 -6
- package/lib/components/ScoreBigBall/index.js +1 -1
- package/lib/modules/ai-report/interface.d.ts +5 -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.js +28 -15
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +15 -1
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +12 -10
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +2 -2
- package/lib/modules/ai-report-v2/components/Candidate/Candidate.js +12 -1
- 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 +21 -9
- package/lib/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
- package/lib/modules/ai-report-v2/components/Form/Forms.js +4 -4
- 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/ReportHeader/ReportHeader.d.ts +6 -2
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +32 -11
- package/lib/modules/ai-report-v2/components/VideoQuestion/Abilities.js +1 -1
- package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +22 -16
- package/lib/modules/ai-report-v2/components/VideoQuestion/ScoreSlider.js +1 -1
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +5 -3
- 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/styled.d.ts +2 -1
- package/lib/modules/ai-report-v2/components/styled.js +29 -6
- package/lib/modules/ai-report-v2/interface.d.ts +9 -2
- package/lib/modules/ai-report-v2/useAiReport.d.ts +5 -1
- 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 +1 -0
- package/lib/services/ai-report.js +3 -1
- package/package.json +1 -1
|
@@ -28,7 +28,8 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
import AIEvaluate from '../AIEvaluate';
|
|
30
30
|
import { CandidateReport, PodiumReport } from '../Candidate';
|
|
31
|
-
import { ReportBadge, ReportLabel } from '../styled';
|
|
31
|
+
import { DinTypography, ReportBadge, ReportLabel } from '../styled';
|
|
32
|
+
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
32
33
|
import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
33
34
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
34
35
|
import { formatScore } from "../../../../utils/utils";
|
|
@@ -39,22 +40,23 @@ import { Box, Button, IconButton, Message, Popover, Typography } from 'fbm-ui';
|
|
|
39
40
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
40
41
|
import { useEffect, useMemo, useState } from 'react';
|
|
41
42
|
var ReportHeader = function (_a) {
|
|
42
|
-
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, fetchCandidateInfo = _a.fetchCandidateInfo;
|
|
43
|
+
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, fetchCandidateInfo = _a.fetchCandidateInfo, status = _a.status, fetchReportUrl = _a.fetchReportUrl;
|
|
43
44
|
var _b = __read(useState(false), 2), openRefresh = _b[0], setOpenRefresh = _b[1];
|
|
44
|
-
var _c =
|
|
45
|
+
var _c = __read(useState(null), 2), reportUrl = _c[0], setReportUrl = _c[1];
|
|
46
|
+
var _d = useAiReportStore(function (store) { return [
|
|
45
47
|
store.token,
|
|
46
48
|
store.reportResult,
|
|
47
49
|
store.operableButtons,
|
|
48
|
-
]; }), token =
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
50
|
+
]; }), token = _d.token, reportResult = _d.reportResult, operableButtons = _d.operableButtons, onExportReportClick = _d.onExportReportClick;
|
|
51
|
+
var _e = reportResult || {}, score = _e.score, createTime = _e.createTime, model = _e.model;
|
|
52
|
+
var _f = __read(useState(score || 0), 2), feScore = _f[0], setScore = _f[1];
|
|
53
|
+
var _g = useRequest(function () { return PostAiInterviewRefresh(token); }, {
|
|
52
54
|
manual: true,
|
|
53
55
|
onSuccess: function () {
|
|
54
56
|
onRefreshSuccess();
|
|
55
57
|
Message.success('刷新成功');
|
|
56
58
|
},
|
|
57
|
-
}), run =
|
|
59
|
+
}), run = _g.run, loading = _g.loading;
|
|
58
60
|
var level = useMemo(function () {
|
|
59
61
|
if (feScore >= 80)
|
|
60
62
|
return 'high';
|
|
@@ -62,6 +64,16 @@ var ReportHeader = function (_a) {
|
|
|
62
64
|
return 'middle';
|
|
63
65
|
return 'low';
|
|
64
66
|
}, [feScore]);
|
|
67
|
+
useEffect(function () {
|
|
68
|
+
if (!fetchReportUrl)
|
|
69
|
+
return;
|
|
70
|
+
fetchReportUrl()
|
|
71
|
+
.then(function (_a) {
|
|
72
|
+
var url = _a.url;
|
|
73
|
+
setReportUrl(url);
|
|
74
|
+
})
|
|
75
|
+
.catch(function () { return Message.error('获取报告链接失败'); });
|
|
76
|
+
}, [fetchReportUrl]);
|
|
65
77
|
var content = (_jsxs(Box, __assign({ padding: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), _jsx(Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: _jsx(Button, __assign({ loading: loading, onClick: run }, { children: "\u5237\u65B0" })) }))] })));
|
|
66
78
|
useEffect(function () {
|
|
67
79
|
if (typeof customScore === 'number' && customScore > -1) {
|
|
@@ -73,10 +85,19 @@ var ReportHeader = function (_a) {
|
|
|
73
85
|
if (!loading)
|
|
74
86
|
setOpenRefresh(false);
|
|
75
87
|
}, [loading, customScore, score]);
|
|
76
|
-
return (_jsxs(Stack, { children: [model === 'pro' && _jsx(ReportBadge, {}), _jsx(ReportLabel, { level:
|
|
88
|
+
return (_jsxs(Stack, __assign({ position: "relative" }, { children: [model === 'pro' && _jsx(ReportBadge, {}), _jsx(ReportLabel, { level: status === INTERVIEW_STATUS.COMPLETED ? level : 'calculation' }), _jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", sx: {
|
|
89
|
+
width: 'calc(100% - 180px)',
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
top: 0,
|
|
92
|
+
zIndex: 2,
|
|
93
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", pl: 3, py: 3 }, { children: [_jsxs(Typography, __assign({ variant: "caption", sx: {
|
|
77
94
|
color: 'rgba(74, 74, 74, 0.86)',
|
|
78
|
-
} }, { children: ["\u62A5\u544A\u751F\u6210\u65F6\u95F4\uFF1A", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(IconButton, __assign({
|
|
95
|
+
} }, { children: ["\u62A5\u544A\u751F\u6210\u65F6\u95F4\uFF1A", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(IconButton, __assign({ onClick: function () { return setOpenRefresh(true); } }, { children: _jsx(RefreshIcon, { sx: {
|
|
79
96
|
color: '#009908',
|
|
80
|
-
} }) })) })))] })), _jsx(
|
|
97
|
+
} }) })) })))] })), _jsx(DinTypography, __assign({ variant: "h5", textAlign: "center", color: "#009D56", sx: { alignSelf: 'center' } }, { children: "AI \u9762\u8BD5\u62A5\u544A" })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) ? (_jsx(Button, __assign({ endIcon: _jsx(ShareIcon, {}), variant: "text", onClick: onExportReportClick, sx: { borderRadius: 18, border: '1px solid #4caf50' } }, { children: "\u5BFC\u51FA\u62A5\u544A" }))) : reportUrl ? (_jsx("a", __assign({ href: reportUrl, title: "\u67E5\u770B\u5728\u7EBF\u62A5\u544A" }, { children: _jsx(Button, __assign({ endIcon: _jsx(ShareIcon, {}), variant: "text", sx: { borderRadius: 18, border: '1px solid #4caf50' } }, { children: "\u67E5\u770B\u5728\u7EBF\u62A5\u544A" })) }))) : (_jsx(Box, {}))] })), _jsxs(Stack, { children: [fetchCandidateInfo && status === INTERVIEW_STATUS.COMPLETED && _jsx(CandidateReport, { fetchCandidateInfo: fetchCandidateInfo }), !fetchCandidateInfo && status === INTERVIEW_STATUS.COMPLETED && _jsx(PodiumReport, { score: formatScore(feScore || 0) }), status !== INTERVIEW_STATUS.COMPLETED && (_jsx(Box, { sx: {
|
|
98
|
+
position: 'relative',
|
|
99
|
+
width: 541,
|
|
100
|
+
height: 342,
|
|
101
|
+
} }))] }), status === INTERVIEW_STATUS.COMPLETED && (_jsx(Stack, __assign({ width: 1, direction: "row" }, { children: _jsx(AIEvaluate, {}) })))] })));
|
|
81
102
|
};
|
|
82
103
|
export default ReportHeader;
|
|
@@ -36,7 +36,7 @@ var Abilities = function (_a) {
|
|
|
36
36
|
return (_jsxs(Box, __assign({ mt: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), _jsx(Box, __assign({ mt: 3 }, { children: steps &&
|
|
37
37
|
steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
|
|
38
38
|
var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
|
|
39
|
-
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width:
|
|
39
|
+
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 604, disabledScore: disabledScore, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "".concat(disabledScore ? 'off' : 'auto'), onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
|
|
40
40
|
}) }))] })));
|
|
41
41
|
};
|
|
42
42
|
export default Abilities;
|
|
@@ -27,7 +27,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
27
27
|
};
|
|
28
28
|
import { createElement as _createElement } from "react";
|
|
29
29
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
30
|
-
import { Video } from '../styled';
|
|
30
|
+
import { ExportButton, Video } from '../styled';
|
|
31
31
|
import Abilities from './Abilities';
|
|
32
32
|
import BodyImages from './BodyImages';
|
|
33
33
|
import ScoreSlider from './ScoreSlider';
|
|
@@ -36,24 +36,27 @@ import { QuestionDesc } from './styled';
|
|
|
36
36
|
import Workplaces from './Workplaces';
|
|
37
37
|
import { ADD_QUESTION_TYPE, QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
38
38
|
import { INTERVIEW_STEP_STATUS } from "../../../../enum/ai-report";
|
|
39
|
-
import FormatQuoteIcon from '@mui/icons-material/FormatQuote';
|
|
40
39
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
41
40
|
import { formatScore, highlighKeywords } from "../../../../utils/utils";
|
|
42
41
|
import { Box, Button, Typography } from 'fbm-ui';
|
|
43
42
|
import { theme } from 'fbm-ui/lib/components/ThemeProvider';
|
|
44
|
-
import { Stack } from 'fbm-ui/lib/mui';
|
|
43
|
+
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
45
44
|
import update from 'immutability-helper';
|
|
46
45
|
import { useCallback, useMemo, useState } from 'react';
|
|
47
46
|
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
47
|
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;
|
|
48
|
+
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, isExportPdf = props.isExportPdf;
|
|
50
49
|
var _d = __read(useState(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
51
|
-
var _e = useAiReportStore(function (store) { return [
|
|
50
|
+
var _e = useAiReportStore(function (store) { return [
|
|
51
|
+
store.reportResult,
|
|
52
|
+
store.stepToken,
|
|
53
|
+
store.operableButtons,
|
|
54
|
+
store.showAbilitiesDetails,
|
|
55
|
+
]; }), reportResult = _e.reportResult, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange;
|
|
52
56
|
var steps = (reportResult || {}).steps;
|
|
53
57
|
var isAbilities = operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('abilities');
|
|
54
58
|
var isExistWeight = Number(weight) > 0;
|
|
55
59
|
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
56
|
-
var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
|
|
57
60
|
var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
|
|
58
61
|
var isSingleChoice = aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE;
|
|
59
62
|
var comprehensiveScore = useMemo(function () {
|
|
@@ -98,20 +101,23 @@ var QuestionItem = function (props) {
|
|
|
98
101
|
score: score,
|
|
99
102
|
});
|
|
100
103
|
}, [index, reportResult, steps, updateReportResult, onScoreChange, isSingleChoice]);
|
|
101
|
-
var handleClickItem = useCallback(function (e) {
|
|
102
|
-
e.stopPropagation();
|
|
103
|
-
if (videoUrl) {
|
|
104
|
-
updateState({ stepToken: token });
|
|
105
|
-
onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(token);
|
|
106
|
-
}
|
|
107
|
-
}, [token, videoUrl, onStepChange, updateState]);
|
|
108
104
|
return (_jsxs(Stack, __assign({ sx: {
|
|
109
105
|
padding: '16px 24px',
|
|
110
106
|
mt: 2,
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [_jsxs(Stack, __assign({ flex: 1 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: {
|
|
108
|
+
backgroundColor: theme.palette.primary.main,
|
|
109
|
+
color: '#fff',
|
|
110
|
+
fontSize: 16,
|
|
111
|
+
borderRadius: '4px 4px 4px 4px',
|
|
112
|
+
lineHeight: '16px',
|
|
113
|
+
alignSelf: 'flex-start',
|
|
114
|
+
py: 0.25,
|
|
115
|
+
px: 0.5,
|
|
116
|
+
minWidth: 12,
|
|
117
|
+
} }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", 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: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
118
|
+
return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, 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: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
119
|
+
})] })), _jsxs(Box, __assign({ position: "relative" }, { children: [_jsx(Video, { src: videoUrl, controls: true }), isExportPdf && _jsx(ExportButton, __assign({ href: videoUrl }, { children: "\u67E5\u770B\u89C6\u9891" }))] }))] })), 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 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 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 }))] }))), 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", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), _jsx(Typography, { variant: "caption", sx: {
|
|
120
|
+
color: '#424242',
|
|
121
|
+
}, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
|
|
116
122
|
};
|
|
117
123
|
export default QuestionItem;
|
|
@@ -32,7 +32,7 @@ import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
|
32
32
|
import { Tooltip, Typography } from 'fbm-ui';
|
|
33
33
|
import { useCallback, useEffect, useState } from 'react';
|
|
34
34
|
var ScoreSlider = function (props) {
|
|
35
|
-
var _a = props.width, width = _a === void 0 ?
|
|
35
|
+
var _a = props.width, width = _a === void 0 ? 504 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted, _e = props.disabledScore, sliderDisabledScore = _e === void 0 ? false : _e;
|
|
36
36
|
var aiScore = originScore.toFixed(0);
|
|
37
37
|
var _f = __read(useState(0), 2), score = _f[0], setScore = _f[1];
|
|
38
38
|
var disabledScore = useAiReportStore(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }).disabledScore;
|
|
@@ -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;
|
|
@@ -14,9 +14,11 @@ import QuestionItem from './QuestionItem';
|
|
|
14
14
|
import AiHeaderTitle from "../../../../components/AiHeaderTitle";
|
|
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", mt: 2 }, { children: [_jsx(AiHeaderTitle, { name: "\u89C6\u9891\u9898" }), _jsx(Box, __assign({ mt: 3 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return _jsx(QuestionItem, __assign({ index: index }, item), item.token); })) : (_jsx(Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
|
|
22
|
+
return (_jsxs(Box, __assign({ id: "report-question", mt: 2 }, { children: [_jsx(AiHeaderTitle, { name: "\u89C6\u9891\u9898" }), _jsx(Box, __assign({ mt: 3 }, { 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)({
|
|
@@ -6,7 +6,7 @@ export declare const ReportBadge: import("@emotion/styled").StyledComponent<impo
|
|
|
6
6
|
children?: import("react").ReactNode;
|
|
7
7
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
8
|
interface ReportLabelProps {
|
|
9
|
-
level?: 'low' | 'middle' | 'high';
|
|
9
|
+
level?: 'low' | 'middle' | 'high' | 'calculation';
|
|
10
10
|
}
|
|
11
11
|
export declare const ReportLabel: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
12
12
|
children?: import("react").ReactNode;
|
|
@@ -33,6 +33,7 @@ export declare const Podium: import("@emotion/styled").StyledComponent<import("f
|
|
|
33
33
|
children?: import("react").ReactNode;
|
|
34
34
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
35
35
|
export declare const Video: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {}>;
|
|
36
|
+
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
37
|
export declare const BeatProgressBar: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
37
38
|
children?: import("react").ReactNode;
|
|
38
39
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -28,6 +28,7 @@ var LabelImage = {
|
|
|
28
28
|
low: '//webcdn.fbmms.cn/assets/ieud/S3Zpk0MrG7xS7GNhhPR91',
|
|
29
29
|
middle: '//webcdn.fbmms.cn/assets/QSes/sdMFEHcqx5fYijnEU2d-q',
|
|
30
30
|
high: '//webcdn.fbmms.cn/assets/sXb7/jADl-WOO_6B27l56HKlBM',
|
|
31
|
+
calculation: '//webcdn.fbmms.cn/assets/9bjO/UaJ2R4JousNJezEJdY00s',
|
|
31
32
|
};
|
|
32
33
|
export var ReportLabel = styled(Box)(function (_a) {
|
|
33
34
|
var _b = _a.level, level = _b === void 0 ? 'low' : _b;
|
|
@@ -52,7 +53,8 @@ export var ReportAvatar = styled(Box)(function (_a) {
|
|
|
52
53
|
});
|
|
53
54
|
});
|
|
54
55
|
export var DinTypography = styled(Typography)({
|
|
55
|
-
fontFamily: '
|
|
56
|
+
fontFamily: 'MiSans TC',
|
|
57
|
+
fontWeight: 500,
|
|
56
58
|
});
|
|
57
59
|
var ReportTagStyles = [
|
|
58
60
|
{
|
|
@@ -79,7 +81,7 @@ function hashString(str) {
|
|
|
79
81
|
export var ReportTag = styled(DinTypography)(function (_a) {
|
|
80
82
|
var children = _a.children;
|
|
81
83
|
var hash = children ? Math.abs(hashString(children.toString())) % 3 : 0;
|
|
82
|
-
return __assign({ padding: '2px 8px', fontSize: '12px', lineHeight: '16px', marginRight: '8px', borderRadius: '177px 177px 177px 177px', border: '1px solid #FFFFFF' }, ReportTagStyles[hash]);
|
|
84
|
+
return __assign(__assign({ flex: '0 1 auto', padding: '2px 8px', fontSize: '12px', lineHeight: '16px', marginRight: '8px', borderRadius: '177px 177px 177px 177px', border: '1px solid #FFFFFF' }, ReportTagStyles[hash]), { mb: 8 });
|
|
83
85
|
});
|
|
84
86
|
export var ReportEvaluate = styled(Box)({
|
|
85
87
|
// margin: 24,
|
|
@@ -103,9 +105,30 @@ export var Podium = styled(Box)({
|
|
|
103
105
|
backgroundSize: 'cover',
|
|
104
106
|
color: '#119E45',
|
|
105
107
|
});
|
|
106
|
-
export var Video = styled('video')({
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
export var Video = styled('video')(function (_a) {
|
|
109
|
+
var theme = _a.theme;
|
|
110
|
+
return ({
|
|
111
|
+
width: 166,
|
|
112
|
+
height: 296,
|
|
113
|
+
borderRadius: 8,
|
|
114
|
+
boxShadow: theme.shadows[6],
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
export var ExportButton = styled('a')({
|
|
118
|
+
width: 96,
|
|
119
|
+
height: 40,
|
|
120
|
+
background: 'rgba(0,0,0,0.2)',
|
|
121
|
+
borderRadius: 20,
|
|
122
|
+
border: '1px solid rgba(255,255,255,0.0418)',
|
|
123
|
+
display: 'flex',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
justifyContent: 'center',
|
|
126
|
+
textDecoration: 'none',
|
|
127
|
+
fontSize: 16,
|
|
128
|
+
color: '#FFFFFF',
|
|
129
|
+
position: 'absolute',
|
|
130
|
+
top: 'calc(50% - 20px) ',
|
|
131
|
+
left: 'calc(50% - 48px)',
|
|
109
132
|
});
|
|
110
133
|
export var BeatProgressBar = styled(Box)({
|
|
111
134
|
width: 169,
|
|
@@ -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';
|
|
@@ -27,6 +27,7 @@ export interface Collection {
|
|
|
27
27
|
level: number;
|
|
28
28
|
rank: number;
|
|
29
29
|
total: number;
|
|
30
|
+
avgScore: number;
|
|
30
31
|
}
|
|
31
32
|
export interface AnalysisResult {
|
|
32
33
|
text: string;
|
|
@@ -46,6 +47,9 @@ export interface AnalysisResult {
|
|
|
46
47
|
}
|
|
47
48
|
export interface Answer {
|
|
48
49
|
videoUrl: string;
|
|
50
|
+
media: {
|
|
51
|
+
durationTime: number;
|
|
52
|
+
};
|
|
49
53
|
analysisResult: AnalysisResult;
|
|
50
54
|
}
|
|
51
55
|
export interface Ability {
|
|
@@ -61,6 +65,7 @@ export interface Ability {
|
|
|
61
65
|
export interface ScoreInfo {
|
|
62
66
|
weight: number | string;
|
|
63
67
|
workplaceEvaluation: string;
|
|
68
|
+
workplaceName: string;
|
|
64
69
|
originScore: number;
|
|
65
70
|
finalScore: number;
|
|
66
71
|
score: number;
|
|
@@ -186,6 +191,7 @@ export interface AiReportProps {
|
|
|
186
191
|
showAbilitiesDetails?: boolean;
|
|
187
192
|
showAiDimension?: boolean;
|
|
188
193
|
canEditAiDimension?: boolean;
|
|
194
|
+
isExportPdf?: boolean;
|
|
189
195
|
operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
|
|
190
196
|
stepToken?: string;
|
|
191
197
|
interviewCheat?: InterviewCheat;
|
|
@@ -201,8 +207,9 @@ export interface AiReportProps {
|
|
|
201
207
|
onSendReminderClick?: () => void;
|
|
202
208
|
onScoreRankIntervalsChange?: (scoreRankIntervals?: ScoreRankIntervals[]) => void;
|
|
203
209
|
onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
|
|
204
|
-
|
|
210
|
+
fetchFormResult?: () => Promise<FormReports>;
|
|
205
211
|
fetchCandidateInfo?: () => Promise<CandidateInfo>;
|
|
212
|
+
fetchReportUrl?: () => Promise<AiReportUrl>;
|
|
206
213
|
}
|
|
207
214
|
export interface AiReportRef {
|
|
208
215
|
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;
|
|
@@ -25,7 +28,8 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
25
28
|
onSendReminderClick?: (() => void) | undefined;
|
|
26
29
|
onScoreRankIntervalsChange?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => void) | undefined;
|
|
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;
|
|
@@ -17,4 +17,5 @@ interface SwitchReportModelParams {
|
|
|
17
17
|
thirdOrderID: string;
|
|
18
18
|
}
|
|
19
19
|
export declare const SwitchReportModel: (data: SwitchReportModelParams) => import("axios").AxiosPromise<unknown>;
|
|
20
|
+
export declare const GetReportVersion: <R>(orderToken: string) => import("axios").AxiosPromise<R>;
|
|
20
21
|
export {};
|
|
@@ -12,3 +12,4 @@ export var PostAiInterviewWorkplace = function (data) {
|
|
|
12
12
|
return POST({ url: "/standard/b/aiInterview/workplace/answer/modify", data: data });
|
|
13
13
|
};
|
|
14
14
|
export var SwitchReportModel = function (data) { return POST({ url: "standard/b/reports/switch-model", data: data }); };
|
|
15
|
+
export var GetReportVersion = function (orderToken) { return POST({ url: "standard/b/aiInterview/getVersion", data: { orderToken: orderToken } }); };
|
|
@@ -15,6 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var styled_1 = require("../../modules/ai-report-v2/components/styled");
|
|
18
19
|
var SvgIcon_1 = __importDefault(require("../SvgIcon"));
|
|
19
20
|
var fbm_ui_1 = require("fbm-ui");
|
|
20
21
|
var AiHeaderTitle = function (_a) {
|
|
@@ -22,10 +23,10 @@ var AiHeaderTitle = function (_a) {
|
|
|
22
23
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "inline-flex", sx: {
|
|
23
24
|
pl: 3,
|
|
24
25
|
color: '#009D56',
|
|
25
|
-
pt:
|
|
26
|
+
pt: 1,
|
|
26
27
|
background: 'url(//webcdn.fbmms.cn/assets/yt-b/yf2BqqIlr8Xtb8N2o44t1) no-repeat center center',
|
|
27
28
|
backgroundSize: 'contain',
|
|
28
29
|
width: 24 + (56 / 4) * name.length + 84,
|
|
29
|
-
} }, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "AI" }), (0, jsx_runtime_1.jsx)(
|
|
30
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "AI" }), (0, jsx_runtime_1.jsx)(styled_1.DinTypography, __assign({ variant: "h6", color: "inherit" }, { children: name }))] })));
|
|
30
31
|
};
|
|
31
32
|
exports.default = AiHeaderTitle;
|
|
@@ -130,7 +130,7 @@ var ReportPie = function (props) {
|
|
|
130
130
|
formatter: function (_a) {
|
|
131
131
|
var _b;
|
|
132
132
|
var value = _a.value, dataIndex = _a.dataIndex;
|
|
133
|
-
return ((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight) || 0;
|
|
133
|
+
return "".concat(((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight.toFixed(2).replace(/\.00$/, '')) || 0, "%");
|
|
134
134
|
},
|
|
135
135
|
fontSize: 14,
|
|
136
136
|
},
|
|
@@ -4,17 +4,17 @@ exports.levelMapping = void 0;
|
|
|
4
4
|
exports.levelMapping = {
|
|
5
5
|
3: {
|
|
6
6
|
text: '优秀',
|
|
7
|
-
itemColor: '
|
|
8
|
-
color: 'rgb(
|
|
7
|
+
itemColor: 'rgba(255, 153,2)',
|
|
8
|
+
color: 'rgb(255, 153, 3)',
|
|
9
9
|
},
|
|
10
10
|
2: {
|
|
11
11
|
text: '适中',
|
|
12
|
-
itemColor: '
|
|
13
|
-
color: 'rgba(0,
|
|
12
|
+
itemColor: 'rgba(0, 217,157)',
|
|
13
|
+
color: 'rgba(0, 217, 157)',
|
|
14
14
|
},
|
|
15
15
|
1: {
|
|
16
16
|
text: '欠佳',
|
|
17
|
-
itemColor: '
|
|
18
|
-
color: 'rgb(
|
|
17
|
+
itemColor: 'rgba(99, 156,255)',
|
|
18
|
+
color: 'rgb(98, 156, 255)',
|
|
19
19
|
},
|
|
20
20
|
};
|
|
@@ -20,7 +20,7 @@ var BigBallSvg_1 = __importDefault(require("../BigBallSvg"));
|
|
|
20
20
|
var utils_1 = require("../../utils/utils");
|
|
21
21
|
var ScoreBigBall = function (_a) {
|
|
22
22
|
var score = _a.score, status = _a.status, _b = _a.width, width = _b === void 0 ? 80 : _b, _c = _a.height, height = _c === void 0 ? 80 : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 20 : _d;
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreBigBallRoot, __assign({ width: width, height: height, sx: { backgroundColor: status === 1 ? '#fbfbfb' : 'rgba(59, 203, 120, 0.1)' } }, { children: [status !== 1 && (0, jsx_runtime_1.jsx)(BigBallSvg_1.default, {}), status === 1 && ((0, jsx_runtime_1.jsx)("div", __assign({ style: { color: 'rgba(0,0,0,0.26)', fontSize: '12px' } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u5019\u9009\u4EBA\u672A\u4F5C\u7B54" }) }))), status === 2 && ((0, jsx_runtime_1.jsx)("div", __assign({ style: { color: '#40be47' } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u8BA1\u7B97\u4E2D..." }) }))), status === 3 && ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { color: '#40be47' } }, { children: [(0, jsx_runtime_1.jsx)("span", __assign({ style: { fontFamily: '
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreBigBallRoot, __assign({ width: width, height: height, sx: { backgroundColor: status === 1 ? '#fbfbfb' : 'rgba(59, 203, 120, 0.1)' } }, { children: [status !== 1 && (0, jsx_runtime_1.jsx)(BigBallSvg_1.default, {}), status === 1 && ((0, jsx_runtime_1.jsx)("div", __assign({ style: { color: 'rgba(0,0,0,0.26)', fontSize: '12px' } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u5019\u9009\u4EBA\u672A\u4F5C\u7B54" }) }))), status === 2 && ((0, jsx_runtime_1.jsx)("div", __assign({ style: { color: '#40be47' } }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u8BA1\u7B97\u4E2D..." }) }))), status === 3 && ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { color: '#40be47' } }, { children: [(0, jsx_runtime_1.jsx)("span", __assign({ style: { fontFamily: 'MiSans TC', fontSize: fontSize, fontWeight: 'bold' } }, { children: (0, utils_1.formatScore)(score) > 100 ? 100 : (0, utils_1.formatScore)(score) })), (0, jsx_runtime_1.jsx)("span", __assign({ style: { marginLeft: '2px', fontSize: '12px' } }, { children: "\u5206" }))] })))] })), status === 2 && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
24
24
|
position: 'absolute',
|
|
25
25
|
top: 0,
|
|
26
26
|
right: 0,
|
|
@@ -25,6 +25,7 @@ export interface Collection {
|
|
|
25
25
|
level: number;
|
|
26
26
|
rank: number;
|
|
27
27
|
total: number;
|
|
28
|
+
avgScore: number;
|
|
28
29
|
}
|
|
29
30
|
export interface AnalysisResult {
|
|
30
31
|
text: string;
|
|
@@ -44,6 +45,9 @@ export interface AnalysisResult {
|
|
|
44
45
|
}
|
|
45
46
|
export interface Answer {
|
|
46
47
|
videoUrl: string;
|
|
48
|
+
media: {
|
|
49
|
+
durationTime: number;
|
|
50
|
+
};
|
|
47
51
|
analysisResult: AnalysisResult;
|
|
48
52
|
}
|
|
49
53
|
export interface Ability {
|
|
@@ -58,6 +62,7 @@ export interface Ability {
|
|
|
58
62
|
}
|
|
59
63
|
export interface ScoreInfo {
|
|
60
64
|
weight: number | string;
|
|
65
|
+
workplaceName: string;
|
|
61
66
|
workplaceEvaluation: string;
|
|
62
67
|
originScore: number;
|
|
63
68
|
finalScore: number;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AiReportProps, AiReportRef } from './interface';
|
|
3
3
|
export declare const useAiReport: (props: AiReportProps) => {
|
|
4
|
+
version: number;
|
|
5
|
+
reloadReportVersion: () => void;
|
|
4
6
|
handleRefresh?: (() => void) | undefined;
|
|
5
7
|
token: string;
|
|
6
8
|
customScore?: number | undefined;
|
|
@@ -10,11 +10,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
13
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
17
|
exports.useAiReport = void 0;
|
|
18
|
+
var useAiReportVersion_1 = __importDefault(require("../ai-report-v2/useAiReportVersion"));
|
|
15
19
|
var react_1 = require("react");
|
|
16
20
|
var useAiReport = function (props) {
|
|
17
21
|
var ref = (0, react_1.useRef)();
|
|
18
|
-
|
|
22
|
+
var reportVersion = (0, useAiReportVersion_1.default)(props.token);
|
|
23
|
+
return __assign(__assign(__assign({ ref: ref }, props), ref === null || ref === void 0 ? void 0 : ref.current), reportVersion);
|
|
19
24
|
};
|
|
20
25
|
exports.useAiReport = useAiReport;
|