eli-video-interview 1.2.20 → 1.2.25

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 (99) hide show
  1. package/esm/assets/icons/AI.svg +1 -0
  2. package/esm/components/AiHeaderTitle/index.d.ts +4 -0
  3. package/esm/components/AiHeaderTitle/index.js +19 -0
  4. package/esm/components/AiHeaderTitle/interface.d.ts +4 -0
  5. package/esm/components/AiHeaderTitle/interface.js +1 -0
  6. package/esm/modules/ai-ability/interface.d.ts +1 -0
  7. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
  8. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -7
  9. package/esm/modules/ai-question/components/AiAnalysis/index.js +9 -17
  10. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
  11. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +7 -0
  12. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
  13. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +24 -23
  14. package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
  15. package/esm/modules/ai-question/components/QuestionModel/index.js +6 -6
  16. package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +1 -1
  17. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +19 -10
  18. package/esm/modules/ai-question/components/QuestionUpdate/index.js +41 -8
  19. package/esm/modules/ai-question/interface.d.ts +2 -0
  20. package/esm/modules/ai-report/Root.js +7 -5
  21. package/esm/modules/ai-report/components/AIEvaluate/index.js +10 -9
  22. package/esm/modules/ai-report/components/ScoreReport/Report.js +13 -5
  23. package/esm/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
  24. package/esm/modules/ai-report/components/Suggestion/Suggestion.js +29 -0
  25. package/esm/modules/ai-report/components/Suggestion/index.d.ts +2 -0
  26. package/esm/modules/ai-report/components/Suggestion/index.js +27 -0
  27. package/esm/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
  28. package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
  29. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
  30. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -9
  31. package/esm/modules/ai-report/components/VideoQuestion/index.js +4 -3
  32. package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
  33. package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.js +24 -0
  34. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
  35. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +55 -0
  36. package/esm/modules/ai-report/components/WorkPlaces/index.d.ts +2 -0
  37. package/esm/modules/ai-report/components/WorkPlaces/index.js +67 -0
  38. package/esm/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
  39. package/esm/modules/ai-report/components/WorkPlaces/interface.js +1 -0
  40. package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
  41. package/esm/modules/ai-report/components/WorkPlaces/styled.js +27 -0
  42. package/esm/modules/ai-report/interface.d.ts +38 -0
  43. package/esm/services/ai-ability.d.ts +1 -0
  44. package/esm/services/ai-report.d.ts +5 -0
  45. package/esm/services/ai-report.js +4 -0
  46. package/esm/store/ai-ability/question-ability-store.d.ts +12 -0
  47. package/esm/store/ai-ability/question-ability-store.js +10 -0
  48. package/esm/store/ai-question/ai-analysis-store.d.ts +7 -3
  49. package/esm/store/ai-question/ai-analysis-store.js +24 -10
  50. package/lib/assets/icons/AI.svg +1 -0
  51. package/lib/components/AiHeaderTitle/index.d.ts +4 -0
  52. package/lib/components/AiHeaderTitle/index.js +24 -0
  53. package/lib/components/AiHeaderTitle/interface.d.ts +4 -0
  54. package/lib/components/AiHeaderTitle/interface.js +2 -0
  55. package/lib/modules/ai-ability/interface.d.ts +1 -0
  56. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
  57. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -7
  58. package/lib/modules/ai-question/components/AiAnalysis/index.js +8 -16
  59. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
  60. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +8 -1
  61. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
  62. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +24 -23
  63. package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
  64. package/lib/modules/ai-question/components/QuestionModel/index.js +6 -6
  65. package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +1 -1
  66. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +19 -10
  67. package/lib/modules/ai-question/components/QuestionUpdate/index.js +41 -8
  68. package/lib/modules/ai-question/interface.d.ts +2 -0
  69. package/lib/modules/ai-report/Root.js +7 -5
  70. package/lib/modules/ai-report/components/AIEvaluate/index.js +9 -8
  71. package/lib/modules/ai-report/components/ScoreReport/Report.js +13 -5
  72. package/lib/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
  73. package/lib/modules/ai-report/components/Suggestion/Suggestion.js +31 -0
  74. package/lib/modules/ai-report/components/Suggestion/index.d.ts +2 -0
  75. package/lib/modules/ai-report/components/Suggestion/index.js +32 -0
  76. package/lib/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
  77. package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
  78. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
  79. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -9
  80. package/lib/modules/ai-report/components/VideoQuestion/index.js +4 -3
  81. package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
  82. package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.js +26 -0
  83. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
  84. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +57 -0
  85. package/lib/modules/ai-report/components/WorkPlaces/index.d.ts +2 -0
  86. package/lib/modules/ai-report/components/WorkPlaces/index.js +72 -0
  87. package/lib/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
  88. package/lib/modules/ai-report/components/WorkPlaces/interface.js +2 -0
  89. package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
  90. package/lib/modules/ai-report/components/WorkPlaces/styled.js +30 -0
  91. package/lib/modules/ai-report/interface.d.ts +38 -0
  92. package/lib/services/ai-ability.d.ts +1 -0
  93. package/lib/services/ai-report.d.ts +5 -0
  94. package/lib/services/ai-report.js +6 -1
  95. package/lib/store/ai-ability/question-ability-store.d.ts +12 -0
  96. package/lib/store/ai-ability/question-ability-store.js +13 -0
  97. package/lib/store/ai-question/ai-analysis-store.d.ts +7 -3
  98. package/lib/store/ai-question/ai-analysis-store.js +24 -10
  99. package/package.json +1 -1
