Auto Submit

pull/1/head
autosubmit 2 years ago
parent 86a3a5dd1b
commit 6ebde89e44

@ -3153,7 +3153,6 @@ var jsx_runtime = __webpack_require__(37712);
var itemStyle = {
normal: {
opacity: 0.8,
@ -3165,31 +3164,15 @@ var itemStyle = {
}
};
var ShixunsListPage = function ShixunsListPage(_ref) {
var _shixunWorkReport$ech, _shixunWorkReport$ech2, _shixunWorkReport$ech12, _shixunWorkReport$ech13, _shixunWorkReport$ech14;
var _data$efficiency_list;
var shixunHomeworks = _ref.shixunHomeworks,
data = _ref.data,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch;
var params = (0,_umi_production_exports.useParams)();
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
searchParams = _useSearchParams2[0];
var location = (0,_umi_production_exports.useLocation)();
// checkbox checked储存
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
selectArrs = _useState2[0],
setSelectArrs = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(searchParams.get("tabs") || 0),
_useState4 = slicedToArray_default()(_useState3, 2),
activeTabs = _useState4[0],
setActiveTabs = _useState4[1];
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
var indextab = ((_shixunWorkReport$ech = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech === void 0 ? void 0 : _shixunWorkReport$ech.efficiency_list.length) - parseInt((_shixunWorkReport$ech2 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech2 === void 0 ? void 0 : _shixunWorkReport$ech2.myself_eff[0]);
// console.log('-----indextab',indextab,shixunWorkReport.echart_data?.efficiency_list.length,parseInt(shixunWorkReport.echart_data?.myself_eff[0]),shixunWorkReport.echart_data?.efficiency_list.length-parseInt(shixunWorkReport.echart_data?.myself_eff[0]));
var indextab = (data === null || data === void 0 || (_data$efficiency_list = data.efficiency_list) === null || _data$efficiency_list === void 0 ? void 0 : _data$efficiency_list.length) - parseInt(data === null || data === void 0 ? void 0 : data.myself_eff[0]);
var getOption = function getOption() {
var _shixunWorkReport$ech4, _shixunWorkReport$ech5, _shixunWorkReport$ech6;
return {
title: {
text: '学习效率',
@ -3208,8 +3191,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
showDelay: 0,
formatter: function formatter(params) {
if (params.name === shixunWorkReport.username) {
var _shixunWorkReport$ech3;
return "姓名:" + shixunWorkReport.username + "<br/>" + '学号: ' + shixunWorkReport.user_id + "<br/>" + '效率:' + ((_shixunWorkReport$ech3 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech3 === void 0 ? void 0 : _shixunWorkReport$ech3.myself_eff[1]);
return "姓名:" + shixunWorkReport.username + "<br/>" + '学号: ' + shixunWorkReport.user_id + "<br/>" + '效率:' + (data === null || data === void 0 ? void 0 : data.myself_eff[1]);
} else {
return params.name + ":" + params.value + " ";
}
@ -3261,7 +3243,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
series: [{
name: '',
type: 'scatter',
data: (_shixunWorkReport$ech4 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech4 === void 0 ? void 0 : _shixunWorkReport$ech4.efficiency_list,
data: data === null || data === void 0 ? void 0 : data.efficiency_list,
itemStyle: {
normal: {
color: '#2e65ad'
@ -3289,8 +3271,8 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
data: [{
name: shixunWorkReport.username,
xAxis: indextab,
yAxis: (_shixunWorkReport$ech5 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech5 === void 0 ? void 0 : _shixunWorkReport$ech5.myself_eff[1],
value: (_shixunWorkReport$ech6 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech6 === void 0 ? void 0 : _shixunWorkReport$ech6.myself_eff[1]
yAxis: data === null || data === void 0 ? void 0 : data.myself_eff[1],
value: data === null || data === void 0 ? void 0 : data.myself_eff[1]
}],
itemStyle: {
normal: {
@ -3314,7 +3296,6 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
};
};
var getOption2 = function getOption2() {
var _shixunWorkReport$ech8, _shixunWorkReport$ech9, _shixunWorkReport$ech10, _shixunWorkReport$ech11;
return {
title: {
text: '能力值',
@ -3336,8 +3317,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
formatter: function formatter(obj) {
var value = obj.value;
if (obj.name === shixunWorkReport.username) {
var _shixunWorkReport$ech7;
return "姓名:" + shixunWorkReport.username + "<br/>" + '学号: ' + shixunWorkReport.user_id + "<br/>" + '得分:' + ((_shixunWorkReport$ech7 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech7 === void 0 ? void 0 : _shixunWorkReport$ech7.myself_object[1]);
return "姓名:" + shixunWorkReport.username + "<br/>" + '学号: ' + shixunWorkReport.user_id + "<br/>" + '得分:' + (data === null || data === void 0 ? void 0 : data.myself_object[1]);
}
}
},
@ -3380,16 +3360,16 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
name: '能力',
type: 'scatter',
itemStyle: itemStyle,
data: (_shixunWorkReport$ech8 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech8 === void 0 ? void 0 : _shixunWorkReport$ech8.consume_list,
data: data === null || data === void 0 ? void 0 : data.consume_list,
symbolSize: function symbolSize(value) {
return Math.round(value[2]);
},
markPoint: {
data: [{
name: shixunWorkReport.username,
xAxis: (_shixunWorkReport$ech9 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech9 === void 0 ? void 0 : _shixunWorkReport$ech9.myself_object[0],
yAxis: (_shixunWorkReport$ech10 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech10 === void 0 ? void 0 : _shixunWorkReport$ech10.myself_object[1],
value: (_shixunWorkReport$ech11 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech11 === void 0 ? void 0 : _shixunWorkReport$ech11.myself_object[1]
xAxis: data === null || data === void 0 ? void 0 : data.myself_object[0],
yAxis: data === null || data === void 0 ? void 0 : data.myself_object[1],
value: data === null || data === void 0 ? void 0 : data.myself_object[1]
}],
itemStyle: {
normal: {
@ -3437,14 +3417,14 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
children: "\u5B66\u4E60\u6548\u7387"
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-orange",
children: (_shixunWorkReport$ech12 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech12 === void 0 ? void 0 : _shixunWorkReport$ech12.myself_eff[1]
children: data === null || data === void 0 ? void 0 : data.myself_eff[1]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5F53\u524D\u6392\u540D"
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-orange",
children: (_shixunWorkReport$ech13 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech13 === void 0 ? void 0 : _shixunWorkReport$ech13.myself_eff[0]
children: data === null || data === void 0 ? void 0 : data.myself_eff[0]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
@ -3489,7 +3469,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
children: "\u80FD\u529B"
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml30 c-orange",
children: (_shixunWorkReport$ech14 = shixunWorkReport.echart_data) === null || _shixunWorkReport$ech14 === void 0 ? void 0 : _shixunWorkReport$ech14.myself_object[1]
children: data === null || data === void 0 ? void 0 : data.myself_object[1]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
@ -4373,72 +4353,64 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
// checkbox checked储存
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 0);
var _useState5 = (0,_react_17_0_2_react.useState)({
last: false
}),
var _useState5 = (0,_react_17_0_2_react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
nextComment = _useState6[0],
setNextComment = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)({
last: false
}),
_useState8 = slicedToArray_default()(_useState7, 2),
Previous = _useState8[0],
setPrevious = _useState8[1];
chartData = _useState6[0],
setChartData = _useState6[1];
var reportElement = (0,_react_17_0_2_react.useRef)();
var reportElementInfo = (0,_react_17_0_2_react.useRef)();
var _useState7 = (0,_react_17_0_2_react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
isExportLoading = _useState8[0],
setIsExportLoading = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(false),
_useState10 = slicedToArray_default()(_useState9, 2),
isExportLoading = _useState10[0],
setIsExportLoading = _useState10[1];
spinning = _useState10[0],
setSpinning = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(false),
_useState12 = slicedToArray_default()(_useState11, 2),
spinning = _useState12[0],
setSpinning = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
autoHeight = _useState14[0],
setAutoHeight = _useState14[1];
autoHeight = _useState12[0],
setAutoHeight = _useState12[1];
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
var _useState15 = (0,_react_17_0_2_react.useState)(),
_useState16 = slicedToArray_default()(_useState15, 2),
datatables = _useState16[0],
setdatatables = _useState16[1];
var _useState13 = (0,_react_17_0_2_react.useState)(),
_useState14 = slicedToArray_default()(_useState13, 2),
datatables = _useState14[0],
setdatatables = _useState14[1];
var hasPower = (0,authority/* isAdmin */.GJ)();
var _useState17 = (0,_react_17_0_2_react.useState)(new (jszip_min_default())()),
var _useState15 = (0,_react_17_0_2_react.useState)(new (jszip_min_default())()),
_useState16 = slicedToArray_default()(_useState15, 2),
zip = _useState16[0],
setZip = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(0),
_useState18 = slicedToArray_default()(_useState17, 2),
zip = _useState18[0],
setZip = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(0),
num = _useState18[0],
setNum = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(false),
_useState20 = slicedToArray_default()(_useState19, 2),
num = _useState20[0],
setNum = _useState20[1];
isshow = _useState20[0],
setIsshow = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)(false),
_useState22 = slicedToArray_default()(_useState21, 2),
isshow = _useState22[0],
setIsshow = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(false),
isshows = _useState22[0],
setIsshows = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(""),
_useState24 = slicedToArray_default()(_useState23, 2),
isshows = _useState24[0],
setIsshows = _useState24[1];
var _useState25 = (0,_react_17_0_2_react.useState)(""),
_useState26 = slicedToArray_default()(_useState25, 2),
score = _useState26[0],
setscore = _useState26[1];
score = _useState24[0],
setscore = _useState24[1];
// 判断是否为老师
var _useState27 = (0,_react_17_0_2_react.useState)(false),
_useState28 = slicedToArray_default()(_useState27, 2),
isTeacher = _useState28[0],
setisTeacher = _useState28[1];
var _useState25 = (0,_react_17_0_2_react.useState)(false),
_useState26 = slicedToArray_default()(_useState25, 2),
isTeacher = _useState26[0],
setisTeacher = _useState26[1];
// 如果不是老师就禁用输入框:
var _useState29 = (0,_react_17_0_2_react.useState)(true),
var _useState27 = (0,_react_17_0_2_react.useState)(true),
_useState28 = slicedToArray_default()(_useState27, 2),
isDisabled = _useState28[0],
setisDisabled = _useState28[1];
var _useState29 = (0,_react_17_0_2_react.useState)(0),
_useState30 = slicedToArray_default()(_useState29, 2),
isDisabled = _useState30[0],
setisDisabled = _useState30[1];
var _useState31 = (0,_react_17_0_2_react.useState)(0),
_useState32 = slicedToArray_default()(_useState31, 2),
last_score = _useState32[0],
setlast_score = _useState32[1];
last_score = _useState30[0],
setlast_score = _useState30[1];
var otherPramsRef = (0,_react_17_0_2_react.useRef)(JSON.parse(sessionStorage['all_student_works_params'] || '{}'));
var nextId = (0,_react_17_0_2_react.useRef)();
// 获取用户信息:
@ -4539,9 +4511,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
return _getData.apply(this, arguments);
} // 解决导出 bug: DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D'
function _getData() {
_getData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
return regeneratorRuntime_default()().wrap(function _callee14$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
_getData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
return regeneratorRuntime_default()().wrap(function _callee15$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
otherPramsRef.current = JSON.parse(sessionStorage['all_student_works_params'] || '{}');
// const res = await dispatch({
@ -4563,9 +4535,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
// }
case 1:
case "end":
return _context16.stop();
return _context17.stop();
}
}, _callee14);
}, _callee15);
}));
return _getData.apply(this, arguments);
}
@ -4581,82 +4553,108 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
setAutoHeight(true);
}
};
var getEchartData = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(id) {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0,service_shixunHomeworks/* getShixunWorkReportEchart */.t1)({
homeworkId: id || params.homeworkId
});
case 2:
res = _context2.sent;
setChartData(res === null || res === void 0 ? void 0 : res.data);
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function getEchartData(_x) {
return _ref3.apply(this, arguments);
};
}();
var exportReport = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(type) {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(type) {
var nums, modal, opt, next, _next, _shixunWorkReport$shi, pages, worker, folder, _loop, i, codeF;
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
return regeneratorRuntime_default()().wrap(function _callee7$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_next = function _next3() {
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(id) {
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(id) {
var res;
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context7.next = 2;
_context8.next = 2;
return getEchartData(id || nextId.current);
case 2:
_context8.next = 4;
return dispatch({
type: 'shixunHomeworks/getShixunWorkReport',
payload: objectSpread2_default()({
homeworkId: id || nextId.current
}, otherPramsRef.current || {})
});
case 2:
res = _context7.sent;
case 4:
res = _context8.sent;
nextId.current = res === null || res === void 0 ? void 0 : res.next_student_work_id;
scrollView();
nums++;
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
var _res$shixun_detail;
var folders, pages, worker, _loop2, _i, codesF;
return regeneratorRuntime_default()().wrap(function _callee4$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
while (1) switch (_context7.prev = _context7.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$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
return regeneratorRuntime_default()().wrap(function _loop2$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context5.next = 2;
_context6.next = 2;
return worker.set(opt).from(pages[_i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(pdf) {
return regeneratorRuntime_default()().wrap(function _callee3$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(pdf) {
return regeneratorRuntime_default()().wrap(function _callee4$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
if (!(_i < pages.length - 1)) {
_context4.next = 3;
_context5.next = 3;
break;
}
_context4.next = 3;
_context5.next = 3;
return pdf.addPage();
case 3:
case "end":
return _context4.stop();
return _context5.stop();
}
}, _callee3);
}, _callee4);
}));
return function (_x4) {
return _ref6.apply(this, arguments);
return function (_x5) {
return _ref7.apply(this, arguments);
};
}());
case 2:
case "end":
return _context5.stop();
return _context6.stop();
}
}, _loop2);
});
_i = 0;
case 6:
if (!(_i < pages.length)) {
_context6.next = 11;
_context7.next = 11;
break;
}
return _context6.delegateYield(_loop2(_i), "t0", 8);
return _context7.delegateYield(_loop2(_i), "t0", 8);
case 8:
_i++;
_context6.next = 6;
_context7.next = 6;
break;
case 11:
folders.file("".concat(res === null || res === void 0 ? void 0 : res.username).concat(nums, ".pdf"), worker.output("blob"));
@ -4685,19 +4683,19 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}
case 16:
case "end":
return _context6.stop();
return _context7.stop();
}
}, _callee4);
}, _callee5);
})), 2200);
case 7:
case 9:
case "end":
return _context7.stop();
return _context8.stop();
}
}, _callee5);
}, _callee6);
}));
return _next.apply(this, arguments);
};
next = function _next2(_x2) {
next = function _next2(_x3) {
return _next.apply(this, arguments);
};
nums = 0;
@ -4743,7 +4741,7 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}
};
if (!(type !== 'all' || (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.students_count) < 2)) {
_context8.next = 27;
_context9.next = 27;
break;
}
handleRemoveSurplusCanvas();
@ -4759,47 +4757,47 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
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$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
return regeneratorRuntime_default()().wrap(function _loop$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context3.next = 2;
_context4.next = 2;
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(pdf) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(pdf) {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
if (!(i < pages.length - 1)) {
_context2.next = 3;
_context3.next = 3;
break;
}
_context2.next = 3;
_context3.next = 3;
return pdf.addPage();
case 3:
case "end":
return _context2.stop();
return _context3.stop();
}
}, _callee2);
}, _callee3);
}));
return function (_x3) {
return _ref4.apply(this, arguments);
return function (_x4) {
return _ref5.apply(this, arguments);
};
}());
case 2:
case "end":
return _context3.stop();
return _context4.stop();
}
}, _loop);
});
i = 0;
case 13:
if (!(i < pages.length)) {
_context8.next = 18;
_context9.next = 18;
break;
}
return _context8.delegateYield(_loop(i), "t0", 15);
return _context9.delegateYield(_loop(i), "t0", 15);
case 15:
i++;
_context8.next = 13;
_context9.next = 13;
break;
case 18:
setIsExportLoading(false);
@ -4819,17 +4817,17 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
// worker.save()
modal.destroy();
download();
return _context8.abrupt("return");
return _context9.abrupt("return");
case 27:
next(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.first_student_work_id);
case 28:
case "end":
return _context8.stop();
return _context9.stop();
}
}, _callee6);
}, _callee7);
}));
return function exportReport(_x) {
return _ref3.apply(this, arguments);
return function exportReport(_x2) {
return _ref4.apply(this, arguments);
};
}();
var download = function download() {
@ -4853,27 +4851,28 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
initData();
}, [params.homeworkId]);
var initData = /*#__PURE__*/function () {
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
return regeneratorRuntime_default()().wrap(function _callee7$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
return regeneratorRuntime_default()().wrap(function _callee8$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
setSpinning(true);
_context9.next = 3;
_context10.next = 2;
return dispatch({
type: 'shixunHomeworks/getShixunWorkReport',
payload: objectSpread2_default()(objectSpread2_default()({}, params), otherPramsRef.current || {})
});
case 3:
setSpinning(false);
case 2:
getEchartData();
// setSpinning(false)
if ((0,authority/* isAdmin */.GJ)()) getData();
case 5:
case 4:
case "end":
return _context9.stop();
return _context10.stop();
}
}, _callee7);
}, _callee8);
}));
return function initData() {
return _ref7.apply(this, arguments);
return _ref8.apply(this, arguments);
};
}();
var columns = [{
@ -4952,20 +4951,20 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
max: record.game_score_full,
defaultValue: parseFloat(text),
onBlur: /*#__PURE__*/function () {
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(value) {
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(value) {
var _classroomList$Assist;
var res;
return regeneratorRuntime_default()().wrap(function _callee8$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
return regeneratorRuntime_default()().wrap(function _callee9$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
if (!((0,authority/* isAssistant */.Rm)() && !((_classroomList$Assist = classroomList.AssistantObject.practice) !== null && _classroomList$Assist !== void 0 && _classroomList$Assist.can_appraise))) {
_context10.next = 3;
_context11.next = 3;
break;
}
message/* default */.ZP.warning('您未获取此权限,需向管理员申请权限才能使用此功能');
return _context10.abrupt("return");
return _context11.abrupt("return");
case 3:
_context10.next = 5;
_context11.next = 5;
return dispatch({
type: "shixunHomeworks/changeScore",
payload: {
@ -4976,8 +4975,8 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}
});
case 5:
res = _context10.sent;
_context10.next = 8;
res = _context11.sent;
_context11.next = 8;
return dispatch({
type: 'shixunHomeworks/getShixunWorkReport',
payload: objectSpread2_default()(objectSpread2_default()({}, params), otherPramsRef.current || {})
@ -4988,12 +4987,12 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}
case 9:
case "end":
return _context10.stop();
return _context11.stop();
}
}, _callee8);
}, _callee9);
}));
return function (_x5) {
return _ref8.apply(this, arguments);
return function (_x6) {
return _ref9.apply(this, arguments);
};
}()
});
@ -5103,12 +5102,12 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
};
// 输入框失焦后 触发更新分数的接口
var gochange = /*#__PURE__*/function () {
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
var res;
return regeneratorRuntime_default()().wrap(function _callee9$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
return regeneratorRuntime_default()().wrap(function _callee10$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context11.next = 2;
_context12.next = 2;
return (0,fetch/* default */.ZP)("/api/student_works/".concat(shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.work_id, "/update_repeat_score"), {
method: 'put',
body: {
@ -5116,8 +5115,8 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}
});
case 2:
res = _context11.sent;
_context11.next = 5;
res = _context12.sent;
_context12.next = 5;
return dispatch({
type: 'shixunHomeworks/getShixunWorkReport',
payload: objectSpread2_default()(objectSpread2_default()({}, params), otherPramsRef.current || {})
@ -5129,12 +5128,12 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}
case 6:
case "end":
return _context11.stop();
return _context12.stop();
}
}, _callee9);
}, _callee10);
}));
return function gochange() {
return _ref9.apply(this, arguments);
return _ref10.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
@ -5149,7 +5148,7 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
paddingBottom: 100
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
loading: spinning,
loading: loading["shixunHomeworks/getShixunWorkReport"],
active: true,
avatar: {
size: 40
@ -5215,11 +5214,11 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
})]
}), (0,authority/* isAdmin */.GJ)() && shixunWorkReport.homework_end === false && !!shixunWorkReport.myshixun_id && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
className: "ml10",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
return regeneratorRuntime_default()().wrap(function _callee10$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
return regeneratorRuntime_default()().wrap(function _callee11$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context12.next = 2;
_context13.next = 2;
return dispatch({
type: 'shixunHomeworks/setActionTabs',
payload: {
@ -5232,9 +5231,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
});
case 2:
case "end":
return _context12.stop();
return _context13.stop();
}
}, _callee10);
}, _callee11);
})),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-dahuizhongzuo3x mr5"
@ -5556,9 +5555,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "pr30",
children: (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() {
return regeneratorRuntime_default()().wrap(function _callee12$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
return regeneratorRuntime_default()().wrap(function _callee13$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
es_modal/* default */.Z.confirm({
centered: true,
@ -5568,18 +5567,18 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {}),
content: '是否确认删除?',
onOk: function onOk() {
return asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
return asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() {
var res;
return regeneratorRuntime_default()().wrap(function _callee11$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
return regeneratorRuntime_default()().wrap(function _callee12$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context13.next = 2;
_context14.next = 2;
return (0,service_shixunHomeworks/* deleteStudentWorkScoreCommit */.gZ)({
comment_id: shixunWorkReport.comment_id,
homeworkId: params.homeworkId
});
case 2:
res = _context13.sent;
res = _context14.sent;
if (res.status === 0) {
message/* default */.ZP.success("删除成功");
dispatch({
@ -5589,17 +5588,17 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}
case 4:
case "end":
return _context13.stop();
return _context14.stop();
}
}, _callee11);
}, _callee12);
}))();
}
});
case 1:
case "end":
return _context14.stop();
return _context15.stop();
}
}, _callee12);
}, _callee13);
})),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {}), "\u5220\u9664"]
})
@ -5669,7 +5668,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
className: Commentmodules.title,
children: "\u56FE\u5F62\u7EDF\u8BA1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(EchartStatic, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
}), /*#__PURE__*/(0,jsx_runtime.jsx)(EchartStatic, {
data: chartData
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
className: Commentmodules.title,
children: "\u5B9E\u8BAD\u8BE6\u60C5"
})]
@ -5713,9 +5714,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
children: "\u4E0B\u4E00\u4E2A"
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
return regeneratorRuntime_default()().wrap(function _callee13$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
return regeneratorRuntime_default()().wrap(function _callee14$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
dispatch({
type: 'shixunHomeworks/setActionTabs',
@ -5729,9 +5730,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
});
case 1:
case "end":
return _context15.stop();
return _context16.stop();
}
}, _callee13);
}, _callee14);
})),
children: "\u70B9\u8BC4\u4F5C\u4E1A"
})]
@ -5877,12 +5878,12 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
})]
});
};
/* harmony default export */ var Comment = ((0,_umi_production_exports.connect)(function (_ref13) {
var shixunHomeworks = _ref13.shixunHomeworks,
classroomList = _ref13.classroomList,
loading = _ref13.loading,
globalSetting = _ref13.globalSetting,
user = _ref13.user;
/* harmony default export */ var Comment = ((0,_umi_production_exports.connect)(function (_ref14) {
var shixunHomeworks = _ref14.shixunHomeworks,
classroomList = _ref14.classroomList,
loading = _ref14.loading,
globalSetting = _ref14.globalSetting,
user = _ref14.user;
return {
shixunHomeworks: shixunHomeworks,
classroomList: classroomList,

603
umi.js

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save