You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3328 lines
151 KiB
3328 lines
151 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12303,52720,28683],{
|
|
|
|
/***/ 27812:
|
|
/*!***********************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
|
|
\***********************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_ArrowLeftOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(16378);
|
|
// 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/ArrowLeftOutlined.js
|
|
// This icon file is generated automatically.
|
|
var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
|
|
/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined);
|
|
|
|
// 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/ArrowLeftOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_ArrowLeftOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_ArrowLeftOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 26227:
|
|
/*!********************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules ***!
|
|
\********************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_DeleteOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(16378);
|
|
// 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/DeleteOutlined.js
|
|
// This icon file is generated automatically.
|
|
var DeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
|
|
/* harmony default export */ var asn_DeleteOutlined = (DeleteOutlined);
|
|
|
|
// 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/DeleteOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var DeleteOutlined_DeleteOutlined = function DeleteOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_DeleteOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(DeleteOutlined_DeleteOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_DeleteOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 87169:
|
|
/*!*******************************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
|
|
\*******************************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_ExclamationCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(16378);
|
|
// 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/ExclamationCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.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/ExclamationCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_ExclamationCircleOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_ExclamationCircleOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 95869:
|
|
/*!**********************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules ***!
|
|
\**********************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_SolutionOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(16378);
|
|
// 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/SolutionOutlined.js
|
|
// This icon file is generated automatically.
|
|
var SolutionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z" } }] }, "name": "solution", "theme": "outlined" };
|
|
/* harmony default export */ var asn_SolutionOutlined = (SolutionOutlined);
|
|
|
|
// 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/SolutionOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var SolutionOutlined_SolutionOutlined = function SolutionOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_SolutionOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(SolutionOutlined_SolutionOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_SolutionOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 86520:
|
|
/*!*********************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/CommonHomework/Comment/index.tsx + 4 modules ***!
|
|
\*********************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Comment; }
|
|
});
|
|
|
|
// 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/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/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_jszip@3.10.1@jszip/dist/jszip.min.js
|
|
var jszip_min = __webpack_require__(86129);
|
|
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(82710);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(88271);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var es_modal = __webpack_require__(43418);
|
|
// 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/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/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(61621);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
|
|
var breadcrumb = __webpack_require__(66104);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
var divider = __webpack_require__(28103);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(1710);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/index.js + 5 modules
|
|
var timeline = __webpack_require__(10777);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
|
|
var ArrowLeftOutlined = __webpack_require__(27812);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules
|
|
var SolutionOutlined = __webpack_require__(95869);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
var ExclamationCircleOutlined = __webpack_require__(87169);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules
|
|
var DeleteOutlined = __webpack_require__(26227);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(69423);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(64118);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(95972);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
|
var input = __webpack_require__(92832);
|
|
// 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/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/ScoreInput.tsx
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var ScoreInput = (function (_ref) {
|
|
var defaultValue = _ref.defaultValue,
|
|
onBlur = _ref.onBlur,
|
|
max = _ref.max,
|
|
_ref$className = _ref.className,
|
|
className = _ref$className === void 0 ? 'game-score' : _ref$className;
|
|
var _useState = (0,_react_17_0_2_react.useState)(defaultValue),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
value = _useState2[0],
|
|
setValue = _useState2[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
setValue(defaultValue);
|
|
}, [defaultValue]);
|
|
function onChange(v) {
|
|
setValue(v);
|
|
}
|
|
function onBlurHandler() {
|
|
if (value) {
|
|
onBlur(value > max ? max : value);
|
|
setValue(null);
|
|
}
|
|
}
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
max: max,
|
|
min: 0,
|
|
className: className,
|
|
value: value,
|
|
onChange: onChange,
|
|
onBlur: onBlurHandler
|
|
});
|
|
});
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/ChangeCommit/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ChangeCommitmodules = ({"greyText":"greyText___lvEE6","info":"info___El01Z","label":"label___GmvST","blackContent":"blackContent___FYo0Z","orangeContent":"orangeContent____uYQ3","inputLabel":"inputLabel___ruiZm","tableTitle":"tableTitle___ir3x7","scoreTable":"scoreTable___b9Z37"});
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/ChangeCommit/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DelShixun = function DelShixun(_ref) {
|
|
var _homeWorkReport$stage;
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
dispatch = _ref.dispatch,
|
|
classroomList = _ref.classroomList,
|
|
gethomeworkreport = _ref.gethomeworkreport,
|
|
homeWorkReport = _ref.homeWorkReport;
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
showRequired = _useState2[0],
|
|
setShowRequired = _useState2[1];
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
// useEffect(() => {
|
|
// if (shixunHomeworks.actionTabs.key === '更改点评')
|
|
// form.setFieldsValue({
|
|
// comment: shixunHomeworks.actionTabs.selectArrs?.data?.work_comment,
|
|
// hidden_comment:
|
|
// shixunHomeworks.actionTabs.selectArrs?.data?.work_comment_hidden,
|
|
// });
|
|
// }, [shixunHomeworks.actionTabs.key]);
|
|
var quickCommit = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var formValue, res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
formValue = form.getFieldsValue();
|
|
_context.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.homeworkId, "/shixun_work_comment.json"), {
|
|
method: 'post',
|
|
body: {
|
|
hidden_comment: formValue.hidden_comment,
|
|
comment: formValue.comment
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success('评阅成功');
|
|
form.resetFields();
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {}
|
|
});
|
|
// dispatch({
|
|
// type: 'shixunHomeworks/getShixunWorkReport',
|
|
// payload: { ...params },
|
|
// });
|
|
gethomeworkreport();
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function quickCommit() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var columns = [{
|
|
title: '任务名称',
|
|
dataIndex: 'shixun_name',
|
|
// ellipsis: true,
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
title: text,
|
|
style: {
|
|
width: 140,
|
|
overflow: 'hidden',
|
|
whiteSpace: 'nowrap',
|
|
textOverflow: 'ellipsis'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '开启时间',
|
|
dataIndex: 'open_time',
|
|
width: 160,
|
|
render: function render(text) {
|
|
return text || '--';
|
|
}
|
|
}, {
|
|
title: '评测次数',
|
|
dataIndex: 'evaluate_count'
|
|
}, {
|
|
title: '完成时间',
|
|
dataIndex: 'finished_time',
|
|
width: 160
|
|
}, {
|
|
title: '实训耗时',
|
|
dataIndex: 'cost_time',
|
|
width: 160
|
|
}, {
|
|
title: '迟交扣分',
|
|
dataIndex: 'late_penalty',
|
|
render: function render(text) {
|
|
return text || '--';
|
|
}
|
|
}, {
|
|
title: '得分',
|
|
dataIndex: 'score',
|
|
// align: 'center',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: parseFloat(record.score_full) !== parseFloat(text) ? '#E30000' : '#53C41B'
|
|
},
|
|
children: text
|
|
}), "/", record.score_full]
|
|
});
|
|
}
|
|
}, {
|
|
title: '调分',
|
|
width: 100,
|
|
dataIndex: 'score',
|
|
// align: 'center',
|
|
render: function render(text, record) {
|
|
if ((0,authority/* isAdmin */.GJ)()) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(ScoreInput, {
|
|
max: record.score_full,
|
|
onBlur: ( /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(value) {
|
|
var _classroomList$Assist;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
if (!((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.practice) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise))) {
|
|
_context2.next = 3;
|
|
break;
|
|
}
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
return _context2.abrupt("return");
|
|
case 3:
|
|
_context2.next = 5;
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.homeworkId, "/adjust_score.json"), {
|
|
method: 'post',
|
|
body: {
|
|
score: value
|
|
}
|
|
});
|
|
case 5:
|
|
res = _context2.sent;
|
|
gethomeworkreport();
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("操作成功");
|
|
}
|
|
case 8:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function (_x) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}())
|
|
});
|
|
} else {
|
|
return text;
|
|
}
|
|
}
|
|
}];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
centered: true,
|
|
width: 1080,
|
|
title: "\u70B9\u8BC4\u4F5C\u4E1A",
|
|
open: shixunHomeworks.actionTabs.key === '更改点评' ? true : false,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
var _classroomList$Assist2;
|
|
var formValue;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
if (!((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist2 = classroomList.AssistantObject.practice) !== null && _classroomList$Assist2 !== void 0 && _classroomList$Assist2.can_appraise))) {
|
|
_context3.next = 3;
|
|
break;
|
|
}
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
return _context3.abrupt("return");
|
|
case 3:
|
|
formValue = form.getFieldsValue();
|
|
if (JSON.stringify(formValue) === '{}' || formValue.hidden_comment === '' && formValue.comment === '') {
|
|
setShowRequired(true);
|
|
} else {
|
|
quickCommit();
|
|
}
|
|
form.resetFields();
|
|
case 6:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
})),
|
|
onCancel: function onCancel() {
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {}
|
|
});
|
|
form.resetFields();
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
justify: "space-between",
|
|
className: ChangeCommitmodules.info,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
children: "\u59D3\u540D"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ChangeCommitmodules.blackContent,
|
|
children: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.username
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
children: "\u5B66\u53F7"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ChangeCommitmodules.blackContent,
|
|
children: (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.student_id) || '--'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
children: "\u73ED\u7EA7"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ChangeCommitmodules.blackContent,
|
|
children: (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.group_name) || '--'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
children: "\u8FDF\u4EA4\u6263\u5206"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ChangeCommitmodules.orangeContent,
|
|
children: (homeWorkReport === null || homeWorkReport === void 0 || (_homeWorkReport$stage = homeWorkReport.stage_list[0]) === null || _homeWorkReport$stage === void 0 ? void 0 : _homeWorkReport$stage.late_penalty) || '--'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
children: "\u603B\u6210\u7EE9"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ChangeCommitmodules.orangeContent,
|
|
children: (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.stage_list[0].score) || '--'
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
form: form,
|
|
onChange: function onChange() {
|
|
if (showRequired) setShowRequired(false);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "".concat(ChangeCommitmodules.inputLabel, " ").concat(ChangeCommitmodules.greyText),
|
|
children: "\u5B66\u5458\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
name: "comment",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",
|
|
rows: 3
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "".concat(ChangeCommitmodules.inputLabel, " ").concat(ChangeCommitmodules.greyText),
|
|
children: "\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
name: "hidden_comment",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",
|
|
rows: 3
|
|
})
|
|
})]
|
|
}), showRequired && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: "c-red",
|
|
children: "\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ChangeCommitmodules.tableTitle,
|
|
children: "\u5173\u5361\u6210\u7EE9"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
className: ChangeCommitmodules.scoreTable,
|
|
dataSource: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.stage_list,
|
|
rowKey: "challenge_id",
|
|
pagination: false,
|
|
columns: columns,
|
|
scroll: {
|
|
x: 'max-content'
|
|
}
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var ChangeCommit = ((0,_umi_production_exports.connect)(function (_ref5) {
|
|
var shixunHomeworks = _ref5.shixunHomeworks,
|
|
classroomList = _ref5.classroomList;
|
|
return {
|
|
shixunHomeworks: shixunHomeworks,
|
|
classroomList: classroomList
|
|
};
|
|
})(DelShixun));
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/WorkList/components/RedoShixunModal.tsx
|
|
var RedoShixunModal = __webpack_require__(36323);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Commentmodules = ({"flex_box_center":"flex_box_center___uz0LL","flex_space_between":"flex_space_between___kuKI5","flex_box_vertical_center":"flex_box_vertical_center___VzPH1","flex_box_center_end":"flex_box_center_end___Tyr1U","flex_box_column":"flex_box_column___qsgVa","flex-col":"flex-col___sFVfb","flex-row":"flex-row___NbUu9","justify-start":"justify-start___nBOSA","justify-center":"justify-center___ylZVR","justify-end":"justify-end___Lsyyw","justify-evenly":"justify-evenly___kNWrV","justify-around":"justify-around___ufNyn","justify-between":"justify-between___q4Wf6","align-start":"align-start___KzM_1","align-center":"align-center___Bpcn7","align-end":"align-end___TKWuA","title":"title___SFyGM","export":"export___ezPhH","title1_right":"title1_right___tMOJn","userPic":"userPic___mW4Rr","userInfo":"userInfo___vYvSZ","listItem":"listItem___gJf4Z","rightInfo":"rightInfo___PRYRt","shixunTitle":"shixunTitle___STlvE","shixunWrp":"shixunWrp___knhTt","footerBar":"footerBar___R5IlQ","footerBarStatic":"footerBarStatic___M4EQj","exitComment":"exitComment___NoCI4","nextComment":"nextComment___sFj7z","modal":"modal___TwQdH"});
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
|
|
var RenderHtml = __webpack_require__(85681);
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
var service_shixunHomeworks = __webpack_require__(4900);
|
|
// EXTERNAL MODULE: ./node_modules/_html2pdf.js@0.10.2@html2pdf.js/dist/html2pdf.js
|
|
var html2pdf = __webpack_require__(65022);
|
|
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunHomeworks", "classroomList", "globalSetting", "loading", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var _homeWorkReport$shixu;
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
classroomList = _ref.classroomList,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()({}, (0,_umi_production_exports.useParams)())),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var _params = (0,_umi_production_exports.useParams)();
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
// checkbox checked储存
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 0);
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({
|
|
last: false
|
|
}),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
nextComment = _useState6[0],
|
|
setNextComment = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)({
|
|
last: false
|
|
}),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
Previous = _useState8[0],
|
|
setPrevious = _useState8[1];
|
|
var reportElement = (0,_react_17_0_2_react.useRef)();
|
|
var reportElementInfo = (0,_react_17_0_2_react.useRef)();
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
isExportLoading = _useState10[0],
|
|
setIsExportLoading = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
spinning = _useState12[0],
|
|
setSpinning = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
autoHeight = _useState14[0],
|
|
setAutoHeight = _useState14[1];
|
|
// const { shixunWorkReport, studentWorkCommon } = shixunHomeworks
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
homeWorkReport = _useState16[0],
|
|
sethomeWorkReport = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
previewHtml = _useState18[0],
|
|
setPreviewHtml = _useState18[1];
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
codeloding = _useState20[0],
|
|
setcodeloding = _useState20[1];
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
datatables = _useState22[0],
|
|
setdatatables = _useState22[1];
|
|
var hasPower = (0,authority/* isAdmin */.GJ)();
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(new (jszip_min_default())()),
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
zip = _useState24[0],
|
|
setZip = _useState24[1];
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(0),
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
num = _useState26[0],
|
|
setNum = _useState26[1];
|
|
var _useState27 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
allStudentWorks = _useState28[0],
|
|
setAllStudentWorks = _useState28[1];
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
isshow = _useState30[0],
|
|
setIsshow = _useState30[1];
|
|
var _useState31 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
isshows = _useState32[0],
|
|
setIsshows = _useState32[1];
|
|
var _useState33 = (0,_react_17_0_2_react.useState)(""),
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
score = _useState34[0],
|
|
setscore = _useState34[1];
|
|
// 判断是否为老师
|
|
var _useState35 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState36 = slicedToArray_default()(_useState35, 2),
|
|
isTeacher = _useState36[0],
|
|
setisTeacher = _useState36[1];
|
|
// 如果不是老师就禁用输入框:
|
|
var _useState37 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState38 = slicedToArray_default()(_useState37, 2),
|
|
isDisabled = _useState38[0],
|
|
setisDisabled = _useState38[1];
|
|
var _useState39 = (0,_react_17_0_2_react.useState)(0),
|
|
_useState40 = slicedToArray_default()(_useState39, 2),
|
|
last_score = _useState40[0],
|
|
setlast_score = _useState40[1];
|
|
// 获取用户信息:
|
|
var getUser = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
// const res = await getUserInfo()
|
|
// console.log("-----------===========================用户身份", res);
|
|
// 判断如果用户身份是老师或者管理员身份
|
|
if (user.userInfo.is_teacher || user.userInfo.admin) {
|
|
setisTeacher(true);
|
|
setisDisabled(false);
|
|
}
|
|
case 1:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getUser() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getUser();
|
|
console.log("打印的------", homeWorkReport);
|
|
console.log(shixunHomeworks);
|
|
|
|
// 在这里可以判断有没有查过重
|
|
|
|
setscore(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.repeat_minus_score);
|
|
}, [homeWorkReport, user]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
console.log("触发这", homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_score);
|
|
setlast_score(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_score);
|
|
}, [homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_score, score]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
dispatch({
|
|
type: 'globalSetting/footerToggle',
|
|
payload: false
|
|
});
|
|
return function () {
|
|
dispatch({
|
|
type: 'globalSetting/footerToggle',
|
|
payload: true
|
|
});
|
|
};
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (homeWorkReport) {
|
|
var _homeWorkReport$targe;
|
|
var items = [];
|
|
homeWorkReport === null || homeWorkReport === void 0 || (_homeWorkReport$targe = homeWorkReport.target_test_sets) === null || _homeWorkReport$targe === void 0 || _homeWorkReport$targe.map(function (item, index) {
|
|
var _item$targets;
|
|
item === null || item === void 0 || (_item$targets = item.targets) === null || _item$targets === void 0 || _item$targets.map(function (ite, j) {
|
|
var _item$targets2;
|
|
ite.name = item === null || item === void 0 ? void 0 : item.name;
|
|
ite.total_target_score = item === null || item === void 0 ? void 0 : item.total_target_score;
|
|
ite.actual_target_score = item === null || item === void 0 ? void 0 : item.actual_target_score;
|
|
ite.rowSpan = j === 0 ? item === null || item === void 0 || (_item$targets2 = item.targets) === null || _item$targets2 === void 0 ? void 0 : _item$targets2.length : 0;
|
|
ite.order = index + 1;
|
|
items.push(ite);
|
|
});
|
|
});
|
|
setdatatables(items);
|
|
dispatch({
|
|
type: 'classroomList/getAssistantPermissions',
|
|
payload: {
|
|
course_id: params.coursesId
|
|
}
|
|
});
|
|
|
|
// console.log('----',items);
|
|
|
|
// homeWorkReport?.target_test_sets?.[0]?.targets?.map((item:any)=>{
|
|
// item.name=homeWorkReport?.target_test_sets?.[0]?.name;
|
|
// item.total_target_score=homeWorkReport?.target_test_sets?.[0]?.total_target_score;
|
|
// item.actual_target_score=homeWorkReport?.target_test_sets?.[0]?.actual_target_score
|
|
// item.rowSpan=homeWorkReport?.target_test_sets?.[0]?.targets?.length;
|
|
// })
|
|
}
|
|
}, [homeWorkReport]);
|
|
|
|
// console.log('---',homeWorkReport?.target_test_sets?.[0]?.targets);
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (shixunHomeworks.actionTabs.key === '导出实训报告' && allStudentWorks.length > 0) {
|
|
if (homeWorkReport !== null && homeWorkReport !== void 0 && homeWorkReport.course_name) {
|
|
exportReport('all');
|
|
}
|
|
}
|
|
}, [homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_name]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
console.log(_params);
|
|
setParams(objectSpread2_default()({}, _params));
|
|
}, [location.pathname]);
|
|
var scrollView = function scrollView() {
|
|
document.body.scrollIntoView();
|
|
};
|
|
function getData() {
|
|
return _getData.apply(this, arguments);
|
|
} // 解决导出 bug: DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D'
|
|
function _getData() {
|
|
_getData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee17() {
|
|
var _res$all_student_work, _res$all_student_work2;
|
|
var paylaod, res, key, _res$all_student_work3, _res$all_student_work4;
|
|
return regeneratorRuntime_default()().wrap(function _callee17$(_context19) {
|
|
while (1) switch (_context19.prev = _context19.next) {
|
|
case 0:
|
|
paylaod = JSON.parse(sessionStorage['all_student_works_params'] || '{}');
|
|
_context19.next = 3;
|
|
return dispatch({
|
|
type: 'shixunHomeworks/getAllStudentWorks',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), paylaod)
|
|
});
|
|
case 3:
|
|
res = _context19.sent;
|
|
// setSpinning(false);
|
|
setAllStudentWorks(res['all_student_works']);
|
|
key = (_res$all_student_work = res['all_student_works']) === null || _res$all_student_work === void 0 ? void 0 : _res$all_student_work.map(function (item) {
|
|
return String(item.student_work_id);
|
|
}).indexOf(params.homeworkId);
|
|
if (key === ((_res$all_student_work2 = res['all_student_works']) === null || _res$all_student_work2 === void 0 ? void 0 : _res$all_student_work2.length) - 1) {
|
|
setNextComment({
|
|
last: true
|
|
});
|
|
} else {
|
|
setNextComment((_res$all_student_work3 = res['all_student_works']) === null || _res$all_student_work3 === void 0 ? void 0 : _res$all_student_work3[key + 1]);
|
|
}
|
|
if (key === 0) {
|
|
setPrevious({
|
|
last: true
|
|
});
|
|
} else {
|
|
setPrevious((_res$all_student_work4 = res['all_student_works']) === null || _res$all_student_work4 === void 0 ? void 0 : _res$all_student_work4[key - 1]);
|
|
}
|
|
case 8:
|
|
case "end":
|
|
return _context19.stop();
|
|
}
|
|
}, _callee17);
|
|
}));
|
|
return _getData.apply(this, arguments);
|
|
}
|
|
var handleRemoveSurplusCanvas = function handleRemoveSurplusCanvas() {
|
|
document.querySelectorAll('canvas').forEach(function (item) {
|
|
(!item.clientWidth || !item.clientHeight) && item.remove();
|
|
});
|
|
};
|
|
|
|
// const setMonocoHeight = () => {
|
|
// if (reportElement.current.offsetHeight > 62000) {
|
|
// setAutoHeight(false)
|
|
// } else {
|
|
// setAutoHeight(true)
|
|
// }
|
|
// }
|
|
|
|
var exportReport = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(type) {
|
|
var nums, modal, opt, aaa, _aaa, next, _next, pages, worker, folder, _loop, i;
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context9) {
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
case 0:
|
|
_next = function _next3() {
|
|
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
var res, _res$data, _res$data2, _res$data3, res1;
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
case 0:
|
|
_context8.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(allStudentWorks[nums]['student_work_id'], "/jupyter_work_report.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context8.sent;
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) {
|
|
_context8.next = 14;
|
|
break;
|
|
}
|
|
sethomeWorkReport(res.data);
|
|
if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && (_res$data = _res$data.shixun_detail[0]) !== null && _res$data !== void 0 && _res$data.myshixun_identifier)) {
|
|
_context8.next = 13;
|
|
break;
|
|
}
|
|
setcodeloding(true);
|
|
_context8.next = 9;
|
|
return (0,fetch/* default */.ZP)("/api/jupyters/preview_tpi.json", {
|
|
method: 'get',
|
|
params: {
|
|
identifier: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 || (_res$data2 = _res$data2.shixun_detail[0]) === null || _res$data2 === void 0 ? void 0 : _res$data2.myshixun_identifier,
|
|
student_work_id: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.work_id
|
|
// identifier: "qm28kagvuf"
|
|
}
|
|
});
|
|
case 9:
|
|
res1 = _context8.sent;
|
|
if (res1.status === 0) {
|
|
setPreviewHtml(res1.html_content);
|
|
setcodeloding(false);
|
|
// setStatus(Status.Preview)
|
|
aaa();
|
|
}
|
|
_context8.next = 14;
|
|
break;
|
|
case 13:
|
|
aaa();
|
|
case 14:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return _next.apply(this, arguments);
|
|
};
|
|
next = function _next2() {
|
|
return _next.apply(this, arguments);
|
|
};
|
|
_aaa = function _aaa3() {
|
|
_aaa = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
scrollView();
|
|
nums++;
|
|
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
var _homeWorkReport$stage;
|
|
var folders, pages, worker, _loop2, _i;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
handleRemoveSurplusCanvas();
|
|
folders = zip.folder("".concat(homeWorkReport === null || homeWorkReport === void 0 || (_homeWorkReport$stage = homeWorkReport.stage_list[0]) === null || _homeWorkReport$stage === void 0 ? void 0 : _homeWorkReport$stage.shixun_name));
|
|
pages = document.querySelector('#export-all').children;
|
|
worker = html2pdf_default()();
|
|
_loop2 = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop2(_i) {
|
|
return regeneratorRuntime_default()().wrap(function _loop2$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
_context5.next = 2;
|
|
return worker.set(opt).from(pages[_i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(pdf) {
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
if (!(_i < pages.length - 1)) {
|
|
_context4.next = 3;
|
|
break;
|
|
}
|
|
_context4.next = 3;
|
|
return pdf.addPage();
|
|
case 3:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return function (_x3) {
|
|
return _ref6.apply(this, arguments);
|
|
};
|
|
}());
|
|
case 2:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _loop2);
|
|
});
|
|
_i = 0;
|
|
case 6:
|
|
if (!(_i < pages.length)) {
|
|
_context6.next = 11;
|
|
break;
|
|
}
|
|
return _context6.delegateYield(_loop2(_i), "t0", 8);
|
|
case 8:
|
|
_i++;
|
|
_context6.next = 6;
|
|
break;
|
|
case 11:
|
|
folders.file("".concat(allStudentWorks[nums - 1]['student_work_user_name'], ".pdf"), worker.output("blob"));
|
|
// folder.file(`${homeWorkReport?.username}.pdf`, worker.output("blob"), { base64: false });
|
|
// const codesF = folders.folder("代码文件")
|
|
// homeWorkReport?.shixun_detail?.map((item: any, index: number) => {
|
|
// const codesG = codesF.folder(`第${index + 1}关-${item.subject}-${item.id}`)
|
|
// item?.game_codes?.map((i: any) => {
|
|
// codesG.file(`${i.filename}.txt`, i?.content);
|
|
// })
|
|
// })
|
|
|
|
// zip.file(`${allStudentWorks[nums - 1]['student_work_user_name']}${nums}.pdf`, pdfUrl);
|
|
modal.update({
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: nums
|
|
}), "/", allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length, /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"]
|
|
})
|
|
});
|
|
if (nums == (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length)) {
|
|
modal.destroy();
|
|
download();
|
|
} else {
|
|
next();
|
|
}
|
|
case 14:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee4);
|
|
})), 2200);
|
|
case 3:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return _aaa.apply(this, arguments);
|
|
};
|
|
aaa = function _aaa2() {
|
|
return _aaa.apply(this, arguments);
|
|
};
|
|
nums = 0;
|
|
// if (type !== 'all')
|
|
// setIsExportLoading(true)
|
|
// else
|
|
modal = es_modal/* default */.Z.info({
|
|
width: 460,
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-red",
|
|
children: "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3"
|
|
})]
|
|
}),
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: nums + 1
|
|
}), "/", type !== 'all' ? 1 : allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length, /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"]
|
|
}),
|
|
maskClosable: false,
|
|
className: Commentmodules.modal,
|
|
onOk: function onOk() {}
|
|
});
|
|
opt = {
|
|
margin: [0, 0],
|
|
filename: "".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.username, ".pdf"),
|
|
// image: {
|
|
// type: 'jpeg',
|
|
// quality: 0.98
|
|
// },
|
|
html2canvas: {
|
|
// dpi: 192,
|
|
// scale:2,
|
|
useCORS: true,
|
|
letterRendering: true
|
|
},
|
|
jsPDF: {
|
|
unit: 'mm',
|
|
format: 'a4',
|
|
orientation: 'landscape'
|
|
// unit: 'pt', format: [1200, 800], orientation: 'portrait'
|
|
}
|
|
};
|
|
if (!(type !== 'all' || (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length) < 2)) {
|
|
_context9.next = 27;
|
|
break;
|
|
}
|
|
handleRemoveSurplusCanvas();
|
|
scrollView();
|
|
|
|
// await new Promise(function (resolve, reject) {
|
|
// setMonocoHeight()
|
|
// setTimeout(function () {
|
|
// resolve('');
|
|
// }, 1500);
|
|
// });
|
|
pages = reportElementInfo.current.children;
|
|
worker = html2pdf_default()();
|
|
folder = zip.folder("".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.username));
|
|
_loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop(i) {
|
|
return regeneratorRuntime_default()().wrap(function _loop$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
_context3.next = 2;
|
|
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(pdf) {
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
if (!(i < pages.length - 1)) {
|
|
_context2.next = 3;
|
|
break;
|
|
}
|
|
_context2.next = 3;
|
|
return pdf.addPage();
|
|
case 3:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function (_x2) {
|
|
return _ref4.apply(this, arguments);
|
|
};
|
|
}());
|
|
case 2:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _loop);
|
|
});
|
|
i = 0;
|
|
case 15:
|
|
if (!(i < pages.length)) {
|
|
_context9.next = 20;
|
|
break;
|
|
}
|
|
return _context9.delegateYield(_loop(i), "t0", 17);
|
|
case 17:
|
|
i++;
|
|
_context9.next = 15;
|
|
break;
|
|
case 20:
|
|
setIsExportLoading(false);
|
|
|
|
// zip.file(`${homeWorkReport?.username}.pdf`, pdfUrl);
|
|
folder.file("".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.username, ".pdf"), worker.output("blob"), {
|
|
base64: false
|
|
});
|
|
// const codeF = folder.folder("代码文件")
|
|
// homeWorkReport?.shixun_detail?.map((item: any, index: number) => {
|
|
// const codesG = codeF.folder(`第${index + 1}关-${item.subject}-${item.id}`)
|
|
// item?.game_codes?.map((i: any) => {
|
|
// codesG.file(`${i.filename}.txt`, i?.content);
|
|
// })
|
|
// })
|
|
// worker.save()
|
|
modal.destroy();
|
|
download();
|
|
return _context9.abrupt("return");
|
|
case 27:
|
|
next();
|
|
case 28:
|
|
case "end":
|
|
return _context9.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return function exportReport(_x) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
var download = function download() {
|
|
zip.generateAsync({
|
|
type: "blob"
|
|
}).then(function (content) {
|
|
var link = document.createElement('a');
|
|
link.href = window.URL.createObjectURL(content);
|
|
link.download = (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_name) + '.zip';
|
|
//此写法兼容可火狐浏览器
|
|
document.body.appendChild(link);
|
|
var evt = document.createEvent("MouseEvents");
|
|
evt.initEvent("click", false, false);
|
|
link.dispatchEvent(evt);
|
|
document.body.removeChild(link);
|
|
setZip(new (jszip_min_default())());
|
|
});
|
|
setAutoHeight(false);
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
initData();
|
|
}, [params.homeworkId]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if ((0,authority/* isAdmin */.GJ)()) {
|
|
getData();
|
|
}
|
|
}, [user]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
console.log(homeWorkReport);
|
|
}, [homeWorkReport]);
|
|
var gethomeworkreport = /*#__PURE__*/function () {
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context10) {
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
case 0:
|
|
_context10.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.homeworkId, "/jupyter_work_report.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context10.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
sethomeWorkReport(res.data);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context10.stop();
|
|
}
|
|
}, _callee8);
|
|
}));
|
|
return function gethomeworkreport() {
|
|
return _ref7.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getinitData = /*#__PURE__*/function () {
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
var res, _res$data4, _res$data5, _res$data6, res1;
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context11) {
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
case 0:
|
|
_context11.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.homeworkId, "/jupyter_work_report.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context11.sent;
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) {
|
|
_context11.next = 14;
|
|
break;
|
|
}
|
|
sethomeWorkReport(res.data);
|
|
if (!(res !== null && res !== void 0 && (_res$data4 = res.data) !== null && _res$data4 !== void 0 && (_res$data4 = _res$data4.shixun_detail[0]) !== null && _res$data4 !== void 0 && _res$data4.myshixun_identifier)) {
|
|
_context11.next = 14;
|
|
break;
|
|
}
|
|
setcodeloding(true);
|
|
_context11.next = 9;
|
|
return (0,fetch/* default */.ZP)("/api/jupyters/preview_tpi.json", {
|
|
method: 'get',
|
|
params: {
|
|
identifier: res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 || (_res$data5 = _res$data5.shixun_detail[0]) === null || _res$data5 === void 0 ? void 0 : _res$data5.myshixun_identifier,
|
|
student_work_id: res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.work_id
|
|
// identifier: "qm28kagvuf"
|
|
}
|
|
});
|
|
case 9:
|
|
res1 = _context11.sent;
|
|
if (!(res1.status === 0)) {
|
|
_context11.next = 14;
|
|
break;
|
|
}
|
|
setPreviewHtml(res1.html_content);
|
|
setcodeloding(false);
|
|
// setStatus(Status.Preview)
|
|
return _context11.abrupt("return");
|
|
case 14:
|
|
case "end":
|
|
return _context11.stop();
|
|
}
|
|
}, _callee9);
|
|
}));
|
|
return function getinitData() {
|
|
return _ref8.apply(this, arguments);
|
|
};
|
|
}();
|
|
var initData = /*#__PURE__*/function () {
|
|
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context12) {
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
case 0:
|
|
setSpinning(true);
|
|
// await dispatch({
|
|
// type: 'shixunHomeworks/gethomeWorkReport',
|
|
// payload: { ...params },
|
|
// })
|
|
// if (isAdmin()){
|
|
// getData()
|
|
// }
|
|
getinitData();
|
|
setSpinning(false);
|
|
case 3:
|
|
case "end":
|
|
return _context12.stop();
|
|
}
|
|
}, _callee10);
|
|
}));
|
|
return function initData() {
|
|
return _ref9.apply(this, arguments);
|
|
};
|
|
}();
|
|
var columns = [{
|
|
title: '任务名称',
|
|
dataIndex: 'shixun_name',
|
|
width: 200,
|
|
ellipsis: true,
|
|
render: function render(text, record, index) {
|
|
return text;
|
|
}
|
|
}, {
|
|
title: '开启时间',
|
|
dataIndex: 'open_time',
|
|
width: 170,
|
|
render: function render(text) {
|
|
return text || '--';
|
|
}
|
|
}, {
|
|
title: '评测次数',
|
|
dataIndex: 'evaluate_count'
|
|
}, {
|
|
title: '完成时间',
|
|
dataIndex: 'finished_time',
|
|
width: 170
|
|
}, {
|
|
title: '实训耗时',
|
|
dataIndex: 'cost_time',
|
|
width: 160
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
}, {
|
|
title: '迟交扣分',
|
|
dataIndex: 'late_penalty',
|
|
render: function render(text) {
|
|
return text || '--';
|
|
}
|
|
}, {
|
|
title: '得分',
|
|
dataIndex: 'score',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: parseFloat(record.score_full) !== parseFloat(text) ? 'red' : 'green'
|
|
},
|
|
children: text ? text : 0
|
|
}), "/", record.score_full]
|
|
});
|
|
}
|
|
}, {
|
|
title: '调分',
|
|
dataIndex: 'score',
|
|
render: function render(text, record) {
|
|
if (hasPower) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(ScoreInput, {
|
|
max: record.score_full,
|
|
onBlur: ( /*#__PURE__*/function () {
|
|
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(value) {
|
|
var _classroomList$Assist;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee11$(_context13) {
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
case 0:
|
|
if (!((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.practice) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise))) {
|
|
_context13.next = 3;
|
|
break;
|
|
}
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
return _context13.abrupt("return");
|
|
case 3:
|
|
_context13.next = 5;
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.homeworkId, "/adjust_score.json"), {
|
|
method: 'post',
|
|
body: {
|
|
score: value
|
|
}
|
|
});
|
|
case 5:
|
|
res = _context13.sent;
|
|
gethomeworkreport();
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("操作成功");
|
|
}
|
|
case 8:
|
|
case "end":
|
|
return _context13.stop();
|
|
}
|
|
}, _callee11);
|
|
}));
|
|
return function (_x4) {
|
|
return _ref10.apply(this, arguments);
|
|
};
|
|
}())
|
|
});
|
|
} else {
|
|
return text;
|
|
}
|
|
}
|
|
}];
|
|
var comments = homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.comment_scores.map(function (item) {
|
|
return {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 24,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: 1,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-light-black mr10",
|
|
children: item.user_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u8C03\u5206\u4E3A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "ml30 c-orange",
|
|
children: [item.score ? item.score : 0, "\u5206"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-light-black ml10",
|
|
children: item.comment_time
|
|
})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 24,
|
|
className: "mt8",
|
|
children: item.content ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#333333'
|
|
},
|
|
children: item.content
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-light-black",
|
|
children: "\u6682\u672A\u5199\u8BC4\u8BED"
|
|
})
|
|
})]
|
|
})
|
|
};
|
|
});
|
|
var skip = function skip(type) {
|
|
setPreviewHtml(null);
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {
|
|
key: '',
|
|
type: 2
|
|
}
|
|
});
|
|
setTimeout(function () {
|
|
if (type === 'next') {
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.student_work_id, "/comment"));
|
|
} else {
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/").concat(Previous === null || Previous === void 0 ? void 0 : Previous.student_work_id, "/comment"));
|
|
}
|
|
}, 200);
|
|
};
|
|
|
|
// 老师编辑查重扣分执行的函数:
|
|
|
|
var changescore = function changescore(e) {
|
|
setscore("");
|
|
if (e.target.value) {
|
|
// console.log(e.target.value);
|
|
console.log("进来", homeWorkReport);
|
|
// 重新编辑的分数不可大于设置的分数:
|
|
e.target.value = e.target.value > (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.repeat_setting_score) ? homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.repeat_setting_score : e.target.value;
|
|
setscore(e.target.value);
|
|
}
|
|
};
|
|
// 输入框失焦后 触发更新分数的接口
|
|
var gochange = /*#__PURE__*/function () {
|
|
var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee12$(_context14) {
|
|
while (1) switch (_context14.prev = _context14.next) {
|
|
case 0:
|
|
_context14.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_id, "/update_repeat_score"), {
|
|
method: 'put',
|
|
body: {
|
|
score: score
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context14.sent;
|
|
_context14.next = 5;
|
|
return dispatch({
|
|
type: 'shixunHomeworks/gethomeWorkReport',
|
|
payload: objectSpread2_default()({}, params)
|
|
});
|
|
case 5:
|
|
// console.log("返回数据", res)
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.info("操作成功");
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context14.stop();
|
|
}
|
|
}, _callee12);
|
|
}));
|
|
return function gochange() {
|
|
return _ref11.apply(this, arguments);
|
|
};
|
|
}();
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: "bg-fafafa",
|
|
style: {
|
|
position: "sticky",
|
|
top: 0
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "edu-container mt10",
|
|
style: {
|
|
paddingBottom: 100
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
loading: spinning,
|
|
active: true,
|
|
avatar: {
|
|
size: 40
|
|
},
|
|
paragraph: {
|
|
rows: 5
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "edu-container",
|
|
children: [(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: "animated fadeIn",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "",
|
|
children: (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.category) && /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
|
separator: ">",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_id, "/common_homework"),
|
|
children: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_name
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_id, "/common_homework/").concat(!(homeWorkReport !== null && homeWorkReport !== void 0 && homeWorkReport.category.main) ? homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.category.category_id : ""),
|
|
children: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.category.category_name
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_id, "/common_homework/").concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.homework_common_id, "/detail"),
|
|
children: "\u4F5C\u4E1A\u8BE6\u60C5"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
children: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.username
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: [Commentmodules.title1, 'mt20'].join(' '),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: 1,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.course_id, "/common_homework/").concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.homework_common_id, "/detail"),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
|
|
className: "font16 c-black"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
className: "font20 ml5",
|
|
children: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.shixun_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* StatusClassroomsTags */.VV, {
|
|
temporary: true,
|
|
status: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.homework_status
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
className: Commentmodules.title1_right,
|
|
children: [
|
|
/*#__PURE__*/
|
|
// homeWorkReport?.view_tpi &&
|
|
(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-yijiandianping mr5"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
className: "c-black",
|
|
target: "_blank",
|
|
to: "/tasks/".concat(homeWorkReport === null || homeWorkReport === void 0 || (_homeWorkReport$shixu = homeWorkReport.shixun_detail) === null || _homeWorkReport$shixu === void 0 || (_homeWorkReport$shixu = _homeWorkReport$shixu[0]) === null || _homeWorkReport$shixu === void 0 ? void 0 : _homeWorkReport$shixu["myshixun_identifier"], "/jupyter").concat((0,authority/* isAdmin */.GJ)() ? '' : "?homework_common_id=".concat(_params.categoryId)),
|
|
children: (0,authority/* isAdmin */.GJ)() ? '查看学员实训' : '查看实训'
|
|
})]
|
|
}),
|
|
// isAdmin() && homeWorkReport?.homework_end === false && !!homeWorkReport?.myshixun_id &&
|
|
(0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
className: "ml10",
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
|
|
return regeneratorRuntime_default()().wrap(function _callee13$(_context15) {
|
|
while (1) switch (_context15.prev = _context15.next) {
|
|
case 0:
|
|
_context15.next = 2;
|
|
return dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {
|
|
key: 'redoShixunModal',
|
|
homework_common_id: _params.categoryId,
|
|
student_work_id: _params.homeworkId
|
|
}
|
|
});
|
|
case 2:
|
|
case "end":
|
|
return _context15.stop();
|
|
}
|
|
}, _callee13);
|
|
})),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-dahuizhongzuo3x mr5"
|
|
}), "\u6253\u56DE\u91CD\u505A"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
className: "ml10",
|
|
onClick: function onClick() {
|
|
return exportReport('');
|
|
},
|
|
loading: isExportLoading,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-daochu mr5"
|
|
}), "\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"]
|
|
}), (0,authority/* isAdmin */.GJ)() && (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length) > 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
className: "ml10",
|
|
onClick: function onClick() {
|
|
return exportReport('all');
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-daochu mr5"
|
|
}), "\u5BFC\u51FA\u5168\u90E8\u5B66\u5458\u5B9E\u8BAD\u62A5\u544A"]
|
|
})]
|
|
})]
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "mt30 relative"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "edu-container bg-white",
|
|
ref: reportElement,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
id: "export-all",
|
|
ref: reportElementInfo,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
id: "export-all-1",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Commentmodules.title,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
children: "\u603B\u4F53\u8BC4\u4EF7"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
className: "mr20",
|
|
type: "primary",
|
|
onClick: function onClick() {
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {
|
|
key: "更改点评",
|
|
selectArrs: {
|
|
myshixun_identifier: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.user_id,
|
|
data: objectSpread2_default()({}, homeWorkReport)
|
|
}
|
|
}
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SolutionOutlined/* default */.Z, {}), homeWorkReport !== null && homeWorkReport !== void 0 && homeWorkReport.has_shixun_work_comment ? "更改点评" : "点评作业"]
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
style: {
|
|
marginTop: 0
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: "pl30 pr30",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
className: Commentmodules.userPic,
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.image_url),
|
|
alt: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.username
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
className: "pt20",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "font16 ml40",
|
|
children: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.username
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkCommonDetailStatus */.Y, {
|
|
status: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_status
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
className: Commentmodules.userInfo,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: ["\u5B66\u53F7\uFF1A", (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.student_id) || '--']
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: ["\u5206\u73ED\uFF1A", (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.group_name) || '--']
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "pl30 pr30 mt30 mb10",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
dataSource: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.stage_list,
|
|
rowKey: function rowKey(r) {
|
|
return r === null || r === void 0 ? void 0 : r.challenge_id;
|
|
},
|
|
pagination: false,
|
|
columns: columns
|
|
})
|
|
}), ((homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_comment_hidden) || (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_comment)) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: 1,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
className: Commentmodules.title,
|
|
children: "\u70B9\u8BC4\u5185\u5BB9"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
className: "pr30",
|
|
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
|
|
return regeneratorRuntime_default()().wrap(function _callee15$(_context17) {
|
|
while (1) switch (_context17.prev = _context17.next) {
|
|
case 0:
|
|
es_modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {}),
|
|
content: '是否确认删除?',
|
|
onOk: function onOk() {
|
|
return asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee14$(_context16) {
|
|
while (1) switch (_context16.prev = _context16.next) {
|
|
case 0:
|
|
_context16.next = 2;
|
|
return (0,service_shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
comment_id: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.comment_id,
|
|
homeworkId: params.homeworkId
|
|
});
|
|
case 2:
|
|
res = _context16.sent;
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("删除成功");
|
|
gethomeworkreport();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context16.stop();
|
|
}
|
|
}, _callee14);
|
|
}))();
|
|
}
|
|
});
|
|
case 1:
|
|
case "end":
|
|
return _context17.stop();
|
|
}
|
|
}, _callee15);
|
|
})),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {}), "\u5220\u9664"]
|
|
})
|
|
})]
|
|
}), (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_comment) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "pl30 pr30",
|
|
style: {
|
|
marginTop: '-5px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-light-black font12",
|
|
children: "# \u5B66\u5458\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
value: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_comment,
|
|
className: "font14"
|
|
})]
|
|
}), (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_comment_hidden) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "pl30 pr30 mt15",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-light-black font12",
|
|
children: "# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
value: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.work_comment_hidden,
|
|
className: "font14"
|
|
})]
|
|
})]
|
|
}), (homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.comment_scores.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
className: Commentmodules.title,
|
|
children: "\u8C03\u5206\u539F\u56E0"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "pl30 pr30",
|
|
style: {
|
|
marginTop: '4px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(timeline/* default */.Z, {
|
|
items: comments
|
|
})
|
|
})]
|
|
})]
|
|
})
|
|
})
|
|
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "".concat(Commentmodules.footerBar, " ").concat(isExportLoading ? Commentmodules.footerBarStatic : ''),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "edu-container",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
className: Commentmodules.exitComment,
|
|
to: "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/detail"),
|
|
children: "\u8FD4\u56DE\u5217\u8868"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: "1",
|
|
className: "tr",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
type: "default",
|
|
disabled: Previous === null || Previous === void 0 ? void 0 : Previous.last,
|
|
onClick: function onClick() {
|
|
return skip();
|
|
},
|
|
children: "\u4E0A\u4E00\u4E2A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
type: "default",
|
|
style: {
|
|
marginLeft: '20px',
|
|
marginRight: '20px'
|
|
},
|
|
disabled: nextComment === null || nextComment === void 0 ? void 0 : nextComment.last,
|
|
onClick: function onClick() {
|
|
return skip('next');
|
|
},
|
|
children: "\u4E0B\u4E00\u4E2A"
|
|
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
type: "primary",
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee16() {
|
|
return regeneratorRuntime_default()().wrap(function _callee16$(_context18) {
|
|
while (1) switch (_context18.prev = _context18.next) {
|
|
case 0:
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {
|
|
key: "更改点评",
|
|
selectArrs: {
|
|
myshixun_identifier: homeWorkReport === null || homeWorkReport === void 0 ? void 0 : homeWorkReport.user_id,
|
|
data: objectSpread2_default()({}, homeWorkReport)
|
|
}
|
|
}
|
|
});
|
|
case 1:
|
|
case "end":
|
|
return _context18.stop();
|
|
}
|
|
}, _callee16);
|
|
})),
|
|
children: "\u70B9\u8BC4\u4F5C\u4E1A"
|
|
})]
|
|
})]
|
|
})
|
|
})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ChangeCommit, {
|
|
gethomeworkreport: gethomeworkreport,
|
|
homeWorkReport: homeWorkReport
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RedoShixunModal/* default */.Z, {
|
|
getData: gethomeworkreport
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
open: isshow,
|
|
width: 860,
|
|
centered: true,
|
|
onCancel: function onCancel() {
|
|
setIsshow(false);
|
|
},
|
|
title: "\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",
|
|
footer: null,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
color: '#333333',
|
|
fontWeight: 400
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
fontWeight: 500
|
|
},
|
|
children: "1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u5B66\u5458\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u5458\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: " \u5B66\u5458\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u5458\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FA6400',
|
|
display: 'flex',
|
|
height: 34,
|
|
alignItems: 'center'
|
|
},
|
|
children: " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "a\u3001\u5B66\u5458\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u5458\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
color: '#333333',
|
|
marginTop: 20,
|
|
fontWeight: 400
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
fontWeight: 500
|
|
},
|
|
children: "2\u3001\u5173\u5361\u603B\u8017\u65F6"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {},
|
|
children: "\u5B66\u5458\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: " \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u5458\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FA6400',
|
|
display: 'flex',
|
|
height: 44,
|
|
paddingTop: 10
|
|
},
|
|
children: " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "a\u3001\u5B66\u5458\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "b\u3001\u5B66\u5458\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u5458\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
color: '#333333',
|
|
marginTop: 20,
|
|
fontWeight: 400
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
fontWeight: 500
|
|
},
|
|
children: "3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {},
|
|
children: "\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u5458\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u5458\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
color: '#333333',
|
|
marginTop: 20,
|
|
fontWeight: 400
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
fontWeight: 500
|
|
},
|
|
children: "\u89C4\u5219\u76EE\u7684"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {},
|
|
children: "\u9F13\u52B1\u5B66\u5458\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
open: isshows,
|
|
title: "\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",
|
|
centered: true,
|
|
footer: null,
|
|
onCancel: function onCancel() {
|
|
setIsshows(false);
|
|
},
|
|
width: 600,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
fontWeight: 400,
|
|
color: '#333333'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#145DFF'
|
|
},
|
|
children: "\u9875\u9762\u505C\u7559\u65F6\u957F"
|
|
}), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
margin: '20px 0px'
|
|
},
|
|
children: ["2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#145DFF'
|
|
},
|
|
children: "\u5173\u5361\u603B\u8017\u65F6"
|
|
}), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#145DFF'
|
|
},
|
|
children: "\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"
|
|
}), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u5458\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"]
|
|
})]
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Comment = ((0,_umi_production_exports.connect)(function (_ref15) {
|
|
var shixunHomeworks = _ref15.shixunHomeworks,
|
|
classroomList = _ref15.classroomList,
|
|
loading = _ref15.loading,
|
|
globalSetting = _ref15.globalSetting,
|
|
user = _ref15.user;
|
|
return {
|
|
shixunHomeworks: shixunHomeworks,
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects,
|
|
user: user
|
|
};
|
|
})(ShixunsListPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 36323:
|
|
/*!*************************************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/WorkList/components/RedoShixunModal.tsx ***!
|
|
\*************************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 43418);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 82710);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! umi */ 88271);
|
|
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/authority */ 64118);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RedoShixunModal = function RedoShixunModal(_ref) {
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
dispatch = _ref.dispatch,
|
|
classroomList = _ref.classroomList,
|
|
getData = _ref.getData;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
|
|
centered: true,
|
|
title: "\u63D0\u793A",
|
|
open: shixunHomeworks.actionTabs.key === 'redoShixunModal',
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
|
|
var _classroomList$Assist;
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
if (!((0,_utils_authority__WEBPACK_IMPORTED_MODULE_5__/* .isAssistant */ .Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.normal) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_redo))) {
|
|
_context.next = 3;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
return _context.abrupt("return");
|
|
case 3:
|
|
_context.next = 5;
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/homework_commons/".concat(shixunHomeworks.actionTabs.homework_common_id, "/batch_redo_modal.json"), {
|
|
method: 'post',
|
|
body: {
|
|
student_work_id: shixunHomeworks.actionTabs.student_work_id
|
|
}
|
|
});
|
|
case 5:
|
|
res = _context.sent;
|
|
if (res.status === 0) {
|
|
antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .ZP.success('操作成功');
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {}
|
|
});
|
|
getData();
|
|
}
|
|
case 7:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
})),
|
|
onCancel: function onCancel() {
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {}
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("p", {
|
|
children: ["\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C", shixunHomeworks.actionTabs.isshixun ? '学员实训' : '学员作品提交', "\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", {
|
|
children: "\u786E\u5B9A\u6253\u56DE?"
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_4__.connect)(function (_ref3) {
|
|
var shixunHomeworks = _ref3.shixunHomeworks,
|
|
classroomList = _ref3.classroomList;
|
|
return {
|
|
shixunHomeworks: shixunHomeworks,
|
|
classroomList: classroomList
|
|
};
|
|
})(RedoShixunModal));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 66104:
|
|
/*!**************************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules ***!
|
|
\**************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ breadcrumb; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(11592);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/pickAttrs.js
|
|
var pickAttrs = __webpack_require__(26112);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
var reactNode = __webpack_require__(92343);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// 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: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js
|
|
var dropdown = __webpack_require__(91857);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbSeparator.js
|
|
"use client";
|
|
|
|
|
|
|
|
const BreadcrumbSeparator = _ref => {
|
|
let {
|
|
children
|
|
} = _ref;
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('breadcrumb');
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("li", {
|
|
className: `${prefixCls}-separator`,
|
|
"aria-hidden": "true"
|
|
}, children === '' ? children : children || '/');
|
|
};
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItemRender.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
function getBreadcrumbName(route, params) {
|
|
if (route.title === undefined || route.title === null) {
|
|
return null;
|
|
}
|
|
const paramsKeys = Object.keys(params).join('|');
|
|
return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
|
|
}
|
|
function renderItem(prefixCls, item, children, href) {
|
|
if (children === null || children === undefined) {
|
|
return null;
|
|
}
|
|
const {
|
|
className,
|
|
onClick
|
|
} = item,
|
|
restItem = __rest(item, ["className", "onClick"]);
|
|
const passedProps = Object.assign(Object.assign({}, (0,pickAttrs/* default */.Z)(restItem, {
|
|
data: true,
|
|
aria: true
|
|
})), {
|
|
onClick
|
|
});
|
|
if (href !== undefined) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("a", Object.assign({}, passedProps, {
|
|
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-link`, className),
|
|
href: href
|
|
}), children);
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, passedProps, {
|
|
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-link`, className)
|
|
}), children);
|
|
}
|
|
function useItemRender(prefixCls, itemRender) {
|
|
const mergedItemRender = (item, params, routes, path, href) => {
|
|
if (itemRender) {
|
|
return itemRender(item, params, routes, path);
|
|
}
|
|
const name = getBreadcrumbName(item, params);
|
|
return renderItem(prefixCls, item, name, href);
|
|
};
|
|
return mergedItemRender;
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbItem.js
|
|
"use client";
|
|
|
|
var BreadcrumbItem_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 InternalBreadcrumbItem = props => {
|
|
const {
|
|
prefixCls,
|
|
separator = '/',
|
|
children,
|
|
menu,
|
|
overlay,
|
|
dropdownProps,
|
|
href
|
|
} = props;
|
|
// Warning for deprecated usage
|
|
if (false) {}
|
|
/** If overlay is have Wrap a Dropdown */
|
|
const renderBreadcrumbNode = breadcrumbItem => {
|
|
if (menu || overlay) {
|
|
const mergeDropDownProps = Object.assign({}, dropdownProps);
|
|
if (menu) {
|
|
const _a = menu || {},
|
|
{
|
|
items
|
|
} = _a,
|
|
menuProps = BreadcrumbItem_rest(_a, ["items"]);
|
|
mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
|
|
items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
|
|
var {
|
|
key,
|
|
title,
|
|
label,
|
|
path
|
|
} = _a,
|
|
itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
|
|
let mergedLabel = label !== null && label !== void 0 ? label : title;
|
|
if (path) {
|
|
mergedLabel = /*#__PURE__*/_react_17_0_2_react.createElement("a", {
|
|
href: `${href}${path}`
|
|
}, mergedLabel);
|
|
}
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
key: key !== null && key !== void 0 ? key : index,
|
|
label: mergedLabel
|
|
});
|
|
})
|
|
});
|
|
} else if (overlay) {
|
|
mergeDropDownProps.overlay = overlay;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({
|
|
placement: "bottom"
|
|
}, mergeDropDownProps), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${prefixCls}-overlay-link`
|
|
}, breadcrumbItem, /*#__PURE__*/_react_17_0_2_react.createElement(DownOutlined/* default */.Z, null)));
|
|
}
|
|
return breadcrumbItem;
|
|
};
|
|
// wrap to dropDown
|
|
const link = renderBreadcrumbNode(children);
|
|
if (link !== undefined && link !== null) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("li", null, link), separator && /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
|
|
}
|
|
return null;
|
|
};
|
|
const BreadcrumbItem = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
children,
|
|
href
|
|
} = props,
|
|
restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
|
|
prefixCls: prefixCls
|
|
}), renderItem(prefixCls, restProps, children, href));
|
|
};
|
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/style/index.js
|
|
|
|
|
|
const genBreadcrumbStyle = token => {
|
|
const {
|
|
componentCls,
|
|
iconCls
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
color: token.itemColor,
|
|
fontSize: token.fontSize,
|
|
[iconCls]: {
|
|
fontSize: token.iconFontSize
|
|
},
|
|
ol: {
|
|
display: 'flex',
|
|
flexWrap: 'wrap',
|
|
margin: 0,
|
|
padding: 0,
|
|
listStyle: 'none'
|
|
},
|
|
a: Object.assign({
|
|
color: token.linkColor,
|
|
transition: `color ${token.motionDurationMid}`,
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
borderRadius: token.borderRadiusSM,
|
|
height: token.lineHeight * token.fontSize,
|
|
display: 'inline-block',
|
|
marginInline: -token.marginXXS,
|
|
'&:hover': {
|
|
color: token.linkHoverColor,
|
|
backgroundColor: token.colorBgTextHover
|
|
}
|
|
}, (0,style/* genFocusStyle */.Qy)(token)),
|
|
[`li:last-child`]: {
|
|
color: token.lastItemColor
|
|
},
|
|
[`${componentCls}-separator`]: {
|
|
marginInline: token.separatorMargin,
|
|
color: token.separatorColor
|
|
},
|
|
[`${componentCls}-link`]: {
|
|
[`
|
|
> ${iconCls} + span,
|
|
> ${iconCls} + a
|
|
`]: {
|
|
marginInlineStart: token.marginXXS
|
|
}
|
|
},
|
|
[`${componentCls}-overlay-link`]: {
|
|
borderRadius: token.borderRadiusSM,
|
|
height: token.lineHeight * token.fontSize,
|
|
display: 'inline-block',
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
marginInline: -token.marginXXS,
|
|
[`> ${iconCls}`]: {
|
|
marginInlineStart: token.marginXXS,
|
|
fontSize: token.fontSizeIcon
|
|
},
|
|
'&:hover': {
|
|
color: token.linkHoverColor,
|
|
backgroundColor: token.colorBgTextHover,
|
|
a: {
|
|
color: token.linkHoverColor
|
|
}
|
|
},
|
|
a: {
|
|
'&:hover': {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
}
|
|
},
|
|
// rtl style
|
|
[`&${token.componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var breadcrumb_style = ((0,genComponentStyleHook/* default */.Z)('Breadcrumb', token => {
|
|
const BreadcrumbToken = (0,statistic/* merge */.TS)(token, {});
|
|
return [genBreadcrumbStyle(BreadcrumbToken)];
|
|
}, token => ({
|
|
itemColor: token.colorTextDescription,
|
|
lastItemColor: token.colorText,
|
|
iconFontSize: token.fontSize,
|
|
linkColor: token.colorTextDescription,
|
|
linkHoverColor: token.colorText,
|
|
separatorColor: token.colorTextDescription,
|
|
separatorMargin: token.marginXS
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItems.js
|
|
var useItems_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;
|
|
};
|
|
|
|
function route2item(route) {
|
|
const {
|
|
breadcrumbName,
|
|
children
|
|
} = route,
|
|
rest = useItems_rest(route, ["breadcrumbName", "children"]);
|
|
const clone = Object.assign({
|
|
title: breadcrumbName
|
|
}, rest);
|
|
if (children) {
|
|
clone.menu = {
|
|
items: children.map(_a => {
|
|
var {
|
|
breadcrumbName: itemBreadcrumbName
|
|
} = _a,
|
|
itemProps = useItems_rest(_a, ["breadcrumbName"]);
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
title: itemBreadcrumbName
|
|
});
|
|
})
|
|
};
|
|
}
|
|
return clone;
|
|
}
|
|
function useItems(items, routes) {
|
|
return (0,_react_17_0_2_react.useMemo)(() => {
|
|
if (items) {
|
|
return items;
|
|
}
|
|
if (routes) {
|
|
return routes.map(route2item);
|
|
}
|
|
return null;
|
|
}, [items, routes]);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/Breadcrumb.js
|
|
"use client";
|
|
|
|
var Breadcrumb_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 getPath = (params, path) => {
|
|
if (path === undefined) {
|
|
return path;
|
|
}
|
|
let mergedPath = (path || '').replace(/^\//, '');
|
|
Object.keys(params).forEach(key => {
|
|
mergedPath = mergedPath.replace(`:${key}`, params[key]);
|
|
});
|
|
return mergedPath;
|
|
};
|
|
const Breadcrumb = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
separator = '/',
|
|
style,
|
|
className,
|
|
rootClassName,
|
|
routes: legacyRoutes,
|
|
items,
|
|
children,
|
|
itemRender,
|
|
params = {}
|
|
} = props,
|
|
restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
breadcrumb
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
let crumbs;
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
const [wrapSSR, hashId] = breadcrumb_style(prefixCls);
|
|
const mergedItems = useItems(items, legacyRoutes);
|
|
if (false) {}
|
|
const mergedItemRender = useItemRender(prefixCls, itemRender);
|
|
if (mergedItems && mergedItems.length > 0) {
|
|
// generated by route
|
|
const paths = [];
|
|
const itemRenderRoutes = items || legacyRoutes;
|
|
crumbs = mergedItems.map((item, index) => {
|
|
const {
|
|
path,
|
|
key,
|
|
type,
|
|
menu,
|
|
overlay,
|
|
onClick,
|
|
className: itemClassName,
|
|
separator: itemSeparator,
|
|
dropdownProps
|
|
} = item;
|
|
const mergedPath = getPath(params, path);
|
|
if (mergedPath !== undefined) {
|
|
paths.push(mergedPath);
|
|
}
|
|
const mergedKey = key !== null && key !== void 0 ? key : index;
|
|
if (type === 'separator') {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, {
|
|
key: mergedKey
|
|
}, itemSeparator);
|
|
}
|
|
const itemProps = {};
|
|
const isLastItem = index === mergedItems.length - 1;
|
|
if (menu) {
|
|
itemProps.menu = menu;
|
|
} else if (overlay) {
|
|
itemProps.overlay = overlay;
|
|
}
|
|
let {
|
|
href
|
|
} = item;
|
|
if (paths.length && mergedPath !== undefined) {
|
|
href = `#/${paths.join('/')}`;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({
|
|
key: mergedKey
|
|
}, itemProps, (0,pickAttrs/* default */.Z)(item, {
|
|
data: true,
|
|
aria: true
|
|
}), {
|
|
className: itemClassName,
|
|
dropdownProps: dropdownProps,
|
|
href: href,
|
|
separator: isLastItem ? '' : separator,
|
|
onClick: onClick,
|
|
prefixCls: prefixCls
|
|
}), mergedItemRender(item, params, itemRenderRoutes, paths, href));
|
|
});
|
|
} else if (children) {
|
|
const childrenLength = (0,toArray/* default */.Z)(children).length;
|
|
crumbs = (0,toArray/* default */.Z)(children).map((element, index) => {
|
|
if (!element) {
|
|
return element;
|
|
}
|
|
// =================== Warning =====================
|
|
if (false) {}
|
|
false ? 0 : void 0;
|
|
const isLastItem = index === childrenLength - 1;
|
|
return (0,reactNode/* cloneElement */.Tm)(element, {
|
|
separator: isLastItem ? '' : separator,
|
|
key: index
|
|
});
|
|
});
|
|
}
|
|
const breadcrumbClassName = _classnames_2_5_1_classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, className, rootClassName, hashId);
|
|
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("nav", Object.assign({
|
|
className: breadcrumbClassName,
|
|
style: mergedStyle
|
|
}, restProps), /*#__PURE__*/_react_17_0_2_react.createElement("ol", null, crumbs)));
|
|
};
|
|
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
|
|
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
|
|
if (false) {}
|
|
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js
|
|
"use client";
|
|
|
|
|
|
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 28103:
|
|
/*!***********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
|
|
\***********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ divider; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js
|
|
|
|
|
|
// ============================== Shared ==============================
|
|
const genSharedDividerStyle = token => {
|
|
const {
|
|
componentCls,
|
|
sizePaddingEdgeHorizontal,
|
|
colorSplit,
|
|
lineWidth,
|
|
textPaddingInline,
|
|
orientationMargin,
|
|
verticalMarginInline
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
|
|
// vertical
|
|
'&-vertical': {
|
|
position: 'relative',
|
|
top: '-0.06em',
|
|
display: 'inline-block',
|
|
height: '0.9em',
|
|
marginInline: verticalMarginInline,
|
|
marginBlock: 0,
|
|
verticalAlign: 'middle',
|
|
borderTop: 0,
|
|
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
|
|
},
|
|
'&-horizontal': {
|
|
display: 'flex',
|
|
clear: 'both',
|
|
width: '100%',
|
|
minWidth: '100%',
|
|
margin: `${token.dividerHorizontalGutterMargin}px 0`
|
|
},
|
|
[`&-horizontal${componentCls}-with-text`]: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
|
|
color: token.colorTextHeading,
|
|
fontWeight: 500,
|
|
fontSize: token.fontSizeLG,
|
|
whiteSpace: 'nowrap',
|
|
textAlign: 'center',
|
|
borderBlockStart: `0 ${colorSplit}`,
|
|
'&::before, &::after': {
|
|
position: 'relative',
|
|
width: '50%',
|
|
borderBlockStart: `${lineWidth}px solid transparent`,
|
|
// Chrome not accept `inherit` in `border-top`
|
|
borderBlockStartColor: 'inherit',
|
|
borderBlockEnd: 0,
|
|
transform: 'translateY(50%)',
|
|
content: "''"
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-left`]: {
|
|
'&::before': {
|
|
width: `${orientationMargin * 100}%`
|
|
},
|
|
'&::after': {
|
|
width: `${100 - orientationMargin * 100}%`
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-right`]: {
|
|
'&::before': {
|
|
width: `${100 - orientationMargin * 100}%`
|
|
},
|
|
'&::after': {
|
|
width: `${orientationMargin * 100}%`
|
|
}
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
display: 'inline-block',
|
|
paddingBlock: 0,
|
|
paddingInline: textPaddingInline
|
|
},
|
|
'&-dashed': {
|
|
background: 'none',
|
|
borderColor: colorSplit,
|
|
borderStyle: 'dashed',
|
|
borderWidth: `${lineWidth}px 0 0`
|
|
},
|
|
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
|
|
'&::before, &::after': {
|
|
borderStyle: 'dashed none none'
|
|
}
|
|
},
|
|
[`&-vertical${componentCls}-dashed`]: {
|
|
borderInlineStartWidth: lineWidth,
|
|
borderInlineEnd: 0,
|
|
borderBlockStart: 0,
|
|
borderBlockEnd: 0
|
|
},
|
|
[`&-plain${componentCls}-with-text`]: {
|
|
color: token.colorText,
|
|
fontWeight: 'normal',
|
|
fontSize: token.fontSize
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
|
|
'&::before': {
|
|
width: 0
|
|
},
|
|
'&::after': {
|
|
width: '100%'
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
paddingInlineStart: sizePaddingEdgeHorizontal
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
|
|
'&::before': {
|
|
width: '100%'
|
|
},
|
|
'&::after': {
|
|
width: 0
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
paddingInlineEnd: sizePaddingEdgeHorizontal
|
|
}
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
|
|
const dividerToken = (0,statistic/* merge */.TS)(token, {
|
|
dividerHorizontalWithTextGutterMargin: token.margin,
|
|
dividerHorizontalGutterMargin: token.marginLG,
|
|
sizePaddingEdgeHorizontal: 0
|
|
});
|
|
return [genSharedDividerStyle(dividerToken)];
|
|
}, token => ({
|
|
textPaddingInline: '1em',
|
|
orientationMargin: 0.05,
|
|
verticalMarginInline: token.marginXS
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const Divider = props => {
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
divider
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
type = 'horizontal',
|
|
orientation = 'center',
|
|
orientationMargin,
|
|
className,
|
|
rootClassName,
|
|
children,
|
|
dashed,
|
|
plain,
|
|
style
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
|
|
const prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
const [wrapSSR, hashId] = divider_style(prefixCls);
|
|
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
|
|
const hasChildren = !!children;
|
|
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
|
|
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
|
|
const classString = _classnames_2_5_1_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
|
|
[`${prefixCls}-with-text`]: hasChildren,
|
|
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
|
|
[`${prefixCls}-dashed`]: !!dashed,
|
|
[`${prefixCls}-plain`]: !!plain,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
|
|
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
|
|
}, className, rootClassName);
|
|
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
|
|
if (typeof orientationMargin === 'number') {
|
|
return orientationMargin;
|
|
}
|
|
if (/^\d+$/.test(orientationMargin)) {
|
|
return Number(orientationMargin);
|
|
}
|
|
return orientationMargin;
|
|
}, [orientationMargin]);
|
|
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
|
|
marginLeft: memoizedOrientationMargin
|
|
}), hasCustomMarginRight && {
|
|
marginRight: memoizedOrientationMargin
|
|
});
|
|
// Warning children not work in vertical mode
|
|
if (false) {}
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
|
className: classString,
|
|
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
|
|
}, restProps, {
|
|
role: "separator"
|
|
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${prefixCls}-inner-text`,
|
|
style: innerStyle
|
|
}, children)));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var divider = (Divider);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 10777:
|
|
/*!************************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/timeline/index.js + 5 modules ***!
|
|
\************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ timeline; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/TimelineItem.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
const TimelineItem = _a => {
|
|
var {
|
|
prefixCls: customizePrefixCls,
|
|
className,
|
|
color = 'blue',
|
|
dot,
|
|
pending = false,
|
|
position /** Dead, but do not pass in <li {...omit()} */,
|
|
label,
|
|
children
|
|
} = _a,
|
|
restProps = __rest(_a, ["prefixCls", "className", "color", "dot", "pending", "position", "label", "children"]);
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('timeline', customizePrefixCls);
|
|
const itemClassName = _classnames_2_5_1_classnames_default()(`${prefixCls}-item`, {
|
|
[`${prefixCls}-item-pending`]: pending
|
|
}, className);
|
|
const customColor = /blue|red|green|gray/.test(color || '') ? undefined : color;
|
|
const dotClassName = _classnames_2_5_1_classnames_default()(`${prefixCls}-item-head`, {
|
|
[`${prefixCls}-item-head-custom`]: !!dot,
|
|
[`${prefixCls}-item-head-${color}`]: !customColor
|
|
});
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("li", Object.assign({}, restProps, {
|
|
className: itemClassName
|
|
}), label && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-item-label`
|
|
}, label), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-item-tail`
|
|
}), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: dotClassName,
|
|
style: {
|
|
borderColor: customColor,
|
|
color: customColor
|
|
}
|
|
}, dot), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-item-content`
|
|
}, children));
|
|
};
|
|
/* harmony default export */ var timeline_TimelineItem = (TimelineItem);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
var toConsumableArray = __webpack_require__(65093);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
var LoadingOutlined = __webpack_require__(58617);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/TimelineItemList.js
|
|
"use client";
|
|
|
|
|
|
var TimelineItemList_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 TimelineItemList = _a => {
|
|
var {
|
|
prefixCls,
|
|
className,
|
|
pending = false,
|
|
children,
|
|
items,
|
|
rootClassName,
|
|
reverse = false,
|
|
direction,
|
|
hashId,
|
|
pendingDot,
|
|
mode = ''
|
|
} = _a,
|
|
restProps = TimelineItemList_rest(_a, ["prefixCls", "className", "pending", "children", "items", "rootClassName", "reverse", "direction", "hashId", "pendingDot", "mode"]);
|
|
const getPositionCls = (position, idx) => {
|
|
if (mode === 'alternate') {
|
|
if (position === 'right') return `${prefixCls}-item-right`;
|
|
if (position === 'left') return `${prefixCls}-item-left`;
|
|
return idx % 2 === 0 ? `${prefixCls}-item-left` : `${prefixCls}-item-right`;
|
|
}
|
|
if (mode === 'left') return `${prefixCls}-item-left`;
|
|
if (mode === 'right') return `${prefixCls}-item-right`;
|
|
if (position === 'right') return `${prefixCls}-item-right`;
|
|
return '';
|
|
};
|
|
const mergedItems = (0,toConsumableArray/* default */.Z)(items || []);
|
|
const pendingNode = typeof pending === 'boolean' ? null : pending;
|
|
if (pending) {
|
|
mergedItems.push({
|
|
pending: !!pending,
|
|
dot: pendingDot || /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, null),
|
|
children: pendingNode
|
|
});
|
|
}
|
|
if (reverse) {
|
|
mergedItems.reverse();
|
|
}
|
|
const itemsCount = mergedItems.length;
|
|
const lastCls = `${prefixCls}-item-last`;
|
|
const itemsList = mergedItems.filter(item => !!item).map((item, idx) => {
|
|
var _a;
|
|
const pendingClass = idx === itemsCount - 2 ? lastCls : '';
|
|
const readyClass = idx === itemsCount - 1 ? lastCls : '';
|
|
const {
|
|
className: itemClassName
|
|
} = item,
|
|
itemProps = TimelineItemList_rest(item, ["className"]);
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(timeline_TimelineItem, Object.assign({}, itemProps, {
|
|
className: _classnames_2_5_1_classnames_default()([itemClassName, !reverse && !!pending ? pendingClass : readyClass, getPositionCls((_a = item === null || item === void 0 ? void 0 : item.position) !== null && _a !== void 0 ? _a : '', idx)]),
|
|
/* eslint-disable-next-line react/no-array-index-key */
|
|
key: (item === null || item === void 0 ? void 0 : item.key) || idx
|
|
}));
|
|
});
|
|
const hasLabelItem = mergedItems.some(item => !!(item === null || item === void 0 ? void 0 : item.label));
|
|
const classString = _classnames_2_5_1_classnames_default()(prefixCls, {
|
|
[`${prefixCls}-pending`]: !!pending,
|
|
[`${prefixCls}-reverse`]: !!reverse,
|
|
[`${prefixCls}-${mode}`]: !!mode && !hasLabelItem,
|
|
[`${prefixCls}-label`]: hasLabelItem,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, className, rootClassName, hashId);
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("ul", Object.assign({}, restProps, {
|
|
className: classString
|
|
}), itemsList);
|
|
};
|
|
/* harmony default export */ var timeline_TimelineItemList = (TimelineItemList);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(11592);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/useItems.js
|
|
"use client";
|
|
|
|
|
|
function useItems(items, children) {
|
|
if (items && Array.isArray(items)) return items;
|
|
return (0,toArray/* default */.Z)(children).map(ele => {
|
|
var _a, _b;
|
|
return Object.assign({
|
|
children: (_b = (_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : ''
|
|
}, ele.props);
|
|
});
|
|
}
|
|
/* harmony default export */ var timeline_useItems = (useItems);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/style/index.js
|
|
|
|
|
|
const genTimelineStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
margin: 0,
|
|
padding: 0,
|
|
listStyle: 'none',
|
|
[`${componentCls}-item`]: {
|
|
position: 'relative',
|
|
margin: 0,
|
|
paddingBottom: token.itemPaddingBottom,
|
|
fontSize: token.fontSize,
|
|
listStyle: 'none',
|
|
'&-tail': {
|
|
position: 'absolute',
|
|
insetBlockStart: token.itemHeadSize,
|
|
insetInlineStart: (token.itemHeadSize - token.tailWidth) / 2,
|
|
height: `calc(100% - ${token.itemHeadSize}px)`,
|
|
borderInlineStart: `${token.tailWidth}px ${token.lineType} ${token.tailColor}`
|
|
},
|
|
'&-pending': {
|
|
[`${componentCls}-item-head`]: {
|
|
fontSize: token.fontSizeSM,
|
|
backgroundColor: 'transparent'
|
|
},
|
|
[`${componentCls}-item-tail`]: {
|
|
display: 'none'
|
|
}
|
|
},
|
|
'&-head': {
|
|
position: 'absolute',
|
|
width: token.itemHeadSize,
|
|
height: token.itemHeadSize,
|
|
backgroundColor: token.dotBg,
|
|
border: `${token.dotBorderWidth}px ${token.lineType} transparent`,
|
|
borderRadius: '50%',
|
|
'&-blue': {
|
|
color: token.colorPrimary,
|
|
borderColor: token.colorPrimary
|
|
},
|
|
'&-red': {
|
|
color: token.colorError,
|
|
borderColor: token.colorError
|
|
},
|
|
'&-green': {
|
|
color: token.colorSuccess,
|
|
borderColor: token.colorSuccess
|
|
},
|
|
'&-gray': {
|
|
color: token.colorTextDisabled,
|
|
borderColor: token.colorTextDisabled
|
|
}
|
|
},
|
|
'&-head-custom': {
|
|
position: 'absolute',
|
|
insetBlockStart: token.itemHeadSize / 2,
|
|
insetInlineStart: token.itemHeadSize / 2,
|
|
width: 'auto',
|
|
height: 'auto',
|
|
marginBlockStart: 0,
|
|
paddingBlock: token.customHeadPaddingVertical,
|
|
lineHeight: 1,
|
|
textAlign: 'center',
|
|
border: 0,
|
|
borderRadius: 0,
|
|
transform: `translate(-50%, -50%)`
|
|
},
|
|
'&-content': {
|
|
position: 'relative',
|
|
insetBlockStart: -(token.fontSize * token.lineHeight - token.fontSize) + token.lineWidth,
|
|
marginInlineStart: token.margin + token.itemHeadSize,
|
|
marginInlineEnd: 0,
|
|
marginBlockStart: 0,
|
|
marginBlockEnd: 0,
|
|
wordBreak: 'break-word'
|
|
},
|
|
'&-last': {
|
|
[`> ${componentCls}-item-tail`]: {
|
|
display: 'none'
|
|
},
|
|
[`> ${componentCls}-item-content`]: {
|
|
minHeight: token.controlHeightLG * 1.2
|
|
}
|
|
}
|
|
},
|
|
[`&${componentCls}-alternate,
|
|
&${componentCls}-right,
|
|
&${componentCls}-label`]: {
|
|
[`${componentCls}-item`]: {
|
|
'&-tail, &-head, &-head-custom': {
|
|
insetInlineStart: '50%'
|
|
},
|
|
'&-head': {
|
|
marginInlineStart: `-${token.marginXXS}px`,
|
|
'&-custom': {
|
|
marginInlineStart: token.tailWidth / 2
|
|
}
|
|
},
|
|
'&-left': {
|
|
[`${componentCls}-item-content`]: {
|
|
insetInlineStart: `calc(50% - ${token.marginXXS}px)`,
|
|
width: `calc(50% - ${token.marginSM}px)`,
|
|
textAlign: 'start'
|
|
}
|
|
},
|
|
'&-right': {
|
|
[`${componentCls}-item-content`]: {
|
|
width: `calc(50% - ${token.marginSM}px)`,
|
|
margin: 0,
|
|
textAlign: 'end'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
[`&${componentCls}-right`]: {
|
|
[`${componentCls}-item-right`]: {
|
|
[`${componentCls}-item-tail,
|
|
${componentCls}-item-head,
|
|
${componentCls}-item-head-custom`]: {
|
|
insetInlineStart: `calc(100% - ${(token.itemHeadSize + token.tailWidth) / 2}px)`
|
|
},
|
|
[`${componentCls}-item-content`]: {
|
|
width: `calc(100% - ${token.itemHeadSize + token.marginXS}px)`
|
|
}
|
|
}
|
|
},
|
|
[`&${componentCls}-pending
|
|
${componentCls}-item-last
|
|
${componentCls}-item-tail`]: {
|
|
display: 'block',
|
|
height: `calc(100% - ${token.margin}px)`,
|
|
borderInlineStart: `${token.tailWidth}px dotted ${token.tailColor}`
|
|
},
|
|
[`&${componentCls}-reverse
|
|
${componentCls}-item-last
|
|
${componentCls}-item-tail`]: {
|
|
display: 'none'
|
|
},
|
|
[`&${componentCls}-reverse ${componentCls}-item-pending`]: {
|
|
[`${componentCls}-item-tail`]: {
|
|
insetBlockStart: token.margin,
|
|
display: 'block',
|
|
height: `calc(100% - ${token.margin}px)`,
|
|
borderInlineStart: `${token.tailWidth}px dotted ${token.tailColor}`
|
|
},
|
|
[`${componentCls}-item-content`]: {
|
|
minHeight: token.controlHeightLG * 1.2
|
|
}
|
|
},
|
|
[`&${componentCls}-label`]: {
|
|
[`${componentCls}-item-label`]: {
|
|
position: 'absolute',
|
|
insetBlockStart: -(token.fontSize * token.lineHeight - token.fontSize) + token.tailWidth,
|
|
width: `calc(50% - ${token.marginSM}px)`,
|
|
textAlign: 'end'
|
|
},
|
|
[`${componentCls}-item-right`]: {
|
|
[`${componentCls}-item-label`]: {
|
|
insetInlineStart: `calc(50% + ${token.marginSM}px)`,
|
|
width: `calc(50% - ${token.marginSM}px)`,
|
|
textAlign: 'start'
|
|
}
|
|
}
|
|
},
|
|
// ====================== RTL =======================
|
|
'&-rtl': {
|
|
direction: 'rtl',
|
|
[`${componentCls}-item-head-custom`]: {
|
|
transform: `translate(50%, -50%)`
|
|
}
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var timeline_style = ((0,genComponentStyleHook/* default */.Z)('Timeline', token => {
|
|
const timeLineToken = (0,statistic/* merge */.TS)(token, {
|
|
itemHeadSize: 10,
|
|
customHeadPaddingVertical: token.paddingXXS,
|
|
paddingInlineEnd: 2
|
|
});
|
|
return [genTimelineStyle(timeLineToken)];
|
|
}, token => ({
|
|
tailColor: token.colorSplit,
|
|
tailWidth: token.lineWidthBold,
|
|
dotBorderWidth: token.wireframe ? token.lineWidthBold : token.lineWidth * 3,
|
|
dotBg: token.colorBgContainer,
|
|
itemPaddingBottom: token.padding * 1.25
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/Timeline.js
|
|
"use client";
|
|
|
|
var Timeline_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 Timeline = props => {
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
timeline
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
children,
|
|
items,
|
|
className,
|
|
style
|
|
} = props,
|
|
restProps = Timeline_rest(props, ["prefixCls", "children", "items", "className", "style"]);
|
|
const prefixCls = getPrefixCls('timeline', customizePrefixCls);
|
|
// =================== Warning =====================
|
|
if (false) {}
|
|
// Style
|
|
const [wrapSSR, hashId] = timeline_style(prefixCls);
|
|
const mergedItems = timeline_useItems(items, children);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(timeline_TimelineItemList, Object.assign({}, restProps, {
|
|
className: _classnames_2_5_1_classnames_default()(timeline === null || timeline === void 0 ? void 0 : timeline.className, className),
|
|
style: Object.assign(Object.assign({}, timeline === null || timeline === void 0 ? void 0 : timeline.style), style),
|
|
prefixCls: prefixCls,
|
|
direction: direction,
|
|
items: mergedItems,
|
|
hashId: hashId
|
|
})));
|
|
};
|
|
Timeline.Item = timeline_TimelineItem;
|
|
if (false) {}
|
|
/* harmony default export */ var timeline_Timeline = (Timeline);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/index.js
|
|
"use client";
|
|
|
|
|
|
/* harmony default export */ var timeline = (timeline_Timeline);
|
|
|
|
/***/ })
|
|
|
|
}]); |