You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Commo...

1400 lines
77 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2303],{
/***/ 55744:
/*!*********************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/CommonHomework/Comment/index.tsx + 6 modules ***!
\*********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Comment; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.11@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(99232);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// EXTERNAL MODULE: ./node_modules/_jszip@3.10.1@jszip/dist/jszip.min.js
var jszip_min = __webpack_require__(86129);
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(51165);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
var _umi_production_exports = __webpack_require__(67866);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var es_modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
var col = __webpack_require__(43604);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
var skeleton = __webpack_require__(56511);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
var breadcrumb = __webpack_require__(66104);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
var divider = __webpack_require__(28103);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(14491);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/index.js + 5 modules
var timeline = __webpack_require__(10777);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
var es_select = __webpack_require__(57809);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
var ArrowLeftOutlined = __webpack_require__(22596);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules
var SolutionOutlined = __webpack_require__(87026);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
var ExclamationCircleOutlined = __webpack_require__(88289);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules
var DeleteOutlined = __webpack_require__(20360);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(21873);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(88141);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(13462);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
var input_number = __webpack_require__(54449);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(98135);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/ScoreInput.tsx
/* harmony default export */ var ScoreInput = (({ defaultValue, onBlur, max, className = "game-score" }) => {
const [value, setValue] = (0,_react_17_0_2_react.useState)(defaultValue);
(0,_react_17_0_2_react.useEffect)(() => {
setValue(defaultValue);
}, [defaultValue]);
function onChange(v) {
setValue(v);
}
function onBlurHandler() {
if (value) {
onBlur(value > max ? max : value);
setValue(null);
}
}
return /* @__PURE__ */ _react_17_0_2_react.createElement(input_number/* default */.Z, { max, min: 0, className, value, onChange, onBlur: onBlurHandler });
});
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/ChangeCommit/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ChangeCommitmodules = ({"greyText":"greyText___lvEE6","info":"info___El01Z","label":"label___GmvST","blackContent":"blackContent___FYo0Z","orangeContent":"orangeContent____uYQ3","inputLabel":"inputLabel___ruiZm","tableTitle":"tableTitle___ir3x7","scoreTable":"scoreTable___b9Z37"});
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/ChangeCommit/index.tsx
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const DelShixun = ({ shixunHomeworks, dispatch, classroomList, gethomeworkreport, homeWorkReport }) => {
var _a, _b;
const { shixunWorkReport } = shixunHomeworks;
const params = (0,_umi_production_exports.useParams)();
const [showRequired, setShowRequired] = (0,_react_17_0_2_react.useState)(false);
const [btnLoading, setBtnLoading] = (0,_react_17_0_2_react.useState)(false);
const [score, setScore] = (0,_react_17_0_2_react.useState)("");
const [form] = es_form["default"].useForm();
const quickCommit = () => __async(void 0, null, function* () {
setBtnLoading(true);
const formValue = form.getFieldsValue();
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${params.homeworkId}/shixun_work_comment.json`,
{
method: "post",
body: {
hidden_comment: formValue.hidden_comment,
comment: formValue.comment
}
}
);
if (res.status === 0) {
message/* default */.ZP.success("\u70B9\u8BC4\u6210\u529F");
form.resetFields();
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {}
});
gethomeworkreport();
}
setBtnLoading(false);
});
const anonymousCommit = () => __async(void 0, null, function* () {
if (!score) {
message/* default */.ZP.warning("\u8BF7\u586B\u5199\u5206\u6570");
return;
}
setBtnLoading(true);
const formValue = form.getFieldsValue();
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${params.homeworkId}/add_score.json`,
{
method: "post",
body: {
comment: formValue.comment,
score
}
}
);
if (res.status === 0) {
message/* default */.ZP.success("\u70B9\u8BC4\u6210\u529F");
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {}
});
gethomeworkreport();
}
setBtnLoading(false);
});
const columns = [
{
title: "\u4EFB\u52A1\u540D\u79F0",
dataIndex: "shixun_name",
ellipsis: true
// width: 140,
// render: (text: string, record: any, index: number) => {
// return <div title={text} style={{ width: 140, overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>{text}</div>
// }
},
{
title: "\u5F00\u542F\u65F6\u95F4",
dataIndex: "open_time",
width: 160,
render: (text) => text || "--"
},
{
title: "\u8BC4\u6D4B\u6B21\u6570",
dataIndex: "evaluate_count",
width: 110
},
{
title: "\u5B8C\u6210\u65F6\u95F4",
dataIndex: "finished_time",
width: 160
},
{
title: "\u5B9E\u8BAD\u8017\u65F6",
dataIndex: "cost_time",
width: 160
},
// {
// title: '迟交扣分',
// dataIndex: 'late_penalty',
// width: 90,
// render: (text) => (
// text || '--'
// )
// },
{
title: "\u7F3A\u8BC4\u6263\u5206",
dataIndex: "absence_penalty",
width: 90,
render: (text) => text || "--"
},
{
title: "\u5F97\u5206",
dataIndex: "score",
width: 90,
// align: 'center',
render: (text, record) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: parseFloat(record.score_full) !== parseFloat(text) ? "#E30000" : "#53C41B" } }, text), "/", record.score_full)
},
{
title: "\u8C03\u5206",
width: 100,
dataIndex: "action",
// align: 'center',
render: (text, record) => {
if ((0,authority/* isAdmin */.GJ)()) {
return /* @__PURE__ */ _react_17_0_2_react.createElement(ScoreInput, { max: record.score_full, onBlur: (value) => __async(void 0, null, function* () {
var _a2;
if ((0,authority/* isAssistant */.Rm)() && !((_a2 = classroomList.AssistantObject.practice) == null ? void 0 : _a2.can_appraise)) {
message/* default */.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");
return;
}
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${params.homeworkId}/adjust_score.json`,
{
method: "post",
body: {
score: value
}
}
);
gethomeworkreport();
if (res.status === 0) {
message/* default */.ZP.success("\u8C03\u5206\u6210\u529F");
}
}) });
}
if (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) {
return /* @__PURE__ */ _react_17_0_2_react.createElement(input_number/* default */.Z, { min: 0, value: score, onChange: (e) => setScore(e), max: record.score_full });
}
return text;
}
}
].filter((e) => {
if (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) {
return !["late_penalty", "score", "absence_penalty"].includes(e.dataIndex);
}
return true;
});
return /* @__PURE__ */ _react_17_0_2_react.createElement(
es_modal["default"],
{
centered: true,
width: 1080,
title: "\u70B9\u8BC4\u4F5C\u4E1A",
afterClose: () => {
form.resetFields();
setScore("");
},
confirmLoading: btnLoading,
open: shixunHomeworks.actionTabs.key === "\u66F4\u6539\u70B9\u8BC4" ? true : false,
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
onOk: () => __async(void 0, null, function* () {
var _a2;
if ((0,authority/* isAssistant */.Rm)() && !((_a2 = classroomList.AssistantObject.practice) == null ? void 0 : _a2.can_appraise)) {
message/* default */.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");
return;
}
if (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) {
anonymousCommit();
return;
}
const formValue = form.getFieldsValue();
if (JSON.stringify(formValue) === "{}" || formValue.hidden_comment === "" && formValue.comment === "") {
setShowRequired(true);
} else {
quickCommit();
}
}),
onCancel: () => {
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {}
});
}
},
/* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { className: ChangeCommitmodules.info }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${ChangeCommitmodules.label} ${ChangeCommitmodules.greyText}` }, "\u59D3\u540D"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: ChangeCommitmodules.blackContent }, homeWorkReport == null ? void 0 : homeWorkReport.username)), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${ChangeCommitmodules.label} ${ChangeCommitmodules.greyText}` }, "\u5B66\u53F7"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: ChangeCommitmodules.blackContent }, (homeWorkReport == null ? void 0 : homeWorkReport.student_id) || "--")), !(homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${ChangeCommitmodules.label} ${ChangeCommitmodules.greyText}` }, "\u73ED\u7EA7"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: ChangeCommitmodules.blackContent }, (homeWorkReport == null ? void 0 : homeWorkReport.group_name) || "--")), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${ChangeCommitmodules.label} ${ChangeCommitmodules.greyText}` }, "\u8FDF\u4EA4\u6263\u5206"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: ChangeCommitmodules.orangeContent }, ((_a = homeWorkReport == null ? void 0 : homeWorkReport.stage_list[0]) == null ? void 0 : _a.late_penalty) || "--")), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${ChangeCommitmodules.label} ${ChangeCommitmodules.greyText}` }, "\u7F3A\u8BC4\u6263\u5206"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: ChangeCommitmodules.orangeContent }, ((_b = homeWorkReport == null ? void 0 : homeWorkReport.stage_list[0]) == null ? void 0 : _b.absence_penalty) || "--")), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${ChangeCommitmodules.label} ${ChangeCommitmodules.greyText}` }, "\u603B\u6210\u7EE9"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: ChangeCommitmodules.orangeContent }, (homeWorkReport == null ? void 0 : homeWorkReport.stage_list[0].score) || "--")))),
/* @__PURE__ */ _react_17_0_2_react.createElement(
es_form["default"],
{
form,
onChange: () => {
if (showRequired)
setShowRequired(false);
}
},
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${ChangeCommitmodules.inputLabel} ${ChangeCommitmodules.greyText}` }, (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) ? "\u8BC4\u8BED" : "\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),
/* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { name: "comment" }, /* @__PURE__ */ _react_17_0_2_react.createElement(input["default"].TextArea, { placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9", rows: 3 })),
!(homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${ChangeCommitmodules.inputLabel} ${ChangeCommitmodules.greyText}` }, "\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { name: "hidden_comment" }, /* @__PURE__ */ _react_17_0_2_react.createElement(input["default"].TextArea, { placeholder: "\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9", rows: 3 })), " ")
),
showRequired && /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "c-red" }, "\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: ChangeCommitmodules.tableTitle }, "\u5173\u5361\u6210\u7EE9"),
/* @__PURE__ */ _react_17_0_2_react.createElement(
table["default"],
{
className: ChangeCommitmodules.scoreTable,
dataSource: homeWorkReport == null ? void 0 : homeWorkReport.stage_list,
rowKey: "challenge_id",
pagination: false,
columns
}
)
);
};
/* harmony default export */ var ChangeCommit = ((0,_umi_production_exports.connect)(
({ shixunHomeworks, classroomList }) => ({
shixunHomeworks,
classroomList
})
)(DelShixun));
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/AppealModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AppealModalmodules = ({});
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/components/AppealModal/index.tsx
var AppealModal_async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const AppealModal = ({
shixunHomeworks,
dispatch,
gethomeworkreport,
homeWorkReport
}) => {
var _a, _b;
const { shixunWorkReport } = shixunHomeworks;
console.log(homeWorkReport, "homeWorkReport");
const params = (0,_umi_production_exports.useParams)();
const [btnLoading, setBtnLoading] = (0,_react_17_0_2_react.useState)(false);
const [form] = es_form["default"].useForm();
const { user_name, score, comment_time, content, score_id, user_id } = ((_b = (_a = shixunHomeworks == null ? void 0 : shixunHomeworks.actionTabs) == null ? void 0 : _a.selectArrs) == null ? void 0 : _b.data) || {};
const anonymousCommit = () => AppealModal_async(void 0, null, function* () {
yield form.validateFields();
setBtnLoading(true);
const formValue = form.getFieldsValue();
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${params.homeworkId}/appeal_anonymous_score.json`,
{
method: "post",
body: {
comment: formValue.comment,
score_id,
userId: user_id
}
}
);
if (res.status === 0) {
message/* default */.ZP.success("\u64CD\u4F5C\u6210\u529F");
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {}
});
gethomeworkreport();
}
setBtnLoading(false);
});
return /* @__PURE__ */ _react_17_0_2_react.createElement(
es_modal["default"],
{
centered: true,
width: 600,
title: "\u533F\u8BC4\u7533\u8BC9",
afterClose: () => {
form.resetFields();
},
confirmLoading: btnLoading,
open: shixunHomeworks.actionTabs.key === "\u533F\u8BC4\u7533\u8BC9" ? true : false,
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
onOk: anonymousCommit,
onCancel: () => {
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {}
});
}
},
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "p20", style: {
background: "#F7F8F9",
padding: 15,
marginBottom: 20
} }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { justify: "space-between", className: AppealModalmodules.info }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-666" }, user_name), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-333 ml5" }, "\u8C03\u5206\u4E3A"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-orange ml5" }, score, "\u5206")), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-333" }, comment_time)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "c-grey-333 mt5" }, content)),
/* @__PURE__ */ _react_17_0_2_react.createElement(
es_form["default"],
{
form,
className: "mt15",
layout: "vertical"
},
/* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { name: "comment", label: "\u7533\u8BC9", rules: [{
required: true,
message: "\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0"
}] }, /* @__PURE__ */ _react_17_0_2_react.createElement(input["default"].TextArea, { placeholder: "\u8BF7\u8F93\u5165\u7533\u8BC9\u539F\u56E0", rows: 3 }))
)
);
};
/* harmony default export */ var components_AppealModal = ((0,_umi_production_exports.connect)(
({
shixunHomeworks
}) => ({
shixunHomeworks
})
)(AppealModal));
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/WorkList/components/RedoShixunModal.tsx
var RedoShixunModal = __webpack_require__(65876);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Commentmodules = ({"flex_box_center":"flex_box_center___uz0LL","flex_space_between":"flex_space_between___kuKI5","flex_box_vertical_center":"flex_box_vertical_center___VzPH1","flex_box_center_end":"flex_box_center_end___Tyr1U","flex_box_column":"flex_box_column___qsgVa","title":"title___SFyGM","export":"export___ezPhH","title1_right":"title1_right___tMOJn","userPic":"userPic___mW4Rr","userInfo":"userInfo___vYvSZ","listItem":"listItem___gJf4Z","rightInfo":"rightInfo___PRYRt","shixunTitle":"shixunTitle___STlvE","shixunWrp":"shixunWrp___knhTt","footerBar":"footerBar___R5IlQ","footerBarStatic":"footerBarStatic___M4EQj","exitComment":"exitComment___NoCI4","nextComment":"nextComment___sFj7z","modal":"modal___TwQdH","tag":"tag___RErUu"});
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
var RenderHtml = __webpack_require__(16921);
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
var service_shixunHomeworks = __webpack_require__(25646);
// EXTERNAL MODULE: ./node_modules/_html2pdf.js@0.10.1@html2pdf.js/dist/html2pdf.js
var html2pdf = __webpack_require__(44425);
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Comment/index.tsx
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
var Comment_async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const ShixunsListPage = (_a) => {
var _b = _a, {
shixunHomeworks,
classroomList,
globalSetting,
loading,
user,
dispatch
} = _b, props = __objRest(_b, [
"shixunHomeworks",
"classroomList",
"globalSetting",
"loading",
"user",
"dispatch"
]);
var _a2, _b2, _c, _d, _e;
const [params, setParams] = (0,_react_17_0_2_react.useState)(__spreadValues({}, (0,_umi_production_exports.useParams)()));
const _params = (0,_umi_production_exports.useParams)();
const location = (0,_umi_production_exports.useLocation)();
const [] = (0,_react_17_0_2_react.useState)([]);
const [nextComment, setNextComment] = (0,_react_17_0_2_react.useState)({ last: false });
const [Previous, setPrevious] = (0,_react_17_0_2_react.useState)({ last: false });
const reportElement = (0,_react_17_0_2_react.useRef)();
const reportElementInfo = (0,_react_17_0_2_react.useRef)();
const [isExportLoading, setIsExportLoading] = (0,_react_17_0_2_react.useState)(false);
const [spinning, setSpinning] = (0,_react_17_0_2_react.useState)(false);
const [autoHeight, setAutoHeight] = (0,_react_17_0_2_react.useState)(false);
const [homeWorkReport, sethomeWorkReport] = (0,_react_17_0_2_react.useState)();
const [previewHtml, setPreviewHtml] = (0,_react_17_0_2_react.useState)();
const [codeloding, setcodeloding] = (0,_react_17_0_2_react.useState)(true);
const [datatables, setdatatables] = (0,_react_17_0_2_react.useState)();
const hasPower = (0,authority/* isAdmin */.GJ)();
const [zip, setZip] = (0,_react_17_0_2_react.useState)(new (jszip_min_default())());
const [num, setNum] = (0,_react_17_0_2_react.useState)(0);
const [allStudentWorks, setAllStudentWorks] = (0,_react_17_0_2_react.useState)([]);
const [isshow, setIsshow] = (0,_react_17_0_2_react.useState)(false);
const [isshows, setIsshows] = (0,_react_17_0_2_react.useState)(false);
const [score, setscore] = (0,_react_17_0_2_react.useState)("");
const [isTeacher, setisTeacher] = (0,_react_17_0_2_react.useState)(false);
const [isDisabled, setisDisabled] = (0,_react_17_0_2_react.useState)(true);
const [last_score, setlast_score] = (0,_react_17_0_2_react.useState)(0);
const getUser = () => Comment_async(void 0, null, function* () {
if (user.userInfo.is_teacher || user.userInfo.admin) {
setisTeacher(true);
setisDisabled(false);
}
});
(0,_react_17_0_2_react.useEffect)(() => {
getUser();
console.log("\u6253\u5370\u7684------", homeWorkReport);
console.log(shixunHomeworks);
setscore(homeWorkReport == null ? void 0 : homeWorkReport.repeat_minus_score);
}, [homeWorkReport, user]);
(0,_react_17_0_2_react.useEffect)(() => {
console.log("\u89E6\u53D1\u8FD9", homeWorkReport == null ? void 0 : homeWorkReport.work_score);
setlast_score(homeWorkReport == null ? void 0 : homeWorkReport.work_score);
}, [homeWorkReport == null ? void 0 : homeWorkReport.work_score, score]);
(0,_react_17_0_2_react.useEffect)(() => {
dispatch({
type: "globalSetting/footerToggle",
payload: false
});
return () => {
dispatch({
type: "globalSetting/footerToggle",
payload: true
});
};
}, []);
(0,_react_17_0_2_react.useEffect)(() => {
var _a3;
if (homeWorkReport) {
let items = [];
(_a3 = homeWorkReport == null ? void 0 : homeWorkReport.target_test_sets) == null ? void 0 : _a3.map((item, index) => {
var _a4;
(_a4 = item == null ? void 0 : item.targets) == null ? void 0 : _a4.map((ite, j) => {
var _a5;
ite.name = item == null ? void 0 : item.name;
ite.total_target_score = item == null ? void 0 : item.total_target_score;
ite.actual_target_score = item == null ? void 0 : item.actual_target_score;
ite.rowSpan = j === 0 ? (_a5 = item == null ? void 0 : item.targets) == null ? void 0 : _a5.length : 0;
ite.order = index + 1;
items.push(ite);
});
});
setdatatables(items);
dispatch({
type: "classroomList/getAssistantPermissions",
payload: {
course_id: params.coursesId
}
});
}
}, [homeWorkReport]);
(0,_react_17_0_2_react.useEffect)(() => {
if (shixunHomeworks.actionTabs.key === "\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A" && allStudentWorks.length > 0) {
if (homeWorkReport == null ? void 0 : homeWorkReport.course_name) {
exportReport("all");
}
}
}, [homeWorkReport == null ? void 0 : homeWorkReport.course_name]);
(0,_react_17_0_2_react.useEffect)(() => {
console.log(_params);
setParams(__spreadValues({}, _params));
}, [location.pathname]);
const scrollView = () => {
document.body.scrollIntoView();
};
function getData() {
return Comment_async(this, null, function* () {
var _a3, _b3, _c2, _d2;
const paylaod = JSON.parse(localStorage["all_student_works_param"] || "{}");
const res = yield dispatch({
type: "shixunHomeworks/getAllStudentWorks",
payload: __spreadValues(__spreadValues({}, params), paylaod)
});
setAllStudentWorks(res["all_student_works"]);
const key = (_a3 = res["all_student_works"]) == null ? void 0 : _a3.map((item) => String(item.student_work_id)).indexOf(params.homeworkId);
if (key === ((_b3 = res["all_student_works"]) == null ? void 0 : _b3.length) - 1) {
setNextComment({ last: true });
} else {
setNextComment((_c2 = res["all_student_works"]) == null ? void 0 : _c2[key + 1]);
}
if (key === 0) {
setPrevious({ last: true });
} else {
setPrevious((_d2 = res["all_student_works"]) == null ? void 0 : _d2[key - 1]);
}
});
}
const handleRemoveSurplusCanvas = () => {
document.querySelectorAll("canvas").forEach((item) => {
(!item.clientWidth || !item.clientHeight) && item.remove();
});
};
const exportReport = (type) => Comment_async(void 0, null, function* () {
let nums = 0;
let modal;
modal = es_modal["default"].info({
width: 460,
title: /* @__PURE__ */ React.createElement("div", null, "\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,", /* @__PURE__ */ React.createElement("span", { className: "c-red" }, "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),
content: /* @__PURE__ */ React.createElement("div", null, "\u5F53\u524D\u8FDB\u5EA6: ", /* @__PURE__ */ React.createElement("span", { className: "c-blue" }, nums + 1), "/", type !== "all" ? 1 : allStudentWorks == null ? void 0 : allStudentWorks.length, /* @__PURE__ */ React.createElement("br", null), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),
maskClosable: false,
className: Commentmodules.modal,
onOk: () => {
}
});
const opt = {
margin: [0, 0],
filename: `${homeWorkReport == null ? void 0 : homeWorkReport.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'
}
};
function aaa() {
return Comment_async(this, null, function* () {
scrollView();
nums++;
setTimeout(() => Comment_async(this, null, function* () {
var _a3;
handleRemoveSurplusCanvas();
const folders = zip.folder(`${(_a3 = homeWorkReport == null ? void 0 : homeWorkReport.stage_list[0]) == null ? void 0 : _a3.shixun_name}`);
const pages = document.querySelector("#export-all").children;
let worker = html2pdf_default()();
for (let i = 0; i < pages.length; i++) {
yield worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get("pdf").then((pdf) => Comment_async(this, null, function* () {
if (i < pages.length - 1) {
yield pdf.addPage();
}
}));
}
folders.file(`${allStudentWorks[nums - 1]["student_work_user_name"]}.pdf`, worker.output("blob"));
modal.update({
content: /* @__PURE__ */ React.createElement("div", null, "\u5F53\u524D\u8FDB\u5EA6: ", /* @__PURE__ */ React.createElement("span", { className: "c-blue" }, nums), "/", allStudentWorks == null ? void 0 : allStudentWorks.length, /* @__PURE__ */ React.createElement("br", null), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")
});
if (nums == (allStudentWorks == null ? void 0 : allStudentWorks.length)) {
modal.destroy();
download();
} else {
next();
}
}), 2200);
});
}
function next() {
return Comment_async(this, null, function* () {
var _a3, _b3, _c2, _d2, _e2;
const res = yield (0,fetch/* default */.ZP)(`/api/student_works/${allStudentWorks[nums]["student_work_id"]}/jupyter_work_report.json`, {
method: "get"
});
if ((res == null ? void 0 : res.status) === 0) {
sethomeWorkReport(res.data);
if ((_b3 = (_a3 = res == null ? void 0 : res.data) == null ? void 0 : _a3.shixun_detail[0]) == null ? void 0 : _b3.myshixun_identifier) {
setcodeloding(true);
const res1 = yield (0,fetch/* default */.ZP)(`/api/jupyters/preview_tpi.json`, {
method: "get",
params: {
identifier: (_d2 = (_c2 = res == null ? void 0 : res.data) == null ? void 0 : _c2.shixun_detail[0]) == null ? void 0 : _d2.myshixun_identifier,
student_work_id: (_e2 = res == null ? void 0 : res.data) == null ? void 0 : _e2.work_id
// identifier: "qm28kagvuf"
}
});
if (res1.status === 0) {
setPreviewHtml(res1.html_content);
setcodeloding(false);
mathjax();
aaa();
}
} else {
aaa();
}
}
});
}
if (type !== "all" || (allStudentWorks == null ? void 0 : allStudentWorks.length) < 2) {
handleRemoveSurplusCanvas();
scrollView();
const pages = reportElementInfo.current.children;
let worker = html2pdf_default()();
const folder = zip.folder(`${homeWorkReport == null ? void 0 : homeWorkReport.username}`);
for (let i = 0; i < pages.length; i++) {
yield worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get("pdf").then((pdf) => Comment_async(void 0, null, function* () {
if (i < pages.length - 1) {
yield pdf.addPage();
}
}));
}
setIsExportLoading(false);
folder.file(`${homeWorkReport == null ? void 0 : homeWorkReport.username}.pdf`, worker.output("blob"), { base64: false });
modal.destroy();
download();
return;
} else {
next();
}
});
const download = () => {
zip.generateAsync({ type: "blob" }).then(function(content) {
const link = document.createElement("a");
link.href = window.URL.createObjectURL(content);
link.download = (homeWorkReport == null ? void 0 : homeWorkReport.course_name) + ".zip";
document.body.appendChild(link);
const evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
setZip(new (jszip_min_default())());
});
setAutoHeight(false);
};
(0,_react_17_0_2_react.useEffect)(() => {
initData();
}, [params.homeworkId]);
(0,_react_17_0_2_react.useEffect)(() => {
if (homeWorkReport == null ? void 0 : homeWorkReport.work_id) {
if ((0,authority/* isAdmin */.GJ)() || (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous))
getData();
}
}, [homeWorkReport == null ? void 0 : homeWorkReport.work_id]);
(0,_react_17_0_2_react.useEffect)(() => {
console.log(homeWorkReport);
}, [homeWorkReport]);
const gethomeworkreport = () => Comment_async(void 0, null, function* () {
const res = yield (0,fetch/* default */.ZP)(`/api/student_works/${params.homeworkId}/jupyter_work_report.json`, {
method: "get"
});
if ((res == null ? void 0 : res.status) === 0) {
sethomeWorkReport(res.data);
}
});
const getinitData = () => Comment_async(void 0, null, function* () {
var _a3, _b3, _c2, _d2, _e2;
const res = yield (0,fetch/* default */.ZP)(`/api/student_works/${params.homeworkId}/jupyter_work_report.json`, {
method: "get"
});
if ((res == null ? void 0 : res.status) === 0) {
sethomeWorkReport(res.data);
if ((_b3 = (_a3 = res == null ? void 0 : res.data) == null ? void 0 : _a3.shixun_detail[0]) == null ? void 0 : _b3.myshixun_identifier) {
setcodeloding(true);
const res1 = yield (0,fetch/* default */.ZP)(`/api/jupyters/preview_tpi.json`, {
method: "get",
params: {
identifier: (_d2 = (_c2 = res == null ? void 0 : res.data) == null ? void 0 : _c2.shixun_detail[0]) == null ? void 0 : _d2.myshixun_identifier,
student_work_id: (_e2 = res == null ? void 0 : res.data) == null ? void 0 : _e2.work_id
// identifier: "qm28kagvuf"
}
});
if (res1.status === 0) {
setPreviewHtml(res1.html_content);
setcodeloding(false);
createDom(res1.html_content);
return;
}
}
}
});
const createDom = (html_content) => {
var _a3, _b3;
(_b3 = (_a3 = html_content == null ? void 0 : html_content.match) == null ? void 0 : _a3.call(html_content, /<script [^>]*src=['"]([^'"]+)[^>]*>/gi)) == null ? void 0 : _b3.map((item) => {
const script = document.createElement("script");
script.src = /<script [^>]*src=['"]([^'"]+)[^>]*>/gi.exec(item)[1];
document.body.appendChild(script);
});
mathjax();
};
const mathjax = () => {
try {
if (window.MathJax) {
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "AMS",
useLabelIds: true
}
},
tex2jax: {
inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],
displayMath: [["$$", "$$"], ["\\\\[", "\\\\]"]],
processEscapes: true,
processEnvironments: true
},
displayAlign: "center",
CommonHTML: {
linebreaks: {
automatic: true
}
},
"HTML-CSS": {
linebreaks: {
automatic: true
}
}
});
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
}
} catch (e) {
}
};
const initData = () => Comment_async(void 0, null, function* () {
setSpinning(true);
getinitData();
setSpinning(false);
});
const columns = [
{
title: "\u4EFB\u52A1\u540D\u79F0",
dataIndex: "shixun_name",
ellipsis: true,
render: (text, record, index) => text
},
{
title: "\u5F00\u542F\u65F6\u95F4",
dataIndex: "open_time",
width: (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) ? 220 : 170,
render: (text) => text || "--"
},
{
title: "\u8BC4\u6D4B\u6B21\u6570",
dataIndex: "evaluate_count",
width: (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) ? 140 : 90
},
{
title: "\u5B8C\u6210\u65F6\u95F4",
dataIndex: "finished_time",
width: (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) ? 220 : 170
},
{
title: "\u5B9E\u8BAD\u8017\u65F6",
dataIndex: "cost_time",
width: 130
// render: (text: number) => (toTimeFormat(text))
},
{
title: "\u8FDF\u4EA4\u6263\u5206",
dataIndex: "late_penalty",
width: 90,
render: (text) => text || "--"
},
{
title: "\u7F3A\u8BC4\u6263\u5206",
dataIndex: "absence_penalty",
width: 90,
render: (text) => text || "--"
},
{
title: "\u5F97\u5206",
dataIndex: "score",
width: 100,
render: (text, record) => /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { style: { color: parseFloat(record.score_full) !== parseFloat(text) ? "red" : "green" } }, text ? text : 0), "/", record.score_full)
},
{
title: "\u8C03\u5206",
dataIndex: "action",
width: 110,
render: (text, record) => {
if (hasPower) {
return /* @__PURE__ */ React.createElement(
ScoreInput,
{
max: record.score_full,
onBlur: (value) => Comment_async(void 0, null, function* () {
var _a3;
if ((0,authority/* isAssistant */.Rm)() && !((_a3 = classroomList.AssistantObject.practice) == null ? void 0 : _a3.can_appraise)) {
message/* default */.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");
return;
}
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${params.homeworkId}/adjust_score.json`,
{
method: "post",
body: {
score: value
}
}
);
gethomeworkreport();
if (res.status === 0) {
message/* default */.ZP.success("\u64CD\u4F5C\u6210\u529F");
}
})
}
);
} else {
return text;
}
}
}
].filter((e) => {
if (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) {
return !["late_penalty", "absence_penalty", "score", "action"].includes(e.dataIndex);
}
return true;
});
const comments = homeWorkReport == null ? void 0 : homeWorkReport.comment_scores.map((item) => {
var _a3, _b3, _c2;
return {
children: /* @__PURE__ */ React.createElement(row/* default */.Z, null, /* @__PURE__ */ React.createElement(col/* default */.Z, { span: 24 }, /* @__PURE__ */ React.createElement(row/* default */.Z, null, /* @__PURE__ */ React.createElement(col/* default */.Z, { flex: 1 }, /* @__PURE__ */ React.createElement("span", { className: "c-light-black mr10" }, item.user_name), /* @__PURE__ */ React.createElement("span", null, "\u8C03\u5206\u4E3A"), /* @__PURE__ */ React.createElement("span", { className: "ml10 c-orange" }, item.score ? item.score : 0, "\u5206")), /* @__PURE__ */ React.createElement(col/* default */.Z, null, /* @__PURE__ */ React.createElement("span", { className: "c-light-black ml10" }, item.comment_time)))), /* @__PURE__ */ React.createElement(col/* default */.Z, { span: 24, className: "mt8" }, /* @__PURE__ */ React.createElement(row/* default */.Z, { className: "mt8" }, /* @__PURE__ */ React.createElement(col/* default */.Z, { span: 22 }, item.content ? /* @__PURE__ */ React.createElement("span", { style: { color: "#333333" } }, item.content) : /* @__PURE__ */ React.createElement("span", { className: "c-light-black" }, "\u6682\u672A\u5199\u8BC4\u8BED")), /* @__PURE__ */ React.createElement(col/* default */.Z, { className: "tr", span: 2 }, (item == null ? void 0 : item.can_appeal) && !(item == null ? void 0 : item.is_invalid) && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { size: "small", type: "primary", onClick: () => {
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {
key: "\u533F\u8BC4\u7533\u8BC9",
selectArrs: {
data: __spreadValues({}, item)
}
}
});
} }, "\u7533\u8BC9")))), !!(item == null ? void 0 : item.appeal_info) && /* @__PURE__ */ React.createElement(col/* default */.Z, { span: 24, className: "mt8" }, /* @__PURE__ */ React.createElement("div", { className: "p20", style: {
background: "#F7F8F9",
padding: 15
} }, /* @__PURE__ */ React.createElement(row/* default */.Z, { justify: "space-between" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: "c-grey-333" }, (_a3 = item == null ? void 0 : item.appeal_info) == null ? void 0 : _a3.user_name), /* @__PURE__ */ React.createElement("span", null, (item == null ? void 0 : item.appeal_status) === 1 && /* @__PURE__ */ React.createElement("span", { className: `tag-style bg-orange ml10 ${Commentmodules.tag}` }, "\u7533\u8BC9\u4E2D"), (item == null ? void 0 : item.appeal_status) === 2 && /* @__PURE__ */ React.createElement("span", { className: `tag-style bg-grey-ede c-light-black ml10 ${Commentmodules.tag}` }, "\u7533\u8BC9\u5DF2\u64A4\u9500"), (item == null ? void 0 : item.appeal_status) === 3 && /* @__PURE__ */ React.createElement("span", { className: `tag-style ml10 ${Commentmodules.tag}`, style: { background: "#57BE40" } }, "\u7533\u8BC9\u6210\u529F"), (item == null ? void 0 : item.appeal_status) === 4 && /* @__PURE__ */ React.createElement("span", { className: `tag-style bg-grey-ede c-light-black ml10 ${Commentmodules.tag}` }, "\u7533\u8BC9\u88AB\u62D2\u7EDD"), (item == null ? void 0 : item.appeal_status) === 5 && /* @__PURE__ */ React.createElement("span", { className: `tag-style c-light-black ml10 ${Commentmodules.tag}`, style: { background: "#E9EAED" } }, "\u7533\u8BC9\u5931\u8D25"))), /* @__PURE__ */ React.createElement("span", { className: "c-light-black" }, " ", dayjs_min_default()((_b3 = item == null ? void 0 : item.appeal_info) == null ? void 0 : _b3.time).format("YYYY-MM-DD HH:mm:ss"))), /* @__PURE__ */ React.createElement(row/* default */.Z, { justify: "space-between", className: "mt10" }, /* @__PURE__ */ React.createElement(col/* default */.Z, { flex: 1 }, (_c2 = item.appeal_info) == null ? void 0 : _c2.content), /* @__PURE__ */ React.createElement(col/* default */.Z, { style: { flexShrink: 0, marginLeft: "auto" } }, (item == null ? void 0 : item.appeal_status) === 1 && (0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ React.createElement(
"span",
{
onClick: () => {
es_modal["default"].confirm({
title: "\u63A5\u53D7\u7533\u8BC9",
icon: null,
content: "\u6B64\u533F\u8BC4\u8BB0\u5F55\u5C06\u4F5C\u5E9F\uFF0C\u533F\u8BC4\u5B66\u751F\u7684\u4F5C\u54C1\u5C06\u88AB\u6263\u51CF\u8FDD\u89C4\u533F\u8BC4\u5206 \u662F\u5426\u786E\u8BA4\u63A5\u53D7\u7533\u8BC9\uFF1F",
onOk: () => Comment_async(void 0, null, function* () {
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${params.homeworkId}/deal_appeal_score.json`,
{
method: "post",
body: {
score_id: item.score_id,
status: 3
}
}
);
if ((res == null ? void 0 : res.status) === 0) {
gethomeworkreport();
}
})
});
},
className: "c-red current"
},
"\u63A5\u53D7\u7533\u8BC9"
), (item == null ? void 0 : item.appeal_status) === 1 && (0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ React.createElement(
"span",
{
onClick: () => {
es_modal["default"].confirm({
icon: null,
title: "\u63A5\u53D7\u7533\u8BC9",
content: "\u6B64\u533F\u8BC4\u8BB0\u5F55\u88AB\u8BA4\u4E3A\u5408\u7406\uFF0C\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u7533\u8BC9\uFF1F",
onOk: () => Comment_async(void 0, null, function* () {
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${params.homeworkId}/deal_appeal_score.json`,
{
method: "post",
body: {
score_id: item.score_id,
status: 4
}
}
);
if ((res == null ? void 0 : res.status) === 0) {
gethomeworkreport();
}
})
});
},
className: "c-light-black current ml10"
},
"\u62D2\u7EDD\u7533\u8BC9"
))))))
};
});
const skip = (type) => {
setPreviewHtml(null);
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {
key: "",
type: 2
}
});
setTimeout(() => {
if (type === "next") {
_umi_production_exports.history.push(`/classrooms/${params.coursesId}/common_homework/${params.categoryId}/${nextComment == null ? void 0 : nextComment.student_work_id}/comment`);
} else {
_umi_production_exports.history.push(`/classrooms/${params.coursesId}/common_homework/${params.categoryId}/${Previous == null ? void 0 : Previous.student_work_id}/comment`);
}
}, 200);
};
const changescore = (e) => {
setscore("");
if (e.target.value) {
console.log("\u8FDB\u6765", homeWorkReport);
e.target.value = e.target.value > (homeWorkReport == null ? void 0 : homeWorkReport.repeat_setting_score) ? homeWorkReport == null ? void 0 : homeWorkReport.repeat_setting_score : e.target.value;
setscore(e.target.value);
}
};
const gochange = () => Comment_async(void 0, null, function* () {
const res = yield (0,fetch/* default */.ZP)(
`/api/student_works/${homeWorkReport == null ? void 0 : homeWorkReport.work_id}/update_repeat_score`,
{
method: "put",
body: {
score
}
}
);
yield dispatch({
type: "shixunHomeworks/gethomeWorkReport",
payload: __spreadValues({}, params)
});
if (res.status === 0) {
message/* default */.ZP.info("\u64CD\u4F5C\u6210\u529F");
}
});
console.log(!!(homeWorkReport == null ? void 0 : homeWorkReport.category), homeWorkReport == null ? void 0 : homeWorkReport.course_id, "homeWorkReport");
return /* @__PURE__ */ React.createElement("section", { className: "bg-fafafa", style: { position: "sticky", top: 0 } }, /* @__PURE__ */ React.createElement("div", { className: "edu-container mt10", style: { paddingBottom: 100 } }, /* @__PURE__ */ React.createElement(
skeleton/* default */.Z,
{
loading: spinning,
active: true,
avatar: { size: 40 },
paragraph: { rows: 5 }
},
/* @__PURE__ */ React.createElement("div", { className: "edu-container" }, (homeWorkReport == null ? void 0 : homeWorkReport.course_id) && /* @__PURE__ */ React.createElement("section", { className: "animated fadeIn" }, /* @__PURE__ */ React.createElement("aside", { className: "" }, (homeWorkReport == null ? void 0 : homeWorkReport.category) && /* @__PURE__ */ React.createElement(breadcrumb/* default */.Z, { separator: ">" }, /* @__PURE__ */ React.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ React.createElement(
_umi_production_exports.Link,
{
to: `/classrooms/${homeWorkReport == null ? void 0 : homeWorkReport.course_id}/common_homework`
},
homeWorkReport == null ? void 0 : homeWorkReport.course_name
)), /* @__PURE__ */ React.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ React.createElement(
_umi_production_exports.Link,
{
to: `/classrooms/${homeWorkReport == null ? void 0 : homeWorkReport.course_id}/common_homework/${!(homeWorkReport == null ? void 0 : homeWorkReport.category.main) ? homeWorkReport == null ? void 0 : homeWorkReport.category.category_id : ""}`
},
homeWorkReport == null ? void 0 : homeWorkReport.category.category_name
)), /* @__PURE__ */ React.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ React.createElement(
_umi_production_exports.Link,
{
to: `/classrooms/${homeWorkReport == null ? void 0 : homeWorkReport.course_id}/common_homework/${homeWorkReport == null ? void 0 : homeWorkReport.homework_common_id}/detail`
},
"\u4F5C\u4E1A\u8BE6\u60C5"
)), /* @__PURE__ */ React.createElement(breadcrumb/* default */.Z.Item, null, homeWorkReport == null ? void 0 : homeWorkReport.username))), /* @__PURE__ */ React.createElement("aside", { className: [Commentmodules.title1, "mt20"].join(" ") }, /* @__PURE__ */ React.createElement(row/* default */.Z, { align: "middle" }, /* @__PURE__ */ React.createElement(col/* default */.Z, { flex: 1 }, /* @__PURE__ */ React.createElement(
_umi_production_exports.Link,
{
to: `/classrooms/${homeWorkReport == null ? void 0 : homeWorkReport.course_id}/common_homework/${homeWorkReport == null ? void 0 : homeWorkReport.homework_common_id}/detail`
},
/* @__PURE__ */ React.createElement(ArrowLeftOutlined/* default */.Z, { className: "font16 c-black" })
), /* @__PURE__ */ React.createElement("strong", { style: { fontWeight: 700 }, className: "font20 ml5" }, homeWorkReport == null ? void 0 : homeWorkReport.shixun_name), /* @__PURE__ */ React.createElement(util/* StatusClassroomsTags */.VV, { status: homeWorkReport == null ? void 0 : homeWorkReport.homework_status })), /* @__PURE__ */ React.createElement(
col/* default */.Z,
{ className: Commentmodules.title1_right },
!(homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, null, /* @__PURE__ */ React.createElement("span", { className: "iconfont icon-yijiandianping mr5" }), /* @__PURE__ */ React.createElement(_umi_production_exports.Link, { className: "c-black", target: "_blank", to: `/tasks/${(_b2 = (_a2 = homeWorkReport == null ? void 0 : homeWorkReport.shixun_detail) == null ? void 0 : _a2[0]) == null ? void 0 : _b2["myshixun_identifier"]}/jupyter${(0,authority/* isAdmin */.GJ)() ? "" : `?homework_common_id=${_params.categoryId}`}` }, (0,authority/* isAdmin */.GJ)() ? "\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD" : "\u67E5\u770B\u5B9E\u8BAD")),
// isAdmin() && homeWorkReport?.homework_end === false && !!homeWorkReport?.myshixun_id &&
(0,authority/* isAdmin */.GJ)() && !((_c = homeWorkReport == null ? void 0 : homeWorkReport.homework_status) == null ? void 0 : _c.includes("\u5DF2\u622A\u6B62")) && /* @__PURE__ */ React.createElement(
es_button/* default */.ZP,
{
className: "ml10",
onClick: () => Comment_async(void 0, null, function* () {
yield dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {
key: "redoShixunModal",
homework_common_id: _params.categoryId,
student_work_id: _params.homeworkId
}
});
})
},
/* @__PURE__ */ React.createElement("span", { className: "iconfont icon-dahuizhongzuo3x mr5" }),
"\u6253\u56DE\u91CD\u505A"
),
!(homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous) && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { className: "ml10", onClick: () => exportReport(""), loading: isExportLoading }, /* @__PURE__ */ React.createElement("span", { className: "iconfont icon-daochu mr5" }), "\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),
(0,authority/* isAdmin */.GJ)() && (allStudentWorks == null ? void 0 : allStudentWorks.length) > 1 && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { className: "ml10", onClick: () => exportReport("all") }, /* @__PURE__ */ React.createElement("span", { className: "iconfont icon-daochu mr5" }), "\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A")
)))), /* @__PURE__ */ React.createElement("aside", { className: "mt30 relative" })),
/* @__PURE__ */ React.createElement("aside", { className: "edu-container bg-white", ref: reportElement }, /* @__PURE__ */ React.createElement("div", { id: "export-all", ref: reportElementInfo }, /* @__PURE__ */ React.createElement("div", { id: "export-all-1" }, /* @__PURE__ */ React.createElement("div", { className: Commentmodules.title }, /* @__PURE__ */ React.createElement("h1", null, "\u603B\u4F53\u8BC4\u4EF7"), /* @__PURE__ */ React.createElement("div", null, ((0,authority/* isAdmin */.GJ)() || (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous)) && /* @__PURE__ */ React.createElement(
es_button/* default */.ZP,
{
className: "mr20",
type: "primary",
onClick: () => {
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {
key: "\u66F4\u6539\u70B9\u8BC4",
selectArrs: {
myshixun_identifier: homeWorkReport == null ? void 0 : homeWorkReport.user_id,
data: __spreadValues({}, homeWorkReport)
}
}
});
}
},
/* @__PURE__ */ React.createElement(SolutionOutlined/* default */.Z, null),
(homeWorkReport == null ? void 0 : homeWorkReport.has_shixun_work_comment) ? "\u66F4\u6539\u70B9\u8BC4" : "\u70B9\u8BC4\u4F5C\u4E1A"
))), /* @__PURE__ */ React.createElement(divider/* default */.Z, { style: { marginTop: 0 } }), /* @__PURE__ */ React.createElement(row/* default */.Z, { className: "pl30 pr30" }, /* @__PURE__ */ React.createElement(col/* default */.Z, null, /* @__PURE__ */ React.createElement("img", { className: Commentmodules.userPic, src: `${env/* default */.Z.IMG_SERVER}/images/${homeWorkReport == null ? void 0 : homeWorkReport.image_url}`, alt: homeWorkReport == null ? void 0 : homeWorkReport.username })), /* @__PURE__ */ React.createElement(col/* default */.Z, { className: "pt20" }, /* @__PURE__ */ React.createElement("span", { className: "font16 ml40" }, homeWorkReport == null ? void 0 : homeWorkReport.username), /* @__PURE__ */ React.createElement(util/* HomeWorkCommonDetailStatus */.Y, { status: homeWorkReport == null ? void 0 : homeWorkReport.work_status }), /* @__PURE__ */ React.createElement("ul", { className: Commentmodules.userInfo }, /* @__PURE__ */ React.createElement("li", null, "\u5B66\u53F7\uFF1A", (homeWorkReport == null ? void 0 : homeWorkReport.student_id) || "--"), ((0,authority/* isAdmin */.GJ)() || !(homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous)) && /* @__PURE__ */ React.createElement("li", null, "\u5206\u73ED\uFF1A", (homeWorkReport == null ? void 0 : homeWorkReport.group_name) || "--"), /* @__PURE__ */ React.createElement("br", null)))), /* @__PURE__ */ React.createElement("aside", { className: "pl30 pr30 mt30 mb10" }, /* @__PURE__ */ React.createElement(
table["default"],
{
dataSource: homeWorkReport == null ? void 0 : homeWorkReport.stage_list,
rowKey: (r) => r == null ? void 0 : r.challenge_id,
pagination: false,
columns
}
)), ((homeWorkReport == null ? void 0 : homeWorkReport.work_comment_hidden) || (homeWorkReport == null ? void 0 : homeWorkReport.work_comment)) && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(row/* default */.Z, { align: "middle" }, /* @__PURE__ */ React.createElement(col/* default */.Z, { flex: 1 }, /* @__PURE__ */ React.createElement("h1", { className: Commentmodules.title }, "\u70B9\u8BC4\u5185\u5BB9")), /* @__PURE__ */ React.createElement(col/* default */.Z, { className: "pr30" }, (0,authority/* isAdmin */.GJ)() && /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { onClick: () => Comment_async(void 0, null, function* () {
es_modal["default"].confirm({
centered: true,
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
title: "\u63D0\u793A",
icon: /* @__PURE__ */ React.createElement(ExclamationCircleOutlined/* default */.Z, null),
content: "\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",
onOk() {
return Comment_async(this, null, function* () {
const res = yield (0,service_shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
comment_id: homeWorkReport == null ? void 0 : homeWorkReport.comment_id,
homeworkId: params.homeworkId
});
if (res.status === 0) {
message/* default */.ZP.success("\u5220\u9664\u6210\u529F");
gethomeworkreport();
}
});
}
});
}) }, /* @__PURE__ */ React.createElement(DeleteOutlined/* default */.Z, null), "\u5220\u9664"))), (homeWorkReport == null ? void 0 : homeWorkReport.work_comment) && /* @__PURE__ */ React.createElement("aside", { className: "pl30 pr30", style: { marginTop: "-5px" } }, /* @__PURE__ */ React.createElement("span", { className: "c-light-black font12" }, "# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement(RenderHtml/* default */.Z, { value: homeWorkReport == null ? void 0 : homeWorkReport.work_comment, className: "font14" })), (homeWorkReport == null ? void 0 : homeWorkReport.work_comment_hidden) && /* @__PURE__ */ React.createElement("aside", { className: "pl30 pr30 mt15" }, /* @__PURE__ */ React.createElement("span", { className: "c-light-black font12" }, "# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement(RenderHtml/* default */.Z, { value: homeWorkReport == null ? void 0 : homeWorkReport.work_comment_hidden, className: "font14" }))), (homeWorkReport == null ? void 0 : homeWorkReport.comment_scores.length) > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h1", { className: Commentmodules.title }, "\u8C03\u5206\u539F\u56E0"), /* @__PURE__ */ React.createElement("aside", { className: "pl30 pr30", style: { marginTop: "4px" } }, /* @__PURE__ */ React.createElement(
timeline/* default */.Z,
{
items: comments
}
))), ((_d = homeWorkReport == null ? void 0 : homeWorkReport.shixun_detail[0]) == null ? void 0 : _d.myshixun_identifier) && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h1", { className: Commentmodules.title, style: { marginTop: "-20px" } }, "\u5B9E\u8BAD\u8BE6\u60C5"), /* @__PURE__ */ React.createElement("aside", { className: "pl30 pr30" }, /* @__PURE__ */ React.createElement("div", { className: Commentmodules.shixunWrp }, /* @__PURE__ */ React.createElement("h2", null, /* @__PURE__ */ React.createElement("span", null, "\u8BC4\u6D4B\u4EE3\u7801", /* @__PURE__ */ React.createElement("span", { className: "ml5 font12 c-grey-999" }, "\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u540E\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\u8BE6\u60C5")), /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(es_select["default"], { style: { width: 200 }, value: (_e = homeWorkReport == null ? void 0 : homeWorkReport.shixun_detail[0]) == null ? void 0 : _e.path }, " ", homeWorkReport == null ? void 0 : homeWorkReport.shixun_detail.map((item) => /* @__PURE__ */ React.createElement(Option, { value: item.path }, item.path)), " "))), /* @__PURE__ */ React.createElement(spin/* default */.Z, { spinning: codeloding }, /* @__PURE__ */ React.createElement("div", { style: { width: "100%", minHeight: "550px", padding: "16px" }, dangerouslySetInnerHTML: { __html: previewHtml } })))))))),
((0,authority/* isAdmin */.GJ)() || (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous)) && /* @__PURE__ */ React.createElement("aside", { className: `${Commentmodules.footerBar} ${isExportLoading ? Commentmodules.footerBarStatic : ""}` }, /* @__PURE__ */ React.createElement("aside", { className: "edu-container" }, /* @__PURE__ */ React.createElement(row/* default */.Z, { align: "middle" }, /* @__PURE__ */ React.createElement(col/* default */.Z, { flex: "1" }, /* @__PURE__ */ React.createElement(_umi_production_exports.Link, { className: Commentmodules.exitComment, to: `/classrooms/${params.coursesId}/common_homework/${params.categoryId}/detail` }, "\u8FD4\u56DE\u5217\u8868")), /* @__PURE__ */ React.createElement(col/* default */.Z, { flex: "1", className: "tr" }, /* @__PURE__ */ React.createElement(
es_button/* default */.ZP,
{
type: "default",
disabled: Previous == null ? void 0 : Previous.last,
onClick: () => skip()
},
"\u4E0A\u4E00\u4E2A"
), /* @__PURE__ */ React.createElement(
es_button/* default */.ZP,
{
type: "default",
style: { marginLeft: "20px", marginRight: "20px" },
disabled: nextComment == null ? void 0 : nextComment.last,
onClick: () => skip("next")
},
"\u4E0B\u4E00\u4E2A"
), ((0,authority/* isAdmin */.GJ)() || (homeWorkReport == null ? void 0 : homeWorkReport.is_anonymous)) && /* @__PURE__ */ React.createElement(
es_button/* default */.ZP,
{
type: "primary",
onClick: () => Comment_async(void 0, null, function* () {
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {
key: "\u66F4\u6539\u70B9\u8BC4",
selectArrs: {
myshixun_identifier: homeWorkReport == null ? void 0 : homeWorkReport.user_id,
data: __spreadValues({}, homeWorkReport)
}
}
});
})
},
"\u70B9\u8BC4\u4F5C\u4E1A"
)))))
)), /* @__PURE__ */ React.createElement(components_AppealModal, { gethomeworkreport, homeWorkReport }), /* @__PURE__ */ React.createElement(ChangeCommit, { gethomeworkreport, homeWorkReport }), /* @__PURE__ */ React.createElement(RedoShixunModal/* default */.Z, { getData: gethomeworkreport }), /* @__PURE__ */ React.createElement(
es_modal["default"],
{
open: isshow,
width: 860,
centered: true,
onCancel: () => {
setIsshow(false);
},
title: "\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",
footer: null
},
/* @__PURE__ */ React.createElement("div", { style: { color: "#333333", fontWeight: 400 } }, /* @__PURE__ */ React.createElement("span", { style: { fontWeight: 500 } }, "1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", null, "\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", null, " \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"), /* @__PURE__ */ React.createElement("span", { style: { color: "#FA6400", display: "flex", height: 34, alignItems: "center" } }, " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "), /* @__PURE__ */ React.createElement("span", null, "a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),
/* @__PURE__ */ React.createElement("div", { style: { color: "#333333", marginTop: 20, fontWeight: 400 } }, /* @__PURE__ */ React.createElement("span", { style: { fontWeight: 500 } }, "2\u3001\u5173\u5361\u603B\u8017\u65F6"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", { style: {} }, "\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", null, " \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"), /* @__PURE__ */ React.createElement("span", { style: { color: "#FA6400", display: "flex", height: 44, paddingTop: 10 } }, " \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "), /* @__PURE__ */ React.createElement("span", null, "a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", null, "b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),
/* @__PURE__ */ React.createElement("div", { style: { color: "#333333", marginTop: 20, fontWeight: 400 } }, /* @__PURE__ */ React.createElement("span", { style: { fontWeight: 500 } }, "3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", { style: {} }, "\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),
/* @__PURE__ */ React.createElement("div", { style: { color: "#333333", marginTop: 20, fontWeight: 400 } }, /* @__PURE__ */ React.createElement("span", { style: { fontWeight: 500 } }, "\u89C4\u5219\u76EE\u7684"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", { style: {} }, "\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))
), /* @__PURE__ */ React.createElement(
es_modal["default"],
{
open: isshows,
title: "\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",
centered: true,
footer: null,
onCancel: () => {
setIsshows(false);
},
width: 600
},
/* @__PURE__ */ React.createElement("div", { style: { fontWeight: 400, color: "#333333" } }, /* @__PURE__ */ React.createElement("div", null, "1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /* @__PURE__ */ React.createElement("span", { style: { color: "#145DFF" } }, "\u9875\u9762\u505C\u7559\u65F6\u957F"), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"), /* @__PURE__ */ React.createElement("div", { style: { margin: "20px 0px" } }, "2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /* @__PURE__ */ React.createElement("span", { style: { color: "#145DFF" } }, "\u5173\u5361\u603B\u8017\u65F6"), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"), /* @__PURE__ */ React.createElement("div", null, "3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C", /* @__PURE__ */ React.createElement("span", { style: { color: "#145DFF" } }, "\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"), "\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))
));
};
/* harmony default export */ var Comment = ((0,_umi_production_exports.connect)(
({
shixunHomeworks,
classroomList,
loading,
globalSetting,
user
}) => ({
shixunHomeworks,
classroomList,
globalSetting,
loading: loading.effects,
user
})
)(ShixunsListPage));
/***/ }),
/***/ 65876:
/*!*************************************************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/WorkList/components/RedoShixunModal.tsx ***!
\*************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/fetch */ 51165);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ 67866);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/authority */ 88141);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const RedoShixunModal = ({ shixunHomeworks, dispatch, classroomList, getData }) => {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
antd__WEBPACK_IMPORTED_MODULE_4__["default"],
{
centered: true,
title: "\u63D0\u793A",
open: shixunHomeworks.actionTabs.key === "redoShixunModal",
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
onOk: () => __async(void 0, null, function* () {
var _a;
if ((0,_utils_authority__WEBPACK_IMPORTED_MODULE_3__/* .isAssistant */ .Rm)() && !((_a = classroomList.AssistantObject.normal) == null ? void 0 : _a.can_redo)) {
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");
return;
}
const res = yield (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(
`/api/homework_commons/${shixunHomeworks.actionTabs.homework_common_id}/batch_redo_modal.json`,
{
method: "post",
body: {
student_work_id: shixunHomeworks.actionTabs.student_work_id
}
}
);
if (res.status === 0) {
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.success("\u64CD\u4F5C\u6210\u529F");
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {}
});
getData();
}
}),
onCancel: () => {
dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {}
});
}
},
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C", shixunHomeworks.actionTabs.isshixun ? "\u5B66\u751F\u5B9E\u8BAD" : "\u5B66\u751F\u4F5C\u54C1\u63D0\u4EA4", "\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\u786E\u5B9A\u6253\u56DE?")
);
};
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_2__.connect)(
({ shixunHomeworks, classroomList }) => ({
shixunHomeworks,
classroomList
})
)(RedoShixunModal));
/***/ })
}]);