|
|
|
|
@ -18664,43 +18664,6 @@ var Entrance = function Entrance(_ref) {
|
|
|
|
|
className: "ml20",
|
|
|
|
|
children: CommitRecords === null || CommitRecords === void 0 || (_CommitRecords$data16 = CommitRecords.data) === null || _CommitRecords$data16 === void 0 || (_CommitRecords$data16 = _CommitRecords$data16.question) === null || _CommitRecords$data16 === void 0 ? void 0 : _CommitRecords$data16.name
|
|
|
|
|
})]
|
|
|
|
|
}), !isEdit && is_manager && /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: 20
|
|
|
|
|
},
|
|
|
|
|
onChange: ( /*#__PURE__*/function () {
|
|
|
|
|
var _ref14 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(e) {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee13$(_context14) {
|
|
|
|
|
while (1) switch (_context14.prev = _context14.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context14.next = 2;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: "competitions/putCompetitionEntries",
|
|
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
identifier: identifier
|
|
|
|
|
}, urlData), {}, {
|
|
|
|
|
hidden: e.target.checked
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context14.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
|
|
message/* default */.ZP.success("修改成功");
|
|
|
|
|
setIsEdit(false);
|
|
|
|
|
getCompetitionCommitRecords();
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context14.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee13);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x9) {
|
|
|
|
|
return _ref14.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}()),
|
|
|
|
|
children: "\u9690\u85CF\u8D5B\u9898\u5165\u53E3"
|
|
|
|
|
}), (competitionStage === null || competitionStage === void 0 ? void 0 : competitionStage.category) !== 'npu' && (competitionStage === null || competitionStage === void 0 ? void 0 : competitionStage.category) !== 'gpu' && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "mt25",
|
|
|
|
|
align: "middle",
|
|
|
|
|
@ -18896,12 +18859,12 @@ var Entrance = function Entrance(_ref) {
|
|
|
|
|
size: "large",
|
|
|
|
|
className: "ml20",
|
|
|
|
|
type: "primary",
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee14$(_context15) {
|
|
|
|
|
while (1) switch (_context15.prev = _context15.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee13$(_context14) {
|
|
|
|
|
while (1) switch (_context14.prev = _context14.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context15.next = 2;
|
|
|
|
|
_context14.next = 2;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: "competitions/putCompetitionEntries",
|
|
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
@ -18911,7 +18874,7 @@ var Entrance = function Entrance(_ref) {
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context15.sent;
|
|
|
|
|
res = _context14.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
|
|
message/* default */.ZP.success("修改成功");
|
|
|
|
|
setIsEdit(false);
|
|
|
|
|
@ -18919,9 +18882,9 @@ var Entrance = function Entrance(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context15.stop();
|
|
|
|
|
return _context14.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee14);
|
|
|
|
|
}, _callee13);
|
|
|
|
|
})),
|
|
|
|
|
children: "\u4FDD\u5B58\u66F4\u6539"
|
|
|
|
|
})]
|
|
|
|
|
@ -19194,12 +19157,12 @@ var Entrance = function Entrance(_ref) {
|
|
|
|
|
layout: "vertical",
|
|
|
|
|
size: "large",
|
|
|
|
|
onFinish: ( /*#__PURE__*/function () {
|
|
|
|
|
var _ref16 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15(valueAll) {
|
|
|
|
|
var _ref15 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14(valueAll) {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee15$(_context16) {
|
|
|
|
|
while (1) switch (_context16.prev = _context16.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee14$(_context15) {
|
|
|
|
|
while (1) switch (_context15.prev = _context15.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context16.next = 2;
|
|
|
|
|
_context15.next = 2;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: "competitions/putCompetitionEntries",
|
|
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
@ -19207,26 +19170,26 @@ var Entrance = function Entrance(_ref) {
|
|
|
|
|
}, urlData), valueAll)
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context16.sent;
|
|
|
|
|
res = _context15.sent;
|
|
|
|
|
if (!(res.status == 0)) {
|
|
|
|
|
_context16.next = 8;
|
|
|
|
|
_context15.next = 8;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.success("保存成功");
|
|
|
|
|
setIsedit(false);
|
|
|
|
|
_context16.next = 8;
|
|
|
|
|
_context15.next = 8;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: "competitions/common_header",
|
|
|
|
|
payload: identifier
|
|
|
|
|
});
|
|
|
|
|
case 8:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context16.stop();
|
|
|
|
|
return _context15.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee15);
|
|
|
|
|
}, _callee14);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x10) {
|
|
|
|
|
return _ref16.apply(this, arguments);
|
|
|
|
|
return function (_x9) {
|
|
|
|
|
return _ref15.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}()),
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
@ -19288,11 +19251,11 @@ var Entrance = function Entrance(_ref) {
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var view_Entrance = ((0,_umi_production_exports.connect)(function (_ref17) {
|
|
|
|
|
var competitions = _ref17.competitions,
|
|
|
|
|
loading = _ref17.loading,
|
|
|
|
|
globalSetting = _ref17.globalSetting,
|
|
|
|
|
user = _ref17.user;
|
|
|
|
|
/* harmony default export */ var view_Entrance = ((0,_umi_production_exports.connect)(function (_ref16) {
|
|
|
|
|
var competitions = _ref16.competitions,
|
|
|
|
|
loading = _ref16.loading,
|
|
|
|
|
globalSetting = _ref16.globalSetting,
|
|
|
|
|
user = _ref16.user;
|
|
|
|
|
return {
|
|
|
|
|
competitions: competitions,
|
|
|
|
|
globalSetting: globalSetting,
|
|
|
|
|
@ -19333,7 +19296,9 @@ var view_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
|
|
var is_manager = competitions.is_manager,
|
|
|
|
|
competition = competitions.competition;
|
|
|
|
|
competition = competitions.competition,
|
|
|
|
|
CommitRecords = competitions.CommitRecords,
|
|
|
|
|
MdContent = competitions.MdContent;
|
|
|
|
|
var _useParams = (0,_umi_production_exports.useParams)(),
|
|
|
|
|
identifier = _useParams.identifier;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
@ -19352,6 +19317,10 @@ var view_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
typeItem = _useState8[0],
|
|
|
|
|
setTypeItem = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
checkedst = _useState10[0],
|
|
|
|
|
setcheckedst = _useState10[1];
|
|
|
|
|
var Item = [{
|
|
|
|
|
type: "other",
|
|
|
|
|
name: "其他",
|
|
|
|
|
@ -19377,6 +19346,9 @@ var view_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
setselectedKeys: setselectedKeys
|
|
|
|
|
})
|
|
|
|
|
}];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
setcheckedst(MdContent.hidden);
|
|
|
|
|
}, [MdContent]);
|
|
|
|
|
var handleClickLeftItem = function handleClickLeftItem(Value) {
|
|
|
|
|
var _Item$find;
|
|
|
|
|
var type = Item === null || Item === void 0 || (_Item$find = Item.find(function (item) {
|
|
|
|
|
@ -19436,15 +19408,51 @@ var view_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
className: viewmodules.Title,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: "\u7ADE\u8D5B\u6982\u89C8"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: typeItem != "entrance" && is_manager && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [typeItem != "entrance" && is_manager && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setIsedit(true);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-bianji9 mr5"
|
|
|
|
|
}), "\u7F16\u8F91"]
|
|
|
|
|
})
|
|
|
|
|
}), is_manager && typeItem === 'entrance' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
checked: checkedst,
|
|
|
|
|
onChange: ( /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) {
|
|
|
|
|
var _CommitRecords$data, _CommitRecords$data2;
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setcheckedst(e.target.checked);
|
|
|
|
|
_context.next = 3;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: "competitions/putCompetitionEntries",
|
|
|
|
|
payload: {
|
|
|
|
|
identifier: identifier,
|
|
|
|
|
description: CommitRecords === null || CommitRecords === void 0 || (_CommitRecords$data = CommitRecords.data) === null || _CommitRecords$data === void 0 || (_CommitRecords$data = _CommitRecords$data.question) === null || _CommitRecords$data === void 0 ? void 0 : _CommitRecords$data.description,
|
|
|
|
|
question_id: CommitRecords === null || CommitRecords === void 0 || (_CommitRecords$data2 = CommitRecords.data) === null || _CommitRecords$data2 === void 0 || (_CommitRecords$data2 = _CommitRecords$data2.question) === null || _CommitRecords$data2 === void 0 ? void 0 : _CommitRecords$data2.id,
|
|
|
|
|
hidden: e.target.checked
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
|
|
message/* default */.ZP.success("修改成功");
|
|
|
|
|
}
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}()),
|
|
|
|
|
children: "\u9690\u85CF\u8D5B\u9898\u5165\u53E3"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
@ -19466,22 +19474,22 @@ var view_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
border: '1px solid #BACFFE',
|
|
|
|
|
color: '#3061D0'
|
|
|
|
|
},
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var res, _res$data;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_modules.json"), {
|
|
|
|
|
method: 'POST'
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
|
|
_context.next = 7;
|
|
|
|
|
_context2.next = 7;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context.next = 6;
|
|
|
|
|
_context2.next = 6;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'competitions/common_header',
|
|
|
|
|
payload: identifier
|
|
|
|
|
@ -19490,9 +19498,9 @@ var view_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
setselectedKeys(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.id);
|
|
|
|
|
case 7:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})),
|
|
|
|
|
children: "+ \u65B0\u589E\u680F\u76EE"
|
|
|
|
|
})]
|
|
|
|
|
@ -19512,11 +19520,11 @@ var view_competitionsPage = function competitionsPage(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var view = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
var competitions = _ref3.competitions,
|
|
|
|
|
loading = _ref3.loading,
|
|
|
|
|
globalSetting = _ref3.globalSetting,
|
|
|
|
|
user = _ref3.user;
|
|
|
|
|
/* harmony default export */ var view = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var competitions = _ref4.competitions,
|
|
|
|
|
loading = _ref4.loading,
|
|
|
|
|
globalSetting = _ref4.globalSetting,
|
|
|
|
|
user = _ref4.user;
|
|
|
|
|
return {
|
|
|
|
|
competitions: competitions,
|
|
|
|
|
globalSetting: globalSetting,
|