You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1639 lines
66 KiB
1639 lines
66 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[65719,12768],{
|
|
|
|
/***/ 48689:
|
|
/*!*******************************************************************************!*\
|
|
!*** ./node_modules/@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/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/@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/es/components/AntdIcon.js + 9 modules
|
|
var AntdIcon = __webpack_require__(43387);
|
|
;// CONCATENATED MODULE: ./node_modules/@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.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.forwardRef(DeleteOutlined_DeleteOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 64789:
|
|
/*!***********************************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js + 1 modules ***!
|
|
\***********************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ icons_PlusCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/PlusCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var PlusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "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" } }] }, "name": "plus-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_PlusCircleOutlined = (PlusCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 9 modules
|
|
var AntdIcon = __webpack_require__(43387);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var PlusCircleOutlined_PlusCircleOutlined = function PlusCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_PlusCircleOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_PlusCircleOutlined = (/*#__PURE__*/react.forwardRef(PlusCircleOutlined_PlusCircleOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 25035:
|
|
/*!***************************************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js + 1 modules ***!
|
|
\***************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ icons_QuestionCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var QuestionCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "question-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_QuestionCircleOutlined = (QuestionCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 9 modules
|
|
var AntdIcon = __webpack_require__(43387);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var QuestionCircleOutlined_QuestionCircleOutlined = function QuestionCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_QuestionCircleOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_QuestionCircleOutlined = (/*#__PURE__*/react.forwardRef(QuestionCircleOutlined_QuestionCircleOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 82982:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 71577);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_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: _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_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, _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_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);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 36579:
|
|
/*!*********************************************************!*\
|
|
!*** ./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/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(27424);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// 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/es/button/index.js
|
|
var es_button = __webpack_require__(71577);
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
|
|
var ArrowDownOutlined = __webpack_require__(77171);
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
|
|
var monaco_editor = __webpack_require__(8691);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(83062);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(29427);
|
|
// EXTERNAL MODULE: ./src/service/exercise.ts
|
|
var exercise = __webpack_require__(51412);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(82982);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(59758);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// 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.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.useState)(""),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
token = _useState4[0],
|
|
setToken = _useState4[1];
|
|
var _useState5 = (0,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.PROXY_SERVER */.Z.PROXY_SERVER : env/* default.API_SERVER */.Z.API_SERVER;
|
|
// let size;
|
|
console.log("disabledDownload---", disabledDownload);
|
|
var unit = 1024 * 1024;
|
|
var maxSize = 10 * unit;
|
|
var closeRef = (0,react.useRef)();
|
|
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
|
|
data = env/* default.API_SERVER */.Z.API_SERVER + data;
|
|
}
|
|
// if (type === "office") {
|
|
// size = parseUrl(data).filesize
|
|
// if (size > maxSize) {
|
|
// type = "other"
|
|
// }
|
|
// }
|
|
if (filename) monacoEditor.filename = filename;
|
|
(0,react.useEffect)(function () {
|
|
var _document$cookie, _document$cookie$repl;
|
|
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";");
|
|
cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) {
|
|
var i = item.split("=");
|
|
if (i[0] === '_educoder_session') {
|
|
setToken(i[1]);
|
|
}
|
|
});
|
|
}, []);
|
|
(0,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.ONLYOFFICE */.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: handleClick,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
|
|
})
|
|
})]
|
|
});
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 12768:
|
|
/*!*********************************************************!*\
|
|
!*** ./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/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(861);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
var createForOfIteratorHelper = __webpack_require__(74704);
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(27424);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css
|
|
var katex_min = __webpack_require__(81897);
|
|
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.js
|
|
var marked = __webpack_require__(47084);
|
|
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
|
|
// EXTERNAL MODULE: ./node_modules/marked/src/helpers.js
|
|
var helpers = __webpack_require__(90621);
|
|
;// 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/src/prettify.js
|
|
var prettify = __webpack_require__(11771);
|
|
// EXTERNAL MODULE: ./node_modules/hls.js/dist/hls.js
|
|
var dist_hls = __webpack_require__(67631);
|
|
var hls_default = /*#__PURE__*/__webpack_require__.n(dist_hls);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(59758);
|
|
// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js
|
|
var katex = __webpack_require__(20527);
|
|
// EXTERNAL MODULE: ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules
|
|
var v4 = __webpack_require__(25934);
|
|
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
|
|
var PreviewAll = __webpack_require__(36579);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// 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.useState)(""),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
data = _useState2[0],
|
|
setData = _useState2[1];
|
|
var _useState3 = (0,react.useState)("office"),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
type = _useState4[0],
|
|
setType = _useState4[1];
|
|
var _useState5 = (0,react.useState)([]),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
projectValue = _useState6[0],
|
|
setProjectValue = _useState6[1];
|
|
var classNamesRef = (0,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.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.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default.API_SERVER */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default.API_SERVER */.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.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.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.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.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 ? 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 (hls_default().isSupported()) {
|
|
var hls = new (hls_default())();
|
|
hls.loadSource(item.src);
|
|
hls.attachMedia(item);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
(0,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 ? 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("");
|
|
}
|
|
})]
|
|
});
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 25104:
|
|
/*!**************************************************************************!*\
|
|
!*** ./src/pages/Graduations/components/HeadTitle/index.tsx + 1 modules ***!
|
|
\**************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ components_HeadTitle; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/components/HeadTitle/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var HeadTitlemodules = ({"flex_box_center":"flex_box_center___oGGi8","flex_space_between":"flex_space_between___e1At5","flex_box_vertical_center":"flex_box_vertical_center___K1Nl5","flex_box_center_end":"flex_box_center_end___IP1rf","flex_box_column":"flex_box_column____nxPW","title":"title___Ynb7w","time":"time___dxFRB"});
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__(94184);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ./src/pages/Graduations/components/Tags/index.tsx + 1 modules
|
|
var Tags = __webpack_require__(67617);
|
|
// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(27484);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/components/HeadTitle/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var HeadTitle = function HeadTitle(_ref) {
|
|
var className = _ref.className,
|
|
status = _ref.status,
|
|
_ref$style = _ref.style,
|
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
startAt = _ref.startAt,
|
|
endAt = _ref.endAt,
|
|
title = _ref.title;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: classnames_default()(HeadTitlemodules.title, className),
|
|
style: style,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
children: title
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Tags/* default */.Z, {
|
|
className: "ml10",
|
|
status: status
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: HeadTitlemodules.time,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u5F00\u542F\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "ml10",
|
|
children: startAt ? dayjs_min_default()(startAt).format("YYYY-MM-DD HH:mm") : '--'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "ml30",
|
|
children: ["\u622A\u6B62\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "ml10",
|
|
children: endAt ? dayjs_min_default()(endAt).format("YYYY-MM-DD HH:mm") : '--'
|
|
})]
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var components_HeadTitle = (HeadTitle);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 67617:
|
|
/*!*********************************************************************!*\
|
|
!*** ./src/pages/Graduations/components/Tags/index.tsx + 1 modules ***!
|
|
\*********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ components_Tags; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/components/Tags/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Tagsmodules = ({"flex_box_center":"flex_box_center___Sswcw","flex_space_between":"flex_space_between___nBexI","flex_box_vertical_center":"flex_box_vertical_center___sPXvb","flex_box_center_end":"flex_box_center_end___c6nca","flex_box_column":"flex_box_column___Bq_gi","tag":"tag___NEywM"});
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__(94184);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/components/Tags/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var Tags = function Tags(_ref) {
|
|
var className = _ref.className,
|
|
status = _ref.status;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
|
|
children: [status === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: classnames_default()(Tagsmodules.tag, className),
|
|
children: "\u672A\u5F00\u59CB"
|
|
}), status === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: classnames_default()(Tagsmodules.tag, className),
|
|
style: {
|
|
background: "#19CB70"
|
|
},
|
|
children: "\u8FDB\u884C\u4E2D"
|
|
}), status === 2 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: classnames_default()(Tagsmodules.tag, className),
|
|
style: {
|
|
background: "#EE5D5D"
|
|
},
|
|
children: "\u5DF2\u7ED3\u675F"
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var components_Tags = (Tags);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 83280:
|
|
/*!******************************************************************************!*\
|
|
!*** ./src/pages/Graduations/components/TeacherModule/index.tsx + 1 modules ***!
|
|
\******************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ TeacherModule; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(27424);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/components/TeacherModule/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var TeacherModulemodules = ({"flex_box_center":"flex_box_center___Q4rC9","flex_space_between":"flex_space_between___pzGZc","flex_box_vertical_center":"flex_box_vertical_center___DhNf8","flex_box_center_end":"flex_box_center_end___ALRjT","flex_box_column":"flex_box_column___p6z9Y","wrap":"wrap____H2XH"});
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(88275);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
var row = __webpack_require__(71230);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/index.js + 127 modules
|
|
var table = __webpack_require__(76661);
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 32 modules
|
|
var ui_customization = __webpack_require__(35567);
|
|
// EXTERNAL MODULE: ./src/pages/Graduations/components/HeadTitle/index.tsx + 1 modules
|
|
var HeadTitle = __webpack_require__(25104);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(84519);
|
|
// EXTERNAL MODULE: ./src/pages/Graduations/components/SettingModal/index.tsx + 1 modules
|
|
var SettingModal = __webpack_require__(43035);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(82982);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(29427);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/components/TeacherModule/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Page = function Page(_ref) {
|
|
var _location$pathname$sp, _jsonItem$find, _menus;
|
|
var graduations = _ref.graduations,
|
|
dispatch = _ref.dispatch,
|
|
tags = _ref.tags,
|
|
tagsTitle = _ref.tagsTitle,
|
|
tagsTitleWidth = _ref.tagsTitleWidth,
|
|
placeholder = _ref.placeholder,
|
|
columns = _ref.columns,
|
|
updateKey = _ref.updateKey,
|
|
_ref$inputWidth = _ref.inputWidth,
|
|
inputWidth = _ref$inputWidth === void 0 ? 214 : _ref$inputWidth;
|
|
var urlParams = (0,_umi_production_exports.useParams)();
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
searchParams = _useSearchParams2[0];
|
|
var _useState = (0,react.useState)(false),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
loading = _useState2[0],
|
|
setLoading = _useState2[1];
|
|
var _useState3 = (0,react.useState)(0),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
total = _useState4[0],
|
|
setTotal = _useState4[1];
|
|
var _useState5 = (0,react.useState)([]),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
list = _useState6[0],
|
|
setList = _useState6[1];
|
|
var _useState7 = (0,react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
settingVisible = _useState8[0],
|
|
setSettingVisible = _useState8[1];
|
|
var menus = graduations.menus;
|
|
var tabKey = (_location$pathname$sp = location.pathname.split('/')) === null || _location$pathname$sp === void 0 ? void 0 : _location$pathname$sp[3];
|
|
var tabParams = menus.find(function (e) {
|
|
return e.clazz === tabKey;
|
|
}) || {};
|
|
var tabIndex = menus.find(function (e) {
|
|
return e.clazz === tabKey;
|
|
}) || 1;
|
|
var getUrlState = searchParams !== null && searchParams !== void 0 && searchParams.get('state') ? Number(searchParams === null || searchParams === void 0 ? void 0 : searchParams.get('state')) : '';
|
|
var _useState9 = (0,react.useState)({
|
|
keyword: '',
|
|
status: getUrlState,
|
|
page: 1,
|
|
limit: 20
|
|
}),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
params = _useState10[0],
|
|
setParams = _useState10[1];
|
|
(0,react.useEffect)(function () {
|
|
if (tabParams !== null && tabParams !== void 0 && tabParams.id) {
|
|
getList(params);
|
|
}
|
|
}, [tabParams === null || tabParams === void 0 ? void 0 : tabParams.id, updateKey]);
|
|
var getList = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(record) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
setLoading(true);
|
|
_context.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/graduations/".concat(urlParams.id, "/graduation_stages/").concat(tabParams === null || tabParams === void 0 ? void 0 : tabParams.id, ".json"), {
|
|
method: "get",
|
|
params: record
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
if (res.status === 0) {
|
|
setList((res === null || res === void 0 ? void 0 : res.data) || []);
|
|
setTotal(res === null || res === void 0 ? void 0 : res.total_count);
|
|
}
|
|
setLoading(false);
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getList(_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleChangeStatus = function handleChangeStatus(status) {
|
|
params.status = status;
|
|
params.page = 1;
|
|
setParams(params);
|
|
getList(params);
|
|
};
|
|
var handleSearch = function handleSearch(v) {
|
|
params.keyword = v;
|
|
params.page = 1;
|
|
setParams(params);
|
|
getList(params);
|
|
};
|
|
var handlePagination = function handlePagination(page, pageSize) {
|
|
params.page = page;
|
|
params.limit = pageSize;
|
|
setParams(params);
|
|
getList(params);
|
|
};
|
|
var jsonItem = [{
|
|
name: '任务书',
|
|
key: 'tasks',
|
|
notStartText: '当前阶段还未开启'
|
|
}, {
|
|
name: '开题报告',
|
|
key: 'opening_report',
|
|
notStartText: '当前阶段还未开启'
|
|
}, {
|
|
name: '中期检查',
|
|
key: 'midterm_report',
|
|
notStartText: '当前阶段还未开启'
|
|
}, {
|
|
name: '毕业论文',
|
|
key: 'thesis',
|
|
notStartText: '当前阶段还未开启'
|
|
}, {
|
|
name: '毕业答辩',
|
|
key: 'final_defense',
|
|
notStartText: '当前阶段还未开启'
|
|
}, {
|
|
name: '论文定稿',
|
|
key: 'final_thesis',
|
|
notStartText: '当前阶段还未开启'
|
|
}];
|
|
var notStartText = jsonItem === null || jsonItem === void 0 ? void 0 : (_jsonItem$find = jsonItem.find(function (e) {
|
|
return e.key === (tabParams === null || tabParams === void 0 ? void 0 : tabParams.clazz);
|
|
})) === null || _jsonItem$find === void 0 ? void 0 : _jsonItem$find.notStartText;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: TeacherModulemodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(HeadTitle/* default */.Z, {
|
|
title: tabParams === null || tabParams === void 0 ? void 0 : tabParams.name,
|
|
className: "mb10",
|
|
status: tabParams === null || tabParams === void 0 ? void 0 : tabParams.status,
|
|
startAt: tabParams === null || tabParams === void 0 ? void 0 : tabParams.start_at,
|
|
endAt: tabParams === null || tabParams === void 0 ? void 0 : tabParams.end_at
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
justify: "end",
|
|
style: {
|
|
height: 66
|
|
},
|
|
children: [!!(tabParams !== null && tabParams !== void 0 && tabParams.status) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
style: {
|
|
flex: 1
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTags */.qp, {
|
|
title: tagsTitle,
|
|
value: params.status,
|
|
onChange: handleChangeStatus,
|
|
dataSource: tags,
|
|
className: "mt20",
|
|
titleWidth: tagsTitleWidth
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomInput */.t7, {
|
|
style: {
|
|
width: inputWidth,
|
|
marginLeft: 'auto'
|
|
},
|
|
placeholder: placeholder,
|
|
value: params.keyword,
|
|
onChange: handleSearch
|
|
})]
|
|
}), (0,util/* timeContrast */.QB)(tabParams === null || tabParams === void 0 ? void 0 : tabParams.next_start_at) && /*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
|
|
style: {
|
|
marginLeft: 15
|
|
},
|
|
onClick: function onClick() {
|
|
return setSettingVisible(true);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-anquanshezhi font14 mr5"
|
|
}), tabParams === null || tabParams === void 0 ? void 0 : tabParams.name, "\u8BBE\u7F6E"]
|
|
})]
|
|
}), (tabParams === null || tabParams === void 0 ? void 0 : tabParams.status) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
customText: notStartText
|
|
}), !!(tabParams !== null && tabParams !== void 0 && tabParams.status) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
columns: columns,
|
|
dataSource: list,
|
|
loading: loading,
|
|
rowKey: "id",
|
|
locale: {
|
|
emptyText: /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
|
|
},
|
|
pagination: {
|
|
current: params.page,
|
|
hideOnSinglePage: !total,
|
|
showQuickJumper: true,
|
|
showSizeChanger: true,
|
|
pageSize: params.limit,
|
|
pageSizeOptions: ['10', '20', '50', '100', '200'],
|
|
total: total,
|
|
size: 'default',
|
|
showTotal: util/* showTotal */.rU,
|
|
onChange: handlePagination
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(SettingModal/* default */.Z, {
|
|
visible: settingVisible,
|
|
data: objectSpread2_default()(objectSpread2_default()({}, tabParams), {}, {
|
|
disabled_time: menus === null || menus === void 0 ? void 0 : (_menus = menus[tabIndex - 1]) === null || _menus === void 0 ? void 0 : _menus.end_at
|
|
}),
|
|
onClose: function onClose() {
|
|
return setSettingVisible(false);
|
|
},
|
|
onSuccess: function onSuccess() {
|
|
setSettingVisible(false);
|
|
}
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var TeacherModule = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var graduations = _ref3.graduations;
|
|
return {
|
|
graduations: graduations
|
|
};
|
|
})(Page));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 96074:
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/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/index.js
|
|
var classnames = __webpack_require__(94184);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
var context = __webpack_require__(53124);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
var style = __webpack_require__(14747);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(45503);
|
|
;// CONCATENATED MODULE: ./node_modules/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/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.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_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.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.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.createElement("span", {
|
|
className: `${prefixCls}-inner-text`,
|
|
style: innerStyle
|
|
}, children)));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var divider = (Divider);
|
|
|
|
/***/ })
|
|
|
|
}]); |