|
|
|
|
@ -5633,6 +5633,8 @@ var types_competitions = __webpack_require__(90667);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Edit/Setting/information/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var informationmodules = ({"flex_box_center":"flex_box_center___I6sdE","flex_space_between":"flex_space_between___uTlet","flex_box_vertical_center":"flex_box_vertical_center___P8PRU","flex_box_center_end":"flex_box_center_end___WLZlZ","flex_box_column":"flex_box_column___tMPnI","all":"all___dBmCY","title":"title___IeVqW","content":"content___zp_KL","form_item":"form_item___hXuXB","form_item_basic":"form_item_basic___K4a8V","form_item_time":"form_item_time___h8rdI","form_item_model":"form_item_model____Mn2H","form_item_item":"form_item_item___CR0Q5","form_item_item_select":"form_item_item_select___eeMCh","textarea_father":"textarea_father___XVeQz","textarea_length":"textarea_length___Xdwl4","upload_button":"upload_button___zltZE","upload_button_file":"upload_button_file___vVqry","upload_text":"upload_text___pdO7Y","date_text":"date_text___gvUlY","upload_download":"upload_download___KCtvw","checkbox_text":"checkbox_text___yn4Cf","footer":"footer___t6QDc","clear_button":"clear_button___FWQBK","save_button":"save_button___l7JJ7","radio_style":"radio_style___tWyOo"});
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
|
|
|
|
|
var date_picker = __webpack_require__(30518);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
|
|
|
|
|
@ -5662,6 +5664,8 @@ var TextArea = input/* default */.Z.TextArea;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var informationPage = function informationPage(_ref) {
|
|
|
|
|
var _formValue$sponsor, _formValue$organizer, _formValue$co_organiz, _formValue$name, _formValue$identifier2;
|
|
|
|
|
var competitions = _ref.competitions,
|
|
|
|
|
@ -5729,6 +5733,14 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
|
|
createOpen = _useState28[0],
|
|
|
|
|
setCreateOpen = _useState28[1];
|
|
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
|
|
createOpenLoading = _useState30[0],
|
|
|
|
|
setCreateOpenLoading = _useState30[1];
|
|
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
|
|
organizations = _useState32[0],
|
|
|
|
|
setOrganizations = _useState32[1];
|
|
|
|
|
var Header = competitions.Header;
|
|
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
|
|
var submitData = /*#__PURE__*/function () {
|
|
|
|
|
@ -5845,22 +5857,69 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var submitModalData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(values) {
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getOrganizations();
|
|
|
|
|
}, []);
|
|
|
|
|
var getOrganizations = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var res, _res$data, options;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
console.log(values, 'values');
|
|
|
|
|
case 1:
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/open_organizations/user_orgs.json", {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
options = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.list) === null || _res$data === void 0 ? void 0 : _res$data.map(function (e) {
|
|
|
|
|
return {
|
|
|
|
|
label: e.name,
|
|
|
|
|
value: e.id
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
setOrganizations(options);
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
return function submitModalData(_x2) {
|
|
|
|
|
return function getOrganizations() {
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var submitModalData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(values) {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setCreateOpenLoading(true);
|
|
|
|
|
_context3.next = 3;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/open_organizations.json", {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: objectSpread2_default()({}, values)
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('创建成功');
|
|
|
|
|
setCreateOpen(false);
|
|
|
|
|
}
|
|
|
|
|
setCreateOpenLoading(false);
|
|
|
|
|
case 6:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
return function submitModalData(_x2) {
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var identifierBlur = function identifierBlur() {
|
|
|
|
|
setshowtext(false);
|
|
|
|
|
(0,service_competitions/* identifier_exist */.IN)({
|
|
|
|
|
@ -5940,19 +5999,20 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
required_phone: res === null || res === void 0 ? void 0 : res.required_phone,
|
|
|
|
|
required_mail: res === null || res === void 0 ? void 0 : res.required_mail
|
|
|
|
|
};
|
|
|
|
|
var filteredKeys = Object.entries(required_info).filter(function (_ref4) {
|
|
|
|
|
var _ref5 = slicedToArray_default()(_ref4, 2),
|
|
|
|
|
key = _ref5[0],
|
|
|
|
|
value = _ref5[1];
|
|
|
|
|
var filteredKeys = Object.entries(required_info).filter(function (_ref5) {
|
|
|
|
|
var _ref6 = slicedToArray_default()(_ref5, 2),
|
|
|
|
|
key = _ref6[0],
|
|
|
|
|
value = _ref6[1];
|
|
|
|
|
return value === true;
|
|
|
|
|
}) // 过滤出值为 true 的键值对
|
|
|
|
|
.map(function (_ref6) {
|
|
|
|
|
var _ref7 = slicedToArray_default()(_ref6, 1),
|
|
|
|
|
key = _ref7[0];
|
|
|
|
|
.map(function (_ref7) {
|
|
|
|
|
var _ref8 = slicedToArray_default()(_ref7, 1),
|
|
|
|
|
key = _ref8[0];
|
|
|
|
|
return key.replace('required_', '');
|
|
|
|
|
});
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
required_info: filteredKeys
|
|
|
|
|
required_info: filteredKeys,
|
|
|
|
|
open_organization_id: res === null || res === void 0 ? void 0 : res.open_organization_id
|
|
|
|
|
});
|
|
|
|
|
setstudentcheck(res === null || res === void 0 || (_res$member_staff = res.member_staff) === null || _res$member_staff === void 0 ? void 0 : _res$member_staff.mutiple_limited);
|
|
|
|
|
setteachercheck(res === null || res === void 0 || (_res$teacher_staff = res.teacher_staff) === null || _res$teacher_staff === void 0 ? void 0 : _res$teacher_staff.mutiple_limited);
|
|
|
|
|
@ -6027,10 +6087,10 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
scrollToFirstError: true,
|
|
|
|
|
onFinish: submitData,
|
|
|
|
|
onFinishFailed: ( /*#__PURE__*/function () {
|
|
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(errInfo) {
|
|
|
|
|
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(errInfo) {
|
|
|
|
|
var _errInfo$errorFields;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
// message.error(errInfo.errorFields[0].errors[0])
|
|
|
|
|
form.scrollToField(errInfo === null || errInfo === void 0 || (_errInfo$errorFields = errInfo.errorFields) === null || _errInfo$errorFields === void 0 || (_errInfo$errorFields = _errInfo$errorFields[0]) === null || _errInfo$errorFields === void 0 ? void 0 : _errInfo$errorFields.name, {
|
|
|
|
|
@ -6039,12 +6099,12 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
});
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x3) {
|
|
|
|
|
return _ref8.apply(this, arguments);
|
|
|
|
|
return _ref9.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}()),
|
|
|
|
|
onChange: function onChange() {
|
|
|
|
|
@ -6248,6 +6308,59 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
|
|
className: informationmodules.form_item_basic,
|
|
|
|
|
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#ff4d4f',
|
|
|
|
|
marginRight: '4px',
|
|
|
|
|
fontFamily: 'SimSun, sans-serif'
|
|
|
|
|
},
|
|
|
|
|
children: "*"
|
|
|
|
|
}), "\u7ADE\u8D5B\u7EC4\u7EC7"]
|
|
|
|
|
}),
|
|
|
|
|
colon: false,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "open_organization_id",
|
|
|
|
|
noStyle: true,
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择竞赛组织'
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
|
|
options: organizations,
|
|
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u7ADE\u8D5B\u7EC4\u7EC7",
|
|
|
|
|
style: {
|
|
|
|
|
width: 628
|
|
|
|
|
},
|
|
|
|
|
size: "large"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
|
|
style: {
|
|
|
|
|
borderRadius: 2
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setCreateOpen(true);
|
|
|
|
|
},
|
|
|
|
|
className: "ml20",
|
|
|
|
|
children: "\u521B\u5EFA\u7EC4\u7EC7"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
className: "ml10",
|
|
|
|
|
children: "\u8FDB\u5165\u7EC4\u7EC7"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
lineHeight: 'initial',
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
marginTop: 8,
|
|
|
|
|
color: '#9096A3'
|
|
|
|
|
},
|
|
|
|
|
children: "\u4EC5\u53EF\u9009\u62E9\u672A\u7ED1\u5B9A\u7ADE\u8D5B\u7684\u7EC4\u7EC7\uFF0C\u5EFA\u8BAE\u65B0\u5EFA\u7EC4\u7EC7\u7BA1\u7406\u7ADE\u8D5B"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
className: informationmodules.form_item_basic,
|
|
|
|
|
label: "\u5956\u91D1\u91D1\u989D",
|
|
|
|
|
@ -6575,14 +6688,14 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
|
|
|
|
|
className: informationmodules.save_button,
|
|
|
|
|
htmlType: "submit",
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}, _callee5);
|
|
|
|
|
})),
|
|
|
|
|
children: "\u4FDD\u5B58\u66F4\u6539"
|
|
|
|
|
})
|
|
|
|
|
@ -6620,6 +6733,7 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
open: createOpen,
|
|
|
|
|
okText: "\u521B\u5EFA\u7EC4\u7EC7",
|
|
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
|
|
confirmLoading: createOpenLoading,
|
|
|
|
|
bodyStyle: {
|
|
|
|
|
paddingBottom: 0
|
|
|
|
|
},
|
|
|
|
|
@ -6656,7 +6770,7 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
marginTop: 10
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "test1",
|
|
|
|
|
name: "name",
|
|
|
|
|
noStyle: true,
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
@ -6676,7 +6790,7 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
label: "\u6743\u9650",
|
|
|
|
|
colon: false,
|
|
|
|
|
name: "test2",
|
|
|
|
|
name: "repo_admin_change_team_access",
|
|
|
|
|
valuePropName: "checked",
|
|
|
|
|
className: "mb0",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
@ -6687,8 +6801,8 @@ var informationPage = function informationPage(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var information = ((0,_umi_production_exports.connect)(function (_ref10) {
|
|
|
|
|
var competitions = _ref10.competitions;
|
|
|
|
|
/* harmony default export */ var information = ((0,_umi_production_exports.connect)(function (_ref11) {
|
|
|
|
|
var competitions = _ref11.competitions;
|
|
|
|
|
return {
|
|
|
|
|
competitions: competitions
|
|
|
|
|
};
|
|
|
|
|
@ -7928,8 +8042,6 @@ var questionsPage = function questionsPage(_ref) {
|
|
|
|
|
var dropdown = __webpack_require__(38854);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
|
|
|
|
|
var menu = __webpack_require__(20834);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js
|
|
|
|
|
var auto_complete = __webpack_require__(88522);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js
|