@@ -18,7 +18,9 @@ var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var AIEvaluate_1 = __importDefault(require("./components/AIEvaluate"));
19
19
  var NotFinish_1 = __importDefault(require("./components/NotFinish"));
20
20
  var ScoreReport_1 = __importDefault(require("./components/ScoreReport"));
21
+ var Suggestion_1 = __importDefault(require("./components/Suggestion"));
21
22
  var VideoQuestion_1 = __importDefault(require("./components/VideoQuestion"));
23
+ var WorkPlaces_1 = __importDefault(require("./components/WorkPlaces"));
22
24
  var ai_report_1 = require("../../enum/ai-report");
23
25
  var ai_report_2 = require("../../services/ai-report");
24
26
  var global_store_1 = require("../../store/ai-report/global-store");
@@ -30,8 +32,8 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
30
32
  var token = props.token, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
31
33
  var firstLoad = (0, react_1.useRef)(true);
32
34
  var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
33
- var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
34
- var _c = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
35
+ var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.suggestion, suggestion = _d === void 0 ? { abilitys: [] } : _d, _e = _b.workplaces, workplaces = _e === void 0 ? [] : _e;
36
+ var _f = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
35
37
  manual: true,
36
38
  onSuccess: function (_a) {
37
39
  var list = _a.data.list;
@@ -49,7 +51,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
49
51
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
50
52
  }
51
53
  },
52
- }), data = _c.data, loading = _c.loading, postAiInterviewResult = _c.run;
54
+ }), data = _f.data, loading = _f.loading, postAiInterviewResult = _f.run;
53
55
  var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
54
56
  var handleRefreshSuccess = (0, react_1.useCallback)(function () {
55
57
  postAiInterviewResult();
@@ -71,9 +73,9 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
71
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 ? '已提醒' : '发送提醒' })) }))] }))] })));
72
74
  }
73
75
  else {
74
- 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 }), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_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, { 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, {})] }));
75
77
  }
76
- }, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection]);
78
+ }, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces, suggestion]);
77
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 })));
78
80
  });
79
81
  AiReportRoot.displayName = 'AiReportRoot';
@@ -15,30 +15,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var utils_1 = require("../../utils");
18
19
  var Evaluate_1 = __importDefault(require("./Evaluate"));
19
20
  var Graph_1 = __importDefault(require("./Graph"));
20
21
  var global_store_1 = require("../../../../store/ai-report/global-store");
22
+ var AiHeaderTitle_1 = __importDefault(require("../../../../components/AiHeaderTitle"));
21
23
  var fbm_ui_1 = require("fbm-ui");
22
24
  var mui_1 = require("fbm-ui/lib/mui");
23
25
  var react_1 = require("react");
