eli-video-interview 1.2.34-beta.1 → 1.2.34-beta.3

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.
Files changed (31) hide show
  1. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +2 -2
  2. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +15 -4
  3. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +1 -0
  4. package/esm/modules/ai-question/components/QuestionUpdate/index.js +0 -6
  5. package/esm/modules/ai-report/Root.js +2 -2
  6. package/esm/modules/ai-report/components/AIEvaluate/index.js +7 -7
  7. package/esm/modules/ai-report/components/ScoreReport/Score.js +7 -3
  8. package/esm/modules/ai-report/components/ScoreReport/index.js +2 -2
  9. package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
  10. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
  11. package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +1 -1
  12. package/esm/modules/ai-report/interface.d.ts +1 -0
  13. package/esm/modules/ai-report/useAiReport.d.ts +1 -0
  14. package/esm/modules/ai-template/components/TemplateHeader/index.js +1 -1
  15. package/esm/store/ai-report/global-store.d.ts +3 -0
  16. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +2 -2
  17. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +15 -4
  18. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +1 -0
  19. package/lib/modules/ai-question/components/QuestionUpdate/index.js +0 -6
  20. package/lib/modules/ai-report/Root.js +2 -2
  21. package/lib/modules/ai-report/components/AIEvaluate/index.js +5 -5
  22. package/lib/modules/ai-report/components/ScoreReport/Score.js +7 -3
  23. package/lib/modules/ai-report/components/ScoreReport/index.js +2 -2
  24. package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +2 -0
  25. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
  26. package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +1 -1
  27. package/lib/modules/ai-report/interface.d.ts +1 -0
  28. package/lib/modules/ai-report/useAiReport.d.ts +1 -0
  29. package/lib/modules/ai-template/components/TemplateHeader/index.js +1 -1
  30. package/lib/store/ai-report/global-store.d.ts +3 -0
  31. package/package.json +1 -1
@@ -19,7 +19,7 @@ import update from 'immutability-helper';
19
19
  import { useCallback } from 'react';
20
20
  var AnalysisItem = function (props) {
21
21
  var _a;
22
- var name = props.name, weight = props.weight, type = props.type, extra = props.extra, index = props.index, _b = props.abilityType, abilityType = _b === void 0 ? 1 : _b, isWorkplace = props.isWorkplace, workplaceType = props.workplaceType;
22
+ var name = props.name, weight = props.weight, type = props.type, extra = props.extra, index = props.index, _b = props.abilityType, abilityType = _b === void 0 ? 1 : _b, isWorkplace = props.isWorkplace;
23
23
  var _c = useAiAnalysisStore(function (store) { return [store.aiAbilities]; }), aiAbilities = _c.aiAbilities, updateAiAbilities = _c.updateAiAbilities, updateAiAbilitiesWeight = _c.updateAiAbilitiesWeight, removeAiAbilities = _c.removeAiAbilities;
24
24
  var desc = props.desc || props.name;
25
25
  var NotUsedAilibity = ['英文能力', '游戏测评'];
@@ -39,6 +39,6 @@ var AnalysisItem = function (props) {
39
39
  var value = _a.target.value;
40
40
  updateAiAbilitiesWeight(value, index);
41
41
  }, [updateAiAbilitiesWeight, index]);
42
- return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && workplaceType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
42
+ return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
43
43
  };
44
44
  export default AnalysisItem;
@@ -44,6 +44,17 @@ var AiAssessmentCriteria = function (props) {
44
44
  setGroupData(ret);
45
45
  },
46
46
  }).loading;
