eli-video-interview 1.2.42-alpha.4 → 1.2.42-alpha.6

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.
@@ -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;
@@ -20,15 +20,13 @@ import { useAiReportStore } from "../../store/ai-report/global-store";
20
20
  import { useRequest } from 'ahooks';
21
21
  import { Box, Button, Paper, Typography } from 'fbm-ui';
22
22
  import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
23
- var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER, FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
23
+ var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
24
24
  var AiReportRoot = forwardRef(function (props, ref) {
25
25
  var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormReuslt = props.fetchFormReuslt, fetchCandidateInfo = props.fetchCandidateInfo;
26
26
  var firstLoad = useRef(true);
27
- // @ts-ignore
28
27
  var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
29
- // const { collection = [], workplaces = [], model = 'standard', hasProVersion = false, isSimulated = false } = reportResult || {};
30
- // ![FAILED, IN_CALCULATION].includes(status)
31
- var _b = useRequest(function () { return PostAiInterviewResult([token]); }, {
28
+ var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
29
+ var _c = useRequest(function () { return PostAiInterviewResult([token]); }, {
32
30
  manual: true,
33
31
  onSuccess: function (_a) {
34
32
  var list = _a.data.list;
@@ -46,7 +44,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
46
44
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
47
45
  }
48
46
  },
49
- }), data = _b.data, loading = _b.loading, postAiInterviewResult = _b.run;
47
+ }), data = _c.data, loading = _c.loading, postAiInterviewResult = _c.run;
50
48
  var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
51
49
  var handleRefreshSuccess = useCallback(function () {
52
50
  postAiInterviewResult();
@@ -62,7 +60,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
62
60
  useEffect(function () {
63
61
  updateState(props);
64
62
  // eslint-disable-next-line react-hooks/exhaustive-deps
65
- }, [props]);
63
+ }, [JSON.stringify(props)]);
66
64
  var aiReportResult = useMemo(function () {
67
65
  if (status === NO_ANSWER) {
68
66
  return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: { marginTop: '2px' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
@@ -74,9 +72,20 @@ var AiReportRoot = forwardRef(function (props, ref) {
74
72
  backgroundSize: 'contain',
75
73
  backgroundRepeat: 'no-repeat',
76
74
  backgroundPosition: 'center top',
77
- } }, { children: [_jsx(NotFinish, {}), _jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status }), _jsx(FormReport, { fetchFormReuslt: fetchFormReuslt }), _jsx(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, {}) }))] })));
75
+ paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
76
+ } }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), _jsx(FormReport, { fetchFormReuslt: fetchFormReuslt }), _jsx(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, {}) }))] })));
78
77
  }
79
- }, [status, operableButtons, reminderSent, onSendReminderClick, customScore, handleRefreshSuccess, fetchCandidateInfo, fetchFormReuslt]);
78
+ }, [
79
+ status,
80
+ operableButtons,
81
+ reminderSent,
82
+ onSendReminderClick,
83
+ collection === null || collection === void 0 ? void 0 : collection.length,
84
+ customScore,
85
+ handleRefreshSuccess,
86
+ fetchCandidateInfo,
87
+ fetchFormReuslt,
88
+ ]);
80
89
  return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
81
90
  });
82
91
  AiReportRoot.displayName = 'AiReportRoot';
@@ -97,7 +97,6 @@ var drawTop = function (layout, ctx) {
97
97
  var labelWidth = measureTextWidth(ctx, label);
98
98
  ctx.fillStyle = fontColor;
99
99
  ctx.fillText(label, offset + width / 2 - labelWidth / 2, 18);
100
- console.log(offset);
101
100
  // 绘制垂直虚线
102
101
  drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight - 50, 2, 2);
103
102
  // 绘制分数文本