24
- var utils_1 = require("../../utils");
25
26
  var Index = function () {
26
- var _a;
27
- var _b = (0, global_store_1.useAiReportStore)(function (store) { return [
27
+ var _a, _b;
28
+ var _c = (0, global_store_1.useAiReportStore)(function (store) { return [
28
29
  store.reportResult,
29
30
  store.operableButtons,
30
- ]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension, customInterviewDimRankMap = _b.customInterviewDimRankMap;
31
- var _c = (0, react_1.useState)(true), expand = _c[0], setExpand = _c[1];
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];
32
33
  var handleExpandChange = (0, react_1.useCallback)(function () {
33
34
  setExpand(!expand);
34
35
  }, [expand]);
35
- if (!showAiDimension)
36
+ if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
36
37
  return null;
37
- 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) {
38
+ 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, 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) {
38
39
  var _a;
39
40
  var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
40
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));
41
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));
42
- }), (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 ? '收起' : '查看详情' }) }))] })));
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
44
  };
44
45
  exports.default = Index;
@@ -15,18 +15,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
- var react_1 = require("react");
19
- var fbm_ui_1 = require("fbm-ui");
18
+ var AiHeaderTitle_1 = __importDefault(require("../../../../components/AiHeaderTitle"));
20
19
  var ReportPie_1 = __importDefault(require("../../../../components/Charts/ReportPie"));
21
20
  // import ScoreLegend from './ScoreLegend';
22
21
  var ScoreBigBall_1 = __importDefault(require("../../../../components/ScoreBigBall"));
23
22
  var global_store_1 = require("../../../../store/ai-report/global-store");
23
+ var fbm_ui_1 = require("fbm-ui");
24
+ var react_1 = require("react");
24
25
  var Report = function () {
25
26
  var reportResult = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult]; }).reportResult;
