eli-video-interview 1.2.3-5.alpha → 1.2.3-5.alpha.10

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 (84) hide show
  1. package/README.md +1 -0
  2. package/esm/constants/ai-question.js +1 -1
  3. package/esm/modules/ai-ability-select/Root.js +7 -7
  4. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
  5. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +19 -7
  6. package/esm/modules/ai-ability-select/interface.d.ts +1 -0
  7. package/esm/modules/ai-question/Root.js +1 -2
  8. package/esm/modules/ai-question/components/BaseAccordion/index.d.ts +1 -1
  9. package/esm/modules/ai-question/components/BaseAccordion/index.js +22 -13
  10. package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +1 -0
  11. package/esm/modules/ai-question/components/BootVideo/index.js +3 -3
  12. package/esm/modules/ai-question/components/QuestionModel/Item.js +4 -4
  13. package/esm/modules/ai-question/components/QuestionModel/List.js +10 -8
  14. package/esm/modules/ai-question/components/QuestionModel/index.js +1 -1
  15. package/esm/modules/ai-question/components/QuestionPreview/index.js +5 -5
  16. package/esm/modules/ai-question/components/QuestionTemplate/index.js +7 -3
  17. package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +1 -1
  18. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +35 -3
  19. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +5 -7
  20. package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +11 -1
  21. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +6 -16
  22. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +3 -1
  23. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +5 -10
  24. package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  25. package/esm/modules/ai-question/components/QuestionUpdate/index.js +13 -7
  26. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +2 -0
  27. package/esm/modules/ai-template/Root.js +32 -10
  28. package/esm/modules/ai-template/components/CapabilityModel/index.js +1 -1
  29. package/esm/modules/ai-template/components/QuestionList/Item.d.ts +2 -2
  30. package/esm/modules/ai-template/components/QuestionList/Item.js +28 -7
  31. package/esm/modules/ai-template/components/QuestionList/index.d.ts +2 -1
  32. package/esm/modules/ai-template/components/QuestionList/index.js +15 -4
  33. package/esm/modules/ai-template/components/QuestionList/interface.d.ts +6 -1
  34. package/esm/modules/ai-template/components/TemplateList/index.js +4 -4
  35. package/esm/modules/ai-template/index.js +2 -2
  36. package/esm/modules/ai-template/interface.d.ts +2 -0
  37. package/esm/services/ai-ability.js +1 -1
  38. package/esm/store/ai-question/question-model-store.js +3 -3
  39. package/esm/store/ai-template/global-store.d.ts +3 -0
  40. package/esm/store/ai-template/global-store.js +3 -3
  41. package/esm/store/enterprise/enterprise-store.d.ts +29 -0
  42. package/esm/store/enterprise/enterprise-store.js +13 -0
  43. package/lib/constants/ai-question.js +1 -1
  44. package/lib/modules/ai-ability-select/Root.js +7 -7
  45. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
  46. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +19 -7
  47. package/lib/modules/ai-ability-select/interface.d.ts +1 -0
  48. package/lib/modules/ai-question/Root.js +1 -2
  49. package/lib/modules/ai-question/components/BaseAccordion/index.d.ts +1 -1
  50. package/lib/modules/ai-question/components/BaseAccordion/index.js +22 -13
  51. package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +1 -0
  52. package/lib/modules/ai-question/components/BootVideo/index.js +2 -2
  53. package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
  54. package/lib/modules/ai-question/components/QuestionModel/List.js +10 -8
  55. package/lib/modules/ai-question/components/QuestionModel/index.js +1 -1
  56. package/lib/modules/ai-question/components/QuestionPreview/index.js +5 -5
  57. package/lib/modules/ai-question/components/QuestionTemplate/index.js +7 -3
  58. package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +1 -1
  59. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +35 -3
  60. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +4 -6
  61. package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +11 -1
  62. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +6 -16
  63. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +3 -1
  64. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +5 -10
  65. package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  66. package/lib/modules/ai-question/components/QuestionUpdate/index.js +13 -7
  67. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +2 -0
  68. package/lib/modules/ai-template/Root.js +32 -10
  69. package/lib/modules/ai-template/components/CapabilityModel/index.js +1 -1
  70. package/lib/modules/ai-template/components/QuestionList/Item.d.ts +2 -2
  71. package/lib/modules/ai-template/components/QuestionList/Item.js +27 -6
  72. package/lib/modules/ai-template/components/QuestionList/index.d.ts +2 -1
  73. package/lib/modules/ai-template/components/QuestionList/index.js +15 -4
  74. package/lib/modules/ai-template/components/QuestionList/interface.d.ts +6 -1
  75. package/lib/modules/ai-template/components/TemplateList/index.js +4 -4
  76. package/lib/modules/ai-template/index.js +2 -2
  77. package/lib/modules/ai-template/interface.d.ts +2 -0
  78. package/lib/services/ai-ability.js +1 -1
  79. package/lib/store/ai-question/question-model-store.js +3 -3
  80. package/lib/store/ai-template/global-store.d.ts +3 -0
  81. package/lib/store/ai-template/global-store.js +3 -3
  82. package/lib/store/enterprise/enterprise-store.d.ts +29 -0
  83. package/lib/store/enterprise/enterprise-store.js +16 -0
  84. package/package.json +1 -1
