eli-video-interview 1.2.39 → 1.2.40-alpha.2

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 (223) hide show
  1. package/esm/components/react-photo-view/Photo.css +14 -0
  2. package/esm/components/react-photo-view/Photo.d.ts +18 -0
  3. package/esm/components/react-photo-view/Photo.js +54 -0
  4. package/esm/components/react-photo-view/PhotoBox.css +18 -0
  5. package/esm/components/react-photo-view/PhotoBox.d.ts +22 -0
  6. package/esm/components/react-photo-view/PhotoBox.js +302 -0
  7. package/esm/components/react-photo-view/PhotoPage.d.ts +9 -0
  8. package/esm/components/react-photo-view/PhotoPage.js +77 -0
  9. package/esm/components/react-photo-view/PhotoProvider.d.ts +14 -0
  10. package/esm/components/react-photo-view/PhotoProvider.js +98 -0
  11. package/esm/components/react-photo-view/PhotoSlider.css +125 -0
  12. package/esm/components/react-photo-view/PhotoSlider.d.ts +12 -0
  13. package/esm/components/react-photo-view/PhotoSlider.js +262 -0
  14. package/esm/components/react-photo-view/PhotoView.d.ts +30 -0
  15. package/esm/components/react-photo-view/PhotoView.js +48 -0
  16. package/esm/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  17. package/esm/components/react-photo-view/components/ArrowLeft.js +18 -0
  18. package/esm/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  19. package/esm/components/react-photo-view/components/ArrowRight.js +18 -0
  20. package/esm/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  21. package/esm/components/react-photo-view/components/CloseIcon.js +16 -0
  22. package/esm/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  23. package/esm/components/react-photo-view/components/PreventScroll.js +12 -0
  24. package/esm/components/react-photo-view/components/SlidePortal.css +10 -0
  25. package/esm/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  26. package/esm/components/react-photo-view/components/SlidePortal.js +30 -0
  27. package/esm/components/react-photo-view/components/Spinner.css +23 -0
  28. package/esm/components/react-photo-view/components/Spinner.d.ts +4 -0
  29. package/esm/components/react-photo-view/components/Spinner.js +29 -0
  30. package/esm/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  31. package/esm/components/react-photo-view/hooks/useAdjacentImages.js +14 -0
  32. package/esm/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  33. package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +72 -0
  34. package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  35. package/esm/components/react-photo-view/hooks/useAnimationPosition.js +28 -0
  36. package/esm/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  37. package/esm/components/react-photo-view/hooks/useAnimationVisible.js +49 -0
  38. package/esm/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  39. package/esm/components/react-photo-view/hooks/useContinuousTap.js +36 -0
  40. package/esm/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  41. package/esm/components/react-photo-view/hooks/useDebounceCallback.js +48 -0
  42. package/esm/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  43. package/esm/components/react-photo-view/hooks/useEventListener.js +18 -0
  44. package/esm/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  45. package/esm/components/react-photo-view/hooks/useForkedVariable.js +17 -0
  46. package/esm/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  47. package/esm/components/react-photo-view/hooks/useInitial.js +9 -0
  48. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  49. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +3 -0
  50. package/esm/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  51. package/esm/components/react-photo-view/hooks/useMethods.js +35 -0
  52. package/esm/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  53. package/esm/components/react-photo-view/hooks/useMountedRef.js +12 -0
  54. package/esm/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  55. package/esm/components/react-photo-view/hooks/useScrollPosition.js +157 -0
  56. package/esm/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  57. package/esm/components/react-photo-view/hooks/useSetState.js +15 -0
  58. package/esm/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  59. package/esm/components/react-photo-view/hooks/useTargetScale.js +70 -0
  60. package/esm/components/react-photo-view/index.d.ts +4 -0
  61. package/esm/components/react-photo-view/index.js +4 -0
  62. package/esm/components/react-photo-view/photo-context.d.ts +11 -0
  63. package/esm/components/react-photo-view/photo-context.js +2 -0
  64. package/esm/components/react-photo-view/types.d.ts +196 -0
  65. package/esm/components/react-photo-view/types.js +1 -0
  66. package/esm/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  67. package/esm/components/react-photo-view/utils/edgeHandle.js +40 -0
  68. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  69. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.js +11 -0
  70. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  71. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +31 -0
  72. package/esm/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  73. package/esm/components/react-photo-view/utils/getRotateSize.js +11 -0
  74. package/esm/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  75. package/esm/components/react-photo-view/utils/getSuitableImageSize.js +42 -0
  76. package/esm/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  77. package/esm/components/react-photo-view/utils/isTouchDevice.js +5 -0
  78. package/esm/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  79. package/esm/components/react-photo-view/utils/limitTarget.js +12 -0
  80. package/esm/components/react-photo-view/variables.d.ts +48 -0
  81. package/esm/components/react-photo-view/variables.js +48 -0
  82. package/esm/constants/ai-question.d.ts +9 -0
  83. package/esm/constants/ai-question.js +33 -4
  84. package/esm/enum/ai-question.d.ts +5 -2
  85. package/esm/enum/ai-question.js +3 -0
  86. package/esm/modules/ai-ability/Root.js +15 -4
  87. package/esm/modules/ai-ability-select/Root.js +2 -2
  88. package/esm/modules/ai-ability-select/interface.d.ts +1 -0
  89. package/esm/modules/ai-question/components/BootVideo/index.js +1 -1
  90. package/esm/modules/ai-question/components/QuestionModel/Item.js +14 -9
  91. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +10 -5
  92. package/esm/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
  93. package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +96 -0
  94. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +42 -12
  95. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +14 -4
  96. package/esm/modules/ai-question/components/QuestionUpdate/const.js +4 -0
  97. package/esm/modules/ai-question/components/QuestionUpdate/index.js +12 -14
  98. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +8 -0
  99. package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
  100. package/esm/modules/ai-question/components/QuestionUpdate/styled.js +53 -1
  101. package/esm/modules/ai-report/components/ScoreReport/Score.js +4 -1
  102. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  103. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +40 -0
  104. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +5 -3
  105. package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
  106. package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.js +25 -0
  107. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
  108. package/esm/modules/ai-report/components/VideoQuestion/styled.js +7 -1
  109. package/esm/modules/ai-report/interface.d.ts +19 -0
  110. package/esm/services/ai-ability.d.ts +1 -1
  111. package/esm/services/ai-ability.js +1 -1
  112. package/lib/components/react-photo-view/Photo.css +14 -0
  113. package/lib/components/react-photo-view/Photo.d.ts +18 -0
  114. package/lib/components/react-photo-view/Photo.js +60 -0
  115. package/lib/components/react-photo-view/PhotoBox.css +18 -0
  116. package/lib/components/react-photo-view/PhotoBox.d.ts +22 -0
  117. package/lib/components/react-photo-view/PhotoBox.js +308 -0
  118. package/lib/components/react-photo-view/PhotoPage.d.ts +9 -0
  119. package/lib/components/react-photo-view/PhotoPage.js +79 -0
  120. package/lib/components/react-photo-view/PhotoProvider.d.ts +14 -0
  121. package/lib/components/react-photo-view/PhotoProvider.js +104 -0
  122. package/lib/components/react-photo-view/PhotoSlider.css +125 -0
  123. package/lib/components/react-photo-view/PhotoSlider.d.ts +12 -0
  124. package/lib/components/react-photo-view/PhotoSlider.js +268 -0
  125. package/lib/components/react-photo-view/PhotoView.d.ts +30 -0
  126. package/lib/components/react-photo-view/PhotoView.js +53 -0
  127. package/lib/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  128. package/lib/components/react-photo-view/components/ArrowLeft.js +20 -0
  129. package/lib/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  130. package/lib/components/react-photo-view/components/ArrowRight.js +20 -0
  131. package/lib/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  132. package/lib/components/react-photo-view/components/CloseIcon.js +18 -0
  133. package/lib/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  134. package/lib/components/react-photo-view/components/PreventScroll.js +15 -0
  135. package/lib/components/react-photo-view/components/SlidePortal.css +10 -0
  136. package/lib/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  137. package/lib/components/react-photo-view/components/SlidePortal.js +32 -0
  138. package/lib/components/react-photo-view/components/Spinner.css +23 -0
  139. package/lib/components/react-photo-view/components/Spinner.d.ts +4 -0
  140. package/lib/components/react-photo-view/components/Spinner.js +31 -0
  141. package/lib/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  142. package/lib/components/react-photo-view/hooks/useAdjacentImages.js +17 -0
  143. package/lib/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  144. package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +78 -0
  145. package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  146. package/lib/components/react-photo-view/hooks/useAnimationPosition.js +34 -0
  147. package/lib/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  148. package/lib/components/react-photo-view/hooks/useAnimationVisible.js +55 -0
  149. package/lib/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  150. package/lib/components/react-photo-view/hooks/useContinuousTap.js +42 -0
  151. package/lib/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  152. package/lib/components/react-photo-view/hooks/useDebounceCallback.js +51 -0
  153. package/lib/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  154. package/lib/components/react-photo-view/hooks/useEventListener.js +21 -0
  155. package/lib/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  156. package/lib/components/react-photo-view/hooks/useForkedVariable.js +20 -0
  157. package/lib/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  158. package/lib/components/react-photo-view/hooks/useInitial.js +12 -0
  159. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  160. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +5 -0
  161. package/lib/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  162. package/lib/components/react-photo-view/hooks/useMethods.js +38 -0
  163. package/lib/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  164. package/lib/components/react-photo-view/hooks/useMountedRef.js +14 -0
  165. package/lib/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  166. package/lib/components/react-photo-view/hooks/useScrollPosition.js +163 -0
  167. package/lib/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  168. package/lib/components/react-photo-view/hooks/useSetState.js +18 -0
  169. package/lib/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  170. package/lib/components/react-photo-view/hooks/useTargetScale.js +76 -0
  171. package/lib/components/react-photo-view/index.d.ts +4 -0
  172. package/lib/components/react-photo-view/index.js +12 -0
  173. package/lib/components/react-photo-view/photo-context.d.ts +11 -0
  174. package/lib/components/react-photo-view/photo-context.js +4 -0
  175. package/lib/components/react-photo-view/types.d.ts +196 -0
  176. package/lib/components/react-photo-view/types.js +2 -0
  177. package/lib/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  178. package/lib/components/react-photo-view/utils/edgeHandle.js +45 -0
  179. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  180. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.js +14 -0
  181. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  182. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +34 -0
  183. package/lib/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  184. package/lib/components/react-photo-view/utils/getRotateSize.js +14 -0
  185. package/lib/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  186. package/lib/components/react-photo-view/utils/getSuitableImageSize.js +48 -0
  187. package/lib/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  188. package/lib/components/react-photo-view/utils/isTouchDevice.js +7 -0
  189. package/lib/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  190. package/lib/components/react-photo-view/utils/limitTarget.js +17 -0
  191. package/lib/components/react-photo-view/variables.d.ts +48 -0
  192. package/lib/components/react-photo-view/variables.js +51 -0
  193. package/lib/constants/ai-question.d.ts +9 -0
  194. package/lib/constants/ai-question.js +34 -5
  195. package/lib/enum/ai-question.d.ts +5 -2
  196. package/lib/enum/ai-question.js +3 -0
  197. package/lib/modules/ai-ability/Root.js +15 -4
  198. package/lib/modules/ai-ability-select/Root.js +2 -2
  199. package/lib/modules/ai-ability-select/interface.d.ts +1 -0
  200. package/lib/modules/ai-question/components/BootVideo/index.js +1 -1
  201. package/lib/modules/ai-question/components/QuestionModel/Item.js +11 -6
  202. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +8 -3
  203. package/lib/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
  204. package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +103 -0
  205. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +40 -10
  206. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
  207. package/lib/modules/ai-question/components/QuestionUpdate/const.js +4 -0
  208. package/lib/modules/ai-question/components/QuestionUpdate/index.js +11 -13
  209. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +8 -0
  210. package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
  211. package/lib/modules/ai-question/components/QuestionUpdate/styled.js +53 -1
  212. package/lib/modules/ai-report/components/ScoreReport/Score.js +4 -1
  213. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  214. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +45 -0
  215. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +4 -2
  216. package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
  217. package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.js +27 -0
  218. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
  219. package/lib/modules/ai-report/components/VideoQuestion/styled.js +8 -2
  220. package/lib/modules/ai-report/interface.d.ts +19 -0
  221. package/lib/services/ai-ability.d.ts +1 -1
  222. package/lib/services/ai-ability.js +1 -1
  223. package/package.json +2 -2