@@ -185,10 +184,11 @@ var draw = function (layout, dimensions, pathRef, ctx) {
185
184
  drawRoundedRect(x, y, MAX_WIDTH, MAX_HEIGHT, borderRadius, true, false, ctx);
186
185
  var endPointY = 65 + layout.itemSpacing * i;
187
186
  drawLable(v.name, 10, endPointY, ctx);
187
+ var score = (_a = v.score) !== null && _a !== void 0 ? _a : (v.score < 4 ? 4 : v.score);
188
188
  drawScore(layout, ctx, config, {
189
189
  x: layout.leftLableWidth,
190
190
  y: y,
191
- width: MAX_WIDTH * ((((_a = v.score) !== null && _a !== void 0 ? _a : v.score < 4) ? 4 : v.score) / 100),
191
+ width: MAX_WIDTH * (score / 100),
192
192
  height: MAX_HEIGHT,
193
193
  }, v.score);
194
194
  });
@@ -20,7 +20,7 @@ var Index = function () {
20
20
  var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
21
21
  var items = collection.map(function (item) { return ({
22
22
  name: item.name,
23
- score: item.score,
23
+ score: item.avgScore,
24
24
  }); });
25
25
  if (!showAiDimension)
26
26
  return null;
@@ -29,7 +29,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
29
  import { DinTypography, ReportAvatar, ReportTag } from '../styled';
30
30
  import { useAiReportStore } from "../../../../store/ai-report/global-store";
31
31
  import { getSecondToTime } from "../../../../utils/utils";
32
- import { Message, Typography } from 'fbm-ui';
32
+ import { Box, Message, Typography } from 'fbm-ui';
33
33
  import { Stack } from 'fbm-ui/lib/mui';
34
34
  import { memo, useEffect, useMemo, useState } from 'react';
35
35
  var Form = function (_a) {
@@ -44,6 +44,12 @@ var Form = function (_a) {
44
44
  }
45
45
  }, [fetchCandidateInfo]);
46
46
  var name = data.name, mobile = data.mobile, positionName = data.positionName, avatar = data.avatar, tags = data.tags;
47
- return (_jsxs(Stack, __assign({ direction: "row", minHeight: 221, mt: 13.25 }, { children: [_jsx(ReportAvatar, { sx: { mx: 3 }, avatar: avatar }), _jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsx(DinTypography, __assign({ sx: { fontSize: 18 } }, { children: positionName })), _jsxs(Typography, __assign({ variant: "body1" }, { children: [name, " ", mobile] })), _jsx(Stack, __assign({ direction: "row" }, { children: tags === null || tags === void 0 ? void 0 : tags.map(function (tag) { return (_jsx(ReportTag, { children: tag.name }, tag.token)); }) })), _jsxs(Typography, { children: ["\u9762\u8BD5\u65F6\u957F\uFF1A", duration] })] }))] })));
47
+ return (_jsxs(Stack, __assign({ direction: "row", minHeight: 221, mt: 13.25 }, { children: [_jsx(ReportAvatar, { sx: { mx: 3 }, avatar: avatar }), _jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsx(DinTypography, __assign({ sx: { fontSize: 18 } }, { children: positionName })), _jsxs(Typography, __assign({ variant: "body1" }, { children: [name, " ", mobile] })), _jsx(Box, __assign({ sx: {
48
+ display: 'flex',
49
+ flexWrap: 'wrap',
50
+ gap: '8px',
51
+ alignItems: 'flex-start',
52
+ width: '450px',
53
+ } }, { children: tags === null || tags === void 0 ? void 0 : tags.map(function (tag) { return (_jsx(ReportTag, { children: tag.name }, tag.token)); }) })), _jsxs(Typography, { children: ["\u9762\u8BD5\u65F6\u957F\uFF1A", duration] })] }))] })));
48
54
  };
49
55
  export default memo(Form);
@@ -45,6 +45,6 @@ var Form = function () {
45
45
  setText('');
46
46
  }
47
47
  }, [score, reportRank, scoreRankIntervals, progress]);