package/README.md CHANGED
@@ -110,6 +110,7 @@ return (
110
110
  | desc | 题目描述 | string |
111
111
  | prepareTime | 准备时长 | number |
112
112
  | duration | 回答时长 | number |
113
+ | minResponseDuration | 最少回答时长 | number |
113
114
  | category | 标签信息 | string[] |
114
115
  | [broadcastType](#题目播报类型) | 题目播报类型 | number |
115
116
  | [aiSwitch](#题目是否开启ai分析) | 题目是否开启AI分析 | number |
@@ -10,7 +10,7 @@ export var ADD_QUESTION_TYPE_LIST = [
10
10
  },
11
11
  {
12
12
  type: LANGUAGE,
13
- title: '语言能力题',
13
+ title: '朗读题',
14
14
  desc: '候选人根据所提供的文案进行朗读。',
15
15
  },
16
16
  ];
@@ -13,15 +13,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import AiAbilityList from './components/AiAbilityList';
14
14
  import { GetAiAbilityList } from "../../services/ai-ability";
15
15
  import { useAiAbilityListStore } from "../../store/ai-ability-select/question-ability-store";
16
+ import { useEnterpriseStore } from "../../store/enterprise/enterprise-store";
16
17
  import ScrollDialogContent from "../../components/ScrollDialogContent";
17
18
  import { useRequest } from 'ahooks';
18
19
  import { Box, Typography } from 'fbm-ui';
19
20
  import { Stack } from 'fbm-ui/lib/mui';
20
21
  import { forwardRef, memo, useEffect } from 'react';
21
22
  var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
22
- var jobToken = _a.jobToken, thirdToken = _a.thirdToken, _b = _a.selectedTokens, selectedTokens = _b === void 0 ? [] : _b;
23
- var _c = useAiAbilityListStore(), aiAbilityList = _c.aiAbilityList, setAiAbilityList = _c.setAiAbilityList;
24
- var _d = useAiAbilityListStore(), selctedAbilitys = _d.selctedAbilitys, setSelctedAbilitys = _d.setSelctedAbilitys;
23
+ var jobToken = _a.jobToken, thirdToken = _a.thirdToken;
24
+ var _b = useAiAbilityListStore(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList;
25
+ var setEnterprise = useEnterpriseStore().setEnterprise;
25
26
  var data = useRequest(function () { return GetAiAbilityList({ jobToken: jobToken, thirdToken: thirdToken }); }, {
26
27
  refreshDeps: [jobToken, thirdToken],
27
28
  }).data;
@@ -30,11 +31,10 @@ var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
30
31
  // eslint-disable-next-line react-hooks/exhaustive-deps
31
32
  }, [data]);
32
33
  useEffect(function () {
33
- setSelctedAbilitys(selectedTokens);
34
+ setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
34
35
  // eslint-disable-next-line react-hooks/exhaustive-deps
35
- }, [selectedTokens]);
36
- console.log(selctedAbilitys);
37
- return (_jsx(ScrollDialogContent, __assign({ ref: ref }, { children: _jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 2 }, { children: [_jsx(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" })), _jsxs(Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), _jsx(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" }))] }))] })), _jsx(AiAbilityList, { items: aiAbilityList })] })) })));
36
+ }, [jobToken, thirdToken]);
37
+ return (_jsx(ScrollDialogContent, __assign({ ref: ref }, { children: _jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 2 }, { children: [_jsx(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; })) && (_jsxs(Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), _jsx(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" }))] })))] })), _jsx(AiAbilityList, { items: aiAbilityList })] })) })));
38
38
  });
39
39
  AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
40
40
  export default memo(AiAbilitySelectRoot);
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { AiAbilityItemProps } from './interface';
3
- declare const AiAbilityItemWrapper: React.FC<AiAbilityItemProps>;
4
- export default AiAbilityItemWrapper;
3
+ declare const AiAbilityItem: React.FC<AiAbilityItemProps>;
4
+ export default AiAbilityItem;
@@ -24,17 +24,29 @@ import { NewBadge } from './styled';
24
24
  import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
25
25
  import { Box, Checkbox, Paper, Popover, Typography } from 'fbm-ui';
26
26
  var AiAbilityItem = function (_a) {
27
- var name = _a.name, isNew = _a.isNew, token = _a.token;
27
+ var name = _a.name, isNew = _a.isNew, token = _a.token, detail = _a.detail;
28
28
  var _b = useAiAbilityListStore(), selctedAbilitys = _b.selctedAbilitys, setSelctedAbilitys = _b.setSelctedAbilitys;
29
29
  var handleChange = function (_, checked) {
30
30
  return setSelctedAbilitys(__spreadArray(__spreadArray([], selctedAbilitys.filter(function (v) { return v !== token; }), true), (checked ? [token] : []), true));
31
31
  };
32
- return (_jsx(Paper, __assign({ variant: "outlined" }, { children: _jsxs(Box, __assign({ sx: { pl: 2, width: 240, height: 54, display: 'flex', alignItems: 'center', position: 'relative' } }, { children: [_jsx(Checkbox, { onChange: handleChange, label: _jsx(Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2" }, { children: name })), checked: selctedAbilitys.includes(token) }), isNew && _jsx(NewBadge, { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn" })] })) })));
32
+ return (_jsx(Paper, __assign({ variant: "outlined" }, { children: _jsxs(Box, __assign({ sx: { pl: 2, width: 240, height: 54, display: 'flex', alignItems: 'center', position: 'relative' } }, { children: [_jsx(Checkbox, { onChange: handleChange, label: _jsx(AiAbilityLable, { name: name, detail: detail }), checked: selctedAbilitys.includes(token),
33
+ // @ts-ignore
34
+ sx: { width: 1, height: 1 } }), isNew && _jsx(NewBadge, { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn" })] })) })));
33
35
  };
34
- var AiAbilityItemWrapper = function (props) {
35
- var detail = props.detail;
36
+ var AiAbilityLable = function (_a) {
37
+ var name = _a.name, detail = _a.detail;
36
38
  if ((detail === null || detail === void 0 ? void 0 : detail.length) > 0)
37
- return (_jsx(Popover, __assign({ content: _jsx(AiAbilityDetail, { detail: detail }), trigger: "hover", placement: "right" }, { children: _jsx(AiAbilityItem, __assign({}, props)) })));
38
- return _jsx(AiAbilityItem, __assign({}, props));
39
+ return (_jsx(Popover, __assign({ content: _jsx(AiAbilityDetail, { detail: detail }), trigger: "hover", placement: "right" }, { children: _jsx(Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2", sx: { mt: 0.5 } }, { children: name })) })));
40
+ return (_jsx(Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2" }, { children: name })));
39
41
  };
40
- export default AiAbilityItemWrapper;
42
+ // const AiAbilityItemWrapper: React.FC<AiAbilityItemProps> = props => {
43
+ // const { detail } = props;
44
+ // if (detail?.length > 0)
45
+ // return (
46
+ // <Popover content={<AiAbilityDetail detail={detail} />} trigger="hover" placement="right">
47
+ // <AiAbilityItem {...props} />
48
+ // </Popover>
49
+ // );
50
+ // return <AiAbilityItem {...props} />;
51
+ // };
52
+ export default AiAbilityItem;
@@ -13,6 +13,7 @@ export interface AiAbilityDetail {
13
13
  export interface AiAbility extends AiAbilityDetail {
14
14
  name: string;
15
15
  isNew?: boolean;
16
+ isAI?: boolean;
16
17
  token: string;
17
18
  selected?: boolean;
18
19
  }
@@ -64,7 +64,6 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
64
64
  var updateBootVideo = useBootVideoStore().updateBootVideo;
65
65
  var addModel = useQuestionModelStore(function (store) { return [store.addModel]; }).addModel;
66
66
  var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
67
- console.log(selctedAbilitys);
68
67
  var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
69
68
  var questionModelData, _a, mediaUrl, thumbUrl, appliedAllPosition, steps;
70
69
  return __generator(this, function (_b) {
@@ -149,7 +148,7 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
149
148
  width: '256px',
150
149
  height: '100%',
151
150
  overflow: 'auto',
152
- } }, { children: _jsx(QuestionTemplate, { extraAbilityTokens: selctedAbilitys }) }))] })));
151
+ } }, { children: _jsx(QuestionTemplate, {}) }))] })));
153
152
  });
154
153
  AiQuestionRoot.displayName = 'AiQuestionRoot';
155
154
  export default memo(AiQuestionRoot);
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
1
  import { BaseAccordionProps } from './interface';
2
+ import React from 'react';
3
3
  declare const _default: React.NamedExoticComponent<BaseAccordionProps>;
4
4
  export default _default;
@@ -10,29 +10,29 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
- import { memo, useCallback, useEffect, useRef, useState } from 'react';
14
- import { Box, Button, confirm } from 'fbm-ui';
15
- import { Accordion, AccordionDetails, AccordionSummary, List, ListItem, ListItemText } from 'fbm-ui/lib/mui';
16
- import { useDebounceFn, useHover } from 'ahooks';
13
+ import { defaultQuestionParams } from '../QuestionUpdate/const';
14
+ import { MAX_DISPLAY_SIZE } from './const';
15
+ import { AccordionRoot, AccordionSubTitle, AccordionTitle } from './styled';
17
16
  import { IS_AI_ANALYSIS } from "../../../../constants/ai-question";
18
17
  import { LANGUAGE_TYPE } from "../../../../enum/ai-question";
19
18
  import { Done, ExpandMore } from '@mui/icons-material';
20
19
  import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
21
20
  import { useQuestionPreviewStore } from "../../../../store/ai-question/question-preview-store";
22
21
  import { uniqueId } from "../../../../utils/utils";
23
- import { defaultQuestionParams } from '../QuestionUpdate/const';
24
- import { MAX_DISPLAY_SIZE } from './const';
25
- import { AccordionRoot, AccordionSubTitle, AccordionTitle } from './styled';
22
+ import { useDebounceFn, useHover } from 'ahooks';
23
+ import { Box, Button, confirm } from 'fbm-ui';
24
+ import { Accordion, AccordionDetails, AccordionSummary, List, ListItem, ListItemText } from 'fbm-ui/lib/mui';
25
+ import { memo, useCallback, useEffect, useRef, useState } from 'react';
26
26
  var LANGUAGE_TYPE_LIST = [LANGUAGE_TYPE.MANDARIN, LANGUAGE_TYPE.CANTONESE, LANGUAGE_TYPE.JAPANESE, LANGUAGE_TYPE.ENGLISH];
27
27
  var BaseAccordion = function (props) {
28
- var name = props.name, positionName = props.positionName, list = props.list, index = props.index, isShowOnlyAITest = props.isShowOnlyAITest, _a = props.isShowDesc, isShowDesc = _a === void 0 ? false : _a, _b = props.isShowSummaryAction, isShowSummaryAction = _b === void 0 ? false : _b, _c = props.isShowConfirm, isShowConfirm = _c === void 0 ? false : _c, _d = props.isShowPreview, isShowPreview = _d === void 0 ? true : _d;
28
+ var name = props.name, positionName = props.positionName, list = props.list, index = props.index, isShowOnlyAITest = props.isShowOnlyAITest, _a = props.isShowDesc, isShowDesc = _a === void 0 ? false : _a, _b = props.isShowSummaryAction, isShowSummaryAction = _b === void 0 ? false : _b, _c = props.isShowConfirm, isShowConfirm = _c === void 0 ? false : _c, _d = props.isShowPreview, isShowPreview = _d === void 0 ? true : _d, _e = props.isNew, isNew = _e === void 0 ? false : _e;
29
29
  var ref = useRef(null);
30
30
  var isHovering = useHover(ref);
31
31
  var updatePreview = useQuestionPreviewStore().updatePreview;
32
- var _e = useQuestionModelStore(), questionModelData = _e.questionModelData, addModel = _e.addModel;
33
- var _f = useState(false), isPaging = _f[0], setIsPaging = _f[1];
34
- var _g = useState([]), questionsList = _g[0], setQuestionsList = _g[1];
35
- var _h = useState(), hoverItem = _h[0], setHoverItem = _h[1];
32
+ var _f = useQuestionModelStore(), questionModelData = _f.questionModelData, addModel = _f.addModel;
33
+ var _g = useState(false), isPaging = _g[0], setIsPaging = _g[1];
34
+ var _h = useState([]), questionsList = _h[0], setQuestionsList = _h[1];
35
+ var _j = useState(), hoverItem = _j[0], setHoverItem = _j[1];
36
36
  var handlePreview = useDebounceFn(function () {
37
37
  isShowPreview && updatePreview(isHovering, isHovering ? hoverItem : undefined);
38
38
  }, {
@@ -86,7 +86,16 @@ var BaseAccordion = function (props) {
86
86
  setQuestionsList(filterList);
87
87
  }
88
88
  }, [list, isShowOnlyAITest]);
89
- return (_jsx(_Fragment, { children: questionsList.length > 0 && (_jsx(AccordionRoot, { children: _jsxs(Accordion, __assign({ defaultExpanded: index === 0 }, { children: [_jsx(AccordionSummary, __assign({ expandIcon: _jsx(ExpandMore, {}) }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", justifyContent: "space-between", alignItems: "center", overflow: "hidden" }, { children: [_jsxs(Box, __assign({ flex: "1 0", overflow: "hidden" }, { children: [_jsx(AccordionTitle, { children: positionName || name }), positionName && _jsxs(AccordionSubTitle, __assign({ color: "secondary" }, { children: ["\u6B65\u9AA4\uFF1A", name] }))] })), isShowSummaryAction && (_jsx(Button, __assign({ sx: { mr: 1, flexShrink: 0, height: 24 }, variant: "outlined", color: "inherit", size: "small", onClick: handleUseAllQuestion }, { children: "\u4F7F\u7528" })))] })) })), _jsxs(AccordionDetails, { children: [_jsx(List, __assign({ ref: ref }, { children: questionsList.map(function (item) {
89
+ return (_jsx(_Fragment, { children: questionsList.length > 0 && (_jsx(AccordionRoot, { children: _jsxs(Accordion, __assign({ defaultExpanded: index === 0 }, { children: [_jsx(AccordionSummary, __assign({ expandIcon: _jsx(ExpandMore, {}), sx: {
90
+ '&:after': {
91
+ content: "".concat(isNew ? 'url(//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn)' : '" "'),
92
+ position: 'absolute',
93
+ top: -1,
94
+ right: 0,
95
+ width: 38,
96
+ height: 16,
97
+ },
98
+ } }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", justifyContent: "space-between", alignItems: "center", overflow: "hidden" }, { children: [_jsxs(Box, __assign({ flex: "1 0", overflow: "hidden" }, { children: [_jsx(AccordionTitle, { children: positionName || name }), positionName && _jsxs(AccordionSubTitle, __assign({ color: "secondary" }, { children: ["\u6B65\u9AA4\uFF1A", name] }))] })), isShowSummaryAction && (_jsx(Button, __assign({ sx: { mr: 1, flexShrink: 0, height: 24 }, variant: "outlined", color: "inherit", size: "small", onClick: handleUseAllQuestion }, { children: "\u4F7F\u7528" })))] })) })), _jsxs(AccordionDetails, { children: [_jsx(List, __assign({ ref: ref }, { children: questionsList.map(function (item) {
90
99
  var token = item.token, name = item.name, category = item.category;
91
100
  var isUsed = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps.find(function (step) { return step.originToken === token; });
92
101
  return (_jsx(ListItem, __assign({ secondaryAction: [
@@ -1,5 +1,6 @@
1
1
  import { AiEvaluationDataList } from '../QuestionTemplate/interface';
2
2
  export interface BaseAccordionProps extends AiEvaluationDataList {
3
+ isNew?: boolean;
3
4
  index?: number;
4
5
  isShowOnlyAITest: boolean;
5
6
  isShowDesc?: boolean;
@@ -27,7 +27,7 @@ import { PostCommonUpload } from "../../../../services/ai-question";
27
27
  import { useBootVideoStore } from "../../../../store/ai-question/boot-video-store";
28
28
  import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
29
29
  import { useRequest, useSetState } from 'ahooks';
30
- import { AddIcon, Box, Button, Checkbox, Dialog, InfoIcon, Message, Radio, RadioGroup, Tooltip, Typography, Upload } from 'fbm-ui';
30
+ import { AddIcon, Box, Button, Checkbox, Dialog, Message, Radio, RadioGroup, Typography, Upload } from 'fbm-ui';
31
31
  import { Stack } from 'fbm-ui/lib/mui';
32
32
  import { useCallback, useEffect, useState } from 'react';
33
33
  var BootVideo = function (props) {
@@ -105,9 +105,9 @@ var BootVideo = function (props) {
105
105
  }
106
106
  // eslint-disable-next-line react-hooks/exhaustive-deps
107
107
  }, [open]);
108
- return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", onClose: onClose, onOk: handleOk, width: 768 }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsx(RadioGroup, __assign({ defaultValue: "outlined", value: 1 }, { children: _jsx(Radio, { value: "1", label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }) })), _jsx(Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
108
+ return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u4FDD\u5B58", onClose: onClose, onOk: handleOk, width: 768 }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsx(RadioGroup, __assign({ defaultValue: "outlined", value: 1 }, { children: _jsx(Radio, { value: "1", label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }) })), _jsx(Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
109
109
  var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
110
110
  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));
111
- }) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, color: "text.disabled", mb: 2, mt: 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" })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })), _jsx(Tooltip, __assign({ title: "\u8BF7\u52FF\u4E0A\u4F20\u8272\u60C5\u53CA\u53CD\u52A8\u8FDD\u89C4\u89C6\u9891\uFF0C\u5EFA\u8BAE\u4F7F\u7528360\u6D4F\u89C8\u5668\u3002 \u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm\uFF0C\u652F\u6301\u7F16\u7801\u683C\u5F0F\uFF1AH.264\u3001HEV4\u3001 MPRG-4\u3001VP9" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: 8 } }, { children: _jsx(InfoIcon, { sx: { fontSize: 18, color: 'rgb(118, 118, 118)' } }) })) }))] }), _jsx(Box, __assign({ ml: 0.5 }, { 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 }); } }) }))] }))] }), _jsx(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(CustomUploadCardRoot, { children: [_jsxs(CustomUploadCardTitle, { children: [_jsx(SvgIcon, { name: "video" }), _jsx(Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), _jsx(Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))] })) }) })));
111
+ }) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, 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" })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsx(CustomUploadButtonRoot, { children: _jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), _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 }); } }) }))] }))] }), _jsx(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(CustomUploadCardRoot, { children: [_jsxs(CustomUploadCardTitle, { children: [_jsx(SvgIcon, { name: "video" }), _jsx(Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), _jsx(Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))] })) }) })));
112
112
  };
113
113
  export default BootVideo;
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
24
  import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
25
25
  import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
26
26
  import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
@@ -68,12 +68,12 @@ var QuestionModelListItem = function (props) {
68
68
  }, [editModel, answerStatus, step, index]);
69
69
  var formatQuestion = useMemo(function () {
70
70
  if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
71
- return (_jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "#F5C441" }, { children: "[\u5185\u5BB9\u968F\u673A]" })), _jsx(Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
71
+ return (_jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "#F5C441", flexShrink: 0, fontWeight: 500 }, { children: "[\u5185\u5BB9\u968F\u673A]" })), _jsx(Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
72
72
  }
73
73
  return questions.map(function (v) { return v.content; }).join('\n');
74
74
  }, [questions]);
75
- return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom: isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: [_jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragIndicatorIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
75
+ return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom: "1px solid rgba(0, 0, 0, 0.08)" }, { children: [_jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragIndicatorIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
76
76
  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) })));
77
- }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), _jsx(Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: getSecondToTime(Number(duration)) }))] })), _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, {}) }))] }))] })), _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))] }))] }))] }))] })), isAiAnalysis && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", 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) && (_jsx(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 }) })))] })))] })));
77
+ }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } })] })), _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, {}) }))] }))] })), _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))] }))] }))] }))] })), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2" }, { 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) && (_jsx(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 }) })))] }))] })));
78
78
  };
