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.
522 lines
26 KiB
522 lines
26 KiB
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[62],{
|
|
|
|
/***/ "55Ip":
|
|
/*!***************************************************************!*\
|
|
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
|
|
\***************************************************************/
|
|
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
|
|
/*! exports used: Link */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* unused harmony export BrowserRouter */
|
|
/* unused harmony export HashRouter */
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Link; });
|
|
/* unused harmony export NavLink */
|
|
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ "Ty5D");
|
|
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71");
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "cDcd");
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ "YS25");
|
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "17x9");
|
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14");
|
|
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "zLVn");
|
|
/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tiny-invariant */ "9R94");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* The public API for a <Router> that uses HTML5 history.
|
|
*/
|
|
|
|
var BrowserRouter =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(BrowserRouter, _React$Component);
|
|
|
|
function BrowserRouter() {
|
|
var _this;
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createBrowserHistory */ "a"])(_this.props);
|
|
return _this;
|
|
}
|
|
|
|
var _proto = BrowserRouter.prototype;
|
|
|
|
_proto.render = function render() {
|
|
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], {
|
|
history: this.history,
|
|
children: this.props.children
|
|
});
|
|
};
|
|
|
|
return BrowserRouter;
|
|
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
|
|
|
|
if (false) {}
|
|
|
|
/**
|
|
* The public API for a <Router> that uses window.location.hash.
|
|
*/
|
|
|
|
var HashRouter =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(HashRouter, _React$Component);
|
|
|
|
function HashRouter() {
|
|
var _this;
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createHashHistory */ "b"])(_this.props);
|
|
return _this;
|
|
}
|
|
|
|
var _proto = HashRouter.prototype;
|
|
|
|
_proto.render = function render() {
|
|
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], {
|
|
history: this.history,
|
|
children: this.props.children
|
|
});
|
|
};
|
|
|
|
return HashRouter;
|
|
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
|
|
|
|
if (false) {}
|
|
|
|
var resolveToLocation = function resolveToLocation(to, currentLocation) {
|
|
return typeof to === "function" ? to(currentLocation) : to;
|
|
};
|
|
var normalizeToLocation = function normalizeToLocation(to, currentLocation) {
|
|
return typeof to === "string" ? Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createLocation */ "c"])(to, null, null, currentLocation) : to;
|
|
};
|
|
|
|
var forwardRefShim = function forwardRefShim(C) {
|
|
return C;
|
|
};
|
|
|
|
var forwardRef = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
|
|
|
|
if (typeof forwardRef === "undefined") {
|
|
forwardRef = forwardRefShim;
|
|
}
|
|
|
|
function isModifiedEvent(event) {
|
|
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
}
|
|
|
|
var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
|
|
var innerRef = _ref.innerRef,
|
|
navigate = _ref.navigate,
|
|
_onClick = _ref.onClick,
|
|
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["innerRef", "navigate", "onClick"]);
|
|
|
|
var target = rest.target;
|
|
|
|
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, {
|
|
onClick: function onClick(event) {
|
|
try {
|
|
if (_onClick) _onClick(event);
|
|
} catch (ex) {
|
|
event.preventDefault();
|
|
throw ex;
|
|
}
|
|
|
|
if (!event.defaultPrevented && // onClick prevented default
|
|
event.button === 0 && ( // ignore everything but left clicks
|
|
!target || target === "_self") && // let browser handle "target=_blank" etc.
|
|
!isModifiedEvent(event) // ignore clicks with modifier keys
|
|
) {
|
|
event.preventDefault();
|
|
navigate();
|
|
}
|
|
}
|
|
}); // React 15 compat
|
|
|
|
|
|
if (forwardRefShim !== forwardRef) {
|
|
props.ref = forwardedRef || innerRef;
|
|
} else {
|
|
props.ref = innerRef;
|
|
}
|
|
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
|
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", props);
|
|
});
|
|
|
|
if (false) {}
|
|
/**
|
|
* The public API for rendering a history-aware <a>.
|
|
*/
|
|
|
|
|
|
var Link = forwardRef(function (_ref2, forwardedRef) {
|
|
var _ref2$component = _ref2.component,
|
|
component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,
|
|
replace = _ref2.replace,
|
|
to = _ref2.to,
|
|
innerRef = _ref2.innerRef,
|
|
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, ["component", "replace", "to", "innerRef"]);
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) {
|
|
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0;
|
|
var history = context.history;
|
|
var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
|
|
var href = location ? history.createHref(location) : "";
|
|
|
|
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, {
|
|
href: href,
|
|
navigate: function navigate() {
|
|
var location = resolveToLocation(to, context.location);
|
|
var method = replace ? history.replace : history.push;
|
|
method(location);
|
|
}
|
|
}); // React 15 compat
|
|
|
|
|
|
if (forwardRefShim !== forwardRef) {
|
|
props.ref = forwardedRef || innerRef;
|
|
} else {
|
|
props.innerRef = innerRef;
|
|
}
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(component, props);
|
|
});
|
|
});
|
|
|
|
if (false) { var refType, toType; }
|
|
|
|
var forwardRefShim$1 = function forwardRefShim(C) {
|
|
return C;
|
|
};
|
|
|
|
var forwardRef$1 = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
|
|
|
|
if (typeof forwardRef$1 === "undefined") {
|
|
forwardRef$1 = forwardRefShim$1;
|
|
}
|
|
|
|
function joinClassnames() {
|
|
for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
classnames[_key] = arguments[_key];
|
|
}
|
|
|
|
return classnames.filter(function (i) {
|
|
return i;
|
|
}).join(" ");
|
|
}
|
|
/**
|
|
* A <Link> wrapper that knows if it's "active" or not.
|
|
*/
|
|
|
|
|
|
var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
|
var _ref$ariaCurrent = _ref["aria-current"],
|
|
ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent,
|
|
_ref$activeClassName = _ref.activeClassName,
|
|
activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName,
|
|
activeStyle = _ref.activeStyle,
|
|
classNameProp = _ref.className,
|
|
exact = _ref.exact,
|
|
isActiveProp = _ref.isActive,
|
|
locationProp = _ref.location,
|
|
sensitive = _ref.sensitive,
|
|
strict = _ref.strict,
|
|
styleProp = _ref.style,
|
|
to = _ref.to,
|
|
innerRef = _ref.innerRef,
|
|
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) {
|
|
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0;
|
|
var currentLocation = locationProp || context.location;
|
|
var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
|
|
var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
|
|
|
|
var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
var match = escapedPath ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[/* matchPath */ "f"])(currentLocation.pathname, {
|
|
path: escapedPath,
|
|
exact: exact,
|
|
sensitive: sensitive,
|
|
strict: strict
|
|
}) : null;
|
|
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
|
|
var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;
|
|
var style = isActive ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, styleProp, {}, activeStyle) : styleProp;
|
|
|
|
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({
|
|
"aria-current": isActive && ariaCurrent || null,
|
|
className: className,
|
|
style: style,
|
|
to: toLocation
|
|
}, rest); // React 15 compat
|
|
|
|
|
|
if (forwardRefShim$1 !== forwardRef$1) {
|
|
props.ref = forwardedRef || innerRef;
|
|
} else {
|
|
props.innerRef = innerRef;
|
|
}
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Link, props);
|
|
});
|
|
});
|
|
|
|
if (false) { var ariaCurrentType; }
|
|
|
|
|
|
//# sourceMappingURL=react-router-dom.js.map
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "CVpU":
|
|
/*!*******************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/CodeDetails/index.tsx ***!
|
|
\*******************************************************************/
|
|
/*! exports provided: default */
|
|
/*! all exports used */
|
|
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var antd_es_skeleton_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/skeleton/style */ "cWXX");
|
|
/* harmony import */ var antd_es_skeleton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/skeleton */ "/ezw");
|
|
/* harmony import */ var antd_es_row_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/row/style */ "14J3");
|
|
/* harmony import */ var antd_es_row__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/row */ "BMrR");
|
|
/* harmony import */ var antd_es_col_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/col/style */ "jCWc");
|
|
/* harmony import */ var antd_es_col__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/col */ "kPKH");
|
|
/* harmony import */ var antd_es_breadcrumb_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/breadcrumb/style */ "sPJy");
|
|
/* harmony import */ var antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd/es/breadcrumb */ "bE4q");
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT");
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */ "WmNS");
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_11__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react */ "cDcd");
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! umi */ "Ty5D");
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! umi */ "55Ip");
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! umi */ "9kvl");
|
|
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @ant-design/icons */ "jhfD");
|
|
/* harmony import */ var _components_monaco_editor__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @/components/monaco-editor */ "ZW9T");
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./index.less?modules */ "VEjw");
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_index_less_modules__WEBPACK_IMPORTED_MODULE_18__);
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Export = function Export(_ref) {
|
|
var _window$location$path, _userInfo$course;
|
|
|
|
var exercise = _ref.exercise,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch;
|
|
var isExam = (_window$location$path = window.location.pathname) === null || _window$location$path === void 0 ? void 0 : _window$location$path.includes('exercise');
|
|
var path = isExam ? 'exercise' : 'shixun_homework';
|
|
var urlParams = Object(umi__WEBPACK_IMPORTED_MODULE_13__[/* useParams */ "i"])();
|
|
var location = Object(umi__WEBPACK_IMPORTED_MODULE_13__[/* useLocation */ "h"])();
|
|
var userInfo = user.userInfo;
|
|
var _location$query = location.query,
|
|
name = _location$query.name,
|
|
rule_id = _location$query.rule_id,
|
|
uuid = _location$query.uuid,
|
|
language = _location$query.language,
|
|
rowNumber = _location$query.rowNumber,
|
|
issueId = _location$query.issueId;
|
|
|
|
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_12__["useState"])({}),
|
|
_useState2 = Object(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_useState, 2),
|
|
data = _useState2[0],
|
|
setData = _useState2[1];
|
|
|
|
var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_12__["useState"])({
|
|
value: "",
|
|
language: language.toLowerCase(),
|
|
theme: 'vs',
|
|
// onChange: onCodeChange,
|
|
// onSave: onSave,
|
|
// forbidCopy: forbidCopy,
|
|
options: {
|
|
readOnly: true
|
|
},
|
|
errorContent: "",
|
|
errorLine: parseInt(rowNumber)
|
|
}),
|
|
_useState4 = Object(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_useState3, 2),
|
|
monacoEditor = _useState4[0],
|
|
setMonacoEditor = _useState4[1];
|
|
|
|
var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_12__["useState"])(true),
|
|
_useState6 = Object(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_useState5, 2),
|
|
loading = _useState6[0],
|
|
setLoading = _useState6[1];
|
|
|
|
Object(react__WEBPACK_IMPORTED_MODULE_12__["useEffect"])(function () {
|
|
getData();
|
|
}, []);
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = Object(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_11___default.a.mark(function _callee() {
|
|
var res, _res$data, _res$data$codes, _res$data2, dom;
|
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_11___default.a.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
setLoading(true);
|
|
_context.next = 3;
|
|
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_19__[/* default */ "a"])('/api/code_analyses_detail/code_detail.json', {
|
|
method: "get",
|
|
params: {
|
|
rule_id: rule_id,
|
|
uuid: uuid,
|
|
issue_id: issueId
|
|
}
|
|
});
|
|
|
|
case 3:
|
|
res = _context.sent;
|
|
|
|
if (res.status === 0) {
|
|
monacoEditor.value = (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$codes = _res$data.codes) === null || _res$data$codes === void 0 ? void 0 : _res$data$codes.map(function (item) {
|
|
return item.code;
|
|
}).join("\n");
|
|
dom = document.createElement("div");
|
|
dom.innerHTML = monacoEditor.value;
|
|
monacoEditor.value = dom.innerText;
|
|
monacoEditor.errorContent = res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.errMessage;
|
|
setMonacoEditor(Object(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])({}, monacoEditor));
|
|
setData(res.data);
|
|
}
|
|
|
|
setLoading(false);
|
|
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee);
|
|
}));
|
|
|
|
return function getData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("section", {
|
|
className: "edu-container"
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("section", {
|
|
className: "animated fadeIn"
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("aside", {
|
|
className: "mt10"
|
|
}, userInfo && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
|
|
separator: ">"
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Item, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(umi__WEBPACK_IMPORTED_MODULE_14__[/* Link */ "a"], {
|
|
to: "/classrooms/".concat(urlParams.coursesId, "/").concat(path)
|
|
}, userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$course = userInfo.course) === null || _userInfo$course === void 0 ? void 0 : _userInfo$course.course_name)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Item, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(umi__WEBPACK_IMPORTED_MODULE_14__[/* Link */ "a"], {
|
|
to: "/classrooms/".concat(urlParams.coursesId, "/").concat(path)
|
|
}, isExam ? '考试' : '实训', "\u5217\u8868")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Item, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(umi__WEBPACK_IMPORTED_MODULE_14__[/* Link */ "a"], {
|
|
to: "/classrooms/".concat(urlParams.coursesId, "/").concat(path, "/").concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.exerciseId, "/detail")
|
|
}, isExam ? '试卷' : '作业', "\u8BE6\u60C5")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Item, null, name))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("aside", {
|
|
className: [_index_less_modules__WEBPACK_IMPORTED_MODULE_18___default.a.title, 'mt20'].join(' ')
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_row__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], {
|
|
style: {
|
|
width: "100%"
|
|
}
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_col__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], {
|
|
flex: "1",
|
|
style: {
|
|
lineHeight: '24px'
|
|
}
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(umi__WEBPACK_IMPORTED_MODULE_14__[/* Link */ "a"], {
|
|
to: "/classrooms/".concat(urlParams.coursesId, "/").concat(path, "/").concat(urlParams.exerciseId, "/analysis/").concat(urlParams.studentId)
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"], {
|
|
className: "font16 c-black"
|
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("strong", {
|
|
className: "font20 ml5"
|
|
}, "\u4EE3\u7801\u8BE6\u60C5"))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("section", {
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_18___default.a.wrap
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_skeleton__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], {
|
|
loading: loading,
|
|
active: true,
|
|
paragraph: {
|
|
rows: 5
|
|
}
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_18___default.a.title
|
|
}, data === null || data === void 0 ? void 0 : data.title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_18___default.a.code
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(_components_monaco_editor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "b"], monacoEditor)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_18___default.a.error,
|
|
dangerouslySetInnerHTML: {
|
|
__html: (data === null || data === void 0 ? void 0 : data.example) || ''
|
|
}
|
|
}))));
|
|
};
|
|
|
|
/* harmony default export */ __webpack_exports__["default"] = (Object(umi__WEBPACK_IMPORTED_MODULE_15__[/* connect */ "a"])(function (_ref3) {
|
|
var exercise = _ref3.exercise,
|
|
user = _ref3.user;
|
|
return {
|
|
exercise: exercise,
|
|
user: user
|
|
};
|
|
})(Export));
|
|
|
|
/***/ }),
|
|
|
|
/***/ "VEjw":
|
|
/*!****************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/CodeDetails/index.less?modules ***!
|
|
\****************************************************************************/
|
|
/*! no static exports found */
|
|
/*! exports used: default */
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
module.exports = {"flex_box_center":"flex_box_center___28Zqn","flex_space_between":"flex_space_between___1P-0f","flex_box_vertical_center":"flex_box_vertical_center___3p8EQ","flex_box_center_end":"flex_box_center_end___6RABf","flex_box_column":"flex_box_column___2FnmJ","title":"title___1sj1Q","wrap":"wrap___3w47E","code":"code___OcBpb","error":"error___3J5po"};
|
|
|
|
/***/ })
|
|
|
|
}]); |