|
|
|
|
@ -7360,7 +7360,7 @@ var shixuns = __webpack_require__(33329);
|
|
|
|
|
var verifyLogin = __webpack_require__(10283);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/StatisticsResult/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var StatisticsResultmodules = ({"wrap":"wrap___qnbj2","refresh":"refresh___Ms2GV","maxWidth70":"maxWidth70___JWmcI","maxWidth80":"maxWidth80___c0rfQ","maxWidth100":"maxWidth100___ugiOX","maxWidth110":"maxWidth110___UYHb9","maxWidth120":"maxWidth120___Mm7ol","reviewStatusTooltip":"reviewStatusTooltip___AE48u","color32C":"color32C___u35zG","MdEditor":"MdEditor___SHPEm","tr1":"tr1___h_jEQ","scroll":"scroll___h2_H5"});
|
|
|
|
|
/* harmony default export */ var StatisticsResultmodules = ({"wrap":"wrap___qnbj2","title":"title___i2F74"});
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/StatisticsResult/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -7374,6 +7374,9 @@ var verifyLogin = __webpack_require__(10283);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var StatisticsResult_WorkList = function WorkList(_ref) {
|
|
|
|
|
var _workList$course_grou, _workList$course_grou2;
|
|
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
|
|
@ -7381,7 +7384,8 @@ var StatisticsResult_WorkList = function WorkList(_ref) {
|
|
|
|
|
dispatch = _ref.dispatch,
|
|
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
|
|
classroomList = _ref.classroomList,
|
|
|
|
|
user = _ref.user;
|
|
|
|
|
user = _ref.user,
|
|
|
|
|
activeTabs = _ref.activeTabs;
|
|
|
|
|
var urlParmas = (0,_umi_production_exports.useParams)();
|
|
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
|
|
@ -7398,95 +7402,218 @@ var StatisticsResult_WorkList = function WorkList(_ref) {
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
showopen = _useState6[0],
|
|
|
|
|
setshowopen = _useState6[1];
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
tableData = _useState8[0],
|
|
|
|
|
setTableData = _useState8[1];
|
|
|
|
|
var columns = [{
|
|
|
|
|
title: '作业总分',
|
|
|
|
|
dataIndex: 'homework_score',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '应做人数',
|
|
|
|
|
dataIndex: 'student_total_num',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '实做人数',
|
|
|
|
|
dataIndex: 'student_joined_num',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '参加率',
|
|
|
|
|
dataIndex: 'joined_rate',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '平均成绩',
|
|
|
|
|
dataIndex: 'average_score',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '最高成绩',
|
|
|
|
|
dataIndex: 'student_max_score',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '学习频次',
|
|
|
|
|
dataIndex: 'study_num',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '实验通过率',
|
|
|
|
|
dataIndex: 'homework_pass_rate',
|
|
|
|
|
ellipsis: true
|
|
|
|
|
}];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
var _res$student_works;
|
|
|
|
|
var res = JSON.parse(JSON.stringify(shixunHomeworks.workList));
|
|
|
|
|
if (!(res !== null && res !== void 0 && (_res$student_works = res.student_works) !== null && _res$student_works !== void 0 && _res$student_works.length) && res !== null && res !== void 0 && res.id) {
|
|
|
|
|
res.student_works = [objectSpread2_default()({}, res)];
|
|
|
|
|
setWorkList(res);
|
|
|
|
|
} else {
|
|
|
|
|
setWorkList(objectSpread2_default()({}, res));
|
|
|
|
|
}
|
|
|
|
|
}, [shixunHomeworks.workList]);
|
|
|
|
|
var getData = function getData(bool) {};
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (activeTabs === '5') {
|
|
|
|
|
getData();
|
|
|
|
|
}
|
|
|
|
|
}, [activeTabs]);
|
|
|
|
|
var onHandleChange = function onHandleChange() {
|
|
|
|
|
getData();
|
|
|
|
|
};
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
|
|
className: "".concat(StatisticsResultmodules.wrap, " minH500 bg-white pl30 pr30 pt30"),
|
|
|
|
|
children: (0,authority/* isAdmin */.GJ)() && ((_workList$course_grou = workList.course_group_info) === null || _workList$course_grou === void 0 ? void 0 : _workList$course_grou.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
|
|
|
form: form,
|
|
|
|
|
onChange: onHandleChange,
|
|
|
|
|
initialValues: defineProperty_default()({}, 'course_group_info', 'all'),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "course_group_info",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z.Group, {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%'
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
className: "font14",
|
|
|
|
|
flex: '80px',
|
|
|
|
|
children: "\u5206\u73ED\u60C5\u51B5:"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: '80px',
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
value: "all",
|
|
|
|
|
children: "\u5168\u90E8"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: '1',
|
|
|
|
|
id: "divhe",
|
|
|
|
|
style: {
|
|
|
|
|
height: open + 'px',
|
|
|
|
|
overflow: 'hidden'
|
|
|
|
|
},
|
|
|
|
|
children: (_workList$course_grou2 = workList.course_group_info) === null || _workList$course_grou2 === void 0 ? void 0 : _workList$course_grou2.map(function (v, k) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
|
|
|
|
|
value: v.course_group_id,
|
|
|
|
|
children: [v.group_group_name, "(", v.count, ")"]
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}), showopen && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var height = document.getElementById('divhe').scrollHeight;
|
|
|
|
|
if (open > 47) {
|
|
|
|
|
setopen(47);
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var formValue, course_group_ids, res, _res$data;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
formValue = Object.assign({}, form.getFieldValue());
|
|
|
|
|
Object.keys(formValue).map(function (v) {
|
|
|
|
|
switch (v) {
|
|
|
|
|
case 'course_group_ids':
|
|
|
|
|
if (formValue[v].includes('all') || !formValue[v].length) {
|
|
|
|
|
form.setFieldsValue(defineProperty_default()({}, 'course_group_ids', 'all'));
|
|
|
|
|
} else {
|
|
|
|
|
setopen(height);
|
|
|
|
|
form.setFieldsValue(defineProperty_default()({}, 'course_group_ids', formValue[v]));
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
color: 'rgb(76, 172, 255)',
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
alignItems: 'flex-end',
|
|
|
|
|
display: 'flex'
|
|
|
|
|
},
|
|
|
|
|
children: [open === 47 ? '展开' : '收起', open === 47 ? /*#__PURE__*/(0,jsx_runtime.jsx)(DownOutlined/* default */.Z, {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
course_group_ids = form.getFieldValue('course_group_ids');
|
|
|
|
|
_context.next = 5;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/homework_commons/".concat(urlParmas.categoryId, "/practice_statistics.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
course_group_ids: course_group_ids == 'all' ? null : course_group_ids
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 5:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
console.log('res', res);
|
|
|
|
|
if (res.status == 0) {
|
|
|
|
|
setTableData([res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.homework_statistics]);
|
|
|
|
|
}
|
|
|
|
|
case 8:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getData() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
|
|
className: "".concat(StatisticsResultmodules.wrap, " minH500 bg-white pl30 pr30 pt30"),
|
|
|
|
|
children: [(0,authority/* isAdmin */.GJ)() && ((_workList$course_grou = workList.course_group_info) === null || _workList$course_grou === void 0 ? void 0 : _workList$course_grou.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
background: '#F6F7F9'
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
|
|
|
form: form,
|
|
|
|
|
onChange: onHandleChange,
|
|
|
|
|
initialValues: defineProperty_default()({}, 'course_group_ids', 'all'),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "course_group_ids",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z.Group, {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%',
|
|
|
|
|
padding: 20
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
className: "font14",
|
|
|
|
|
flex: '80px',
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: '3px',
|
|
|
|
|
marginLeft: '2px'
|
|
|
|
|
}
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(UpOutlined/* default */.Z, {
|
|
|
|
|
color: '#9096A3'
|
|
|
|
|
},
|
|
|
|
|
children: "\u5206\u73ED\u8303\u56F4:"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: '80px',
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
value: "all",
|
|
|
|
|
children: "\u5168\u90E8"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: '1',
|
|
|
|
|
id: "divhe",
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: '3px',
|
|
|
|
|
marginLeft: '2px'
|
|
|
|
|
}
|
|
|
|
|
height: open + 'px',
|
|
|
|
|
overflow: 'hidden'
|
|
|
|
|
},
|
|
|
|
|
children: (_workList$course_grou2 = workList.course_group_info) === null || _workList$course_grou2 === void 0 ? void 0 : _workList$course_grou2.map(function (v, k) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
|
|
|
|
|
value: v.course_group_id,
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: 10
|
|
|
|
|
},
|
|
|
|
|
children: [v.group_group_name, "(", v.count, ")"]
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}), showopen && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var height = document.getElementById('divhe').scrollHeight;
|
|
|
|
|
if (open > 47) {
|
|
|
|
|
setopen(47);
|
|
|
|
|
} else {
|
|
|
|
|
setopen(height);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
color: 'rgb(76, 172, 255)',
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
alignItems: 'flex-end',
|
|
|
|
|
display: 'flex'
|
|
|
|
|
},
|
|
|
|
|
children: [open === 47 ? '展开' : '收起', open === 47 ? /*#__PURE__*/(0,jsx_runtime.jsx)(DownOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: '3px',
|
|
|
|
|
marginLeft: '2px'
|
|
|
|
|
}
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(UpOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: '3px',
|
|
|
|
|
marginLeft: '2px'
|
|
|
|
|
}
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "mt15",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: StatisticsResultmodules.title,
|
|
|
|
|
children: "\u4F5C\u4E1A\u6982\u89C8"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
pagination: false,
|
|
|
|
|
dataSource: tableData,
|
|
|
|
|
columns: columns
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "mt30 pb30",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: StatisticsResultmodules.title,
|
|
|
|
|
children: "\u5B66\u751F\u6210\u7EE9\u5206\u5E03"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%',
|
|
|
|
|
height: '373px',
|
|
|
|
|
background: '#F6F7F9',
|
|
|
|
|
opacity: 0.6
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: StatisticsResultmodules.chart
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var StatisticsResult = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
var shixunHomeworks = _ref3.shixunHomeworks,
|
|
|
|
|
classroomList = _ref3.classroomList,
|
|
|
|
|
loading = _ref3.loading,
|
|
|
|
|
user = _ref3.user,
|
|
|
|
|
globalSetting = _ref3.globalSetting;
|
|
|
|
|
/* harmony default export */ var StatisticsResult = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var shixunHomeworks = _ref4.shixunHomeworks,
|
|
|
|
|
classroomList = _ref4.classroomList,
|
|
|
|
|
loading = _ref4.loading,
|
|
|
|
|
user = _ref4.user,
|
|
|
|
|
globalSetting = _ref4.globalSetting;
|
|
|
|
|
return {
|
|
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
|
|
classroomList: classroomList,
|
|
|
|
|
@ -7765,7 +7892,9 @@ var Detail_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}, {
|
|
|
|
|
name: '统计结果',
|
|
|
|
|
id: "5",
|
|
|
|
|
compontent: /*#__PURE__*/(0,jsx_runtime.jsx)(StatisticsResult, {})
|
|
|
|
|
compontent: /*#__PURE__*/(0,jsx_runtime.jsx)(StatisticsResult, {
|
|
|
|
|
activeTabs: activeTabs
|
|
|
|
|
})
|
|
|
|
|
}, {
|
|
|
|
|
name: '代码查重',
|
|
|
|
|
id: "2",
|