eli-video-interview 1.2.42-alpha.9 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/esm/components/AiHeaderTitle/index.js +2 -10
  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 +11 -1
  12. package/esm/enum/ai-question.js +10 -0
  13. package/esm/modules/ai-ability/components/AbilityFormItem/index.js +11 -46
  14. package/esm/modules/ai-ability/components/AddAbility/index.js +2 -20
  15. package/esm/modules/ai-ability/components/UpdateAbility/index.js +6 -37
  16. package/esm/modules/ai-ability-select/Root.js +4 -2
  17. package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
  18. package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
  19. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
  20. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
  21. package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
  22. package/esm/modules/ai-ability-select/interface.d.ts +1 -0
  23. package/esm/modules/ai-question/Root.js +1 -1
  24. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +13 -4
  25. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
  26. package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +41 -2
  27. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +42 -42
  28. package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
  29. package/esm/modules/ai-question/components/BaseAccordion/index.js +4 -4
  30. package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
  31. package/esm/modules/ai-question/components/BootVideo/index.js +12 -5
  32. package/esm/modules/ai-question/components/QuestionImport/index.js +2 -2
  33. package/esm/modules/ai-question/components/QuestionModel/Item.js +3 -3
  34. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +6 -2
  35. package/esm/modules/ai-question/components/QuestionTemplate/index.js +1 -1
  36. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
  37. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +13 -3
  38. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
  39. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
  40. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
  41. package/esm/modules/ai-question/components/QuestionUpdate/const.js +2 -0
  42. package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -2
  43. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
  44. package/esm/modules/ai-report/Root.js +6 -3
  45. package/esm/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
  46. package/esm/modules/ai-report/components/VideoQuestion/Video.js +208 -0
  47. package/esm/modules/ai-report/interface.d.ts +2 -0
  48. package/esm/modules/ai-report/useAiReport.d.ts +2 -0
  49. package/esm/modules/ai-report/useAiReport.js +3 -1
  50. package/esm/modules/ai-report-v2/Root.d.ts +2 -2
  51. package/esm/modules/ai-report-v2/Root.js +18 -11
  52. package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
  53. package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +20 -20
  54. package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
  55. package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +86 -24
  56. package/esm/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
  57. package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
  58. package/esm/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
  59. package/esm/modules/ai-report-v2/components/Candidate/Podium.js +2 -2
  60. package/esm/modules/ai-report-v2/components/Form/Form.js +34 -13
  61. package/esm/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
  62. package/esm/modules/ai-report-v2/components/Form/Nps.js +2 -0
  63. package/esm/modules/ai-report-v2/components/NotFinish/index.js +13 -5
  64. package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
  65. package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +28 -10
  66. package/esm/modules/ai-report-v2/components/Suggestion/index.js +1 -1
  67. package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
  68. package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +79 -0
  69. package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +49 -32
  70. package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
  71. package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +71 -6
  72. package/esm/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
  73. package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
  74. package/esm/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
  75. package/esm/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
  76. package/esm/modules/ai-report-v2/components/WorkPlaces/index.js +1 -1
  77. package/esm/modules/ai-report-v2/components/styled.d.ts +4 -1
  78. package/esm/modules/ai-report-v2/components/styled.js +14 -3
  79. package/esm/modules/ai-report-v2/interface.d.ts +4 -1
  80. package/esm/modules/ai-report-v2/useAiReport.d.ts +4 -0
  81. package/esm/modules/ai-report-v2/useAiReport.js +3 -1
  82. package/esm/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
  83. package/esm/modules/ai-report-v2/useAiReportVersion.js +37 -0
  84. package/esm/services/ai-report.d.ts +10 -0
  85. package/esm/services/ai-report.js +2 -0
  86. package/esm/store/ai-question/ai-analysis-store.d.ts +3 -1
  87. package/esm/store/ai-question/ai-analysis-store.js +26 -1
  88. package/esm/store/ai-report/global-store.d.ts +3 -0
  89. package/lib/components/AiHeaderTitle/index.js +1 -9
  90. package/lib/components/AiHeaderTitleV2/index.d.ts +4 -0
  91. package/lib/components/AiHeaderTitleV2/index.js +41 -0
  92. package/lib/components/AiHeaderTitleV2/interface.d.ts +4 -0
  93. package/lib/components/AiHeaderTitleV2/interface.js +2 -0
  94. package/lib/components/Charts/ReportPie.js +13 -3
  95. package/lib/components/Charts/const.js +3 -3
  96. package/lib/components/ScoreBigBall/index.js +1 -1
  97. package/lib/constants/ai-question.d.ts +1 -1
  98. package/lib/constants/ai-question.js +3 -3
  99. package/lib/enum/ai-question.d.ts +11 -1
  100. package/lib/enum/ai-question.js +10 -0
  101. package/lib/modules/ai-ability/components/AbilityFormItem/index.js +13 -45
  102. package/lib/modules/ai-ability/components/AddAbility/index.js +2 -20
  103. package/lib/modules/ai-ability/components/UpdateAbility/index.js +6 -37
  104. package/lib/modules/ai-ability-select/Root.js +4 -2
  105. package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
  106. package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
  107. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
  108. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
  109. package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
  110. package/lib/modules/ai-ability-select/interface.d.ts +1 -0
  111. package/lib/modules/ai-question/Root.js +1 -1
  112. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -3
  113. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
  114. package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +42 -3
  115. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +39 -39
  116. package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
  117. package/lib/modules/ai-question/components/BaseAccordion/index.js +4 -4
  118. package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
  119. package/lib/modules/ai-question/components/BootVideo/index.js +12 -5
  120. package/lib/modules/ai-question/components/QuestionImport/index.js +2 -2
  121. package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
  122. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -1
  123. package/lib/modules/ai-question/components/QuestionTemplate/index.js +1 -1
  124. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
  125. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
  126. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
  127. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
  128. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
  129. package/lib/modules/ai-question/components/QuestionUpdate/const.js +2 -0
  130. package/lib/modules/ai-question/components/QuestionUpdate/index.js +3 -2
  131. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
  132. package/lib/modules/ai-report/Root.js +6 -3
  133. package/lib/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
  134. package/lib/modules/ai-report/components/VideoQuestion/Video.js +213 -0
  135. package/lib/modules/ai-report/interface.d.ts +2 -0
  136. package/lib/modules/ai-report/useAiReport.d.ts +2 -0
  137. package/lib/modules/ai-report/useAiReport.js +6 -1
  138. package/lib/modules/ai-report-v2/Root.d.ts +2 -2
  139. package/lib/modules/ai-report-v2/Root.js +16 -9
  140. package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
  141. package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +17 -17
  142. package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
  143. package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +88 -23
  144. package/lib/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
  145. package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
  146. package/lib/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
  147. package/lib/modules/ai-report-v2/components/Candidate/Podium.js +1 -1
  148. package/lib/modules/ai-report-v2/components/Form/Form.js +34 -13
  149. package/lib/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
  150. package/lib/modules/ai-report-v2/components/Form/Nps.js +2 -0
  151. package/lib/modules/ai-report-v2/components/NotFinish/index.js +12 -4
  152. package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
  153. package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +27 -9
  154. package/lib/modules/ai-report-v2/components/Suggestion/index.js +2 -2
  155. package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
  156. package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +81 -0
  157. package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +46 -29
  158. package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
  159. package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +69 -4
  160. package/lib/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
  161. package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
  162. package/lib/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
  163. package/lib/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
  164. package/lib/modules/ai-report-v2/components/WorkPlaces/index.js +2 -2
  165. package/lib/modules/ai-report-v2/components/styled.d.ts +4 -1
  166. package/lib/modules/ai-report-v2/components/styled.js +18 -4
  167. package/lib/modules/ai-report-v2/interface.d.ts +4 -1
  168. package/lib/modules/ai-report-v2/useAiReport.d.ts +4 -0
  169. package/lib/modules/ai-report-v2/useAiReport.js +6 -1
  170. package/lib/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
  171. package/lib/modules/ai-report-v2/useAiReportVersion.js +41 -0
  172. package/lib/services/ai-report.d.ts +10 -0
  173. package/lib/services/ai-report.js +5 -1
  174. package/lib/store/ai-question/ai-analysis-store.d.ts +3 -1
  175. package/lib/store/ai-question/ai-analysis-store.js +26 -1
  176. package/lib/store/ai-report/global-store.d.ts +3 -0
  177. package/package.json +4 -2
