//
// {toChinesNum(index + 1)}、{er.name}
// (共{er.count}题;共{er.score}分)
//
// {er.items?.map(function (item: any, i: number) {
// return
// {renderQuestion(item, i)}
//
// })
// }
//
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "pt20",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font16 c-light-primary",
children: [toChinesNum(oneindex + 1), "\u3001", answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_7 = answerData.exercise_question_types) === null || _answerData$exercise_7 === void 0 ? void 0 : (_answerData$exercise_8 = _answerData$exercise_7[oneindex]) === null || _answerData$exercise_8 === void 0 ? void 0 : _answerData$exercise_8.name]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "c-grey-999",
children: ["\uFF08\u5171", answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_9 = answerData.exercise_question_types) === null || _answerData$exercise_9 === void 0 ? void 0 : (_answerData$exercise_10 = _answerData$exercise_9[oneindex]) === null || _answerData$exercise_10 === void 0 ? void 0 : _answerData$exercise_10.count, "\u9898\uFF1B", (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_11 = answerData.exercise_question_types) === null || _answerData$exercise_11 === void 0 ? void 0 : (_answerData$exercise_12 = _answerData$exercise_11[oneindex]) === null || _answerData$exercise_12 === void 0 ? void 0 : _answerData$exercise_12.question_type) === 7 ? "\u5305\u542B".concat(answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_13 = answerData.exercise_question_types) === null || _answerData$exercise_13 === void 0 ? void 0 : (_answerData$exercise_14 = _answerData$exercise_13[oneindex]) === null || _answerData$exercise_14 === void 0 ? void 0 : _answerData$exercise_14.sub_questions_count, "\u5C0F\u9898") : '', " \u5171", answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_15 = answerData.exercise_question_types) === null || _answerData$exercise_15 === void 0 ? void 0 : (_answerData$exercise_16 = _answerData$exercise_15[oneindex]) === null || _answerData$exercise_16 === void 0 ? void 0 : _answerData$exercise_16.score, "\u5206\uFF09"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(react.Fragment, {
children: renderQuestion(answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_17 = answerData.exercise_question_types) === null || _answerData$exercise_17 === void 0 ? void 0 : (_answerData$exercise_18 = _answerData$exercise_17[oneindex]) === null || _answerData$exercise_18 === void 0 ? void 0 : (_answerData$exercise_19 = _answerData$exercise_18.items) === null || _answerData$exercise_19 === void 0 ? void 0 : _answerData$exercise_19[twoindex], twoindex)
}, twoindex)]
}, oneindex);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
size: "large",
spinning: isSpin,
children: [openFullScreen && /*#__PURE__*/(0,jsx_runtime.jsx)(recordScreen/* default */.Z, {
iframe: iframe
}), /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
style: {
display: iframeBlock
},
id: "iframeShixuns",
className: ImitateAnswermodules.iframe,
src: iframeUrl,
ref: iframe,
frameBorder: "0"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: "edu-container",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: "animated fadeIn",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "mt10",
children: [globalSetting.showHeaderFooter && params.coursesId !== 'coursesId' && /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
separator: ">",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/classrooms/".concat(params.coursesId, "/exercise"),
children: (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : (_user$userInfo$course = _user$userInfo.course) === null || _user$userInfo$course === void 0 ? void 0 : _user$userInfo$course.course_name
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/classrooms/".concat(params.coursesId, "/exercise"),
children: "\u8BD5\u5377"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/classrooms/".concat(params.coursesId, "/exercise/").concat(params.categoryId, "/detail"),
children: "\u8BD5\u5377\u8BE6\u60C5"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
children: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.real_name
})]
}), globalSetting.showHeaderFooter && params.coursesId === 'coursesId' && /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
separator: ">",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/paperlibrary",
children: "\u8BD5\u5377\u5E93"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
children: (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.real_name
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: [ImitateAnswermodules.title, 'mt10'].join(' '),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
style: {
width: "100%"
},
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "1",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ImitateAnswermodules.title,
children: [(globalSetting === null || globalSetting === void 0 ? void 0 : globalSetting.showHeaderFooter) && /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: params.coursesId === 'coursesId' ? "/paperlibrary" : "/classrooms/".concat(params.coursesId, "/exercise/").concat(params.categoryId, "/detail"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
className: "font16 c-black"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
className: "font24 ml5",
children: answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise17 = answerData.exercise) === null || _answerData$exercise17 === void 0 ? void 0 : _answerData$exercise17.exercise_name
}), (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise18 = answerData.exercise) === null || _answerData$exercise18 === void 0 ? void 0 : _answerData$exercise18.is_random) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: ImitateAnswermodules.randomFlag,
children: "\u968F\u673A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* StatusClassroomsTags */.VV, {
status: [util/* ExerciseStatus.99 */.ju[99]]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
style: {
display: 'flex'
},
children: [(answerData === null || answerData === void 0 ? void 0 : (_answerData$user_scor = answerData.user_score) === null || _answerData$user_scor === void 0 ? void 0 : _answerData$user_scor.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u6A21\u62DF\u8003\u8BD5\u603B\u5F97\u5206\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-red",
children: answerData === null || answerData === void 0 ? void 0 : answerData.user_score
}), " \u5206"]
}), !!(answerData !== null && answerData !== void 0 && (_answerData$exercise19 = answerData.exercise) !== null && _answerData$exercise19 !== void 0 && _answerData$exercise19.time) && !(answerData !== null && answerData !== void 0 && (_answerData$exercise20 = answerData.exercise) !== null && _answerData$exercise20 !== void 0 && _answerData$exercise20.commit_status) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "".concat(ImitateAnswermodules.countDown, " ").concat(countDownColor),
children: ["\u5269\u4F59\u65F6\u95F4:", /*#__PURE__*/(0,jsx_runtime.jsx)(Countdown, {
value: time,
onFinish: handleFinishTime
})]
}), !(answerData !== null && answerData !== void 0 && (_answerData$exercise21 = answerData.exercise) !== null && _answerData$exercise21 !== void 0 && _answerData$exercise21.commit_status) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
className: ImitateAnswermodules.submitButton,
style: {
marginLeft: 20
},
type: "primary",
onClick: function onClick() {
return handleVerifySave(false);
},
children: "\u4EA4\u5377"
})]
})]
})
})]
}), checkStatus.status === 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mt10",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: showAnswerCard ? "316px" : "16px",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
style: {
position: "sticky",
top: 0,
zIndex: 1
},
children: [showCamera && /*#__PURE__*/(0,jsx_runtime.jsx)(CaptureVideo/* default */.Z, {
number: (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise22 = answerData.exercise) === null || _answerData$exercise22 === void 0 ? void 0 : _answerData$exercise22.photo_count) - (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise23 = answerData.exercise) === null || _answerData$exercise23 === void 0 ? void 0 : _answerData$exercise23.take_photo),
time: (_answerData$exercise24 = answerData.exercise) === null || _answerData$exercise24 === void 0 ? void 0 : _answerData$exercise24.left_time,
update: initData,
supportCamera: function supportCamera(type) {
if (type === 2) {
initData();
setOpenFullScreen(answerCheckData === null || answerCheckData === void 0 ? void 0 : answerCheckData.screen_open);
// window.onblur = function () {
// if (IsFull()) {
// exitFull()
// }
// };
} else if (type === 1) {
setTimeout(function () {
return props.history.push("/");
}, 3000);
}
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "relative",
style: {
minHeight: 236
},
children: [showAnswerCard && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "bg-white p16",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 8,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font16 blod",
children: "\u7B54\u9898\u5361"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 16,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "tr",
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'end'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: ImitateAnswermodules.answerYes
}), "\u5DF2\u7B54", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: 13,
height: 13,
display: 'flex',
flexDirection: 'column-reverse'
},
className: "".concat(ImitateAnswermodules.answerNo, " ml10"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
height: '10%',
background: '#0152d9'
}
})
}), "\u90E8\u5206\u7B54\u9898", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "".concat(ImitateAnswermodules.answerNo, " ml10")
}), "\u672A\u7B54"]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: ImitateAnswermodules.answerInfo,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 12,
children: "\u7B54\u9898\u8FDB\u5EA6"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
span: 12,
className: "tr c-blue",
children: [answerData === null || answerData === void 0 ? void 0 : (_answerData$question_3 = answerData.question_status) === null || _answerData$question_3 === void 0 ? void 0 : (_answerData$question_4 = _answerData$question_3.filter(function (val) {
return (val === null || val === void 0 ? void 0 : val.ques_status) === 1;
})) === null || _answerData$question_4 === void 0 ? void 0 : _answerData$question_4.length, " / ", answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_20 = answerData.exercise_types) === null || _answerData$exercise_20 === void 0 ? void 0 : _answerData$exercise_20.q_counts]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_progress/* default */.Z, {
trailColor: "#c3ced2",
percent: (answerData === null || answerData === void 0 ? void 0 : (_answerData$question_5 = answerData.question_status) === null || _answerData$question_5 === void 0 ? void 0 : (_answerData$question_6 = _answerData$question_5.filter(function (val) {
return (val === null || val === void 0 ? void 0 : val.ques_status) === 1;
})) === null || _answerData$question_6 === void 0 ? void 0 : _answerData$question_6.length) / (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_21 = answerData.exercise_types) === null || _answerData$exercise_21 === void 0 ? void 0 : _answerData$exercise_21.q_counts) * 100,
showInfo: false
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "c-grey-333",
children: ["\u5171 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue-4ca",
children: (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_22 = answerData.exercise_types) === null || _answerData$exercise_22 === void 0 ? void 0 : _answerData$exercise_22.q_counts) || (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_23 = answerData.exercise_scores) === null || _answerData$exercise_23 === void 0 ? void 0 : (_answerData$exercise_24 = _answerData$exercise_23.exercise_types) === null || _answerData$exercise_24 === void 0 ? void 0 : _answerData$exercise_24.q_counts)
}), " \u9898\uFF1A"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "c-grey-333",
children: ["\u6EE1\u5206 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue-4ca",
children: (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_25 = answerData.exercise_types) === null || _answerData$exercise_25 === void 0 ? void 0 : _answerData$exercise_25.q_scores) || (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_26 = answerData.exercise_scores) === null || _answerData$exercise_26 === void 0 ? void 0 : (_answerData$exercise_27 = _answerData$exercise_26.exercise_types) === null || _answerData$exercise_27 === void 0 ? void 0 : _answerData$exercise_27.q_scores)
}), " \u5206"]
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "1",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: ImitateAnswermodules.cardList,
children: answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_28 = answerData.exercise_question_types) === null || _answerData$exercise_28 === void 0 ? void 0 : _answerData$exercise_28.map(function (er, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(react.Fragment, {
children: renderCardList(er, index)
}, er.question_type);
})
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ImitateAnswermodules.fold,
onClick: function onClick() {
return setShowAnswerCard(!showAnswerCard);
},
children: [showAnswerCard && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zuojiantou iconfont c-grey-c"
}), !showAnswerCard && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-youjiantou iconfont c-grey-c"
})]
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "1",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: [ImitateAnswermodules.bg, 'pl30', 'pr30', 'pb30', 'mb50', 'ml20'].join(' '),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
maxHeight: 600,
overflow: 'hidden auto'
},
children: renderClassifyQuestion()
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginTop: 60,
textAlign: 'center'
},
children: [(oneindex != 0 || twoindex != 0) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
className: "".concat(ImitateAnswermodules.submitButton, " mr10"),
type: "default",
onClick: function onClick() {
var _answerData$exercise25;
answerData.exercise_question_types[oneindex].items[twoindex].israp = false;
setAnswerData(objectSpread2_default()({}, answerData));
if (!ischecked && (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise25 = answerData.exercise) === null || _answerData$exercise25 === void 0 ? void 0 : _answerData$exercise25.user_exercise_status) === 0 && (0,authority/* isStudent */.dE)()) {
var _answerData$exercise_29, _answerData$exercise_30, _answerData$exercise_31, _answerData$exercise_32;
if (!((_answerData$exercise_29 = answerData.exercise_question_types) !== null && _answerData$exercise_29 !== void 0 && (_answerData$exercise_30 = _answerData$exercise_29[oneindex]) !== null && _answerData$exercise_30 !== void 0 && (_answerData$exercise_31 = _answerData$exercise_30.items) !== null && _answerData$exercise_31 !== void 0 && (_answerData$exercise_32 = _answerData$exercise_31[twoindex]) !== null && _answerData$exercise_32 !== void 0 && _answerData$exercise_32.repeat_answer)) {
setisshowmodal(true);
settype(1);
return;
}
}
if (twoindex === 0) {
oneindex -= 1;
twoindex = answerData.exercise_question_types[oneindex].items.length - 1;
} else {
twoindex -= 1;
}
setoneindex(oneindex);
settwoindex(twoindex);
// initData();
},
children: "\u4E0A\u4E00\u9898"
}), !(oneindex === (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_33 = answerData.exercise_question_types) === null || _answerData$exercise_33 === void 0 ? void 0 : _answerData$exercise_33.length) - 1 && twoindex === (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise_34 = answerData.exercise_question_types) === null || _answerData$exercise_34 === void 0 ? void 0 : (_answerData$exercise_35 = _answerData$exercise_34[oneindex]) === null || _answerData$exercise_35 === void 0 ? void 0 : (_answerData$exercise_36 = _answerData$exercise_35.items) === null || _answerData$exercise_36 === void 0 ? void 0 : _answerData$exercise_36.length) - 1) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
className: ImitateAnswermodules.submitButton,
type: "primary",
onClick: function onClick() {
var _answerData$exercise26;
answerData.exercise_question_types[oneindex].items[twoindex].israp = false;
setAnswerData(objectSpread2_default()({}, answerData));
if (!ischecked && (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise26 = answerData.exercise) === null || _answerData$exercise26 === void 0 ? void 0 : _answerData$exercise26.user_exercise_status) === 0 && (0,authority/* isStudent */.dE)()) {
var _answerData$exercise_37, _answerData$exercise_38, _answerData$exercise_39, _answerData$exercise_40;
if (!((_answerData$exercise_37 = answerData.exercise_question_types) !== null && _answerData$exercise_37 !== void 0 && (_answerData$exercise_38 = _answerData$exercise_37[oneindex]) !== null && _answerData$exercise_38 !== void 0 && (_answerData$exercise_39 = _answerData$exercise_38.items) !== null && _answerData$exercise_39 !== void 0 && (_answerData$exercise_40 = _answerData$exercise_39[twoindex]) !== null && _answerData$exercise_40 !== void 0 && _answerData$exercise_40.repeat_answer)) {
setisshowmodal(true);
settype(2);
return;
}
}
if (answerData.exercise_question_types[oneindex].items.length - 1 === twoindex) {
oneindex = oneindex + 1;
twoindex = 0;
} else {
twoindex = twoindex + 1;
}
setoneindex(oneindex);
settwoindex(twoindex);
// initData();
},
children: "\u4E0B\u4E00\u9898"
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
title: "\u6CE8\u610F",
open: isShowmodal,
onCancel: function onCancel() {
return setisshowmodal(false);
},
footer: false,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
marginBottom: 0
},
children: "\u79BB\u5F00\u8BE5\u9898\u540E\u4E0D\u5141\u8BB8\u518D\u6B21\u4FEE\u6539\u7B54\u6848\uFF0C\u786E\u8BA4\u79BB\u5F00\u5417\uFF1F"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginTop: 60,
display: 'flex',
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: ischecked,
onChange: function onChange(e) {
setischecked(e.target.checked);
},
children: "\u4E0B\u6B21\u4E0D\u518D\u663E\u793A"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
onClick: function onClick() {
if (!answerData.exercise_question_types[oneindex].items[twoindex].israp) {
if (answerData.exercise_question_types[oneindex].items[twoindex].israp === '') {
answerData.exercise_question_types[oneindex].items[twoindex].israp = true;
setAnswerData(objectSpread2_default()({}, answerData));
}
} else {
answerData.exercise_question_types[oneindex].items[twoindex].israp = true;
setAnswerData(objectSpread2_default()({}, answerData));
}
},
children: "\u6211\u518D\u60F3\u60F3"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
onClick: function onClick() {
answerData.exercise_question_types[oneindex].items[twoindex].israp = false;
setAnswerData(objectSpread2_default()({}, answerData));
if (type === 1) {
if (twoindex === 0) {
oneindex -= 1;
twoindex = answerData.exercise_question_types[oneindex].items.length - 1;
} else {
twoindex -= 1;
}
console.log(answerData.exercise_question_types[oneindex].items[twoindex], '-----');
setoneindex(oneindex);
settwoindex(twoindex);
} else if (type === 2) {
if (answerData.exercise_question_types[oneindex].items.length - 1 === twoindex) {
oneindex = oneindex + 1;
twoindex = 0;
} else {
twoindex = twoindex + 1;
}
setoneindex(oneindex);
settwoindex(twoindex);
} else {
setoneindex(indexitems.oneindex);
settwoindex(indexitems.twoindex);
}
// initData();
setisshowmodal(false);
},
type: "primary",
style: {
marginLeft: 30
},
children: "\u786E\u8BA4"
})]
})]
})]
})
})]
}), checkStatus.status !== 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(ErrCheckIpTip, {
data: checkStatus
})]
})]
});
};
/* harmony default export */ var ImitateAnswer = ((0,_umi_production_exports.connect)(function (_ref12) {
var loading = _ref12.loading,
user = _ref12.user,
globalSetting = _ref12.globalSetting;
return {
globalSetting: globalSetting,
user: user,
loading: loading.effects
};
})(Answer));
/***/ }),
/***/ 58492:
/*!**************************************************************!*\
!*** ./node_modules/antd/es/breadcrumb/index.js + 3 modules ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ breadcrumb; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(4942);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__(74902);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(94184);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var toArray = __webpack_require__(50344);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
var context = __webpack_require__(53124);
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 5 modules
var menu = __webpack_require__(66516);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
var reactNode = __webpack_require__(96159);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/DownOutlined.js
var DownOutlined = __webpack_require__(13622);
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/dropdown.js + 1 modules
var dropdown = __webpack_require__(18562);
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbItem.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var BreadcrumbItem = function BreadcrumbItem(props) {
var customizePrefixCls = props.prefixCls,
_props$separator = props.separator,
separator = _props$separator === void 0 ? '/' : _props$separator,
children = props.children,
menu = props.menu,
overlay = props.overlay,
dropdownProps = props.dropdownProps,
restProps = __rest(props, ["prefixCls", "separator", "children", "menu", "overlay", "dropdownProps"]);
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
// Warning for deprecated usage
if (false) {}
/** If overlay is have Wrap a Dropdown */
var renderBreadcrumbNode = function renderBreadcrumbNode(breadcrumbItem) {
if (menu || overlay) {
return /*#__PURE__*/react.createElement(dropdown/* default */.Z, (0,esm_extends/* default */.Z)({
menu: menu,
overlay: overlay,
placement: "bottom"
}, dropdownProps), /*#__PURE__*/react.createElement("span", {
className: "".concat(prefixCls, "-overlay-link")
}, breadcrumbItem, /*#__PURE__*/react.createElement(DownOutlined/* default */.Z, null)));
}
return breadcrumbItem;
};
var link;
if ('href' in restProps) {
link = /*#__PURE__*/react.createElement("a", (0,esm_extends/* default */.Z)({
className: "".concat(prefixCls, "-link")
}, restProps), children);
} else {
link = /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({
className: "".concat(prefixCls, "-link")
}, restProps), children);
}
// wrap to dropDown
link = renderBreadcrumbNode(link);
if (children !== undefined && children !== null) {
return /*#__PURE__*/react.createElement("li", null, link, separator && /*#__PURE__*/react.createElement("span", {
className: "".concat(prefixCls, "-separator")
}, separator));
}
return null;
};
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbSeparator.js
var BreadcrumbSeparator = function BreadcrumbSeparator(_ref) {
var children = _ref.children;
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('breadcrumb');
return /*#__PURE__*/react.createElement("span", {
className: "".concat(prefixCls, "-separator")
}, children || '/');
};
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/Breadcrumb.js
var Breadcrumb_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function getBreadcrumbName(route, params) {
if (!route.breadcrumbName) {
return null;
}
var paramsKeys = Object.keys(params).join('|');
var name = route.breadcrumbName.replace(new RegExp(":(".concat(paramsKeys, ")"), 'g'), function (replacement, key) {
return params[key] || replacement;
});
return name;
}
function defaultItemRender(route, params, routes, paths) {
var isLastItem = routes.indexOf(route) === routes.length - 1;
var name = getBreadcrumbName(route, params);
return isLastItem ? /*#__PURE__*/react.createElement("span", null, name) : /*#__PURE__*/react.createElement("a", {
href: "#/".concat(paths.join('/'))
}, name);
}
var getPath = function getPath(path, params) {
path = (path || '').replace(/^\//, '');
Object.keys(params).forEach(function (key) {
path = path.replace(":".concat(key), params[key]);
});
return path;
};
var addChildPath = function addChildPath(paths, childPath, params) {
var originalPaths = (0,toConsumableArray/* default */.Z)(paths);
var path = getPath(childPath || '', params);
if (path) {
originalPaths.push(path);
}
return originalPaths;
};
var Breadcrumb = function Breadcrumb(_a) {
var customizePrefixCls = _a.prefixCls,
_a$separator = _a.separator,
separator = _a$separator === void 0 ? '/' : _a$separator,
style = _a.style,
className = _a.className,
routes = _a.routes,
children = _a.children,
_a$itemRender = _a.itemRender,
itemRender = _a$itemRender === void 0 ? defaultItemRender : _a$itemRender,
_a$params = _a.params,
params = _a$params === void 0 ? {} : _a$params,
restProps = Breadcrumb_rest(_a, ["prefixCls", "separator", "style", "className", "routes", "children", "itemRender", "params"]);
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var crumbs;
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
if (routes && routes.length > 0) {
// generated by route
var paths = [];
crumbs = routes.map(function (route) {
var path = getPath(route.path, params);
if (path) {
paths.push(path);
}
// generated overlay by route.children
var overlay;
if (route.children && route.children.length) {
overlay = /*#__PURE__*/react.createElement(menu/* default */.Z, {
items: route.children.map(function (child) {
return {
key: child.path || child.breadcrumbName,
label: itemRender(child, params, routes, addChildPath(paths, child.path, params))
};
})
});
}
var itemProps = {
separator: separator
};
if (overlay) {
itemProps.overlay = overlay;
}
return /*#__PURE__*/react.createElement(breadcrumb_BreadcrumbItem, (0,esm_extends/* default */.Z)({}, itemProps, {
key: path || route.breadcrumbName
}), itemRender(route, params, routes, paths));
});
} else if (children) {
crumbs = (0,toArray/* default */.Z)(children).map(function (element, index) {
if (!element) {
return element;
}
false ? 0 : void 0;
return (0,reactNode/* cloneElement */.Tm)(element, {
separator: separator,
key: index
});
});
}
var breadcrumbClassName = classnames_default()(prefixCls, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className);
return /*#__PURE__*/react.createElement("nav", (0,esm_extends/* default */.Z)({
className: breadcrumbClassName,
style: style
}, restProps), /*#__PURE__*/react.createElement("ol", null, crumbs));
};
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/index.js
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
/***/ }),
/***/ 63102:
/*!********************************************************************!*\
!*** ./node_modules/antd/es/breadcrumb/style/index.js + 1 modules ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
var style_default = __webpack_require__(43146);
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/style/index.less
// extracted by mini-css-extract-plugin
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js + 1 modules
var style = __webpack_require__(68018);
// EXTERNAL MODULE: ./node_modules/antd/es/menu/style/index.js + 1 modules
var menu_style = __webpack_require__(83736);
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/style/index.js
// style dependencies
/***/ }),
/***/ 19575:
/*!******************************************!*\
!*** ./node_modules/js-base64/base64.js ***!
\******************************************/
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
* base64.js
*
* Licensed under the BSD 3-Clause License.
* http://opensource.org/licenses/BSD-3-Clause
*
* References:
* http://en.wikipedia.org/wiki/Base64
*/
;(function (global, factory) {
true
? module.exports = factory(global)
: 0
}((
typeof self !== 'undefined' ? self
: typeof window !== 'undefined' ? window
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
: this
), function(global) {
'use strict';
// existing version for noConflict()
global = global || {};
var _Base64 = global.Base64;
var version = "2.6.4";
// constants
var b64chars
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var b64tab = function(bin) {
var t = {};
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
return t;
}(b64chars);
var fromCharCode = String.fromCharCode;
// encoder stuff
var cb_utob = function(c) {
if (c.length < 2) {
var cc = c.charCodeAt(0);
return cc < 0x80 ? c
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
+ fromCharCode(0x80 | (cc & 0x3f)))
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
} else {
var cc = 0x10000
+ (c.charCodeAt(0) - 0xD800) * 0x400
+ (c.charCodeAt(1) - 0xDC00);
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
}
};
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
var utob = function(u) {
return u.replace(re_utob, cb_utob);
};
var cb_encode = function(ccc) {
var padlen = [0, 2, 1][ccc.length % 3],
ord = ccc.charCodeAt(0) << 16
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
chars = [
b64chars.charAt( ord >>> 18),
b64chars.charAt((ord >>> 12) & 63),
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
];
return chars.join('');
};
var btoa = global.btoa && typeof global.btoa == 'function'
? function(b){ return global.btoa(b) } : function(b) {
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
'The string contains invalid characters.'
);
return b.replace(/[\s\S]{1,3}/g, cb_encode);
};
var _encode = function(u) {
return btoa(utob(String(u)));
};
var mkUriSafe = function (b64) {
return b64.replace(/[+\/]/g, function(m0) {
return m0 == '+' ? '-' : '_';
}).replace(/=/g, '');
};
var encode = function(u, urisafe) {
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
};
var encodeURI = function(u) { return encode(u, true) };
var fromUint8Array;
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
// return btoa(fromCharCode.apply(null, a));
var b64 = '';
for (var i = 0, l = a.length; i < l; i += 3) {
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
var ord = a0 << 16 | a1 << 8 | a2;
b64 += b64chars.charAt( ord >>> 18)
+ b64chars.charAt((ord >>> 12) & 63)
+ ( typeof a1 != 'undefined'
? b64chars.charAt((ord >>> 6) & 63) : '=')
+ ( typeof a2 != 'undefined'
? b64chars.charAt( ord & 63) : '=');
}
return urisafe ? mkUriSafe(b64) : b64;
};
// decoder stuff
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
var cb_btou = function(cccc) {
switch(cccc.length) {
case 4:
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
| ((0x3f & cccc.charCodeAt(1)) << 12)
| ((0x3f & cccc.charCodeAt(2)) << 6)
| (0x3f & cccc.charCodeAt(3)),
offset = cp - 0x10000;
return (fromCharCode((offset >>> 10) + 0xD800)
+ fromCharCode((offset & 0x3FF) + 0xDC00));
case 3:
return fromCharCode(
((0x0f & cccc.charCodeAt(0)) << 12)
| ((0x3f & cccc.charCodeAt(1)) << 6)
| (0x3f & cccc.charCodeAt(2))
);
default:
return fromCharCode(
((0x1f & cccc.charCodeAt(0)) << 6)
| (0x3f & cccc.charCodeAt(1))
);
}
};
var btou = function(b) {
return b.replace(re_btou, cb_btou);
};
var cb_decode = function(cccc) {
var len = cccc.length,
padlen = len % 4,
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
chars = [
fromCharCode( n >>> 16),
fromCharCode((n >>> 8) & 0xff),
fromCharCode( n & 0xff)
];
chars.length -= [0, 0, 2, 1][padlen];
return chars.join('');
};
var _atob = global.atob && typeof global.atob == 'function'
? function(a){ return global.atob(a) } : function(a){
return a.replace(/\S{1,4}/g, cb_decode);
};
var atob = function(a) {
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
};
var _decode = function(a) { return btou(_atob(a)) };
var _fromURI = function(a) {
return String(a).replace(/[-_]/g, function(m0) {
return m0 == '-' ? '+' : '/'
}).replace(/[^A-Za-z0-9\+\/]/g, '');
};
var decode = function(a){
return _decode(_fromURI(a));
};
var toUint8Array;
if (global.Uint8Array) toUint8Array = function(a) {
return Uint8Array.from(atob(_fromURI(a)), function(c) {
return c.charCodeAt(0);
});
};
var noConflict = function() {
var Base64 = global.Base64;
global.Base64 = _Base64;
return Base64;
};
// export Base64
global.Base64 = {
VERSION: version,
atob: atob,
btoa: btoa,
fromBase64: decode,
toBase64: encode,
utob: utob,
encode: encode,
encodeURI: encodeURI,
btou: btou,
decode: decode,
noConflict: noConflict,
fromUint8Array: fromUint8Array,
toUint8Array: toUint8Array
};
// if ES5 is available, make Base64.extendString() available
if (typeof Object.defineProperty === 'function') {
var noEnum = function(v){
return {value:v,enumerable:false,writable:true,configurable:true};
};
global.Base64.extendString = function () {
Object.defineProperty(
String.prototype, 'fromBase64', noEnum(function () {
return decode(this)
}));
Object.defineProperty(
String.prototype, 'toBase64', noEnum(function (urisafe) {
return encode(this, urisafe)
}));
Object.defineProperty(
String.prototype, 'toBase64URI', noEnum(function () {
return encode(this, true)
}));
};
}
//
// export Base64 to the namespace
//
if (global['Meteor']) { // Meteor.js
Base64 = global.Base64;
}
// module.exports and AMD are mutually exclusive.
// module.exports has precedence.
if ( true && module.exports) {
module.exports.Base64 = global.Base64;
}
else if (true) {
// AMD. Register as an anonymous module.
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
// that's it!
return {Base64: global.Base64}
}));
/***/ }),
/***/ 42480:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/***/ (function() {
/* (ignored) */
/***/ })
}]);