|
|
|
|
@ -18,12 +18,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
|
|
@ -36,13 +30,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
var _umi_production_exports = __webpack_require__(53156);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/Detail/Statistics/PracticeDetail/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var PracticeDetailmodules = ({"flex_box_center":"flex_box_center___ispni","flex_space_between":"flex_space_between___oFahK","flex_box_vertical_center":"flex_box_vertical_center___Gvv9d","flex_box_center_end":"flex_box_center_end___74s4S","flex_box_column":"flex_box_column___bEXcH","Onerow":"Onerow___wpdQ9","bg":"bg___cMcut","circularBlue":"circularBlue___ZqUpd","circularRed":"circularRed____yIMw","circularOrange":"circularOrange___rnEuo","circularGreen":"circularGreen___MgPXy","circularGrey":"circularGrey___TZspz","typeTitle":"typeTitle___oONVp","answerError":"answerError___rqa4N","greenBg":"greenBg___a0AHR","blueBg":"blueBg___oqrFa","redBg":"redBg___txmVB","orangeBg":"orangeBg___DkHDf","greyBg":"greyBg___xwEBl","questionsInfo":"questionsInfo___ckmSf"});
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
|
|
/* harmony default export */ var PracticeDetailmodules = ({"flex_box_center":"flex_box_center___ispni","flex_space_between":"flex_space_between___oFahK","flex_box_vertical_center":"flex_box_vertical_center___Gvv9d","flex_box_center_end":"flex_box_center_end___74s4S","flex_box_column":"flex_box_column___bEXcH","Onerow":"Onerow___wpdQ9","bg":"bg___cMcut","circularBlue":"circularBlue___ZqUpd","circularRed":"circularRed____yIMw","circularOrange":"circularOrange___rnEuo","circularGreen":"circularGreen___MgPXy","circularGrey":"circularGrey___TZspz","typeTitle":"typeTitle___oONVp","answerError":"answerError___rqa4N","greenBg":"greenBg___a0AHR","blueBg":"blueBg___oqrFa","redBg":"redBg___txmVB","orangeBg":"orangeBg___DkHDf","greyBg":"greyBg___xwEBl","questionsInfo":"questionsInfo___ckmSf","questionIcons":"questionIcons___h8rrM","grey":"grey___xgaEI","green":"green___mp_Xf","blue":"blue___i2cCi","orange":"orange___quvmm","red":"red___GxnoA"});
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
|
|
|
var row = __webpack_require__(95237);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
|
|
|
@ -63,6 +51,8 @@ var tooltip = __webpack_require__(6848);
|
|
|
|
|
var es_switch = __webpack_require__(78673);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
|
|
var table = __webpack_require__(52306);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
|
|
var RenderHtml = __webpack_require__(41464);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
|
|
@ -85,8 +75,6 @@ var Simple = __webpack_require__(1349);
|
|
|
|
|
var NewProgram = __webpack_require__(41568);
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.tsx + 1 modules
|
|
|
|
|
var AnswerComments = __webpack_require__(91426);
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/ScoreModal.tsx
|
|
|
|
|
var ScoreModal = __webpack_require__(40591);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
|
|
var util = __webpack_require__(25644);
|
|
|
|
|
// EXTERNAL MODULE: ./src/assets/images/icons/commented.png
|
|
|
|
|
@ -99,17 +87,17 @@ var incorrect = __webpack_require__(80866);
|
|
|
|
|
var correct = __webpack_require__(78773);
|
|
|
|
|
// EXTERNAL MODULE: ./src/assets/images/icons/partially-correct.png
|
|
|
|
|
var partially_correct = __webpack_require__(39532);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
|
|
var authority = __webpack_require__(82522);
|
|
|
|
|
// EXTERNAL MODULE: ./src/service/paths.ts
|
|
|
|
|
var paths = __webpack_require__(44011);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/hooks/useCustomRequest.ts
|
|
|
|
|
var useCustomRequest = __webpack_require__(51102);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/Detail/Statistics/PracticeDetail/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["user", "pathsDetail", "globalSetting", "loading", "dispatch"];
|
|
|
|
|
var _excluded = ["user", "pathsDetail", "globalSetting"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -167,8 +155,8 @@ var renderBadgeClass = function renderBadgeClass(item) {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var renderBadge = function renderBadge(item) {
|
|
|
|
|
if (item.question_type === 4) {
|
|
|
|
|
if (item.user_score) {
|
|
|
|
|
if ((item === null || item === void 0 ? void 0 : item.question_type) === 4) {
|
|
|
|
|
if (item !== null && item !== void 0 && item.user_score) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
src: commented
|
|
|
|
|
});
|
|
|
|
|
@ -177,11 +165,11 @@ var renderBadge = function renderBadge(item) {
|
|
|
|
|
src: not_commented
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else if (item.user_score === item.question_score) {
|
|
|
|
|
} else if ((item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score)) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
src: correct
|
|
|
|
|
});
|
|
|
|
|
} else if (item.user_score > 0) {
|
|
|
|
|
} else if ((item === null || item === void 0 ? void 0 : item.user_score) > 0) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
src: partially_correct
|
|
|
|
|
});
|
|
|
|
|
@ -192,99 +180,33 @@ var renderBadge = function renderBadge(item) {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var Statistics = function Statistics(_ref) {
|
|
|
|
|
var _ExerciseData$exercis3, _ExerciseData$exercis4, _ExerciseData$exercis5, _ExerciseData$exercis6, _ExerciseData$exercis7, _ExerciseData$exercis8, _ExerciseData$exercis9, _ExerciseData$exercis10, _ExerciseData$exercis11, _ExerciseData$exercis12, _ExerciseData$exercis13, _ExerciseData$exercis14, _ExerciseData$exercis15, _ExerciseData$exercis16, _ExerciseData$exercis17;
|
|
|
|
|
var user = _ref.user,
|
|
|
|
|
pathsDetail = _ref.pathsDetail,
|
|
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
|
|
loading = _ref.loading,
|
|
|
|
|
dispatch = _ref.dispatch,
|
|
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
|
|
var saveScore = (0,_react_17_0_2_react.useRef)(null);
|
|
|
|
|
var _useCustomRequest = (0,useCustomRequest/* useCustomRequest */.U)(paths/* getConsultExercise */.Do, {
|
|
|
|
|
practiceId: params === null || params === void 0 ? void 0 : params.practiceId,
|
|
|
|
|
user_id: params === null || params === void 0 ? void 0 : params.userId
|
|
|
|
|
}),
|
|
|
|
|
_useCustomRequest2 = slicedToArray_default()(_useCustomRequest, 4),
|
|
|
|
|
ExerciseLoading = _useCustomRequest2[1],
|
|
|
|
|
handleConsultExercise = _useCustomRequest2[2],
|
|
|
|
|
ExerciseData = _useCustomRequest2[3];
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
showIncorrect: false,
|
|
|
|
|
showsub: false
|
|
|
|
|
showsub: false,
|
|
|
|
|
AnswerOpen: false,
|
|
|
|
|
answer_record: [],
|
|
|
|
|
RecommendOpen: false,
|
|
|
|
|
recommend_item_banks: []
|
|
|
|
|
}),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
urlData = _useState2[0],
|
|
|
|
|
setUrlData = _useState2[1];
|
|
|
|
|
// 校验助教权限是否足够,若不够2s后返回试卷详情页面
|
|
|
|
|
var checkAssistant = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(0,authority/* isAssistant */.Rm)()) {
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context.abrupt("return", new Promise(function (resolve) {
|
|
|
|
|
message/* default */.ZP.warning("您未获得此权限,需向管理员申请权限才能使用此功能");
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
window.location.href = document.referrer;
|
|
|
|
|
}, 2000);
|
|
|
|
|
}));
|
|
|
|
|
case 2:
|
|
|
|
|
return _context.abrupt("return", true);
|
|
|
|
|
case 3:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function checkAssistant() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleChangeScore = function handleChangeScore(item) {
|
|
|
|
|
if (item.question_type > 1 && item.question_type !== 5 && item.question_type !== 2) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
checkAssistant().then(function () {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
title: "调分",
|
|
|
|
|
icon: null,
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var sV;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return saveScore.current.onSave();
|
|
|
|
|
case 2:
|
|
|
|
|
sV = _context2.sent;
|
|
|
|
|
case 3:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}(),
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ScoreModal/* default */.Z, {
|
|
|
|
|
ref: saveScore,
|
|
|
|
|
item: item
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
className: "c-blue mr10 ml10 current",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
size: "small",
|
|
|
|
|
ghost: true,
|
|
|
|
|
children: "\u8C03\u5206"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var renderQuestion = function renderQuestion(item, i) {
|
|
|
|
|
var _item$question_choice, _item$question_choice2, _item$question_choice3, _item$sub_exercise_qu, _item$question_choice4, _item$user_answer2, _item$user_score, _item$user_score2, _item$question_score, _item$question_score2;
|
|
|
|
|
var _item$user_answer, _item$question_choice, _item$question_choice2, _item$user_answer2, _item$question_choice3, _item$answer_record, _item$recommend_item_, _item$sub_exercise_qu, _item$question_choice4, _item$user_answer4, _item$answer_record2, _item$recommend_item_2, _ref2, _ref3, _ref4, _ref5;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
@ -332,7 +254,7 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: [
|
|
|
|
|
// 单选题
|
|
|
|
|
item.question_type === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
|
|
|
value: item.user_answer,
|
|
|
|
|
value: (_item$user_answer = item.user_answer) === null || _item$user_answer === void 0 ? void 0 : _item$user_answer[0],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(space/* default */.Z, {
|
|
|
|
|
direction: "vertical",
|
|
|
|
|
children: (_item$question_choice = item.question_choices) === null || _item$question_choice === void 0 ? void 0 : _item$question_choice.map(function (val, index) {
|
|
|
|
|
@ -348,10 +270,11 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
}),
|
|
|
|
|
// 多选题
|
|
|
|
|
item.question_type === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z.Group, {
|
|
|
|
|
value: item.user_answer,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(space/* default */.Z, {
|
|
|
|
|
direction: "vertical",
|
|
|
|
|
children: (_item$question_choice2 = item.question_choices) === null || _item$question_choice2 === void 0 ? void 0 : _item$question_choice2.map(function (val, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
className: item.user_answer.includes(val.choice_id) && item.question_score !== item.user_score ? PracticeDetailmodules.answerError : "",
|
|
|
|
|
value: val.choice_id,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
@ -363,7 +286,7 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
}),
|
|
|
|
|
// 判断题
|
|
|
|
|
item.question_type === 2 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
|
|
|
value: item.user_answer,
|
|
|
|
|
value: (_item$user_answer2 = item.user_answer) === null || _item$user_answer2 === void 0 ? void 0 : _item$user_answer2[0],
|
|
|
|
|
children: (_item$question_choice3 = item.question_choices) === null || _item$question_choice3 === void 0 ? void 0 : _item$question_choice3.map(function (val, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
value: val.choice_id,
|
|
|
|
|
@ -376,53 +299,66 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
//填空题
|
|
|
|
|
item.question_type === 3 && /*#__PURE__*/(0,jsx_runtime.jsx)(Fill/* default */.Z, {
|
|
|
|
|
item: item,
|
|
|
|
|
answerData: [],
|
|
|
|
|
answerData: ExerciseData,
|
|
|
|
|
changeScoreData: [],
|
|
|
|
|
textValue: "",
|
|
|
|
|
textOnChange: function textOnChange(value) {
|
|
|
|
|
// changeScoreData[item.q_position].text = value
|
|
|
|
|
// setChangeScoreData({ ...changeScoreData })
|
|
|
|
|
}
|
|
|
|
|
textOnChange: function textOnChange(value) {},
|
|
|
|
|
extra: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [(item === null || item === void 0 || (_item$answer_record = item.answer_record) === null || _item$answer_record === void 0 ? void 0 : _item$answer_record.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-blue ml20 current",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
AnswerOpen: true,
|
|
|
|
|
answer_record: (item === null || item === void 0 ? void 0 : item.answer_record) || []
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: " \u67E5\u770B\u4F5C\u7B54\u8BB0\u5F55"
|
|
|
|
|
}), (item === null || item === void 0 || (_item$recommend_item_ = item.recommend_item_banks) === null || _item$recommend_item_ === void 0 ? void 0 : _item$recommend_item_.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-blue ml10 current",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
RecommendOpen: true,
|
|
|
|
|
recommend_item_banks: (item === null || item === void 0 ? void 0 : item.recommend_item_banks) || []
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: "\u63A8\u8350\u9898\u76EE\u4F5C\u7B54\u8BE6\u60C5"
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}),
|
|
|
|
|
//程序填空题
|
|
|
|
|
item.question_type === 8 && /*#__PURE__*/(0,jsx_runtime.jsx)(BFill/* default */.Z, {
|
|
|
|
|
item: item,
|
|
|
|
|
answerData: [],
|
|
|
|
|
answerData: ExerciseData,
|
|
|
|
|
changeScoreData: [],
|
|
|
|
|
textValue: "",
|
|
|
|
|
textOnChange: function textOnChange(value) {
|
|
|
|
|
// changeScoreData[item.q_position].text = value
|
|
|
|
|
// setChangeScoreData({ ...changeScoreData })
|
|
|
|
|
}
|
|
|
|
|
textOnChange: function textOnChange(value) {}
|
|
|
|
|
}),
|
|
|
|
|
//实训题
|
|
|
|
|
item.question_type === 5 && /*#__PURE__*/(0,jsx_runtime.jsx)(NewShixun/* default */.Z, {
|
|
|
|
|
item: item,
|
|
|
|
|
answerData: [],
|
|
|
|
|
answerData: ExerciseData,
|
|
|
|
|
coursesId: params.coursesId
|
|
|
|
|
// saveChangeScore={[]}
|
|
|
|
|
,
|
|
|
|
|
hasChangeScore: false,
|
|
|
|
|
sealedReview: true
|
|
|
|
|
}),
|
|
|
|
|
//简答题
|
|
|
|
|
item.question_type === 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(Simple/* default */.Z, {
|
|
|
|
|
item: item,
|
|
|
|
|
answerData: [],
|
|
|
|
|
answerData: ExerciseData,
|
|
|
|
|
changeScoreData: [],
|
|
|
|
|
textValue: "",
|
|
|
|
|
textOnChange: function textOnChange(value) {
|
|
|
|
|
// changeScoreData[item.q_position].text = value
|
|
|
|
|
// setChangeScoreData({ ...changeScoreData })
|
|
|
|
|
}
|
|
|
|
|
textOnChange: function textOnChange(value) {}
|
|
|
|
|
}),
|
|
|
|
|
//编程题
|
|
|
|
|
item.question_type === 6 && /*#__PURE__*/(0,jsx_runtime.jsx)(NewProgram/* default */.Z, {
|
|
|
|
|
item: item,
|
|
|
|
|
answerData: []
|
|
|
|
|
answerData: ExerciseData
|
|
|
|
|
}),
|
|
|
|
|
//组合题
|
|
|
|
|
item.question_type === 7 && (item === null || item === void 0 || (_item$sub_exercise_qu = item.sub_exercise_questions) === null || _item$sub_exercise_qu === void 0 ? void 0 : _item$sub_exercise_qu.map(function (jte, jndex) {
|
|
|
|
|
var _jte$question_choices, _jte$question_choices2, _jte$user_answer2;
|
|
|
|
|
var _jte$user_answer, _jte$question_choices, _jte$question_choices2, _jte$user_answer3, _jte$answer_record, _jte$recommend_item_b;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -432,8 +368,8 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: [i + 1 + '.' + (jndex + 1), "\uFF08\u5355\u9009\u9898\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
value: jte.question_title + "\uFF08".concat(jte === null || jte === void 0 ? void 0 : jte.question_score, "\u5206\uFF09")
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
|
|
|
value: jte.user_answer,
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
|
|
|
value: (_jte$user_answer = jte.user_answer) === null || _jte$user_answer === void 0 ? void 0 : _jte$user_answer[0],
|
|
|
|
|
children: (_jte$question_choices = jte.question_choices) === null || _jte$question_choices === void 0 ? void 0 : _jte$question_choices.map(function (val, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
value: val.choice_id,
|
|
|
|
|
@ -453,11 +389,29 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: ["\u5B66\u751F\u7B54\u6848\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-blue",
|
|
|
|
|
children: [(_jte$question_choices2 = jte.question_choices) === null || _jte$question_choices2 === void 0 || (_jte$question_choices2 = _jte$question_choices2.filter(function (i) {
|
|
|
|
|
var _jte$user_answer;
|
|
|
|
|
return (_jte$user_answer = jte.user_answer) === null || _jte$user_answer === void 0 ? void 0 : _jte$user_answer.includes(i.choice_id);
|
|
|
|
|
var _jte$user_answer2;
|
|
|
|
|
return (_jte$user_answer2 = jte.user_answer) === null || _jte$user_answer2 === void 0 ? void 0 : _jte$user_answer2.includes(i.choice_id);
|
|
|
|
|
})) === null || _jte$question_choices2 === void 0 ? void 0 : _jte$question_choices2.map(function (i, key) {
|
|
|
|
|
return item.question_type === 2 ? util/* JudgeSort */.Qq[i.choice_position - 1] : util/* ZimuSort */.oV[i.choice_position - 1];
|
|
|
|
|
}), ((_jte$user_answer2 = jte.user_answer) === null || _jte$user_answer2 === void 0 ? void 0 : _jte$user_answer2.length) <= 0 && '未答']
|
|
|
|
|
}), ((_jte$user_answer3 = jte.user_answer) === null || _jte$user_answer3 === void 0 ? void 0 : _jte$user_answer3.length) <= 0 && '未答', (jte === null || jte === void 0 || (_jte$answer_record = jte.answer_record) === null || _jte$answer_record === void 0 ? void 0 : _jte$answer_record.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-blue ml20 current",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
AnswerOpen: true,
|
|
|
|
|
answer_record: (jte === null || jte === void 0 ? void 0 : jte.answer_record) || []
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: " \u67E5\u770B\u4F5C\u7B54\u8BB0\u5F55"
|
|
|
|
|
}), (jte === null || jte === void 0 || (_jte$recommend_item_b = jte.recommend_item_banks) === null || _jte$recommend_item_b === void 0 ? void 0 : _jte$recommend_item_b.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-blue ml10 current",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
RecommendOpen: true,
|
|
|
|
|
recommend_item_banks: (jte === null || jte === void 0 ? void 0 : jte.recommend_item_banks) || []
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: "\u63A8\u8350\u9898\u76EE\u4F5C\u7B54\u8BE6\u60C5"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), jte.standard_answer_show && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "mr5",
|
|
|
|
|
@ -484,11 +438,29 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: ["\u5B66\u751F\u7B54\u6848\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-blue",
|
|
|
|
|
children: [(_item$question_choice4 = item.question_choices) === null || _item$question_choice4 === void 0 || (_item$question_choice4 = _item$question_choice4.filter(function (i) {
|
|
|
|
|
var _item$user_answer;
|
|
|
|
|
return (_item$user_answer = item.user_answer) === null || _item$user_answer === void 0 ? void 0 : _item$user_answer.includes(i.choice_id);
|
|
|
|
|
var _item$user_answer3;
|
|
|
|
|
return (_item$user_answer3 = item.user_answer) === null || _item$user_answer3 === void 0 ? void 0 : _item$user_answer3.includes(i.choice_id);
|
|
|
|
|
})) === null || _item$question_choice4 === void 0 ? void 0 : _item$question_choice4.map(function (i, key) {
|
|
|
|
|
return item.question_type === 2 ? util/* JudgeSort */.Qq[i.choice_position - 1] : util/* ZimuSort */.oV[i.choice_position - 1];
|
|
|
|
|
}), ((_item$user_answer2 = item.user_answer) === null || _item$user_answer2 === void 0 ? void 0 : _item$user_answer2.length) <= 0 && '未答']
|
|
|
|
|
}), ((_item$user_answer4 = item.user_answer) === null || _item$user_answer4 === void 0 ? void 0 : _item$user_answer4.length) <= 0 && '未答', (item === null || item === void 0 || (_item$answer_record2 = item.answer_record) === null || _item$answer_record2 === void 0 ? void 0 : _item$answer_record2.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-blue ml20 current",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
AnswerOpen: true,
|
|
|
|
|
answer_record: (item === null || item === void 0 ? void 0 : item.answer_record) || []
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: " \u67E5\u770B\u4F5C\u7B54\u8BB0\u5F55"
|
|
|
|
|
}), (item === null || item === void 0 || (_item$recommend_item_2 = item.recommend_item_banks) === null || _item$recommend_item_2 === void 0 ? void 0 : _item$recommend_item_2.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-blue ml10 current",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
RecommendOpen: true,
|
|
|
|
|
recommend_item_banks: (item === null || item === void 0 ? void 0 : item.recommend_item_banks) || []
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: "\u63A8\u8350\u9898\u76EE\u4F5C\u7B54\u8BE6\u60C5"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), item.standard_answer_show && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "mr5",
|
|
|
|
|
@ -518,15 +490,18 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: renderTextClass(item),
|
|
|
|
|
children: item.user_score === null ? '--' : item !== null && item !== void 0 && (_item$user_score = item.user_score) !== null && _item$user_score !== void 0 && _item$user_score.includes('.0') ? item === null || item === void 0 || (_item$user_score2 = item.user_score) === null || _item$user_score2 === void 0 ? void 0 : _item$user_score2.replace('.0', '') : item.user_score
|
|
|
|
|
}), "\xA0/\xA0", (item === null || item === void 0 ? void 0 : item.question_score) === null ? '--' : item !== null && item !== void 0 && (_item$question_score = item.question_score) !== null && _item$question_score !== void 0 && _item$question_score.includes('.0') ? item === null || item === void 0 || (_item$question_score2 = item.question_score) === null || _item$question_score2 === void 0 ? void 0 : _item$question_score2.replace('.0', '') : item.question_score]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), (item === null || item === void 0 ? void 0 : item.question_type) != 7 && handleChangeScore(item)]
|
|
|
|
|
children: (item === null || item === void 0 ? void 0 : item.user_score) === null ? '--' : (_ref2 = (item === null || item === void 0 ? void 0 : item.user_score) || "") !== null && _ref2 !== void 0 && _ref2.includes('.0') ? (_ref3 = (item === null || item === void 0 ? void 0 : item.user_score) || "") === null || _ref3 === void 0 ? void 0 : _ref3.replace('.0', '') : item === null || item === void 0 ? void 0 : item.user_score
|
|
|
|
|
}), " \xA0/\xA0", (item === null || item === void 0 ? void 0 : item.question_score) === null ? '--' : (_ref4 = (item === null || item === void 0 ? void 0 : item.question_score) || "") !== null && _ref4 !== void 0 && _ref4.includes('.0') ? (_ref5 = (item === null || item === void 0 ? void 0 : item.question_score) || "") === null || _ref5 === void 0 ? void 0 : _ref5.replace('.0', '') : item === null || item === void 0 ? void 0 : item.question_score]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var renderClassifyQuestion = function renderClassifyQuestion(bool) {
|
|
|
|
|
var array = [];
|
|
|
|
|
var _ExerciseData$exercis;
|
|
|
|
|
var array = ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis = ExerciseData.exercise_question_types) === null || _ExerciseData$exercis === void 0 ? void 0 : _ExerciseData$exercis.filter(function (item) {
|
|
|
|
|
return bool ? item.question_type === 4 : item.question_type !== 4;
|
|
|
|
|
});
|
|
|
|
|
var dom = array === null || array === void 0 ? void 0 : array.map(function (er, index) {
|
|
|
|
|
var _er$items;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -580,7 +555,10 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
return dom;
|
|
|
|
|
};
|
|
|
|
|
var renderClassifyIndex = function renderClassifyIndex(bool) {
|
|
|
|
|
var array = [];
|
|
|
|
|
var _ExerciseData$exercis2;
|
|
|
|
|
var array = ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis2 = ExerciseData.exercise_question_types) === null || _ExerciseData$exercis2 === void 0 ? void 0 : _ExerciseData$exercis2.filter(function (item) {
|
|
|
|
|
return bool ? item.question_type === 4 : item.question_type !== 4;
|
|
|
|
|
});
|
|
|
|
|
var dom = array === null || array === void 0 ? void 0 : array.map(function (item, itemIndex) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
@ -611,13 +589,11 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: className,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
// checkAssistant().then(() => {
|
|
|
|
|
var anchorName = er.question_id;
|
|
|
|
|
var anchorElement = document.getElementById(anchorName);
|
|
|
|
|
if (anchorElement) {
|
|
|
|
|
window.scrollTo(0, anchorElement.offsetTop);
|
|
|
|
|
}
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
children: i + 1
|
|
|
|
|
});
|
|
|
|
|
@ -627,10 +603,10 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
return dom;
|
|
|
|
|
};
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
console.log("params", params);
|
|
|
|
|
}, [params]);
|
|
|
|
|
handleConsultExercise({});
|
|
|
|
|
}, []);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
|
|
spinning: false,
|
|
|
|
|
spinning: ExerciseLoading,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
|
|
className: PracticeDetailmodules.bg,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
@ -641,18 +617,18 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: "284px",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "font20 c-grey-333",
|
|
|
|
|
children: "\u57FA\u7840\u7EC3\u4E60\u9898\u5E93"
|
|
|
|
|
className: "font20 c-grey-333 multi_ellipsis1",
|
|
|
|
|
children: ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis3 = ExerciseData.exercise) === null || _ExerciseData$exercis3 === void 0 ? void 0 : _ExerciseData$exercis3.exercise_name
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: 1,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: "\u5408\u8BA125\u9053"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: "\u6EE1\u5206100\u5206"
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: ["\u5408\u8BA1", ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis4 = ExerciseData.exercise_scores) === null || _ExerciseData$exercis4 === void 0 || (_ExerciseData$exercis4 = _ExerciseData$exercis4.exercise_types) === null || _ExerciseData$exercis4 === void 0 ? void 0 : _ExerciseData$exercis4.q_counts, "\u9053"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: ["\u6EE1\u5206", ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis5 = ExerciseData.exercise_scores) === null || _ExerciseData$exercis5 === void 0 || (_ExerciseData$exercis5 = _ExerciseData$exercis5.exercise_types) === null || _ExerciseData$exercis5 === void 0 ? void 0 : _ExerciseData$exercis5.q_scores, "\u5206"]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
@ -670,7 +646,7 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 68,
|
|
|
|
|
src: env/* default */.Z.API_SERVER + '/images/'
|
|
|
|
|
src: env/* default */.Z.API_SERVER + '/images/' + (ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis6 = ExerciseData.exercise_answer_user) === null || _ExerciseData$exercis6 === void 0 ? void 0 : _ExerciseData$exercis6.user_img)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
@ -681,13 +657,10 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: [{
|
|
|
|
|
title: "姓名",
|
|
|
|
|
value: "姓名姓名姓名姓名姓名姓名姓名姓名姓名姓名姓名"
|
|
|
|
|
value: ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis7 = ExerciseData.exercise_answer_user) === null || _ExerciseData$exercis7 === void 0 ? void 0 : _ExerciseData$exercis7.user_name
|
|
|
|
|
}, {
|
|
|
|
|
title: "学号",
|
|
|
|
|
value: "姓名姓名姓名姓名姓名姓名姓名姓名姓名"
|
|
|
|
|
}, {
|
|
|
|
|
title: "分班",
|
|
|
|
|
value: "姓名姓名姓名姓名姓名姓名姓名姓名姓名姓名姓名姓名"
|
|
|
|
|
value: ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis8 = ExerciseData.exercise_answer_user) === null || _ExerciseData$exercis8 === void 0 ? void 0 : _ExerciseData$exercis8.student_id
|
|
|
|
|
}].map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "topLeft",
|
|
|
|
|
@ -717,7 +690,7 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
top: -2,
|
|
|
|
|
right: -2
|
|
|
|
|
},
|
|
|
|
|
src: true ? finish_namespaceObject : 0
|
|
|
|
|
src: (ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis9 = ExerciseData.exercise) === null || _ExerciseData$exercis9 === void 0 ? void 0 : _ExerciseData$exercis9.answer_total_count) == (ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis10 = ExerciseData.exercise_scores) === null || _ExerciseData$exercis10 === void 0 || (_ExerciseData$exercis10 = _ExerciseData$exercis10.exercise_types) === null || _ExerciseData$exercis10 === void 0 ? void 0 : _ExerciseData$exercis10.q_counts) ? finish_namespaceObject : nofinish_namespaceObject
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "bg-white p20 mt20",
|
|
|
|
|
@ -765,23 +738,11 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u9519\u8BEF"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "".concat(PracticeDetailmodules.circularOrange)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u90E8\u5206\u5F97\u5206"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "".concat(PracticeDetailmodules.circularGreen)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u5DF2\u8BC4"
|
|
|
|
|
}), " "]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "".concat(PracticeDetailmodules.circularGrey)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u672A\u8BC4"
|
|
|
|
|
children: "\u672A\u7B54"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
@ -794,7 +755,9 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
className: PracticeDetailmodules.questionIcons,
|
|
|
|
|
children: renderClassifyIndex()
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
|
|
}), (ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis11 = ExerciseData.exercise_question_types) === null || _ExerciseData$exercis11 === void 0 ? void 0 : _ExerciseData$exercis11.some(function (e) {
|
|
|
|
|
return e.question_type === 4;
|
|
|
|
|
})) && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
|
|
className: "bg-white p20 mt10 pr10",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", {
|
|
|
|
|
className: "c-blue",
|
|
|
|
|
@ -814,28 +777,30 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
pagination: false,
|
|
|
|
|
columns: [{
|
|
|
|
|
title: '题型数量',
|
|
|
|
|
dataIndex: 'index',
|
|
|
|
|
title: '刷题数量',
|
|
|
|
|
dataIndex: 'answer_total_count',
|
|
|
|
|
align: "center"
|
|
|
|
|
}, {
|
|
|
|
|
title: '正确数量',
|
|
|
|
|
dataIndex: 'index',
|
|
|
|
|
dataIndex: 'right_count',
|
|
|
|
|
align: "center"
|
|
|
|
|
}, {
|
|
|
|
|
title: '错误数量',
|
|
|
|
|
dataIndex: 'index',
|
|
|
|
|
dataIndex: 'error_count',
|
|
|
|
|
align: "center"
|
|
|
|
|
}, {
|
|
|
|
|
title: '得分',
|
|
|
|
|
dataIndex: 'index',
|
|
|
|
|
dataIndex: 'user_score',
|
|
|
|
|
align: "center"
|
|
|
|
|
}, {
|
|
|
|
|
title: '最近练习时间',
|
|
|
|
|
dataIndex: 'index',
|
|
|
|
|
dataIndex: 'subject_exercise_time',
|
|
|
|
|
align: "center"
|
|
|
|
|
}],
|
|
|
|
|
dataSource: [{}]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
dataSource: ExerciseData ? [ExerciseData] : []
|
|
|
|
|
}), (ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis12 = ExerciseData.exercise_question_types) === null || _ExerciseData$exercis12 === void 0 ? void 0 : _ExerciseData$exercis12.some(function (item) {
|
|
|
|
|
return item.question_type !== 4;
|
|
|
|
|
})) && !(urlData !== null && urlData !== void 0 && urlData.showsub) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: PracticeDetailmodules.typeTitle,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
@ -845,21 +810,23 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
|
|
className: "font20",
|
|
|
|
|
children: "\u5BA2\u89C2\u9898"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-666",
|
|
|
|
|
children: "\uFF08\u5408\u8BA10\u5206\uFF09"
|
|
|
|
|
children: ["\uFF08\u5408\u8BA1", ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis13 = ExerciseData.exercise) === null || _ExerciseData$exercis13 === void 0 ? void 0 : _ExerciseData$exercis13.objective_score, "\u5206\uFF09"]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-666",
|
|
|
|
|
children: "\u603B\u5F97\u5206:0"
|
|
|
|
|
children: ["\u603B\u5F97\u5206:", ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis14 = ExerciseData.exercise_answer_user) === null || _ExerciseData$exercis14 === void 0 ? void 0 : _ExerciseData$exercis14.objective_score]
|
|
|
|
|
}), " "]
|
|
|
|
|
})]
|
|
|
|
|
}), !(urlData !== null && urlData !== void 0 && urlData.showsub) && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
|
|
className: "pl30 pr10",
|
|
|
|
|
children: renderClassifyQuestion()
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
}), (ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis15 = ExerciseData.exercise_question_types) === null || _ExerciseData$exercis15 === void 0 ? void 0 : _ExerciseData$exercis15.some(function (item) {
|
|
|
|
|
return item.question_type === 4;
|
|
|
|
|
})) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: PracticeDetailmodules.typeTitle,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
@ -869,15 +836,15 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
|
|
className: "font20",
|
|
|
|
|
children: "\u4E3B\u89C2\u9898"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-666",
|
|
|
|
|
children: "\uFF08\u5408\u8BA10\u5206\uFF09"
|
|
|
|
|
children: ["\uFF08\u5408\u8BA1", ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis16 = ExerciseData.exercise) === null || _ExerciseData$exercis16 === void 0 ? void 0 : _ExerciseData$exercis16.subjective_score, "\u5206\uFF09"]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-666",
|
|
|
|
|
children: "\u603B\u5F97\u5206:0"
|
|
|
|
|
children: ["\u603B\u5F97\u5206:", ExerciseData === null || ExerciseData === void 0 || (_ExerciseData$exercis17 = ExerciseData.exercise_answer_user) === null || _ExerciseData$exercis17 === void 0 ? void 0 : _ExerciseData$exercis17.subjective_score]
|
|
|
|
|
}), " "]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
|
|
@ -887,22 +854,129 @@ var Statistics = function Statistics(_ref) {
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
|
|
title: "作答记录",
|
|
|
|
|
open: urlData === null || urlData === void 0 ? void 0 : urlData.AnswerOpen,
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
centered: true,
|
|
|
|
|
width: 604,
|
|
|
|
|
footer: null,
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
AnswerOpen: false,
|
|
|
|
|
answer_record: []
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
pagination: false,
|
|
|
|
|
scroll: {
|
|
|
|
|
y: 240
|
|
|
|
|
},
|
|
|
|
|
columns: [{
|
|
|
|
|
title: '序号',
|
|
|
|
|
dataIndex: 'position',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
title: '提交内容',
|
|
|
|
|
dataIndex: 'answer_content',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '提交时间',
|
|
|
|
|
dataIndex: 'created_at',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}],
|
|
|
|
|
dataSource: (urlData === null || urlData === void 0 ? void 0 : urlData.answer_record) || []
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var PracticeDetail = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
var user = _ref3.user,
|
|
|
|
|
pathsDetail = _ref3.pathsDetail,
|
|
|
|
|
loading = _ref3.loading,
|
|
|
|
|
globalSetting = _ref3.globalSetting;
|
|
|
|
|
/* harmony default export */ var PracticeDetail = ((0,_umi_production_exports.connect)(function (_ref6) {
|
|
|
|
|
var user = _ref6.user,
|
|
|
|
|
pathsDetail = _ref6.pathsDetail,
|
|
|
|
|
globalSetting = _ref6.globalSetting;
|
|
|
|
|
return {
|
|
|
|
|
user: user,
|
|
|
|
|
pathsDetail: pathsDetail,
|
|
|
|
|
globalSetting: globalSetting,
|
|
|
|
|
loading: loading
|
|
|
|
|
globalSetting: globalSetting
|
|
|
|
|
};
|
|
|
|
|
})(Statistics));
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 51102:
|
|
|
|
|
/*!*********************************************!*\
|
|
|
|
|
!*** ./src/utils/hooks/useCustomRequest.ts ***!
|
|
|
|
|
\*********************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
/* harmony export */ U: function() { return /* binding */ useCustomRequest; }
|
|
|
|
|
/* harmony export */ });
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_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_test1_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_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_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_test1_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_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//常见的请求模式,包含loading和改变params。
|
|
|
|
|
|
|
|
|
|
function useCustomRequest(request, baseParams) {
|
|
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(baseParams),
|
|
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
|
|
|
|
params = _useState2[0],
|
|
|
|
|
setParams = _useState2[1];
|
|
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(false),
|
|
|
|
|
_useState4 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState3, 2),
|
|
|
|
|
loading = _useState4[0],
|
|
|
|
|
setLoading = _useState4[1];
|
|
|
|
|
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(),
|
|
|
|
|
_useState6 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState5, 2),
|
|
|
|
|
data = _useState6[0],
|
|
|
|
|
setData = _useState6[1];
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(newParams) {
|
|
|
|
|
var reset,
|
|
|
|
|
mergedParams,
|
|
|
|
|
res,
|
|
|
|
|
_args = arguments;
|
|
|
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
reset = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
|
|
|
|
|
mergedParams = reset ? baseParams : _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params), newParams);
|
|
|
|
|
setLoading(true);
|
|
|
|
|
setParams(mergedParams);
|
|
|
|
|
_context.next = 6;
|
|
|
|
|
return request(mergedParams);
|
|
|
|
|
case 6:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
setLoading(false);
|
|
|
|
|
setData(res);
|
|
|
|
|
return _context.abrupt("return", res);
|
|
|
|
|
case 10:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getData(_x) {
|
|
|
|
|
return _ref.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
return [params, loading, getData, data];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 28103:
|