79
79
  export default memo(QuestionModelListItem);
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { defaultQuestionParams } from '../QuestionUpdate/const';
14
14
  import AutoCombine from './AutoCombine';
15
15
  import QuestionModelListItem from './Item';
16
- import { useAiQuestionStore } from "../../../../store/ai-question/global-store";
16
+ import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
17
17
  import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
18
18
  import { uniqueId } from "../../../../utils/utils";
19
19
  import { IS_AI_ANALYSIS } from "../../../../constants/ai-question";
@@ -28,9 +28,9 @@ var QuestionModelList = function () {
28
28
  var ref = useRef();
29
29
  var sortable = useRef();
30
30
  var _a = useQuestionModelStore(), questionModelData = _a.questionModelData, updateModel = _a.updateModel, addModel = _a.addModel;
31
- var extraAbilityTokens = useAiQuestionStore().extraAbilityTokens;
31
+ var _b = useAiAbilityListStore(), selctedAbilitys = _b.selctedAbilitys, aiAbilityList = _b.aiAbilityList;
32
32
  var aiEvaluationData = useQuestionTemplateStore(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
33
- var _b = (questionModelData || {}).steps, steps = _b === void 0 ? [] : _b;
33
+ var _c = (questionModelData || {}).steps, steps = _c === void 0 ? [] : _c;
34
34
  var lastAiTestIndex = 0;
35
35
  steps.forEach(function (step, i) {
36
36
  if (IS_AI_ANALYSIS(step))
@@ -43,6 +43,12 @@ var QuestionModelList = function () {
43
43
  var handleUseQuestion = useCallback(function (items) {
44
44
  addModel(items.map(getQuestionStep));
45
45
  }, [addModel]);
46
+ var handleAutoCombine = useCallback(function () {
47
+ var combineTokens = selctedAbilitys.length > 0 ? selctedAbilitys : aiAbilityList.filter(function (v) { return v.isAI; }).map(function (item) { return item.token; });
48
+ console.log(combineTokens);
49
+ var random = aiEvaluationData[0].list.filter(function (item) { return combineTokens === null || combineTokens === void 0 ? void 0 : combineTokens.includes(item === null || item === void 0 ? void 0 : item.token); }).map(function (v) { return v.list; }) || [];
50
+ handleUseQuestion(random.map(function (item) { return (__assign(__assign({}, item[Math.floor(Math.random() * item.length)]), { weight: (100 / combineTokens.length).toFixed(2) })); }));
51
+ }, [aiAbilityList, aiEvaluationData, handleUseQuestion, selctedAbilitys]);
46
52
  useEffect(function () {
47
53
  if (steps) {
48
54
  sortable.current && sortable.current.destroy();
@@ -58,10 +64,6 @@ var QuestionModelList = function () {
58
64
  }, [questionModelData, updateModel, steps]);
59
65
  return (_jsx(Box, __assign({ width: "100%", sx: steps.length > 0 ? {} : { height: 'calc(100% - 100px)', display: 'flex', alignItems: 'center', justifyContent: 'center' }, ref: ref }, { children: steps.length > 0 ? (steps.map(function (item, index) {
60
66
  return (_jsx(QuestionModelListItem, __assign({ steps: steps, index: index, disabledWeight: index === lastAiTestIndex }, item), item.uniqueId || item.token));
61
- })) : (_jsx(AutoCombine, { onAutoCombine: function () {
62
- console.log('steps', extraAbilityTokens, aiEvaluationData);
63
- var random = aiEvaluationData[0].list.filter(function (item) { return extraAbilityTokens === null || extraAbilityTokens === void 0 ? void 0 : extraAbilityTokens.includes(item === null || item === void 0 ? void 0 : item.token); }).map(function (v) { return v.list; }) || [];
64
- handleUseQuestion(random.map(function (item) { return item[Math.floor(Math.random() * item.length)]; }));
65
- } })) })));
67
+ })) : (_jsx(AutoCombine, { onAutoCombine: handleAutoCombine })) })));
66
68
  };
