|
|
|
|
@ -6389,7 +6389,14 @@ var menu = __webpack_require__(20834);
|
|
|
|
|
/* harmony default export */ var viewmodules = ({"flex_box_center":"flex_box_center___SC2G3","flex_space_between":"flex_space_between___v24d6","flex_box_vertical_center":"flex_box_vertical_center___iBIji","flex_box_center_end":"flex_box_center_end___shnGM","flex_box_column":"flex_box_column___pRdtO","bg":"bg___htQ1O","title":"title___dw_wz","left":"left___CDy7v","muitem":"muitem___pDhZj","muitemclick":"muitemclick___WXoKV","right":"right___tNRAa","button":"button___tMn5K"});
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Edit/view/components/Content.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var Contentmodules = ({"flex_box_center":"flex_box_center___Y72kq","flex_space_between":"flex_space_between___d30ej","flex_box_vertical_center":"flex_box_vertical_center___p_tif","flex_box_center_end":"flex_box_center_end___AyBVH","flex_box_column":"flex_box_column___NQalW","bg":"bg___cLFww","btns":"btns___uWjSy","confirm":"confirm___ZvnTx","cancel":"cancel___v9uv4","deletetitle":"deletetitle___DnoRO","submitwork":"submitwork___tVjOE","scoremodal":"scoremodal___iKA69","title":"title___GESKF","content":"content___r8E9Y","bottom":"bottom___HS8jb","yes":"yes___itu44","no":"no___Qs1U3","bottoms":"bottoms___ng0EW","loaderimg":"loaderimg___XJWfN"});
|
|
|
|
|
/* harmony default export */ var Contentmodules = ({"flex_box_center":"flex_box_center___Y72kq","flex_space_between":"flex_space_between___d30ej","flex_box_vertical_center":"flex_box_vertical_center___p_tif","flex_box_center_end":"flex_box_center_end___AyBVH","flex_box_column":"flex_box_column___NQalW","bg":"bg___cLFww","btns":"btns___uWjSy","confirm":"confirm___ZvnTx","cancel":"cancel___v9uv4","deletetitle":"deletetitle___DnoRO","submitwork":"submitwork___tVjOE","scoremodal":"scoremodal___iKA69","title":"title___GESKF","content":"content___r8E9Y","bottom":"bottom___HS8jb","yes":"yes___itu44","no":"no___Qs1U3","bottoms":"bottoms___ng0EW","loaderimg":"loaderimg___XJWfN","upload":"upload___zGUpB"});
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/UploadFile/index.tsx
|
|
|
|
|
var UploadFile = __webpack_require__(75922);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_uuid@8.3.0@uuid/dist/esm-browser/v4.js + 4 modules
|
|
|
|
|
var v4 = __webpack_require__(1012);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_ali-oss@6.10.0@ali-oss/dist/aliyun-oss-sdk.js
|
|
|
|
|
var aliyun_oss_sdk = __webpack_require__(75264);
|
|
|
|
|
var aliyun_oss_sdk_default = /*#__PURE__*/__webpack_require__.n(aliyun_oss_sdk);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
|
|
var RenderHtml = __webpack_require__(32666);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
|
|
|
|
|
@ -6418,6 +6425,10 @@ var Content_excluded = ["competitions", "globalSetting", "loading", "dispatch",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
var competitions = _ref.competitions,
|
|
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
|
|
@ -6468,6 +6479,24 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
|
|
fileList = _useState18[0],
|
|
|
|
|
setFileList = _useState18[1];
|
|
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
btnLoading = _useState20[0],
|
|
|
|
|
setBtnLoading = _useState20[1];
|
|
|
|
|
// const [value, setValue] = useState<any[]>([data?.[0]?.key]);
|
|
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
|
|
client = _useState22[0],
|
|
|
|
|
setClient = _useState22[1];
|
|
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
|
|
cancelUpload = _useState24[0],
|
|
|
|
|
setCancelUpload = _useState24[1];
|
|
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(0),
|
|
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
|
|
disabled = _useState26[0],
|
|
|
|
|
setDisabled = _useState26[1];
|
|
|
|
|
var query = (0,_umi_production_exports.useParams)();
|
|
|
|
|
var UploadProps = {
|
|
|
|
|
fileList: fileList,
|
|
|
|
|
openFileDialogOnClick: dayjs_min_default()() > dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.start_time) && dayjs_min_default()() < dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.end_time) && (Header === null || Header === void 0 ? void 0 : Header.is_member),
|
|
|
|
|
@ -6477,12 +6506,10 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
var fileType = file.name.split(".").slice(-1)[0].toLowerCase();
|
|
|
|
|
if (fileSize > 1) {
|
|
|
|
|
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(2G)");
|
|
|
|
|
// return Promise.reject()
|
|
|
|
|
return upload/* default */.Z.LIST_IGNORE;
|
|
|
|
|
}
|
|
|
|
|
if (fileType != "zip") {
|
|
|
|
|
message/* default */.ZP.error("\u4EC5\u652F\u6301zip\u4E0A\u4F20");
|
|
|
|
|
// return Promise.reject()
|
|
|
|
|
return upload/* default */.Z.LIST_IGNORE;
|
|
|
|
|
}
|
|
|
|
|
setFileList([]);
|
|
|
|
|
@ -6492,6 +6519,82 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
setFileList(info.fileList);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var uploadProps1 = {
|
|
|
|
|
withCredentials: true,
|
|
|
|
|
disabled: disabled > 0,
|
|
|
|
|
openFileDialogOnClick: dayjs_min_default()() > dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.start_time) && dayjs_min_default()() < dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.end_time) && (Header === null || Header === void 0 ? void 0 : Header.is_member),
|
|
|
|
|
fileList: fileList === null || fileList === void 0 ? void 0 : fileList.map(function (item) {
|
|
|
|
|
return item.file;
|
|
|
|
|
}),
|
|
|
|
|
customRequest: function customRequest() {},
|
|
|
|
|
className: Contentmodules.upload,
|
|
|
|
|
beforeUpload: function () {
|
|
|
|
|
var _beforeUpload = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(file) {
|
|
|
|
|
var fileSize, fileType;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
// 当前文件大小
|
|
|
|
|
fileSize = file.size / 1024 / 1024 / 1024;
|
|
|
|
|
fileType = file.name.split(".").slice(-1)[0].toLowerCase();
|
|
|
|
|
if (!(file.name.length > 400)) {
|
|
|
|
|
_context.next = 5;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.error("\u6587\u4EF6\u540D\u79F0\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7400\u4E2A\u5B57\u7B26");
|
|
|
|
|
return _context.abrupt("return", false);
|
|
|
|
|
case 5:
|
|
|
|
|
if (!(fileType != "zip")) {
|
|
|
|
|
_context.next = 8;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.error("\u4EC5\u652F\u6301zip\u4E0A\u4F20");
|
|
|
|
|
return _context.abrupt("return", false);
|
|
|
|
|
case 8:
|
|
|
|
|
if (!(fileSize > 2)) {
|
|
|
|
|
_context.next = 11;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.error("\u300A".concat(file.name, "\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(2GB)"));
|
|
|
|
|
return _context.abrupt("return", false);
|
|
|
|
|
case 11:
|
|
|
|
|
fileList.push({
|
|
|
|
|
name: file.name,
|
|
|
|
|
file: file
|
|
|
|
|
});
|
|
|
|
|
setFileList(toConsumableArray_default()(fileList));
|
|
|
|
|
return _context.abrupt("return", false);
|
|
|
|
|
case 14:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
function beforeUpload(_x) {
|
|
|
|
|
return _beforeUpload.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return beforeUpload;
|
|
|
|
|
}(),
|
|
|
|
|
onRemove: function () {
|
|
|
|
|
var _onRemove = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(file) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setFileList(toConsumableArray_default()(fileList.filter(function (item) {
|
|
|
|
|
return item.name !== file.name;
|
|
|
|
|
})));
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
function onRemove(_x2) {
|
|
|
|
|
return _onRemove.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onRemove;
|
|
|
|
|
}()
|
|
|
|
|
};
|
|
|
|
|
var Columns = [{
|
|
|
|
|
title: "选手姓名",
|
|
|
|
|
dataIndex: "user_name",
|
|
|
|
|
@ -6553,14 +6656,20 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
dataIndex: "commit_id",
|
|
|
|
|
render: function render(text, _render) {
|
|
|
|
|
var _render$attachments, _render$attachments2, _render$attachments3, _render$attachments4;
|
|
|
|
|
var _render$attachments, _render$attachments2, _render$attachments4, _render$attachments5, _render$attachments6, _render$attachments7;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "topLeft",
|
|
|
|
|
title: _render === null || _render === void 0 || (_render$attachments = _render.attachments) === null || _render$attachments === void 0 || (_render$attachments = _render$attachments[0]) === null || _render$attachments === void 0 ? void 0 : _render$attachments.title,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
href: env/* default */.Z.API_SERVER + (_render === null || _render === void 0 || (_render$attachments2 = _render.attachments) === null || _render$attachments2 === void 0 || (_render$attachments2 = _render$attachments2[0]) === null || _render$attachments2 === void 0 ? void 0 : _render$attachments2.url),
|
|
|
|
|
download: _render === null || _render === void 0 || (_render$attachments3 = _render.attachments) === null || _render$attachments3 === void 0 || (_render$attachments3 = _render$attachments3[0]) === null || _render$attachments3 === void 0 ? void 0 : _render$attachments3.title,
|
|
|
|
|
children: _render !== null && _render !== void 0 && (_render$attachments2 = _render.attachments) !== null && _render$attachments2 !== void 0 && (_render$attachments2 = _render$attachments2[0]) !== null && _render$attachments2 !== void 0 && _render$attachments2.is_oss ? /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var _render$attachments3;
|
|
|
|
|
(0,util/* downLoadLink */.Nd)('', "".concat(_render === null || _render === void 0 || (_render$attachments3 = _render.attachments) === null || _render$attachments3 === void 0 || (_render$attachments3 = _render$attachments3[0]) === null || _render$attachments3 === void 0 ? void 0 : _render$attachments3.url.replace('disposition=inline', '')));
|
|
|
|
|
},
|
|
|
|
|
children: (_render === null || _render === void 0 || (_render$attachments4 = _render.attachments) === null || _render$attachments4 === void 0 || (_render$attachments4 = _render$attachments4[0]) === null || _render$attachments4 === void 0 ? void 0 : _render$attachments4.title) || "--"
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
href: env/* default */.Z.API_SERVER + (_render === null || _render === void 0 || (_render$attachments5 = _render.attachments) === null || _render$attachments5 === void 0 || (_render$attachments5 = _render$attachments5[0]) === null || _render$attachments5 === void 0 ? void 0 : _render$attachments5.url),
|
|
|
|
|
download: _render === null || _render === void 0 || (_render$attachments6 = _render.attachments) === null || _render$attachments6 === void 0 || (_render$attachments6 = _render$attachments6[0]) === null || _render$attachments6 === void 0 ? void 0 : _render$attachments6.title,
|
|
|
|
|
children: (_render === null || _render === void 0 || (_render$attachments7 = _render.attachments) === null || _render$attachments7 === void 0 || (_render$attachments7 = _render$attachments7[0]) === null || _render$attachments7 === void 0 ? void 0 : _render$attachments7.title) || "--"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -6620,12 +6729,12 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
children: "\u53D6\u6D88\u540E\uFF0C\u8BE5\u6210\u5458\u63D0\u4EA4\u7684\u4F5C\u54C1\u5C06\u4E0D\u8FDB\u884C\u8BC4\u6D4B\u6392\u961F\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u53D6\u6D88\u3002"
|
|
|
|
|
}),
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
_context3.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_commit_records/").concat(_render2.id, "/cancel.json"), {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
body: {
|
|
|
|
|
@ -6633,7 +6742,7 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
|
|
message/* default */.ZP.success("取消成功");
|
|
|
|
|
modalDiv.destroy();
|
|
|
|
|
@ -6641,9 +6750,9 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
@ -6660,6 +6769,239 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (cancelUpload) {
|
|
|
|
|
var _client;
|
|
|
|
|
(_client = client) === null || _client === void 0 || _client.cancel();
|
|
|
|
|
}
|
|
|
|
|
}, [cancelUpload]);
|
|
|
|
|
var fileCount = 0;
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (disabled < 3 ? disabled : 0) {
|
|
|
|
|
fileList.map( /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(item) {
|
|
|
|
|
var _user$userInfo, res, _res$data, result;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!((!item.status || item.status === 'error') && !cancelUpload)) {
|
|
|
|
|
_context4.next = 21;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
item.status = 'uploading';
|
|
|
|
|
item.file.status = 'uploading';
|
|
|
|
|
_context4.next = 5;
|
|
|
|
|
return _uploadFiles(item, {
|
|
|
|
|
login: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login,
|
|
|
|
|
container_type: 'ResourceCenter',
|
|
|
|
|
container_id: null,
|
|
|
|
|
description: '',
|
|
|
|
|
realFileName: true
|
|
|
|
|
// folder_id: Number(value[0].replace("folder_", ''))
|
|
|
|
|
});
|
|
|
|
|
case 5:
|
|
|
|
|
res = _context4.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) == 0)) {
|
|
|
|
|
_context4.next = 19;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
console.log(res);
|
|
|
|
|
fileCount++;
|
|
|
|
|
if (!(fileCount == fileList.length)) {
|
|
|
|
|
_context4.next = 17;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
setDisabled(0);
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
_context4.next = 14;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_commit_records.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
attachment_ids: [res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.attachment_id]
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 14:
|
|
|
|
|
result = _context4.sent;
|
|
|
|
|
// dispatch({ type: "globalSetting/setGlobalLoading", payload: { show: false, text: '' } })
|
|
|
|
|
if ((result === null || result === void 0 ? void 0 : result.status) === 0) {
|
|
|
|
|
message/* default */.ZP.info(result === null || result === void 0 ? void 0 : result.message);
|
|
|
|
|
setFileList([]);
|
|
|
|
|
getCompetitionCommitRecords();
|
|
|
|
|
}
|
|
|
|
|
getCompetitionCommitRecords();
|
|
|
|
|
case 17:
|
|
|
|
|
_context4.next = 21;
|
|
|
|
|
break;
|
|
|
|
|
case 19:
|
|
|
|
|
setDisabled(2);
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
case 21:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x3) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}());
|
|
|
|
|
}
|
|
|
|
|
}, [disabled]);
|
|
|
|
|
// 暂停上传
|
|
|
|
|
var uploadCancel = function uploadCancel() {
|
|
|
|
|
setCancelUpload(true);
|
|
|
|
|
};
|
|
|
|
|
var _uploadFiles = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(file, obj) {
|
|
|
|
|
var _res$data2, _res$data3, _res$data4, _res$data5, _res$data6, _res$data7;
|
|
|
|
|
var name, res, namearrs, filename;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
obj.file_name = file.name;
|
|
|
|
|
name = file.name;
|
|
|
|
|
_context5.next = 4;
|
|
|
|
|
return (0,fetch/* default */.ZP)('/api/buckets/get_competition_work_mode_token.json', {
|
|
|
|
|
method: "get"
|
|
|
|
|
});
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context5.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) {
|
|
|
|
|
_context5.next = 12;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
fileList[fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
})]['status'] = 'error';
|
|
|
|
|
fileList[fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
})]['file']['status'] = 'error';
|
|
|
|
|
message/* default */.ZP.warning("上传失败,请重新尝试");
|
|
|
|
|
setDisabled(2);
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
return _context5.abrupt("return");
|
|
|
|
|
case 12:
|
|
|
|
|
res.data = JSON.parse((0,UploadFile/* decrypt */.pe)(res.data));
|
|
|
|
|
client = new (aliyun_oss_sdk_default())({
|
|
|
|
|
endpoint: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.end_point,
|
|
|
|
|
region: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.region,
|
|
|
|
|
accessKeyId: res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.access_key_id,
|
|
|
|
|
accessKeySecret: res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.access_key_secret,
|
|
|
|
|
bucket: res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.bucket,
|
|
|
|
|
stsToken: res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.security_token
|
|
|
|
|
});
|
|
|
|
|
console.log(file, 'file');
|
|
|
|
|
setClient(client);
|
|
|
|
|
namearrs = file.name.split(".");
|
|
|
|
|
namearrs.pop();
|
|
|
|
|
filename = obj.realFileName ? namearrs.join(".") : (0,v4/* default */.Z)();
|
|
|
|
|
return _context5.abrupt("return", new Promise(function (resolve, reject) {
|
|
|
|
|
try {
|
|
|
|
|
var _user$userInfo2, _res$data8;
|
|
|
|
|
client.multipartUpload("userfiles/".concat(user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login, "/").concat(filename).concat(name.indexOf(".") > -1 ? '.' + name.split(".").pop() : ""), new Blob([file.file], {
|
|
|
|
|
type: file.file.type
|
|
|
|
|
}), {
|
|
|
|
|
timeout: 3600 * 1000,
|
|
|
|
|
partSize: 1002400,
|
|
|
|
|
progress: function progress(p, checkpoint, res) {
|
|
|
|
|
try {
|
|
|
|
|
console.log("进度", p, checkpoint, res);
|
|
|
|
|
if (disabled == 2) {
|
|
|
|
|
setDisabled(1);
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
}
|
|
|
|
|
var index = fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
});
|
|
|
|
|
console.log('index', index);
|
|
|
|
|
fileList[index]['file']['percent'] = p * 100;
|
|
|
|
|
fileList[index].tempCheckpoint = checkpoint;
|
|
|
|
|
setFileList(toConsumableArray_default()(fileList));
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
},
|
|
|
|
|
checkpoint: fileList[fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
})].tempCheckpoint,
|
|
|
|
|
callback: {
|
|
|
|
|
customValue: {
|
|
|
|
|
id: name + ''
|
|
|
|
|
},
|
|
|
|
|
url: res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.callback_url,
|
|
|
|
|
host: res === null || res === void 0 ? void 0 : res.data.bucket_host,
|
|
|
|
|
body: 'bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&' + (0,fetch/* parseParams */.rz)(obj)
|
|
|
|
|
}
|
|
|
|
|
}).then(function (result) {
|
|
|
|
|
var _result$data;
|
|
|
|
|
var index = fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
});
|
|
|
|
|
var status = 'done';
|
|
|
|
|
if (((_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.status) === 0) {
|
|
|
|
|
var _result$data2;
|
|
|
|
|
file.response = (_result$data2 = result.data) === null || _result$data2 === void 0 ? void 0 : _result$data2.data;
|
|
|
|
|
var _index = fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
});
|
|
|
|
|
fileList[_index]['status'] = 'done';
|
|
|
|
|
fileList[_index]['file']['status'] = 'done';
|
|
|
|
|
} else {
|
|
|
|
|
var _result$data3;
|
|
|
|
|
message/* default */.ZP.warning((_result$data3 = result.data) === null || _result$data3 === void 0 ? void 0 : _result$data3.message);
|
|
|
|
|
status = 'error';
|
|
|
|
|
}
|
|
|
|
|
fileList[index]['status'] = status;
|
|
|
|
|
fileList[index]['file']['status'] = status;
|
|
|
|
|
resolve(result === null || result === void 0 ? void 0 : result.data);
|
|
|
|
|
})["catch"](function (err) {
|
|
|
|
|
fileList[fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
})]['status'] = 'error';
|
|
|
|
|
fileList[fileList.findIndex(function (item) {
|
|
|
|
|
return item.name === name;
|
|
|
|
|
})]['file']['status'] = 'error';
|
|
|
|
|
message/* default */.ZP.warning("上传失败,请重新尝试");
|
|
|
|
|
setFileList(toConsumableArray_default()(fileList));
|
|
|
|
|
reject(err);
|
|
|
|
|
setDisabled(2);
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
console.log("err:", err);
|
|
|
|
|
});
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
}));
|
|
|
|
|
case 20:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}));
|
|
|
|
|
return function _uploadFiles(_x4, _x5) {
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleOk = /*#__PURE__*/function () {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(fileList.length === 0)) {
|
|
|
|
|
_context6.next = 3;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info('提交失败,请上传作品文件');
|
|
|
|
|
return _context6.abrupt("return");
|
|
|
|
|
case 3:
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
setDisabled(1);
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context6.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee6);
|
|
|
|
|
}));
|
|
|
|
|
return function handleOk() {
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (Header !== null && Header !== void 0 && Header.is_member && (Header === null || Header === void 0 ? void 0 : Header.mode) === 3) {
|
|
|
|
|
getCompetitionCommitRecords();
|
|
|
|
|
@ -6718,12 +7060,12 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
return _updateItem.apply(this, arguments);
|
|
|
|
|
} //获取对应文件列表
|
|
|
|
|
function _updateItem() {
|
|
|
|
|
_updateItem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
|
|
_updateItem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context4.next = 2;
|
|
|
|
|
_context8.next = 2;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'competitions/updateMdContent',
|
|
|
|
|
payload: {
|
|
|
|
|
@ -6737,7 +7079,7 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context4.sent;
|
|
|
|
|
res = _context8.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
message/* default */.ZP.info('提交成功');
|
|
|
|
|
setisedit(false);
|
|
|
|
|
@ -6763,9 +7105,9 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
return _context8.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}, _callee8);
|
|
|
|
|
}));
|
|
|
|
|
return _updateItem.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
@ -6784,26 +7126,26 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
return _deleteitem.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
function _deleteitem() {
|
|
|
|
|
_deleteitem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
|
|
_deleteitem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
|
|
|
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
icon: false,
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '删除页面后,数据不可恢复,请确认是否删除',
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context5.next = 2;
|
|
|
|
|
_context9.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_modules/").concat(RightItems.id, ".json"), {
|
|
|
|
|
method: 'delete'
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context5.sent;
|
|
|
|
|
res = _context9.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'competitions/getHeader',
|
|
|
|
|
@ -6815,9 +7157,9 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
return _context9.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}, _callee9);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
|
|
@ -6827,37 +7169,37 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
});
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context6.stop();
|
|
|
|
|
return _context10.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee6);
|
|
|
|
|
}, _callee10);
|
|
|
|
|
}));
|
|
|
|
|
return _deleteitem.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
var getCompetitionCommitRecords = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var res, _res$data;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
|
|
var res, _res$data9;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setisloading(true);
|
|
|
|
|
_context2.next = 3;
|
|
|
|
|
_context7.next = 3;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_commit_records.json"), {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
res = _context7.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
setcommitRecords(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.records);
|
|
|
|
|
setcommitRecords(res === null || res === void 0 || (_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : _res$data9.records);
|
|
|
|
|
setisloading(false);
|
|
|
|
|
}
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
return _context7.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}, _callee7);
|
|
|
|
|
}));
|
|
|
|
|
return function getCompetitionCommitRecords() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
return _ref5.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
|
|
@ -7032,7 +7374,7 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z.Dragger, objectSpread2_default()(objectSpread2_default()({}, UploadProps), {}, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z.Dragger, objectSpread2_default()(objectSpread2_default()({}, uploadProps1), {}, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
textAlign: "center"
|
|
|
|
|
@ -7064,59 +7406,31 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
marginLeft: 20,
|
|
|
|
|
marginTop: 120
|
|
|
|
|
},
|
|
|
|
|
children: [dayjs_min_default()() > dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.start_time) && dayjs_min_default()() < dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.end_time) && (Header === null || Header === void 0 ? void 0 : Header.is_member) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: Contentmodules.submitwork,
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(fileList.length === 0)) {
|
|
|
|
|
_context3.next = 3;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info('提交失败,请上传作品文件');
|
|
|
|
|
return _context3.abrupt("return");
|
|
|
|
|
case 3:
|
|
|
|
|
dispatch({
|
|
|
|
|
type: "globalSetting/setGlobalLoading",
|
|
|
|
|
payload: {
|
|
|
|
|
show: true,
|
|
|
|
|
text: '正在提交作品,请稍后...'
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
_context3.next = 6;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_commit_records.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
attachment_ids: getitemid(fileList)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 6:
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
dispatch({
|
|
|
|
|
type: "globalSetting/setGlobalLoading",
|
|
|
|
|
payload: {
|
|
|
|
|
show: false,
|
|
|
|
|
text: ''
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
message/* default */.ZP.info(res === null || res === void 0 ? void 0 : res.message);
|
|
|
|
|
setFileList([]);
|
|
|
|
|
getCompetitionCommitRecords();
|
|
|
|
|
}
|
|
|
|
|
case 9:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
})),
|
|
|
|
|
children: "\u63D0\u4EA4\u4F5C\u54C1"
|
|
|
|
|
})
|
|
|
|
|
children: [dayjs_min_default()() > dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.start_time) && dayjs_min_default()() < dayjs_min_default()(Header === null || Header === void 0 ? void 0 : Header.end_time) && (Header === null || Header === void 0 ? void 0 : Header.is_member) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
className: Contentmodules.submitwork,
|
|
|
|
|
loading: btnLoading,
|
|
|
|
|
onClick: handleOk
|
|
|
|
|
// onClick={async()=> {
|
|
|
|
|
|
|
|
|
|
// dispatch({ type: "globalSetting/setGlobalLoading", payload: { show: true, text: '正在提交作品,请稍后...' } })
|
|
|
|
|
// const res = await Fetch(`/api/competitions/${identifier}/competition_commit_records.json`,{
|
|
|
|
|
// method: 'post',
|
|
|
|
|
// body:{
|
|
|
|
|
// attachment_ids: getitemid(fileList)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// dispatch({ type: "globalSetting/setGlobalLoading", payload: { show: false, text: '' } })
|
|
|
|
|
// if(res?.status===0){
|
|
|
|
|
// message.info(res?.message)
|
|
|
|
|
// setFileList([])
|
|
|
|
|
// getCompetitionCommitRecords()
|
|
|
|
|
// }
|
|
|
|
|
// }}
|
|
|
|
|
,
|
|
|
|
|
children: disabled === 0 ? '提交作品' : disabled === 1 ? '提交中' : '继续提交'
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: "\u4E0A\u4F20\u8BF4\u660E\uFF1A\u76EE\u524D\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u4EC5\u652F\u6301\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\uFF0C\u6587\u4EF6\u5185\u5BB9\u6700\u5927\u9650\u52362GB "
|
|
|
|
|
children: "\u4E0A\u4F20\u8BF4\u660E\uFF1A\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u4EC5\u652F\u6301\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\uFF0C\u6587\u4EF6\u5185\u5BB9\u6700\u5927\u9650\u52362GB "
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: "\u6587\u4EF6\u89C4\u683C\uFF1A\u4EC5\u652F\u6301zip\u6587\u4EF6\u4E0A\u4F20 "
|
|
|
|
|
})]
|
|
|
|
|
@ -7234,11 +7548,11 @@ var competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Content = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var competitions = _ref4.competitions,
|
|
|
|
|
loading = _ref4.loading,
|
|
|
|
|
globalSetting = _ref4.globalSetting,
|
|
|
|
|
user = _ref4.user;
|
|
|
|
|
/* harmony default export */ var Content = ((0,_umi_production_exports.connect)(function (_ref6) {
|
|
|
|
|
var competitions = _ref6.competitions,
|
|
|
|
|
loading = _ref6.loading,
|
|
|
|
|
globalSetting = _ref6.globalSetting,
|
|
|
|
|
user = _ref6.user;
|
|
|
|
|
return {
|
|
|
|
|
competitions: competitions,
|
|
|
|
|
globalSetting: globalSetting,
|
|
|
|
|
@ -8206,7 +8520,7 @@ var Ranking_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
}, {
|
|
|
|
|
title: Header !== null && Header !== void 0 && Header.personal ? '参赛人员' : '战队',
|
|
|
|
|
align: 'left',
|
|
|
|
|
dataIndex: 'team_name',
|
|
|
|
|
dataIndex: Header !== null && Header !== void 0 && Header.personal ? 'user_name' : 'team_name',
|
|
|
|
|
width: 222,
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text, _render2) {
|
|
|
|
|
@ -11512,6 +11826,7 @@ var Playerwork_excluded = ["competitions", "globalSetting", "loading", "dispatch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Playerwork = function Playerwork(_ref) {
|
|
|
|
|
var _MemberWorks$data, _MemberWorks$data2, _MemberWorks$data3, _MemberWorks$data4;
|
|
|
|
|
var competitions = _ref.competitions,
|
|
|
|
|
@ -11604,14 +11919,20 @@ var Playerwork = function Playerwork(_ref) {
|
|
|
|
|
dataIndex: "commit_id",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text, _render) {
|
|
|
|
|
var _render$attachments, _render$attachments2, _render$attachments3, _render$attachments4;
|
|
|
|
|
var _render$attachments, _render$attachments2, _render$attachments4, _render$attachments5, _render$attachments6, _render$attachments7;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "topLeft",
|
|
|
|
|
title: _render === null || _render === void 0 || (_render$attachments = _render.attachments) === null || _render$attachments === void 0 || (_render$attachments = _render$attachments[0]) === null || _render$attachments === void 0 ? void 0 : _render$attachments.title,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
href: env/* default */.Z.API_SERVER + (_render === null || _render === void 0 || (_render$attachments2 = _render.attachments) === null || _render$attachments2 === void 0 || (_render$attachments2 = _render$attachments2[0]) === null || _render$attachments2 === void 0 ? void 0 : _render$attachments2.url),
|
|
|
|
|
download: _render === null || _render === void 0 || (_render$attachments3 = _render.attachments) === null || _render$attachments3 === void 0 || (_render$attachments3 = _render$attachments3[0]) === null || _render$attachments3 === void 0 ? void 0 : _render$attachments3.title,
|
|
|
|
|
children: _render !== null && _render !== void 0 && (_render$attachments2 = _render.attachments) !== null && _render$attachments2 !== void 0 && (_render$attachments2 = _render$attachments2[0]) !== null && _render$attachments2 !== void 0 && _render$attachments2.is_oss ? /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var _render$attachments3;
|
|
|
|
|
(0,util/* downLoadLink */.Nd)('', "".concat(_render === null || _render === void 0 || (_render$attachments3 = _render.attachments) === null || _render$attachments3 === void 0 || (_render$attachments3 = _render$attachments3[0]) === null || _render$attachments3 === void 0 ? void 0 : _render$attachments3.url.replace('disposition=inline', '')));
|
|
|
|
|
},
|
|
|
|
|
children: (_render === null || _render === void 0 || (_render$attachments4 = _render.attachments) === null || _render$attachments4 === void 0 || (_render$attachments4 = _render$attachments4[0]) === null || _render$attachments4 === void 0 ? void 0 : _render$attachments4.title) || "--"
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
href: env/* default */.Z.API_SERVER + (_render === null || _render === void 0 || (_render$attachments5 = _render.attachments) === null || _render$attachments5 === void 0 || (_render$attachments5 = _render$attachments5[0]) === null || _render$attachments5 === void 0 ? void 0 : _render$attachments5.url),
|
|
|
|
|
download: _render === null || _render === void 0 || (_render$attachments6 = _render.attachments) === null || _render$attachments6 === void 0 || (_render$attachments6 = _render$attachments6[0]) === null || _render$attachments6 === void 0 ? void 0 : _render$attachments6.title,
|
|
|
|
|
children: (_render === null || _render === void 0 || (_render$attachments7 = _render.attachments) === null || _render$attachments7 === void 0 || (_render$attachments7 = _render$attachments7[0]) === null || _render$attachments7 === void 0 ? void 0 : _render$attachments7.title) || "--"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|