@@ -2,9 +2,17 @@ import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/
2
2
  import { ADD_QUESTION_TYPE } from '@enum/ai-question';
3
3
  export declare const ADD_QUESTION_TYPE_LIST: {
4
4
  type: ADD_QUESTION_TYPE;
5
+ hide: boolean;
5
6
  title: string;
6
7
  desc: string;
7
8
  }[];
9
+ export declare const ADD_QUESTION_TYPE_SHOW_LIST: {
10
+ type: ADD_QUESTION_TYPE;
11
+ hide: boolean;
12
+ title: string;
13
+ desc: string;
14
+ }[];
15
+ export declare const QUESTION_TYPE_TITLE_MAP: {};
8
16
  export declare const QUESTION_TYPE_MAPPING_LABEL: {
9
17
  1: string;
10
18
  2: string;
@@ -41,4 +49,5 @@ export declare const MAX_UPLOAD_FILE_SIZE: number;
41
49
  export declare const MAX_UPLOAD_VIDEO_FILE_SIZE: number;
42
50
  export declare const TEST_TYPE_READONLY: number[];
43
51
  export declare const DISABLED_REPEAT_TYPE: number[];
52
+ export declare const DISABLED_COST_TYPE: number[];
44
53
  export declare const IS_AI_ANALYSIS: (step: Pick<QuestionParams, 'aiType'>) => boolean;
@@ -1,22 +1,50 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.IS_AI_ANALYSIS = exports.DISABLED_REPEAT_TYPE = exports.TEST_TYPE_READONLY = exports.MAX_UPLOAD_VIDEO_FILE_SIZE = exports.MAX_UPLOAD_FILE_SIZE = exports.AiVideoStatus = exports.InteractiveModes = exports.DEFAULT_VITUAL_HUMAN_LIST = exports.DEFAULT_GUIDE_VIDEO = exports.DEFAULT_GUIDE_VIDEO_THUMB_URL = exports.DEFAULT_GUIDE_VIDEO_URL = exports.QUESTION_TYPE_MAPPING_LABEL = exports.ADD_QUESTION_TYPE_LIST = void 0;
4
+ exports.IS_AI_ANALYSIS = exports.DISABLED_COST_TYPE = exports.DISABLED_REPEAT_TYPE = exports.TEST_TYPE_READONLY = exports.MAX_UPLOAD_VIDEO_FILE_SIZE = exports.MAX_UPLOAD_FILE_SIZE = exports.AiVideoStatus = exports.InteractiveModes = exports.DEFAULT_VITUAL_HUMAN_LIST = exports.DEFAULT_GUIDE_VIDEO = exports.DEFAULT_GUIDE_VIDEO_THUMB_URL = exports.DEFAULT_GUIDE_VIDEO_URL = exports.QUESTION_TYPE_MAPPING_LABEL = exports.QUESTION_TYPE_TITLE_MAP = exports.ADD_QUESTION_TYPE_SHOW_LIST = exports.ADD_QUESTION_TYPE_LIST = void 0;
5
5
  var ai_question_1 = require("../enum/ai-question");
6
- var FREE = ai_question_1.ADD_QUESTION_TYPE.FREE, LANGUAGE = ai_question_1.ADD_QUESTION_TYPE.LANGUAGE;
6
+ var FREE = ai_question_1.ADD_QUESTION_TYPE.FREE, LANGUAGE = ai_question_1.ADD_QUESTION_TYPE.LANGUAGE, EVALUATION = ai_question_1.ADD_QUESTION_TYPE.EVALUATION, SINGLECHIOCE = ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE;
7
7
  var QA = ai_question_1.QUESTION_TYPE.QA, COLOR_BLINDNESS = ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS, ALPHABETIC_DICTATION = ai_question_1.QUESTION_TYPE.ALPHABETIC_DICTATION, AI_ANALYSIS = ai_question_1.QUESTION_TYPE.AI_ANALYSIS, POLICY_DECISION_GAME = ai_question_1.QUESTION_TYPE.POLICY_DECISION_GAME, MEMORY_GAME = ai_question_1.QUESTION_TYPE.MEMORY_GAME, EMOTION_GAME = ai_question_1.QUESTION_TYPE.EMOTION_GAME;
8
+ /*
9
+ * 题目类型列表
10
+ */
8
11
  exports.ADD_QUESTION_TYPE_LIST = [
9
12
  {
10
13
  type: FREE,
11
- title: '自由作答题',
14
+ hide: false,
15
+ title: '问答题',
12
16
  desc: '以问答的形式要求候选人对你定问题作答。',
13
17
  },
14
18
  {
15
19
  type: LANGUAGE,
20
+ hide: false,
16
21
  title: '朗读题',
17
22
  desc: '候选人根据所提供的文案进行朗读。',
18
23
  },
24
+ {
25
+ type: EVALUATION,
26
+ hide: true,
27
+ title: '评估题',
28
+ desc: '候选人根据所提供的文案进行朗读。',
29
+ },
30
+ {
31
+ type: SINGLECHIOCE,
32
+ hide: false,
33
+ title: '单选题',
34
+ desc: '以单选的形式要求候选人对问题进行作答。',
35
+ },
19
36
  ];
37
+ /*
38
+ * 可以自定义的题目类型列表
39
+ */
40
+ exports.ADD_QUESTION_TYPE_SHOW_LIST = exports.ADD_QUESTION_TYPE_LIST.filter(function (v) { return !v.hide; });
41
+ /*
42
+ * 题目类型名称映射表
43
+ */
44
+ exports.QUESTION_TYPE_TITLE_MAP = exports.ADD_QUESTION_TYPE_LIST.reduce(function (acc, cur) {
45
+ acc[cur.type] = cur.title;
46
+ return acc;
47
+ }, {});
20
48
  exports.QUESTION_TYPE_MAPPING_LABEL = (_a = {},
21
49
  _a[QA] = '问答题',
22
50
  _a[COLOR_BLINDNESS] = '色盲题',
@@ -55,8 +83,9 @@ exports.AiVideoStatus = {
55
83
  };
56
84
  exports.MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
57
85
  exports.MAX_UPLOAD_VIDEO_FILE_SIZE = 1024 * 1024 * 500;
58
- exports.TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12];
59
- exports.DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12];
86
+ exports.TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12, 16];
87
+ exports.DISABLED_REPEAT_TYPE = [2, 4, 7, 8, 9, 11, 12, 16];
88
+ exports.DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
60
89
  // 是否开启AI分析