67
69
  export default QuestionModelList;
@@ -70,6 +70,6 @@ var Question = function () {
70
70
  }
71
71
  }
72
72
  }, [token, aiEvaluationData, questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps, templateList, addModel]);
73
- return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(Interactive, { mode: "Chat" }), _jsx(QuestionModelList, {})] })) }));
73
+ return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(Interactive, { mode: "Traditional" }), _jsx(QuestionModelList, {})] })) }));
74
74
  };
75
75
  export default Question;
@@ -19,13 +19,13 @@ import { Box, Typography } from 'fbm-ui';
19
19
  import { useEffect, useState } from 'react';
20
20
  var QuestionPreview = function () {
21
21
  var _a = useQuestionPreviewStore(), visible = _a.visible, previewItem = _a.previewItem;
22
- var _b = previewItem || {}, _c = _b.name, name = _c === void 0 ? '' : _c, _d = _b.type, type = _d === void 0 ? 1 : _d, _e = _b.broadcastType, broadcastType = _e === void 0 ? 1 : _e, _f = _b.desc, desc = _f === void 0 ? '' : _f, _g = _b.prepareTime, prepareTime = _g === void 0 ? 3 : _g, _h = _b.duration, duration = _h === void 0 ? 30 : _h, extra = _b.extra;
23
- var _j = useState(), values = _j[0], setValues = _j[1];
24
- var _k = useState('none'), display = _k[0], setDisplay = _k[1];
22
+ var _b = previewItem || {}, _c = _b.name, name = _c === void 0 ? '' : _c, _d = _b.type, type = _d === void 0 ? 1 : _d, _e = _b.broadcastType, broadcastType = _e === void 0 ? 1 : _e, _f = _b.desc, desc = _f === void 0 ? '' : _f, _g = _b.prepareTime, prepareTime = _g === void 0 ? 3 : _g, _h = _b.minResponseDuration, minResponseDuration = _h === void 0 ? 3 : _h, _j = _b.duration, duration = _j === void 0 ? 30 : _j, extra = _b.extra;
23
+ var _k = useState(), values = _k[0], setValues = _k[1];
24
+ var _l = useState('none'), display = _l[0], setDisplay = _l[1];
25
25
  useEffect(function () {
26
- setValues({ name: name, broadcastType: broadcastType, desc: desc, prepareTime: prepareTime, duration: duration, questions: [] });
26
+ setValues({ name: name, broadcastType: broadcastType, desc: desc, prepareTime: prepareTime, duration: duration, minResponseDuration: minResponseDuration, questions: [] });
27
27
  setDisplay(visible ? 'block' : 'none');
28
- }, [name, broadcastType, desc, prepareTime, duration, visible]);
28
+ }, [name, broadcastType, desc, prepareTime, duration, visible, minResponseDuration]);
29
29
  return (_jsx(PreviewRoot, __assign({ style: { display: display } }, { children: (extra === null || extra === void 0 ? void 0 : extra.icon) ? (_jsx("img", { src: extra === null || extra === void 0 ? void 0 : extra.icon, alt: "", style: { width: 250 } })) : (_jsxs(Box, __assign({ width: 500 }, { children: [_jsxs(Typography, __assign({ variant: "h5", textAlign: "center", mb: 3 }, { children: [QUESTION_TYPE_MAPPING_LABEL[type], "\uFF08\u9884\u89C8\uFF09"] })), values && _jsx(Form, { preview: true, aiShowType: ADD_QUESTION_TYPE.FREE, initialValues: values, values: values })] }))) })));