47
+ // fix: type = 3 是考察能力的type, 与AI维度中语义流畅的type 重复了, 会引起默认选中
48
+ var fixSetCheckAbilities = useCallback(function (p) {
49
+ for (var key in p) {
50
+ if (Object.prototype.hasOwnProperty.call(p, key)) {
51
+ var element = p[key];
52
+ if (element && element.abilityType === 2)
53
+ return;
54
+ setCheckAbilities(p);
55
+ }
56
+ }
57
+ }, [setCheckAbilities]);
47
58
  var onLanguageChange = function (_a, list) {
48
59
  var value = _a.target.value;
49
60
  var language = Number(value === '0' ? MANDARIN : value);
@@ -54,7 +65,7 @@ var AiAssessmentCriteria = function (props) {
54
65
  Object.keys(checkAbilities).forEach(function (key) {
55
66
  var _a;
56
67
  if (!(item === null || item === void 0 ? void 0 : item.relatedAbilities.includes(Number(key)))) {
57
- setCheckAbilities((_a = {}, _a[key] = undefined, _a));
68
+ fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
58
69
  }
59
70
  });
60
71
  console.log(language);
@@ -72,9 +83,9 @@ var AiAssessmentCriteria = function (props) {
72
83
  useEffect(function () {
73
84
  aiAbilities.forEach(function (item) {
74
85
  var _a;
75
- return setCheckAbilities((_a = {}, _a[item.type] = item, _a));
86
+ return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
76
87
  });
77
- }, [aiAbilities, setCheckAbilities]);
88
+ }, [aiAbilities, fixSetCheckAbilities]);
78
89
  return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u6807\u51C6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (groupData.map(function (_a) {
79
90
  var name = _a.name, type = _a.type, list = _a.list;
80
91
  return (_jsxs(Box, { children: [(list.filter(function (_a) {
@@ -102,7 +113,7 @@ var AiAssessmentCriteria = function (props) {
102
113
  var isLanguageAbility = [14, 15].includes(type);
103
114
  return (_jsxs(Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [_jsx(Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
104
115
  var _a;
105
- return setCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
116
+ return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
106
117
  } }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
107
118
  }
108
119
  return null;
@@ -96,6 +96,7 @@ var QuestionForm = forwardRef(function (props, ref) {
96
96
  label: tag,
97
97
  value: tag,
98
98
  name: tag,
99
+ type: type,
99
100
  workplaceType: type,
100
101
  token: token,
101
102
  define: define,
@@ -130,9 +130,6 @@ var QuestionUpdate = function () {
130
130
  }
131
131
  return __assign(__assign({}, i), { extra: JSON.stringify(extra_1) });
132
132
  }
133
- if (i.type === 103) {
134
- i.type = 3;
135
- }
136
133
  return i;
137
134
  })
138
135
  .filter(function (v) { return v.abilityType === 1 || (v.abilityType === 2 && v.isWorkplace); });
@@ -218,9 +215,6 @@ var QuestionUpdate = function () {
218
215
  var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0, sort: 0 });
219
216
  inInit = workplaceTypeIndex === -1;
220
217
  CurWorkPlaceAiAbility.desc = CurWorkPlaceAiAbility.define ? CurWorkPlaceAiAbility.define : CurWorkPlaceAiAbility.name;
221
- if (CurWorkPlaceAiAbility.type === 3 && CurWorkPlaceAiAbility.isWorkplace) {
222
- CurWorkPlaceAiAbility.type = 103;
223
- }
224
218
  // console.log('CurWorkPlaceAiAbility', CurWorkPlaceAiAbility);
225
219
  // 添加和修改
226
220
  if (workplaceTypeIndex > -1) {
@@ -24,7 +24,7 @@ import { Box, Button, Typography } from 'fbm-ui';
24
24
  import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
25
25
  var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
26
26
  var AiReportRoot = forwardRef(function (props, ref) {
27
- var token = props.token, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
27
+ var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
28
28
  var firstLoad = useRef(true);
29
29
  var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
30
30
  var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d;
@@ -68,7 +68,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
68
68
  return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: { marginTop: '2px' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
69
69
  }
70
70
  else {
71
- return (_jsxs(Box, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(ScoreReport, { onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }));
71
+ return (_jsxs(Box, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }));
72
72
  }
73
73
  }, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
74
74
  return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
@@ -15,19 +15,19 @@ import Evaluate from './Evaluate';
15
15
  import Graph from './Graph';
16
16
  import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
17
  import AiHeaderTitle from "../../../../components/AiHeaderTitle";
18
- import { InfoOutlineIcon, Link, Tooltip, Typography } from 'fbm-ui';
18
+ import { InfoOutlineIcon, Tooltip, Typography } from 'fbm-ui';
19
19
  import { Box, Collapse, Divider, Paper, Stack } from 'fbm-ui/lib/mui';
20
- import { useCallback, useState } from 'react';
20
+ import { useState } from 'react';
21
21
  var Index = function () {
22
22
  var _a, _b;
23
23
  var _c = useAiReportStore(function (store) { return [
24
24
  store.reportResult,
25
25
  store.operableButtons,
26
26
  ]; }), reportResult = _c.reportResult, showAiDimension = _c.showAiDimension, canEditAiDimension = _c.canEditAiDimension, customInterviewDimRankMap = _c.customInterviewDimRankMap;
27
- var _d = useState(true), expand = _d[0], setExpand = _d[1];
28
- var handleExpandChange = useCallback(function () {
29
- setExpand(!expand);
30
- }, [expand]);
27
+ var expand = useState(true)[0];
28
+ // const handleExpandChange = useCallback(() => {
29
+ // setExpand(!expand);
30
+ // }, [expand]);
31
31
  if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
32
32
  return null;
33
33
  return (_jsxs(Box, __assign({ id: "report-evaluate", component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [_jsx(AiHeaderTitle, { name: "AI\u57FA\u7840\u80FD\u529B" }), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), _jsxs(Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
@@ -35,6 +35,6 @@ var Index = function () {
35
35
  var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
36
36
  var rank = rankPercent((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
37
37
  return (_jsxs(Box, __assign({ component: Paper, elevation: 0, bgcolor: "#f9f9f9", mb: 2, pb: 2 }, { children: [_jsxs(Stack, __assign({ px: 2, pt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 2 }, { children: [_jsx(Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: v.evaluationDimensionName })), !isNaN(rank) && (_jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u51FB\u8D25\u4E86", _jsxs(Typography, __assign({ variant: "body2", fontWeight: "medium", display: "inline", color: "#4caf50" }, { children: [rank.toFixed(2), "%"] })), "\u7684\u5019\u9009\u4EBA"] })))] })), _jsx(Typography, __assign({ mt: 1, mb: 2, variant: "body2", fontWeight: "medium", color: "#4caf50" }, { children: v.impressions.join('、') }))] })), _jsx(Divider, { sx: { borderColor: 'rgba(0,0,0,0.08)' } }), _jsxs(Stack, __assign({ px: 2 }, { children: [((_a = v.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && (_jsx(Box, __assign({ mt: 2 }, { children: _jsx(Graph, { items: v.items }) }))), _jsxs(Stack, __assign({ spacing: 2, mt: 2 }, { children: [_jsx(Evaluate, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.evaluations, title: "\u8BC4\u4EF7\u5185\u5BB9", field: "evaluations", mode: "show" }), _jsx(Evaluate, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.suggestions, title: "\u63D0\u9AD8\u5EFA\u8BAE", field: "suggestions", mode: "show" })] }))] }))] }), v.evaluationToken));
38
- }), _jsxs(Stack, __assign({ spacing: 1, mt: 4 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), _jsxs(Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "flex-end", alignItems: "center", mt: 1, mb: 2 }, { children: _jsx(Link, { href: "#", onClick: handleExpandChange, text: expand ? '收起' : '查看详情' }) }))] })));
38
+ }), _jsxs(Stack, __assign({ spacing: 1, mt: 4, pb: 2 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), _jsxs(Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] }))] })));
39
39
  };
40
40
  export default Index;
@@ -19,16 +19,20 @@ import dayjs from 'dayjs';
19
19
  import { Box, Button, DownloadIcon, Popover, Typography } from 'fbm-ui';
20
20
  import { useEffect, useState } from 'react';
21
21
  var Score = function (_a) {
22
- var loading = _a.loading, onRefresh = _a.onRefresh;
22
+ var customScore = _a.customScore, loading = _a.loading, onRefresh = _a.onRefresh;
23
23
  var _b = useState(false), openRankingRange = _b[0], setOpenRankingRange = _b[1];
24
24
  var _c = useState(false), openRefresh = _c[0], setOpenRefresh = _c[1];
25
25
  var _d = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _d.reportResult, operableButtons = _d.operableButtons, onExportReportClick = _d.onExportReportClick;
26
26
  var _e = reportResult || {}, score = _e.score, createTime = _e.createTime;
27
+ var _f = useState(score || 0), feScore = _f[0], setScore = _f[1];
27
28
  useEffect(function () {
29
+ if (typeof customScore === 'number' && customScore > -1) {
30
+ setScore(customScore);
31
+ }
28
32
  if (!loading)
29
33
  setOpenRefresh(false);
30
- }, [loading]);
34
+ }, [loading, customScore]);
31
35
  var content = (_jsxs(Box, __assign({ padding: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), _jsx(Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: _jsx(Button, __assign({ loading: loading, onClick: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
32
- return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(score || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx(Box, __assign({ width: 50, height: 50 }, { children: !!score && score >= 80 && _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
36
+ return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(feScore || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx(Box, __assign({ width: 50, height: 50 }, { children: !!feScore && feScore >= 80 && _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
33
37
  };
34
38
  export default Score;
@@ -21,7 +21,7 @@ import { Message } from 'fbm-ui';
21
21
  import { Divider, Paper } from 'fbm-ui/lib/mui';
22
22
  var FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
23
23
  var ScoreReport = function (_a) {
24
- var onRefreshSuccess = _a.onRefreshSuccess;
24
+ var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess;
25
25
  var _b = useAiReportStore(function (store) { return [store.token, store.reportResult]; }), token = _b.token, reportResult = _b.reportResult;
26
26
  var _c = (reportResult || {}).status, status = _c === void 0 ? 0 : _c;
27
27
  var _d = useRequest(function () { return PostAiInterviewRefresh(token); }, {
@@ -35,7 +35,7 @@ var ScoreReport = function (_a) {
35
35
  return (_jsx(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: _jsx(Failed, { status: status, loading: loading, onRefresh: run }) })));
36
36
  }
37
37
  else {
38
- return (_jsxs(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [_jsx(Score, { loading: loading, onRefresh: run }), _jsx(Divider, {}), _jsx(Report, {})] })));
38
+ return (_jsxs(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [_jsx(Score, { customScore: customScore, loading: loading, onRefresh: run }), _jsx(Divider, {}), _jsx(Report, {})] })));
39
39
  }
40
40
  };
41
41
  export default ScoreReport;
@@ -2,9 +2,11 @@ export interface ScoreLegendProps {
2
2
  color: string;
3
3
  }
4
4
  export interface ScoreReportProps {
5
+ customScore?: number;
5
6
  onRefreshSuccess: () => void;
6
7
  }
7
8
  export interface ScoreProps {
9
+ customScore?: number;
8
10
  loading?: boolean;
9
11
  onRefresh: () => void;
10
12
  }
@@ -46,7 +46,7 @@ export declare const StyledSlider: import("@emotion/styled").StyledComponent<{
46
46
  name?: string | undefined;
47
47
  onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
48
48
  onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
49
- orientation?: "horizontal" | "vertical" | undefined;
49
+ orientation?: "vertical" | "horizontal" | undefined;
50
50
  scale?: ((value: number) => number) | undefined;
51
51
  step?: number | null | undefined;
52
52
  tabIndex?: number | undefined;
@@ -46,7 +46,7 @@ export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComp
46
46
  name?: string | undefined;
47
47
  onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
48
48
  onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
49
- orientation?: "horizontal" | "vertical" | undefined;
49
+ orientation?: "vertical" | "horizontal" | undefined;
50
50
  scale?: ((value: number) => number) | undefined;
51
51
  step?: number | null | undefined;
52
52
  tabIndex?: number | undefined;
@@ -150,6 +150,7 @@ export interface CustomInterviewDimRank {
150
150
  export declare type CustomInterviewDimRankMap = Record<string, CustomInterviewDimRank>;
151
151
  export interface AiReportProps {
152
152
  token: string;
153
+ customScore?: number;
153
154
  scoreRankIntervals?: ScoreRankInterval[];
154
155
  disabledScore?: boolean;
155
156
  reminderSent?: boolean;
@@ -3,6 +3,7 @@ import { AiReportProps, AiReportRef } from './interface';
3
3
  export declare const useAiReport: (props: AiReportProps) => {
4
4
  handleRefresh?: (() => void) | undefined;
5
5
  token: string;
6
+ customScore?: number | undefined;
6
7
  scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankInterval[] | undefined;
7
8
  disabledScore?: boolean | undefined;
8
9
  reminderSent?: boolean | undefined;
@@ -13,6 +13,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { Box, CloseIcon, IconButton, KeyboardArrowLeftIcon, Typography } from 'fbm-ui';
14
14
  var TemplateHeader = function (_a) {
15
15
  var name = _a.name, onClose = _a.onClose, onSearch = _a.onSearch, onBack = _a.onBack;
16
- return name ? (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [_jsx(IconButton, __assign({ onClick: onBack }, { children: _jsx(KeyboardArrowLeftIcon, {}) })), _jsx(Typography, __assign({ variant: "body1", weight: "500", ml: 1 }, { children: name }))] })), _jsx(IconButton, __assign({ onClick: onClose }, { children: _jsx(CloseIcon, {}) }))] }))) : (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [_jsxs(Typography, __assign({ variant: "body1", weight: "500", ml: 3 }, { children: ["\u5C97\u4F4D\u6A21\u7248\u5E93", _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\uFF08\u6A21\u7248\u5E93\u53EF\u591A\u6B21\u4F7F\u7528\uFF09" }))] })), _jsx(IconButton, __assign({ onClick: onClose }, { children: _jsx(CloseIcon, {}) }))] })));
16
+ return name ? (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pr: 1, pt: 1, pb: 1.5, mb: 1 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [_jsx(IconButton, __assign({ onClick: onBack }, { children: _jsx(KeyboardArrowLeftIcon, {}) })), _jsx(Typography, __assign({ variant: "body1", weight: "500" }, { children: name }))] })), _jsx(IconButton, __assign({ onClick: onClose }, { children: _jsx(CloseIcon, {}) }))] }))) : (_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [_jsxs(Typography, __assign({ variant: "body1", weight: "500", ml: 3 }, { children: ["\u5C97\u4F4D\u6A21\u7248\u5E93", _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\uFF08\u6A21\u7248\u5E93\u53EF\u591A\u6B21\u4F7F\u7528\uFF09" }))] })), _jsx(IconButton, __assign({ onClick: onClose }, { children: _jsx(CloseIcon, {}) }))] })));
17
17
  };
18
18
  export default TemplateHeader;
@@ -5,6 +5,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
5
5
  updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
6
6
  updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
7
7
  token: string;
8
+ customScore?: number | undefined;
8
9
  scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
9
10
  disabledScore?: boolean | undefined;
10
11
  reminderSent?: boolean | undefined;
@@ -31,6 +32,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
31
32
  updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
32
33
  updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
33
34
  token: string;
35
+ customScore?: number | undefined;
34
36
  scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
35
37
  disabledScore?: boolean | undefined;
36
38
  reminderSent?: boolean | undefined;
@@ -57,6 +59,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
57
59
  updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
58
60
  updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
59
61
  token: string;
62
+ customScore?: number | undefined;
60
63
  scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
61
64
  disabledScore?: boolean | undefined;
62
65
  reminderSent?: boolean | undefined;
@@ -24,7 +24,7 @@ var immutability_helper_1 = __importDefault(require("immutability-helper"));
24
24
  var react_1 = require("react");
25
25
  var AnalysisItem = function (props) {
26
26
  var _a;
27
- var name = props.name, weight = props.weight, type = props.type, extra = props.extra, index = props.index, _b = props.abilityType, abilityType = _b === void 0 ? 1 : _b, isWorkplace = props.isWorkplace, workplaceType = props.workplaceType;
27
+ var name = props.name, weight = props.weight, type = props.type, extra = props.extra, index = props.index, _b = props.abilityType, abilityType = _b === void 0 ? 1 : _b, isWorkplace = props.isWorkplace;
28
28
  var _c = (0, ai_analysis_store_1.useAiAnalysisStore)(function (store) { return [store.aiAbilities]; }), aiAbilities = _c.aiAbilities, updateAiAbilities = _c.updateAiAbilities, updateAiAbilitiesWeight = _c.updateAiAbilitiesWeight, removeAiAbilities = _c.removeAiAbilities;
29
29
  var desc = props.desc || props.name;
30
30
  var NotUsedAilibity = ['英文能力', '游戏测评'];
@@ -44,6 +44,6 @@ var AnalysisItem = function (props) {
44
44
  var value = _a.target.value;
45
45
  updateAiAbilitiesWeight(value, index);
46
46
  }, [updateAiAbilitiesWeight, index]);
47
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(mui_1.ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemText, { children: (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: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [abilityType === 2 && isWorkplace && workplaceType === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { width: 150, ml: 1 }, options: const_1.willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && (0, jsx_runtime_1.jsx)(MainPoints_1.default, { extra: extra, index: index })] }));
47
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(mui_1.ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemText, { children: (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: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { width: 150, ml: 1 }, options: const_1.willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && (0, jsx_runtime_1.jsx)(MainPoints_1.default, { extra: extra, index: index })] }));
48
48
  };
49
49
  exports.default = AnalysisItem;
@@ -49,6 +49,17 @@ var AiAssessmentCriteria = function (props) {
49
49
  setGroupData(ret);
50
50
  },
51
51
  }).loading;
52
+ // fix: type = 3 是考察能力的type, 与AI维度中语义流畅的type 重复了, 会引起默认选中
53
+ var fixSetCheckAbilities = (0, react_1.useCallback)(function (p) {
54
+ for (var key in p) {
55
+ if (Object.prototype.hasOwnProperty.call(p, key)) {
56
+ var element = p[key];
57
+ if (element && element.abilityType === 2)
58
+ return;
59
+ setCheckAbilities(p);
60
+ }
61
+ }
62
+ }, [setCheckAbilities]);
52
63
  var onLanguageChange = function (_a, list) {
53
64
  var value = _a.target.value;
54
65
  var language = Number(value === '0' ? MANDARIN : value);
@@ -59,7 +70,7 @@ var AiAssessmentCriteria = function (props) {
59
70
  Object.keys(checkAbilities).forEach(function (key) {
60
71
  var _a;
61
72
  if (!(item === null || item === void 0 ? void 0 : item.relatedAbilities.includes(Number(key)))) {
62
- setCheckAbilities((_a = {}, _a[key] = undefined, _a));
73
+ fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
63
74
  }
64
75
  });
65
76
  console.log(language);
@@ -77,9 +88,9 @@ var AiAssessmentCriteria = function (props) {
77
88
  (0, react_1.useEffect)(function () {
78
89
  aiAbilities.forEach(function (item) {
79
90
  var _a;
80
- return setCheckAbilities((_a = {}, _a[item.type] = item, _a));
91
+ return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
81
92
  });
82
- }, [aiAbilities, setCheckAbilities]);
93
+ }, [aiAbilities, fixSetCheckAbilities]);
83
94
  return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u6807\u51C6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: loading ? ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ height: 400 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Loading, { size: 40 }) }))) : (groupData.map(function (_a) {
84
95
  var name = _a.name, type = _a.type, list = _a.list;
85
96
  return ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(list.filter(function (_a) {
@@ -107,7 +118,7 @@ var AiAssessmentCriteria = function (props) {
107
118
  var isLanguageAbility = [14, 15].includes(type);
108
119
  return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
109
120
  var _a;
110
- return setCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
121
+ return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
111
122
  } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
112
123
  }
113
124
  return null;
@@ -101,6 +101,7 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
101
101
  label: tag,
102
102
  value: tag,
103
103
  name: tag,
104
+ type: type,
104
105
  workplaceType: type,
105
106
  token: token,
106
107
  define: define,
@@ -135,9 +135,6 @@ var QuestionUpdate = function () {
135
135
  }
136
136
  return __assign(__assign({}, i), { extra: JSON.stringify(extra_1) });
137
137
  }
138
- if (i.type === 103) {
139
- i.type = 3;
140
- }
141
138
  return i;
142
139
  })
143
140
  .filter(function (v) { return v.abilityType === 1 || (v.abilityType === 2 && v.isWorkplace); });
@@ -223,9 +220,6 @@ var QuestionUpdate = function () {
223
220
  var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0, sort: 0 });
224
221
  inInit = workplaceTypeIndex === -1;
225
222
  CurWorkPlaceAiAbility.desc = CurWorkPlaceAiAbility.define ? CurWorkPlaceAiAbility.define : CurWorkPlaceAiAbility.name;
226
- if (CurWorkPlaceAiAbility.type === 3 && CurWorkPlaceAiAbility.isWorkplace) {
227
- CurWorkPlaceAiAbility.type = 103;
228
- }
229
223
  // console.log('CurWorkPlaceAiAbility', CurWorkPlaceAiAbility);
230
224
  // 添加和修改
231
225
  if (workplaceTypeIndex > -1) {
@@ -29,7 +29,7 @@ var fbm_ui_1 = require("fbm-ui");
29
29
  var react_1 = require("react");
30
30
  var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
31
31
  var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
32
- var token = props.token, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
32
+ var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
33
33
  var firstLoad = (0, react_1.useRef)(true);
34
34
  var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
35
35
  var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d;
@@ -73,7 +73,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
73
73
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
74
74
  }
75
75
  else {
76
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(ScoreReport_1.default, { onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }));
76
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }));
77
77
  }
78
78
  }, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
79
79
  return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
@@ -29,10 +29,10 @@ var Index = function () {
29
29
  store.reportResult,
30
30
  store.operableButtons,
31
31
  ]; }), reportResult = _c.reportResult, showAiDimension = _c.showAiDimension, canEditAiDimension = _c.canEditAiDimension, customInterviewDimRankMap = _c.customInterviewDimRankMap;
32
- var _d = (0, react_1.useState)(true), expand = _d[0], setExpand = _d[1];
33
- var handleExpandChange = (0, react_1.useCallback)(function () {
34
- setExpand(!expand);
35
- }, [expand]);
32
+ var expand = (0, react_1.useState)(true)[0];
33
+ // const handleExpandChange = useCallback(() => {
34
+ // setExpand(!expand);
35
+ // }, [expand]);
36
36
  if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
37
37
  return null;
38
38
  return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ id: "report-evaluate", component: mui_1.Paper, variant: "outlined", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [(0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "AI\u57FA\u7840\u80FD\u529B" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", (0, jsx_runtime_1.jsx)("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", (0, jsx_runtime_1.jsx)("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), (0, jsx_runtime_1.jsxs)(mui_1.Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
@@ -40,6 +40,6 @@ var Index = function () {
40
40
  var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
41
41
  var rank = (0, utils_1.rankPercent)((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
42
42
  return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, elevation: 0, bgcolor: "#f9f9f9", mb: 2, pb: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2, pt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 } }, { children: v.evaluationDimensionName })), !isNaN(rank) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u51FB\u8D25\u4E86", (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", display: "inline", color: "#4caf50" }, { children: [rank.toFixed(2), "%"] })), "\u7684\u5019\u9009\u4EBA"] })))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, mb: 2, variant: "body2", fontWeight: "medium", color: "#4caf50" }, { children: v.impressions.join('、') }))] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { borderColor: 'rgba(0,0,0,0.08)' } }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2 }, { children: [((_a = v.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(Graph_1.default, { items: v.items }) }))), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(Evaluate_1.default, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.evaluations, title: "\u8BC4\u4EF7\u5185\u5BB9", field: "evaluations", mode: "show" }), (0, jsx_runtime_1.jsx)(Evaluate_1.default, { canEdit: canEditAiDimension, token: v.evaluationToken, evaluations: v.suggestions, title: "\u63D0\u9AD8\u5EFA\u8BAE", field: "suggestions", mode: "show" })] }))] }))] }), v.evaluationToken));
