eli-video-interview 1.2.4 → 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;
@@ -27,7 +27,7 @@ var levelConf = {
27
27
  },
28
28
  Best: {
29
29
  label: '优秀',
30
- width: 134,
30
+ width: 125,
31
31
  color: [0, 217, 157],
32
32
  endScore: 100,
33
33
  pointColor: ['RGB(0, 217, 157)', 'RGB(0, 176, 127)'],
@@ -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
  });
@@ -73,7 +73,7 @@ var drowBackground = function (layout, ctx) {
73
73
  levelOrder.forEach(function (x) {
74
74
  var c = levelConf[x];
75
75
  ctx.fillStyle = "rgb(".concat(c.color.join(','), ")");
76
- ctx.fillRect(0 + leftOffset, layout.topLableHeight, c.width, 4);
76
+ drawRoundedRect(0 + leftOffset, layout.topLableHeight, c.width, 4, 2, true, false, ctx);
77
77
  var linearGradient0 = ctx.createLinearGradient(0, 0, 0, layout.height - layout.topLableHeight);
78
78
  linearGradient0.addColorStop(0, "RGBA(".concat(c.color.join(','), ", 0.3)"));
79
79
  linearGradient0.addColorStop(1, "RGBA(".concat(c.color.join(','), ", 0.05)"));
@@ -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);
@@ -108,6 +108,8 @@ var drawLine = function (sx, ex, ey, ctx) {
108
108
  ctx.stroke();
109
109
  };
110
110
  var drawPoint = function (fill, stroke, x, y, ctx) {
111
+ ctx.save();
112
+ ctx.setLineDash([]);
111
113
  ctx.fillStyle = fill;
112
114
  ctx.strokeStyle = stroke;
113
115
  ctx.lineWidth = 1;
@@ -116,6 +118,23 @@ var drawPoint = function (fill, stroke, x, y, ctx) {
116
118
  ctx.closePath();
117
119
  ctx.fill();
118
120
  ctx.stroke();
121
+ ctx.restore();
122
+ };
123
+ var drawRoundedRect = function (x, y, width, height, r, fill, stroke, ctx) {
124
+ ctx.save();
125
+ ctx.beginPath();
126
+ ctx.moveTo(x + r, y);
127
+ ctx.arcTo(x + width, y, x + width, y + r, r);
128
+ ctx.arcTo(x + width, y + height, x + width - r, y + height, r);
129
+ ctx.arcTo(x, y + height, x, y + height - r, r);
130
+ ctx.arcTo(x, y, x + r, y, r);
131
+ if (fill) {
132
+ ctx.fill();
133
+ }
134
+ if (stroke) {
135
+ ctx.stroke();
136
+ }
137
+ ctx.restore();
119
138
  };
120
139
  var draw = function (layout, color, dimensions, pathRef, ctx) {
121
140
  drawTop(layout, ctx);
@@ -130,7 +149,7 @@ var draw = function (layout, color, dimensions, pathRef, ctx) {
130
149
  drawLine(layout.leftLableWidth, endPointX, endPointY, ctx);
131
150
  var _a = getPointColor(p), fill = _a[0], stroke = _a[1];
132
151
  drawPoint(fill, stroke, endPointX, endPointY, ctx);
133
- 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") });
134
153
  });
135
154
  };
136
155
  var Graph = function (_a) {
@@ -20,16 +20,16 @@ var rankPercent = function (r, t) { return (1 - r / t) * 100; };
20
20
  var Index = function () {
21
21
  var _a;
22
22
  var _b = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension;
23
- var _c = useState(false), expand = _c[0], setExpand = _c[1];
23
+ var _c = useState(true), expand = _c[0], setExpand = _c[1];
24
24
  var handleExpandChange = useCallback(function () {
25
25
  setExpand(!expand);
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" }, { 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("span", { 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: "success" }, { children: v.impressions.join('、') }))] })), _jsx(Divider, {}), _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
- }), _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: "disabled" }, { 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 ? '收起' : '查看详情' }) }))] })));
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
+ }), _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;
@@ -22,6 +22,6 @@ var Report = function () {
22
22
  var title = useMemo(function () {
23
23
  return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u4F18\u79C0 \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u5728\u524D30%" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u9002\u4E2D \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u572830%~70%" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u6B20\u4F73 \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u5728\u540E30%" })), _jsx(Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u4EBA\u6570\u5C0F\u4E8E5\u4EBA\u65F6\uFF0C\u8BC4\u4EF7\u4E0D\u751F\u6548" }))] }));
24
24
  }, []);
25
- return (_jsxs(Box, __assign({ width: "100%" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pt: 2, pr: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: "medium" }, { children: "\u804C\u573A\u80FD\u529B\u8868\u73B0" })), _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u80FD\u529B\u6807\u51C6" })), _jsx(Tooltip, __assign({ title: title }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.86)' } }) })) }))] }))] })), _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection }), _jsx(ScoreBigBall, { score: score || 0, status: status })] }))] })));
25
+ return (_jsxs(Box, __assign({ width: "100%" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pt: 2, pr: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: "\u804C\u573A\u80FD\u529B\u8868\u73B0" })), _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u80FD\u529B\u6807\u51C6" })), _jsx(Tooltip, __assign({ title: title }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.86)' } }) })) }))] }))] })), _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection }), _jsx(ScoreBigBall, { score: score || 0, status: status })] }))] })));
26
26
  };
27
27
  export default Report;
@@ -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;
@@ -29,7 +29,7 @@ var levelConf = {
29
29
  },
30
30
  Best: {
31
31
  label: '优秀',
32
- width: 134,
32
+ width: 125,
33
33
  color: [0, 217, 157],
34
34
  endScore: 100,
35
35
  pointColor: ['RGB(0, 217, 157)', 'RGB(0, 176, 127)'],
@@ -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
  });
