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.
1318 lines
51 KiB
1318 lines
51 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12476],{
|
|
|
|
/***/ 72020:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
var img = _ref.img,
|
|
_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,
|
|
imgStyles = _ref.imgStyles,
|
|
_ref$loading = _ref.loading,
|
|
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
|
className: "tc animated fadeIn",
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
|
color: '#999',
|
|
margin: '100px auto',
|
|
visibility: loading ? 'hidden' : 'visible'
|
|
}), styles),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
|
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
|
className: "mt20 font14",
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
className: Buttonclass,
|
|
onClick: ButtonClick
|
|
}, buttonProps), {}, {
|
|
children: ButtonText
|
|
})), ButtonTwo && ButtonTwo]
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 79622:
|
|
/*!**************************************************!*\
|
|
!*** ./src/pages/Colleges/index.tsx + 3 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 */ Colleges; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(11006);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(27161);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
var _umi_production_exports = __webpack_require__(66660);
|
|
// 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
|
|
var col = __webpack_require__(43604);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(72315);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(41867);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(72020);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(97174);
|
|
;// CONCATENATED MODULE: ./src/service/colleges.ts
|
|
|
|
|
|
|
|
function getCollegesStatistics(_x) {
|
|
return _getCollegesStatistics.apply(this, arguments);
|
|
}
|
|
function _getCollegesStatistics() {
|
|
_getCollegesStatistics = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
return _context.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/statistics.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _getCollegesStatistics.apply(this, arguments);
|
|
}
|
|
function getShixunReportCount(_x2) {
|
|
return _getShixunReportCount.apply(this, arguments);
|
|
}
|
|
function _getShixunReportCount() {
|
|
_getShixunReportCount = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
return _context2.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/shixun_report_count.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _getShixunReportCount.apply(this, arguments);
|
|
}
|
|
function getShixunTime(_x3) {
|
|
return _getShixunTime.apply(this, arguments);
|
|
}
|
|
function _getShixunTime() {
|
|
_getShixunTime = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
return _context3.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/shixun_time.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return _getShixunTime.apply(this, arguments);
|
|
}
|
|
function getCourseStatistics(_x4) {
|
|
return _getCourseStatistics.apply(this, arguments);
|
|
}
|
|
function _getCourseStatistics() {
|
|
_getCourseStatistics = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
return _context4.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/course_statistics.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return _getCourseStatistics.apply(this, arguments);
|
|
}
|
|
function getTeacherRanking(_x5) {
|
|
return _getTeacherRanking.apply(this, arguments);
|
|
}
|
|
function _getTeacherRanking() {
|
|
_getTeacherRanking = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
return _context5.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/teachers.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return _getTeacherRanking.apply(this, arguments);
|
|
}
|
|
function getStudentRanking(_x6) {
|
|
return _getStudentRanking.apply(this, arguments);
|
|
}
|
|
function _getStudentRanking() {
|
|
_getStudentRanking = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
return _context6.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/student_shixun.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return _getStudentRanking.apply(this, arguments);
|
|
}
|
|
function getShixunChart(_x7) {
|
|
return _getShixunChart.apply(this, arguments);
|
|
}
|
|
function _getShixunChart() {
|
|
_getShixunChart = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
return _context7.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/shixun_chart_data.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return _getShixunChart.apply(this, arguments);
|
|
}
|
|
function getStudentHot(_x8) {
|
|
return _getStudentHot.apply(this, arguments);
|
|
}
|
|
function _getStudentHot() {
|
|
_getStudentHot = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(params) {
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
case 0:
|
|
return _context8.abrupt("return", (0,fetch/* default */.ZP)("/api/colleges/".concat(params.id, "/student_hot_evaluations.json"), {
|
|
method: 'Get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee8);
|
|
}));
|
|
return _getStudentHot.apply(this, arguments);
|
|
}
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(47015);
|
|
;// CONCATENATED MODULE: ./src/pages/Colleges/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Collegesmodules = ({"flex_box_center":"flex_box_center___y89i6","flex_space_between":"flex_space_between___pS5dL","flex_box_vertical_center":"flex_box_vertical_center____2LVE","flex_box_center_end":"flex_box_center_end___PQwfE","flex_box_column":"flex_box_column___mcqTs","bg":"bg___KoleD","header":"header___a40Js","headerContent":"headerContent___GdspA","headTitle":"headTitle___VDwhX","headItemTitle":"headItemTitle___ZIs1u","headItemValue":"headItemValue___EdBZX","wrap":"wrap___NLrQO","basicTitle":"basicTitle___iT0WG","basicHead":"basicHead___CrVZt","basicContent":"basicContent___TWAWX","basicItem":"basicItem___eumHg","basicItemText":"basicItemText____G4DY","courseLoading":"courseLoading___gfXHB","maxWidth220":"maxWidth220___Nmptq","maxWidth340":"maxWidth340___oAjgs","maxWidth175":"maxWidth175___o7CAE","maxWidth225":"maxWidth225___DF_oe","maxWidth255":"maxWidth255___tv5lt","maxWidth105":"maxWidth105___YPLXN","colorFFC":"colorFFC___FHqyu","colorBlack":"colorBlack___rQLh9","colorGreen":"colorGreen___NGxX3","color4CA":"color4CA___y9vkS","rankLeft":"rankLeft___ykcxN","rankRight":"rankRight___KX7ZN","flexRow":"flexRow___zvz21"});
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Colleges/utils.tsx
|
|
|
|
|
|
|
|
|
|
var teacherRankingColums = [{
|
|
title: '排名',
|
|
dataIndex: 'ranking',
|
|
key: 'ranking',
|
|
align: 'center',
|
|
render: function render(text, record, index) {
|
|
return index + 1;
|
|
}
|
|
}, {
|
|
title: '姓名',
|
|
dataIndex: 'name',
|
|
key: 'name',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth105,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/users/".concat(record.login),
|
|
title: record.name,
|
|
target: "_blank",
|
|
children: record.name
|
|
});
|
|
}
|
|
}, {
|
|
title: '管理课堂',
|
|
dataIndex: 'classroom',
|
|
key: 'classroom',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth175,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.course_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '已发布实训作业',
|
|
key: 'assignment',
|
|
dataIndex: 'assignment',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth255,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.shixun_work_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '未发布实训作业',
|
|
dataIndex: 'released',
|
|
key: 'released',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.un_shixun_work_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '学生数',
|
|
dataIndex: 'studentnumber',
|
|
key: 'studentnumber',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.student_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '完成率',
|
|
dataIndex: 'completionrate',
|
|
key: 'completionrate',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.complete_rate + "%"
|
|
});
|
|
}
|
|
}, {
|
|
title: '发布实训',
|
|
dataIndex: 'releasetraining',
|
|
key: 'releasetraining',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.color4CA,
|
|
children: record.publish_shixun_count
|
|
});
|
|
}
|
|
}];
|
|
var renderStudentRanking = function renderStudentRanking(key) {
|
|
var image = "".concat(env/* default */.Z.IMG_SERVER, "/images/educoder/competition/").concat(key, ".png");
|
|
var mapping = {
|
|
1: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
width: "18px",
|
|
height: "22px",
|
|
className: "mt5",
|
|
src: image
|
|
}),
|
|
2: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
width: "18px",
|
|
height: "22px",
|
|
className: "mt5",
|
|
src: image
|
|
}),
|
|
3: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
width: "18px",
|
|
height: "22px",
|
|
className: "mt5",
|
|
src: image
|
|
})
|
|
};
|
|
return mapping[key] || key;
|
|
};
|
|
var studentRankingColums = [{
|
|
title: '排名',
|
|
dataIndex: 'ranking',
|
|
key: 'ranking',
|
|
align: 'center',
|
|
className: "edu-txt-center font-14",
|
|
width: '100px',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: renderStudentRanking(index + 1)
|
|
});
|
|
}
|
|
}, {
|
|
title: '姓名',
|
|
dataIndex: 'name',
|
|
key: 'name',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth105,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/users/".concat(record.login),
|
|
title: record.name,
|
|
target: "_blank",
|
|
children: record.name
|
|
});
|
|
}
|
|
}, {
|
|
title: '学号',
|
|
dataIndex: 'studentid',
|
|
key: 'studentid',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth175,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.student_id
|
|
});
|
|
}
|
|
}, {
|
|
title: '完成实训',
|
|
key: 'training',
|
|
dataIndex: 'training',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth225,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.shixun_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '在学实训',
|
|
dataIndex: 'learning',
|
|
key: 'learning',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.study_shixun_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '金币',
|
|
dataIndex: 'goldcoin',
|
|
key: 'goldcoin',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.grade
|
|
});
|
|
}
|
|
}, {
|
|
title: '经验值',
|
|
dataIndex: 'empirical',
|
|
key: 'empirical',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorGreen,
|
|
children: record.experience
|
|
});
|
|
}
|
|
}];
|
|
var getTeacherRankingEchartOption = function getTeacherRankingEchartOption() {
|
|
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
var dataName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
return {
|
|
tooltip: {
|
|
trigger: 'item',
|
|
formatter: "{d}% <br/>"
|
|
},
|
|
legend: {
|
|
bottom: 50,
|
|
left: 'center',
|
|
data: dataName
|
|
},
|
|
series: [{
|
|
type: 'pie',
|
|
radius: '65%',
|
|
center: ['50%', '35%'],
|
|
selectedMode: 'single',
|
|
data: data,
|
|
itemStyle: {
|
|
emphasis: {
|
|
shadowBlur: 10,
|
|
shadowOffsetX: 0,
|
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
|
}
|
|
}
|
|
}]
|
|
};
|
|
};
|
|
var getStudentRankingEchartOption = function getStudentRankingEchartOption() {
|
|
var names = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
var colorList = ['#962e66', '#623363', '#CCCCCC', '#9A9A9A', '#FF8080', '#FF80C2', '#B980FF', '#80B9FF', '#6FE9FF', '#4DE8B4', '#F8EF63', '#FFB967'];
|
|
return {
|
|
backgroundColor: '#fff',
|
|
grid: {
|
|
left: '3%',
|
|
right: '8%',
|
|
bottom: '15%',
|
|
containLabel: true
|
|
},
|
|
tooltip: {
|
|
show: "true",
|
|
trigger: 'item',
|
|
formatter: '{c0}',
|
|
backgroundColor: 'rgba(0,0,0,0.7)',
|
|
// 背景
|
|
padding: [8, 10],
|
|
//内边距
|
|
extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);',
|
|
//添加阴影
|
|
axisPointer: {
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
}
|
|
},
|
|
|
|
xAxis: {
|
|
type: 'value',
|
|
axisTick: {
|
|
show: false
|
|
},
|
|
axisLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: '#CCCCCC'
|
|
}
|
|
},
|
|
splitLine: {
|
|
show: false,
|
|
lineStyle: {
|
|
color: '#CCCCCC'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
textStyle: {
|
|
color: '#656565',
|
|
fontWeight: 'normal',
|
|
fontSize: '12'
|
|
},
|
|
formatter: '{value}'
|
|
}
|
|
},
|
|
yAxis: {
|
|
type: 'category',
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#cccccc'
|
|
}
|
|
},
|
|
splitLine: {
|
|
show: false
|
|
},
|
|
axisTick: {
|
|
show: false
|
|
},
|
|
splitArea: {
|
|
show: false
|
|
},
|
|
axisLabel: {
|
|
inside: false,
|
|
textStyle: {
|
|
color: '#656565',
|
|
fontWeight: 'normal',
|
|
fontSize: '12'
|
|
}
|
|
},
|
|
data: names
|
|
},
|
|
series: [{
|
|
name: '',
|
|
type: 'bar',
|
|
itemStyle: {
|
|
normal: {
|
|
show: true,
|
|
color: function color(params) {
|
|
return colorList[params.dataIndex];
|
|
},
|
|
barBorderRadius: 50,
|
|
borderWidth: 0,
|
|
borderColor: '#333'
|
|
}
|
|
},
|
|
barGap: '0%',
|
|
barCategoryGap: '50%',
|
|
data: values
|
|
}]
|
|
};
|
|
};
|
|
// EXTERNAL MODULE: ./node_modules/_echarts-for-react@2.0.16@echarts-for-react/lib/index.js
|
|
var lib = __webpack_require__(42441);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(27291);
|
|
;// CONCATENATED MODULE: ./src/pages/Colleges/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunsDetail", "globalSetting", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CollegesPage = function CollegesPage(_ref) {
|
|
var _courseStatistics$cou, _teacherRanking$teach, _studentRanking$teach;
|
|
var shixunsDetail = _ref.shixunsDetail,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)({}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
headData = _useState2[0],
|
|
setHeadData = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
shixunReportCount = _useState4[0],
|
|
setShixunReportCount = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
shixunTime = _useState6[0],
|
|
setShixunTime = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
courseStatistics = _useState8[0],
|
|
setCourseStatistics = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
teacherRanking = _useState10[0],
|
|
setTeacherRanking = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
studentRanking = _useState12[0],
|
|
setStudentRanking = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
shixunChartData = _useState14[0],
|
|
setShixunChartData = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
shixunChartDataName = _useState16[0],
|
|
setshixunChartDataName = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
studentHotValue = _useState18[0],
|
|
setStudentHotValue = _useState18[1];
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
studentHotName = _useState20[0],
|
|
setStudentHotName = _useState20[1];
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(1),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
page = _useState22[0],
|
|
setPage = _useState22[1];
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
isLoadingCourse = _useState24[0],
|
|
setIsLoadingCourse = _useState24[1];
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
isLoadingTeacher = _useState26[0],
|
|
setIsLoadingTeacher = _useState26[1];
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
isLoadingStudent = _useState28[0],
|
|
setIsLoadingStudent = _useState28[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
(0,util/* setDocumentTitle */.Dk)('学院统计');
|
|
if (!params.id) {
|
|
return;
|
|
}
|
|
getHeadData();
|
|
getShixunReportCountData();
|
|
getShixunTimeData();
|
|
getTeacherRankingData(1, 10);
|
|
getStudentRankingData(1, 10);
|
|
getShixunChartData();
|
|
getStudentHotData();
|
|
getCourseStatisticsData(1, 10);
|
|
}, [params.id]);
|
|
var getHeadData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return getCollegesStatistics({
|
|
id: params.id
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
(0,util/* setDocumentTitle */.Dk)((res === null || res === void 0 ? void 0 : res.school) || '头歌实践教学平台');
|
|
setHeadData(res || {});
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getHeadData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getShixunReportCountData = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return getShixunReportCount({
|
|
id: params.id
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
setShixunReportCount((res === null || res === void 0 ? void 0 : res.shixun_report_count) || 0);
|
|
case 4:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function getShixunReportCountData() {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getShixunTimeData = /*#__PURE__*/function () {
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
_context3.next = 2;
|
|
return getShixunTime({
|
|
id: params.id
|
|
});
|
|
case 2:
|
|
res = _context3.sent;
|
|
setShixunTime((res === null || res === void 0 ? void 0 : res.shixun_time) || 0);
|
|
case 4:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return function getShixunTimeData() {
|
|
return _ref4.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getCourseStatisticsData = /*#__PURE__*/function () {
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(page, per_page) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
setIsLoadingCourse(true);
|
|
_context4.next = 3;
|
|
return getCourseStatistics(objectSpread2_default()({
|
|
id: params.id,
|
|
page: page,
|
|
per_page: per_page
|
|
}, params))["catch"](function (e) {
|
|
return setIsLoadingCourse(false);
|
|
});
|
|
case 3:
|
|
res = _context4.sent;
|
|
setIsLoadingCourse(false);
|
|
setCourseStatistics(res || []);
|
|
case 6:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return function getCourseStatisticsData(_x, _x2) {
|
|
return _ref5.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getTeacherRankingData = /*#__PURE__*/function () {
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(page, per_page) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
setIsLoadingTeacher(true);
|
|
_context5.next = 3;
|
|
return getTeacherRanking({
|
|
id: params.id,
|
|
page: page,
|
|
per_page: per_page
|
|
})["catch"](function (e) {
|
|
return setIsLoadingTeacher(false);
|
|
});
|
|
case 3:
|
|
res = _context5.sent;
|
|
setIsLoadingTeacher(false);
|
|
setTeacherRanking(res || []);
|
|
case 6:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return function getTeacherRankingData(_x3, _x4) {
|
|
return _ref6.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getStudentRankingData = /*#__PURE__*/function () {
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(page, per_page) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
setIsLoadingStudent(true);
|
|
_context6.next = 3;
|
|
return getStudentRanking({
|
|
id: params.id,
|
|
page: page,
|
|
per_page: per_page
|
|
})["catch"](function (e) {
|
|
return setIsLoadingStudent(false);
|
|
});
|
|
case 3:
|
|
res = _context6.sent;
|
|
setIsLoadingStudent(false);
|
|
setStudentRanking(res || []);
|
|
case 6:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return function getStudentRankingData(_x5, _x6) {
|
|
return _ref7.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getShixunChartData = /*#__PURE__*/function () {
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
_context7.next = 2;
|
|
return getShixunChart({
|
|
id: params.id
|
|
});
|
|
case 2:
|
|
res = _context7.sent;
|
|
setShixunChartData((res === null || res === void 0 ? void 0 : res.data) || []);
|
|
setshixunChartDataName((res === null || res === void 0 ? void 0 : res.names) || []);
|
|
case 5:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return function getShixunChartData() {
|
|
return _ref8.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getStudentHotData = /*#__PURE__*/function () {
|
|
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
case 0:
|
|
_context8.next = 2;
|
|
return getStudentHot({
|
|
id: params.id
|
|
});
|
|
case 2:
|
|
res = _context8.sent;
|
|
setStudentHotValue((res === null || res === void 0 ? void 0 : res.values) || []);
|
|
setStudentHotName((res === null || res === void 0 ? void 0 : res.names) || []);
|
|
case 5:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee8);
|
|
}));
|
|
return function getStudentHotData() {
|
|
return _ref9.apply(this, arguments);
|
|
};
|
|
}();
|
|
var courseStatisticsColums = [{
|
|
title: '名称',
|
|
dataIndex: 'name',
|
|
key: 'name',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth220,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/classrooms/".concat(record.id, "/students"),
|
|
title: record.name,
|
|
target: "_blank",
|
|
children: record.name
|
|
});
|
|
}
|
|
}, {
|
|
title: '管理教师',
|
|
dataIndex: 'teachers',
|
|
key: 'teachers',
|
|
align: 'center',
|
|
className: Collegesmodules.maxWidth340,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
title: record.teachers,
|
|
children: record.teachers
|
|
});
|
|
}
|
|
}, {
|
|
title: '评测次数',
|
|
dataIndex: 'times',
|
|
key: 'evaluating_count',
|
|
align: 'center',
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.sort_name === "evaluating_count" ? params.sort === 2 ? "descend" : "ascend" : null,
|
|
className: Collegesmodules.maxWidth175,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
children: record.evaluating_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '学生',
|
|
key: 'student_count',
|
|
dataIndex: 'student',
|
|
align: 'center',
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.sort_name === "student_count" ? params.sort === 2 ? "descend" : "ascend" : null,
|
|
className: Collegesmodules.maxWidth225,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
children: record.student_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '实训作业',
|
|
dataIndex: 'training',
|
|
key: 'shixun_work_count',
|
|
align: 'center',
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.sort_name === "shixun_work_count" ? params.sort === 2 ? "descend" : "ascend" : null,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
children: record.shixun_work_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '资源',
|
|
dataIndex: 'resources',
|
|
key: 'attachments_count',
|
|
align: 'center',
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.sort_name === "attachments_count" ? params.sort === 2 ? "descend" : "ascend" : null,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
children: record === null || record === void 0 ? void 0 : record.attachments_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '帖子',
|
|
dataIndex: 'posts',
|
|
key: 'message_count',
|
|
align: 'center',
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.sort_name === "message_count" ? params.sort === 2 ? "descend" : "ascend" : null,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
children: record.message_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '其它任务',
|
|
dataIndex: 'othertasks',
|
|
key: 'other_work_count',
|
|
align: 'center',
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.sort_name === "other_work_count" ? params.sort === 2 ? "descend" : "ascend" : null,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
children: record.other_work_count
|
|
});
|
|
}
|
|
}, {
|
|
title: '状态',
|
|
dataIndex: 'states',
|
|
key: 'states',
|
|
align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: record.is_end ? Collegesmodules.colorBlack : Collegesmodules.colorFFC,
|
|
children: record.is_end ? "已结束" : "正在进行"
|
|
});
|
|
}
|
|
}, {
|
|
title: '最新活跃时间',
|
|
dataIndex: 'timemy',
|
|
key: 'activity_time',
|
|
align: 'center',
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
sortOrder: params.sort_name === "activity_time" ? params.sort === 2 ? "descend" : "ascend" : null,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.colorBlack,
|
|
children: record.activity_time
|
|
});
|
|
}
|
|
}];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Collegesmodules.bg,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("header", {
|
|
className: Collegesmodules.header,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.headerContent,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.headTitle,
|
|
children: headData === null || headData === void 0 ? void 0 : headData.school
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
justify: "space-around",
|
|
gutter: [40, 0],
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: 4,
|
|
className: "tc",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemTitle,
|
|
children: "\u6559\u5E08"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemValue,
|
|
children: (headData === null || headData === void 0 ? void 0 : headData.teachers_count) || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: 4,
|
|
className: "tc",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemTitle,
|
|
children: "\u5B66\u751F"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemValue,
|
|
children: (headData === null || headData === void 0 ? void 0 : headData.students_count) || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: 4,
|
|
className: "tc",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemTitle,
|
|
children: "\u8BFE\u5802"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemValue,
|
|
children: (headData === null || headData === void 0 ? void 0 : headData.courses_count) || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: 4,
|
|
className: "tc",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemTitle,
|
|
children: "\u5171\u5EFA\u5B9E\u8BAD"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collegesmodules.headItemValue,
|
|
children: (headData === null || headData === void 0 ? void 0 : headData.shixuns_count) || 0
|
|
})]
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicTitle,
|
|
children: "\u57FA\u672C\u4F7F\u7528\u60C5\u51B5"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.basicHead,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: "\u6559\u5E08"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: "\u5B66\u751F"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: "\u8BFE\u5802"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: "\u5171\u5EFA\u5B9E\u8BAD"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: "\u5B9E\u8BAD\u62A5\u544A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: "\u5B66\u5458\u5B9E\u6218\u65F6\u95F4"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.basicContent,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicItem,
|
|
children: headData !== null && headData !== void 0 && headData.teachers_count || (headData === null || headData === void 0 ? void 0 : headData.teachers_count) === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [headData === null || headData === void 0 ? void 0 : headData.teachers_count, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.basicItemText,
|
|
children: "\u4EBA"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicItem,
|
|
children: headData !== null && headData !== void 0 && headData.students_count || (headData === null || headData === void 0 ? void 0 : headData.students_count) === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [headData === null || headData === void 0 ? void 0 : headData.students_count, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.basicItemText,
|
|
children: "\u4EBA"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicItem,
|
|
children: headData !== null && headData !== void 0 && headData.courses_count || (headData === null || headData === void 0 ? void 0 : headData.courses_count) === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [headData === null || headData === void 0 ? void 0 : headData.courses_count, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.basicItemText,
|
|
children: "\u4E2A"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicItem,
|
|
children: headData !== null && headData !== void 0 && headData.shixuns_count || (headData === null || headData === void 0 ? void 0 : headData.shixuns_count) === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [headData === null || headData === void 0 ? void 0 : headData.shixuns_count, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.basicItemText,
|
|
children: "\u4E2A"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicItem,
|
|
children: shixunReportCount || shixunReportCount === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [shixunReportCount, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.basicItemText,
|
|
children: "\u4E2A"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicItem,
|
|
children: shixunTime || shixunTime === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [shixunTime, /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collegesmodules.basicItemText,
|
|
children: "\u5206\u949F"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {})
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicTitle,
|
|
children: "\u8BFE\u5802"
|
|
}), !courseStatistics && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.courseLoading,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
tip: "\u6B63\u5728\u52A0\u8F7D..."
|
|
})
|
|
}), courseStatistics && (courseStatistics !== null && courseStatistics !== void 0 && (_courseStatistics$cou = courseStatistics.courses) !== null && _courseStatistics$cou !== void 0 && _courseStatistics$cou.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
columns: courseStatisticsColums,
|
|
dataSource: courseStatistics === null || courseStatistics === void 0 ? void 0 : courseStatistics.courses,
|
|
loading: isLoadingCourse,
|
|
onChange: function onChange(a, b, c) {
|
|
params.sort_name = c === null || c === void 0 ? void 0 : c.columnKey;
|
|
if (c.order === 'ascend') params['sort'] = 1;
|
|
if (c.order === 'descend') params['sort'] = 2;
|
|
if (!c.order) {
|
|
params['sort'] = 1;
|
|
}
|
|
;
|
|
setPage(1);
|
|
getCourseStatisticsData(1, 10);
|
|
},
|
|
pagination: false
|
|
// pagination={{
|
|
// current: page,
|
|
// pageSize: 10,
|
|
// showQuickJumper: true,
|
|
// showSizeChanger: false,
|
|
// total: courseStatistics?.course_count,
|
|
// onChange: (page, pageSize) => {
|
|
// setPage(page);
|
|
// getCourseStatisticsData(page, 10);
|
|
// }
|
|
// }}
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
current: page,
|
|
style: {
|
|
marginTop: '20px'
|
|
},
|
|
pageSize: 10,
|
|
showQuickJumper: true,
|
|
showSizeChanger: false,
|
|
total: courseStatistics === null || courseStatistics === void 0 ? void 0 : courseStatistics.course_count,
|
|
onChange: function onChange(page, pagesize) {
|
|
setPage(page);
|
|
getCourseStatisticsData(page, 10);
|
|
}
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "".concat(Collegesmodules.wrap, " ").concat(Collegesmodules.flexRow),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.rankLeft,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicTitle,
|
|
children: "\u6559\u5E08\u6392\u540D"
|
|
}), !teacherRanking && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.courseLoading,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
tip: "\u6B63\u5728\u52A0\u8F7D..."
|
|
})
|
|
}), teacherRanking && (teacherRanking !== null && teacherRanking !== void 0 && (_teacherRanking$teach = teacherRanking.teachers) !== null && _teacherRanking$teach !== void 0 && _teacherRanking$teach.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
columns: teacherRankingColums,
|
|
dataSource: teacherRanking === null || teacherRanking === void 0 ? void 0 : teacherRanking.teachers,
|
|
loading: isLoadingTeacher,
|
|
pagination: false
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}))]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.rankRight,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicTitle,
|
|
children: "\u5728\u7EBF\u5B9E\u8BAD\u60C5\u51B5"
|
|
}), !shixunChartData && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.courseLoading,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
tip: "\u6B63\u5728\u52A0\u8F7D..."
|
|
})
|
|
}), shixunChartData && (shixunChartData !== null && shixunChartData !== void 0 && shixunChartData.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getTeacherRankingEchartOption(shixunChartData, shixunChartDataName),
|
|
style: {
|
|
height: 600
|
|
},
|
|
opts: {
|
|
renderer: 'svg'
|
|
}
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}))]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "".concat(Collegesmodules.wrap, " ").concat(Collegesmodules.flexRow),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.rankLeft,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicTitle,
|
|
children: "\u5B66\u751F\u6392\u540D"
|
|
}), !studentRanking && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.courseLoading,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
tip: "\u6B63\u5728\u52A0\u8F7D..."
|
|
})
|
|
}), studentRanking && (studentRanking !== null && studentRanking !== void 0 && (_studentRanking$teach = studentRanking.teachers) !== null && _studentRanking$teach !== void 0 && _studentRanking$teach.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
columns: studentRankingColums,
|
|
dataSource: studentRanking === null || studentRanking === void 0 ? void 0 : studentRanking.teachers,
|
|
loading: isLoadingStudent,
|
|
pagination: false
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}))]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collegesmodules.rankRight,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.basicTitle,
|
|
children: "\u6700\u70ED\u8BC4\u6D4B"
|
|
}), !studentHotName && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collegesmodules.courseLoading,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
tip: "\u6B63\u5728\u52A0\u8F7D..."
|
|
})
|
|
}), studentHotName && (studentHotName !== null && studentHotName !== void 0 && studentHotName.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getStudentRankingEchartOption(studentHotName, studentHotValue),
|
|
style: {
|
|
height: 600
|
|
},
|
|
opts: {
|
|
renderer: 'svg'
|
|
}
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}))]
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Colleges = ((0,_umi_production_exports.connect)(function (_ref10) {
|
|
var shixunsDetail = _ref10.shixunsDetail,
|
|
loading = _ref10.loading,
|
|
globalSetting = _ref10.globalSetting;
|
|
return {
|
|
shixunsDetail: shixunsDetail,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.index
|
|
};
|
|
})(CollegesPage));
|
|
|
|
/***/ })
|
|
|
|
}]); |