Auto Submit

dev_local_v9_test6
autosubmit 2 years ago
parent 4dfb3e85f1
commit 73e87b39cb

@ -302,35 +302,23 @@ var List = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(function (_ref, ref)
className: "mr10",
onChange: handleSelectCheck,
checked: selectIds.includes(data.id)
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
display: 'flex',
alignItems: 'center'
},
onClick: function onClick() {
if (data.is_warning) {
return;
}
setVisible(!visible);
},
className: Topicmodules.title,
children: [data.is_warning && /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
style: {
marginRight: 5,
color: '#FF9300'
},
className: "iconfont icon-tishi7 font14"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
showLines: 1,
showTextOnly: true,
className: Topicmodules.topicTitleContent,
value: (data === null || data === void 0 ? void 0 : data.item_type) === "BPROGRAM" ? data === null || data === void 0 || (_data$program_attr3 = data.program_attr) === null || _data$program_attr3 === void 0 ? void 0 : _data$program_attr3.description : data.question_title
}, 1)]
}, 1)
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
onClick: function onClick() {
if (data.is_warning) {
return;
}
setVisible(!visible);
},
className: Topicmodules.tr,

@ -26,7 +26,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.e5b39be4.js"></script>
<script src="/react/build/umi.9ae64465.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -154,10 +154,7 @@ var Collection = function Collection(_ref) {
2: "适中",
3: "困难"
};
var handleDetailClick = function handleDetailClick(id, isWarning) {
if (isWarning) {
return;
}
var handleDetailClick = function handleDetailClick(id) {
if (childRefs.current[id]) {
childRefs.current[id].expandDetail();
}
@ -309,7 +306,7 @@ var Collection = function Collection(_ref) {
cursor: 'pointer'
},
onClick: function onClick() {
handleDetailClick(v.question_id, v.is_warning);
handleDetailClick(v.question_id);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-chengxinkaoshishengming font14 mr5",

@ -154,10 +154,7 @@ var MisCollection = function MisCollection(_ref) {
2: "适中",
3: "困难"
};
var handleDetailClick = function handleDetailClick(id, isWrongQuestion) {
if (isWrongQuestion) {
return;
}
var handleDetailClick = function handleDetailClick(id) {
if (childRefs.current[id]) {
childRefs.current[id].expandDetail();
}
@ -312,7 +309,7 @@ var MisCollection = function MisCollection(_ref) {
cursor: 'pointer'
},
onClick: function onClick() {
handleDetailClick(v.question_id, v.is_warning);
handleDetailClick(v.question_id);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-chengxinkaoshishengming font14 mr5",

@ -46,6 +46,80 @@ if (false) {}
/***/ }),
/***/ 6739:
/*!**********************************************!*\
!*** ./src/components/AsyncButton/index.tsx ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: function() { return /* binding */ AsyncButton; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 3113);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var _excluded = ["children"];
var AsyncButton = function AsyncButton(_ref) {
var children = _ref.children,
props = _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded);
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
_useState2 = _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
btnLoading = _useState2[0],
setBtnLoading = _useState2[1];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
loading: btnLoading,
onClick: ( /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(e) {
return _root_workspace_ppte5yg23_local_v9_test6_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.prev = 0;
setBtnLoading(true);
_context.next = 4;
return props.onClick(e);
case 4:
setBtnLoading(false);
_context.next = 11;
break;
case 7:
_context.prev = 7;
_context.t0 = _context["catch"](0);
console.error(_context.t0);
setBtnLoading(false);
case 11:
case "end":
return _context.stop();
}
}, _callee, null, [[0, 7]]);
}));
return function (_x) {
return _ref2.apply(this, arguments);
};
}()),
children: children
}));
};
/***/ }),
/***/ 47178:
/*!*********************************************************!*\
!*** ./src/components/QuestionEditor/Buttonloading.tsx ***!
@ -730,7 +804,10 @@ var Simple = function Simple(_ref) {
defaultValue: item === null || item === void 0 || (_item$user_answer2 = item.user_answer) === null || _item$user_answer2 === void 0 ? void 0 : _item$user_answer2[0],
id: item === null || item === void 0 ? void 0 : item.question_id,
onChange: function onChange(value) {
return setValue(value);
setValue(value);
setTimeout(function () {
_onBlur(value.current);
}, 200);
},
onBlur: function onBlur() {
return _onBlur(value);
@ -1295,21 +1372,18 @@ var Fill = function Fill(_ref) {
disabled: !!(item !== null && item !== void 0 && (_item$standard_answer = item.standard_answer) !== null && _item$standard_answer !== void 0 && _item$standard_answer.length),
value: answer === null || answer === void 0 ? void 0 : answer.answer_text,
onChange: function onChange(e) {
console.log('userAnswer', userAnswer);
userAnswer[index].answer_text = e.target.value;
setUserAnswer(toConsumableArray_default()(userAnswer));
},
onBlur: ( /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) {
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, newArr, _newArr;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return onBlur(answer === null || answer === void 0 ? void 0 : answer.answer_text, index + 1, userAnswer);
return onBlur(e.target.value, index + 1, userAnswer);
case 2:
res = _context.sent;
if (res.status === 1) {
if (res.status == 1) {
newArr = saveStatusArr.slice();
newArr[index] = {
status: 'none',
@ -1329,11 +1403,21 @@ var Fill = function Fill(_ref) {
return _context.stop();
}
}, _callee);
}));
return function (_x) {
return _ref2.apply(this, arguments);
};
}()),
})), 200);
}
// onBlur={async (e) => {
// const res = await onBlur(answer?.answer_text, index + 1, userAnswer)
// if (res.status === 1) {
// const newArr = saveStatusArr.slice()
// newArr[index] = { status: 'none', errorText: '' }
// setSaveStatusArr(newArr)
// } else {
// const newArr = saveStatusArr.slice()
// newArr[index] = { status: 'fail', errorText: res.message }
// setSaveStatusArr(newArr)
// }
// }}
,
className: "".concat(item.user_score && (item.user_score === item.question_score ? "c-green" : "c-red"), " ").concat(componentsmodules.fillInput)
})
}), ((_saveStatusArr$index = saveStatusArr[index]) === null || _saveStatusArr$index === void 0 ? void 0 : _saveStatusArr$index.status) === "success" && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
@ -1609,6 +1693,8 @@ var env = __webpack_require__(20817);
var lodash = __webpack_require__(89392);
// EXTERNAL MODULE: ./src/utils/constant.ts
var constant = __webpack_require__(23693);
// EXTERNAL MODULE: ./src/components/AsyncButton/index.tsx
var AsyncButton = __webpack_require__(6739);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/MisCollection/Practice/index.tsx
@ -1636,6 +1722,7 @@ var constant = __webpack_require__(23693);
var Countdown = statistic/* default */.Z.Countdown;
@ -2829,6 +2916,31 @@ var Answer = function Answer(_ref) {
return;
}
}
// if(answerData?.exercise_question_types[index]?.items[k]?.user_answer.length && (
// ([0,2,1]!answerData?.exercise_question_types[index]?.items[k]?.standard_answer_show )||
// !answerData?.exercise_question_types[index]?.items[k]?.standard_answer?.length ||
// !answerData?.exercise_question_types[index]?.items[k]?.standard_answer
// )){
// setShowConfirm(true);
// }else{
// setShowConfirm(false);
// }
// 如果上一题答完题未提交,则取消它的答题状态并且清空答题内容
if (showConfirm) {
setAnswerData(function (e) {
var _e$question_status;
e.exercise_question_types[oneindex].items[twoindex].user_answer = [];
e === null || e === void 0 || (_e$question_status = e.question_status) === null || _e$question_status === void 0 || _e$question_status.forEach(function (val) {
if (val.ques_id === currentQuestion.question_id && (val === null || val === void 0 ? void 0 : val.ques_status) === 1) {
val.ques_status = 0;
}
});
return e;
});
setShowConfirm(false);
}
setoneindex(index);
settwoindex(k);
var anchorName = "Anchor_".concat(key, "_").concat(k);
@ -3034,7 +3146,7 @@ var Answer = function Answer(_ref) {
children: [toChinesNum(oneindex + 1), "\u3001", answerData === null || answerData === void 0 || (_answerData$exercise_5 = answerData.exercise_question_types) === null || _answerData$exercise_5 === void 0 || (_answerData$exercise_5 = _answerData$exercise_5[oneindex]) === null || _answerData$exercise_5 === void 0 ? void 0 : _answerData$exercise_5.name]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: Practicemodules.questionTypeInfo,
children: ["\uFF08\u5171", answerData === null || answerData === void 0 || (_answerData$exercise_6 = answerData.exercise_question_types) === null || _answerData$exercise_6 === void 0 || (_answerData$exercise_6 = _answerData$exercise_6[oneindex]) === null || _answerData$exercise_6 === void 0 ? void 0 : _answerData$exercise_6.count, "\u9898\uFF1B", (answerData === null || answerData === void 0 || (_answerData$exercise_7 = answerData.exercise_question_types) === null || _answerData$exercise_7 === void 0 || (_answerData$exercise_7 = _answerData$exercise_7[oneindex]) === null || _answerData$exercise_7 === void 0 ? void 0 : _answerData$exercise_7.question_type) === 7 ? "\u5305\u542B".concat(answerData === null || answerData === void 0 || (_answerData$exercise_8 = answerData.exercise_question_types) === null || _answerData$exercise_8 === void 0 || (_answerData$exercise_8 = _answerData$exercise_8[oneindex]) === null || _answerData$exercise_8 === void 0 ? void 0 : _answerData$exercise_8.sub_questions_count, "\u5C0F\u9898") : '', "\uFF09 "]
children: ["\uFF08\u5171", answerData === null || answerData === void 0 || (_answerData$exercise_6 = answerData.exercise_question_types) === null || _answerData$exercise_6 === void 0 || (_answerData$exercise_6 = _answerData$exercise_6[oneindex]) === null || _answerData$exercise_6 === void 0 ? void 0 : _answerData$exercise_6.count, "\u9898 ", (answerData === null || answerData === void 0 || (_answerData$exercise_7 = answerData.exercise_question_types) === null || _answerData$exercise_7 === void 0 || (_answerData$exercise_7 = _answerData$exercise_7[oneindex]) === null || _answerData$exercise_7 === void 0 ? void 0 : _answerData$exercise_7.question_type) === 7 ? "\uFF1B\u5305\u542B".concat(answerData === null || answerData === void 0 || (_answerData$exercise_8 = answerData.exercise_question_types) === null || _answerData$exercise_8 === void 0 || (_answerData$exercise_8 = _answerData$exercise_8[oneindex]) === null || _answerData$exercise_8 === void 0 ? void 0 : _answerData$exercise_8.sub_questions_count, "\u5C0F\u9898") : '', "\uFF09 "]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
children: renderQuestion(answerData === null || answerData === void 0 || (_answerData$exercise_9 = answerData.exercise_question_types) === null || _answerData$exercise_9 === void 0 || (_answerData$exercise_9 = _answerData$exercise_9[oneindex]) === null || _answerData$exercise_9 === void 0 || (_answerData$exercise_9 = _answerData$exercise_9.items) === null || _answerData$exercise_9 === void 0 ? void 0 : _answerData$exercise_9[twoindex], twoindex)
@ -3065,7 +3177,7 @@ var Answer = function Answer(_ref) {
className: "".concat(Practicemodules.title, " ml10"),
children: answerData === null || answerData === void 0 || (_answerData$exercise4 = answerData.exercise) === null || _answerData$exercise4 === void 0 ? void 0 : _answerData$exercise4.exercise_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
className: Practicemodules.submitButton,
style: {
marginLeft: 30

@ -234,7 +234,10 @@ var MisCollection = function MisCollection(_ref) {
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-font icon-fanhui-bishe font12"
className: "icon-font icon-fanhui-bishe font12 current",
onClick: function onClick() {
_umi_production_exports.history.back();
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '16px',

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save