43
- }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, mt: 4 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", (0, jsx_runtime_1.jsx)("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] })), (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 ? '收起' : '查看详情' }) }))] })));
43
+ }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, mt: 4, pb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", color: "textSecondary" }, { children: "\u7ED3\u679C\u8BF4\u660E" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "rgba(0,0,0,0.26)" }, { children: ["AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", (0, jsx_runtime_1.jsx)("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }))] }))] }))] })));
44
44
  };
45
45
  exports.default = Index;
@@ -24,16 +24,20 @@ var dayjs_1 = __importDefault(require("dayjs"));
24
24
  var fbm_ui_1 = require("fbm-ui");
25
25
  var react_1 = require("react");
26
26
  var Score = function (_a) {
27
- var loading = _a.loading, onRefresh = _a.onRefresh;
27
+ var customScore = _a.customScore, loading = _a.loading, onRefresh = _a.onRefresh;
28
28
  var _b = (0, react_1.useState)(false), openRankingRange = _b[0], setOpenRankingRange = _b[1];
29
29
  var _c = (0, react_1.useState)(false), openRefresh = _c[0], setOpenRefresh = _c[1];
30
30
  var _d = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _d.reportResult, operableButtons = _d.operableButtons, onExportReportClick = _d.onExportReportClick;
31
31
  var _e = reportResult || {}, score = _e.score, createTime = _e.createTime;
32
+ var _f = (0, react_1.useState)(score || 0), feScore = _f[0], setScore = _f[1];
32
33
  (0, react_1.useEffect)(function () {
34
+ if (typeof customScore === 'number' && customScore > -1) {
35
+ setScore(customScore);
36
+ }
33
37
  if (!loading)
34
38
  setOpenRefresh(false);
35
- }, [loading]);
39
+ }, [loading, customScore]);
36
40
  var content = ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ padding: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
