eli-video-interview 1.9.4 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/Charts/ReportPie.js +2 -2
- package/esm/components/Charts/interface.d.ts +2 -0
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +2 -19
- package/esm/modules/ai-report-v3/components/AIEvaluate/Graph.js +2 -19
- package/esm/modules/ai-report-v3/components/ScoreReport/Report.js +3 -2
- package/lib/components/Charts/ReportPie.js +2 -2
- package/lib/components/Charts/interface.d.ts +2 -0
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +2 -19
- package/lib/modules/ai-report-v3/components/AIEvaluate/Graph.js +2 -19
- package/lib/modules/ai-report-v3/components/ScoreReport/Report.js +3 -2
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ var getLevel = function (score) {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
var ReportPie = function (props) {
|
|
61
|
-
var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
|
|
61
|
+
var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a, _b = props.radius, radius = _b === void 0 ? [45, 100] : _b;
|
|
62
62
|
var scores = source.map(function (_a) {
|
|
63
63
|
var score = _a.score;
|
|
64
64
|
return score;
|
|
@@ -90,7 +90,7 @@ var ReportPie = function (props) {
|
|
|
90
90
|
series: [
|
|
91
91
|
{
|
|
92
92
|
type: 'pie',
|
|
93
|
-
radius:
|
|
93
|
+
radius: radius,
|
|
94
94
|
center: ['50%', '50%'],
|
|
95
95
|
data: data,
|
|
96
96
|
roseType: 'radius',
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
var __values = (this && this.__values) || function(o) {
|
|
13
2
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
14
3
|
if (m) return m.call(o);
|
|
@@ -201,13 +190,6 @@ var drawScore = function (layout, ctx, config, rect, score) {
|
|
|
201
190
|
var scoreWidth = measureTextWidth(ctx, "".concat(score));
|
|
202
191
|
ctx.fillText("".concat(score), layout.leftLableWidth + rect.width + (score < 10 ? 4 : -scoreWidth - 4), rect.y + 18);
|
|
203
192
|
};
|
|
204
|
-
// 全局维度(只绑试卷、不绑题目)用浅绿条 + 「全局」角标,与题目维度区分来源
|
|
205
|
-
var globalLevelConf = {
|
|
206
|
-
scoreGradient: ['#4EC953', '#D9FBE3'],
|
|
207
|
-
shadowColor: 'rgba(78, 201, 83, 0.35)',
|
|
208
|
-
textColor: '#33A853',
|
|
209
|
-
backgroundColor: 'rgba(78, 201, 83, 0.14)',
|
|
210
|
-
};
|
|
211
193
|
// 组间分隔线:左右两段细线,中间一行说明
|
|
212
194
|
var drawGroupDivider = function (layout, ctx, y) {
|
|
213
195
|
ctx.save();
|
|
@@ -232,7 +214,8 @@ var draw = function (layout, dimensions, pathRef, ctx) {
|
|
|
232
214
|
ctx.font = '16px sans-serif';
|
|
233
215
|
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
234
216
|
dimensions.forEach(function (v, i) {
|
|
235
|
-
|
|
217
|
+
// 颜色统一按档位(与圆环、图例一致);全局维度靠「以下为全局维度」分隔线区分来源
|
|
218
|
+
var config = getLevel(v.score);
|
|
236
219
|
// 绘制圆角矩形
|
|
237
220
|
var borderRadius = 12;
|
|
238
221
|
var x = layout.leftLableWidth;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
var __values = (this && this.__values) || function(o) {
|
|
13
2
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
14
3
|
if (m) return m.call(o);
|
|
@@ -206,13 +195,6 @@ export function getLevel(score) {
|
|
|
206
195
|
}
|
|
207
196
|
}
|
|
208
197
|
// 全局维度(只绑试卷、不绑题目)用浅绿条区分来源(来源说明靠分组分隔线,不逐条打标)
|
|
209
|
-
var globalLevelConf = {
|
|
210
|
-
backgroundColor: 'rgba(78, 201, 83, 0.14)',
|
|
211
|
-
scoreGradient: ['#4EC953', '#D9FBE3'],
|
|
212
|
-
shadowColor: 'rgba(78, 201, 83, 0.35)',
|
|
213
|
-
textColor: '#33A853',
|
|
214
|
-
tagColor: '#33A853',
|
|
215
|
-
};
|
|
216
198
|
var drawScore = function (layout, ctx, config, rect, score) {
|
|
217
199
|
var text = "".concat(score);
|
|
218
200
|
ctx.save();
|
|
@@ -265,7 +247,8 @@ var draw = function (layout, dimensions, pathRef, ctx) {
|
|
|
265
247
|
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
266
248
|
var shiftY = layout.shiftY;
|
|
267
249
|
dimensions.forEach(function (v, i) {
|
|
268
|
-
|
|
250
|
+
// 颜色统一按档位(与圆环、图例一致);全局维度靠「以下为全局维度」分隔线区分来源
|
|
251
|
+
var config = getLevel(v.score);
|
|
269
252
|
var x = layout.leftLableWidth;
|
|
270
253
|
var extraOffset = layout.dividerIndex > 0 && i >= layout.dividerIndex ? layout.dividerHeight : 0;
|
|
271
254
|
var y = shiftY + 46 + layout.itemSpacing * i + extraOffset;
|
|
@@ -18,7 +18,8 @@ var Report = function () {
|
|
|
18
18
|
var reportResult = useAiReportStore(function (store) { return [store.reportResult]; }).reportResult;
|
|
19
19
|
var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b;
|
|
20
20
|
return (
|
|
21
|
-
// 400
|
|
22
|
-
|
|
21
|
+
// 容器宽度保持 400(和原来一致,不能加宽:加宽会把整行挤爆、条形图连同左侧维度名一起被推到卡片外)
|
|
22
|
+
// 圆环改用更小的半径,让外侧标签在 400 里也放得下
|
|
23
|
+
_jsx(Box, __assign({ width: 400, flexShrink: 0 }, { children: _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection, radius: [38, 82] }), _jsx(ScoreBigBall, { score: score || 0, status: status })] })) })));
|
|
23
24
|
};
|
|
24
25
|
export default Report;
|
|
@@ -63,7 +63,7 @@ var getLevel = function (score) {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
var ReportPie = function (props) {
|
|
66
|
-
var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
|
|
66
|
+
var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a, _b = props.radius, radius = _b === void 0 ? [45, 100] : _b;
|
|
67
67
|
var scores = source.map(function (_a) {
|
|
68
68
|
var score = _a.score;
|
|
69
69
|
return score;
|
|
@@ -95,7 +95,7 @@ var ReportPie = function (props) {
|
|
|
95
95
|
series: [
|
|
96
96
|
{
|
|
97
97
|
type: 'pie',
|
|
98
|
-
radius:
|
|
98
|
+
radius: radius,
|
|
99
99
|
center: ['50%', '50%'],
|
|
100
100
|
data: data,
|
|
101
101
|
roseType: 'radius',
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __values = (this && this.__values) || function(o) {
|
|
14
3
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
15
4
|
if (m) return m.call(o);
|
|
@@ -205,13 +194,6 @@ var drawScore = function (layout, ctx, config, rect, score) {
|
|
|
205
194
|
var scoreWidth = measureTextWidth(ctx, "".concat(score));
|
|
206
195
|
ctx.fillText("".concat(score), layout.leftLableWidth + rect.width + (score < 10 ? 4 : -scoreWidth - 4), rect.y + 18);
|
|
207
196
|
};
|
|
208
|
-
// 全局维度(只绑试卷、不绑题目)用浅绿条 + 「全局」角标,与题目维度区分来源
|
|
209
|
-
var globalLevelConf = {
|
|
210
|
-
scoreGradient: ['#4EC953', '#D9FBE3'],
|
|
211
|
-
shadowColor: 'rgba(78, 201, 83, 0.35)',
|
|
212
|
-
textColor: '#33A853',
|
|
213
|
-
backgroundColor: 'rgba(78, 201, 83, 0.14)',
|
|
214
|
-
};
|
|
215
197
|
// 组间分隔线:左右两段细线,中间一行说明
|
|
216
198
|
var drawGroupDivider = function (layout, ctx, y) {
|
|
217
199
|
ctx.save();
|
|
@@ -236,7 +218,8 @@ var draw = function (layout, dimensions, pathRef, ctx) {
|
|
|
236
218
|
ctx.font = '16px sans-serif';
|
|
237
219
|
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
238
220
|
dimensions.forEach(function (v, i) {
|
|
239
|
-
|
|
221
|
+
// 颜色统一按档位(与圆环、图例一致);全局维度靠「以下为全局维度」分隔线区分来源
|
|
222
|
+
var config = getLevel(v.score);
|
|
240
223
|
// 绘制圆角矩形
|
|
241
224
|
var borderRadius = 12;
|
|
242
225
|
var x = layout.leftLableWidth;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __values = (this && this.__values) || function(o) {
|
|
14
3
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
15
4
|
if (m) return m.call(o);
|
|
@@ -210,13 +199,6 @@ function getLevel(score) {
|
|
|
210
199
|
}
|
|
211
200
|
exports.getLevel = getLevel;
|
|
212
201
|
// 全局维度(只绑试卷、不绑题目)用浅绿条区分来源(来源说明靠分组分隔线,不逐条打标)
|
|
213
|
-
var globalLevelConf = {
|
|
214
|
-
backgroundColor: 'rgba(78, 201, 83, 0.14)',
|
|
215
|
-
scoreGradient: ['#4EC953', '#D9FBE3'],
|
|
216
|
-
shadowColor: 'rgba(78, 201, 83, 0.35)',
|
|
217
|
-
textColor: '#33A853',
|
|
218
|
-
tagColor: '#33A853',
|
|
219
|
-
};
|
|
220
202
|
var drawScore = function (layout, ctx, config, rect, score) {
|
|
221
203
|
var text = "".concat(score);
|
|
222
204
|
ctx.save();
|
|
@@ -269,7 +251,8 @@ var draw = function (layout, dimensions, pathRef, ctx) {
|
|
|
269
251
|
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
270
252
|
var shiftY = layout.shiftY;
|
|
271
253
|
dimensions.forEach(function (v, i) {
|
|
272
|
-
|
|
254
|
+
// 颜色统一按档位(与圆环、图例一致);全局维度靠「以下为全局维度」分隔线区分来源
|
|
255
|
+
var config = getLevel(v.score);
|
|
273
256
|
var x = layout.leftLableWidth;
|
|
274
257
|
var extraOffset = layout.dividerIndex > 0 && i >= layout.dividerIndex ? layout.dividerHeight : 0;
|
|
275
258
|
var y = shiftY + 46 + layout.itemSpacing * i + extraOffset;
|
|
@@ -23,7 +23,8 @@ var Report = function () {
|
|
|
23
23
|
var reportResult = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult]; }).reportResult;
|
|
24
24
|
var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b;
|
|
25
25
|
return (
|
|
26
|
-
// 400
|
|
27
|
-
|
|
26
|
+
// 容器宽度保持 400(和原来一致,不能加宽:加宽会把整行挤爆、条形图连同左侧维度名一起被推到卡片外)
|
|
27
|
+
// 圆环改用更小的半径,让外侧标签在 400 里也放得下
|
|
28
|
+
(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 400, flexShrink: 0 }, { children: (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, radius: [38, 82] }), (0, jsx_runtime_1.jsx)(ScoreBigBall_1.default, { score: score || 0, status: status })] })) })));
|
|
28
29
|
};
|
|
29
30
|
exports.default = Report;
|