30
30
  };
31
31
  export default QuestionPreview;
@@ -12,15 +12,19 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import AiEvaluation from './AiEvaluation';
14
14
  import Skeleton from './Skeleton';
15
+ import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
16
+ import { useEnterpriseStore } from "../../../../store/enterprise/enterprise-store";
15
17
  import { PostAiModelQuestions } from "../../../../services/ai-question";
16
18
  import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
17
19
  import { useRequest } from 'ahooks';
18
20
  import { Box } from 'fbm-ui';
19
- var QuestionTemplate = function (_a) {
20
- var _b = _a.extraAbilityTokens, extraAbilityTokens = _b === void 0 ? [] : _b;
21
+ var QuestionTemplate = function () {
21
22
  var updateAiEvaluationData = useQuestionTemplateStore().updateAiEvaluationData;
22
- var loading = useRequest(function () { return PostAiModelQuestions({ extraAbilityTokens: extraAbilityTokens }); }, {
23
+ var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
24
+ var enterprise = useEnterpriseStore().enterprise;
25
+ var loading = useRequest(function () { return PostAiModelQuestions(__assign({ extraAbilityTokens: selctedAbilitys }, enterprise)); }, {
23
26
  manual: false,
27
+ refreshDeps: [selctedAbilitys, enterprise],
24
28
  onSuccess: function (_a) {
25
29
  var data = _a.data;
26
30
  return updateAiEvaluationData(data);
@@ -24,6 +24,7 @@ export interface AiEvaluationList {
24
24
  duration: number;
25
25
  prepareTime: number;
26
26
  questions: Question[];
27
+ minResponseDuration: number;
27
28
  extra: AiEvaluationListExtra;
28
29
  broadcastType: number;
29
30
  aiSwitch: number;
@@ -48,6 +49,5 @@ export interface AiEvaluationState {
48
49
  showOnlyAITest: boolean;
49
50
  }
50
51
  export interface QuestionTemplateProps {
51
- extraAbilityTokens?: string[];
52
52
  }
53
53
  export {};
@@ -88,6 +88,22 @@ var QuestionForm = forwardRef(function (props, ref) {
88
88
  var handleCategoryChange = function (_, value) {
89
89
  onCategoryChange === null || onCategoryChange === void 0 ? void 0 : onCategoryChange(value);
90
90
  };
91
+ var handleMinResponseDurationChange = function (e) {
92
+ var minResponseDurationValue = e.target.value;
93
+ if (minResponseDurationValue && minResponseDurationValue.indexOf('-') > -1) {
94
+ minResponseDurationValue = minResponseDurationValue.replaceAll('-', '');
95
+ }
96
+ if (minResponseDurationValue && minResponseDurationValue.indexOf('.') > -1) {
97
+ minResponseDurationValue = minResponseDurationValue.split('.')[0];
98
+ }
99
+ if (/^[1-9]\d*$/.test(minResponseDurationValue)) {
100
+ minResponseDurationValue = Number(minResponseDurationValue);
101
+ }
102
+ else {
103
+ minResponseDurationValue = '';
104
+ }
105
+ form.setValues(__assign(__assign({}, form.values), { minResponseDuration: minResponseDurationValue }));
106
+ };
91
107
  useImperativeHandle(ref, function () { return ({
92
108
  handleValues: function () { return form.values; },
93
109
  handleSubmit: function () { return form.handleSubmit(); },
@@ -116,10 +132,14 @@ var QuestionForm = forwardRef(function (props, ref) {
116
132
  });
117
133
  }), onChange: handleCategoryChange }) })))] })), (form === null || form === void 0 ? void 0 : form.values.broadcastType) === 1 || preview ? (_jsx(FieldArray, { name: "questions", render: function () {
118
134
  var _a;
119
- return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (_, index) { return (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", sx: { flexGrow: 1 } }, index), form.values.questions.length > 1 && (_jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () {
135
+ return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (_, index) { return (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
136
+ rows: 3,
137
+ multiline: true,
138
+ sx: { padding: 0 },
139
+ }, sx: { flexGrow: 1, height: 120 } }), form.values.questions.length > 1 && (_jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () {
120
140
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
121
141
  } }, { children: _jsx(CloseIcon, {}) })) })))] }), index)); });