48
- return (_jsx(Podium, { children: _jsxs(Stack, __assign({ direction: "row", position: "relative", bottom: -128, left: 88 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", justifyContent: "center", width: 300 }, { children: [_jsx(Typography, __assign({ sx: { fontSize: 100, fontWeight: 'bold', lineHeight: 1 }, color: "inherit" }, { children: score })), _jsx(Typography, __assign({ variant: "h5", color: "inherit", sx: { fontSize: 30, fontWeight: 'bold', alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) !== 0 && (_jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsxs(Typography, __assign({ color: "inherit", fontWeight: 500 }, { children: [text, "\u00A0"] })), _jsx(BeatProgressBar, { children: _jsx("div", { className: "progress-bar-fill", style: { width: "".concat(progress, "%") } }) })] })))] })) }));
48
+ return (_jsx(Podium, { children: _jsxs(Stack, __assign({ direction: "row", position: "relative", bottom: -128, left: 88 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", justifyContent: "center", width: 300 }, { children: [_jsx(Typography, __assign({ sx: { fontSize: 100, fontWeight: 'bold', lineHeight: 1 }, color: "inherit" }, { children: score })), _jsx(Typography, __assign({ variant: "h5", color: "inherit", sx: { fontSize: 30, fontWeight: 'bold', alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) !== 0 && (_jsxs(Stack, __assign({ spacing: 1, mt: 6.25 }, { children: [_jsxs(Typography, __assign({ color: "inherit", fontWeight: 500 }, { children: [text, "\u00A0"] })), _jsx(BeatProgressBar, { children: _jsx("div", { className: "progress-bar-fill", style: { width: "".concat(progress, "%") } }) })] })))] })) }));
49
49
  };
50
50
  export default Form;
@@ -110,8 +110,8 @@ var QuestionItem = function (props) {
110
110
  mt: 2,
111
111
  }, onClick: handleClickItem }, { 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: { backgroundColor: theme.palette.primary.main, color: '#fff', px: 0.5, borderRadius: '4px 4px 4px 4px', lineHeight: 1 } }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: desc }))] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
112
112
  return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
113
- })] })), _jsx(Video, { src: videoUrl, controls: true })] })), _jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [_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"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), 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: {
113
+ })] })), _jsx(Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && (_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"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), 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: {
114
114
  color: '#424242',
115
- }, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] }))] }), token));
115
+ }, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
116
116
  };
117
117
  export default QuestionItem;
@@ -80,7 +80,7 @@ function hashString(str) {
80
80
  export var ReportTag = styled(DinTypography)(function (_a) {
81
81
  var children = _a.children;
82
82
  var hash = children ? Math.abs(hashString(children.toString())) % 3 : 0;
83
- return __assign({ padding: '2px 8px', fontSize: '12px', lineHeight: '16px', marginRight: '8px', borderRadius: '177px 177px 177px 177px', border: '1px solid #FFFFFF' }, ReportTagStyles[hash]);
83
+ 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 });
84
84
  });
85
85
  export var ReportEvaluate = styled(Box)({
86
86
  // margin: 24,
@@ -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;
@@ -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;
@@ -25,15 +25,13 @@ var global_store_1 = require("../../store/ai-report/global-store");
25
25
  var ahooks_1 = require("ahooks");
26
26
  var fbm_ui_1 = require("fbm-ui");
27
27
  var react_1 = require("react");
28
- var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER, FAILED = ai_report_1.INTERVIEW_STATUS.FAILED, IN_CALCULATION = ai_report_1.INTERVIEW_STATUS.IN_CALCULATION;
28
+ var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
29
29
  var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
30
30
  var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormReuslt = props.fetchFormReuslt, fetchCandidateInfo = props.fetchCandidateInfo;
31
31
  var firstLoad = (0, react_1.useRef)(true);
32
- // @ts-ignore
33
32
  var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
34
- // const { collection = [], workplaces = [], model = 'standard', hasProVersion = false, isSimulated = false } = reportResult || {};
35
- // ![FAILED, IN_CALCULATION].includes(status)
36
- var _b = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
33
+ var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
34
+ var _c = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
37
35
  manual: true,
38
36
  onSuccess: function (_a) {
39
37
  var list = _a.data.list;
@@ -51,7 +49,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
51
49
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
52
50
  }
53
51
  },
54
- }), data = _b.data, loading = _b.loading, postAiInterviewResult = _b.run;
52
+ }), data = _c.data, loading = _c.loading, postAiInterviewResult = _c.run;
55
53
  var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