37
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [(0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreTypography, { children: [(0, utils_1.formatScore)(score || 0), (0, jsx_runtime_1.jsx)(styled_1.ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 50, height: 50 }, { children: !!score && score >= 80 && (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: (0, jsx_runtime_1.jsx)(styled_1.RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", (0, dayjs_1.default)(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 200 }, { children: (0, jsx_runtime_1.jsx)(Bar_1.default, {}) }))] })));
41
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [(0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreTypography, { children: [(0, utils_1.formatScore)(feScore || 0), (0, jsx_runtime_1.jsx)(styled_1.ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 50, height: 50 }, { children: !!feScore && feScore >= 80 && (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: (0, jsx_runtime_1.jsx)(styled_1.RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", (0, dayjs_1.default)(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 200 }, { children: (0, jsx_runtime_1.jsx)(Bar_1.default, {}) }))] })));
38
42
  };
39
43
  exports.default = Score;
@@ -26,7 +26,7 @@ var fbm_ui_1 = require("fbm-ui");
26
26
  var mui_1 = require("fbm-ui/lib/mui");
27
27
  var FAILED = ai_report_1.INTERVIEW_STATUS.FAILED, IN_CALCULATION = ai_report_1.INTERVIEW_STATUS.IN_CALCULATION;
28
28
  var ScoreReport = function (_a) {
29
- var onRefreshSuccess = _a.onRefreshSuccess;
29
+ var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess;
30
30
  var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.token, store.reportResult]; }), token = _b.token, reportResult = _b.reportResult;
31
31
  var _c = (reportResult || {}).status, status = _c === void 0 ? 0 : _c;
32
32
  var _d = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewRefresh)(token); }, {
@@ -40,7 +40,7 @@ var ScoreReport = function (_a) {
40
40
  return ((0, jsx_runtime_1.jsx)(mui_1.Paper, __assign({ id: "report-score", variant: "outlined" }, { children: (0, jsx_runtime_1.jsx)(Failed_1.default, { status: status, loading: loading, onRefresh: run }) })));
41
41
  }
42
42
  else {
43
- return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(Score_1.default, { loading: loading, onRefresh: run }), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (0, jsx_runtime_1.jsx)(Report_1.default, {})] })));
43
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(Score_1.default, { customScore: customScore, loading: loading, onRefresh: run }), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (0, jsx_runtime_1.jsx)(Report_1.default, {})] })));
44
44
  }