26
- var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b;
27
+ var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b, _c = _a.summaryText, summaryText = _c === void 0 ? { sprintf: '', variables: [] } : _c;
27
28
  var title = (0, react_1.useMemo)(function () {
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
+ 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: "\u804C\u573A\u80FD\u529B\u4EE5\u53CA\u82F1\u6587\u8868\u8FBE\u80FD\u529B\u7684\u8BC4\u4EF7\u6807\u51C6\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "\u5F53\u5019\u9009\u4EBA\u7684\u8BE5\u9879\u80FD\u529B\u7EFC\u5408\u5F97\u5206\u5927\u4E8E\u7B49\u4E8E80\u65F6\u4E3A\u4F18\u79C0\uFF1B" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "\u5F53\u5019\u9009\u4EBA\u7684\u8BE5\u9879\u80FD\u529B\u7EFC\u5408\u5F97\u5206\u5927\u4E8E\u7B49\u4E8E60\u5C0F\u4E8E80\u65F6\u4E3A\u9002\u4E2D\uFF1B" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "\u5F53\u5019\u9009\u4EBA\u7684\u8BE5\u9879\u80FD\u529B\u7EFC\u5408\u5F97\u5206\u5C0F\u4E8E60\u65F6\u4E3A\u6B20\u4F73\uFF1B" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u5176\u4ED6AI\u57FA\u7840\u80FD\u529B\u7684\u8BC4\u4EF7\u6807\u51C6\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff", style: { textIndent: '2em' } }, { children: "AI\u57FA\u7840\u80FD\u529B\u7684\u8BC4\u4EF7\u6807\u51C6\u4E3A\uFF1A\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u4EE5\u5168\u56FD\u6570\u636E\u7684\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2AAI\u57FA\u7840\u80FD\u529B\u7684\u6700\u7EC8\u5F97\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, color: "#fff" }, { children: "\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002" }))] }));
29
30
  }, []);
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
+ var showSummaryText = (0, react_1.useMemo)(function () {
32
+ var _a = summaryText.sprintf, sprintf = _a === void 0 ? '' : _a, _b = summaryText.variables, variables = _b === void 0 ? [] : _b;
33
+ var textList = (sprintf === null || sprintf === void 0 ? void 0 : sprintf.split('%s')) || [];
34
+ return textList.map(function (text, index) {
35
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", __assign({ style: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.56)' } }, { children: text })), (0, jsx_runtime_1.jsx)("span", __assign({ style: { fontSize: 14, color: '#4CAF50' } }, { children: variables[index] || '' }))] }));
36
+ });
37
+ }, [summaryText]);
38
+ 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)(AiHeaderTitle_1.default, { name: "\u7EFC\u5408\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 })] })), showSummaryText.length > 0 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "block", width: 498, style: { backgroundColor: '#FAFAFA', padding: 8, margin: '0 auto 16px' } }, { children: showSummaryText })))] })));
31
39
  };
32
40
  exports.default = Report;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { SuggestionAbility } from '../../interface';
3
+ declare const Suggestion: React.FC<SuggestionAbility>;
4
+ export default Suggestion;
@@ -0,0 +1,31 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var fbm_ui_1 = require("fbm-ui");
16
+ var mui_1 = require("fbm-ui/lib/mui");
17
+ var TagTitle = (0, fbm_ui_1.styled)(mui_1.Box)(function () { return ({
18
+ width: 100,
19
+ height: 32,
20
+ display: 'inline-block',
21
+ textAlign: 'center',
22
+ color: 'RGBA(0, 0, 0, 0.86)',
23
+ borderLeft: '4px solid #4CAF50',
24
+ backgroundColor: '#E8F5E9',
25
+ margin: '24px 0 16px',
26
+ }); });
27
+ var Suggestion = function (_a) {
28
+ var abilityName = _a.abilityName, interviewQuestion = _a.interviewQuestion, keyPoints = _a.keyPoints;
29
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(TagTitle, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px' } }, { children: abilityName })) }), (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", flexDirection: "column", style: { background: '#FAFAFA', borderRadius: 8, padding: 16, flex: 1 }, mr: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center", mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.BulbFilledIcon, { style: { color: '#4CAF50', fontSize: 16 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { marginLeft: 4 } }, { children: "\u9762\u8BD5\u95EE\u9898" }))] })), interviewQuestion.map(function (v, index) { return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.CopyIcon, { style: { color: '#81C784', fontSize: 16, marginTop: 4 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { marginLeft: 4 }, color: "secondary" }, { children: v }))] }), index)); })] })), (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", flexDirection: "column", style: { background: '#FFF3E0', borderRadius: 8, padding: 16, flex: 1 } }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center", mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.LayerIcon, { style: { color: '#FF9800', fontSize: 16 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { marginLeft: 4 } }, { children: "\u8BC4\u5206\u5173\u952E\u70B9" }))] })), keyPoints.map(function (v, index) { return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.CopyIcon, { style: { color: '#FFB74D', fontSize: 16, marginTop: 4 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { marginLeft: 4 }, color: "secondary" }, { children: v }))] }), index)); })] }))] }))] }));
30
+ };
31
+ exports.default = Suggestion;
@@ -0,0 +1,2 @@
1
+ declare const Index: () => JSX.Element | null;
2
+ export default Index;
@@ -0,0 +1,32 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var Suggestion_1 = __importDefault(require("./Suggestion"));
19
+ var global_store_1 = require("../../../../store/ai-report/global-store");
20
+ var AiHeaderTitle_1 = __importDefault(require("../../../../components/AiHeaderTitle"));
21
+ var fbm_ui_1 = require("fbm-ui");
22
+ var mui_1 = require("fbm-ui/lib/mui");
23
+ var Index = function () {
24
+ var _a, _b, _c, _d;
25
+ var _e = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult]; }), reportResult = _e.reportResult, showAiDimension = _e.showAiDimension;
26
+ if (!showAiDimension || !((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _a === void 0 ? void 0 : _a.show))
27
+ return null;
28
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, variant: "outlined", px: 2, mt: 2, pb: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1 }, { children: (0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u8003\u5BDF\u5EFA\u8BAE" }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", mt: 1 }, { children: (_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _b === void 0 ? void 0 : _b.text })), (0, jsx_runtime_1.jsx)(mui_1.Collapse, __assign({ in: true }, { children: (_d = (_c = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _c === void 0 ? void 0 : _c.abilitys) === null || _d === void 0 ? void 0 : _d.map(function (v) {
29
+ return (0, jsx_runtime_1.jsx)(Suggestion_1.default, { abilityName: v.abilityName, interviewQuestion: v.interviewQuestion, keyPoints: v.keyPoints }, v.abilityName);
30
+ }) }))] })));
31
+ };
32
+ exports.default = Index;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { AbilitiesProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const Abilities: FC<AbilitiesProps>;
4
4
  export default Abilities;
@@ -15,16 +15,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
- var react_1 = require("react");
18
+ var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
19
+ var global_store_1 = require("../../../../store/ai-report/global-store");
19
20
  var fbm_ui_1 = require("fbm-ui");
20
21
  var immutability_helper_1 = __importDefault(require("immutability-helper"));
21
- var global_store_1 = require("../../../../store/ai-report/global-store");
22
- var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
22
+ var react_1 = require("react");
23
23
  var Abilities = function (_a) {
24
24
  var stepIndex = _a.stepIndex;
25
25
  var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult]; }), reportResult = _b.reportResult, updateReportResult = _b.updateReportResult, onScoreChange = _b.onScoreChange;