122
- } })) : (_jsx(VideoVoice, {})), !preview && aiShowType === ADD_QUESTION_TYPE.FREE && (_jsx(RandomQuestion, { category: form.values.category, broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
142
+ } })) : (_jsx(VideoVoice, {})), !preview && aiShowType === ADD_QUESTION_TYPE.FREE && (_jsx(RandomQuestion, { category: questionCollectionList === null || questionCollectionList === void 0 ? void 0 : questionCollectionList.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 () {
123
143
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), [{ content: '', videoUrl: '' }], false) }));
124
144
  }, onAddRandomQuestion: function (qs) {
125
145
  form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), qs.map(function (v) { return ({ content: v, videoUrl: '' }); }), true) }));
@@ -128,7 +148,19 @@ var QuestionForm = forwardRef(function (props, ref) {
128
148
  multiline: true,
129
149
  placeholder: '朗读内容(候选人将根据此内容进行朗读)',
130
150
  sx: { padding: 0 },
131
- } })), _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0', mr: 1 }, required: true, disabled: preview, name: "prepareTime", label: "\u51C6\u5907\u65F6\u957F" }, { children: _jsx(Select, { options: prepareTimeOptions }) })), _jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0' }, required: true, disabled: preview, name: "duration", label: "\u56DE\u7B54\u65F6\u957F" }, { children: _jsx(Select, { options: durationOptions }) }))] }))] })), !preview && _jsx(AiAnalysis, {})] }));
151
+ } })), _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0', mr: 2 }, required: true, disabled: preview, name: "prepareTime", label: "\u51C6\u5907\u65F6\u957F" }, { children: _jsx(Select, { options: prepareTimeOptions }) })), _jsx(FormItem, __assign({ sx: { height: 64, flex: '1 0' }, required: true, disabled: preview, name: "duration", label: "\u56DE\u7B54\u65F6\u957F" }, { children: _jsx(Select, { options: durationOptions }) })), _jsx(FormItem, { sx: { height: 64, flex: '1 0', ml: 2 }, name: "minResponseDuration", label: "\u6700\u5C11\u56DE\u7B54\u65F6\u957F", type: "number",
152
+ // rules={[
153
+ // e => {
154
+ // if (!/^[1-9]\d*$/.test(e.value)) {
155
+ // return '输入不正确';
156
+ // }
157
+ // },
158
+ // ]}
159
+ InputProps: {
160
+ placeholder: '最少回答时长',
161
+ sx: { padding: 0, pr: 1 },
162
+ endAdornment: 's',
163
+ }, onChange: handleMinResponseDurationChange })] }))] })), !preview && _jsx(AiAnalysis, {})] }));
132
164
  });