45
45
  };
46
46
  exports.default = ScoreReport;
@@ -2,9 +2,11 @@ export interface ScoreLegendProps {
2
2
  color: string;
3
3
  }
4
4
  export interface ScoreReportProps {
5
+ customScore?: number;
5
6
  onRefreshSuccess: () => void;
6
7
  }
7
8
  export interface ScoreProps {
9
+ customScore?: number;
8
10
  loading?: boolean;
9
11
  onRefresh: () => void;
10
12
  }
@@ -46,7 +46,7 @@ export declare const StyledSlider: import("@emotion/styled").StyledComponent<{
46
46
  name?: string | undefined;
47
47
  onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
48
48
  onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
49
- orientation?: "horizontal" | "vertical" | undefined;
49
+ orientation?: "vertical" | "horizontal" | undefined;
50
50
  scale?: ((value: number) => number) | undefined;
51
51
  step?: number | null | undefined;
52
52
  tabIndex?: number | undefined;
@@ -46,7 +46,7 @@ export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComp
46
46
  name?: string | undefined;
47
47
  onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
48
48
  onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
49
- orientation?: "horizontal" | "vertical" | undefined;
49
+ orientation?: "vertical" | "horizontal" | undefined;
50
50
  scale?: ((value: number) => number) | undefined;
51
51
  step?: number | null | undefined;
52
52
  tabIndex?: number | undefined;
@@ -150,6 +150,7 @@ export interface CustomInterviewDimRank {
150
150
  export declare type CustomInterviewDimRankMap = Record<string, CustomInterviewDimRank>;
151
151
  export interface AiReportProps {
152
152
  token: string;
153
+ customScore?: number;
153
154
  scoreRankIntervals?: ScoreRankInterval[];
154
155
  disabledScore?: boolean;
155
156
  reminderSent?: boolean;
@@ -3,6 +3,7 @@ import { AiReportProps, AiReportRef } from './interface';
3
3
  export declare const useAiReport: (props: AiReportProps) => {
4
4
  handleRefresh?: (() => void) | undefined;
5
5
  token: string;
6
+ customScore?: number | undefined;
6
7
  scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankInterval[] | undefined;
7
8
  disabledScore?: boolean | undefined;
8
9
  reminderSent?: boolean | undefined;
@@ -15,6 +15,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
15
15
  var fbm_ui_1 = require("fbm-ui");
16
16
  var TemplateHeader = function (_a) {
17
17
  var name = _a.name, onClose = _a.onClose, onSearch = _a.onSearch, onBack = _a.onBack;
18
- return name ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onBack }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.KeyboardArrowLeftIcon, {}) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500", ml: 1 }, { children: name }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))] }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500", ml: 3 }, { children: ["\u5C97\u4F4D\u6A21\u7248\u5E93", (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\uFF08\u6A21\u7248\u5E93\u53EF\u591A\u6B21\u4F7F\u7528\uFF09" }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))] })));
18
+ return name ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pr: 1, pt: 1, pb: 1.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", right: 16 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onBack }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.KeyboardArrowLeftIcon, {}) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500" }, { children: name }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))] }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pt: 1, pb: 1.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", weight: "500", ml: 3 }, { children: ["\u5C97\u4F4D\u6A21\u7248\u5E93", (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\uFF08\u6A21\u7248\u5E93\u53EF\u591A\u6B21\u4F7F\u7528\uFF09" }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))] })));
19
19
  };
20
20
  exports.default = TemplateHeader;
@@ -5,6 +5,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
5
5
  updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
6
6
  updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
7
7
  token: string;
8
+ customScore?: number | undefined;
8
9
  scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
9
10
  disabledScore?: boolean | undefined;
10
11
  reminderSent?: boolean | undefined;
@@ -31,6 +32,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
31
32
  updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
32
33
  updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
33
34
  token: string;
35
+ customScore?: number | undefined;
34
36
  scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
35
37
  disabledScore?: boolean | undefined;
36
38
  reminderSent?: boolean | undefined;
@@ -57,6 +59,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
57
59
  updateState: import("ahooks/lib/useSetState").SetState<AiReportProps>;
58
60
  updateReportResult: import("react").Dispatch<import("react").SetStateAction<Partial<AiInterviewReportList> | undefined>>;
59
61
  token: string;
62
+ customScore?: number | undefined;
60
63
  scoreRankIntervals?: import("../../modules/ai-report/components/RankingRange/interface").ScoreRankInterval[] | undefined;
61
64
  disabledScore?: boolean | undefined;
62
65
  reminderSent?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.34-beta.1",
3
+ "version": "1.2.34-beta.3",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",