61
90
  var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
62
91
  exports.IS_AI_ANALYSIS = IS_AI_ANALYSIS;
@@ -3,7 +3,9 @@
3
3
  */
4
4
  export declare enum ADD_QUESTION_TYPE {
5
5
  FREE = 1,
6
- LANGUAGE = 2
6
+ LANGUAGE = 2,
7
+ EVALUATION = 3,
8
+ SINGLECHIOCE = 4
7
9
  }
8
10
  /**
9
11
  * AI考核标准类型
@@ -34,5 +36,6 @@ export declare enum QUESTION_TYPE {
34
36
  AI_ANALYSIS = 6,
35
37
  POLICY_DECISION_GAME = 7,
36
38
  MEMORY_GAME = 8,
37
- EMOTION_GAME = 9
39
+ EMOTION_GAME = 9,
40
+ SINGLECHIOCE = 17
38
41
  }
@@ -8,6 +8,8 @@ var ADD_QUESTION_TYPE;
8
8
  (function (ADD_QUESTION_TYPE) {
9
9
  ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["FREE"] = 1] = "FREE";
10
10
  ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["LANGUAGE"] = 2] = "LANGUAGE";
11
+ ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["EVALUATION"] = 3] = "EVALUATION";
12
+ ADD_QUESTION_TYPE[ADD_QUESTION_TYPE["SINGLECHIOCE"] = 4] = "SINGLECHIOCE";
11
13
  })(ADD_QUESTION_TYPE = exports.ADD_QUESTION_TYPE || (exports.ADD_QUESTION_TYPE = {}));
12
14
  /**
13
15
  * AI考核标准类型
@@ -42,4 +44,5 @@ var QUESTION_TYPE;
42
44
  QUESTION_TYPE[QUESTION_TYPE["POLICY_DECISION_GAME"] = 7] = "POLICY_DECISION_GAME";
43
45
  QUESTION_TYPE[QUESTION_TYPE["MEMORY_GAME"] = 8] = "MEMORY_GAME";
44
46
  QUESTION_TYPE[QUESTION_TYPE["EMOTION_GAME"] = 9] = "EMOTION_GAME";
47
+ QUESTION_TYPE[QUESTION_TYPE["SINGLECHIOCE"] = 17] = "SINGLECHIOCE";
45
48
  })(QUESTION_TYPE = exports.QUESTION_TYPE || (exports.QUESTION_TYPE = {}));
@@ -59,6 +59,7 @@ var ahooks_1 = require("ahooks");
59
59
  var dayjs_1 = __importDefault(require("dayjs"));
60
60
  var fbm_ui_1 = require("fbm-ui");
61
61
  var react_1 = require("react");
62
+ var PAGE_SIZE = 20;
62
63
  var AiAbilityRoot = function (_a) {
63
64
  var _b = _a.ablilityNameLength, ablilityNameLength = _b === void 0 ? 30 : _b;
64
65
  var _c = (0, ahooks_1.useSetState)({
@@ -67,9 +68,12 @@ var AiAbilityRoot = function (_a) {
67
68
  type: 3,
68
69
  isWorkplace: false,
69
70
  }), state = _c[0], setState = _c[1];
70
- var _d = (0, react_1.useState)(false), AddAbilityOpen = _d[0], setAddAbilityOpen = _d[1];
71
- var _e = (0, react_1.useState)(false), UpdateAbilityOpen = _e[0], setUpdateAbilityOpen = _e[1];
72
- var _f = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionList), data = _f.data, getList = _f.run, listLoading = _f.loading;
71
+ var _d = (0, react_1.useState)(0), page = _d[0], setPage = _d[1];
72
+ var _e = (0, react_1.useState)(false), AddAbilityOpen = _e[0], setAddAbilityOpen = _e[1];
73
+ var _f = (0, react_1.useState)(false), UpdateAbilityOpen = _f[0], setUpdateAbilityOpen = _f[1];
74
+ var _g = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.PostQuestionCollectionList)({ page: page, pageSize: PAGE_SIZE }); }, {
75
+ refreshDeps: [page],
76
+ }), data = _g.data, getList = _g.run, listLoading = _g.loading;
73
77
  var deleteList = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionDelete, {
74
78
  manual: true,
75
79
  onSuccess: function () {
@@ -148,6 +152,13 @@ var AiAbilityRoot = function (_a) {
148
152
  },
149
153
  },
150
154
  ];
151
- return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [AddAbilityOpen && ((0, jsx_runtime_1.jsx)(AddAbility_1.default, __assign({}, state, { open: AddAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), UpdateAbilityOpen && ((0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Table, { emptyText: "\u6682\u65E0\u6570\u636E", nameText: "\u8003\u5BDF\u80FD\u529B", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
155
+ return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [AddAbilityOpen && ((0, jsx_runtime_1.jsx)(AddAbility_1.default, __assign({}, state, { open: AddAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), UpdateAbilityOpen && ((0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Table, { emptyText: "\u6682\u65E0\u6570\u636E", nameText: "\u8003\u5BDF\u80FD\u529B", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns, PaginationProps: {
156
+ total: (data === null || data === void 0 ? void 0 : data.data.total) || 0,
157
+ pageSize: PAGE_SIZE,
158
+ onPageChange: function (page) {
159
+ setPage(Math.max(0, page - 1));
160
+ return true;
161
+ },
162
+ } }) }))] }));
152
163
  };
153
164
  exports.default = AiAbilityRoot;
@@ -29,7 +29,7 @@ var ScrollDialogContent = (0, fbm_ui_2.styled)(fbm_ui_1.Box)({
29
29
  overflow: 'scroll',
30
30
  });
31
31
  var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
32
- var jobToken = _a.jobToken, thirdToken = _a.thirdToken, token = _a.token;
32
+ var jobToken = _a.jobToken, thirdToken = _a.thirdToken, token = _a.token, hiddenTips = _a.hiddenTips;
33
33
  var _b = (0, question_ability_store_1.useAiAbilityListStore)(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList, selctedAbilitys = _b.selctedAbilitys;
34
34
  var setEnterprise = (0, enterprise_store_1.useEnterpriseStore)().setEnterprise;
35
35
  var data = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.GetAiAbilityList)({ jobToken: jobToken, thirdToken: thirdToken }); }, {
@@ -46,7 +46,7 @@ var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
46
46
  setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
47
47
  // eslint-disable-next-line react-hooks/exhaustive-deps
48
48
  }, [jobToken, thirdToken]);
49
- return ((0, jsx_runtime_1.jsx)(ScrollDialogContent, __assign({ ref: ref }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 2, mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u8BF7\u9009\u62E9\u8981\u4F18\u5148\u4F7F\u7528\u7684\u8003\u5BDF\u80FD\u529B\uFF0C\u4E5F\u53EF\u4EE5\u70B9\u51FB\u300C\u4E0B\u4E00\u6B65\u300D\u76F4\u63A5\u51FA\u9898" })), (aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.some(function (v) { return v.isNew; })) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "AI\u6839\u636E\u5C97\u4F4D\u4FE1\u606F\u751F\u6210\u7684\u80FD\u529B\uFF0C\u521B\u5EFA\u5B8C\u6B65\u9AA4\u540E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9009\u62E9\u7684\u65B0\u589E\u80FD\u529B\u52A0\u5165\u5230\u8BBE\u7F6E\u9875\u7684\u8003\u5BDF\u80FD\u529B\u5217\u8868\u4E2D\u3002" }))] })))] })), (0, jsx_runtime_1.jsx)(AiAbilityList_1.default, { items: aiAbilityList })] })) })));
49
+ return ((0, jsx_runtime_1.jsx)(ScrollDialogContent, __assign({ ref: ref }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 2, mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: !hiddenTips ? '请选择要优先使用的考察能力,也可以点击「下一步」直接出题' : '已选择的考察能力会优先在面试题目中展示' })), (aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.some(function (v) { return v.isNew; })) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "AI\u6839\u636E\u5C97\u4F4D\u4FE1\u606F\u751F\u6210\u7684\u80FD\u529B\uFF0C\u521B\u5EFA\u5B8C\u6B65\u9AA4\u540E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9009\u62E9\u7684\u65B0\u589E\u80FD\u529B\u52A0\u5165\u5230\u8BBE\u7F6E\u9875\u7684\u8003\u5BDF\u80FD\u529B\u5217\u8868\u4E2D\u3002" }))] })))] })), (0, jsx_runtime_1.jsx)(AiAbilityList_1.default, { items: aiAbilityList })] })) })));
50
50
  });
51
51
  AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
52
52
  exports.default = (0, react_1.memo)(AiAbilitySelectRoot);
@@ -3,6 +3,7 @@ export interface AiAbilitySelectProps {
3
3
  thirdToken?: string;
4
4
  selectedTokens?: string[];
5
5
  token?: string;
6
+ hiddenTips?: boolean;
6
7
  }
7
8
  interface AiAbilityDetailInfo {
8
9
  name: string;
@@ -133,7 +133,7 @@ var BootVideo = function (props) {
133
133
  return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 768 }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u9762\u8BD5\u5B98\u5F62\u8C61" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: virtualManList.map(function (human) {
134
134
  var _a;
135
135
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { src: human.virtualHumanAvatar, style: { borderColor: ((_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) === human.humanToken ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken));
136
- }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "disabled", mb: 1 }, { children: "\u8BF4\u660E\uFF1A\u6B65\u9AA4\u4E0B\u7684\u6240\u6709\u9898\u76EE\u7684\u865A\u62DF\u4EBA\u64AD\u653E\u89C6\u9891\u5747\u751F\u6210\u540E\uFF0C\u624D\u80FD\u751F\u6548\u865A\u62DF\u4EBA\u6548\u679C\u3002\u5426\u5219\uFF0C\u5C06\u4EE5\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F\u8FDB\u884C\u4EA4\u4E92\u3002" }))] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
136
+ }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "disabled", mb: 1 }, { children: "\u8BF4\u660E\uFF1A\u6B65\u9AA4\u4E0B\u7684\u6240\u6709\u9898\u76EE\u7684\u865A\u62DF\u4EBA\u64AD\u653E\u89C6\u9891\u5747\u751F\u6210\u540E\uFF0C\u624D\u80FD\u751F\u6548\u865A\u62DF\u4EBA\u6548\u679C\u3002\u5426\u5219\uFF0C\u5C06\u4EE5\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F\u8FDB\u884C\u4EA4\u4E92\u3002\u76EE\u524D\u53EA\u6709\u5C0F\u9762\u652F\u6301\u5BF9\u9898\u76EE\u8FFD\u95EE\uFF0C\u5176\u4ED6\u5F62\u8C61\u6682\u4E0D\u652F\u6301\u3002" }))] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
137
137
  var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
138
138
  return ((0, jsx_runtime_1.jsx)("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
139
139
  }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 462, color: "text.disabled", mb: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.CustomUploadButtonRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ ml: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: mediaState.appliedAllPosition, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] }))] }), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardRoot, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardTitle, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "video" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 160, height: 286, src: (_a = interviewRoomState.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.virtualPreviewMedia, controls: true }) })) })))] })) }) })));
@@ -23,6 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  var jsx_runtime_1 = require("react/jsx-runtime");
26
+ var interview_room_store_1 = require("../../../../store/ai-question/interview-room-store");
26
27
  var ai_question_1 = require("../../../../constants/ai-question");
27
28
  var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
28
29
  var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
@@ -31,10 +32,11 @@ var fbm_ui_1 = require("fbm-ui");
31
32
  var mui_1 = require("fbm-ui/lib/mui");
32
33
  var react_1 = require("react");
33
34
  var QuestionModelListItem = function (props) {
35
+ var _a = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
34
36
  var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
35
- 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;
37
+ 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;
36
38
  var isAiAnalysis = (0, ai_question_1.IS_AI_ANALYSIS)(step);
37
- var _a = (0, question_model_store_1.useQuestionModelStore)(), editModel = _a.editModel, removeModel = _a.removeModel, updateModelWeight = _a.updateModelWeight;
39
+ var _b = (0, question_model_store_1.useQuestionModelStore)(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
38
40
  var updateQuestionState = (0, question_update_store_1.useUpdateQuestionStore)().updateQuestionState;
39
41
  var handleEdit = (0, react_1.useCallback)(function () {
40
42
  updateQuestionState({ open: true, token: token, index: index, aiShowType: aiShowType, item: step });
@@ -68,14 +70,17 @@ var QuestionModelListItem = function (props) {
68
70
  var handleAnswerStatus = (0, react_1.useCallback)(function () {
69
71
  editModel(__assign(__assign({}, step), { answerStatus: answerStatus === 2 ? 1 : 2 }), index);
70
72
  }, [editModel, answerStatus, step, index]);
73
+ var handleOpenAIFollowUpStatus = (0, react_1.useCallback)(function () {
74
+ editModel(__assign(__assign({}, step), { isOpenAIFollowUp: !isOpenAIFollowUp }), index);
75
+ }, [editModel, isOpenAIFollowUp, step, index]);
71
76
  var formatQuestion = (0, react_1.useMemo)(function () {
72
77
  if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
73
- return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "#F5C441", flexShrink: 0, fontWeight: 500 }, { children: "[\u5185\u5BB9\u968F\u673A]" })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
78
+ return ((0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", spacing: 1 }, { children: (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, i) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), i)); }) })) })));
74
79
  }
75
80
  return questions.map(function (v) { return v.content; }).join('\n');
76
81
  }, [questions]);
77
- return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragIndicatorIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
78
- return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
79
- }), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } })] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] }))] })), (!ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.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: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }) })))] })))] })));
82
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragHandleIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", ai_question_1.QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
83
+ return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
84
+ }), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] })) })), (!ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.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: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), type === 1 && aiShowType === 1 && ((aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) !== 2 || interactType === 1) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
80
85
  };
81
86
  exports.default = (0, react_1.memo)(QuestionModelListItem);
@@ -13,12 +13,12 @@ var __assign = (this && this.__assign) || function () {
13
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
+ var _a;
16
17
  Object.defineProperty(exports, "__esModule", { value: true });
17
18
  var jsx_runtime_1 = require("react/jsx-runtime");
18
19
  var BaseAccordion_1 = __importDefault(require("../BaseAccordion"));
19
20
  var const_1 = require("../QuestionUpdate/const");
20
21
  var question_ability_store_1 = require("../../../../store/ai-ability-select/question-ability-store");
21
- var SvgIcon_1 = __importDefault(require("../../../../components/SvgIcon"));
22
22
  var ai_question_1 = require("../../../../constants/ai-question");
23
23
  var ai_question_2 = require("../../../../enum/ai-question");
24
24
  var global_store_1 = require("../../../../store/ai-question/global-store");
@@ -30,6 +30,11 @@ var ahooks_1 = require("ahooks");
30
30
  var fbm_ui_1 = require("fbm-ui");
31
31
  var mui_1 = require("fbm-ui/lib/mui");
32
32
  var react_1 = require("react");
33
+ var ICONS = (_a = {},
34
+ _a[ai_question_2.ADD_QUESTION_TYPE.FREE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.SMSOneIcon, { color: "secondary" }),
35
+ _a[ai_question_2.ADD_QUESTION_TYPE.LANGUAGE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.MicIcon, { color: "secondary" }),
36
+ _a[ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioCheckedIcon, { color: "secondary" }),
37
+ _a);
33
38
  var AiEvaluation = function () {
34
39
  var onOpenTemplate = (0, global_store_1.useAiQuestionStore)(function (store) { return [store.onOpenTemplate]; }).onOpenTemplate;
35
40
  var updateQuestionState = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.updateQuestionState]; }).updateQuestionState;
@@ -46,9 +51,9 @@ var AiEvaluation = function () {
46
51
  setState({ addQuestionOpen: false });
47
52
  updateQuestionState({ open: true, aiShowType: aiShowType, token: '', index: -1, item: __assign(__assign({}, const_1.defaultQuestionParams), { aiShowType: aiShowType, token: (0, utils_1.uniqueId)() }) });
48
53
  }, [setState, updateQuestionState]);
49
- var content = ((0, jsx_runtime_1.jsx)(mui_1.List, { children: ai_question_1.ADD_QUESTION_TYPE_LIST.map(function (_a) {
54
+ var content = ((0, jsx_runtime_1.jsx)(mui_1.List, { children: ai_question_1.ADD_QUESTION_TYPE_SHOW_LIST.map(function (_a) {
50
55
  var title = _a.title, desc = _a.desc, type = _a.type;
51
- return ((0, jsx_runtime_1.jsx)(mui_1.ListItem, __assign({ disablePadding: true }, { children: (0, jsx_runtime_1.jsxs)(mui_1.ListItemButton, __assign({ onClick: function () { return handleClickAdd(type); } }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemIcon, __assign({ sx: { minWidth: 40 } }, { children: type === ai_question_2.ADD_QUESTION_TYPE.FREE ? (0, jsx_runtime_1.jsx)(fbm_ui_1.SMSOneIcon, { color: "secondary" }) : (0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "free", style: { fill: 'rgba(0, 0, 0, 0.56)' } }) })), (0, jsx_runtime_1.jsx)(mui_1.ListItemText, { primary: title, secondary: desc })] })) }), "question_type_".concat(type)));
56
+ return ((0, jsx_runtime_1.jsx)(mui_1.ListItem, __assign({ disablePadding: true }, { children: (0, jsx_runtime_1.jsxs)(mui_1.ListItemButton, __assign({ onClick: function () { return handleClickAdd(type); } }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemIcon, __assign({ sx: { minWidth: 40 } }, { children: ICONS[type] })), (0, jsx_runtime_1.jsx)(mui_1.ListItemText, { primary: title, secondary: desc })] })) }), "question_type_".concat(type)));
52
57
  }) }));
53
58
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.LayerOutlineIcon, {}), onClick: function () { return onOpenTemplate === null || onOpenTemplate === void 0 ? void 0 : onOpenTemplate(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps); } }, { children: "\u5C97\u4F4D\u6A21\u7248\u5E93" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: addQuestionOpen, arrow: false, content: content, onClickAway: function () { return setState({ addQuestionOpen: false }); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: function () { return setState({ addQuestionOpen: true }); } }, { children: "\u81EA\u5B9A\u4E49\u9898\u76EE" })) }))] })), aiEvaluationData.map(function (_a, index) {
54
59
  var name = _a.name, list = _a.list;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * 验证0-9的整数
4
+ */
5
+ export declare const IS_INTEGER_REG: RegExp;
6
+ /**
7
+ * 可输入最大分值
8
+ */
9
+ export declare const MAX_SCORE_VALUE = 100;
10
+ export declare const VERIFICATION_SCORE: (value: string) => boolean;
11
+ export interface QuestionItemProps {
12
+ index: number;
13
+ item: any;
14
+ onChange: (key: string, value: any, index: number) => void;
15
+ }
16
+ declare const Choice: React.FC<QuestionItemProps>;
17
+ export default Choice;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
+ if (ar || !(i in from)) {
16
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
+ ar[i] = from[i];
18
+ }
19
+ }
20
+ return to.concat(ar || Array.prototype.slice.call(from));
21
+ };
22
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.VERIFICATION_SCORE = exports.MAX_SCORE_VALUE = exports.IS_INTEGER_REG = void 0;
27
+ var jsx_runtime_1 = require("react/jsx-runtime");
28
+ var styled_1 = require("./styled");
29
+ var utils_1 = require("../../../../utils/utils");
30
+ var fbm_ui_1 = require("fbm-ui");
31
+ var formik_1 = require("formik");
32
+ var react_1 = require("react");
33
+ var sortablejs_1 = __importDefault(require("sortablejs"));
34
+ /**
35
+ * 验证0-9的整数
36
+ */
37
+ exports.IS_INTEGER_REG = /^[0-9]\d*$/;
38
+ /**
39
+ * 可输入最大分值
40
+ */
41
+ exports.MAX_SCORE_VALUE = 100;
42
+ var VERIFICATION_SCORE = function (value) { return (value ? !exports.IS_INTEGER_REG.test(value) || Number(value) > exports.MAX_SCORE_VALUE : false); };
43
+ exports.VERIFICATION_SCORE = VERIFICATION_SCORE;
44
+ var Choice = function (_a) {
45
+ var _b;
46
+ var index = _a.index, item = _a.item, onChange = _a.onChange;
47
+ var ref = (0, react_1.useRef)();
48
+ var sortable = (0, react_1.useRef)();
49
+ var helper = (0, react_1.useRef)();
50
+ var handleOptionAdd = (0, react_1.useCallback)(function () {
51
+ var _a;
52
+ var optionItem = { key: (0, utils_1.uniqueId)(), content: '', score: 0 };
53
+ if (helper.current) {
54
+ (_a = helper.current) === null || _a === void 0 ? void 0 : _a.push(optionItem);
55
+ }
56
+ }, []);
57
+ (0, react_1.useEffect)(function () {
58
+ sortable.current && sortable.current.destroy();
59
+ sortable.current = new sortablejs_1.default(ref.current, {
60
+ handle: '.optionItemDragHandle',
61
+ animation: 150,
62
+ forceFallback: true,
63
+ onEnd: function (_a) {
64
+ var oldIndex = _a.oldIndex, newIndex = _a.newIndex;
65
+ if (helper.current) {
66
+ helper.current.handleMove(newIndex, oldIndex);
67
+ }
68
+ },
69
+ });
70
+ }, [index, item, onChange]);
71
+ (0, react_1.useEffect)(function () {
72
+ var _a;
73
+ if (!((_a = item === null || item === void 0 ? void 0 : item.options) === null || _a === void 0 ? void 0 : _a.length)) {
74
+ handleOptionAdd();
75
+ }
76
+ }, [item, handleOptionAdd, index]);
77
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ ref: ref }, { children: ((_b = item === null || item === void 0 ? void 0 : item.options) === null || _b === void 0 ? void 0 : _b.length) > 0 && ((0, jsx_runtime_1.jsx)(formik_1.FieldArray, { name: "questions.".concat(index, ".options"), render: function (p) {
78
+ var _a;
79
+ helper.current = p;
80
+ return (_a = p.form.values.questions[index].options) === null || _a === void 0 ? void 0 : _a.map(function (v, i) {
81
+ var _a;
82
+ return ((0, jsx_runtime_1.jsxs)(styled_1.ChoiceItem, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.DragIndicatorIcon, { className: "optionItemDragHandle" }), (0, jsx_runtime_1.jsx)(styled_1.ChoiceIcon, { borderRadius: 2 }), (0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ required: true, name: "questions[".concat(index, "].options[").concat(i, "].content"), placeholder: "\u65B0\u9009\u9879", InputProps: {
83
+ variant: 'standard',
84
+ multiline: true,
85
+ sx: {
86
+ mr: 1.5,
87
+ },
88
+ }, sx: { height: 'auto', flexGrow: 1, overflow: 'hidden' } }, { children: (0, jsx_runtime_1.jsx)(styled_1.ChoiceItemInput, { multiline: true, maxRows: 3, placeholder: "\u65B0\u9009\u9879", variant: "standard" }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 36, flexShrink: 0, ml: 2 }, { children: ((_a = p.form.values.questions[index].options) === null || _a === void 0 ? void 0 : _a.length) > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ className: "choice-item-delete-icon", onClick: function () { return p.remove(i); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ required: true, name: "questions[".concat(index, "].options[").concat(i, "].score"), placeholder: "\u5206\u503C", InputProps: {
89
+ multiline: true,
90
+ }, rules: [function (_a) {
91
+ var value = _a.value;
92
+ return (0, exports.VERIFICATION_SCORE)(value);
93
+ }], sx: { height: 'auto', widht: 84 }, onChange: function (e) {
94
+ var value = e.target.value;
95
+ if ((0, exports.VERIFICATION_SCORE)(value) || Number(value) > exports.MAX_SCORE_VALUE || Number(value) < 1) {
96
+ return;
97
+ }
98
+ onChange('options', __spreadArray([], ((item === null || item === void 0 ? void 0 : item.options) || []).map(function (v, index) { return (i === index ? __assign(__assign({}, v), { score: Number(value) }) : v); }), true), index);
99
+ } }, { children: (0, jsx_runtime_1.jsx)(styled_1.ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: "\u5206" }) }))] }, i));
100
+ });
101
+ } })) })), (0, jsx_runtime_1.jsx)(styled_1.ChoiceItem, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), variant: "outlined", color: "inherit", size: "small", onClick: handleOptionAdd, sx: { ml: -2 } }, { children: "\u6DFB\u52A0\u9009\u9879" })) })] })));
102
+ };
103
+ exports.default = Choice;
@@ -61,6 +61,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
61
61
  Object.defineProperty(exports, "__esModule", { value: true });