56
54
  var handleRefreshSuccess = (0, react_1.useCallback)(function () {
57
55
  postAiInterviewResult();
@@ -67,7 +65,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
67
65
  (0, react_1.useEffect)(function () {
68
66
  updateState(props);
69
67
  // eslint-disable-next-line react-hooks/exhaustive-deps
70
- }, [props]);
68
+ }, [JSON.stringify(props)]);
71
69
  var aiReportResult = (0, react_1.useMemo)(function () {
72
70
  if (status === NO_ANSWER) {
73
71
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
@@ -79,9 +77,20 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
79
77
  backgroundSize: 'contain',
80
78
  backgroundRepeat: 'no-repeat',
81
79
  backgroundPosition: 'center top',
82
- } }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (0, jsx_runtime_1.jsx)(ReportHeader_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status }), (0, jsx_runtime_1.jsx)(Form_1.FormReport, { fetchFormReuslt: fetchFormReuslt }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {}) }))] })));
80
+ paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
81
+ } }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ReportHeader_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), (0, jsx_runtime_1.jsx)(Form_1.FormReport, { fetchFormReuslt: fetchFormReuslt }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {}) }))] })));
83
82
  }
84
- }, [status, operableButtons, reminderSent, onSendReminderClick, customScore, handleRefreshSuccess, fetchCandidateInfo, fetchFormReuslt]);
83
+ }, [
84
+ status,
85
+ operableButtons,
86
+ reminderSent,
87
+ onSendReminderClick,
88
+ collection === null || collection === void 0 ? void 0 : collection.length,
89
+ customScore,
90
+ handleRefreshSuccess,
91
+ fetchCandidateInfo,
92
+ fetchFormReuslt,
93
+ ]);
85
94
  return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
86
95
  });
87
96
  AiReportRoot.displayName = 'AiReportRoot';
@@ -99,7 +99,6 @@ var drawTop = function (layout, ctx) {
99
99
  var labelWidth = measureTextWidth(ctx, label);
100
100
  ctx.fillStyle = fontColor;
101
101
  ctx.fillText(label, offset + width / 2 - labelWidth / 2, 18);
102
- console.log(offset);
103
102
  // 绘制垂直虚线
104
103
  drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight - 50, 2, 2);
105
104
  // 绘制分数文本
@@ -187,10 +186,11 @@ var draw = function (layout, dimensions, pathRef, ctx) {
187
186
  drawRoundedRect(x, y, MAX_WIDTH, MAX_HEIGHT, borderRadius, true, false, ctx);
188
187
  var endPointY = 65 + layout.itemSpacing * i;
189
188
  drawLable(v.name, 10, endPointY, ctx);
189
+ var score = (_a = v.score) !== null && _a !== void 0 ? _a : (v.score < 4 ? 4 : v.score);
190
190
  drawScore(layout, ctx, config, {
191
191
  x: layout.leftLableWidth,
192
192
  y: y,
193
- width: MAX_WIDTH * ((((_a = v.score) !== null && _a !== void 0 ? _a : v.score < 4) ? 4 : v.score) / 100),
193
+ width: MAX_WIDTH * (score / 100),
194
194
  height: MAX_HEIGHT,
195
195
  }, v.score);
196
196
  });
@@ -25,7 +25,7 @@ var Index = function () {
25
25
  var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
26
26
  var items = collection.map(function (item) { return ({
27
27
  name: item.name,
28
- score: item.score,
28
+ score: item.avgScore,
29
29
  }); });
30
30
  if (!showAiDimension)
31
31
  return null;
@@ -46,6 +46,12 @@ var Form = function (_a) {
46
46
  }
47
47
  }, [fetchCandidateInfo]);
48
48
  var name = data.name, mobile = data.mobile, positionName = data.positionName, avatar = data.avatar, tags = data.tags;
