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.
1709 lines
101 KiB
1709 lines
101 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2884],{
|
|
|
|
/***/ 18343:
|
|
/*!******************************************************!*\
|
|
!*** ./src/components/Spinner/index.tsx + 1 modules ***!
|
|
\******************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ Spinner; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
;// CONCATENATED MODULE: ./src/components/Spinner/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Spinnermodules = ({"ldsRing":"ldsRing___mpBZC","idsRingWrapper":"idsRingWrapper___Of9_n","ldsring":"ldsring___o0w2t"});
|
|
;// CONCATENATED MODULE: ./src/components/Spinner/index.tsx
|
|
|
|
|
|
|
|
/* harmony default export */ var Spinner = (({ message, className, children, style = {} }) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${Spinnermodules.idsRingWrapper} ${className}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Spinnermodules.ldsRing }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null)), message ? /* @__PURE__ */ _react_17_0_2_react.createElement("p", { style }, message) : null, /* @__PURE__ */ _react_17_0_2_react.createElement(_umi_production_exports.Outlet, null));
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 12314:
|
|
/*!********************************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx + 1 modules ***!
|
|
\********************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ ShixunStaticItem; }
|
|
});
|
|
|
|
// UNUSED EXPORTS: ShixunsStaticItem
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
var es_radio = __webpack_require__(5112);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
var input_number = __webpack_require__(96971);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
var col = __webpack_require__(43604);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
var divider = __webpack_require__(28103);
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 4 modules
|
|
var monaco_editor = __webpack_require__(16162);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ShixunStaticItemmodules = ({"flex_box_center":"flex_box_center___eijRq","flex_space_between":"flex_space_between___R4Vev","flex_box_vertical_center":"flex_box_vertical_center___j8R6g","flex_box_center_end":"flex_box_center_end___eB0cz","flex_box_column":"flex_box_column___b9VdU","md":"md___tcpb2","title":"title___dVHM9"});
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(77883);
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
var base64 = __webpack_require__(24334);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(64841);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
|
|
var RenderHtml = __webpack_require__(92936);
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
var shixunHomeworks = __webpack_require__(13385);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
var ExclamationCircleOutlined = __webpack_require__(6246);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules
|
|
var DeleteOutlined = __webpack_require__(8897);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx
|
|
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
|
|
var __defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const options = {
|
|
selectOnLineNumbers: true,
|
|
readOnly: true,
|
|
minimap: {
|
|
enabled: false
|
|
},
|
|
scrollBeyondLastLine: false,
|
|
enableSplitViewResizing: false,
|
|
roundedSelection: false,
|
|
renderIndicators: false,
|
|
useShadows: false
|
|
};
|
|
var Types = /* @__PURE__ */ ((Types2) => {
|
|
Types2[Types2["SET_PATH"] = 0] = "SET_PATH";
|
|
Types2[Types2["GET_PASSED_CONTENT"] = 1] = "GET_PASSED_CONTENT";
|
|
return Types2;
|
|
})(Types || {});
|
|
function reducer(state, action) {
|
|
switch (action.type) {
|
|
case 0 /* SET_PATH */:
|
|
return __spreadProps(__spreadValues({}, state), { selectedPath: action.payload });
|
|
case 1 /* GET_PASSED_CONTENT */:
|
|
return __spreadProps(__spreadValues({}, state), { passedContent: action.payload });
|
|
default:
|
|
throw new Error();
|
|
}
|
|
}
|
|
const ShixunsStaticItem = ({ language, dispatch, shixunWorkReport, v, languages, classroomList, autoHeight, diff_code_count, data }) => {
|
|
const [item, setitem] = (0,_react_17_0_2_react.useState)(languages == null ? void 0 : languages[0]);
|
|
const params = (0,_umi_production_exports.useParams)();
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
setitem(languages == null ? void 0 : languages[0]);
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a;
|
|
setitem((_a = languages == null ? void 0 : languages.filter((items) => items.language === (item == null ? void 0 : item.language))) == null ? void 0 : _a[0]);
|
|
}, [languages]);
|
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h2", null, " ", /* @__PURE__ */ React.createElement("span", null, v.is_finish ? /* @__PURE__ */ React.createElement("span", null, "\u6700\u540E\u901A\u5173\u4EE3\u7801", /* @__PURE__ */ React.createElement("span", { className: "ml5 font12 c-grey-999" }, "\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u7684\u901A\u5173\u4EE3\u7801")) : /* @__PURE__ */ React.createElement("span", null, "\u6700\u65B0\u4EE3\u7801", /* @__PURE__ */ React.createElement("span", { className: "ml5 font12 c-grey-999" }, "\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u65B0\u7F16\u5199\u7684\u4EE3\u7801\u8BE6\u60C5")), (languages == null ? void 0 : languages.length) > 1 && /* @__PURE__ */ React.createElement(es_radio/* default.Group */.ZP.Group, { defaultValue: language, style: { marginLeft: 10 }, onChange: (e) => {
|
|
var _a;
|
|
v.language = e.target.value;
|
|
setitem((_a = languages == null ? void 0 : languages.filter((item2) => item2.language === e.target.value)) == null ? void 0 : _a[0]);
|
|
} }, languages == null ? void 0 : languages.map((item2) => {
|
|
return /* @__PURE__ */ React.createElement(es_radio/* default */.ZP, { value: item2 == null ? void 0 : item2.language }, item2 == null ? void 0 : item2.language);
|
|
}))), (0,authority/* isAdmin */.GJ)() && shixunWorkReport != "shixunWorkReport" && /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", null, "\u5F97\u5206 ", item == null ? void 0 : item.score, "/", item == null ? void 0 : item.total_score), /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { style: { margin: "0px 10px" }, onClick: () => {
|
|
var _a, _b;
|
|
if (!((_b = (_a = classroomList.AssistantObject) == null ? void 0 : _a.hack) == null ? void 0 : _b.can_appraise) && (0,authority/* isAssistant */.Rm)()) {
|
|
message/* default */.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");
|
|
return;
|
|
}
|
|
let scores = item == null ? void 0 : item.score;
|
|
modal["default"].confirm({
|
|
title: "\u8C03\u5206",
|
|
content: /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", null, "\u5F97\u5206\uFF1A", item == null ? void 0 : item.score, "/", item == null ? void 0 : item.total_score), /* @__PURE__ */ React.createElement("p", null, "\u8C03\u5206\uFF1A", /* @__PURE__ */ React.createElement(input_number/* default */.Z, { min: 0, max: item == null ? void 0 : item.total_score, defaultValue: item == null ? void 0 : item.score, onChange: (e) => {
|
|
scores = e;
|
|
} }))),
|
|
okText: "\u786E\u8BA4",
|
|
onOk: () => __async(void 0, null, function* () {
|
|
let res = yield (0,fetch/* default */.ZP)(`/api/courses/${params == null ? void 0 : params.coursesId}/homework_commons/update_hack_score`, {
|
|
method: "put",
|
|
body: {
|
|
course_id: params == null ? void 0 : params.coursesId,
|
|
hack_user_code_id: item == null ? void 0 : item.hack_user_id,
|
|
score: scores
|
|
}
|
|
});
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u8C03\u5206\u6210\u529F");
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {}
|
|
});
|
|
dispatch({
|
|
type: "shixunHomeworks/getShixunWorkReports",
|
|
payload: __spreadValues({}, params)
|
|
});
|
|
}
|
|
}),
|
|
cancelText: "\u53D6\u6D88"
|
|
});
|
|
}, type: "primary" }, "\u8C03\u5206"), (0,authority/* isAdmin */.GJ)() && shixunWorkReport != "shixunWorkReport" && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { onClick: () => {
|
|
var _a;
|
|
if (!((_a = classroomList.AssistantObject.hack) == null ? void 0 : _a.can_appraise) && (0,authority/* isAssistant */.Rm)()) {
|
|
message/* default */.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");
|
|
return;
|
|
}
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {
|
|
key: "\u66F4\u6539\u70B9\u8BC4",
|
|
selectArrs: {
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
type: "1",
|
|
language: item == null ? void 0 : item.language,
|
|
v,
|
|
data: __spreadValues({}, shixunWorkReport)
|
|
}
|
|
}
|
|
});
|
|
} }, "\u70B9\u8BC4\u4EE3\u7801"))), /* @__PURE__ */ React.createElement(
|
|
monaco_editor/* default */.ZP,
|
|
{
|
|
height: 300,
|
|
language: item == null ? void 0 : item.language,
|
|
value: base64.Base64.decode(item == null ? void 0 : item.code),
|
|
autoHeight,
|
|
theme: "default",
|
|
options
|
|
}
|
|
), ((item == null ? void 0 : item.comment) || (item == null ? void 0 : item.hidden_comment)) && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(row/* default */.Z, { align: "middle", style: { borderTop: "1px solid #eee" } }, /* @__PURE__ */ React.createElement(col/* default */.Z, { flex: 1 }, /* @__PURE__ */ React.createElement("h1", { className: ShixunStaticItemmodules.title }, "\u70B9\u8BC4\u5185\u5BB9")), /* @__PURE__ */ React.createElement(col/* default */.Z, { className: "pr30" }, (0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { onClick: () => __async(void 0, null, function* () {
|
|
modal["default"].confirm({
|
|
centered: true,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
title: "\u63D0\u793A",
|
|
icon: /* @__PURE__ */ React.createElement(ExclamationCircleOutlined/* default */.Z, null),
|
|
content: "\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",
|
|
onOk() {
|
|
return __async(this, null, function* () {
|
|
const res = yield (0,shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
comment_id: item == null ? void 0 : item.comment_id,
|
|
homeworkId: params.homeworkId,
|
|
type: "hack"
|
|
});
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u5220\u9664\u6210\u529F");
|
|
dispatch({
|
|
type: "shixunHomeworks/getShixunWorkReports",
|
|
payload: __spreadValues({}, params)
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}) }, /* @__PURE__ */ React.createElement(DeleteOutlined/* default */.Z, null), "\u5220\u9664"))), /* @__PURE__ */ React.createElement(divider/* default */.Z, { style: { margin: 0 } }), (item == null ? void 0 : item.comment) && /* @__PURE__ */ React.createElement("aside", { className: "pl30 pr30 mt20" }, /* @__PURE__ */ React.createElement("span", { className: "c-light-black font12" }, "# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement(RenderHtml/* default */.Z, { value: item == null ? void 0 : item.comment })), (item == null ? void 0 : item.hidden_comment) && /* @__PURE__ */ React.createElement("aside", { className: "pl30 pr30 mt20" }, /* @__PURE__ */ React.createElement("span", { className: "c-light-black font12" }, "# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement(RenderHtml/* default */.Z, { value: item == null ? void 0 : item.hidden_comment }))));
|
|
};
|
|
/* harmony default export */ var ShixunStaticItem = (ShixunsStaticItem);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 34018:
|
|
/*!**********************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Comment/index.tsx + 3 modules ***!
|
|
\**********************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Comment; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_jszip@3.10.1@jszip/dist/jszip.min.js
|
|
var jszip_min = __webpack_require__(86129);
|
|
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var es_modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(2518);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
|
|
var breadcrumb = __webpack_require__(66104);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
var col = __webpack_require__(43604);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
var divider = __webpack_require__(28103);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(86383);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
|
|
var ArrowLeftOutlined = __webpack_require__(17312);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules
|
|
var SolutionOutlined = __webpack_require__(46069);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
var ExclamationCircleOutlined = __webpack_require__(6246);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules
|
|
var DeleteOutlined = __webpack_require__(8897);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(19351);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(77883);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(75798);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Commentmodules = ({"flex_box_center":"flex_box_center___lb6Eo","flex_space_between":"flex_space_between___J8ZnK","flex_box_vertical_center":"flex_box_vertical_center___zweTs","flex_box_center_end":"flex_box_center_end___CvkW9","flex_box_column":"flex_box_column___ODy_E","title":"title___AD3SJ","export":"export___XBLMD","title1_right":"title1_right___raWIo","userPic":"userPic___OK1Fq","userInfo":"userInfo___wKpvE","listItem":"listItem___VH7Ls","rightInfo":"rightInfo___lI2xY","shixunTitle":"shixunTitle___lvDL9","shixunWrp":"shixunWrp___QXKnz","footerBar":"footerBar___zgEXb","footerBarStatic":"footerBarStatic___SB7gT","exitComment":"exitComment___oC_uA","nextComment":"nextComment___fCJ3l","modal":"modal___v_Shp"});
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx + 1 modules
|
|
var ShixunStaticItem = __webpack_require__(12314);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(64841);
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
var base64 = __webpack_require__(24334);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 4 modules
|
|
var monaco_editor = __webpack_require__(16162);
|
|
// EXTERNAL MODULE: ./src/pages/MyProblem/TestCasePanel/index.tsx + 1 modules
|
|
var TestCasePanel = __webpack_require__(43459);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStatic.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ShixunsListPage = ({
|
|
shixunHomeworks,
|
|
autoHeight,
|
|
classroomList,
|
|
user,
|
|
dispatch
|
|
}) => {
|
|
const { shixunWorkReport } = shixunHomeworks;
|
|
const { stage_list, work_id } = shixunWorkReport;
|
|
const params = (0,_umi_production_exports.useParams)();
|
|
const hasPower = (0,authority/* isAdmin */.GJ)();
|
|
const [codetype, setcodetype] = (0,_react_17_0_2_react.useState)();
|
|
const options = {
|
|
selectOnLineNumbers: true,
|
|
readOnly: true,
|
|
minimap: {
|
|
enabled: false
|
|
},
|
|
scrollBeyondLastLine: false
|
|
};
|
|
const getType = (language) => {
|
|
if (language === "c++") {
|
|
return 1;
|
|
}
|
|
if (language === "C++") {
|
|
return 2;
|
|
}
|
|
return language;
|
|
};
|
|
function onPathChange(game_id, path) {
|
|
return (0,fetch/* get */.U2)(`student_works/${work_id}/rep_passed_content.json`, { path, game_id });
|
|
}
|
|
const datas = (0,util/* arrTrans */.qZ)(5, shixunWorkReport.hack);
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, datas == null ? void 0 : datas.map(function(val, key) {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { key }, val.map(function(v, k) {
|
|
var _a, _b, _c;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "pl30 pr30", key: k }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${Commentmodules.shixunTitle} mt10` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { display: "flex", width: "100%" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "fa fa-code " }), /* @__PURE__ */ _react_17_0_2_react.createElement("strong", { style: { flex: 1 }, className: "c-black" }, "\u7B2C", key * 5 + k + 1, "\u9898 ", v.name), v.is_finish && /* @__PURE__ */ _react_17_0_2_react.createElement("a", { style: { marginLeft: 20 }, onClick: (e) => {
|
|
e.preventDefault();
|
|
window.open(`${v == null ? void 0 : v.url}&language=${getType(v.language)}`);
|
|
localStorage.setItem("program_homework", [params.coursesId, params.categoryId]);
|
|
} }, "\u67E5\u770B\u7B54\u9898\u8BE6\u60C5", ">>"), !v.is_finish && v.final_submit_languages.length > 0 && /* @__PURE__ */ _react_17_0_2_react.createElement("a", { style: { marginLeft: 20 }, onClick: (e) => {
|
|
e.preventDefault();
|
|
window.open(`${v == null ? void 0 : v.url}&language=${getType(v.final_submit_languages[0].language)}`);
|
|
localStorage.setItem("program_homework", [params.coursesId, params.categoryId]);
|
|
} }, "\u67E5\u770B\u7B54\u9898\u8BE6\u60C5", ">>"))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "font16 mt10" }, v.is_finish ? /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: Commentmodules.shixunWrp }, /* @__PURE__ */ _react_17_0_2_react.createElement(ShixunStaticItem/* default */.Z, { classroomList, user, v, shixunWorkReport, dispatch, autoHeight, languages: v.languages, language: v.language, game_id: v.id, data: base64.Base64.decode(v.code), diff_code_count: v.diff_code_count, onPathChange })) : v.final_submit_languages.length > 0 && /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: Commentmodules.shixunWrp }, /* @__PURE__ */ _react_17_0_2_react.createElement(ShixunStaticItem/* default */.Z, { classroomList, user, v, shixunWorkReport, dispatch, autoHeight, languages: v.final_submit_languages, language: v.final_submit_languages[0].language, game_id: v.id, data: base64.Base64.decode(v.final_submit_languages[0].code), diff_code_count: v.diff_code_count, onPathChange }))), /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "mt10 font16" }, ((_a = v.history) == null ? void 0 : _a.length) ? /* @__PURE__ */ _react_17_0_2_react.createElement(table["default"], { columns: [
|
|
{
|
|
title: "\u8BC4\u6D4B\u5E8F\u53F7",
|
|
dataIndex: "query_index",
|
|
width: 120
|
|
},
|
|
{
|
|
title: "\u8BC4\u6D4B\u65F6\u95F4",
|
|
dataIndex: "created_at",
|
|
key: "created_at",
|
|
align: "center",
|
|
width: 200,
|
|
render: (text, record) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, (record == null ? void 0 : record.created_at) ? dayjs_min_default()(record == null ? void 0 : record.created_at).format("YYYY-MM-DD HH:mm") : "--")
|
|
},
|
|
// {
|
|
// title: '评测结果',
|
|
// dataIndex: 'result',
|
|
// render: (text: string, record: any, index: number) => Base64.decode(text) || '- -',
|
|
// },
|
|
{
|
|
title: "\u8BC4\u6D4B\u7ED3\u679C",
|
|
dataIndex: "status",
|
|
key: "status",
|
|
align: "center",
|
|
render: (text, record) => {
|
|
var _a2;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: text === 0 ? "c-green" : "c-red" }, ((_a2 = TestCasePanel/* ExecuteDict */.Im[text]) == null ? void 0 : _a2.replace("\u8C03\u8BD5", "\u8BC4\u6D4B")) || "--");
|
|
}
|
|
},
|
|
((_c = (_b = v == null ? void 0 : v.history) == null ? void 0 : _b[0]) == null ? void 0 : _c.show_code) && {
|
|
title: "\u64CD\u4F5C",
|
|
align: "center",
|
|
dataIndex: "code",
|
|
key: "code",
|
|
width: 100,
|
|
render: (text, record) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { cursor: "pointer", color: "#3061d0" }, onClick: () => {
|
|
es_modal["default"].confirm({
|
|
centered: true,
|
|
icon: null,
|
|
width: 700,
|
|
okText: "\u5173\u95ED",
|
|
cancelButtonProps: { style: { display: "none" } },
|
|
title: "\u4EE3\u7801\u5185\u5BB9",
|
|
content: /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mb10" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
monaco_editor/* default */.ZP,
|
|
{
|
|
height: 300,
|
|
language: "python",
|
|
theme: "vs-light",
|
|
value: (record == null ? void 0 : record.code) ? base64.Base64.decode(record == null ? void 0 : record.code) : "",
|
|
autoHeight,
|
|
options
|
|
}
|
|
))
|
|
});
|
|
} }, "\u67E5\u770B\u4EE3\u7801")
|
|
}
|
|
].filter((x) => !!x), pagination: { hideOnSinglePage: true }, dataSource: v.history }) : "\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"));
|
|
}));
|
|
}));
|
|
};
|
|
/* harmony default export */ var ShixunStatic = ((0,_umi_production_exports.connect)(
|
|
({
|
|
shixunHomeworks,
|
|
loading,
|
|
globalSetting,
|
|
classroomList,
|
|
user
|
|
}) => ({
|
|
shixunHomeworks,
|
|
globalSetting,
|
|
loading: loading.effects,
|
|
classroomList,
|
|
user
|
|
})
|
|
)(ShixunsListPage));
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(20008);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ChangeCommit.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && __getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
const DelShixun = (_a) => {
|
|
var _b = _a, { shixunHomeworks, dispatch } = _b, props = __objRest(_b, ["shixunHomeworks", "dispatch"]);
|
|
var _a2, _b2, _c;
|
|
const params = (0,_umi_production_exports.useParams)();
|
|
const [showRequired, setShowRequired] = (0,_react_17_0_2_react.useState)(false);
|
|
const [form] = es_form["default"].useForm();
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a3, _b3, _c2, _d, _e, _f;
|
|
if (shixunHomeworks.actionTabs.key === "\u66F4\u6539\u70B9\u8BC4")
|
|
if (shixunHomeworks.actionTabs.selectArrs.type === "1") {
|
|
form.setFieldsValue({
|
|
comment: shixunHomeworks.actionTabs.selectArrs.v.comment,
|
|
hidden_comment: shixunHomeworks.actionTabs.selectArrs.v.hidden_comment
|
|
});
|
|
} else {
|
|
form.setFieldsValue({
|
|
comment: (_c2 = (_b3 = (_a3 = shixunHomeworks.actionTabs.selectArrs) == null ? void 0 : _a3.data) == null ? void 0 : _b3.data) == null ? void 0 : _c2.work_comment,
|
|
hidden_comment: (_f = (_e = (_d = shixunHomeworks.actionTabs.selectArrs) == null ? void 0 : _d.data) == null ? void 0 : _e.data) == null ? void 0 : _f.work_comment_hidden
|
|
});
|
|
}
|
|
}, [shixunHomeworks.actionTabs.key]);
|
|
const quickCommit = () => __async(void 0, null, function* () {
|
|
var _a3, _b3, _c2, _d;
|
|
const formValue = form.getFieldValue();
|
|
let url = shixunHomeworks.actionTabs.selectArrs.type === "1" ? `/api/problems/${shixunHomeworks.actionTabs.selectArrs.v.identifier}/hack_comment.json` : `/api/student_works/${params.homeworkId}/shixun_work_comment.json`;
|
|
const res = yield (0,fetch/* default */.ZP)(
|
|
url,
|
|
{
|
|
method: "post",
|
|
body: {
|
|
hidden_comment: formValue.hidden_comment,
|
|
comment: formValue.comment,
|
|
language: (_a3 = shixunHomeworks.actionTabs.selectArrs) == null ? void 0 : _a3.language,
|
|
user_id: (_d = (_c2 = (_b3 = shixunHomeworks.actionTabs.selectArrs) == null ? void 0 : _b3.data) == null ? void 0 : _c2.data) == null ? void 0 : _d.user_id
|
|
}
|
|
}
|
|
);
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u8BC4\u9605\u6210\u529F");
|
|
form.resetFields();
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {}
|
|
});
|
|
dispatch({
|
|
type: "shixunHomeworks/getShixunWorkReports",
|
|
payload: __spreadValues({}, params)
|
|
});
|
|
}
|
|
});
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_modal["default"],
|
|
{
|
|
centered: true,
|
|
title: /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, ((_a2 = shixunHomeworks.actionTabs.selectArrs) == null ? void 0 : _a2.type) === "1" ? "\u70B9\u8BC4\u4EE3\u7801" : "\u66F4\u6539\u70B9\u8BC4", ((_b2 = shixunHomeworks.actionTabs.selectArrs) == null ? void 0 : _b2.language) && /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { marginLeft: 10, fontSize: 14 } }, "\u4F7F\u7528\u8BED\u8A00\uFF1A", (_c = shixunHomeworks.actionTabs.selectArrs) == null ? void 0 : _c.language)),
|
|
open: shixunHomeworks.actionTabs.key === "\u66F4\u6539\u70B9\u8BC4" ? true : false,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
onOk: () => __async(void 0, null, function* () {
|
|
const formValue = form.getFieldValue();
|
|
if (JSON.stringify(formValue) === "{}" || formValue.hidden_comment === "" && formValue.comment === "") {
|
|
setShowRequired(true);
|
|
} else {
|
|
quickCommit();
|
|
}
|
|
}),
|
|
onCancel: () => {
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {}
|
|
});
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_form["default"],
|
|
{
|
|
form,
|
|
onChange: () => {
|
|
if (showRequired)
|
|
setShowRequired(false);
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", null, "\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { name: "comment" }, /* @__PURE__ */ _react_17_0_2_react.createElement(input["default"].TextArea, { placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9", rows: 8 })),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", null, "\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { name: "hidden_comment" }, /* @__PURE__ */ _react_17_0_2_react.createElement(input["default"].TextArea, { placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9", rows: 8 }))
|
|
),
|
|
showRequired && /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "c-red" }, "\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")
|
|
));
|
|
};
|
|
/* harmony default export */ var ChangeCommit = ((0,_umi_production_exports.connect)(
|
|
({ shixunHomeworks }) => ({
|
|
shixunHomeworks
|
|
})
|
|
)(DelShixun));
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Detail/components/WorkList/components/Redo.tsx
|
|
var Redo = __webpack_require__(29726);
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
|
|
var RenderHtml = __webpack_require__(92936);
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
var service_shixunHomeworks = __webpack_require__(13385);
|
|
// EXTERNAL MODULE: ./node_modules/_html2pdf.js@0.10.1@html2pdf.js/dist/html2pdf.js
|
|
var html2pdf = __webpack_require__(44425);
|
|
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/index.tsx
|
|
var Comment_defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var Comment_getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var Comment_hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var Comment_propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var Comment_defNormalProp = (obj, key, value) => key in obj ? Comment_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var Comment_spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (Comment_hasOwnProp.call(b, prop))
|
|
Comment_defNormalProp(a, prop, b[prop]);
|
|
if (Comment_getOwnPropSymbols)
|
|
for (var prop of Comment_getOwnPropSymbols(b)) {
|
|
if (Comment_propIsEnum.call(b, prop))
|
|
Comment_defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
var Comment_objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (Comment_hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && Comment_getOwnPropSymbols)
|
|
for (var prop of Comment_getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && Comment_propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var Comment_async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Comment_ShixunsListPage = (_a) => {
|
|
var _b = _a, {
|
|
shixunHomeworks,
|
|
globalSetting,
|
|
loading,
|
|
classroomList,
|
|
dispatch
|
|
} = _b, props = Comment_objRest(_b, [
|
|
"shixunHomeworks",
|
|
"globalSetting",
|
|
"loading",
|
|
"classroomList",
|
|
"dispatch"
|
|
]);
|
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
|
|
const [params, setParams] = (0,_react_17_0_2_react.useState)(Comment_spreadValues({}, (0,_umi_production_exports.useParams)()));
|
|
const _params = (0,_umi_production_exports.useParams)();
|
|
const location = (0,_umi_production_exports.useLocation)();
|
|
const [] = (0,_react_17_0_2_react.useState)([]);
|
|
const [nextComment, setNextComment] = (0,_react_17_0_2_react.useState)({ last: false });
|
|
const [Previous, setPrevious] = (0,_react_17_0_2_react.useState)({ last: false });
|
|
const reportElement = (0,_react_17_0_2_react.useRef)();
|
|
const reportElementInfo = (0,_react_17_0_2_react.useRef)();
|
|
const [isExportLoading, setIsExportLoading] = (0,_react_17_0_2_react.useState)(false);
|
|
const [spinning, setSpinning] = (0,_react_17_0_2_react.useState)(false);
|
|
const [autoHeight, setAutoHeight] = (0,_react_17_0_2_react.useState)(false);
|
|
const { shixunWorkReport } = shixunHomeworks;
|
|
const [zip, setZip] = (0,_react_17_0_2_react.useState)(new (jszip_min_default())());
|
|
const [allStudentWorks, setAllStudentWorks] = (0,_react_17_0_2_react.useState)([]);
|
|
const [isshow, setIsshow] = (0,_react_17_0_2_react.useState)(false);
|
|
const [isshows, setIsshows] = (0,_react_17_0_2_react.useState)(false);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
dispatch({
|
|
type: "globalSetting/footerToggle",
|
|
payload: false
|
|
});
|
|
dispatch({
|
|
type: "classroomList/getAssistantPermissions",
|
|
payload: {
|
|
course_id: params.coursesId
|
|
}
|
|
});
|
|
return () => {
|
|
dispatch({
|
|
type: "globalSetting/footerToggle",
|
|
payload: true
|
|
});
|
|
};
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (shixunHomeworks.actionTabs.key === "\u5BFC\u51FA\u7F16\u7A0B\u62A5\u544A" && allStudentWorks.length > 0) {
|
|
exportReport("all");
|
|
}
|
|
}, [allStudentWorks]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
setParams(Comment_spreadValues({}, _params));
|
|
}, [location.pathname]);
|
|
const scrollView = () => {
|
|
document.body.scrollIntoView();
|
|
};
|
|
function getData() {
|
|
return Comment_async(this, null, function* () {
|
|
var _a3, _b3, _c2, _d2;
|
|
const paylaod = JSON.parse(sessionStorage["all_student_works_params"] || "{}");
|
|
const res = yield dispatch({
|
|
type: "shixunHomeworks/getAllStudentWorks",
|
|
payload: Comment_spreadValues(Comment_spreadValues({}, params), paylaod)
|
|
});
|
|
setAllStudentWorks(res["all_student_works"]);
|
|
const key = (_a3 = res["all_student_works"]) == null ? void 0 : _a3.map((item) => String(item.student_work_id)).indexOf(params.homeworkId);
|
|
if (key === ((_b3 = res["all_student_works"]) == null ? void 0 : _b3.length) - 1) {
|
|
setNextComment({ last: true });
|
|
} else {
|
|
setNextComment((_c2 = res["all_student_works"]) == null ? void 0 : _c2[key + 1]);
|
|
}
|
|
if (key === 0) {
|
|
setPrevious({ last: true });
|
|
} else {
|
|
setPrevious((_d2 = res["all_student_works"]) == null ? void 0 : _d2[key - 1]);
|
|
}
|
|
});
|
|
}
|
|
const handleRemoveSurplusCanvas = () => {
|
|
document.querySelectorAll("canvas").forEach((item) => {
|
|
(!item.clientWidth || !item.clientHeight) && item.remove();
|
|
});
|
|
};
|
|
const setMonocoHeight = () => {
|
|
if (reportElement.current.offsetHeight > 62e3) {
|
|
setAutoHeight(false);
|
|
} else {
|
|
setAutoHeight(true);
|
|
}
|
|
};
|
|
const exportReport = (type) => Comment_async(void 0, null, function* () {
|
|
var _a3, _b3, _c2, _d2;
|
|
let nums = 0;
|
|
let modal;
|
|
modal = es_modal["default"].info({
|
|
width: 460,
|
|
title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u6B63\u5728\u5BFC\u51FA\u7F16\u7A0B\u62A5\u544A,", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-red" }, "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),
|
|
content: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5F53\u524D\u8FDB\u5EA6: ", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-blue" }, nums + 1), "/", type !== "all" ? 1 : allStudentWorks == null ? void 0 : allStudentWorks.length, /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),
|
|
maskClosable: false,
|
|
className: Commentmodules.modal,
|
|
onOk: () => {
|
|
}
|
|
});
|
|
const opt = {
|
|
margin: [0, 0],
|
|
filename: `${(_a3 = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _a3.user_name}.pdf`,
|
|
// image: {
|
|
// type: 'jpeg',
|
|
// quality: 0.98
|
|
// },
|
|
html2canvas: {
|
|
// dpi: 192,
|
|
// scale:2,
|
|
useCORS: true,
|
|
letterRendering: true
|
|
},
|
|
jsPDF: {
|
|
unit: "mm",
|
|
format: "a4",
|
|
orientation: "landscape"
|
|
// unit: 'pt', format: [1200, 800], orientation: 'portrait'
|
|
}
|
|
};
|
|
function next() {
|
|
return Comment_async(this, null, function* () {
|
|
const res = yield dispatch({
|
|
type: "shixunHomeworks/getShixunWorkReports",
|
|
payload: __spreadProps(Comment_spreadValues({}, params), { homeworkId: allStudentWorks[nums]["student_work_id"], user_id: allStudentWorks[nums]["user_id"], id: params.categoryId })
|
|
});
|
|
scrollView();
|
|
nums++;
|
|
setTimeout(() => Comment_async(this, null, function* () {
|
|
var _a4, _b4;
|
|
handleRemoveSurplusCanvas();
|
|
const folders = zip.folder(`${(_a4 = res == null ? void 0 : res.data) == null ? void 0 : _a4.user_name}`);
|
|
const pages = document.querySelector("#export-all").children;
|
|
let worker = html2pdf_default()();
|
|
for (let i = 0; i < pages.length; i++) {
|
|
yield worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get("pdf").then((pdf) => Comment_async(this, null, function* () {
|
|
if (i < pages.length - 1) {
|
|
yield pdf.addPage();
|
|
}
|
|
}));
|
|
}
|
|
folders.file(`${allStudentWorks[nums - 1]["student_work_user_name"]}${nums}.pdf`, worker.output("blob"));
|
|
const codesF = folders.folder("\u4EE3\u7801\u6587\u4EF6");
|
|
(_b4 = res == null ? void 0 : res.hack) == null ? void 0 : _b4.map((item, index) => {
|
|
var _a5;
|
|
const codesG = codesF.folder(`\u7B2C${index + 1}\u5173-${item.name}-${item.id}`);
|
|
(_a5 = item == null ? void 0 : item.languages) == null ? void 0 : _a5.map((i) => {
|
|
codesG.file(`${i.language}.txt`, base64.Base64.decode(i == null ? void 0 : i.code));
|
|
});
|
|
});
|
|
modal.update({
|
|
content: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5F53\u524D\u8FDB\u5EA6: ", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-blue" }, nums), "/", allStudentWorks == null ? void 0 : allStudentWorks.length, /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")
|
|
});
|
|
if (nums == (allStudentWorks == null ? void 0 : allStudentWorks.length)) {
|
|
modal.destroy();
|
|
download();
|
|
} else {
|
|
next();
|
|
}
|
|
}), 2200);
|
|
});
|
|
}
|
|
if (type !== "all" || (allStudentWorks == null ? void 0 : allStudentWorks.length) < 2) {
|
|
handleRemoveSurplusCanvas();
|
|
scrollView();
|
|
const pages = reportElementInfo.current.children;
|
|
let worker = html2pdf_default()();
|
|
const folder = zip.folder(`${(_b3 = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _b3.user_name}`);
|
|
for (let i = 0; i < pages.length; i++) {
|
|
yield worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get("pdf").then((pdf) => Comment_async(void 0, null, function* () {
|
|
if (i < pages.length - 1) {
|
|
yield pdf.addPage();
|
|
}
|
|
}));
|
|
}
|
|
setIsExportLoading(false);
|
|
folder.file(`${(_c2 = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _c2.user_name}.pdf`, worker.output("blob"), { base64: false });
|
|
const codeF = folder.folder("\u4EE3\u7801\u6587\u4EF6");
|
|
(_d2 = shixunWorkReport == null ? void 0 : shixunWorkReport.hack) == null ? void 0 : _d2.map((item, index) => {
|
|
var _a4;
|
|
const codesG = codeF.folder(`\u7B2C${index + 1}\u5173-${item.name}-${item.id}`);
|
|
(_a4 = item == null ? void 0 : item.languages) == null ? void 0 : _a4.map((i) => {
|
|
codesG.file(`${i.language}.txt`, base64.Base64.decode(i == null ? void 0 : i.code));
|
|
});
|
|
});
|
|
modal.destroy();
|
|
download();
|
|
return;
|
|
} else {
|
|
next();
|
|
}
|
|
});
|
|
const download = () => {
|
|
zip.generateAsync({ type: "blob" }).then(function(content) {
|
|
const link = document.createElement("a");
|
|
link.href = window.URL.createObjectURL(content);
|
|
link.download = shixunWorkReport.category.course_name + ".zip";
|
|
document.body.appendChild(link);
|
|
const evt = document.createEvent("MouseEvents");
|
|
evt.initEvent("click", false, false);
|
|
link.dispatchEvent(evt);
|
|
document.body.removeChild(link);
|
|
setZip(new (jszip_min_default())());
|
|
});
|
|
setAutoHeight(false);
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
initData();
|
|
}, [params.homeworkId]);
|
|
const initData = () => Comment_async(void 0, null, function* () {
|
|
setSpinning(true);
|
|
yield dispatch({
|
|
type: "shixunHomeworks/getShixunWorkReports",
|
|
payload: Comment_spreadValues({}, params)
|
|
});
|
|
setSpinning(false);
|
|
if ((0,authority/* isAdmin */.GJ)())
|
|
getData();
|
|
});
|
|
const columns = [
|
|
{
|
|
title: "\u9898\u53F7",
|
|
dataIndex: "name",
|
|
render: (text, record, index) => index + 1
|
|
},
|
|
{
|
|
title: "\u9898\u76EE\u540D\u79F0",
|
|
dataIndex: "name",
|
|
ellipsis: true,
|
|
width: "30%"
|
|
},
|
|
{
|
|
title: "\u5B8C\u6210\u65F6\u95F4",
|
|
dataIndex: "finish_time",
|
|
width: "200px",
|
|
render: (text, record, index) => {
|
|
var _a3, _b3;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, text || "- -"), (_b3 = (_a3 = record == null ? void 0 : record.subitem) == null ? void 0 : _a3.map((item) => item.finish_time)) == null ? void 0 : _b3.map((ite) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, ite || "- -");
|
|
}));
|
|
}
|
|
},
|
|
{
|
|
title: "\u8BC4\u6D4B\u6B21\u6570",
|
|
dataIndex: "submit_count",
|
|
render: (text, record, index) => {
|
|
var _a3, _b3;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, text || "- -"), (_b3 = (_a3 = record == null ? void 0 : record.subitem) == null ? void 0 : _a3.map((item) => item.submit_count)) == null ? void 0 : _b3.map((ite) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, ite || "- -");
|
|
}));
|
|
}
|
|
},
|
|
{
|
|
title: "\u8FD0\u884C\u65F6\u95F4\uFF08ms\uFF09",
|
|
dataIndex: "run_time",
|
|
render: (text, record, index) => {
|
|
var _a3, _b3;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, text || "- -"), (_b3 = (_a3 = record == null ? void 0 : record.subitem) == null ? void 0 : _a3.map((item) => item.run_time)) == null ? void 0 : _b3.map((ite) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, ite || "- -");
|
|
}));
|
|
}
|
|
},
|
|
{
|
|
title: "\u5185\u5B58\uFF08kb\uFF09",
|
|
dataIndex: "memory",
|
|
render: (text, record, index) => {
|
|
var _a3, _b3;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, text || "- -"), (_b3 = (_a3 = record == null ? void 0 : record.subitem) == null ? void 0 : _a3.map((item) => item.memory)) == null ? void 0 : _b3.map((ite) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, ite || "- -");
|
|
}));
|
|
}
|
|
},
|
|
{
|
|
title: "\u4F7F\u7528\u8BED\u8A00",
|
|
dataIndex: "language",
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
render: (text, record, index) => {
|
|
var _a3, _b3;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, text || "- -"), (_b3 = (_a3 = record == null ? void 0 : record.subitem) == null ? void 0 : _a3.map((item) => item.language)) == null ? void 0 : _b3.map((ite) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, ite || "- -");
|
|
}));
|
|
}
|
|
},
|
|
{
|
|
title: "\u5F97\u5206",
|
|
dataIndex: "score",
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
render: (text, record, index) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, text || "- -"))
|
|
},
|
|
{
|
|
title: "\u6392\u540D",
|
|
dataIndex: "rank",
|
|
render: (text, record, index) => {
|
|
var _a3, _b3;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, text || "- -"), (_b3 = (_a3 = record == null ? void 0 : record.subitem) == null ? void 0 : _a3.map((item) => item.rank)) == null ? void 0 : _b3.map((ite) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("p", null, ite || "- -");
|
|
}));
|
|
}
|
|
}
|
|
];
|
|
const skip = (type) => {
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {
|
|
key: "",
|
|
type: 2
|
|
}
|
|
});
|
|
setTimeout(() => {
|
|
if (type === "next") {
|
|
_umi_production_exports.history.push(`/classrooms/${params.coursesId}/program_homework/${params.categoryId}/${nextComment == null ? void 0 : nextComment.student_work_id}/${nextComment == null ? void 0 : nextComment.user_id}/comment`);
|
|
} else {
|
|
_umi_production_exports.history.push(`/classrooms/${params.coursesId}/program_homework/${params.categoryId}/${Previous == null ? void 0 : Previous.student_work_id}/${Previous == null ? void 0 : Previous.user_id}/comment`);
|
|
}
|
|
}, 200);
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("section", { className: "bg-fafafa", style: { position: "sticky", top: 0 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "edu-container mt10", style: { paddingBottom: 100 } }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
skeleton/* default */.Z,
|
|
{
|
|
loading: spinning,
|
|
active: true,
|
|
avatar: { size: 40 },
|
|
paragraph: { rows: 5 }
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "edu-container" }, ((_a2 = shixunWorkReport == null ? void 0 : shixunWorkReport.category) == null ? void 0 : _a2.course_id) && /* @__PURE__ */ _react_17_0_2_react.createElement("section", { className: "animated fadeIn" }, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "" }, (shixunWorkReport == null ? void 0 : shixunWorkReport.category) && /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z, { separator: ">" }, /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${(_b2 = shixunWorkReport == null ? void 0 : shixunWorkReport.category) == null ? void 0 : _b2.course_id}/program_homework`
|
|
},
|
|
(_c = shixunWorkReport == null ? void 0 : shixunWorkReport.category) == null ? void 0 : _c.course_name
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${(_d = shixunWorkReport == null ? void 0 : shixunWorkReport.category) == null ? void 0 : _d.course_id}/program_homework`
|
|
},
|
|
shixunWorkReport.category.category_name
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${(_e = shixunWorkReport == null ? void 0 : shixunWorkReport.category) == null ? void 0 : _e.course_id}/program_homework/${params == null ? void 0 : params.categoryId}/detail`
|
|
},
|
|
"\u4F5C\u4E1A\u8BE6\u60C5"
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, (_f = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _f.user_name))), /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: [Commentmodules.title1, "mt20"].join(" ") }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle" }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: 1 }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${params.coursesId}/program_homework/${params == null ? void 0 : params.categoryId}/detail`
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(ArrowLeftOutlined/* default */.Z, { className: "font16 c-black" })
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("strong", { className: "font20 ml5" }, (_g = shixunWorkReport == null ? void 0 : shixunWorkReport.category) == null ? void 0 : _g.homework_name), /* @__PURE__ */ _react_17_0_2_react.createElement(util/* StatusClassroomsTags */.VV, { temporary: true, status: shixunWorkReport.homework_status })), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { className: Commentmodules.title1_right }, /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { className: "ml10", onClick: () => exportReport(""), loading: isExportLoading }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "iconfont icon-daochu mr5" }), "\u5BFC\u51FA\u7F16\u7A0B\u62A5\u544A"), (0,authority/* isAdmin */.GJ)() && (allStudentWorks == null ? void 0 : allStudentWorks.length) > 1 && /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { className: "ml10", onClick: () => exportReport("all") }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "iconfont icon-daochu mr5" }), "\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u7F16\u7A0B\u62A5\u544A"))))), /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "mt30 relative" })),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "edu-container bg-white", ref: reportElement }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { id: "export-all", ref: reportElementInfo }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { id: "export-all-1" }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Commentmodules.title }, /* @__PURE__ */ _react_17_0_2_react.createElement("h1", null, "\u603B\u4F53\u8BC4\u4EF7"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, (0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
className: "mr20",
|
|
type: "primary",
|
|
onClick: () => {
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {
|
|
key: "\u66F4\u6539\u70B9\u8BC4",
|
|
selectArrs: {
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
data: Comment_spreadValues({}, shixunWorkReport)
|
|
}
|
|
}
|
|
});
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(SolutionOutlined/* default */.Z, null),
|
|
((_h = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _h.has_comment) ? "\u66F4\u6539\u70B9\u8BC4" : "\u70B9\u8BC4\u4F5C\u4E1A"
|
|
))), /* @__PURE__ */ _react_17_0_2_react.createElement(divider/* default */.Z, { style: { marginTop: 0 } }), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { className: "pl30 pr30" }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("img", { className: Commentmodules.userPic, src: `${env/* default */.Z.IMG_SERVER}/images/${(_i = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _i.image_url}`, alt: (_j = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _j.username })), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "font16 ml40" }, (_k = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _k.user_name), /* @__PURE__ */ _react_17_0_2_react.createElement(util/* HomeWorkDetailStatus */.UQ, { status: (_l = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _l.compelete_status }), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Commentmodules.userInfo }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u5B66\u53F7\uFF1A", ((_m = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _m.student_id) || "--"), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u5206\u73ED\uFF1A", ((_n = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _n.course_group) || "--"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u622A\u6B62\u524D\u5B8C\u6210\u5237\u9898\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-red" }, (_o = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _o.finish_do)), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u6700\u65B0\u5B8C\u6210\u5237\u9898\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-red" }, ((_p = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _p.latest_do) || "-")))), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: [Commentmodules.listItem, "mt10"].join(" ") }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u5B8C\u6210\u65F6\u95F4"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "c-light-black mt20" }, (shixunWorkReport == null ? void 0 : shixunWorkReport.data) && ((_q = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _q.finish_time))), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u5B8C\u6210\u65F6\u957F", /* @__PURE__ */ _react_17_0_2_react.createElement("i", { onClick: (e) => {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
setIsshows(true);
|
|
}, style: { marginLeft: 4, display: "none", color: "#145DFF", fontSize: 16, cursor: "pointer" }, className: "iconfont icon-tishixiaowenhao" })), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "c-light-black mt20" }, (_r = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _r.finish_time_long)), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u8BC4\u6D4B\u6B21\u6570"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt20" }, (_s = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _s.submit_count)), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u901A\u8FC7\u7387"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt20" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, ((_t = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _t.pass_rate) || "- -"))), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u5F97\u5206"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt20" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-orange" }, (_u = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _u.score))), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u7EC3\u4E60\u603B\u6392\u540D"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt20" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-orange" }, (_v = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _v.total_rank))), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u5206\u73ED\u6392\u540D"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt20" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-orange" }, (_w = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _w.class_rank))))), /* @__PURE__ */ _react_17_0_2_react.createElement(divider/* default */.Z, { style: { margin: 0 } }), (((_x = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _x.work_comment_hidden) || ((_y = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _y.work_comment)) && /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle" }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: 1 }, /* @__PURE__ */ _react_17_0_2_react.createElement("h1", { className: Commentmodules.title }, "\u70B9\u8BC4\u5185\u5BB9")), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { className: "pr30" }, (0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { onClick: () => Comment_async(void 0, null, function* () {
|
|
es_modal["default"].confirm({
|
|
centered: true,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
title: "\u63D0\u793A",
|
|
icon: /* @__PURE__ */ _react_17_0_2_react.createElement(ExclamationCircleOutlined/* default */.Z, null),
|
|
content: "\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",
|
|
onOk() {
|
|
return Comment_async(this, null, function* () {
|
|
var _a4;
|
|
const res = yield (0,service_shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
comment_id: (_a4 = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _a4.comment_id,
|
|
homeworkId: params.homeworkId
|
|
});
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u5220\u9664\u6210\u529F");
|
|
dispatch({
|
|
type: "shixunHomeworks/getShixunWorkReports",
|
|
payload: Comment_spreadValues({}, params)
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}) }, /* @__PURE__ */ _react_17_0_2_react.createElement(DeleteOutlined/* default */.Z, null), "\u5220\u9664"))), /* @__PURE__ */ _react_17_0_2_react.createElement(divider/* default */.Z, { style: { margin: 0 } }), ((_z = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _z.work_comment) && /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "pl30 pr30 mt20" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-light-black font12" }, "# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { value: (_A = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _A.work_comment })), ((_B = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _B.work_comment_hidden) && /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "pl30 pr30 mt20" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-light-black font12" }, "# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { value: (_C = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _C.work_comment_hidden }))), /* @__PURE__ */ _react_17_0_2_react.createElement("h1", { className: Commentmodules.title }, "\u9636\u6BB5\u6210\u7EE9"), /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "pl30 pr30" }, /* @__PURE__ */ _react_17_0_2_react.createElement(table["default"], { dataSource: shixunWorkReport == null ? void 0 : shixunWorkReport.hack, pagination: false, columns })), ((_D = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _D.work_description) && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("h1", { className: Commentmodules.title }, "\u4E2A\u4EBA\u603B\u7ED3"), /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "pl30 pr30" }, /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { value: (_E = shixunWorkReport == null ? void 0 : shixunWorkReport.data) == null ? void 0 : _E.work_description }))), /* @__PURE__ */ _react_17_0_2_react.createElement("h1", { className: Commentmodules.title }, "\u5237\u9898\u8BE6\u60C5")), /* @__PURE__ */ _react_17_0_2_react.createElement(ShixunStatic, { autoHeight }))),
|
|
(0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: `${Commentmodules.footerBar} ${isExportLoading ? Commentmodules.footerBarStatic : ""}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "edu-container" }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle" }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: "1" }, /* @__PURE__ */ _react_17_0_2_react.createElement(_umi_production_exports.Link, { className: Commentmodules.exitComment, to: `/classrooms/${params.coursesId}/program_homework/${params.categoryId}/detail` }, "\u8FD4\u56DE\u5217\u8868")), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: "1", className: "tr" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
type: "default",
|
|
disabled: Previous == null ? void 0 : Previous.last,
|
|
onClick: () => skip()
|
|
},
|
|
"\u4E0A\u4E00\u4E2A"
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
type: "default",
|
|
style: { marginLeft: "20px", marginRight: "20px" },
|
|
disabled: nextComment == null ? void 0 : nextComment.last,
|
|
onClick: () => skip("next")
|
|
},
|
|
"\u4E0B\u4E00\u4E2A"
|
|
), (0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
type: "primary",
|
|
onClick: () => Comment_async(void 0, null, function* () {
|
|
var _a3;
|
|
if (!((_a3 = classroomList.AssistantObject.hack) == null ? void 0 : _a3.can_appraise) && (0,authority/* isAssistant */.Rm)()) {
|
|
message/* default */.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");
|
|
return;
|
|
}
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {
|
|
key: "\u66F4\u6539\u70B9\u8BC4",
|
|
selectArrs: {
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
data: Comment_spreadValues({}, shixunWorkReport)
|
|
}
|
|
}
|
|
});
|
|
})
|
|
},
|
|
"\u70B9\u8BC4\u4F5C\u4E1A"
|
|
)))))
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(ChangeCommit, null), /* @__PURE__ */ _react_17_0_2_react.createElement(Redo/* default */.Z, null), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_modal["default"],
|
|
{
|
|
open: isshow,
|
|
width: 860,
|
|
centered: true,
|
|
onCancel: () => {
|
|
setIsshow(false);
|
|
},
|
|
title: "\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",
|
|
footer: null
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { color: "#333333", fontWeight: 400 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { fontWeight: 500 } }, "1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, " \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#FA6400", display: "flex", height: 34, alignItems: "center" } }, " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { color: "#333333", marginTop: 20, fontWeight: 400 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { fontWeight: 500 } }, "2\u3001\u5173\u5361\u603B\u8017\u65F6"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: {} }, "\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, " \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#FA6400", display: "flex", height: 44, paddingTop: 10 } }, " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { color: "#333333", marginTop: 20, fontWeight: 400 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { fontWeight: 500 } }, "3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: {} }, "\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { color: "#333333", marginTop: 20, fontWeight: 400 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { fontWeight: 500 } }, "\u89C4\u5219\u76EE\u7684"), /* @__PURE__ */ _react_17_0_2_react.createElement("br", null), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: {} }, "\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_modal["default"],
|
|
{
|
|
open: isshows,
|
|
title: "\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",
|
|
centered: true,
|
|
footer: null,
|
|
onCancel: () => {
|
|
setIsshows(false);
|
|
},
|
|
width: 600
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { fontWeight: 400, color: "#333333" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#145DFF" } }, "\u9875\u9762\u505C\u7559\u65F6\u957F"), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { margin: "20px 0px" } }, "2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#145DFF" } }, "\u5173\u5361\u603B\u8017\u65F6"), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#145DFF" } }, "\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))
|
|
));
|
|
};
|
|
/* harmony default export */ var Comment = ((0,_umi_production_exports.connect)(
|
|
({
|
|
shixunHomeworks,
|
|
loading,
|
|
globalSetting,
|
|
classroomList
|
|
}) => ({
|
|
shixunHomeworks,
|
|
globalSetting,
|
|
loading: loading.effects,
|
|
classroomList
|
|
})
|
|
)(Comment_ShixunsListPage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 29726:
|
|
/*!***************************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Detail/components/WorkList/components/Redo.tsx ***!
|
|
\***************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 43418);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/fetch */ 64841);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ 23852);
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && __getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
const DelShixun = (_a) => {
|
|
var _b = _a, { shixunHomeworks, dispatch } = _b, props = __objRest(_b, ["shixunHomeworks", "dispatch"]);
|
|
const params = (0,umi__WEBPACK_IMPORTED_MODULE_2__.useParams)();
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
{
|
|
centered: true,
|
|
title: "\u63D0\u793A",
|
|
open: shixunHomeworks.actionTabs.key === "\u6253\u56DE\u91CD\u505A" ? true : false,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
onOk: () => __async(void 0, null, function* () {
|
|
const res = yield (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(
|
|
`/api/myshixuns/${shixunHomeworks.actionTabs.selectArrs.myshixun_identifier}/reset_my_game.json`,
|
|
{
|
|
method: "GET",
|
|
params: { course_id: params.coursesId }
|
|
}
|
|
);
|
|
if (res.shixun_identifier) {
|
|
antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP.success("\u64CD\u4F5C\u6210\u529F");
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {}
|
|
});
|
|
dispatch({
|
|
type: "shixunHomeworks/getWorkList",
|
|
payload: __spreadValues({}, shixunHomeworks.actionTabs.params)
|
|
});
|
|
}
|
|
}),
|
|
onCancel: () => {
|
|
dispatch({
|
|
type: "shixunHomeworks/setActionTabs",
|
|
payload: {}
|
|
});
|
|
}
|
|
},
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\u786E\u5B9A\u6253\u56DE?")
|
|
);
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_2__.connect)(
|
|
({ shixunHomeworks }) => ({
|
|
shixunHomeworks
|
|
})
|
|
)(DelShixun));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 43459:
|
|
/*!*****************************************************************!*\
|
|
!*** ./src/pages/MyProblem/TestCasePanel/index.tsx + 1 modules ***!
|
|
\*****************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Y4: function() { return /* binding */ DetailCommitOut; },
|
|
Im: function() { return /* binding */ ExecuteDict; },
|
|
ZP: function() { return /* binding */ TestCasePanel; }
|
|
});
|
|
|
|
// UNUSED EXPORTS: getCommitOut
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(20008);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
var DownOutlined = __webpack_require__(77800);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/UpOutlined.js + 1 modules
|
|
var UpOutlined = __webpack_require__(23420);
|
|
// EXTERNAL MODULE: ./src/pages/MyProblem/interface.ts
|
|
var MyProblem_interface = __webpack_require__(54590);
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
var base64 = __webpack_require__(24334);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/TestCasePanel/index.less
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
// EXTERNAL MODULE: ./src/components/Spinner/index.tsx + 1 modules
|
|
var Spinner = __webpack_require__(18343);
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
|
|
var RenderHtml = __webpack_require__(92936);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(75798);
|
|
// EXTERNAL MODULE: ./node_modules/_xterm@4.8.1@xterm/lib/xterm.js
|
|
var xterm = __webpack_require__(34376);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var utils_fetch = __webpack_require__(64841);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/TestCasePanel/index.tsx
|
|
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
|
|
var __defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { TextArea } = input["default"];
|
|
const initialState = {
|
|
visible: false,
|
|
tabIndex: "0"
|
|
};
|
|
const ExecuteDict = {
|
|
[MyProblem_interface/* ExecuteStatus */.h.NOMATCH]: "\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",
|
|
[MyProblem_interface/* ExecuteStatus */.h.OK]: "\u8C03\u8BD5\u901A\u8FC7",
|
|
2: "\u8C03\u8BD5\u8D85\u65F6",
|
|
3: "\u8C03\u8BD5pod\u5931\u8D25",
|
|
4: "\u7F16\u8BD1\u5931\u8D25",
|
|
5: "\u6267\u884C\u5931\u8D25"
|
|
};
|
|
var Types = /* @__PURE__ */ ((Types2) => {
|
|
Types2[Types2["SET_VISIBLE"] = 0] = "SET_VISIBLE";
|
|
Types2[Types2["SET_TABINDEX"] = 1] = "SET_TABINDEX";
|
|
return Types2;
|
|
})(Types || {});
|
|
function Reducer(state, action) {
|
|
switch (action.type) {
|
|
case 0 /* SET_VISIBLE */:
|
|
return __spreadProps(__spreadValues({}, state), { visible: action.payload });
|
|
case 1 /* SET_TABINDEX */:
|
|
return __spreadProps(__spreadValues({}, state), { tabIndex: action.payload });
|
|
default:
|
|
throw new Error();
|
|
}
|
|
}
|
|
function DetailCommitOut(debugResult) {
|
|
const { status, error_msg, output, input, expected_output, is_file, input_file_url, output_file_url, expected_output_file_url, setMonacoValue, setData } = debugResult;
|
|
const outputRef = (0,_react_17_0_2_react.useRef)();
|
|
const inputRef = (0,_react_17_0_2_react.useRef)();
|
|
const expectedOutputRef = (0,_react_17_0_2_react.useRef)();
|
|
let rs = null;
|
|
const mdStyle = {
|
|
minHeight: 150,
|
|
marginBottom: 10,
|
|
paddingLeft: 24,
|
|
background: "#070f19",
|
|
color: "#fff"
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (output && !is_file && outputRef.current) {
|
|
const term = new xterm.Terminal({
|
|
fontSize: 14,
|
|
letterSpacing: 1,
|
|
cols: 83,
|
|
rows: 10
|
|
});
|
|
term.open(outputRef.current);
|
|
const actual_output_format = (0,util/* findEndWhitespace */.pp)(base64.Base64.decode(output));
|
|
term.write(actual_output_format);
|
|
term.setOption("theme", {
|
|
background: "#1e1e1e"
|
|
});
|
|
}
|
|
if (input && !is_file && inputRef.current) {
|
|
const term2 = new xterm.Terminal({
|
|
fontSize: 14,
|
|
letterSpacing: 1,
|
|
cols: 83,
|
|
rows: 10
|
|
});
|
|
term2.open(inputRef.current);
|
|
term2.write((0,util/* findEndWhitespace */.pp)(input));
|
|
term2.setOption("theme", {
|
|
background: "#1e1e1e"
|
|
});
|
|
}
|
|
if (expected_output && !is_file && expectedOutputRef.current) {
|
|
const term3 = new xterm.Terminal({
|
|
fontSize: 14,
|
|
letterSpacing: 1,
|
|
cols: 83,
|
|
rows: 10
|
|
});
|
|
term3.open(expectedOutputRef.current);
|
|
term3.write((0,util/* findEndWhitespace */.pp)(base64.Base64.decode(expected_output)));
|
|
term3.setOption("theme", {
|
|
background: "#1e1e1e"
|
|
});
|
|
}
|
|
}, [output]);
|
|
switch (status) {
|
|
case MyProblem_interface/* ExecuteStatus */.h.NOMATCH:
|
|
rs = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "c-red" }, "\u5B9E\u9645\u8F93\u5165\uFF1A"), !is_file && /* @__PURE__ */ React.createElement("div", { ref: inputRef }), is_file && /* @__PURE__ */ React.createElement("div", { style: mdStyle }, /* @__PURE__ */ React.createElement(
|
|
"a",
|
|
{
|
|
style: { fontSize: "16px" },
|
|
onClick: () => __async(this, null, function* () {
|
|
const res = yield fetch(input_file_url, {
|
|
method: "Get",
|
|
headers: {
|
|
"Content-Type": "application/octet-stream",
|
|
"Accept": "*/*"
|
|
}
|
|
});
|
|
setMonacoValue(yield res.text());
|
|
setTimeout(() => {
|
|
setData(input_file_url);
|
|
}, 200);
|
|
})
|
|
},
|
|
input
|
|
)), /* @__PURE__ */ React.createElement("p", { className: "c-red" }, "\u5B9E\u9645\u8F93\u51FA\uFF1A"), !is_file && /* @__PURE__ */ React.createElement("div", { ref: outputRef }), is_file && /* @__PURE__ */ React.createElement("div", { style: mdStyle }, /* @__PURE__ */ React.createElement(
|
|
"a",
|
|
{
|
|
style: { fontSize: "16px" },
|
|
onClick: () => __async(this, null, function* () {
|
|
const res = yield (0,utils_fetch/* default */.ZP)(output_file_url, {
|
|
method: "Get",
|
|
headers: {
|
|
"Content-Type": "application/xml",
|
|
"Accept": "*/*"
|
|
}
|
|
});
|
|
setMonacoValue(res);
|
|
setTimeout(() => {
|
|
setData(output_file_url);
|
|
}, 200);
|
|
})
|
|
},
|
|
output
|
|
)), /* @__PURE__ */ React.createElement("p", { className: "c-red" }, "\u9884\u671F\u8F93\u51FA\uFF1A"), !is_file && /* @__PURE__ */ React.createElement("div", { ref: expectedOutputRef }), is_file && /* @__PURE__ */ React.createElement("div", { style: mdStyle }, /* @__PURE__ */ React.createElement(
|
|
"a",
|
|
{
|
|
style: { fontSize: "16px" },
|
|
onClick: () => __async(this, null, function* () {
|
|
const res = yield fetch(expected_output_file_url, {
|
|
method: "Get",
|
|
headers: {
|
|
"Content-Type": "application/octet-stream",
|
|
"Accept": "*/*"
|
|
}
|
|
});
|
|
setMonacoValue(yield res.text());
|
|
setTimeout(() => {
|
|
setData(expected_output_file_url);
|
|
}, 200);
|
|
})
|
|
},
|
|
expected_output
|
|
)));
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.EXECUTEFAILURE:
|
|
rs = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { border: "1px #F6F7F9 solid" } }, /* @__PURE__ */ React.createElement("p", { style: { width: "100%", height: 40, background: "#F6F7F9", lineHeight: "40px", color: "#666666", paddingLeft: "12px" } }, "\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"), !is_file && /* @__PURE__ */ React.createElement(RenderHtml/* default */.Z, { value: input, style: mdStyle }), is_file && /* @__PURE__ */ React.createElement("div", { style: mdStyle }, /* @__PURE__ */ React.createElement(
|
|
"a",
|
|
{
|
|
onClick: () => (0,util/* download */.LR)(input_file_url, input)
|
|
},
|
|
input
|
|
))), /* @__PURE__ */ React.createElement("div", { style: { border: "1px #F6F7F9 solid", marginTop: "10px" } }, /* @__PURE__ */ React.createElement("p", { style: { width: "100%", height: 40, background: "#F6F7F9", lineHeight: "40px", color: "#666666", paddingLeft: "12px" } }, "\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"), /* @__PURE__ */ React.createElement("pre", { className: "error", style: { color: "#E30000", padding: "0 10px" } }, base64.Base64.decode(error_msg), "111")));
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.COMPILEFAILURE:
|
|
rs = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"), !is_file && /* @__PURE__ */ React.createElement("div", { ref: inputRef }), is_file && /* @__PURE__ */ React.createElement("div", { style: mdStyle }, /* @__PURE__ */ React.createElement(
|
|
"a",
|
|
{
|
|
onClick: () => (0,util/* download */.LR)(input_file_url, input)
|
|
},
|
|
input
|
|
)), /* @__PURE__ */ React.createElement("p", null, "\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"), /* @__PURE__ */ React.createElement("pre", { className: "error" }, base64.Base64.decode(error_msg)));
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.PODFAILURE:
|
|
rs = /* @__PURE__ */ React.createElement("p", null, "\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.TIMEOUT:
|
|
rs = /* @__PURE__ */ React.createElement("p", null, "\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
break;
|
|
}
|
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, " ", rs, " ");
|
|
}
|
|
function getCommitOut(debugResult) {
|
|
const { status, error_msg, execute_time, output, input, expected_output, is_file, input_file_url, output_file_url, expected_output_file_url } = debugResult;
|
|
let rs = null;
|
|
switch (status) {
|
|
case MyProblem_interface/* ExecuteStatus */.h.OK:
|
|
rs = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "\u6267\u884C\u7528\u65F6\uFF1A", execute_time / 1e3, "\u79D2"), /* @__PURE__ */ React.createElement("p", null, "\u6267\u884C\u7ED3\u679C\uFF1A"), /* @__PURE__ */ React.createElement("pre", null, base64.Base64.decode(output)));
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.NOMATCH:
|
|
rs = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "\u8F93\u5165\uFF1A", /* @__PURE__ */ React.createElement("pre", null, input)), /* @__PURE__ */ React.createElement("p", null, "\u8F93\u51FA\uFF1A", output && base64.Base64.decode(output)), /* @__PURE__ */ React.createElement("p", null, "\u9884\u671F\u8F93\u51FA\uFF1A", expected_output && base64.Base64.decode(expected_output)));
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.EXECUTEFAILURE:
|
|
rs = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A", /* @__PURE__ */ React.createElement("pre", null, input)), /* @__PURE__ */ React.createElement("p", null, "\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"), /* @__PURE__ */ React.createElement("pre", { className: "error" }, base64.Base64.decode(error_msg)));
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.COMPILEFAILURE:
|
|
rs = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A", /* @__PURE__ */ React.createElement("pre", null, input)), /* @__PURE__ */ React.createElement("p", null, "\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"), /* @__PURE__ */ React.createElement("pre", { className: "error" }, base64.Base64.decode(error_msg)));
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.PODFAILURE:
|
|
rs = /* @__PURE__ */ React.createElement("p", null, "\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
break;
|
|
case MyProblem_interface/* ExecuteStatus */.h.TIMEOUT:
|
|
rs = /* @__PURE__ */ React.createElement("p", null, "\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
break;
|
|
}
|
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, " ", rs, " ");
|
|
}
|
|
/* harmony default export */ var TestCasePanel = (({ input, is_file, debuging, submitting, executingMessage, debugResult, onChangeInput, onDebugCode, onSubmitCode, hack, user }) => {
|
|
const [state, dispatch] = (0,_react_17_0_2_react.useReducer)(Reducer, initialState);
|
|
const { visible, tabIndex } = state;
|
|
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
|
|
function onTabIndexChange(e) {
|
|
let id = e.target.id;
|
|
dispatch({
|
|
type: 1 /* SET_TABINDEX */,
|
|
payload: id
|
|
});
|
|
}
|
|
function onTriggerCollapse() {
|
|
dispatch({
|
|
type: 0 /* SET_VISIBLE */,
|
|
payload: !visible
|
|
});
|
|
}
|
|
const executeResult = (0,_react_17_0_2_react.useMemo)(() => {
|
|
if (debugResult) {
|
|
const { status } = debugResult;
|
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, getCommitOut(debugResult));
|
|
}
|
|
return null;
|
|
}, [debugResult]);
|
|
function onDebug() {
|
|
if (!input || is_file) {
|
|
message/* default */.ZP.error("\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B");
|
|
dispatch({
|
|
type: 0 /* SET_VISIBLE */,
|
|
payload: true
|
|
});
|
|
dispatch({
|
|
type: 1 /* SET_TABINDEX */,
|
|
payload: "0"
|
|
});
|
|
return;
|
|
}
|
|
dispatch({
|
|
type: 0 /* SET_VISIBLE */,
|
|
payload: true
|
|
});
|
|
dispatch({
|
|
type: 1 /* SET_TABINDEX */,
|
|
payload: "1"
|
|
});
|
|
onDebugCode();
|
|
}
|
|
const skip = (text) => __async(void 0, null, function* () {
|
|
let res = yield (0,utils_fetch/* default */.ZP)(`/api/problems/${text}/start.json`, {
|
|
method: "get",
|
|
params: {
|
|
hack_user_id: user == null ? void 0 : user.user_id
|
|
}
|
|
});
|
|
if (res) {
|
|
window.location.href = `/myproblems/${res == null ? void 0 : res.identifier}?type=1`;
|
|
}
|
|
});
|
|
return /* @__PURE__ */ React.createElement("div", { className: "test-case-panel" }, /* @__PURE__ */ React.createElement("div", { className: `test-case-panel-body ${visible ? "active" : ""}` }, /* @__PURE__ */ React.createElement("ul", { className: "s-navs" }, /* @__PURE__ */ React.createElement("li", null, /* @__PURE__ */ React.createElement("a", { className: tabIndex === "0" ? "active" : "", id: "0", onClick: onTabIndexChange }, "\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")), /* @__PURE__ */ React.createElement("li", null, /* @__PURE__ */ React.createElement("a", { className: tabIndex === "1" ? "active" : "", id: "1", onClick: onTabIndexChange }, "\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))), /* @__PURE__ */ React.createElement("div", { className: `tab-panel-body inputs ${tabIndex === "0" ? "" : "hide"}` }, /* @__PURE__ */ React.createElement(TextArea, { placeholder: "\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09", value: is_file ? "" : input, onChange: onChangeInput })), /* @__PURE__ */ React.createElement("div", { className: `tab-panel-body ${tabIndex === "1" ? "" : "hide"}` }, debuging ? /* @__PURE__ */ React.createElement(Spinner/* default */.Z, { message: executingMessage }) : debugResult ? /* @__PURE__ */ React.createElement("section", { style: { height: 200 } }, " ", executeResult, " ") : /* @__PURE__ */ React.createElement("p", { className: "tip" }, "\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))), /* @__PURE__ */ React.createElement("a", { className: `btn-collapse ${visible ? "up" : ""}`, onClick: onTriggerCollapse }, visible ? /* @__PURE__ */ React.createElement(DownOutlined/* default */.Z, null) : /* @__PURE__ */ React.createElement(UpOutlined/* default */.Z, null)), /* @__PURE__ */ React.createElement("footer", { className: "footer" }, /* @__PURE__ */ React.createElement("span", null, "\u63A7\u5236\u53F0"), /* @__PURE__ */ React.createElement("div", { className: "flex-container" }, (hack == null ? void 0 : hack.is_program) && (hack == null ? void 0 : hack.above_question) && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { onClick: () => skip(hack == null ? void 0 : hack.above_question), id: "oj-prev", className: "btn-blue", type: "ghost" }, "\u4E0A\u4E00\u9898"), (hack == null ? void 0 : hack.is_program) && (hack == null ? void 0 : hack.under_question) && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { onClick: () => skip(hack == null ? void 0 : hack.under_question), id: "oj-next", className: "btn-blue", type: "ghost" }, "\u4E0B\u4E00\u9898"), /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { className: "btn-green", type: "ghost", loading: debuging, onClick: onDebug }, "\u8C03\u8BD5\u4EE3\u7801"), searchParams.get("qtype") !== "8" && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { type: "primary", className: "custom-ant-disabled", loading: submitting, disabled: submitting, onClick: () => {
|
|
dispatch({
|
|
type: 0 /* SET_VISIBLE */,
|
|
payload: false
|
|
});
|
|
onSubmitCode();
|
|
} }, "\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))));
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 54590:
|
|
/*!******************************************!*\
|
|
!*** ./src/pages/MyProblem/interface.ts ***!
|
|
\******************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ h: function() { return /* binding */ ExecuteStatus; }
|
|
/* harmony export */ });
|
|
var ExecuteStatus = /* @__PURE__ */ ((ExecuteStatus2) => {
|
|
ExecuteStatus2[ExecuteStatus2["NOMATCH"] = -1] = "NOMATCH";
|
|
ExecuteStatus2[ExecuteStatus2["OK"] = 0] = "OK";
|
|
ExecuteStatus2[ExecuteStatus2["TIMEOUT"] = 2] = "TIMEOUT";
|
|
ExecuteStatus2[ExecuteStatus2["PODFAILURE"] = 3] = "PODFAILURE";
|
|
ExecuteStatus2[ExecuteStatus2["COMPILEFAILURE"] = 4] = "COMPILEFAILURE";
|
|
ExecuteStatus2[ExecuteStatus2["EXECUTEFAILURE"] = 5] = "EXECUTEFAILURE";
|
|
return ExecuteStatus2;
|
|
})(ExecuteStatus || {});
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |