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__Graduations__Lists__Task...

2239 lines
94 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[9416,33017],{
/***/ 65547:
/*!************************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/icons/PlusCircleOutlined.js + 1 modules ***!
\************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_PlusCircleOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.25.6@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(33614);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/PlusCircleOutlined.js
// This icon file is generated automatically.
var PlusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "plus-circle", "theme": "outlined" };
/* harmony default export */ var asn_PlusCircleOutlined = (PlusCircleOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(1393);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/icons/PlusCircleOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PlusCircleOutlined_PlusCircleOutlined = function PlusCircleOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_PlusCircleOutlined
}));
};
/**![plus-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTY5NiA0ODBINTQ0VjMyOGMwLTQuNC0zLjYtOC04LThoLTQ4Yy00LjQgMC04IDMuNi04IDh2MTUySDMyOGMtNC40IDAtOCAzLjYtOCA4djQ4YzAgNC40IDMuNiA4IDggOGgxNTJ2MTUyYzAgNC40IDMuNiA4IDggOGg0OGM0LjQgMCA4LTMuNiA4LThWNTQ0aDE1MmM0LjQgMCA4LTMuNiA4LTh2LTQ4YzAtNC40LTMuNi04LTgtOHoiIC8+PHBhdGggZD0iTTUxMiA2NEMyNjQuNiA2NCA2NCAyNjQuNiA2NCA1MTJzMjAwLjYgNDQ4IDQ0OCA0NDggNDQ4LTIwMC42IDQ0OC00NDhTNzU5LjQgNjQgNTEyIDY0em0wIDgyMGMtMjA1LjQgMC0zNzItMTY2LjYtMzcyLTM3MnMxNjYuNi0zNzIgMzcyLTM3MiAzNzIgMTY2LjYgMzcyIDM3Mi0xNjYuNiAzNzItMzcyIDM3MnoiIC8+PC9zdmc+) */
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(PlusCircleOutlined_PlusCircleOutlined);
if (false) {}
/* harmony default export */ var icons_PlusCircleOutlined = (RefIcon);
/***/ }),
/***/ 14980:
/*!*****************************************************************!*\
!*** ./src/pages/Graduations/Lists/Tasks/index.tsx + 7 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 */ Tasks; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(80608);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
var skeleton = __webpack_require__(66999);
// 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/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/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// 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/upload/index.js
var upload = __webpack_require__(60028);
// 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/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(27876);
// EXTERNAL MODULE: ./src/pages/Graduations/components/TeacherModule/index.tsx + 1 modules
var TeacherModule = __webpack_require__(37597);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(71681);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var utils_fetch = __webpack_require__(49105);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var es_modal = __webpack_require__(43418);
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Tasks/DetailsModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var DetailsModalmodules = ({"flex_box_center":"flex_box_center___dejrx","flex_space_between":"flex_space_between___WBGxf","flex_box_vertical_center":"flex_box_vertical_center___OMTvG","flex_box_center_end":"flex_box_center_end___FHZRS","flex_box_column":"flex_box_column___cDBl4","File":"File___Vzzv4","deletfileIcon":"deletfileIcon___snNZ9","wrap":"wrap___eGzSn","row":"row___qfnoA","img":"img___Ftdlp"});
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 30 modules
var ui_customization = __webpack_require__(92073);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.25.6@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(33614);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/LinkOutlined.js
// This icon file is generated automatically.
var LinkOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z" } }] }, "name": "link", "theme": "outlined" };
/* harmony default export */ var asn_LinkOutlined = (LinkOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(1393);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/icons/LinkOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var LinkOutlined_LinkOutlined = function LinkOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_LinkOutlined
}));
};
/**![link](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTU3NCA2NjUuNGE4LjAzIDguMDMgMCAwMC0xMS4zIDBMNDQ2LjUgNzgxLjZjLTUzLjggNTMuOC0xNDQuNiA1OS41LTIwNCAwLTU5LjUtNTkuNS01My44LTE1MC4yIDAtMjA0bDExNi4yLTExNi4yYzMuMS0zLjEgMy4xLTguMiAwLTExLjNsLTM5LjgtMzkuOGE4LjAzIDguMDMgMCAwMC0xMS4zIDBMMTkxLjQgNTI2LjVjLTg0LjYgODQuNi04NC42IDIyMS41IDAgMzA2czIyMS41IDg0LjYgMzA2IDBsMTE2LjItMTE2LjJjMy4xLTMuMSAzLjEtOC4yIDAtMTEuM0w1NzQgNjY1LjR6bTI1OC42LTQ3NGMtODQuNi04NC42LTIyMS41LTg0LjYtMzA2IDBMNDEwLjMgMzA3LjZhOC4wMyA4LjAzIDAgMDAwIDExLjNsMzkuNyAzOS43YzMuMSAzLjEgOC4yIDMuMSAxMS4zIDBsMTE2LjItMTE2LjJjNTMuOC01My44IDE0NC42LTU5LjUgMjA0IDAgNTkuNSA1OS41IDUzLjggMTUwLjIgMCAyMDRMNjY1LjMgNTYyLjZhOC4wMyA4LjAzIDAgMDAwIDExLjNsMzkuOCAzOS44YzMuMSAzLjEgOC4yIDMuMSAxMS4zIDBsMTE2LjItMTE2LjJjODQuNS04NC42IDg0LjUtMjIxLjUgMC0zMDYuMXpNNjEwLjEgMzcyLjNhOC4wMyA4LjAzIDAgMDAtMTEuMyAwTDM3Mi4zIDU5OC43YTguMDMgOC4wMyAwIDAwMCAxMS4zbDM5LjYgMzkuNmMzLjEgMy4xIDguMiAzLjEgMTEuMyAwbDIyNi40LTIyNi40YzMuMS0zLjEgMy4xLTguMiAwLTExLjNsLTM5LjUtMzkuNnoiIC8+PC9zdmc+) */
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(LinkOutlined_LinkOutlined);
if (false) {}
/* harmony default export */ var icons_LinkOutlined = (RefIcon);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Tasks/DetailsModal/index.tsx
var SettingModal = function SettingModal(_ref) {
var _data$teachers, _data$teachers2;
var visible = _ref.visible,
data = _ref.data,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
sendUrl = _ref.sendUrl;
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
fileList = _useState2[0],
setFileList = _useState2[1];
var dealFileList = fileList.map(function (e) {
if (e.response) {
var _e$response;
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
linkProps: {
download: true
},
url: e === null || e === void 0 || (_e$response = e.response) === null || _e$response === void 0 ? void 0 : _e$response.url
});
}
return e;
});
(0,_react_17_0_2_react.useEffect)(function () {
if (visible) {
var _data$attachments;
setFileList((data === null || data === void 0 || (_data$attachments = data.attachments) === null || _data$attachments === void 0 ? void 0 : _data$attachments.map(function (e) {
return {
name: e.title,
status: 'done',
linkProps: {
download: true
},
response: {
id: e.id,
url: e.url
}
};
})) || []);
}
}, [visible]);
var uploadProps = {
multiple: true,
withCredentials: true,
fileList: dealFileList,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (fileSize > 150) {
message/* default */.ZP.error("\u300A".concat(file.name, "\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(150M)"));
return upload/* default */.Z.LIST_IGNORE;
}
return true;
},
itemRender: function itemRender(originNode, file) {
var _file$response;
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
wrap: false,
align: "middle",
justify: "space-between",
className: "ant-upload-list-item ant-upload-list-item-done ".concat(DetailsModalmodules.File),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
download: "download",
onClick: function onClick(e) {
var _file$url;
console.log(file, 'file');
e.preventDefault();
(0,util/* downLoadLink */.Nd)('', "".concat(env/* default */.Z.API_SERVER).concat(file === null || file === void 0 || (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.replace('disposition=inline', '')));
},
title: file === null || file === void 0 ? void 0 : file.name,
href: file.url,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(icons_LinkOutlined, {
className: "mr10 c-grey-666"
}), (0,util/* cutFileName */.tP)(file === null || file === void 0 ? void 0 : file.name, 35)]
}), (file === null || file === void 0 || (_file$response = file.response) === null || _file$response === void 0 ? void 0 : _file$response.id) && /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shanchu14 font14 ".concat(DetailsModalmodules.deletfileIcon),
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return postData(dealFileList === null || dealFileList === void 0 ? void 0 : dealFileList.filter(function (item) {
return item.response.id != file.response.id;
}));
case 2:
res = _context.sent;
if (res.status == 0) {
message/* default */.ZP.success("删除成功");
setFileList(dealFileList === null || dealFileList === void 0 ? void 0 : dealFileList.filter(function (item) {
var _item$response, _file$response2;
return (item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id) != (file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id);
}));
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}))
})]
});
},
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
onChange: function onChange(info) {
var list = (0,util/* dealUploadChange */.uD)(info);
setFileList(list);
if (list.every(function (e) {
return e.status !== 'uploading';
})) {
postData(list);
}
}
};
var postData = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(list) {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0,utils_fetch/* default */.ZP)(sendUrl, {
method: "post",
body: {
graduation_task_id: data.id,
attachment_ids: list.filter(function (e) {
return e.status === 'done';
}).map(function (e) {
var _e$response2;
return e === null || e === void 0 || (_e$response2 = e.response) === null || _e$response2 === void 0 ? void 0 : _e$response2.id;
})
}
});
case 2:
res = _context2.sent;
if (res.status === 0) {}
return _context2.abrupt("return", res);
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function postData(_x) {
return _ref3.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
centered: true,
destroyOnClose: true,
onCancel: onClose,
open: visible,
footer: null,
title: '任务书详情',
width: 620,
className: "pb20",
afterClose: function afterClose() {
setFileList([]);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: DetailsModalmodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: DetailsModalmodules.row,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u8BFE\u9898\u540D\u79F0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
title: data.name,
children: data.name
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: DetailsModalmodules.row,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u6307\u5BFC\u8001\u5E08"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: !!(data !== null && data !== void 0 && (_data$teachers = data.teachers) !== null && _data$teachers !== void 0 && _data$teachers.length) ? data === null || data === void 0 || (_data$teachers2 = data.teachers) === null || _data$teachers2 === void 0 || (_data$teachers2 = _data$teachers2.map(function (e) {
return e.real_name;
})) === null || _data$teachers2 === void 0 ? void 0 : _data$teachers2.join('、') : '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: DetailsModalmodules.row,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u8BFE\u9898\u6765\u6E90"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: data.source || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: DetailsModalmodules.row,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u9009\u9898\u5B66\u751F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: data.real_name || '--'
})]
}), data.status === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(DetailsModalmodules.img, " iconfont icon-yixiada")
}), /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: "mt10",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
style: {
borderRadius: 2
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-shangchuan3 mr5"
}), "\u4E0A\u4F20\u6587\u6863"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "ml10 font14",
style: {
color: '#5F6367'
},
onClick: function onClick(e) {
e.stopPropagation();
},
children: "\u4E0A\u4F20\u4EFB\u52A1\u4E66\uFF0C\u5355\u4E2A\u6587\u6863\u5927\u5C0F\u4E0D\u8D85\u8FC7150M"
})]
})
})), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
height: '20px'
}
})]
})
});
};
/* harmony default export */ var DetailsModal = (SettingModal);
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Tasks/Teacher/index.tsx
var Page = function Page(_ref) {
var _location$pathname$sp;
var graduations = _ref.graduations,
dispatch = _ref.dispatch;
var urlParams = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
fileList = _useState2[0],
setFileList = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)({}),
_useState4 = slicedToArray_default()(_useState3, 2),
data = _useState4[0],
setData = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
visible = _useState6[0],
setVisible = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(1),
_useState8 = slicedToArray_default()(_useState7, 2),
updateKey = _useState8[0],
setUpdateKey = _useState8[1];
var taskId = (0,_react_17_0_2_react.useRef)(null);
var fileListIds = (0,_react_17_0_2_react.useRef)([]);
var tabKey = (_location$pathname$sp = location.pathname.split('/')) === null || _location$pathname$sp === void 0 ? void 0 : _location$pathname$sp[3];
var menus = graduations.menus;
var tabParams = menus.find(function (e) {
return e.clazz === tabKey;
}) || {};
var sendUrl = "/api/graduations/".concat(urlParams.id, "/graduation_stages/").concat(tabParams === null || tabParams === void 0 ? void 0 : tabParams.id, "/submit.json");
var uploadProps = {
multiple: true,
withCredentials: true,
fileList: fileList,
showUploadList: false,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (fileSize > 150) {
message/* default */.ZP.error("\u300A".concat(file.name, "\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(150M)"));
return upload/* default */.Z.LIST_IGNORE;
}
return true;
},
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
onChange: function onChange(info) {
dispatch({
type: "globalSetting/setGlobalLoading",
payload: {
show: true,
text: "正在上传中,请稍候"
}
});
var list = (0,util/* dealUploadChange */.uD)(info);
setFileList(list);
if (list.every(function (e) {
return e.status !== 'uploading';
})) {
postData(list);
}
}
};
var postData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(list) {
var _list$filter$map;
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,utils_fetch/* default */.ZP)(sendUrl, {
method: "post",
body: {
graduation_task_id: taskId.current,
attachment_ids: (_list$filter$map = list.filter(function (e) {
return e.status === 'done';
}).map(function (e) {
var _e$response;
return e === null || e === void 0 || (_e$response = e.response) === null || _e$response === void 0 ? void 0 : _e$response.id;
})) === null || _list$filter$map === void 0 ? void 0 : _list$filter$map.concat(fileListIds.current)
}
});
case 2:
res = _context.sent;
if (res.status === 0) {
message/* default */.ZP.success('提交成功');
setUpdateKey(updateKey + 1);
}
setFileList([]);
taskId.current = null;
fileListIds.current = [];
dispatch({
type: "globalSetting/setGlobalLoading",
payload: {
show: false,
text: ""
}
});
case 8:
case "end":
return _context.stop();
}
}, _callee);
}));
return function postData(_x) {
return _ref2.apply(this, arguments);
};
}();
var tags = [{
id: '',
name: '全部'
}, {
id: 0,
name: '未下达'
}, {
id: 1,
name: '已下达'
}];
var columns = [{
title: '课题名称',
dataIndex: 'name',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-grey-333",
children: text || '--'
})
});
}
}, {
title: '指导老师',
dataIndex: 'teachers',
width: 156,
ellipsis: true,
render: function render(value) {
var _value$map;
var str = !!(value !== null && value !== void 0 && value.length) ? value === null || value === void 0 || (_value$map = value.map(function (e) {
return e.real_name;
})) === null || _value$map === void 0 ? void 0 : _value$map.join('、') : '';
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "topLeft",
title: str,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-grey-333",
children: str || '--'
})
});
}
}, {
title: '选题学生',
width: 156,
ellipsis: true,
dataIndex: 'real_name',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-black",
children: text || '--'
})
});
}
}, {
title: '文档',
dataIndex: 'attachments',
width: 156,
ellipsis: {
showTitle: false
},
render: function render(value, v) {
var _value$2;
if (!(value !== null && value !== void 0 && value.length)) return '--';
var str = '';
if (!!(value !== null && value !== void 0 && value.length)) {
var _value$;
str = (0,util/* cutFileName */.tP)(value === null || value === void 0 || (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.title, 6);
}
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "topLeft",
title: value === null || value === void 0 || (_value$2 = value[0]) === null || _value$2 === void 0 ? void 0 : _value$2.title,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
var _value$3;
(0,util/* downLoadLink */.Nd)('', "".concat(env/* default */.Z.API_SERVER).concat((_value$3 = value[0]) === null || _value$3 === void 0 || (_value$3 = _value$3.url) === null || _value$3 === void 0 ? void 0 : _value$3.replace('disposition=inline', '')));
},
className: "current",
style: {
color: '#3061D0'
},
children: str
})
});
}
}, {
title: '状态',
dataIndex: 'status',
width: 90,
render: function render(value) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [value === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-black",
children: "\u672A\u4E0B\u8FBE"
}), value === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-black",
children: "\u5DF2\u4E0B\u8FBE"
})]
});
}
}, {
title: '操作',
dataIndex: 'action',
align: 'right',
width: 100,
render: function render(value, v) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
justify: "end",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
var _v$attachments;
taskId.current = v.id;
fileListIds.current = v === null || v === void 0 || (_v$attachments = v.attachments) === null || _v$attachments === void 0 ? void 0 : _v$attachments.map(function (e) {
return e.id;
});
},
className: "current font14 c-light-primary",
children: "\u63D0\u4EA4"
})
})), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
setVisible(true);
setData(objectSpread2_default()({}, v));
},
className: "current font14 c-light-primary ml20",
children: "\u8BE6\u60C5"
})]
});
}
}];
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(TeacherModule/* default */.Z, {
tags: tags,
tagsTitle: "\u4E0B\u8FBE\u72B6\u6001",
tagsTitleWidth: 56,
placeholder: "\u8BF7\u8F93\u5165\u8BFE\u9898\u540D\u79F0\u8FDB\u884C\u641C\u7D22",
columns: columns,
updateKey: updateKey,
inputWidth: 222
}), /*#__PURE__*/(0,jsx_runtime.jsx)(DetailsModal, {
visible: visible,
data: data,
sendUrl: sendUrl,
onClose: function onClose() {
setVisible(false);
setData({});
setUpdateKey(updateKey + 1);
}
})]
});
};
/* harmony default export */ var Teacher = ((0,_umi_production_exports.connect)(function (_ref3) {
var graduations = _ref3.graduations;
return {
graduations: graduations
};
})(Page));
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/createForOfIteratorHelper.js
var createForOfIteratorHelper = __webpack_require__(91232);
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Tasks/Student/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Studentmodules = ({"flex_box_center":"flex_box_center___YhVJ8","flex_space_between":"flex_space_between___ZwNFf","flex_box_vertical_center":"flex_box_vertical_center___zVi38","flex_box_center_end":"flex_box_center_end___XiBd9","flex_box_column":"flex_box_column___wlJ_z","wrap":"wrap___btDZi","card":"card___ynWkb","title":"title___ZK2i5","teacherWrap":"teacherWrap___mwbsp","titleCol":"titleCol___Yw1us","head":"head___Eh7hH","rowWrap":"rowWrap___iqlIh","row":"row___ysuMF","name":"name___Vp5LK","btns":"btns___TQ4qx"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(24905);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(6638);
// EXTERNAL MODULE: ./src/pages/Graduations/components/HeadTitle/index.tsx + 1 modules
var HeadTitle = __webpack_require__(38660);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
var PreviewAll = __webpack_require__(89976);
// 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/_lodash@4.17.21@lodash/lodash.js
var lodash = __webpack_require__(89392);
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Tasks/Student/index.tsx
var Student_Page = function Page(_ref) {
var _data$teachers;
var graduations = _ref.graduations,
dispatch = _ref.dispatch;
var urlParams = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)(true),
_useState2 = slicedToArray_default()(_useState, 2),
loading = _useState2[0],
setLoading = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)([{}]),
_useState4 = slicedToArray_default()(_useState3, 2),
data = _useState4[0],
setData = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)([{}]),
_useState6 = slicedToArray_default()(_useState5, 2),
previewData = _useState6[0],
setPreviewData = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
list = _useState8[0],
setList = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
activeKey = _useState10[0],
setActiveKey = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(0),
_useState12 = slicedToArray_default()(_useState11, 2),
isEmptyStatus = _useState12[0],
setIsEmptyStatus = _useState12[1];
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
var menus = graduations.menus,
details = graduations.details;
var tabParams = menus.find(function (e) {
return e.clazz === 'tasks';
}) || {};
(0,_react_17_0_2_react.useEffect)(function () {
if (tabParams !== null && tabParams !== void 0 && tabParams.id) {
getData();
}
}, [tabParams === null || tabParams === void 0 ? void 0 : tabParams.id]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, _res$data, _res$data2, _res$data3, _res$data4, state;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setLoading(true);
_context.next = 3;
return (0,utils_fetch/* default */.ZP)("/api/graduations/".concat(urlParams.id, "/graduation_stages/").concat(tabParams === null || tabParams === void 0 ? void 0 : tabParams.id, ".json"), {
method: "get"
});
case 3:
res = _context.sent;
if (res.status === 0) {
setData((res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data[0]) || {});
setList((res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 || (_res$data2 = _res$data2[0]) === null || _res$data2 === void 0 ? void 0 : _res$data2.attachments) || []);
state = 0;
if ((0,lodash.isEmpty)(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3[0])) {
state = 1;
} else if ((res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 || (_res$data4 = _res$data4[0]) === null || _res$data4 === void 0 ? void 0 : _res$data4.status) === 0) {
state = 2;
}
setIsEmptyStatus(state);
}
setLoading(false);
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleCheckBox = function handleCheckBox(value, id, type) {
var keys = [];
if (type === 'all' && value) {
keys = list.map(function (e) {
return e.id;
});
} else if (type !== 'all') {
if (value) {
keys = [].concat(toConsumableArray_default()(activeKey), [id]);
} else {
keys = activeKey.filter(function (e) {
return e !== id;
});
}
}
setActiveKey(keys);
};
var batchDown = function batchDown() {
if (!activeKey.length) {
message/* default */.ZP.warning('请选择文件');
return;
}
var dealItem = list.filter(function (e) {
return activeKey.includes(e.id);
});
handleAllDownload((details === null || details === void 0 ? void 0 : details.name) + "-任务书", dealItem);
// dealItem.forEach((e: any) => {
// downLoadLink('', `${ENV.API_SERVER}${e.url?.replace('disposition=inline', '')}`)
// })
};
var handlePreviewClick = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(item) {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(item.file_type === "txt")) {
_context2.next = 5;
break;
}
_context2.next = 3;
return (0,utils_fetch/* default */.ZP)(item.url, {
method: "get",
headers: {
"Content-Type": "application/xml"
}
});
case 3:
res = _context2.sent;
monacoValueRef.current = res;
case 5:
setPreviewData({
type: item.file_type,
content: env/* default */.Z.API_SERVER + item.url
});
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handlePreviewClick(_x) {
return _ref3.apply(this, arguments);
};
}();
var handleAllDownload = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(name) {
var urlList,
DownloadList,
modal,
zip,
nameLsit,
addzip,
i,
_iterator,
_step,
item,
_args5 = arguments;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
urlList = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : [];
DownloadList = urlList === null || urlList === void 0 ? void 0 : urlList.filter(function (item) {
return item.url != "";
});
if (!(DownloadList.length == 0)) {
_context5.next = 5;
break;
}
message/* default */.ZP.warning("暂无下载文件");
return _context5.abrupt("return");
case 5:
modal = es_modal/* default */.Z.info({
width: 500,
icon: null,
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u6B63\u5728\u6279\u91CF\u5BFC\u51FA\u4EFB\u52A1\u6587\u4EF6,", /*#__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: 0
}), "/", DownloadList.length]
}),
maskClosable: false,
className: Studentmodules.modal,
onOk: function onOk() {}
});
zip = new (jszip_min_default())();
nameLsit = [];
addzip = /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(data, progress) {
var response, blob, getZipFile;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.prev = 0;
_context4.next = 3;
return fetch(env/* default */.Z.API_SERVER + data.url, {
method: "get"
});
case 3:
response = _context4.sent;
_context4.next = 6;
return response.blob();
case 6:
blob = _context4.sent;
getZipFile = /*#__PURE__*/function () {
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(name) {
var index,
filename,
nextName,
_args3 = arguments;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
index = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : 0;
filename = name.split(".");
filename.pop();
nextName = "".concat(filename.join(""), "(").concat(index, ").").concat(name.split(".").at(-1));
if (index == 0 && nameLsit.includes(name) || nameLsit.includes(nextName)) {
getZipFile(name, index + 1);
} else {
nameLsit.push(index == 0 ? name : nextName);
zip.file(index == 0 ? name : nextName, blob);
}
case 5:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function getZipFile(_x5) {
return _ref6.apply(this, arguments);
};
}();
_context4.next = 10;
return getZipFile(data === null || data === void 0 ? void 0 : data.title);
case 10:
modal.update({
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-blue",
children: progress
}), "/", DownloadList.length]
})
});
_context4.next = 16;
break;
case 13:
_context4.prev = 13;
_context4.t0 = _context4["catch"](0);
message/* default */.ZP.error("".concat(data === null || data === void 0 ? void 0 : data.title, "\u4E0B\u8F7D\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A").concat(_context4.t0));
case 16:
case "end":
return _context4.stop();
}
}, _callee4, null, [[0, 13]]);
}));
return function addzip(_x3, _x4) {
return _ref5.apply(this, arguments);
};
}();
if (!(DownloadList.length > 0)) {
_context5.next = 29;
break;
}
i = 0;
_iterator = createForOfIteratorHelper_default()(DownloadList);
_context5.prev = 12;
_iterator.s();
case 14:
if ((_step = _iterator.n()).done) {
_context5.next = 20;
break;
}
item = _step.value;
_context5.next = 18;
return addzip(item, ++i);
case 18:
_context5.next = 14;
break;
case 20:
_context5.next = 25;
break;
case 22:
_context5.prev = 22;
_context5.t0 = _context5["catch"](12);
_iterator.e(_context5.t0);
case 25:
_context5.prev = 25;
_iterator.f();
return _context5.finish(25);
case 28:
zip.generateAsync({
type: "blob"
}).then(function (blob) {
(0,util/* downLoadFile */.FH)(name, window.URL.createObjectURL(blob));
});
case 29:
modal.destroy();
case 30:
case "end":
return _context5.stop();
}
}, _callee5, null, [[12, 22, 25, 28]]);
}));
return function handleAllDownload(_x2) {
return _ref4.apply(this, arguments);
};
}();
console.log(previewData, 'previewData');
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Studentmodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(HeadTitle/* default */.Z, {
title: "\u4EFB\u52A1\u4E66",
status: tabParams === null || tabParams === void 0 ? void 0 : tabParams.status,
startAt: tabParams === null || tabParams === void 0 ? void 0 : tabParams.start_at,
endAt: tabParams === null || tabParams === void 0 ? void 0 : tabParams.end_at
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
active: true,
loading: loading,
children: [!!isEmptyStatus && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
customText: isEmptyStatus === 1 ? '当前阶段暂时无法开启,请先完成之前阶段的任务' : '当前老师还未下达任务书哦'
}), !isEmptyStatus && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Studentmodules.card,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6368'
},
className: "mr20 font14",
children: "\u8BFE\u9898\u540D\u79F0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: data === null || data === void 0 ? void 0 : data.name,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#333',
fontSize: 16
},
children: (0,util/* cutName */.Pq)(data === null || data === void 0 ? void 0 : data.name, 59)
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Studentmodules.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flexShrink: 0,
marginTop: 4,
color: '#5f6368'
},
className: "mr20",
children: "\u6307\u5BFC\u8001\u5E08"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Studentmodules.teacherWrap,
children: data === null || data === void 0 || (_data$teachers = data.teachers) === null || _data$teachers === void 0 ? void 0 : _data$teachers.map(function (e, i) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Studentmodules.titleCol,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
width: 28,
height: 28,
style: {
borderRadius: '50%'
},
src: "".concat(env/* default */.Z === null || env/* default */.Z === void 0 ? void 0 : env/* default */.Z.IMG_SERVER, "/images/").concat(e === null || e === void 0 ? void 0 : e.avatar_url)
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-grey-333 ml10 font16",
children: e.real_name
})]
}, i);
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Studentmodules.head,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
onChange: function onChange(e) {
return handleCheckBox(e.target.checked, null, 'all');
},
checked: !!activeKey.length && activeKey.length === list.length,
indeterminate: !!activeKey.length && activeKey.length !== list.length
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: "\u4EFB\u52A1\u4E66"
}), !!(activeKey !== null && activeKey !== void 0 && activeKey.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
onClick: batchDown,
style: {
marginLeft: 'auto'
},
className: "c-light-primary current",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xiazai4 mr5 font14"
}), "\u6279\u91CF\u4E0B\u8F7D"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Studentmodules.rowWrap,
children: list === null || list === void 0 ? void 0 : list.map(function (item) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Studentmodules.row,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
onChange: function onChange(e) {
return handleCheckBox(e.target.checked, item.id);
},
checked: activeKey.includes(item.id)
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Studentmodules.name,
title: item.title,
children: (0,util/* cutFileName */.tP)(item.title, 60)
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: Studentmodules.btns,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(tooltip/* default */.Z, {
className: "mr20",
title: "\u9884\u89C8",
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
onClick: function onClick() {
return handlePreviewClick(item);
},
className: "iconfont icon-chakanshenqingjilu c-light-primary current font14"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(tooltip/* default */.Z, {
title: "\u4E0B\u8F7D",
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
onClick: function onClick() {
var _item$url;
(0,util/* downLoadLink */.Nd)('', "".concat(env/* default */.Z.API_SERVER).concat((_item$url = item.url) === null || _item$url === void 0 ? void 0 : _item$url.replace('disposition=inline', '')));
},
className: "iconfont icon-xiazai4 c-light-primary current font14"
})]
})]
})]
}, item.id);
})
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: previewData === null || previewData === void 0 ? void 0 : previewData.content,
type: previewData === null || previewData === void 0 ? void 0 : previewData.type,
hasMask: true,
monacoEditor: {
value: monacoValueRef.current,
language: "txt",
onChange: function onChange() {},
options: {
readOnly: true,
fontSize: 14,
minimap: {
enabled: false
}
}
},
onClose: function onClose() {
setPreviewData({
content: "",
type: ""
});
}
})]
});
};
/* harmony default export */ var Student = ((0,_umi_production_exports.connect)(function (_ref7) {
var graduations = _ref7.graduations;
return {
graduations: graduations
};
})(Student_Page));
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(75916);
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Tasks/index.tsx
var Tasks_Page = function Page(_ref) {
var graduations = _ref.graduations,
dispatch = _ref.dispatch,
loading = _ref.loading;
return /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
style: {
margin: '20px 0 0 45px'
},
loading: loading.effects['graduations/getGraduationsDetails'],
children: (0,authority/* isGPAdminOrTeacher */.tu)() ? /*#__PURE__*/(0,jsx_runtime.jsx)(Teacher, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(Student, {})
});
};
/* harmony default export */ var Tasks = ((0,_umi_production_exports.connect)(function (_ref2) {
var loading = _ref2.loading,
graduations = _ref2.graduations;
return {
loading: loading,
graduations: graduations
};
})(Tasks_Page));
/***/ }),
/***/ 38660:
/*!**************************************************************************!*\
!*** ./src/pages/Graduations/components/HeadTitle/index.tsx + 1 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_HeadTitle; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/HeadTitle/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var HeadTitlemodules = ({"flex_box_center":"flex_box_center___oGGi8","flex_space_between":"flex_space_between___e1At5","flex_box_vertical_center":"flex_box_vertical_center___K1Nl5","flex_box_center_end":"flex_box_center_end___IP1rf","flex_box_column":"flex_box_column____nxPW","title":"title___Ynb7w","time":"time___dxFRB"});
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./src/pages/Graduations/components/Tags/index.tsx + 1 modules
var Tags = __webpack_require__(85972);
// 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/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/HeadTitle/index.tsx
var HeadTitle = function HeadTitle(_ref) {
var className = _ref.className,
status = _ref.status,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style,
startAt = _ref.startAt,
endAt = _ref.endAt,
title = _ref.title;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: _classnames_2_5_1_classnames_default()(HeadTitlemodules.title, className),
style: style,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
children: title
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Tags/* default */.Z, {
className: "ml10",
status: status
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: HeadTitlemodules.time,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u5F00\u542F\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: startAt ? dayjs_min_default()(startAt).format("YYYY-MM-DD HH:mm") : '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "ml30",
children: ["\u622A\u6B62\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: endAt ? dayjs_min_default()(endAt).format("YYYY-MM-DD HH:mm") : '--'
})]
})]
})]
});
};
/* harmony default export */ var components_HeadTitle = (HeadTitle);
/***/ }),
/***/ 89275:
/*!*****************************************************************************!*\
!*** ./src/pages/Graduations/components/SettingModal/index.tsx + 1 modules ***!
\*****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_SettingModal; }
});
// 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/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/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js
var upload = __webpack_require__(60028);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
var date_picker = __webpack_require__(30518);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/SettingModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var SettingModalmodules = ({"flex_box_center":"flex_box_center___cQ5Sl","flex_space_between":"flex_space_between___BU1Wl","flex_box_vertical_center":"flex_box_vertical_center___jBfz4","flex_box_center_end":"flex_box_center_end___mFYce","flex_box_column":"flex_box_column___jBfuW","wrap":"wrap___npJKs","label":"label___mSlLf"});
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(71681);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(80608);
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 30 modules
var ui_customization = __webpack_require__(92073);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(49105);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(27876);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(77036);
// 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: ./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/ConfigWorks/Releasesetting.tsx
var Releasesetting = __webpack_require__(38180);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/SettingModal/index.tsx
var SettingModal = function SettingModal(_ref) {
var visible = _ref.visible,
data = _ref.data,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
_ref$onSuccess = _ref.onSuccess,
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
fileList = _useState2[0],
setFileList = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
startAt = _useState4[0],
setStartAt = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(''),
_useState6 = slicedToArray_default()(_useState5, 2),
endAt = _useState6[0],
setEndAt = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(''),
_useState8 = slicedToArray_default()(_useState7, 2),
description = _useState8[0],
setDescription = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(false),
_useState10 = slicedToArray_default()(_useState9, 2),
btnLoading = _useState10[0],
setBtnLoading = _useState10[1];
var query = (0,_umi_production_exports.useParams)();
(0,_react_17_0_2_react.useEffect)(function () {
if (visible) {
var _data$attachments;
setDescription((data === null || data === void 0 ? void 0 : data.description) || '');
setStartAt((data === null || data === void 0 ? void 0 : data.start_at) || '');
setEndAt((data === null || data === void 0 ? void 0 : data.end_at) || '');
setFileList((data === null || data === void 0 || (_data$attachments = data.attachments) === null || _data$attachments === void 0 ? void 0 : _data$attachments.map(function (e) {
return {
name: e.name || e.title,
status: 'done',
response: {
id: e.id
}
};
})) || []);
}
}, [visible]);
var uploadProps = {
multiple: true,
withCredentials: true,
fileList: fileList,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (fileSize > 150) {
message/* default */.ZP.error("\u300A".concat(file.name, "\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(150M)"));
return upload/* default */.Z.LIST_IGNORE;
}
return true;
},
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
onChange: function onChange(info) {
setFileList((0,util/* dealUploadChange */.uD)(info));
}
};
var handleOk = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!(!startAt || !endAt)) {
_context.next = 3;
break;
}
message/* default */.ZP.warning("\u8BF7\u9009\u62E9".concat(timeName));
return _context.abrupt("return");
case 3:
setBtnLoading(true);
console.log(fileList, 'fileList');
_context.next = 7;
return (0,fetch/* default */.ZP)("/api/graduations/".concat(query.id, "/graduation_stages/").concat(data.id, ".json"), {
method: 'put',
body: {
start_at: startAt,
end_at: endAt,
description: description,
attachment_ids: fileList.map(function (e) {
var _e$response;
return e === null || e === void 0 || (_e$response = e.response) === null || _e$response === void 0 ? void 0 : _e$response.id;
})
}
});
case 7:
res = _context.sent;
if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) {
_context.next = 13;
break;
}
message/* default */.ZP.success('保存设置成功');
(0,_umi_production_exports.getDvaApp)()._store.dispatch({
type: 'graduations/getGraduationsDetails',
payload: {
id: query === null || query === void 0 ? void 0 : query.id
}
});
onSuccess();
return _context.abrupt("return");
case 13:
setBtnLoading(false);
case 14:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleOk() {
return _ref2.apply(this, arguments);
};
}();
console.log(data, 'data');
var jsonItem = [{
name: '学生选题',
key: 'student_selection',
timeName: '学生选题起止时间',
width: 460,
text: '在此时间内,学生可自助操作选题和更改选题'
}, {
name: '任务书',
key: 'tasks',
width: 460,
timeName: '任务书起止时间',
text: ''
}, {
name: '开题报告',
key: 'opening_report',
width: 1146,
timeName: '学生提交开题报告起止时间',
text: '在该阶段内或者老师评阅通过之前,学生可以自由提交文档,一旦过了截止时间,则需要管理员授权补交'
}, {
name: '中期检查',
key: 'midterm_report',
width: 1146,
timeName: '学生提交中期检查起止时间',
text: '在该阶段内或者老师评阅通过之前,学生可以自由提交文档,一旦过了截止时间,则需要管理员授权补交'
}, {
name: '毕业论文',
key: 'thesis',
width: 1146,
timeName: '学生提交毕业论文起止时间',
text: '在该阶段内或者老师评阅通过之前,学生可以自由提交文档,一旦过了截止时间,则需要管理员授权补交'
}, {
name: '毕业答辩',
key: 'final_defense',
width: 1146,
timeName: '学生提交毕业答辩起止时间',
text: '在该阶段内或者老师评阅通过之前,学生可以自由提交文档,一旦过了截止时间,则需要管理员授权补交'
}, {
name: '论文定稿',
key: 'final_thesis',
width: 1146,
timeName: '学生提交论文定稿起止时间',
text: '在该阶段内或者老师评阅通过之前,学生可以自由提交文档,一旦过了截止时间,则需要管理员授权补交'
}, {
name: '归档',
key: 'archives',
width: 1146,
timeName: '学生提交归档起止时间',
text: '在该阶段内或者老师评阅通过之前,学生可以自由提交文档,一旦过了截止时间,则需要管理员授权补交'
}];
var stageItem = ['opening_report', 'midterm_report', 'thesis', 'final_defense', 'final_thesis', 'archives'];
var disabled = fileList.some(function (e) {
return !(e !== null && e !== void 0 && e.response);
});
var _ref3 = (jsonItem === null || jsonItem === void 0 ? void 0 : jsonItem.find(function (e) {
return e.key === (data === null || data === void 0 ? void 0 : data.clazz);
})) || {},
timeName = _ref3.timeName,
text = _ref3.text,
width = _ref3.width,
key = _ref3.key;
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
destroyOnClose: true,
confirmLoading: btnLoading,
okButtonProps: {
disabled: disabled
},
onCancel: onClose,
onOk: handleOk,
open: visible,
title: "".concat(data.name, "\u8BBE\u7F6E"),
width: width,
afterClose: function afterClose() {
setFileList([]);
setStartAt('');
setDescription('');
setEndAt('');
setBtnLoading(false);
},
okText: "\u4FDD\u5B58\u8BBE\u7F6E",
cancelText: "\u53D6\u6D88",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: SettingModalmodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: SettingModalmodules.label,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "*"
}), timeName]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: stageItem.includes(key) ? 'mb20' : '',
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
format: "YYYY-MM-DD HH:mm",
value: startAt ? dayjs_min_default()(startAt) : '',
disabledDate: function disabledDate(current) {
return (0,Releasesetting/* disabledDate */.Q8)(current, '', data === null || data === void 0 ? void 0 : data.disabled_time);
},
disabledTime: function disabledTime(current) {
return (0,Releasesetting/* disabledTime */.d0)(current, data === null || data === void 0 ? void 0 : data.disabled_time);
},
showTime: {
format: 'HH:mm'
},
onChange: function onChange(v, f) {
setStartAt(f);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10 mr10",
children: "\u81F3"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
format: "YYYY-MM-DD HH:mm",
value: endAt ? dayjs_min_default()(endAt) : '',
disabledDate: function disabledDate(current) {
return (0,Releasesetting/* disabledDate */.Q8)(current, '', data === null || data === void 0 ? void 0 : data.disabled_time);
},
disabledTime: function disabledTime(current) {
return (0,Releasesetting/* disabledTime */.d0)(current, data === null || data === void 0 ? void 0 : data.disabled_time);
},
showTime: {
format: 'HH:mm'
},
onChange: function onChange(v, f) {
setEndAt(f);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "".concat(key === 'student_selection' ? 'mt10' : 'ml10', " font14"),
style: {
color: '#9096A3'
},
children: text
})]
}), stageItem.includes(key) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: SettingModalmodules.label,
children: "\u9636\u6BB5\u63CF\u8FF0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
height: 140,
defaultValue: description,
onChange: function onChange(v) {
setDescription(v);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: "mt10",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
style: {
borderRadius: 2
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-shangchuan3 mr5"
}), "\u4E0A\u4F20\u6587\u6863"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "ml10 font14",
style: {
color: '#5F6367'
},
onClick: function onClick(e) {
e.stopPropagation();
},
children: "\u4E0A\u4F20\u6B64\u9636\u6BB5\u7684\u6587\u6863\u6A21\u7248\u3001\u6279\u9605\u8981\u6C42\u7B49\u6587\u6863\uFF0C\u5355\u4E2A\u6587\u6863\u5927\u5C0F\u4E0D\u8D85\u8FC7150M"
})]
})
}))]
})]
})
});
};
/* harmony default export */ var components_SettingModal = (SettingModal);
/***/ }),
/***/ 85972:
/*!*********************************************************************!*\
!*** ./src/pages/Graduations/components/Tags/index.tsx + 1 modules ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_Tags; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/Tags/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Tagsmodules = ({"flex_box_center":"flex_box_center___Sswcw","flex_space_between":"flex_space_between___nBexI","flex_box_vertical_center":"flex_box_vertical_center___sPXvb","flex_box_center_end":"flex_box_center_end___c6nca","flex_box_column":"flex_box_column___Bq_gi","tag":"tag___NEywM"});
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/Tags/index.tsx
var Tags = function Tags(_ref) {
var className = _ref.className,
status = _ref.status;
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
children: [status === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: _classnames_2_5_1_classnames_default()(Tagsmodules.tag, className),
children: "\u672A\u5F00\u59CB"
}), status === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: _classnames_2_5_1_classnames_default()(Tagsmodules.tag, className),
style: {
background: "#19CB70"
},
children: "\u8FDB\u884C\u4E2D"
}), status === 2 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: _classnames_2_5_1_classnames_default()(Tagsmodules.tag, className),
style: {
background: "#EE5D5D"
},
children: "\u5DF2\u7ED3\u675F"
})]
});
};
/* harmony default export */ var components_Tags = (Tags);
/***/ }),
/***/ 37597:
/*!******************************************************************************!*\
!*** ./src/pages/Graduations/components/TeacherModule/index.tsx + 1 modules ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ TeacherModule; }
});
// 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/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/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/TeacherModule/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var TeacherModulemodules = ({"flex_box_center":"flex_box_center___Q4rC9","flex_space_between":"flex_space_between___pzGZc","flex_box_vertical_center":"flex_box_vertical_center___DhNf8","flex_box_center_end":"flex_box_center_end___ALRjT","flex_box_column":"flex_box_column___p6z9Y","wrap":"wrap____H2XH"});
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(80608);
// 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/table/index.js + 85 modules
var table = __webpack_require__(51945);
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 30 modules
var ui_customization = __webpack_require__(92073);
// EXTERNAL MODULE: ./src/pages/Graduations/components/HeadTitle/index.tsx + 1 modules
var HeadTitle = __webpack_require__(38660);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(49105);
// EXTERNAL MODULE: ./src/pages/Graduations/components/SettingModal/index.tsx + 1 modules
var SettingModal = __webpack_require__(89275);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(6638);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(27876);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Graduations/components/TeacherModule/index.tsx
var Page = function Page(_ref) {
var _location$pathname$sp, _jsonItem$find, _menus;
var graduations = _ref.graduations,
dispatch = _ref.dispatch,
tags = _ref.tags,
tagsTitle = _ref.tagsTitle,
tagsTitleWidth = _ref.tagsTitleWidth,
placeholder = _ref.placeholder,
columns = _ref.columns,
updateKey = _ref.updateKey,
_ref$inputWidth = _ref.inputWidth,
inputWidth = _ref$inputWidth === void 0 ? 214 : _ref$inputWidth;
var urlParams = (0,_umi_production_exports.useParams)();
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
searchParams = _useSearchParams2[0];
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
loading = _useState2[0],
setLoading = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(0),
_useState4 = slicedToArray_default()(_useState3, 2),
total = _useState4[0],
setTotal = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
list = _useState6[0],
setList = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
settingVisible = _useState8[0],
setSettingVisible = _useState8[1];
var menus = graduations.menus;
var tabKey = (_location$pathname$sp = location.pathname.split('/')) === null || _location$pathname$sp === void 0 ? void 0 : _location$pathname$sp[3];
var tabParams = menus.find(function (e) {
return e.clazz === tabKey;
}) || {};
var tabIndex = menus.find(function (e) {
return e.clazz === tabKey;
}) || 1;
var getUrlState = searchParams !== null && searchParams !== void 0 && searchParams.get('state') ? Number(searchParams === null || searchParams === void 0 ? void 0 : searchParams.get('state')) : '';
var _useState9 = (0,_react_17_0_2_react.useState)({
keyword: '',
status: getUrlState,
page: 1,
limit: 20
}),
_useState10 = slicedToArray_default()(_useState9, 2),
params = _useState10[0],
setParams = _useState10[1];
(0,_react_17_0_2_react.useEffect)(function () {
if (tabParams !== null && tabParams !== void 0 && tabParams.id) {
getList(params);
}
}, [tabParams === null || tabParams === void 0 ? void 0 : tabParams.id, updateKey]);
var getList = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(record) {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setLoading(true);
_context.next = 3;
return (0,fetch/* default */.ZP)("/api/graduations/".concat(urlParams.id, "/graduation_stages/").concat(tabParams === null || tabParams === void 0 ? void 0 : tabParams.id, ".json"), {
method: "get",
params: record
});
case 3:
res = _context.sent;
if (res.status === 0) {
setList((res === null || res === void 0 ? void 0 : res.data) || []);
setTotal(res === null || res === void 0 ? void 0 : res.total_count);
}
setLoading(false);
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getList(_x) {
return _ref2.apply(this, arguments);
};
}();
var handleChangeStatus = function handleChangeStatus(status) {
params.status = status;
params.page = 1;
setParams(params);
getList(params);
};
var handleSearch = function handleSearch(v) {
params.keyword = v;
params.page = 1;
setParams(params);
getList(params);
};
var handlePagination = function handlePagination(page, pageSize) {
params.page = page;
params.limit = pageSize;
setParams(params);
getList(params);
};
var jsonItem = [{
name: '任务书',
key: 'tasks',
notStartText: '当前阶段还未开启'
}, {
name: '开题报告',
key: 'opening_report',
notStartText: '当前阶段还未开启'
}, {
name: '中期检查',
key: 'midterm_report',
notStartText: '当前阶段还未开启'
}, {
name: '毕业论文',
key: 'thesis',
notStartText: '当前阶段还未开启'
}, {
name: '毕业答辩',
key: 'final_defense',
notStartText: '当前阶段还未开启'
}, {
name: '论文定稿',
key: 'final_thesis',
notStartText: '当前阶段还未开启'
}];
var notStartText = jsonItem === null || jsonItem === void 0 || (_jsonItem$find = jsonItem.find(function (e) {
return e.key === (tabParams === null || tabParams === void 0 ? void 0 : tabParams.clazz);
})) === null || _jsonItem$find === void 0 ? void 0 : _jsonItem$find.notStartText;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: TeacherModulemodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(HeadTitle/* default */.Z, {
title: tabParams === null || tabParams === void 0 ? void 0 : tabParams.name,
className: "mb10",
status: tabParams === null || tabParams === void 0 ? void 0 : tabParams.status,
startAt: tabParams === null || tabParams === void 0 ? void 0 : tabParams.start_at,
endAt: tabParams === null || tabParams === void 0 ? void 0 : tabParams.end_at
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
justify: "end",
style: {
height: 66
},
children: [!!(tabParams !== null && tabParams !== void 0 && tabParams.status) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
style: {
flex: 1
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTags */.qp, {
title: tagsTitle,
value: params.status,
onChange: handleChangeStatus,
dataSource: tags,
className: "mt20",
titleWidth: tagsTitleWidth
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomInput */.t7, {
style: {
width: inputWidth,
marginLeft: 'auto'
},
placeholder: placeholder,
value: params.keyword,
onChange: handleSearch
})]
}), (0,util/* timeContrast */.QB)(tabParams === null || tabParams === void 0 ? void 0 : tabParams.next_start_at) && /*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
style: {
marginLeft: 15
},
onClick: function onClick() {
return setSettingVisible(true);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-anquanshezhi font14 mr5"
}), tabParams === null || tabParams === void 0 ? void 0 : tabParams.name, "\u8BBE\u7F6E"]
})]
}), (tabParams === null || tabParams === void 0 ? void 0 : tabParams.status) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
customText: notStartText
}), !!(tabParams !== null && tabParams !== void 0 && tabParams.status) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
columns: columns,
dataSource: list,
loading: loading,
rowKey: "id",
locale: {
emptyText: /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
},
pagination: {
current: params.page,
hideOnSinglePage: !total,
showQuickJumper: true,
showSizeChanger: true,
pageSize: params.limit,
pageSizeOptions: ['10', '20', '50', '100', '200'],
total: total,
size: 'default',
showTotal: util/* showTotal */.rU,
onChange: handlePagination
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(SettingModal/* default */.Z, {
visible: settingVisible,
data: objectSpread2_default()(objectSpread2_default()({}, tabParams), {}, {
disabled_time: menus === null || menus === void 0 || (_menus = menus[tabIndex - 1]) === null || _menus === void 0 ? void 0 : _menus.end_at
}),
onClose: function onClose() {
return setSettingVisible(false);
},
onSuccess: function onSuccess() {
setSettingVisible(false);
}
})]
});
};
/* harmony default export */ var TeacherModule = ((0,_umi_production_exports.connect)(function (_ref3) {
var graduations = _ref3.graduations;
return {
graduations: graduations
};
})(Page));
/***/ }),
/***/ 28103:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ divider; }
});
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js
// ============================== Shared ==============================
const genSharedDividerStyle = token => {
const {
componentCls,
sizePaddingEdgeHorizontal,
colorSplit,
lineWidth,
textPaddingInline,
orientationMargin,
verticalMarginInline
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
// vertical
'&-vertical': {
position: 'relative',
top: '-0.06em',
display: 'inline-block',
height: '0.9em',
marginInline: verticalMarginInline,
marginBlock: 0,
verticalAlign: 'middle',
borderTop: 0,
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
},
'&-horizontal': {
display: 'flex',
clear: 'both',
width: '100%',
minWidth: '100%',
margin: `${token.dividerHorizontalGutterMargin}px 0`
},
[`&-horizontal${componentCls}-with-text`]: {
display: 'flex',
alignItems: 'center',
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
color: token.colorTextHeading,
fontWeight: 500,
fontSize: token.fontSizeLG,
whiteSpace: 'nowrap',
textAlign: 'center',
borderBlockStart: `0 ${colorSplit}`,
'&::before, &::after': {
position: 'relative',
width: '50%',
borderBlockStart: `${lineWidth}px solid transparent`,
// Chrome not accept `inherit` in `border-top`
borderBlockStartColor: 'inherit',
borderBlockEnd: 0,
transform: 'translateY(50%)',
content: "''"
}
},
[`&-horizontal${componentCls}-with-text-left`]: {
'&::before': {
width: `${orientationMargin * 100}%`
},
'&::after': {
width: `${100 - orientationMargin * 100}%`
}
},
[`&-horizontal${componentCls}-with-text-right`]: {
'&::before': {
width: `${100 - orientationMargin * 100}%`
},
'&::after': {
width: `${orientationMargin * 100}%`
}
},
[`${componentCls}-inner-text`]: {
display: 'inline-block',
paddingBlock: 0,
paddingInline: textPaddingInline
},
'&-dashed': {
background: 'none',
borderColor: colorSplit,
borderStyle: 'dashed',
borderWidth: `${lineWidth}px 0 0`
},
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
'&::before, &::after': {
borderStyle: 'dashed none none'
}
},
[`&-vertical${componentCls}-dashed`]: {
borderInlineStartWidth: lineWidth,
borderInlineEnd: 0,
borderBlockStart: 0,
borderBlockEnd: 0
},
[`&-plain${componentCls}-with-text`]: {
color: token.colorText,
fontWeight: 'normal',
fontSize: token.fontSize
},
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
'&::before': {
width: 0
},
'&::after': {
width: '100%'
},
[`${componentCls}-inner-text`]: {
paddingInlineStart: sizePaddingEdgeHorizontal
}
},
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
'&::before': {
width: '100%'
},
'&::after': {
width: 0
},
[`${componentCls}-inner-text`]: {
paddingInlineEnd: sizePaddingEdgeHorizontal
}
}
})
};
};
// ============================== Export ==============================
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
const dividerToken = (0,statistic/* merge */.TS)(token, {
dividerHorizontalWithTextGutterMargin: token.margin,
dividerHorizontalGutterMargin: token.marginLG,
sizePaddingEdgeHorizontal: 0
});
return [genSharedDividerStyle(dividerToken)];
}, token => ({
textPaddingInline: '1em',
orientationMargin: 0.05,
verticalMarginInline: token.marginXS
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js
"use client";
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
const Divider = props => {
const {
getPrefixCls,
direction,
divider
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const {
prefixCls: customizePrefixCls,
type = 'horizontal',
orientation = 'center',
orientationMargin,
className,
rootClassName,
children,
dashed,
plain,
style
} = props,
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
const prefixCls = getPrefixCls('divider', customizePrefixCls);
const [wrapSSR, hashId] = divider_style(prefixCls);
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
const hasChildren = !!children;
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
const classString = _classnames_2_5_1_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
[`${prefixCls}-with-text`]: hasChildren,
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
[`${prefixCls}-dashed`]: !!dashed,
[`${prefixCls}-plain`]: !!plain,
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
}, className, rootClassName);
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
if (typeof orientationMargin === 'number') {
return orientationMargin;
}
if (/^\d+$/.test(orientationMargin)) {
return Number(orientationMargin);
}
return orientationMargin;
}, [orientationMargin]);
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
marginLeft: memoizedOrientationMargin
}), hasCustomMarginRight && {
marginRight: memoizedOrientationMargin
});
// Warning children not work in vertical mode
if (false) {}
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
className: classString,
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
}, restProps, {
role: "separator"
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-inner-text`,
style: innerStyle
}, children)));
};
if (false) {}
/* harmony default export */ var divider = (Divider);
/***/ }),
/***/ 60028:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 81376);
"use client";
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
/* harmony default export */ __webpack_exports__.Z = (Upload);
/***/ })
}]);