eli-video-interview 1.2.42-alpha.4 → 1.2.42-alpha.41

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 (135) hide show
  1. package/esm/components/AiHeaderTitle/index.js +1 -8
  2. package/esm/components/AiHeaderTitleV2/index.d.ts +4 -0
  3. package/esm/components/AiHeaderTitleV2/index.js +39 -0
  4. package/esm/components/AiHeaderTitleV2/interface.d.ts +4 -0
  5. package/esm/components/AiHeaderTitleV2/interface.js +1 -0
  6. package/esm/components/Charts/ReportPie.js +13 -3
  7. package/esm/components/Charts/const.js +3 -3
  8. package/esm/components/ScoreBigBall/index.js +1 -1
  9. package/esm/constants/ai-question.d.ts +1 -1
  10. package/esm/constants/ai-question.js +3 -3
  11. package/esm/enum/ai-question.d.ts +3 -1
  12. package/esm/enum/ai-question.js +2 -0
  13. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +15 -0
  14. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +17 -2
  15. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +48 -42
  16. package/esm/modules/ai-question/components/BaseAccordion/index.js +4 -4
  17. package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
  18. package/esm/modules/ai-question/components/QuestionModel/Item.js +3 -3
  19. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +6 -2
  20. package/esm/modules/ai-question/components/QuestionTemplate/index.js +1 -1
  21. package/esm/modules/ai-question/components/QuestionUpdate/index.js +1 -1
  22. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
  23. package/esm/modules/ai-report/Root.js +6 -3
  24. package/esm/modules/ai-report/interface.d.ts +2 -0
  25. package/esm/modules/ai-report/useAiReport.d.ts +2 -0
  26. package/esm/modules/ai-report/useAiReport.js +3 -1
  27. package/esm/modules/ai-report-v2/Root.d.ts +2 -2
  28. package/esm/modules/ai-report-v2/Root.js +29 -17
  29. package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
  30. package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +33 -19
  31. package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +12 -0
  32. package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +35 -21
  33. package/esm/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
  34. package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
  35. package/esm/modules/ai-report-v2/components/Candidate/Candidate.js +8 -2
  36. package/esm/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
  37. package/esm/modules/ai-report-v2/components/Candidate/Podium.js +2 -2
  38. package/esm/modules/ai-report-v2/components/Form/Form.js +35 -13
  39. package/esm/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
  40. package/esm/modules/ai-report-v2/components/Form/Forms.js +4 -4
  41. package/esm/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
  42. package/esm/modules/ai-report-v2/components/Form/Nps.js +2 -0
  43. package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
  44. package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +28 -10
  45. package/esm/modules/ai-report-v2/components/Suggestion/index.js +1 -1
  46. package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
  47. package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +79 -0
  48. package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +40 -25
  49. package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
  50. package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +71 -6
  51. package/esm/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
  52. package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
  53. package/esm/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
  54. package/esm/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
  55. package/esm/modules/ai-report-v2/components/WorkPlaces/index.js +1 -1
  56. package/esm/modules/ai-report-v2/components/styled.d.ts +1 -0
  57. package/esm/modules/ai-report-v2/components/styled.js +12 -2
  58. package/esm/modules/ai-report-v2/interface.d.ts +5 -2
  59. package/esm/modules/ai-report-v2/useAiReport.d.ts +5 -1
  60. package/esm/modules/ai-report-v2/useAiReport.js +3 -1
  61. package/esm/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
  62. package/esm/modules/ai-report-v2/useAiReportVersion.js +37 -0
  63. package/esm/services/ai-report.d.ts +10 -0
  64. package/esm/services/ai-report.js +2 -0
  65. package/esm/store/ai-question/ai-analysis-store.d.ts +1 -1
  66. package/esm/store/ai-question/ai-analysis-store.js +1 -1
  67. package/esm/store/ai-report/global-store.d.ts +3 -0
  68. package/lib/components/AiHeaderTitle/index.js +1 -8
  69. package/lib/components/AiHeaderTitleV2/index.d.ts +4 -0
  70. package/lib/components/AiHeaderTitleV2/index.js +41 -0
  71. package/lib/components/AiHeaderTitleV2/interface.d.ts +4 -0
  72. package/lib/components/AiHeaderTitleV2/interface.js +2 -0
  73. package/lib/components/Charts/ReportPie.js +13 -3
  74. package/lib/components/Charts/const.js +3 -3
  75. package/lib/components/ScoreBigBall/index.js +1 -1
  76. package/lib/constants/ai-question.d.ts +1 -1
  77. package/lib/constants/ai-question.js +3 -3
  78. package/lib/enum/ai-question.d.ts +3 -1
  79. package/lib/enum/ai-question.js +2 -0
  80. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +15 -0
  81. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +18 -3
  82. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +45 -39
  83. package/lib/modules/ai-question/components/BaseAccordion/index.js +4 -4
  84. package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
  85. package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
  86. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -1
  87. package/lib/modules/ai-question/components/QuestionTemplate/index.js +1 -1
  88. package/lib/modules/ai-question/components/QuestionUpdate/index.js +1 -1
  89. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
  90. package/lib/modules/ai-report/Root.js +6 -3
  91. package/lib/modules/ai-report/interface.d.ts +2 -0
  92. package/lib/modules/ai-report/useAiReport.d.ts +2 -0
  93. package/lib/modules/ai-report/useAiReport.js +6 -1
  94. package/lib/modules/ai-report-v2/Root.d.ts +2 -2
  95. package/lib/modules/ai-report-v2/Root.js +28 -16
  96. package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
  97. package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +30 -16
  98. package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +12 -0
  99. package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +36 -20
  100. package/lib/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
  101. package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
  102. package/lib/modules/ai-report-v2/components/Candidate/Candidate.js +7 -1
  103. package/lib/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
  104. package/lib/modules/ai-report-v2/components/Candidate/Podium.js +1 -1
  105. package/lib/modules/ai-report-v2/components/Form/Form.js +35 -13
  106. package/lib/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
  107. package/lib/modules/ai-report-v2/components/Form/Forms.js +4 -4
  108. package/lib/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
  109. package/lib/modules/ai-report-v2/components/Form/Nps.js +2 -0
  110. package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
  111. package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +27 -9
  112. package/lib/modules/ai-report-v2/components/Suggestion/index.js +2 -2
  113. package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
  114. package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +81 -0
  115. package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +38 -23
  116. package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
  117. package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +69 -4
  118. package/lib/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
  119. package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
  120. package/lib/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
  121. package/lib/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
  122. package/lib/modules/ai-report-v2/components/WorkPlaces/index.js +2 -2
  123. package/lib/modules/ai-report-v2/components/styled.d.ts +1 -0
  124. package/lib/modules/ai-report-v2/components/styled.js +13 -3
  125. package/lib/modules/ai-report-v2/interface.d.ts +5 -2
  126. package/lib/modules/ai-report-v2/useAiReport.d.ts +5 -1
  127. package/lib/modules/ai-report-v2/useAiReport.js +6 -1
  128. package/lib/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
  129. package/lib/modules/ai-report-v2/useAiReportVersion.js +41 -0
  130. package/lib/services/ai-report.d.ts +10 -0
  131. package/lib/services/ai-report.js +5 -1
  132. package/lib/store/ai-question/ai-analysis-store.d.ts +1 -1
  133. package/lib/store/ai-question/ai-analysis-store.js +1 -1
  134. package/lib/store/ai-report/global-store.d.ts +3 -0
  135. package/package.json +1 -1
