|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12884,88699,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__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_ArrowLeftOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.9@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(92413);
|
|
|
// 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__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_DeleteOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.9@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(92413);
|
|
|
// 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__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_ExclamationCircleOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.9@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(92413);
|
|
|
// 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__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_SolutionOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.9@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(92413);
|
|
|
// 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);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 64985:
|
|
|
/*!********************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx + 1 modules ***!
|
|
|
\********************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ ShixunStaticItem; }
|
|
|
});
|
|
|
|
|
|
// UNUSED EXPORTS: ShixunsStaticItem
|
|
|
|
|
|
// 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/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/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// 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/radio/index.js
|
|
|
var es_radio = __webpack_require__(69140);
|
|
|
// 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/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
|
var input_number = __webpack_require__(5871);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/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/divider/index.js + 1 modules
|
|
|
var divider = __webpack_require__(28103);
|
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
|
|
|
var monaco_editor = __webpack_require__(34915);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var ShixunStaticItemmodules = ({"flex_box_center":"flex_box_center___eijRq","flex_space_between":"flex_space_between___R4Vev","flex_box_vertical_center":"flex_box_vertical_center___j8R6g","flex_box_center_end":"flex_box_center_end___eB0cz","flex_box_column":"flex_box_column___b9VdU","flex-col":"flex-col___xyO8z","flex-row":"flex-row____tb2G","justify-start":"justify-start___RAyIn","justify-center":"justify-center___xixsA","justify-end":"justify-end___d6qv9","justify-evenly":"justify-evenly___AutJa","justify-around":"justify-around___HHJvP","justify-between":"justify-between_____P5_","align-start":"align-start___vU587","align-center":"align-center___vdefE","align-end":"align-end___FR82G","md":"md___tcpb2","title":"title___dVHM9"});
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(7517);
|
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
|
var base64 = __webpack_require__(24334);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(43391);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(5841);
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
|
|
|
var RenderHtml = __webpack_require__(64692);
|
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
|
var shixunHomeworks = __webpack_require__(23738);
|
|
|
// 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: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var options = {
|
|
|
selectOnLineNumbers: true,
|
|
|
readOnly: true,
|
|
|
minimap: {
|
|
|
enabled: false
|
|
|
},
|
|
|
scrollBeyondLastLine: false,
|
|
|
enableSplitViewResizing: false,
|
|
|
roundedSelection: false,
|
|
|
renderIndicators: false,
|
|
|
useShadows: false
|
|
|
};
|
|
|
var Types = /*#__PURE__*/function (Types) {
|
|
|
Types[Types["SET_PATH"] = 0] = "SET_PATH";
|
|
|
Types[Types["GET_PASSED_CONTENT"] = 1] = "GET_PASSED_CONTENT";
|
|
|
return Types;
|
|
|
}(Types || {});
|
|
|
function reducer(state, action) {
|
|
|
switch (action.type) {
|
|
|
case Types.SET_PATH:
|
|
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
|
selectedPath: action.payload
|
|
|
});
|
|
|
case Types.GET_PASSED_CONTENT:
|
|
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
|
passedContent: action.payload
|
|
|
});
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}
|
|
|
var ShixunsStaticItem = function ShixunsStaticItem(_ref) {
|
|
|
var language = _ref.language,
|
|
|
dispatch = _ref.dispatch,
|
|
|
shixunWorkReport = _ref.shixunWorkReport,
|
|
|
v = _ref.v,
|
|
|
languages = _ref.languages,
|
|
|
classroomList = _ref.classroomList,
|
|
|
autoHeight = _ref.autoHeight,
|
|
|
diff_code_count = _ref.diff_code_count,
|
|
|
data = _ref.data;
|
|
|
// const paths = path.split(';').filter(item => !!item)
|
|
|
// const [state, dispatch] = useReducer(reducer, { selectedPath: '123', passedContent: { language: 'python', content: '' } })
|
|
|
// const { selectedPath, passedContent } = state
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(languages === null || languages === void 0 ? void 0 : languages[0]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
item = _useState2[0],
|
|
|
setitem = _useState2[1];
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
setitem(languages === null || languages === void 0 ? void 0 : languages[0]);
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _languages$filter;
|
|
|
// console.log('----',item);
|
|
|
setitem(languages === null || languages === void 0 || (_languages$filter = languages.filter(function (items) {
|
|
|
return items.language === (item === null || item === void 0 ? void 0 : item.language);
|
|
|
})) === null || _languages$filter === void 0 ? void 0 : _languages$filter[0]);
|
|
|
}, [languages]);
|
|
|
|
|
|
// function onChange(value: string) {
|
|
|
// dispatch({
|
|
|
// type: Types.SET_PATH,
|
|
|
// payload: value
|
|
|
// })
|
|
|
// }
|
|
|
|
|
|
// useEffect(() => {
|
|
|
// console.log("path:",path,data)
|
|
|
// async function init() {
|
|
|
// const response = await onPathChange(game_id, selectedPath)
|
|
|
// dispatch({
|
|
|
// type: Types.GET_PASSED_CONTENT,
|
|
|
// payload: response
|
|
|
// })
|
|
|
// }
|
|
|
// // init()
|
|
|
// }, [selectedPath, game_id])
|
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("h2", {
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"
|
|
|
}), (languages === null || languages === void 0 ? void 0 : languages.length) > 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
|
defaultValue: language,
|
|
|
style: {
|
|
|
marginLeft: 10
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
var _languages$filter2;
|
|
|
// console.log(languages,languages?.filter((item:any)=>item.language===e.target.value)?.[0]);
|
|
|
|
|
|
setitem(languages === null || languages === void 0 || (_languages$filter2 = languages.filter(function (item) {
|
|
|
return item.language === e.target.value;
|
|
|
})) === null || _languages$filter2 === void 0 ? void 0 : _languages$filter2[0]);
|
|
|
},
|
|
|
children: languages === null || languages === void 0 ? void 0 : languages.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.language,
|
|
|
children: item === null || item === void 0 ? void 0 : item.language
|
|
|
});
|
|
|
})
|
|
|
})]
|
|
|
}), (0,authority/* isAdmin */.GJ)() && shixunWorkReport != 'shixunWorkReport' && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u5F97\u5206 ", item === null || item === void 0 ? void 0 : item.score, "/", item === null || item === void 0 ? void 0 : item.total_score]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
style: {
|
|
|
margin: '0px 10px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
var _classroomList$Assist;
|
|
|
if (!((_classroomList$Assist = classroomList.AssistantObject) !== null && _classroomList$Assist !== void 0 && (_classroomList$Assist = _classroomList$Assist.hack) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise) && (0,authority/* isAssistant */.Rm)()) {
|
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return;
|
|
|
}
|
|
|
var scores = item === null || item === void 0 ? void 0 : item.score;
|
|
|
modal/* default */.Z.confirm({
|
|
|
title: '调分',
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: ["\u5F97\u5206\uFF1A", item === null || item === void 0 ? void 0 : item.score, "/", item === null || item === void 0 ? void 0 : item.total_score]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: ["\u8C03\u5206\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
min: 0,
|
|
|
max: item === null || item === void 0 ? void 0 : item.total_score,
|
|
|
defaultValue: item === null || item === void 0 ? void 0 : item.score,
|
|
|
onChange: function onChange(e) {
|
|
|
scores = e;
|
|
|
}
|
|
|
})]
|
|
|
})]
|
|
|
}),
|
|
|
okText: '确认',
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/homework_commons/update_hack_score"), {
|
|
|
method: 'put',
|
|
|
body: {
|
|
|
course_id: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
|
hack_user_code_id: item === null || item === void 0 ? void 0 : item.hack_user_id,
|
|
|
score: scores
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('调分成功');
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
// console.log('----',languages,item);
|
|
|
|
|
|
// setitem(languages?.filter((items:any)=>items.language===item?.language)?.[0])
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}(),
|
|
|
cancelText: '取消'
|
|
|
});
|
|
|
},
|
|
|
type: "primary",
|
|
|
children: "\u8C03\u5206"
|
|
|
}), (0,authority/* isAdmin */.GJ)() && shixunWorkReport != 'shixunWorkReport' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
onClick: function onClick() {
|
|
|
var _classroomList$Assist2;
|
|
|
if (!((_classroomList$Assist2 = classroomList.AssistantObject.hack) !== null && _classroomList$Assist2 !== void 0 && _classroomList$Assist2.can_appraise) && (0,authority/* isAssistant */.Rm)()) {
|
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return;
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: "更改点评",
|
|
|
selectArrs: {
|
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
|
type: '1',
|
|
|
language: item === null || item === void 0 ? void 0 : item.language,
|
|
|
v: v,
|
|
|
data: objectSpread2_default()({}, shixunWorkReport)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: "\u70B9\u8BC4\u4EE3\u7801"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, {
|
|
|
height: 300,
|
|
|
language: item === null || item === void 0 ? void 0 : item.language,
|
|
|
value: base64.Base64.decode(item === null || item === void 0 ? void 0 : item.code),
|
|
|
autoHeight: autoHeight,
|
|
|
theme: "default",
|
|
|
options: options
|
|
|
}), ((item === null || item === void 0 ? void 0 : item.comment) || (item === null || item === void 0 ? void 0 : item.hidden_comment)) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
style: {
|
|
|
borderTop: '1px solid #eee'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: ShixunStaticItemmodules.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 _callee3() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
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 _callee2() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return (0,shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
|
comment_id: item === null || item === void 0 ? void 0 : item.comment_id,
|
|
|
homeworkId: params.homeworkId,
|
|
|
type: 'hack'
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success("删除成功");
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}))();
|
|
|
}
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {}), "\u5220\u9664"]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), (item === null || item === void 0 ? void 0 : item.comment) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
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: item === null || item === void 0 ? void 0 : item.comment
|
|
|
})]
|
|
|
}), (item === null || item === void 0 ? void 0 : item.hidden_comment) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
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: item === null || item === void 0 ? void 0 : item.hidden_comment
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ShixunStaticItem = (ShixunsStaticItem);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 84276:
|
|
|
/*!**********************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Comment/index.tsx + 3 modules ***!
|
|
|
\**********************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"default": function() { return /* binding */ 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/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(5841);
|
|
|
// 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/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/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/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/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(1710);
|
|
|
// 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__(43873);
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(7517);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(11919);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Commentmodules = ({"flex_box_center":"flex_box_center___lb6Eo","flex_space_between":"flex_space_between___J8ZnK","flex_box_vertical_center":"flex_box_vertical_center___zweTs","flex_box_center_end":"flex_box_center_end___CvkW9","flex_box_column":"flex_box_column___ODy_E","flex-col":"flex-col___i5T26","flex-row":"flex-row___tK3D4","justify-start":"justify-start___z_rRU","justify-center":"justify-center___HE1Sw","justify-end":"justify-end___DESmN","justify-evenly":"justify-evenly___LaQqi","justify-around":"justify-around___Vz74v","justify-between":"justify-between___nTq0n","align-start":"align-start____q6Gd","align-center":"align-center___OyEGx","align-end":"align-end___xcBj7","title":"title___AD3SJ","export":"export___XBLMD","title1_right":"title1_right___raWIo","userPic":"userPic___OK1Fq","userInfo":"userInfo___wKpvE","listItem":"listItem___VH7Ls","rightInfo":"rightInfo___lI2xY","shixunTitle":"shixunTitle___lvDL9","shixunWrp":"shixunWrp___QXKnz","footerBar":"footerBar___zgEXb","footerBarStatic":"footerBarStatic___SB7gT","exitComment":"exitComment___oC_uA","nextComment":"nextComment___fCJ3l","modal":"modal___v_Shp"});
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx + 1 modules
|
|
|
var ShixunStaticItem = __webpack_require__(64985);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(43391);
|
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
|
var base64 = __webpack_require__(24334);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStatic.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
autoHeight = _ref.autoHeight,
|
|
|
classroomList = _ref.classroomList,
|
|
|
user = _ref.user,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
|
var stage_list = shixunWorkReport.stage_list,
|
|
|
work_id = shixunWorkReport.work_id;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var hasPower = (0,authority/* isAdmin */.GJ)();
|
|
|
var columns = [{
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'query_index',
|
|
|
width: 120
|
|
|
}, {
|
|
|
title: '详细结果',
|
|
|
dataIndex: 'result',
|
|
|
render: function render(text, record, index) {
|
|
|
return base64.Base64.decode(text) || '- -';
|
|
|
}
|
|
|
}];
|
|
|
|
|
|
// async function onChangeScore(index: number, value: any) {
|
|
|
// const { challenge_id } = stage_list[index]
|
|
|
// const res = await dispatch({
|
|
|
// type: "shixunHomeworks/changeScore",
|
|
|
// payload: {
|
|
|
// categoryId: params.homeworkId,
|
|
|
// "type": "report",
|
|
|
// "score": value,
|
|
|
// challenge_id: challenge_id
|
|
|
// }
|
|
|
// })
|
|
|
// await dispatch({
|
|
|
// type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
// payload: { ...params },
|
|
|
// })
|
|
|
// if (res.status === 0) {
|
|
|
// message.success("操作成功")
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
function onPathChange(game_id, path) {
|
|
|
return (0,fetch/* get */.U2)("student_works/".concat(work_id, "/rep_passed_content.json"), {
|
|
|
path: path,
|
|
|
game_id: game_id
|
|
|
});
|
|
|
}
|
|
|
var datas = (0,util/* arrTrans */.qZ)(5, shixunWorkReport.hack);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
children: datas === null || datas === void 0 ? void 0 : datas.map(function (val, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: val.map(function (v, k) {
|
|
|
var _v$history;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Commentmodules.shixunTitle, " mt10"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
width: '100%'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fa fa-code "
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("strong", {
|
|
|
style: {
|
|
|
flex: 1
|
|
|
},
|
|
|
className: "c-black",
|
|
|
children: ["\u7B2C", key * 5 + k + 1, "\u9898 ", v.name]
|
|
|
}), v.is_finish && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
style: {
|
|
|
marginLeft: 20
|
|
|
},
|
|
|
onClick: function onClick(e) {
|
|
|
e.preventDefault();
|
|
|
window.open(v === null || v === void 0 ? void 0 : v.url);
|
|
|
localStorage.setItem('program_homework', [params.coursesId, params.categoryId]);
|
|
|
},
|
|
|
to: "".concat(v === null || v === void 0 ? void 0 : v.url),
|
|
|
children: ["\u67E5\u770B\u7B54\u9898\u8BE6\u60C5", '>>']
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "font16 mt10",
|
|
|
children: [v.is_finish === false && "本关暂未通过,无通关代码", v.is_finish && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: Commentmodules.shixunWrp,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ShixunStaticItem/* default */.Z, {
|
|
|
classroomList: classroomList,
|
|
|
user: user,
|
|
|
v: v,
|
|
|
shixunWorkReport: shixunWorkReport,
|
|
|
dispatch: dispatch,
|
|
|
autoHeight: autoHeight,
|
|
|
languages: v.languages,
|
|
|
language: v.language,
|
|
|
game_id: v.id,
|
|
|
data: base64.Base64.decode(v.code),
|
|
|
diff_code_count: v.diff_code_count,
|
|
|
onPathChange: onPathChange
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "mt10 font16",
|
|
|
children: (_v$history = v.history) !== null && _v$history !== void 0 && _v$history.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
columns: columns,
|
|
|
pagination: {
|
|
|
hideOnSinglePage: true
|
|
|
},
|
|
|
dataSource: v.history
|
|
|
}) : "本关无评测记录"
|
|
|
})]
|
|
|
}, k);
|
|
|
})
|
|
|
}, key);
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ShixunStatic = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
|
var shixunHomeworks = _ref2.shixunHomeworks,
|
|
|
loading = _ref2.loading,
|
|
|
globalSetting = _ref2.globalSetting,
|
|
|
classroomList = _ref2.classroomList,
|
|
|
user = _ref2.user;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
classroomList: classroomList,
|
|
|
user: user
|
|
|
};
|
|
|
})(ShixunsListPage));
|
|
|
// 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);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ChangeCommit.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunHomeworks", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DelShixun = function DelShixun(_ref) {
|
|
|
var _shixunHomeworks$acti5, _shixunHomeworks$acti6, _shixunHomeworks$acti7;
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
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];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (shixunHomeworks.actionTabs.key === '更改点评') if (shixunHomeworks.actionTabs.selectArrs.type === '1') {
|
|
|
form.setFieldsValue({
|
|
|
comment: shixunHomeworks.actionTabs.selectArrs.v.comment,
|
|
|
hidden_comment: shixunHomeworks.actionTabs.selectArrs.v.hidden_comment
|
|
|
});
|
|
|
} else {
|
|
|
var _shixunHomeworks$acti, _shixunHomeworks$acti2;
|
|
|
form.setFieldsValue({
|
|
|
comment: (_shixunHomeworks$acti = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti === void 0 || (_shixunHomeworks$acti = _shixunHomeworks$acti.data) === null || _shixunHomeworks$acti === void 0 || (_shixunHomeworks$acti = _shixunHomeworks$acti.data) === null || _shixunHomeworks$acti === void 0 ? void 0 : _shixunHomeworks$acti.work_comment,
|
|
|
hidden_comment: (_shixunHomeworks$acti2 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti2 === void 0 || (_shixunHomeworks$acti2 = _shixunHomeworks$acti2.data) === null || _shixunHomeworks$acti2 === void 0 || (_shixunHomeworks$acti2 = _shixunHomeworks$acti2.data) === null || _shixunHomeworks$acti2 === void 0 ? void 0 : _shixunHomeworks$acti2.work_comment_hidden
|
|
|
});
|
|
|
}
|
|
|
}, [shixunHomeworks.actionTabs.key]);
|
|
|
var quickCommit = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _shixunHomeworks$acti3, _shixunHomeworks$acti4;
|
|
|
var formValue, url, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
formValue = form.getFieldValue();
|
|
|
url = shixunHomeworks.actionTabs.selectArrs.type === '1' ? "/api/problems/".concat(shixunHomeworks.actionTabs.selectArrs.v.identifier, "/hack_comment.json") : "/api/student_works/".concat(params.homeworkId, "/shixun_work_comment.json");
|
|
|
_context.next = 4;
|
|
|
return (0,fetch/* default */.ZP)(url, {
|
|
|
method: 'post',
|
|
|
body: {
|
|
|
hidden_comment: formValue.hidden_comment,
|
|
|
comment: formValue.comment,
|
|
|
language: (_shixunHomeworks$acti3 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti3 === void 0 ? void 0 : _shixunHomeworks$acti3.language,
|
|
|
user_id: (_shixunHomeworks$acti4 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti4 === void 0 || (_shixunHomeworks$acti4 = _shixunHomeworks$acti4.data) === null || _shixunHomeworks$acti4 === void 0 || (_shixunHomeworks$acti4 = _shixunHomeworks$acti4.data) === null || _shixunHomeworks$acti4 === void 0 ? void 0 : _shixunHomeworks$acti4.user_id
|
|
|
}
|
|
|
});
|
|
|
case 4:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('评阅成功');
|
|
|
form.resetFields();
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function quickCommit() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [((_shixunHomeworks$acti5 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti5 === void 0 ? void 0 : _shixunHomeworks$acti5.type) === '1' ? '点评代码' : '更改点评', ((_shixunHomeworks$acti6 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti6 === void 0 ? void 0 : _shixunHomeworks$acti6.language) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
marginLeft: 10,
|
|
|
fontSize: 14
|
|
|
},
|
|
|
children: ["\u4F7F\u7528\u8BED\u8A00\uFF1A", (_shixunHomeworks$acti7 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti7 === void 0 ? void 0 : _shixunHomeworks$acti7.language]
|
|
|
})]
|
|
|
}),
|
|
|
open: shixunHomeworks.actionTabs.key === '更改点评' ? true : false,
|
|
|
okText: "\u786E\u5B9A",
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var formValue;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
formValue = form.getFieldValue();
|
|
|
if (JSON.stringify(formValue) === '{}' || formValue.hidden_comment === '' && formValue.comment === '') {
|
|
|
setShowRequired(true);
|
|
|
} else {
|
|
|
quickCommit();
|
|
|
}
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
form: form,
|
|
|
onChange: function onChange() {
|
|
|
if (showRequired) setShowRequired(false);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
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: 8
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
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: 8
|
|
|
})
|
|
|
})]
|
|
|
}), showRequired && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "c-red",
|
|
|
children: "\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ChangeCommit = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var shixunHomeworks = _ref4.shixunHomeworks;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks
|
|
|
};
|
|
|
})(DelShixun));
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Detail/components/WorkList/components/Redo.tsx
|
|
|
var Redo = __webpack_require__(88756);
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
|
|
|
var RenderHtml = __webpack_require__(64692);
|
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
|
var service_shixunHomeworks = __webpack_require__(23738);
|
|
|
// EXTERNAL MODULE: ./node_modules/_html2pdf.js@0.10.3@html2pdf.js/dist/html2pdf.js
|
|
|
var html2pdf = __webpack_require__(44164);
|
|
|
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Comment_excluded = ["shixunHomeworks", "globalSetting", "loading", "classroomList", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var _shixunWorkReport$cat, _shixunWorkReport$cat2, _shixunWorkReport$cat3, _shixunWorkReport$cat4, _shixunWorkReport$cat5, _shixunWorkReport$dat, _shixunWorkReport$cat6, _shixunWorkReport$dat2, _shixunWorkReport$dat3, _shixunWorkReport$dat4, _shixunWorkReport$dat5, _shixunWorkReport$dat6, _shixunWorkReport$dat7, _shixunWorkReport$dat8, _shixunWorkReport$dat9, _shixunWorkReport$dat10, _shixunWorkReport$dat11, _shixunWorkReport$dat12, _shixunWorkReport$dat13, _shixunWorkReport$dat14, _shixunWorkReport$dat15, _shixunWorkReport$dat16, _shixunWorkReport$dat17, _shixunWorkReport$dat18, _shixunWorkReport$dat19, _shixunWorkReport$dat21, _shixunWorkReport$dat22, _shixunWorkReport$dat23, _shixunWorkReport$dat24, _shixunWorkReport$dat25, _shixunWorkReport$dat26;
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
classroomList = _ref.classroomList,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, Comment_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];
|
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(new (jszip_min_default())()),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
zip = _useState16[0],
|
|
|
setZip = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
allStudentWorks = _useState18[0],
|
|
|
setAllStudentWorks = _useState18[1];
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
isshow = _useState20[0],
|
|
|
setIsshow = _useState20[1];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
isshows = _useState22[0],
|
|
|
setIsshows = _useState22[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: false
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'classroomList/getAssistantPermissions',
|
|
|
payload: {
|
|
|
course_id: params.coursesId
|
|
|
}
|
|
|
});
|
|
|
return function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: true
|
|
|
});
|
|
|
};
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (shixunHomeworks.actionTabs.key === '导出实训报告' && allStudentWorks.length > 0) {
|
|
|
exportReport('all');
|
|
|
}
|
|
|
}, [allStudentWorks]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
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 _callee10() {
|
|
|
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 _callee10$(_context12) {
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
case 0:
|
|
|
paylaod = JSON.parse(sessionStorage['all_student_works_params'] || '{}');
|
|
|
_context12.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getAllStudentWorks',
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), paylaod)
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context12.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.user_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 _context12.stop();
|
|
|
}
|
|
|
}, _callee10);
|
|
|
}));
|
|
|
return _getData.apply(this, arguments);
|
|
|
}
|
|
|
var handleRemoveSurplusCanvas = function handleRemoveSurplusCanvas() {
|
|
|
document.querySelectorAll('canvas').forEach(function (item) {
|
|
|
(!item.clientWidth || !item.clientHeight) && item.remove();
|
|
|
});
|
|
|
};
|
|
|
var setMonocoHeight = function setMonocoHeight() {
|
|
|
if (reportElement.current.offsetHeight > 62000) {
|
|
|
setAutoHeight(false);
|
|
|
} else {
|
|
|
setAutoHeight(true);
|
|
|
}
|
|
|
};
|
|
|
var exportReport = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(type) {
|
|
|
var nums, modal, opt, next, _next, _shixunWorkReport$shi, pages, worker, folder, _loop, i, codeF;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
_next = function _next3() {
|
|
|
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
_context6.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: {
|
|
|
homeworkId: allStudentWorks[nums]['user_id']
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context6.sent;
|
|
|
scrollView();
|
|
|
nums++;
|
|
|
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var _res$shixun_detail;
|
|
|
var folders, pages, worker, _loop2, _i, codesF;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
handleRemoveSurplusCanvas();
|
|
|
folders = zip.folder("".concat(res === null || res === void 0 ? void 0 : res.username));
|
|
|
pages = document.querySelector('#export-all').children;
|
|
|
worker = html2pdf_default()();
|
|
|
_loop2 = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop2(_i) {
|
|
|
return regeneratorRuntime_default()().wrap(function _loop2$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return worker.set(opt).from(pages[_i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
if (!(_i < pages.length - 1)) {
|
|
|
_context3.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context3.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function (_x3) {
|
|
|
return _ref5.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _loop2);
|
|
|
});
|
|
|
_i = 0;
|
|
|
case 6:
|
|
|
if (!(_i < pages.length)) {
|
|
|
_context5.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
return _context5.delegateYield(_loop2(_i), "t0", 8);
|
|
|
case 8:
|
|
|
_i++;
|
|
|
_context5.next = 6;
|
|
|
break;
|
|
|
case 11:
|
|
|
folders.file("".concat(allStudentWorks[nums - 1]['student_work_user_name']).concat(nums, ".pdf"), worker.output("blob"));
|
|
|
// folder.file(`${shixunWorkReport.username}.pdf`, worker.output("blob"), { base64: false });
|
|
|
codesF = folders.folder("代码文件");
|
|
|
res === null || res === void 0 || (_res$shixun_detail = res.shixun_detail) === null || _res$shixun_detail === void 0 || _res$shixun_detail.map(function (item, index) {
|
|
|
var _item$game_codes2;
|
|
|
var codesG = codesF.folder("\u7B2C".concat(index + 1, "\u5173-").concat(item.subject, "-").concat(item.id));
|
|
|
item === null || item === void 0 || (_item$game_codes2 = item.game_codes) === null || _item$game_codes2 === void 0 || _item$game_codes2.map(function (i) {
|
|
|
codesG.file("".concat(i.filename, ".txt"), i === null || i === void 0 ? void 0 : 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 16:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})), 2200);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return _next.apply(this, arguments);
|
|
|
};
|
|
|
next = function _next2() {
|
|
|
return _next.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(shixunWorkReport.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)) {
|
|
|
_context7.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(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.username));
|
|
|
_loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop(i) {
|
|
|
return regeneratorRuntime_default()().wrap(function _loop$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(i < pages.length - 1)) {
|
|
|
_context.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function (_x2) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _loop);
|
|
|
});
|
|
|
i = 0;
|
|
|
case 13:
|
|
|
if (!(i < pages.length)) {
|
|
|
_context7.next = 18;
|
|
|
break;
|
|
|
}
|
|
|
return _context7.delegateYield(_loop(i), "t0", 15);
|
|
|
case 15:
|
|
|
i++;
|
|
|
_context7.next = 13;
|
|
|
break;
|
|
|
case 18:
|
|
|
setIsExportLoading(false);
|
|
|
|
|
|
// zip.file(`${shixunWorkReport.username}.pdf`, pdfUrl);
|
|
|
folder.file("".concat(shixunWorkReport.username, ".pdf"), worker.output("blob"), {
|
|
|
base64: false
|
|
|
});
|
|
|
codeF = folder.folder("代码文件");
|
|
|
shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$shi = shixunWorkReport.shixun_detail) === null || _shixunWorkReport$shi === void 0 || _shixunWorkReport$shi.map(function (item, index) {
|
|
|
var _item$game_codes;
|
|
|
var codesG = codeF.folder("\u7B2C".concat(index + 1, "\u5173-").concat(item.subject, "-").concat(item.id));
|
|
|
item === null || item === void 0 || (_item$game_codes = item.game_codes) === null || _item$game_codes === void 0 || _item$game_codes.map(function (i) {
|
|
|
codesG.file("".concat(i.filename, ".txt"), i === null || i === void 0 ? void 0 : i.content);
|
|
|
});
|
|
|
});
|
|
|
// worker.save()
|
|
|
modal.destroy();
|
|
|
download();
|
|
|
return _context7.abrupt("return");
|
|
|
case 27:
|
|
|
next();
|
|
|
case 28:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return function exportReport(_x) {
|
|
|
return _ref2.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 = shixunWorkReport.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]);
|
|
|
var initData = /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
setSpinning(true);
|
|
|
_context8.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
case 3:
|
|
|
setSpinning(false);
|
|
|
if ((0,authority/* isAdmin */.GJ)()) getData();
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function initData() {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var columns = [{
|
|
|
title: '题号',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record, index) {
|
|
|
return index + 1;
|
|
|
}
|
|
|
}, {
|
|
|
title: '题目名称',
|
|
|
dataIndex: 'name',
|
|
|
ellipsis: true,
|
|
|
width: '30%'
|
|
|
}, {
|
|
|
title: '完成时间',
|
|
|
dataIndex: 'finish_time',
|
|
|
width: '200px',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 || (_record$subitem = record.subitem) === null || _record$subitem === void 0 || (_record$subitem = _record$subitem.map(function (item) {
|
|
|
return item.finish_time;
|
|
|
})) === null || _record$subitem === void 0 ? void 0 : _record$subitem.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'submit_count',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem2;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 || (_record$subitem2 = record.subitem) === null || _record$subitem2 === void 0 || (_record$subitem2 = _record$subitem2.map(function (item) {
|
|
|
return item.submit_count;
|
|
|
})) === null || _record$subitem2 === void 0 ? void 0 : _record$subitem2.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '运行时间(ms)',
|
|
|
dataIndex: 'run_time',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem3;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 || (_record$subitem3 = record.subitem) === null || _record$subitem3 === void 0 || (_record$subitem3 = _record$subitem3.map(function (item) {
|
|
|
return item.run_time;
|
|
|
})) === null || _record$subitem3 === void 0 ? void 0 : _record$subitem3.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '内存(kb)',
|
|
|
dataIndex: 'memory',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem4;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 || (_record$subitem4 = record.subitem) === null || _record$subitem4 === void 0 || (_record$subitem4 = _record$subitem4.map(function (item) {
|
|
|
return item.memory;
|
|
|
})) === null || _record$subitem4 === void 0 ? void 0 : _record$subitem4.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '使用语言',
|
|
|
dataIndex: 'language',
|
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem5;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 || (_record$subitem5 = record.subitem) === null || _record$subitem5 === void 0 || (_record$subitem5 = _record$subitem5.map(function (item) {
|
|
|
return item.language;
|
|
|
})) === null || _record$subitem5 === void 0 ? void 0 : _record$subitem5.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '得分',
|
|
|
dataIndex: 'score',
|
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
|
render: function render(text, record, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '排名',
|
|
|
dataIndex: 'rank',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem6;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 || (_record$subitem6 = record.subitem) === null || _record$subitem6 === void 0 || (_record$subitem6 = _record$subitem6.map(function (item) {
|
|
|
return item.rank;
|
|
|
})) === null || _record$subitem6 === void 0 ? void 0 : _record$subitem6.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var skip = function skip(type) {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: '',
|
|
|
type: 2
|
|
|
}
|
|
|
});
|
|
|
setTimeout(function () {
|
|
|
if (type === 'next') {
|
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/program_homework/").concat(params.categoryId, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.student_work_id, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.user_id, "/comment"));
|
|
|
} else {
|
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/program_homework/").concat(params.categoryId, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.student_work_id, "/").concat(Previous === null || Previous === void 0 ? void 0 : Previous.user_id, "/comment"));
|
|
|
}
|
|
|
}, 200);
|
|
|
};
|
|
|
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: [(shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$cat = shixunWorkReport.category) === null || _shixunWorkReport$cat === void 0 ? void 0 : _shixunWorkReport$cat.course_id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "animated fadeIn",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "",
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.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(shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$cat2 = shixunWorkReport.category) === null || _shixunWorkReport$cat2 === void 0 ? void 0 : _shixunWorkReport$cat2.course_id, "/program_homework"),
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$cat3 = shixunWorkReport.category) === null || _shixunWorkReport$cat3 === void 0 ? void 0 : _shixunWorkReport$cat3.course_name
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$cat4 = shixunWorkReport.category) === null || _shixunWorkReport$cat4 === void 0 ? void 0 : _shixunWorkReport$cat4.course_id, "/program_homework"),
|
|
|
children: shixunWorkReport.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(shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$cat5 = shixunWorkReport.category) === null || _shixunWorkReport$cat5 === void 0 ? void 0 : _shixunWorkReport$cat5.course_id, "/program_homework/").concat(params === null || params === void 0 ? void 0 : params.categoryId, "/detail"),
|
|
|
children: "\u4F5C\u4E1A\u8BE6\u60C5"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat = shixunWorkReport.data) === null || _shixunWorkReport$dat === void 0 ? void 0 : _shixunWorkReport$dat.user_name
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: [Commentmodules.title1, 'mt20'].join(' '),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(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(params.coursesId, "/program_homework/").concat(params === null || params === void 0 ? void 0 : params.categoryId, "/detail"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
|
|
|
className: "font16 c-black"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
className: "font20 ml5",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$cat6 = shixunWorkReport.category) === null || _shixunWorkReport$cat6 === void 0 ? void 0 : _shixunWorkReport$cat6.homework_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* StatusClassroomsTags */.VV, {
|
|
|
temporary: true,
|
|
|
status: shixunWorkReport.homework_status
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__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.jsxs)("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: shixunWorkReport.user_id,
|
|
|
data: objectSpread2_default()({}, shixunWorkReport)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SolutionOutlined/* default */.Z, {}), shixunWorkReport !== null && shixunWorkReport !== void 0 && (_shixunWorkReport$dat2 = shixunWorkReport.data) !== null && _shixunWorkReport$dat2 !== void 0 && _shixunWorkReport$dat2.has_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(shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat3 = shixunWorkReport.data) === null || _shixunWorkReport$dat3 === void 0 ? void 0 : _shixunWorkReport$dat3.image_url),
|
|
|
alt: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat4 = shixunWorkReport.data) === null || _shixunWorkReport$dat4 === void 0 ? void 0 : _shixunWorkReport$dat4.username
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16 ml40",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat5 = shixunWorkReport.data) === null || _shixunWorkReport$dat5 === void 0 ? void 0 : _shixunWorkReport$dat5.user_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkDetailStatus */.UQ, {
|
|
|
status: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat6 = shixunWorkReport.data) === null || _shixunWorkReport$dat6 === void 0 ? void 0 : _shixunWorkReport$dat6.compelete_status
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: Commentmodules.userInfo,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5B66\u53F7\uFF1A", (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat7 = shixunWorkReport.data) === null || _shixunWorkReport$dat7 === void 0 ? void 0 : _shixunWorkReport$dat7.student_id) || '--']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5206\u73ED\uFF1A", (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat8 = shixunWorkReport.data) === null || _shixunWorkReport$dat8 === void 0 ? void 0 : _shixunWorkReport$dat8.course_group) || '--']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u622A\u6B62\u524D\u5B8C\u6210\u5237\u9898\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat9 = shixunWorkReport.data) === null || _shixunWorkReport$dat9 === void 0 ? void 0 : _shixunWorkReport$dat9.finish_do
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u6700\u65B0\u5B8C\u6210\u5237\u9898\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat10 = shixunWorkReport.data) === null || _shixunWorkReport$dat10 === void 0 ? void 0 : _shixunWorkReport$dat10.latest_do) || '-'
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: [Commentmodules.listItem, 'mt10'].join(' '),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5B8C\u6210\u65F6\u95F4"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-light-black mt20",
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.data) && (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat11 = shixunWorkReport.data) === null || _shixunWorkReport$dat11 === void 0 ? void 0 : _shixunWorkReport$dat11.finish_time)
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("strong", {
|
|
|
children: ["\u5B8C\u6210\u65F6\u957F", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
e.preventDefault();
|
|
|
setIsshows(true);
|
|
|
},
|
|
|
style: {
|
|
|
marginLeft: 4,
|
|
|
display: 'none',
|
|
|
color: '#145DFF',
|
|
|
fontSize: 16,
|
|
|
cursor: 'pointer'
|
|
|
},
|
|
|
className: "iconfont icon-tishixiaowenhao"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-light-black mt20",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat12 = shixunWorkReport.data) === null || _shixunWorkReport$dat12 === void 0 ? void 0 : _shixunWorkReport$dat12.finish_time_long
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u8BC4\u6D4B\u6B21\u6570"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat13 = shixunWorkReport.data) === null || _shixunWorkReport$dat13 === void 0 ? void 0 : _shixunWorkReport$dat13.submit_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u901A\u8FC7\u7387"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat14 = shixunWorkReport.data) === null || _shixunWorkReport$dat14 === void 0 ? void 0 : _shixunWorkReport$dat14.pass_rate) || '- -'
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5F97\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat15 = shixunWorkReport.data) === null || _shixunWorkReport$dat15 === void 0 ? void 0 : _shixunWorkReport$dat15.score
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u7EC3\u4E60\u603B\u6392\u540D"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat16 = shixunWorkReport.data) === null || _shixunWorkReport$dat16 === void 0 ? void 0 : _shixunWorkReport$dat16.total_rank
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5206\u73ED\u6392\u540D"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat17 = shixunWorkReport.data) === null || _shixunWorkReport$dat17 === void 0 ? void 0 : _shixunWorkReport$dat17.class_rank
|
|
|
})
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), ((shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat18 = shixunWorkReport.data) === null || _shixunWorkReport$dat18 === void 0 ? void 0 : _shixunWorkReport$dat18.work_comment_hidden) || (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat19 = shixunWorkReport.data) === null || _shixunWorkReport$dat19 === void 0 ? void 0 : _shixunWorkReport$dat19.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 _callee8() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context10) {
|
|
|
while (1) switch (_context10.prev = _context10.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 _callee7() {
|
|
|
var _shixunWorkReport$dat20;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context9) {
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
case 0:
|
|
|
_context9.next = 2;
|
|
|
return (0,service_shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
|
comment_id: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat20 = shixunWorkReport.data) === null || _shixunWorkReport$dat20 === void 0 ? void 0 : _shixunWorkReport$dat20.comment_id,
|
|
|
homeworkId: params.homeworkId
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context9.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success("删除成功");
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context9.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}))();
|
|
|
}
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context10.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
})),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {}), "\u5220\u9664"]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat21 = shixunWorkReport.data) === null || _shixunWorkReport$dat21 === void 0 ? void 0 : _shixunWorkReport$dat21.work_comment) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
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: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat22 = shixunWorkReport.data) === null || _shixunWorkReport$dat22 === void 0 ? void 0 : _shixunWorkReport$dat22.work_comment
|
|
|
})]
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat23 = shixunWorkReport.data) === null || _shixunWorkReport$dat23 === void 0 ? void 0 : _shixunWorkReport$dat23.work_comment_hidden) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
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: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat24 = shixunWorkReport.data) === null || _shixunWorkReport$dat24 === void 0 ? void 0 : _shixunWorkReport$dat24.work_comment_hidden
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u9636\u6BB5\u6210\u7EE9"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
dataSource: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.hack,
|
|
|
pagination: false,
|
|
|
columns: columns
|
|
|
})
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat25 = shixunWorkReport.data) === null || _shixunWorkReport$dat25 === void 0 ? void 0 : _shixunWorkReport$dat25.work_description) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u4E2A\u4EBA\u603B\u7ED3"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$dat26 = shixunWorkReport.data) === null || _shixunWorkReport$dat26 === void 0 ? void 0 : _shixunWorkReport$dat26.work_description
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u5237\u9898\u8BE6\u60C5"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ShixunStatic, {
|
|
|
autoHeight: autoHeight
|
|
|
})]
|
|
|
})
|
|
|
}), (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, "/program_homework/").concat(params.categoryId, "/detail"),
|
|
|
children: "\u8FD4\u56DE\u5217\u8868"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
className: "tr",
|
|
|
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
var _classroomList$Assist;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context11) {
|
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
|
case 0:
|
|
|
if (!(!((_classroomList$Assist = classroomList.AssistantObject.hack) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise) && (0,authority/* isAssistant */.Rm)())) {
|
|
|
_context11.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return _context11.abrupt("return");
|
|
|
case 3:
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: "更改点评",
|
|
|
selectArrs: {
|
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
|
data: objectSpread2_default()({}, shixunWorkReport)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context11.stop();
|
|
|
}
|
|
|
}, _callee9);
|
|
|
})),
|
|
|
children: "\u70B9\u8BC4\u4F5C\u4E1A"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ChangeCommit, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(Redo/* default */.Z, {}), /*#__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 (_ref9) {
|
|
|
var shixunHomeworks = _ref9.shixunHomeworks,
|
|
|
loading = _ref9.loading,
|
|
|
globalSetting = _ref9.globalSetting,
|
|
|
classroomList = _ref9.classroomList;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(Comment_ShixunsListPage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 88756:
|
|
|
/*!***************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Detail/components/WorkList/components/Redo.tsx ***!
|
|
|
\***************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* 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_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_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_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __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_2___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_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 43418);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 8591);
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/fetch */ 43391);
|
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 5841);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunHomeworks", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DelShixun = function DelShixun(_ref) {
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3___default()(_ref, _excluded);
|
|
|
var params = (0,umi__WEBPACK_IMPORTED_MODULE_6__.useParams)();
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
|
|
|
centered: true,
|
|
|
title: "\u63D0\u793A",
|
|
|
open: shixunHomeworks.actionTabs.key === '打回重做' ? true : false,
|
|
|
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_2___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 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:
|
|
|
_context.next = 2;
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP)("/api/myshixuns/".concat(shixunHomeworks.actionTabs.selectArrs.myshixun_identifier, "/reset_my_game.json"), {
|
|
|
method: 'GET',
|
|
|
params: {
|
|
|
course_id: params.coursesId
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.shixun_identifier) {
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.success('操作成功');
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getWorkList',
|
|
|
payload: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, shixunHomeworks.actionTabs.params)
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("p", {
|
|
|
children: "\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u5458\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("p", {
|
|
|
children: "\u786E\u5B9A\u6253\u56DE?"
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_6__.connect)(function (_ref3) {
|
|
|
var shixunHomeworks = _ref3.shixunHomeworks;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks
|
|
|
};
|
|
|
})(DelShixun));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 66104:
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules ***!
|
|
|
\**************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// 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__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// 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);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 24334:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/_js-base64@2.6.4@js-base64/base64.js ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
|
* base64.js
|
|
|
*
|
|
|
* Licensed under the BSD 3-Clause License.
|
|
|
* http://opensource.org/licenses/BSD-3-Clause
|
|
|
*
|
|
|
* References:
|
|
|
* http://en.wikipedia.org/wiki/Base64
|
|
|
*/
|
|
|
;(function (global, factory) {
|
|
|
true
|
|
|
? module.exports = factory(global)
|
|
|
: 0
|
|
|
}((
|
|
|
typeof self !== 'undefined' ? self
|
|
|
: typeof window !== 'undefined' ? window
|
|
|
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
|
|
|
: this
|
|
|
), function(global) {
|
|
|
'use strict';
|
|
|
// existing version for noConflict()
|
|
|
global = global || {};
|
|
|
var _Base64 = global.Base64;
|
|
|
var version = "2.6.4";
|
|
|
// constants
|
|
|
var b64chars
|
|
|
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
|
var b64tab = function(bin) {
|
|
|
var t = {};
|
|
|
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
|
|
|
return t;
|
|
|
}(b64chars);
|
|
|
var fromCharCode = String.fromCharCode;
|
|
|
// encoder stuff
|
|
|
var cb_utob = function(c) {
|
|
|
if (c.length < 2) {
|
|
|
var cc = c.charCodeAt(0);
|
|
|
return cc < 0x80 ? c
|
|
|
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
|
|
|
+ fromCharCode(0x80 | (cc & 0x3f)))
|
|
|
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
|
} else {
|
|
|
var cc = 0x10000
|
|
|
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
|
|
+ (c.charCodeAt(1) - 0xDC00);
|
|
|
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
|
}
|
|
|
};
|
|
|
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
var utob = function(u) {
|
|
|
return u.replace(re_utob, cb_utob);
|
|
|
};
|
|
|
var cb_encode = function(ccc) {
|
|
|
var padlen = [0, 2, 1][ccc.length % 3],
|
|
|
ord = ccc.charCodeAt(0) << 16
|
|
|
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
|
|
|
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
|
|
|
chars = [
|
|
|
b64chars.charAt( ord >>> 18),
|
|
|
b64chars.charAt((ord >>> 12) & 63),
|
|
|
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
|
|
|
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
|
|
|
];
|
|
|
return chars.join('');
|
|
|
};
|
|
|
var btoa = global.btoa && typeof global.btoa == 'function'
|
|
|
? function(b){ return global.btoa(b) } : function(b) {
|
|
|
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
|
|
|
'The string contains invalid characters.'
|
|
|
);
|
|
|
return b.replace(/[\s\S]{1,3}/g, cb_encode);
|
|
|
};
|
|
|
var _encode = function(u) {
|
|
|
return btoa(utob(String(u)));
|
|
|
};
|
|
|
var mkUriSafe = function (b64) {
|
|
|
return b64.replace(/[+\/]/g, function(m0) {
|
|
|
return m0 == '+' ? '-' : '_';
|
|
|
}).replace(/=/g, '');
|
|
|
};
|
|
|
var encode = function(u, urisafe) {
|
|
|
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
|
|
|
};
|
|
|
var encodeURI = function(u) { return encode(u, true) };
|
|
|
var fromUint8Array;
|
|
|
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
|
|
|
// return btoa(fromCharCode.apply(null, a));
|
|
|
var b64 = '';
|
|
|
for (var i = 0, l = a.length; i < l; i += 3) {
|
|
|
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
|
|
|
var ord = a0 << 16 | a1 << 8 | a2;
|
|
|
b64 += b64chars.charAt( ord >>> 18)
|
|
|
+ b64chars.charAt((ord >>> 12) & 63)
|
|
|
+ ( typeof a1 != 'undefined'
|
|
|
? b64chars.charAt((ord >>> 6) & 63) : '=')
|
|
|
+ ( typeof a2 != 'undefined'
|
|
|
? b64chars.charAt( ord & 63) : '=');
|
|
|
}
|
|
|
return urisafe ? mkUriSafe(b64) : b64;
|
|
|
};
|
|
|
// decoder stuff
|
|
|
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
|
var cb_btou = function(cccc) {
|
|
|
switch(cccc.length) {
|
|
|
case 4:
|
|
|
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
|
|
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
|
|
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(3)),
|
|
|
offset = cp - 0x10000;
|
|
|
return (fromCharCode((offset >>> 10) + 0xD800)
|
|
|
+ fromCharCode((offset & 0x3FF) + 0xDC00));
|
|
|
case 3:
|
|
|
return fromCharCode(
|
|
|
((0x0f & cccc.charCodeAt(0)) << 12)
|
|
|
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(2))
|
|
|
);
|
|
|
default:
|
|
|
return fromCharCode(
|
|
|
((0x1f & cccc.charCodeAt(0)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(1))
|
|
|
);
|
|
|
}
|
|
|
};
|
|
|
var btou = function(b) {
|
|
|
return b.replace(re_btou, cb_btou);
|
|
|
};
|
|
|
var cb_decode = function(cccc) {
|
|
|
var len = cccc.length,
|
|
|
padlen = len % 4,
|
|
|
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
|
|
|
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
|
|
|
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
|
|
|
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
|
|
|
chars = [
|
|
|
fromCharCode( n >>> 16),
|
|
|
fromCharCode((n >>> 8) & 0xff),
|
|
|
fromCharCode( n & 0xff)
|
|
|
];
|
|
|
chars.length -= [0, 0, 2, 1][padlen];
|
|
|
return chars.join('');
|
|
|
};
|
|
|
var _atob = global.atob && typeof global.atob == 'function'
|
|
|
? function(a){ return global.atob(a) } : function(a){
|
|
|
return a.replace(/\S{1,4}/g, cb_decode);
|
|
|
};
|
|
|
var atob = function(a) {
|
|
|
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
|
|
|
};
|
|
|
var _decode = function(a) { return btou(_atob(a)) };
|
|
|
var _fromURI = function(a) {
|
|
|
return String(a).replace(/[-_]/g, function(m0) {
|
|
|
return m0 == '-' ? '+' : '/'
|
|
|
}).replace(/[^A-Za-z0-9\+\/]/g, '');
|
|
|
};
|
|
|
var decode = function(a){
|
|
|
return _decode(_fromURI(a));
|
|
|
};
|
|
|
var toUint8Array;
|
|
|
if (global.Uint8Array) toUint8Array = function(a) {
|
|
|
return Uint8Array.from(atob(_fromURI(a)), function(c) {
|
|
|
return c.charCodeAt(0);
|
|
|
});
|
|
|
};
|
|
|
var noConflict = function() {
|
|
|
var Base64 = global.Base64;
|
|
|
global.Base64 = _Base64;
|
|
|
return Base64;
|
|
|
};
|
|
|
// export Base64
|
|
|
global.Base64 = {
|
|
|
VERSION: version,
|
|
|
atob: atob,
|
|
|
btoa: btoa,
|
|
|
fromBase64: decode,
|
|
|
toBase64: encode,
|
|
|
utob: utob,
|
|
|
encode: encode,
|
|
|
encodeURI: encodeURI,
|
|
|
btou: btou,
|
|
|
decode: decode,
|
|
|
noConflict: noConflict,
|
|
|
fromUint8Array: fromUint8Array,
|
|
|
toUint8Array: toUint8Array
|
|
|
};
|
|
|
// if ES5 is available, make Base64.extendString() available
|
|
|
if (typeof Object.defineProperty === 'function') {
|
|
|
var noEnum = function(v){
|
|
|
return {value:v,enumerable:false,writable:true,configurable:true};
|
|
|
};
|
|
|
global.Base64.extendString = function () {
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'fromBase64', noEnum(function () {
|
|
|
return decode(this)
|
|
|
}));
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'toBase64', noEnum(function (urisafe) {
|
|
|
return encode(this, urisafe)
|
|
|
}));
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'toBase64URI', noEnum(function () {
|
|
|
return encode(this, true)
|
|
|
}));
|
|
|
};
|
|
|
}
|
|
|
//
|
|
|
// export Base64 to the namespace
|
|
|
//
|
|
|
if (global['Meteor']) { // Meteor.js
|
|
|
Base64 = global.Base64;
|
|
|
}
|
|
|
// module.exports and AMD are mutually exclusive.
|
|
|
// module.exports has precedence.
|
|
|
if ( true && module.exports) {
|
|
|
module.exports.Base64 = global.Base64;
|
|
|
}
|
|
|
else if (true) {
|
|
|
// AMD. Register as an anonymous module.
|
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
|
}
|
|
|
// that's it!
|
|
|
return {Base64: global.Base64}
|
|
|
}));
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |