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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/esm/components/BigBallSvg/styled.d.ts +2 -2
  2. package/esm/components/ScoreBigBall/styled.d.ts +1 -1
  3. package/esm/components/ScrollDialogContent/index.d.ts +1 -1
  4. package/esm/components/VideoPreview/styled.d.ts +3 -3
  5. package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +1 -1
  6. package/esm/constants/ai-question.d.ts +4 -0
  7. package/esm/constants/ai-question.js +11 -0
  8. package/esm/constants/ai-report.d.ts +5 -0
  9. package/esm/constants/ai-report.js +5 -0
  10. package/esm/enum/ai-report.d.ts +12 -0
  11. package/esm/enum/ai-report.js +12 -0
  12. package/esm/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.d.ts +14 -0
  13. package/esm/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.js +145 -0
  14. package/esm/modules/ai-ability/components/AbilityFormItem/index.d.ts +2 -0
  15. package/esm/modules/ai-ability/components/AbilityFormItem/index.js +16 -6
  16. package/esm/modules/ai-ability/components/AddAbility/index.js +88 -103
  17. package/esm/modules/ai-ability/components/UpdateAbility/index.js +81 -106
  18. package/esm/modules/ai-ability/styled.d.ts +2 -2
  19. package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +1 -1
  20. package/esm/modules/ai-question/Root.js +12 -9
  21. package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
  22. package/esm/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
  23. package/esm/modules/ai-question/components/BootVideo/CustomVideos.js +63 -25
  24. package/esm/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
  25. package/esm/modules/ai-question/components/BootVideo/index.js +89 -23
  26. package/esm/modules/ai-question/components/BootVideo/interface.d.ts +1 -0
  27. package/esm/modules/ai-question/components/BootVideo/styled.d.ts +6 -4
  28. package/esm/modules/ai-question/components/BootVideo/styled.js +20 -17
  29. package/esm/modules/ai-question/components/QuestionImport/index.d.ts +4 -0
  30. package/esm/modules/ai-question/components/QuestionImport/index.js +117 -0
  31. package/esm/modules/ai-question/components/QuestionImport/interface.d.ts +8 -0
  32. package/esm/modules/ai-question/components/QuestionImport/interface.js +1 -0
  33. package/esm/modules/ai-question/components/QuestionImport/styled.d.ts +13 -0
  34. package/esm/modules/ai-question/components/QuestionImport/styled.js +49 -0
  35. package/esm/modules/ai-question/components/QuestionModel/Header.js +23 -2
  36. package/esm/modules/ai-question/components/QuestionModel/Item.js +4 -4
  37. package/esm/modules/ai-question/components/QuestionModel/index.js +1 -1
  38. package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +1 -0
  39. package/esm/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
  40. package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +3 -3
  41. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -1
  42. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -3
  43. package/esm/modules/ai-question/components/QuestionTemplate/index.js +3 -2
  44. package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +1 -0
  45. package/esm/modules/ai-question/components/QuestionUpdate/FllowupSetting.d.ts +4 -0
  46. package/esm/modules/ai-question/components/QuestionUpdate/FllowupSetting.js +86 -0
  47. package/esm/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.d.ts +9 -0
  48. package/esm/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.js +94 -0
  49. package/esm/modules/ai-question/components/QuestionUpdate/FollowupTarget.d.ts +9 -0
  50. package/esm/modules/ai-question/components/QuestionUpdate/FollowupTarget.js +73 -0
  51. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +8 -7
  52. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +2 -1
  53. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +27 -17
  54. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
  55. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +15 -10
  56. package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -3
  57. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +7 -0
  58. package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +10 -10
  59. package/esm/modules/ai-question/interface.d.ts +7 -0
  60. package/esm/modules/ai-question/useAiQuestion.d.ts +4 -0
  61. package/esm/modules/ai-report/Root.js +54 -10
  62. package/esm/modules/ai-report/components/AIEvaluate/index.js +2 -2
  63. package/esm/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
  64. package/esm/modules/ai-report/components/ScoreReport/Bar.d.ts +4 -1
  65. package/esm/modules/ai-report/components/ScoreReport/Bar.js +12 -10
  66. package/esm/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
  67. package/esm/modules/ai-report/components/ScoreReport/Failed.js +12 -4
  68. package/esm/modules/ai-report/components/ScoreReport/RecommendIcon.d.ts +3 -0
  69. package/esm/modules/ai-report/components/ScoreReport/RecommendIcon.js +17 -0
  70. package/esm/modules/ai-report/components/ScoreReport/Score.js +35 -9
  71. package/esm/modules/ai-report/components/ScoreReport/Tips.d.ts +3 -0
  72. package/esm/modules/ai-report/components/ScoreReport/Tips.js +18 -0
  73. package/esm/modules/ai-report/components/ScoreReport/index.js +8 -10
  74. package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +5 -0
  75. package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +7 -7
  76. package/esm/modules/ai-report/components/ScoreReport/styled.js +2 -4
  77. package/esm/modules/ai-report/components/Suggestion/index.js +2 -2
  78. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +3 -1
  79. package/esm/modules/ai-report/components/VideoQuestion/Workplaces.d.ts +6 -0
  80. package/esm/modules/ai-report/components/VideoQuestion/Workplaces.js +26 -0
  81. package/esm/modules/ai-report/components/VideoQuestion/index.js +2 -2
  82. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +8 -8
  83. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
  84. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
  85. package/esm/modules/ai-report/components/WorkPlaces/index.js +4 -3
  86. package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
  87. package/esm/modules/ai-report/interface.d.ts +6 -0
  88. package/esm/modules/ai-template/components/TemplateList/styled.d.ts +12 -12
  89. package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
  90. package/esm/services/ai-question.d.ts +3 -0
  91. package/esm/services/ai-question.js +3 -0
  92. package/esm/services/ai-report.d.ts +6 -0
  93. package/esm/services/ai-report.js +1 -0
  94. package/esm/store/ai-question/boot-video-store.d.ts +6 -0
  95. package/esm/store/ai-question/boot-video-store.js +2 -0
  96. package/esm/store/ai-question/global-store.d.ts +12 -0
  97. package/esm/store/ai-question/global-store.js +1 -0
  98. package/esm/store/enterprise/enterprise-store.js +2 -2
  99. package/esm/utils/interceptor.js +5 -2
  100. package/lib/components/BigBallSvg/styled.d.ts +2 -2
  101. package/lib/components/ScoreBigBall/styled.d.ts +1 -1
  102. package/lib/components/ScrollDialogContent/index.d.ts +1 -1
  103. package/lib/components/VideoPreview/styled.d.ts +3 -3
  104. package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +1 -1
  105. package/lib/constants/ai-question.d.ts +4 -0
  106. package/lib/constants/ai-question.js +13 -1
  107. package/lib/constants/ai-report.d.ts +5 -0
  108. package/lib/constants/ai-report.js +6 -1
  109. package/lib/enum/ai-report.d.ts +12 -0
  110. package/lib/enum/ai-report.js +13 -1
  111. package/lib/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.d.ts +14 -0
  112. package/lib/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.js +147 -0
  113. package/lib/modules/ai-ability/components/AbilityFormItem/index.d.ts +2 -0
  114. package/lib/modules/ai-ability/components/AbilityFormItem/index.js +14 -4
  115. package/lib/modules/ai-ability/components/AddAbility/index.js +110 -102
  116. package/lib/modules/ai-ability/components/UpdateAbility/index.js +101 -103
  117. package/lib/modules/ai-ability/styled.d.ts +2 -2
  118. package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +1 -1
  119. package/lib/modules/ai-question/Root.js +12 -9
  120. package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
  121. package/lib/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
  122. package/lib/modules/ai-question/components/BootVideo/CustomVideos.js +62 -24
  123. package/lib/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
  124. package/lib/modules/ai-question/components/BootVideo/index.js +90 -24
  125. package/lib/modules/ai-question/components/BootVideo/interface.d.ts +1 -0
  126. package/lib/modules/ai-question/components/BootVideo/styled.d.ts +6 -4
  127. package/lib/modules/ai-question/components/BootVideo/styled.js +20 -17
  128. package/lib/modules/ai-question/components/QuestionImport/index.d.ts +4 -0
  129. package/lib/modules/ai-question/components/QuestionImport/index.js +122 -0
  130. package/lib/modules/ai-question/components/QuestionImport/interface.d.ts +8 -0
  131. package/lib/modules/ai-question/components/QuestionImport/interface.js +2 -0
  132. package/lib/modules/ai-question/components/QuestionImport/styled.d.ts +13 -0
  133. package/lib/modules/ai-question/components/QuestionImport/styled.js +52 -0
  134. package/lib/modules/ai-question/components/QuestionModel/Header.js +25 -1
  135. package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
  136. package/lib/modules/ai-question/components/QuestionModel/index.js +1 -1
  137. package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +1 -0
  138. package/lib/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
  139. package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +3 -3
  140. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -1
  141. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -3
  142. package/lib/modules/ai-question/components/QuestionTemplate/index.js +3 -2
  143. package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +1 -0
  144. package/lib/modules/ai-question/components/QuestionUpdate/FllowupSetting.d.ts +4 -0
  145. package/lib/modules/ai-question/components/QuestionUpdate/FllowupSetting.js +91 -0
  146. package/lib/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.d.ts +9 -0
  147. package/lib/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.js +96 -0
  148. package/lib/modules/ai-question/components/QuestionUpdate/FollowupTarget.d.ts +9 -0
  149. package/lib/modules/ai-question/components/QuestionUpdate/FollowupTarget.js +75 -0
  150. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +8 -7
  151. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +4 -3
  152. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +27 -17
  153. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
  154. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +13 -8
  155. package/lib/modules/ai-question/components/QuestionUpdate/index.js +2 -2
  156. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +7 -0
  157. package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +10 -10
  158. package/lib/modules/ai-question/interface.d.ts +7 -0
  159. package/lib/modules/ai-question/useAiQuestion.d.ts +4 -0
  160. package/lib/modules/ai-report/Root.js +51 -7
  161. package/lib/modules/ai-report/components/AIEvaluate/index.js +2 -2
  162. package/lib/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
  163. package/lib/modules/ai-report/components/ScoreReport/Bar.d.ts +4 -1
  164. package/lib/modules/ai-report/components/ScoreReport/Bar.js +11 -9
  165. package/lib/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
  166. package/lib/modules/ai-report/components/ScoreReport/Failed.js +12 -5
  167. package/lib/modules/ai-report/components/ScoreReport/RecommendIcon.d.ts +3 -0
  168. package/lib/modules/ai-report/components/ScoreReport/RecommendIcon.js +22 -0
  169. package/lib/modules/ai-report/components/ScoreReport/Score.js +31 -7
  170. package/lib/modules/ai-report/components/ScoreReport/Tips.d.ts +3 -0
  171. package/lib/modules/ai-report/components/ScoreReport/Tips.js +20 -0
  172. package/lib/modules/ai-report/components/ScoreReport/index.js +6 -8
  173. package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +5 -0
  174. package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +7 -7
  175. package/lib/modules/ai-report/components/ScoreReport/styled.js +2 -4
  176. package/lib/modules/ai-report/components/Suggestion/index.js +1 -1
  177. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -7
  178. package/lib/modules/ai-report/components/VideoQuestion/Workplaces.d.ts +6 -0
  179. package/lib/modules/ai-report/components/VideoQuestion/Workplaces.js +28 -0
  180. package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
  181. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +8 -8
  182. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
  183. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
  184. package/lib/modules/ai-report/components/WorkPlaces/index.js +3 -2
  185. package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
  186. package/lib/modules/ai-report/interface.d.ts +6 -0
  187. package/lib/modules/ai-template/components/TemplateList/styled.d.ts +12 -12
  188. package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
  189. package/lib/services/ai-question.d.ts +3 -0
  190. package/lib/services/ai-question.js +7 -1
  191. package/lib/services/ai-report.d.ts +6 -0
  192. package/lib/services/ai-report.js +3 -1
  193. package/lib/store/ai-question/boot-video-store.d.ts +6 -0
  194. package/lib/store/ai-question/boot-video-store.js +2 -0
  195. package/lib/store/ai-question/global-store.d.ts +12 -0
  196. package/lib/store/ai-question/global-store.js +1 -0
  197. package/lib/store/enterprise/enterprise-store.js +2 -2
  198. package/lib/utils/interceptor.js +5 -2
  199. package/package.json +6 -3