@@ -14,13 +14,6 @@ import SvgIcon from "../SvgIcon";
14
14
  import { Box, Typography } from 'fbm-ui';
15
15
  var AiHeaderTitle = function (_a) {
16
16
  var name = _a.name;
17
- return (_jsxs(Box, __assign({ display: "inline-flex", sx: {
18
- pl: 3,
19
- color: '#009D56',
20
- pt: 0.5,
21
- background: 'url(//webcdn.fbmms.cn/assets/yt-b/yf2BqqIlr8Xtb8N2o44t1) no-repeat center center',
22
- backgroundSize: 'contain',
23
- width: 24 + (56 / 4) * name.length + 84,
24
- } }, { children: [_jsx(SvgIcon, { name: "AI" }), _jsx(Typography, __assign({ variant: "h6", color: "inherit" }, { children: name }))] })));
17
+ return (_jsxs(Box, __assign({ display: "inline-flex" }, { children: [_jsx(SvgIcon, { name: "AI" }), _jsx(Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 }, ml: 1 }, { children: name }))] })));
25
18
  };
26
19
  export default AiHeaderTitle;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { AiHeaderProps } from './interface';
3
+ declare const AiHeaderTitle: React.FC<AiHeaderProps>;
4
+ export default AiHeaderTitle;
@@ -0,0 +1,39 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { DinTypography } from "../../modules/ai-report-v2/components/styled";
14
+ import { Stack } from 'fbm-ui/lib/mui';
15
+ var AiHeaderTitle = function (_a) {
16
+ var name = _a.name;
17
+ return (_jsxs(Stack, __assign({ display: "inline-flex", direction: "row", spacing: 1, sx: {
18
+ left: -12,
19
+ top: -8,
20
+ height: 48,
21
+ position: 'relative',
22
+ color: '#009D56',
23
+ borderRadius: '8px 0px 8px 8px',
24
+ background: 'linear-gradient( 360deg, #98F79C 0%, #C2FCC4 100%)',
25
+ width: 155,
26
+ alignItems: 'center',
27
+ '&:after': {
28
+ content: "''",
29
+ position: 'absolute',
30
+ top: 0,
31
+ right: -5,
32
+ width: 0,
33
+ height: 0,
34
+ borderTop: '8px solid transparent',
35
+ borderLeft: '5px solid #6CD970',
36
+ },
37
+ } }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/H4yH/zOBWGb2Np_QoyQk_EH_eZ", alt: "", style: { marginLeft: 16, width: 32, height: 20 } }), _jsx(DinTypography, __assign({ variant: "h6", color: "inherit" }, { children: name }))] })));
38
+ };
39
+ export default AiHeaderTitle;
@@ -0,0 +1,4 @@
1
+ export interface AiHeaderProps {
2
+ name: string;
3
+ style?: any;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -50,6 +50,16 @@ var formateTitle = function (originalTitle) {
50
50
  var _a = __read(originalTitle.match(regex), 2), no = _a[1];
51
51
  return "\u7B2C".concat(no, "\u9898");
52
52
  };
53
+ var getLevel = function (score) {
54
+ switch (true) {
55
+ case score >= 80:
56
+ return 3;
57
+ case score >= 60:
58
+ return 2;
59
+ default:
60
+ return 1;
61
+ }
62
+ };
53
63
  var ReportPie = function (props) {
54
64
  var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
55
65
  var scores = source.map(function (_a) {
@@ -125,15 +135,15 @@ var ReportPie = function (props) {
125
135
  formatter: function (_a) {
126
136
  var _b;
127
137
  var value = _a.value, dataIndex = _a.dataIndex;
128
- return ((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight) || 0;
138
+ return "".concat(((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight.toFixed(2).replace(/\.00$/, '')) || 0, "%");
129
139
  },
130
140
  fontSize: 14,
131
141
  },
132
142
  itemStyle: {
133
143
  color: function (_a) {
134
144
  var _b;
135
- var level = _a.data.level;
136
- return (_b = levelMapping[level]) === null || _b === void 0 ? void 0 : _b.itemColor;
145
+ var avgScore = _a.data.avgScore;
146
+ return (_b = levelMapping[getLevel(avgScore)]) === null || _b === void 0 ? void 0 : _b.itemColor;
137
147
  },
138
148
  shadowBlur: 4,
139
149
  shadowColor: 'rgba(0, 0, 0, 0.16)',
@@ -1,17 +1,17 @@
1
1
  export var levelMapping = {
2
2
  3: {
3
3
  text: '优秀',
4
- itemColor: '#00D99D',
4
+ itemColor: 'rgba(255, 153,2)',
5
5
  color: 'rgb(255, 153, 3)',
6
6
  },
7
7
  2: {
8
8
  text: '适中',
9
- itemColor: 'rgb(166, 234, 193)',
9
+ itemColor: 'rgba(0, 217,157)',
10
10
  color: 'rgba(0, 217, 157)',
11
11
  },
12
12
  1: {
13
13
  text: '欠佳',
14
- itemColor: '#00D99D',
14
+ itemColor: 'rgba(99, 156,255)',
15
15
  color: 'rgb(98, 156, 255)',
16
16
  },
17
17
  };
@@ -15,7 +15,7 @@ import BigBallSvg from "../BigBallSvg";
15
15
  import { formatScore } from "../../utils/utils";
16
16
  var ScoreBigBall = function (_a) {
17
17
  var score = _a.score, status = _a.status, _b = _a.width, width = _b === void 0 ? 80 : _b, _c = _a.height, height = _c === void 0 ? 80 : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 20 : _d;
18
- return (_jsxs(_Fragment, { children: [_jsxs(ScoreBigBallRoot, __assign({ width: width, height: height, sx: { backgroundColor: status === 1 ? '#fbfbfb' : 'rgba(59, 203, 120, 0.1)' } }, { children: [status !== 1 && _jsx(BigBallSvg, {}), status === 1 && (_jsx("div", __assign({ style: { color: 'rgba(0,0,0,0.26)', fontSize: '12px' } }, { children: _jsx("span", { children: "\u5019\u9009\u4EBA\u672A\u4F5C\u7B54" }) }))), status === 2 && (_jsx("div", __assign({ style: { color: '#40be47' } }, { children: _jsx("span", { children: "\u8BA1\u7B97\u4E2D..." }) }))), status === 3 && (_jsxs("div", __assign({ style: { color: '#40be47' } }, { children: [_jsx("span", __assign({ style: { fontFamily: 'DIN Alternate Bold', fontSize: fontSize, fontWeight: 'bold' } }, { children: formatScore(score) > 100 ? 100 : formatScore(score) })), _jsx("span", __assign({ style: { marginLeft: '2px', fontSize: '12px' } }, { children: "\u5206" }))] })))] })), status === 2 && (_jsx("div", { style: {
18
+ return (_jsxs(_Fragment, { children: [_jsxs(ScoreBigBallRoot, __assign({ width: width, height: height, sx: { backgroundColor: status === 1 ? '#fbfbfb' : 'rgba(59, 203, 120, 0.1)' } }, { children: [status !== 1 && _jsx(BigBallSvg, {}), status === 1 && (_jsx("div", __assign({ style: { color: 'rgba(0,0,0,0.26)', fontSize: '12px' } }, { children: _jsx("span", { children: "\u5019\u9009\u4EBA\u672A\u4F5C\u7B54" }) }))), status === 2 && (_jsx("div", __assign({ style: { color: '#40be47' } }, { children: _jsx("span", { children: "\u8BA1\u7B97\u4E2D..." }) }))), status === 3 && (_jsxs("div", __assign({ style: { color: '#40be47' } }, { children: [_jsx("span", __assign({ style: { fontFamily: 'MiSans TC', fontSize: fontSize, fontWeight: 'bold' } }, { children: formatScore(score) > 100 ? 100 : formatScore(score) })), _jsx("span", __assign({ style: { marginLeft: '2px', fontSize: '12px' } }, { children: "\u5206" }))] })))] })), status === 2 && (_jsx("div", { style: {
19
19
  position: 'absolute',
20
20
  top: 0,
21
21
  right: 0,
@@ -54,5 +54,5 @@ export declare const TEST_TYPE_READONLY: number[];
54
54
  export declare const DISABLED_REPEAT_TYPE: number[];
55
55
  export declare const DISABLED_COST_TYPE: number[];
56
56
  export declare const IS_AI_ANALYSIS: (step: Pick<QuestionParams, 'aiType'>) => boolean;
57
- export declare const IS_AI_FOLLOW_UP: (step: QuestionParams, interaction: InteractionMethod[]) => boolean;
57
+ export declare const IS_AI_FOLLOW_UP: (step: QuestionParams, interaction: InteractionMethod[], interactType: number) => boolean;
58
58
  export declare const MAX_RANDOM_QUESTION_NUM = 50;
@@ -96,12 +96,12 @@ export var DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
96
96
  // 是否开启AI分析
97
97
  export var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
98
98
  // 是否可以追问
99
- export var IS_AI_FOLLOW_UP = function (step, interaction) {
100
- return step.aiShowType === 1 && (step.broadcastType === 2 || !IS_VIRTUAL_HUMAN(interaction));
99
+ export var IS_AI_FOLLOW_UP = function (step, interaction, interactType) {
100
+ return step.aiShowType === 1 && (interactType === 1 || !IS_VIRTUAL_HUMAN(interaction) || step.broadcastType === 2);
101
101
  };
102
102
  var IS_VIRTUAL_HUMAN = function (interaction) {
103
103
  if (interaction.length === 0)
104
104
  return false;
105
- return interaction.some(function (v) { var _a; return v.selected && (v.type === 2 || (v.type === 3 && ((_a = v.detail.interviewerShows) === null || _a === void 0 ? void 0 : _a.some(function (v) { return v.selected && v.humanType === 2; }))) || false); });
105
+ return interaction.some(function (v) { var _a; return v.selected && (v.type === 2 || (v.type === 3 && ((_a = v.detail.interviewerShows) === null || _a === void 0 ? void 0 : _a.some(function (v) { return v.selected && v.humanType === 2; })))); });
106
106
  };
107
107
  export var MAX_RANDOM_QUESTION_NUM = 50;
@@ -24,7 +24,9 @@ export declare enum LANGUAGE_TYPE {
24
24
  MANDARIN = 2,
25
25
  CANTONESE = 13,
26
26
  JAPANESE = 12,
27
- ENGLISH = 11
27
+ ENGLISH = 11,
28
+ KOREAN = 19,
29
+ SPANISH = 20
28
30
  }
29
31
  /**
30
32
  * 题目类型
@@ -28,6 +28,8 @@ export var LANGUAGE_TYPE;
28
28
  LANGUAGE_TYPE[LANGUAGE_TYPE["CANTONESE"] = 13] = "CANTONESE";
29
29
  LANGUAGE_TYPE[LANGUAGE_TYPE["JAPANESE"] = 12] = "JAPANESE";
30
30
  LANGUAGE_TYPE[LANGUAGE_TYPE["ENGLISH"] = 11] = "ENGLISH";
31
+ LANGUAGE_TYPE[LANGUAGE_TYPE["KOREAN"] = 19] = "KOREAN";
32
+ LANGUAGE_TYPE[LANGUAGE_TYPE["SPANISH"] = 20] = "SPANISH";
31
33
  })(LANGUAGE_TYPE || (LANGUAGE_TYPE = {}));
32
34
  /**
33
35
  * 题目类型
@@ -3,6 +3,8 @@ export declare const LANGUAGE_NAMES: {
3
3
  2: string;
4
4
  3: string;
5
5
  4: string;
6
+ 5: string;
7
+ 6: string;
6
8
  };
7
9
  export declare const CATEGORY_NAME: {
8
10
  1: string;
@@ -16,10 +18,23 @@ export declare const SERVER_LANGUAGE_TYPE: {
16
18
  12: number;
17
19
  11: number;
18
20
  13: number;
21
+ 19: number;
22
+ 20: number;
19
23
  };
20
24
  export declare const LANGUAGE_SHOW_NAME: {
21
25
  2: string;
22
26
  13: string;
23
27
  12: string;
24
28
  11: string;
29
+ 19: string;
30
+ 20: string;
31
+ };
32
+ export declare const LANGUAGE_SHOW_NAMES: {
33
+ 1: string;
34
+ 2: string;
35
+ 3: string;
36
+ 4: string;
37
+ 5: string;
38
+ 6: string;
25
39
  };
40
+ export declare const LANGUAGE_SHOW_NAMES_ORDER: number[];
@@ -1,15 +1,17 @@
1
1
  var _a, _b;
2
2
  import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
3
- var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE, JAPANESE = LANGUAGE_TYPE.JAPANESE, ENGLISH = LANGUAGE_TYPE.ENGLISH;
3
+ var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE, JAPANESE = LANGUAGE_TYPE.JAPANESE, ENGLISH = LANGUAGE_TYPE.ENGLISH, KOREAN = LANGUAGE_TYPE.KOREAN, SPANISH = LANGUAGE_TYPE.SPANISH;
4
4
  var LANGUAGE = CATEGORY_TYPE.LANGUAGE, SEMANTICS = CATEGORY_TYPE.SEMANTICS, EXPRESSION = CATEGORY_TYPE.EXPRESSION, FORM = CATEGORY_TYPE.FORM, LANGUAGE_ABILITY = CATEGORY_TYPE.LANGUAGE_ABILITY;
5
5
  export var LANGUAGE_NAMES = {
6
6
  1: '中文-普通话',
7
7
  2: '日语',
8
8
  3: '英语',
9
9
  4: '中文-粤语',
10
+ 5: '韩语',
11
+ 6: '西班牙语',
10
12
  };
11
13
  export var CATEGORY_NAME = (_a = {},
12
- _a[LANGUAGE] = '语种',
14
+ _a[LANGUAGE] = '候选人语种',
13
15
  _a[SEMANTICS] = '语意',
14
16
  _a[EXPRESSION] = '表达',
15
17
  _a[FORM] = '形象',
@@ -20,6 +22,8 @@ export var SERVER_LANGUAGE_TYPE = (_b = {},
20
22
  _b[JAPANESE] = 2,
21
23
  _b[ENGLISH] = 3,
22
24
  _b[CANTONESE] = 4,
25
+ _b[KOREAN] = 5,
26
+ _b[SPANISH] = 6,
23
27
  _b);
24
28
  // 由于语种value 和 name的映射不对应,这里用于前端显示 AI基础能力 中文|英文表达
25
29
  export var LANGUAGE_SHOW_NAME = {
@@ -27,4 +31,15 @@ export var LANGUAGE_SHOW_NAME = {
27
31
  13: '中文',
28
32
  12: '日语',
29
33
  11: '英文',
34
+ 19: '韩语',
35
+ 20: '西班牙',
30
36
  };
37
+ export var LANGUAGE_SHOW_NAMES = {
38
+ 1: '普通话',
39
+ 2: '日语',
40
+ 3: '英语',
41
+ 4: '粤语',
42
+ 5: '韩语',
43
+ 6: '西班牙语',
44
+ };
45
+ export var LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6];
@@ -35,15 +35,15 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
35
35
  return to.concat(ar || Array.prototype.slice.call(from));
36
36
  };
37
37
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
38
- import { CATEGORY_NAME, LANGUAGE_SHOW_NAME, SERVER_LANGUAGE_TYPE } from './const';
38
+ import { CATEGORY_NAME, LANGUAGE_SHOW_NAME, LANGUAGE_SHOW_NAMES, LANGUAGE_SHOW_NAMES_ORDER, SERVER_LANGUAGE_TYPE } from './const';
39
39
  import { groupCategory } from './utils';
40
40
  import ScrollDialogContent from "../../../../components/ScrollDialogContent";
41
41
  import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
42
42
  import { PostAiAbilities } from "../../../../services/ai-question";
43
43
  import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
44
44
  import { useRequest, useSetState } from 'ahooks';
45
- import { Checkbox, Dialog, Loading, Radio, RadioGroup, Typography } from 'fbm-ui';
46
- import { Box, Divider, FormControl, FormLabel } from 'fbm-ui/lib/mui';
45
+ import { Checkbox, Dialog, Loading, Radio, RadioGroup, Select, Typography } from 'fbm-ui';
46
+ import { Box, Divider, FormControl, FormLabel, Stack } from 'fbm-ui/lib/mui';
47
47
  import { useCallback, useEffect, useState } from 'react';
48
48
  var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE;
49
49
  var AiAssessmentCriteria = function (props) {
@@ -51,9 +51,10 @@ var AiAssessmentCriteria = function (props) {
51
51
  var _a = useAiAnalysisStore(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState, updateState = _a.updateState, updateAiAbilities = _a.updateAiAbilities;
52
52
  var _b = __read(useState([]), 2), groupData = _b[0], setGroupData = _b[1];
53
53
  var _c = __read(useState(1), 2), language = _c[0], setLanguage = _c[1];
54
- var _d = __read(useState(false), 2), checkedChinese = _d[0], setCheckedChinese = _d[1];
55
- var _e = __read(useState([]), 2), relatedAbilities = _e[0], setRelatedAbilities = _e[1];
56
- var _f = __read(useSetState({}), 2), checkAbilities = _f[0], setCheckAbilities = _f[1];
54
+ var _d = __read(useState(1), 2), voiceLanguage = _d[0], setVoiceLanguage = _d[1];
55
+ var _e = __read(useState(false), 2), checkedChinese = _e[0], setCheckedChinese = _e[1];
56
+ var _f = __read(useState([]), 2), relatedAbilities = _f[0], setRelatedAbilities = _f[1];
57
+ var _g = __read(useSetState({}), 2), checkAbilities = _g[0], setCheckAbilities = _g[1];
57
58
  var loading = useRequest(PostAiAbilities, {
58
59
  manual: false,
59
60
  onSuccess: function (_a) {
@@ -64,6 +65,7 @@ var AiAssessmentCriteria = function (props) {
64
65
  return SERVER_LANGUAGE_TYPE[type] === (analysisState.language || language);
65
66
  }) || {}, type = _b.type, relatedAbilities = _b.relatedAbilities;
66
67
  setRelatedAbilities(relatedAbilities);
68
+ setVoiceLanguage(analysisState.voiceLanguage || 1);
67
69
  setLanguage(type || language);
68
70
  setCheckedChinese([MANDARIN, CANTONESE].includes(type || language));
69
71
  setGroupData(ret);
@@ -93,7 +95,6 @@ var AiAssessmentCriteria = function (props) {
93
95
  fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
94
96
  }
95
97
  });
96
- console.log(language);
97
98
  setLanguage(language);
98
99
  setCheckedChinese([MANDARIN, CANTONESE].includes(language));
99
100
  setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
@@ -102,47 +103,52 @@ var AiAssessmentCriteria = function (props) {
102
103
  updateAiAbilities(__spreadArray(__spreadArray([], __read(aiAbilities.filter(function (v) { return v.isWorkplace; })), false), __read(Object.values(checkAbilities)
103
104
  .filter(function (item) { return item; })
104
105
  .sort(function (a, b) { return ((a === null || a === void 0 ? void 0 : a.sort) && (b === null || b === void 0 ? void 0 : b.sort) ? (a === null || a === void 0 ? void 0 : a.sort) - (b === null || b === void 0 ? void 0 : b.sort) : 0); })), false));
105
- updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
106
+ updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1, voiceLanguage: voiceLanguage });
106
107
  onClose();
107
- }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState]);
108
+ }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState, voiceLanguage]);
108
109
  useEffect(function () {
109
110
  aiAbilities.forEach(function (item) {
110
111
  var _a;
111
112
  return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
112
113
  });
113
114
  }, [aiAbilities, fixSetCheckAbilities]);
114
- return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", 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) {
115
- var name = _a.name, type = _a.type, list = _a.list;
116
- return (_jsxs(Box, { children: [(list.filter(function (_a) {
117
- var type = _a.type;
118
- return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
119
- }).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsxs(FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: [type === CATEGORY_TYPE.LANGUAGE ? (_jsx(Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : (_jsx(Typography, { children: type === CATEGORY_TYPE.EXPRESSION ? LANGUAGE_SHOW_NAME[language] + name : name })), type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(Box, { children: [_jsxs(RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [_jsx(Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), _jsx(RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
120
- .filter(function (_a) {
121
- var type = _a.type;
122
- return [MANDARIN, CANTONESE].includes(type);
123
- })
124
- .map(function (_a) {
125
- var name = _a.name, type = _a.type, token = _a.token;
126
- return checkedChinese && _jsx(Radio, { value: type, label: name }, token);
127
- }) })), list
128
- .filter(function (_a) {
129
- var type = _a.type;
130
- return ![MANDARIN, CANTONESE].includes(type);
131
- })
132
- .map(function (_a) {
133
- var name = _a.name, type = _a.type, token = _a.token;
134
- return (_jsx(Radio, { value: type, label: name }, token));
135
- })] })), _jsx(Divider, { sx: { mb: 1 } }), _jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : (_jsx(_Fragment, { children: list.map(function (item) {
136
- var name = item.name, desc = item.desc, type = item.type, token = item.token;
137
- if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
138
- var isLanguageAbility = [14, 15].includes(type);
139
- 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) {
140
- var _a;
141
- return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
142
- } }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
143
- }
144
- return null;
145
- }) }))] }, "".concat(name, "-").concat(type)));
146
- })) }) })));
115
+ return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (_jsxs(_Fragment, { children: [_jsxs(Stack, __assign({ spacing: 1, mb: 2 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9898\u76EE\u8BED\u79CD" })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8FDB\u884C\u8BFB\u9898" }))] })), _jsx(Select, { onChange: function (e) { return setVoiceLanguage(Number(e.target.value)); }, value: voiceLanguage, options: LANGUAGE_SHOW_NAMES_ORDER.map(function (ord) { return ({
116
+ value: ord,
117
+ label: LANGUAGE_SHOW_NAMES[ord],
118
+ }); }), sx: {
119
+ width: 240,
120
+ } })] })), groupData.map(function (_a) {
121
+ var name = _a.name, type = _a.type, list = _a.list;
122
+ return (_jsxs(Box, { children: [(list.filter(function (_a) {
123
+ var type = _a.type;
124
+ return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
125
+ }).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [type === CATEGORY_TYPE.LANGUAGE ? (_jsx(Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : (_jsx(Typography, { children: type === CATEGORY_TYPE.EXPRESSION ? LANGUAGE_SHOW_NAME[language] + name : name })), type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(Box, { children: [_jsxs(RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [_jsx(Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), _jsx(RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
126
+ .filter(function (_a) {
127
+ var type = _a.type;
128
+ return [MANDARIN, CANTONESE].includes(type);
129
+ })
130
+ .map(function (_a) {
131
+ var name = _a.name, type = _a.type, token = _a.token;
132
+ return checkedChinese && _jsx(Radio, { value: type, label: name }, token);
133
+ }) })), list
134
+ .filter(function (_a) {
135
+ var type = _a.type;
136
+ return ![MANDARIN, CANTONESE].includes(type);
137
+ })
138
+ .map(function (_a) {
139
+ var name = _a.name, type = _a.type, token = _a.token;
140
+ return (_jsx(Radio, { value: type, label: name }, token));
141
+ })] })), _jsx(Divider, { sx: { mb: 1 } }), _jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : (_jsx(_Fragment, { children: list.map(function (item) {
142
+ var name = item.name, desc = item.desc, type = item.type, token = item.token;
143
+ if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
144
+ var isLanguageAbility = [14, 15].includes(type);
145
+ 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) {
146
+ var _a;
147
+ return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
148
+ } }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
149
+ }
150
+ return null;
151
+ }) }))] }, "".concat(name, "-").concat(type)));
152
+ })] })) }) })));
147
153
  };
148
154
  export default AiAssessmentCriteria;
@@ -41,7 +41,7 @@ import { Accordion, AccordionDetails, AccordionSummary, List, ListItem, ListItem
41
41
  import { memo, useCallback, useEffect, useRef, useState } from 'react';
42
42
  var LANGUAGE_TYPE_LIST = [LANGUAGE_TYPE.MANDARIN, LANGUAGE_TYPE.CANTONESE, LANGUAGE_TYPE.JAPANESE, LANGUAGE_TYPE.ENGLISH];
43
43
  var BaseAccordion = function (props) {
44
- var name = props.name, positionName = props.positionName, list = props.list, index = props.index, isShowOnlyAITest = props.isShowOnlyAITest, _a = props.isShowDesc, isShowDesc = _a === void 0 ? false : _a, _b = props.isShowSummaryAction, isShowSummaryAction = _b === void 0 ? false : _b, _c = props.isShowConfirm, isShowConfirm = _c === void 0 ? false : _c, _d = props.isShowPreview, isShowPreview = _d === void 0 ? true : _d, _e = props.isNew, isNew = _e === void 0 ? false : _e, _f = props.isOem, isOem = _f === void 0 ? false : _f;
44
+ var name = props.name, positionName = props.positionName, list = props.list, index = props.index, isShowOnlyAITest = props.isShowOnlyAITest, _a = props.isShowDesc, isShowDesc = _a === void 0 ? false : _a, _b = props.isShowSummaryAction, isShowSummaryAction = _b === void 0 ? false : _b, _c = props.isShowConfirm, isShowConfirm = _c === void 0 ? false : _c, _d = props.isShowPreview, isShowPreview = _d === void 0 ? true : _d, _e = props.isNew, isNew = _e === void 0 ? false : _e, _f = props.isOem, isOem = _f === void 0 ? false : _f, expanded = props.expanded, token = props.token, onExpandedChange = props.onExpandedChange;
45
45
  var ref = useRef(null);
46
46
  var isHovering = useHover(ref);
47
47
  var updatePreview = useQuestionPreviewStore().updatePreview;
@@ -104,7 +104,7 @@ var BaseAccordion = function (props) {
104
104
  setQuestionsList(filterList);
105
105
  }
106
106
  }, [list, isShowOnlyAITest, isOem]);
107
- return (_jsx(_Fragment, { children: questionsList.length > 0 && (_jsx(AccordionRoot, { children: _jsxs(Accordion, __assign({ defaultExpanded: index === 0 }, { children: [_jsx(AccordionSummary, __assign({ expandIcon: _jsx(ExpandMore, {}), sx: {
107
+ return (_jsx(_Fragment, { children: questionsList.length > 0 && (_jsx(AccordionRoot, { children: _jsxs(Accordion, __assign({ defaultExpanded: index === 0, expanded: expanded === token, onChange: onExpandedChange(token) }, { children: [_jsx(AccordionSummary, __assign({ expandIcon: _jsx(ExpandMore, {}), sx: {
108
108
  '&:after': {
109
109
  content: "".concat(isNew ? 'url(//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn)' : '" "'),
110
110
  position: 'absolute',
@@ -113,13 +113,13 @@ var BaseAccordion = function (props) {
113
113
  width: 38,
114
114
  height: 16,
115
115
  },
116
- } }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", justifyContent: "space-between", alignItems: "center", overflow: "hidden" }, { children: [_jsxs(Box, __assign({ flex: "1 0", overflow: "hidden" }, { children: [_jsx(AccordionTitle, { children: positionName || name }), positionName && _jsxs(AccordionSubTitle, __assign({ color: "secondary" }, { children: ["\u6B65\u9AA4\uFF1A", name] }))] })), isShowSummaryAction && (_jsx(Button, __assign({ sx: { mr: 1, flexShrink: 0, height: 24 }, variant: "outlined", color: "inherit", size: "small", onClick: handleUseAllQuestion }, { children: "\u4F7F\u7528" })))] })) })), _jsxs(AccordionDetails, { children: [_jsx(List, __assign({ ref: ref }, { children: questionsList.map(function (item) {
116
+ } }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", justifyContent: "space-between", alignItems: "center", overflow: "hidden" }, { children: [_jsxs(Box, __assign({ flex: "1 0", overflow: "hidden" }, { children: [_jsx(AccordionTitle, { children: positionName || name }), positionName && _jsxs(AccordionSubTitle, __assign({ color: "secondary" }, { children: ["\u6B65\u9AA4\uFF1A", name] }))] })), isShowSummaryAction && (_jsx(Button, __assign({ sx: { mr: 1, flexShrink: 0, height: 24 }, variant: "outlined", color: "inherit", size: "small", onClick: handleUseAllQuestion }, { children: "\u4F7F\u7528" })))] })) })), expanded === token && (_jsxs(AccordionDetails, { children: [_jsx(List, __assign({ ref: ref }, { children: questionsList.map(function (item) {
117
117
  var token = item.token, name = item.name, category = item.category;
118
118
  var isUsed = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps.find(function (step) { return step.originToken === token; });
119
119
  return (_jsx(ListItem, __assign({ secondaryAction: [
120
120
  isUsed && _jsx(Done, {}, "icon"),
121
121
  _jsx(Box, __assign({ className: "secondary-action-buttons" }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", size: "small", onClick: function () { return handleUseQuestion(item); } }, { children: "\u4F7F\u7528" })) }), "buttons"),
122
122
  ], onMouseOver: function () { return handleMouseOver(item); } }, { children: _jsx(ListItemText, { primary: name, secondary: isShowDesc && category ? category[0] : '' }) }), token));
123
- }) })), isPaging && (_jsx(Button, __assign({ variant: "text", sx: { width: '100%', justifyContent: 'start', color: '#576B95' }, onClick: handleShowAll }, { children: "\u5C55\u793A\u5168\u90E8" })))] })] })) })) }));
123
+ }) })), isPaging && (_jsx(Button, __assign({ variant: "text", sx: { width: '100%', justifyContent: 'start', color: '#576B95' }, onClick: handleShowAll }, { children: "\u5C55\u793A\u5168\u90E8" })))] }))] })) })) }));
124
124
  };
125
125
  export default memo(BaseAccordion);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AiEvaluationDataList } from '../QuestionTemplate/interface';
2
3
  export interface BaseAccordionProps extends AiEvaluationDataList {
3
4
  index?: number;
@@ -7,4 +8,6 @@ export interface BaseAccordionProps extends AiEvaluationDataList {
7
8
  isShowSummaryAction?: boolean;
8
9
  isShowConfirm?: boolean;
9
10
  isOem?: boolean;
11
+ expanded: string | false;
12
+ onExpandedChange: (panel: string) => (event: React.SyntheticEvent, expanded: boolean) => void;
10
13
  }
@@ -60,11 +60,11 @@ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Ar
60
60
  { label: '直到充分为止', value: -1 },
61
61
  ], false);
62
62
  var QuestionModelListItem = function (props) {
63
- var interactionMethods = useInterviewRoomStore().interactionMethods;
63
+ var _a = useInterviewRoomStore(), interactionMethods = _a.interactionMethods, interactType = _a.interactType;
64
64
  var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
65
65
  var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp, followUpMaximum = step.followUpMaximum;
66
66
  var isAiAnalysis = IS_AI_ANALYSIS(step);
67
- var _a = useQuestionModelStore(), editModel = _a.editModel, removeModel = _a.removeModel, updateModelWeight = _a.updateModelWeight;
67
+ var _b = useQuestionModelStore(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
68
68
  var updateQuestionState = useUpdateQuestionStore().updateQuestionState;
69
69
  var handleEdit = useCallback(function () {
70
70
  updateQuestionState({ open: true, token: token, index: index, aiShowType: aiShowType, item: step });
@@ -113,6 +113,6 @@ var QuestionModelListItem = function (props) {
113
113
  }, [questions]);
114
114
  return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsx(Box, __assign({ display: "flex", borderBottom: !DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: _jsxs(Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), _jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragHandleIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), _jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
115
115
  return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
116
- }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), IS_AI_FOLLOW_UP(step, interactionMethods) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
116
+ }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), IS_AI_FOLLOW_UP(step, interactionMethods, interactType) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
117
117
  };
118
118
  export default memo(QuestionModelListItem);
@@ -40,7 +40,7 @@ import { uniqueId } from "../../../../utils/utils";
40
40
  import { useSetState } from 'ahooks';
41
41
  import { AddIcon, Box, Button, LayerOutlineIcon, MicIcon, Popover, RadioCheckedIcon, SMSOneIcon, Typography } from 'fbm-ui';
42
42
  import { List, ListItem, ListItemButton, ListItemIcon, ListItemText } from 'fbm-ui/lib/mui';
43
- import { useCallback } from 'react';
43
+ import { useCallback, useState } from 'react';
44
44
  var ICONS = (_a = {},
45
45
  _a[ADD_QUESTION_TYPE.FREE] = _jsx(SMSOneIcon, { color: "secondary" }),
46
46
  _a[ADD_QUESTION_TYPE.LANGUAGE] = _jsx(MicIcon, { color: "secondary" }),
@@ -59,6 +59,10 @@ var AiEvaluation = function (_a) {
59
59
  showOnlyAITest: false,
60
60
  }), 2), state = _b[0], setState = _b[1];
61
61
  var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
62
+ var _c = __read(useState(false), 2), expanded = _c[0], setExpanded = _c[1];
63
+ var handleExpandedChange = function (panel) { return function (event, isExpanded) {
64
+ setExpanded(isExpanded ? panel : false);
65
+ }; };
62
66
  var handleClickAdd = useCallback(function (aiShowType) {
63
67
  setState({ addQuestionOpen: false });
64
68
  updateQuestionState({
@@ -77,7 +81,7 @@ var AiEvaluation = function (_a) {
77
81
  var name = _a.name, list = _a.list;
78
82
  return (_jsxs(Box, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, weight: "500", mb: 2 }, { children: name })), list
79
83
  .filter(function (v) { return !isEdit || !v.isNew || selctedAbilitys.includes(v.token); })
80
- .map(function (item, i) { return (_jsx(BaseAccordion, __assign({ index: i, isOem: isOem, isShowOnlyAITest: showOnlyAITest, isShowDesc: index !== 0, isShowSummaryAction: index !== 0, isShowConfirm: index !== 0 }, item), item.name + i)); })] }, name));
84
+ .map(function (item, i) { return (_jsx(BaseAccordion, __assign({ index: i, isOem: isOem, isShowOnlyAITest: showOnlyAITest, isShowDesc: index !== 0, isShowSummaryAction: index !== 0, isShowConfirm: index !== 0, expanded: expanded, onExpandedChange: handleExpandedChange }, item), item.token)); })] }, name));
81
85
  })] }));
82
86
  };
83
87
  export default AiEvaluation;
@@ -25,7 +25,7 @@ var QuestionTemplate = function (_a) {
25
25
  var enterprise = useEnterpriseStore().enterprise;
26
26
  var loading = useRequest(function () { return PostAiModelQuestions(__assign({ extraAbilityTokens: selctedAbilitys }, enterprise)); }, {
27
27
  manual: false,
28
- refreshDeps: [selctedAbilitys, enterprise],
28
+ refreshDeps: [JSON.stringify(selctedAbilitys), JSON.stringify(enterprise)],
29
29
  onSuccess: function (_a) {
30
30
  var data = _a.data;
31
31
  return updateAiEvaluationData(data);
@@ -286,7 +286,7 @@ var QuestionUpdate = function () {
286
286
  [aiAbilities, handleWorkplaceData]);
287
287
  useEffect(function () {
288
288
  if (open) {
289
- updateState({ language: item.language, aiSwitch: item.aiSwitch });
289
+ updateState({ language: item.language, aiSwitch: item.aiSwitch, voiceLanguage: item === null || item === void 0 ? void 0 : item.voiceLanguage });
290
290
  updateAiAbilities(item.aiAbilities, true);
291
291
  }
292
292
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -37,6 +37,7 @@ export interface QuestionParams {
37
37
  aiType: number;
38
38
  weight: number | string;
39
39
  language?: number;
40
+ voiceLanguage?: number;
40
41
  aiShowType: number;
41
42
  videoBroadcast: VideoBroadcastParams;
42
43
  answerStatus: number;
@@ -25,7 +25,7 @@ import { Box, Button, confirm, Message, Paper, Typography } from 'fbm-ui';
25
25
  import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
26
26
  var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER, FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
27
27
  var AiReportRoot = forwardRef(function (props, ref) {
28
- var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
28
+ var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, reloadReportVersion = props.reloadReportVersion;
29
29
  var firstLoad = useRef(true);
30
30
  var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
31
31
  var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f, _g = _b.isSimulated, isSimulated = _g === void 0 ? false : _g;
@@ -50,8 +50,11 @@ var AiReportRoot = forwardRef(function (props, ref) {
50
50
  }), data = _h.data, loading = _h.loading, postAiInterviewResult = _h.run;
51
51
  var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
52
52
  var handleRefreshSuccess = useCallback(function () {
53
- postAiInterviewResult();
54
- }, [postAiInterviewResult]);
53
+ reloadReportVersion === null || reloadReportVersion === void 0 ? void 0 : reloadReportVersion();
54
+ if (!reloadReportVersion) {
55
+ postAiInterviewResult();
56
+ }
57
+ }, [postAiInterviewResult, reloadReportVersion]);
55
58
  var handleSwitchReportModel = useCallback(function () {
56
59
  var SwithAction = function () {
57
60
  SwitchReportModel({
@@ -25,6 +25,7 @@ export interface Collection {
25
25
  level: number;
26
26
  rank: number;
27
27
  total: number;
28
+ avgScore: number;
28
29
  }
29
30
  export interface AnalysisResult {
30
31
  text: string;
@@ -198,6 +199,7 @@ export interface AiReportProps {
198
199
  rank: number;
199
200
  };
200
201
  customInterviewDimRankMap?: CustomInterviewDimRankMap;
202
+ reloadReportVersion?: () => void;
201
203
  onLoad?: (values: AiReportLoadedValues) => void;
202
204
  onExportReportClick?: () => void;
203
205
  onScoreChange?: (scoreState?: ScoreManualUpdateState) => void;