eli-video-interview 1.2.41-alpha.14 → 1.2.41-alpha.16
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/enum/ai-report.d.ts +12 -0
- package/esm/enum/ai-report.js +12 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +3 -3
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Failed.js +8 -4
- package/esm/modules/ai-report/components/ScoreReport/Score.js +3 -14
- package/esm/modules/ai-report/components/ScoreReport/index.js +1 -2
- package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +1 -0
- package/lib/enum/ai-report.d.ts +12 -0
- package/lib/enum/ai-report.js +13 -1
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +3 -3
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Failed.js +9 -5
- package/lib/modules/ai-report/components/ScoreReport/Score.js +6 -17
- package/lib/modules/ai-report/components/ScoreReport/index.js +1 -2
- package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +1 -0
- package/package.json +1 -1
package/esm/enum/ai-report.d.ts
CHANGED
|
@@ -25,3 +25,15 @@ export declare enum COMPLETED_STATUS {
|
|
|
25
25
|
NOT_COMPLETED = 2,
|
|
26
26
|
COMPLETED = 3
|
|
27
27
|
}
|
|
28
|
+
export declare const BackgroundImage: {
|
|
29
|
+
pro: string;
|
|
30
|
+
standard: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const Colors: {
|
|
33
|
+
pro: string;
|
|
34
|
+
standard: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const SwitchTitle: {
|
|
37
|
+
standard: string;
|
|
38
|
+
pro: string;
|
|
39
|
+
};
|
package/esm/enum/ai-report.js
CHANGED
|
@@ -28,3 +28,15 @@ export var COMPLETED_STATUS;
|
|
|
28
28
|
COMPLETED_STATUS[COMPLETED_STATUS["NOT_COMPLETED"] = 2] = "NOT_COMPLETED";
|
|
29
29
|
COMPLETED_STATUS[COMPLETED_STATUS["COMPLETED"] = 3] = "COMPLETED";
|
|
30
30
|
})(COMPLETED_STATUS || (COMPLETED_STATUS = {}));
|
|
31
|
+
export var BackgroundImage = {
|
|
32
|
+
pro: 'https://webcdn.fbmms.cn/assets/DPXE/Oj-k12zdt9HuOrcEECDsm',
|
|
33
|
+
standard: 'https://webcdn.fbmms.cn/assets/S3uM/nAU25qJa6bVmZVHpcb11G',
|
|
34
|
+
};
|
|
35
|
+
export var Colors = {
|
|
36
|
+
pro: '#86350F',
|
|
37
|
+
standard: '#4caf50',
|
|
38
|
+
};
|
|
39
|
+
export var SwitchTitle = {
|
|
40
|
+
standard: '升级为高级版',
|
|
41
|
+
pro: '切换为标准版',
|
|
42
|
+
};
|
|
@@ -148,9 +148,9 @@ var AbilityFormItem = function (_a) {
|
|
|
148
148
|
}
|
|
149
149
|
}, [item]);
|
|
150
150
|
return (_jsxs(Stack, { children: [_jsxs(Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && (_jsx(Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: _jsx(RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && (_jsx(Box, __assign({ width: 1 }, { children: _jsx(FieldArray, __assign({ name: "workPlaceItems[".concat(index, "].items") }, { children: function (_a) {
|
|
151
|
-
var _b;
|
|
152
|
-
var
|
|
153
|
-
return (_jsxs(Stack, __assign({ mb: 5 }, { children: [(_b = item === null || item === void 0 ? void 0 : item.items) === null || _b === void 0 ? void 0 : _b.map(function (
|
|
151
|
+
var _b, _c;
|
|
152
|
+
var pushItem = _a.push, removeItem = _a.remove;
|
|
153
|
+
return (_jsxs(Stack, __assign({ mb: 5 }, { children: [(_b = item === null || item === void 0 ? void 0 : item.items) === null || _b === void 0 ? void 0 : _b.map(function (_, itemIndex) { return (_jsx(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [4, 5].includes(item === null || item === void 0 ? void 0 : item.type) ? (_jsxs(_Fragment, { children: [_jsx(FormItem, { name: "workPlaceItems[".concat(index, "].items[").concat(itemIndex, "]"), sx: { width: 512 }, max: maxTextLength }), _jsx(IconButton, __assign({ onClick: function () { return removeItem(itemIndex); }, sx: { alignSelf: 'flex-start', mt: 0.5 } }, { children: _jsx(CloseIcon, {}) }))] })) : (_jsx(FormItem, { multiline: true, rows: 3, max: maxTextLength, name: "workPlaceItems[".concat(index, "].items[").concat(itemIndex, "]"), sx: { width: '100%' } })) }), itemIndex)); }), [4, 5].includes(item === null || item === void 0 ? void 0 : item.type) && (_jsx(Button, __assign({ sx: { alignSelf: 'flex-start', display: "".concat(item.type === 5 && ((_c = item === null || item === void 0 ? void 0 : item.items) === null || _c === void 0 ? void 0 : _c.length) >= 3 ? 'none' : 'flex') }, startIcon: _jsx(AddIcon, {}), type: "button", onClick: function () { return pushItem(''); }, variant: "outlined", color: "inherit" }, { children: { 5: '评分关键点', 4: '面试题目' }[item.type] })))] })));
|
|
154
154
|
} })) }))), internalMode === 'show' && (_jsx(Box, __assign({ style: { marginTop: '-8px', marginBottom: '32px' } }, { children: _jsx(Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
|
|
155
155
|
};
|
|
156
156
|
export default AbilityFormItem;
|
|
@@ -60,7 +60,7 @@ var Bar = function (_a) {
|
|
|
60
60
|
width: "".concat((endRankProportion - startRankProportion) * 100, "%"),
|
|
61
61
|
height: currentRank === rank ? 'calc(100% + 4px)' : '100%',
|
|
62
62
|
background: (_b = scoreRankIntervalModeColors === null || scoreRankIntervalModeColors === void 0 ? void 0 : scoreRankIntervalModeColors[model]) === null || _b === void 0 ? void 0 : _b[index],
|
|
63
|
-
border: '
|
|
63
|
+
border: '2px solid rgb(255, 255, 255)',
|
|
64
64
|
} }, rank),
|
|
65
65
|
];
|
|
66
66
|
}) }))] }));
|
|
@@ -10,13 +10,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
13
|
+
import { BackgroundImage } from "../../../../enum/ai-report";
|
|
14
14
|
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
15
|
+
import { Box, Button, CancelIcon, RefreshIcon, Typography } from 'fbm-ui';
|
|
15
16
|
var FAILED = INTERVIEW_STATUS.FAILED;
|
|
16
17
|
var Failed = function (_a) {
|
|
17
|
-
var loading = _a.loading, status = _a.status, onRefresh = _a.onRefresh;
|
|
18
|
-
return (_jsxs(Box, __assign({ loading: loading, display: "flex", alignItems: "center", padding: "32px 24px"
|
|
19
|
-
|
|
18
|
+
var loading = _a.loading, status = _a.status, onRefresh = _a.onRefresh, _b = _a.model, model = _b === void 0 ? 'standard' : _b;
|
|
19
|
+
return (_jsxs(Box, __assign({ loading: loading, display: "flex", alignItems: "center", padding: "32px 24px", sx: {
|
|
20
|
+
px: 3,
|
|
21
|
+
height: 280,
|
|
22
|
+
background: "url('".concat(BackgroundImage[model], "') no-repeat center center / contain"),
|
|
23
|
+
} }, { children: [status === FAILED && (_jsx(CancelIcon, { style: {
|
|
20
24
|
color: '#ff6c6c',
|
|
21
25
|
width: '24px',
|
|
22
26
|
height: '24px',
|
|
@@ -31,6 +31,7 @@ import Bar from './Bar';
|
|
|
31
31
|
import RecommendIcon from './RecommendIcon';
|
|
32
32
|
import { RefreshIconRoot, ScoreTypography, ScoreUnitTypography } from './styled';
|
|
33
33
|
import Tips from './Tips';
|
|
34
|
+
import { BackgroundImage, Colors, SwitchTitle } from "../../../../enum/ai-report";
|
|
34
35
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
35
36
|
import { formatScore } from "../../../../utils/utils";
|
|
36
37
|
import dayjs from 'dayjs';
|
|
@@ -38,18 +39,6 @@ import { SwitchIcon } from 'fbm-icons';
|
|
|
38
39
|
import { Box, Button, DownloadIcon, InfoOutlineIcon, Popover, Typography } from 'fbm-ui';
|
|
39
40
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
40
41
|
import { useEffect, useState } from 'react';
|
|
41
|
-
var BackgroundImage = {
|
|
42
|
-
pro: 'https://webcdn.fbmms.cn/assets/DPXE/Oj-k12zdt9HuOrcEECDsm',
|
|
43
|
-
standard: 'https://webcdn.fbmms.cn/assets/S3uM/nAU25qJa6bVmZVHpcb11G',
|
|
44
|
-
};
|
|
45
|
-
var Colors = {
|
|
46
|
-
pro: '#86350F',
|
|
47
|
-
standard: '#4caf50',
|
|
48
|
-
};
|
|
49
|
-
var SwitchTitle = {
|
|
50
|
-
standard: '升级为高级版',
|
|
51
|
-
pro: '切换为标准版',
|
|
52
|
-
};
|
|
53
42
|
var Score = function (_a) {
|
|
54
43
|
var customScore = _a.customScore, loading = _a.loading, onRefresh = _a.onRefresh, onSwitchReportModel = _a.onSwitchReportModel, _b = _a.model, model = _b === void 0 ? 'standard' : _b;
|
|
55
44
|
var _c = __read(useState(false), 2), openRankingRange = _c[0], setOpenRankingRange = _c[1];
|
|
@@ -85,13 +74,13 @@ var Score = function (_a) {
|
|
|
85
74
|
'&:hover': {
|
|
86
75
|
borderColor: 'inherit',
|
|
87
76
|
},
|
|
88
|
-
}, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })), _jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(SwitchIcon, {}), sx: {
|
|
77
|
+
}, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })), _jsx(Button, __assign({ variant: "outlined", size: "small", loading: loading, icon: _jsx(SwitchIcon, {}), sx: {
|
|
89
78
|
ml: 1,
|
|
90
79
|
color: 'inherit',
|
|
91
80
|
borderColor: 'inherit',
|
|
92
81
|
'&:hover': {
|
|
93
82
|
borderColor: 'inherit',
|
|
94
83
|
},
|
|
95
|
-
}, onClick: onSwitchReportModel }, { children: SwitchTitle[model] })), _jsx(Popover, __assign({ arrow: false, content: Tips }, { children: _jsx(InfoOutlineIcon, { htmlColor: "inherit", sx: { cursor: 'pointer' } }) }))] })) })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", height: 80, color: Colors[model] }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsx(ScoreTypography, __assign({ color: "inherit" }, { children: formatScore(feScore || 0) })), _jsx(ScoreUnitTypography, __assign({ color: "inherit", sx: { alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), _jsx(Box, __assign({ width: 200, ml: 5, color: Colors[model] }, { children: _jsx(Bar, { model: model }) }))] })), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", color: Colors[model] }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1, sx: { alignSelf: 'flex-start' } }, { 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, { htmlColor: "inherit", onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "inherit", 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(Typography, __assign({ color: "inherit", sx: { textDecoration: 'underline', cursor: 'pointer', ml: 1.5 }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] })), _jsx(Box, __assign({ width: 120, height: 120, sx: { marginTop: -3 } }, { children: !!feScore && feScore >= 80 && _jsx(RecommendIcon, { size: 120, sx: { width: 120, height: 120 }, htmlColor: Colors[model] }) }))] }))] })));
|
|
84
|
+
}, onClick: onSwitchReportModel }, { children: SwitchTitle[model] })), _jsx(Popover, __assign({ arrow: false, content: Tips, trigger: "hover" }, { children: _jsx(InfoOutlineIcon, { htmlColor: "inherit", sx: { cursor: 'pointer' } }) }))] })) })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", height: 80, color: Colors[model] }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsx(ScoreTypography, __assign({ color: "inherit" }, { children: formatScore(feScore || 0) })), _jsx(ScoreUnitTypography, __assign({ color: "inherit", sx: { alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), _jsx(Box, __assign({ width: 200, ml: 5, color: Colors[model] }, { children: _jsx(Bar, { model: model }) }))] })), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", color: Colors[model] }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1, sx: { alignSelf: 'flex-start' } }, { 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, { htmlColor: "inherit", onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "inherit", 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(Typography, __assign({ color: "inherit", sx: { textDecoration: 'underline', cursor: 'pointer', ml: 1.5 }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] })), _jsx(Box, __assign({ width: 120, height: 120, sx: { marginTop: -3 } }, { children: !!feScore && feScore >= 80 && _jsx(RecommendIcon, { size: 120, sx: { width: 120, height: 120 }, htmlColor: Colors[model] }) }))] }))] })));
|
|
96
85
|
};
|
|
97
86
|
export default Score;
|
|
@@ -17,7 +17,6 @@ import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
|
17
17
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
18
18
|
import { useRequest } from 'ahooks';
|
|
19
19
|
import { Box, Message } from 'fbm-ui';
|
|
20
|
-
import { Paper } from 'fbm-ui/lib/mui';
|
|
21
20
|
var FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
|
|
22
21
|
var ScoreReport = function (_a) {
|
|
23
22
|
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, onSwitchReportModel = _a.onSwitchReportModel;
|
|
@@ -31,7 +30,7 @@ var ScoreReport = function (_a) {
|
|
|
31
30
|
},
|
|
32
31
|
}), run = _e.run, loading = _e.loading;
|
|
33
32
|
if ([FAILED, IN_CALCULATION].includes(status)) {
|
|
34
|
-
return (_jsx(
|
|
33
|
+
return (_jsx(Box, __assign({ id: "report-score" }, { children: _jsx(Failed, { status: status, loading: loading, onRefresh: run }) })));
|
|
35
34
|
}
|
|
36
35
|
else {
|
|
37
36
|
return (_jsx(Box, { children: _jsx(Score, { model: model, customScore: customScore, loading: loading, onRefresh: run, onSwitchReportModel: onSwitchReportModel }) }));
|
package/lib/enum/ai-report.d.ts
CHANGED
|
@@ -25,3 +25,15 @@ export declare enum COMPLETED_STATUS {
|
|
|
25
25
|
NOT_COMPLETED = 2,
|
|
26
26
|
COMPLETED = 3
|
|
27
27
|
}
|
|
28
|
+
export declare const BackgroundImage: {
|
|
29
|
+
pro: string;
|
|
30
|
+
standard: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const Colors: {
|
|
33
|
+
pro: string;
|
|
34
|
+
standard: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const SwitchTitle: {
|
|
37
|
+
standard: string;
|
|
38
|
+
pro: string;
|
|
39
|
+
};
|
package/lib/enum/ai-report.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COMPLETED_STATUS = exports.INTERVIEW_STEP_STATUS = exports.INTERVIEW_STATUS = void 0;
|
|
3
|
+
exports.SwitchTitle = exports.Colors = exports.BackgroundImage = exports.COMPLETED_STATUS = exports.INTERVIEW_STEP_STATUS = exports.INTERVIEW_STATUS = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* AI面试状态(本场面试的状态)
|
|
6
6
|
*/
|
|
@@ -31,3 +31,15 @@ var COMPLETED_STATUS;
|
|
|
31
31
|
COMPLETED_STATUS[COMPLETED_STATUS["NOT_COMPLETED"] = 2] = "NOT_COMPLETED";
|
|
32
32
|
COMPLETED_STATUS[COMPLETED_STATUS["COMPLETED"] = 3] = "COMPLETED";
|
|
33
33
|
})(COMPLETED_STATUS = exports.COMPLETED_STATUS || (exports.COMPLETED_STATUS = {}));
|
|
34
|
+
exports.BackgroundImage = {
|
|
35
|
+
pro: 'https://webcdn.fbmms.cn/assets/DPXE/Oj-k12zdt9HuOrcEECDsm',
|
|
36
|
+
standard: 'https://webcdn.fbmms.cn/assets/S3uM/nAU25qJa6bVmZVHpcb11G',
|
|
37
|
+
};
|
|
38
|
+
exports.Colors = {
|
|
39
|
+
pro: '#86350F',
|
|
40
|
+
standard: '#4caf50',
|
|
41
|
+
};
|
|
42
|
+
exports.SwitchTitle = {
|
|
43
|
+
standard: '升级为高级版',
|
|
44
|
+
pro: '切换为标准版',
|
|
45
|
+
};
|
|
@@ -150,9 +150,9 @@ var AbilityFormItem = function (_a) {
|
|
|
150
150
|
}
|
|
151
151
|
}, [item]);
|
|
152
152
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ width: 1 }, { children: (0, jsx_runtime_1.jsx)(formik_1.FieldArray, __assign({ name: "workPlaceItems[".concat(index, "].items") }, { children: function (_a) {
|
|
153
|
-
var _b;
|
|
154
|
-
var
|
|
155
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mb: 5 }, { children: [(_b = item === null || item === void 0 ? void 0 : item.items) === null || _b === void 0 ? void 0 : _b.map(function (
|
|
153
|
+
var _b, _c;
|
|
154
|
+
var pushItem = _a.push, removeItem = _a.remove;
|
|
155
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mb: 5 }, { children: [(_b = item === null || item === void 0 ? void 0 : item.items) === null || _b === void 0 ? void 0 : _b.map(function (_, itemIndex) { return ((0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [4, 5].includes(item === null || item === void 0 ? void 0 : item.type) ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { name: "workPlaceItems[".concat(index, "].items[").concat(itemIndex, "]"), sx: { width: 512 }, max: maxTextLength }), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: function () { return removeItem(itemIndex); }, sx: { alignSelf: 'flex-start', mt: 0.5 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))] })) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { multiline: true, rows: 3, max: maxTextLength, name: "workPlaceItems[".concat(index, "].items[").concat(itemIndex, "]"), sx: { width: '100%' } })) }), itemIndex)); }), [4, 5].includes(item === null || item === void 0 ? void 0 : item.type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ sx: { alignSelf: 'flex-start', display: "".concat(item.type === 5 && ((_c = item === null || item === void 0 ? void 0 : item.items) === null || _c === void 0 ? void 0 : _c.length) >= 3 ? 'none' : 'flex') }, startIcon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), type: "button", onClick: function () { return pushItem(''); }, variant: "outlined", color: "inherit" }, { children: { 5: '评分关键点', 4: '面试题目' }[item.type] })))] })));
|
|
156
156
|
} })) }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ style: { marginTop: '-8px', marginBottom: '32px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
|
|
157
157
|
};
|
|
158
158
|
exports.default = AbilityFormItem;
|
|
@@ -62,7 +62,7 @@ var Bar = function (_a) {
|
|
|
62
62
|
width: "".concat((endRankProportion - startRankProportion) * 100, "%"),
|
|
63
63
|
height: currentRank === rank ? 'calc(100% + 4px)' : '100%',
|
|
64
64
|
background: (_b = ai_report_1.scoreRankIntervalModeColors === null || ai_report_1.scoreRankIntervalModeColors === void 0 ? void 0 : ai_report_1.scoreRankIntervalModeColors[model]) === null || _b === void 0 ? void 0 : _b[index],
|
|
65
|
-
border: '
|
|
65
|
+
border: '2px solid rgb(255, 255, 255)',
|
|
66
66
|
} }, rank),
|
|
67
67
|
];
|
|
68
68
|
}) }))] }));
|
|
@@ -12,13 +12,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
-
var fbm_ui_1 = require("fbm-ui");
|
|
16
15
|
var ai_report_1 = require("../../../../enum/ai-report");
|
|
17
|
-
var
|
|
16
|
+
var ai_report_2 = require("../../../../enum/ai-report");
|
|
17
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
18
|
+
var FAILED = ai_report_2.INTERVIEW_STATUS.FAILED;
|
|
18
19
|
var Failed = function (_a) {
|
|
19
|
-
var loading = _a.loading, status = _a.status, onRefresh = _a.onRefresh;
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ loading: loading, display: "flex", alignItems: "center", padding: "32px 24px"
|
|
21
|
-
|
|
20
|
+
var loading = _a.loading, status = _a.status, onRefresh = _a.onRefresh, _b = _a.model, model = _b === void 0 ? 'standard' : _b;
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ loading: loading, display: "flex", alignItems: "center", padding: "32px 24px", sx: {
|
|
22
|
+
px: 3,
|
|
23
|
+
height: 280,
|
|
24
|
+
background: "url('".concat(ai_report_1.BackgroundImage[model], "') no-repeat center center / contain"),
|
|
25
|
+
} }, { children: [status === FAILED && ((0, jsx_runtime_1.jsx)(fbm_ui_1.CancelIcon, { style: {
|
|
22
26
|
color: '#ff6c6c',
|
|
23
27
|
width: '24px',
|
|
24
28
|
height: '24px',
|
|
@@ -36,6 +36,7 @@ var Bar_1 = __importDefault(require("./Bar"));
|
|
|
36
36
|
var RecommendIcon_1 = __importDefault(require("./RecommendIcon"));
|
|
37
37
|
var styled_1 = require("./styled");
|
|
38
38
|
var Tips_1 = __importDefault(require("./Tips"));
|
|
39
|
+
var ai_report_1 = require("../../../../enum/ai-report");
|
|
39
40
|
var global_store_1 = require("../../../../store/ai-report/global-store");
|
|
40
41
|
var utils_1 = require("../../../../utils/utils");
|
|
41
42
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
@@ -43,18 +44,6 @@ var fbm_icons_1 = require("fbm-icons");
|
|
|
43
44
|
var fbm_ui_1 = require("fbm-ui");
|
|
44
45
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
45
46
|
var react_1 = require("react");
|
|
46
|
-
var BackgroundImage = {
|
|
47
|
-
pro: 'https://webcdn.fbmms.cn/assets/DPXE/Oj-k12zdt9HuOrcEECDsm',
|
|
48
|
-
standard: 'https://webcdn.fbmms.cn/assets/S3uM/nAU25qJa6bVmZVHpcb11G',
|
|
49
|
-
};
|
|
50
|
-
var Colors = {
|
|
51
|
-
pro: '#86350F',
|
|
52
|
-
standard: '#4caf50',
|
|
53
|
-
};
|
|
54
|
-
var SwitchTitle = {
|
|
55
|
-
standard: '升级为高级版',
|
|
56
|
-
pro: '切换为标准版',
|
|
57
|
-
};
|
|
58
47
|
var Score = function (_a) {
|
|
59
48
|
var customScore = _a.customScore, loading = _a.loading, onRefresh = _a.onRefresh, onSwitchReportModel = _a.onSwitchReportModel, _b = _a.model, model = _b === void 0 ? 'standard' : _b;
|
|
60
49
|
var _c = __read((0, react_1.useState)(false), 2), openRankingRange = _c[0], setOpenRankingRange = _c[1];
|
|
@@ -76,27 +65,27 @@ var Score = function (_a) {
|
|
|
76
65
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ display: "flex", sx: {
|
|
77
66
|
px: 3,
|
|
78
67
|
height: 280,
|
|
79
|
-
background: "url('".concat(BackgroundImage[model], "') no-repeat center center / contain"),
|
|
68
|
+
background: "url('".concat(ai_report_1.BackgroundImage[model], "') no-repeat center center / contain"),
|
|
80
69
|
} }, { children: [model === 'pro' && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "center", width: 92, height: 30, sx: {
|
|
81
70
|
position: 'absolute',
|
|
82
71
|
top: 0,
|
|
83
72
|
left: 0,
|
|
84
|
-
backgroundColor: Colors[model],
|
|
73
|
+
backgroundColor: ai_report_1.Colors[model],
|
|
85
74
|
borderBottomRightRadius: 16,
|
|
86
|
-
} }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", color: "white" }, { children: "\u9AD8\u7CBE\u51C6\u5EA6" })) }))), (0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", py: 2, justifyContent: "flex-end", spacing: 1, alignContent: "center", color: Colors[model] }, { children: (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(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: {
|
|
75
|
+
} }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", color: "white" }, { children: "\u9AD8\u7CBE\u51C6\u5EA6" })) }))), (0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", py: 2, justifyContent: "flex-end", spacing: 1, alignContent: "center", color: ai_report_1.Colors[model] }, { children: (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(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: {
|
|
87
76
|
ml: 1,
|
|
88
77
|
color: 'inherit',
|
|
89
78
|
borderColor: 'inherit',
|
|
90
79
|
'&:hover': {
|
|
91
80
|
borderColor: 'inherit',
|
|
92
81
|
},
|
|
93
|
-
}, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_icons_1.SwitchIcon, {}), sx: {
|
|
82
|
+
}, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", size: "small", loading: loading, icon: (0, jsx_runtime_1.jsx)(fbm_icons_1.SwitchIcon, {}), sx: {
|
|
94
83
|
ml: 1,
|
|
95
84
|
color: 'inherit',
|
|
96
85
|
borderColor: 'inherit',
|
|
97
86
|
'&:hover': {
|
|
98
87
|
borderColor: 'inherit',
|
|
99
88
|
},
|
|
100
|
-
}, onClick: onSwitchReportModel }, { children: SwitchTitle[model] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ arrow: false, content: Tips_1.default }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { htmlColor: "inherit", sx: { cursor: 'pointer' } }) }))] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", height: 80, color: Colors[model] }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.ScoreTypography, __assign({ color: "inherit" }, { children: (0, utils_1.formatScore)(feScore || 0) })), (0, jsx_runtime_1.jsx)(styled_1.ScoreUnitTypography, __assign({ color: "inherit", sx: { alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 200, ml: 5, color: Colors[model] }, { children: (0, jsx_runtime_1.jsx)(Bar_1.default, { model: model }) }))] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", color: Colors[model] }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", mt: 1, sx: { alignSelf: 'flex-start' } }, { 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, { htmlColor: "inherit", onClick: function () { return setOpenRefresh(true); } }) }))), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "inherit", 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.Typography, __assign({ color: "inherit", sx: { textDecoration: 'underline', cursor: 'pointer', ml: 1.5 }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 120, height: 120, sx: { marginTop: -3 } }, { children: !!feScore && feScore >= 80 && (0, jsx_runtime_1.jsx)(RecommendIcon_1.default, { size: 120, sx: { width: 120, height: 120 }, htmlColor: Colors[model] }) }))] }))] })));
|
|
89
|
+
}, onClick: onSwitchReportModel }, { children: ai_report_1.SwitchTitle[model] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ arrow: false, content: Tips_1.default, trigger: "hover" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { htmlColor: "inherit", sx: { cursor: 'pointer' } }) }))] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", height: 80, color: ai_report_1.Colors[model] }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.ScoreTypography, __assign({ color: "inherit" }, { children: (0, utils_1.formatScore)(feScore || 0) })), (0, jsx_runtime_1.jsx)(styled_1.ScoreUnitTypography, __assign({ color: "inherit", sx: { alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 200, ml: 5, color: ai_report_1.Colors[model] }, { children: (0, jsx_runtime_1.jsx)(Bar_1.default, { model: model }) }))] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", color: ai_report_1.Colors[model] }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", mt: 1, sx: { alignSelf: 'flex-start' } }, { 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, { htmlColor: "inherit", onClick: function () { return setOpenRefresh(true); } }) }))), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "inherit", 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.Typography, __assign({ color: "inherit", sx: { textDecoration: 'underline', cursor: 'pointer', ml: 1.5 }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 120, height: 120, sx: { marginTop: -3 } }, { children: !!feScore && feScore >= 80 && (0, jsx_runtime_1.jsx)(RecommendIcon_1.default, { size: 120, sx: { width: 120, height: 120 }, htmlColor: ai_report_1.Colors[model] }) }))] }))] })));
|
|
101
90
|
};
|
|
102
91
|
exports.default = Score;
|
|
@@ -22,7 +22,6 @@ var ai_report_2 = require("../../../../services/ai-report");
|
|
|
22
22
|
var global_store_1 = require("../../../../store/ai-report/global-store");
|
|
23
23
|
var ahooks_1 = require("ahooks");
|
|
24
24
|
var fbm_ui_1 = require("fbm-ui");
|
|
25
|
-
var mui_1 = require("fbm-ui/lib/mui");
|
|
26
25
|
var FAILED = ai_report_1.INTERVIEW_STATUS.FAILED, IN_CALCULATION = ai_report_1.INTERVIEW_STATUS.IN_CALCULATION;
|
|
27
26
|
var ScoreReport = function (_a) {
|
|
28
27
|
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, onSwitchReportModel = _a.onSwitchReportModel;
|
|
@@ -36,7 +35,7 @@ var ScoreReport = function (_a) {
|
|
|
36
35
|
},
|
|
37
36
|
}), run = _e.run, loading = _e.loading;
|
|
38
37
|
if ([FAILED, IN_CALCULATION].includes(status)) {
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ id: "report-score" }, { children: (0, jsx_runtime_1.jsx)(Failed_1.default, { status: status, loading: loading, onRefresh: run }) })));
|
|
40
39
|
}
|
|
41
40
|
else {
|
|
42
41
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)(Score_1.default, { model: model, customScore: customScore, loading: loading, onRefresh: run, onSwitchReportModel: onSwitchReportModel }) }));
|