@@ -1,15 +1,25 @@
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, ITALIAN = LANGUAGE_TYPE.ITALIAN, RUSSIAN = LANGUAGE_TYPE.RUSSIAN, FRENCH = LANGUAGE_TYPE.FRENCH, GERMAN = LANGUAGE_TYPE.GERMAN, THAILAND = LANGUAGE_TYPE.THAILAND, VIETNAMESE = LANGUAGE_TYPE.VIETNAMESE, INDONESIAN = LANGUAGE_TYPE.INDONESIAN, SWAHILI = LANGUAGE_TYPE.SWAHILI;
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: '西班牙语',
12
+ 7: '意大利语',
13
+ 8: '俄语',
14
+ 9: '法语',
15
+ 10: '德语',
16
+ 11: '泰语',
17
+ 12: '越南语',
18
+ 13: '印尼语',
19
+ 14: '斯瓦希里语',
10
20
  };
11
21
  export var CATEGORY_NAME = (_a = {},
12
- _a[LANGUAGE] = '语种',
22
+ _a[LANGUAGE] = '候选人语种',
13
23
  _a[SEMANTICS] = '语意',
14
24
  _a[EXPRESSION] = '表达',
15
25
  _a[FORM] = '形象',
@@ -20,6 +30,16 @@ export var SERVER_LANGUAGE_TYPE = (_b = {},
20
30
  _b[JAPANESE] = 2,
21
31
  _b[ENGLISH] = 3,
22
32
  _b[CANTONESE] = 4,
33
+ _b[KOREAN] = 5,
34
+ _b[SPANISH] = 6,
35
+ _b[ITALIAN] = 7,
36
+ _b[RUSSIAN] = 8,
37
+ _b[FRENCH] = 9,
38
+ _b[GERMAN] = 10,
39
+ _b[THAILAND] = 11,
40
+ _b[VIETNAMESE] = 12,
41
+ _b[INDONESIAN] = 13,
42
+ _b[SWAHILI] = 14,
23
43
  _b);
24
44
  // 由于语种value 和 name的映射不对应,这里用于前端显示 AI基础能力 中文|英文表达
25
45
  export var LANGUAGE_SHOW_NAME = {
@@ -27,4 +47,23 @@ export var LANGUAGE_SHOW_NAME = {
27
47
  13: '中文',
28
48
  12: '日语',
29
49
  11: '英文',
50
+ 19: '韩语',
51
+ 20: '西班牙',
30
52
  };
53
+ export var LANGUAGE_SHOW_NAMES = {
54
+ 1: '普通话',
55
+ 2: '日语',
56
+ 3: '英语',
57
+ 4: '粤语',
58
+ 5: '韩语',
59
+ 6: '西班牙语',
60
+ 7: '意大利语',
61
+ 8: '俄语',
62
+ 9: '法语',
63
+ 10: '德语',
64
+ 11: '泰语',
65
+ 12: '越南语',
66
+ 13: '印尼语',
67
+ 14: '斯瓦希里语',
68
+ };
69
+ export var LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
@@ -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, 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);
@@ -82,6 +84,7 @@ var AiAssessmentCriteria = function (props) {
82
84
  }, [setCheckAbilities]);