62
62
  var jsx_runtime_1 = require("react/jsx-runtime");
63
63
  var AiAnalysis_1 = __importDefault(require("../AiAnalysis"));
64
+ var Chioce_1 = __importDefault(require("./Chioce"));
64
65
  var const_1 = require("./const");
65
66
  var RandomQuestion_1 = __importDefault(require("./RandomQuestion"));
66
67
  var VideoVoice_1 = __importDefault(require("./VideoVoice"));
@@ -87,6 +88,11 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
87
88
  }, [data]);
88
89
  var form = (0, fbm_ui_1.useForm)({
89
90
  initialValues: initialValues,
91
+ validate: function (values) {
92
+ var errors = {};
93
+ // console.log(values);
94
+ return errors;
95
+ },
90
96
  onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {
91
97
  return __generator(this, function (_a) {
92
98
  switch (_a.label) {
@@ -144,16 +150,40 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
144
150
  define: define,
145
151
  isWorkplace: isWorkplace,
146
152
  });
147
- }), onChange: handleCategoryChange }) })))] })), (form === null || form === void 0 ? void 0 : form.values.broadcastType) === 1 || preview ? ((0, jsx_runtime_1.jsx)(formik_1.FieldArray, { name: "questions", render: function () {
148
- var _a;
149
- return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (_, index) { return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.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: {
150
- rows: 3,
151
- multiline: true,
152
- sx: { padding: 0 },
153
- }, sx: { flexGrow: 1, height: 120 } }), form.values.questions.length > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ height: 84, pt: 1 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: function () {
154
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
155
- } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) })))] }), index)); });
156
- } })) : ((0, jsx_runtime_1.jsx)(VideoVoice_1.default, {})), !preview && aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE && ((0, jsx_runtime_1.jsx)(RandomQuestion_1.default, { category: aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
153
+ }), onChange: handleCategoryChange }) })))] })), aiShowType !== ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE &&
154
+ ((form === null || form === void 0 ? void 0 : form.values.broadcastType) === 1 || preview ? ((0, jsx_runtime_1.jsx)(formik_1.FieldArray, { name: "questions", render: function () {
155
+ var _a;
156
+ return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (_, index) { return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.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: {
157
+ rows: 3,
158
+ multiline: true,
159
+ sx: { padding: 0 },
160
+ }, sx: { flexGrow: 1, height: 120 } }), form.values.questions.length > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ height: 84, pt: 1 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: function () {
161
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
162
+ } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) })))] }), index)); });
163
+ } })) : ((0, jsx_runtime_1.jsx)(VideoVoice_1.default, {}))), !preview && aiShowType === ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE && (
164
+ // @ts-ignore
165
+ (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)(formik_1.FieldArray, { name: "questions", render: function () {
166
+ var _a;
167
+ return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (v, index) {
168
+ var _a, _b;
169
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2, pb: 2, pt: 0.5, mb: 2, boxSizing: "border-box", component: mui_1.Paper, variant: "outlined", width: "100%", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "flex-end" }, { children: ((_b = (_a = form === null || form === void 0 ? void 0 : form.values) === null || _a === void 0 ? void 0 : _a.questions) === null || _b === void 0 ? void 0 : _b.length) > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { mr: -1 }, onClick: function () {
170
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
171
+ } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.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: {
172
+ // rows: 3,
173
+ maxRows: 3,
174
+ minRows: 1,
175
+ multiline: true,
176
+ sx: { padding: 0 },
177
+ }, sx: {
178
+ flexGrow: 1,
179
+ height: 'auto',
180
+ } }), (0, jsx_runtime_1.jsx)(Chioce_1.default, { index: index, item: v, onChange: function (_, options, i) {
181
+ form.values.questions[index].options = options;
182
+ console.log(form.values.questions, options);
183
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions, true) }));
184
+ } })] }), index));
185
+ });
186
+ } }) })), !preview && aiShowType !== ai_question_1.ADD_QUESTION_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(RandomQuestion_1.default, { aiShowType: aiShowType, category: aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
157
187
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), [{ content: '', videoUrl: '' }], false) }));
158
188
  }, onAddRandomQuestion: function (qs) {
159
189
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), qs.map(function (v) { return ({ content: v, videoUrl: '' }); }), true) }));
@@ -16,6 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var SelectQuestion_1 = __importDefault(require("./SelectQuestion"));
19
+ var ai_question_1 = require("../../../../enum/ai-question");
19
20
  var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
