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.
1649 lines
67 KiB
1649 lines
67 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[48689],{
|
|
|
|
/***/ 80045:
|
|
/*!*******************************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
|
|
\*******************************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_ExclamationCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(26508);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(91851);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_ExclamationCircleOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 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);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 41701:
|
|
/*!*************************************************************************************!*\
|
|
!*** ./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/_@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/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(11006);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// 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/date-picker/index.js + 66 modules
|
|
var date_picker = __webpack_require__(52409);
|
|
// 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/menu/index.js + 11 modules
|
|
var menu = __webpack_require__(20834);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
// EXTERNAL MODULE: ./node_modules/_echarts-for-react@2.0.16@echarts-for-react/lib/index.js
|
|
var lib = __webpack_require__(42441);
|
|
;// 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__(72020);
|
|
// 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/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(93923);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
var es_select = __webpack_require__(57809);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
var divider = __webpack_require__(28103);
|
|
// 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/utils/fetch.ts
|
|
var fetch = __webpack_require__(97174);
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Statistics/StudentVideo/index.less?modules
|
|
var StudentVideomodules = __webpack_require__(32631);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(27291);
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
var utils_export = __webpack_require__(64125);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// 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_17_0_2_react.useState)(),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
StudentList = _useState2[0],
|
|
setStudentList = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
page = _useState4[0],
|
|
setPage = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(-1),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
courseGroupId = _useState6[0],
|
|
setCourseGroupId = _useState6[1]; //-1为全部班级
|
|
|
|
(0,_react_17_0_2_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_17_0_2_react.useMemo)(function () {
|
|
var _allCourseGroups$cour;
|
|
var _ref2 = teachers || {},
|
|
allCourseGroups = _ref2.allCourseGroups;
|
|
var otherGroups = (allCourseGroups === null || allCourseGroups === 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 */.Z.divback,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentVideomodules/* default */.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"], {
|
|
options: courseGroupOptions,
|
|
style: {
|
|
width: 120
|
|
},
|
|
value: courseGroupId,
|
|
onChange: function onChange(groupId) {
|
|
getStudentList(1, groupId);
|
|
setCourseGroupId(groupId);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
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 */.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 */.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@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
var ExclamationCircleOutlined = __webpack_require__(80045);
|
|
;// 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_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_17_0_2_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_17_0_2_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_17_0_2_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_17_0_2_react.useState)(),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
homeworkinfo = _useState8[0],
|
|
setHomeWorkinfo = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
homeworkscoreinfo = _useState10[0],
|
|
setHomeWorkScoreinfo = _useState10[1];
|
|
var staticsRef = (0,_react_17_0_2_react.useRef)();
|
|
(0,_react_17_0_2_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 || 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 || (_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 || (_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 || (_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 || (_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 || (_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 || (_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 || (_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 || (_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 || (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.homework_info);
|
|
setHomeWorkScoreinfo(result === null || result === void 0 || (_result$data2 = result.data) === null || _result$data2 === void 0 ? void 0 : _result$data2.homework_score_info);
|
|
pietitle === null || pietitle === void 0 || (_pietitle$seriesData = pietitle.seriesData) === null || _pietitle$seriesData === 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 || (_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 || (_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 || (_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 || (_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 || (_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 || (_pietitle$selected = pietitle.selected) === null || _pietitle$selected === 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_17_0_2_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"], {
|
|
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, {
|
|
value: "jack",
|
|
children: "\u4ECE\u9AD8\u5230\u4F4E"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].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 || (_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: 876
|
|
},
|
|
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,
|
|
pagination: {
|
|
size: "default",
|
|
hideOnSinglePage: false,
|
|
showSizeChanger: true
|
|
}
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_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_17_0_2_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;
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
dates = _useState4[0],
|
|
setDates = _useState4[1];
|
|
var top_scores = detailCourseStatisticsList.top_scores;
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
selectArrs = _useState6[0],
|
|
setSelectArrs = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)('1'),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
tabIndex = _useState8[0],
|
|
setTabIndex = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
submenuVisible = _useState10[0],
|
|
setSubmenuVisible = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
res = _useState12[0],
|
|
setRes = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
ismodel = _useState14[0],
|
|
setismodel = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
numItems = _useState16[0],
|
|
setNumItems = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
pageLoading = _useState18[0],
|
|
setPageLoading = _useState18[1];
|
|
|
|
//切换
|
|
var _useState19 = (0,_react_17_0_2_react.useState)('1'),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
MenuKey = _useState20[0],
|
|
setMenuKey = _useState20[1];
|
|
var _useState21 = (0,_react_17_0_2_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_17_0_2_react.useEffect)(function () {
|
|
dispatch({
|
|
type: 'video/getVideoDurationStatics',
|
|
payload: {
|
|
course_id: params.coursesId
|
|
}
|
|
});
|
|
}, [params['categoryId']]);
|
|
(0,_react_17_0_2_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 || (_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 */.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 || (_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));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 32631:
|
|
/*!*******************************************************************************!*\
|
|
!*** ./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"});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 28103:
|
|
/*!***********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
|
|
\***********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ divider; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
|
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
|
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js
|
|
|
|
|
|
// ============================== Shared ==============================
|
|
const genSharedDividerStyle = token => {
|
|
const {
|
|
componentCls,
|
|
sizePaddingEdgeHorizontal,
|
|
colorSplit,
|
|
lineWidth,
|
|
textPaddingInline,
|
|
orientationMargin,
|
|
verticalMarginInline
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
|
|
// vertical
|
|
'&-vertical': {
|
|
position: 'relative',
|
|
top: '-0.06em',
|
|
display: 'inline-block',
|
|
height: '0.9em',
|
|
marginInline: verticalMarginInline,
|
|
marginBlock: 0,
|
|
verticalAlign: 'middle',
|
|
borderTop: 0,
|
|
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
|
|
},
|
|
'&-horizontal': {
|
|
display: 'flex',
|
|
clear: 'both',
|
|
width: '100%',
|
|
minWidth: '100%',
|
|
margin: `${token.dividerHorizontalGutterMargin}px 0`
|
|
},
|
|
[`&-horizontal${componentCls}-with-text`]: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
|
|
color: token.colorTextHeading,
|
|
fontWeight: 500,
|
|
fontSize: token.fontSizeLG,
|
|
whiteSpace: 'nowrap',
|
|
textAlign: 'center',
|
|
borderBlockStart: `0 ${colorSplit}`,
|
|
'&::before, &::after': {
|
|
position: 'relative',
|
|
width: '50%',
|
|
borderBlockStart: `${lineWidth}px solid transparent`,
|
|
// Chrome not accept `inherit` in `border-top`
|
|
borderBlockStartColor: 'inherit',
|
|
borderBlockEnd: 0,
|
|
transform: 'translateY(50%)',
|
|
content: "''"
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-left`]: {
|
|
'&::before': {
|
|
width: `${orientationMargin * 100}%`
|
|
},
|
|
'&::after': {
|
|
width: `${100 - orientationMargin * 100}%`
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-right`]: {
|
|
'&::before': {
|
|
width: `${100 - orientationMargin * 100}%`
|
|
},
|
|
'&::after': {
|
|
width: `${orientationMargin * 100}%`
|
|
}
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
display: 'inline-block',
|
|
paddingBlock: 0,
|
|
paddingInline: textPaddingInline
|
|
},
|
|
'&-dashed': {
|
|
background: 'none',
|
|
borderColor: colorSplit,
|
|
borderStyle: 'dashed',
|
|
borderWidth: `${lineWidth}px 0 0`
|
|
},
|
|
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
|
|
'&::before, &::after': {
|
|
borderStyle: 'dashed none none'
|
|
}
|
|
},
|
|
[`&-vertical${componentCls}-dashed`]: {
|
|
borderInlineStartWidth: lineWidth,
|
|
borderInlineEnd: 0,
|
|
borderBlockStart: 0,
|
|
borderBlockEnd: 0
|
|
},
|
|
[`&-plain${componentCls}-with-text`]: {
|
|
color: token.colorText,
|
|
fontWeight: 'normal',
|
|
fontSize: token.fontSize
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
|
|
'&::before': {
|
|
width: 0
|
|
},
|
|
'&::after': {
|
|
width: '100%'
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
paddingInlineStart: sizePaddingEdgeHorizontal
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
|
|
'&::before': {
|
|
width: '100%'
|
|
},
|
|
'&::after': {
|
|
width: 0
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
paddingInlineEnd: sizePaddingEdgeHorizontal
|
|
}
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
|
|
const dividerToken = (0,statistic/* merge */.TS)(token, {
|
|
dividerHorizontalWithTextGutterMargin: token.margin,
|
|
dividerHorizontalGutterMargin: token.marginLG,
|
|
sizePaddingEdgeHorizontal: 0
|
|
});
|
|
return [genSharedDividerStyle(dividerToken)];
|
|
}, token => ({
|
|
textPaddingInline: '1em',
|
|
orientationMargin: 0.05,
|
|
verticalMarginInline: token.marginXS
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const Divider = props => {
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
divider
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
type = 'horizontal',
|
|
orientation = 'center',
|
|
orientationMargin,
|
|
className,
|
|
rootClassName,
|
|
children,
|
|
dashed,
|
|
plain,
|
|
style
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
|
|
const prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
const [wrapSSR, hashId] = divider_style(prefixCls);
|
|
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
|
|
const hasChildren = !!children;
|
|
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
|
|
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
|
|
const classString = _classnames_2_3_2_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
|
|
[`${prefixCls}-with-text`]: hasChildren,
|
|
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
|
|
[`${prefixCls}-dashed`]: !!dashed,
|
|
[`${prefixCls}-plain`]: !!plain,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
|
|
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
|
|
}, className, rootClassName);
|
|
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
|
|
if (typeof orientationMargin === 'number') {
|
|
return orientationMargin;
|
|
}
|
|
if (/^\d+$/.test(orientationMargin)) {
|
|
return Number(orientationMargin);
|
|
}
|
|
return orientationMargin;
|
|
}, [orientationMargin]);
|
|
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
|
|
marginLeft: memoizedOrientationMargin
|
|
}), hasCustomMarginRight && {
|
|
marginRight: memoizedOrientationMargin
|
|
});
|
|
// Warning children not work in vertical mode
|
|
if (false) {}
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
|
className: classString,
|
|
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
|
|
}, restProps, {
|
|
role: "separator"
|
|
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${prefixCls}-inner-text`,
|
|
style: innerStyle
|
|
}, children)));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var divider = (Divider);
|
|
|
|
/***/ })
|
|
|
|
}]); |