49
- return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", minHeight: 221, mt: 13.25 }, { children: [(0, jsx_runtime_1.jsx)(styled_1.ReportAvatar, { sx: { mx: 3 }, avatar: avatar }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(styled_1.DinTypography, __assign({ sx: { fontSize: 18 } }, { children: positionName })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1" }, { children: [name, " ", mobile] })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row" }, { children: tags === null || tags === void 0 ? void 0 : tags.map(function (tag) { return ((0, jsx_runtime_1.jsx)(styled_1.ReportTag, { children: tag.name }, tag.token)); }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, { children: ["\u9762\u8BD5\u65F6\u957F\uFF1A", duration] })] }))] })));
49
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", minHeight: 221, mt: 13.25 }, { children: [(0, jsx_runtime_1.jsx)(styled_1.ReportAvatar, { sx: { mx: 3 }, avatar: avatar }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(styled_1.DinTypography, __assign({ sx: { fontSize: 18 } }, { children: positionName })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1" }, { children: [name, " ", mobile] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: {
50
+ display: 'flex',
51
+ flexWrap: 'wrap',
52
+ gap: '8px',
53
+ alignItems: 'flex-start',
54
+ width: '450px',
55
+ } }, { children: tags === null || tags === void 0 ? void 0 : tags.map(function (tag) { return ((0, jsx_runtime_1.jsx)(styled_1.ReportTag, { children: tag.name }, tag.token)); }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, { children: ["\u9762\u8BD5\u65F6\u957F\uFF1A", duration] })] }))] })));
50
56
  };
51
57
  exports.default = (0, react_1.memo)(Form);
@@ -47,6 +47,6 @@ var Form = function () {
47
47
  setText('');
48
48
  }
49
49
  }, [score, reportRank, scoreRankIntervals, progress]);
50
- return ((0, jsx_runtime_1.jsx)(styled_1.Podium, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", position: "relative", bottom: -128, left: 88 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, direction: "row", justifyContent: "center", width: 300 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { fontSize: 100, fontWeight: 'bold', lineHeight: 1 }, color: "inherit" }, { children: score })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h5", color: "inherit", sx: { fontSize: 30, fontWeight: 'bold', alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) !== 0 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: "inherit", fontWeight: 500 }, { children: [text, "\u00A0"] })), (0, jsx_runtime_1.jsx)(styled_1.BeatProgressBar, { children: (0, jsx_runtime_1.jsx)("div", { className: "progress-bar-fill", style: { width: "".concat(progress, "%") } }) })] })))] })) }));
50
+ return ((0, jsx_runtime_1.jsx)(styled_1.Podium, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", position: "relative", bottom: -128, left: 88 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, direction: "row", justifyContent: "center", width: 300 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { fontSize: 100, fontWeight: 'bold', lineHeight: 1 }, color: "inherit" }, { children: score })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h5", color: "inherit", sx: { fontSize: 30, fontWeight: 'bold', alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) !== 0 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, mt: 6.25 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: "inherit", fontWeight: 500 }, { children: [text, "\u00A0"] })), (0, jsx_runtime_1.jsx)(styled_1.BeatProgressBar, { children: (0, jsx_runtime_1.jsx)("div", { className: "progress-bar-fill", style: { width: "".concat(progress, "%") } }) })] })))] })) }));
51
51
  };
52
52
  exports.default = Form;
@@ -115,8 +115,8 @@ var QuestionItem = function (props) {
115
115
  mt: 2,
116
116
  }, onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ flex: 1 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { backgroundColor: ThemeProvider_1.theme.palette.primary.main, color: '#fff', px: 0.5, borderRadius: '4px 4px 4px 4px', lineHeight: 1 } }, { children: index + 1 })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: desc }))] })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isSingleChoice && (0, jsx_runtime_1.jsx)(SingleChoice_1.default, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
117
117
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
118
- })] })), (0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true })] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] })), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return ((0, react_1.createElement)(Workplaces_1.default, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", sx: {
118
+ })] })), (0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return ((0, react_1.createElement)(Workplaces_1.default, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", sx: {
119
119
  color: '#424242',
120
- }, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] }))] }), token));
120
+ }, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
121
121
  };
122
122
  exports.default = QuestionItem;
@@ -83,7 +83,7 @@ function hashString(str) {
83
83
  exports.ReportTag = (0, fbm_ui_1.styled)(exports.DinTypography)(function (_a) {
84
84
  var children = _a.children;
85
85
  var hash = children ? Math.abs(hashString(children.toString())) % 3 : 0;
86
- return __assign({ padding: '2px 8px', fontSize: '12px', lineHeight: '16px', marginRight: '8px', borderRadius: '177px 177px 177px 177px', border: '1px solid #FFFFFF' }, ReportTagStyles[hash]);
86
+ 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 });
87
87
  });
88
88
  exports.ReportEvaluate = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
89
89
  // margin: 24,
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.42-alpha.4",
3
+ "version": "1.2.42-alpha.6",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",