20
21
  var fbm_ui_1 = require("fbm-ui");
21
22
  var mui_1 = require("fbm-ui/lib/mui");
@@ -23,7 +24,7 @@ var mui_2 = require("fbm-ui/lib/mui");
23
24
  var react_1 = require("react");
24
25
  var RandomQuestion = function (_a) {
25
26
  var _b, _c;
26
- var broadcastType = _a.broadcastType, onAddCustonQuestion = _a.onAddCustonQuestion, onAddRandomQuestion = _a.onAddRandomQuestion, category = _a.category;
27
+ var broadcastType = _a.broadcastType, onAddCustonQuestion = _a.onAddCustonQuestion, onAddRandomQuestion = _a.onAddRandomQuestion, category = _a.category, aiShowType = _a.aiShowType;
27
28
  var _d = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }), questionState = _d.questionState, updateQuestionState = _d.updateQuestionState;
28
29
  var _e = (0, react_1.useState)(false), open = _e[0], setOpen = _e[1];
29
30
  var item = questionState.item;
@@ -58,6 +59,15 @@ var RandomQuestion = function (_a) {
58
59
  item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
59
60
  });
60
61
  };
61
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between", mt: 0.375 }, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Popactions, __assign({ actions: actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), (0, jsx_runtime_1.jsx)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: isVideoBroadcast && ((0, jsx_runtime_1.jsx)(mui_1.FormGroup, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1 }), label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), (0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1 }), label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] })) })) }))] })), open && (0, jsx_runtime_1.jsx)(SelectQuestion_1.default, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
62
+ var handleEnableScoreOptimizationStatus = function () {
63
+ updateQuestionState({
64
+ item: __assign(__assign({}, item), { enableScoreOptimization: !item.enableScoreOptimization }),
65
+ });
66
+ };
67
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between", mt: 0.375 }, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Popactions, __assign({ actions: aiShowType === ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), (0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && ((0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
68
+ mr: 0,
69
+ }, checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
70
+ mr: 0,
71
+ }, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: (0, jsx_runtime_1.jsxs)(mui_1.Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", (0, jsx_runtime_1.jsx)(fbm_ui_1.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: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus }))] }))] })), open && (0, jsx_runtime_1.jsx)(SelectQuestion_1.default, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
62
72
  };
63
73
  exports.default = RandomQuestion;
@@ -30,6 +30,8 @@ exports.defaultQuestionParams = {
30
30
  weight: 0,
31
31
  token: '',
32
32
  originToken: '',
33
+ isOpenAIFollowUp: false,
34
+ enableScoreOptimization: false,
33
35
  };
34
36
  // 播报方式
35
37
  exports.broadcastModeOptions = [
@@ -55,5 +57,7 @@ exports.durationOptions = [
55
57
  { value: 30, label: '30s' },
56
58
  { value: 60, label: '1m' },
57
59
  { value: 180, label: '3m' },
60
+ { value: 300, label: '5m' },
61
+ { value: 600, label: '10m' },
58
62
  { value: 1200, label: '20m' },
59
63
  ];