eli-video-interview 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,8 +11,8 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { PostAiInterviewEvaluation } from "../../../../services/ai-report";
14
- import { Button, EditIcon, IconButton, Typography, confirm } from 'fbm-ui';
15
- import { Box, Stack, TextField } from 'fbm-ui/lib/mui';
14
+ import { Button, EditIcon, IconButton, Typography, confirm, FormItem } from 'fbm-ui';
15
+ import { Box, Stack } from 'fbm-ui/lib/mui';
16
16
  import { useCallback, useEffect, useState } from 'react';
17
17
  var Evaluate = function (_a) {
18
18
  var title = _a.title, evaluations = _a.evaluations, token = _a.token, field = _a.field, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'true' : _c;
@@ -52,6 +52,9 @@ var Evaluate = function (_a) {
52
52
  useEffect(function () {
53
53
  setInternalMode(mode);
54
54
  }, [mode]);
55
- return (_jsxs(Stack, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canEdit && (_jsx(IconButton, __assign({ onClick: handleModeChange }, { children: _jsx(EditIcon, {}) })))] })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, position: "relative" }, { children: [_jsx(TextField, { fullWidth: true, value: content, onChange: handleChange, rows: 3.5, multiline: true }), _jsxs(Stack, __assign({ p: 1, spacing: 1, direction: "row", position: "absolute", bottom: 0, right: 0 }, { children: [_jsx(Button, __assign({ size: "small", color: "inherit", onClick: handleModeChange }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "small", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] }));
55
+ return (_jsxs(Stack, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canEdit && (_jsx(IconButton, __assign({ onClick: handleModeChange }, { children: _jsx(EditIcon, {}) })))] })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto' }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
56
+ handleModeChange();
57
+ setContent(evaluations === null || evaluations === void 0 ? void 0 : evaluations.join('\n'));
58
+ } }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] }));
56
59
  };
57
60
  export default Evaluate;
@@ -52,7 +52,7 @@ var drawTop = function (layout, ctx) {
52
52
  ctx.fillText('0', layout.leftLableWidth, 10);
53
53
  ctx.strokeStyle = '#ccc';
54
54
  var offset = 0;
55
- levelOrder.forEach(function (x) {
55
+ levelOrder.forEach(function (x, i) {
56
56
  var c = levelConf[x];
57
57
  var labelWidth = measureTextWidth(ctx, c.label);
58
58
  var endScoreWidth = measureTextWidth(ctx, c.endScore);
@@ -63,7 +63,7 @@ var drawTop = function (layout, ctx) {
63
63
  ctx.moveTo(layout.leftLableWidth + offset + c.width / 2 + labelWidth / 2 + 5, 6);
64
64
  ctx.lineTo(layout.leftLableWidth + offset + c.width - endScoreWidth - 5, 6);
65
65
  ctx.fillStyle = '#ccc';
66
- ctx.fillText(c.endScore, layout.leftLableWidth + offset + c.width - endScoreWidth, 10);
66
+ ctx.fillText(c.endScore, layout.leftLableWidth + offset + c.width - endScoreWidth + (i === 0 ? 0 : 5), 10);
67
67
  ctx.stroke();
68
68
  offset += c.width;
69
69
  });
@@ -84,7 +84,7 @@ var drowBackground = function (layout, ctx) {
84
84
  };
85
85
  var percent = function (_a) {
86
86
  var rank = _a.rank, total = _a.total;
87
- return Math.min(0.975, parseFloat((1 - (rank - 1) / total).toFixed(2)));
87
+ return Math.min(0.975, parseFloat((1 - rank / total).toFixed(2)));
88
88
  };
89
89
  var getPointColor = function (s) {
90
90
  var conf = Object.entries(levelConf);
@@ -149,7 +149,7 @@ var draw = function (layout, color, dimensions, pathRef, ctx) {
149
149
  drawLine(layout.leftLableWidth, endPointX, endPointY, ctx);
150
150
  var _a = getPointColor(p), fill = _a[0], stroke = _a[1];
151
151
  drawPoint(fill, stroke, endPointX, endPointY, ctx);
152
- pathRef.push({ x: endPointX, y: endPointY, tips: "".concat(v === null || v === void 0 ? void 0 : v.name, "\u5F97\u5206:").concat(v === null || v === void 0 ? void 0 : v.score, "\u5206") });
152
+ pathRef.push({ x: endPointX, y: endPointY, tips: "".concat(v === null || v === void 0 ? void 0 : v.name, "\u5F97\u5206:").concat(v === null || v === void 0 ? void 0 : v.score.toFixed(2), "\u5206") });
153
153
  });
154
154
  };
155
155
  var Graph = function (_a) {
@@ -26,10 +26,10 @@ var Index = function () {
26
26
  }, [expand]);
27
27
  if (!showAiDimension)
28
28
  return null;
29
- return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: "AI\u7EF4\u5EA6\u8868\u73B0" })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u7EF4\u5EA6\u8868\u73B0\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: [(_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.map(function (v) {
29
+ return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: "AI\u7EF4\u5EA6\u8868\u73B0" })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u7EF4\u5EA6\u8868\u73B0\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: [(_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.map(function (v) {
30
30
  var _a;
31
31
  var rank = rankPercent(v.rank, v.total);
32
- 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" }, { 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));
32
+ 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));
33
33
  }), _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\u7EF4\u5EA6\u8868\u73B0\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"] }))] }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "flex-end", alignItems: "center", mt: 1, mb: 2 }, { children: _jsx(Link, { href: "#", onClick: handleExpandChange, text: expand ? '收起' : '查看详情' }) }))] })));
34
34
  };
35
35
  export default Index;
@@ -54,6 +54,9 @@ var Evaluate = function (_a) {
54
54
  (0, react_1.useEffect)(function () {
55
55
  setInternalMode(mode);
56
56
  }, [mode]);
57
- return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canEdit && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: handleModeChange }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ width: 1, position: "relative" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.TextField, { fullWidth: true, value: content, onChange: handleChange, rows: 3.5, multiline: true }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ p: 1, spacing: 1, direction: "row", position: "absolute", bottom: 0, right: 0 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "small", color: "inherit", onClick: handleModeChange }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "small", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] }));
57
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canEdit && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: handleModeChange }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ width: 1, pr: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 'auto' }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
58
+ handleModeChange();
59
+ setContent(evaluations === null || evaluations === void 0 ? void 0 : evaluations.join('\n'));
60
+ } }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] }));
58
61
  };