@@ -44,6 +44,7 @@ import { useBootVideoStore } from "../../../../store/ai-question/boot-video-stor
44
44
  import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
45
45
  import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
46
46
  import { useRequest, useSetState } from 'ahooks';
47
+ import { Checkbox } from 'fbm-ui';
47
48
  import { AddIcon, Box, Button, Dialog, InfoOutlineIcon, Message, Radio, RadioGroup, Select, TextField, Typography, Upload, } from 'fbm-ui';
48
49
  import { Stack, Tooltip } from 'fbm-ui/lib/mui';
49
50
  import { useCallback, useEffect, useMemo, useState } from 'react';
@@ -53,15 +54,17 @@ var Options = [
53
54
  { label: '自定义播报', value: 3 },
54
55
  ];
55
56
  var BootVideo = function (props) {
56
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
57
+ var _a, _b, _c, _d, _e, _f, _g, _h;
57
58
  var open = props.open, onClose = props.onClose;
58
- var _k = useInterviewRoomStore(), interactType = _k.interactType, aiInterviewerProfile = _k.aiInterviewerProfile, updateInterviewRoom = _k.updateInterviewRoom, interactionMethods = _k.interactionMethods;
59
- var _l = __read(useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _l[0], setInterviewRoomState = _l[1];
60
- var _m = __read(useState(interactionMethods || DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _m[0], setVirtualManList = _m[1];
61
- var _o = useBootVideoStore(), mediaUrl = _o.mediaUrl, thumbUrl = _o.thumbUrl, updateBootVideo = _o.updateBootVideo;
62
- var _p = __read(useState(DEFAULT_GUIDE_VIDEO), 2), mediaList = _p[0], setMediaList = _p[1];
63
- var _q = __read(useSetState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
64
- var postCommonUpload = useRequest(PostCommonUpload, {
59
+ var _j = useInterviewRoomStore(), interactType = _j.interactType, aiInterviewerProfile = _j.aiInterviewerProfile, updateInterviewRoom = _j.updateInterviewRoom, interactionMethods = _j.interactionMethods;
60
+ var _k = __read(useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _k[0], setInterviewRoomState = _k[1];
61
+ var _l = __read(useState(interactionMethods || DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _l[0], setVirtualManList = _l[1];
62
+ var _m = useBootVideoStore(), pcUrl = _m.pcUrl, pcThumbUrl = _m.pcThumbUrl, mediaUrl = _m.mediaUrl, thumbUrl = _m.thumbUrl, updateBootVideo = _m.updateBootVideo;
63
+ // 传统引导视频
64
+ var _o = __read(useState(DEFAULT_GUIDE_VIDEO), 2), mediaList = _o[0], setMediaList = _o[1];
65
+ var _p = __read(useState(DEFAULT_GUIDE_VIDEO), 2), pcMediaList = _p[0], setPcMediaList = _p[1];
66
+ var _q = __read(useSetState({ pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
67
+ var _r = useRequest(PostCommonUpload, {
65
68
  manual: true,
66
69
  onSuccess: function (_a) {
67
70
  var data = _a.data;
@@ -74,9 +77,25 @@ var BootVideo = function (props) {
74
77
  frameUrl: item.mineExtra.firstFrameUrl,
75
78
  },
76
79
  ]);
77
- setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
80
+ setMediaState({ pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
78
81
  },
79
- }).run;
82
+ }), loading = _r.loading, postCommonUpload = _r.run;
83
+ var _s = useRequest(PostCommonUpload, {
84
+ manual: true,
85
+ onSuccess: function (_a) {
86
+ var data = _a.data;
87
+ var _b = __read(data, 1), item = _b[0];
88
+ var OfficialMedia = pcMediaList[0];
89
+ setPcMediaList([
90
+ OfficialMedia,
91
+ {
92
+ videoUrl: item.url,
93
+ frameUrl: item.mineExtra.firstFrameUrl,
94
+ },
95
+ ]);
96
+ setMediaState({ pcUrl: item.url, pcThumbUrl: item.mineExtra.firstFrameUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl });
97
+ },
98
+ }), pcLoading = _s.loading, postPCCommonUpload = _s.run;
80
99
  var getAiInterviewerProfileList = useRequest(GetAiInterviewerProfileList, {
81
100
  manual: true,
82
101
  onSuccess: function (_a) {
@@ -86,13 +105,15 @@ var BootVideo = function (props) {
86
105
  }
87
106
  },
88
107
  }).run;
89
- var handleSelectVideo = useCallback(function (mediaUrl, thumbUrl) {
90
- setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
91
- }, [setMediaState]);
108
+ var handleSelectVideo = useCallback(function (video) {
109
+ setMediaState(__assign(__assign({}, mediaState), video));
110
+ },
111
+ // eslint-disable-next-line react-hooks/exhaustive-deps
112
+ [mediaState]);
92
113
  var handleSetVideo = useCallback(function (data) {
93
114
  setVirtualManList(virtualManList.map(function (v) {
94
115
  if (v.selected) {
95
- return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), { tutorialVideos: data }) });
116
+ return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), data) });
96
117
  }
97
118
  return v;
98
119
  }));
@@ -157,6 +178,24 @@ var BootVideo = function (props) {
157
178
  }
158
179
  },
159
180
  };
181
+ var pcUploadProps = {
182
+ type: 'custom',
183
+ showUploadList: false,
184
+ accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
185
+ maxCount: 7,
186
+ customRequest: function (_a) {
187
+ var file = _a.file;
188
+ console.log('customRequest file', file);
189
+ if (isExceedMaxVideoFileSize(file.size)) {
190
+ Message.error('视频大小超过500M,请重新上传!');
191
+ }
192
+ else {
193
+ var formData = new FormData();
194
+ formData.append('files', file);
195
+ postPCCommonUpload(formData);
196
+ }
197
+ },
198
+ };
160
199
  var handleGuidanceText = useCallback(function (e) {
161
200
  setVirtualManList(virtualManList.map(function (v) {
162
201
  if (v.selected) {
@@ -168,7 +207,7 @@ var BootVideo = function (props) {
168
207
  useEffect(function () {
169
208
  if (open) {
170
209
  getAiInterviewerProfileList();
171
- setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
210
+ setMediaState({ pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl });
172
211
  if (mediaUrl && thumbUrl && mediaUrl !== mediaList[0].videoUrl) {
173
212
  setMediaList(__spreadArray(__spreadArray([], __read(mediaList), false), [
174
213
  {
@@ -177,14 +216,33 @@ var BootVideo = function (props) {
177
216
  },
178
217
  ], false));
179
218
  }
219
+ if (pcUrl && pcThumbUrl && pcUrl !== pcMediaList[0].videoUrl) {
220
+ setPcMediaList(__spreadArray(__spreadArray([], __read(pcMediaList), false), [
221
+ {
222
+ videoUrl: pcUrl,
223
+ frameUrl: pcThumbUrl,
224
+ },
225
+ ], false));
226
+ }
180
227
  }
181
228
  else {
182
- setMediaState({ mediaUrl: '', thumbUrl: '' });
229
+ setMediaState({ mediaUrl: '', thumbUrl: '', pcUrl: '', pcThumbUrl: '' });
183
230
  setMediaList(DEFAULT_GUIDE_VIDEO);
231
+ setPcMediaList(DEFAULT_GUIDE_VIDEO);
184
232
  }
185
233
  // eslint-disable-next-line react-hooks/exhaustive-deps
186
234
  }, [open]);
187
- return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588 }, { children: _jsx(ScrollDialogContent, { children: _jsx(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: _jsxs(Stack, __assign({ width: "100%" }, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsxs(RadioGroup, __assign({ 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) {
235
+ return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588,
236
+ // @ts-ignore
237
+ sx: {
238
+ '& .FuiDialog-content': {
239
+ pb: 4.5,
240
+ },
241
+ } }, { children: _jsx(ScrollDialogContent, { children: _jsx(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: _jsxs(Stack, __assign({ width: "100%" }, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsxs(RadioGroup, __assign({ sx: {
242
+ '& .MuiFormControlLabel-root': {
243
+ mr: 4.5,
244
+ },
245
+ }, 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) {
188
246
  var _a;
189
247
  var value = e.target.value;
190
248
  setVirtualManList(__spreadArray([], __read(virtualManList.map(function (v) { return (__assign(__assign({}, v), { selected: v.type === value })); })), false));
@@ -193,13 +251,21 @@ var BootVideo = function (props) {
193
251
  // @ts-ignore
194
252
  aiInterviewerProfile: (_a = virtualManList.find(function (v) { return v.type === value; })) === null || _a === void 0 ? void 0 : _a.detail }));
195
253
  }
196
- }, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && (_jsxs(Stack, { children: [_jsx(CustomVideos, { mediaList: (_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _a === void 0 ? void 0 : _a.tutorialVideos, 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: (((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.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 })] })), _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: (_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _c === void 0 ? void 0 : _c.virtualHumanAvatar, style: {
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: {
197
255
  borderColor: 'transparent',
198
- }, height: 100, alt: "" }) }) })), broadcastType === 3 && (_jsx(CustomUploadedImgRoot, { children: (_e = (_d = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _d === void 0 ? void 0 : _d.interviewerShows) === null || _e === void 0 ? void 0 : _e.map(function (human) { return (_jsxs(Box, { children: [_jsx("img", { src: human.virtualHumanAvatar, style: {
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: {
199
257
  borderColor: human.selected ? '#4CAF50' : 'transparent',
200
- }, 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) || ((_h = (_g = (_f = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _f === void 0 ? void 0 : _f.interviewerShows) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.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: (((_j = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _j === void 0 ? void 0 : _j.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 })] }))] })), interviewRoomState.interactType === 1 && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
201
- var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
202
- return (_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));
203
- }) }), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [mediaList.length <= 5 && (_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), mediaList.length > 5 && (_jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })))] }), _jsx(Tooltip, __assign({ title: "\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", placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] }))] }))] })) })) }) })));
258
+ }, 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
+ var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
260
+ return (_jsx("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () {
261
+ return handleSelectVideo({
262
+ mediaUrl: videoUrl,
263
+ thumbUrl: frameUrl,
264
+ });
265
+ } }, videoUrl));
266
+ }), loading && _jsx(Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] }), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [mediaList.length <= 5 && (_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), mediaList.length > 5 && (_jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })))] }), _jsx(Tooltip, __assign({ title: "\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", placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] }))] }), _jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "caption", mb: 2 }, { children: "\u7535\u8111\u7AEF" })), _jsxs(CustomUploadedImgRoot, __assign({ platform: "pc" }, { children: [pcMediaList.map(function (_a) {
267
+ var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
268
+ return (_jsx(Box, { children: _jsx("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.pcUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo({ pcUrl: videoUrl, pcThumbUrl: frameUrl }); } }) }, videoUrl));
269
+ }), pcLoading && _jsx(Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [pcMediaList.length <= 5 && (_jsx(Upload, __assign({}, pcUploadProps, { children: _jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), pcMediaList.length > 5 && (_jsx(Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })))] }), _jsx(Tooltip, __assign({ title: "\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", placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) })), _jsx(Box, __assign({ ml: 2 }, { children: _jsx(Checkbox, { checked: mediaState.appliedAllPosition, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] })] }))] })) })) }) })));
204
270
  };