83
85
  var onLanguageChange = function (_a, list) {
84
86
  var value = _a.target.value;
87
+ console.log('value', value, list);
85
88
  var language = Number(value === '0' ? MANDARIN : value);
86
89
  var item = list.find(function (_a) {
87
90
  var type = _a.type;
@@ -93,7 +96,6 @@ var AiAssessmentCriteria = function (props) {
93
96
  fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
94
97
  }
95
98
  });
96
- console.log(language);
97
99
  setLanguage(language);
98
100
  setCheckedChinese([MANDARIN, CANTONESE].includes(language));
99
101
  setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
@@ -102,47 +104,45 @@ var AiAssessmentCriteria = function (props) {
102
104
  updateAiAbilities(__spreadArray(__spreadArray([], __read(aiAbilities.filter(function (v) { return v.isWorkplace; })), false), __read(Object.values(checkAbilities)
103
105
  .filter(function (item) { return item; })
104
106
  .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 });
107
+ updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1, voiceLanguage: voiceLanguage });
106
108
  onClose();
107
- }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState]);
109
+ }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState, voiceLanguage]);
108
110
  useEffect(function () {
109
111
  aiAbilities.forEach(function (item) {
110
112
  var _a;
111
113
  return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
112
114
  });
113
115
  }, [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
- })) }) })));
116
+ 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 ({
117
+ value: ord,
118
+ label: LANGUAGE_SHOW_NAMES[ord],
119
+ }); }), sx: {
120
+ width: 240,
121
+ } })] })), groupData.map(function (_a) {
122
+ var name = _a.name, type = _a.type, list = _a.list;
123
+ return (_jsxs(Box, { children: [(list.filter(function (_a) {
124
+ var type = _a.type;
125
+ return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
126
+ }).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: [_jsx(Select, { onChange: function (e) { return onLanguageChange(e, list); }, value: language, options: list.map(function (_a) {
127
+ var type = _a.type, name = _a.name;
128
+ return ({
129
+ value: type,
130
+ label: name,
131
+ });
132
+ }), sx: {
133
+ width: 240,
134
+ mt: 1,
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
+ })] })) }) })));
147
147
  };
148
148
  export default AiAssessmentCriteria;
