autoUpdataFile

dev_local_v9_zzxy
eduauto 1 year ago
parent c2b11ef95a
commit 9df1fe1959

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.fbfb415c.js"></script>
<script src="/react/build/umi.b31a748d.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -28,16 +28,18 @@ var _umi_production_exports = __webpack_require__(88271);
;// CONCATENATED MODULE: ./src/pages/Materials/Log/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Logmodules = ({"header_div":"header_div___wDX_z","header_title":"header_title___m_rCO","search":"search___vKWpp","searchIcon":"searchIcon___oCy75","clear_Data":"clear_Data___MRoQI","infoItem":"infoItem___cOOke","file_list":"file_list___xH23D","file_list_title":"file_list_title___HO_WI","file_list_size":"file_list_size___cjzUF"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
var date_picker = __webpack_require__(251);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
var input = __webpack_require__(92832);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(36546);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(19871);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(61186);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
@ -45,14 +47,6 @@ var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
var NoData = __webpack_require__(63017);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(80231);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(95972);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(69423);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
var PreviewAll = __webpack_require__(97672);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
var RenderHtml = __webpack_require__(85681);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/Log/index.tsx
@ -67,12 +61,7 @@ var jsx_runtime = __webpack_require__(37712);
var Navigation = function Navigation(_ref) {
var _viewData$attachments;
var loading = _ref.loading;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
@ -106,10 +95,10 @@ var Navigation = function Navigation(_ref) {
_useState14 = slicedToArray_default()(_useState13, 2),
data = _useState14[0],
setData = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(false),
var _useState15 = (0,_react_17_0_2_react.useState)(true),
_useState16 = slicedToArray_default()(_useState15, 2),
editVisible = _useState16[0],
setEditVisible = _useState16[1];
spinning = _useState16[0],
setSpinning = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(''),
_useState18 = slicedToArray_default()(_useState17, 2),
centerId = _useState18[0],
@ -124,26 +113,29 @@ var Navigation = function Navigation(_ref) {
setViewData = _useState22[1];
var columns = [{
title: '操作人',
dataIndex: 'title',
dataIndex: 'real_name',
ellipsis: true,
width: 100
}, {
title: 'IP地址',
dataIndex: 'user_name',
dataIndex: 'ip',
ellipsis: true,
width: 140
}, {
title: '操作内容',
dataIndex: 'phone',
dataIndex: 'content',
ellipsis: true,
render: function render(text, record, index) {
return text ? text : '--';
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: text ? text : '--',
children: text ? text : '--'
});
}
}, {
title: '操作时间',
dataIndex: 'date',
dataIndex: 'created_at',
ellipsis: true,
width: 130,
width: 150,
render: function render(text, record, index) {
return text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--';
}
@ -160,16 +152,22 @@ var Navigation = function Navigation(_ref) {
if (flag) {
setPage(1);
}
(0,materials/* bills_query */.O_)({
setSpinning(true);
(0,materials/* queryLog */.Qk)({
page: page,
limit: limit,
keyword: keyword
keyword: keyword,
time: date,
container_type: "Substance"
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
var _res$data, _res$data2;
setTableData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
}
setSpinning(false);
})["catch"](function () {
setSpinning(false);
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
@ -190,10 +188,13 @@ var Navigation = function Navigation(_ref) {
className: "".concat(Logmodules.search, " mr10"),
onChange: function onChange(e, d) {
setDate(d);
getData(true);
debugger;
setTimeout(function () {
getData(true);
}, 300);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u91C7\u8D2D\u540D\u79F0\u8FDB\u884C\u641C\u7D22",
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u8FDB\u884C\u641C\u7D22",
size: "large",
className: Logmodules.search,
value: keyword,
@ -212,12 +213,15 @@ var Navigation = function Navigation(_ref) {
})
})]
})]
}), total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
customText: "\u6682\u65E0\u6570\u636E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: spinning,
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
customText: "\u6682\u65E0\u6570\u636E"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
@ -248,156 +252,6 @@ var Navigation = function Navigation(_ref) {
total: total
})]
}) : ''
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
title: "\u8D26\u5355\u8BE6\u60C5",
centered: true,
open: viewVisible,
onOk: function onOk() {
return setViewVisible(false);
},
onCancel: function onCancel() {
return setViewVisible(false);
},
cancelButtonProps: {
style: {
display: 'none'
}
},
width: 600,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
maxHeight: '500px',
overflowY: 'auto'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Logmodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '85px'
},
children: "\u91C7\u8D2D\u540D\u79F0\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (viewData === null || viewData === void 0 ? void 0 : viewData.title) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Logmodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '85px'
},
children: "\u91C7\u8D2D\u4EBA\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (viewData === null || viewData === void 0 ? void 0 : viewData.user_name) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Logmodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '85px'
},
children: "\u91C7\u8D2D\u4EBA\u7535\u8BDD\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (viewData === null || viewData === void 0 ? void 0 : viewData.phone) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Logmodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '85px'
},
children: "\u91C7\u8D2D\u65F6\u95F4\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: viewData !== null && viewData !== void 0 && viewData.date ? dayjs_min_default()(viewData === null || viewData === void 0 ? void 0 : viewData.date).format('YYYY-MM-DD HH:mm') : '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Logmodules.infoItem,
style: {
marginBottom: '20px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '85px'
},
children: "\u5907\u6CE8\u8BF4\u660E\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: '460px',
textAlign: "left",
marginTop: '5px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: (viewData === null || viewData === void 0 ? void 0 : viewData.description) || ''
})
})]
}), viewData === null || viewData === void 0 || (_viewData$attachments = viewData.attachments) === null || _viewData$attachments === void 0 ? void 0 : _viewData$attachments.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Logmodules.file_list,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Logmodules.file_list_title,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fujian font12 mr5"
}), item === null || item === void 0 ? void 0 : item.title]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Logmodules.file_list_size,
children: item === null || item === void 0 ? void 0 : item.filesize
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginLeft: '20px',
cursor: 'pointer',
lineHeight: '24px'
},
onClick: function onClick() {
var _item$url;
(0,util/* downLoadLink */.Nd)('', "".concat(env/* default */.Z.API_SERVER).concat(item === null || item === void 0 || (_item$url = item.url) === null || _item$url === void 0 ? void 0 : _item$url.replace('disposition=inline', '')));
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xiazai4 font12 mr5"
}), "\u4E0B\u8F7D"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginLeft: '20px',
cursor: 'pointer',
lineHeight: '24px',
color: '#50A760'
},
onClick: function onClick() {
setData({
type: item === null || item === void 0 ? void 0 : item.file_type,
content: env/* default */.Z.API_SERVER + (item === null || item === void 0 ? void 0 : item.url)
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-yulan font12 mr5"
}), "\u9884\u89C8"]
})]
});
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data === null || data === void 0 ? void 0 : data.content,
type: data === null || data === void 0 ? void 0 : data.type,
hasMask: true,
monacoEditor: {
language: "txt",
onChange: function onChange() {},
options: {
readOnly: true,
fontSize: 14,
minimap: {
enabled: false
}
}
},
onClose: function onClose() {
setData({
content: "",
type: ""
});
}
})]
})
})]
});
};