133
165
  QuestionForm.displayName = 'QuestionForm';
134
166
  export default memo(QuestionForm);
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import SelectQuestion from './SelectQuestion';
14
14
  import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
15
15
  import { AddIcon, Box, Button, InfoIcon, Layout, Message, Popactions, Tooltip } from 'fbm-ui';
@@ -24,7 +24,7 @@ var RandomQuestion = function (_a) {
24
24
  var item = questionState.item;
25
25
  var actions = [
26
26
  {
27
- text: '快速选题',
27
+ text: _jsx(Typography, __assign({ width: 108 }, { children: "\u5FEB\u901F\u9009\u9898" })),
28
28
  onClick: function (_a) {
29
29
  var handleClose = _a.handleClose;
30
30
  handleClose();
@@ -37,7 +37,7 @@ var RandomQuestion = function (_a) {
37
37
  },
38
38
  },
39
39
  {
40
- text: '自定义',
40
+ text: _jsx(Typography, __assign({ width: 108 }, { children: "\u81EA\u5B9A\u4E49" })),
41
41
  onClick: function (_a) {
42
42
  var handleClose = _a.handleClose;
43
43
  handleClose();
@@ -46,15 +46,13 @@ var RandomQuestion = function (_a) {
46
46
  },
47
47
  ];
48
48
  var isVideoBroadcast = broadcastType === 2;
49
- var desc = isVideoBroadcast
50
- ? "1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898\n \u6700\u591A\u91CD\u590D3\u6B21\u3002\n 2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A\n \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F\n 3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A5\u4E2A\u9009\u9879\u3002"
51
- : '每位候选人随机1题,最多5个选项。';
49
+ var desc = isVideoBroadcast ? (_jsxs(_Fragment, { children: ["1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898 \u6700\u591A\u91CD\u590D3\u6B21\u3002", _jsx("br", {}), "2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F", _jsx("br", {}), "3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A5\u4E2A\u9009\u9879\u3002"] })) : ('每位候选人随机1题,最多5个选项。');
52
50
  var handleVideoBroadcastChange = function (key, checked) {
53
51
  var _a;
54
52
  updateQuestionState({
55
53
  item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
56
54
  });
57
55
  };
58
- return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: actions, trigger: "click", isClickAway: true }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), _jsx(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: isVideoBroadcast && (_jsx(FormGroup, { children: _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] })) })) }))] })), _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
56
+ return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between", mt: 0.375 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), _jsx(Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), _jsx(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: isVideoBroadcast && (_jsx(FormGroup, { children: _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] })) })) }))] })), _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
59
57
  };
60
58
  export default RandomQuestion;
@@ -43,7 +43,17 @@ var SelectQuestion = function (_a) {
43
43
  var _a;
44
44
  return (_a = item.list
45
45
  .find(function (v) { return v.token === token; })) === null || _a === void 0 ? void 0 : _a.list.map(function (q) {
46
- return (_jsx(Checkbox, { label: formatQuestion(q.questions), onChange: function (_, checked) {
46
+ return (_jsx(Checkbox
47
+ // @ts-ignore
48
+ , {
49
+ // @ts-ignore
50
+ sx: {
51
+ alignItems: 'flex-start',
52
+ '& .MuiCheckbox-root': {},
53
+ '& .MuiTypography-root': {
54
+ pt: 0.75,
55
+ },
56
+ }, label: formatQuestion(q.questions), onChange: function (_, checked) {
47
57
  handleChange(q, checked);
48
58
  } }, q.token));
49
59
  });
@@ -21,19 +21,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  import VideoVoicePreview from './VideoVoicePreview';
23
23
  import VideoVoiceUploader from './VideoVoiceUploader';
24
- // import { useUpdateQuestionStore } from '@store/ai-question/question-update-store';
25
24
  import { Box, CloseIcon, FormItem, IconButton } from 'fbm-ui';
26
25
  import { Stack } from 'fbm-ui/lib/mui';
27
26
  import { FieldArray } from 'formik';
28
27
  var VideoVoice = function () {
29
- // const { questionState, updateQuestionState } = useUpdateQuestionStore(store => [store.questionState]);
30
- // const { item } = questionState;
31
- // const handleVideoBroadcastChange = (key, checked) => {
32
- // updateQuestionState({
33
- // item: { ...item, videoBroadcast: { ...item?.videoBroadcast, [key]: checked ? 1 : 2 } },
34
- // });
35
- // };
36
- // console.log(item);
37
28
  return (_jsx(FieldArray, { name: "questions", render: function (_a) {
38
29
  var _b;
39
30
  var form = _a.form;
@@ -41,13 +32,12 @@ var VideoVoice = function () {
41
32
  borderRadius: 2,
42
33
  border: '1px dashed rgba(0,0,0, 0.08)',
43
34
  } }, { children: [q.videoUrl && (_jsx(VideoVoicePreview, { onDel: function () {
44
- form.values.questions[index] = __assign(__assign({}, form.values.questions[index]), { videoUrl: '' });
45
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions, true) }));
46
- // item.questions[index] = { content: '', videoUrl: '' };
47
- // updateQuestionState({
48
- // item: { ...item, questions: [...item.questions], videoBroadcast: { ...item?.videoBroadcast, videoUrl: '' } },
49
- // });
50
- }, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index })] })), _jsxs(Stack, __assign({ flexGrow: 1, direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
35
+ var questons = __spreadArray([], form.values.questions, true);
36
+ questons[index] = __assign(__assign({}, questons[index]), { videoUrl: '' });
37
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], questons, true) }));
38
+ }, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index, questions: form.values.questions, setQuestions: function (qs) {
39
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], qs, true) }));
40
+ } })] })), _jsxs(Stack, __assign({ flexGrow: 1, direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
51
41
  rows: 3,
52
42
  multiline: true,
53
43
  placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',