205
271
  export default BootVideo;
@@ -5,4 +5,5 @@ export interface BootVideoProps {
5
5
  export interface MediaListProps {
6
6
  videoUrl: string;
7
7
  frameUrl: string;
8
+ loading?: boolean;
8
9
  }
@@ -1,13 +1,15 @@
1
1
  /// <reference types="react" />
2
2
  export declare const CustomUploadCardRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
3
3
  children?: import("react").ReactNode;
4
- } & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
4
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
5
  export declare const CustomUploadCardTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
6
6
  children?: import("react").ReactNode;
7
- } & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
7
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
8
8
  export declare const CustomUploadButtonRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
9
9
  children?: import("react").ReactNode;
10
- } & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
10
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
11
11
  export declare const CustomUploadedImgRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
12
12
  children?: import("react").ReactNode;
13
- } & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
13
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
14
+ platform?: "mobile" | "pc" | undefined;
15
+ }, {}, {}>;
@@ -29,21 +29,24 @@ export var CustomUploadButtonRoot = styled(Box)({
29
29
  justifyContent: 'center',
30
30
  margin: '8px 0',
31
31
  });
32
- export var CustomUploadedImgRoot = styled(Box)({
33
- minHeight: 100,
34
- display: 'flex',
35
- flexWrap: 'wrap',
36
- alignItems: 'center',
37
- padding: '8px 0',
38
- boxSizing: 'content-box',
39
- '& img, & div': {
40
- boxSizing: 'border-box',
41
- width: 56,
42
- objectFit: 'cover',
43
- // transition: 'all 0.3s ease 0s',
44
- cursor: 'pointer',
45
- border: '2px solid transparent',
46
- borderRadius: 4,
47
- marginRight: 4,
48
- },
32
+ export var CustomUploadedImgRoot = styled(Box)(function (_a) {
33
+ var _b = _a.platform, platform = _b === void 0 ? 'mobile' : _b;
34
+ return ({
35
+ minHeight: "".concat(platform === 'mobile' ? 100 : 90, "px"),
36
+ display: 'flex',
37
+ flexWrap: 'wrap',
38
+ alignItems: 'center',
39
+ // padding: '8px 0',
40
+ boxSizing: 'content-box',
41
+ '& img, & div': {
42
+ boxSizing: 'border-box',
43
+ width: "".concat(platform === 'mobile' ? 56 : 160, "px"),
44
+ objectFit: 'cover',
45
+ // transition: 'all 0.3s ease 0s',
46
+ cursor: 'pointer',
47
+ border: '2px solid transparent',
48
+ borderRadius: 4,
49
+ marginRight: 4,
50
+ },
51
+ });
49
52
  });
@@ -0,0 +1,4 @@
1
+ import { BootVideoProps } from './interface';
2
+ import { FC } from 'react';
3
+ declare const BootVideo: FC<BootVideoProps>;
4
+ export default BootVideo;
@@ -0,0 +1,117 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
+ import { uniqueId } from "../../../../utils/utils";
30
+ import ScrollDialogContent from "../../../../components/ScrollDialogContent";
31
+ import DialogActions from '@mui/material/DialogActions';
32
+ import DialogContent from '@mui/material/DialogContent';
33
+ import { GetQuestionTemplate, ParseQuestionTemplate } from "../../../../services/ai-question";
34
+ import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
35
+ import { DocumentIcon, DownloadIcon } from 'fbm-icons';
36
+ import { Box, Button, Dialog, Message, Typography } from 'fbm-ui';
37
+ import { DialogTitle, Divider } from 'fbm-ui/lib/mui';
38
+ import { saveAs } from 'file-saver';
39
+ import { useState } from 'react';
40
+ var BootVideo = function (props) {
41
+ var open = props.open, onClose = props.onClose;
42
+ var addModel = useQuestionModelStore(function (store) { return [store.addModel]; }).addModel;
43
+ var _a = __read(useState(0), 2), step = _a[0], setStep = _a[1];
44
+ var _b = __read(useState(''), 2), fileName = _b[0], setFileName = _b[1];
45
+ var _c = __read(useState({
46
+ countQuestion: 0,
47
+ countContent: 0,
48
+ steps: [],
49
+ }), 2), questionTemplate = _c[0], setQuestionTemplate = _c[1];
50
+ var handleOk = function () {
51
+ addModel(questionTemplate.steps);
52
+ var countQuestion = questionTemplate.countQuestion, countContent = questionTemplate.countContent;
53
+ Message.success("\u6210\u529F\u5BFC\u5165 ".concat(countQuestion, "\u9053\u9898\u76EE\uFF0C").concat(countContent, "\u6761\u9762\u8BD5\u5185\u5BB9"));
54
+ onClose();
55
+ };
56
+ var handleQuestionImport = function (e) {
57
+ e.preventDefault();
58
+ var file = e.target.files[0];
59
+ parseTemplate(file);
60
+ };
61
+ var dragQuestionImport = function (e) {
62
+ e.preventDefault();
63
+ var file = e.dataTransfer.files[0];
64
+ parseTemplate(file);
65
+ };
66
+ var parseTemplate = function (file) {
67
+ var formData = new FormData();
68
+ formData.append('files', file);
69
+ ParseQuestionTemplate(formData)
70
+ .then(function (resp) {
71
+ setFileName(file.name);
72
+ // @ts-ignore
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
+ if (countQuestion > 100) {
75
+ Message.error('一次最多导入100条数据');
76
+ }
77
+ else {
78
+ setQuestionTemplate({ countQuestion: countQuestion, countContent: countContent, steps: steps.map(function (v) { return (__assign(__assign({}, v), { token: uniqueId(), uniqueId: uniqueId() })); }) });
79
+ setStep(1);
80
+ }
81
+ })
82
+ .catch(console.log);
83
+ };
84
+ var handleDowloadTemplate = function () {
85
+ GetQuestionTemplate()
86
+ .then(function (v) { return saveAs(v.data, '试卷模板.xlsx'); })
87
+ .catch(function (e) { return Message.error(e.toString()); });
88
+ };
89
+ return (_jsx(Dialog, __assign({ open: open, header: null, footer: null, okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588,
90
+ // @ts-ignore
91
+ sx: {
92
+ '& .MuiPaper-root>.MuiBox-root, .FuiDialog-content': {
93
+ padding: 0,
94
+ margin: 0,
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: {
97
+ height: 166,
98
+ color: 'rgba(0, 0, 0, 0.6)',
99
+ border: '1px dashed #999999',
100
+ borderRadius: 0.5,
101
+ display: 'flex',
102
+ flexDirection: 'column',
103
+ justifyContent: 'center',
104
+ alignItems: 'center',
105
+ '& div': {
106
+ margin: '0.25rem',
107
+ },
108
+ } }, { children: [_jsx("div", { children: "\u5C06\u586B\u597D\u540E\u7684.xlsx\u6587\u4EF6\u62D6\u62FD\u81F3\u6B64\u5904" }), _jsx("div", { children: "\u6216" }), _jsx("div", { children: _jsxs(Button, __assign({ variant: "outlined", color: "inherit",
109
+ // @ts-ignore
110
+ component: "label" }, { children: ["\u6D4F\u89C8\u6587\u4EF6", _jsx("input", { type: "file", name: "file", accept: ".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel", onChange: handleQuestionImport, style: { display: 'none' } })] })) })] }))] }) })), _jsxs(DialogActions, { children: [_jsx(Button, __assign({ variant: "text", onClick: onClose, color: "inherit" }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ disabled: true }, { children: "\u7EE7\u7EED" }))] })] }))] }))), step === 1 && (_jsxs(Box, { children: [_jsx(DialogTitle, { children: "Excel \u5BFC\u5165" }), _jsxs(DialogContent, __assign({ sx: {
111
+ width: '100%',
112
+ boxSizing: 'border-box',
113
+ } }, { children: [_jsxs(Typography, __assign({ variant: "caption", color: "text.secondary", pb: 2, display: "block" }, { children: ["\u5F85\u5BFC\u5165", questionTemplate === null || questionTemplate === void 0 ? void 0 : questionTemplate.countQuestion, "\u9053\u9898\u76EE\uFF0C", questionTemplate === null || questionTemplate === void 0 ? void 0 : questionTemplate.countContent, "\u6761\u9762\u8BD5\u5185\u5BB9"] })), _jsxs(Box, { children: [_jsx(Divider, {}), _jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", py: 2.5 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(DocumentIcon, {}), " ", _jsx(Box, { children: fileName })] })), _jsx(Box, { children: _jsxs(Button, __assign({ variant: "outlined",
114
+ // @ts-ignore
115
+ component: "label" }, { children: ["\u66FF\u6362\u6587\u4EF6", _jsx("input", { type: "file", name: "file", accept: ".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel", onChange: handleQuestionImport, style: { display: 'none' } })] })) })] })), _jsx(Divider, {})] })] })), _jsxs(DialogActions, { children: [_jsx(Button, __assign({ variant: "text", onClick: onClose, color: "inherit" }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ variant: "contained", color: "primary", onClick: handleOk }, { children: "\u5BFC\u5165" }))] })] }))] }) })));
116
+ };
117
+ export default BootVideo;
@@ -0,0 +1,8 @@
1
+ export interface BootVideoProps {
2
+ open: boolean;
3
+ onClose: () => void;
4
+ }
5
+ export interface MediaListProps {
6
+ videoUrl: string;
7
+ frameUrl: string;
8
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export declare const CustomUploadCardRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
3
+ children?: import("react").ReactNode;
4
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ export declare const CustomUploadCardTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
6
+ children?: import("react").ReactNode;
7
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
8
+ export declare const CustomUploadButtonRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
9
+ children?: import("react").ReactNode;
10
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
11
+ export declare const CustomUploadedImgRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
12
+ children?: import("react").ReactNode;
13
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,49 @@
1
+ import { Box, styled } from 'fbm-ui';
2
+ export var CustomUploadCardRoot = styled(Box)({
3
+ backgroundColor: '#fff',
4
+ border: '1px dashed #e0e0e0',
5
+ borderRadius: 4,
6
+ cursor: 'pointer',
7
+ height: 330,
8
+ width: 180,
9
+ margin: '0 auto',
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ justifyContent: 'center',
13
+ flexDirection: 'column',
14
+ '&:hover': {
15
+ backgroundColor: 'rgba(75,176,81,.04)',
16
+ },
17
+ });
18
+ export var CustomUploadCardTitle = styled(Box)({
19
+ display: 'flex',
20
+ alignItems: 'center',
21
+ justifyContent: 'center',
22
+ '& .MuiTypography-root': {
23
+ marginLeft: 8,
24
+ },
25
+ });
26
+ export var CustomUploadButtonRoot = styled(Box)({
27
+ display: 'flex',
28
+ alignItems: 'center',
29
+ justifyContent: 'center',
30
+ margin: '8px 0',
31
+ });
32
+ export var CustomUploadedImgRoot = styled(Box)({
33
+ minHeight: 100,
34
+ display: 'flex',
35
+ flexWrap: 'wrap',
36
+ alignItems: 'center',
37
+ padding: '8px 0',
38
+ boxSizing: 'content-box',
39
+ '& img, & div': {
40
+ boxSizing: 'border-box',
41
+ width: 56,
42
+ objectFit: 'cover',
43
+ // transition: 'all 0.3s ease 0s',
44
+ cursor: 'pointer',
45
+ border: '2px solid transparent',
46
+ borderRadius: 4,
47
+ marginRight: 4,
48
+ },
49
+ });
@@ -9,15 +9,36 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
12
28
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
29
+ import QuestionImport from '../QuestionImport';
13
30
  import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
14
31
  import { getSecondToTime } from "../../../../utils/utils";
15
- import { Typography } from 'fbm-ui';
32
+ import { Button, Typography } from 'fbm-ui';
16
33
  import { Stack } from 'fbm-ui/lib/mui';
34
+ import { useState } from 'react';
17
35
  var QuestionHeader = function () {
18
36
  var questionModelData = useQuestionModelStore().questionModelData;
37
+ var _a = __read(useState(false), 2), open = _a[0], setOpen = _a[1];
19
38
  if (!questionModelData)
20
39
  return null;
21
- return (_jsxs(Stack, __assign({ width: "100%", direction: "row", spacing: 2, alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", fontWeight: 500 }, { children: ["\u9884\u8BA1\u9762\u8BD5\u65F6\u957F\uFF1A", getSecondToTime((questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.duration) || 0)] })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u62D6\u52A8\u8BD5\u9898\u5361\u7247\u53EF\u6539\u53D8\u8BD5\u9898\u987A\u5E8F" }))] })));
40
+ return (_jsxs(Stack, __assign({ width: "100%", direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Stack, __assign({ direction: "row", spacing: 2, alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", fontWeight: 500 }, { children: ["\u9884\u8BA1\u9762\u8BD5\u65F6\u957F\uFF1A", getSecondToTime((questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.duration) || 0)] })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u62D6\u52A8\u8BD5\u9898\u5361\u7247\u53EF\u6539\u53D8\u8BD5\u9898\u987A\u5E8F" }))] })), _jsx(Button, __assign({ color: "inherit", variant: "outlined", onClick: function () { return setOpen(true); } }, { children: "\u5BFC\u5165\u9898\u76EE" })), open && (_jsx(QuestionImport, { open: open, onClose: function () {
41
+ setOpen(false);
42
+ } }))] })));
22
43
  };
