eli-video-interview 1.2.34-beta.2 → 1.2.34
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/modules/ai-report/Root.js +2 -2
- package/esm/modules/ai-report/components/AIEvaluate/index.js +7 -7
- package/esm/modules/ai-report/components/ScoreReport/Score.js +7 -3
- package/esm/modules/ai-report/components/ScoreReport/index.js +2 -2
- package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +1 -1
- package/esm/modules/ai-report/interface.d.ts +1 -0
- package/esm/modules/ai-report/useAiReport.d.ts +1 -0
- package/esm/modules/ai-template/components/TemplateHeader/index.js +1 -1
- package/esm/store/ai-report/global-store.d.ts +3 -0
- package/lib/modules/ai-report/Root.js +2 -2
- package/lib/modules/ai-report/components/AIEvaluate/index.js +5 -5
- package/lib/modules/ai-report/components/ScoreReport/Score.js +7 -3
- package/lib/modules/ai-report/components/ScoreReport/index.js +2 -2
- package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +1 -1
- package/lib/modules/ai-report/interface.d.ts +1 -0
- package/lib/modules/ai-report/useAiReport.d.ts +1 -0
- package/lib/modules/ai-template/components/TemplateHeader/index.js +1 -1
- package/lib/store/ai-report/global-store.d.ts +3 -0
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ import { Box, Button, Typography } from 'fbm-ui';
|
|
|
24
24
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
25
25
|
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
26
26
|
var AiReportRoot = forwardRef(function (props, ref) {
|
|
27
|
-
var token = props.token, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
27
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
28
28
|
var firstLoad = useRef(true);
|
|
29
29
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
30
30
|
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d;
|
|
@@ -68,7 +68,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
68
68
|
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 ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
|
-
return (_jsxs(Box, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(ScoreReport, { onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }));
|
|
71
|
+
return (_jsxs(Box, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }));
|
|
72
72
|
}
|
|
73
73
|
}, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
|
|
74
74
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
@@ -15,19 +15,19 @@ import Evaluate from './Evaluate';
|
|
|
15
15
|
import Graph from './Graph';
|
|
16
16
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
17
17
|
import AiHeaderTitle from "../../../../components/AiHeaderTitle";
|
|
18
|
-
import { InfoOutlineIcon,
|
|
18
|
+
import { InfoOutlineIcon, Tooltip, Typography } from 'fbm-ui';
|
|
19
19
|
import { Box, Collapse, Divider, Paper, Stack } from 'fbm-ui/lib/mui';
|
|
20
|
-
import {
|
|
20
|
+
import { useState } from 'react';
|
|
21
21
|
var Index = function () {
|
|
22
22
|
var _a, _b;
|
|
23
23
|
var _c = useAiReportStore(function (store) { return [
|
|
24
24
|
store.reportResult,
|
|
25
25
|
store.operableButtons,
|
|
26
26
|
]; }), reportResult = _c.reportResult, showAiDimension = _c.showAiDimension, canEditAiDimension = _c.canEditAiDimension, customInterviewDimRankMap = _c.customInterviewDimRankMap;
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, [expand]);
|
|
27
|
+
var expand = useState(true)[0];
|
|
28
|
+
// const handleExpandChange = useCallback(() => {
|
|
29
|
+
// setExpand(!expand);
|
|
30
|
+
// }, [expand]);
|
|
31
31
|
if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
|
|
32
32
|
return null;
|
|
33
33
|
return (_jsxs(Box, __assign({ id: "report-evaluate", component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [_jsx(AiHeaderTitle, { name: "AI\u57FA\u7840\u80FD\u529B" }), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), _jsxs(Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
@@ -35,6 +35,6 @@ var Index = function () {
|
|
|
35
35
|
var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
|
|
36
36
|
var rank = rankPercent((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
|
|
37
37
|
return (_jsxs(Box, __assign({ component: Paper, elevation: 0, bgcolor: "#f9f9f9", mb: 2, pb: 2 }, { children: [_jsxs(Stack, __assign({ px: 2, pt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 2 }, { children: [_jsx(Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: v.evaluationDimensionName })), !isNaN(rank) && (_jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u51FB\u8D25\u4E86", _jsxs(Typography, __assign({ variant: "body2", fontWeight: "medium", display: "inline", color: "#4caf50" }, { children: [rank.toFixed(2), "%"] })), "\u7684\u5019\u9009\u4EBA"] })))] })), _jsx(Typography, __assign({ mt: 1, mb: 2, variant: "body2", fontWeight: "medium", color: "#4caf50" }, { children: v.impressions.join('、') }))] })), _jsx(Divider, { sx: { borderColor: 'rgba(0,0,0,0.08)' } }), _jsxs(Stack, __assign({ px: 2 }, { children: [((_a = v.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && (_jsx(Box, __assign({ mt: 2 }, { children: _jsx(Graph, { items: v.items }) }))), _jsxs(Stack, __assign({ spacing: 2, mt: 2 }, { children: [_jsx(Evaluate, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.evaluations, title: "\u8BC4\u4EF7\u5185\u5BB9", field: "evaluations", mode: "show" }), _jsx(Evaluate, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.suggestions, title: "\u63D0\u9AD8\u5EFA\u8BAE", field: "suggestions", mode: "show" })] }))] }))] }), v.evaluationToken));
|
|
38
|
-
}), _jsxs(Stack, __assign({ spacing: 1, mt: 4 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), _jsxs(Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] }))
|
|
38
|
+
}), _jsxs(Stack, __assign({ spacing: 1, mt: 4, pb: 2 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), _jsxs(Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] }))] })));
|
|
39
39
|
};
|
|
40
40
|
export default Index;
|
|
@@ -19,16 +19,20 @@ import dayjs from 'dayjs';
|
|
|
19
19
|
import { Box, Button, DownloadIcon, Popover, Typography } from 'fbm-ui';
|
|
20
20
|
import { useEffect, useState } from 'react';
|
|
21
21
|
var Score = function (_a) {
|
|
22
|
-
var loading = _a.loading, onRefresh = _a.onRefresh;
|
|
22
|
+
var customScore = _a.customScore, loading = _a.loading, onRefresh = _a.onRefresh;
|
|
23
23
|
var _b = useState(false), openRankingRange = _b[0], setOpenRankingRange = _b[1];
|
|
24
24
|
var _c = useState(false), openRefresh = _c[0], setOpenRefresh = _c[1];
|
|
25
25
|
var _d = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _d.reportResult, operableButtons = _d.operableButtons, onExportReportClick = _d.onExportReportClick;
|
|
26
26
|
var _e = reportResult || {}, score = _e.score, createTime = _e.createTime;
|
|
27
|
+
var _f = useState(score || 0), feScore = _f[0], setScore = _f[1];
|
|
27
28
|
useEffect(function () {
|
|
29
|
+
if (typeof customScore === 'number' && customScore > -1) {
|
|
30
|
+
setScore(customScore);
|
|
31
|
+
}
|
|
28
32
|
if (!loading)
|
|
29
33
|
setOpenRefresh(false);
|
|
30
|
-
}, [loading]);
|
|
34
|
+
}, [loading, customScore]);
|
|
31
35
|
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: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
|
|
32
|
-
return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(
|
|
36
|
+
return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(feScore || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx(Box, __assign({ width: 50, height: 50 }, { children: !!feScore && feScore >= 80 && _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
|
|
33
37
|
};
|
|
34
38
|
export default Score;
|
|
@@ -21,7 +21,7 @@ import { Message } from 'fbm-ui';
|
|
|
21
21
|
import { Divider, Paper } from 'fbm-ui/lib/mui';
|
|
22
22
|
var FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
|
|
23
23
|
var ScoreReport = function (_a) {
|
|
24
|
-
var onRefreshSuccess = _a.onRefreshSuccess;
|
|
24
|
+
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess;
|
|
25
25
|
var _b = useAiReportStore(function (store) { return [store.token, store.reportResult]; }), token = _b.token, reportResult = _b.reportResult;
|
|
26
26
|
var _c = (reportResult || {}).status, status = _c === void 0 ? 0 : _c;
|
|
27
27
|
var _d = useRequest(function () { return PostAiInterviewRefresh(token); }, {
|
|
@@ -35,7 +35,7 @@ var ScoreReport = function (_a) {
|
|
|
35
35
|
return (_jsx(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: _jsx(Failed, { status: status, loading: loading, onRefresh: run }) })));
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
return (_jsxs(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [_jsx(Score, { loading: loading, onRefresh: run }), _jsx(Divider, {}), _jsx(Report, {})] })));
|
|
38
|
+
return (_jsxs(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [_jsx(Score, { customScore: customScore, loading: loading, onRefresh: run }), _jsx(Divider, {}), _jsx(Report, {})] })));
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
export default ScoreReport;
|
|
@@ -2,9 +2,11 @@ export interface ScoreLegendProps {
|
|
|
2
2
|
color: string;
|
|
3
3
|
}
|
|
4
4
|
export interface ScoreReportProps {
|
|
5
|
+
customScore?: number;
|
|
5
6
|
onRefreshSuccess: () => void;
|
|
6
7
|
}
|
|
7
8
|
export interface ScoreProps {
|
|
9
|
+
customScore?: number;
|
|
8
10
|
loading?: boolean;
|
|
9
11
|
onRefresh: () => void;
|
|
10
12
|
}
|
|
@@ -46,7 +46,7 @@ export declare const StyledSlider: import("@emotion/styled").StyledComponent<{
|
|
|
46
46
|
name?: string | undefined;
|
|
47
47
|
onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
|
|
48
48
|
onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
|
|
49
|
-
orientation?: "
|
|
49
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
50
50
|
scale?: ((value: number) => number) | undefined;
|
|
51
51
|
step?: number | null | undefined;
|
|
52
52
|
tabIndex?: number | undefined;
|
|
@@ -46,7 +46,7 @@ export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComp
|
|
|
46
46
|
name?: string | undefined;
|
|
47
47
|
onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
|
|
48
48
|
onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
|
|
49
|
-
orientation?: "
|
|
49
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
50
50
|
scale?: ((value: number) => number) | undefined;
|
|
51
51
|
step?: number | null | undefined;
|
|
52
52
|
tabIndex?: number | undefined;
|
|
@@ -150,6 +150,7 @@ export interface CustomInterviewDimRank {
|
|
|
150
150
|
export declare type CustomInterviewDimRankMap = Record<string, CustomInterviewDimRank>;
|
|
151
151
|
export interface AiReportProps {
|
|
152
152
|
token: string;
|
|
153
|
+
customScore?: number;
|
|
153
154
|
scoreRankIntervals?: ScoreRankInterval[];
|
|
154
155
|
disabledScore?: boolean;
|
|
155
156
|
reminderSent?: boolean;
|
|
@@ -3,6 +3,7 @@ import { AiReportProps, AiReportRef } from './interface';
|
|
|
3
3
|
export declare const useAiReport: (props: AiReportProps) => {
|
|
4
4
|
handleRefresh?: (() => void) | undefined;
|
|
5
5
|
token: string;
|
|
6
|
+
customScore?: number | undefined;
|
|
6
7
|
scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
7
8
|
disabledScore?: boolean | undefined;
|
|
8
9
|
reminderSent?: boolean | undefined;
|
|
@@ -13,6 +13,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import { Box, CloseIcon, IconButton, KeyboardArrowLeftIcon, Typography } from 'fbm-ui';
|
|
14
14
|
var TemplateHeader = function (_a) {
|
|
15
15
|
var name = _a.name, onClose = _a.onClose, onSearch = _a.onSearch, onBack = _a.onBack;
|
|
16
|
-
return name ? (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [_jsx(IconButton, __assign({ onClick: onBack }, { children: _jsx(KeyboardArrowLeftIcon, {}) })), _jsx(Typography, __assign({ variant: "body1", weight: "500"
|
|
16
|
+
return name ? (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pr: 1, pt: 1, pb: 1.5, mb: 1 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [_jsx(IconButton, __assign({ onClick: onBack }, { children: _jsx(KeyboardArrowLeftIcon, {}) })), _jsx(Typography, __assign({ variant: "body1", weight: "500" }, { children: name }))] })), _jsx(IconButton, __assign({ onClick: onClose }, { children: _jsx(CloseIcon, {}) }))] }))) : (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [_jsxs(Typography, __assign({ variant: "body1", weight: "500", ml: 3 }, { children: ["\u5C97\u4F4D\u6A21\u7248\u5E93", _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\uFF08\u6A21\u7248\u5E93\u53EF\u591A\u6B21\u4F7F\u7528\uFF09" }))] })), _jsx(IconButton, __assign({ onClick: onClose }, { children: _jsx(CloseIcon, {}) }))] })));
|
|
17
17
|
};
|
|
18
18
|
export default TemplateHeader;
|
|
@@ -5,6 +5,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
5
5
|
updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
|
|
6
6
|
updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
|
|
7
7
|
token: string;
|
|
8
|
+
customScore?: number | undefined;
|
|
8
9
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
9
10
|
disabledScore?: boolean | undefined;
|
|
10
11
|
reminderSent?: boolean | undefined;
|
|
@@ -31,6 +32,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
31
32
|
updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
|
|
32
33
|
updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
|
|
33
34
|
token: string;
|
|
35
|
+
customScore?: number | undefined;
|
|
34
36
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
35
37
|
disabledScore?: boolean | undefined;
|
|
36
38
|
reminderSent?: boolean | undefined;
|
|
@@ -57,6 +59,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
57
59
|
updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
|
|
58
60
|
updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
|
|
59
61
|
token: string;
|
|
62
|
+
customScore?: number | undefined;
|
|
60
63
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
61
64
|
disabledScore?: boolean | undefined;
|
|
62
65
|
reminderSent?: boolean | undefined;
|
|
@@ -29,7 +29,7 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
29
29
|
var react_1 = require("react");
|
|
30
30
|
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
|
|
31
31
|
var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
32
|
-
var token = props.token, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
32
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
33
33
|
var firstLoad = (0, react_1.useRef)(true);
|
|
34
34
|
var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
35
35
|
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d;
|
|
@@ -73,7 +73,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
73
73
|
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 ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(ScoreReport_1.default, { onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }));
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }));
|
|
77
77
|
}
|
|
78
78
|
}, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
|
|
79
79
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
@@ -29,10 +29,10 @@ var Index = function () {
|
|
|
29
29
|
store.reportResult,
|
|
30
30
|
store.operableButtons,
|
|
31
31
|
]; }), reportResult = _c.reportResult, showAiDimension = _c.showAiDimension, canEditAiDimension = _c.canEditAiDimension, customInterviewDimRankMap = _c.customInterviewDimRankMap;
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, [expand]);
|
|
32
|
+
var expand = (0, react_1.useState)(true)[0];
|
|
33
|
+
// const handleExpandChange = useCallback(() => {
|
|
34
|
+
// setExpand(!expand);
|
|
35
|
+
// }, [expand]);
|
|
36
36
|
if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
|
|
37
37
|
return null;
|
|
38
38
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ id: "report-evaluate", component: mui_1.Paper, variant: "outlined", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [(0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "AI\u57FA\u7840\u80FD\u529B" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", (0, jsx_runtime_1.jsx)("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", (0, jsx_runtime_1.jsx)("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), (0, jsx_runtime_1.jsxs)(mui_1.Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
@@ -40,6 +40,6 @@ var Index = function () {
|
|
|
40
40
|
var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
|
|
41
41
|
var rank = (0, utils_1.rankPercent)((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
|
|
42
42
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, elevation: 0, bgcolor: "#f9f9f9", mb: 2, pb: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2, pt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: v.evaluationDimensionName })), !isNaN(rank) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u51FB\u8D25\u4E86", (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", display: "inline", color: "#4caf50" }, { children: [rank.toFixed(2), "%"] })), "\u7684\u5019\u9009\u4EBA"] })))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, mb: 2, variant: "body2", fontWeight: "medium", color: "#4caf50" }, { children: v.impressions.join('、') }))] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { borderColor: 'rgba(0,0,0,0.08)' } }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2 }, { children: [((_a = v.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(Graph_1.default, { items: v.items }) }))), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(Evaluate_1.default, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.evaluations, title: "\u8BC4\u4EF7\u5185\u5BB9", field: "evaluations", mode: "show" }), (0, jsx_runtime_1.jsx)(Evaluate_1.default, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.suggestions, title: "\u63D0\u9AD8\u5EFA\u8BAE", field: "suggestions", mode: "show" })] }))] }))] }), v.evaluationToken));
|
|
43
|
-
}), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, mt: 4 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", (0, jsx_runtime_1.jsx)("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] }))
|
|
43
|
+
}), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, mt: 4, pb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", (0, jsx_runtime_1.jsx)("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] }))] })));
|
|
44
44
|
};
|
|
45
45
|
exports.default = Index;
|
|
@@ -24,16 +24,20 @@ var dayjs_1 = __importDefault(require("dayjs"));
|
|
|
24
24
|
var fbm_ui_1 = require("fbm-ui");
|
|
25
25
|
var react_1 = require("react");
|
|
26
26
|
var Score = function (_a) {
|
|
27
|
-
var loading = _a.loading, onRefresh = _a.onRefresh;
|
|
27
|
+
var customScore = _a.customScore, loading = _a.loading, onRefresh = _a.onRefresh;
|
|
28
28
|
var _b = (0, react_1.useState)(false), openRankingRange = _b[0], setOpenRankingRange = _b[1];
|
|
29
29
|
var _c = (0, react_1.useState)(false), openRefresh = _c[0], setOpenRefresh = _c[1];
|
|
30
30
|
var _d = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _d.reportResult, operableButtons = _d.operableButtons, onExportReportClick = _d.onExportReportClick;
|
|
31
31
|
var _e = reportResult || {}, score = _e.score, createTime = _e.createTime;
|
|
32
|
+
var _f = (0, react_1.useState)(score || 0), feScore = _f[0], setScore = _f[1];
|
|
32
33
|
(0, react_1.useEffect)(function () {
|
|
34
|
+
if (typeof customScore === 'number' && customScore > -1) {
|
|
35
|
+
setScore(customScore);
|
|
36
|
+
}
|
|
33
37
|
if (!loading)
|
|
34
38
|
setOpenRefresh(false);
|
|
35
|
-
}, [loading]);
|
|
39
|
+
}, [loading, customScore]);
|
|
36
40
|
var content = ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ padding: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.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" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [(0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreTypography, { children: [(0, utils_1.formatScore)(
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [(0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreTypography, { children: [(0, utils_1.formatScore)(feScore || 0), (0, jsx_runtime_1.jsx)(styled_1.ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 50, height: 50 }, { children: !!feScore && feScore >= 80 && (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: (0, jsx_runtime_1.jsx)(styled_1.RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", (0, dayjs_1.default)(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 200 }, { children: (0, jsx_runtime_1.jsx)(Bar_1.default, {}) }))] })));
|
|
38
42
|
};
|
|
39
43
|
exports.default = Score;
|
|
@@ -26,7 +26,7 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
26
26
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
27
27
|
var FAILED = ai_report_1.INTERVIEW_STATUS.FAILED, IN_CALCULATION = ai_report_1.INTERVIEW_STATUS.IN_CALCULATION;
|
|
28
28
|
var ScoreReport = function (_a) {
|
|
29
|
-
var onRefreshSuccess = _a.onRefreshSuccess;
|
|
29
|
+
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess;
|
|
30
30
|
var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.token, store.reportResult]; }), token = _b.token, reportResult = _b.reportResult;
|
|
31
31
|
var _c = (reportResult || {}).status, status = _c === void 0 ? 0 : _c;
|
|
32
32
|
var _d = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewRefresh)(token); }, {
|
|
@@ -40,7 +40,7 @@ var ScoreReport = function (_a) {
|
|
|
40
40
|
return ((0, jsx_runtime_1.jsx)(mui_1.Paper, __assign({ id: "report-score", variant: "outlined" }, { children: (0, jsx_runtime_1.jsx)(Failed_1.default, { status: status, loading: loading, onRefresh: run }) })));
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(Score_1.default, { loading: loading, onRefresh: run }), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (0, jsx_runtime_1.jsx)(Report_1.default, {})] })));
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(Score_1.default, { customScore: customScore, loading: loading, onRefresh: run }), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (0, jsx_runtime_1.jsx)(Report_1.default, {})] })));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
exports.default = ScoreReport;
|
|
@@ -2,9 +2,11 @@ export interface ScoreLegendProps {
|
|
|
2
2
|
color: string;
|
|
3
3
|
}
|
|
4
4
|
export interface ScoreReportProps {
|
|
5
|
+
customScore?: number;
|
|
5
6
|
onRefreshSuccess: () => void;
|
|
6
7
|
}
|
|
7
8
|
export interface ScoreProps {
|
|
9
|
+
customScore?: number;
|
|
8
10
|
loading?: boolean;
|
|
9
11
|
onRefresh: () => void;
|
|
10
12
|
}
|
|
@@ -46,7 +46,7 @@ export declare const StyledSlider: import("@emotion/styled").StyledComponent<{
|
|
|
46
46
|
name?: string | undefined;
|
|
47
47
|
onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
|
|
48
48
|
onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
|
|
49
|
-
orientation?: "
|
|
49
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
50
50
|
scale?: ((value: number) => number) | undefined;
|
|
51
51
|
step?: number | null | undefined;
|
|
52
52
|
tabIndex?: number | undefined;
|
|
@@ -46,7 +46,7 @@ export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComp
|
|
|
46
46
|
name?: string | undefined;
|
|
47
47
|
onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
|
|
48
48
|
onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
|
|
49
|
-
orientation?: "
|
|
49
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
50
50
|
scale?: ((value: number) => number) | undefined;
|
|
51
51
|
step?: number | null | undefined;
|
|
52
52
|
tabIndex?: number | undefined;
|
|
@@ -150,6 +150,7 @@ export interface CustomInterviewDimRank {
|
|
|
150
150
|
export declare type CustomInterviewDimRankMap = Record<string, CustomInterviewDimRank>;
|
|
151
151
|
export interface AiReportProps {
|
|
152
152
|
token: string;
|
|
153
|
+
customScore?: number;
|
|
153
154
|
scoreRankIntervals?: ScoreRankInterval[];
|
|
154
155
|
disabledScore?: boolean;
|
|
155
156
|
reminderSent?: boolean;
|
|
@@ -3,6 +3,7 @@ import { AiReportProps, AiReportRef } from './interface';
|
|
|
3
3
|
export declare const useAiReport: (props: AiReportProps) => {
|
|
4
4
|
handleRefresh?: (() => void) | undefined;
|
|
5
5
|
token: string;
|
|
6
|
+
customScore?: number | undefined;
|
|
6
7
|
scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
7
8
|
disabledScore?: boolean | undefined;
|
|
8
9
|
reminderSent?: boolean | undefined;
|
|
@@ -15,6 +15,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
15
15
|
var fbm_ui_1 = require("fbm-ui");
|
|
16
16
|
var TemplateHeader = function (_a) {
|
|
17
17
|
var name = _a.name, onClose = _a.onClose, onSearch = _a.onSearch, onBack = _a.onBack;
|
|
18
|
-
return name ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onBack }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.KeyboardArrowLeftIcon, {}) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500"
|
|
18
|
+
return name ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pr: 1, pt: 1, pb: 1.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onBack }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.KeyboardArrowLeftIcon, {}) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500" }, { children: name }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))] }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500", ml: 3 }, { children: ["\u5C97\u4F4D\u6A21\u7248\u5E93", (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\uFF08\u6A21\u7248\u5E93\u53EF\u591A\u6B21\u4F7F\u7528\uFF09" }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))] })));
|
|
19
19
|
};
|
|
20
20
|
exports.default = TemplateHeader;
|
|
@@ -5,6 +5,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
5
5
|
updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
|
|
6
6
|
updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
|
|
7
7
|
token: string;
|
|
8
|
+
customScore?: number | undefined;
|
|
8
9
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
9
10
|
disabledScore?: boolean | undefined;
|
|
10
11
|
reminderSent?: boolean | undefined;
|
|
@@ -31,6 +32,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
31
32
|
updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
|
|
32
33
|
updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
|
|
33
34
|
token: string;
|
|
35
|
+
customScore?: number | undefined;
|
|
34
36
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
35
37
|
disabledScore?: boolean | undefined;
|
|
36
38
|
reminderSent?: boolean | undefined;
|
|
@@ -57,6 +59,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
57
59
|
updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
|
|
58
60
|
updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
|
|
59
61
|
token: string;
|
|
62
|
+
customScore?: number | undefined;
|
|
60
63
|
scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
|
|
61
64
|
disabledScore?: boolean | undefined;
|
|
62
65
|
reminderSent?: boolean | undefined;
|