|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[31427],{
|
|
|
|
|
|
/***/ 61485:
|
|
|
/*!****************************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/QuestionCircleOutlined.js + 1 modules ***!
|
|
|
\****************************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_QuestionCircleOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.3@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(71409);
|
|
|
// 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.4.2@@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var QuestionCircleOutlined = { "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": "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "question-circle", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_QuestionCircleOutlined = (QuestionCircleOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(7657);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/QuestionCircleOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var QuestionCircleOutlined_QuestionCircleOutlined = function QuestionCircleOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_QuestionCircleOutlined
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/** */
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(QuestionCircleOutlined_QuestionCircleOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_QuestionCircleOutlined = (RefIcon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 83622:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./src/components/ExportCount/index.tsx ***!
|
|
|
\**********************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ 43418);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
//首页广告弹窗
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Advertisement(_ref) {
|
|
|
var res = _ref.res,
|
|
|
ismodel = _ref.ismodel,
|
|
|
setismodel = _ref.setismodel;
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
|
|
|
open: ismodel,
|
|
|
title: "提示",
|
|
|
footer: null,
|
|
|
style: {
|
|
|
background: "transparen"
|
|
|
},
|
|
|
centered: true,
|
|
|
width: 670,
|
|
|
maskClosable: false
|
|
|
// closable={false}
|
|
|
,
|
|
|
children: [res === null || res === void 0 ? void 0 : res.message, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
|
|
style: {
|
|
|
textAlign: 'right'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP, {
|
|
|
onClick: function onClick() {
|
|
|
setismodel(false);
|
|
|
},
|
|
|
type: "primary",
|
|
|
children: "\u786E\u8BA4"
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Advertisement);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 21975:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Statistics/index.tsx + 6 modules ***!
|
|
|
\*********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"default": function() { return /* binding */ Statistics; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
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.13@dayjs/dayjs.min.js
|
|
|
var dayjs_min = __webpack_require__(61186);
|
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js
|
|
|
var _react_infinite_scroller_1_2_4_react_infinite_scroller = __webpack_require__(26724);
|
|
|
var _react_infinite_scroller_1_2_4_react_infinite_scroller_default = /*#__PURE__*/__webpack_require__.n(_react_infinite_scroller_1_2_4_react_infinite_scroller);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
|
|
|
var menu = __webpack_require__(20834);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
|
|
|
var es_checkbox = __webpack_require__(24905);
|
|
|
// 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/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/popover/index.js
|
|
|
var popover = __webpack_require__(60324);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(10249);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules
|
|
|
var dropdown = __webpack_require__(38854);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
|
|
|
var tabs = __webpack_require__(99313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(1710);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
|
var pagination = __webpack_require__(58421);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
|
var spin = __webpack_require__(71418);
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
var NoData = __webpack_require__(46172);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Statisticsmodules = ({"flex_box_center":"flex_box_center___rAB_D","flex_space_between":"flex_space_between___thxzM","flex_box_vertical_center":"flex_box_vertical_center___F4tY6","flex_box_center_end":"flex_box_center_end___r8JQK","flex_box_column":"flex_box_column___sSvJl","bg":"bg___mQXgH","containerTitle":"containerTitle___qt3QK","containerDesc":"containerDesc___qz_Qj","listItem":"listItem___pqPd4","title":"title___xbuRk","titleLeft":"titleLeft___eCOrX","titleRight":"titleRight___QJ5JD","acitons":"acitons___EfL28","memberManager":"memberManager___PqXmq","menu":"menu___b2bjV","topScores":"topScores___tCh6O","first":"first___nhTZp","second":"second___Ko9yk","three":"three___uN_GB","dropmenu":"dropmenu___Ijy35","tabs":"tabs___wLrrY","rightAction":"rightAction___PwBiG","ruleWrap":"ruleWrap___o2oRs"});
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(67390);
|
|
|
// 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/components/ScoreComponents.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('zh-cn');
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var classroomList = _ref.classroomList,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var detailCourseStatisticsList = classroomList.detailCourseStatisticsList;
|
|
|
var top_scores = detailCourseStatisticsList.top_scores;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
style: {
|
|
|
minHeight: 200
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
spinning: loading.effects['classroomList/getCourseStatistics'],
|
|
|
children: [top_scores == '' && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), top_scores && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: [Statisticsmodules.topScores].join(' '),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
justify: "center",
|
|
|
align: "middle",
|
|
|
children: [top_scores[3] && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
span: 3,
|
|
|
className: "tc",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(top_scores[3]['avatar_url']),
|
|
|
alt: ""
|
|
|
})
|
|
|
}), top_scores[1] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 5,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(top_scores[1]['avatar_url']),
|
|
|
alt: ""
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: Statisticsmodules.second,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {})
|
|
|
})]
|
|
|
}), top_scores[0] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 5,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(top_scores[0]['avatar_url']),
|
|
|
alt: ""
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: Statisticsmodules.first,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {})
|
|
|
})]
|
|
|
}), top_scores[2] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 5,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(top_scores[2]['avatar_url']),
|
|
|
alt: ""
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: Statisticsmodules.three,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {})
|
|
|
})]
|
|
|
}), top_scores[4] && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
span: 3,
|
|
|
className: "tc",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(top_scores[4]['avatar_url']),
|
|
|
alt: ""
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), top_scores && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: [Statisticsmodules.topScores].join(' '),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
justify: "center",
|
|
|
align: "middle",
|
|
|
className: "pt10 pb20",
|
|
|
children: [top_scores[3] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 3,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "username",
|
|
|
children: top_scores[3]['user_name']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "4th"
|
|
|
})]
|
|
|
}), top_scores[1] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 5,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "username",
|
|
|
children: top_scores[1]['user_name']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "2nd"
|
|
|
})]
|
|
|
}), top_scores[0] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 5,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "username",
|
|
|
children: top_scores[0]['user_name']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "1st"
|
|
|
})]
|
|
|
}), top_scores[2] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 5,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "username",
|
|
|
children: top_scores[2]['user_name']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "3rd"
|
|
|
})]
|
|
|
}), top_scores[4] && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
span: 3,
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "username",
|
|
|
children: top_scores[4]['user_name']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "5th"
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ScoreComponents = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
|
var classroomList = _ref2.classroomList,
|
|
|
loading = _ref2.loading;
|
|
|
return {
|
|
|
classroomList: classroomList,
|
|
|
loading: loading
|
|
|
};
|
|
|
})(ShixunsListPage));
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
|
var input_number = __webpack_require__(5871);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
|
var skeleton = __webpack_require__(61621);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
|
var es_radio = __webpack_require__(5112);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(35325);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/components/LearningAnalysis/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var LearningAnalysismodules = ({"flex_box_center":"flex_box_center___TgVxN","flex_space_between":"flex_space_between___tsrv2","flex_box_vertical_center":"flex_box_vertical_center___X6J2a","flex_box_center_end":"flex_box_center_end___oVAuL","flex_box_column":"flex_box_column___IOvzR","bg":"bg___gJnOP","add":"add___qnAqO","btn":"btn___tlkiy","setting":"setting___IcAPy","actionBtn":"actionBtn___gQWdv","head":"head___Ndmea","left":"left___qdx9f","lli":"lli___rjlNl","line":"line___qf5MC","active":"active___ONStP","right":"right___TOAr0","top":"top___Xjvfk","rli":"rli___NdIi1","name":"name___luU6N","weight":"weight___KEDj9","listWrap":"listWrap___RSFI7","li":"li___AVmMQ","des":"des___WVdQ8","error":"error___Ta8mF"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/components/LearningAnalysis/AchievementList/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var AchievementListmodules = ({"flex_box_center":"flex_box_center___H73AO","flex_space_between":"flex_space_between___UnPDM","flex_box_vertical_center":"flex_box_vertical_center___t3O0_","flex_box_center_end":"flex_box_center_end___KOIpc","flex_box_column":"flex_box_column___wvuyo","bg":"bg___vtRyz","setting":"setting___YK6mx","box":"box___UrJxk","title":"title___Wf0rf"});
|
|
|
// 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/authority.ts
|
|
|
var authority = __webpack_require__(13277);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/components/LearningAnalysis/AchievementList/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["fixed"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var AchievementList = function AchievementList(_ref) {
|
|
|
var _data$table_course_ta;
|
|
|
var loading = _ref.loading,
|
|
|
setLoading = _ref.setLoading,
|
|
|
onFeedback = _ref.onFeedback,
|
|
|
onRefresh = _ref.onRefresh,
|
|
|
groupIds = _ref.groupIds;
|
|
|
var urlParams = (0,_umi_production_exports.useParams)();
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
group_ids: groupIds
|
|
|
}),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
tableLoading = _useState4[0],
|
|
|
setTableLoading = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
total = _useState6[0],
|
|
|
setTotal = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)({}),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
data = _useState8[0],
|
|
|
setData = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
list = _useState10[0],
|
|
|
setList = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
columns = _useState12[0],
|
|
|
setColumns = _useState12[1];
|
|
|
var initColumns = [{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'real_name',
|
|
|
align: 'left',
|
|
|
width: 120,
|
|
|
ellipsis: true,
|
|
|
fixed: 'left',
|
|
|
render: function render(text, item) {
|
|
|
return item.is_click ? /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
style: {
|
|
|
color: '#0152d9'
|
|
|
},
|
|
|
href: "/classrooms/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/StudentSituation/").concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.categoryId, "/").concat(item.login),
|
|
|
target: "_blank",
|
|
|
children: text
|
|
|
}) : text;
|
|
|
}
|
|
|
}, {
|
|
|
title: '分班',
|
|
|
dataIndex: 'group_name',
|
|
|
width: 130,
|
|
|
ellipsis: true,
|
|
|
fixed: 'left'
|
|
|
}, {
|
|
|
title: '达成度',
|
|
|
align: 'center',
|
|
|
width: 110,
|
|
|
fixed: 'left',
|
|
|
dataIndex: 'rate',
|
|
|
render: function render(text) {
|
|
|
return text + '%';
|
|
|
}
|
|
|
}];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
params.group_ids = groupIds;
|
|
|
params.page = 1;
|
|
|
params.limit = 10;
|
|
|
setParams(objectSpread2_default()({}, params));
|
|
|
getData(params, true);
|
|
|
}, [JSON.stringify(groupIds)]);
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(record) {
|
|
|
var isFirstLoad,
|
|
|
res,
|
|
|
_res$course_members,
|
|
|
_res$table_course_tar,
|
|
|
newColumns,
|
|
|
copyInitColumns,
|
|
|
newList,
|
|
|
_args = arguments;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
isFirstLoad = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
|
|
|
if (isFirstLoad) {
|
|
|
setLoading(true);
|
|
|
} else {
|
|
|
setTableLoading(true);
|
|
|
}
|
|
|
_context.next = 4;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/list.json"), {
|
|
|
method: 'get',
|
|
|
params: record
|
|
|
});
|
|
|
case 4:
|
|
|
res = _context.sent;
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) !== -1)) {
|
|
|
_context.next = 19;
|
|
|
break;
|
|
|
}
|
|
|
if (!isFirstLoad) {
|
|
|
_context.next = 14;
|
|
|
break;
|
|
|
}
|
|
|
if (res !== null && res !== void 0 && res.is_set_target) {
|
|
|
_context.next = 10;
|
|
|
break;
|
|
|
}
|
|
|
onFeedback(objectSpread2_default()({}, res));
|
|
|
return _context.abrupt("return");
|
|
|
case 10:
|
|
|
//拼接表格头部
|
|
|
newColumns = res === null || res === void 0 || (_res$table_course_tar = res.table_course_targets) === null || _res$table_course_tar === void 0 ? void 0 : _res$table_course_tar.map(function (e) {
|
|
|
var p = {
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "tl",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: e.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u5360\u6BD4\uFF1A", e.rate, "%"]
|
|
|
})]
|
|
|
}),
|
|
|
dataIndex: e.id,
|
|
|
align: 'left',
|
|
|
render: function render(text) {
|
|
|
return text + '%';
|
|
|
}
|
|
|
};
|
|
|
return p;
|
|
|
});
|
|
|
copyInitColumns = initColumns.map(function (e) {
|
|
|
if (!(newColumns !== null && newColumns !== void 0 && newColumns.length)) {
|
|
|
var fixed = e.fixed,
|
|
|
k = objectWithoutProperties_default()(e, _excluded);
|
|
|
return k;
|
|
|
}
|
|
|
return e;
|
|
|
});
|
|
|
setData(objectSpread2_default()({}, res));
|
|
|
setColumns([].concat(toConsumableArray_default()(copyInitColumns), toConsumableArray_default()(newColumns)));
|
|
|
case 14:
|
|
|
//拼接的表格头部渲染数据
|
|
|
newList = res === null || res === void 0 || (_res$course_members = res.course_members) === null || _res$course_members === void 0 ? void 0 : _res$course_members.map(function (e) {
|
|
|
var _e$course_target_user;
|
|
|
var p = objectSpread2_default()({}, e);
|
|
|
e === null || e === void 0 || (_e$course_target_user = e.course_target_users) === null || _e$course_target_user === void 0 || _e$course_target_user.forEach(function (k) {
|
|
|
p[k.course_target_id] = k.rate;
|
|
|
});
|
|
|
return p;
|
|
|
});
|
|
|
setList(newList);
|
|
|
setTotal((res === null || res === void 0 ? void 0 : res.total_count) || 0);
|
|
|
setLoading(false);
|
|
|
setTableLoading(false);
|
|
|
case 19:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleChangePage = function handleChangePage(param) {
|
|
|
params.page = param.current;
|
|
|
params.limit = param.pageSize;
|
|
|
setParams(objectSpread2_default()({}, params));
|
|
|
getData(params);
|
|
|
};
|
|
|
var option = function option() {
|
|
|
var _data$statistics_data, _data$statistics_data2;
|
|
|
var series = [{
|
|
|
name: '',
|
|
|
type: 'bar',
|
|
|
barGap: 1,
|
|
|
barWidth: 4,
|
|
|
color: '#07C160',
|
|
|
itemStyle: {
|
|
|
barBorderRadius: [4, 4, 0, 0]
|
|
|
}
|
|
|
}, {
|
|
|
name: '',
|
|
|
type: 'bar',
|
|
|
barGap: 1,
|
|
|
barWidth: 4,
|
|
|
color: '#145DFF',
|
|
|
itemStyle: {
|
|
|
barBorderRadius: [4, 4, 0, 0]
|
|
|
}
|
|
|
}, {
|
|
|
name: '',
|
|
|
type: 'bar',
|
|
|
barGap: 1,
|
|
|
barWidth: 4,
|
|
|
color: '#7296B0',
|
|
|
itemStyle: {
|
|
|
barBorderRadius: [4, 4, 0, 0]
|
|
|
}
|
|
|
}, {
|
|
|
name: '',
|
|
|
type: 'bar',
|
|
|
barGap: 1,
|
|
|
barWidth: 4,
|
|
|
color: '#193062',
|
|
|
itemStyle: {
|
|
|
barBorderRadius: [4, 4, 0, 0]
|
|
|
}
|
|
|
}, {
|
|
|
name: '',
|
|
|
type: 'bar',
|
|
|
barGap: 1,
|
|
|
barWidth: 4,
|
|
|
color: '#EB624C',
|
|
|
itemStyle: {
|
|
|
barBorderRadius: [4, 4, 0, 0]
|
|
|
}
|
|
|
}, {
|
|
|
name: '',
|
|
|
type: 'bar',
|
|
|
barGap: 1,
|
|
|
barWidth: 4,
|
|
|
color: '#FF9D18',
|
|
|
itemStyle: {
|
|
|
barBorderRadius: [4, 4, 0, 0]
|
|
|
}
|
|
|
}];
|
|
|
var realName = [];
|
|
|
series = data === null || data === void 0 || (_data$statistics_data = data.statistics_data) === null || _data$statistics_data === void 0 || (_data$statistics_data = _data$statistics_data.name) === null || _data$statistics_data === void 0 ? void 0 : _data$statistics_data.map(function (name, i) {
|
|
|
realName.push(name);
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, series[i]), {}, {
|
|
|
name: String(i)
|
|
|
});
|
|
|
});
|
|
|
return {
|
|
|
legend: {
|
|
|
top: 0,
|
|
|
right: 0,
|
|
|
icon: "circle",
|
|
|
itemWidth: 6,
|
|
|
itemGap: 12,
|
|
|
formatter: function formatter(name) {
|
|
|
if (!name) return '';
|
|
|
var dealName = realName[Number(name)] || '';
|
|
|
console.log(name, dealName, 222);
|
|
|
if (dealName.length > 5) {
|
|
|
dealName = dealName.slice(0, 5) + '...';
|
|
|
}
|
|
|
return dealName;
|
|
|
}
|
|
|
},
|
|
|
grid: {
|
|
|
top: 40,
|
|
|
left: '2%',
|
|
|
right: 0,
|
|
|
bottom: 0,
|
|
|
containLabel: true
|
|
|
},
|
|
|
tooltip: {
|
|
|
formatter: function formatter(params) {
|
|
|
console.log(params, 'params');
|
|
|
var result = realName[params.seriesIndex] || '';
|
|
|
result += "<br/>";
|
|
|
result += params.marker;
|
|
|
result += params.name + ":";
|
|
|
result += params.value[params.seriesIndex + 1];
|
|
|
return result;
|
|
|
}
|
|
|
},
|
|
|
dataset: {
|
|
|
source: (data === null || data === void 0 || (_data$statistics_data2 = data.statistics_data) === null || _data$statistics_data2 === void 0 ? void 0 : _data$statistics_data2.source) || []
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
axisTick: {
|
|
|
show: false
|
|
|
},
|
|
|
axisLabel: {
|
|
|
textStyle: {
|
|
|
color: "#999999" //Y轴内容文字颜色
|
|
|
}
|
|
|
},
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#E5E5E5' // 设置轴线及文字颜色
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
yAxis: {
|
|
|
axisTick: {
|
|
|
show: false
|
|
|
},
|
|
|
axisLabel: {
|
|
|
textStyle: {
|
|
|
color: "#999999" //Y轴内容文字颜色
|
|
|
}
|
|
|
},
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#E5E5E5' // 设置轴线及文字颜色
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
series: series
|
|
|
};
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: AchievementListmodules.bg,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt20 mb20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font14 c-grey-666 mr25",
|
|
|
children: ["\u672C\u6B21\u6570\u636E\u66F4\u65B0\u65F6\u95F4\uFF1A", data === null || data === void 0 ? void 0 : data.updated_at]
|
|
|
}), !(0,authority/* isStudent */.dE)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
onClick: function onClick() {
|
|
|
onRefresh(function () {
|
|
|
return getData(params, true);
|
|
|
});
|
|
|
},
|
|
|
className: "font14 c-light-primary current",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-shuaxin3 mr10"
|
|
|
}), "\u5237\u65B0\u6570\u636E"]
|
|
|
})]
|
|
|
}), !(0,authority/* isStudent */.dE)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: AchievementListmodules.setting,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u76EE\u6807\u5E73\u5747\u8FBE\u6210\u5EA6"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("b", {
|
|
|
children: [data === null || data === void 0 ? void 0 : data.average_rate, "%"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
onClick: function onClick() {
|
|
|
onFeedback(objectSpread2_default()({}, data));
|
|
|
},
|
|
|
children: "\u8BBE\u7F6E\u8FBE\u6210\u5EA6\u6784\u6210"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: AchievementListmodules.box,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: AchievementListmodules.title,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), "\u8FBE\u6210\u5EA6\u533A\u95F4"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
notMerge: true,
|
|
|
option: option(),
|
|
|
style: {
|
|
|
width: 700,
|
|
|
height: 170
|
|
|
}
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
marginTop: 36,
|
|
|
marginBottom: 16
|
|
|
},
|
|
|
children: ["\u5B66\u5458\u8FBE\u6210\u60C5\u51B5", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml10 font12 c-grey-999",
|
|
|
children: "\uFF08\u70B9\u51FB\u5B66\u751F\u59D3\u540D\u53EF\u4EE5\u67E5\u770B\u5B66\u751F\u76EE\u6807\u8FBE\u6210\u8BE6\u60C5\uFF09"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
dataSource: list,
|
|
|
columns: columns,
|
|
|
onChange: handleChangePage,
|
|
|
loading: tableLoading,
|
|
|
pagination: {
|
|
|
pageSize: params.limit,
|
|
|
total: total,
|
|
|
current: params.page,
|
|
|
showQuickJumper: true,
|
|
|
showSizeChanger: true,
|
|
|
size: "default",
|
|
|
position: ["bottomCenter"],
|
|
|
showTotal: function showTotal(total) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr10",
|
|
|
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: total
|
|
|
}), "\u6761\u6570\u636E"]
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
scroll: {
|
|
|
x: data !== null && data !== void 0 && (_data$table_course_ta = data.table_course_targets) !== null && _data$table_course_ta !== void 0 && _data$table_course_ta.length ? 'max-content' : true
|
|
|
}
|
|
|
// {...(data?.table_course_targets?.length ? { scroll: { x: 'max-content' } } : {})}
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var LearningAnalysis_AchievementList = (AchievementList);
|
|
|
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
|
|
|
var lodash = __webpack_require__(89392);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-virtual-list@3.18.6@rc-virtual-list/es/index.js + 17 modules
|
|
|
var es = __webpack_require__(65283);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/components/LearningAnalysis/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var LearningAnalysis = function LearningAnalysis(_ref) {
|
|
|
var _weightData$course_ta3, _createData$name, _weightData$course_ta4;
|
|
|
var globalSetting = _ref.globalSetting,
|
|
|
dispatch = _ref.dispatch,
|
|
|
groupIds = _ref.groupIds;
|
|
|
var urlParams = (0,_umi_production_exports.useParams)();
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
loading = _useState2[0],
|
|
|
setLoading = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
rightLoading = _useState4[0],
|
|
|
setRightLoading = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(3),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
active = _useState6[0],
|
|
|
setActive = _useState6[1];
|
|
|
var initModuleData = (0,_react_17_0_2_react.useRef)([]);
|
|
|
var saveTargetsData = (0,_react_17_0_2_react.useRef)(null);
|
|
|
|
|
|
//添加课堂目标
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
createVisible = _useState8[0],
|
|
|
setCreateVisible = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
createLoading = _useState10[0],
|
|
|
setCreateLoading = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)({
|
|
|
edit: false,
|
|
|
name: '',
|
|
|
rate: 0
|
|
|
}),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
createData = _useState12[0],
|
|
|
setCreateData = _useState12[1];
|
|
|
|
|
|
//添加课堂模块
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
moduleVisible = _useState14[0],
|
|
|
setModuleVisible = _useState14[1];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
moduleLoading = _useState16[0],
|
|
|
setModuleLoading = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
moduleData = _useState18[0],
|
|
|
setModuleData = _useState18[1];
|
|
|
|
|
|
//权重设置
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
weightVisible = _useState20[0],
|
|
|
setWeightVisible = _useState20[1];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
weightLoading = _useState22[0],
|
|
|
setWeightLoading = _useState22[1];
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
weightListLoading = _useState24[0],
|
|
|
setWeightListLoading = _useState24[1];
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)({}),
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
weightData = _useState26[0],
|
|
|
setWeightData = _useState26[1];
|
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
all = _useState28[0],
|
|
|
setAll = _useState28[1];
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
error = _useState30[0],
|
|
|
setError = _useState30[1];
|
|
|
|
|
|
//左边控制
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
leftMenus = _useState32[0],
|
|
|
setLeftMenus = _useState32[1];
|
|
|
var _useState33 = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
|
leftMenusActive = _useState34[0],
|
|
|
setLeftMenusActive = _useState34[1];
|
|
|
var _useState35 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState36 = slicedToArray_default()(_useState35, 2),
|
|
|
leftMenusTotal = _useState36[0],
|
|
|
setLeftMenusTotal = _useState36[1];
|
|
|
|
|
|
//右边控制
|
|
|
var _useState37 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState38 = slicedToArray_default()(_useState37, 2),
|
|
|
rightMenus = _useState38[0],
|
|
|
setRightMenus = _useState38[1];
|
|
|
var _useState39 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState40 = slicedToArray_default()(_useState39, 2),
|
|
|
rightMenusTotal = _useState40[0],
|
|
|
setRightMenusTotal = _useState40[1];
|
|
|
var virtual = (0,_react_17_0_2_react.useRef)(null);
|
|
|
var listWrap = (0,_react_17_0_2_react.useRef)(null);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (!!leftMenusActive) {
|
|
|
getModuleData(leftMenusActive);
|
|
|
}
|
|
|
}, [leftMenusActive]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (listWrap.current && !weightListLoading) {
|
|
|
var _listWrap$current;
|
|
|
var dom = listWrap === null || listWrap === void 0 || (_listWrap$current = listWrap.current) === null || _listWrap$current === void 0 ? void 0 : _listWrap$current.querySelector('.rc-virtual-list-scrollbar');
|
|
|
dom === null || dom === void 0 || dom.addEventListener('click', handleBarClick);
|
|
|
console.log(dom, 'uuu2');
|
|
|
return function () {
|
|
|
dom === null || dom === void 0 || dom.removeEventListener('click', handleBarClick);
|
|
|
};
|
|
|
}
|
|
|
}, [listWrap.current, weightListLoading, weightData]);
|
|
|
var initType = [{
|
|
|
name: '实训作业',
|
|
|
key: 'shixun_homework',
|
|
|
num: null,
|
|
|
preNum: null,
|
|
|
total: 0,
|
|
|
select: 0,
|
|
|
show: false
|
|
|
}, {
|
|
|
name: '普通作业',
|
|
|
key: 'common_homework',
|
|
|
num: null,
|
|
|
preNum: null,
|
|
|
total: 0,
|
|
|
select: 0,
|
|
|
show: false
|
|
|
}, {
|
|
|
name: '分组作业',
|
|
|
key: 'group_homework',
|
|
|
num: null,
|
|
|
preNum: null,
|
|
|
total: 0,
|
|
|
select: 0,
|
|
|
show: false
|
|
|
}, {
|
|
|
name: '编程作业',
|
|
|
key: 'program_homework',
|
|
|
num: null,
|
|
|
preNum: null,
|
|
|
total: 0,
|
|
|
select: 0,
|
|
|
show: false
|
|
|
}, {
|
|
|
name: '在线考试',
|
|
|
key: 'exercise',
|
|
|
num: null,
|
|
|
preNum: null,
|
|
|
total: 0,
|
|
|
select: 0,
|
|
|
show: false
|
|
|
}, {
|
|
|
name: '视频直播',
|
|
|
num: null,
|
|
|
preNum: null,
|
|
|
total: 0,
|
|
|
select: 0,
|
|
|
key: 'video',
|
|
|
show: false
|
|
|
}, {
|
|
|
name: '课堂签到',
|
|
|
key: 'attendance',
|
|
|
num: null,
|
|
|
preNum: null,
|
|
|
total: 0,
|
|
|
select: 0,
|
|
|
show: false
|
|
|
}];
|
|
|
var handleBarClick = function handleBarClick(e) {
|
|
|
var _e$target$classList;
|
|
|
if ((_e$target$classList = e.target.classList) !== null && _e$target$classList !== void 0 && _e$target$classList.contains('rc-virtual-list-scrollbar')) {
|
|
|
var _weightData$course_ta;
|
|
|
var len = (weightData === null || weightData === void 0 || (_weightData$course_ta = weightData.course_target_module_records) === null || _weightData$course_ta === void 0 ? void 0 : _weightData$course_ta.length) || 0;
|
|
|
var tan = parseInt(len * 80 * e.offsetY / 430);
|
|
|
virtual.current.scrollTo(tan);
|
|
|
}
|
|
|
};
|
|
|
var getTargetsData = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var res, _res$course_targets3, item, _res$course_targets, _res$course_targets2;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
setLoading(true);
|
|
|
_context.next = 3;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets.json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) !== -1) {
|
|
|
//7个类别给后台传的名字,可能存在修改的情况
|
|
|
item = initType.map(function (e) {
|
|
|
var _res$course_modules;
|
|
|
var p = res === null || res === void 0 || (_res$course_modules = res.course_modules) === null || _res$course_modules === void 0 ? void 0 : _res$course_modules.find(function (k) {
|
|
|
return k.module_type === e.key;
|
|
|
});
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
|
|
name: p.module_name
|
|
|
});
|
|
|
});
|
|
|
initModuleData.current = item;
|
|
|
if (!leftMenusActive) {
|
|
|
setLeftMenusActive((res === null || res === void 0 || (_res$course_targets = res.course_targets) === null || _res$course_targets === void 0 || (_res$course_targets = _res$course_targets[0]) === null || _res$course_targets === void 0 ? void 0 : _res$course_targets.id) || '');
|
|
|
if (res !== null && res !== void 0 && (_res$course_targets2 = res.course_targets) !== null && _res$course_targets2 !== void 0 && (_res$course_targets2 = _res$course_targets2[0]) !== null && _res$course_targets2 !== void 0 && _res$course_targets2.id) {
|
|
|
saveTargetsData.current = objectSpread2_default()({}, res);
|
|
|
} else {
|
|
|
setRightMenus([]);
|
|
|
setRightMenusTotal('-');
|
|
|
}
|
|
|
}
|
|
|
setLeftMenus(res === null || res === void 0 || (_res$course_targets3 = res.course_targets) === null || _res$course_targets3 === void 0 ? void 0 : _res$course_targets3.map(function (e) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
|
|
preRate: e.rate
|
|
|
});
|
|
|
}));
|
|
|
setLeftMenusTotal(res === null || res === void 0 ? void 0 : res.rate_sum);
|
|
|
setLoading(false);
|
|
|
}
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getTargetsData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getModuleData = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(id) {
|
|
|
var _res;
|
|
|
var bool,
|
|
|
res,
|
|
|
_res2,
|
|
|
li,
|
|
|
item,
|
|
|
totalScore,
|
|
|
_args2 = arguments;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
bool = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : false;
|
|
|
if (bool) {
|
|
|
setLoading(true);
|
|
|
} else {
|
|
|
setRightLoading(true);
|
|
|
}
|
|
|
if (!saveTargetsData.current) {
|
|
|
_context2.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
res = saveTargetsData.current;
|
|
|
_context2.next = 9;
|
|
|
break;
|
|
|
case 6:
|
|
|
_context2.next = 8;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets.json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
case 8:
|
|
|
res = _context2.sent;
|
|
|
case 9:
|
|
|
if (((_res = res) === null || _res === void 0 ? void 0 : _res.status) !== -1) {
|
|
|
li = (_res2 = res) === null || _res2 === void 0 || (_res2 = _res2.course_targets) === null || _res2 === void 0 || (_res2 = _res2.find(function (e) {
|
|
|
return e.id === id;
|
|
|
})) === null || _res2 === void 0 ? void 0 : _res2.course_target_modules; //选中的数据
|
|
|
//拼成前端是数据格式
|
|
|
item = (0,lodash.cloneDeep)(initModuleData.current).map(function (e) {
|
|
|
var p = li === null || li === void 0 ? void 0 : li.find(function (k) {
|
|
|
return k.module_type === e.key;
|
|
|
});
|
|
|
if (p) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
|
|
id: p.id,
|
|
|
num: p.rate,
|
|
|
preNum: p.rate,
|
|
|
total: p.record_count,
|
|
|
select: p.enable_record_count,
|
|
|
show: true
|
|
|
});
|
|
|
}
|
|
|
return e;
|
|
|
});
|
|
|
setRightMenus(item);
|
|
|
totalScore = item.reduce(function (pre, cur) {
|
|
|
return pre + (cur.num || 0);
|
|
|
}, 0);
|
|
|
setRightMenusTotal(Math.round(totalScore));
|
|
|
}
|
|
|
saveTargetsData.current = null;
|
|
|
setRightLoading(false);
|
|
|
setLoading(false);
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function getModuleData(_x) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var targetsBlurEdit = /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(gather) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
setLoading(true);
|
|
|
_context3.next = 3;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/").concat(gather.id, ".json"), {
|
|
|
method: 'put',
|
|
|
body: {
|
|
|
name: gather.name,
|
|
|
rate: gather.rate
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context3.sent;
|
|
|
if (res) {
|
|
|
getTargetsData();
|
|
|
}
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function targetsBlurEdit(_x2) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var moduleBlurEdit = /*#__PURE__*/function () {
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(gather) {
|
|
|
var bool,
|
|
|
body,
|
|
|
_gather$course_target,
|
|
|
res,
|
|
|
_args4 = arguments;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
bool = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : false;
|
|
|
body = {};
|
|
|
if (bool) {
|
|
|
body.rate = gather.num;
|
|
|
setLoading(true);
|
|
|
} else {
|
|
|
setRightLoading(true);
|
|
|
body.custom_rate = gather.custom_rate;
|
|
|
body.course_target_module_records = gather === null || gather === void 0 || (_gather$course_target = gather.course_target_module_records) === null || _gather$course_target === void 0 ? void 0 : _gather$course_target.map(function (e) {
|
|
|
return {
|
|
|
id: e.id,
|
|
|
status: e.status,
|
|
|
rate: e.rate
|
|
|
};
|
|
|
});
|
|
|
if ((gather === null || gather === void 0 ? void 0 : gather.module_type) === 'attendance') {
|
|
|
body.normal = gather.normal;
|
|
|
body.late = gather.late;
|
|
|
body.early = gather.early;
|
|
|
body.leave = gather.leave;
|
|
|
body.absence = gather.absence;
|
|
|
}
|
|
|
}
|
|
|
_context4.next = 5;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/").concat(leftMenusActive, "/course_target_modules/").concat(gather.id, ".json"), {
|
|
|
method: 'put',
|
|
|
body: body
|
|
|
});
|
|
|
case 5:
|
|
|
res = _context4.sent;
|
|
|
if (res) {
|
|
|
getModuleData(leftMenusActive, bool);
|
|
|
}
|
|
|
//设置弹框需要
|
|
|
setWeightLoading(false);
|
|
|
setWeightVisible(false);
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return function moduleBlurEdit(_x3) {
|
|
|
return _ref5.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleCreateModal = /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
if (createData !== null && createData !== void 0 && createData.name) {
|
|
|
_context5.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('请输入目标名称');
|
|
|
return _context5.abrupt("return");
|
|
|
case 3:
|
|
|
setCreateLoading(true);
|
|
|
res = {};
|
|
|
if (!createData.id) {
|
|
|
_context5.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
_context5.next = 8;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/").concat(createData.id, ".json"), {
|
|
|
method: 'put',
|
|
|
body: {
|
|
|
name: createData.name,
|
|
|
rate: createData.rate
|
|
|
}
|
|
|
});
|
|
|
case 8:
|
|
|
res = _context5.sent;
|
|
|
_context5.next = 14;
|
|
|
break;
|
|
|
case 11:
|
|
|
_context5.next = 13;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets.json"), {
|
|
|
method: 'post',
|
|
|
body: {
|
|
|
name: createData.name,
|
|
|
rate: createData.rate
|
|
|
}
|
|
|
});
|
|
|
case 13:
|
|
|
res = _context5.sent;
|
|
|
case 14:
|
|
|
if (res.status === 0) {
|
|
|
setCreateVisible(false);
|
|
|
setActive(2);
|
|
|
getTargetsData();
|
|
|
}
|
|
|
setCreateLoading(false);
|
|
|
case 16:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return function handleCreateModal() {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleModuleModal = /*#__PURE__*/function () {
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
setModuleLoading(true);
|
|
|
_context6.next = 3;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/").concat(leftMenusActive, "/course_target_modules.json"), {
|
|
|
method: 'post',
|
|
|
body: {
|
|
|
module_type: moduleData.filter(function (e) {
|
|
|
return e.checked && !e.show;
|
|
|
}).map(function (e) {
|
|
|
return e.key;
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context6.sent;
|
|
|
if (res.status === 0) {
|
|
|
setModuleVisible(false);
|
|
|
getModuleData(leftMenusActive);
|
|
|
}
|
|
|
setModuleLoading(false);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function handleModuleModal() {
|
|
|
return _ref7.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleWeightModal = /*#__PURE__*/function () {
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
var _weightData$course_ta2, course_target_module_records, items, totalScore, bool;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
_weightData$course_ta2 = weightData.course_target_module_records, course_target_module_records = _weightData$course_ta2 === void 0 ? [] : _weightData$course_ta2;
|
|
|
items = course_target_module_records.filter(function (e) {
|
|
|
return e.status;
|
|
|
});
|
|
|
totalScore = items.reduce(function (pre, cur) {
|
|
|
return pre + Number(cur.rate || 0);
|
|
|
}, 0);
|
|
|
if (items.length) {
|
|
|
_context7.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('请选择考察的内容');
|
|
|
return _context7.abrupt("return");
|
|
|
case 6:
|
|
|
if (!(Math.round(totalScore) !== 100)) {
|
|
|
_context7.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('权重总和必须等于100%');
|
|
|
return _context7.abrupt("return");
|
|
|
case 9:
|
|
|
bool = items.some(function (e) {
|
|
|
return e.status && (e.rate === '' || e.rate === null);
|
|
|
});
|
|
|
if (!bool) {
|
|
|
_context7.next = 14;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('选中的内容权重为必填');
|
|
|
setError(true);
|
|
|
return _context7.abrupt("return");
|
|
|
case 14:
|
|
|
setWeightLoading(true);
|
|
|
moduleBlurEdit(weightData);
|
|
|
case 16:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}));
|
|
|
return function handleWeightModal() {
|
|
|
return _ref8.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleWeight = /*#__PURE__*/function () {
|
|
|
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(e) {
|
|
|
var res, _res$course_target_mo, bool;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
setWeightVisible(true);
|
|
|
setWeightListLoading(true);
|
|
|
_context8.next = 4;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/").concat(leftMenusActive, "/course_target_modules/").concat(e.id, "/list.json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
case 4:
|
|
|
res = _context8.sent;
|
|
|
if (res) {
|
|
|
//模拟测试多数据
|
|
|
// const item: any = [...res?.course_target_module_records];
|
|
|
// res?.course_target_module_records?.forEach((k: any) => {
|
|
|
// item.push({...k, id: k.id*2})
|
|
|
// });
|
|
|
// setWeightData({ ...res, course_target_module_records: item });
|
|
|
setWeightData(objectSpread2_default()({}, res));
|
|
|
bool = res === null || res === void 0 || (_res$course_target_mo = res.course_target_module_records) === null || _res$course_target_mo === void 0 ? void 0 : _res$course_target_mo.every(function (k) {
|
|
|
return k.status;
|
|
|
});
|
|
|
setAll(bool);
|
|
|
setWeightListLoading(false);
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
}));
|
|
|
return function handleWeight(_x4) {
|
|
|
return _ref9.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleWeightEdit = function handleWeightEdit(key, e, index) {
|
|
|
var _newWeightData;
|
|
|
var newWeightData = (0,lodash.cloneDeep)(weightData);
|
|
|
if (typeof index === 'number') {
|
|
|
newWeightData.course_target_module_records[index][key] = e;
|
|
|
} else {
|
|
|
newWeightData[key] = e;
|
|
|
}
|
|
|
var bool = (_newWeightData = newWeightData) === null || _newWeightData === void 0 || (_newWeightData = _newWeightData.course_target_module_records) === null || _newWeightData === void 0 ? void 0 : _newWeightData.every(function (k) {
|
|
|
return k.status;
|
|
|
});
|
|
|
newWeightData = calculated(newWeightData);
|
|
|
setAll(bool);
|
|
|
setError(false);
|
|
|
setWeightData(newWeightData);
|
|
|
};
|
|
|
var handleAll = function handleAll(e) {
|
|
|
var _newWeightData$course;
|
|
|
var newWeightData = (0,lodash.cloneDeep)(weightData);
|
|
|
(_newWeightData$course = newWeightData.course_target_module_records) === null || _newWeightData$course === void 0 || _newWeightData$course.forEach(function (k) {
|
|
|
return k.status = e.target.checked;
|
|
|
});
|
|
|
newWeightData = calculated(newWeightData);
|
|
|
setWeightData(newWeightData);
|
|
|
setAll(e.target.checked);
|
|
|
setError(false);
|
|
|
};
|
|
|
var calculated = function calculated() {
|
|
|
var record = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
|
var _record$course_target = record.course_target_module_records,
|
|
|
course_target_module_records = _record$course_target === void 0 ? [] : _record$course_target,
|
|
|
custom_rate = record.custom_rate;
|
|
|
if (!custom_rate) {
|
|
|
var len = course_target_module_records.filter(function (k) {
|
|
|
return k.status;
|
|
|
}).length;
|
|
|
var sum = 1;
|
|
|
var summation = 0;
|
|
|
// const ie: any = []
|
|
|
course_target_module_records.forEach(function (item, key) {
|
|
|
if (item.status) {
|
|
|
if (len === 1) {
|
|
|
var lastAverage = (1 - summation).toFixed(4);
|
|
|
item.rate = (lastAverage * 100).toFixed(2); //去浮点
|
|
|
// ie.push({ '分子': sum, '分母': len, '最后一个1减去的数字': summation, data: lastAverage, index: key })
|
|
|
}
|
|
|
if (len > 1) {
|
|
|
var average = (sum / len).toFixed(4);
|
|
|
len = len - 1;
|
|
|
sum = (sum - average).toFixed(4);
|
|
|
summation = (Number(summation) + Number(average)).toFixed(4); //去浮点
|
|
|
item.rate = (average * 100).toFixed(2); //去浮点
|
|
|
// ie.push({ '分子': sum, '分母': len, data: average, index: key })
|
|
|
}
|
|
|
// console.log(ie)
|
|
|
} else {
|
|
|
item.rate = 0;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
return record;
|
|
|
};
|
|
|
var handleFeedback = /*#__PURE__*/function () {
|
|
|
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(gather) {
|
|
|
var _gather$course_target2;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
case 0:
|
|
|
if (gather !== null && gather !== void 0 && (_gather$course_target2 = gather.course_targets) !== null && _gather$course_target2 !== void 0 && _gather$course_target2.length) {
|
|
|
_context9.next = 4;
|
|
|
break;
|
|
|
}
|
|
|
setActive(1);
|
|
|
setLoading(false);
|
|
|
return _context9.abrupt("return");
|
|
|
case 4:
|
|
|
setActive(2);
|
|
|
getTargetsData();
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context9.stop();
|
|
|
}
|
|
|
}, _callee9);
|
|
|
}));
|
|
|
return function handleFeedback(_x5) {
|
|
|
return _ref10.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(callback) {
|
|
|
var res, cb, job_id, fnc;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
|
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
|
case 0:
|
|
|
if (!(leftMenusTotal !== 100 && !callback)) {
|
|
|
_context11.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('课程目标占比需为100%');
|
|
|
return _context11.abrupt("return");
|
|
|
case 3:
|
|
|
dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: true,
|
|
|
text: '达成度计算中,请稍后...'
|
|
|
}
|
|
|
});
|
|
|
_context11.next = 6;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/calculate.json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
case 6:
|
|
|
res = _context11.sent;
|
|
|
cb = function cb() {
|
|
|
if (callback) {
|
|
|
callback();
|
|
|
} else {
|
|
|
setLeftMenusActive('');
|
|
|
setActive(3);
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: false,
|
|
|
text: '达成度计算中,请稍后...'
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
job_id = null;
|
|
|
fnc = /*#__PURE__*/function () {
|
|
|
var _ref12 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
|
var fncRes;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
|
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
|
case 0:
|
|
|
_context10.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/query_calculate.json"), {
|
|
|
method: 'get',
|
|
|
params: {
|
|
|
job_id: job_id
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
fncRes = _context10.sent;
|
|
|
if (fncRes.status === 0) {
|
|
|
cb();
|
|
|
}
|
|
|
if (fncRes.status === -3) {
|
|
|
setTimeout(fnc, 3000);
|
|
|
}
|
|
|
if (fncRes.status === -1) {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: false,
|
|
|
text: '达成度计算中,请稍后...'
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context10.stop();
|
|
|
}
|
|
|
}, _callee10);
|
|
|
}));
|
|
|
return function fnc() {
|
|
|
return _ref12.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
if (res.status === 0) {
|
|
|
cb();
|
|
|
}
|
|
|
if (res.status === -3) {
|
|
|
job_id = res.message;
|
|
|
fnc();
|
|
|
}
|
|
|
if (res.status === -1) {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: false,
|
|
|
text: '达成度计算中,请稍后...'
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context11.stop();
|
|
|
}
|
|
|
}, _callee11);
|
|
|
}));
|
|
|
return function handleFinish(_x6) {
|
|
|
return _ref11.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
//分配权重是否全部已选择
|
|
|
var moduleSurplus = moduleData === null || moduleData === void 0 ? void 0 : moduleData.every(function (e) {
|
|
|
return e.show;
|
|
|
});
|
|
|
|
|
|
//权重设置选择的个数
|
|
|
var weightDataSelectNum = (weightData === null || weightData === void 0 || (_weightData$course_ta3 = weightData.course_target_module_records) === null || _weightData$course_ta3 === void 0 || (_weightData$course_ta3 = _weightData$course_ta3.filter(function (k) {
|
|
|
return k.status;
|
|
|
})) === null || _weightData$course_ta3 === void 0 ? void 0 : _weightData$course_ta3.length) || 0;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: LearningAnalysismodules.bg,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
spinning: loading,
|
|
|
children: [active === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: LearningAnalysismodules.add,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
onClick: function onClick() {
|
|
|
return setCreateVisible(true);
|
|
|
},
|
|
|
className: LearningAnalysismodules.btn,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-tianjiashitixiaojiahao"
|
|
|
}), "\u6DFB\u52A0\u8BFE\u5802\u76EE\u6807"]
|
|
|
})
|
|
|
}), active === 2 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: LearningAnalysismodules.setting,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: LearningAnalysismodules.head,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u5269\u4F59\u8BFE\u5802\u76EE\u6807\u5360\u6BD4 ", 100 - leftMenusTotal, "%"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
onClick: function onClick() {
|
|
|
return handleFinish();
|
|
|
},
|
|
|
type: "primary",
|
|
|
children: "\u5B8C\u6210\u8BBE\u7F6E"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: LearningAnalysismodules.left,
|
|
|
children: [leftMenus === null || leftMenus === void 0 ? void 0 : leftMenus.map(function (e, i) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
onClick: function onClick() {
|
|
|
return setLeftMenusActive(e.id);
|
|
|
},
|
|
|
className: e.id === leftMenusActive ? "".concat(LearningAnalysismodules.lli, " ").concat(LearningAnalysismodules.active) : LearningAnalysismodules.lli,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: e.name,
|
|
|
children: e.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick(t) {
|
|
|
t.stopPropagation();
|
|
|
setCreateData(objectSpread2_default()({}, e));
|
|
|
setCreateVisible(true);
|
|
|
},
|
|
|
className: "iconfont icon-bianji9 font16"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick(t) {
|
|
|
t.stopPropagation();
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: '提示',
|
|
|
content: '请确认是否删除该课堂目标?',
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
case 0:
|
|
|
_context12.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/").concat(e.id, ".json"), {
|
|
|
method: 'delete'
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context12.sent;
|
|
|
if (res.status === 0) {
|
|
|
if (leftMenusActive === e.id) {
|
|
|
leftMenusActive = '';
|
|
|
}
|
|
|
getTargetsData();
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context12.stop();
|
|
|
}
|
|
|
}, _callee12);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
},
|
|
|
className: "iconfont icon-piliangshanchu3 ml10"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u5360\u6BD4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick(f) {
|
|
|
return f.stopPropagation();
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
onChange: function onChange(rate) {
|
|
|
var record = (0,lodash.cloneDeep)(leftMenus);
|
|
|
record[i].rate = rate;
|
|
|
setLeftMenus(record);
|
|
|
},
|
|
|
onBlur: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
|
|
|
var record, totalScore;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
|
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
|
case 0:
|
|
|
record = (0,lodash.cloneDeep)(leftMenus);
|
|
|
if (!(record[i].rate !== '' && typeof record[i].rate !== 'number')) {
|
|
|
_context13.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning("\u76EE\u6807\u5360\u6BD4\u9650\u5236\u8303\u56F4\u4E3A0~100%");
|
|
|
record[i].rate = record[i].preRate;
|
|
|
setRightMenus(record);
|
|
|
return _context13.abrupt("return");
|
|
|
case 6:
|
|
|
totalScore = leftMenus.reduce(function (pre, cur) {
|
|
|
return pre + (cur.rate || 0);
|
|
|
}, 0);
|
|
|
if (!(Math.round(totalScore) > 100)) {
|
|
|
_context13.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('多个课堂目标占比之和不能超过100%');
|
|
|
record[i].rate = record[i].preRate;
|
|
|
setLeftMenus(record);
|
|
|
return _context13.abrupt("return");
|
|
|
case 12:
|
|
|
// record[i].preRate = record[i].rate;
|
|
|
targetsBlurEdit(record[i]);
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context13.stop();
|
|
|
}
|
|
|
}, _callee13);
|
|
|
})),
|
|
|
style: {
|
|
|
width: 60
|
|
|
},
|
|
|
min: 0,
|
|
|
max: 100,
|
|
|
precision: 0,
|
|
|
value: e.rate,
|
|
|
className: "ml10 mr10"
|
|
|
})
|
|
|
}), "%"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: LearningAnalysismodules.line
|
|
|
})]
|
|
|
}, e.id);
|
|
|
}), leftMenus.length < 5 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
onClick: function onClick() {
|
|
|
return setCreateVisible(true);
|
|
|
},
|
|
|
className: LearningAnalysismodules.actionBtn,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-tianjiashitixiaojiahao"
|
|
|
}), "\u6DFB\u52A0\u8BFE\u5802\u76EE\u6807"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: LearningAnalysismodules.right,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
spinning: rightLoading,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
visibility: rightMenusTotal === '-' ? 'hidden' : 'visible'
|
|
|
},
|
|
|
className: LearningAnalysismodules.top,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u5269\u4F59\u5F85\u5206\u914D\u6743\u91CD ", 100 - rightMenusTotal, "%"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
var _cloneDeep;
|
|
|
setModuleVisible(true);
|
|
|
var newRightMenus = (_cloneDeep = (0,lodash.cloneDeep)(rightMenus)) === null || _cloneDeep === void 0 ? void 0 : _cloneDeep.map(function (e) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
|
|
checked: e.show
|
|
|
});
|
|
|
});
|
|
|
setModuleData(newRightMenus);
|
|
|
},
|
|
|
className: LearningAnalysismodules.actionBtn,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-tianjiashitixiaojiahao"
|
|
|
}), "\u6DFB\u52A0\u8BFE\u5802\u6A21\u5757"]
|
|
|
})]
|
|
|
}), rightMenus !== null && rightMenus !== void 0 && rightMenus.some(function (e) {
|
|
|
return e.show;
|
|
|
}) ? /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
children: rightMenus === null || rightMenus === void 0 ? void 0 : rightMenus.map(function (e, i) {
|
|
|
if (!e.show) return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {}, e.key);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: LearningAnalysismodules.rli,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
title: e.name,
|
|
|
className: LearningAnalysismodules.name,
|
|
|
children: e.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u5360\u6BD4", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
onChange: function onChange(num) {
|
|
|
console.log(num, 'num');
|
|
|
var record = (0,lodash.cloneDeep)(rightMenus);
|
|
|
record[i].num = num;
|
|
|
setRightMenus(record);
|
|
|
},
|
|
|
onBlur: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
|
|
|
var record, totalScore;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee14$(_context14) {
|
|
|
while (1) switch (_context14.prev = _context14.next) {
|
|
|
case 0:
|
|
|
record = (0,lodash.cloneDeep)(rightMenus);
|
|
|
if (!(record[i].num !== '' && typeof record[i].num !== 'number')) {
|
|
|
_context14.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning("\u6743\u91CD\u5360\u6BD4\u9650\u5236\u8303\u56F4\u4E3A0~100%");
|
|
|
record[i].num = record[i].preNum;
|
|
|
setRightMenus(record);
|
|
|
return _context14.abrupt("return");
|
|
|
case 6:
|
|
|
totalScore = rightMenus.reduce(function (pre, cur) {
|
|
|
return pre + (cur.num || 0);
|
|
|
}, 0);
|
|
|
if (!(Math.round(totalScore) > 100)) {
|
|
|
_context14.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('多个课堂模块占比之和不能超过100%');
|
|
|
record[i].num = record[i].preNum;
|
|
|
setRightMenus(record);
|
|
|
return _context14.abrupt("return");
|
|
|
case 12:
|
|
|
moduleBlurEdit(record[i], true);
|
|
|
// record[i].preNum = record[i].num;
|
|
|
// setRightMenus(record);
|
|
|
// setRightMenusTotal(totalScore)
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context14.stop();
|
|
|
}
|
|
|
}, _callee14);
|
|
|
})),
|
|
|
style: {
|
|
|
width: 60
|
|
|
},
|
|
|
min: 0,
|
|
|
max: 100,
|
|
|
precision: 0,
|
|
|
value: e.num,
|
|
|
className: "ml10 mr10"
|
|
|
}), "%"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
marginLeft: 70
|
|
|
},
|
|
|
children: ["\u5171", e.total, "\u4E2A / \u5DF2\u9009", e.select, "\u4E2A"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
marginLeft: 'auto'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick() {
|
|
|
return handleWeight(e);
|
|
|
},
|
|
|
className: "iconfont icon-shezhi4 current c-light-primary"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick() {
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: '提示',
|
|
|
content: '请确认是否删除该课堂模块?',
|
|
|
onOk: function () {
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee15$(_context15) {
|
|
|
while (1) switch (_context15.prev = _context15.next) {
|
|
|
case 0:
|
|
|
_context15.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_targets/").concat(leftMenusActive, "/course_target_modules/").concat(e.id, ".json"), {
|
|
|
method: 'delete'
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context15.sent;
|
|
|
if (res.status === 0) {
|
|
|
getModuleData(leftMenusActive);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context15.stop();
|
|
|
}
|
|
|
}, _callee15);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
},
|
|
|
className: "iconfont icon-piliangshanchu3 current ml15 c-light-primary"
|
|
|
})]
|
|
|
})]
|
|
|
}, e.key);
|
|
|
})
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
|
customText: "\u76EE\u6807\u672A\u6DFB\u52A0\u8BFE\u5802\u6A21\u5757\uFF0C\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u7684\u201C\u6DFB\u52A0\u8BFE\u5802\u6A21\u5757\u201D\u6309\u94AE\u8FDB\u884C\u6DFB\u52A0"
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
})]
|
|
|
}), active === 3 && /*#__PURE__*/(0,jsx_runtime.jsx)(LearningAnalysis_AchievementList, {
|
|
|
loading: loading,
|
|
|
setLoading: setLoading,
|
|
|
onFeedback: handleFeedback,
|
|
|
onRefresh: handleFinish,
|
|
|
groupIds: groupIds
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
destroyOnClose: true,
|
|
|
open: createVisible,
|
|
|
title: "".concat(createData !== null && createData !== void 0 && createData.id ? '编辑' : '添加', "\u8BFE\u5802\u76EE\u6807"),
|
|
|
width: "600px",
|
|
|
confirmLoading: createLoading,
|
|
|
onOk: handleCreateModal,
|
|
|
onCancel: function onCancel() {
|
|
|
return setCreateVisible(false);
|
|
|
},
|
|
|
afterClose: function afterClose() {
|
|
|
setCreateData({
|
|
|
name: '',
|
|
|
rate: 0
|
|
|
});
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u76EE\u6807\u540D\u79F0", /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
onChange: function onChange(e) {
|
|
|
return setCreateData(objectSpread2_default()(objectSpread2_default()({}, createData), {}, {
|
|
|
name: e.target.value
|
|
|
}));
|
|
|
},
|
|
|
style: {
|
|
|
width: 400
|
|
|
},
|
|
|
maxLength: 20,
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u76EE\u6807\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523620\u4E2A\u5B57\u7B26",
|
|
|
suffix: "".concat((createData === null || createData === void 0 || (_createData$name = createData.name) === null || _createData$name === void 0 ? void 0 : _createData$name.length) || 0, "/20"),
|
|
|
value: createData.name,
|
|
|
className: "ml10 mb20"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u6210\u7EE9\u5360\u6BD4", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
onChange: function onChange(rate) {
|
|
|
return setCreateData(objectSpread2_default()(objectSpread2_default()({}, createData), {}, {
|
|
|
rate: rate
|
|
|
}));
|
|
|
},
|
|
|
min: 0,
|
|
|
max: 100,
|
|
|
precision: 0,
|
|
|
value: createData.rate,
|
|
|
className: "ml10 mr10"
|
|
|
}), "%"]
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
destroyOnClose: true,
|
|
|
open: moduleVisible,
|
|
|
title: "\u6DFB\u52A0\u8BFE\u5802\u6A21\u5757",
|
|
|
width: "600px",
|
|
|
confirmLoading: moduleLoading,
|
|
|
onOk: handleModuleModal,
|
|
|
onCancel: function onCancel() {
|
|
|
return setModuleVisible(false);
|
|
|
},
|
|
|
footer: moduleSurplus ? null : undefined,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: moduleSurplus ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
fontSize: 14,
|
|
|
color: '#3A3A3A',
|
|
|
margin: '20px 0',
|
|
|
textAlign: 'center'
|
|
|
},
|
|
|
children: "\u8BFE\u5802\u6A21\u5757\u5DF2\u5168\u90E8\u6DFB\u52A0\u5230\u8BFE\u5802\u76EE\u6807\u8BE6\u60C5\u4E2D"
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
style: {
|
|
|
fontSize: 14,
|
|
|
color: '#3A3A3A'
|
|
|
},
|
|
|
children: "\u8BF7\u9009\u62E9\u8BFE\u5802\u76EE\u6807\u4E0B\u7684\u8BFE\u5802\u6A21\u5757"
|
|
|
}), moduleData === null || moduleData === void 0 ? void 0 : moduleData.map(function (e, i) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
onChange: function onChange(e) {
|
|
|
moduleData[i].checked = e.target.checked;
|
|
|
setModuleData(toConsumableArray_default()(moduleData));
|
|
|
},
|
|
|
style: {
|
|
|
margin: '0 20px 10px 0'
|
|
|
},
|
|
|
checked: e.checked,
|
|
|
disabled: e.show,
|
|
|
children: e.name
|
|
|
}, i);
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
destroyOnClose: true,
|
|
|
open: weightVisible,
|
|
|
title: "\u6743\u91CD\u8BBE\u7F6E",
|
|
|
width: "660px",
|
|
|
onCancel: function onCancel() {
|
|
|
return setWeightVisible(false);
|
|
|
},
|
|
|
footer: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
|
|
|
checked: all,
|
|
|
onChange: handleAll,
|
|
|
style: {
|
|
|
flex: 1,
|
|
|
textAlign: 'left'
|
|
|
},
|
|
|
className: "font14",
|
|
|
children: ["\u5168\u9009", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font12 c-grey-999 ml10",
|
|
|
children: ["\u5F53\u524D\u9009\u4E2D", weightDataSelectNum, "\u4E2A"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
onClick: function onClick() {
|
|
|
return setWeightVisible(false);
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
loading: weightLoading,
|
|
|
type: "primary",
|
|
|
onClick: handleWeightModal,
|
|
|
children: "\u786E\u8BA4"
|
|
|
})]
|
|
|
}),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: LearningAnalysismodules.weight,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
|
loading: weightListLoading,
|
|
|
active: true,
|
|
|
children: [(weightData === null || weightData === void 0 ? void 0 : weightData.module_type) === 'video' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mb10",
|
|
|
children: "\u89C6\u9891\u76F4\u64AD\u4EC5\u652F\u6301\u8BA1\u7B97\u4E0A\u4F20\u5230\u672C\u5E73\u53F0\u7684\u89C6\u9891\u5B66\u4E60\u8FBE\u6210\u60C5\u51B5"
|
|
|
}), (weightData === null || weightData === void 0 ? void 0 : weightData.module_type) === 'attendance' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "mb10",
|
|
|
align: "middle",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red mr5",
|
|
|
children: "*"
|
|
|
}), "\u7B7E\u5230\u5206\u503C\u8BBE\u7F6E"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mb10",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr20",
|
|
|
children: ["\u6B63\u5E38\u7B7E\u5230", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
className: "ml10",
|
|
|
style: {
|
|
|
width: 60
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('normal', e);
|
|
|
},
|
|
|
value: weightData.normal,
|
|
|
min: 0
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr20",
|
|
|
children: ["\u8FDF\u5230", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
className: "ml10",
|
|
|
style: {
|
|
|
width: 60
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('late', e);
|
|
|
},
|
|
|
value: weightData.late,
|
|
|
min: 0
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr20",
|
|
|
children: ["\u65E9\u9000", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
className: "ml10",
|
|
|
style: {
|
|
|
width: 60
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('early', e);
|
|
|
},
|
|
|
value: weightData.early,
|
|
|
min: 0
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr20",
|
|
|
children: ["\u8BF7\u5047", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
className: "ml10",
|
|
|
style: {
|
|
|
width: 60
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('leave', e);
|
|
|
},
|
|
|
value: weightData.leave,
|
|
|
min: 0
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr20",
|
|
|
children: ["\u65F7\u8BFE", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
className: "ml10",
|
|
|
style: {
|
|
|
width: 60
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('absence', e);
|
|
|
},
|
|
|
value: weightData.absence,
|
|
|
min: 0
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "mb10",
|
|
|
align: "middle",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red mr5",
|
|
|
children: "*"
|
|
|
}), "\u6743\u91CD\u5206\u914D\u89C4\u5219"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('custom_rate', e.target.value);
|
|
|
},
|
|
|
value: weightData.custom_rate,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: false,
|
|
|
children: "\u5747\u5206\u6743\u91CD"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
className: "ml30",
|
|
|
value: true,
|
|
|
children: "\u81EA\u5B9A\u4E49\u6743\u91CD"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: LearningAnalysismodules.line
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: LearningAnalysismodules.listWrap,
|
|
|
ref: listWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
data: (weightData === null || weightData === void 0 ? void 0 : weightData.course_target_module_records) || [],
|
|
|
itemHeight: 80,
|
|
|
ref: virtual,
|
|
|
itemKey: "id"
|
|
|
}, (weightData === null || weightData === void 0 || (_weightData$course_ta4 = weightData.course_target_module_records) === null || _weightData$course_ta4 === void 0 ? void 0 : _weightData$course_ta4.length) > 5 ? {
|
|
|
height: 430
|
|
|
} : {}), {}, {
|
|
|
children: function children(e, i) {
|
|
|
var _weightData$course_ta5;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: LearningAnalysismodules.li,
|
|
|
style: {
|
|
|
paddingRight: (weightData === null || weightData === void 0 || (_weightData$course_ta5 = weightData.course_target_module_records) === null || _weightData$course_ta5 === void 0 ? void 0 : _weightData$course_ta5.length) > 5 ? 20 : 0
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
checked: e.status,
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('status', e.target.checked, i);
|
|
|
}
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: e.name,
|
|
|
children: e.name
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: LearningAnalysismodules.des,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font14 c-grey-999",
|
|
|
children: ["\u521B\u5EFA\u4EBA\uFF1A", e.real_name]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font14 c-grey-999",
|
|
|
style: {
|
|
|
margin: '0 80px'
|
|
|
},
|
|
|
children: ["\u521B\u5EFA\u65F6\u95F4\uFF1A", e.created_at]
|
|
|
}), weightData !== null && weightData !== void 0 && weightData.custom_rate ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: error && e.status && (e.rate === '' || e.rate === null) ? "font14 c-grey-999 ".concat(LearningAnalysismodules.error) : 'font14 c-grey-999',
|
|
|
children: ["\u6743\u91CD", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
style: {
|
|
|
width: 60,
|
|
|
margin: '0 10px'
|
|
|
},
|
|
|
value: e.rate,
|
|
|
precision: 2,
|
|
|
min: 0,
|
|
|
max: 100,
|
|
|
onChange: function onChange(e) {
|
|
|
return handleWeightEdit('rate', e, i);
|
|
|
}
|
|
|
}), "%"]
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font14 c-grey-999",
|
|
|
children: ["\u6743\u91CD\uFF1A", parseFloat(e.rate), "%"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: LearningAnalysismodules.line
|
|
|
})]
|
|
|
}, e.id);
|
|
|
}
|
|
|
}))
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_LearningAnalysis = ((0,_umi_production_exports.connect)(function (_ref15) {
|
|
|
var globalSetting = _ref15.globalSetting;
|
|
|
return {
|
|
|
globalSetting: globalSetting
|
|
|
};
|
|
|
})(LearningAnalysis));
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/QuestionCircleOutlined.js + 1 modules
|
|
|
var QuestionCircleOutlined = __webpack_require__(61485);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
|
var DownOutlined = __webpack_require__(84105);
|
|
|
// EXTERNAL MODULE: ./src/service/classrooms.ts
|
|
|
var classrooms = __webpack_require__(18356);
|
|
|
// EXTERNAL MODULE: ./src/components/ExportCount/index.tsx
|
|
|
var ExportCount = __webpack_require__(83622);
|
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
|
var utils_export = __webpack_require__(64063);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('zh-cn');
|
|
|
var Statistics_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var _classroomList$detail, _detailCourseWorkscor, _detailCourseActscore;
|
|
|
var classroomList = _ref.classroomList,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
user = _ref.user;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), {}, {
|
|
|
page: 1,
|
|
|
sort: 'desc'
|
|
|
})),
|
|
|
_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,
|
|
|
detailTopBanner = classroomList.detailTopBanner,
|
|
|
detailLeftMenusNames = classroomList.detailLeftMenusNames;
|
|
|
var top_scores = detailCourseStatisticsList.top_scores;
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
selectArrs = _useState4[0],
|
|
|
setSelectArrs = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)('1'),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
tabIndex = _useState6[0],
|
|
|
setTabIndex = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
submenuVisible = _useState8[0],
|
|
|
setSubmenuVisible = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
res = _useState10[0],
|
|
|
setRes = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
ismodel = _useState12[0],
|
|
|
setismodel = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
hasMore = _useState14[0],
|
|
|
setHasmore = _useState14[1];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(1),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
page = _useState16[0],
|
|
|
setPage = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
isLoading = _useState18[0],
|
|
|
setIsLoading = _useState18[1];
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
tableData = _useState20[0],
|
|
|
setTableData = _useState20[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: 'classroomList/getCourseStatistics',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}, [params['categoryId']]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if ((0,authority/* isAdmin */.GJ)()) {
|
|
|
handleInfiniteOnLoad();
|
|
|
}
|
|
|
}, [params['categoryId'], user]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (tabIndex === '1') {
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCourseWorkscore',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
} else {
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCourseActscore',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
}, [tabIndex]);
|
|
|
var handleInfiniteOnLoad = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _res$course_groups, _res, items;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(hasMore && !isLoading)) {
|
|
|
_context.next = 10;
|
|
|
break;
|
|
|
}
|
|
|
setIsLoading(true);
|
|
|
setPage(page + 1);
|
|
|
_context.next = 5;
|
|
|
return dispatch({
|
|
|
type: 'classroomList/getCourseGroupsList',
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
page: page
|
|
|
})
|
|
|
});
|
|
|
case 5:
|
|
|
_res = _context.sent;
|
|
|
items = toConsumableArray_default()(_res.course_groups);
|
|
|
if (((_res$course_groups = _res.course_groups) === null || _res$course_groups === void 0 ? void 0 : _res$course_groups.length) < 20) {
|
|
|
setHasmore(false);
|
|
|
items.push({
|
|
|
id: 0,
|
|
|
name: '未分班'
|
|
|
});
|
|
|
}
|
|
|
setIsLoading(false);
|
|
|
setTableData([].concat(toConsumableArray_default()(tableData), toConsumableArray_default()(items)));
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function handleInfiniteOnLoad() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var onShowSizeChange = function onShowSizeChange(current) {
|
|
|
params.page = current;
|
|
|
// params['sort'] = '';
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCourseWorkscore',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
};
|
|
|
var refreshScore = /*#__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:
|
|
|
dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: true,
|
|
|
text: '成绩计算中,请稍后...'
|
|
|
}
|
|
|
});
|
|
|
_context2.next = 3;
|
|
|
return (0,classrooms/* calculateAllShixunScores */.up)(objectSpread2_default()({}, params));
|
|
|
case 3:
|
|
|
res = _context2.sent;
|
|
|
dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: false,
|
|
|
text: ''
|
|
|
}
|
|
|
});
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('更新成功');
|
|
|
onShowSizeChange(1);
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function refreshScore() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var courseTypeList = classroomList === null || classroomList === void 0 || (_classroomList$detail = classroomList.detailLeftMenus) === null || _classroomList$detail === void 0 || (_classroomList$detail = _classroomList$detail.course_modules) === null || _classroomList$detail === void 0 ? void 0 : _classroomList$detail.map(function (item) {
|
|
|
return item.type;
|
|
|
});
|
|
|
var columns = [{
|
|
|
title: '序号',
|
|
|
render: function render(text, record, index) {
|
|
|
return "".concat((params.page - 1) * params.limit + index + 1);
|
|
|
},
|
|
|
width: 60,
|
|
|
align: 'center'
|
|
|
},
|
|
|
// isStudent() && {
|
|
|
// title: '排名',
|
|
|
// dataIndex: 'rank',
|
|
|
// render: (text: string, record: any, index: number) => `${text}`,
|
|
|
// width: '16%',
|
|
|
// align: 'center',
|
|
|
// },
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'user_name',
|
|
|
width: '12%',
|
|
|
ellipsis: true,
|
|
|
align: 'center',
|
|
|
render: function render(text, record, index) {
|
|
|
return (0,authority/* isStudent */.dE)() ? text : /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
target: "_blank",
|
|
|
href: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/Studentdetail/").concat(record === null || record === void 0 ? void 0 : record.user_login),
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '学号',
|
|
|
dataIndex: 'student_id',
|
|
|
align: 'center',
|
|
|
sorter: true,
|
|
|
width: '16%',
|
|
|
ellipsis: true
|
|
|
// sortOrder: params.sort + 'end'
|
|
|
}, (courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'course_group';
|
|
|
})) && {
|
|
|
title: '分班',
|
|
|
dataIndex: 'course_group',
|
|
|
ellipsis: true,
|
|
|
width: 100,
|
|
|
align: 'center'
|
|
|
}, (courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'shixun_homework';
|
|
|
})) && {
|
|
|
title: detailLeftMenusNames === null || detailLeftMenusNames === void 0 ? void 0 : detailLeftMenusNames.shixun_homework,
|
|
|
dataIndex: 'practice_score',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
width: 80
|
|
|
},
|
|
|
// 新增编程作业:
|
|
|
(courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'program_homework';
|
|
|
})) && {
|
|
|
title: detailLeftMenusNames === null || detailLeftMenusNames === void 0 ? void 0 : detailLeftMenusNames.program_homework,
|
|
|
dataIndex: 'hack_score',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
width: 80
|
|
|
}, (courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'common_homework';
|
|
|
})) && {
|
|
|
title: detailLeftMenusNames === null || detailLeftMenusNames === void 0 ? void 0 : detailLeftMenusNames.common_homework,
|
|
|
dataIndex: 'common_score',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
width: 80
|
|
|
}, (courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'online_learning';
|
|
|
})) && {
|
|
|
title: detailLeftMenusNames === null || detailLeftMenusNames === void 0 ? void 0 : detailLeftMenusNames.online_learning,
|
|
|
dataIndex: 'shixun_score',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
width: 80
|
|
|
}, (courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'group_homework';
|
|
|
})) && {
|
|
|
title: detailLeftMenusNames === null || detailLeftMenusNames === void 0 ? void 0 : detailLeftMenusNames.group_homework,
|
|
|
dataIndex: 'group_score',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
width: 80
|
|
|
}, (courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'graduation';
|
|
|
})) && {
|
|
|
title: '毕设任务',
|
|
|
dataIndex: 'graduation_score',
|
|
|
align: 'center',
|
|
|
width: 80
|
|
|
}, (courseTypeList === null || courseTypeList === void 0 ? void 0 : courseTypeList.find(function (item) {
|
|
|
return item === 'exercise';
|
|
|
})) && {
|
|
|
title: detailLeftMenusNames === null || detailLeftMenusNames === void 0 ? void 0 : detailLeftMenusNames.exercise,
|
|
|
dataIndex: 'exercise_score',
|
|
|
width: 80,
|
|
|
ellipsis: true,
|
|
|
align: 'center'
|
|
|
}, {
|
|
|
title: '总成绩',
|
|
|
dataIndex: 'total_score',
|
|
|
width: 80,
|
|
|
align: 'center',
|
|
|
sorter: true
|
|
|
}].filter(function (item) {
|
|
|
return !!item;
|
|
|
});
|
|
|
var CalcRules = /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "font12",
|
|
|
children: ["\u8BFE\u5802\u603B\u6210\u7EE9 * 70 %", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BFE\u5802\u6D3B\u8DC3\u5EA6 * 10%", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BFE\u5916\u5B66\u4E60\u6210\u7EE9 * 20%", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5176\u4E2D\uFF0C\u8BFE\u5916\u5B66\u4E60\u6210\u7EE9= \u5F53\u524D\u5B66\u751F\u7ECF\u9A8C\u503C / \u8BFE\u5802\u5B66\u751F\u7ECF\u9A8C\u503C \u6700\u5927\u503C*100", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
|
|
|
});
|
|
|
var getOption = function getOption() {
|
|
|
if (detailCourseActscore.course_members) {
|
|
|
return {
|
|
|
color: ['#3398DB'],
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
|
}
|
|
|
},
|
|
|
grid: {
|
|
|
left: '3%',
|
|
|
right: '4%',
|
|
|
bottom: '3%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
xAxis: [{
|
|
|
type: 'category',
|
|
|
data: detailCourseActscore.course_members.map(function (v) {
|
|
|
// if (v.user_name.length > 5) {
|
|
|
// return v.user_name.substr(0, 5) + '...';
|
|
|
// } else {
|
|
|
return v.user_name;
|
|
|
// }
|
|
|
}),
|
|
|
axisLabel: {
|
|
|
interval: 0
|
|
|
}
|
|
|
}],
|
|
|
yAxis: [{
|
|
|
type: 'value'
|
|
|
}],
|
|
|
series: [{
|
|
|
name: '活跃度',
|
|
|
type: 'bar',
|
|
|
barWidth: '60%',
|
|
|
data: detailCourseActscore.course_members.map(function (v) {
|
|
|
return v.total_score;
|
|
|
})
|
|
|
}]
|
|
|
};
|
|
|
} else {
|
|
|
return {};
|
|
|
}
|
|
|
};
|
|
|
var submenu = /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: Statisticsmodules.dropmenu,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
maxHeight: 200,
|
|
|
overflow: 'auto'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)((_react_infinite_scroller_1_2_4_react_infinite_scroller_default()), {
|
|
|
initialLoad: false,
|
|
|
pageStart: 1,
|
|
|
threshold: 20,
|
|
|
loadMore: function loadMore(page) {
|
|
|
handleInfiniteOnLoad();
|
|
|
},
|
|
|
hasMore: hasMore,
|
|
|
useWindow: false,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z, {
|
|
|
style: {
|
|
|
width: 240,
|
|
|
zIndex: 10
|
|
|
},
|
|
|
children: detailCourseGroupsList.group_count > 0 && tableData.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
checked: selectArrs.includes(item.id),
|
|
|
value: item.id,
|
|
|
onChange: function onChange(e) {
|
|
|
var key = selectArrs.indexOf(item.id);
|
|
|
if (selectArrs.indexOf(item.id) > -1) {
|
|
|
setSelectArrs(selectArrs.filter(function (val) {
|
|
|
return val !== item.id;
|
|
|
}));
|
|
|
} else {
|
|
|
setSelectArrs(selectArrs.concat(item.id));
|
|
|
}
|
|
|
},
|
|
|
children: item.name
|
|
|
})
|
|
|
}, item.id);
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: Statisticsmodules.bg,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "link",
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
// if (selectArrs == '') {
|
|
|
// message.error('请选择你要操作的任务');
|
|
|
// return null;
|
|
|
// }
|
|
|
params.group_ids = selectArrs;
|
|
|
params.page = 1;
|
|
|
if (tabIndex == 1) {
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCourseWorkscore',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
} else {
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCourseActscore',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})),
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "link",
|
|
|
onClick: function onClick() {
|
|
|
setSelectArrs([]);
|
|
|
},
|
|
|
children: "\u91CD\u7F6E"
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
var exportMenu = /*#__PURE__*/(0,jsx_runtime.jsxs)(menu/* default */.Z, {
|
|
|
style: {
|
|
|
maxHeight: 400,
|
|
|
width: 240,
|
|
|
overflow: 'auto'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var data;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return (0,utils_export/* ExportCourseMemberScores */.fi)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
group_id: params.group_ids || null
|
|
|
}));
|
|
|
case 2:
|
|
|
data = _context4.sent;
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === -2) {
|
|
|
setRes(data);
|
|
|
setismodel(true);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
})),
|
|
|
children: "\u603B\u6210\u7EE9"
|
|
|
}, "1"), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
var data;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
_context5.next = 2;
|
|
|
return (0,utils_export/* ExportCourseTotalScore */.j6)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
group_id: params.group_ids || null
|
|
|
}));
|
|
|
case 2:
|
|
|
data = _context5.sent;
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === -2) {
|
|
|
setRes(data);
|
|
|
setismodel(true);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
})),
|
|
|
children: "\u4F5C\u4E1A\u6210\u7EE9"
|
|
|
}, "2"), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
var data;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
_context6.next = 2;
|
|
|
return (0,utils_export/* ExportCourseAndOther */.iA)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
group_id: params.group_ids || null
|
|
|
}));
|
|
|
case 2:
|
|
|
data = _context6.sent;
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === -2) {
|
|
|
setRes(data);
|
|
|
setismodel(true);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
})),
|
|
|
children: "\u8BD5\u5377\u53CA\u5176\u4ED6\u6210\u7EE9"
|
|
|
}, "3"), (detailTopBanner === null || detailTopBanner === void 0 ? void 0 : detailTopBanner.mooc_course_id) && /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
var data;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
_context7.next = 2;
|
|
|
return (0,utils_export/* exportMoocrecord */._g)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
group_id: params.group_ids || null
|
|
|
}));
|
|
|
case 2:
|
|
|
data = _context7.sent;
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === -2) {
|
|
|
setRes(data);
|
|
|
setismodel(true);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
})),
|
|
|
children: "\u7B2C\u4E09\u65B9\u6155\u8BFE\u6210\u7EE9"
|
|
|
}, "3"), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(params.coursesId, "/exportlist/course_total_score,course_total_homework,course_total_exercise_and_other"),
|
|
|
children: "\u5386\u53F2\u5BFC\u51FA"
|
|
|
})
|
|
|
}, "4")]
|
|
|
});
|
|
|
var exportMenuTow = /*#__PURE__*/(0,jsx_runtime.jsxs)(menu/* default */.Z, {
|
|
|
style: {
|
|
|
maxHeight: 400,
|
|
|
width: 240,
|
|
|
overflow: 'auto'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
|
var data;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
_context8.next = 2;
|
|
|
return (0,utils_export/* ExportCourseActScore */.cr)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
group_id: params.group_ids || null
|
|
|
}));
|
|
|
case 2:
|
|
|
data = _context8.sent;
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === -2) {
|
|
|
setRes(data);
|
|
|
setismodel(true);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
})),
|
|
|
children: "\u6D3B\u8DC3\u5EA6"
|
|
|
}, "3"), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(params.coursesId, "/exportlist/course_member_act_score"),
|
|
|
children: "\u5386\u53F2\u5BFC\u51FA"
|
|
|
})
|
|
|
}, "4")]
|
|
|
});
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: Statisticsmodules.bg,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "plr30 pt30",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16",
|
|
|
children: "\u660E\u661F\u5B66\u5458"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
|
placement: "rightBottom",
|
|
|
content: CalcRules,
|
|
|
title: "\u660E\u661F\u5B66\u5458\u8BA1\u7B97\u8BF4\u660E",
|
|
|
trigger: "hover",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font12",
|
|
|
children: ["\u8BA1\u7B97\u89C4\u5219", /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
|
|
|
className: "ml5"
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ScoreComponents, {})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: [Statisticsmodules.bg, 'mt20', 'plr30 ', 'mb20', Statisticsmodules.tabs].join(' '),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Statisticsmodules.rightAction,
|
|
|
children: [tabIndex === '1' && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
|
allowClear: true,
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D/\u5B66\u53F7\u8FDB\u884C\u641C\u7D22",
|
|
|
onSearch: function onSearch(value) {
|
|
|
params.keyword = value;
|
|
|
params.page = 1;
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCourseWorkscore',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
},
|
|
|
style: {
|
|
|
width: 260,
|
|
|
marginTop: -4,
|
|
|
marginRight: 10
|
|
|
}
|
|
|
}), (detailCourseGroupsList === null || detailCourseGroupsList === void 0 ? void 0 : detailCourseGroupsList.group_count) > 0 && (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
|
dropdownRender: function dropdownRender() {
|
|
|
return submenu;
|
|
|
},
|
|
|
open: submenuVisible,
|
|
|
onOpenChange: function onOpenChange(flag) {
|
|
|
setSubmenuVisible(flag);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "ant-dropdown-link current",
|
|
|
onClick: function onClick(e) {
|
|
|
return e.preventDefault();
|
|
|
},
|
|
|
children: ["\u5206\u73ED ", /*#__PURE__*/(0,jsx_runtime.jsx)(DownOutlined/* default */.Z, {})]
|
|
|
})
|
|
|
}), (0,authority/* isAdminOrStudent */.RV)() && tabIndex !== '3' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue ml20 current",
|
|
|
onClick: function onClick() {
|
|
|
return refreshScore();
|
|
|
},
|
|
|
children: "\u83B7\u53D6\u6700\u65B0\u6210\u7EE9"
|
|
|
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
|
dropdownRender: function dropdownRender() {
|
|
|
return tabIndex === '1' ? exportMenu : exportMenuTow;
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
style: {
|
|
|
marginLeft: '15px'
|
|
|
},
|
|
|
className: "ant-dropdown-link current",
|
|
|
onClick: function onClick(e) {
|
|
|
return e.preventDefault();
|
|
|
},
|
|
|
children: ["\u5BFC\u51FA", /*#__PURE__*/(0,jsx_runtime.jsx)(DownOutlined/* default */.Z, {})]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(tabs/* default */.Z, {
|
|
|
defaultActiveKey: tabIndex,
|
|
|
onChange: function onChange(key) {
|
|
|
params.page = 1;
|
|
|
setTabIndex(key);
|
|
|
}
|
|
|
// 有根线要出来
|
|
|
,
|
|
|
style: {
|
|
|
overflow: tabIndex === '3' ? 'initial' : 'hidden'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z.TabPane, {
|
|
|
tab: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16",
|
|
|
children: "\u5B66\u4E60\u6210\u7EE9"
|
|
|
}),
|
|
|
children: (_detailCourseWorkscor = detailCourseWorkscore.course_members) !== null && _detailCourseWorkscor !== void 0 && _detailCourseWorkscor.length ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
columns: columns,
|
|
|
dataSource: detailCourseWorkscore.course_members,
|
|
|
loading: loading.effects['classroomList/getCourseWorkscore'],
|
|
|
pagination: false,
|
|
|
onChange: function onChange(a, b, c) {
|
|
|
console.log('---', c);
|
|
|
|
|
|
// if (c.field) params.sort_by = c.field;
|
|
|
// if (!c.order) params['sort'] = 'asc';
|
|
|
// if (c.order === 'ascend') params['sort'] = 'asc';
|
|
|
// if (c.order === 'descend') params['sort'] = 'desc';
|
|
|
// // if (!c.order) delete params['b_order'];
|
|
|
// if (!c.order) params['sort'] = 'asc';
|
|
|
// setParams({ ...params })
|
|
|
if (c.order) {
|
|
|
params.sort_by = c.field === 'total_score' ? 'score' : c.field;
|
|
|
params.sort = c.order;
|
|
|
params.sort = params.sort.replace('end', '');
|
|
|
} else {
|
|
|
delete params.sort;
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCourseWorkscore',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "tc mb50 mt30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
hideOnSinglePage: true,
|
|
|
showSizeChanger: false,
|
|
|
onChange: onShowSizeChange,
|
|
|
defaultCurrent: 1,
|
|
|
current: params.page || 1,
|
|
|
defaultPageSize: 20,
|
|
|
total: detailCourseWorkscore.all_count
|
|
|
})
|
|
|
})]
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
|
|
|
}, "1"), /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z.TabPane, {
|
|
|
tab: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16",
|
|
|
children: "\u8BFE\u5802\u6D3B\u8DC3\u5EA6"
|
|
|
}),
|
|
|
children: (_detailCourseActscore = detailCourseActscore.course_members) !== null && _detailCourseActscore !== void 0 && _detailCourseActscore.length ? /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
spinning: loading.effects['classroomList/getCourseActscore'],
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Statisticsmodules.ruleWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: "font16",
|
|
|
children: "Top 10"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
|
placement: "bottom",
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u4F5C\u4E1A\u5B8C\u6210\u6570\uFF08*10\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BD5\u5377\u5B8C\u6210\u6570\uFF08*10\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u95EE\u5377\u5B8C\u6210\u6570\uFF08*7\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8D44\u6E90\u53D1\u5E03\u6570\uFF08*5\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5E16\u5B50\u53D1\u5E03\u6570\uFF08*2\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5E16\u5B50\u56DE\u590D\u6570\uFF08*1\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u4F5C\u4E1A\u56DE\u590D\u6570\uFF08*1\uFF09"]
|
|
|
}),
|
|
|
title: "\u6D3B\u52A8\u89C4\u5219\u8BA1\u7B97\u8BF4\u660E",
|
|
|
trigger: "hover",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font12",
|
|
|
children: ["\u8BA1\u7B97\u89C4\u5219", /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
|
|
|
className: "ml5"
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
option: getOption(),
|
|
|
className: "mb50"
|
|
|
})]
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
|
|
|
}, "2"), /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z.TabPane, {
|
|
|
tab: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16",
|
|
|
children: "\u5B66\u4E60\u8FBE\u6210\u5206\u6790"
|
|
|
}),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(components_LearningAnalysis, {
|
|
|
groupIds: (params === null || params === void 0 ? void 0 : params.group_ids) || []
|
|
|
})
|
|
|
}, "3")]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ExportCount/* default */.Z, {
|
|
|
res: res,
|
|
|
ismodel: ismodel,
|
|
|
setismodel: setismodel
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Statistics = ((0,_umi_production_exports.connect)(function (_ref10) {
|
|
|
var classroomList = _ref10.classroomList,
|
|
|
loading = _ref10.loading,
|
|
|
globalSetting = _ref10.globalSetting,
|
|
|
user = _ref10.user;
|
|
|
return {
|
|
|
classroomList: classroomList,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading,
|
|
|
user: user
|
|
|
};
|
|
|
})(Statistics_ShixunsListPage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 77578:
|
|
|
/*!**********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/_util/getRenderPropValue.js ***!
|
|
|
\**********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ getRenderPropValue; }
|
|
|
/* harmony export */ });
|
|
|
const getRenderPropValue = propValue => {
|
|
|
if (!propValue) {
|
|
|
return null;
|
|
|
}
|
|
|
if (typeof propValue === 'function') {
|
|
|
return propValue();
|
|
|
}
|
|
|
return propValue;
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 39722:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/PurePanel.js ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ t5: function() { return /* binding */ RawPurePanel; }
|
|
|
/* harmony export */ });
|
|
|
/* unused harmony export getOverlay */
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 92310);
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-tooltip */ 55477);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ 36355);
|
|
|
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 17356);
|
|
|
"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 getOverlay = (prefixCls, title, content) => {
|
|
|
if (!title && !content) return undefined;
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: `${prefixCls}-title`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: `${prefixCls}-inner-content`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(content)));
|
|
|
};
|
|
|
const RawPurePanel = props => {
|
|
|
const {
|
|
|
hashId,
|
|
|
prefixCls,
|
|
|
className,
|
|
|
style,
|
|
|
placement = 'top',
|
|
|
title,
|
|
|
content,
|
|
|
children
|
|
|
} = props;
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className),
|
|
|
style: style
|
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: `${prefixCls}-arrow`
|
|
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_tooltip__WEBPACK_IMPORTED_MODULE_1__/* .Popup */ .G, Object.assign({}, props, {
|
|
|
className: hashId,
|
|
|
prefixCls: prefixCls
|
|
|
}), children || getOverlay(prefixCls, title, content)));
|
|
|
};
|
|
|
const PurePanel = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_4__/* .ConfigContext */ .E_);
|
|
|
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
|
|
|
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(RawPurePanel, Object.assign({}, restProps, {
|
|
|
prefixCls: prefixCls,
|
|
|
hashId: hashId
|
|
|
})));
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.ZP = (PurePanel);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 60324:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/index.js ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 92310);
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
|
|
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/motion */ 62892);
|
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
|
|
|
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tooltip */ 6848);
|
|
|
/* harmony import */ var _PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PurePanel */ 39722);
|
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style */ 17356);
|
|
|
"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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CSSINJS
|
|
|
|
|
|
const Overlay = _ref => {
|
|
|
let {
|
|
|
title,
|
|
|
content,
|
|
|
prefixCls
|
|
|
} = _ref;
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
|
className: `${prefixCls}-title`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
|
className: `${prefixCls}-inner-content`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(content)));
|
|
|
};
|
|
|
const Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
title,
|
|
|
content,
|
|
|
overlayClassName,
|
|
|
placement = 'top',
|
|
|
trigger = 'hover',
|
|
|
mouseEnterDelay = 0.1,
|
|
|
mouseLeaveDelay = 0.1,
|
|
|
overlayStyle = {}
|
|
|
} = props,
|
|
|
otherProps = __rest(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
|
|
|
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(prefixCls);
|
|
|
const rootPrefixCls = getPrefixCls();
|
|
|
const overlayCls = classnames__WEBPACK_IMPORTED_MODULE_0___default()(overlayClassName, hashId);
|
|
|
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_tooltip__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, Object.assign({
|
|
|
placement: placement,
|
|
|
trigger: trigger,
|
|
|
mouseEnterDelay: mouseEnterDelay,
|
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
|
overlayStyle: overlayStyle
|
|
|
}, otherProps, {
|
|
|
prefixCls: prefixCls,
|
|
|
overlayClassName: overlayCls,
|
|
|
ref: ref,
|
|
|
overlay: title || content ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Overlay, {
|
|
|
prefixCls: prefixCls,
|
|
|
title: title,
|
|
|
content: content
|
|
|
}) : null,
|
|
|
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_6__/* .getTransitionName */ .m)(rootPrefixCls, 'zoom-big', otherProps.transitionName),
|
|
|
"data-popover-inject": true
|
|
|
})));
|
|
|
});
|
|
|
if (false) {}
|
|
|
Popover._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP;
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Popover);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 17356:
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/style/index.js ***!
|
|
|
\*****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ 17313);
|
|
|
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style/motion */ 29878);
|
|
|
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/placementArrow */ 19447);
|
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 33166);
|
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 83116);
|
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ 37613);
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const genBaseStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
popoverColor,
|
|
|
minWidth,
|
|
|
fontWeightStrong,
|
|
|
popoverPadding,
|
|
|
boxShadowSecondary,
|
|
|
colorTextHeading,
|
|
|
borderRadiusLG: borderRadius,
|
|
|
zIndexPopup,
|
|
|
marginXS,
|
|
|
colorBgElevated,
|
|
|
popoverBg
|
|
|
} = token;
|
|
|
return [{
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(token)), {
|
|
|
position: 'absolute',
|
|
|
top: 0,
|
|
|
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
|
|
left: {
|
|
|
_skip_check_: true,
|
|
|
value: 0
|
|
|
},
|
|
|
zIndex: zIndexPopup,
|
|
|
fontWeight: 'normal',
|
|
|
whiteSpace: 'normal',
|
|
|
textAlign: 'start',
|
|
|
cursor: 'auto',
|
|
|
userSelect: 'text',
|
|
|
transformOrigin: `var(--arrow-x, 50%) var(--arrow-y, 50%)`,
|
|
|
'--antd-arrow-background-color': colorBgElevated,
|
|
|
'&-rtl': {
|
|
|
direction: 'rtl'
|
|
|
},
|
|
|
'&-hidden': {
|
|
|
display: 'none'
|
|
|
},
|
|
|
[`${componentCls}-content`]: {
|
|
|
position: 'relative'
|
|
|
},
|
|
|
[`${componentCls}-inner`]: {
|
|
|
backgroundColor: popoverBg,
|
|
|
backgroundClip: 'padding-box',
|
|
|
borderRadius,
|
|
|
boxShadow: boxShadowSecondary,
|
|
|
padding: popoverPadding
|
|
|
},
|
|
|
[`${componentCls}-title`]: {
|
|
|
minWidth,
|
|
|
marginBottom: marginXS,
|
|
|
color: colorTextHeading,
|
|
|
fontWeight: fontWeightStrong
|
|
|
},
|
|
|
[`${componentCls}-inner-content`]: {
|
|
|
color: popoverColor
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// Arrow Style
|
|
|
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(token, {
|
|
|
colorBg: 'var(--antd-arrow-background-color)'
|
|
|
}),
|
|
|
// Pure Render
|
|
|
{
|
|
|
[`${componentCls}-pure`]: {
|
|
|
position: 'relative',
|
|
|
maxWidth: 'none',
|
|
|
margin: token.sizePopupArrow,
|
|
|
display: 'inline-block',
|
|
|
[`${componentCls}-content`]: {
|
|
|
display: 'inline-block'
|
|
|
}
|
|
|
}
|
|
|
}];
|
|
|
};
|
|
|
const genColorStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: _theme_internal__WEBPACK_IMPORTED_MODULE_2__/* .PresetColors */ .i.map(colorKey => {
|
|
|
const lightColor = token[`${colorKey}6`];
|
|
|
return {
|
|
|
[`&${componentCls}-${colorKey}`]: {
|
|
|
'--antd-arrow-background-color': lightColor,
|
|
|
[`${componentCls}-inner`]: {
|
|
|
backgroundColor: lightColor
|
|
|
},
|
|
|
[`${componentCls}-arrow`]: {
|
|
|
background: 'transparent'
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
const genWireframeStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
lineWidth,
|
|
|
lineType,
|
|
|
colorSplit,
|
|
|
paddingSM,
|
|
|
controlHeight,
|
|
|
fontSize,
|
|
|
lineHeight,
|
|
|
padding
|
|
|
} = token;
|
|
|
const titlePaddingBlockDist = controlHeight - Math.round(fontSize * lineHeight);
|
|
|
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
|
|
|
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
|
|
|
const popoverPaddingHorizontal = padding;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[`${componentCls}-inner`]: {
|
|
|
padding: 0
|
|
|
},
|
|
|
[`${componentCls}-title`]: {
|
|
|
margin: 0,
|
|
|
padding: `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px`,
|
|
|
borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`
|
|
|
},
|
|
|
[`${componentCls}-inner-content`]: {
|
|
|
padding: `${paddingSM}px ${popoverPaddingHorizontal}px`
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Popover', token => {
|
|
|
const {
|
|
|
colorBgElevated,
|
|
|
colorText,
|
|
|
wireframe
|
|
|
} = token;
|
|
|
const popoverToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__/* .merge */ .TS)(token, {
|
|
|
popoverPadding: 12,
|
|
|
popoverBg: colorBgElevated,
|
|
|
popoverColor: colorText
|
|
|
});
|
|
|
return [genBaseStyle(popoverToken), genColorStyle(popoverToken), wireframe && genWireframeStyle(popoverToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_5__/* .initZoomMotion */ ._y)(popoverToken, 'zoom-big')];
|
|
|
}, token => ({
|
|
|
width: 177,
|
|
|
minWidth: 177,
|
|
|
zIndexPopup: token.zIndexPopupBase + 30
|
|
|
}), {
|
|
|
resetStyle: false,
|
|
|
deprecatedTokens: [['width', 'minWidth']]
|
|
|
}));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 51581:
|
|
|
/*!****************************************************************************************************!*\
|
|
|
!*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/dist/InfiniteScroll.js ***!
|
|
|
\****************************************************************************************************/
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({
|
|
|
value: true
|
|
|
}));
|
|
|
|
|
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
var _react = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
var _react2 = _interopRequireDefault(_react);
|
|
|
|
|
|
var _propTypes = __webpack_require__(/*! prop-types */ 12708);
|
|
|
|
|
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
|
|
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
var InfiniteScroll = function (_Component) {
|
|
|
_inherits(InfiniteScroll, _Component);
|
|
|
|
|
|
function InfiniteScroll(props) {
|
|
|
_classCallCheck(this, InfiniteScroll);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));
|
|
|
|
|
|
_this.scrollListener = _this.scrollListener.bind(_this);
|
|
|
_this.eventListenerOptions = _this.eventListenerOptions.bind(_this);
|
|
|
_this.mousewheelListener = _this.mousewheelListener.bind(_this);
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
|
_createClass(InfiniteScroll, [{
|
|
|
key: 'componentDidMount',
|
|
|
value: function componentDidMount() {
|
|
|
this.pageLoaded = this.props.pageStart;
|
|
|
this.options = this.eventListenerOptions();
|
|
|
this.attachScrollListener();
|
|
|
}
|
|
|
}, {
|
|
|
key: 'componentDidUpdate',
|
|
|
value: function componentDidUpdate() {
|
|
|
if (this.props.isReverse && this.loadMore) {
|
|
|
var parentElement = this.getParentElement(this.scrollComponent);
|
|
|
parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;
|
|
|
this.loadMore = false;
|
|
|
}
|
|
|
this.attachScrollListener();
|
|
|
}
|
|
|
}, {
|
|
|
key: 'componentWillUnmount',
|
|
|
value: function componentWillUnmount() {
|
|
|
this.detachScrollListener();
|
|
|
this.detachMousewheelListener();
|
|
|
}
|
|
|
}, {
|
|
|
key: 'isPassiveSupported',
|
|
|
value: function isPassiveSupported() {
|
|
|
var passive = false;
|
|
|
|
|
|
var testOptions = {
|
|
|
get passive() {
|
|
|
passive = true;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
try {
|
|
|
document.addEventListener('test', null, testOptions);
|
|
|
document.removeEventListener('test', null, testOptions);
|
|
|
} catch (e) {
|
|
|
// ignore
|
|
|
}
|
|
|
return passive;
|
|
|
}
|
|
|
}, {
|
|
|
key: 'eventListenerOptions',
|
|
|
value: function eventListenerOptions() {
|
|
|
var options = this.props.useCapture;
|
|
|
|
|
|
if (this.isPassiveSupported()) {
|
|
|
options = {
|
|
|
useCapture: this.props.useCapture,
|
|
|
passive: true
|
|
|
};
|
|
|
}
|
|
|
return options;
|
|
|
}
|
|
|
|
|
|
// Set a defaut loader for all your `InfiniteScroll` components
|
|
|
|
|
|
}, {
|
|
|
key: 'setDefaultLoader',
|
|
|
value: function setDefaultLoader(loader) {
|
|
|
this.defaultLoader = loader;
|
|
|
}
|
|
|
}, {
|
|
|
key: 'detachMousewheelListener',
|
|
|
value: function detachMousewheelListener() {
|
|
|
var scrollEl = window;
|
|
|
if (this.props.useWindow === false) {
|
|
|
scrollEl = this.scrollComponent.parentNode;
|
|
|
}
|
|
|
|
|
|
scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
|
|
}
|
|
|
}, {
|
|
|
key: 'detachScrollListener',
|
|
|
value: function detachScrollListener() {
|
|
|
var scrollEl = window;
|
|
|
if (this.props.useWindow === false) {
|
|
|
scrollEl = this.getParentElement(this.scrollComponent);
|
|
|
}
|
|
|
|
|
|
scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
}
|
|
|
}, {
|
|
|
key: 'getParentElement',
|
|
|
value: function getParentElement(el) {
|
|
|
var scrollParent = this.props.getScrollParent && this.props.getScrollParent();
|
|
|
if (scrollParent != null) {
|
|
|
return scrollParent;
|
|
|
}
|
|
|
return el && el.parentNode;
|
|
|
}
|
|
|
}, {
|
|
|
key: 'filterProps',
|
|
|
value: function filterProps(props) {
|
|
|
return props;
|
|
|
}
|
|
|
}, {
|
|
|
key: 'attachScrollListener',
|
|
|
value: function attachScrollListener() {
|
|
|
var parentElement = this.getParentElement(this.scrollComponent);
|
|
|
|
|
|
if (!this.props.hasMore || !parentElement) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var scrollEl = window;
|
|
|
if (this.props.useWindow === false) {
|
|
|
scrollEl = parentElement;
|
|
|
}
|
|
|
|
|
|
scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
|
|
scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
|
|
|
if (this.props.initialLoad) {
|
|
|
this.scrollListener();
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: 'mousewheelListener',
|
|
|
value: function mousewheelListener(e) {
|
|
|
// Prevents Chrome hangups
|
|
|
// See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257
|
|
|
if (e.deltaY === 1 && !this.isPassiveSupported()) {
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: 'scrollListener',
|
|
|
value: function scrollListener() {
|
|
|
var el = this.scrollComponent;
|
|
|
var scrollEl = window;
|
|
|
var parentNode = this.getParentElement(el);
|
|
|
|
|
|
var offset = void 0;
|
|
|
if (this.props.useWindow) {
|
|
|
var doc = document.documentElement || document.body.parentNode || document.body;
|
|
|
var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;
|
|
|
if (this.props.isReverse) {
|
|
|
offset = scrollTop;
|
|
|
} else {
|
|
|
offset = this.calculateOffset(el, scrollTop);
|
|
|
}
|
|
|
} else if (this.props.isReverse) {
|
|
|
offset = parentNode.scrollTop;
|
|
|
} else {
|
|
|
offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;
|
|
|
}
|
|
|
|
|
|
// Here we make sure the element is visible as well as checking the offset
|
|
|
if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {
|
|
|
this.detachScrollListener();
|
|
|
this.beforeScrollHeight = parentNode.scrollHeight;
|
|
|
this.beforeScrollTop = parentNode.scrollTop;
|
|
|
// Call loadMore after detachScrollListener to allow for non-async loadMore functions
|
|
|
if (typeof this.props.loadMore === 'function') {
|
|
|
this.props.loadMore(this.pageLoaded += 1);
|
|
|
this.loadMore = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: 'calculateOffset',
|
|
|
value: function calculateOffset(el, scrollTop) {
|
|
|
if (!el) {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);
|
|
|
}
|
|
|
}, {
|
|
|
key: 'calculateTopPosition',
|
|
|
value: function calculateTopPosition(el) {
|
|
|
if (!el) {
|
|
|
return 0;
|
|
|
}
|
|
|
return el.offsetTop + this.calculateTopPosition(el.offsetParent);
|
|
|
}
|
|
|
}, {
|
|
|
key: 'render',
|
|
|
value: function render() {
|
|
|
var _this2 = this;
|
|
|
|
|
|
var renderProps = this.filterProps(this.props);
|
|
|
|
|
|
var children = renderProps.children,
|
|
|
element = renderProps.element,
|
|
|
hasMore = renderProps.hasMore,
|
|
|
initialLoad = renderProps.initialLoad,
|
|
|
isReverse = renderProps.isReverse,
|
|
|
loader = renderProps.loader,
|
|
|
loadMore = renderProps.loadMore,
|
|
|
pageStart = renderProps.pageStart,
|
|
|
ref = renderProps.ref,
|
|
|
threshold = renderProps.threshold,
|
|
|
useCapture = renderProps.useCapture,
|
|
|
useWindow = renderProps.useWindow,
|
|
|
getScrollParent = renderProps.getScrollParent,
|
|
|
props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);
|
|
|
|
|
|
props.ref = function (node) {
|
|
|
_this2.scrollComponent = node;
|
|
|
if (ref) {
|
|
|
ref(node);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
var childrenArray = [children];
|
|
|
if (hasMore) {
|
|
|
if (loader) {
|
|
|
isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);
|
|
|
} else if (this.defaultLoader) {
|
|
|
isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);
|
|
|
}
|
|
|
}
|
|
|
return _react2.default.createElement(element, props, childrenArray);
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return InfiniteScroll;
|
|
|
}(_react.Component);
|
|
|
|
|
|
InfiniteScroll.propTypes = {
|
|
|
children: _propTypes2.default.node.isRequired,
|
|
|
element: _propTypes2.default.node,
|
|
|
hasMore: _propTypes2.default.bool,
|
|
|
initialLoad: _propTypes2.default.bool,
|
|
|
isReverse: _propTypes2.default.bool,
|
|
|
loader: _propTypes2.default.node,
|
|
|
loadMore: _propTypes2.default.func.isRequired,
|
|
|
pageStart: _propTypes2.default.number,
|
|
|
ref: _propTypes2.default.func,
|
|
|
getScrollParent: _propTypes2.default.func,
|
|
|
threshold: _propTypes2.default.number,
|
|
|
useCapture: _propTypes2.default.bool,
|
|
|
useWindow: _propTypes2.default.bool
|
|
|
};
|
|
|
InfiniteScroll.defaultProps = {
|
|
|
element: 'div',
|
|
|
hasMore: false,
|
|
|
initialLoad: true,
|
|
|
pageStart: 0,
|
|
|
ref: null,
|
|
|
threshold: 250,
|
|
|
useWindow: true,
|
|
|
isReverse: false,
|
|
|
useCapture: false,
|
|
|
loader: null,
|
|
|
getScrollParent: null
|
|
|
};
|
|
|
exports["default"] = InfiniteScroll;
|
|
|
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 26724:
|
|
|
/*!**************************************************************************************!*\
|
|
|
!*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js ***!
|
|
|
\**************************************************************************************/
|
|
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
module.exports = __webpack_require__(/*! ./dist/InfiniteScroll */ 51581)
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |