eli-video-interview 1.2.41-alpha.34 → 1.2.41-alpha.36
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.
- package/esm/components/BigBallSvg/styled.d.ts +2 -2
- package/esm/components/ScoreBigBall/styled.d.ts +1 -1
- package/esm/components/ScrollDialogContent/index.d.ts +1 -1
- package/esm/components/VideoPreview/styled.d.ts +3 -3
- package/esm/constants/ai-question.d.ts +1 -0
- package/esm/constants/ai-question.js +1 -0
- package/esm/modules/ai-ability/styled.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
- package/esm/modules/ai-question/components/BootVideo/CustomVideos.js +63 -25
- package/esm/modules/ai-question/components/BootVideo/index.js +57 -17
- package/esm/modules/ai-question/components/BootVideo/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/BootVideo/styled.d.ts +6 -4
- package/esm/modules/ai-question/components/BootVideo/styled.js +20 -17
- package/esm/modules/ai-question/components/QuestionImport/styled.d.ts +4 -4
- package/esm/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +19 -10
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +15 -10
- package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +10 -10
- package/esm/modules/ai-question/interface.d.ts +2 -0
- package/esm/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
- package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +4 -4
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +7 -7
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +3 -3
- package/esm/modules/ai-template/components/TemplateList/styled.d.ts +9 -9
- package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
- package/esm/store/ai-question/boot-video-store.d.ts +3 -0
- package/esm/store/ai-question/boot-video-store.js +1 -0
- package/lib/components/BigBallSvg/styled.d.ts +2 -2
- package/lib/components/ScoreBigBall/styled.d.ts +1 -1
- package/lib/components/ScrollDialogContent/index.d.ts +1 -1
- package/lib/components/VideoPreview/styled.d.ts +3 -3
- package/lib/constants/ai-question.d.ts +1 -0
- package/lib/constants/ai-question.js +1 -0
- package/lib/modules/ai-ability/styled.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
- package/lib/modules/ai-question/components/BootVideo/CustomVideos.js +62 -24
- package/lib/modules/ai-question/components/BootVideo/index.js +61 -21
- package/lib/modules/ai-question/components/BootVideo/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/BootVideo/styled.d.ts +6 -4
- package/lib/modules/ai-question/components/BootVideo/styled.js +20 -17
- package/lib/modules/ai-question/components/QuestionImport/styled.d.ts +4 -4
- package/lib/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +19 -10
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +13 -8
- package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +10 -10
- package/lib/modules/ai-question/interface.d.ts +2 -0
- package/lib/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
- package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +4 -4
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +7 -7
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +3 -3
- package/lib/modules/ai-template/components/TemplateList/styled.d.ts +9 -9
- package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
- package/lib/store/ai-question/boot-video-store.d.ts +3 -0
- package/lib/store/ai-question/boot-video-store.js +1 -0
- package/package.json +1 -1
- /package/lib/modules/ai-report/components/VideoQuestion/{workplaces.d.ts → Workplaces.d.ts} +0 -0
- /package/lib/modules/ai-report/components/VideoQuestion/{workplaces.js → Workplaces.js} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const SvgRoot: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
3
|
-
export declare const SvgGRoot: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
2
|
+
export declare const SvgRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
|
|
3
|
+
export declare const SvgGRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGGElement>, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ScoreBigBallRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const ScrollDialogContent: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
5
|
export default ScrollDialogContent;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const VideoPreviewRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
5
|
export declare const PageTurningRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
6
6
|
children?: import("react").ReactNode;
|
|
7
|
-
} & import("@mui/system
|
|
7
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
8
|
export declare const FaceAnalysisRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
9
9
|
children?: import("react").ReactNode;
|
|
10
|
-
} & import("@mui/system
|
|
10
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -28,6 +28,7 @@ export declare const DEFAULT_GUIDE_VIDEO_THUMB_URL = "https://public-static-asse
|
|
|
28
28
|
export declare const DEFAULT_GUIDE_VIDEO: {
|
|
29
29
|
videoUrl: string;
|
|
30
30
|
frameUrl: string;
|
|
31
|
+
loading: boolean;
|
|
31
32
|
}[];
|
|
32
33
|
export declare const DEFAULT_VITUAL_HUMAN_LIST: never[];
|
|
33
34
|
export declare const InteractiveModes: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const AbilityRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
5
|
export declare const AbilityDrawer: import("@emotion/styled").StyledComponent<import("fbm-ui").DrawerProps & {
|
|
6
6
|
children?: import("react").ReactNode;
|
|
7
|
-
} & import("@mui/system
|
|
7
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const NewBadge: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
2
|
+
export declare const NewBadge: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ListItem: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const AccordionRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
} & import("@mui/system
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
5
|
export declare const AccordionTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
6
6
|
children?: import("react").ReactNode;
|
|
7
|
-
} & import("@mui/system
|
|
7
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
8
|
export declare const AccordionSubTitle: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
9
9
|
children?: import("react").ReactNode;
|
|
10
|
-
} & import("@mui/system
|
|
10
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -34,7 +34,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
34
34
|
}
|
|
35
35
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
36
|
};
|
|
37
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
38
|
import { CustomUploadButtonRoot, CustomUploadedImgRoot } from './styled';
|
|
39
39
|
import UploadPreview from './UploadPreview';
|
|
40
40
|
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
@@ -45,49 +45,87 @@ import { Stack, Tooltip } from 'fbm-ui/lib/mui';
|
|
|
45
45
|
import { useCallback } from 'react';
|
|
46
46
|
var CustomVideos = function (_a) {
|
|
47
47
|
var mediaList = _a.mediaList, setMediaList = _a.setMediaList;
|
|
48
|
-
var _b =
|
|
48
|
+
var tutorialVideos = mediaList.tutorialVideos, _b = mediaList.pcTutorialVideos, pcTutorialVideos = _b === void 0 ? [] : _b;
|
|
49
|
+
var _c = useRequest(function (type, formData) { return PostCommonUpload(formData); }, {
|
|
49
50
|
manual: true,
|
|
50
|
-
onSuccess: function (_a) {
|
|
51
|
+
onSuccess: function (_a, params) {
|
|
51
52
|
var data = _a.data;
|
|
52
53
|
var _b = __read(data, 1), item = _b[0];
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
selected:
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
var isMobile = params[0] === 'mobile';
|
|
55
|
+
setMediaList({
|
|
56
|
+
tutorialVideos: isMobile
|
|
57
|
+
? __spreadArray(__spreadArray([], __read(tutorialVideos.map(function (v) { return (__assign(__assign({}, v), { selected: false })); })), false), [
|
|
58
|
+
{
|
|
59
|
+
url: item.url,
|
|
60
|
+
selected: true,
|
|
61
|
+
},
|
|
62
|
+
], false) : tutorialVideos,
|
|
63
|
+
pcTutorialVideos: !isMobile
|
|
64
|
+
? __spreadArray(__spreadArray([], __read(pcTutorialVideos.map(function (v) { return (__assign(__assign({}, v), { selected: false })); })), false), [{ url: item.url, selected: true }], false) : pcTutorialVideos,
|
|
65
|
+
});
|
|
59
66
|
},
|
|
60
|
-
}), loading =
|
|
67
|
+
}), loading = _c.loading, postCommonUpload = _c.run;
|
|
68
|
+
var _d = useRequest(function (type, formData) { return PostCommonUpload(formData); }, {
|
|
69
|
+
manual: true,
|
|
70
|
+
onSuccess: function (_a, params) {
|
|
71
|
+
var data = _a.data;
|
|
72
|
+
var _b = __read(data, 1), item = _b[0];
|
|
73
|
+
var isMobile = params[0] === 'mobile';
|
|
74
|
+
setMediaList({
|
|
75
|
+
tutorialVideos: isMobile
|
|
76
|
+
? __spreadArray(__spreadArray([], __read(tutorialVideos.map(function (v) { return (__assign(__assign({}, v), { selected: false })); })), false), [
|
|
77
|
+
{
|
|
78
|
+
url: item.url,
|
|
79
|
+
selected: true,
|
|
80
|
+
},
|
|
81
|
+
], false) : tutorialVideos,
|
|
82
|
+
pcTutorialVideos: !isMobile
|
|
83
|
+
? __spreadArray(__spreadArray([], __read(pcTutorialVideos.map(function (v) { return (__assign(__assign({}, v), { selected: false })); })), false), [{ url: item.url, selected: true }], false) : pcTutorialVideos,
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
}), loadingPc = _d.loading, postPcCommonUpload = _d.run;
|
|
61
87
|
var uploadProps = {
|
|
62
88
|
type: 'custom',
|
|
63
89
|
showUploadList: false,
|
|
64
90
|
accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
|
|
65
91
|
maxCount: 7,
|
|
66
92
|
customRequest: function (_a) {
|
|
67
|
-
var file = _a.file;
|
|
68
|
-
console.log('customRequest file', file);
|
|
93
|
+
var file = _a.file, action = _a.action;
|
|
69
94
|
if (isExceedMaxVideoFileSize(file.size)) {
|
|
70
95
|
Message.error('视频大小超过500M,请重新上传!');
|
|
71
96
|
}
|
|
72
97
|
else {
|
|
73
98
|
var formData = new FormData();
|
|
74
99
|
formData.append('files', file);
|
|
75
|
-
|
|
100
|
+
if (action === 'mobile')
|
|
101
|
+
postCommonUpload(action, formData);
|
|
102
|
+
if (action === 'pc')
|
|
103
|
+
postPcCommonUpload(action, formData);
|
|
76
104
|
}
|
|
77
105
|
},
|
|
78
106
|
};
|
|
79
|
-
var handleSelectVideo = useCallback(function (i) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, [
|
|
107
|
+
var handleSelectVideo = useCallback(function (i, type) {
|
|
108
|
+
if (type === void 0) { type = 'mobile'; }
|
|
109
|
+
var isMobile = type === 'mobile';
|
|
110
|
+
setMediaList({
|
|
111
|
+
tutorialVideos: isMobile ? __spreadArray([], __read(tutorialVideos.map(function (v, ii) { return (__assign(__assign({}, v), { selected: i === ii })); })), false) : tutorialVideos,
|
|
112
|
+
pcTutorialVideos: !isMobile ? __spreadArray([], __read(pcTutorialVideos.map(function (v, ii) { return (__assign(__assign({}, v), { selected: i === ii })); })), false) : pcTutorialVideos,
|
|
113
|
+
});
|
|
114
|
+
}, [tutorialVideos, pcTutorialVideos, setMediaList]);
|
|
115
|
+
var handleRemoveVideo = useCallback(function (i, type) {
|
|
116
|
+
if (type === void 0) { type = 'mobile'; }
|
|
117
|
+
setMediaList({
|
|
118
|
+
tutorialVideos: type === 'mobile' ? tutorialVideos.filter(function (_, ii) { return ii !== i; }) : tutorialVideos,
|
|
119
|
+
pcTutorialVideos: type !== 'mobile' ? pcTutorialVideos.filter(function (_, ii) { return ii !== i; }) : pcTutorialVideos,
|
|
120
|
+
});
|
|
121
|
+
}, [tutorialVideos, pcTutorialVideos, setMediaList]);
|
|
87
122
|
console.log(mediaList);
|
|
88
|
-
return (_jsxs(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
123
|
+
return (_jsxs(Stack, { children: [_jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(Typography, __assign({ variant: "caption" }, { children: "\u79FB\u52A8\u7AEF" })), _jsxs(CustomUploadedImgRoot, __assign({ sx: { minHeight: 0 } }, { children: [tutorialVideos === null || tutorialVideos === void 0 ? void 0 : tutorialVideos.map(function (_a, i) {
|
|
124
|
+
var url = _a.url, selected = _a.selected;
|
|
125
|
+
return (_jsx(UploadPreview, { src: "".concat(url, "?x-oss-process=video/snapshot,t_0,f_jpg"), style: { borderColor: selected ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(i); }, onRemove: function () { return handleRemoveVideo(i); } }, url));
|
|
126
|
+
}), loading && _jsx(Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [(tutorialVideos === null || tutorialVideos === void 0 ? void 0 : tutorialVideos.length) < 5 && (_jsx(Upload, __assign({}, uploadProps, { action: "mobile" }, { children: _jsx(Button, __assign({ variant: "outlined", disabled: (tutorialVideos === null || tutorialVideos === void 0 ? void 0 : tutorialVideos.length) > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), (tutorialVideos === null || tutorialVideos === void 0 ? void 0 : tutorialVideos.length) >= 5 && (_jsx(Button, __assign({ variant: "outlined", disabled: true, 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 } }) })) }))] })), (tutorialVideos === null || tutorialVideos === void 0 ? void 0 : tutorialVideos.length) === 0 && (_jsx(Typography, __assign({ variant: "caption", color: "error" }, { children: "\u4E0A\u4F20\u89C6\u9891\u4E0D\u53EF\u4E3A\u7A7A" })))] }), _jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "caption" }, { children: "\u7535\u8111\u7AEF" })), _jsxs(CustomUploadedImgRoot, __assign({ sx: { minHeight: 0 } }, { children: [pcTutorialVideos === null || pcTutorialVideos === void 0 ? void 0 : pcTutorialVideos.map(function (_a, i) {
|
|
127
|
+
var url = _a.url, selected = _a.selected;
|
|
128
|
+
return (_jsx(UploadPreview, { src: "".concat(url, "?x-oss-process=video/snapshot,t_0,f_jpg"), style: { borderColor: selected ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(i, 'pc'); }, onRemove: function () { return handleRemoveVideo(i, 'pc'); } }, url));
|
|
129
|
+
}), loadingPc && _jsx(Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsxs(CustomUploadButtonRoot, { children: [(pcTutorialVideos === null || pcTutorialVideos === void 0 ? void 0 : pcTutorialVideos.length) < 5 && (_jsx(Upload, __assign({}, uploadProps, { action: "pc" }, { children: _jsx(Button, __assign({ variant: "outlined", disabled: (pcTutorialVideos === null || pcTutorialVideos === void 0 ? void 0 : pcTutorialVideos.length) > 5, color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), (pcTutorialVideos === null || pcTutorialVideos === void 0 ? void 0 : pcTutorialVideos.length) >= 5 && (_jsx(Button, __assign({ variant: "outlined", disabled: true, 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 } }) })) }))] })), (pcTutorialVideos === null || pcTutorialVideos === void 0 ? void 0 : pcTutorialVideos.length) === 0 && (_jsx(Typography, __assign({ variant: "caption", color: "error" }, { children: "\u4E0A\u4F20\u89C6\u9891\u4E0D\u53EF\u4E3A\u7A7A" })))] })] }));
|
|
92
130
|
};
|
|
93
131
|
export default CustomVideos;
|
|
@@ -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
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
57
58
|
var open = props.open, onClose = props.onClose;
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
var
|
|
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, 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, 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, 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, mediaUrl: mediaUrl, thumbUrl: item.mineExtra.firstFrameUrl });
|
|
97
|
+
},
|
|
98
|
+
}), pcLoading = _s.loading, postPCCommonUpload = _s.run;
|
|
80
99
|
var getAiInterviewerProfileList = useRequest(GetAiInterviewerProfileList, {
|
|
81
100
|
manual: true,
|
|
82
101
|
onSuccess: function (_a) {
|
|
@@ -92,7 +111,7 @@ var BootVideo = function (props) {
|
|
|
92
111
|
var handleSetVideo = useCallback(function (data) {
|
|
93
112
|
setVirtualManList(virtualManList.map(function (v) {
|
|
94
113
|
if (v.selected) {
|
|
95
|
-
return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail),
|
|
114
|
+
return __assign(__assign({}, v), { detail: __assign(__assign({}, v.detail), data) });
|
|
96
115
|
}
|
|
97
116
|
return v;
|
|
98
117
|
}));
|
|
@@ -157,6 +176,24 @@ var BootVideo = function (props) {
|
|
|
157
176
|
}
|
|
158
177
|
},
|
|
159
178
|
};
|
|
179
|
+
var pcUploadProps = {
|
|
180
|
+
type: 'custom',
|
|
181
|
+
showUploadList: false,
|
|
182
|
+
accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
|
|
183
|
+
maxCount: 7,
|
|
184
|
+
customRequest: function (_a) {
|
|
185
|
+
var file = _a.file;
|
|
186
|
+
console.log('customRequest file', file);
|
|
187
|
+
if (isExceedMaxVideoFileSize(file.size)) {
|
|
188
|
+
Message.error('视频大小超过500M,请重新上传!');
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
var formData = new FormData();
|
|
192
|
+
formData.append('files', file);
|
|
193
|
+
postPCCommonUpload(formData);
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
};
|
|
160
197
|
var handleGuidanceText = useCallback(function (e) {
|
|
161
198
|
setVirtualManList(virtualManList.map(function (v) {
|
|
162
199
|
if (v.selected) {
|
|
@@ -203,13 +240,16 @@ var BootVideo = function (props) {
|
|
|
203
240
|
// @ts-ignore
|
|
204
241
|
aiInterviewerProfile: (_a = virtualManList.find(function (v) { return v.type === value; })) === null || _a === void 0 ? void 0 : _a.detail }));
|
|
205
242
|
}
|
|
206
|
-
}, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && (_jsxs(Stack, { children: [_jsx(CustomVideos, { mediaList:
|
|
243
|
+
}, 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: {
|
|
207
244
|
borderColor: 'transparent',
|
|
208
|
-
}, height: 100, alt: "" }) }) })), broadcastType === 3 && (_jsx(CustomUploadedImgRoot, { children: (
|
|
245
|
+
}, 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: {
|
|
209
246
|
borderColor: human.selected ? '#4CAF50' : 'transparent',
|
|
210
|
-
}, 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) || ((
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
247
|
+
}, 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) {
|
|
248
|
+
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
249
|
+
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));
|
|
250
|
+
}), 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) {
|
|
251
|
+
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
252
|
+
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(videoUrl, frameUrl); } }) }, videoUrl));
|
|
253
|
+
}), 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 }); } }) }))] }))] })] }))] })) })) }) })));
|
|
214
254
|
};
|
|
215
255
|
export default BootVideo;
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
boxSizing: '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
13
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -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
|
|
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
|
|
7
|
+
sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
8
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" | "variant" | "elevation" | "square"> & import("@mui/system
|
|
11
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "elevation" | "square"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
@@ -45,16 +45,25 @@ var VideoVoice = function () {
|
|
|
45
45
|
return (_jsx(FieldArray, { name: "questions", render: function (_a) {
|
|
46
46
|
var _b;
|
|
47
47
|
var form = _a.form;
|
|
48
|
-
return (_b = form.values.questions) === null || _b === void 0 ? void 0 : _b.map(function (q, index) { return (_jsxs(Box, __assign({ display: "flex", mb: 3 }, { children: [_jsxs(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
return (_b = form.values.questions) === null || _b === void 0 ? void 0 : _b.map(function (q, index) { return (_jsxs(Box, __assign({ display: "flex", mb: 3 }, { children: [_jsxs(Stack, __assign({ spacing: 2, width: 96, mr: 2 }, { children: [_jsxs(Box, __assign({ textAlign: "center", overflow: "hidden", height: 57, sx: {
|
|
49
|
+
borderRadius: 2,
|
|
50
|
+
border: '1px dashed rgba(0,0,0, 0.08)',
|
|
51
|
+
} }, { children: [q.videoUrl && (_jsx(VideoVoicePreview, { onDel: function () {
|
|
52
|
+
var questons = __spreadArray([], __read(form.values.questions), false);
|
|
53
|
+
questons[index] = __assign(__assign({}, questons[index]), { videoUrl: '' });
|
|
54
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
|
|
55
|
+
}, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index, questions: form.values.questions, setQuestions: function (qs) {
|
|
56
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
|
|
57
|
+
} })] })), _jsxs(Box, __assign({ textAlign: "center", overflow: "hidden", height: 57, sx: {
|
|
58
|
+
borderRadius: 2,
|
|
59
|
+
border: '1px dashed rgba(0,0,0, 0.08)',
|
|
60
|
+
} }, { children: [q.videoURLWide && (_jsx(VideoVoicePreview, { onDel: function () {
|
|
61
|
+
var questons = __spreadArray([], __read(form.values.questions), false);
|
|
62
|
+
questons[index] = __assign(__assign({}, questons[index]), { videoURLWide: '' });
|
|
63
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
|
|
64
|
+
}, videoUrl: q.videoURLWide })), _jsx(VideoVoiceUploader, { index: index, type: "pc", questions: form.values.questions, setQuestions: function (qs) {
|
|
65
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
|
|
66
|
+
} })] }))] })), _jsxs(Stack, __assign({ flexGrow: 1, justifyContent: "space-between", spacing: 3 }, { children: [_jsxs(Stack, __assign({ flexGrow: 1, direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
|
|
58
67
|
rows: 3,
|
|
59
68
|
multiline: true,
|
|
60
69
|
placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const VideoVoiceUploader: ({ index, questions, setQuestions }: {
|
|
2
|
+
declare const VideoVoiceUploader: ({ index, questions, setQuestions, type }: {
|
|
3
3
|
index: any;
|
|
4
4
|
questions: any;
|
|
5
5
|
setQuestions: any;
|
|
6
|
+
type?: string | undefined;
|
|
6
7
|
}) => JSX.Element;
|
|
7
8
|
export default VideoVoiceUploader;
|
|
@@ -34,23 +34,23 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
34
34
|
}
|
|
35
35
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
36
|
};
|
|
37
|
-
import { jsx as _jsx,
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
38
|
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
39
39
|
import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
|
|
40
40
|
import { useRequest } from 'ahooks';
|
|
41
41
|
import { Message, Typography, Upload, UploadIcon } from 'fbm-ui';
|
|
42
|
-
import { Stack } from 'fbm-ui/lib/mui';
|
|
42
|
+
import { CircularProgress, Stack } from 'fbm-ui/lib/mui';
|
|
43
43
|
var VideoVoiceUploader = function (_a) {
|
|
44
|
-
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions;
|
|
45
|
-
var
|
|
44
|
+
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions, _b = _a.type, type = _b === void 0 ? 'mobile' : _b;
|
|
45
|
+
var _c = useRequest(PostCommonUpload, {
|
|
46
46
|
manual: true,
|
|
47
47
|
onSuccess: function (_a) {
|
|
48
48
|
var data = _a.data;
|
|
49
49
|
var _b = __read(data, 1), firstData = _b[0];
|
|
50
|
-
questions[index] = __assign(__assign({}, questions[index]), { videoUrl: firstData.url });
|
|
50
|
+
questions[index] = __assign(__assign({}, questions[index]), (type === 'mobile' ? { videoUrl: firstData.url } : { videoURLWide: firstData.url }));
|
|
51
51
|
setQuestions(__spreadArray([], __read(questions), false));
|
|
52
52
|
},
|
|
53
|
-
}), loading =
|
|
53
|
+
}), loading = _c.loading, postCommonUpload = _c.run;
|
|
54
54
|
var uploadProps = {
|
|
55
55
|
type: 'custom',
|
|
56
56
|
showUploadList: false,
|
|
@@ -67,10 +67,15 @@ var VideoVoiceUploader = function (_a) {
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
|
-
return (_jsx(Upload, __assign({}, uploadProps, {
|
|
70
|
+
return (_jsx(Upload, __assign({}, uploadProps, {
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
sx: {
|
|
73
|
+
width: '100%',
|
|
74
|
+
height: '100%',
|
|
75
|
+
} }, { children: _jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center", color: "text.secondary", sx: {
|
|
71
76
|
cursor: 'pointer',
|
|
72
|
-
width:
|
|
73
|
-
height:
|
|
74
|
-
} }, { children: [!loading && (_jsxs(
|
|
77
|
+
width: '100%',
|
|
78
|
+
height: '100%',
|
|
79
|
+
} }, { children: [!loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(UploadIcon, { color: "inherit" }), _jsx(Typography, __assign({ variant: "caption", color: "inherit" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }))), loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(CircularProgress, { size: 24, color: "inherit" }), _jsx(Typography, __assign({ variant: "caption" }, { children: "\u4E0A\u4F20\u4E2D..." }))] })))] })) })));
|
|
75
80
|
};
|
|
76
81
|
export default VideoVoiceUploader;
|