|
|
|
|
@ -9170,6 +9170,7 @@ var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
@ -9183,77 +9184,84 @@ var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
StaffDetail = _ref.StaffDetail,
|
|
|
|
|
_ref$getTabResults = _ref.getTabResults,
|
|
|
|
|
getTabResults = _ref$getTabResults === void 0 ? function () {} : _ref$getTabResults;
|
|
|
|
|
// 开启/关闭 编辑
|
|
|
|
|
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
|
|
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
|
|
form = _Form$useForm2[0];
|
|
|
|
|
var _useState = (0,react.useState)(false),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
isEdit = _useState2[0],
|
|
|
|
|
setIsEdit = _useState2[1];
|
|
|
|
|
formButLoading = _useState2[0],
|
|
|
|
|
setFormButLoading = _useState2[1];
|
|
|
|
|
// 开启/关闭 编辑
|
|
|
|
|
var _useState3 = (0,react.useState)(false),
|
|
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
|
|
isEdit = _useState4[0],
|
|
|
|
|
setIsEdit = _useState4[1];
|
|
|
|
|
var _useParams = (0,_umi_production_exports.useParams)(),
|
|
|
|
|
identifier = _useParams.identifier;
|
|
|
|
|
// 提交作品:1, 仅提交文件:2
|
|
|
|
|
var _useState3 = (0,react.useState)(1),
|
|
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
|
|
modelType = _useState4[0],
|
|
|
|
|
setModelType = _useState4[1];
|
|
|
|
|
// 竞赛管理员、超管、运营
|
|
|
|
|
var _useState5 = (0,react.useState)(false),
|
|
|
|
|
var _useState5 = (0,react.useState)(1),
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
identity = _useState6[0],
|
|
|
|
|
setIdentity = _useState6[1];
|
|
|
|
|
modelType = _useState6[0],
|
|
|
|
|
setModelType = _useState6[1];
|
|
|
|
|
// 竞赛管理员、超管、运营
|
|
|
|
|
var _useState7 = (0,react.useState)(false),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
isSubmitModel = _useState8[0],
|
|
|
|
|
setIsSubmitModel = _useState8[1];
|
|
|
|
|
// 上传列表数据
|
|
|
|
|
var _useState9 = (0,react.useState)([]),
|
|
|
|
|
identity = _useState8[0],
|
|
|
|
|
setIdentity = _useState8[1];
|
|
|
|
|
var _useState9 = (0,react.useState)(false),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
fileList = _useState10[0],
|
|
|
|
|
setFileList = _useState10[1];
|
|
|
|
|
// 表格数据
|
|
|
|
|
var _useState11 = (0,react.useState)(false),
|
|
|
|
|
isSubmitModel = _useState10[0],
|
|
|
|
|
setIsSubmitModel = _useState10[1];
|
|
|
|
|
// 上传列表数据
|
|
|
|
|
var _useState11 = (0,react.useState)([]),
|
|
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
|
|
tableLoading = _useState12[0],
|
|
|
|
|
setTableLoading = _useState12[1];
|
|
|
|
|
var _useState13 = (0,react.useState)({
|
|
|
|
|
fileList = _useState12[0],
|
|
|
|
|
setFileList = _useState12[1];
|
|
|
|
|
// 表格数据
|
|
|
|
|
var _useState13 = (0,react.useState)(false),
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
tableLoading = _useState14[0],
|
|
|
|
|
setTableLoading = _useState14[1];
|
|
|
|
|
var _useState15 = (0,react.useState)({
|
|
|
|
|
name: "",
|
|
|
|
|
url: "",
|
|
|
|
|
id: null,
|
|
|
|
|
fileList: []
|
|
|
|
|
}),
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
rowTable = _useState14[0],
|
|
|
|
|
setRowTable = _useState14[1];
|
|
|
|
|
var _useState15 = (0,react.useState)({
|
|
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
|
|
rowTable = _useState16[0],
|
|
|
|
|
setRowTable = _useState16[1];
|
|
|
|
|
var _useState17 = (0,react.useState)({
|
|
|
|
|
total_count: 0,
|
|
|
|
|
results: []
|
|
|
|
|
}),
|
|
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
|
|
tableList = _useState16[0],
|
|
|
|
|
setTableList = _useState16[1];
|
|
|
|
|
// 当前赛事
|
|
|
|
|
var _useState17 = (0,react.useState)(null),
|
|
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
|
|
gameItem = _useState18[0],
|
|
|
|
|
setGameItem = _useState18[1];
|
|
|
|
|
tableList = _useState18[0],
|
|
|
|
|
setTableList = _useState18[1];
|
|
|
|
|
// 当前赛事
|
|
|
|
|
var _useState19 = (0,react.useState)(null),
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
gameItem = _useState20[0],
|
|
|
|
|
setGameItem = _useState20[1];
|
|
|
|
|
// 分页,搜索
|
|
|
|
|
var _useState19 = (0,react.useState)({
|
|
|
|
|
var _useState21 = (0,react.useState)({
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 20,
|
|
|
|
|
keyword: ""
|
|
|
|
|
}),
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
urlData = _useState20[0],
|
|
|
|
|
setUrlData = _useState20[1];
|
|
|
|
|
// MD内容
|
|
|
|
|
var _useState21 = (0,react.useState)(""),
|
|
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
|
|
mdContent = _useState22[0],
|
|
|
|
|
setMdContent = _useState22[1];
|
|
|
|
|
// 下载所有文件时打包成zip文件
|
|
|
|
|
var _useState23 = (0,react.useState)(new (jszip_min_default())()),
|
|
|
|
|
urlData = _useState22[0],
|
|
|
|
|
setUrlData = _useState22[1];
|
|
|
|
|
// MD内容
|
|
|
|
|
var _useState23 = (0,react.useState)(""),
|
|
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
|
|
zipAll = _useState24[0],
|
|
|
|
|
setZipAll = _useState24[1];
|
|
|
|
|
mdContent = _useState24[0],
|
|
|
|
|
setMdContent = _useState24[1];
|
|
|
|
|
// 下载所有文件时打包成zip文件
|
|
|
|
|
var _useState25 = (0,react.useState)(new (jszip_min_default())()),
|
|
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
|
|
zipAll = _useState26[0],
|
|
|
|
|
setZipAll = _useState26[1];
|
|
|
|
|
(0,react.useEffect)(function () {
|
|
|
|
|
setIdentity((userinfo === null || userinfo === void 0 ? void 0 : userinfo.admin) || (userinfo === null || userinfo === void 0 ? void 0 : userinfo.business) || Editable);
|
|
|
|
|
}, [userinfo === null || userinfo === void 0 ? void 0 : userinfo.admin, userinfo === null || userinfo === void 0 ? void 0 : userinfo.business, Editable]);
|
|
|
|
|
@ -9488,7 +9496,7 @@ var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
console.log(values, fileList);
|
|
|
|
|
setFormButLoading(true);
|
|
|
|
|
if (!(modelType == 2 && fileList.length == 0)) {
|
|
|
|
|
_context4.next = 4;
|
|
|
|
|
break;
|
|
|
|
|
@ -9561,10 +9569,11 @@ var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
} else {
|
|
|
|
|
message/* default.info */.ZP.info(((_res3 = res) === null || _res3 === void 0 ? void 0 : _res3.message) || "提交失败");
|
|
|
|
|
}
|
|
|
|
|
setFormButLoading(false);
|
|
|
|
|
setIsSubmitModel(false);
|
|
|
|
|
setFileList([]);
|
|
|
|
|
getResults();
|
|
|
|
|
case 26:
|
|
|
|
|
case 27:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -9950,8 +9959,9 @@ var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
style: {
|
|
|
|
|
lineHeight: "32px"
|
|
|
|
|
},
|
|
|
|
|
target: "_blank",
|
|
|
|
|
href: "/api/competitions/".concat(identifier, "/results.xlsx?identifier=").concat(identifier, "&stage_id=").concat((gameItem === null || gameItem === void 0 ? void 0 : gameItem.id) || "", "&module_type=worksubmit"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
(0,util/* downLoadLink */.Nd)("", env/* default.API_SERVER */.Z.API_SERVER + "/api/competitions/".concat(identifier, "/results.xlsx?identifier=").concat(identifier, "&stage_id=").concat((gameItem === null || gameItem === void 0 ? void 0 : gameItem.id) || "", "&module_type=worksubmit"));
|
|
|
|
|
},
|
|
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-lianjie3",
|
|
|
|
|
style: {
|
|
|
|
|
@ -10034,7 +10044,10 @@ var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
bodyStyle: {
|
|
|
|
|
padding: " 0px 25px 10px 25px"
|
|
|
|
|
},
|
|
|
|
|
footer: null,
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
return form.submit();
|
|
|
|
|
},
|
|
|
|
|
confirmLoading: formButLoading,
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setIsSubmitModel(false);
|
|
|
|
|
setFileList([]);
|
|
|
|
|
@ -10044,6 +10057,7 @@ var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
className: WorkSubmitmodules.WorkSubmitDesc,
|
|
|
|
|
children: "\u8BF4\u660E\uFF1A\u53C2\u8D5B\u4F5C\u54C1\u4E0D\u652F\u6301\u5220\u9664\uFF0C\u5927\u8D5B\u8FDB\u884C\u4E2D\u4E0A\u4F20\u540E\u7684\u4F5C\u54C1\u5982\u9700\u4FEE\u6539\uFF0C\u53EF\u5728\u3010\u4F5C\u54C1\u63D0\u4EA4\u3011\u5217\u8868\u70B9\u51FB\u201C\u7F16\u8F91\u201D\u8FDB\u884C\u4FEE\u6539\u3002"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
|
|
form: form,
|
|
|
|
|
initialValues: rowTable,
|
|
|
|
|
colon: false,
|
|
|
|
|
onFinish: handleFormFinish,
|
|
|
|
|
@ -10141,28 +10155,6 @@ var WorkSubmit = function WorkSubmit(_ref) {
|
|
|
|
|
children: "\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"
|
|
|
|
|
})]
|
|
|
|
|
}))]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: "auto"
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setIsSubmitModel(false);
|
|
|
|
|
setFileList([]);
|
|
|
|
|
setRowTable(null);
|
|
|
|
|
},
|
|
|
|
|
children: "\u53D6\u6D88"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: "10px"
|
|
|
|
|
},
|
|
|
|
|
htmlType: "submit",
|
|
|
|
|
children: "\u786E\u5B9A"
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
|