59
62
  exports.default = Evaluate;
@@ -54,7 +54,7 @@ var drawTop = function (layout, ctx) {
54
54
  ctx.fillText('0', layout.leftLableWidth, 10);
55
55
  ctx.strokeStyle = '#ccc';
56
56
  var offset = 0;
57
- levelOrder.forEach(function (x) {
57
+ levelOrder.forEach(function (x, i) {
58
58
  var c = levelConf[x];
59
59
  var labelWidth = measureTextWidth(ctx, c.label);
60
60
  var endScoreWidth = measureTextWidth(ctx, c.endScore);
@@ -65,7 +65,7 @@ var drawTop = function (layout, ctx) {
65
65
  ctx.moveTo(layout.leftLableWidth + offset + c.width / 2 + labelWidth / 2 + 5, 6);
66
66
  ctx.lineTo(layout.leftLableWidth + offset + c.width - endScoreWidth - 5, 6);
67
67
  ctx.fillStyle = '#ccc';
68
- ctx.fillText(c.endScore, layout.leftLableWidth + offset + c.width - endScoreWidth, 10);
68
+ ctx.fillText(c.endScore, layout.leftLableWidth + offset + c.width - endScoreWidth + (i === 0 ? 0 : 5), 10);
69
69
  ctx.stroke();
70
70
  offset += c.width;
71
71
  });
@@ -86,7 +86,7 @@ var drowBackground = function (layout, ctx) {
86
86
  };
87
87
  var percent = function (_a) {
88
88
  var rank = _a.rank, total = _a.total;
89
- return Math.min(0.975, parseFloat((1 - (rank - 1) / total).toFixed(2)));
89
+ return Math.min(0.975, parseFloat((1 - rank / total).toFixed(2)));
90
90
  };
91
91
  var getPointColor = function (s) {
92
92
  var conf = Object.entries(levelConf);
@@ -151,7 +151,7 @@ var draw = function (layout, color, dimensions, pathRef, ctx) {
151
151
  drawLine(layout.leftLableWidth, endPointX, endPointY, ctx);
152
152
  var _a = getPointColor(p), fill = _a[0], stroke = _a[1];
153
153
  drawPoint(fill, stroke, endPointX, endPointY, ctx);
154
- pathRef.push({ x: endPointX, y: endPointY, tips: "".concat(v === null || v === void 0 ? void 0 : v.name, "\u5F97\u5206:").concat(v === null || v === void 0 ? void 0 : v.score, "\u5206") });
154
+ pathRef.push({ x: endPointX, y: endPointY, tips: "".concat(v === null || v === void 0 ? void 0 : v.name, "\u5F97\u5206:").concat(v === null || v === void 0 ? void 0 : v.score.toFixed(2), "\u5206") });
155
155
  });
156
156
  };
157
157
  var Graph = function (_a) {
@@ -31,10 +31,10 @@ var Index = function () {
31
31
  }, [expand]);
32
32
  if (!showAiDimension)
33
33
  return null;
34
- return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ 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 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: "AI\u7EF4\u5EA6\u8868\u73B0" })), (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\u7EF4\u5EA6\u8868\u73B0\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: [(_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.map(function (v) {
34
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ 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 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: "AI\u7EF4\u5EA6\u8868\u73B0" })), (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\u7EF4\u5EA6\u8868\u73B0\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: [(_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.map(function (v) {
35
35
  var _a;
36
36
  var rank = rankPercent(v.rank, v.total);
37
- 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" }, { 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));
37
+ 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));
38
38
  }), (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\u7EF4\u5EA6\u8868\u73B0\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"] }))] }))] })), (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ display: "flex", justifyContent: "flex-end", alignItems: "center", mt: 1, mb: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { href: "#", onClick: handleExpandChange, text: expand ? '收起' : '查看详情' }) }))] })));
39
39
  };
40
40
  exports.default = Index;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",