@ -132,6 +132,7 @@ button:active {
color: #333;
min-width: 200px;
margin-top: 5px;
padding-right: 15px;
}
.listItem___vWp5V {
display: flex;
@ -237,4 +238,8 @@ button:active {
.modal___pYDkY [class~='ant-btn'] {
display: none;
}
.barcode___qylCW {
width: 80px;
height: auto;
}

@ -0,0 +1,769 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[4829],{
/***/ 39441:
/*!********************************************************************!*\
!*** ./src/pages/Materials/MyReceive/Report/index.tsx + 1 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 */ Report; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(7557);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(39647);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
// 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.13@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(61186);
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: ./node_modules/_react-jsbarcode@1.0.1@react-jsbarcode/lib/index.mjs
var lib = __webpack_require__(64727);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(88271);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var es_modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
var skeleton = __webpack_require__(69127);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
var col = __webpack_require__(43604);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
var divider = __webpack_require__(28103);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(36546);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
var ArrowLeftOutlined = __webpack_require__(56679);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/icons/SolutionOutlined.js + 1 modules
var SolutionOutlined = __webpack_require__(14831);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(69423);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(64118);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(95972);
;// CONCATENATED MODULE: ./src/pages/Materials/MyReceive/Report/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Reportmodules = ({"flex_box_center":"flex_box_center___a7sjl","flex_space_between":"flex_space_between___APKgt","flex_box_vertical_center":"flex_box_vertical_center___Zh3FL","flex_box_center_end":"flex_box_center_end___Zz7YG","flex_box_column":"flex_box_column___IODVN","flex-col":"flex-col___PcFoo","flex-row":"flex-row___oldkd","justify-start":"justify-start___lBnpn","justify-center":"justify-center___DVejW","justify-end":"justify-end___DEq1x","justify-evenly":"justify-evenly___kNPqD","justify-around":"justify-around___vAjNp","justify-between":"justify-between___v12Fh","align-start":"align-start___y2bQ2","align-center":"align-center___JL_DN","align-end":"align-end___zPktK","title":"title___f3oUb","export":"export___ujoag","title1_right":"title1_right___U6_dE","userPic":"userPic___VJmp1","userInfo":"userInfo___znHCs","listItem":"listItem___vWp5V","rightInfo":"rightInfo___FzI9g","shixunTitle":"shixunTitle___ZnoQO","shixunWrp":"shixunWrp___Es0Ux","footerBar":"footerBar___dlHjj","footerBarStatic":"footerBarStatic___Up8zw","exitComment":"exitComment___eEq0h","nextComment":"nextComment___lpIAn","modal":"modal___pYDkY","barcode":"barcode___qylCW"});
// EXTERNAL MODULE: ./node_modules/_html2pdf.js@0.10.2@html2pdf.js/dist/html2pdf.js
var html2pdf = __webpack_require__(65022);
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(80231);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/MyReceive/Report/index.tsx
var _excluded = ["shixunHomeworks", "classroomList", "globalSetting", "loading", "user", "dispatch"];
// import EchartStatic from './components/EchartStatic'
// import ShixunStatic from './components/ShixunStatic'
// import ChangeCommit from './components/ChangeCommit'
// import Redo from '../Detail/components/WorkList/components/Redo'
var statusType = {
pending: '待审核',
approved: '待出库',
rejected: '已驳回',
canceled: '已取消',
returned: '已归还',
shipped: '待归还'
};
var ShixunsListPage = function ShixunsListPage(_ref) {
var shixunHomeworks = _ref.shixunHomeworks,
classroomList = _ref.classroomList,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch,
props = objectWithoutProperties_default()(_ref, _excluded);
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()({}, (0,_umi_production_exports.useParams)())),
_useState2 = slicedToArray_default()(_useState, 2),
params = _useState2[0],
setParams = _useState2[1];
var _params = (0,_umi_production_exports.useParams)();
var location = (0,_umi_production_exports.useLocation)();
// checkbox checked储存
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 0);
var reportElement = (0,_react_17_0_2_react.useRef)();
var reportElementInfo = (0,_react_17_0_2_react.useRef)();
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
isExportLoading = _useState6[0],
setIsExportLoading = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
spinning = _useState8[0],
setSpinning = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(false),
_useState10 = slicedToArray_default()(_useState9, 2),
autoHeight = _useState10[0],
setAutoHeight = _useState10[1];
var shixunWorkReport = shixunHomeworks.shixunWorkReport;
var _useState11 = (0,_react_17_0_2_react.useState)(new (jszip_min_default())()),
_useState12 = slicedToArray_default()(_useState11, 2),
zip = _useState12[0],
setZip = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)([]),
_useState14 = slicedToArray_default()(_useState13, 2),
allStudentWorks = _useState14[0],
setAllStudentWorks = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(),
_useState16 = slicedToArray_default()(_useState15, 2),
data = _useState16[0],
setData = _useState16[1];
var reportDataRef = (0,_react_17_0_2_react.useRef)();
(0,_react_17_0_2_react.useEffect)(function () {
setParams(objectSpread2_default()({}, _params));
getData();
}, [location.pathname]);
var scrollView = function scrollView() {
document.body.scrollIntoView();
};
function getData() {
return _getData.apply(this, arguments);
} // 解决导出 bug: DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D'
function _getData() {
_getData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
var res;
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
// /api/yn_classrooms/receives/{id}.json
console.log("params:", params);
setSpinning(true);
_context8.next = 4;
return (0,materials/* getReceiveReport */.LP)({
id: params.id
});
case 4:
res = _context8.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
reportDataRef.current = res === null || res === void 0 ? void 0 : res.data;
setData(res === null || res === void 0 ? void 0 : res.data);
}
setSpinning(false);
case 7:
case "end":
return _context8.stop();
}
}, _callee6);
}));
return _getData.apply(this, arguments);
}
var handleRemoveSurplusCanvas = function handleRemoveSurplusCanvas() {
document.querySelectorAll('canvas').forEach(function (item) {
(!item.clientWidth || !item.clientHeight) && item.remove();
});
};
var exportReport = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(type) {
var _reportDataRef$curren;
var nums, modal, opt, next, _next, pages, worker, folder, _loop, i;
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_next = function _next3() {
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
var res;
return regeneratorRuntime_default()().wrap(function _callee4$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return dispatch({
type: 'shixunHomeworks/getShixunWorkReport',
payload: {
homeworkId: allStudentWorks[nums]['student_work_id']
}
});
case 2:
res = _context6.sent;
scrollView();
nums++;
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var folders, pages, worker, _loop2, _i;
return regeneratorRuntime_default()().wrap(function _callee3$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
handleRemoveSurplusCanvas();
folders = zip.folder("".concat(res === null || res === void 0 ? void 0 : res.username));
pages = document.querySelector('#export-all').children;
worker = html2pdf_default()();
_loop2 = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop2(_i) {
return regeneratorRuntime_default()().wrap(function _loop2$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return worker.set(opt).from(pages[_i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(pdf) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
if (!(_i < pages.length - 1)) {
_context3.next = 3;
break;
}
_context3.next = 3;
return pdf.addPage();
case 3:
case "end":
return _context3.stop();
}
}, _callee2);
}));
return function (_x3) {
return _ref5.apply(this, arguments);
};
}());
case 2:
case "end":
return _context4.stop();
}
}, _loop2);
});
_i = 0;
case 6:
if (!(_i < pages.length)) {
_context5.next = 11;
break;
}
return _context5.delegateYield(_loop2(_i), "t0", 8);
case 8:
_i++;
_context5.next = 6;
break;
case 11:
folders.file("".concat(allStudentWorks[nums - 1]['student_work_user_name']).concat(nums, ".pdf"), worker.output('blob'));
// folder.file(`${shixunWorkReport.username}.pdf`, worker.output("blob"), { base64: false });
// const codesF = folders.folder('代码文件');
// res?.shixun_detail?.map((item: any, index: number) => {
// const codesG = codesF.folder(
// `第${index + 1}关-${item.subject}-${item.id}`,
// );
// item?.game_codes?.map((i: any) => {
// codesG.file(`${i.filename}.txt`, i?.content);
// });
// });
// zip.file(`${allStudentWorks[nums - 1]['student_work_user_name']}${nums}.pdf`, pdfUrl);
modal.update({
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue",
children: nums
}), "/", allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length, /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"]
})
});
if (nums == (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length)) {
modal.destroy();
download();
} else {
next();
}
case 14:
case "end":
return _context5.stop();
}
}, _callee3);
})), 2200);
case 6:
case "end":
return _context6.stop();
}
}, _callee4);
}));
return _next.apply(this, arguments);
};
next = function _next2() {
return _next.apply(this, arguments);
};
nums = 0;
// if (type !== 'all')
// setIsExportLoading(true)
// else
modal = es_modal/* default */.Z.info({
width: 460,
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u6B63\u5728\u5BFC\u51FAPDF,", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-red",
children: "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3"
})]
}),
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue",
children: nums + 1
}), "/", type !== 'all' ? 1 : allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length, /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"]
}),
maskClosable: false,
className: Reportmodules.modal,
onOk: function onOk() {}
});
opt = {
margin: [0, 0],
// “学员姓名”+物资领用申请报告单+“年月日”就行了」
filename: "".concat((_reportDataRef$curren = reportDataRef.current) === null || _reportDataRef$curren === void 0 ? void 0 : _reportDataRef$curren.user_name, "-\u7269\u8D44\u9886\u7528\u7533\u8BF7\u62A5\u544A\u5355-").concat(Date.now(), ".pdf"),
// image: {
// type: 'jpeg',
// quality: 0.98
// },
html2canvas: {
// dpi: 192,
// scale:2,
useCORS: true,
letterRendering: true
},
jsPDF: {
unit: 'mm',
format: 'a4',
orientation: 'landscape'
// unit: 'pt', format: [1200, 800], orientation: 'portrait'
}
};
if (!(type !== 'all' || (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length) < 2)) {
_context7.next = 24;
break;
}
handleRemoveSurplusCanvas();
scrollView();
// await new Promise(function (resolve, reject) {
// setMonocoHeight()
// setTimeout(function () {
// resolve('');
// }, 1500);
// });
pages = reportElementInfo.current.children;
worker = html2pdf_default()();
folder = zip.folder("".concat(data === null || data === void 0 ? void 0 : data.user_name));
_loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop(i) {
return regeneratorRuntime_default()().wrap(function _loop$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(pdf) {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!(i < pages.length - 1)) {
_context.next = 3;
break;
}
_context.next = 3;
return pdf.addPage();
case 3:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x2) {
return _ref3.apply(this, arguments);
};
}());
case 2:
case "end":
return _context2.stop();
}
}, _loop);
});
i = 0;
case 13:
if (!(i < pages.length)) {
_context7.next = 18;
break;
}
return _context7.delegateYield(_loop(i), "t0", 15);
case 15:
i++;
_context7.next = 13;
break;
case 18:
setIsExportLoading(false);
// zip.file(`${shixunWorkReport.username}.pdf`, pdfUrl);
// folder.file(`${data?.user_name}.pdf`, worker.output('blob'), {
// base64: false,
// });
worker.save();
modal.destroy();
return _context7.abrupt("return");
case 24:
next();
case 25:
case "end":
return _context7.stop();
}
}, _callee5);
}));
return function exportReport(_x) {
return _ref2.apply(this, arguments);
};
}();
var download = function download() {
reportDataRef;
zip.generateAsync({
type: 'blob'
}).then(function (content) {
var link = document.createElement('a');
link.href = window.URL.createObjectURL(content);
link.download = (data === null || data === void 0 ? void 0 : data.user_name) + '.zip';
//此写法兼容可火狐浏览器
document.body.appendChild(link);
var evt = document.createEvent('MouseEvents');
evt.initEvent('click', false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
setZip(new (jszip_min_default())());
});
setAutoHeight(false);
};
var columns = [{
title: '物资编码',
dataIndex: 'number',
render: function render(text, record, index) {
return index + 1;
}
}, {
title: '物资名称',
dataIndex: 'title',
render: function render(text, record, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [text, record.complete_status === 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkShixunDetailStatus */.vA, {
status: record.complete_status
})]
});
}
}, {
title: '规格型号',
dataIndex: 'model'
}, {
title: '存放实验室房间',
dataIndex: 'classroom_room_title',
render: function render(text, record, index) {
return text || '- -';
}
}, {
title: '单位',
dataIndex: 'unit'
}, {
title: '物资类型',
dataIndex: 'substance_category_title'
}, {
title: '可申请数量',
dataIndex: 'return_num'
// render: (text: number) => (toTimeFormat(text))
}, {
title: '需申请数量',
dataIndex: 'apply_num',
render: function render(text) {
return text ? '是' : '否';
}
}];
var columns1 = [{
title: '物资编号',
dataIndex: 'number',
key: 'number',
render: function render(text, item, index) {
return {
children: text,
props: {
rowSpan: item.rowSpan
}
};
}
}, {
title: '状态',
dataIndex: 'status',
key: 'status',
render: function render(text, item, index) {
return statusType[text];
// return {
// children: text,
// props: {
// rowSpan: item.rowSpan,
// },
// };
}
}, {
title: '物资名称',
dataIndex: 'title',
key: 'title'
}, {
title: '规格',
dataIndex: 'output',
key: 'output'
}, {
title: '单位',
dataIndex: 'unit',
key: 'unit'
}, {
title: '条形码',
dataIndex: 'number',
key: 'number',
width: 120,
render: function render(text, item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* ReactBarcode */.e, {
className: Reportmodules.barcode,
value: text
})
});
}
}];
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
className: "bg-fafafa",
style: {
position: 'sticky',
top: 0
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "edu-container mt10",
style: {
paddingBottom: 100
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
loading: spinning,
active: true,
avatar: {
size: 40
},
paragraph: {
rows: 5
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "edu-container",
children: [!shixunWorkReport.course_id && /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
className: "animated fadeIn",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: [Reportmodules.title1, 'mt20'].join(' '),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
flex: 1,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/materials/myReceive",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
className: "font16 c-black"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
className: "font20 ml5",
children: "\u7533\u8BF7\u62A5\u544A"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
className: Reportmodules.title1_right,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
className: "ml10",
onClick: function onClick() {
return exportReport('');
},
loading: isExportLoading,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-daochu mr5"
}), "\u5BFC\u51FAPDF"]
}), (0,authority/* isAdmin */.GJ)() && (allStudentWorks === null || allStudentWorks === void 0 ? void 0 : allStudentWorks.length) > 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
className: "ml10",
onClick: function onClick() {
return exportReport('all');
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-daochu mr5"
}), "\u5BFC\u51FA\u5168\u90E8\u5B66\u5458\u5B9E\u8BAD\u62A5\u544A"]
})]
})]
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "mt30 relative"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "edu-container bg-white",
ref: reportElement,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
id: "export-all",
ref: reportElementInfo,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
id: "export-all-1",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Reportmodules.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
children: "\u7533\u8BF7\u4EBA\u4FE1\u606F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
className: "mr20",
type: "primary",
onClick: function onClick() {
dispatch({
type: 'shixunHomeworks/setActionTabs',
payload: {
key: '更改点评',
selectArrs: {
myshixun_identifier: shixunWorkReport.user_id,
data: objectSpread2_default()({}, shixunWorkReport)
}
}
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SolutionOutlined/* default */.Z, {}), shixunWorkReport.has_shixun_work_comment ? '待审核' : '已审核']
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
style: {
marginTop: 0
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "pl30 pr30",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Reportmodules.userPic,
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(data === null || data === void 0 ? void 0 : data.avatar),
alt: shixunWorkReport.username
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font16 ml40",
children: shixunWorkReport.username
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* HomeWorkShixunDetailStatus */.vA, {
status: shixunWorkReport.compelete_status
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
className: Reportmodules.userInfo,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u5F53\u524D\u72B6\u6001\uFF1A", statusType[data === null || data === void 0 ? void 0 : data.status] || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u7533\u8BF7\u7269\u8D44\u6570\uFF1A", (data === null || data === void 0 ? void 0 : data.apply_total) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u7533\u8BF7\u65F6\u95F4\uFF1A", dayjs_min_default()((data === null || data === void 0 ? void 0 : data.start_time) || "").format("YYYY-MM-DD HH:mm") || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["IP\u5730\u5740\uFF1A", (data === null || data === void 0 ? void 0 : data.ip) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u624B\u673A\u53F7\uFF1A", (data === null || data === void 0 ? void 0 : data.phone) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u7533\u8BF7\u4EBA\uFF1A", (data === null || data === void 0 ? void 0 : data.user_name) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u7533\u8BF7\u5B9E\u9A8C\u5BA4\uFF1A", (data === null || data === void 0 ? void 0 : data.classroom_title) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u4F7F\u7528\u5B9E\u9A8C\u5BA4\uFF1A", (data === null || data === void 0 ? void 0 : data.classroom_title) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u4F7F\u7528\u5B9E\u9A8C\u5BA4\u5206\u5BA4\uFF1A", (data === null || data === void 0 ? void 0 : data.place_title) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u7533\u8BF7\u539F\u56E0\uFF1A", (data === null || data === void 0 ? void 0 : data.reason) || '--']
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
style: {
margin: 0
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
className: Reportmodules.title,
children: "\u7533\u8BF7\u7269\u8D44"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "pl30 pr30",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
dataSource: data === null || data === void 0 ? void 0 : data.substance_details,
rowKey: function rowKey(r) {
return r === null || r === void 0 ? void 0 : r.id;
},
pagination: false,
columns: columns
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
style: {
margin: 0
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
className: Reportmodules.title,
children: "\u51FA\u5E93\u7EC6\u5219"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
className: Reportmodules.userInfo,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u5BA1\u6838\u4EBA\uFF1A", (data === null || data === void 0 ? void 0 : data.review_user_name) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u624B\u673A\u53F7\uFF1A", shixunWorkReport.group_name || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["IP\uFF1A", (data === null || data === void 0 ? void 0 : data.review_ip) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u5BA1\u6838\u65F6\u95F4\uFF1A", (data === null || data === void 0 ? void 0 : data.review_time) || '--']
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
children: ["\u51FA\u5E93\u65F6\u95F4\uFF1A", (data === null || data === void 0 ? void 0 : data.group_name) || '--']
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "pl30 pr30",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
dataSource: data === null || data === void 0 ? void 0 : data.substance_details,
rowKey: function rowKey(r) {
return r === null || r === void 0 ? void 0 : r.id;
},
pagination: false,
columns: columns1
})
})]
})
})
})]
})
})
});
};
/* harmony default export */ var Report = ((0,_umi_production_exports.connect)(function (_ref6) {
var shixunHomeworks = _ref6.shixunHomeworks,
classroomList = _ref6.classroomList,
loading = _ref6.loading,
globalSetting = _ref6.globalSetting,
user = _ref6.user;
return {
shixunHomeworks: shixunHomeworks,
classroomList: classroomList,
globalSetting: globalSetting,
loading: loading.effects,
user: user
};
})(ShixunsListPage));
/***/ })
}]);

File diff suppressed because it is too large Load Diff

@ -625,13 +625,7 @@ var Navigation = function Navigation(_ref) {
marginLeft: 10
},
onClick: function onClick() {
(0,materials/* receives_info */.Os)({
id: record.id,
only_apply_total: 1
}).then(function (res) {
setViewData(res === null || res === void 0 ? void 0 : res.data);
setOpenViewModal(true);
});
_umi_production_exports.history.push("/materials/myReceive/".concat(record.id, "/report"));
},
children: "\u7533\u8BF7\u62A5\u544A"
}), ((record === null || record === void 0 ? void 0 : record.status) == 'pending' || (record === null || record === void 0 ? void 0 : record.status) == 'rejected') && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {

@ -632,6 +632,7 @@ var ReturnModal_ViewModal = function ViewModal(_ref) {
open: openReturnModal,
title: "\u786E\u8BA4\u5F52\u8FD8",
width: "1000px",
okText: "\u786E\u8BA4\u5F52\u8FD8",
onOk: function onOk(e) {
var regex = /^(?!0+(\.0*)?$)\d+(\.\d)?$/;
if ((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.length) == 0) {

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save