@@ -8,6 +8,7 @@ export interface AiAbilityItem extends BaseAiAbilityParams {
8
8
  groupId?: number;
9
9
  groupName?: string;
10
10
  isNotCompute?: boolean;
11
+ child?: AiAbilityItem[];
11
12
  }
12
13
  export interface WorkplaceItem {
13
14
  token: string;
@@ -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
  }
@@ -52,6 +52,7 @@ var Options = [
52
52
  { label: '小面播报', value: 1 },
53
53
  { label: '虚拟人播报', value: 2 },
54
54
  { label: '自定义播报', value: 3 },
55
+ { label: '新虚拟人播报(支持追问)', value: 4 },
55
56
  ];
56
57
  var BootVideo = function (props) {
57
58
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -243,17 +244,23 @@ var BootVideo = function (props) {
243
244
  mr: 4.5,
244
245
  },
245
246
  }, defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [_jsx(Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), _jsx(Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && (_jsxs(_Fragment, { children: [_jsx(Select, { options: Options, value: broadcastType, onChange: function (e) {
246
- var _a;
247
+ var _a, _b, _c;
247
248
  var value = e.target.value;
248
- setVirtualManList(__spreadArray([], __read(virtualManList.map(function (v) { return (__assign(__assign({}, v), { selected: v.type === value })); })), false));
249
- if (value !== 3) {
249
+ var newVirtualManList = virtualManList.map(function (v) { return (__assign(__assign({}, v), { selected: v.type === value })); });
250
+ setVirtualManList(__spreadArray([], __read(newVirtualManList), false));
251
+ if (![3, 4].includes(value)) {
250
252
  setInterviewRoomState(__assign(__assign({}, interviewRoomState), {
251
253
  // @ts-ignore
252
254
  aiInterviewerProfile: (_a = virtualManList.find(function (v) { return v.type === value; })) === null || _a === void 0 ? void 0 : _a.detail }));
253
255
  }
254
- }, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && (_jsxs(Stack, { children: [_jsx(CustomVideos, { mediaList: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail, setMediaList: handleSetVideo }), _jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u6587\u672C\u6846\u5185\u5BB9" })), _jsx(TextField, { multiline: true, error: (((_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _a === void 0 ? void 0 : _a.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, sx: { mb: 2 }, onChange: handleGuidanceText, max: 300 })] })), _jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 3 }, { children: broadcastType !== 3 ? '面试官形象' : '面试官形象(播报题目)' })), broadcastType !== 3 && (_jsx(CustomUploadedImgRoot, { children: _jsx(Box, { children: _jsx("img", { src: (_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _b === void 0 ? void 0 : _b.virtualHumanAvatar, style: {
256
+ else {
257
+ setInterviewRoomState(__assign(__assign({}, interviewRoomState), {
258
+ // @ts-ignore
259
+ aiInterviewerProfile: ((_c = (_b = virtualManList.find(function (v) { return v.type === value; })) === null || _b === void 0 ? void 0 : _b.detail.interviewerShows) === null || _c === void 0 ? void 0 : _c.find(function (v) { return v.selected; })) || (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) }));
260
+ }
261
+ }, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && (_jsxs(Stack, { children: [_jsx(CustomVideos, { mediaList: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail, setMediaList: handleSetVideo }), _jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u6587\u672C\u6846\u5185\u5BB9" })), _jsx(TextField, { multiline: true, error: (((_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _a === void 0 ? void 0 : _a.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, sx: { mb: 2 }, onChange: handleGuidanceText, max: 300 })] })), _jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 3 }, { children: ![3, 4].includes(broadcastType) ? '面试官形象' : '面试官形象(播报题目)' })), ![3, 4].includes(broadcastType) && (_jsx(CustomUploadedImgRoot, { children: _jsx(Box, { children: _jsx("img", { src: (_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _b === void 0 ? void 0 : _b.virtualHumanAvatar, style: {
255
262
  borderColor: 'transparent',
256
- }, height: 100, alt: "" }) }) })), broadcastType === 3 && (_jsx(CustomUploadedImgRoot, { children: (_d = (_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _c === void 0 ? void 0 : _c.interviewerShows) === null || _d === void 0 ? void 0 : _d.map(function (human) { return (_jsxs(Box, { children: [_jsx("img", { src: human.virtualHumanAvatar, style: {
263
+ }, height: 100, alt: "" }) }) })), [3, 4].includes(broadcastType) && (_jsx(CustomUploadedImgRoot, { children: (_d = (_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _c === void 0 ? void 0 : _c.interviewerShows) === null || _d === void 0 ? void 0 : _d.map(function (human) { return (_jsxs(Box, { children: [_jsx("img", { src: human.virtualHumanAvatar, style: {
257
264
  borderColor: human.selected ? '#4CAF50' : 'transparent',
258
265
  }, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), _jsx(Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken)); }) })), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", color: "disabled", mb: 3 }, { children: (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.desc) || ((_g = (_f = (_e = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _e === void 0 ? void 0 : _e.interviewerShows) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.desc) })), broadcastType !== 3 && (_jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u64AD\u62A5\u5185\u5BB9" })), _jsx(TextField, { multiline: true, error: (((_h = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _h === void 0 ? void 0 : _h.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, onChange: handleGuidanceText, max: 300 })] }))] })), interviewRoomState.interactType === 1 && (_jsxs(Stack, { children: [_jsxs(Stack, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(Typography, __assign({ variant: "caption", mb: 2 }, { children: "\u79FB\u52A8\u7AEF" })), _jsxs(CustomUploadedImgRoot, { children: [mediaList.map(function (_a) {
259
266
  var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
@@ -72,7 +72,7 @@ var BootVideo = function (props) {
72
72
  // @ts-ignore
73
73
  var _a = (resp === null || resp === void 0 ? void 0 : resp.data) || {}, _b = _a.countQuestion, countQuestion = _b === void 0 ? 0 : _b, _c = _a.countContent, countContent = _c === void 0 ? 0 : _c, _d = _a.steps, steps = _d === void 0 ? [] : _d;
74
74
  if (countQuestion > 100) {
75
- Message.error('一次最多导入100条数据');
75
+ Message.error('一次最多导入600条数据');
76
76
  }
77
77
  else {
78
78
  setQuestionTemplate({ countQuestion: countQuestion, countContent: countContent, steps: steps.map(function (v) { return (__assign(__assign({}, v), { token: uniqueId(), uniqueId: uniqueId() })); }) });
@@ -93,7 +93,7 @@ var BootVideo = function (props) {
93
93
  padding: 0,
94
94
  margin: 0,
95
95
  },
96
- } }, { children: _jsxs(ScrollDialogContent, { children: [step === 0 && (_jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: [_jsxs(Box, __assign({ bgcolor: "#E8F5E9", width: 228, flexGrow: 0, flexShrink: 0, pl: 4.5, pr: 2.75, pt: 11.25, height: 420 }, { children: [_jsx(Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "1. \u9009\u62E9\u6A21\u677F" })), _jsx(Typography, __assign({ variant: "body2", style: { marginTop: 24, marginBottom: 8 } }, { children: "\u4E00\u6B21\u6700\u591A\u5BFC\u5165100\u6761\u6570\u636E" })), _jsx(Button, __assign({ variant: "contained", color: "primary", startIcon: _jsx(DownloadIcon, {}), onClick: handleDowloadTemplate }, { children: "\u4E0B\u8F7D\u901A\u7528\u6A21\u677F" }))] })), _jsxs(Box, __assign({ flexGrow: 1, display: "flex", flexDirection: "column", alignItems: "flex-end" }, { children: [_jsx(DialogContent, __assign({ sx: { boxSizing: 'border-box', width: '100%', py: 2 } }, { children: _jsxs(Box, { children: [_jsx(Box, __assign({ mb: 3, mt: 3.5 }, { children: _jsx(Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "2. \u4E0A\u4F20\u586B\u5199\u5B8C\u6BD5\u7684Excel\u6587\u4EF6" })) })), _jsxs(Box, __assign({ mb: 4.75, height: 184, onDragOver: function (e) { return e.preventDefault(); }, onDrop: dragQuestionImport, sx: {
96
+ } }, { children: _jsxs(ScrollDialogContent, { children: [step === 0 && (_jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: [_jsxs(Box, __assign({ bgcolor: "#E8F5E9", width: 228, flexGrow: 0, flexShrink: 0, pl: 4.5, pr: 2.75, pt: 11.25, height: 420 }, { children: [_jsx(Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "1. \u9009\u62E9\u6A21\u677F" })), _jsx(Typography, __assign({ variant: "body2", style: { marginTop: 24, marginBottom: 8 } }, { children: "\u4E00\u6B21\u6700\u591A\u5BFC\u5165600\u6761\u6570\u636E" })), _jsx(Button, __assign({ variant: "contained", color: "primary", startIcon: _jsx(DownloadIcon, {}), onClick: handleDowloadTemplate }, { children: "\u4E0B\u8F7D\u901A\u7528\u6A21\u677F" }))] })), _jsxs(Box, __assign({ flexGrow: 1, display: "flex", flexDirection: "column", alignItems: "flex-end" }, { children: [_jsx(DialogContent, __assign({ sx: { boxSizing: 'border-box', width: '100%', py: 2 } }, { children: _jsxs(Box, { children: [_jsx(Box, __assign({ mb: 3, mt: 3.5 }, { children: _jsx(Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "2. \u4E0A\u4F20\u586B\u5199\u5B8C\u6BD5\u7684Excel\u6587\u4EF6" })) })), _jsxs(Box, __assign({ mb: 4.75, height: 184, onDragOver: function (e) { return e.preventDefault(); }, onDrop: dragQuestionImport, sx: {
97
97
  height: 166,
98
98
  color: 'rgba(0, 0, 0, 0.6)',
99
99
  border: '1px dashed #999999',
@@ -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);
@@ -148,7 +148,7 @@ var QuestionForm = forwardRef(function (props, ref) {
148
148
  onValuesChange === null || onValuesChange === void 0 ? void 0 : onValuesChange(form.values);
149
149
  }, [form.values, onValuesChange]);
150
150
  return (_jsxs(_Fragment, { children: [_jsxs(Form, __assign({}, form, { children: [_jsx(FormItem, { required: true, disabled: preview, name: "name", label: "\u6807\u9898", placeholder: "\u6807\u9898\uFF08\u7528\u4E8E\u7CFB\u7EDF\u7BA1\u7406\uFF09", max: 15 }), _jsxs(Box, __assign({ display: "flex" }, { children: [!preview && aiShowType === ADD_QUESTION_TYPE.FREE && (_jsx(FormItem, __assign({ sx: { flex: '1 0', mr: 1 }, required: true, disabled: preview, name: "broadcastType", label: "\u64AD\u62A5\u65B9\u5F0F" }, { children: _jsx(Select, { placeholder: "\u64AD\u62A5\u65B9\u5F0F", options: broadcastModeOptions }) }))), !preview && (_jsx(FormItem, __assign({ style: { flex: '1 0' }, disabled: preview, name: "category", label: "\u8003\u5BDF\u80FD\u529B" }, { children: _jsx(Autocomplete, { placeholder: "\u8003\u5BDF\u80FD\u529B", options: aiAbilityList.map(function (_a) {
151
- var tag = _a.tag, token = _a.token, isWorkplace = _a.isWorkplace, define = _a.define, type = _a.type;
151
+ var tag = _a.tag, token = _a.token, isWorkplace = _a.isWorkplace, define = _a.define, type = _a.type, child = _a.child;
152
152
  return ({
153
153
  label: tag,
154
154
  value: tag,
@@ -158,6 +158,7 @@ var QuestionForm = forwardRef(function (props, ref) {
158
158
  token: token,
159
159
  define: define,
160
160
  isWorkplace: isWorkplace,
161
+ child: child,
161
162
  });
162
163
  }), onChange: handleCategoryChange }) })))] })), aiShowType !== ADD_QUESTION_TYPE.SINGLECHIOCE &&
163
164
  ((form === null || form === void 0 ? void 0 : form.values.broadcastType) === 1 || preview ? (_jsx(FieldArray, { name: "questions", render: function () {
@@ -200,7 +201,7 @@ var QuestionForm = forwardRef(function (props, ref) {
200
201
  multiline: true,
201
202
  placeholder: '朗读内容(候选人将根据此内容进行朗读)',
202
203
  sx: { padding: 0 },
203
- } })), _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0', mr: 2 }, required: true, disabled: preview, name: "prepareTime", label: "\u51C6\u5907\u65F6\u957F" }, { children: _jsx(Select, { options: prepareTimeOptions }) })), _jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0' }, required: true, disabled: preview, name: "duration", label: "\u56DE\u7B54\u65F6\u957F" }, { children: _jsx(Select, { options: durationOptions }) })), _jsx(FormItem, { sx: { height: 64, flex: '1 0', ml: 2 }, name: "minResponseDuration", label: "\u6700\u5C11\u56DE\u7B54\u65F6\u957F", type: "number", disabled: preview,
204
+ } })), _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0', mr: 2 }, required: true, disabled: preview, name: "prepareTime", label: "\u51C6\u5907\u65F6\u957F" }, { children: _jsx(Select, { options: prepareTimeOptions }) })), _jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0' }, required: true, disabled: preview, name: "duration", label: "\u56DE\u7B54\u65F6\u957F" }, { children: _jsx(Select, { options: durationOptions }) })), aiShowType !== ADD_QUESTION_TYPE.SINGLECHIOCE && (_jsx(FormItem, { sx: { height: 64, flex: '1 0', ml: 2 }, name: "minResponseDuration", label: "\u6700\u5C11\u56DE\u7B54\u65F6\u957F", type: "number", disabled: preview,
204
205
  // rules={[
205
206
  // e => {
206
207
  // if (!/^[1-9]\d*$/.test(e.value)) {
@@ -212,7 +213,7 @@ var QuestionForm = forwardRef(function (props, ref) {
212
213
  placeholder: '最少回答时长',
213
214
  sx: { padding: 0, pr: 1 },
214
215
  endAdornment: 's',
215
- }, onChange: handleMinResponseDurationChange })] }))] })), !preview && _jsx(AiAnalysis, {})] }));
216
+ }, onChange: handleMinResponseDurationChange }))] }))] })), !preview && _jsx(AiAnalysis, {})] }));
216
217
  });
217
218
  QuestionForm.displayName = 'QuestionForm';
218
219
  export default memo(QuestionForm);
@@ -33,7 +33,7 @@ import { useUpdateQuestionStore } from "../../../../store/ai-question/question-u
33
33
  import { AddIcon, Box, Button, Checkbox, InfoIcon, Layout, Message, Popactions, Tooltip } from 'fbm-ui';
34
34
  import { Typography } from 'fbm-ui/lib/mui';
35
35
  import { Stack } from 'fbm-ui/lib/mui';
36
- import { useState } from 'react';
36
+ import { useCallback, useState } from 'react';
37
37
  var RandomQuestion = function (_a) {
38
38
  var _b, _c;
39
39
  var broadcastType = _a.broadcastType, onAddCustonQuestion = _a.onAddCustonQuestion, onAddRandomQuestion = _a.onAddRandomQuestion, category = _a.category, aiShowType = _a.aiShowType;
@@ -76,10 +76,20 @@ var RandomQuestion = function (_a) {
76
76
  item: __assign(__assign({}, item), { enableScoreOptimization: !item.enableScoreOptimization }),
77
77
  });
78
78
  };
79
- return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between", mt: 0.375 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), _jsx(Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && (_jsxs(Stack, __assign({ spacing: 1, direction: "row" }, { children: [_jsx(Checkbox, { sx: {
79
+ var handleSelfIntrosChange = useCallback(function () {
80
+ updateQuestionState({
81
+ item: __assign(__assign({}, item), { selfIntroOpt: item.selfIntroOpt ? 0 : 1 }),
82
+ });
83
+ }, [item, updateQuestionState]);
84
+ var handleIsCustomQaChange = useCallback(function () {
85
+ updateQuestionState({
86
+ item: __assign(__assign({}, item), { isCustomQa: !item.isCustomQa }),
87
+ });
88
+ }, [item, updateQuestionState]);
89
+ return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ mb: 1, justifyContent: "space-between", mt: 0.375 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), _jsx(Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && (_jsxs(Stack, __assign({ spacing: 1, direction: "row" }, { children: [_jsx(Checkbox, { sx: {
80
90
  mr: 0,
81
91
  }, checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), _jsx(Checkbox, { sx: {
82
92
  mr: 0,
83
- }, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && (_jsx(Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", _jsx(Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus }))] }))] })), open && _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
93
+ }, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), questionState.aiShowType === 1 && (_jsxs(_Fragment, { children: [questionState.index < 2 && (_jsx(Checkbox, { checked: !!item.selfIntroOpt, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u81EA\u6211\u4ECB\u7ECD", _jsx(Tooltip, __assign({ title: "\u52FE\u9009\u4E3A\u81EA\u6211\u4ECB\u7ECD\u9898\u540E,\u5C06\u5BF9\u5019\u9009\u4EBA\u56DE\u7B54\u4E2D\u7684\u59D3\u540D\u8FDB\u884C\u4FEE\u6B63\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleSelfIntrosChange })), _jsx(Checkbox, { checked: !!item.isCustomQa, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u5F00\u542F\u81EA\u5B9A\u4E49\u968F\u673A\u9898", _jsx(Tooltip, __assign({ title: "\u52FE\u9009\u4E4B\u540E\uFF0C\u8BE5\u9898\u7684\u9762\u8BD5\u95EE\u9898\u5C06\u4ECE\u81EA\u5B9A\u4E49\u9898\u5E93\u4E2D\u83B7\u53D6\uFF0C\u81EA\u5B9A\u4E49\u9898\u5E93\u9700\u9884\u5148\u914D\u7F6E\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleIsCustomQaChange })] }))] }))] })), open && _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
84
94
  };
85
95
  export default RandomQuestion;
@@ -52,7 +52,7 @@ var VideoVoice = function () {
52
52
  var questons = __spreadArray([], __read(form.values.questions), false);
53
53
  questons[index] = __assign(__assign({}, questons[index]), { videoUrl: '' });
54
54
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
55
- }, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index, questions: form.values.questions, setQuestions: function (qs) {
55
+ }, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { lable: "\u79FB\u52A8\u7AEF", index: index, questions: form.values.questions, setQuestions: function (qs) {
56
56
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
57
57
  } })] })), _jsxs(Box, __assign({ textAlign: "center", overflow: "hidden", height: 57, sx: {
58
58
  borderRadius: 2,
@@ -61,7 +61,7 @@ var VideoVoice = function () {
61
61
  var questons = __spreadArray([], __read(form.values.questions), false);
62
62
  questons[index] = __assign(__assign({}, questons[index]), { videoURLWide: '' });
63
63
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
64
- }, videoUrl: q.videoURLWide })), _jsx(VideoVoiceUploader, { index: index, type: "pc", questions: form.values.questions, setQuestions: function (qs) {
64
+ }, videoUrl: q.videoURLWide })), _jsx(VideoVoiceUploader, { lable: "\u7535\u8111\u7AEF", index: index, type: "pc", questions: form.values.questions, setQuestions: function (qs) {
65
65
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
66
66
  } })] }))] })), _jsxs(Stack, __assign({ flexGrow: 1, justifyContent: "space-between", spacing: 3 }, { children: [_jsxs(Stack, __assign({ flexGrow: 1, direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
67
67
  rows: 3,
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
- declare const VideoVoiceUploader: ({ index, questions, setQuestions, type }: {
2
+ declare const VideoVoiceUploader: ({ index, questions, setQuestions, type, lable }: {
3
3
  index: any;
4
4
  questions: any;
5
5
  setQuestions: any;
6
6
  type?: string | undefined;
7
+ lable?: string | undefined;
7
8
  }) => JSX.Element;
8
9
  export default VideoVoiceUploader;
@@ -41,8 +41,8 @@ import { useRequest } from 'ahooks';
41
41
  import { Message, Typography, Upload, UploadIcon } from 'fbm-ui';
42
42
  import { CircularProgress, Stack } from 'fbm-ui/lib/mui';
43
43
  var VideoVoiceUploader = function (_a) {
44
- var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions, _b = _a.type, type = _b === void 0 ? 'mobile' : _b;
45
- var _c = useRequest(PostCommonUpload, {
44
+ var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions, _b = _a.type, type = _b === void 0 ? 'mobile' : _b, _c = _a.lable, lable = _c === void 0 ? '上传视频' : _c;
45
+ var _d = useRequest(PostCommonUpload, {
46
46
  manual: true,
47
47
  onSuccess: function (_a) {
48
48
  var data = _a.data;
@@ -50,7 +50,7 @@ var VideoVoiceUploader = function (_a) {
50
50
  questions[index] = __assign(__assign({}, questions[index]), (type === 'mobile' ? { videoUrl: firstData.url } : { videoURLWide: firstData.url }));
51
51
  setQuestions(__spreadArray([], __read(questions), false));
52
52
  },
53
- }), loading = _c.loading, postCommonUpload = _c.run;
53
+ }), loading = _d.loading, postCommonUpload = _d.run;
54
54
  var uploadProps = {
55
55
  type: 'custom',
56
56
  showUploadList: false,
@@ -76,6 +76,6 @@ var VideoVoiceUploader = function (_a) {
76
76
  cursor: 'pointer',
77
77
  width: '100%',
78
78
  height: '100%',
79
- } }, { children: [!loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(UploadIcon, { color: "inherit" }), _jsx(Typography, __assign({ variant: "caption", color: "inherit" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }))), loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(CircularProgress, { size: 24, color: "inherit" }), _jsx(Typography, __assign({ variant: "caption" }, { children: "\u4E0A\u4F20\u4E2D..." }))] })))] })) })));
79
+ } }, { children: [!loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(UploadIcon, { color: "inherit" }), _jsx(Typography, __assign({ variant: "caption", color: "inherit" }, { children: lable }))] }))), loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(CircularProgress, { size: 24, color: "inherit" }), _jsx(Typography, __assign({ variant: "caption" }, { children: "\u4E0A\u4F20\u4E2D..." }))] })))] })) })));
80
80
  };
81
81
  export default VideoVoiceUploader;
@@ -30,6 +30,8 @@ export var defaultQuestionParams = {
30
30
  isOpenAIFollowUp: false,
31
31
  followUpMaximum: 3,
32
32
  enableScoreOptimization: false,
33
+ selfIntroOpt: 0,
34
+ isCustomQa: false,
33
35
  };
34
36
  // 播报方式
35
37
  export var broadcastModeOptions = [