@@ -75,7 +75,7 @@ var drowBackground = function (layout, ctx) {
75
75
  levelOrder.forEach(function (x) {
76
76
  var c = levelConf[x];
77
77
  ctx.fillStyle = "rgb(".concat(c.color.join(','), ")");
78
- ctx.fillRect(0 + leftOffset, layout.topLableHeight, c.width, 4);
78
+ drawRoundedRect(0 + leftOffset, layout.topLableHeight, c.width, 4, 2, true, false, ctx);
79
79
  var linearGradient0 = ctx.createLinearGradient(0, 0, 0, layout.height - layout.topLableHeight);
80
80
  linearGradient0.addColorStop(0, "RGBA(".concat(c.color.join(','), ", 0.3)"));
81
81
  linearGradient0.addColorStop(1, "RGBA(".concat(c.color.join(','), ", 0.05)"));
@@ -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);
@@ -110,6 +110,8 @@ var drawLine = function (sx, ex, ey, ctx) {
110
110
  ctx.stroke();
111
111
  };
112
112
  var drawPoint = function (fill, stroke, x, y, ctx) {
113
+ ctx.save();
114
+ ctx.setLineDash([]);
113
115
  ctx.fillStyle = fill;
114
116
  ctx.strokeStyle = stroke;
115
117
  ctx.lineWidth = 1;
@@ -118,6 +120,23 @@ var drawPoint = function (fill, stroke, x, y, ctx) {
118
120
  ctx.closePath();
119
121
  ctx.fill();
120
122
  ctx.stroke();
123
+ ctx.restore();
124
+ };
125
+ var drawRoundedRect = function (x, y, width, height, r, fill, stroke, ctx) {
126
+ ctx.save();
127
+ ctx.beginPath();
128
+ ctx.moveTo(x + r, y);
129
+ ctx.arcTo(x + width, y, x + width, y + r, r);
130
+ ctx.arcTo(x + width, y + height, x + width - r, y + height, r);
131
+ ctx.arcTo(x, y + height, x, y + height - r, r);
132
+ ctx.arcTo(x, y, x + r, y, r);
133
+ if (fill) {
134
+ ctx.fill();
135
+ }
136
+ if (stroke) {
137
+ ctx.stroke();
138
+ }
139
+ ctx.restore();
121
140
  };
122
141
  var draw = function (layout, color, dimensions, pathRef, ctx) {
123
142
  drawTop(layout, ctx);
@@ -132,7 +151,7 @@ var draw = function (layout, color, dimensions, pathRef, ctx) {
132
151
  drawLine(layout.leftLableWidth, endPointX, endPointY, ctx);
133
152
  var _a = getPointColor(p), fill = _a[0], stroke = _a[1];
134
153
  drawPoint(fill, stroke, endPointX, endPointY, ctx);
135
- 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") });
136
155
  });
137
156
  };
138
157
  var Graph = function (_a) {
@@ -25,16 +25,16 @@ var rankPercent = function (r, t) { return (1 - r / t) * 100; };
25
25
  var Index = function () {
26
26
  var _a;
27
27
  var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension;
28
- var _c = (0, react_1.useState)(false), expand = _c[0], setExpand = _c[1];
28
+ var _c = (0, react_1.useState)(true), expand = _c[0], setExpand = _c[1];
29
29
  var handleExpandChange = (0, react_1.useCallback)(function () {
30
30
  setExpand(!expand);
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" }, { 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)("span", { 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: "success" }, { children: v.impressions.join('、') }))] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (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
- }), (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: "disabled" }, { 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 ? '收起' : '查看详情' }) }))] })));
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
+ }), (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;
@@ -27,6 +27,6 @@ var Report = function () {
27
27
  var title = (0, react_1.useMemo)(function () {
28
28
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u4F18\u79C0 \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u5728\u524D30%" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u9002\u4E2D \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u572830%~70%" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u6B20\u4F73 \u4EE3\u8868\u5019\u9009\u4EBA\u8BE5\u9879\u80FD\u529B\u5728\u672C\u6B65\u9AA4\u6240\u6709\u5019\u9009\u4EBA\u4E2D\u6392\u540D\u5728\u540E30%" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u4EBA\u6570\u5C0F\u4E8E5\u4EBA\u65F6\uFF0C\u8BC4\u4EF7\u4E0D\u751F\u6548" }))] }));
29
29
  }, []);
30
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pt: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: "medium" }, { children: "\u804C\u573A\u80FD\u529B\u8868\u73B0" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u80FD\u529B\u6807\u51C6" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: title }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.86)' } }) })) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsx)(ReportPie_1.default, { id: orderToken || '', source: collection }), (0, jsx_runtime_1.jsx)(ScoreBigBall_1.default, { score: score || 0, status: status })] }))] })));
30
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pt: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: "\u804C\u573A\u80FD\u529B\u8868\u73B0" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u80FD\u529B\u6807\u51C6" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: title }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.86)' } }) })) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsx)(ReportPie_1.default, { id: orderToken || '', source: collection }), (0, jsx_runtime_1.jsx)(ScoreBigBall_1.default, { score: score || 0, status: status })] }))] })));
31
31
  };
32
32
  exports.default = Report;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.4",
3
+ "version": "1.2.7",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",