You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1428 lines
58 KiB
1428 lines
58 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[48689],{
|
|
|
|
/***/ 87588:
|
|
/*!******************************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js ***!
|
|
\******************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
/* harmony import */ var _ant_design_icons_svg_es_asn_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/ExclamationCircleOutlined */ 61144);
|
|
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
var ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
|
|
ref: ref,
|
|
icon: _ant_design_icons_svg_es_asn_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
|
|
}));
|
|
};
|
|
ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined';
|
|
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(ExclamationCircleOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 82982:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/button/style */ 29913);
|
|
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/button */ 71577);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
var _ref$buttonProps = _ref.buttonProps,
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
_ref$styles = _ref.styles,
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
customText = _ref.customText,
|
|
ButtonText = _ref.ButtonText,
|
|
ButtonClick = _ref.ButtonClick,
|
|
Buttonclass = _ref.Buttonclass,
|
|
ButtonTwo = _ref.ButtonTwo;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("section", {
|
|
className: "tc animated fadeIn",
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
color: '#999',
|
|
margin: '200px auto'
|
|
}), styles),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
|
src: _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_3__
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
|
|
className: "mt20 font14",
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd_es_button__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
className: Buttonclass,
|
|
onClick: ButtonClick
|
|
}, buttonProps), {}, {
|
|
children: ButtonText
|
|
})), ButtonTwo && ButtonTwo]
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__["Z"] = (noData);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 83307:
|
|
/*!*************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Statistics/VideoStatistics/index.tsx + 4 modules ***!
|
|
\*************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ VideoStatistics; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/spin/style/index.js + 1 modules
|
|
var style = __webpack_require__(22536);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js
|
|
var spin = __webpack_require__(11382);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
var row_style = __webpack_require__(13062);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
var row = __webpack_require__(71230);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
|
|
var col_style = __webpack_require__(89032);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
var col = __webpack_require__(15746);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/style/index.js + 1 modules
|
|
var menu_style = __webpack_require__(83736);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 5 modules
|
|
var menu = __webpack_require__(66516);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/date-picker/style/index.js + 1 modules
|
|
var date_picker_style = __webpack_require__(25763);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/date-picker/index.js + 56 modules
|
|
var date_picker = __webpack_require__(45741);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(27424);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./node_modules/moment/moment.js
|
|
var moment = __webpack_require__(30381);
|
|
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
// EXTERNAL MODULE: ./node_modules/echarts-for-react/lib/index.js
|
|
var lib = __webpack_require__(50976);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/VideoStatistics/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var VideoStatisticsmodules = ({"flex_box_center":"flex_box_center___UxByT","flex_space_between":"flex_space_between___tjPQi","flex_box_vertical_center":"flex_box_vertical_center___eVi6M","flex_box_center_end":"flex_box_center_end___GMuzi","flex_box_column":"flex_box_column___vbiFs","bg":"bg___MufvV","containerTitle":"containerTitle___WTmxf","containerDesc":"containerDesc___UUNTX","menus":"menus___OTYkk","listItem":"listItem___qbvMX","title":"title___IbL7h","titleLeft":"titleLeft___NTOIp","titleRight":"titleRight___LXcqm","acitons":"acitons___kF_C2","memberManager":"memberManager___tF_BU","menu":"menu___uNQni","topScores":"topScores___KhxIs","first":"first___AGzNo","second":"second___LD4BK","three":"three___kFDGl","dropmenu":"dropmenu___ty3tl","tabs":"tabs___x4Ok4","rightAction":"rightAction___Obgub","ruleWrap":"ruleWrap___QeIER"});
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(82982);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/style/index.js + 1 modules
|
|
var pagination_style = __webpack_require__(14182);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(260);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/style/index.js + 1 modules
|
|
var table_style = __webpack_require__(71854);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/index.js + 58 modules
|
|
var table = __webpack_require__(67250);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/divider/style/index.js + 1 modules
|
|
var divider_style = __webpack_require__(98541);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/divider/index.js
|
|
var divider = __webpack_require__(27049);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
|
|
var button_style = __webpack_require__(29913);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
var es_button = __webpack_require__(71577);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/style/index.js + 1 modules
|
|
var select_style = __webpack_require__(95985);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js
|
|
var es_select = __webpack_require__(34041);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(861);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(84519);
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Statistics/StudentVideo/index.less?modules
|
|
var StudentVideomodules = __webpack_require__(31420);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(29427);
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
var utils_export = __webpack_require__(12034);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/StudentVideo/StudentVideoList.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Studentlist(_ref) {
|
|
var user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
teachers = _ref.teachers;
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,react.useState)(),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
StudentList = _useState2[0],
|
|
setStudentList = _useState2[1];
|
|
var _useState3 = (0,react.useState)(),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
page = _useState4[0],
|
|
setPage = _useState4[1];
|
|
var _useState5 = (0,react.useState)(-1),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
courseGroupId = _useState6[0],
|
|
setCourseGroupId = _useState6[1]; //-1为全部班级
|
|
|
|
(0,react.useEffect)(function () {
|
|
getStudentList(1, -1);
|
|
dispatch({
|
|
type: 'teachers/getAllCourseGroups',
|
|
payload: {
|
|
coursesId: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
id: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
page: 1,
|
|
limit: 2000
|
|
}
|
|
});
|
|
}, []);
|
|
var courseGroupOptions = (0,react.useMemo)(function () {
|
|
var _allCourseGroups$cour;
|
|
var _ref2 = teachers || {},
|
|
allCourseGroups = _ref2.allCourseGroups;
|
|
var otherGroups = (allCourseGroups === null || allCourseGroups === void 0 ? void 0 : (_allCourseGroups$cour = allCourseGroups.course_groups) === null || _allCourseGroups$cour === void 0 ? void 0 : _allCourseGroups$cour.map(function (item) {
|
|
return {
|
|
label: item === null || item === void 0 ? void 0 : item.name,
|
|
value: item === null || item === void 0 ? void 0 : item.id
|
|
};
|
|
})) || [];
|
|
return [{
|
|
label: '全部',
|
|
value: -1
|
|
}, {
|
|
label: '未分班',
|
|
value: 0
|
|
}].concat(toConsumableArray_default()(otherGroups));
|
|
}, [teachers]);
|
|
function getStudentList(_x) {
|
|
return _getStudentList.apply(this, arguments);
|
|
}
|
|
function _getStudentList() {
|
|
_getStudentList = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(pageNum) {
|
|
var groupId,
|
|
result,
|
|
_args = arguments;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
groupId = _args.length > 1 && _args[1] !== undefined ? _args[1] : -1;
|
|
setPage(pageNum);
|
|
_context.next = 4;
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/video_study_statics.json"), {
|
|
method: 'get',
|
|
params: {
|
|
page: pageNum,
|
|
per_page: 10,
|
|
course_id: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
course_group_id: groupId
|
|
}
|
|
});
|
|
case 4:
|
|
result = _context.sent;
|
|
if (result) {
|
|
setStudentList(result);
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _getStudentList.apply(this, arguments);
|
|
}
|
|
var columns = [{
|
|
title: '姓名',
|
|
dataIndex: 'user_name',
|
|
align: "center",
|
|
fixed: 'left',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '学号',
|
|
dataIndex: 'student_id',
|
|
align: "center"
|
|
}, {
|
|
title: '学习视频数',
|
|
align: "center",
|
|
dataIndex: 'num',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '班级',
|
|
align: 'center',
|
|
dataIndex: 'course_group_name'
|
|
}, {
|
|
title: '累计学习时长',
|
|
align: "center",
|
|
dataIndex: 'total_duration',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: (0,util/* toTimeFormat */.li)(parseInt(text)) || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '平均学习完成度',
|
|
align: "center",
|
|
dataIndex: 'rate',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text ? text + "%" : '0%'
|
|
});
|
|
}
|
|
}, {
|
|
title: '开始学习时间',
|
|
align: "center",
|
|
dataIndex: 'start_at',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '最后学习时间',
|
|
align: "center",
|
|
dataIndex: 'end_at',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
align: "center",
|
|
fixed: 'right',
|
|
dataIndex: 'course_group_name',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/video_statistics/").concat(params === null || params === void 0 ? void 0 : params.categoryId, "/Student/").concat(record === null || record === void 0 ? void 0 : record.user_id),
|
|
children: "\u8BE6\u60C5"
|
|
});
|
|
}
|
|
}].filter(function (item) {
|
|
return !!item;
|
|
});
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentVideomodules/* default.divback */.Z.divback,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentVideomodules/* default.title */.Z.title,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u5B66\u751F\u89C6\u9891\u5B66\u4E60\u60C5\u51B5"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default */.Z, {
|
|
options: courseGroupOptions,
|
|
style: {
|
|
width: 120
|
|
},
|
|
value: courseGroupId,
|
|
onChange: function onChange(groupId) {
|
|
getStudentList(1, groupId);
|
|
setCourseGroupId(groupId);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
onClick: function onClick() {
|
|
(0,utils_export/* ExportVideoStudent */.o6)({
|
|
coursesId: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
course_group_id: courseGroupId
|
|
});
|
|
},
|
|
children: "\u5BFC\u51FA"
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
className: StudentVideomodules/* default.divstyle */.Z.divstyle
|
|
}), (StudentList === null || StudentList === void 0 ? void 0 : StudentList.count) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), (StudentList === null || StudentList === void 0 ? void 0 : StudentList.count) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "pl20 pr20",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
dataSource: StudentList === null || StudentList === void 0 ? void 0 : StudentList.student,
|
|
pagination: false,
|
|
columns: columns,
|
|
className: StudentVideomodules/* default.studentListTable */.Z.studentListTable,
|
|
scroll: {
|
|
x: 'max-content'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mb50 mt30 mb20",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
hideOnSinglePage: true,
|
|
showSizeChanger: false,
|
|
onChange: function onChange(current, pageSize) {
|
|
getStudentList(current, courseGroupId);
|
|
},
|
|
current: page || 1,
|
|
defaultPageSize: 10,
|
|
total: StudentList === null || StudentList === void 0 ? void 0 : StudentList.count
|
|
})
|
|
})]
|
|
})]
|
|
});
|
|
}
|
|
/* harmony default export */ var StudentVideoList = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var user = _ref3.user,
|
|
teachers = _ref3.teachers;
|
|
return {
|
|
user: user,
|
|
teachers: teachers
|
|
};
|
|
})(Studentlist));
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
|
|
var tooltip_style = __webpack_require__(38390);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(84908);
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
|
var ExclamationCircleOutlined = __webpack_require__(87588);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/ShixunStatistics/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ShixunStatisticsmodules = ({"flex_box_center":"flex_box_center___xDmaE","flex_space_between":"flex_space_between___ZXDe8","flex_box_vertical_center":"flex_box_vertical_center___xmv9j","flex_box_center_end":"flex_box_center_end___AnDtO","flex_box_column":"flex_box_column___byXwD","titlespan":"titlespan____R13n","overcount":"overcount___lL5cq","porgress":"porgress___gDrMg","span1":"span1___f69rM","span2":"span2___iQmg1","color_20":"color_20___EpSKJ","color_10":"color_10___nmu4d"});
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/ShixunStatistics/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
moment_default().locale('zh-cn');
|
|
//新建数值
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var sendToData = _ref.sendToData,
|
|
classroomList = _ref.classroomList,
|
|
globalSetting = _ref.globalSetting,
|
|
video = _ref.video,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,react.useState)(objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), {}, {
|
|
page: 1
|
|
})),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var _useState3 = (0,react.useState)([{
|
|
name: '未开启',
|
|
count: '学生未开启率(取教学课堂内所有已截止的课程实验的平均值)',
|
|
isred: true,
|
|
passed: 0
|
|
}, {
|
|
name: '未通关',
|
|
count: '学生未通关率(取教学课堂内所有已截止的课程实验的平均值)',
|
|
isred: true,
|
|
passed: 0
|
|
}, {
|
|
name: '按时通关',
|
|
count: '学生按时通关率(取教学课堂内所有已截止的课程实验的平均值)',
|
|
isred: true,
|
|
passed: 0
|
|
}, {
|
|
name: '迟交通关',
|
|
count: '学生迟交通关率(取教学课堂内所有已截止的课程实验的平均值)',
|
|
isred: true,
|
|
passed: 0
|
|
}]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
titletag = _useState4[0],
|
|
setTitletag = _useState4[1];
|
|
var _useState5 = (0,react.useState)({
|
|
legendData: ['优秀', '良好', '及格', '不及格', '未开启'],
|
|
selected: [{
|
|
优秀: false,
|
|
良好: false,
|
|
及格: false,
|
|
不及格: false,
|
|
未开启: false
|
|
}],
|
|
seriesData: [{
|
|
name: '优秀',
|
|
value: 0
|
|
}, {
|
|
name: '良好',
|
|
value: 0
|
|
}, {
|
|
name: '及格',
|
|
value: 0
|
|
}, {
|
|
name: '不及格',
|
|
value: 0
|
|
}, {
|
|
name: '未开启',
|
|
value: 0
|
|
}]
|
|
}),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
pietitle = _useState6[0],
|
|
setPietitle = _useState6[1];
|
|
var _useState7 = (0,react.useState)(),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
homeworkinfo = _useState8[0],
|
|
setHomeWorkinfo = _useState8[1];
|
|
var _useState9 = (0,react.useState)(),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
homeworkscoreinfo = _useState10[0],
|
|
setHomeWorkScoreinfo = _useState10[1];
|
|
var staticsRef = (0,react.useRef)();
|
|
(0,react.useEffect)(function () {
|
|
getdata();
|
|
}, [params['categoryId']]);
|
|
console.log('params', params);
|
|
function getdata() {
|
|
return _getdata.apply(this, arguments);
|
|
}
|
|
function _getdata() {
|
|
_getdata = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var result, _result$data, _result$data2, _pietitle$seriesData;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(params.coursesId, "/shixun_homework_statics.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
result = _context.sent;
|
|
sendToData(result);
|
|
if ((result === null || result === void 0 ? void 0 : result.status) === 0) {
|
|
titletag === null || titletag === void 0 ? void 0 : titletag.map(function (item) {
|
|
var _result$data$overall_, _result$data$overall_2, _result$data$overall_3, _result$data$overall_4, _result$data$overall_5, _result$data$overall_6, _result$data$overall_7, _result$data$overall_8;
|
|
switch (item === null || item === void 0 ? void 0 : item.name) {
|
|
case '未开启':
|
|
item.passed = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_ = result.data.overall_info) === null || _result$data$overall_ === void 0 ? void 0 : _result$data$overall_.unopen) * 100).toPrecision(12));
|
|
item.isred = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_2 = result.data.overall_info) === null || _result$data$overall_2 === void 0 ? void 0 : _result$data$overall_2.unopen) * 100).toPrecision(12)) > 20;
|
|
break;
|
|
case '未通关':
|
|
item.passed = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_3 = result.data.overall_info) === null || _result$data$overall_3 === void 0 ? void 0 : _result$data$overall_3.failed) * 100).toPrecision(12));
|
|
item.isred = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_4 = result.data.overall_info) === null || _result$data$overall_4 === void 0 ? void 0 : _result$data$overall_4.failed) * 100).toPrecision(12)) > 20;
|
|
break;
|
|
case '按时通关':
|
|
item.passed = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_5 = result.data.overall_info) === null || _result$data$overall_5 === void 0 ? void 0 : _result$data$overall_5.passed) * 100).toPrecision(12));
|
|
item.isred = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_6 = result.data.overall_info) === null || _result$data$overall_6 === void 0 ? void 0 : _result$data$overall_6.passed) * 100).toPrecision(12)) < 20;
|
|
break;
|
|
case '迟交通关':
|
|
item.passed = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_7 = result.data.overall_info) === null || _result$data$overall_7 === void 0 ? void 0 : _result$data$overall_7.late) * 100).toPrecision(12));
|
|
item.isred = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$overall_8 = result.data.overall_info) === null || _result$data$overall_8 === void 0 ? void 0 : _result$data$overall_8.late) * 100).toPrecision(12)) > 20;
|
|
break;
|
|
}
|
|
});
|
|
setTitletag(toConsumableArray_default()(titletag));
|
|
console.log('titletag', titletag);
|
|
setHomeWorkinfo(result === null || result === void 0 ? void 0 : (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.homework_info);
|
|
setHomeWorkScoreinfo(result === null || result === void 0 ? void 0 : (_result$data2 = result.data) === null || _result$data2 === void 0 ? void 0 : _result$data2.homework_score_info);
|
|
pietitle === null || pietitle === void 0 ? void 0 : (_pietitle$seriesData = pietitle.seriesData) === null || _pietitle$seriesData === void 0 ? void 0 : _pietitle$seriesData.map(function (item) {
|
|
var _result$data$score_in, _result$data$score_in2, _result$data$score_in3, _result$data$score_in4, _result$data$score_in5;
|
|
switch (item === null || item === void 0 ? void 0 : item.name) {
|
|
case '优秀':
|
|
item.value = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$score_in = result.data.score_info) === null || _result$data$score_in === void 0 ? void 0 : _result$data$score_in.excellent_rate) * 100).toPrecision(12));
|
|
setSelected('优秀', item.value);
|
|
break;
|
|
case '良好':
|
|
item.value = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$score_in2 = result.data.score_info) === null || _result$data$score_in2 === void 0 ? void 0 : _result$data$score_in2.good_rate) * 100).toPrecision(12));
|
|
setSelected('良好', item.value);
|
|
break;
|
|
case '及格':
|
|
item.value = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$score_in3 = result.data.score_info) === null || _result$data$score_in3 === void 0 ? void 0 : _result$data$score_in3.pass_rate) * 100).toPrecision(12));
|
|
setSelected('及格', item.value);
|
|
break;
|
|
case '不及格':
|
|
item.value = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$score_in4 = result.data.score_info) === null || _result$data$score_in4 === void 0 ? void 0 : _result$data$score_in4.failed_rate) * 100).toPrecision(12));
|
|
setSelected('不及格', item.value);
|
|
break;
|
|
case '未开启':
|
|
item.value = parseFloat(((result === null || result === void 0 ? void 0 : (_result$data$score_in5 = result.data.score_info) === null || _result$data$score_in5 === void 0 ? void 0 : _result$data$score_in5.not_submitted_rate) * 100).toPrecision(12));
|
|
setSelected('未开启', item.value);
|
|
break;
|
|
}
|
|
});
|
|
setPietitle(objectSpread2_default()({}, pietitle));
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _getdata.apply(this, arguments);
|
|
}
|
|
function setSelected(type, value) {
|
|
var _pietitle$selected;
|
|
pietitle === null || pietitle === void 0 ? void 0 : (_pietitle$selected = pietitle.selected) === null || _pietitle$selected === void 0 ? void 0 : _pietitle$selected.map(function (item, i) {
|
|
switch (type) {
|
|
case '优秀':
|
|
if (value > 0) {
|
|
item.优秀 = true;
|
|
} else {
|
|
item.优秀 = false;
|
|
}
|
|
break;
|
|
case '良好':
|
|
if (value > 0) {
|
|
item.良好 = true;
|
|
} else {
|
|
item.良好 = false;
|
|
}
|
|
break;
|
|
case '及格':
|
|
if (value > 0) {
|
|
item.及格 = true;
|
|
} else {
|
|
item.及格 = false;
|
|
}
|
|
break;
|
|
case '不及格':
|
|
if (value > 0) {
|
|
item.不及格 = true;
|
|
} else {
|
|
item.不及格 = false;
|
|
}
|
|
break;
|
|
case '未开启':
|
|
if (value > 0) {
|
|
item.未开启 = true;
|
|
} else {
|
|
item.未开启 = false;
|
|
}
|
|
break;
|
|
}
|
|
});
|
|
}
|
|
(0,react.useEffect)(function () {
|
|
if (staticsRef.current) {
|
|
staticsRef.current.getEchartsInstance().setOption(getOption());
|
|
}
|
|
}, [pietitle]);
|
|
var getOption = function getOption() {
|
|
if (!pietitle) return {};
|
|
return {
|
|
title: {
|
|
left: 'center'
|
|
},
|
|
tooltip: {
|
|
trigger: 'item',
|
|
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
|
},
|
|
legend: {
|
|
type: 'scroll',
|
|
orient: 'vertical',
|
|
right: 10,
|
|
top: 20,
|
|
bottom: 20,
|
|
data: pietitle.legendData,
|
|
selected: pietitle.selected[0]
|
|
},
|
|
color: ['#1989FA', '#36CBCB', '#975FE5', '#FCD84A', '#FE7777'],
|
|
series: [{
|
|
name: '',
|
|
type: 'pie',
|
|
radius: '55%',
|
|
center: ['40%', '50%'],
|
|
data: pietitle.seriesData,
|
|
emphasis: {
|
|
itemStyle: {
|
|
shadowBlur: 10,
|
|
shadowOffsetX: 0,
|
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
|
}
|
|
}
|
|
}]
|
|
};
|
|
};
|
|
var columns = [{
|
|
title: '课程实验名称',
|
|
dataIndex: 'homework_name',
|
|
align: "center",
|
|
width: 180,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '关卡数',
|
|
align: "center",
|
|
dataIndex: 'challenge_count',
|
|
sorter: function sorter(a, b) {
|
|
return a.challenge_count - b.challenge_count;
|
|
},
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || 0
|
|
});
|
|
}
|
|
}, {
|
|
title: '通关人数',
|
|
align: "center",
|
|
dataIndex: 'passed_count',
|
|
sorter: function sorter(a, b) {
|
|
return a.passed_count - b.passed_count;
|
|
},
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || 0
|
|
});
|
|
}
|
|
}, {
|
|
title: '优秀',
|
|
align: "center",
|
|
dataIndex: 'excellent',
|
|
sorter: function sorter(a, b) {
|
|
return a.excellent - b.excellent;
|
|
},
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || 0
|
|
});
|
|
}
|
|
}, {
|
|
title: '良好',
|
|
align: "center",
|
|
dataIndex: 'good',
|
|
sorter: function sorter(a, b) {
|
|
return a.good - b.good;
|
|
},
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || 0
|
|
});
|
|
}
|
|
}, {
|
|
title: '及格',
|
|
align: "center",
|
|
dataIndex: 'pass',
|
|
sorter: function sorter(a, b) {
|
|
return a.pass - b.pass;
|
|
},
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || 0
|
|
});
|
|
}
|
|
}, {
|
|
title: '不及格',
|
|
align: "center",
|
|
dataIndex: 'failed',
|
|
sorter: function sorter(a, b) {
|
|
return a.failed - b.failed;
|
|
},
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || 0
|
|
});
|
|
}
|
|
}, {
|
|
title: '未开始',
|
|
align: "center",
|
|
dataIndex: 'not_submitted',
|
|
sorter: function sorter(a, b) {
|
|
return a.not_submitted - b.not_submitted;
|
|
},
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || 0
|
|
});
|
|
}
|
|
}].filter(function (item) {
|
|
return !!item;
|
|
});
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
height: '180px',
|
|
marginTop: '10px',
|
|
background: '#ffffff'
|
|
},
|
|
children: titletag === null || titletag === void 0 ? void 0 : titletag.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ShixunStatisticsmodules.titlespan,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
color: item.isred ? 'red' : '#1989FA',
|
|
fontSize: '34px'
|
|
},
|
|
children: [item.passed || 0, " %"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
marginTop: '30px'
|
|
},
|
|
children: [item.name, " ", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "bottom",
|
|
title: item.count,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {})
|
|
})]
|
|
})]
|
|
});
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginTop: '20px',
|
|
background: '#ffffff',
|
|
padding: '10px 20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
fontSize: '16px',
|
|
display: 'flex',
|
|
marginTop: '14px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
flex: '1'
|
|
},
|
|
children: "\u5B9E\u8BAD\u901A\u5173\u7387\u6392\u884C"
|
|
}), "\u6392\u5E8F\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select/* default */.Z, {
|
|
style: {
|
|
width: '100px'
|
|
},
|
|
defaultValue: "jack",
|
|
onChange: function onChange(e) {
|
|
if (e === 'jack') {
|
|
homeworkinfo.sort(function (a, b) {
|
|
return b.passed - a.passed;
|
|
});
|
|
} else {
|
|
homeworkinfo.sort(function (a, b) {
|
|
return a.passed - b.passed;
|
|
});
|
|
}
|
|
setHomeWorkinfo(toConsumableArray_default()(homeworkinfo));
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default.Option */.Z.Option, {
|
|
value: "jack",
|
|
children: "\u4ECE\u9AD8\u5230\u4F4E"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default.Option */.Z.Option, {
|
|
value: "lucy",
|
|
children: "\u4ECE\u4F4E\u5230\u9AD8"
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: (homeworkinfo === null || homeworkinfo === void 0 ? void 0 : homeworkinfo.length) > 10 ? ShixunStatisticsmodules.overcount : '',
|
|
children: [(homeworkinfo === null || homeworkinfo === void 0 ? void 0 : homeworkinfo.length) <= 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), homeworkinfo === null || homeworkinfo === void 0 ? void 0 : homeworkinfo.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ShixunStatisticsmodules.porgress,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: ShixunStatisticsmodules.span1,
|
|
children: [index + 1, " ", /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/shixun_homework/").concat(item === null || item === void 0 ? void 0 : item.homework_id, "/detail?tabs=0"),
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: item === null || item === void 0 ? void 0 : item.homework_name,
|
|
children: item === null || item === void 0 ? void 0 : item.homework_name
|
|
}), " "]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: (item === null || item === void 0 ? void 0 : item.passed) * 100 > 20 ? ShixunStatisticsmodules.color_20 : ShixunStatisticsmodules.color_10,
|
|
style: {
|
|
width: "".concat((item === null || item === void 0 ? void 0 : item.passed) * 100, "%"),
|
|
display: 'flex',
|
|
height: '40px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: ShixunStatisticsmodules.span2,
|
|
style: {
|
|
color: (item === null || item === void 0 ? void 0 : item.passed) * 100 > 20 ? '#1989FA' : '#E92216'
|
|
},
|
|
children: [parseFloat(((item === null || item === void 0 ? void 0 : item.passed) * 100).toPrecision(12)), " %"]
|
|
})]
|
|
})]
|
|
});
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginTop: '40px',
|
|
marginBottom: '20px'
|
|
},
|
|
children: [homeworkinfo === null || homeworkinfo === void 0 ? void 0 : homeworkinfo.filter(function (item) {
|
|
return (item === null || item === void 0 ? void 0 : item.passed) < 0.21;
|
|
}).map(function (i, index) {
|
|
if (index > 4) {
|
|
return;
|
|
} else {
|
|
var _homeworkinfo$filter;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/shixun_homework/").concat(i === null || i === void 0 ? void 0 : i.homework_id, "/detail?tabs=0"),
|
|
children: [i === null || i === void 0 ? void 0 : i.homework_name, (homeworkinfo === null || homeworkinfo === void 0 ? void 0 : (_homeworkinfo$filter = homeworkinfo.filter(function (item) {
|
|
return (item === null || item === void 0 ? void 0 : item.passed) < 0.21;
|
|
})) === null || _homeworkinfo$filter === void 0 ? void 0 : _homeworkinfo$filter.length) === index + 1 ? '' : index + 1 === 5 ? '...' : '、']
|
|
});
|
|
}
|
|
}), (homeworkinfo === null || homeworkinfo === void 0 ? void 0 : homeworkinfo.filter(function (item) {
|
|
return (item === null || item === void 0 ? void 0 : item.passed) < 0.21;
|
|
}).length) > 0 && "\u5171".concat(homeworkinfo === null || homeworkinfo === void 0 ? void 0 : homeworkinfo.filter(function (item) {
|
|
return (item === null || item === void 0 ? void 0 : item.passed) < 0.21;
|
|
}).length, "\u4E2A\u8BFE\u7A0B\u5B9E\u9A8C\u5B66\u751F\u7684\u901A\u5173\u7387\u4F4E\u4E8E20%\uFF0C\u8BF4\u660E\u5B66\u751F\u5BF9\u76F8\u5173\u77E5\u8BC6\u70B9\u638C\u63E1\u6BD4\u8F83\u8584\u5F31\u3002\u5EFA\u8BAE\u8981\u6C42\u5B66\u751F\u52A0\u5F3A\u76F8\u5173\u77E5\u8BC6\u70B9\u7684\u7EC3\u4E60\u3002")]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginTop: '20px',
|
|
background: '#ffffff',
|
|
padding: '10px 20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
fontSize: '16px',
|
|
marginRight: "20px",
|
|
display: 'flex',
|
|
marginTop: '14px'
|
|
},
|
|
children: ["\u5B9E\u8BAD\u6210\u7EE9\u5206\u5E03 ", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "bottom",
|
|
title: '实训成绩分布(取教学课堂内所有已截止的课程实验的平均值)',
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
|
|
style: {
|
|
marginLeft: '5px',
|
|
marginTop: '4px'
|
|
}
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getOption(),
|
|
ref: staticsRef,
|
|
lazyUpdate: true,
|
|
notMerge: true,
|
|
style: {
|
|
height: 470,
|
|
width: 936
|
|
},
|
|
opts: {
|
|
renderer: 'svg'
|
|
} // use svg to render the chart.
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginTop: '20px',
|
|
background: '#ffffff',
|
|
padding: '10px 20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
fontSize: '16px',
|
|
display: 'flex',
|
|
marginTop: '14px'
|
|
},
|
|
children: "\u5B9E\u8BAD\u6210\u7EE9\u5206\u5E03\u8BE6\u60C5 "
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
columns: columns,
|
|
dataSource: homeworkscoreinfo
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var ShixunStatistics = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var classroomList = _ref2.classroomList,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting,
|
|
video = _ref2.video;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading,
|
|
video: video
|
|
};
|
|
})(ShixunsListPage));
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/VideoStatistics/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
moment_default().locale('zh-cn');
|
|
|
|
|
|
|
|
|
|
var VideoStatistics_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var _videoPeopleStatics$d, _videoPeopleStatics$d2, _videoDurationStatics2, _videoDurationStatics3;
|
|
var classroomList = _ref.classroomList,
|
|
globalSetting = _ref.globalSetting,
|
|
video = _ref.video,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,react.useState)(objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), {}, {
|
|
page: 1
|
|
})),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var detailCourseStatisticsList = classroomList.detailCourseStatisticsList,
|
|
detailCourseGroupsList = classroomList.detailCourseGroupsList,
|
|
detailCourseWorkscore = classroomList.detailCourseWorkscore,
|
|
detailCourseActscore = classroomList.detailCourseActscore,
|
|
detailLeftMenus = classroomList.detailLeftMenus;
|
|
var videoPeopleStatics = video.videoPeopleStatics,
|
|
videoDurationStatics = video.videoDurationStatics;
|
|
var RangePicker = date_picker/* default.RangePicker */.Z.RangePicker;
|
|
var _useState3 = (0,react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
dates = _useState4[0],
|
|
setDates = _useState4[1];
|
|
var top_scores = detailCourseStatisticsList.top_scores;
|
|
var _useState5 = (0,react.useState)([]),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
selectArrs = _useState6[0],
|
|
setSelectArrs = _useState6[1];
|
|
var _useState7 = (0,react.useState)('1'),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
tabIndex = _useState8[0],
|
|
setTabIndex = _useState8[1];
|
|
var _useState9 = (0,react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
submenuVisible = _useState10[0],
|
|
setSubmenuVisible = _useState10[1];
|
|
var _useState11 = (0,react.useState)(),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
res = _useState12[0],
|
|
setRes = _useState12[1];
|
|
var _useState13 = (0,react.useState)(false),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
ismodel = _useState14[0],
|
|
setismodel = _useState14[1];
|
|
var _useState15 = (0,react.useState)([]),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
numItems = _useState16[0],
|
|
setNumItems = _useState16[1];
|
|
var _useState17 = (0,react.useState)(true),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
pageLoading = _useState18[0],
|
|
setPageLoading = _useState18[1];
|
|
|
|
//切换
|
|
var _useState19 = (0,react.useState)('1'),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
MenuKey = _useState20[0],
|
|
setMenuKey = _useState20[1];
|
|
var _useState21 = (0,react.useState)({
|
|
course_id: params.coursesId
|
|
}),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
query = _useState22[0],
|
|
setQuery = _useState22[1];
|
|
params['id'] = params['coursesId'];
|
|
params['course_group_id'] = 0;
|
|
params['sort'] = 'desc';
|
|
params['limit'] = 20;
|
|
var courseModules;
|
|
if (detailLeftMenus.course_modules) {
|
|
courseModules = classroomList.detailLeftMenus.course_modules.filter(function (v) {
|
|
return v.type === 'board';
|
|
})[0];
|
|
}
|
|
(0,react.useEffect)(function () {
|
|
dispatch({
|
|
type: 'video/getVideoDurationStatics',
|
|
payload: {
|
|
course_id: params.coursesId
|
|
}
|
|
});
|
|
}, [params['categoryId']]);
|
|
(0,react.useEffect)(function () {
|
|
getData();
|
|
}, [query]);
|
|
var getData = function getData() {
|
|
dispatch({
|
|
type: 'video/getVideoPeopleStatics',
|
|
payload: objectSpread2_default()({}, query)
|
|
});
|
|
};
|
|
var onShowSizeChange = function onShowSizeChange(current) {
|
|
params.page = current;
|
|
dispatch({
|
|
type: 'video/getVideoPeopleStatics',
|
|
payload: objectSpread2_default()({}, params)
|
|
});
|
|
};
|
|
var Menus = [{
|
|
name: '课程实验',
|
|
id: '1'
|
|
}, {
|
|
name: '视频',
|
|
id: '0'
|
|
}
|
|
// { name: '考试中', id: 2 },
|
|
// { name: '未发布', id: 1, },
|
|
// { name: '已截止', id: 3 },
|
|
];
|
|
|
|
var getOption = function getOption() {
|
|
if (!(videoPeopleStatics !== null && videoPeopleStatics !== void 0 && videoPeopleStatics.data)) return {};
|
|
return {
|
|
// title: {
|
|
// text: '对数轴示例',
|
|
// left: 'center'
|
|
// },
|
|
tooltip: {
|
|
trigger: 'item',
|
|
formatter: '{a} <br/>{b} : {c}人'
|
|
},
|
|
// legend: {
|
|
// left: 'left',
|
|
// data: ['2的指数', '3的指数']
|
|
// },
|
|
xAxis: {
|
|
type: 'category',
|
|
name: '日期',
|
|
splitLine: {
|
|
show: true
|
|
},
|
|
data: videoPeopleStatics === null || videoPeopleStatics === void 0 ? void 0 : videoPeopleStatics.data.map(function (item) {
|
|
return item[0];
|
|
})
|
|
},
|
|
grid: {
|
|
left: '3%',
|
|
right: '8%',
|
|
bottom: '13%',
|
|
containLabel: true
|
|
},
|
|
yAxis: {
|
|
// type: 'log',
|
|
name: '人数',
|
|
minorTick: {
|
|
show: true
|
|
},
|
|
minorSplitLine: {
|
|
show: true
|
|
}
|
|
},
|
|
series: [{
|
|
name: '日期',
|
|
type: 'line',
|
|
smooth: true,
|
|
data: videoPeopleStatics === null || videoPeopleStatics === void 0 ? void 0 : videoPeopleStatics.data.map(function (item) {
|
|
return item[1];
|
|
})
|
|
}]
|
|
};
|
|
};
|
|
var getOption2 = function getOption2() {
|
|
var _videoDurationStatics;
|
|
if (!(videoPeopleStatics !== null && videoPeopleStatics !== void 0 && videoPeopleStatics.data)) return {};
|
|
return {
|
|
color: ['#3398DB'],
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
}
|
|
},
|
|
|
|
grid: {
|
|
left: '3%',
|
|
right: '8%',
|
|
bottom: '3%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
name: "学习时长",
|
|
type: 'category',
|
|
data: ['10分钟内', '10-30分钟', '30分钟-1小时', '1小时-2小时', '2小时以上'],
|
|
axisTick: {
|
|
alignWithLabel: true
|
|
}
|
|
}],
|
|
yAxis: [{
|
|
name: "人数",
|
|
type: 'value'
|
|
}],
|
|
series: [{
|
|
name: '人数',
|
|
type: 'bar',
|
|
barWidth: '60%',
|
|
data: videoDurationStatics === null || videoDurationStatics === void 0 ? void 0 : (_videoDurationStatics = videoDurationStatics.data) === null || _videoDurationStatics === void 0 ? void 0 : _videoDurationStatics.map(function (item) {
|
|
return item[1];
|
|
})
|
|
}]
|
|
};
|
|
};
|
|
var disabledDate = function disabledDate(current) {
|
|
if (!dates || dates.length === 0) {
|
|
return false;
|
|
}
|
|
var tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
|
|
var tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
|
|
return tooEarly || tooLate;
|
|
};
|
|
var getShixunData = function getShixunData(shixunsData) {
|
|
if ((shixunsData === null || shixunsData === void 0 ? void 0 : shixunsData.status) === 0 && numItems.length === 0) {
|
|
setPageLoading(false);
|
|
setNumItems([shixunsData === null || shixunsData === void 0 ? void 0 : shixunsData.shixuns_count, shixunsData === null || shixunsData === void 0 ? void 0 : shixunsData.video_count]);
|
|
if (!(shixunsData !== null && shixunsData !== void 0 && shixunsData.shixuns_count) && shixunsData !== null && shixunsData !== void 0 && shixunsData.video_count) {
|
|
setMenuKey('0');
|
|
}
|
|
}
|
|
};
|
|
console.log(numItems, !!numItems.length, !numItems.every(function (e) {
|
|
return !e;
|
|
}), 444);
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: VideoStatisticsmodules.bg,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: VideoStatisticsmodules.containerTitle,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "font16",
|
|
children: "\u5B66\u60C5\u5206\u6790"
|
|
})
|
|
}), !!numItems.length && numItems.some(function (e) {
|
|
return !!e;
|
|
}) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: VideoStatisticsmodules.menus,
|
|
align: "middle",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z, {
|
|
className: "blod font16",
|
|
mode: "horizontal",
|
|
onClick: function onClick(e) {
|
|
setMenuKey(e.key);
|
|
},
|
|
style: {
|
|
margin: '0 18px'
|
|
}
|
|
// onSelect={onMenuSelect}
|
|
,
|
|
defaultSelectedKeys: ['1'],
|
|
children: Menus.map(function (v, k) {
|
|
if (!numItems[k]) return null;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default.Item */.Z.Item, {
|
|
className: "font16",
|
|
style: {
|
|
padding: "0 0 12px 0 ",
|
|
margin: "0 15px"
|
|
},
|
|
children: v.name
|
|
}, v.id);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "220px"
|
|
})]
|
|
})]
|
|
}), numItems.length === 0 || numItems.every(function (e) {
|
|
return !e;
|
|
}) ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [pageLoading ? /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
style: {
|
|
width: '100%',
|
|
marginTop: 150
|
|
}
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
display: 'none'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ShixunStatistics, {
|
|
sendToData: getShixunData
|
|
})
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
children: parseInt(MenuKey) === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "c-grey-999 mt20 mb20",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-tishi3 mr3 font20",
|
|
style: {
|
|
color: '#0152d9'
|
|
}
|
|
}), "\u89C6\u9891\u5B66\u4E60\u60C5\u51B5\u4EC5\u9488\u5BF9\u6559\u5E08\u4E0A\u4F20\u5230\u672C\u5E73\u53F0\u7684\u89C6\u9891\uFF0C\u5916\u94FE\u89C6\u9891\u4E0D\u5728\u7EDF\u8BA1\u8303\u56F4\u5185\u3002"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "mt20 bg-white inline-block w100",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: "pt30 pl40 pr40",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "font18",
|
|
children: "\u89C6\u9891\u5B66\u4E60\u4EBA\u6570\u53D8\u5316"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RangePicker, {
|
|
allowClear: true,
|
|
disabledDate: disabledDate,
|
|
onCalendarChange: function onCalendarChange(value) {
|
|
setDates(value);
|
|
},
|
|
onChange: function onChange(date, value) {
|
|
if (value[0]) {
|
|
query.start_at = value[0];
|
|
query.end_at = value[1];
|
|
} else {
|
|
delete query.start_at;
|
|
delete query.end_at;
|
|
}
|
|
setQuery(objectSpread2_default()({}, query));
|
|
}
|
|
})
|
|
})]
|
|
}), !!(videoPeopleStatics !== null && videoPeopleStatics !== void 0 && (_videoPeopleStatics$d = videoPeopleStatics.data) !== null && _videoPeopleStatics$d !== void 0 && _videoPeopleStatics$d.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getOption(),
|
|
style: {
|
|
height: 470,
|
|
width: 966
|
|
},
|
|
opts: {
|
|
renderer: 'svg'
|
|
} // use svg to render the chart.
|
|
}), !(videoPeopleStatics !== null && videoPeopleStatics !== void 0 && (_videoPeopleStatics$d2 = videoPeopleStatics.data) !== null && _videoPeopleStatics$d2 !== void 0 && _videoPeopleStatics$d2.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "mt20 bg-white pr30 inline-block w100",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: "pt30 pl40 pr40",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "font18",
|
|
children: "\u89C6\u9891\u5B66\u4E60\u65F6\u957F\u60C5\u51B5"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {})]
|
|
}), !(videoDurationStatics !== null && videoDurationStatics !== void 0 && (_videoDurationStatics2 = videoDurationStatics.data) !== null && _videoDurationStatics2 !== void 0 && _videoDurationStatics2.every(function (item) {
|
|
return item[1] === 0;
|
|
})) && /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getOption2(),
|
|
style: {
|
|
height: 470,
|
|
width: 936
|
|
},
|
|
opts: {
|
|
renderer: 'svg'
|
|
} // use svg to render the chart.
|
|
}), (videoDurationStatics === null || videoDurationStatics === void 0 ? void 0 : (_videoDurationStatics3 = videoDurationStatics.data) === null || _videoDurationStatics3 === void 0 ? void 0 : _videoDurationStatics3.every(function (item) {
|
|
return item[1] === 0;
|
|
})) && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "mt20",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(StudentVideoList, {})
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(ShixunStatistics, {
|
|
sendToData: getShixunData
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var VideoStatistics = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var classroomList = _ref2.classroomList,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting,
|
|
video = _ref2.video;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading,
|
|
video: video
|
|
};
|
|
})(VideoStatistics_ShixunsListPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 31420:
|
|
/*!*******************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Statistics/StudentVideo/index.less?modules ***!
|
|
\*******************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ __webpack_exports__["Z"] = ({"divback":"divback___ntOaK","title":"title___YscwY","divstyle":"divstyle___ZqCpS","studentListTable":"studentListTable___Ft0kg"});
|
|
|
|
/***/ })
|
|
|
|
}]); |