26
26
  var steps = (reportResult || {}).steps;
27
- var handleChangeCommitted = (0, react_1.useCallback)(function (score, index) {
27
+ var handleChangeCommitted = (0, react_1.useCallback)(function (score, index, type) {
28
28
  var _a, _b;
29
29
  var newSteps = (0, immutability_helper_1.default)(steps, (_a = {}, _a[stepIndex] = { scoreInfo: { abilities: (_b = {}, _b[index] = { finalScore: { $set: score } }, _b) } }, _a));
30
30
  updateReportResult(__assign(__assign({}, reportResult), { steps: newSteps }));
@@ -39,7 +39,7 @@ var Abilities = function (_a) {
39
39
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 3 }, { children: steps &&
40
40
  steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
41
41
  var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
42
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: name })), (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: 400, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto", onChangeCommitted: function (score) { return handleChangeCommitted(score, index); } })] }, name));
42
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: name })), (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: 400, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto", onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
43
43
  }) }))] })));
44
44
  };
45
45
  exports.default = Abilities;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { QuestionItemProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const QuestionItem: FC<QuestionItemProps>;
4
4
  export default QuestionItem;
@@ -15,19 +15,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
- var react_1 = require("react");
19
- var fbm_ui_1 = require("fbm-ui");
20
- var ThemeProvider_1 = require("fbm-ui/lib/components/ThemeProvider");
21
- var mui_1 = require("fbm-ui/lib/mui");
22
- var immutability_helper_1 = __importDefault(require("immutability-helper"));
18
+ var Abilities_1 = __importDefault(require("./Abilities"));
19
+ var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
20
+ var styled_1 = require("./styled");
23
21
  var ai_question_1 = require("../../../../enum/ai-question");
24
22
  var ai_report_1 = require("../../../../enum/ai-report");
25
23
  var FormatQuote_1 = __importDefault(require("@mui/icons-material/FormatQuote"));
26
24
  var global_store_1 = require("../../../../store/ai-report/global-store");
27
25
  var utils_1 = require("../../../../utils/utils");
28
- var Abilities_1 = __importDefault(require("./Abilities"));
29
- var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
30
- var styled_1 = require("./styled");
26
+ var fbm_ui_1 = require("fbm-ui");
27
+ var ThemeProvider_1 = require("fbm-ui/lib/components/ThemeProvider");
28
+ var mui_1 = require("fbm-ui/lib/mui");
29
+ var immutability_helper_1 = __importDefault(require("immutability-helper"));
30
+ var react_1 = require("react");
31
31
  var STEP_NO_ANSWER = ai_report_1.INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = ai_report_1.INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
32
32
  var QuestionItem = function (props) {
33
33
  var token = props.token, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
@@ -91,6 +91,6 @@ var QuestionItem = function (props) {
91
91
  mt: 2,
92
92
  cursor: videoUrl ? 'pointer' : 'inherit',
93
93
  borderColor: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : '',
94
- }, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { originScore: originScore, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index })] }), token));
94
+ }, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { originScore: originScore, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index })] }), token));
95
95
  };
96
96
  exports.default = QuestionItem;
@@ -15,12 +15,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
- var fbm_ui_1 = require("fbm-ui");
19
- var global_store_1 = require("../../../../store/ai-report/global-store");
20
18
  var QuestionItem_1 = __importDefault(require("./QuestionItem"));
