|
|
|
|
@ -1589,7 +1589,7 @@ var tooltip = __webpack_require__(6848);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
|
|
|
var icons_ExclamationCircleOutlined = __webpack_require__(23717);
|
|
|
|
|
var ExclamationCircleOutlined = __webpack_require__(23717);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/MinusSquareOutlined.js + 1 modules
|
|
|
|
|
var MinusSquareOutlined = __webpack_require__(4917);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/PlusSquareOutlined.js + 1 modules
|
|
|
|
|
@ -1623,16 +1623,18 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var scoreStatusMapping = {
|
|
|
|
|
0: 'c-red-ee4',
|
|
|
|
|
1: 'c-green'
|
|
|
|
|
};
|
|
|
|
|
var Simple = function Simple(_ref) {
|
|
|
|
|
var _answerData$exercise, _answerData$exercise2, _answerData$exercise3, _item$user_answer, _item$user_answer2, _item$standard_answer;
|
|
|
|
|
var _answerData$exercise, _answerData$exercise2, _item$user_answer, _item$user_answer2;
|
|
|
|
|
var item = _ref.item,
|
|
|
|
|
answerData = _ref.answerData,
|
|
|
|
|
isEducation = _ref.isEducation,
|
|
|
|
|
sign = _ref.sign,
|
|
|
|
|
setKnowledgeDialog = _ref.setKnowledgeDialog,
|
|
|
|
|
_ref$onBlur = _ref.onBlur,
|
|
|
|
|
_onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur;
|
|
|
|
|
var value = (0,_react_17_0_2_react.useRef)("");
|
|
|
|
|
@ -1679,13 +1681,16 @@ var Simple = function Simple(_ref) {
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [(answerData === null || answerData === void 0 || (_answerData$exercise = answerData.exercise) === null || _answerData$exercise === void 0 ? void 0 : _answerData$exercise.user_exercise_status) === 1 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [(item === null || item === void 0 ? void 0 : item.standard_answer.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: 20
|
|
|
|
|
},
|
|
|
|
|
children: "\u6211\u7684\u7B54\u6848"
|
|
|
|
|
}), ((0,authority/* isAdmin */.GJ)() || (0,authority/* isStudent */.dE)() && (answerData === null || answerData === void 0 || (_answerData$exercise2 = answerData.exercise) === null || _answerData$exercise2 === void 0 ? void 0 : _answerData$exercise2.user_exercise_status) > 0 && (answerData === null || answerData === void 0 || (_answerData$exercise3 = answerData.exercise) === null || _answerData$exercise3 === void 0 ? void 0 : _answerData$exercise3.open_score)) && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
}), ((0,authority/* isAdmin */.GJ)() || (0,authority/* isStudent */.dE)() && (answerData === null || answerData === void 0 || (_answerData$exercise = answerData.exercise) === null || _answerData$exercise === void 0 ? void 0 : _answerData$exercise.user_exercise_status) > 0 && (answerData === null || answerData === void 0 || (_answerData$exercise2 = answerData.exercise) === null || _answerData$exercise2 === void 0 ? void 0 : _answerData$exercise2.open_score)) && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
justify: "end",
|
|
|
|
|
className: "mb20",
|
|
|
|
|
@ -1761,37 +1766,94 @@ var Simple = function Simple(_ref) {
|
|
|
|
|
children: "\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), (0,authority/* isStudent */.dE)() && (item === null || item === void 0 ? void 0 : item.standard_answer) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.analysisWrap,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Answermodules.greyBg,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
align: "middle",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
className: "font14 mr10",
|
|
|
|
|
style: {
|
|
|
|
|
color: '#6A7283'
|
|
|
|
|
},
|
|
|
|
|
children: "\u3010\u7B54\u6848\u3011"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
value: item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer[0]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "font14 mr10",
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.standard_answer) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: '16px',
|
|
|
|
|
marginBottom: 14,
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
alignItems: 'center'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
children: ["\u7B54\u9898\u7ED3\u679C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#6A7283'
|
|
|
|
|
marginLeft: 12,
|
|
|
|
|
color: (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score) ? '#29A64F' : '#E53333'
|
|
|
|
|
},
|
|
|
|
|
children: "\u3010\u89E3\u6790\u3011"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
className: Answermodules.renderHtml,
|
|
|
|
|
value: item === null || item === void 0 ? void 0 : item.analysis
|
|
|
|
|
children: (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score) ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
|
|
|
|
|
})]
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && (item === null || item === void 0 ? void 0 : item.user_score) != (item === null || item === void 0 ? void 0 : item.question_score) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#3061D0',
|
|
|
|
|
fontSize: '14px'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setKnowledgeDialog();
|
|
|
|
|
},
|
|
|
|
|
children: ["\u4E3A\u4F60\u63A8\u8350\u540C\u77E5\u8BC6\u70B9\u9898\u76EE\uFF0C\u7ACB\u5373\u5DE9\u56FA", " >"]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.can_answer_num) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#FF8C29',
|
|
|
|
|
marginBottom: 14
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 10
|
|
|
|
|
}
|
|
|
|
|
}), "\u6E29\u99A8\u63D0\u793A\uFF1A\u8FD8\u6709 ", item === null || item === void 0 ? void 0 : item.can_answer_num, " \u6B21\u673A\u4F1A\u53EF\u5C1D\u8BD5\u8FDB\u884C\u91CD\u65B0\u7B54\u9898\uFF0C\u91CD\u65B0\u7B54\u9898\u6B63\u786E\u540E\u4E5F\u4F1A\u8BA1\u5165\u603B\u6210\u7EE9\u3002"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.analysisWrap,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Answermodules.greyBg,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
className: "font14 mr10",
|
|
|
|
|
style: {
|
|
|
|
|
color: '#6A7283',
|
|
|
|
|
lineHeight: '30px'
|
|
|
|
|
},
|
|
|
|
|
children: "\u3010\u7B54\u6848\u3011"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
lineHeight: '30px'
|
|
|
|
|
},
|
|
|
|
|
children: item === null || item === void 0 ? void 0 : item.standard_answer[0]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "font14 mr10 mb20",
|
|
|
|
|
style: {
|
|
|
|
|
color: '#6A7283',
|
|
|
|
|
lineHeight: '30px'
|
|
|
|
|
},
|
|
|
|
|
children: "\u3010\u89E3\u6790\u3011"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
className: Answermodules.renderHtml,
|
|
|
|
|
value: item === null || item === void 0 ? void 0 : item.analysis
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "font14 mr10",
|
|
|
|
|
style: {
|
|
|
|
|
color: '#6A7283',
|
|
|
|
|
lineHeight: '30px'
|
|
|
|
|
},
|
|
|
|
|
children: "\u3010\u77E5\u8BC6\u70B9\u3011"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
lineHeight: '30px'
|
|
|
|
|
},
|
|
|
|
|
children: item === null || item === void 0 ? void 0 : item.tag_disciplines
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
@ -2516,16 +2578,18 @@ var Program = function Program(_ref) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
|
|
|
var Fill_scoreStatusMapping = {
|
|
|
|
|
0: 'c-red-ee4',
|
|
|
|
|
1: 'c-green'
|
|
|
|
|
};
|
|
|
|
|
var Fill = function Fill(_ref) {
|
|
|
|
|
var _answerData$exercise, _answerData$exercise2, _item$standard_answer2, _answerData$exercise3, _item$standard_answer3;
|
|
|
|
|
var _answerData$exercise, _answerData$exercise2, _item$standard_answer2, _item$standard_answer3;
|
|
|
|
|
var sign = _ref.sign,
|
|
|
|
|
item = _ref.item,
|
|
|
|
|
answerData = _ref.answerData,
|
|
|
|
|
setKnowledgeDialog = _ref.setKnowledgeDialog,
|
|
|
|
|
_ref$onBlur = _ref.onBlur,
|
|
|
|
|
_onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
@ -2685,14 +2749,14 @@ var Fill = function Fill(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score) ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
|
|
|
|
|
})]
|
|
|
|
|
}), (answerData === null || answerData === void 0 || (_answerData$exercise3 = answerData.exercise) === null || _answerData$exercise3 === void 0 ? void 0 : _answerData$exercise3.error_push) && (item === null || item === void 0 ? void 0 : item.user_score) != (item === null || item === void 0 ? void 0 : item.question_score) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && (item === null || item === void 0 ? void 0 : item.user_score) != (item === null || item === void 0 ? void 0 : item.question_score) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#3061D0',
|
|
|
|
|
fontSize: '14px'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setKnowledgeDialog(true);
|
|
|
|
|
setKnowledgeDialog();
|
|
|
|
|
},
|
|
|
|
|
children: ["\u4E3A\u4F60\u63A8\u8350\u540C\u77E5\u8BC6\u70B9\u9898\u76EE\uFF0C\u7ACB\u5373\u5DE9\u56FA", " >"]
|
|
|
|
|
})]
|
|
|
|
|
@ -2701,7 +2765,7 @@ var Fill = function Fill(_ref) {
|
|
|
|
|
color: '#FF8C29',
|
|
|
|
|
marginBottom: 14
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 10
|
|
|
|
|
}
|
|
|
|
|
@ -2887,7 +2951,7 @@ var BFill = function BFill(_ref) {
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: '#FF0000'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(icons_ExclamationCircleOutlined/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 5
|
|
|
|
|
},
|
|
|
|
|
@ -3000,6 +3064,8 @@ var useRemindModal = __webpack_require__(25114);
|
|
|
|
|
var constant = __webpack_require__(35713);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
|
|
var fetch = __webpack_require__(84087);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
|
|
var NoData = __webpack_require__(69519);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/Detail/Answer/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3033,6 +3099,7 @@ var _excluded = ["globalSetting", "loading", "user", "exercise", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Countdown = statistic/* default */.Z.Countdown;
|
|
|
|
|
@ -3119,7 +3186,12 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
|
|
knowledgeDialog = _useState32[0],
|
|
|
|
|
setKnowledgeDialog = _useState32[1]; //推荐知识点弹窗
|
|
|
|
|
_setKnowledgeDialog = _useState32[1]; //推荐知识点弹窗
|
|
|
|
|
|
|
|
|
|
var _useState33 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
|
|
|
itemBankData = _useState34[0],
|
|
|
|
|
setItemBankData = _useState34[1]; //推荐知识题目
|
|
|
|
|
|
|
|
|
|
var questionPartRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
(0,Hooks/* useDisableAction */.y)((0,authority/* isStudent */.dE)());
|
|
|
|
|
@ -3716,7 +3788,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
fontSize: '14px'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setKnowledgeDialog(true);
|
|
|
|
|
_setKnowledgeDialog(true);
|
|
|
|
|
},
|
|
|
|
|
children: ["\u4E3A\u4F60\u63A8\u8350\u540C\u77E5\u8BC6\u70B9\u9898\u76EE\uFF0C\u7ACB\u5373\u5DE9\u56FA", " >"]
|
|
|
|
|
})]
|
|
|
|
|
@ -3725,7 +3797,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
color: '#FF8C29',
|
|
|
|
|
marginBottom: 14
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(icons_ExclamationCircleOutlined/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 10
|
|
|
|
|
}
|
|
|
|
|
@ -3955,7 +4027,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
fontSize: '14px'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setKnowledgeDialog(true);
|
|
|
|
|
_setKnowledgeDialog(true);
|
|
|
|
|
},
|
|
|
|
|
children: ["\u4E3A\u4F60\u63A8\u8350\u540C\u77E5\u8BC6\u70B9\u9898\u76EE\uFF0C\u7ACB\u5373\u5DE9\u56FA", " >"]
|
|
|
|
|
})]
|
|
|
|
|
@ -3964,7 +4036,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
color: '#FF8C29',
|
|
|
|
|
marginBottom: 14
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(icons_ExclamationCircleOutlined/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 10
|
|
|
|
|
}
|
|
|
|
|
@ -4027,6 +4099,9 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
item: item,
|
|
|
|
|
sign: sign,
|
|
|
|
|
answerData: answerData,
|
|
|
|
|
setKnowledgeDialog: function setKnowledgeDialog() {
|
|
|
|
|
return _setKnowledgeDialog(true);
|
|
|
|
|
},
|
|
|
|
|
onBlur: ( /*#__PURE__*/function () {
|
|
|
|
|
var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(value, index, userAnswer) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
|
|
|
|
|
@ -4478,6 +4553,21 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
}, twoindex)]
|
|
|
|
|
}, oneindex);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// const getKnowledge = async () => {
|
|
|
|
|
// const currentItem = answerData?.exercise_question_types?.[oneindex].items?.[twoindex]
|
|
|
|
|
// const res = await Fetch(`/api/subject_exercises/${params.exerciseId}/answer.json`, {
|
|
|
|
|
// method: 'post',
|
|
|
|
|
// body: {
|
|
|
|
|
// exercise_question_id: params.question_id,
|
|
|
|
|
// item_banks: {
|
|
|
|
|
// item_bank_id: currentItem?.question_id,
|
|
|
|
|
// choice_id: [0, 1, 2].includes(currentItem.question_type) ? currentItem.user_answer : null
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
|
|
size: 'middle',
|
|
|
|
|
spinning: isSpin,
|
|
|
|
|
@ -4500,8 +4590,8 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
children: (0,util/* exerciseTips */.vB)(answerData === null || answerData === void 0 || (_answerData$exercise5 = answerData.exercise) === null || _answerData$exercise5 === void 0 ? void 0 : _answerData$exercise5.exercise_status)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
className: "".concat(Answermodules.exerciseTitle, " ml10"),
|
|
|
|
|
title: answerData === null || answerData === void 0 || (_answerData$exercise6 = answerData.exercise) === null || _answerData$exercise6 === void 0 ? void 0 : _answerData$exercise6.exercise_name,
|
|
|
|
|
children: answerData === null || answerData === void 0 || (_answerData$exercise7 = answerData.exercise) === null || _answerData$exercise7 === void 0 ? void 0 : _answerData$exercise7.exercise_name
|
|
|
|
|
title: answerData === null || answerData === void 0 || (_answerData$exercise6 = answerData.exercise) === null || _answerData$exercise6 === void 0 ? void 0 : _answerData$exercise6.subject_exercise_name,
|
|
|
|
|
children: answerData === null || answerData === void 0 || (_answerData$exercise7 = answerData.exercise) === null || _answerData$exercise7 === void 0 ? void 0 : _answerData$exercise7.subject_exercise_name
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 'auto'
|
|
|
|
|
@ -4770,7 +4860,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
type: "primary",
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee16() {
|
|
|
|
|
var _answerData$exercise_28;
|
|
|
|
|
var currentInfo, query, res;
|
|
|
|
|
var currentInfo, query, _currentInfo$user_ans, res, _res$data;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee16$(_context16) {
|
|
|
|
|
while (1) switch (_context16.prev = _context16.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
@ -4787,6 +4877,9 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
answer_text: item === null || item === void 0 ? void 0 : item.answer_text
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
} else if (currentInfo.question_type == 4) {
|
|
|
|
|
//简答题
|
|
|
|
|
query.answer_text = currentInfo === null || currentInfo === void 0 || (_currentInfo$user_ans = currentInfo.user_answer) === null || _currentInfo$user_ans === void 0 ? void 0 : _currentInfo$user_ans[0];
|
|
|
|
|
} else if (currentInfo.question_type == 7) {
|
|
|
|
|
//组合题
|
|
|
|
|
query.answers = currentInfo.sub_exercise_questions.map(function (item) {
|
|
|
|
|
@ -4796,19 +4889,19 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
console.log("currentInfo", currentInfo);
|
|
|
|
|
_context16.next = 6;
|
|
|
|
|
_context16.next = 5;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/exercise_questions/".concat(currentInfo.question_id, "/exercise_answers/subject_exercise_answer.json"), {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
body: query
|
|
|
|
|
});
|
|
|
|
|
case 6:
|
|
|
|
|
case 5:
|
|
|
|
|
res = _context16.sent;
|
|
|
|
|
if (res.status == 0) {
|
|
|
|
|
setItemBankData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.item_bank_data);
|
|
|
|
|
setShowConfirm(false);
|
|
|
|
|
initData();
|
|
|
|
|
}
|
|
|
|
|
case 8:
|
|
|
|
|
case 7:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context16.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -4832,8 +4925,17 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
|
|
onOk: function onOk() {},
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setKnowledgeDialog(false);
|
|
|
|
|
}
|
|
|
|
|
_setKnowledgeDialog(false);
|
|
|
|
|
},
|
|
|
|
|
children: itemBankData.length > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [
|
|
|
|
|
// 单选题
|
|
|
|
|
itemBankData[0].question_type == 0 && renderSingle(itemBankData[0], itemBankData[0].question_type),
|
|
|
|
|
// 判断题
|
|
|
|
|
itemBankData[0].question_type == 2 && renderSingle(itemBankData[0], itemBankData[0].question_type),
|
|
|
|
|
// 多选题
|
|
|
|
|
itemBankData[0].question_type == 1 && renderMultiple(itemBankData[0], itemBankData[0].question_type)]
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|