|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[30342,27809,52720,4977,11436,59741],{
|
|
|
|
|
|
/***/ 68742:
|
|
|
/*!***********************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
|
|
|
\***********************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_ArrowLeftOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(61796);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/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.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(91851);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/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
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 47966:
|
|
|
/*!********************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules ***!
|
|
|
\********************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_DeleteOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(61796);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/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.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(91851);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/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
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_DeleteOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(DeleteOutlined_DeleteOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 80045:
|
|
|
/*!*******************************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
|
|
|
\*******************************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_ExclamationCircleOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(61796);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(91851);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_ExclamationCircleOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 92245:
|
|
|
/*!**********************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules ***!
|
|
|
\**********************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_SolutionOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.5@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(61796);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/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.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(91851);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/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
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_SolutionOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(SolutionOutlined_SolutionOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 80330:
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/pages/tasks/util.js ***!
|
|
|
\*********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Ax: function() { return /* binding */ processTreeData; },
|
|
|
/* harmony export */ Ds: function() { return /* binding */ debounce; },
|
|
|
/* harmony export */ KI: function() { return /* binding */ apiPref; },
|
|
|
/* harmony export */ SI: function() { return /* binding */ getTreeData; },
|
|
|
/* harmony export */ f1: function() { return /* binding */ isCompileOk; }
|
|
|
/* harmony export */ });
|
|
|
/* unused harmony export isProd */
|
|
|
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/env */ 78130);
|
|
|
|
|
|
function isCompileOk(rs) {
|
|
|
var flag = true;
|
|
|
if (rs.length > 0) {
|
|
|
for (var i = 0; i < rs.length; i++) {
|
|
|
if (rs[i].compile_success == 0 || !rs[i].compile_success) {
|
|
|
flag = false;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
flag = false;
|
|
|
}
|
|
|
return flag;
|
|
|
}
|
|
|
function getTreeData(data) {
|
|
|
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
|
var result = [];
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
var item = data[i];
|
|
|
var key = parentKey ? "".concat(parentKey, "/").concat(item.name) : "".concat(item.name);
|
|
|
result.push({
|
|
|
title: item.name,
|
|
|
isLeaf: item.type === 'tree' ? false : true,
|
|
|
key: key
|
|
|
});
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
function processTreeData(repos, key, newData) {
|
|
|
for (var i = 0; i < repos.length; i++) {
|
|
|
var item = repos[i];
|
|
|
if (item.key === key) {
|
|
|
item.children = newData;
|
|
|
break;
|
|
|
}
|
|
|
if (item.children) {
|
|
|
processTreeData(item.children, key, newData);
|
|
|
}
|
|
|
}
|
|
|
return repos;
|
|
|
}
|
|
|
function debounce(func, wait, immediate) {
|
|
|
var timeout;
|
|
|
return function () {
|
|
|
var context = this,
|
|
|
args = arguments;
|
|
|
var later = function later() {
|
|
|
timeout = null;
|
|
|
if (!immediate) func.apply(context, args);
|
|
|
};
|
|
|
var callNow = immediate && !timeout;
|
|
|
clearTimeout(timeout);
|
|
|
timeout = setTimeout(later, wait);
|
|
|
if (callNow) func.apply(context, args);
|
|
|
};
|
|
|
}
|
|
|
var isProd = true;
|
|
|
var apiPref = _utils_env__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.API_SERVER;
|
|
|
// export const isProd =
|
|
|
// window.location.href.indexOf('test-') > 0 ||
|
|
|
// window.location.href.indexOf('localhost') > 0
|
|
|
// ? false
|
|
|
// : true;
|
|
|
|
|
|
// export const apiPref = isProd
|
|
|
// ? 'https://www.educoder.net'
|
|
|
// : 'https://test-newweb.educoder.net';
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 73208:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
|
\*****************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
|
var img = _ref.img,
|
|
|
_ref$buttonProps = _ref.buttonProps,
|
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
|
_ref$styles = _ref.styles,
|
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
|
customText = _ref.customText,
|
|
|
ButtonText = _ref.ButtonText,
|
|
|
ButtonClick = _ref.ButtonClick,
|
|
|
Buttonclass = _ref.Buttonclass,
|
|
|
ButtonTwo = _ref.ButtonTwo,
|
|
|
imgStyles = _ref.imgStyles,
|
|
|
_ref$loading = _ref.loading,
|
|
|
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
|
|
className: "tc animated fadeIn",
|
|
|
style: _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
|
|
color: '#999',
|
|
|
margin: '100px auto',
|
|
|
visibility: loading ? 'hidden' : 'visible'
|
|
|
}), styles),
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
|
|
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
|
|
style: _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
|
|
className: "mt20 font14",
|
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
|
className: Buttonclass,
|
|
|
onClick: ButtonClick
|
|
|
}, buttonProps), {}, {
|
|
|
children: ButtonText
|
|
|
})), ButtonTwo && ButtonTwo]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 19480:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ PreviewAll; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
|
|
|
var ArrowDownOutlined = __webpack_require__(98915);
|
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
|
|
|
var monaco_editor = __webpack_require__(76329);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(22739);
|
|
|
// EXTERNAL MODULE: ./src/service/exercise.ts
|
|
|
var exercise = __webpack_require__(35367);
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
var NoData = __webpack_require__(73208);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(78130);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var PreviewAll = (function (_ref) {
|
|
|
var _data, _data2, _data3, _data4, _data5, _data6, _data7;
|
|
|
var _ref$editOffice = _ref.editOffice,
|
|
|
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
|
|
|
data = _ref.data,
|
|
|
theme = _ref.theme,
|
|
|
type = _ref.type,
|
|
|
filename = _ref.filename,
|
|
|
monacoEditor = _ref.monacoEditor,
|
|
|
className = _ref.className,
|
|
|
style = _ref.style,
|
|
|
close = _ref.close,
|
|
|
onClose = _ref.onClose,
|
|
|
hasMask = _ref.hasMask,
|
|
|
disabledDownload = _ref.disabledDownload,
|
|
|
onImgDimensions = _ref.onImgDimensions,
|
|
|
showNodata = _ref.showNodata;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
src = _useState2[0],
|
|
|
setSrc = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
token = _useState4[0],
|
|
|
setToken = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
officeData = _useState6[0],
|
|
|
setOfficeData = _useState6[1];
|
|
|
var officePath = window.ENV === "build" ? "/react/build" : "";
|
|
|
var apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER;
|
|
|
// let size;
|
|
|
console.log("disabledDownload---", disabledDownload);
|
|
|
var unit = 1024 * 1024;
|
|
|
var maxSize = 10 * unit;
|
|
|
var closeRef = (0,_react_17_0_2_react.useRef)();
|
|
|
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
|
|
|
data = env/* default */.Z.API_SERVER + data;
|
|
|
}
|
|
|
// if (type === "office") {
|
|
|
// size = parseUrl(data).filesize
|
|
|
// if (size > maxSize) {
|
|
|
// type = "other"
|
|
|
// }
|
|
|
// }
|
|
|
if (filename) monacoEditor.filename = filename;
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _document$cookie;
|
|
|
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";");
|
|
|
cookies === null || cookies === void 0 || cookies.map(function (item) {
|
|
|
var i = item.split("=");
|
|
|
if (i[0] === '_educoder_session') {
|
|
|
setToken(i[1]);
|
|
|
}
|
|
|
});
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (type === "office") getData();
|
|
|
}, [type, data]);
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _url, _id, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
console.log("data:", data);
|
|
|
_url = data;
|
|
|
if (!data.startsWith("http")) {
|
|
|
_url = location.origin + _url;
|
|
|
}
|
|
|
_id = new URL(_url).pathname.split("/").pop();
|
|
|
_context.next = 6;
|
|
|
return (0,exercise/* setEcsAttachment */.gJ)({
|
|
|
attachment_id: _id
|
|
|
});
|
|
|
case 6:
|
|
|
res = _context.sent;
|
|
|
setOfficeData(res);
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleClick = function handleClick() {
|
|
|
if (data.startsWith("http") || data.startsWith('blob:')) {
|
|
|
handleDown();
|
|
|
return;
|
|
|
}
|
|
|
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
|
|
|
};
|
|
|
var handleDown = function handleDown() {
|
|
|
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
|
|
|
};
|
|
|
console.log(data, 'data');
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: objectSpread2_default()({}, style || {}),
|
|
|
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
|
|
|
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: PreviewAllmodules.close,
|
|
|
ref: closeRef,
|
|
|
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
return closeRef.current;
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick() {
|
|
|
onClose();
|
|
|
onImgDimensions();
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "icon-yulanpizhu"
|
|
|
})
|
|
|
})
|
|
|
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
return closeRef.current;
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: handleDown,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "icon-quxiaozhiding"
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u5173\u95ED",
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
return closeRef.current;
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "",
|
|
|
onClick: onClose,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "icon-guanbi1"
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
|
|
|
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
|
|
|
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
|
|
|
src: ((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http")) > -1 || (_data3 = data) !== null && _data3 !== void 0 && _data3.startsWith("/api") ? data : "data:image/png;base64,".concat(data),
|
|
|
autoPlay: true
|
|
|
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 || (_data5 = data) !== null && _data5 !== void 0 && _data5.startsWith("/api") ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
|
|
|
controls: true,
|
|
|
src: "".concat(data),
|
|
|
autoPlay: true
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
|
|
|
controls: true,
|
|
|
src: "data:video/mp4;base64,".concat(data),
|
|
|
autoPlay: true
|
|
|
})
|
|
|
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
|
|
|
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
src: data + '&disposition=inline'
|
|
|
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
|
|
|
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
|
|
|
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("http")) > -1 || (_data7 = data) !== null && _data7 !== void 0 && _data7.startsWith("/api") ? data : "data:image/png;base64,".concat(data)
|
|
|
}), (type === "other" || type === "download") && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: showNodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
|
customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",
|
|
|
ButtonTwo: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-xiazai4 font14"
|
|
|
}),
|
|
|
type: "primary",
|
|
|
size: 'middle',
|
|
|
onClick: handleClick,
|
|
|
children: "\u4E0B\u8F7D"
|
|
|
})
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
size: 'middle',
|
|
|
onClick: handleDown,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 11436:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ RenderHtml; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js
|
|
|
var toConsumableArray = __webpack_require__(93923);
|
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
|
var createForOfIteratorHelper = __webpack_require__(98190);
|
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.min.css
|
|
|
var katex_min = __webpack_require__(16622);
|
|
|
// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/lib/marked.js
|
|
|
var marked = __webpack_require__(32834);
|
|
|
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
|
|
|
// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/src/helpers.js
|
|
|
var helpers = __webpack_require__(11690);
|
|
|
;// CONCATENATED MODULE: ./src/utils/marked.ts
|
|
|
|
|
|
|
|
|
|
|
|
function indentCodeCompensation(raw, text) {
|
|
|
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
|
|
|
if (matchIndentToCode === null) {
|
|
|
return text;
|
|
|
}
|
|
|
var indentToCode = matchIndentToCode[1];
|
|
|
return text.split('\n').map(function (node) {
|
|
|
var matchIndentInNode = node.match(/^\s+/);
|
|
|
if (matchIndentInNode === null) {
|
|
|
return node;
|
|
|
}
|
|
|
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
|
|
|
indentInNode = _matchIndentInNode[0];
|
|
|
if (indentInNode.length >= indentToCode.length) {
|
|
|
return node.slice(indentToCode.length);
|
|
|
}
|
|
|
return node;
|
|
|
}).join('\n');
|
|
|
}
|
|
|
//兼容之前的 ##标题式写法
|
|
|
var toc = [];
|
|
|
var ctx = ["<ul>"];
|
|
|
var renderer = new (marked_default()).Renderer();
|
|
|
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
|
|
|
function cleanToc() {
|
|
|
toc.length = 0;
|
|
|
ctx = ["<ul>"];
|
|
|
}
|
|
|
var lines = {
|
|
|
overflow: "hidden",
|
|
|
WebkitBoxOrient: "vertical",
|
|
|
display: "-webkit-box",
|
|
|
WebkitLineClamp: 2
|
|
|
};
|
|
|
function buildToc(coll, k, level, ctx) {
|
|
|
if (k >= coll.length || coll[k].level <= level) {
|
|
|
return k;
|
|
|
}
|
|
|
var node = coll[k];
|
|
|
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
|
|
|
k++;
|
|
|
var childCtx = [];
|
|
|
k = buildToc(coll, k, node.level, childCtx);
|
|
|
if (childCtx.length > 0) {
|
|
|
ctx.push("<ul>");
|
|
|
childCtx.forEach(function (idm) {
|
|
|
ctx.push(idm);
|
|
|
});
|
|
|
ctx.push("</ul>");
|
|
|
}
|
|
|
ctx.push("</li>");
|
|
|
k = buildToc(coll, k, level, ctx);
|
|
|
return k;
|
|
|
}
|
|
|
function getTocContent() {
|
|
|
buildToc(toc, 0, 0, ctx);
|
|
|
ctx.push("</ul>");
|
|
|
return ctx.join("");
|
|
|
}
|
|
|
var tokenizer = {
|
|
|
heading: function heading(src) {
|
|
|
var cap = headingRegex.exec(src);
|
|
|
if (cap) {
|
|
|
return {
|
|
|
type: 'heading',
|
|
|
raw: cap[0],
|
|
|
depth: cap[1].length,
|
|
|
text: cap[2]
|
|
|
};
|
|
|
}
|
|
|
},
|
|
|
fences: function fences(src) {
|
|
|
var cap = this.rules.block.fences.exec(src);
|
|
|
if (cap) {
|
|
|
var raw = cap[0];
|
|
|
var text = indentCodeCompensation(raw, cap[3] || '');
|
|
|
var lang = cap[2] ? cap[2].trim() : cap[2];
|
|
|
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
|
|
|
var id = next_id();
|
|
|
var expression = text;
|
|
|
text = id;
|
|
|
math_expressions[id] = {
|
|
|
type: 'block',
|
|
|
expression: expression
|
|
|
};
|
|
|
}
|
|
|
return {
|
|
|
type: 'code',
|
|
|
raw: raw,
|
|
|
lang: lang,
|
|
|
text: text
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
|
|
|
var katex_count = 0;
|
|
|
var next_id = function next_id() {
|
|
|
return "__special_katext_id_".concat(katex_count++, "__");
|
|
|
};
|
|
|
var math_expressions = {};
|
|
|
function getMathExpressions() {
|
|
|
return math_expressions;
|
|
|
}
|
|
|
function resetMathExpressions() {
|
|
|
katex_count = 0;
|
|
|
math_expressions = {};
|
|
|
}
|
|
|
function replace_math_with_ids(text) {
|
|
|
text = text.replace(latexRegex, function (_match, expression) {
|
|
|
var id = next_id();
|
|
|
math_expressions[id] = {
|
|
|
type: 'inline',
|
|
|
expression: expression
|
|
|
};
|
|
|
return id;
|
|
|
});
|
|
|
return text;
|
|
|
}
|
|
|
var original_listitem = renderer.listitem;
|
|
|
renderer.listitem = function (text) {
|
|
|
return original_listitem(replace_math_with_ids(text));
|
|
|
};
|
|
|
var original_paragraph = renderer.paragraph;
|
|
|
renderer.paragraph = function (text) {
|
|
|
return original_paragraph(replace_math_with_ids(text));
|
|
|
};
|
|
|
var original_tablecell = renderer.tablecell;
|
|
|
renderer.tablecell = function (content, flags) {
|
|
|
return original_tablecell(replace_math_with_ids(content), flags);
|
|
|
};
|
|
|
renderer.code = function (code, infostring, escaped) {
|
|
|
var lang = (infostring || '').match(/\S*/)[0];
|
|
|
if (!lang) {
|
|
|
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
|
|
|
}
|
|
|
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
|
|
|
return "<p class='editormd-tex'>".concat(code, "</p>");
|
|
|
} else {
|
|
|
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
|
|
|
}
|
|
|
};
|
|
|
renderer.heading = function (text, level, raw) {
|
|
|
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
|
|
|
toc.push({
|
|
|
anchor: anchor,
|
|
|
level: level,
|
|
|
text: text
|
|
|
});
|
|
|
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
|
|
|
};
|
|
|
marked_default().setOptions({
|
|
|
silent: true,
|
|
|
gfm: true,
|
|
|
pedantic: false
|
|
|
});
|
|
|
marked_default().use({
|
|
|
tokenizer: tokenizer,
|
|
|
renderer: renderer
|
|
|
});
|
|
|
/* harmony default export */ var utils_marked = ((marked_default()));
|
|
|
// EXTERNAL MODULE: ./node_modules/_code-prettify@0.1.0@code-prettify/src/prettify.js
|
|
|
var prettify = __webpack_require__(64018);
|
|
|
// EXTERNAL MODULE: ./node_modules/_hls.js@1.4.13@hls.js/dist/hls.mjs
|
|
|
var dist_hls = __webpack_require__(9029);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(78130);
|
|
|
// EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.js
|
|
|
var katex = __webpack_require__(15342);
|
|
|
// EXTERNAL MODULE: ./node_modules/_uuid@8.3.0@uuid/dist/esm-browser/v4.js + 4 modules
|
|
|
var v4 = __webpack_require__(1012);
|
|
|
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
|
|
|
var PreviewAll = __webpack_require__(19480);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ADD_MULTI = '@▁▁@';
|
|
|
var ADD_SINGLE = '@▁@';
|
|
|
var preRegex = /<pre[^>]*>/g;
|
|
|
function _unescape(str) {
|
|
|
var div = document.createElement('div');
|
|
|
div.innerHTML = str;
|
|
|
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
|
|
|
}
|
|
|
/* harmony default export */ var RenderHtml = (function (_ref) {
|
|
|
var _ref$value = _ref.value,
|
|
|
value = _ref$value === void 0 ? '' : _ref$value,
|
|
|
className = _ref.className,
|
|
|
showTextOnly = _ref.showTextOnly,
|
|
|
showLines = _ref.showLines,
|
|
|
_ref$style = _ref.style,
|
|
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
|
_ref$stylesPrev = _ref.stylesPrev,
|
|
|
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev,
|
|
|
highlightKeywords = _ref.highlightKeywords,
|
|
|
showProgramFill = _ref.showProgramFill,
|
|
|
isProgramFill = _ref.isProgramFill,
|
|
|
_ref$disabledFill = _ref.disabledFill,
|
|
|
disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
|
|
|
programFillValue = _ref.programFillValue,
|
|
|
_ref$onFillChange = _ref.onFillChange,
|
|
|
onFillChange = _ref$onFillChange === void 0 ? function (value) {} : _ref$onFillChange,
|
|
|
_ref$onFillBlur = _ref.onFillBlur,
|
|
|
onFillBlur = _ref$onFillBlur === void 0 ? function () {} : _ref$onFillBlur;
|
|
|
var str = String(value);
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
data = _useState2[0],
|
|
|
setData = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)("office"),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
type = _useState4[0],
|
|
|
setType = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
projectValue = _useState6[0],
|
|
|
setProjectValue = _useState6[1];
|
|
|
var classNamesRef = (0,_react_17_0_2_react.useRef)("a" + (0,v4/* default */.Z)());
|
|
|
var formObj = {};
|
|
|
var createInput = function createInput(a, num) {
|
|
|
// const wrap = document.createElement("span")
|
|
|
// wrap.className =
|
|
|
var input = document.createElement(a === ADD_SINGLE ? "input" : "textarea");
|
|
|
input.style.width = "100%";
|
|
|
input.style.height = a === ADD_SINGLE ? "40px" : "151px";
|
|
|
input.rows = 5;
|
|
|
input.spellcheck = false;
|
|
|
input.name = "edu-program-fill";
|
|
|
input.placeholder = "请输入";
|
|
|
input.dataset.id = num;
|
|
|
var key = Object.keys(formObj).length;
|
|
|
formObj[key] = input;
|
|
|
return "<span class=\"edu-program-fill-wrap ".concat(a === ADD_SINGLE ? "" : "show", "\" style=\"width:").concat(a === ADD_SINGLE ? "200px" : "100%", "\"><span>").concat(input.outerHTML, "<span class=\"edu-program-fill-score\"></span></span></span>");
|
|
|
};
|
|
|
var formatMD = function formatMD(rs) {
|
|
|
return rs.replace(/<style.*?>([\s\S]+?)<\/style>/gim, function (_, css) {
|
|
|
var _css = css.replace(/(\n|\r)/g, "").split("}");
|
|
|
var arr = [];
|
|
|
_css.map(function (item) {
|
|
|
if (item != '') {
|
|
|
arr.push(".".concat(classNamesRef.current, " ").concat(item));
|
|
|
}
|
|
|
});
|
|
|
return "<style>".concat(arr.join("}"), "</style>");
|
|
|
});
|
|
|
};
|
|
|
var html = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
try {
|
|
|
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
|
|
|
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
|
|
|
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
|
|
|
str = str.replace(reg, "(" + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
|
|
|
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
|
|
|
} catch (e) {}
|
|
|
;
|
|
|
if (showProgramFill) {
|
|
|
var num = -1;
|
|
|
str = str.replaceAll("<", "<").replaceAll(">", ">").replace(/(@▁▁@|@▁@)/g, function (a, b, c) {
|
|
|
++num;
|
|
|
return createInput(a, num);
|
|
|
});
|
|
|
return "<pre style=\"background:#fff;padding:4px\">".concat(formatMD(str || ""), "</pre>");
|
|
|
}
|
|
|
var rs = utils_marked(str);
|
|
|
rs = formatMD(rs);
|
|
|
var math_expressions = getMathExpressions();
|
|
|
if (str.match(/\[TOC\]/)) {
|
|
|
rs = rs.replace('<p>[TOC]</p>', getTocContent());
|
|
|
cleanToc();
|
|
|
}
|
|
|
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
|
|
|
var _math_expressions$cap = math_expressions[capture],
|
|
|
type = _math_expressions$cap.type,
|
|
|
expression = _math_expressions$cap.expression;
|
|
|
return (0,katex.renderToString)(_unescape(expression) || '', {
|
|
|
displayMode: type === 'block',
|
|
|
throwOnError: false,
|
|
|
output: 'html'
|
|
|
});
|
|
|
});
|
|
|
rs = rs.replace(/▁/g, '▁▁▁');
|
|
|
resetMathExpressions();
|
|
|
// return dompurify.sanitize(rs)
|
|
|
var dom = document.createElement('div');
|
|
|
dom.innerHTML = rs;
|
|
|
if (highlightKeywords) {
|
|
|
var escapedKeywords = highlightKeywords.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
|
findKeyword(dom, escapedKeywords);
|
|
|
return dom.innerHTML;
|
|
|
}
|
|
|
if (showTextOnly) {
|
|
|
return dom.innerText;
|
|
|
}
|
|
|
setTimeout(function () {
|
|
|
return onLoad();
|
|
|
}, 500);
|
|
|
console.log("dom.innerHTML:", dom.innerHTML);
|
|
|
return dom.innerHTML;
|
|
|
}, [str, highlightKeywords]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (el.current) {
|
|
|
var inputs = el.current.querySelectorAll(["input", "textarea"]);
|
|
|
inputs.forEach(function (input) {
|
|
|
input.oninput = onInput;
|
|
|
input.onblur = onBlur;
|
|
|
});
|
|
|
}
|
|
|
}, [projectValue]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (!!(programFillValue !== null && programFillValue !== void 0 && programFillValue.length)) {
|
|
|
var scoreDom = el.current.querySelectorAll(".edu-program-fill-score");
|
|
|
var dom = el.current.querySelectorAll('[name="edu-program-fill"]');
|
|
|
var _iterator = createForOfIteratorHelper_default()(dom.entries()),
|
|
|
_step;
|
|
|
try {
|
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
|
var _programFillValue$k;
|
|
|
var _step$value = slicedToArray_default()(_step.value, 2),
|
|
|
k = _step$value[0],
|
|
|
i = _step$value[1];
|
|
|
i.value = (_programFillValue$k = programFillValue[k]) === null || _programFillValue$k === void 0 ? void 0 : _programFillValue$k.value;
|
|
|
if (programFillValue[k].type === "warning") {
|
|
|
i.className = "program-fill-warning";
|
|
|
} else if (programFillValue[k].type === "success") {
|
|
|
i.className = "program-fill-success";
|
|
|
} else {
|
|
|
i.className = "";
|
|
|
}
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator.e(err);
|
|
|
} finally {
|
|
|
_iterator.f();
|
|
|
}
|
|
|
var _iterator2 = createForOfIteratorHelper_default()(scoreDom.entries()),
|
|
|
_step2;
|
|
|
try {
|
|
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
|
var _programFillValue$_k, _programFillValue$_k2;
|
|
|
var _step2$value = slicedToArray_default()(_step2.value, 2),
|
|
|
_k = _step2$value[0],
|
|
|
_i = _step2$value[1];
|
|
|
_i.innerHTML = (_programFillValue$_k = programFillValue[_k]) !== null && _programFillValue$_k !== void 0 && _programFillValue$_k.score ? "".concat((_programFillValue$_k2 = programFillValue[_k]) === null || _programFillValue$_k2 === void 0 ? void 0 : _programFillValue$_k2.score, "\u5206") : "";
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator2.e(err);
|
|
|
} finally {
|
|
|
_iterator2.f();
|
|
|
}
|
|
|
setProjectValue(programFillValue);
|
|
|
}
|
|
|
}, [programFillValue]);
|
|
|
var onInput = function onInput(e) {
|
|
|
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
|
|
|
projectValue[e.target.dataset.id]["value"] = e.target.value;
|
|
|
setProjectValue(toConsumableArray_default()(projectValue));
|
|
|
onFillChange(projectValue, e.target.dataset.id);
|
|
|
};
|
|
|
var onBlur = function onBlur(e) {
|
|
|
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
|
|
|
projectValue[e.target.dataset.id]["value"] = e.target.value;
|
|
|
setProjectValue(toConsumableArray_default()(projectValue));
|
|
|
onFillBlur(projectValue, e.target.dataset.id);
|
|
|
};
|
|
|
function findKeyword(node, keyword) {
|
|
|
return node.childNodes.forEach(function (childNode) {
|
|
|
if (childNode.childNodes.length > 0) {
|
|
|
findKeyword(childNode, keyword);
|
|
|
} else if (childNode.nodeName !== "IMG") {
|
|
|
if (childNode.innerHTML) {
|
|
|
var _childNode$innerHTML;
|
|
|
childNode.innerHTML = (_childNode$innerHTML = childNode.innerHTML) === null || _childNode$innerHTML === void 0 ? void 0 : _childNode$innerHTML.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
|
|
|
} else {
|
|
|
var dom = document.createElement("span");
|
|
|
dom.innerHTML = childNode.textContent.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
|
|
|
childNode.replaceWith(dom);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// return dom.childNodes.forEach((node:any) => {
|
|
|
// console.log("nodeLen:",node.childNodes.length)
|
|
|
// if(node.childNodes.length > 0){
|
|
|
// debugger
|
|
|
// // findKeyword(dom.childNodes,keyword)
|
|
|
// }else{
|
|
|
// if(node.nodeName !== "#text"){
|
|
|
// node.innerHTML = node.innerHTML.replaceAll(keyword,`<span class="c-blue">${keyword}</span>`)
|
|
|
// console.log("node:",node,dom,node.nodeName,node.innerHTML,node.childNodes.length)
|
|
|
// debugger
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
// return node
|
|
|
// });
|
|
|
}
|
|
|
|
|
|
var el = (0,_react_17_0_2_react.useRef)();
|
|
|
lines['WebkitLineClamp'] = showLines;
|
|
|
if (showLines) {
|
|
|
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
|
|
|
}
|
|
|
function onAncherHandler(e) {
|
|
|
var target = e.target;
|
|
|
if (target.tagName.toUpperCase() === 'A') {
|
|
|
var ancher = target.getAttribute('href');
|
|
|
if (ancher.indexOf("office") > -1) {
|
|
|
e.preventDefault();
|
|
|
setData(ancher);
|
|
|
setType("office");
|
|
|
} else if (ancher.indexOf("application/pdf") > -1) {
|
|
|
e.preventDefault();
|
|
|
setData(ancher);
|
|
|
setType("pdf");
|
|
|
} else if (ancher.indexOf("text/html") > -1) {
|
|
|
e.preventDefault();
|
|
|
setData(ancher);
|
|
|
setType("html");
|
|
|
} else if (ancher.startsWith('#')) {
|
|
|
e.preventDefault();
|
|
|
var viewEl = document.getElementById(ancher.replace('#', ''));
|
|
|
if (viewEl) {
|
|
|
viewEl.scrollIntoView(true);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
var onLoad = function onLoad() {
|
|
|
var _el$current;
|
|
|
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
|
|
|
videoElement === null || videoElement === void 0 || videoElement.forEach(function (item) {
|
|
|
item.oncontextmenu = function () {
|
|
|
return false;
|
|
|
};
|
|
|
if (item.src.indexOf('.m3u8') > -1) {
|
|
|
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (dist_hls/* default */.Z.isSupported()) {
|
|
|
var hls = new dist_hls/* default */.Z();
|
|
|
hls.loadSource(item.src);
|
|
|
hls.attachMedia(item);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (el.current && html) {
|
|
|
if (html.match(preRegex)) {
|
|
|
window.PR.prettyPrint();
|
|
|
}
|
|
|
}
|
|
|
if (el.current) {
|
|
|
el.current.addEventListener('click', onAncherHandler);
|
|
|
return function () {
|
|
|
var _el$current2;
|
|
|
(_el$current2 = el.current) === null || _el$current2 === void 0 || _el$current2.removeEventListener('click', onAncherHandler);
|
|
|
resetMathExpressions();
|
|
|
cleanToc();
|
|
|
};
|
|
|
}
|
|
|
}, [html, el.current, onAncherHandler]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: el,
|
|
|
children: html
|
|
|
}), !showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: el,
|
|
|
style: objectSpread2_default()({}, style),
|
|
|
className: "".concat(className ? className : '', " ").concat(disabledFill ? "disabled-fill" : "", " markdown-body ").concat(classNamesRef.current),
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: html
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
|
|
|
close: true,
|
|
|
data: data,
|
|
|
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
|
|
|
style: objectSpread2_default()({}, stylesPrev),
|
|
|
onClose: function onClose() {
|
|
|
return setData("");
|
|
|
}
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 79669:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
|
|
|
\*************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ h: function() { return /* binding */ MyCodeMirror; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 57809);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 78241);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! codemirror */ 89780);
|
|
|
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(codemirror__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ 7042);
|
|
|
/* harmony import */ var codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! codemirror/theme/blackboard.css */ 93202);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Option = antd__WEBPACK_IMPORTED_MODULE_7__["default"].Option;
|
|
|
|
|
|
//https://github.com/codemirror/CodeMirror/issues/4838
|
|
|
var formItemLayout = {
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 20
|
|
|
}
|
|
|
};
|
|
|
var LanguageDesc = {
|
|
|
asp: ['ASP', 'vbscript'],
|
|
|
actionscript: ['ActionScript(3.0)/Flash/Flex', 'clike'],
|
|
|
bash: ['Bash/Bat', 'shell'],
|
|
|
css: ['CSS', 'css'],
|
|
|
c: ['C', 'clike'],
|
|
|
cpp: ['C++', 'clike'],
|
|
|
csharp: ['C#', 'clike'],
|
|
|
coffeescript: ['CoffeeScript', 'coffeescript'],
|
|
|
d: ['D', 'd'],
|
|
|
dart: ['Dart', 'dart'],
|
|
|
delphi: ['Delphi/Pascal', 'pascal'],
|
|
|
erlang: ['Erlang', 'erlang'],
|
|
|
go: ['Golang', 'go'],
|
|
|
groovy: ['Groovy', 'groovy'],
|
|
|
html: ['HTML', 'text/html'],
|
|
|
java: ['Java', 'clike'],
|
|
|
json: ['JSON', 'text/json'],
|
|
|
javascript: ['Javascript', 'javascript'],
|
|
|
lua: ['Lua', 'lua'],
|
|
|
less: ['LESS', 'css'],
|
|
|
markdown: ['Markdown', 'gfm'],
|
|
|
'objective-c': ['Objective-C', 'clike'],
|
|
|
php: ['PHP', 'php'],
|
|
|
perl: ['Perl', 'perl'],
|
|
|
python: ['Python', 'python'],
|
|
|
r: ['R', 'r'],
|
|
|
rst: ['reStructedText', 'rst'],
|
|
|
ruby: ['Ruby', 'ruby'],
|
|
|
sql: ['SQL', 'sql'],
|
|
|
sass: ['SASS/SCSS', 'sass'],
|
|
|
shell: ['Shell', 'shell'],
|
|
|
scala: ['Scala', 'clike'],
|
|
|
swift: ['Swift', 'clike'],
|
|
|
vb: ['VB/VBScript', 'vb'],
|
|
|
xml: ['XML', 'text/xml'],
|
|
|
yaml: ['YAML', 'yaml']
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)('python'),
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
|
|
|
mode = _useState2[0],
|
|
|
setMode = _useState2[1];
|
|
|
function onSetMode(value) {
|
|
|
setMode(LanguageDesc[value][1]);
|
|
|
}
|
|
|
function onSubmit(values) {
|
|
|
callback(values);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, formItemLayout), {}, {
|
|
|
className: "code-block-panel",
|
|
|
initialValues: {
|
|
|
language: 'python',
|
|
|
content: ''
|
|
|
},
|
|
|
onFinish: onSubmit,
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z.Item, {
|
|
|
label: "\u4EE3\u7801\u8BED\u8A00",
|
|
|
name: "language",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
return trigger.parentNode;
|
|
|
},
|
|
|
onChange: onSetMode,
|
|
|
children: Object.keys(LanguageDesc).map(function (item) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Option, {
|
|
|
value: item,
|
|
|
children: LanguageDesc[item][0]
|
|
|
}, item);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z.Item, {
|
|
|
label: "\u4EE3\u7801\u5185\u5BB9",
|
|
|
name: "content",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入代码内容'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(MyCodeMirror, {
|
|
|
mode: mode
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", {
|
|
|
className: "flex-container flex-end",
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
|
|
|
type: "ghost",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
}));
|
|
|
});
|
|
|
function MyCodeMirror(_ref2) {
|
|
|
var value = _ref2.value,
|
|
|
onChange = _ref2.onChange,
|
|
|
mode = _ref2.mode,
|
|
|
_ref2$options = _ref2.options,
|
|
|
options = _ref2$options === void 0 ? {} : _ref2$options;
|
|
|
var el = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),
|
|
|
_useState4 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2),
|
|
|
cm = _useState4[0],
|
|
|
setCm = _useState4[1];
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
var onChangeHandler = function onChangeHandler(cm) {
|
|
|
var content = cm.getValue();
|
|
|
onChange && onChange(content);
|
|
|
};
|
|
|
cm.on('change', onChangeHandler);
|
|
|
return function () {
|
|
|
cm.off('change', onChangeHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onChange]);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
cm.setOption('mode', mode);
|
|
|
}
|
|
|
}, [cm, mode]);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
if (value !== cm.getValue() || value === '') {
|
|
|
setTimeout(function () {
|
|
|
cm.setValue(value || '');
|
|
|
}, 300);
|
|
|
}
|
|
|
}
|
|
|
}, [cm, value]);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (el.current && !cm) {
|
|
|
var instance = codemirror__WEBPACK_IMPORTED_MODULE_3___default().fromTextArea(el.current, _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
|
mode: mode,
|
|
|
lineNumbers: true,
|
|
|
lineWrapping: true,
|
|
|
autoCloseBrackets: true,
|
|
|
tabSize: 4,
|
|
|
autofocus: true,
|
|
|
autoCloseTags: true,
|
|
|
matchBrackets: true,
|
|
|
styleActiveLine: true
|
|
|
}, options));
|
|
|
setCm(instance);
|
|
|
}
|
|
|
}, [el.current, cm]);
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
|
|
|
className: "my-codemirror-container",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("textarea", {
|
|
|
ref: el
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 83954:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/index.tsx + 10 modules ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ markdown_editor; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
|
var createForOfIteratorHelper = __webpack_require__(98190);
|
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(22060);
|
|
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/lib/codemirror.js
|
|
|
var codemirror = __webpack_require__(89780);
|
|
|
var codemirror_default = /*#__PURE__*/__webpack_require__.n(codemirror);
|
|
|
// EXTERNAL MODULE: ./node_modules/_resize-observer-polyfill@1.5.1@resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
|
var ResizeObserver_es = __webpack_require__(76374);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/lib/codemirror.css
|
|
|
var lib_codemirror = __webpack_require__(7042);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/addon/edit/closetag.js
|
|
|
var closetag = __webpack_require__(6313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/addon/edit/closebrackets.js
|
|
|
var closebrackets = __webpack_require__(25717);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/addon/display/placeholder.js
|
|
|
var placeholder = __webpack_require__(99498);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/mode/markdown/markdown.js
|
|
|
var markdown = __webpack_require__(25419);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/mode/stex/stex.js
|
|
|
var stex = __webpack_require__(67549);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
var RenderHtml = __webpack_require__(11436);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/RenderHtml/stex.tsx
|
|
|
|
|
|
// const latexjs = require('latex-l.js/dist/latex.js');
|
|
|
// import "latex-l.js/dist/css/base.css"
|
|
|
|
|
|
|
|
|
/* harmony default export */ var RenderHtml_stex = (function (_ref) {
|
|
|
var _ref$value = _ref.value,
|
|
|
value = _ref$value === void 0 ? '' : _ref$value,
|
|
|
className = _ref.className,
|
|
|
showTextOnly = _ref.showTextOnly,
|
|
|
showLines = _ref.showLines,
|
|
|
_ref$style = _ref.style,
|
|
|
style = _ref$style === void 0 ? {} : _ref$style;
|
|
|
var html = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
// try {
|
|
|
// const latex = value || 'This is some text';
|
|
|
// let generator = new latexjs.default.HtmlGenerator({ hyphenate: true })
|
|
|
// let doc = latexjs.default.parse(latex, { generator: generator }).htmlDocument()
|
|
|
// return doc.body.innerHTML
|
|
|
// }catch(e){
|
|
|
// console.log("e:",e)
|
|
|
// return "错误的latex语法,请检查"
|
|
|
// }
|
|
|
return "";
|
|
|
}, [value]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: html
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/toolbar/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/css/iconfont.css
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/toolbar/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DEFAULTICONS = [{
|
|
|
title: '粗体',
|
|
|
icon: 'icon-bold',
|
|
|
actionName: 'bold'
|
|
|
}, {
|
|
|
title: '斜体',
|
|
|
icon: 'icon-italic',
|
|
|
actionName: 'italic'
|
|
|
}, '|', {
|
|
|
title: '无序列表',
|
|
|
icon: 'icon-unorder-list',
|
|
|
actionName: 'list-ul'
|
|
|
}, {
|
|
|
title: '有序列表',
|
|
|
icon: 'icon-order-list',
|
|
|
actionName: 'list-ol'
|
|
|
}, '|', {
|
|
|
title: '行内代码',
|
|
|
icon: 'icon-code',
|
|
|
actionName: 'code'
|
|
|
}, {
|
|
|
title: '代码块(多语言风格)',
|
|
|
icon: 'icon-file-code',
|
|
|
actionName: 'code-block'
|
|
|
}, {
|
|
|
title: '链接',
|
|
|
icon: 'icon-link',
|
|
|
actionName: 'link'
|
|
|
}, '|', {
|
|
|
title: '行内公式',
|
|
|
icon: 'icon-sum',
|
|
|
actionName: 'inline-latex'
|
|
|
}, {
|
|
|
title: '多行公式',
|
|
|
icon: 'icon-formula',
|
|
|
actionName: 'latex'
|
|
|
}, '|', {
|
|
|
title: '添加图片',
|
|
|
icon: 'icon-picture',
|
|
|
actionName: 'upload-image'
|
|
|
}, {
|
|
|
title: '表格',
|
|
|
icon: 'icon-table',
|
|
|
actionName: 'add-table'
|
|
|
}, '|', {
|
|
|
title: '换行',
|
|
|
icon: 'icon-minus',
|
|
|
actionName: 'line-break'
|
|
|
}, {
|
|
|
title: '清空',
|
|
|
icon: 'icon-eraser',
|
|
|
actionName: 'eraser'
|
|
|
}];
|
|
|
function AButton(_ref) {
|
|
|
var onActionCallback = _ref.onActionCallback,
|
|
|
title = _ref.title,
|
|
|
icon = _ref.icon,
|
|
|
actionName = _ref.actionName,
|
|
|
_ref$className = _ref.className,
|
|
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
|
children = _ref.children;
|
|
|
function onAction() {
|
|
|
onActionCallback(actionName);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
title: title,
|
|
|
className: className,
|
|
|
onClick: onAction,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "md-iconfont ".concat(icon)
|
|
|
}), children]
|
|
|
});
|
|
|
}
|
|
|
/* harmony default export */ var toolbar = (function (_ref2) {
|
|
|
var watch = _ref2.watch,
|
|
|
showNullButton = _ref2.showNullButton,
|
|
|
showNullProgramButton = _ref2.showNullProgramButton,
|
|
|
onActionCallback = _ref2.onActionCallback,
|
|
|
fullScreen = _ref2.fullScreen,
|
|
|
insertTemp = _ref2.insertTemp,
|
|
|
hidetoolBar = _ref2.hidetoolBar;
|
|
|
var icons = [].concat(DEFAULTICONS, [{
|
|
|
title: "".concat(watch ? '关闭实时预览' : '开启实时预览'),
|
|
|
icon: "".concat(watch ? 'icon-eye-slash' : 'icon-eye'),
|
|
|
actionName: 'trigger-watch'
|
|
|
}]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: "markdown-toolbar-container",
|
|
|
children: [!hidetoolBar && icons.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: item.actionName ? /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, objectSpread2_default()(objectSpread2_default()({}, item), {}, {
|
|
|
onActionCallback: onActionCallback
|
|
|
})) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "v-line"
|
|
|
})
|
|
|
}, index);
|
|
|
}), showNullButton ? /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-edit insert-blank",
|
|
|
className: "btn-null",
|
|
|
title: "\u589E\u52A0\u586B\u7A7A",
|
|
|
actionName: "add-null-ch",
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"
|
|
|
})
|
|
|
})
|
|
|
}) : null, showNullProgramButton ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-edit insert-blank",
|
|
|
className: "btn-null",
|
|
|
title: "\u589E\u52A0\u586B\u7A7A",
|
|
|
actionName: "add-signal",
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-uniE900 insert-blank",
|
|
|
className: "btn-null",
|
|
|
title: "\u589E\u52A0\u586B\u7A7A",
|
|
|
actionName: "add-multiple",
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879"
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}) : null, insertTemp && /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-edit",
|
|
|
className: "btn-null",
|
|
|
title: "\u63D2\u5165\u6A21\u677F",
|
|
|
actionName: "inster-template-".concat(insertTemp),
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u63D2\u5165\u6A21\u677F"
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: "btn-full-screen",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "".concat(fullScreen ? 'icon-shrink' : 'icon-enlarge'),
|
|
|
title: fullScreen ? '关闭全屏' : '开启全屏',
|
|
|
actionName: "trigger-full-screen",
|
|
|
onActionCallback: onActionCallback
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/components/modal.tsx
|
|
|
var modal = __webpack_require__(83016);
|
|
|
// 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 + 5 modules
|
|
|
var input = __webpack_require__(1056);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/link/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var formItemLayout = {
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 20
|
|
|
}
|
|
|
};
|
|
|
/* harmony default export */ var markdown_editor_link = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
function onSubmit(values) {
|
|
|
callback(values);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, formItemLayout), {}, {
|
|
|
initialValues: {
|
|
|
link: 'http://',
|
|
|
title: ''
|
|
|
},
|
|
|
className: "link-panel",
|
|
|
onFinish: onSubmit,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u94FE\u63A5\u5730\u5740",
|
|
|
name: "link",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入链接地址'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u94FE\u63A5\u6807\u9898",
|
|
|
name: "title",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入链接标题'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container flex-end",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "ghost",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
}));
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/code-block/index.tsx
|
|
|
var code_block = __webpack_require__(79669);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/upload-image/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/tasks/util.js
|
|
|
var util = __webpack_require__(80330);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/upload-image/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var useForm = es_form/* default */.Z.useForm;
|
|
|
var style = {
|
|
|
width: 280,
|
|
|
marginRight: 10
|
|
|
};
|
|
|
var upload_image_formItemLayout = {
|
|
|
labelCol: {
|
|
|
span: 5
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 19
|
|
|
}
|
|
|
};
|
|
|
/* harmony default export */ var upload_image = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
var _useForm = useForm(),
|
|
|
_useForm2 = slicedToArray_default()(_useForm, 1),
|
|
|
form = _useForm2[0];
|
|
|
var nameRef = (0,_react_17_0_2_react.useRef)();
|
|
|
function onSubmit(values) {
|
|
|
callback(objectSpread2_default()(objectSpread2_default()({}, values), {}, {
|
|
|
name: nameRef.current
|
|
|
}));
|
|
|
}
|
|
|
function onAddUrl(data, file) {
|
|
|
if (data.status === -1) {
|
|
|
message/* default */.ZP.error(data.message);
|
|
|
return;
|
|
|
}
|
|
|
form.setFieldsValue({
|
|
|
src: "/api/attachments/".concat(data.id),
|
|
|
type: file.type
|
|
|
});
|
|
|
}
|
|
|
function onFileChange(e) {
|
|
|
var file = e.target.files[0];
|
|
|
nameRef.current = file.name;
|
|
|
uploadImage(file, onAddUrl);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
form: form
|
|
|
}, upload_image_formItemLayout), {}, {
|
|
|
className: "upload-image-panel",
|
|
|
onFinish: onSubmit,
|
|
|
style: {
|
|
|
width: 470,
|
|
|
overflow: "hidden"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u56FE\u7247\u5730\u5740",
|
|
|
required: true,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
noStyle: true,
|
|
|
name: "src",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入文件地址'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: style
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton, {
|
|
|
onFileChange: onFileChange
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u56FE\u7247\u63CF\u8FF0",
|
|
|
name: "alt"
|
|
|
// rules={[{ required: true, message: '请输入图片描述' }]}
|
|
|
,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: {
|
|
|
width: 264
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
style: {
|
|
|
textAlign: "right"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "default",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
}));
|
|
|
});
|
|
|
function UploadButton(_ref2) {
|
|
|
var onFileChange = _ref2.onFileChange;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("label", {
|
|
|
className: "upload-button",
|
|
|
style: {
|
|
|
cursor: "pointer"
|
|
|
},
|
|
|
children: ["\u672C\u5730\u4E0A\u4F20", /*#__PURE__*/(0,jsx_runtime.jsx)("input", {
|
|
|
type: "file",
|
|
|
onChange: onFileChange
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
function uploadImage(file, callback) {
|
|
|
if (!file) {
|
|
|
throw new String('没有文件');
|
|
|
return;
|
|
|
}
|
|
|
var formData = new FormData();
|
|
|
formData.append('editormd-image-file', file);
|
|
|
formData.append('file_param_name', 'editormd-image-file');
|
|
|
formData.append('byxhr', 'true');
|
|
|
var xhr = new window.XMLHttpRequest();
|
|
|
xhr.withCredentials = true;
|
|
|
xhr.addEventListener('load', function (response) {
|
|
|
callback(JSON.parse(response.target.responseText), file);
|
|
|
}, false);
|
|
|
xhr.addEventListener('error', function (error) {
|
|
|
console.error(error);
|
|
|
}, false);
|
|
|
xhr.open('POST', "".concat(util/* apiPref */.KI, "/api/attachments.json"));
|
|
|
xhr.send(formData);
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
|
var es_radio = __webpack_require__(5112);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
|
var input_number = __webpack_require__(85731);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/add-table-panel/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RadioGroup = es_radio/* default.Group */.ZP.Group;
|
|
|
var add_table_panel_style = {
|
|
|
margin: '0 8px'
|
|
|
};
|
|
|
/* harmony default export */ var add_table_panel = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
function onSubmit(values) {
|
|
|
callback(values);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
className: "add-table-panel",
|
|
|
initialValues: {
|
|
|
row: 3,
|
|
|
col: 2,
|
|
|
align: 'default'
|
|
|
},
|
|
|
onFinish: onSubmit,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container",
|
|
|
style: {
|
|
|
alignItems: "baseline"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u5355\u5143\u683C\u6570\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u884C\u6570"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "row",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入行数'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u5217\u6570"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "col",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入列数'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container",
|
|
|
style: {
|
|
|
marginTop: 12,
|
|
|
alignItems: "baseline"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u5BF9\u9F50\u65B9\u5F0F\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "align",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(RadioGroup, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "default",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-justify"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "left",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-left"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "center",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-center"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "right",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-right"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container flex-end",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "ghost",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(78130);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(91506);
|
|
|
// EXTERNAL MODULE: ./node_modules/_uuid@8.3.0@uuid/dist/esm-browser/v4.js + 4 modules
|
|
|
var v4 = __webpack_require__(1012);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var es_modal = __webpack_require__(43418);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/constant.ts
|
|
|
var LINK = 'link';
|
|
|
var UPLOAD_IMAGE = 'upload-image';
|
|
|
var CODE_BLOCK = 'code-block';
|
|
|
var ADD_TABLE = 'add-table';
|
|
|
var HRLINE = '------------';
|
|
|
var ALIGNSIGN = {
|
|
|
"default": HRLINE,
|
|
|
left: ":".concat(HRLINE),
|
|
|
center: ":".concat(HRLINE, ":"),
|
|
|
right: "".concat(HRLINE, ":")
|
|
|
};
|
|
|
// EXTERNAL MODULE: ./src/components/useInterval.tsx
|
|
|
var useInterval = __webpack_require__(47169);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _DEFAULTKEYMAP, _TitleDesc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function noop() {}
|
|
|
var pending = 0;
|
|
|
var StorageTimeTicket = 10000;
|
|
|
var NULL_CH = '▁';
|
|
|
var ADD_MULTI = '@▁▁@';
|
|
|
var ADD_SINGLE = '@▁@';
|
|
|
var TEMP1 = '\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作'; //课程须知模板
|
|
|
function processSize(size) {
|
|
|
return !/^\d+$/.test(size) ? size : "".concat(size, "px");
|
|
|
}
|
|
|
var isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
|
var key = isMac ? 'Cmd' : 'Ctrl';
|
|
|
var officeSix = ["pptm", "pptx", "ppt", "pot", "pps", "ppa", "potx", "ppsx", "ppam", "pptm", "potm", "ppsm", "doc", "docx", "dot", "dotx", "docm", "dotm", "xls", "xlsx", "csv", "xlt", "xla", "xltx", "xlsm", "xltm", "xlam", "xlsb"];
|
|
|
var DEFAULTKEYMAP = (_DEFAULTKEYMAP = {}, defineProperty_default()(_DEFAULTKEYMAP, key + '-B', 'bold'), defineProperty_default()(_DEFAULTKEYMAP, key + '-I', 'italic'), _DEFAULTKEYMAP);
|
|
|
var TitleDesc = (_TitleDesc = {}, defineProperty_default()(_TitleDesc, LINK, '添加链接'), defineProperty_default()(_TitleDesc, CODE_BLOCK, '添加代码块'), defineProperty_default()(_TitleDesc, UPLOAD_IMAGE, '添加文件'), defineProperty_default()(_TitleDesc, ADD_TABLE, '添加表格'), _TitleDesc);
|
|
|
|
|
|
//https://codemirror.net/demo
|
|
|
//The height can be set through CSS (by giving the .CodeMirror class a height property), or by calling the cm's setSize method.
|
|
|
/* harmony default export */ var markdown_editor = (function (_ref) {
|
|
|
var _ref$defaultValue = _ref.defaultValue,
|
|
|
defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,
|
|
|
onChange = _ref.onChange,
|
|
|
_ref$width = _ref.width,
|
|
|
width = _ref$width === void 0 ? '100%' : _ref$width,
|
|
|
_ref$height = _ref.height,
|
|
|
height = _ref$height === void 0 ? 400 : _ref$height,
|
|
|
_ref$miniToolbar = _ref.miniToolbar,
|
|
|
miniToolbar = _ref$miniToolbar === void 0 ? false : _ref$miniToolbar,
|
|
|
_ref$isFocus = _ref.isFocus,
|
|
|
isFocus = _ref$isFocus === void 0 ? false : _ref$isFocus,
|
|
|
watch = _ref.watch,
|
|
|
insertTemp = _ref.insertTemp,
|
|
|
_ref$mode = _ref.mode,
|
|
|
mode = _ref$mode === void 0 ? "markdown" : _ref$mode,
|
|
|
_ref$id = _ref.id,
|
|
|
id = _ref$id === void 0 ? 'markdown-editor-id' : _ref$id,
|
|
|
_ref$showResizeBar = _ref.showResizeBar,
|
|
|
showResizeBar = _ref$showResizeBar === void 0 ? false : _ref$showResizeBar,
|
|
|
_ref$noStorage = _ref.noStorage,
|
|
|
noStorage = _ref$noStorage === void 0 ? false : _ref$noStorage,
|
|
|
_ref$showNullButton = _ref.showNullButton,
|
|
|
showNullButton = _ref$showNullButton === void 0 ? false : _ref$showNullButton,
|
|
|
_ref$showNullProgramB = _ref.showNullProgramButton,
|
|
|
showNullProgramButton = _ref$showNullProgramB === void 0 ? false : _ref$showNullProgramB,
|
|
|
_ref$hidetoolBar = _ref.hidetoolBar,
|
|
|
hidetoolBar = _ref$hidetoolBar === void 0 ? false : _ref$hidetoolBar,
|
|
|
_ref$fullScreen = _ref.fullScreen,
|
|
|
fullScreen = _ref$fullScreen === void 0 ? false : _ref$fullScreen,
|
|
|
onBlur = _ref.onBlur,
|
|
|
onCMBeforeChange = _ref.onCMBeforeChange,
|
|
|
onFullScreen = _ref.onFullScreen,
|
|
|
_ref$className = _ref.className,
|
|
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
|
_ref$disablePaste = _ref.disablePaste,
|
|
|
disablePaste = _ref$disablePaste === void 0 ? false : _ref$disablePaste,
|
|
|
_ref$disabled = _ref.disabled,
|
|
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
|
_ref$disabledFill = _ref.disabledFill,
|
|
|
disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
|
|
|
_ref$placeholder = _ref.placeholder,
|
|
|
placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
|
|
|
_ref$values = _ref.values,
|
|
|
values = _ref$values === void 0 ? '' : _ref$values;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(null),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
cm = _useState2[0],
|
|
|
setCm = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(defaultValue),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
value = _useState4[0],
|
|
|
setValue = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(watch),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
preview = _useState6[0],
|
|
|
setPreview = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(fullScreen),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
isFull = _useState8[0],
|
|
|
setIsFull = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
action = _useState10[0],
|
|
|
setAction = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
lastedUpdateTime = _useState12[0],
|
|
|
setLastedUpdateTime = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(height),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
h = _useState14[0],
|
|
|
setH = _useState14[1];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
tip = _useState16[0],
|
|
|
setTip = _useState16[1];
|
|
|
var uuidRef = (0,_react_17_0_2_react.useRef)((0,v4/* default */.Z)());
|
|
|
var openPhoneRef = (0,_react_17_0_2_react.useRef)(false);
|
|
|
var timer = (0,_react_17_0_2_react.useRef)();
|
|
|
var cmEl = (0,_react_17_0_2_react.useRef)();
|
|
|
var containerEl = (0,_react_17_0_2_react.useRef)();
|
|
|
var resizeBarEl = (0,_react_17_0_2_react.useRef)();
|
|
|
var previewEl = (0,_react_17_0_2_react.useRef)();
|
|
|
var checkFiles = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _res$attachments;
|
|
|
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/attachments/distinct_hash_val.json", {
|
|
|
method: "post",
|
|
|
body: {
|
|
|
hash_val: uuidRef.current
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (!!(res !== null && res !== void 0 && (_res$attachments = res.attachments) !== null && _res$attachments !== void 0 && _res$attachments.length)) {
|
|
|
console.log("cm:", cm, cmEl);
|
|
|
res.attachments.map(function (item) {
|
|
|
if (item.content_type.indexOf("image") > -1) {
|
|
|
cm.replaceSelection(".concat(item.content_type, ")"));
|
|
|
} else if (item.content_type.indexOf("video") > -1) {
|
|
|
cm.replaceSelection("<video width=\"100%\" controls src=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "\"></video>"));
|
|
|
} else if (item.content_type.indexOf("pdf") > -1) {
|
|
|
cm.replaceSelection("<a href=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(item.id, "?type=").concat(item.content_type, "&disposition=inline\" target=\"_blank\">").concat(item.name, "</a>"));
|
|
|
} else {
|
|
|
cm.replaceSelection("[".concat(item.name, "](").concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(item.id, "?type=").concat(item.content_type, ")"));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function checkFiles() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
|
|
|
// useEffect(() => {
|
|
|
// setValue(defaultValue)
|
|
|
// cm?.setValue(defaultValue)
|
|
|
// },[])
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var scrollTop = window.scrollY || window.pageYOffset;
|
|
|
setValue(values);
|
|
|
cm === null || cm === void 0 || cm.setValue(values);
|
|
|
window.scrollTo(0, scrollTop);
|
|
|
}, [values]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
onFullScreen === null || onFullScreen === void 0 || onFullScreen(isFull);
|
|
|
}, [isFull]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cmEl.current) {
|
|
|
var onPaste = function onPaste(_, e) {
|
|
|
if (disablePaste) {
|
|
|
e.preventDefault();
|
|
|
return;
|
|
|
}
|
|
|
var clipboardData = e.clipboardData;
|
|
|
if (clipboardData) {
|
|
|
var types = clipboardData.types.toString();
|
|
|
var items = clipboardData.items;
|
|
|
if (types === 'Files' || clipboardData.types.indexOf("Files") > -1) {
|
|
|
e.preventDefault();
|
|
|
if (mode == "stex") return;
|
|
|
try {
|
|
|
var _items$;
|
|
|
var item = items[1];
|
|
|
if (((_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.kind) === 'file') {
|
|
|
item = items[0];
|
|
|
}
|
|
|
var file = item.getAsFile();
|
|
|
var fileSix = file.name.split(".").pop();
|
|
|
// console.log("item:", item, file, item?.type?.match(/^video\//i))
|
|
|
uploadImage(file, function (data) {
|
|
|
if (data.id) {
|
|
|
var _file$type, _file$type2, _file$type3;
|
|
|
if ((file === null || file === void 0 || (_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.indexOf("image")) > -1) {
|
|
|
instance.replaceSelection(".concat(data.content_type, ")"));
|
|
|
} else if ((file === null || file === void 0 || (_file$type2 = file.type) === null || _file$type2 === void 0 ? void 0 : _file$type2.indexOf("video")) > -1) {
|
|
|
instance.replaceSelection("<video width=\"100%\" controls src=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "\"></video>"));
|
|
|
} else if ((file === null || file === void 0 || (_file$type3 = file.type) === null || _file$type3 === void 0 ? void 0 : _file$type3.indexOf("pdf")) > -1) {
|
|
|
instance.replaceSelection("<a href=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(file.type, "&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
|
|
|
} else if (officeSix.includes(fileSix)) {
|
|
|
instance.replaceSelection("<a href=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=office&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
|
|
|
} else {
|
|
|
instance.replaceSelection("[".concat(file.name, "](").concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(data.content_type, ")"));
|
|
|
}
|
|
|
} else {
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === 401) document.location.href = '/user/login';
|
|
|
}
|
|
|
});
|
|
|
} catch (e) {
|
|
|
message/* default */.ZP.warning("请使用chrome浏览器粘贴");
|
|
|
}
|
|
|
return true;
|
|
|
} else {
|
|
|
//toMarkdown ?
|
|
|
// let html = clipboardData.getData('text/html')
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
|
};
|
|
|
var instance = codemirror_default().fromTextArea(cmEl.current, {
|
|
|
mode: mode,
|
|
|
// inputStyle: 'contenteditable',
|
|
|
lineNumbers: miniToolbar ? false : true,
|
|
|
lineWrapping: true,
|
|
|
value: defaultValue,
|
|
|
autoCloseTags: showNullProgramButton ? false : true,
|
|
|
autoCloseBrackets: true
|
|
|
});
|
|
|
instance.on("keyup", function (cm, event) {
|
|
|
if (event.keyCode === 8) {
|
|
|
if (cm.getValue() == "") {
|
|
|
instance.setOption("placeholder", placeholder);
|
|
|
} else {
|
|
|
instance.setOption("placeholder", null);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
instance.on("keydown", function (cm, event) {
|
|
|
if (event.keyCode === 8) {
|
|
|
var pos = deleteAtSymbol(cm);
|
|
|
if (pos) {
|
|
|
event.preventDefault();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
isFocus && instance.focus();
|
|
|
instance.on('paste', onPaste);
|
|
|
instance.on('dragleave', function (data, e) {
|
|
|
containerEl.current.classList.remove("mouse-hover-md");
|
|
|
});
|
|
|
instance.on('dragover', function (data, e) {
|
|
|
containerEl.current.classList.add("mouse-hover-md");
|
|
|
});
|
|
|
instance.on('drop', function (data, e) {
|
|
|
containerEl.current.classList.add("mouse-hover-md");
|
|
|
// var file;
|
|
|
var files;
|
|
|
// Check if files were dropped
|
|
|
files = e.dataTransfer.files;
|
|
|
if (files.length > 0) {
|
|
|
e.preventDefault();
|
|
|
e.stopPropagation();
|
|
|
// file = files[0];
|
|
|
// alert('File: ' + file.name);
|
|
|
// return false;
|
|
|
var _loop = function _loop() {
|
|
|
var file = files[i];
|
|
|
var fileSix = file.name.split(".").pop();
|
|
|
uploadImage(file, function (data) {
|
|
|
if (data.id) {
|
|
|
var _file$type4, _file$type5, _file$type6;
|
|
|
if ((file === null || file === void 0 || (_file$type4 = file.type) === null || _file$type4 === void 0 ? void 0 : _file$type4.indexOf("image")) > -1) {
|
|
|
instance.replaceSelection(".concat(data.content_type, ")"));
|
|
|
} else if ((file === null || file === void 0 || (_file$type5 = file.type) === null || _file$type5 === void 0 ? void 0 : _file$type5.indexOf("video")) > -1) {
|
|
|
instance.replaceSelection("<video width=\"100%\" controls src=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "\"></video>"));
|
|
|
} else if ((file === null || file === void 0 || (_file$type6 = file.type) === null || _file$type6 === void 0 ? void 0 : _file$type6.indexOf("pdf")) > -1) {
|
|
|
instance.replaceSelection("<a href=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(file.type, "&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
|
|
|
} else if (officeSix.includes(fileSix)) {
|
|
|
instance.replaceSelection("<a href=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=office&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
|
|
|
} else {
|
|
|
instance.replaceSelection("[".concat(file.name, "](").concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(data.content_type, ")"));
|
|
|
}
|
|
|
} else {
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === 401) document.location.href = '/user/login';
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
for (var i = 0; i < files.length; i++) {
|
|
|
_loop();
|
|
|
}
|
|
|
// files.map((file:any) => {
|
|
|
|
|
|
// })
|
|
|
}
|
|
|
});
|
|
|
|
|
|
if (disabled) {
|
|
|
instance.on("beforeChange", function (instances, change) {
|
|
|
if (change.origin === "paste" || change.origin === "+input") {
|
|
|
change.cancel();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
setCm(instance);
|
|
|
return function () {
|
|
|
instance.off('paste', onPaste);
|
|
|
};
|
|
|
}
|
|
|
}, []);
|
|
|
var resizeEditorBodyHeight = (0,_react_17_0_2_react.useCallback)(function () {
|
|
|
if (containerEl.current) {
|
|
|
try {
|
|
|
// let toolH = containerEl.current.getElementsByClassName('markdown-toolbar-container')[0].offsetHeight
|
|
|
// let mdBody = containerEl.current.getElementsByClassName('markdown-editor-body')[0]
|
|
|
// if (!isFull) {
|
|
|
// mdBody.style.height = `${h - toolH}px`
|
|
|
// } else {
|
|
|
// mdBody.style.height = `calc(100vh - ${toolH}px)`
|
|
|
// }
|
|
|
} catch (error) {
|
|
|
console.log(error, '---- to set md editor body height');
|
|
|
}
|
|
|
}
|
|
|
}, [h, containerEl, isFull]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
function onLayout() {
|
|
|
var ro = new ResizeObserver_es/* default */.Z(function (entries) {
|
|
|
var _iterator = createForOfIteratorHelper_default()(entries),
|
|
|
_step;
|
|
|
try {
|
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
|
var entry = _step.value;
|
|
|
if (entry.target.offsetHeight > 0 || entry.target.offsetWidth > 0) {
|
|
|
resizeEditorBodyHeight();
|
|
|
cm.setSize('100%', '100%');
|
|
|
cm.refresh();
|
|
|
}
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator.e(err);
|
|
|
} finally {
|
|
|
_iterator.f();
|
|
|
}
|
|
|
});
|
|
|
ro.observe(cmEl.current.parentElement);
|
|
|
return ro;
|
|
|
}
|
|
|
if (cm) {
|
|
|
var ro = onLayout();
|
|
|
return function () {
|
|
|
var _cmEl$current, _cmEl$current2;
|
|
|
if ((_cmEl$current = cmEl.current) !== null && _cmEl$current !== void 0 && _cmEl$current.parentElement) ro.unobserve((_cmEl$current2 = cmEl.current) === null || _cmEl$current2 === void 0 ? void 0 : _cmEl$current2.parentElement);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, resizeEditorBodyHeight]);
|
|
|
|
|
|
//keymap
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
var keymap = [];
|
|
|
var _loop2 = function _loop2() {
|
|
|
var _Object$entries$_i = slicedToArray_default()(_Object$entries[_i], 2),
|
|
|
k = _Object$entries$_i[0],
|
|
|
value = _Object$entries$_i[1];
|
|
|
var map = defineProperty_default()({}, k, function () {
|
|
|
onActionCallback(value);
|
|
|
});
|
|
|
keymap.push(map);
|
|
|
cm.addKeyMap(map);
|
|
|
};
|
|
|
for (var _i = 0, _Object$entries = Object.entries(DEFAULTKEYMAP); _i < _Object$entries.length; _i++) {
|
|
|
_loop2();
|
|
|
}
|
|
|
timer.current = setInterval(function () {
|
|
|
if (openPhoneRef.current) {
|
|
|
checkFiles();
|
|
|
}
|
|
|
}, 4000);
|
|
|
return function () {
|
|
|
clearInterval(timer.current);
|
|
|
for (var _i2 = 0, _keymap = keymap; _i2 < _keymap.length; _i2++) {
|
|
|
var m = _keymap[_i2];
|
|
|
cm.removeKeyMap(m);
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
}, [cm]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (fullScreen !== isFull) {
|
|
|
setIsFull(fullScreen);
|
|
|
}
|
|
|
}, [fullScreen]);
|
|
|
(0,useInterval/* default */.Z)(function () {
|
|
|
if (!noStorage && lastedUpdateTime > 0) {
|
|
|
var currentTime = new Date().getTime();
|
|
|
var lastedValue = window.sessionStorage.getItem(id);
|
|
|
if (currentTime >= lastedUpdateTime + StorageTimeTicket && (!lastedValue || lastedValue !== value)) {
|
|
|
window.sessionStorage.setItem(id, value);
|
|
|
setTip(true);
|
|
|
}
|
|
|
}
|
|
|
}, StorageTimeTicket);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
setPreview(watch);
|
|
|
}, [cm, watch]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
isFocus && cm.focus();
|
|
|
}
|
|
|
}, [cm, isFocus]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (preview && cm) {
|
|
|
var syncScroll = function syncScroll(e) {
|
|
|
var target = e.target;
|
|
|
if (previewEl.current) {
|
|
|
var ratio = target.scrollTop / target.scrollHeight;
|
|
|
previewEl.current.scrollTop = previewEl.current.scrollHeight * ratio;
|
|
|
}
|
|
|
};
|
|
|
var scrollEl = cm.getScrollerElement();
|
|
|
scrollEl.addEventListener('scroll', syncScroll);
|
|
|
return function () {
|
|
|
scrollEl.removeEventListener('scroll', syncScroll);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, preview]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm && onCMBeforeChange) {
|
|
|
var onChangeHandler = function onChangeHandler(cm, change) {
|
|
|
onCMBeforeChange(cm, change);
|
|
|
};
|
|
|
cm.on('beforeChange', onChangeHandler);
|
|
|
return function () {
|
|
|
cm.off('beforeChange', onChangeHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onCMBeforeChange]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm && onBlur) {
|
|
|
var onBlurHandler = function onBlurHandler() {
|
|
|
onBlur(cm.getValue());
|
|
|
};
|
|
|
cm.on('blur', onBlurHandler);
|
|
|
return function () {
|
|
|
cm.off('blur', onBlurHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onBlur]);
|
|
|
function deleteAtSymbol(cm, change) {
|
|
|
var doc = cm.getDoc();
|
|
|
var cursor = doc.getCursor();
|
|
|
var line = doc.getLine(cursor.line);
|
|
|
var ch = line.charAt(cursor.ch - 1);
|
|
|
var p1 = line.lastIndexOf("@▁@", cursor.ch);
|
|
|
var p2 = line.lastIndexOf("@▁▁@", cursor.ch);
|
|
|
var posStart = p1 > p2 ? p1 : p2;
|
|
|
var n = p1 > p2 ? 3 : 4;
|
|
|
if (ADD_MULTI.indexOf(ch) === -1) return null;
|
|
|
console.log("change1:", change, cm, line, cursor, posStart, p1, p2, ch);
|
|
|
if (posStart >= 0 && cursor.ch - posStart < 5) {
|
|
|
var posEnd = posStart + n;
|
|
|
doc.replaceRange("", {
|
|
|
line: cursor.line,
|
|
|
ch: posStart
|
|
|
}, {
|
|
|
line: cursor.line,
|
|
|
ch: posEnd
|
|
|
});
|
|
|
return {
|
|
|
line: cursor.line,
|
|
|
ch: posEnd
|
|
|
};
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
var onChangeHandler = function onChangeHandler(cm, change) {
|
|
|
var content = cm.getValue();
|
|
|
setValue(content);
|
|
|
setLastedUpdateTime(new Date().getTime());
|
|
|
cm.getScrollerElement().dispatchEvent(new CustomEvent('scroll'));
|
|
|
if (onChange) {
|
|
|
if (showNullProgramButton) {
|
|
|
onChange(content, formatProgramFill(content));
|
|
|
} else {
|
|
|
onChange(content);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
cm.on('change', onChangeHandler);
|
|
|
return function () {
|
|
|
cm.off('change', onChangeHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onChange]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
// isFocus && cm.focus()
|
|
|
if (defaultValue === null || defaultValue === undefined) {
|
|
|
cm.setValue('');
|
|
|
setValue('');
|
|
|
} else {
|
|
|
var scrollTop = window.scrollY || window.pageYOffset;
|
|
|
if (defaultValue !== cm.getValue()) {
|
|
|
cm.setValue(defaultValue);
|
|
|
setValue(defaultValue);
|
|
|
cm.setCursor(disabled ? 1 : cm.lineCount(), 0);
|
|
|
window.scrollTo(0, scrollTop);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, [cm, defaultValue]);
|
|
|
var onActionCallback = (0,_react_17_0_2_react.useCallback)(function (actionName) {
|
|
|
var cursor = cm.getCursor();
|
|
|
var selection = cm.getSelection();
|
|
|
var selectionText = selection.split('\n');
|
|
|
switch (actionName) {
|
|
|
case 'bold':
|
|
|
cm.replaceSelection('**' + selection + '**');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 2);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'italic':
|
|
|
cm.replaceSelection('*' + selection + '*');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 1);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'code':
|
|
|
cm.replaceSelection('`' + selection + '`');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 1);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'inline-latex':
|
|
|
cm.replaceSelection('`$$' + selection + '$$`');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 3);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'latex':
|
|
|
cm.replaceSelection("```latex\n" + selection + "\n```");
|
|
|
cm.setCursor(cursor.line + 1, selection.length + 1);
|
|
|
return cm.focus();
|
|
|
case 'line-break':
|
|
|
cm.replaceSelection('<br/>\n');
|
|
|
return cm.focus();
|
|
|
case 'list-ul':
|
|
|
if (selection === '') {
|
|
|
cm.replaceSelection('- ' + selection);
|
|
|
} else {
|
|
|
cm.replaceSelection(selectionText.map(function (item) {
|
|
|
return item === '' ? '' : "- ".concat(item);
|
|
|
}).join('\n'));
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'list-ol':
|
|
|
if (selection === '') {
|
|
|
cm.replaceSelection('1. ' + selection);
|
|
|
} else {
|
|
|
cm.replaceSelection(selectionText.map(function (item, index) {
|
|
|
return item === '' ? '' : "".concat(index + 1, ". ").concat(item);
|
|
|
}).join('\n'));
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'add-null-ch':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(NULL_CH);
|
|
|
return cm.focus();
|
|
|
case 'add-signal':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(ADD_SINGLE);
|
|
|
return cm.focus();
|
|
|
case 'add-multiple':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(ADD_MULTI);
|
|
|
return cm.focus();
|
|
|
case 'inster-template-1':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(TEMP1);
|
|
|
return cm.focus();
|
|
|
case 'eraser':
|
|
|
cm.setValue('');
|
|
|
return cm.focus();
|
|
|
case 'trigger-watch':
|
|
|
setPreview(!preview);
|
|
|
return cm.focus();
|
|
|
case 'trigger-full-screen':
|
|
|
setIsFull(!isFull);
|
|
|
return cm.focus();
|
|
|
case LINK:
|
|
|
setAction(LINK);
|
|
|
return;
|
|
|
case CODE_BLOCK:
|
|
|
setAction(CODE_BLOCK);
|
|
|
return;
|
|
|
case UPLOAD_IMAGE:
|
|
|
setAction(UPLOAD_IMAGE);
|
|
|
return;
|
|
|
case ADD_TABLE:
|
|
|
setAction(ADD_TABLE);
|
|
|
return;
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}, [cm, preview, isFull]);
|
|
|
var ExecutePluginAction = (0,_react_17_0_2_react.useCallback)(function (values) {
|
|
|
setAction('');
|
|
|
switch (action) {
|
|
|
case LINK:
|
|
|
var title = values.title,
|
|
|
link = values.link;
|
|
|
cm.replaceSelection("[".concat(title, "](").concat(link, ")"));
|
|
|
return cm.focus();
|
|
|
case CODE_BLOCK:
|
|
|
var language = values.language,
|
|
|
content = values.content;
|
|
|
cm.replaceSelection(['```' + language, content, '```'].join('\n'));
|
|
|
return cm.focus();
|
|
|
case UPLOAD_IMAGE:
|
|
|
var src = values.src,
|
|
|
alt = values.alt;
|
|
|
if (alt) {
|
|
|
cm.replaceSelection(".concat(src, " \"").concat(alt, "\" )"));
|
|
|
} else {
|
|
|
cm.replaceSelection(""));
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case ADD_TABLE:
|
|
|
var row = values.row,
|
|
|
col = values.col,
|
|
|
align = values.align;
|
|
|
var table = '\n';
|
|
|
for (var r = 0; r < row; r++) {
|
|
|
var rows = [];
|
|
|
var heads = [];
|
|
|
for (var c = 0; c < col; c++) {
|
|
|
if (r === 1) {
|
|
|
heads.push(ALIGNSIGN[align]);
|
|
|
}
|
|
|
rows.push(' ');
|
|
|
}
|
|
|
if (r === 1) {
|
|
|
table += "| ".concat(heads.join(' | '), " |\n");
|
|
|
}
|
|
|
table += "| ".concat(rows.join(col === 1 ? '' : ' | '), " |\n");
|
|
|
}
|
|
|
cm.replaceSelection(table + '\n');
|
|
|
return cm.focus();
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}, [cm, action]);
|
|
|
var PluginEl = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
switch (action) {
|
|
|
case LINK:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor_link, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
case CODE_BLOCK:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(code_block/* default */.Z, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
case UPLOAD_IMAGE:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(upload_image, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
case ADD_TABLE:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(add_table_panel, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
default:
|
|
|
return null;
|
|
|
}
|
|
|
}, [action]);
|
|
|
function onCancel() {
|
|
|
setAction('');
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (resizeBarEl.current) {
|
|
|
var onMouseDown = function onMouseDown(e) {
|
|
|
dragging = true;
|
|
|
startY = e.pageY;
|
|
|
};
|
|
|
var onMouseUp = function onMouseUp() {
|
|
|
dragging = false;
|
|
|
};
|
|
|
var onMouseMove = function onMouseMove(e) {
|
|
|
if (dragging) {
|
|
|
var delta = e.pageY - startY;
|
|
|
if (delta < 0) {
|
|
|
delta = 0;
|
|
|
}
|
|
|
if (delta > 300) {
|
|
|
delta = 300;
|
|
|
}
|
|
|
var resizeH = height + delta + 'px';
|
|
|
setH(resizeH);
|
|
|
}
|
|
|
};
|
|
|
var resizeBar = resizeBarEl.current;
|
|
|
var dragging = false;
|
|
|
var startY = 0;
|
|
|
resizeBar.addEventListener('mousedown', onMouseDown);
|
|
|
document.addEventListener('mousemove', onMouseMove);
|
|
|
document.addEventListener('mouseup', onMouseUp);
|
|
|
return function () {
|
|
|
resizeBar.removeEventListener('mousedown', onMouseDown);
|
|
|
document.removeEventListener('mousemove', onMouseMove);
|
|
|
document.removeEventListener('mouseup', onMouseUp);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, resizeBarEl]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
setH(height);
|
|
|
}, [height]);
|
|
|
var fixedWidth = processSize(width);
|
|
|
var fixedHeight = processSize(h);
|
|
|
var style = {
|
|
|
width: fixedWidth,
|
|
|
height: fixedHeight
|
|
|
};
|
|
|
var saveTime = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
if (lastedUpdateTime) {
|
|
|
var d = new Date(lastedUpdateTime);
|
|
|
var _h = d.getHours();
|
|
|
var m = d.getMinutes();
|
|
|
var s = d.getSeconds();
|
|
|
_h = _h < 10 ? '0' + _h : _h;
|
|
|
m = m < 10 ? '0' + m : m;
|
|
|
s = s < 10 ? '0' + s : s;
|
|
|
return "".concat(_h, ":").concat(m, ":").concat(s);
|
|
|
}
|
|
|
return 0;
|
|
|
}, [lastedUpdateTime]);
|
|
|
var formatProgramFill = function formatProgramFill(str) {
|
|
|
var arr = [];
|
|
|
if (showNullProgramButton) {
|
|
|
var num = -1;
|
|
|
str = str.replace(/(@▁▁@|@▁@)/g, function (a, b, c) {
|
|
|
arr.push({
|
|
|
multiLine: !(a === ADD_SINGLE)
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
return arr;
|
|
|
};
|
|
|
function onCancelStorage() {
|
|
|
window.sessionStorage.removeItem(id);
|
|
|
setTip(false);
|
|
|
setLastedUpdateTime(0);
|
|
|
}
|
|
|
function onReset() {
|
|
|
setTip(false);
|
|
|
setLastedUpdateTime(0);
|
|
|
cm.setValue(window.sessionStorage.getItem(id));
|
|
|
}
|
|
|
function setValues(a, b) {
|
|
|
var content = cm.getValue();
|
|
|
content = content.replace(a, b);
|
|
|
setValue(content);
|
|
|
cm === null || cm === void 0 || cm.setValue(content);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "markdown-editor-wrapper",
|
|
|
ref: containerEl,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "markdown-editor-container ".concat(className, " ").concat(preview ? 'on-preview' : '', " ").concat(miniToolbar ? 'mini' : '', " ").concat(isFull ? 'full-screen' : ''),
|
|
|
style: style,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(toolbar, {
|
|
|
insertTemp: insertTemp,
|
|
|
watch: preview,
|
|
|
fullScreen: isFull,
|
|
|
showNullButton: showNullButton,
|
|
|
showNullProgramButton: showNullProgramButton,
|
|
|
onActionCallback: onActionCallback,
|
|
|
hidetoolBar: hidetoolBar,
|
|
|
uuid: uuidRef.current,
|
|
|
setOpenPhones: function setOpenPhones() {
|
|
|
openPhoneRef.current = true;
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "markdown-editor-body",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "codemirror-container",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("textarea", {
|
|
|
ref: cmEl,
|
|
|
placeholder: placeholder
|
|
|
})
|
|
|
}), preview ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
ref: previewEl,
|
|
|
className: "preview-container",
|
|
|
children: [mode === "stex" && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml_stex, {
|
|
|
value: value
|
|
|
}), mode !== "stex" && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
disabledFill: disabledFill,
|
|
|
showProgramFill: showNullProgramButton,
|
|
|
value: value
|
|
|
})]
|
|
|
}) : null]
|
|
|
})]
|
|
|
})
|
|
|
}), showResizeBar ? /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
ref: resizeBarEl,
|
|
|
className: "editor-resize"
|
|
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
children: TitleDesc[action] ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
title: TitleDesc[action],
|
|
|
open: true,
|
|
|
onCancel: onCancel,
|
|
|
footer: null,
|
|
|
className: "markdown-popup-form",
|
|
|
children: PluginEl
|
|
|
}) : null
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 83016:
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/components/modal.tsx ***!
|
|
|
\**********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ Dialog; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/classCallCheck.js */ 94312);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createClass.js */ 24127);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/inherits.js */ 93242);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createSuper.js */ 10564);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ 4676);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Dialog = /*#__PURE__*/function (_React$Component) {
|
|
|
_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default()(Dialog, _React$Component);
|
|
|
var _super = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default()(Dialog);
|
|
|
function Dialog(props) {
|
|
|
var _this;
|
|
|
_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default()(this, Dialog);
|
|
|
_this = _super.call(this, props);
|
|
|
var doc = window.document;
|
|
|
_this.node = doc.createElement('div');
|
|
|
doc.body.appendChild(_this.node);
|
|
|
return _this;
|
|
|
}
|
|
|
_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default()(Dialog, [{
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
var children = this.props.children;
|
|
|
return /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_5__.createPortal)(children, this.node);
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentWillUnmount",
|
|
|
value: function componentWillUnmount() {
|
|
|
window.document.body.removeChild(this.node);
|
|
|
}
|
|
|
}]);
|
|
|
return Dialog;
|
|
|
}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 47169:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/components/useInterval.tsx ***!
|
|
|
\****************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ useInterval; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
function useInterval(callback, delay) {
|
|
|
var savedCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
|
|
|
|
// 保存新回调
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
|
savedCallback.current = callback;
|
|
|
});
|
|
|
|
|
|
// 建立 interval
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
|
function tick() {
|
|
|
savedCallback.current();
|
|
|
}
|
|
|
if (delay !== null) {
|
|
|
var id = setInterval(tick, delay);
|
|
|
return function () {
|
|
|
return clearInterval(id);
|
|
|
};
|
|
|
}
|
|
|
}, [delay]);
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 87643:
|
|
|
/*!**********************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/index.tsx + 8 modules ***!
|
|
|
\**********************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"default": function() { return /* binding */ Comment; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(27161);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
|
var dayjs_min = __webpack_require__(9498);
|
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
// EXTERNAL MODULE: ./node_modules/_jszip@3.10.1@jszip/dist/jszip.min.js
|
|
|
var jszip_min = __webpack_require__(86129);
|
|
|
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(91506);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(45295);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var es_modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
|
var skeleton = __webpack_require__(59981);
|
|
|
// 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/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(1056);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(72315);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
|
|
|
var ArrowLeftOutlined = __webpack_require__(68742);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules
|
|
|
var SolutionOutlined = __webpack_require__(92245);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
|
var ExclamationCircleOutlined = __webpack_require__(80045);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules
|
|
|
var DeleteOutlined = __webpack_require__(47966);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(78130);
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(13186);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(22739);
|
|
|
// EXTERNAL MODULE: ./node_modules/_echarts-for-react@2.0.16@echarts-for-react/lib/index.js
|
|
|
var lib = __webpack_require__(42441);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Commentmodules = ({"flex_box_center":"flex_box_center___KJUhi","flex_space_between":"flex_space_between____N4uH","flex_box_vertical_center":"flex_box_vertical_center___yOdsz","flex_box_center_end":"flex_box_center_end___seJB9","flex_box_column":"flex_box_column___ihHC5","title":"title___JSmnB","export":"export___pgR1H","title1_right":"title1_right___MdWJo","userPic":"userPic___UeG3e","userInfo":"userInfo___TNu6l","listItem":"listItem___wdbM_","rightInfo":"rightInfo___Swqk5","shixunTitle":"shixunTitle___L2Tc4","shixunWrp":"shixunWrp___ZoaTc","footerBar":"footerBar___QW5rq","footerBarStatic":"footerBarStatic___CRq8b","exitComment":"exitComment___u4Rqt","nextComment":"nextComment___lvaID","modal":"modal___g3B3L"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/components/EchartStatic.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var itemStyle = {
|
|
|
normal: {
|
|
|
opacity: 0.8,
|
|
|
shadowBlur: 10,
|
|
|
shadowOffsetX: 0,
|
|
|
shadowOffsetY: 0,
|
|
|
shadowColor: 'rgba(0, 0, 0, 0)',
|
|
|
color: '#2e65ad'
|
|
|
}
|
|
|
};
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var _shixunWorkReport$ech, _shixunWorkReport$ech2, _shixunWorkReport$ech12, _shixunWorkReport$ech13, _shixunWorkReport$ech14;
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
// checkbox checked储存
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
selectArrs = _useState2[0],
|
|
|
setSelectArrs = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(searchParams.get("tabs") || 0),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
activeTabs = _useState4[0],
|
|
|
setActiveTabs = _useState4[1];
|
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
|
var indextab = ((_shixunWorkReport$ech = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech === void 0 ? void 0 : _shixunWorkReport$ech.efficiency_list.length) - parseInt((_shixunWorkReport$ech2 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech2 === void 0 ? void 0 : _shixunWorkReport$ech2.myself_eff[0]);
|
|
|
// console.log('-----indextab',indextab,shixunWorkReport.echart_data?.efficiency_list.length,parseInt(shixunWorkReport.echart_data?.myself_eff[0]),shixunWorkReport.echart_data?.efficiency_list.length-parseInt(shixunWorkReport.echart_data?.myself_eff[0]));
|
|
|
|
|
|
var getOption = function getOption() {
|
|
|
var _shixunWorkReport$ech4, _shixunWorkReport$ech5, _shixunWorkReport$ech6;
|
|
|
return {
|
|
|
title: {
|
|
|
text: '学习效率',
|
|
|
subtext: '学习效率=log(实训总得分/实训总耗时)'
|
|
|
},
|
|
|
backgroundColor: '#fff',
|
|
|
color: ['#dd4444', '#fec42c', '#80F1BE'],
|
|
|
grid: {
|
|
|
left: '3%',
|
|
|
right: '9%',
|
|
|
bottom: '3%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
tooltip: {
|
|
|
// trigger: 'axis',
|
|
|
showDelay: 0,
|
|
|
formatter: function formatter(params) {
|
|
|
if (params.name === shixunWorkReport.username) {
|
|
|
var _shixunWorkReport$ech3;
|
|
|
return "姓名:" + shixunWorkReport.username + "<br/>" + '学号: ' + shixunWorkReport.user_id + "<br/>" + '效率:' + ((_shixunWorkReport$ech3 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech3 === void 0 ? void 0 : _shixunWorkReport$ech3.myself_eff[1]);
|
|
|
} else {
|
|
|
return params.name + ":" + params.value + " ";
|
|
|
}
|
|
|
},
|
|
|
axisPointer: {
|
|
|
show: true,
|
|
|
type: 'cross',
|
|
|
lineStyle: {
|
|
|
type: 'dashed',
|
|
|
width: 1
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
xAxis: [{
|
|
|
type: 'value',
|
|
|
name: '学生位置',
|
|
|
// minInterval:1,
|
|
|
nameTextStyle: {
|
|
|
color: '#000',
|
|
|
fontSize: 12
|
|
|
},
|
|
|
scale: true,
|
|
|
axisLabel: {
|
|
|
formatter: ''
|
|
|
},
|
|
|
axisTick: {
|
|
|
show: false
|
|
|
},
|
|
|
splitLine: {
|
|
|
show: false
|
|
|
}
|
|
|
}],
|
|
|
yAxis: [{
|
|
|
type: "value",
|
|
|
name: " ",
|
|
|
nameGap: 20,
|
|
|
nameTextStyle: {
|
|
|
color: '#000',
|
|
|
fontSize: 12
|
|
|
},
|
|
|
scale: true,
|
|
|
axisLabel: {
|
|
|
formatter: '{value}'
|
|
|
},
|
|
|
splitLine: {
|
|
|
show: false
|
|
|
}
|
|
|
}],
|
|
|
series: [{
|
|
|
name: '',
|
|
|
type: 'scatter',
|
|
|
data: (_shixunWorkReport$ech4 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech4 === void 0 ? void 0 : _shixunWorkReport$ech4.efficiency_list,
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
color: '#2e65ad'
|
|
|
}
|
|
|
},
|
|
|
markArea: {
|
|
|
silent: true,
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
color: 'transparent',
|
|
|
borderWidth: 1,
|
|
|
borderType: 'dashed'
|
|
|
}
|
|
|
},
|
|
|
data: [[{
|
|
|
name: '学习效率分布区间',
|
|
|
xAxis: 'min',
|
|
|
yAxis: 'min'
|
|
|
}, {
|
|
|
xAxis: 'max',
|
|
|
yAxis: 'max'
|
|
|
}]]
|
|
|
},
|
|
|
markPoint: {
|
|
|
data: [{
|
|
|
name: shixunWorkReport.username,
|
|
|
xAxis: indextab,
|
|
|
yAxis: (_shixunWorkReport$ech5 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech5 === void 0 ? void 0 : _shixunWorkReport$ech5.myself_eff[1],
|
|
|
value: (_shixunWorkReport$ech6 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech6 === void 0 ? void 0 : _shixunWorkReport$ech6.myself_eff[1]
|
|
|
}],
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
color: '#c23531'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
markLine: {
|
|
|
lineStyle: {
|
|
|
normal: {
|
|
|
type: 'solid',
|
|
|
color: '#ff6800'
|
|
|
}
|
|
|
},
|
|
|
data: [{
|
|
|
type: 'average',
|
|
|
name: '中位值'
|
|
|
}]
|
|
|
}
|
|
|
}]
|
|
|
};
|
|
|
};
|
|
|
var getOption2 = function getOption2() {
|
|
|
var _shixunWorkReport$ech8, _shixunWorkReport$ech9, _shixunWorkReport$ech10, _shixunWorkReport$ech11;
|
|
|
return {
|
|
|
title: {
|
|
|
text: '能力值',
|
|
|
subtext: '能力值(实训获得经验值/实训评测次数)'
|
|
|
},
|
|
|
backgroundColor: '#fff',
|
|
|
color: ['#dd4444', '#fec42c', '#80F1BE'],
|
|
|
grid: {
|
|
|
x: '10%',
|
|
|
x2: 150,
|
|
|
y: '18%',
|
|
|
y2: '10%'
|
|
|
},
|
|
|
tooltip: {
|
|
|
padding: 10,
|
|
|
backgroundColor: '#222',
|
|
|
borderColor: '#777',
|
|
|
borderWidth: 1,
|
|
|
formatter: function formatter(obj) {
|
|
|
var value = obj.value;
|
|
|
if (obj.name === shixunWorkReport.username) {
|
|
|
var _shixunWorkReport$ech7;
|
|
|
return "姓名:" + shixunWorkReport.username + "<br/>" + '学号: ' + shixunWorkReport.user_id + "<br/>" + '得分:' + ((_shixunWorkReport$ech7 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech7 === void 0 ? void 0 : _shixunWorkReport$ech7.myself_object[1]);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'value',
|
|
|
name: 'log(实训的总时间)',
|
|
|
nameGap: 16,
|
|
|
nameTextStyle: {
|
|
|
color: '#000',
|
|
|
fontSize: 14
|
|
|
},
|
|
|
splitLine: {
|
|
|
show: false
|
|
|
},
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#000'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value',
|
|
|
name: " ",
|
|
|
nameLocation: 'end',
|
|
|
nameGap: 20,
|
|
|
nameTextStyle: {
|
|
|
color: '#000',
|
|
|
fontSize: 12
|
|
|
},
|
|
|
axisLine: {
|
|
|
lineStyle: {
|
|
|
color: '#000'
|
|
|
}
|
|
|
},
|
|
|
splitLine: {
|
|
|
show: false
|
|
|
}
|
|
|
},
|
|
|
series: [{
|
|
|
name: '能力',
|
|
|
type: 'scatter',
|
|
|
itemStyle: itemStyle,
|
|
|
data: (_shixunWorkReport$ech8 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech8 === void 0 ? void 0 : _shixunWorkReport$ech8.consume_list,
|
|
|
symbolSize: function symbolSize(value) {
|
|
|
return Math.round(value[2]);
|
|
|
},
|
|
|
markPoint: {
|
|
|
data: [{
|
|
|
name: shixunWorkReport.username,
|
|
|
xAxis: (_shixunWorkReport$ech9 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech9 === void 0 ? void 0 : _shixunWorkReport$ech9.myself_object[0],
|
|
|
yAxis: (_shixunWorkReport$ech10 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech10 === void 0 ? void 0 : _shixunWorkReport$ech10.myself_object[1],
|
|
|
value: (_shixunWorkReport$ech11 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech11 === void 0 ? void 0 : _shixunWorkReport$ech11.myself_object[1]
|
|
|
}],
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
color: '#c23531'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}]
|
|
|
};
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "ml60 pr30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "800px",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
style: {
|
|
|
width: 750,
|
|
|
height: 580
|
|
|
},
|
|
|
option: getOption()
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: Commentmodules.rightInfo,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u59D3\u540D"
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml30",
|
|
|
children: shixunWorkReport.username
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B66\u53F7"
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml30",
|
|
|
children: shixunWorkReport.student_id || '--'
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B66\u4E60\u6548\u7387"
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml30 c-orange",
|
|
|
children: (_shixunWorkReport$ech12 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech12 === void 0 ? void 0 : _shixunWorkReport$ech12.myself_eff[1]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5F53\u524D\u6392\u540D"
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml30 c-orange",
|
|
|
children: (_shixunWorkReport$ech13 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech13 === void 0 ? void 0 : _shixunWorkReport$ech13.myself_eff[0]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: ["1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "ml60 pr30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "800px",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
|
style: {
|
|
|
width: 750,
|
|
|
height: 580
|
|
|
},
|
|
|
option: getOption2()
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: Commentmodules.rightInfo,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u59D3\u540D"
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml30",
|
|
|
children: shixunWorkReport.username
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B66\u53F7"
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml30",
|
|
|
children: shixunWorkReport.student_id || '--'
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u80FD\u529B"
|
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml30 c-orange",
|
|
|
children: (_shixunWorkReport$ech14 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech14 === void 0 ? void 0 : _shixunWorkReport$ech14.myself_object[1]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: ["1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var EchartStatic = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
|
var shixunHomeworks = _ref2.shixunHomeworks,
|
|
|
loading = _ref2.loading,
|
|
|
globalSetting = _ref2.globalSetting;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(ShixunsListPage));
|
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
|
|
|
var monaco_editor = __webpack_require__(76329);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
|
var input_number = __webpack_require__(85731);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/components/ScoreInput.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var ScoreInput = (function (_ref) {
|
|
|
var defaultValue = _ref.defaultValue,
|
|
|
onBlur = _ref.onBlur,
|
|
|
max = _ref.max,
|
|
|
_ref$className = _ref.className,
|
|
|
className = _ref$className === void 0 ? 'game-score' : _ref$className;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(defaultValue),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
value = _useState2[0],
|
|
|
setValue = _useState2[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
setValue(defaultValue);
|
|
|
}, [defaultValue]);
|
|
|
function onChange(v) {
|
|
|
setValue(v);
|
|
|
}
|
|
|
function onBlurHandler() {
|
|
|
if (value !== defaultValue) {
|
|
|
onBlur(value > max ? max : value);
|
|
|
}
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
max: max,
|
|
|
min: 0,
|
|
|
className: className,
|
|
|
value: value,
|
|
|
onChange: onChange,
|
|
|
onBlur: onBlurHandler
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
|
|
|
var markdown_editor = __webpack_require__(83954);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/components/ShixunStaticItem.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var ShixunStaticItemmodules = ({"md":"md___TEmcT"});
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/components/ShixunStaticItem.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Option = es_select["default"].Option;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
selectedPath: action.payload
|
|
|
});
|
|
|
case Types.GET_PASSED_CONTENT:
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, state), {}, {
|
|
|
passedContent: action.payload
|
|
|
});
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}
|
|
|
/* harmony default export */ var ShixunStaticItem = (function (_ref) {
|
|
|
var _data$filter, _data$filter2;
|
|
|
var path = _ref.path,
|
|
|
game_id = _ref.game_id,
|
|
|
onPathChange = _ref.onPathChange,
|
|
|
autoHeight = _ref.autoHeight,
|
|
|
diff_code_count = _ref.diff_code_count,
|
|
|
data = _ref.data,
|
|
|
game_codes_cn = _ref.game_codes_cn;
|
|
|
var paths = path.split(';').filter(function (item) {
|
|
|
return !!item;
|
|
|
});
|
|
|
var _useReducer = (0,_react_17_0_2_react.useReducer)(reducer, {
|
|
|
selectedPath: paths[0],
|
|
|
passedContent: {
|
|
|
language: 'python',
|
|
|
content: ''
|
|
|
}
|
|
|
}),
|
|
|
_useReducer2 = slicedToArray_default()(_useReducer, 2),
|
|
|
state = _useReducer2[0],
|
|
|
dispatch = _useReducer2[1];
|
|
|
var selectedPath = state.selectedPath,
|
|
|
passedContent = state.passedContent;
|
|
|
function onChange(value) {
|
|
|
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])
|
|
|
|
|
|
var textJson = {
|
|
|
'最后通关代码': '通过了本题,在作业时间内最后一次提交的通关代码',
|
|
|
'最新代码': '未通过本题,展示最后提交评测的代码详情',
|
|
|
'截止后通关代码': '在作业时间结束后通关该题的代码详情'
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("h2", {
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [game_codes_cn, game_codes_cn && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml5 font12 c-grey-999",
|
|
|
children: textJson[game_codes_cn]
|
|
|
})]
|
|
|
}), diff_code_count && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
marginLeft: '50px'
|
|
|
},
|
|
|
children: ["\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ", diff_code_count]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
style: {
|
|
|
width: 200
|
|
|
},
|
|
|
value: selectedPath,
|
|
|
onChange: onChange,
|
|
|
children: [" ", paths.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item,
|
|
|
children: item
|
|
|
}, item);
|
|
|
}), " "]
|
|
|
})
|
|
|
}), " "]
|
|
|
}), (selectedPath === null || selectedPath === void 0 ? void 0 : selectedPath.split(".")[1]) === 'md' && /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
|
|
height: 300,
|
|
|
autoHeight: autoHeight
|
|
|
// defaultValue={passedContent.content}
|
|
|
,
|
|
|
defaultValue: (data === null || data === void 0 || (_data$filter = data.filter(function (item) {
|
|
|
return item.path === selectedPath;
|
|
|
})) === null || _data$filter === void 0 || (_data$filter = _data$filter[0]) === null || _data$filter === void 0 ? void 0 : _data$filter.content) || "",
|
|
|
className: ShixunStaticItemmodules.md
|
|
|
}), (selectedPath === null || selectedPath === void 0 ? void 0 : selectedPath.split(".")[1]) !== 'md' && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, {
|
|
|
height: 300,
|
|
|
language: passedContent.language,
|
|
|
value: (data === null || data === void 0 || (_data$filter2 = data.filter(function (item) {
|
|
|
return item.path === selectedPath;
|
|
|
})) === null || _data$filter2 === void 0 || (_data$filter2 = _data$filter2[0]) === null || _data$filter2 === void 0 ? void 0 : _data$filter2.content) || "",
|
|
|
autoHeight: autoHeight,
|
|
|
theme: "default",
|
|
|
options: options
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/service/classrooms.ts
|
|
|
var classrooms = __webpack_require__(28787);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/components/ShixunStatic.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunStatic_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
autoHeight = _ref.autoHeight,
|
|
|
classroomList = _ref.classroomList,
|
|
|
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 options = {
|
|
|
selectOnLineNumbers: true,
|
|
|
readOnly: true,
|
|
|
minimap: {
|
|
|
enabled: false
|
|
|
},
|
|
|
scrollBeyondLastLine: false
|
|
|
};
|
|
|
var columns = [{
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'position',
|
|
|
width: "100px"
|
|
|
}, {
|
|
|
title: '详细信息',
|
|
|
dataIndex: 'output_detail'
|
|
|
}, {
|
|
|
title: '评测耗时(S)',
|
|
|
dataIndex: 'ts_time',
|
|
|
width: "130px"
|
|
|
}, {
|
|
|
title: '内存消耗(MB)',
|
|
|
width: "150px",
|
|
|
dataIndex: 'ts_mem'
|
|
|
}, {
|
|
|
title: '评测时间',
|
|
|
width: "170px",
|
|
|
dataIndex: 'created_at',
|
|
|
render: function render(text) {
|
|
|
return dayjs_min_default()(text).format("YYYY-MM-DD HH:mm");
|
|
|
}
|
|
|
}, {
|
|
|
title: '操作',
|
|
|
width: "80px",
|
|
|
dataIndex: 'query_index',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue current",
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _record$path;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,classrooms/* getCommitIdContent */.Lk)(record.game_identifier, {
|
|
|
path: (_record$path = record.path) === null || _record$path === void 0 || (_record$path = _record$path.replace(/\;/g, ";")) === null || _record$path === void 0 ? void 0 : _record$path.split(";")[0],
|
|
|
query_index: record.query_index
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
es_modal/* default */.Z.info({
|
|
|
title: "代码内容",
|
|
|
width: 900,
|
|
|
centered: true,
|
|
|
icon: null,
|
|
|
okText: "关闭",
|
|
|
className: "".concat(Commentmodules.lookCode, " custom-modal-divider"),
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, {
|
|
|
height: 500,
|
|
|
autoHeight: autoHeight,
|
|
|
language: "python",
|
|
|
theme: "default",
|
|
|
value: decodeURIComponent(escape(window.atob((res === null || res === void 0 ? void 0 : res.content) || ""))),
|
|
|
options: options
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
children: record.query_index ? "查看代码" : ""
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
function onChangeScore(_x, _x2) {
|
|
|
return _onChangeScore.apply(this, arguments);
|
|
|
}
|
|
|
function _onChangeScore() {
|
|
|
_onChangeScore = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(index, value) {
|
|
|
var challenge_id, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
challenge_id = stage_list[index].challenge_id;
|
|
|
_context2.next = 3;
|
|
|
return dispatch({
|
|
|
type: "shixunHomeworks/changeScore",
|
|
|
payload: {
|
|
|
categoryId: params.homeworkId,
|
|
|
"type": "report",
|
|
|
"score": value,
|
|
|
challenge_id: challenge_id
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context2.sent;
|
|
|
_context2.next = 6;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
case 6:
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success("操作成功");
|
|
|
}
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return _onChangeScore.apply(this, arguments);
|
|
|
}
|
|
|
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
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// const datas = arrTrans(5, shixunWorkReport.shixun_detail)
|
|
|
var datas = shixunWorkReport.shixun_detail;
|
|
|
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) {
|
|
|
var _val$outputs;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Commentmodules.shixunTitle, " mt10"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fa fa-code "
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("strong", {
|
|
|
className: "c-black",
|
|
|
children: ["\u7B2C", key + 1, "\u5173 ", /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
className: "c-black",
|
|
|
target: "_blank",
|
|
|
to: "/tasks/".concat(val.game_identifier),
|
|
|
children: val.subject
|
|
|
})]
|
|
|
})]
|
|
|
}), hasPower ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u8C03\u5206\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(ScoreInput, {
|
|
|
className: "game-score",
|
|
|
max: stage_list[key].game_score_full,
|
|
|
defaultValue: stage_list[key].game_score,
|
|
|
onBlur: function onBlur(value) {
|
|
|
var _classroomList$Assist;
|
|
|
if ((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.practice) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise)) {
|
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return;
|
|
|
}
|
|
|
onChangeScore(key, value);
|
|
|
}
|
|
|
})]
|
|
|
}) : null]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "font16 mt10",
|
|
|
children: [val.st === 0 && (val.path ? typeof (val === null || val === void 0 ? void 0 : val.game_codes_cn) === 'string' ? /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: Commentmodules.shixunWrp,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ShixunStaticItem, {
|
|
|
game_codes_cn: val === null || val === void 0 ? void 0 : val.game_codes_cn,
|
|
|
autoHeight: autoHeight,
|
|
|
path: val.path,
|
|
|
game_id: val.id,
|
|
|
data: val.game_codes,
|
|
|
diff_code_count: val.diff_code_count,
|
|
|
onPathChange: onPathChange
|
|
|
})
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "font14",
|
|
|
style: {
|
|
|
border: '1px solid #d9d9d9',
|
|
|
padding: '6px 10px'
|
|
|
},
|
|
|
children: " \u63D0\u793A\uFF1A\u7EAF\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u7684\u5B9E\u8BAD\u4E0D\u5C55\u793A\u901A\u5173\u4EE3\u7801\uFF0C\u5982\u9700\u67E5\u770B\u5B66\u751F\u4EE3\u7801\u8BF7\u524D\u5F80\u4F5C\u4E1A\u5217\u8868\u5BFC\u51FA\u5B9E\u9A8C\u6587\u4EF6\u3002"
|
|
|
}) : "目前图形化、命令行、Vscode编辑器、选择题模式的实验,暂时无法使用此功能"), val.st === 1 && (val.complete_status === 0 ? "本关暂未通过,无通关代码" : "目前图形化、命令行、Vscode编辑器、选择题模式的实验,暂时无法使用此功能")]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "mt10 font16",
|
|
|
children: (_val$outputs = val.outputs) !== null && _val$outputs !== void 0 && _val$outputs.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
columns: columns,
|
|
|
pagination: {
|
|
|
hideOnSinglePage: true
|
|
|
},
|
|
|
dataSource: val.outputs.map(function (item) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, val), item);
|
|
|
})
|
|
|
}) : "本关无评测记录"
|
|
|
})]
|
|
|
}, key)
|
|
|
}, key);
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ShixunStatic = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
var shixunHomeworks = _ref3.shixunHomeworks,
|
|
|
loading = _ref3.loading,
|
|
|
globalSetting = _ref3.globalSetting,
|
|
|
classroomList = _ref3.classroomList;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(ShixunStatic_ShixunsListPage));
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/components/ChangeCommit/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var ChangeCommitmodules = ({"greyText":"greyText___nOpNq","info":"info___nBB3c","label":"label___P6my8","blackContent":"blackContent___O4HnS","orangeContent":"orangeContent___JBF44","inputLabel":"inputLabel___B2GAs","tableTitle":"tableTitle___IqAxM","scoreTable":"scoreTable___RJvpU"});
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/components/ChangeCommit/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DelShixun = function DelShixun(_ref) {
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
dispatch = _ref.dispatch,
|
|
|
classroomList = _ref.classroomList;
|
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
showRequired = _useState2[0],
|
|
|
setShowRequired = _useState2[1];
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _shixunHomeworks$acti, _shixunHomeworks$acti2;
|
|
|
if (shixunHomeworks.actionTabs.key === '更改点评') form.setFieldsValue({
|
|
|
comment: (_shixunHomeworks$acti = shixunHomeworks.actionTabs.selectArrs) === 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 ? 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 formValue, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
formValue = form.getFieldsValue();
|
|
|
_context.next = 3;
|
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(params.homeworkId, "/shixun_work_comment.json"), {
|
|
|
method: 'post',
|
|
|
body: {
|
|
|
hidden_comment: formValue.hidden_comment,
|
|
|
comment: formValue.comment
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('评阅成功');
|
|
|
form.resetFields();
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function quickCommit() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var columns = [{
|
|
|
title: '关卡',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record, index) {
|
|
|
return index + 1;
|
|
|
}
|
|
|
}, {
|
|
|
title: '任务名称',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [text, record.complete_status === 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkShixunDetailStatus */.vA, {
|
|
|
status: record.complete_status
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '开始时间',
|
|
|
dataIndex: 'open_time'
|
|
|
}, {
|
|
|
title: '完成时间',
|
|
|
dataIndex: 'finished_time'
|
|
|
}, {
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'evaluate_count',
|
|
|
align: 'center'
|
|
|
}, {
|
|
|
title: '实训耗时',
|
|
|
dataIndex: 'time_consuming'
|
|
|
}, {
|
|
|
title: '是否查看答案',
|
|
|
dataIndex: 'view_answer',
|
|
|
align: 'center',
|
|
|
render: function render(text) {
|
|
|
return text ? '是' : '否';
|
|
|
}
|
|
|
}, {
|
|
|
title: '关卡得分',
|
|
|
dataIndex: 'game_score',
|
|
|
align: 'center',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: parseFloat(record.game_score_full) !== parseFloat(text) ? '#E30000' : '#53C41B'
|
|
|
},
|
|
|
children: text
|
|
|
}), "/", record.game_score_full]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '调分',
|
|
|
dataIndex: 'game_score',
|
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
|
render: function render(text, record) {
|
|
|
if ((0,authority/* isAdmin */.GJ)()) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(ScoreInput, {
|
|
|
max: record.game_score_full,
|
|
|
defaultValue: parseFloat(text),
|
|
|
onBlur: /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(value) {
|
|
|
var _classroomList$Assist;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
if (!((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.practice) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise))) {
|
|
|
_context2.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return _context2.abrupt("return");
|
|
|
case 3:
|
|
|
_context2.next = 5;
|
|
|
return dispatch({
|
|
|
type: "shixunHomeworks/changeScore",
|
|
|
payload: {
|
|
|
categoryId: params.homeworkId,
|
|
|
"type": "report",
|
|
|
"score": value,
|
|
|
challenge_id: record.challenge_id
|
|
|
}
|
|
|
});
|
|
|
case 5:
|
|
|
res = _context2.sent;
|
|
|
_context2.next = 8;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
case 8:
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success("操作成功");
|
|
|
}
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function (_x) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}()
|
|
|
});
|
|
|
} else {
|
|
|
return text;
|
|
|
}
|
|
|
}
|
|
|
}];
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
width: 1080,
|
|
|
title: "\u70B9\u8BC4\u4F5C\u4E1A",
|
|
|
open: shixunHomeworks.actionTabs.key === '更改点评' ? true : false,
|
|
|
okText: "\u786E\u5B9A",
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var _classroomList$Assist2;
|
|
|
var formValue;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
if (!((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist2 = classroomList.AssistantObject.practice) !== null && _classroomList$Assist2 !== void 0 && _classroomList$Assist2.can_appraise))) {
|
|
|
_context3.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return _context3.abrupt("return");
|
|
|
case 3:
|
|
|
formValue = form.getFieldsValue();
|
|
|
if (JSON.stringify(formValue) === '{}' || formValue.hidden_comment === '' && formValue.comment === '') {
|
|
|
setShowRequired(true);
|
|
|
} else {
|
|
|
quickCommit();
|
|
|
}
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
justify: "space-between",
|
|
|
className: ChangeCommitmodules.info,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u59D3\u540D"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: ChangeCommitmodules.blackContent,
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.username
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u5B66\u53F7"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: ChangeCommitmodules.blackContent,
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.student_id) || '--'
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u73ED\u7EA7"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: ChangeCommitmodules.blackContent,
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.group_name) || '--'
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u5173\u5361\u5F97\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: ChangeCommitmodules.orangeContent,
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.challenge_score) || '--'
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u6548\u7387\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: ChangeCommitmodules.orangeContent,
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.eff_score) || '--'
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u8FDF\u4EA4\u6263\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: ChangeCommitmodules.orangeContent,
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.late_penalty) || '--'
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(ChangeCommitmodules.label, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u6700\u7EC8\u6210\u7EE9"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: ChangeCommitmodules.orangeContent,
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.work_score) || '--'
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
form: form,
|
|
|
onChange: function onChange() {
|
|
|
if (showRequired) setShowRequired(false);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(ChangeCommitmodules.inputLabel, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "comment",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",
|
|
|
rows: 3
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(ChangeCommitmodules.inputLabel, " ").concat(ChangeCommitmodules.greyText),
|
|
|
children: "\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "hidden_comment",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",
|
|
|
rows: 3
|
|
|
})
|
|
|
})]
|
|
|
}), showRequired && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "c-red",
|
|
|
children: "\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: ChangeCommitmodules.tableTitle,
|
|
|
children: "\u5173\u5361\u6210\u7EE9"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
className: ChangeCommitmodules.scoreTable,
|
|
|
dataSource: shixunWorkReport.stage_list,
|
|
|
rowKey: "challenge_id",
|
|
|
pagination: false,
|
|
|
columns: columns,
|
|
|
scroll: {
|
|
|
x: 'max-content'
|
|
|
}
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ChangeCommit = ((0,_umi_production_exports.connect)(function (_ref5) {
|
|
|
var shixunHomeworks = _ref5.shixunHomeworks,
|
|
|
classroomList = _ref5.classroomList;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(DelShixun));
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/WorkList/components/Redo.tsx
|
|
|
var Redo = __webpack_require__(43419);
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
var RenderHtml = __webpack_require__(11436);
|
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
|
var service_shixunHomeworks = __webpack_require__(3688);
|
|
|
// EXTERNAL MODULE: ./node_modules/_html2pdf.js@0.10.1@html2pdf.js/dist/html2pdf.js
|
|
|
var html2pdf = __webpack_require__(44425);
|
|
|
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ShixunHomeworks/Comment/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunHomeworks", "classroomList", "globalSetting", "loading", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var _shixunWorkReport$shi2, _shixunWorkReport$tar2;
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
classroomList = _ref.classroomList,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
user = _ref.user,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()({}, (0,_umi_production_exports.useParams)())),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
var _params = (0,_umi_production_exports.useParams)();
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
// checkbox checked储存
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 0);
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({
|
|
|
last: false
|
|
|
}),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
nextComment = _useState6[0],
|
|
|
setNextComment = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)({
|
|
|
last: false
|
|
|
}),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
Previous = _useState8[0],
|
|
|
setPrevious = _useState8[1];
|
|
|
var reportElement = (0,_react_17_0_2_react.useRef)();
|
|
|
var reportElementInfo = (0,_react_17_0_2_react.useRef)();
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
isExportLoading = _useState10[0],
|
|
|
setIsExportLoading = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
spinning = _useState12[0],
|
|
|
setSpinning = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
autoHeight = _useState14[0],
|
|
|
setAutoHeight = _useState14[1];
|
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
datatables = _useState16[0],
|
|
|
setdatatables = _useState16[1];
|
|
|
var hasPower = (0,authority/* isAdmin */.GJ)();
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(new (jszip_min_default())()),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
zip = _useState18[0],
|
|
|
setZip = _useState18[1];
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
num = _useState20[0],
|
|
|
setNum = _useState20[1];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
allStudentWorks = _useState22[0],
|
|
|
setAllStudentWorks = _useState22[1];
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
isshow = _useState24[0],
|
|
|
setIsshow = _useState24[1];
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
isshows = _useState26[0],
|
|
|
setIsshows = _useState26[1];
|
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
score = _useState28[0],
|
|
|
setscore = _useState28[1];
|
|
|
// 判断是否为老师
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
isTeacher = _useState30[0],
|
|
|
setisTeacher = _useState30[1];
|
|
|
// 如果不是老师就禁用输入框:
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
isDisabled = _useState32[0],
|
|
|
setisDisabled = _useState32[1];
|
|
|
var _useState33 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
|
last_score = _useState34[0],
|
|
|
setlast_score = _useState34[1];
|
|
|
// 获取用户信息:
|
|
|
var getUser = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
// const res = await getUserInfo()
|
|
|
// console.log("-----------===========================用户身份", res);
|
|
|
// 判断如果用户身份是老师或者管理员身份
|
|
|
if (user.userInfo.is_teacher || user.userInfo.admin) {
|
|
|
setisTeacher(true);
|
|
|
setisDisabled(false);
|
|
|
}
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getUser() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
getUser();
|
|
|
console.log("打印的------", shixunWorkReport);
|
|
|
// 在这里可以判断有没有查过重
|
|
|
|
|
|
setscore(shixunWorkReport.repeat_minus_score);
|
|
|
}, [shixunWorkReport, user]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
console.log("触发这", shixunWorkReport.work_score);
|
|
|
setlast_score(shixunWorkReport.work_score);
|
|
|
}, [shixunWorkReport.work_score, score]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: false
|
|
|
});
|
|
|
return function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: true
|
|
|
});
|
|
|
};
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (shixunWorkReport) {
|
|
|
var _shixunWorkReport$tar;
|
|
|
var items = [];
|
|
|
shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$tar = shixunWorkReport.target_test_sets) === null || _shixunWorkReport$tar === void 0 || _shixunWorkReport$tar.map(function (item, index) {
|
|
|
var _item$targets;
|
|
|
item === null || item === void 0 || (_item$targets = item.targets) === null || _item$targets === void 0 || _item$targets.map(function (ite, j) {
|
|
|
var _item$targets2;
|
|
|
ite.name = item === null || item === void 0 ? void 0 : item.name;
|
|
|
ite.total_target_score = item === null || item === void 0 ? void 0 : item.total_target_score;
|
|
|
ite.actual_target_score = item === null || item === void 0 ? void 0 : item.actual_target_score;
|
|
|
ite.rowSpan = j === 0 ? item === null || item === void 0 || (_item$targets2 = item.targets) === null || _item$targets2 === void 0 ? void 0 : _item$targets2.length : 0;
|
|
|
ite.order = index + 1;
|
|
|
items.push(ite);
|
|
|
});
|
|
|
});
|
|
|
setdatatables(items);
|
|
|
dispatch({
|
|
|
type: 'classroomList/getAssistantPermissions',
|
|
|
payload: {
|
|
|
course_id: params.coursesId
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// console.log('----',items);
|
|
|
|
|
|
// shixunWorkReport?.target_test_sets?.[0]?.targets?.map((item:any)=>{
|
|
|
// item.name=shixunWorkReport?.target_test_sets?.[0]?.name;
|
|
|
// item.total_target_score=shixunWorkReport?.target_test_sets?.[0]?.total_target_score;
|
|
|
// item.actual_target_score=shixunWorkReport?.target_test_sets?.[0]?.actual_target_score
|
|
|
// item.rowSpan=shixunWorkReport?.target_test_sets?.[0]?.targets?.length;
|
|
|
// })
|
|
|
}
|
|
|
}, [shixunWorkReport]);
|
|
|
|
|
|
// console.log('---',shixunWorkReport?.target_test_sets?.[0]?.targets);
|
|
|
|
|
|
(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 _callee14() {
|
|
|
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 _callee14$(_context16) {
|
|
|
while (1) switch (_context16.prev = _context16.next) {
|
|
|
case 0:
|
|
|
paylaod = JSON.parse(sessionStorage['all_student_works_params'] || '{}');
|
|
|
_context16.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getAllStudentWorks',
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), paylaod)
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context16.sent;
|
|
|
// setSpinning(false);
|
|
|
setAllStudentWorks(res['all_student_works']);
|
|
|
key = (_res$all_student_work = res['all_student_works']) === null || _res$all_student_work === void 0 ? void 0 : _res$all_student_work.map(function (item) {
|
|
|
return String(item.student_work_id);
|
|
|
}).indexOf(params.homeworkId);
|
|
|
if (key === ((_res$all_student_work2 = res['all_student_works']) === null || _res$all_student_work2 === void 0 ? void 0 : _res$all_student_work2.length) - 1) {
|
|
|
setNextComment({
|
|
|
last: true
|
|
|
});
|
|
|
} else {
|
|
|
setNextComment((_res$all_student_work3 = res['all_student_works']) === null || _res$all_student_work3 === void 0 ? void 0 : _res$all_student_work3[key + 1]);
|
|
|
}
|
|
|
if (key === 0) {
|
|
|
setPrevious({
|
|
|
last: true
|
|
|
});
|
|
|
} else {
|
|
|
setPrevious((_res$all_student_work4 = res['all_student_works']) === null || _res$all_student_work4 === void 0 ? void 0 : _res$all_student_work4[key - 1]);
|
|
|
}
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context16.stop();
|
|
|
}
|
|
|
}, _callee14);
|
|
|
}));
|
|
|
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 _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(type) {
|
|
|
var nums, modal, opt, next, _next, _shixunWorkReport$shi, pages, worker, folder, _loop, i, codeF;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
_next = function _next3() {
|
|
|
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
_context7.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: {
|
|
|
homeworkId: allStudentWorks[nums]['student_work_id']
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context7.sent;
|
|
|
scrollView();
|
|
|
nums++;
|
|
|
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var _res$shixun_detail;
|
|
|
var folders, pages, worker, _loop2, _i, codesF;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.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$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
_context5.next = 2;
|
|
|
return worker.set(opt).from(pages[_i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
if (!(_i < pages.length - 1)) {
|
|
|
_context4.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context4.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function (_x3) {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _loop2);
|
|
|
});
|
|
|
_i = 0;
|
|
|
case 6:
|
|
|
if (!(_i < pages.length)) {
|
|
|
_context6.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
return _context6.delegateYield(_loop2(_i), "t0", 8);
|
|
|
case 8:
|
|
|
_i++;
|
|
|
_context6.next = 6;
|
|
|
break;
|
|
|
case 11:
|
|
|
folders.file("".concat(allStudentWorks[nums - 1]['student_work_user_name']).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 _context6.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
})), 2200);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
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)) {
|
|
|
_context8.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$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
if (!(i < pages.length - 1)) {
|
|
|
_context2.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context2.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function (_x2) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _loop);
|
|
|
});
|
|
|
i = 0;
|
|
|
case 13:
|
|
|
if (!(i < pages.length)) {
|
|
|
_context8.next = 18;
|
|
|
break;
|
|
|
}
|
|
|
return _context8.delegateYield(_loop(i), "t0", 15);
|
|
|
case 15:
|
|
|
i++;
|
|
|
_context8.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 _context8.abrupt("return");
|
|
|
case 27:
|
|
|
next();
|
|
|
case 28:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function exportReport(_x) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var download = function download() {
|
|
|
zip.generateAsync({
|
|
|
type: "blob"
|
|
|
}).then(function (content) {
|
|
|
var link = document.createElement('a');
|
|
|
link.href = window.URL.createObjectURL(content);
|
|
|
link.download = 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 _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context9) {
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
case 0:
|
|
|
setSpinning(true);
|
|
|
_context9.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
case 3:
|
|
|
setSpinning(false);
|
|
|
if ((0,authority/* isAdmin */.GJ)()) getData();
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context9.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}));
|
|
|
return function initData() {
|
|
|
return _ref7.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var columns = [{
|
|
|
title: '关卡',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record, index) {
|
|
|
return index + 1;
|
|
|
}
|
|
|
}, {
|
|
|
title: '任务名称',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [text, record.complete_status === 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkShixunDetailStatus */.vA, {
|
|
|
status: record.complete_status
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '开启时间',
|
|
|
dataIndex: 'open_time'
|
|
|
}, {
|
|
|
title: '代码修改行数',
|
|
|
dataIndex: 'diff_code_count',
|
|
|
render: function render(text, record, index) {
|
|
|
return text || '- -';
|
|
|
}
|
|
|
}, {
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'evaluate_count'
|
|
|
}, {
|
|
|
title: '完成时间',
|
|
|
dataIndex: 'finished_time'
|
|
|
}, {
|
|
|
title: '实训耗时',
|
|
|
dataIndex: 'time_consuming'
|
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
|
}, {
|
|
|
title: '是否查看答案',
|
|
|
dataIndex: 'view_answer',
|
|
|
render: function render(text) {
|
|
|
return text ? '是' : '否';
|
|
|
}
|
|
|
}, {
|
|
|
title: '经验值',
|
|
|
dataIndex: 'experience',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: parseFloat(record.myself_experience) !== parseFloat(text) ? 'red' : 'green'
|
|
|
},
|
|
|
children: record.myself_experience
|
|
|
}), "/", text]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '关卡得分',
|
|
|
dataIndex: 'game_score',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: parseFloat(record.game_score_full) !== parseFloat(text) ? 'red' : 'green'
|
|
|
},
|
|
|
children: text
|
|
|
}), "/", record.game_score_full]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '调分',
|
|
|
dataIndex: 'game_score',
|
|
|
render: function render(text, record) {
|
|
|
if (hasPower) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(ScoreInput, {
|
|
|
max: record.game_score_full,
|
|
|
defaultValue: parseFloat(text),
|
|
|
onBlur: /*#__PURE__*/function () {
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(value) {
|
|
|
var _classroomList$Assist;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context10) {
|
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
|
case 0:
|
|
|
if (!((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.practice) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise))) {
|
|
|
_context10.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return _context10.abrupt("return");
|
|
|
case 3:
|
|
|
_context10.next = 5;
|
|
|
return dispatch({
|
|
|
type: "shixunHomeworks/changeScore",
|
|
|
payload: {
|
|
|
categoryId: params.homeworkId,
|
|
|
"type": "report",
|
|
|
"score": value,
|
|
|
challenge_id: record.challenge_id
|
|
|
}
|
|
|
});
|
|
|
case 5:
|
|
|
res = _context10.sent;
|
|
|
_context10.next = 8;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
case 8:
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success("操作成功");
|
|
|
}
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context10.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
}));
|
|
|
return function (_x4) {
|
|
|
return _ref8.apply(this, arguments);
|
|
|
};
|
|
|
}()
|
|
|
});
|
|
|
} else {
|
|
|
return text;
|
|
|
}
|
|
|
}
|
|
|
}];
|
|
|
var columns1 = [{
|
|
|
title: '关卡',
|
|
|
dataIndex: 'order',
|
|
|
key: 'order',
|
|
|
render: function render(text, item, index) {
|
|
|
return {
|
|
|
children: text,
|
|
|
props: {
|
|
|
rowSpan: item.rowSpan
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
}, {
|
|
|
title: '任务名称',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
render: function render(text, item, index) {
|
|
|
return {
|
|
|
children: text,
|
|
|
props: {
|
|
|
rowSpan: item.rowSpan
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
}, {
|
|
|
title: '指标名称',
|
|
|
dataIndex: 'target_name',
|
|
|
key: 'target_name'
|
|
|
}, {
|
|
|
title: '指标预期结果',
|
|
|
dataIndex: 'output',
|
|
|
key: 'output'
|
|
|
}, {
|
|
|
title: '指标实际结果',
|
|
|
dataIndex: 'actual_output',
|
|
|
key: 'actual_output'
|
|
|
}, {
|
|
|
title: '指标得分',
|
|
|
dataIndex: 'test_score',
|
|
|
key: 'test_score',
|
|
|
render: function render(text, item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: parseFloat(item.actual_test_score) !== parseFloat(text) ? 'red' : 'green'
|
|
|
},
|
|
|
children: item.actual_test_score
|
|
|
}), "/", text]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '指标总分',
|
|
|
render: function render(text, item, index) {
|
|
|
return {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: parseFloat(item.actual_target_score) !== parseFloat(text) ? 'red' : 'green'
|
|
|
},
|
|
|
children: item.actual_target_score
|
|
|
}), "/", text]
|
|
|
}),
|
|
|
props: {
|
|
|
rowSpan: item.rowSpan
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
dataIndex: 'total_target_score',
|
|
|
key: 'total_target_score'
|
|
|
}];
|
|
|
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, "/shixun_homework/").concat(params.categoryId, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.student_work_id, "/comment"));
|
|
|
} else {
|
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/shixun_homework/").concat(params.categoryId, "/").concat(Previous === null || Previous === void 0 ? void 0 : Previous.student_work_id, "/comment"));
|
|
|
}
|
|
|
}, 200);
|
|
|
};
|
|
|
|
|
|
// 老师编辑查重扣分执行的函数:
|
|
|
|
|
|
var changescore = function changescore(e) {
|
|
|
setscore("");
|
|
|
if (e.target.value) {
|
|
|
// console.log(e.target.value);
|
|
|
console.log("进来", shixunWorkReport);
|
|
|
// 重新编辑的分数不可大于设置的分数:
|
|
|
e.target.value = e.target.value > shixunWorkReport.repeat_setting_score ? shixunWorkReport.repeat_setting_score : e.target.value;
|
|
|
setscore(e.target.value);
|
|
|
}
|
|
|
};
|
|
|
// 输入框失焦后 触发更新分数的接口
|
|
|
var gochange = /*#__PURE__*/function () {
|
|
|
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context11) {
|
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
|
case 0:
|
|
|
_context11.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/student_works/".concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.work_id, "/update_repeat_score"), {
|
|
|
method: 'put',
|
|
|
body: {
|
|
|
score: score
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context11.sent;
|
|
|
_context11.next = 5;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
case 5:
|
|
|
// console.log("返回数据", res)
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.info("操作成功");
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context11.stop();
|
|
|
}
|
|
|
}, _callee9);
|
|
|
}));
|
|
|
return function gochange() {
|
|
|
return _ref9.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "bg-fafafa",
|
|
|
style: {
|
|
|
position: "sticky",
|
|
|
top: 0
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "edu-container mt10",
|
|
|
style: {
|
|
|
paddingBottom: 100
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
|
loading: spinning,
|
|
|
active: true,
|
|
|
avatar: {
|
|
|
size: 40
|
|
|
},
|
|
|
paragraph: {
|
|
|
rows: 5
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "edu-container",
|
|
|
children: [shixunWorkReport.course_id && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "animated fadeIn",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "",
|
|
|
children: 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.course_id, "/shixun_homework"),
|
|
|
children: shixunWorkReport.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.course_id, "/shixun_homework/").concat(!shixunWorkReport.category.main ? shixunWorkReport.category.category_id : ""),
|
|
|
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.course_id, "/shixun_homework/").concat(shixunWorkReport.homework_common_id, "/detail"),
|
|
|
children: "\u4F5C\u4E1A\u8BE6\u60C5"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
children: shixunWorkReport.username
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: [Commentmodules.title1, 'mt20'].join(' '),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(shixunWorkReport.course_id, "/shixun_homework/").concat(shixunWorkReport.homework_common_id, "/detail"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
|
|
|
className: "font16 c-black"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
className: "font20 ml5",
|
|
|
children: shixunWorkReport.shixun_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* StatusClassroomsTags */.VV, {
|
|
|
temporary: true,
|
|
|
status: shixunWorkReport.homework_status
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
className: Commentmodules.title1_right,
|
|
|
children: [shixunWorkReport.view_tpi && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-yijiandianping mr5"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
className: "c-black",
|
|
|
target: "_blank",
|
|
|
to: "/tasks/".concat(shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$shi2 = shixunWorkReport.shixun_detail) === null || _shixunWorkReport$shi2 === void 0 || (_shixunWorkReport$shi2 = _shixunWorkReport$shi2[0]) === null || _shixunWorkReport$shi2 === void 0 ? void 0 : _shixunWorkReport$shi2["game_identifier"]),
|
|
|
children: "\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD"
|
|
|
})]
|
|
|
}), (0,authority/* isAdmin */.GJ)() && shixunWorkReport.homework_end === false && !!shixunWorkReport.myshixun_id && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
className: "ml10",
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context12) {
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
case 0:
|
|
|
_context12.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: "打回重做",
|
|
|
selectArrs: {
|
|
|
myshixun_identifier: shixunWorkReport.myshixun_identifier
|
|
|
},
|
|
|
homework_common_id: _params.categoryId
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context12.stop();
|
|
|
}
|
|
|
}, _callee10);
|
|
|
})),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-dahuizhongzuo3x mr5"
|
|
|
}), "\u6253\u56DE\u91CD\u505A"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
className: "ml10",
|
|
|
onClick: function onClick() {
|
|
|
return exportReport('');
|
|
|
},
|
|
|
loading: isExportLoading,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-daochu mr5"
|
|
|
}), "\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"]
|
|
|
}), (0,authority/* isAdmin */.GJ)() && (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length) > 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
className: "ml10",
|
|
|
onClick: function onClick() {
|
|
|
return exportReport('all');
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-daochu mr5"
|
|
|
}), "\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"]
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "mt30 relative"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "edu-container bg-white",
|
|
|
ref: reportElement,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.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.has_shixun_work_comment ? "更改点评" : "点评作业"]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: 0
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "pl30 pr30",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
className: Commentmodules.userPic,
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(shixunWorkReport.image_url),
|
|
|
alt: shixunWorkReport.username
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16 ml40",
|
|
|
children: shixunWorkReport.username
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkShixunDetailStatus */.vA, {
|
|
|
status: shixunWorkReport.compelete_status
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: Commentmodules.userInfo,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5B66\u53F7\uFF1A", shixunWorkReport.student_id || '--']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5206\u73ED\uFF1A", shixunWorkReport.group_name || '--']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: shixunWorkReport.complete_count
|
|
|
}), "/", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: shixunWorkReport.challenges_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: shixunWorkReport.current_complete_count || '-'
|
|
|
}), "/", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: shixunWorkReport.challenges_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5B8C\u6210\u6548\u7387\uFF1A", shixunWorkReport && shixunWorkReport.efficiency === null ? '--' : shixunWorkReport && shixunWorkReport.efficiency]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A", shixunWorkReport && shixunWorkReport.max_efficiency === null ? '--' : shixunWorkReport && shixunWorkReport.max_efficiency]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__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: "\u901A\u5173\u65F6\u95F4"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-light-black mt20",
|
|
|
children: shixunWorkReport && shixunWorkReport.passed_time === null || shixunWorkReport && shixunWorkReport.passed_time === "--" ? '--' : dayjs_min_default()(shixunWorkReport && shixunWorkReport.passed_time).format('YYYY-MM-DD HH:mm')
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("strong", {
|
|
|
children: ["\u8BA1\u65F6\u89C4\u5219", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
e.preventDefault();
|
|
|
setIsshow(true);
|
|
|
},
|
|
|
style: {
|
|
|
marginLeft: 4,
|
|
|
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 ? void 0 : shixunWorkReport.human_training_time_rules
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("strong", {
|
|
|
children: ["\u5B9E\u8BAD\u603B\u8017\u65F6", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
e.preventDefault();
|
|
|
setIsshows(true);
|
|
|
},
|
|
|
style: {
|
|
|
marginLeft: 4,
|
|
|
color: '#145DFF',
|
|
|
fontSize: 16,
|
|
|
cursor: 'pointer'
|
|
|
},
|
|
|
className: "iconfont icon-tishixiaowenhao"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-light-black mt20",
|
|
|
children: shixunWorkReport.time_consuming
|
|
|
})]
|
|
|
}), /*#__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.evaluate_count
|
|
|
})]
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.eff_score_full) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5173\u5361\u5F97\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport.challenge_score
|
|
|
}), "/", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black",
|
|
|
children: shixunWorkReport.challenge_score_full
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u6548\u7387\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport.eff_score
|
|
|
}), "/", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black",
|
|
|
children: shixunWorkReport.eff_score_full
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.have_repeat) && (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.repeat_minus_score) !== 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
style: {
|
|
|
position: "relative"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: "flex",
|
|
|
justifyContent: "space-between"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u67E5\u91CD\u6263\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
// display: "flex",
|
|
|
// flexDirection: "column",
|
|
|
// justifyContent: "space-between",
|
|
|
position: "absolute",
|
|
|
fontSize: "10px",
|
|
|
color: "white",
|
|
|
// height: "43px",
|
|
|
left: "57px",
|
|
|
width: "46px",
|
|
|
bottom: "72px"
|
|
|
},
|
|
|
children: shixunWorkReport !== null && shixunWorkReport !== void 0 && shixunWorkReport.review_rate ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
background: "#0152d9",
|
|
|
borderRadius: "6px 6px 6px 0",
|
|
|
cursor: "pointer"
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
if (shixunWorkReport !== null && shixunWorkReport !== void 0 && shixunWorkReport.review_id && isTeacher) {
|
|
|
// console.log("存储的地址", window.location.pathname)
|
|
|
localStorage.setItem("studentDetial", window.location.pathname);
|
|
|
_umi_production_exports.history.push({
|
|
|
pathname: "/classrooms/:coursesId/shixun_homework/".concat(params.categoryId, "/review_detail/").concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.review_id)
|
|
|
});
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
|
children: [shixunWorkReport.review_rate.toFixed(1), "%"]
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
background: "#0152d9",
|
|
|
borderRadius: "6px 6px 6px 0"
|
|
|
},
|
|
|
children: "- -"
|
|
|
})
|
|
|
})]
|
|
|
}), isTeacher ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: {
|
|
|
width: "45px",
|
|
|
height: "22px"
|
|
|
},
|
|
|
value: score,
|
|
|
onChange: function onChange(e) {
|
|
|
changescore(e);
|
|
|
},
|
|
|
onBlur: gochange,
|
|
|
disabled: isDisabled
|
|
|
}), " / ", shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.repeat_setting_score]
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt20",
|
|
|
children: [shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.repeat_minus_score, " / ", shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.repeat_setting_score]
|
|
|
})]
|
|
|
}), console.log("sssssssssssssssssssssss", shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.have_repeat, shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.repeat_minus_score), (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.have_repeat) && (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.repeat_minus_score) === 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u67E5\u91CD\u6263\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: " - -"
|
|
|
})]
|
|
|
}), !(shixunWorkReport !== null && shixunWorkReport !== void 0 && shixunWorkReport.have_repeat) && /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u67E5\u91CD\u6263\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: " - -"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u8FDF\u4EA4\u6263\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: shixunWorkReport.late_penalty || '- -'
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u6700\u7EC8\u6210\u7EE9"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: last_score
|
|
|
}), "/", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black",
|
|
|
children: shixunWorkReport.all_work_score
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u603B\u8BC4"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport.overall_appraisal
|
|
|
})
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), (shixunWorkReport.work_comment_hidden || shixunWorkReport.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 _callee12() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee12$(_context14) {
|
|
|
while (1) switch (_context14.prev = _context14.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 _callee11() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee11$(_context13) {
|
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
|
case 0:
|
|
|
_context13.next = 2;
|
|
|
return (0,service_shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
|
comment_id: shixunWorkReport.comment_id,
|
|
|
homeworkId: params.homeworkId
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context13.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success("删除成功");
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReport',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context13.stop();
|
|
|
}
|
|
|
}, _callee11);
|
|
|
}))();
|
|
|
}
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context14.stop();
|
|
|
}
|
|
|
}, _callee12);
|
|
|
})),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {}), "\u5220\u9664"]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), shixunWorkReport.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\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: shixunWorkReport.work_comment
|
|
|
})]
|
|
|
}), shixunWorkReport.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.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.stage_list,
|
|
|
rowKey: function rowKey(r) {
|
|
|
return r === null || r === void 0 ? void 0 : r.challenge_id;
|
|
|
},
|
|
|
pagination: false,
|
|
|
columns: columns
|
|
|
})
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 || (_shixunWorkReport$tar2 = shixunWorkReport.target_test_sets) === null || _shixunWorkReport$tar2 === void 0 ? void 0 : _shixunWorkReport$tar2.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u6307\u6807\u6210\u7EE9"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
dataSource: datatables,
|
|
|
rowKey: function rowKey(r) {
|
|
|
return r === null || r === void 0 ? void 0 : r.challenge_id;
|
|
|
},
|
|
|
pagination: false,
|
|
|
bordered: true,
|
|
|
columns: columns1
|
|
|
})
|
|
|
})]
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.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 ? void 0 : shixunWorkReport.work_description
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u56FE\u5F62\u7EDF\u8BA1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(EchartStatic, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u5B9E\u8BAD\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, "/shixun_homework/").concat(params.categoryId, "/detail"),
|
|
|
children: "\u8FD4\u56DE\u5217\u8868"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
className: "tr",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "default",
|
|
|
disabled: Previous === null || Previous === void 0 ? void 0 : Previous.last,
|
|
|
onClick: function onClick() {
|
|
|
return skip();
|
|
|
},
|
|
|
children: "\u4E0A\u4E00\u4E2A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "default",
|
|
|
style: {
|
|
|
marginLeft: '20px',
|
|
|
marginRight: '20px'
|
|
|
},
|
|
|
disabled: nextComment === null || nextComment === void 0 ? void 0 : nextComment.last,
|
|
|
onClick: function onClick() {
|
|
|
return skip('next');
|
|
|
},
|
|
|
children: "\u4E0B\u4E00\u4E2A"
|
|
|
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee13$(_context15) {
|
|
|
while (1) switch (_context15.prev = _context15.next) {
|
|
|
case 0:
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: "更改点评",
|
|
|
selectArrs: {
|
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
|
data: objectSpread2_default()({}, shixunWorkReport)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context15.stop();
|
|
|
}
|
|
|
}, _callee13);
|
|
|
})),
|
|
|
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\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\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\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\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\u751F\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\u751F\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\u751F\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\u751F\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\u751F\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\u751F\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\u751F\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\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\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\u751F\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\u751F\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 (_ref13) {
|
|
|
var shixunHomeworks = _ref13.shixunHomeworks,
|
|
|
classroomList = _ref13.classroomList,
|
|
|
loading = _ref13.loading,
|
|
|
globalSetting = _ref13.globalSetting,
|
|
|
user = _ref13.user;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
classroomList: classroomList,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
user: user
|
|
|
};
|
|
|
})(Comment_ShixunsListPage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 43419:
|
|
|
/*!***************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/WorkList/components/Redo.tsx ***!
|
|
|
\***************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 43418);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 8591);
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 91506);
|
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! umi */ 45295);
|
|
|
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/authority */ 13186);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DelShixun = function DelShixun(_ref) {
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
classroomList = _ref.classroomList,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var params = (0,umi__WEBPACK_IMPORTED_MODULE_4__.useParams)();
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
|
|
|
centered: true,
|
|
|
title: "\u63D0\u793A",
|
|
|
open: shixunHomeworks.actionTabs.key === '打回重做' ? true : false,
|
|
|
okText: "\u786E\u5B9A",
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
|
|
|
var _classroomList$Assist;
|
|
|
var res, _res$new_works, _classroomList$Assist2, newStudentWorkId;
|
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!((0,_utils_authority__WEBPACK_IMPORTED_MODULE_5__/* .isAssistant */ .Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.practice) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_redo))) {
|
|
|
_context.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return _context.abrupt("return");
|
|
|
case 3:
|
|
|
_context.next = 5;
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(shixunHomeworks.actionTabs.selectArrs.myshixun_identifier, "/reset_my_game.json"), {
|
|
|
method: 'GET',
|
|
|
params: {
|
|
|
course_id: params.coursesId,
|
|
|
homework_common_id: shixunHomeworks.actionTabs.homework_common_id
|
|
|
}
|
|
|
});
|
|
|
case 5:
|
|
|
res = _context.sent;
|
|
|
if (!res.shixun_identifier) {
|
|
|
_context.next = 13;
|
|
|
break;
|
|
|
}
|
|
|
antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .ZP.success('操作成功');
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
newStudentWorkId = res === null || res === void 0 || (_res$new_works = res.new_works) === null || _res$new_works === void 0 || (_res$new_works = _res$new_works.find(function (item) {
|
|
|
return "".concat(item.homework_common_id) === params.categoryId;
|
|
|
})) === null || _res$new_works === void 0 ? void 0 : _res$new_works.id;
|
|
|
if (!((0,_utils_authority__WEBPACK_IMPORTED_MODULE_5__/* .isAssistant */ .Rm)() && !((_classroomList$Assist2 = classroomList.AssistantObject.practice) !== null && _classroomList$Assist2 !== void 0 && _classroomList$Assist2.can_view))) {
|
|
|
_context.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
return _context.abrupt("return");
|
|
|
case 12:
|
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.replace("/classrooms/".concat(params.coursesId, "/shixun_homework/").concat(params.categoryId, "/").concat(newStudentWorkId, "/comment"));
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", {
|
|
|
children: "\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", {
|
|
|
children: "\u786E\u5B9A\u6253\u56DE?"
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_4__.connect)(function (_ref3) {
|
|
|
var shixunHomeworks = _ref3.shixunHomeworks,
|
|
|
classroomList = _ref3.classroomList;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(DelShixun));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 66104:
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules ***!
|
|
|
\**************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ breadcrumb; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
|
|
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
|
|
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/Children/toArray.js
|
|
|
var toArray = __webpack_require__(45659);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/pickAttrs.js
|
|
|
var pickAttrs = __webpack_require__(3286);
|
|
|
// 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.2.6@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
|
var DownOutlined = __webpack_require__(42884);
|
|
|
// 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_3_2_classnames_default()(`${prefixCls}-link`, className),
|
|
|
href: href
|
|
|
}), children);
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, passedProps, {
|
|
|
className: _classnames_2_3_2_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_3_2_classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, className, rootClassName, hashId);
|
|
|
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("nav", Object.assign({
|
|
|
className: breadcrumbClassName,
|
|
|
style: mergedStyle
|
|
|
}, restProps), /*#__PURE__*/_react_17_0_2_react.createElement("ol", null, crumbs)));
|
|
|
};
|
|
|
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
|
|
|
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 28103:
|
|
|
/*!***********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
|
|
|
\***********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ divider; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
|
|
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
|
|
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(36355);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
|
var style = __webpack_require__(17313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(37613);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js
|
|
|
|
|
|
|
|
|
// ============================== Shared ==============================
|
|
|
const genSharedDividerStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
sizePaddingEdgeHorizontal,
|
|
|
colorSplit,
|
|
|
lineWidth,
|
|
|
textPaddingInline,
|
|
|
orientationMargin,
|
|
|
verticalMarginInline
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
|
|
|
// vertical
|
|
|
'&-vertical': {
|
|
|
position: 'relative',
|
|
|
top: '-0.06em',
|
|
|
display: 'inline-block',
|
|
|
height: '0.9em',
|
|
|
marginInline: verticalMarginInline,
|
|
|
marginBlock: 0,
|
|
|
verticalAlign: 'middle',
|
|
|
borderTop: 0,
|
|
|
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
|
|
|
},
|
|
|
'&-horizontal': {
|
|
|
display: 'flex',
|
|
|
clear: 'both',
|
|
|
width: '100%',
|
|
|
minWidth: '100%',
|
|
|
margin: `${token.dividerHorizontalGutterMargin}px 0`
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text`]: {
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
|
|
|
color: token.colorTextHeading,
|
|
|
fontWeight: 500,
|
|
|
fontSize: token.fontSizeLG,
|
|
|
whiteSpace: 'nowrap',
|
|
|
textAlign: 'center',
|
|
|
borderBlockStart: `0 ${colorSplit}`,
|
|
|
'&::before, &::after': {
|
|
|
position: 'relative',
|
|
|
width: '50%',
|
|
|
borderBlockStart: `${lineWidth}px solid transparent`,
|
|
|
// Chrome not accept `inherit` in `border-top`
|
|
|
borderBlockStartColor: 'inherit',
|
|
|
borderBlockEnd: 0,
|
|
|
transform: 'translateY(50%)',
|
|
|
content: "''"
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-left`]: {
|
|
|
'&::before': {
|
|
|
width: `${orientationMargin * 100}%`
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: `${100 - orientationMargin * 100}%`
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-right`]: {
|
|
|
'&::before': {
|
|
|
width: `${100 - orientationMargin * 100}%`
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: `${orientationMargin * 100}%`
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
display: 'inline-block',
|
|
|
paddingBlock: 0,
|
|
|
paddingInline: textPaddingInline
|
|
|
},
|
|
|
'&-dashed': {
|
|
|
background: 'none',
|
|
|
borderColor: colorSplit,
|
|
|
borderStyle: 'dashed',
|
|
|
borderWidth: `${lineWidth}px 0 0`
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
|
|
|
'&::before, &::after': {
|
|
|
borderStyle: 'dashed none none'
|
|
|
}
|
|
|
},
|
|
|
[`&-vertical${componentCls}-dashed`]: {
|
|
|
borderInlineStartWidth: lineWidth,
|
|
|
borderInlineEnd: 0,
|
|
|
borderBlockStart: 0,
|
|
|
borderBlockEnd: 0
|
|
|
},
|
|
|
[`&-plain${componentCls}-with-text`]: {
|
|
|
color: token.colorText,
|
|
|
fontWeight: 'normal',
|
|
|
fontSize: token.fontSize
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
|
|
|
'&::before': {
|
|
|
width: 0
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: '100%'
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
paddingInlineStart: sizePaddingEdgeHorizontal
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
|
|
|
'&::before': {
|
|
|
width: '100%'
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: 0
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
paddingInlineEnd: sizePaddingEdgeHorizontal
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
|
|
|
const dividerToken = (0,statistic/* merge */.TS)(token, {
|
|
|
dividerHorizontalWithTextGutterMargin: token.margin,
|
|
|
dividerHorizontalGutterMargin: token.marginLG,
|
|
|
sizePaddingEdgeHorizontal: 0
|
|
|
});
|
|
|
return [genSharedDividerStyle(dividerToken)];
|
|
|
}, token => ({
|
|
|
textPaddingInline: '1em',
|
|
|
orientationMargin: 0.05,
|
|
|
verticalMarginInline: token.marginXS
|
|
|
})));
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Divider = props => {
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
divider
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
type = 'horizontal',
|
|
|
orientation = 'center',
|
|
|
orientationMargin,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
children,
|
|
|
dashed,
|
|
|
plain,
|
|
|
style
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
|
|
|
const prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = divider_style(prefixCls);
|
|
|
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
|
|
|
const hasChildren = !!children;
|
|
|
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
|
|
|
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
|
|
|
const classString = _classnames_2_3_2_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
|
|
|
[`${prefixCls}-with-text`]: hasChildren,
|
|
|
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
|
|
|
[`${prefixCls}-dashed`]: !!dashed,
|
|
|
[`${prefixCls}-plain`]: !!plain,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
|
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
|
|
|
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
|
|
|
}, className, rootClassName);
|
|
|
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
|
|
|
if (typeof orientationMargin === 'number') {
|
|
|
return orientationMargin;
|
|
|
}
|
|
|
if (/^\d+$/.test(orientationMargin)) {
|
|
|
return Number(orientationMargin);
|
|
|
}
|
|
|
return orientationMargin;
|
|
|
}, [orientationMargin]);
|
|
|
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
|
|
|
marginLeft: memoizedOrientationMargin
|
|
|
}), hasCustomMarginRight && {
|
|
|
marginRight: memoizedOrientationMargin
|
|
|
});
|
|
|
// Warning children not work in vertical mode
|
|
|
if (false) {}
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
|
|
className: classString,
|
|
|
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
|
|
|
}, restProps, {
|
|
|
role: "separator"
|
|
|
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: `${prefixCls}-inner-text`,
|
|
|
style: innerStyle
|
|
|
}, children)));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var divider = (Divider);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 93314:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/nodata.png ***!
|
|
|
\********************************************/
|
|
|
/***/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