|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[12884,36579,23805,62654],{
|
|
|
|
|
|
/***/ 77680:
|
|
|
/*!********************************************************************************************************!*\
|
|
|
!*** ./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/antd/es/divider/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(98541);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/divider/index.js
|
|
|
var divider = __webpack_require__(27049);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
|
var row_style = __webpack_require__(13062);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
|
var row = __webpack_require__(71230);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
|
|
|
var col_style = __webpack_require__(89032);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
|
var col = __webpack_require__(15746);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
|
|
|
var button_style = __webpack_require__(29913);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/style/index.js + 1 modules
|
|
|
var input_number_style = __webpack_require__(25359);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js + 9 modules
|
|
|
var input_number = __webpack_require__(87799);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js + 1 modules
|
|
|
var modal_style = __webpack_require__(35611);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
|
|
|
var modal = __webpack_require__(85402);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js + 1 modules
|
|
|
var message_style = __webpack_require__(14934);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
|
|
|
var message = __webpack_require__(12461);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js + 1 modules
|
|
|
var radio_style = __webpack_require__(83822);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules
|
|
|
var es_radio = __webpack_require__(29924);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
|
|
|
var monaco_editor = __webpack_require__(8691);
|
|
|
;// 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__(7);
|
|
|
// EXTERNAL MODULE: ./node_modules/js-base64/base64.js
|
|
|
var base64 = __webpack_require__(19575);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(84519);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
var RenderHtml = __webpack_require__(12768);
|
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
|
var shixunHomeworks = __webpack_require__(45678);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
|
|
var ExclamationCircleOutlined = __webpack_require__(87588);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js
|
|
|
var DeleteOutlined = __webpack_require__(82061);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStaticItem.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var options = {
|
|
|
selectOnLineNumbers: true,
|
|
|
readOnly: true,
|
|
|
minimap: {
|
|
|
enabled: false
|
|
|
},
|
|
|
scrollBeyondLastLine: false,
|
|
|
enableSplitViewResizing: false,
|
|
|
roundedSelection: false,
|
|
|
renderIndicators: false,
|
|
|
useShadows: false
|
|
|
};
|
|
|
var Types;
|
|
|
(function (Types) {
|
|
|
Types[Types["SET_PATH"] = 0] = "SET_PATH";
|
|
|
Types[Types["GET_PASSED_CONTENT"] = 1] = "GET_PASSED_CONTENT";
|
|
|
})(Types || (Types = {}));
|
|
|
function reducer(state, action) {
|
|
|
switch (action.type) {
|
|
|
case Types.SET_PATH:
|
|
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
|
selectedPath: action.payload
|
|
|
});
|
|
|
case Types.GET_PASSED_CONTENT:
|
|
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
|
passedContent: action.payload
|
|
|
});
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}
|
|
|
var ShixunsStaticItem = function ShixunsStaticItem(_ref) {
|
|
|
var language = _ref.language,
|
|
|
dispatch = _ref.dispatch,
|
|
|
shixunWorkReport = _ref.shixunWorkReport,
|
|
|
v = _ref.v,
|
|
|
languages = _ref.languages,
|
|
|
classroomList = _ref.classroomList,
|
|
|
autoHeight = _ref.autoHeight,
|
|
|
diff_code_count = _ref.diff_code_count,
|
|
|
data = _ref.data;
|
|
|
// const paths = path.split(';').filter(item => !!item)
|
|
|
// const [state, dispatch] = useReducer(reducer, { selectedPath: '123', passedContent: { language: 'python', content: '' } })
|
|
|
// const { selectedPath, passedContent } = state
|
|
|
var _useState = (0,react.useState)(languages === null || languages === void 0 ? void 0 : languages[0]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
item = _useState2[0],
|
|
|
setitem = _useState2[1];
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
(0,react.useEffect)(function () {
|
|
|
setitem(languages === null || languages === void 0 ? void 0 : languages[0]);
|
|
|
}, []);
|
|
|
(0,react.useEffect)(function () {
|
|
|
var _languages$filter;
|
|
|
// console.log('----',item);
|
|
|
setitem(languages === null || languages === void 0 ? void 0 : (_languages$filter = languages.filter(function (items) {
|
|
|
return items.language === (item === null || item === void 0 ? void 0 : item.language);
|
|
|
})) === null || _languages$filter === void 0 ? void 0 : _languages$filter[0]);
|
|
|
}, [languages]);
|
|
|
|
|
|
// function onChange(value: string) {
|
|
|
// dispatch({
|
|
|
// type: Types.SET_PATH,
|
|
|
// payload: value
|
|
|
// })
|
|
|
// }
|
|
|
|
|
|
// useEffect(() => {
|
|
|
// console.log("path:",path,data)
|
|
|
// async function init() {
|
|
|
// const response = await onPathChange(game_id, selectedPath)
|
|
|
// dispatch({
|
|
|
// type: Types.GET_PASSED_CONTENT,
|
|
|
// payload: response
|
|
|
// })
|
|
|
// }
|
|
|
// // init()
|
|
|
// }, [selectedPath, game_id])
|
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("h2", {
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"
|
|
|
}), (languages === null || languages === void 0 ? void 0 : languages.length) > 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
|
defaultValue: language,
|
|
|
style: {
|
|
|
marginLeft: 10
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
var _languages$filter2;
|
|
|
// console.log(languages,languages?.filter((item:any)=>item.language===e.target.value)?.[0]);
|
|
|
|
|
|
setitem(languages === null || languages === void 0 ? void 0 : (_languages$filter2 = languages.filter(function (item) {
|
|
|
return item.language === e.target.value;
|
|
|
})) === null || _languages$filter2 === void 0 ? void 0 : _languages$filter2[0]);
|
|
|
},
|
|
|
children: languages === null || languages === void 0 ? void 0 : languages.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.language,
|
|
|
children: item === null || item === void 0 ? void 0 : item.language
|
|
|
});
|
|
|
})
|
|
|
})]
|
|
|
}), (0,authority/* isAdmin */.GJ)() && shixunWorkReport != 'shixunWorkReport' && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u5F97\u5206 ", item === null || item === void 0 ? void 0 : item.score, "/", item === null || item === void 0 ? void 0 : item.total_score]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
style: {
|
|
|
margin: '0px 10px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
var _classroomList$Assist, _classroomList$Assist2;
|
|
|
if (!((_classroomList$Assist = classroomList.AssistantObject) !== null && _classroomList$Assist !== void 0 && (_classroomList$Assist2 = _classroomList$Assist.hack) !== null && _classroomList$Assist2 !== void 0 && _classroomList$Assist2.can_appraise) && (0,authority/* isAssistant */.Rm)()) {
|
|
|
message/* default.warn */.ZP.warn('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return;
|
|
|
}
|
|
|
var scores = item === null || item === void 0 ? void 0 : item.score;
|
|
|
modal/* default.confirm */.Z.confirm({
|
|
|
title: '调分',
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: ["\u5F97\u5206\uFF1A", item === null || item === void 0 ? void 0 : item.score, "/", item === null || item === void 0 ? void 0 : item.total_score]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
children: ["\u8C03\u5206\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
min: 0,
|
|
|
max: item === null || item === void 0 ? void 0 : item.total_score,
|
|
|
defaultValue: item === null || item === void 0 ? void 0 : item.score,
|
|
|
onChange: function onChange(e) {
|
|
|
scores = e;
|
|
|
}
|
|
|
})]
|
|
|
})]
|
|
|
}),
|
|
|
okText: '确认',
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/homework_commons/update_hack_score"), {
|
|
|
method: 'put',
|
|
|
body: {
|
|
|
course_id: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
|
hack_user_code_id: item === null || item === void 0 ? void 0 : item.hack_user_id,
|
|
|
score: scores
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default.success */.ZP.success('调分成功');
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
// console.log('----',languages,item);
|
|
|
|
|
|
// setitem(languages?.filter((items:any)=>items.language===item?.language)?.[0])
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}(),
|
|
|
cancelText: '取消'
|
|
|
});
|
|
|
},
|
|
|
type: "primary",
|
|
|
children: "\u8C03\u5206"
|
|
|
}), (0,authority/* isAdmin */.GJ)() && shixunWorkReport != 'shixunWorkReport' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
onClick: function onClick() {
|
|
|
var _classroomList$Assist3;
|
|
|
if (!((_classroomList$Assist3 = classroomList.AssistantObject.hack) !== null && _classroomList$Assist3 !== void 0 && _classroomList$Assist3.can_appraise) && (0,authority/* isAssistant */.Rm)()) {
|
|
|
message/* default.warn */.ZP.warn('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return;
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: "更改点评",
|
|
|
selectArrs: {
|
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
|
type: '1',
|
|
|
language: item === null || item === void 0 ? void 0 : item.language,
|
|
|
v: v,
|
|
|
data: objectSpread2_default()({}, shixunWorkReport)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: "\u70B9\u8BC4\u4EE3\u7801"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, {
|
|
|
height: 300,
|
|
|
language: item === null || item === void 0 ? void 0 : item.language,
|
|
|
value: base64.Base64.decode(item === null || item === void 0 ? void 0 : item.code),
|
|
|
autoHeight: autoHeight,
|
|
|
theme: "default",
|
|
|
options: options
|
|
|
}), ((item === null || item === void 0 ? void 0 : item.comment) || (item === null || item === void 0 ? void 0 : item.hidden_comment)) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
style: {
|
|
|
borderTop: '1px solid #eee'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: ShixunStaticItemmodules.title,
|
|
|
children: "\u70B9\u8BC4\u5185\u5BB9"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: "pr30",
|
|
|
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
modal/* default.confirm */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: '提示',
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {}),
|
|
|
content: '是否确认删除?',
|
|
|
onOk: function onOk() {
|
|
|
return asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return (0,shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
|
comment_id: item === null || item === void 0 ? void 0 : item.comment_id,
|
|
|
homeworkId: params.homeworkId,
|
|
|
type: 'hack'
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default.success */.ZP.success("删除成功");
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}))();
|
|
|
}
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {}), "\u5220\u9664"]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), (item === null || item === void 0 ? void 0 : item.comment) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.comment
|
|
|
})]
|
|
|
}), (item === null || item === void 0 ? void 0 : item.hidden_comment) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.hidden_comment
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ShixunStaticItem = (ShixunsStaticItem);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 13458:
|
|
|
/*!**********************************************************************************!*\
|
|
|
!*** ./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/antd/es/skeleton/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(61099);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/index.js + 11 modules
|
|
|
var skeleton = __webpack_require__(73481);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/style/index.js + 1 modules
|
|
|
var table_style = __webpack_require__(71854);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/index.js + 58 modules
|
|
|
var table = __webpack_require__(67250);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js + 1 modules
|
|
|
var message_style = __webpack_require__(14934);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
|
|
|
var message = __webpack_require__(12461);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/divider/style/index.js + 1 modules
|
|
|
var divider_style = __webpack_require__(98541);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/divider/index.js
|
|
|
var divider = __webpack_require__(27049);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
|
|
|
var button_style = __webpack_require__(29913);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
|
var row_style = __webpack_require__(13062);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
|
var row = __webpack_require__(71230);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
|
|
|
var col_style = __webpack_require__(89032);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
|
var col = __webpack_require__(15746);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/style/index.js + 1 modules
|
|
|
var breadcrumb_style = __webpack_require__(63102);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/index.js + 3 modules
|
|
|
var breadcrumb = __webpack_require__(58492);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js + 1 modules
|
|
|
var modal_style = __webpack_require__(35611);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
|
|
|
var es_modal = __webpack_require__(85402);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(70215);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/jszip/dist/jszip.min.js
|
|
|
var jszip_min = __webpack_require__(55733);
|
|
|
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
|
|
|
var ArrowLeftOutlined = __webpack_require__(82826);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules
|
|
|
var SolutionOutlined = __webpack_require__(66073);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
|
|
var ExclamationCircleOutlined = __webpack_require__(87588);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js
|
|
|
var DeleteOutlined = __webpack_require__(82061);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(59758);
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(7);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(29427);
|
|
|
;// 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__(77680);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(84519);
|
|
|
// EXTERNAL MODULE: ./node_modules/js-base64/base64.js
|
|
|
var base64 = __webpack_require__(19575);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ShixunStatic.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
autoHeight = _ref.autoHeight,
|
|
|
classroomList = _ref.classroomList,
|
|
|
user = _ref.user,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
|
var stage_list = shixunWorkReport.stage_list,
|
|
|
work_id = shixunWorkReport.work_id;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var hasPower = (0,authority/* isAdmin */.GJ)();
|
|
|
var columns = [{
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'query_index',
|
|
|
width: 120
|
|
|
}, {
|
|
|
title: '详细结果',
|
|
|
dataIndex: 'result',
|
|
|
render: function render(text, record, index) {
|
|
|
return base64.Base64.decode(text) || '- -';
|
|
|
}
|
|
|
}];
|
|
|
|
|
|
// async function onChangeScore(index: number, value: any) {
|
|
|
// const { challenge_id } = stage_list[index]
|
|
|
// const res = await dispatch({
|
|
|
// type: "shixunHomeworks/changeScore",
|
|
|
// payload: {
|
|
|
// categoryId: params.homeworkId,
|
|
|
// "type": "report",
|
|
|
// "score": value,
|
|
|
// challenge_id: challenge_id
|
|
|
// }
|
|
|
// })
|
|
|
// await dispatch({
|
|
|
// type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
// payload: { ...params },
|
|
|
// })
|
|
|
// if (res.status === 0) {
|
|
|
// message.success("操作成功")
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
function onPathChange(game_id, path) {
|
|
|
return (0,fetch/* get */.U2)("student_works/".concat(work_id, "/rep_passed_content.json"), {
|
|
|
path: path,
|
|
|
game_id: game_id
|
|
|
});
|
|
|
}
|
|
|
var datas = (0,util/* arrTrans */.qZ)(5, shixunWorkReport.hack);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react.Fragment, {
|
|
|
children: datas === null || datas === void 0 ? void 0 : datas.map(function (val, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: val.map(function (v, k) {
|
|
|
var _v$history;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Commentmodules.shixunTitle, " mt10"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
width: '100%'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fa fa-code "
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("strong", {
|
|
|
style: {
|
|
|
flex: 1
|
|
|
},
|
|
|
className: "c-black",
|
|
|
children: ["\u7B2C", key * 5 + k + 1, "\u9898 ", v.name]
|
|
|
}), v.is_finish && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
style: {
|
|
|
marginLeft: 20
|
|
|
},
|
|
|
onClick: function onClick(e) {
|
|
|
e.preventDefault();
|
|
|
window.open(v === null || v === void 0 ? void 0 : v.url);
|
|
|
localStorage.setItem('program_homework', [params.coursesId, params.categoryId]);
|
|
|
},
|
|
|
to: "".concat(v === null || v === void 0 ? void 0 : v.url),
|
|
|
children: ["\u67E5\u770B\u7B54\u9898\u8BE6\u60C5", '>>']
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "font16 mt10",
|
|
|
children: [v.is_finish === false && "本关暂未通过,无通关代码", v.is_finish && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: Commentmodules.shixunWrp,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ShixunStaticItem/* default */.Z, {
|
|
|
classroomList: classroomList,
|
|
|
user: user,
|
|
|
v: v,
|
|
|
shixunWorkReport: shixunWorkReport,
|
|
|
dispatch: dispatch,
|
|
|
autoHeight: autoHeight,
|
|
|
languages: v.languages,
|
|
|
language: v.language,
|
|
|
game_id: v.id,
|
|
|
data: base64.Base64.decode(v.code),
|
|
|
diff_code_count: v.diff_code_count,
|
|
|
onPathChange: onPathChange
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "mt10 font16",
|
|
|
children: (_v$history = v.history) !== null && _v$history !== void 0 && _v$history.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
columns: columns,
|
|
|
pagination: {
|
|
|
hideOnSinglePage: true
|
|
|
},
|
|
|
dataSource: v.history
|
|
|
}) : "本关无评测记录"
|
|
|
})]
|
|
|
}, k);
|
|
|
})
|
|
|
}, key);
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ShixunStatic = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
|
var shixunHomeworks = _ref2.shixunHomeworks,
|
|
|
loading = _ref2.loading,
|
|
|
globalSetting = _ref2.globalSetting,
|
|
|
classroomList = _ref2.classroomList,
|
|
|
user = _ref2.user;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
classroomList: classroomList,
|
|
|
user: user
|
|
|
};
|
|
|
})(ShixunsListPage));
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules
|
|
|
var input_style = __webpack_require__(69463);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(75008);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/style/index.js + 1 modules
|
|
|
var form_style = __webpack_require__(75627);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
|
|
|
var es_form = __webpack_require__(51018);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/components/ChangeCommit.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunHomeworks", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DelShixun = function DelShixun(_ref) {
|
|
|
var _shixunHomeworks$acti11, _shixunHomeworks$acti12, _shixunHomeworks$acti13;
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var _useState = (0,react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
showRequired = _useState2[0],
|
|
|
setShowRequired = _useState2[1];
|
|
|
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
(0,react.useEffect)(function () {
|
|
|
if (shixunHomeworks.actionTabs.key === '更改点评') if (shixunHomeworks.actionTabs.selectArrs.type === '1') {
|
|
|
form.setFieldsValue({
|
|
|
comment: shixunHomeworks.actionTabs.selectArrs.v.comment,
|
|
|
hidden_comment: shixunHomeworks.actionTabs.selectArrs.v.hidden_comment
|
|
|
});
|
|
|
} else {
|
|
|
var _shixunHomeworks$acti, _shixunHomeworks$acti2, _shixunHomeworks$acti3, _shixunHomeworks$acti4, _shixunHomeworks$acti5, _shixunHomeworks$acti6;
|
|
|
form.setFieldsValue({
|
|
|
comment: (_shixunHomeworks$acti = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti === void 0 ? void 0 : (_shixunHomeworks$acti2 = _shixunHomeworks$acti.data) === null || _shixunHomeworks$acti2 === void 0 ? void 0 : (_shixunHomeworks$acti3 = _shixunHomeworks$acti2.data) === null || _shixunHomeworks$acti3 === void 0 ? void 0 : _shixunHomeworks$acti3.work_comment,
|
|
|
hidden_comment: (_shixunHomeworks$acti4 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti4 === void 0 ? void 0 : (_shixunHomeworks$acti5 = _shixunHomeworks$acti4.data) === null || _shixunHomeworks$acti5 === void 0 ? void 0 : (_shixunHomeworks$acti6 = _shixunHomeworks$acti5.data) === null || _shixunHomeworks$acti6 === void 0 ? void 0 : _shixunHomeworks$acti6.work_comment_hidden
|
|
|
});
|
|
|
}
|
|
|
}, [shixunHomeworks.actionTabs.key]);
|
|
|
var quickCommit = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _shixunHomeworks$acti7, _shixunHomeworks$acti8, _shixunHomeworks$acti9, _shixunHomeworks$acti10;
|
|
|
var formValue, url, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
formValue = form.getFieldValue();
|
|
|
url = shixunHomeworks.actionTabs.selectArrs.type === '1' ? "/api/problems/".concat(shixunHomeworks.actionTabs.selectArrs.v.identifier, "/hack_comment.json") : "/api/student_works/".concat(params.homeworkId, "/shixun_work_comment.json");
|
|
|
_context.next = 4;
|
|
|
return (0,fetch/* default */.ZP)(url, {
|
|
|
method: 'post',
|
|
|
body: {
|
|
|
hidden_comment: formValue.hidden_comment,
|
|
|
comment: formValue.comment,
|
|
|
language: (_shixunHomeworks$acti7 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti7 === void 0 ? void 0 : _shixunHomeworks$acti7.language,
|
|
|
user_id: (_shixunHomeworks$acti8 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti8 === void 0 ? void 0 : (_shixunHomeworks$acti9 = _shixunHomeworks$acti8.data) === null || _shixunHomeworks$acti9 === void 0 ? void 0 : (_shixunHomeworks$acti10 = _shixunHomeworks$acti9.data) === null || _shixunHomeworks$acti10 === void 0 ? void 0 : _shixunHomeworks$acti10.user_id
|
|
|
}
|
|
|
});
|
|
|
case 4:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default.success */.ZP.success('评阅成功');
|
|
|
form.resetFields();
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function quickCommit() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [((_shixunHomeworks$acti11 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti11 === void 0 ? void 0 : _shixunHomeworks$acti11.type) === '1' ? '点评代码' : '更改点评', ((_shixunHomeworks$acti12 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti12 === void 0 ? void 0 : _shixunHomeworks$acti12.language) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
marginLeft: 10,
|
|
|
fontSize: 14
|
|
|
},
|
|
|
children: ["\u4F7F\u7528\u8BED\u8A00\uFF1A", (_shixunHomeworks$acti13 = shixunHomeworks.actionTabs.selectArrs) === null || _shixunHomeworks$acti13 === void 0 ? void 0 : _shixunHomeworks$acti13.language]
|
|
|
})]
|
|
|
}),
|
|
|
open: shixunHomeworks.actionTabs.key === '更改点评' ? true : false,
|
|
|
okText: "\u786E\u5B9A",
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var formValue;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
formValue = form.getFieldValue();
|
|
|
if (JSON.stringify(formValue) === '{}' || formValue.hidden_comment === '' && formValue.comment === '') {
|
|
|
setShowRequired(true);
|
|
|
} else {
|
|
|
quickCommit();
|
|
|
}
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
form: form,
|
|
|
onChange: function onChange() {
|
|
|
if (showRequired) setShowRequired(false);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: "\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
name: "comment",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default.TextArea */.Z.TextArea, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",
|
|
|
rows: 8
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: "\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
name: "hidden_comment",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default.TextArea */.Z.TextArea, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",
|
|
|
rows: 8
|
|
|
})
|
|
|
})]
|
|
|
}), showRequired && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "c-red",
|
|
|
children: "\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var ChangeCommit = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var shixunHomeworks = _ref4.shixunHomeworks;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks
|
|
|
};
|
|
|
})(DelShixun));
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Detail/components/WorkList/components/Redo.tsx
|
|
|
var Redo = __webpack_require__(52625);
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
var RenderHtml = __webpack_require__(12768);
|
|
|
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
|
|
|
var service_shixunHomeworks = __webpack_require__(45678);
|
|
|
// EXTERNAL MODULE: ./node_modules/html2pdf.js/dist/html2pdf.js
|
|
|
var html2pdf = __webpack_require__(80599);
|
|
|
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/Comment/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Comment_excluded = ["shixunHomeworks", "globalSetting", "loading", "classroomList", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var _shixunWorkReport$cat, _shixunWorkReport$cat2, _shixunWorkReport$cat3, _shixunWorkReport$cat4, _shixunWorkReport$cat5, _shixunWorkReport$dat, _shixunWorkReport$cat6, _shixunWorkReport$dat2, _shixunWorkReport$dat3, _shixunWorkReport$dat4, _shixunWorkReport$dat5, _shixunWorkReport$dat6, _shixunWorkReport$dat7, _shixunWorkReport$dat8, _shixunWorkReport$dat9, _shixunWorkReport$dat10, _shixunWorkReport$dat11, _shixunWorkReport$dat12, _shixunWorkReport$dat13, _shixunWorkReport$dat14, _shixunWorkReport$dat15, _shixunWorkReport$dat16, _shixunWorkReport$dat17, _shixunWorkReport$dat18, _shixunWorkReport$dat19, _shixunWorkReport$dat21, _shixunWorkReport$dat22, _shixunWorkReport$dat23, _shixunWorkReport$dat24, _shixunWorkReport$dat25, _shixunWorkReport$dat26;
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
classroomList = _ref.classroomList,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, Comment_excluded);
|
|
|
var _useState = (0,react.useState)(objectSpread2_default()({}, (0,_umi_production_exports.useParams)())),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
var _params = (0,_umi_production_exports.useParams)();
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
// checkbox checked储存
|
|
|
var _useState3 = (0,react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 0);
|
|
|
var _useState5 = (0,react.useState)({
|
|
|
last: false
|
|
|
}),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
nextComment = _useState6[0],
|
|
|
setNextComment = _useState6[1];
|
|
|
var _useState7 = (0,react.useState)({
|
|
|
last: false
|
|
|
}),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
Previous = _useState8[0],
|
|
|
setPrevious = _useState8[1];
|
|
|
var reportElement = (0,react.useRef)();
|
|
|
var reportElementInfo = (0,react.useRef)();
|
|
|
var _useState9 = (0,react.useState)(false),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
isExportLoading = _useState10[0],
|
|
|
setIsExportLoading = _useState10[1];
|
|
|
var _useState11 = (0,react.useState)(false),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
spinning = _useState12[0],
|
|
|
setSpinning = _useState12[1];
|
|
|
var _useState13 = (0,react.useState)(false),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
autoHeight = _useState14[0],
|
|
|
setAutoHeight = _useState14[1];
|
|
|
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
|
|
|
var _useState15 = (0,react.useState)(new (jszip_min_default())()),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
zip = _useState16[0],
|
|
|
setZip = _useState16[1];
|
|
|
var _useState17 = (0,react.useState)([]),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
allStudentWorks = _useState18[0],
|
|
|
setAllStudentWorks = _useState18[1];
|
|
|
var _useState19 = (0,react.useState)(false),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
isshow = _useState20[0],
|
|
|
setIsshow = _useState20[1];
|
|
|
var _useState21 = (0,react.useState)(false),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
isshows = _useState22[0],
|
|
|
setIsshows = _useState22[1];
|
|
|
(0,react.useEffect)(function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: false
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'classroomList/getAssistantPermissions',
|
|
|
payload: {
|
|
|
course_id: params.coursesId
|
|
|
}
|
|
|
});
|
|
|
return function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: true
|
|
|
});
|
|
|
};
|
|
|
}, []);
|
|
|
(0,react.useEffect)(function () {
|
|
|
if (shixunHomeworks.actionTabs.key === '导出实训报告' && allStudentWorks.length > 0) {
|
|
|
exportReport('all');
|
|
|
}
|
|
|
}, [allStudentWorks]);
|
|
|
(0,react.useEffect)(function () {
|
|
|
setParams(objectSpread2_default()({}, _params));
|
|
|
}, [location.pathname]);
|
|
|
var scrollView = function scrollView() {
|
|
|
document.body.scrollIntoView();
|
|
|
};
|
|
|
function getData() {
|
|
|
return _getData.apply(this, arguments);
|
|
|
} // 解决导出 bug: DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D'
|
|
|
function _getData() {
|
|
|
_getData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
|
var _res$all_student_work, _res$all_student_work2;
|
|
|
var paylaod, res, key, _res$all_student_work3, _res$all_student_work4;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context12) {
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
case 0:
|
|
|
paylaod = JSON.parse(sessionStorage['all_student_works_params'] || '{}');
|
|
|
_context12.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getAllStudentWorks',
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), paylaod)
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context12.sent;
|
|
|
// setSpinning(false);
|
|
|
setAllStudentWorks(res['all_student_works']);
|
|
|
key = (_res$all_student_work = res['all_student_works']) === null || _res$all_student_work === void 0 ? void 0 : _res$all_student_work.map(function (item) {
|
|
|
return String(item.user_id);
|
|
|
}).indexOf(params.homeworkId);
|
|
|
if (key === ((_res$all_student_work2 = res['all_student_works']) === null || _res$all_student_work2 === void 0 ? void 0 : _res$all_student_work2.length) - 1) {
|
|
|
setNextComment({
|
|
|
last: true
|
|
|
});
|
|
|
} else {
|
|
|
setNextComment((_res$all_student_work3 = res['all_student_works']) === null || _res$all_student_work3 === void 0 ? void 0 : _res$all_student_work3[key + 1]);
|
|
|
}
|
|
|
if (key === 0) {
|
|
|
setPrevious({
|
|
|
last: true
|
|
|
});
|
|
|
} else {
|
|
|
setPrevious((_res$all_student_work4 = res['all_student_works']) === null || _res$all_student_work4 === void 0 ? void 0 : _res$all_student_work4[key - 1]);
|
|
|
}
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context12.stop();
|
|
|
}
|
|
|
}, _callee10);
|
|
|
}));
|
|
|
return _getData.apply(this, arguments);
|
|
|
}
|
|
|
var handleRemoveSurplusCanvas = function handleRemoveSurplusCanvas() {
|
|
|
document.querySelectorAll('canvas').forEach(function (item) {
|
|
|
(!item.clientWidth || !item.clientHeight) && item.remove();
|
|
|
});
|
|
|
};
|
|
|
var setMonocoHeight = function setMonocoHeight() {
|
|
|
if (reportElement.current.offsetHeight > 62000) {
|
|
|
setAutoHeight(false);
|
|
|
} else {
|
|
|
setAutoHeight(true);
|
|
|
}
|
|
|
};
|
|
|
var exportReport = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(type) {
|
|
|
var nums, modal, opt, next, _next, _shixunWorkReport$shi, pages, worker, folder, _loop, i, codeF;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
_next = function _next3() {
|
|
|
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
_context6.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: {
|
|
|
homeworkId: allStudentWorks[nums]['user_id']
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context6.sent;
|
|
|
scrollView();
|
|
|
nums++;
|
|
|
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var _res$shixun_detail;
|
|
|
var folders, pages, worker, _loop2, _i, codesF;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
handleRemoveSurplusCanvas();
|
|
|
folders = zip.folder("".concat(res === null || res === void 0 ? void 0 : res.username));
|
|
|
pages = document.querySelector('#export-all').children;
|
|
|
worker = html2pdf_default()();
|
|
|
_loop2 = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop2(i) {
|
|
|
return regeneratorRuntime_default()().wrap(function _loop2$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
if (!(i < pages.length - 1)) {
|
|
|
_context3.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context3.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function (_x3) {
|
|
|
return _ref5.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _loop2);
|
|
|
});
|
|
|
_i = 0;
|
|
|
case 6:
|
|
|
if (!(_i < pages.length)) {
|
|
|
_context5.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
return _context5.delegateYield(_loop2(_i), "t0", 8);
|
|
|
case 8:
|
|
|
_i++;
|
|
|
_context5.next = 6;
|
|
|
break;
|
|
|
case 11:
|
|
|
folders.file("".concat(allStudentWorks[nums - 1]['student_work_user_name']).concat(nums, ".pdf"), worker.output("blob"));
|
|
|
// folder.file(`${shixunWorkReport.username}.pdf`, worker.output("blob"), { base64: false });
|
|
|
codesF = folders.folder("代码文件");
|
|
|
res === null || res === void 0 ? void 0 : (_res$shixun_detail = res.shixun_detail) === null || _res$shixun_detail === void 0 ? void 0 : _res$shixun_detail.map(function (item, index) {
|
|
|
var _item$game_codes2;
|
|
|
var codesG = codesF.folder("\u7B2C".concat(index + 1, "\u5173-").concat(item.subject, "-").concat(item.id));
|
|
|
item === null || item === void 0 ? void 0 : (_item$game_codes2 = item.game_codes) === null || _item$game_codes2 === void 0 ? void 0 : _item$game_codes2.map(function (i) {
|
|
|
codesG.file("".concat(i.filename, ".txt"), i === null || i === void 0 ? void 0 : i.content);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
// zip.file(`${allStudentWorks[nums - 1]['student_work_user_name']}${nums}.pdf`, pdfUrl);
|
|
|
modal.update({
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: nums
|
|
|
}), "/", allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length, /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"]
|
|
|
})
|
|
|
});
|
|
|
if (nums == (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length)) {
|
|
|
modal.destroy();
|
|
|
download();
|
|
|
} else {
|
|
|
next();
|
|
|
}
|
|
|
case 16:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})), 2200);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return _next.apply(this, arguments);
|
|
|
};
|
|
|
next = function _next2() {
|
|
|
return _next.apply(this, arguments);
|
|
|
};
|
|
|
nums = 0;
|
|
|
// if (type !== 'all')
|
|
|
// setIsExportLoading(true)
|
|
|
// else
|
|
|
modal = es_modal/* default.info */.Z.info({
|
|
|
width: 460,
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3"
|
|
|
})]
|
|
|
}),
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: nums + 1
|
|
|
}), "/", type !== 'all' ? 1 : allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length, /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"]
|
|
|
}),
|
|
|
maskClosable: false,
|
|
|
className: Commentmodules.modal,
|
|
|
onOk: function onOk() {}
|
|
|
});
|
|
|
opt = {
|
|
|
margin: [0, 0],
|
|
|
filename: "".concat(shixunWorkReport.username, ".pdf"),
|
|
|
// image: {
|
|
|
// type: 'jpeg',
|
|
|
// quality: 0.98
|
|
|
// },
|
|
|
html2canvas: {
|
|
|
// dpi: 192,
|
|
|
// scale:2,
|
|
|
useCORS: true,
|
|
|
letterRendering: true
|
|
|
},
|
|
|
jsPDF: {
|
|
|
unit: 'mm',
|
|
|
format: 'a4',
|
|
|
orientation: 'landscape'
|
|
|
// unit: 'pt', format: [1200, 800], orientation: 'portrait'
|
|
|
}
|
|
|
};
|
|
|
if (!(type !== 'all' || (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length) < 2)) {
|
|
|
_context7.next = 27;
|
|
|
break;
|
|
|
}
|
|
|
handleRemoveSurplusCanvas();
|
|
|
scrollView();
|
|
|
|
|
|
// await new Promise(function (resolve, reject) {
|
|
|
// setMonocoHeight()
|
|
|
// setTimeout(function () {
|
|
|
// resolve('');
|
|
|
// }, 1500);
|
|
|
// });
|
|
|
pages = reportElementInfo.current.children;
|
|
|
worker = html2pdf_default()();
|
|
|
folder = zip.folder("".concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.username));
|
|
|
_loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop(i) {
|
|
|
return regeneratorRuntime_default()().wrap(function _loop$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(i < pages.length - 1)) {
|
|
|
_context.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function (_x2) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _loop);
|
|
|
});
|
|
|
i = 0;
|
|
|
case 13:
|
|
|
if (!(i < pages.length)) {
|
|
|
_context7.next = 18;
|
|
|
break;
|
|
|
}
|
|
|
return _context7.delegateYield(_loop(i), "t0", 15);
|
|
|
case 15:
|
|
|
i++;
|
|
|
_context7.next = 13;
|
|
|
break;
|
|
|
case 18:
|
|
|
setIsExportLoading(false);
|
|
|
|
|
|
// zip.file(`${shixunWorkReport.username}.pdf`, pdfUrl);
|
|
|
folder.file("".concat(shixunWorkReport.username, ".pdf"), worker.output("blob"), {
|
|
|
base64: false
|
|
|
});
|
|
|
codeF = folder.folder("代码文件");
|
|
|
shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$shi = shixunWorkReport.shixun_detail) === null || _shixunWorkReport$shi === void 0 ? void 0 : _shixunWorkReport$shi.map(function (item, index) {
|
|
|
var _item$game_codes;
|
|
|
var codesG = codeF.folder("\u7B2C".concat(index + 1, "\u5173-").concat(item.subject, "-").concat(item.id));
|
|
|
item === null || item === void 0 ? void 0 : (_item$game_codes = item.game_codes) === null || _item$game_codes === void 0 ? void 0 : _item$game_codes.map(function (i) {
|
|
|
codesG.file("".concat(i.filename, ".txt"), i === null || i === void 0 ? void 0 : i.content);
|
|
|
});
|
|
|
});
|
|
|
// worker.save()
|
|
|
modal.destroy();
|
|
|
download();
|
|
|
return _context7.abrupt("return");
|
|
|
case 27:
|
|
|
next();
|
|
|
case 28:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return function exportReport(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var download = function download() {
|
|
|
zip.generateAsync({
|
|
|
type: "blob"
|
|
|
}).then(function (content) {
|
|
|
var link = document.createElement('a');
|
|
|
link.href = window.URL.createObjectURL(content);
|
|
|
link.download = shixunWorkReport.course_name + '.zip';
|
|
|
//此写法兼容可火狐浏览器
|
|
|
document.body.appendChild(link);
|
|
|
var evt = document.createEvent("MouseEvents");
|
|
|
evt.initEvent("click", false, false);
|
|
|
link.dispatchEvent(evt);
|
|
|
document.body.removeChild(link);
|
|
|
setZip(new (jszip_min_default())());
|
|
|
});
|
|
|
setAutoHeight(false);
|
|
|
};
|
|
|
(0,react.useEffect)(function () {
|
|
|
initData();
|
|
|
}, [params.homeworkId]);
|
|
|
var initData = /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
setSpinning(true);
|
|
|
_context8.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
case 3:
|
|
|
setSpinning(false);
|
|
|
if ((0,authority/* isAdmin */.GJ)()) getData();
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function initData() {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var columns = [{
|
|
|
title: '题号',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record, index) {
|
|
|
return index + 1;
|
|
|
}
|
|
|
}, {
|
|
|
title: '题目名称',
|
|
|
dataIndex: 'name',
|
|
|
ellipsis: true,
|
|
|
width: '30%'
|
|
|
}, {
|
|
|
title: '完成时间',
|
|
|
dataIndex: 'finish_time',
|
|
|
width: '200px',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem, _record$subitem$map;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 ? void 0 : (_record$subitem = record.subitem) === null || _record$subitem === void 0 ? void 0 : (_record$subitem$map = _record$subitem.map(function (item) {
|
|
|
return item.finish_time;
|
|
|
})) === null || _record$subitem$map === void 0 ? void 0 : _record$subitem$map.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'submit_count',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem2, _record$subitem2$map;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 ? void 0 : (_record$subitem2 = record.subitem) === null || _record$subitem2 === void 0 ? void 0 : (_record$subitem2$map = _record$subitem2.map(function (item) {
|
|
|
return item.submit_count;
|
|
|
})) === null || _record$subitem2$map === void 0 ? void 0 : _record$subitem2$map.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '运行时间(ms)',
|
|
|
dataIndex: 'run_time',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem3, _record$subitem3$map;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 ? void 0 : (_record$subitem3 = record.subitem) === null || _record$subitem3 === void 0 ? void 0 : (_record$subitem3$map = _record$subitem3.map(function (item) {
|
|
|
return item.run_time;
|
|
|
})) === null || _record$subitem3$map === void 0 ? void 0 : _record$subitem3$map.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '内存(kb)',
|
|
|
dataIndex: 'memory',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem4, _record$subitem4$map;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 ? void 0 : (_record$subitem4 = record.subitem) === null || _record$subitem4 === void 0 ? void 0 : (_record$subitem4$map = _record$subitem4.map(function (item) {
|
|
|
return item.memory;
|
|
|
})) === null || _record$subitem4$map === void 0 ? void 0 : _record$subitem4$map.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '使用语言',
|
|
|
dataIndex: 'language',
|
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem5, _record$subitem5$map;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 ? void 0 : (_record$subitem5 = record.subitem) === null || _record$subitem5 === void 0 ? void 0 : (_record$subitem5$map = _record$subitem5.map(function (item) {
|
|
|
return item.language;
|
|
|
})) === null || _record$subitem5$map === void 0 ? void 0 : _record$subitem5$map.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '得分',
|
|
|
dataIndex: 'score',
|
|
|
// render: (text: number) => (toTimeFormat(text))
|
|
|
render: function render(text, record, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '排名',
|
|
|
dataIndex: 'rank',
|
|
|
render: function render(text, record, index) {
|
|
|
var _record$subitem6, _record$subitem6$map;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: text || '- -'
|
|
|
}), record === null || record === void 0 ? void 0 : (_record$subitem6 = record.subitem) === null || _record$subitem6 === void 0 ? void 0 : (_record$subitem6$map = _record$subitem6.map(function (item) {
|
|
|
return item.rank;
|
|
|
})) === null || _record$subitem6$map === void 0 ? void 0 : _record$subitem6$map.map(function (ite) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: ite || '- -'
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var skip = function skip(type) {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: '',
|
|
|
type: 2
|
|
|
}
|
|
|
});
|
|
|
setTimeout(function () {
|
|
|
if (type === 'next') {
|
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/program_homework/").concat(params.categoryId, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.student_work_id, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.user_id, "/comment"));
|
|
|
} else {
|
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/program_homework/").concat(params.categoryId, "/").concat(nextComment === null || nextComment === void 0 ? void 0 : nextComment.student_work_id, "/").concat(Previous === null || Previous === void 0 ? void 0 : Previous.user_id, "/comment"));
|
|
|
}
|
|
|
}, 200);
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "bg-fafafa",
|
|
|
style: {
|
|
|
position: "sticky",
|
|
|
top: 0
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "edu-container mt10",
|
|
|
style: {
|
|
|
paddingBottom: 100
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
|
loading: spinning,
|
|
|
active: true,
|
|
|
avatar: {
|
|
|
size: 40
|
|
|
},
|
|
|
paragraph: {
|
|
|
rows: 5
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "edu-container",
|
|
|
children: [(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$cat = shixunWorkReport.category) === null || _shixunWorkReport$cat === void 0 ? void 0 : _shixunWorkReport$cat.course_id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "animated fadeIn",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "",
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.category) && /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
|
|
separator: ">",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$cat2 = shixunWorkReport.category) === null || _shixunWorkReport$cat2 === void 0 ? void 0 : _shixunWorkReport$cat2.course_id, "/program_homework"),
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$cat3 = shixunWorkReport.category) === null || _shixunWorkReport$cat3 === void 0 ? void 0 : _shixunWorkReport$cat3.course_name
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$cat4 = shixunWorkReport.category) === null || _shixunWorkReport$cat4 === void 0 ? void 0 : _shixunWorkReport$cat4.course_id, "/program_homework"),
|
|
|
children: shixunWorkReport.category.category_name
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$cat5 = shixunWorkReport.category) === null || _shixunWorkReport$cat5 === void 0 ? void 0 : _shixunWorkReport$cat5.course_id, "/program_homework/").concat(params === null || params === void 0 ? void 0 : params.categoryId, "/detail"),
|
|
|
children: "\u4F5C\u4E1A\u8BE6\u60C5"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat = shixunWorkReport.data) === null || _shixunWorkReport$dat === void 0 ? void 0 : _shixunWorkReport$dat.user_name
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: [Commentmodules.title1, 'mt20'].join(' '),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(params.coursesId, "/program_homework/").concat(params === null || params === void 0 ? void 0 : params.categoryId, "/detail"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
|
|
|
className: "font16 c-black"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
className: "font20 ml5",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$cat6 = shixunWorkReport.category) === null || _shixunWorkReport$cat6 === void 0 ? void 0 : _shixunWorkReport$cat6.homework_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* StatusClassroomsTags */.VV, {
|
|
|
temporary: true,
|
|
|
status: shixunWorkReport.homework_status
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "mt30 relative"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "edu-container bg-white",
|
|
|
ref: reportElement,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
id: "export-all",
|
|
|
ref: reportElementInfo,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
id: "export-all-1",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Commentmodules.title,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
children: "\u603B\u4F53\u8BC4\u4EF7"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
className: "mr20",
|
|
|
type: "primary",
|
|
|
onClick: function onClick() {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: "更改点评",
|
|
|
selectArrs: {
|
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
|
data: objectSpread2_default()({}, shixunWorkReport)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SolutionOutlined/* default */.Z, {}), shixunWorkReport !== null && shixunWorkReport !== void 0 && (_shixunWorkReport$dat2 = shixunWorkReport.data) !== null && _shixunWorkReport$dat2 !== void 0 && _shixunWorkReport$dat2.has_comment ? "更改点评" : "点评作业"]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: 0
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "pl30 pr30",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
className: Commentmodules.userPic,
|
|
|
src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat3 = shixunWorkReport.data) === null || _shixunWorkReport$dat3 === void 0 ? void 0 : _shixunWorkReport$dat3.image_url),
|
|
|
alt: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat4 = shixunWorkReport.data) === null || _shixunWorkReport$dat4 === void 0 ? void 0 : _shixunWorkReport$dat4.username
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16 ml40",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat5 = shixunWorkReport.data) === null || _shixunWorkReport$dat5 === void 0 ? void 0 : _shixunWorkReport$dat5.user_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkDetailStatus */.UQ, {
|
|
|
status: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat6 = shixunWorkReport.data) === null || _shixunWorkReport$dat6 === void 0 ? void 0 : _shixunWorkReport$dat6.compelete_status
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: Commentmodules.userInfo,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5B66\u53F7\uFF1A", (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat7 = shixunWorkReport.data) === null || _shixunWorkReport$dat7 === void 0 ? void 0 : _shixunWorkReport$dat7.student_id) || '--']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5206\u73ED\uFF1A", (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat8 = shixunWorkReport.data) === null || _shixunWorkReport$dat8 === void 0 ? void 0 : _shixunWorkReport$dat8.course_group) || '--']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u622A\u6B62\u524D\u5B8C\u6210\u5237\u9898\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat9 = shixunWorkReport.data) === null || _shixunWorkReport$dat9 === void 0 ? void 0 : _shixunWorkReport$dat9.finish_do
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u6700\u65B0\u5B8C\u6210\u5237\u9898\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat10 = shixunWorkReport.data) === null || _shixunWorkReport$dat10 === void 0 ? void 0 : _shixunWorkReport$dat10.latest_do) || '-'
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: [Commentmodules.listItem, 'mt10'].join(' '),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5B8C\u6210\u65F6\u95F4"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-light-black mt20",
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.data) && (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat11 = shixunWorkReport.data) === null || _shixunWorkReport$dat11 === void 0 ? void 0 : _shixunWorkReport$dat11.finish_time)
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("strong", {
|
|
|
children: ["\u5B8C\u6210\u65F6\u957F", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
e.preventDefault();
|
|
|
setIsshows(true);
|
|
|
},
|
|
|
style: {
|
|
|
marginLeft: 4,
|
|
|
display: 'none',
|
|
|
color: '#145DFF',
|
|
|
fontSize: 16,
|
|
|
cursor: 'pointer'
|
|
|
},
|
|
|
className: "iconfont icon-tishixiaowenhao"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-light-black mt20",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat12 = shixunWorkReport.data) === null || _shixunWorkReport$dat12 === void 0 ? void 0 : _shixunWorkReport$dat12.finish_time_long
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u8BC4\u6D4B\u6B21\u6570"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat13 = shixunWorkReport.data) === null || _shixunWorkReport$dat13 === void 0 ? void 0 : _shixunWorkReport$dat13.submit_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u901A\u8FC7\u7387"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat14 = shixunWorkReport.data) === null || _shixunWorkReport$dat14 === void 0 ? void 0 : _shixunWorkReport$dat14.pass_rate) || '- -'
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5F97\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat15 = shixunWorkReport.data) === null || _shixunWorkReport$dat15 === void 0 ? void 0 : _shixunWorkReport$dat15.score
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u7EC3\u4E60\u603B\u6392\u540D"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat16 = shixunWorkReport.data) === null || _shixunWorkReport$dat16 === void 0 ? void 0 : _shixunWorkReport$dat16.total_rank
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5206\u73ED\u6392\u540D"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat17 = shixunWorkReport.data) === null || _shixunWorkReport$dat17 === void 0 ? void 0 : _shixunWorkReport$dat17.class_rank
|
|
|
})
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), ((shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat18 = shixunWorkReport.data) === null || _shixunWorkReport$dat18 === void 0 ? void 0 : _shixunWorkReport$dat18.work_comment_hidden) || (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat19 = shixunWorkReport.data) === null || _shixunWorkReport$dat19 === void 0 ? void 0 : _shixunWorkReport$dat19.work_comment)) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u70B9\u8BC4\u5185\u5BB9"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: "pr30",
|
|
|
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context10) {
|
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
|
case 0:
|
|
|
es_modal/* default.confirm */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: '提示',
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {}),
|
|
|
content: '是否确认删除?',
|
|
|
onOk: function onOk() {
|
|
|
return asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
var _shixunWorkReport$dat20;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context9) {
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
case 0:
|
|
|
_context9.next = 2;
|
|
|
return (0,service_shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
|
|
|
comment_id: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat20 = shixunWorkReport.data) === null || _shixunWorkReport$dat20 === void 0 ? void 0 : _shixunWorkReport$dat20.comment_id,
|
|
|
homeworkId: params.homeworkId
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context9.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default.success */.ZP.success("删除成功");
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getShixunWorkReports',
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context9.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}))();
|
|
|
}
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context10.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
})),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {}), "\u5220\u9664"]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
margin: 0
|
|
|
}
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat21 = shixunWorkReport.data) === null || _shixunWorkReport$dat21 === void 0 ? void 0 : _shixunWorkReport$dat21.work_comment) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat22 = shixunWorkReport.data) === null || _shixunWorkReport$dat22 === void 0 ? void 0 : _shixunWorkReport$dat22.work_comment
|
|
|
})]
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat23 = shixunWorkReport.data) === null || _shixunWorkReport$dat23 === void 0 ? void 0 : _shixunWorkReport$dat23.work_comment_hidden) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: "pl30 pr30 mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black font12",
|
|
|
children: "# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat24 = shixunWorkReport.data) === null || _shixunWorkReport$dat24 === void 0 ? void 0 : _shixunWorkReport$dat24.work_comment_hidden
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u9636\u6BB5\u6210\u7EE9"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
dataSource: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.hack,
|
|
|
pagination: false,
|
|
|
columns: columns
|
|
|
})
|
|
|
}), (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat25 = shixunWorkReport.data) === null || _shixunWorkReport$dat25 === void 0 ? void 0 : _shixunWorkReport$dat25.work_description) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u4E2A\u4EBA\u603B\u7ED3"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "pl30 pr30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : (_shixunWorkReport$dat26 = shixunWorkReport.data) === null || _shixunWorkReport$dat26 === void 0 ? void 0 : _shixunWorkReport$dat26.work_description
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
|
className: Commentmodules.title,
|
|
|
children: "\u5237\u9898\u8BE6\u60C5"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ShixunStatic, {
|
|
|
autoHeight: autoHeight
|
|
|
})]
|
|
|
})
|
|
|
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "".concat(Commentmodules.footerBar, " ").concat(isExportLoading ? Commentmodules.footerBarStatic : ''),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "edu-container",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
className: Commentmodules.exitComment,
|
|
|
to: "/classrooms/".concat(params.coursesId, "/program_homework/").concat(params.categoryId, "/detail"),
|
|
|
children: "\u8FD4\u56DE\u5217\u8868"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
className: "tr",
|
|
|
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
type: "primary",
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
var _classroomList$Assist;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context11) {
|
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
|
case 0:
|
|
|
if (!(!((_classroomList$Assist = classroomList.AssistantObject.hack) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise) && (0,authority/* isAssistant */.Rm)())) {
|
|
|
_context11.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default.warn */.ZP.warn('您未获取此权限,需向管理员申请权限才能使用此功能');
|
|
|
return _context11.abrupt("return");
|
|
|
case 3:
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: "更改点评",
|
|
|
selectArrs: {
|
|
|
myshixun_identifier: shixunWorkReport.user_id,
|
|
|
data: objectSpread2_default()({}, shixunWorkReport)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context11.stop();
|
|
|
}
|
|
|
}, _callee9);
|
|
|
})),
|
|
|
children: "\u70B9\u8BC4\u4F5C\u4E1A"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ChangeCommit, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(Redo/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
|
open: isshow,
|
|
|
width: 860,
|
|
|
centered: true,
|
|
|
onCancel: function onCancel() {
|
|
|
setIsshow(false);
|
|
|
},
|
|
|
title: "\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",
|
|
|
footer: null,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
color: '#333333',
|
|
|
fontWeight: 400
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
fontWeight: 500
|
|
|
},
|
|
|
children: "1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: " \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#FA6400',
|
|
|
display: 'flex',
|
|
|
height: 34,
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
children: " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
color: '#333333',
|
|
|
marginTop: 20,
|
|
|
fontWeight: 400
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
fontWeight: 500
|
|
|
},
|
|
|
children: "2\u3001\u5173\u5361\u603B\u8017\u65F6"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {},
|
|
|
children: "\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: " \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#FA6400',
|
|
|
display: 'flex',
|
|
|
height: 44,
|
|
|
paddingTop: 10
|
|
|
},
|
|
|
children: " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
color: '#333333',
|
|
|
marginTop: 20,
|
|
|
fontWeight: 400
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
fontWeight: 500
|
|
|
},
|
|
|
children: "3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {},
|
|
|
children: "\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
color: '#333333',
|
|
|
marginTop: 20,
|
|
|
fontWeight: 400
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
fontWeight: 500
|
|
|
},
|
|
|
children: "\u89C4\u5219\u76EE\u7684"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {},
|
|
|
children: "\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
open: isshows,
|
|
|
title: "\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",
|
|
|
centered: true,
|
|
|
footer: null,
|
|
|
onCancel: function onCancel() {
|
|
|
setIsshows(false);
|
|
|
},
|
|
|
width: 600,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
fontWeight: 400,
|
|
|
color: '#333333'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#145DFF'
|
|
|
},
|
|
|
children: "\u9875\u9762\u505C\u7559\u65F6\u957F"
|
|
|
}), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
margin: '20px 0px'
|
|
|
},
|
|
|
children: ["2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#145DFF'
|
|
|
},
|
|
|
children: "\u5173\u5361\u603B\u8017\u65F6"
|
|
|
}), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#145DFF'
|
|
|
},
|
|
|
children: "\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"
|
|
|
}), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Comment = ((0,_umi_production_exports.connect)(function (_ref9) {
|
|
|
var shixunHomeworks = _ref9.shixunHomeworks,
|
|
|
loading = _ref9.loading,
|
|
|
globalSetting = _ref9.globalSetting,
|
|
|
classroomList = _ref9.classroomList;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(Comment_ShixunsListPage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 52625:
|
|
|
/*!***************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/ProgramHomework/Detail/components/WorkList/components/Redo.tsx ***!
|
|
|
\***************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ 35611);
|
|
|
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd/es/modal */ 85402);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/message/style */ 14934);
|
|
|
/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd/es/message */ 12461);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js */ 70215);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/fetch */ 84519);
|
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! umi */ 89214);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunHomeworks", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DelShixun = function DelShixun(_ref) {
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5___default()(_ref, _excluded);
|
|
|
var params = (0,umi__WEBPACK_IMPORTED_MODULE_8__.useParams)();
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(antd_es_modal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
|
centered: true,
|
|
|
title: "\u63D0\u793A",
|
|
|
open: shixunHomeworks.actionTabs.key === '打回重做' ? true : false,
|
|
|
okText: "\u786E\u5B9A",
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee() {
|
|
|
var res;
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP)("/api/myshixuns/".concat(shixunHomeworks.actionTabs.selectArrs.myshixun_identifier, "/reset_my_game.json"), {
|
|
|
method: 'GET',
|
|
|
params: {
|
|
|
course_id: params.coursesId
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.shixun_identifier) {
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_11__/* ["default"].success */ .ZP.success('操作成功');
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/getWorkList',
|
|
|
payload: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, shixunHomeworks.actionTabs.params)
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("p", {
|
|
|
children: "\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("p", {
|
|
|
children: "\u786E\u5B9A\u6253\u56DE?"
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = ((0,umi__WEBPACK_IMPORTED_MODULE_8__.connect)(function (_ref3) {
|
|
|
var shixunHomeworks = _ref3.shixunHomeworks;
|
|
|
return {
|
|
|
shixunHomeworks: shixunHomeworks
|
|
|
};
|
|
|
})(DelShixun));
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |