eli-video-interview 1.2.41-alpha.30 → 1.2.41-alpha.32
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.
|
@@ -48,6 +48,8 @@ var BootVideo = function (props) {
|
|
|
48
48
|
}), 2), questionTemplate = _c[0], setQuestionTemplate = _c[1];
|
|
49
49
|
var handleOk = function () {
|
|
50
50
|
addModel(questionTemplate.steps);
|
|
51
|
+
var countQuestion = questionTemplate.countQuestion, countContent = questionTemplate.countContent;
|
|
52
|
+
Message.success("\u6210\u529F\u5BFC\u5165 ".concat(countQuestion, "\u9053\u9898\u76EE\uFF0C").concat(countContent, "\u6761\u9762\u8BD5\u5185\u5BB9"));
|
|
51
53
|
onClose();
|
|
52
54
|
};
|
|
53
55
|
var handleQuestionImport = function (e) {
|
|
@@ -68,8 +70,14 @@ var BootVideo = function (props) {
|
|
|
68
70
|
.then(function (resp) {
|
|
69
71
|
setFileName(file.name);
|
|
70
72
|
// @ts-ignore
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
var _a = (resp === null || resp === void 0 ? void 0 : resp.data) || {}, _b = _a.countQuestion, countQuestion = _b === void 0 ? 0 : _b, _c = _a.countContent, countContent = _c === void 0 ? 0 : _c, _d = _a.steps, steps = _d === void 0 ? [] : _d;
|
|
74
|
+
if (countQuestion > 100) {
|
|
75
|
+
Message.error('一次最多导入100条数据');
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
setQuestionTemplate({ countQuestion: countQuestion, countContent: countContent, steps: steps });
|
|
79
|
+
setStep(1);
|
|
80
|
+
}
|
|
73
81
|
})
|
|
74
82
|
.catch(console.log);
|
|
75
83
|
};
|
|
@@ -85,7 +93,7 @@ var BootVideo = function (props) {
|
|
|
85
93
|
padding: 0,
|
|
86
94
|
margin: 0,
|
|
87
95
|
},
|
|
88
|
-
} }, { children: _jsxs(ScrollDialogContent, { children: [step === 0 && (_jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: [_jsxs(Box, __assign({ bgcolor: "#E8F5E9", width: 228, flexGrow: 0, flexShrink: 0, pl: 4.5, pr: 2.75, pt: 11.25, height: 420 }, { children: [_jsx(Typography, __assign({ variant: "h6" }, { children: "1. \u9009\u62E9\u6A21\u677F" })),
|
|
96
|
+
} }, { children: _jsxs(ScrollDialogContent, { children: [step === 0 && (_jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: [_jsxs(Box, __assign({ bgcolor: "#E8F5E9", width: 228, flexGrow: 0, flexShrink: 0, pl: 4.5, pr: 2.75, pt: 11.25, height: 420 }, { children: [_jsx(Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "1. \u9009\u62E9\u6A21\u677F" })), _jsx(Typography, __assign({ variant: "body2", style: { marginTop: 24, marginBottom: 8 } }, { children: "\u4E00\u6B21\u6700\u591A\u5BFC\u5165100\u6761\u6570\u636E" })), _jsx(Button, __assign({ variant: "contained", color: "primary", startIcon: _jsx(DownloadIcon, {}), onClick: handleDowloadTemplate }, { children: "\u4E0B\u8F7D\u901A\u7528\u6A21\u677F" }))] })), _jsxs(Box, __assign({ flexGrow: 1, display: "flex", flexDirection: "column", alignItems: "flex-end" }, { children: [_jsx(DialogContent, __assign({ sx: { boxSizing: 'border-box', width: '100%', py: 2 } }, { children: _jsxs(Box, { children: [_jsx(Box, __assign({ mb: 3, mt: 3.5 }, { children: _jsx(Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "2. \u4E0A\u4F20\u586B\u5199\u5B8C\u6BD5\u7684Excel\u6587\u4EF6" })) })), _jsxs(Box, __assign({ mb: 4.75, height: 184, onDragOver: function (e) { return e.preventDefault(); }, onDrop: dragQuestionImport, sx: {
|
|
89
97
|
height: 166,
|
|
90
98
|
color: 'rgba(0, 0, 0, 0.6)',
|
|
91
99
|
border: '1px dashed #999999',
|
|
@@ -97,7 +105,7 @@ var BootVideo = function (props) {
|
|
|
97
105
|
'& div': {
|
|
98
106
|
margin: '0.25rem',
|
|
99
107
|
},
|
|
100
|
-
} }, { children: [_jsx("div", { children: "\u5C06\u586B\u597D\u540E\u7684.xlsx\u6587\u4EF6\u62D6\u62FD\u81F3\u6B64\u5904" }), _jsx("div", { children: "\u6216" }), _jsx("div", { children: _jsxs(Button, __assign({ variant: "outlined",
|
|
108
|
+
} }, { children: [_jsx("div", { children: "\u5C06\u586B\u597D\u540E\u7684.xlsx\u6587\u4EF6\u62D6\u62FD\u81F3\u6B64\u5904" }), _jsx("div", { children: "\u6216" }), _jsx("div", { children: _jsxs(Button, __assign({ variant: "outlined", color: "inherit",
|
|
101
109
|
// @ts-ignore
|
|
102
110
|
component: "label" }, { children: ["\u6D4F\u89C8\u6587\u4EF6", _jsx("input", { type: "file", name: "file", accept: ".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel", onChange: handleQuestionImport, style: { display: 'none' } })] })) })] }))] }) })), _jsxs(DialogActions, { children: [_jsx(Button, __assign({ variant: "text", onClick: onClose, color: "inherit" }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ disabled: true }, { children: "\u7EE7\u7EED" }))] })] }))] }))), step === 1 && (_jsxs(Box, { children: [_jsx(DialogTitle, { children: "Excel \u5BFC\u5165" }), _jsxs(DialogContent, __assign({ sx: {
|
|
103
111
|
width: '100%',
|
|
@@ -53,6 +53,8 @@ var BootVideo = function (props) {
|
|
|
53
53
|
}), 2), questionTemplate = _c[0], setQuestionTemplate = _c[1];
|
|
54
54
|
var handleOk = function () {
|
|
55
55
|
addModel(questionTemplate.steps);
|
|
56
|
+
var countQuestion = questionTemplate.countQuestion, countContent = questionTemplate.countContent;
|
|
57
|
+
fbm_ui_1.Message.success("\u6210\u529F\u5BFC\u5165 ".concat(countQuestion, "\u9053\u9898\u76EE\uFF0C").concat(countContent, "\u6761\u9762\u8BD5\u5185\u5BB9"));
|
|
56
58
|
onClose();
|
|
57
59
|
};
|
|
58
60
|
var handleQuestionImport = function (e) {
|
|
@@ -73,8 +75,14 @@ var BootVideo = function (props) {
|
|
|
73
75
|
.then(function (resp) {
|
|
74
76
|
setFileName(file.name);
|
|
75
77
|
// @ts-ignore
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
var _a = (resp === null || resp === void 0 ? void 0 : resp.data) || {}, _b = _a.countQuestion, countQuestion = _b === void 0 ? 0 : _b, _c = _a.countContent, countContent = _c === void 0 ? 0 : _c, _d = _a.steps, steps = _d === void 0 ? [] : _d;
|
|
79
|
+
if (countQuestion > 100) {
|
|
80
|
+
fbm_ui_1.Message.error('一次最多导入100条数据');
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
setQuestionTemplate({ countQuestion: countQuestion, countContent: countContent, steps: steps });
|
|
84
|
+
setStep(1);
|
|
85
|
+
}
|
|
78
86
|
})
|
|
79
87
|
.catch(console.log);
|
|
80
88
|
};
|
|
@@ -90,7 +98,7 @@ var BootVideo = function (props) {
|
|
|
90
98
|
padding: 0,
|
|
91
99
|
margin: 0,
|
|
92
100
|
},
|
|
93
|
-
} }, { children: (0, jsx_runtime_1.jsxs)(ScrollDialogContent_1.default, { children: [step === 0 && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ bgcolor: "#E8F5E9", width: 228, flexGrow: 0, flexShrink: 0, pl: 4.5, pr: 2.75, pt: 11.25, height: 420 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h6" }, { children: "1. \u9009\u62E9\u6A21\u677F" })), (0, jsx_runtime_1.
|
|
101
|
+
} }, { children: (0, jsx_runtime_1.jsxs)(ScrollDialogContent_1.default, { children: [step === 0 && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ bgcolor: "#E8F5E9", width: 228, flexGrow: 0, flexShrink: 0, pl: 4.5, pr: 2.75, pt: 11.25, height: 420 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "1. \u9009\u62E9\u6A21\u677F" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { marginTop: 24, marginBottom: 8 } }, { children: "\u4E00\u6B21\u6700\u591A\u5BFC\u5165100\u6761\u6570\u636E" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "contained", color: "primary", startIcon: (0, jsx_runtime_1.jsx)(fbm_icons_1.DownloadIcon, {}), onClick: handleDowloadTemplate }, { children: "\u4E0B\u8F7D\u901A\u7528\u6A21\u677F" }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flexGrow: 1, display: "flex", flexDirection: "column", alignItems: "flex-end" }, { children: [(0, jsx_runtime_1.jsx)(DialogContent_1.default, __assign({ sx: { boxSizing: 'border-box', width: '100%', py: 2 } }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mb: 3, mt: 3.5 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h6", fontWeight: 500 }, { children: "2. \u4E0A\u4F20\u586B\u5199\u5B8C\u6BD5\u7684Excel\u6587\u4EF6" })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mb: 4.75, height: 184, onDragOver: function (e) { return e.preventDefault(); }, onDrop: dragQuestionImport, sx: {
|
|
94
102
|
height: 166,
|
|
95
103
|
color: 'rgba(0, 0, 0, 0.6)',
|
|
96
104
|
border: '1px dashed #999999',
|
|
@@ -102,7 +110,7 @@ var BootVideo = function (props) {
|
|
|
102
110
|
'& div': {
|
|
103
111
|
margin: '0.25rem',
|
|
104
112
|
},
|
|
105
|
-
} }, { children: [(0, jsx_runtime_1.jsx)("div", { children: "\u5C06\u586B\u597D\u540E\u7684.xlsx\u6587\u4EF6\u62D6\u62FD\u81F3\u6B64\u5904" }), (0, jsx_runtime_1.jsx)("div", { children: "\u6216" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Button, __assign({ variant: "outlined",
|
|
113
|
+
} }, { children: [(0, jsx_runtime_1.jsx)("div", { children: "\u5C06\u586B\u597D\u540E\u7684.xlsx\u6587\u4EF6\u62D6\u62FD\u81F3\u6B64\u5904" }), (0, jsx_runtime_1.jsx)("div", { children: "\u6216" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit",
|
|
106
114
|
// @ts-ignore
|
|
107
115
|
component: "label" }, { children: ["\u6D4F\u89C8\u6587\u4EF6", (0, jsx_runtime_1.jsx)("input", { type: "file", name: "file", accept: ".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel", onChange: handleQuestionImport, style: { display: 'none' } })] })) })] }))] }) })), (0, jsx_runtime_1.jsxs)(DialogActions_1.default, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", onClick: onClose, color: "inherit" }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ disabled: true }, { children: "\u7EE7\u7EED" }))] })] }))] }))), step === 1 && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(mui_1.DialogTitle, { children: "Excel \u5BFC\u5165" }), (0, jsx_runtime_1.jsxs)(DialogContent_1.default, __assign({ sx: {
|
|
108
116
|
width: '100%',
|