23
44
  export default QuestionHeader;
@@ -47,7 +47,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
47
47
  };
48
48
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
49
49
  import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
50
- import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, QUESTION_TYPE_TITLE_MAP, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
50
+ import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, IS_AI_FOLLOW_UP, QUESTION_TYPE_TITLE_MAP, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
51
51
  import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
52
52
  import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
53
53
  import { getSecondToTime } from "../../../../utils/utils";
@@ -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 _a = useInterviewRoomStore(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
63
+ var interactionMethods = useInterviewRoomStore().interactionMethods;
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 _b = useQuestionModelStore(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
67
+ var _a = useQuestionModelStore(), editModel = _a.editModel, removeModel = _a.removeModel, updateModelWeight = _a.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 }), type === 1 && aiShowType === 1 && ((aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) !== 2 || interactType === 1) && (_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) && (_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);
@@ -52,7 +52,7 @@ var Question = function () {
52
52
  postAiModelDetails();
53
53
  }
54
54
  else {
55
- updateModel({ name: name || '暂无名称', token: '', duration: 0, steps: [], interactionMethods: [] });
55
+ updateModel({ name: name || '暂无名称', token: '', aiModel: '', duration: 0, steps: [], interactionMethods: [] });
56
56
  }
57
57
  }, [name, token, postAiModelDetails, updateModel]);
58
58
  useEffect(function () {
@@ -7,6 +7,7 @@ export interface QuestionModelStep extends QuestionParams {
7
7
  export interface QuestionModelData {
8
8
  name?: string | undefined;
9
9
  token?: string;
10
+ aiModel?: string;
10
11
  duration?: number;
11
12
  selectAbilities?: string[];
12
13
  interactType?: number;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const QuestionModelRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
3
3
  children?: import("react").ReactNode;
4
- } & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
4
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -4,8 +4,8 @@ export declare const PreviewRoot: import("@emotion/styled").StyledComponent<{
4
4
  classes?: Partial<import("fbm-ui/lib/mui").PaperClasses> | undefined;
5
5
  elevation?: number | undefined;
6
6
  square?: boolean | undefined;
7
- sx?: import("@mui/system/styleFunctionSx").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
8
- variant?: "elevation" | "outlined" | undefined;
7
+ sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
8
+ variant?: "outlined" | "elevation" | undefined;
9
9
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
10
10
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
11
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "elevation" | "square" | "variant"> & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
11
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "elevation" | "square"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;