19
+ var AiHeaderTitle_1 = __importDefault(require("../../../../components/AiHeaderTitle"));
20
+ var global_store_1 = require("../../../../store/ai-report/global-store");
21
+ var fbm_ui_1 = require("fbm-ui");
21
22
  var VideoQuestion = function () {
22
23
  var reportResult = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }).reportResult;
23
24
  var steps = (reportResult || {}).steps;
24
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ padding: "24px 0" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 500 }, { children: "\u89C6\u9891\u9898\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return (0, jsx_runtime_1.jsx)(QuestionItem_1.default, __assign({ index: index }, item), item.token); })) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) })] })));
25
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ component: fbm_ui_1.Paper, pl: 2, pt: 2, pr: 2, style: { background: '#fff', border: '1px solid rgb(244, 244, 244)' }, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u89C6\u9891\u9898" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 3 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return (0, jsx_runtime_1.jsx)(QuestionItem_1.default, __assign({ index: index }, item), item.token); })) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
25
26
  };
26
27
  exports.default = VideoQuestion;
@@ -0,0 +1,4 @@
1
+ import { ScoreSliderProps } from './interface';
2
+ import { FC } from 'react';
3
+ declare const ScoreSlider: FC<ScoreSliderProps>;
4
+ export default ScoreSlider;
@@ -0,0 +1,26 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var styled_1 = require("./styled");
16
+ var fbm_ui_1 = require("fbm-ui");
17
+ var ScoreColorMap = {
18
+ 1: '#4CAF50',
19
+ 2: '#000000',
20
+ 3: '#FF6C6C',
21
+ };
22
+ var ScoreSlider = function (props) {
23
+ var _a = props.width, width = _a === void 0 ? 320 : _a, score = props.score, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'off' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.scoreText, scoreText = _d === void 0 ? '' : _d, _e = props.scoreLevel, scoreLevel = _e === void 0 ? 2 : _e;
24
+ return ((0, jsx_runtime_1.jsxs)(styled_1.ScoreSliderRoot, __assign({ width: width }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: width, display: "flex", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ flexShrink: 0, variant: "body2", fontWeight: "medium" }, { children: "\u5019\u9009\u4EBA\u8868\u73B0" })), isShowLabel && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: ScoreColorMap[scoreLevel], variant: "body2", fontWeight: "medium" }, { children: [score, "\u5206"] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ color: ScoreColorMap[scoreLevel], variant: "body2", fontWeight: "medium", ml: 1 }, { children: scoreText }))] })))] })), (0, jsx_runtime_1.jsx)(styled_1.WorkplaceStyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score })] })));
25
+ };
26
+ exports.default = ScoreSlider;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare type Mode = 'edit' | 'show';
3
+ interface WorkplaceProps {
4
+ token: string;
5
+ answer: string;
6
+ bgcolor?: string;
7
+ mode?: Mode;
8
+ canEdit?: boolean;
9
+ }
10
+ declare const Evaluate: React.FC<WorkplaceProps>;
11
+ export default Evaluate;
@@ -0,0 +1,57 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var ai_report_1 = require("../../../../services/ai-report");
16
+ var fbm_ui_1 = require("fbm-ui");
17
+ var mui_1 = require("fbm-ui/lib/mui");
18
+ var react_1 = require("react");
19
+ var Evaluate = function (_a) {
20
+ var answer = _a.answer, token = _a.token, bgcolor = _a.bgcolor, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'true' : _c;
21
+ var _d = (0, react_1.useState)(answer), content = _d[0], setContent = _d[1];
22
+ var _e = (0, react_1.useState)('show'), internalMode = _e[0], setInternalMode = _e[1];
23
+ var handleChange = (0, react_1.useCallback)(function (e) {
24
+ var value = e.target.value;
25
+ setContent(value);
26
+ }, []);
27
+ var handleModeChange = (0, react_1.useCallback)(function () {
28
+ setInternalMode(internalMode === 'show' ? 'edit' : 'show');
29
+ }, [internalMode]);
30
+ var handleSubmit = (0, react_1.useCallback)(function () {
31
+ (0, fbm_ui_1.confirm)({
32
+ header: null,
33
+ content: '确认将评价内容修改吗?该动作无法被撤销。',
34
+ okText: '修改',
35
+ okProps: {
36
+ color: 'error',
37
+ variant: 'contained',
38
+ },
39
+ onOk: function (_a) {
40
+ var onClose = _a.onClose;
41
+ var data = {
42
+ token: token,
43
+ answer: content,
44
+ };
45
+ (0, ai_report_1.PostAiInterviewWorkplace)(data).then(handleModeChange).then(onClose).catch(console.log);
46
+ },
47
+ });
48
+ }, [token, content, handleModeChange]);
49
+ (0, react_1.useEffect)(function () {
50
+ setInternalMode(mode);
51
+ }, [mode]);
52
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "flex-end" }, { children: 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', pr: 0 }, 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 () {
53
+ handleModeChange();
54
+ setContent(answer);
55
+ } }, { 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)(mui_1.Box, __assign({ style: { padding: 8, borderRadius: 4, overflow: 'hidden', background: bgcolor } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
56
+ };
57
+ exports.default = Evaluate;
@@ -0,0 +1,2 @@
1
+ declare const Index: () => JSX.Element | null;
2
+ export default Index;
@@ -0,0 +1,72 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
19
+ var WorkPlace_1 = __importDefault(require("./WorkPlace"));
20
+ var global_store_1 = require("../../../../store/ai-report/global-store");
21
+ var AiHeaderTitle_1 = __importDefault(require("../../../../components/AiHeaderTitle"));
22
+ var colors_1 = require("@mui/material/colors");
23
+ var fbm_ui_1 = require("fbm-ui");
24
+ var mui_1 = require("fbm-ui/lib/mui");
25
+ var TagTitle = (0, fbm_ui_1.styled)(mui_1.Box)(function (bgcolor) { return ({
26
+ position: 'relative',
27
+ width: 100,
28
+ height: 32,
29
+ display: 'inline-block',
30
+ textAlign: 'center',
31
+ backgroundColor: bgcolor[200],
32
+ margin: '8px 0 16px',
33
+ '&:before': {
34
+ position: 'absolute',
35
+ content: '""',
36
+ right: '-16px',
37
+ top: 0,
38
+ width: 0,
39
+ height: 0,
40
+ borderStyle: 'solid',
41
+ borderColor: 'transparent',
42
+ borderTop: 'solid #fff',
43
+ borderWidth: '16px',
44
+ },
45
+ '&:after': {
46
+ position: 'absolute',
47
+ content: '""',
48
+ right: '-16px',
49
+ top: 0,
50
+ width: 0,
51
+ height: 0,
52
+ borderStyle: 'solid',
53
+ borderColor: 'transparent',
54
+ borderBottom: 'solid #fff',
55
+ borderWidth: '16px',
56
+ },
57
+ }); });
58
+ var ColorIndexMap = {
59
+ 0: colors_1.blue,
60
+ 1: colors_1.orange,
61
+ 2: colors_1.purple,
62
+ };
63
+ var Index = function () {
64
+ var _a;
65
+ var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension;
66
+ if (!showAiDimension)
67
+ return null;
68
+ 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.jsx)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: (0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u804C\u573A\u80FD\u529B\u8868\u73B0" }) })), (0, jsx_runtime_1.jsx)(mui_1.Collapse, __assign({ in: true }, { children: (_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaces) === null || _a === void 0 ? void 0 : _a.map(function (v, idx) {
69
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff' } }, { children: v.dimensionName })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, (0, jsx_runtime_1.jsx)("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ pl: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(WorkPlace_1.default, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
70
+ }) }))] })));
71
+ };
72
+ exports.default = Index;
@@ -0,0 +1,7 @@
1
+ import { WorkPlaceScoreInfo } from '../../interface';
2
+ export interface ScoreSliderProps extends Pick<WorkPlaceScoreInfo, 'score' | 'scoreText' | 'scoreLevel'> {
3
+ width?: any;
4
+ valueLabelDisplay?: 'on' | 'off' | 'auto';
5
+ isShowLabel?: boolean;
6
+ onChangeCommitted?: (score: number) => void;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });