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

9064 lines
347 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self["webpackChunk"] = self["webpackChunk"] || []).push([[72570,73726],{
/***/ 88639:
/*!******************************************************!*\
!*** ./src/components/AuthenticationModel/index.tsx ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ 87167);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var _excluded = ["shixunsDetail", "globalSetting", "loading", "dispatch"];
var AuthModal = function AuthModal(_ref) {
var shixunsDetail = _ref.shixunsDetail,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
props = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_0___default()(_ref, _excluded);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
centered: true,
keyboard: false,
closable: false,
zIndex: 6666,
title: "\u63D0\u793A",
open: shixunsDetail.actionTabs.key === 'Banner-Auth',
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
onOk: function onOk() {
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {}
});
window.location.href = '/account/certification';
},
onCancel: function onCancel() {
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {}
});
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("p", {
className: "tc font16",
children: ["\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("br", {}), "\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"]
})
});
};
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_2__.connect)(function (_ref2) {
var shixunsDetail = _ref2.shixunsDetail,
loading = _ref2.loading,
globalSetting = _ref2.globalSetting;
return {
shixunsDetail: shixunsDetail,
globalSetting: globalSetting,
loading: loading.models.index
};
})(AuthModal));
/***/ }),
/***/ 69925:
/*!*********************************************!*\
!*** ./src/components/UploadFile/index.tsx ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ cT: function() { return /* binding */ uploadFile; },
/* harmony export */ pe: function() { return /* binding */ decrypt; }
/* harmony export */ });
/* unused harmony exports reNameFile, UploadFile */
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd */ 46651);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/fetch */ 91203);
/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! crypto-js */ 28209);
/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(crypto_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! uuid */ 1012);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! umi */ 87167);
/* harmony import */ var ali_oss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ali-oss */ 75264);
/* harmony import */ var ali_oss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ali_oss__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var _excluded = ["user", "cancelUpload"];
var Dragger = antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z.Dragger;
var decrypt = function decrypt(word) {
var ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b";
var IV = "5183666c72eec9e4";
var key = crypto_js__WEBPACK_IMPORTED_MODULE_8___default().enc.Utf8.parse(ENC_KEY);
var iv = crypto_js__WEBPACK_IMPORTED_MODULE_8___default().enc.Utf8.parse(IV);
var decrypt = crypto_js__WEBPACK_IMPORTED_MODULE_8___default().AES.decrypt(word, key, {
iv: iv,
mode: (crypto_js__WEBPACK_IMPORTED_MODULE_8___default().mode).CBC
// padding: CryptoJS.pad.ZeroPadding
});
return decrypt.toString((crypto_js__WEBPACK_IMPORTED_MODULE_8___default().enc).Utf8);
};
var tempCheckpoint;
// 重命名
var reNameFile = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
var _res$data, _res$data2, _res$data3, _res$data4, _res$data5, _res$data6;
var identifier, oldFilename, newFilename, res, client;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
identifier = _ref.identifier, oldFilename = _ref.oldFilename, newFilename = _ref.newFilename;
_context.next = 3;
return Fetch('/api/buckets/get_upload_token_for_big_files.json', {
method: "get"
});
case 3:
res = _context.sent;
res.data = JSON.parse(decrypt(res.data));
client = new OSS({
endpoint: res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.end_point,
region: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.region,
accessKeyId: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.access_key_id,
accessKeySecret: res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.access_key_secret,
bucket: res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.bucket,
stsToken: res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.security_token
});
return _context.abrupt("return", new Promise(function (resolve, reject) {
console.log(11111, "".concat(identifier, "/").concat(oldFilename), "".concat(identifier, "/").concat(newFilename), res.data);
client.copy("/".concat(identifier, "/").concat(oldFilename), "/".concat(identifier, "/").concat(newFilename)).then(function (r) {
console.log('拷贝成功', r);
// client
// .delete(`${identifier}/${oldFilename}`)
// .then(r => console.log(r))
// .catch(e => console.log(e));
})["catch"](function (e) {
console.log(e);
// debugger
});
}));
case 7:
case "end":
return _context.stop();
}
}, _callee);
}));
return function reNameFile(_x) {
return _ref2.apply(this, arguments);
};
}()));
var uploadFile = /*#__PURE__*/function () {
var _ref3 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().mark(function _callee2(file, obj, config) {
var _res$data7, _res$data8, _res$data9, _res$data10, _res$data11, _res$data12;
var res, namearrs, name, client;
return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
obj.file_name = file.name;
_context2.next = 3;
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP)('/api/buckets/get_upload_token.json', {
method: "get"
});
case 3:
res = _context2.sent;
console.log("decrypt(res.data):", decrypt(res.data));
res.data = JSON.parse(decrypt(res.data));
namearrs = file.name.split(".");
namearrs.pop();
name = obj.realFileName ? namearrs.join("") : (0,uuid__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z)(); // const name = file.name
client = new (ali_oss__WEBPACK_IMPORTED_MODULE_11___default())({
endpoint: res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.end_point,
region: res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.region,
accessKeyId: res === null || res === void 0 || (_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : _res$data9.access_key_id,
accessKeySecret: res === null || res === void 0 || (_res$data10 = res.data) === null || _res$data10 === void 0 ? void 0 : _res$data10.access_key_secret,
bucket: res === null || res === void 0 || (_res$data11 = res.data) === null || _res$data11 === void 0 ? void 0 : _res$data11.bucket,
stsToken: res === null || res === void 0 || (_res$data12 = res.data) === null || _res$data12 === void 0 ? void 0 : _res$data12.security_token
});
return _context2.abrupt("return", new Promise(function (resolve, reject) {
var _res$data13;
client.multipartUpload("".concat(name), new Blob([file], {
type: file.type
}), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3___default()({
timeout: 200 * 1000,
partSize: 102400
}, config), {}, {
callback: {
url: res === null || res === void 0 || (_res$data13 = res.data) === null || _res$data13 === void 0 ? void 0 : _res$data13.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,_utils_fetch__WEBPACK_IMPORTED_MODULE_7__/* .parseParams */ .rz)(obj)
// body: 'bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&login=' + obj.login + '&container_id=' + obj.container_id + '&container_type='+obj.container_type,
}
})).then(function (result) {
var _result$data;
file.response = (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.data;
resolve(result === null || result === void 0 ? void 0 : result.data);
})["catch"](function (err) {
reject(err);
console.log("err:", err);
});
}));
case 11:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function uploadFile(_x2, _x3, _x4) {
return _ref3.apply(this, arguments);
};
}();
var UploadFile = function UploadFile(_ref4) {
var user = _ref4.user,
cancelUpload = _ref4.cancelUpload,
props = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2___default()(_ref4, _excluded);
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)([]),
_useState2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
fileList = _useState2[0],
setFileList = _useState2[1];
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(),
_useState4 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2),
client = _useState4[0],
setClient = _useState4[1];
var _props = {
onRemove: function onRemove(e) {
setFileList(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default()(fileList.filter(function (item) {
return item.name !== e.name;
})));
props.onChange(fileList.filter(function (item) {
return item.name !== e.name;
}));
},
disabled: props.disabled,
multiple: true,
fileList: fileList === null || fileList === void 0 ? void 0 : fileList.map(function (item) {
return item.file;
}),
customRequest: function customRequest() {},
beforeUpload: function () {
var _beforeUpload = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().mark(function _callee3(file) {
var fileSize;
return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
fileSize = props.maxSize || 1024 * 1024 * 1024 * 1;
if (!fileList.filter(function (item) {
return item.name === file.name;
}).length) {
_context3.next = 4;
break;
}
antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP.info("".concat(file.name, "\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9"));
return _context3.abrupt("return");
case 4:
if (!((file === null || file === void 0 ? void 0 : file.size) > fileSize)) {
_context3.next = 7;
break;
}
antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP.info("\u6587\u4EF6\u8D85\u8FC7".concat(fileSize / 1024 / 1024 / 1024, "GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"));
return _context3.abrupt("return", false);
case 7:
fileList.push({
name: file.name,
file: file
});
setFileList(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default()(fileList));
props.onChange(fileList);
return _context3.abrupt("return", false);
case 11:
case "end":
return _context3.stop();
}
}, _callee3);
}));
function beforeUpload(_x5) {
return _beforeUpload.apply(this, arguments);
}
return beforeUpload;
}()
};
var _uploadFiles = /*#__PURE__*/function () {
var _ref5 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().mark(function _callee4(file, obj) {
var _res$data14, _res$data15, _res$data16, _res$data17, _res$data18, _res$data19;
var name, res, namearrs, filename;
return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
obj.file_name = file.name;
name = file.name;
_context4.next = 4;
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP)('/api/buckets/get_upload_token_for_big_files.json', {
method: "get"
});
case 4:
res = _context4.sent;
res.data = JSON.parse(decrypt(res.data));
if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) {
_context4.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';
props.onChange(fileList);
antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP.warning("上传失败,请重新尝试");
return _context4.abrupt("return");
case 12:
client = new (ali_oss__WEBPACK_IMPORTED_MODULE_11___default())({
endpoint: res === null || res === void 0 || (_res$data14 = res.data) === null || _res$data14 === void 0 ? void 0 : _res$data14.end_point,
region: res === null || res === void 0 || (_res$data15 = res.data) === null || _res$data15 === void 0 ? void 0 : _res$data15.region,
accessKeyId: res === null || res === void 0 || (_res$data16 = res.data) === null || _res$data16 === void 0 ? void 0 : _res$data16.access_key_id,
accessKeySecret: res === null || res === void 0 || (_res$data17 = res.data) === null || _res$data17 === void 0 ? void 0 : _res$data17.access_key_secret,
bucket: res === null || res === void 0 || (_res$data18 = res.data) === null || _res$data18 === void 0 ? void 0 : _res$data18.bucket,
stsToken: res === null || res === void 0 || (_res$data19 = res.data) === null || _res$data19 === void 0 ? void 0 : _res$data19.security_token
});
console.log(file, 'file');
setClient(client);
// const filename = uuidv4()
namearrs = file.name.split(".");
namearrs.pop();
filename = obj.realFileName ? namearrs.join(".") : (0,uuid__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z)();
return _context4.abrupt("return", new Promise(function (resolve, reject) {
try {
var _res$data20;
client.multipartUpload("".concat(props.identifier, "/").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);
var index = fileList.findIndex(function (item) {
return item.name === name;
});
fileList[index]['file']['percent'] = p * 100;
// if (p === 1) {
// fileList[index]['status'] = 'done'
// fileList[index]['file']['status'] = 'done'
// props.onChange(fileList)
// }
fileList[index].tempCheckpoint = checkpoint;
setFileList(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___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$data20 = res.data) === null || _res$data20 === void 0 ? void 0 : _res$data20.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,_utils_fetch__WEBPACK_IMPORTED_MODULE_7__/* .parseParams */ .rz)(obj)
}
}).then(function (result) {
var _result$data2;
var index = fileList.findIndex(function (item) {
return item.name === name;
});
var status = 'done';
if (((_result$data2 = result.data) === null || _result$data2 === void 0 ? void 0 : _result$data2.status) === 0) {
var _result$data3;
file.response = (_result$data3 = result.data) === null || _result$data3 === void 0 ? void 0 : _result$data3.data;
var _index = fileList.findIndex(function (item) {
return item.name === name;
});
fileList[_index]['status'] = 'done';
fileList[_index]['file']['status'] = 'done';
} else {
var _result$data4;
antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP.warning((_result$data4 = result.data) === null || _result$data4 === void 0 ? void 0 : _result$data4.message);
status = 'error';
}
fileList[index]['status'] = status;
fileList[index]['file']['status'] = status;
props.onChange(fileList);
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';
antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP.warning("上传失败,请重新尝试");
setFileList(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default()(fileList));
props.onChange(fileList);
reject(err);
console.log("err:", err);
});
} catch (e) {
// debugger
}
}));
case 19:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return function _uploadFiles(_x6, _x7) {
return _ref5.apply(this, arguments);
};
}();
(0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(function () {
if (fileList.every(function (item) {
return item === 'done' || item === 'error';
})) {
props.onComplete(fileList);
}
}, [fileList]);
(0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(function () {
if (cancelUpload) {
var _client;
(_client = client) === null || _client === void 0 || _client.cancel();
}
}, [cancelUpload]);
(0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(function () {
if (props.uploading) fileList.map( /*#__PURE__*/function () {
var _ref6 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_5___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().mark(function _callee5(item) {
var _user$userInfo, res;
return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_4___default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
if (!((!item.status || item.status === 'error') && !cancelUpload)) {
_context5.next = 6;
break;
}
item.status = 'uploading';
item.file.status = 'uploading';
_context5.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: props.container_type,
container_id: props.container_id,
description: props.description,
realFileName: props.realFileName
});
case 5:
res = _context5.sent;
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return function (_x8) {
return _ref6.apply(this, arguments);
};
}());
}, [props.uploading]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(Dragger, _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3___default()({}, _props), {}, {
height: props.height,
className: props.className,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("p", {
className: "ant-upload-hint",
children: props.text || '拖拽文件或者点击上传'
})
}));
};
/* harmony default export */ __webpack_exports__.ZP = ((0,umi__WEBPACK_IMPORTED_MODULE_9__.connect)(function (_ref7) {
var loading = _ref7.loading,
globalSetting = _ref7.globalSetting,
user = _ref7.user;
return {
globalSetting: globalSetting,
loading: loading.models.competitions,
user: user
};
})(UploadFile));
/***/ }),
/***/ 3265:
/*!**************************************************************!*\
!*** ./src/pages/Competitions/Detail/index.tsx + 25 modules ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Detail; }
});
// 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/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(39647);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
// 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__(87167);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___fo_3c","flex_space_between":"flex_space_between___G46CO","flex_box_vertical_center":"flex_box_vertical_center___br3Kr","flex_box_center_end":"flex_box_center_end___Xdo94","flex_box_column":"flex_box_column___Bcnmr","wrp":"wrp___TY7QJ","bg":"bg___xiaSy","commonimg":"commonimg___a4R0Q","titlesize":"titlesize___Wdd_a","timesize":"timesize___OkfYO","flex1":"flex1___N6paY","buttonsize":"buttonsize___syL9V","myteam":"myteam___RTWAt","bootmdetail":"bootmdetail___taUGk","flex6":"flex6___RuzJ4","menuItem":"menuItem___Kww4S","spanprev":"spanprev___Cssg_","spannext":"spannext___jVFGE","divwidth":"divwidth___r5hE3","receiveclick":"receiveclick___BauOs","receivealready":"receivealready___Z7Wo0","bkfff":"bkfff___lHrcJ","ant-input":"ant-input___m4bn_","onediv":"onediv___xzZRa","onetop":"onetop___M4GfM","towdiv":"towdiv___yj3ds","towtop":"towtop___veKa4","threediv":"threediv___Ztz0D","threetop":"threetop___zDXIg","imgradius":"imgradius___r4uGN","prize":"prize___YNRD4","spanrightradius":"spanrightradius___tC6T5","bottomItem":"bottomItem___CHcMJ","myTeam":"myTeam___fm7KX","downloadpdf":"downloadpdf___a2NuA","teamItem":"teamItem___mx2f3","dash":"dash___l6QH1","modal":"modal___yXh2H"});
// EXTERNAL MODULE: ./src/components/AuthenticationModel/index.tsx
var AuthenticationModel = __webpack_require__(88639);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(46651);
// 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/modal/index.js + 16 modules
var es_modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules
var InboxOutlined = __webpack_require__(93737);
// EXTERNAL MODULE: ./src/components/UploadFile/index.tsx
var UploadFile = __webpack_require__(69925);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/AddSubmitModel.tsx
var Dragger = upload/* default */.Z.Dragger;
var ShixunsListPage = function ShixunsListPage(_ref) {
var user = _ref.user,
dispatch = _ref.dispatch,
classroomList = _ref.classroomList,
shixunsDetail = _ref.shixunsDetail,
getResults = _ref.getResults;
var params = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
time = _useState2[0],
setTime = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 2),
fileList = _useState4[0],
setFileList = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
confirmLoading = _useState6[0],
setConfirmLoading = _useState6[1];
var props = {
onRemove: function onRemove() {
setFileList([]);
},
beforeUpload: function beforeUpload(file) {
console.log(file);
if ((file === null || file === void 0 ? void 0 : file.size) > 1024 * 1024 * 500) {
message/* default */.ZP.info('文件超过500M不符合上传要求');
return false;
}
var filelist = [];
filelist.push(file);
setFileList([].concat(filelist));
return false;
},
fileList: fileList
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
title: "\u63D0\u4EA4\u6587\u4EF6",
visible: shixunsDetail.actionTabs.key === 'md-tab',
confirmLoading: confirmLoading,
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _user$userInfo, _fileList$;
var resulr;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!((fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 0)) {
_context.next = 3;
break;
}
message/* default */.ZP.info('请先选择文件');
return _context.abrupt("return");
case 3:
setConfirmLoading(true);
_context.next = 6;
return (0,UploadFile/* uploadFile */.cT)(fileList[0], {
login: (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login,
container_type: "Competition",
container_id: shixunsDetail.actionTabs.params.id,
stage_type: shixunsDetail.actionTabs.params.value,
file_name: (_fileList$ = fileList[0]) === null || _fileList$ === void 0 ? void 0 : _fileList$.name
});
case 6:
resulr = _context.sent;
if ((resulr === null || resulr === void 0 ? void 0 : resulr.status) === 0) {
message/* default */.ZP.info('提交成功');
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {
key: ''
}
});
setConfirmLoading(false);
setFileList([]);
getResults(shixunsDetail.actionTabs.params.value);
} else {
setConfirmLoading(false);
message/* default */.ZP.info('提交失败');
}
case 8:
case "end":
return _context.stop();
}
}, _callee);
})),
onCancel: function onCancel() {
setFileList([]);
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {
key: ''
}
});
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(Dragger, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: "ant-upload-drag-icon",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(InboxOutlined/* default */.Z, {})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: "ant-upload-hint",
children: "\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"
})]
}))
});
};
/* harmony default export */ var AddSubmitModel = ((0,_umi_production_exports.connect)(function (_ref3) {
var user = _ref3.user,
classroomList = _ref3.classroomList,
shixunsDetail = _ref3.shixunsDetail;
return {
user: user,
classroomList: classroomList,
shixunsDetail: shixunsDetail
};
})(ShixunsListPage));
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
var breadcrumb = __webpack_require__(66104);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
var menu = __webpack_require__(20834);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
var RenderHtml = __webpack_require__(7118);
// 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/input/index.js + 5 modules
var input = __webpack_require__(98135);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(44394);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(91203);
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
var verifyLogin = __webpack_require__(54808);
// 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/carousel/index.js + 10 modules
var carousel = __webpack_require__(9951);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules
var LeftOutlined = __webpack_require__(11407);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/RightOutlined.js + 1 modules
var RightOutlined = __webpack_require__(88845);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/Competitionbonus.tsx
//代金劵
var Option = es_select["default"].Option;
function Bonus(_ref) {
var rewarddata = _ref.rewarddata,
getlistdatas = _ref.getlistdatas,
is_signed = _ref.is_signed,
dispatch = _ref.dispatch,
userlist = _ref.userlist;
var Carousels = (0,_react_17_0_2_react.useRef)(null);
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isshow = _useState2[0],
SetIsshow = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(undefined),
_useState4 = slicedToArray_default()(_useState3, 2),
className = _useState4[0],
SetClassname = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(''),
_useState6 = slicedToArray_default()(_useState5, 2),
id = _useState6[0],
SetId = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(undefined),
_useState8 = slicedToArray_default()(_useState7, 2),
name = _useState8[0],
SetName = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(undefined),
_useState10 = slicedToArray_default()(_useState9, 2),
email = _useState10[0],
SetEmail = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(undefined),
_useState12 = slicedToArray_default()(_useState11, 2),
phone = _useState12[0],
SetPhone = _useState12[1];
function receive(_x) {
return _receive.apply(this, arguments);
}
function _receive() {
_receive = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(item) {
var result;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!item.user_received) {
_context.next = 3;
break;
}
window.open(item.click_info);
return _context.abrupt("return");
case 3:
if ((0,verifyLogin/* handleVerifyLogin */.o1)(dispatch)) {
_context.next = 5;
break;
}
return _context.abrupt("return");
case 5:
if (!(is_signed === false)) {
_context.next = 8;
break;
}
message/* default */.ZP.info('您尚未报名参赛,请报名参赛后领取');
return _context.abrupt("return");
case 8:
if (!(item.click_event === "Pop")) {
_context.next = 14;
break;
}
SetId(item.id);
SetIsshow(true);
return _context.abrupt("return");
case 14:
SetClassname(undefined);
case 15:
_context.next = 17;
return dispatch({
type: 'competitions/Reward',
payload: {
competition_module_setting_id: item.id
}
});
case 17:
result = _context.sent;
if (result && result.status === 0) {
getlistdatas();
if (item.click_event === "Link") {
message/* default */.ZP.info('领取成功');
window.open(item.click_info);
} else {
message/* default */.ZP.info(item.click_info);
}
}
case 19:
case "end":
return _context.stop();
}
}, _callee);
}));
return _receive.apply(this, arguments);
}
function submitreceive() {
return _submitreceive.apply(this, arguments);
}
function _submitreceive() {
_submitreceive = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var result;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(userlist && !userlist.real_name)) {
_context2.next = 4;
break;
}
if (name) {
_context2.next = 4;
break;
}
message/* default */.ZP.info('姓名不能为空');
return _context2.abrupt("return");
case 4:
if (!(userlist && !userlist.email)) {
_context2.next = 8;
break;
}
if (email) {
_context2.next = 8;
break;
}
message/* default */.ZP.info('邮箱不能为空');
return _context2.abrupt("return");
case 8:
if (!(userlist && !userlist.phone)) {
_context2.next = 12;
break;
}
if (phone) {
_context2.next = 12;
break;
}
message/* default */.ZP.info('手机号码不能为空');
return _context2.abrupt("return");
case 12:
if (className) {
_context2.next = 15;
break;
}
message/* default */.ZP.info('请选择你的年级');
return _context2.abrupt("return");
case 15:
_context2.next = 17;
return dispatch({
type: 'competitions/Reward',
payload: {
competition_module_setting_id: id,
className: className,
name: name,
mail: email,
phone: phone
}
});
case 17:
result = _context2.sent;
if (result && result.status === 0) {
SetIsshow(false);
getlistdatas();
message/* default */.ZP.info('HCIA认证考试代金劵将由启智平台统一发放请及时关注邮箱或站内短信查收');
}
case 19:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _submitreceive.apply(this, arguments);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
visible: isshow,
title: '完善信息',
onCancel: function onCancel() {
return SetIsshow(false);
},
onOk: function onOk() {
submitreceive();
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u60A8\u7684\u59D3\u540D\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
className: userlist && userlist.real_name ? '' : Detailmodules.bkfff,
style: {
width: '300px',
marginLeft: '14px',
background: userlist && userlist.phone ? '' : '#ffffff!important'
},
value: userlist && userlist.real_name || name,
disabled: userlist && userlist.real_name || false,
onChange: function onChange(e) {
return SetName(e.target.value);
}
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginTop: '1em'
},
children: ["\u60A8\u7684\u90AE\u7BB1\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
className: userlist && userlist.email ? '' : "bkfff",
style: {
width: '300px',
marginLeft: '14px',
background: userlist && userlist.phone ? '' : '#ffffff!important'
},
value: userlist && userlist.email || email,
disabled: userlist && userlist.email || false,
onChange: function onChange(e) {
return SetEmail(e.target.value);
}
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginTop: '1em'
},
children: ["\u60A8\u7684\u624B\u673A\u53F7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
width: '300px'
},
className: userlist && userlist.phone ? '' : "bkfff",
value: userlist && userlist.phone || phone,
disabled: userlist && userlist.phone || false,
onChange: function onChange(e) {
return SetPhone(e.target.value);
}
})]
}), "\u60A8\u7684\u5E74\u7EA7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: '300px',
marginTop: '1em',
marginLeft: '14px'
},
onChange: function onChange(e) {
SetClassname(e);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u5927\u4E00",
children: "\u5927\u4E00"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u5927\u4E8C",
children: "\u5927\u4E8C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u5927\u4E09",
children: "\u5927\u4E09"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u5927\u56DB",
children: "\u5927\u56DB"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u5927\u4E94",
children: "\u5927\u4E94"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u7855\u4E00",
children: "\u7855\u4E00"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u7855\u4E8C",
children: "\u7855\u4E8C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u7855\u4E09",
children: "\u7855\u4E09"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u535A\u4E00",
children: "\u535A\u4E00"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u535A\u4E8C",
children: "\u535A\u4E8C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u535A\u4E09",
children: "\u535A\u4E09"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u535A\u56DB",
children: "\u535A\u56DB"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "\u535A\u4E94",
children: "\u535A\u4E94"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
marginTop: '1em'
},
children: "\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01"
})]
}), rewarddata && rewarddata.length > 3 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
position: 'relative',
marginBottom: '10px',
marginTop: '10px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Detailmodules.spanprev,
onClick: function onClick() {
Carousels.current.prev();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(LeftOutlined/* default */.Z, {
style: {
color: '#fff',
fontSize: '20px',
marginLeft: "15px"
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(carousel/* default */.Z, {
ref: Carousels,
className: Detailmodules.divwidth,
slidesToShow: 3,
slidesToScroll: 1,
children: rewarddata && rewarddata.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
textAlign: 'center',
position: 'relative'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + "/".concat(item.image_url)
}), item.user_received === false || item.click_event === "Link" ? /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.receiveclick,
onClick: function onClick() {
return receive(item);
},
children: "\u70B9\u51FB\u9886\u53D6"
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.receivealready,
children: "\u5DF2\u7ECF\u9886\u53D6"
})]
});
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Detailmodules.spannext,
onClick: function onClick() {
Carousels.current.next();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RightOutlined/* default */.Z, {
style: {
color: '#fff',
fontSize: '20px',
marginLeft: "5px"
}
})
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Detailmodules.divwidth,
style: {
justifyContent: 'space-around',
marginBottom: '10px',
marginTop: '10px'
},
children: rewarddata && rewarddata.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
textAlign: 'center',
position: 'relative'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + "/".concat(item.image_url)
}), item.user_received === false || item.click_event === "Link" ? /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.receiveclick,
onClick: function onClick() {
return receive(item);
},
children: "\u70B9\u51FB\u9886\u53D6"
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.receivealready,
children: "\u5DF2\u7ECF\u9886\u53D6"
})]
});
})
})]
});
}
/* harmony default export */ var Competitionbonus = (Bonus);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/SeeItem.tsx
//代金劵
var SeeItem = function SeeItem(_ref, ref) {
var StaffDetail = _ref.StaffDetail,
HeaderDetail = _ref.HeaderDetail,
ItemData = _ref.ItemData,
setIssee = _ref.setIssee,
ModelType = _ref.ModelType,
dispatch = _ref.dispatch,
userinfo = _ref.userinfo,
Editable = _ref.Editable,
qs = _ref.qs;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
visible = _useState2[0],
setVisible = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 2),
fileList = _useState4[0],
setFileList = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(''),
_useState6 = slicedToArray_default()(_useState5, 2),
fileId = _useState6[0],
setFileId = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(''),
_useState8 = slicedToArray_default()(_useState7, 2),
text = _useState8[0],
setText = _useState8[1];
// const [disabled, setDisable] = useState(false)
var _useState9 = (0,_react_17_0_2_react.useState)(false),
_useState10 = slicedToArray_default()(_useState9, 2),
loading = _useState10[0],
setLoading = _useState10[1];
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
var enrolled = (0,_react_17_0_2_react.useRef)(null);
var dom = (0,_react_17_0_2_react.useRef)(null);
enrolled.current = StaffDetail === null || StaffDetail === void 0 ? void 0 : StaffDetail.enrolled;
(0,_react_17_0_2_react.useEffect)(function () {
var _dom$current;
(_dom$current = dom.current) === null || _dom$current === void 0 || _dom$current.addEventListener("click", modal);
return function () {
var _dom$current2;
(_dom$current2 = dom.current) === null || _dom$current2 === void 0 || _dom$current2.removeEventListener("click", modal);
};
}, []);
// useEffect(() => {
// if (visible || fileList.length) {
// setDisable(true)
// }
// }, [visible])
var modal = function modal(e) {
var _e$target;
// 检查事件源e.targe是否为Li
if ((e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.id) === 'modal-upload') {
if (!(0,verifyLogin/* handleVerify */.tJ)(dispatch)) {
return;
}
if (!enrolled.current) {
es_modal/* default */.Z.info({
title: '提示',
centered: true,
okText: '我知道了',
content: '请先报名,再提交作品'
});
return;
}
setVisible(true);
}
};
(0,_react_17_0_2_react.useEffect)(function () {
if (HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.upload_file) {
var _HeaderDetail$upload_, _HeaderDetail$upload_2;
setFileList([{
name: HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$upload_ = HeaderDetail.upload_file) === null || _HeaderDetail$upload_ === void 0 ? void 0 : _HeaderDetail$upload_.title,
status: 'done',
uid: '123456789'
}]);
setText(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.upload_file_url);
setFileId(HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$upload_2 = HeaderDetail.upload_file) === null || _HeaderDetail$upload_2 === void 0 || (_HeaderDetail$upload_2 = _HeaderDetail$upload_2.url) === null || _HeaderDetail$upload_2 === void 0 ? void 0 : _HeaderDetail$upload_2.split('/')[3]);
}
}, [HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.upload_file]);
var uploadProps = {
name: 'file',
multiple: false,
withCredentials: true,
// accept: ".doc, .docx, .pdf",
// action: '/api/attachments.json',
action: env/* default */.Z.API_SERVER + '/api/attachments.json',
showUploadList: {
showRemoveIcon: false
},
fileList: fileList,
onChange: function onChange(info) {
var status = info.file.status;
var newFileList = [objectSpread2_default()({}, info.file)];
setFileList(newFileList);
if (info.file.status === 'uploading') {
setLoading(true);
}
if (status === 'done') {
var _newFileList$;
setFileId((_newFileList$ = newFileList[0]) === null || _newFileList$ === void 0 || (_newFileList$ = _newFileList$.response) === null || _newFileList$ === void 0 ? void 0 : _newFileList$.id);
setLoading(false);
// setDisable(false)
}
if (status === 'error') {
setFileList([]);
setLoading(false);
}
},
beforeUpload: function beforeUpload(file) {
var isLt10M = file.size / 1024 / 1024 < 1000;
if (!isLt10M) {
message/* default */.ZP.info("文件大小必须小于1000MB");
return Promise.reject();
}
// if (!/\.(doc|docx|pdf|DOC|DOCX|PDF)$/.test(file.name)) {
// message.warn('只能上传Word或PDF文件')
// return Promise.reject();
// }
return Promise.resolve();
}
};
var handleVisible = function handleVisible() {
setVisible(true);
};
(0,_react_17_0_2_react.useImperativeHandle)(ref, function () {
return {
handleVisible: handleVisible
};
});
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
ref: dom,
children: [ModelType === "reward" ? /*#__PURE__*/(0,jsx_runtime.jsx)(Competitionbonus, {
userlist: userinfo,
dispatch: dispatch,
rewarddata: ItemData.reward_setting,
is_signed: ItemData.is_signed
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
textAlign: 'right'
},
children: ((userinfo === null || userinfo === void 0 ? void 0 : userinfo.admin) || (userinfo === null || userinfo === void 0 ? void 0 : userinfo.business) || Editable) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
onClick: function onClick() {
return setIssee(false);
},
children: qs['编辑']
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: qs.isChinese ? ItemData.md_content : ItemData.md_english_content
}), ItemData && ItemData.attachments && ItemData.attachments.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: (env/* default */.Z === null || env/* default */.Z === void 0 ? void 0 : env/* default */.Z.API_SERVER) + item.url,
target: "_self",
download: item.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
style: {
color: '#29BD8B'
},
className: "font-14 color-green iconfont icon-fujian mr8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000000'
},
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000000',
marginLeft: '10px'
},
children: item.filesize
})]
})
});
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
centered: true,
title: "\u4E0A\u4F20\u4F5C\u54C1",
visible: visible,
okText: "\u63D0\u4EA4\u4F5C\u54C1",
cancelText: "\u53D6\u6D88",
confirmLoading: loading,
onCancel: function onCancel() {
return setVisible(false);
},
onOk: /*#__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:
if (!(!fileId && !text)) {
_context.next = 3;
break;
}
setVisible(false);
return _context.abrupt("return");
case 3:
// if (disabled) {
// setVisible(false)
// return;
// }
setLoading(true);
_context.next = 6;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/upload_file.json"), {
method: 'post',
body: {
attachment_id: fileId,
upload_file_url: text
}
});
case 6:
res = _context.sent;
if (res.status === 0) {
setVisible(false);
setLoading(false);
}
case 8:
case "end":
return _context.stop();
}
}, _callee);
})),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: "mb20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u4F5C\u54C1\u94FE\u63A5\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
width: 416
},
value: text,
onChange: function onChange(e) {
var _e$target2;
return setText((_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value);
}
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "top",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
lineHeight: '28px'
},
children: "\u4F5C\u54C1\u6587\u4EF6\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
className: "mb10",
children: "\u4E0A\u4F20\u4F5C\u54C1"
})
}))]
})]
})
})]
});
};
/* harmony default export */ var Detail_SeeItem = (/*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(SeeItem));
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(89485);
// EXTERNAL MODULE: ./src/service/competitions.ts
var competitions = __webpack_require__(34248);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/Update.tsx
function Update_SeeItem(_ref) {
var ItemData = _ref.ItemData,
setIssee = _ref.setIssee,
MenuItem = _ref.MenuItem,
dispatch = _ref.dispatch,
identifier = _ref.identifier,
ModelType = _ref.ModelType,
userinfo = _ref.userinfo,
getrightdatas = _ref.getrightdatas,
qs = _ref.qs;
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
defaultFileList = _useState2[0],
setDefaultFileList = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(qs.isChinese ? ItemData.md_content : ItemData.md_english_content),
_useState4 = slicedToArray_default()(_useState3, 2),
defaultcontent = _useState4[0],
setDefaultcontent = _useState4[1];
(0,_react_17_0_2_react.useEffect)(function () {
var _ItemData$attachments;
var data = [];
ItemData === null || ItemData === void 0 || (_ItemData$attachments = ItemData.attachments) === null || _ItemData$attachments === void 0 || _ItemData$attachments.map(function (item) {
var tt = {
uid: item.id,
name: item.title,
response: {
id: item.id
}
};
data.push(tt);
});
setDefaultFileList(data);
}, [ItemData === null || ItemData === void 0 ? void 0 : ItemData.attachments]);
function getdata() {
var _ItemData$attachments2;
var data = [];
ItemData === null || ItemData === void 0 || (_ItemData$attachments2 = ItemData.attachments) === null || _ItemData$attachments2 === void 0 || _ItemData$attachments2.map(function (item) {
var tt = {
uid: item === null || item === void 0 ? void 0 : item.id,
name: item.title,
response: {
id: item.id
}
};
data.push(tt);
});
return data;
}
var uploadProps = {
name: 'file',
multiple: true,
withCredentials: true,
action: env/* default */.Z.API_SERVER + '/api/attachments.json',
defaultFileList: getdata(),
onRemove: function onRemove(e) {
var _e$response;
if (e !== null && e !== void 0 && (_e$response = e.response) !== null && _e$response !== void 0 && _e$response.id) {
var _e$response2;
(0,competitions/* deletAttachments */.y8)({
id: e === null || e === void 0 || (_e$response2 = e.response) === null || _e$response2 === void 0 ? void 0 : _e$response2.id
});
}
},
onChange: function onChange(info) {
var status = info.file.status;
if (status !== 'uploading') {}
if (status === 'removed') {
setDefaultFileList(info.fileList);
}
if (status === 'done') {
setDefaultFileList(info.fileList);
message/* default */.ZP.success("".concat(info.file.name, " \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"));
} else if (status === 'error') {
message/* default */.ZP.error("".concat(info.file.name, " \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"));
}
},
beforeUpload: function beforeUpload(file) {
var isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) {
message/* default */.ZP.info("文件大小必须小于150MB");
}
return isLt150M;
}
};
console.log(uploadProps);
//修改内容回调接口
function updateItem() {
return _updateItem.apply(this, arguments);
} //获取对应文件列表
function _updateItem() {
_updateItem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var param, data;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (defaultcontent) {
_context.next = 3;
break;
}
message/* default */.ZP.warn(qs['内容不能为空']);
return _context.abrupt("return");
case 3:
param = {
attachment_ids: getitemid(defaultFileList),
competition_module_id: ItemData.id,
md_content_id: ItemData.md_id,
identifier: identifier
};
if (qs.isChinese) {
param.content = defaultcontent;
} else {
param.english_content = defaultcontent;
}
_context.next = 7;
return dispatch({
type: 'competitions/updateMdContent',
payload: param
});
case 7:
data = _context.sent;
if (data) {
message/* default */.ZP.info(qs['提交成功']);
setIssee(true);
//刷新
getrightdatas(MenuItem);
}
case 9:
case "end":
return _context.stop();
}
}, _callee);
}));
return _updateItem.apply(this, arguments);
}
function getitemid(itemlist) {
var data = [];
itemlist && itemlist.map(function (item) {
data.push(item.response.id);
});
return data;
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [ModelType === "reward" ? /*#__PURE__*/(0,jsx_runtime.jsx)(Competitionbonus, {
userlist: userinfo,
dispatch: dispatch,
rewarddata: ItemData.reward_setting,
is_signed: ItemData.is_signed
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
defaultValue: defaultcontent,
onChange: function onChange(e) {
return setDefaultcontent(e);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "uploadBtn",
children: qs['上传附件']
}), qs['(单个文件150M以内)']]
})), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginTop: '10px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
width: '90px'
},
type: "primary",
onClick: function onClick() {
return updateItem();
},
children: qs['提交']
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
marginLeft: '30px',
width: '90px'
},
onClick: function onClick() {
return setIssee(true);
},
children: qs['取消']
})]
})]
});
}
/* harmony default export */ var Update = (Update_SeeItem);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
var tabs = __webpack_require__(99313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(14491);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/RankingNuLL.tsx
//排行榜没有数据
function RankNull() {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '24px',
color: '#05101a'
},
children: "\u603B\u6392\u884C"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
textAlign: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + "/images/educoder/competitions/trophy.png"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000"
})]
})]
});
}
/* harmony default export */ var RankingNuLL = (RankNull);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
var col = __webpack_require__(43604);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/card/index.js + 4 modules
var card = __webpack_require__(18889);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/RankingItem.tsx
//1 2 3 排名数据样式
function RankingItem(_ref) {
var oneItem = _ref.oneItem,
towItem = _ref.towItem,
threeItem = _ref.threeItem;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
textAlign: "center"
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
gutter: 16,
style: {
justifyContent: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 6,
style: {
marginTop: '30px',
marginRight: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(card/* default */.Z, {
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.towtop,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
marginTop: '20px'
},
src: env/* default */.Z.IMG_SERVER + "/images/educoder/huangguan-two.png"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
marginTop: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/users/".concat(towItem === null || towItem === void 0 ? void 0 : towItem.user_login, "/classrooms"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Detailmodules.imgradius,
src: env/* default */.Z.IMG_SERVER + "/images/".concat(towItem === null || towItem === void 0 ? void 0 : towItem.user_image)
}), (towItem === null || towItem === void 0 ? void 0 : towItem.competition_prize) && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.prize,
children: towItem === null || towItem === void 0 ? void 0 : towItem.competition_prize
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
color: '#05101a',
fontSize: '16px',
marginTop: '10px'
},
children: towItem === null || towItem === void 0 ? void 0 : towItem.record_user_name
})]
})
})]
}),
className: Detailmodules.towdiv,
bordered: false,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '14px'
},
children: towItem === null || towItem === void 0 ? void 0 : towItem.school_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '18px'
},
children: towItem === null || towItem === void 0 ? void 0 : towItem.spend_time
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
fontSize: '26px',
color: '#a55b29'
},
children: [parseFloat(towItem === null || towItem === void 0 ? void 0 : towItem.extra_score) + parseFloat(towItem === null || towItem === void 0 ? void 0 : towItem.score), "\u5206"]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 6,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(card/* default */.Z, {
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.onetop,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
marginTop: '20px'
},
src: env/* default */.Z.IMG_SERVER + "/images/educoder/huangguan.png"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
marginTop: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/users/".concat(oneItem === null || oneItem === void 0 ? void 0 : oneItem.user_login, "/classrooms"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Detailmodules.imgradius,
src: env/* default */.Z.IMG_SERVER + "/images/".concat(oneItem === null || oneItem === void 0 ? void 0 : oneItem.user_image)
}), (oneItem === null || oneItem === void 0 ? void 0 : oneItem.competition_prize) && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.prize,
children: oneItem === null || oneItem === void 0 ? void 0 : oneItem.competition_prize
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
color: '#05101a',
fontSize: '16px',
marginTop: '10px'
},
children: oneItem === null || oneItem === void 0 ? void 0 : oneItem.record_user_name
})]
})
})]
}),
className: Detailmodules.onediv,
bordered: false,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '14px'
},
children: oneItem === null || oneItem === void 0 ? void 0 : oneItem.school_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '18px'
},
children: oneItem === null || oneItem === void 0 ? void 0 : oneItem.spend_time
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
fontSize: '26px',
color: '#a55b29'
},
children: [parseFloat(oneItem === null || oneItem === void 0 ? void 0 : oneItem.extra_score) + parseFloat(oneItem === null || oneItem === void 0 ? void 0 : oneItem.score), "\u5206"]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 6,
style: {
marginTop: '40px',
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(card/* default */.Z, {
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.threetop,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
marginTop: '20px'
},
src: env/* default */.Z.IMG_SERVER + "/images/educoder/huangguan-three.png"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
marginTop: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/users/".concat(threeItem === null || threeItem === void 0 ? void 0 : threeItem.user_login, "/classrooms"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Detailmodules.imgradius,
src: env/* default */.Z.IMG_SERVER + "/images/".concat(threeItem === null || threeItem === void 0 ? void 0 : threeItem.user_image)
}), (threeItem === null || threeItem === void 0 ? void 0 : threeItem.competition_prize) && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.prize,
children: threeItem === null || threeItem === void 0 ? void 0 : threeItem.competition_prize
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
color: '#05101a',
fontSize: '16px',
marginTop: '10px'
},
children: threeItem === null || threeItem === void 0 ? void 0 : threeItem.record_user_name
})]
})
})]
}),
className: Detailmodules.threediv,
bordered: false,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '14px'
},
children: threeItem === null || threeItem === void 0 ? void 0 : threeItem.school_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '18px'
},
children: threeItem === null || threeItem === void 0 ? void 0 : threeItem.spend_time
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
fontSize: '26px',
color: '#a55b29'
},
children: [parseFloat(threeItem === null || threeItem === void 0 ? void 0 : threeItem.extra_score) + parseFloat(threeItem === null || threeItem === void 0 ? void 0 : threeItem.score), "\u5206"]
})]
})
})]
})
});
}
/* harmony default export */ var Detail_RankingItem = (RankingItem);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/RankingList.tsx
function RanKingList(_ref) {
var _ItemData$user_ranks, _ItemData$user_ranks2, _ItemData$user_ranks3, _ItemData$user_ranks4, _ItemData$user_ranks5, _ItemData$user_ranks6, _ItemData$user_ranks7, _ItemData$user_ranks8, _ItemData$user_ranks9, _ItemData$user_ranks10, _ItemData$user_ranks11, _ItemData$user_ranks12, _ItemData$user_ranks13, _ItemData$user_ranks14, _ItemData$user_ranks15, _ItemData$teams;
var ItemData = _ref.ItemData;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
fontSize: '24px',
color: '#05101a'
},
children: "\u603B\u6392\u884C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Detail_RankingItem, {
oneItem: ItemData === null || ItemData === void 0 ? void 0 : ItemData.teams[0],
towItem: ItemData === null || ItemData === void 0 ? void 0 : ItemData.teams[1],
threeItem: ItemData === null || ItemData === void 0 ? void 0 : ItemData.teams[2]
}), (ItemData === null || ItemData === void 0 || (_ItemData$user_ranks = ItemData.user_ranks) === null || _ItemData$user_ranks === void 0 ? void 0 : _ItemData$user_ranks.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.myTeam,
children: [(ItemData === null || ItemData === void 0 || (_ItemData$user_ranks2 = ItemData.user_ranks) === null || _ItemData$user_ranks2 === void 0 || (_ItemData$user_ranks2 = _ItemData$user_ranks2[0]) === null || _ItemData$user_ranks2 === void 0 ? void 0 : _ItemData$user_ranks2.success) === false ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
marginRight: '70px',
padding: '10px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginBottom: '0px'
},
children: [" \u662F\u5426\u664B\u7EA7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
"color": (ItemData === null || ItemData === void 0 || (_ItemData$user_ranks3 = ItemData.user_ranks) === null || _ItemData$user_ranks3 === void 0 || (_ItemData$user_ranks3 = _ItemData$user_ranks3[0]) === null || _ItemData$user_ranks3 === void 0 ? void 0 : _ItemData$user_ranks3.success) === false ? 'red' : 'green'
},
children: (ItemData === null || ItemData === void 0 || (_ItemData$user_ranks4 = ItemData.user_ranks) === null || _ItemData$user_ranks4 === void 0 || (_ItemData$user_ranks4 = _ItemData$user_ranks4[0]) === null || _ItemData$user_ranks4 === void 0 ? void 0 : _ItemData$user_ranks4.success) === false ? '否' : ItemData !== null && ItemData !== void 0 && (_ItemData$user_ranks5 = ItemData.user_ranks) !== null && _ItemData$user_ranks5 !== void 0 && (_ItemData$user_ranks5 = _ItemData$user_ranks5[0]) !== null && _ItemData$user_ranks5 !== void 0 && _ItemData$user_ranks5.success ? '是' : ''
})]
}), (ItemData === null || ItemData === void 0 || (_ItemData$user_ranks6 = ItemData.user_ranks) === null || _ItemData$user_ranks6 === void 0 || (_ItemData$user_ranks6 = _ItemData$user_ranks6[0]) === null || _ItemData$user_ranks6 === void 0 ? void 0 : _ItemData$user_ranks6.awards) && /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginBottom: '0px'
},
children: [" \u662F\u5426\u83B7\u5956\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (ItemData === null || ItemData === void 0 || (_ItemData$user_ranks7 = ItemData.user_ranks) === null || _ItemData$user_ranks7 === void 0 || (_ItemData$user_ranks7 = _ItemData$user_ranks7[0]) === null || _ItemData$user_ranks7 === void 0 ? void 0 : _ItemData$user_ranks7.awards) === 'percent_20' ? '二等奖' : (ItemData === null || ItemData === void 0 || (_ItemData$user_ranks8 = ItemData.user_ranks) === null || _ItemData$user_ranks8 === void 0 || (_ItemData$user_ranks8 = _ItemData$user_ranks8[0]) === null || _ItemData$user_ranks8 === void 0 ? void 0 : _ItemData$user_ranks8.awards) === 'percent_30' ? '三等奖' : '没有获得奖项'
})]
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
marginRight: '70px'
},
children: ["\u6211\u7684\u6392\u540D\uFF1A", ItemData === null || ItemData === void 0 || (_ItemData$user_ranks9 = ItemData.user_ranks) === null || _ItemData$user_ranks9 === void 0 || (_ItemData$user_ranks9 = _ItemData$user_ranks9[0]) === null || _ItemData$user_ranks9 === void 0 ? void 0 : _ItemData$user_ranks9.rank]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u6218\u961F\u540D",
children: ItemData === null || ItemData === void 0 || (_ItemData$user_ranks10 = ItemData.user_ranks) === null || _ItemData$user_ranks10 === void 0 || (_ItemData$user_ranks10 = _ItemData$user_ranks10[0]) === null || _ItemData$user_ranks10 === void 0 ? void 0 : _ItemData$user_ranks10.team_name
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u65F6\u95F4",
children: ItemData === null || ItemData === void 0 || (_ItemData$user_ranks11 = ItemData.user_ranks) === null || _ItemData$user_ranks11 === void 0 || (_ItemData$user_ranks11 = _ItemData$user_ranks11[0]) === null || _ItemData$user_ranks11 === void 0 ? void 0 : _ItemData$user_ranks11.cost_time
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1,
textAlign: 'center'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u8D4B\u80FD\u8D5B\u52A0\u5206",
children: ItemData === null || ItemData === void 0 || (_ItemData$user_ranks12 = ItemData.user_ranks) === null || _ItemData$user_ranks12 === void 0 || (_ItemData$user_ranks12 = _ItemData$user_ranks12[0]) === null || _ItemData$user_ranks12 === void 0 ? void 0 : _ItemData$user_ranks12.extra_score
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u6BD4\u8D5B\u6210\u7EE9",
children: ItemData === null || ItemData === void 0 || (_ItemData$user_ranks13 = ItemData.user_ranks) === null || _ItemData$user_ranks13 === void 0 || (_ItemData$user_ranks13 = _ItemData$user_ranks13[0]) === null || _ItemData$user_ranks13 === void 0 ? void 0 : _ItemData$user_ranks13.score
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u603B\u5206",
children: parseFloat(ItemData === null || ItemData === void 0 || (_ItemData$user_ranks14 = ItemData.user_ranks) === null || _ItemData$user_ranks14 === void 0 || (_ItemData$user_ranks14 = _ItemData$user_ranks14[0]) === null || _ItemData$user_ranks14 === void 0 ? void 0 : _ItemData$user_ranks14.extra_score) + parseFloat(ItemData === null || ItemData === void 0 || (_ItemData$user_ranks15 = ItemData.user_ranks) === null || _ItemData$user_ranks15 === void 0 || (_ItemData$user_ranks15 = _ItemData$user_ranks15[0]) === null || _ItemData$user_ranks15 === void 0 ? void 0 : _ItemData$user_ranks15.score) || 0
})
})]
}), ItemData === null || ItemData === void 0 || (_ItemData$teams = ItemData.teams) === null || _ItemData$teams === void 0 ? void 0 : _ItemData$teams.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.bottomItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#0152d9',
marginRight: '20px'
},
children: index + 1
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/users/".concat(item === null || item === void 0 ? void 0 : item.user_login, "/classrooms"),
style: {
marginRight: '80px',
position: 'relative'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Detailmodules.imgradius,
src: env/* default */.Z.IMG_SERVER + "/images/".concat(item === null || item === void 0 ? void 0 : item.user_image)
}), (item === null || item === void 0 ? void 0 : item.competition_prize) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: Detailmodules.spanrightradius,
children: item === null || item === void 0 ? void 0 : item.competition_prize
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u6218\u961F\u540D",
children: item === null || item === void 0 ? void 0 : item.team_name
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5355\u4F4D/\u5B66\u6821\u540D",
children: item.school_name
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1,
textAlign: 'center'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u8D4B\u80FD\u8D5B\u52A0\u5206",
children: item.extra_score
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
flex: 1
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u6BD4\u8D5B\u6210\u7EE9",
children: item.score
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#0152d9'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u603B\u5206",
children: parseFloat(item.extra_score) + parseFloat(item.score)
})
})]
});
})]
});
}
/* harmony default export */ var RankingList = (RanKingList);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/Ranking.tsx
var TabPane = tabs/* default */.Z.TabPane;
function Ranking(_ref) {
var _ChartRules$stages2, _ChartRules$stages3, _item$children, _item$children3, _ItemData$teams, _ItemData$teams2;
var ChartRules = _ref.ChartRules,
ItemData = _ref.ItemData,
getCharts = _ref.getCharts,
Selectkey = _ref.Selectkey,
getChartRules = _ref.getChartRules,
userinfo = _ref.userinfo,
Editable = _ref.Editable,
HeaderDetail = _ref.HeaderDetail,
qs = _ref.qs;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isUpdate = _useState2[0],
setIsupdate = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
defaultValue = _useState4[0],
setDefaultValue = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(true),
_useState6 = slicedToArray_default()(_useState5, 2),
ClickButton = _useState6[0],
setClickButton = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(),
_useState8 = slicedToArray_default()(_useState7, 2),
item = _useState8[0],
setItem = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(),
_useState10 = slicedToArray_default()(_useState9, 2),
items = _useState10[0],
setItems = _useState10[1];
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
(0,_react_17_0_2_react.useEffect)(function () {
//进入初始化状态为第一个
if (ClickButton) {
var _ChartRules$stages;
var data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages = ChartRules.stages) === null || _ChartRules$stages === void 0 ? void 0 : _ChartRules$stages[0];
setItem(data);
if (data !== null && data !== void 0 && data.id) {
var _ChartRules$rule_cont;
if ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'mAP' || (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'dog') {
getCharts(data === null || data === void 0 ? void 0 : data.id);
}
setDefaultValue(((_ChartRules$rule_cont = ChartRules.rule_contents) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(data === null || data === void 0 ? void 0 : data.id);
})) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont[0]) === null || _ChartRules$rule_cont === void 0 ? void 0 : _ChartRules$rule_cont['content']) || '');
} else {
var _ChartRules$rule_cont2;
if ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'mAP' || (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'dog') {}
setDefaultValue(((_ChartRules$rule_cont2 = ChartRules.rule_contents) === null || _ChartRules$rule_cont2 === void 0 || (_ChartRules$rule_cont2 = _ChartRules$rule_cont2.filter(function (item) {
return parseInt(item.competition_stage_id) === 0;
})) === null || _ChartRules$rule_cont2 === void 0 || (_ChartRules$rule_cont2 = _ChartRules$rule_cont2[0]) === null || _ChartRules$rule_cont2 === void 0 ? void 0 : _ChartRules$rule_cont2['content']) || '');
}
}
}, [ChartRules]);
function updateitem() {
return _updateitem.apply(this, arguments);
}
function _updateitem() {
_updateitem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var id, _ChartRules$rule_cont4, res, _ChartRules$rule_cont5, _res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (defaultValue) {
_context.next = 3;
break;
}
message/* default */.ZP.info('内容不能为空');
return _context.abrupt("return");
case 3:
setClickButton(false);
id = item === null || item === void 0 ? void 0 : item.id;
if (!id) {
_context.next = 12;
break;
}
_context.next = 8;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/update_md_content.json"), {
method: 'post',
body: {
competition_module_id: Selectkey,
content: defaultValue,
md_content_id: (_ChartRules$rule_cont4 = ChartRules.rule_contents) === null || _ChartRules$rule_cont4 === void 0 || (_ChartRules$rule_cont4 = _ChartRules$rule_cont4.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(id);
})) === null || _ChartRules$rule_cont4 === void 0 || (_ChartRules$rule_cont4 = _ChartRules$rule_cont4[0]) === null || _ChartRules$rule_cont4 === void 0 ? void 0 : _ChartRules$rule_cont4['id'],
stage_id: item === null || item === void 0 ? void 0 : item.id
}
});
case 8:
res = _context.sent;
if (res.status === 0) {
message/* default */.ZP.info('更新成功');
setIsupdate(false);
getChartRules();
}
_context.next = 16;
break;
case 12:
_context.next = 14;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/update_md_content.json"), {
method: 'post',
body: {
competition_module_id: Selectkey,
content: defaultValue,
md_content_id: (_ChartRules$rule_cont5 = ChartRules.rule_contents) === null || _ChartRules$rule_cont5 === void 0 || (_ChartRules$rule_cont5 = _ChartRules$rule_cont5.filter(function (item) {
return parseInt(item.competition_stage_id) === 0;
})) === null || _ChartRules$rule_cont5 === void 0 || (_ChartRules$rule_cont5 = _ChartRules$rule_cont5[0]) === null || _ChartRules$rule_cont5 === void 0 ? void 0 : _ChartRules$rule_cont5['id'],
stage_id: item === null || item === void 0 ? void 0 : item.id
}
});
case 14:
_res = _context.sent;
if (_res.status === 0) {
message/* default */.ZP.info('更新成功');
setIsupdate(false);
getChartRules();
}
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
return _updateitem.apply(this, arguments);
}
var columns = [{
title: '排名',
dataIndex: 'name',
align: 'center',
key: 'name',
render: function render(a, b, c) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: c + 1
});
}
}, {
title: '头像',
dataIndex: 'user_image',
align: 'center',
key: 'user_image',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Detailmodules.imgradius,
src: env/* default */.Z.IMG_SERVER + "/images/".concat(text)
});
}
}, {
title: '战队名称',
dataIndex: 'team_name',
key: 'team_name',
// width:120,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
title: text,
children: text && (text === null || text === void 0 ? void 0 : text.length) >= 15 ? (text === null || text === void 0 ? void 0 : text.substr(0, 15)) + '...' : text || '--'
});
}
// align:'center',
}, {
title: '单位',
dataIndex: 'school_name',
key: 'school_name',
align: 'center',
render: function render(a) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: a || '--'
});
}
}, {
title: (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'mAP' ? 'mAP指标' : (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'Jittor-3' ? '总分' : 'top1指标',
dataIndex: 'score',
key: 'score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
});
}
}];
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [(ChartRules === null || ChartRules === void 0 || (_ChartRules$stages2 = ChartRules.stages) === null || _ChartRules$stages2 === void 0 ? void 0 : _ChartRules$stages2.length) > 0 ? null : /*#__PURE__*/(0,jsx_runtime.jsx)(RankingNuLL, {}), (ChartRules === null || ChartRules === void 0 || (_ChartRules$stages3 = ChartRules.stages) === null || _ChartRules$stages3 === void 0 ? void 0 : _ChartRules$stages3.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
animated: true,
tabBarExtraContent: ((userinfo === null || userinfo === void 0 ? void 0 : userinfo.admin) || (userinfo === null || userinfo === void 0 ? void 0 : userinfo.business) || Editable) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
onClick: function onClick() {
setIsupdate(true);
},
children: qs['编辑']
}),
onChange: function onChange(e) {
var _ChartRules$stages4, _data$children, _ChartRules$rule_cont3;
setIsupdate(false);
var data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages4 = ChartRules.stages) === null || _ChartRules$stages4 === void 0 ? void 0 : _ChartRules$stages4.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
setItem(data);
var datas = data === null || data === void 0 || (_data$children = data.children) === null || _data$children === void 0 ? void 0 : _data$children[0];
setItems(datas);
setDefaultValue(((_ChartRules$rule_cont3 = ChartRules.rule_contents) === null || _ChartRules$rule_cont3 === void 0 || (_ChartRules$rule_cont3 = _ChartRules$rule_cont3.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(data === null || data === void 0 ? void 0 : data.id);
})) === null || _ChartRules$rule_cont3 === void 0 || (_ChartRules$rule_cont3 = _ChartRules$rule_cont3[0]) === null || _ChartRules$rule_cont3 === void 0 ? void 0 : _ChartRules$rule_cont3['content']) || '');
getCharts((datas === null || datas === void 0 ? void 0 : datas.id) || e);
},
children: ChartRules && ChartRules.stages.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(TabPane, {
tab: item.name,
children: isUpdate === false && ChartRules && ChartRules.rule_contents.map(function (items, keys) {
if (item.id === items.competition_stage_id) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: items.content === undefined || items.content === null ? "" : items.content
}, keys);
} else if (item.id === null && items.competition_stage_id === 0) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: items.content === undefined || items.content === null ? "" : items.content
}, keys);
}
})
}, item.id === null ? 0 : item.id);
})
}), (item === null || item === void 0 || (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
activeKey: (items === null || items === void 0 ? void 0 : items.id) + '',
onChange: function onChange(e) {
var _item$children2;
var data = item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
setItems(data);
getCharts(e);
//获取参数
},
children: item === null || item === void 0 || (_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(TabPane, {
tab: item.name
}, item.id === null ? 0 : item.id);
})
}), isUpdate && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
defaultValue: defaultValue,
onChange: function onChange(e) {
setDefaultValue(e);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginTop: '10px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
width: '90px'
},
type: "primary",
onClick: function onClick() {
return updateitem();
},
children: qs['提交']
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
marginLeft: '30px',
width: '90px'
},
onClick: function onClick() {
return setIsupdate(false);
},
children: qs['取消']
})]
})]
}), (ItemData === null || ItemData === void 0 || (_ItemData$teams = ItemData.teams) === null || _ItemData$teams === void 0 ? void 0 : _ItemData$teams.length) > 0 && ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'mAP' || (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'dog' || (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.task) === 'Jittor-3') ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
dataSource: ItemData === null || ItemData === void 0 ? void 0 : ItemData.teams,
columns: columns,
pagination: false
}) : (ItemData === null || ItemData === void 0 || (_ItemData$teams2 = ItemData.teams) === null || _ItemData$teams2 === void 0 ? void 0 : _ItemData$teams2.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(RankingList, {
ItemData: ItemData
})]
});
}
/* harmony default export */ var Detail_Ranking = (Ranking);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
var divider = __webpack_require__(28103);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/Downloadpdf.tsx
//下载页
function downpdf(_ref) {
var _Prize$personal_certi, _Prize$personal_certi2, _Prize$team_certifica, _Prize$team_certifica2, _Prize$teams, _Prize$teams$, _Prize$teams$2;
var Prize = _ref.Prize;
var params = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)([{
type: 1,
name: "团体奖证书"
}, {
type: 2,
name: "个人奖证书"
}, {
type: 3,
name: "优秀指导教师证书"
}]),
_useState2 = slicedToArray_default()(_useState, 2),
certData = _useState2[0],
setCertData = _useState2[1];
var handleClick = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(item) {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,competitions/* getCertificateInfo */.Ju)({
type: item.type,
id: params.identifier
});
case 2:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) location.href = "/competitions/exports?id=".concat(params.identifier, "&type=").concat(item.type);
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleClick(_x) {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: Detailmodules.downloadpdf,
children: "\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
style: {
marginTop: '30px',
fontSize: '16px',
color: '#000'
},
children: "\u8BC1\u4E66\u60C5\u51B5"
}), (Prize === null || Prize === void 0 || (_Prize$personal_certi = Prize.personal_certifications) === null || _Prize$personal_certi === void 0 ? void 0 : _Prize$personal_certi.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + "/images/educoder/pdfs.png"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
style: {
marginLeft: '5px'
},
href: env/* default */.Z.API_SERVER + "".concat(Prize === null || Prize === void 0 || (_Prize$personal_certi2 = Prize.personal_certifications[0]) === null || _Prize$personal_certi2 === void 0 ? void 0 : _Prize$personal_certi2.url),
children: "\u7ACB\u5373\u4E0B\u8F7D"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: "\u6682\u672A\u751F\u6210"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
marginLeft: '20px'
},
children: "\u539F\u56E0\uFF1A"
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: "\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E"
})]
}), (Prize === null || Prize === void 0 || (_Prize$team_certifica = Prize.team_certifications) === null || _Prize$team_certifica === void 0 ? void 0 : _Prize$team_certifica.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u56E2\u961F\u8BC1\u4E66\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + "/images/educoder/pdfs.png"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
style: {
marginLeft: '5px'
},
href: env/* default */.Z.API_SERVER + "".concat(Prize === null || Prize === void 0 || (_Prize$team_certifica2 = Prize.team_certifications[0]) === null || _Prize$team_certifica2 === void 0 ? void 0 : _Prize$team_certifica2.url),
children: "\u7ACB\u5373\u4E0B\u8F7D"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u56E2\u961F\u8BC1\u4E66\uFF1A"
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: "\u6682\u672A\u751F\u6210"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), (Prize === null || Prize === void 0 || (_Prize$teams = Prize.teams) === null || _Prize$teams === void 0 ? void 0 : _Prize$teams.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [(Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$ = Prize.teams[0]) === null || _Prize$teams$ === void 0 ? void 0 : _Prize$teams$.name), "\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex',
height: '50px',
background: '#f5f5f5',
alignItems: 'center',
justifyContent: 'space-around'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '5%'
},
children: "\u89D2\u8272"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '5%'
},
children: "\u59D3\u540D"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: "\u5B9E\u540D\u8BA4\u8BC1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: "\u804C\u4E1A\u8BA4\u8BC1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: "\u624B\u673A\u7ED1\u5B9A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: "\u90AE\u7BB1\u7ED1\u5B9A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '50%',
textAlign: 'center'
},
children: "\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09"
})]
}), (Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$2 = Prize.teams[0]) === null || _Prize$teams$2 === void 0 ? void 0 : _Prize$teams$2.team_members.map(function (item, index) {
var _Prize$teams$3, _Prize$teams$4, _Prize$teams$5;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: Detailmodules.teamItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '5%'
},
children: item === null || item === void 0 ? void 0 : item.role
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '5%'
},
children: item === null || item === void 0 ? void 0 : item.name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: (item === null || item === void 0 ? void 0 : item.real_name_auth) === "authed" ? '已认证' : (item === null || item === void 0 ? void 0 : item.real_name_auth) === "authing" ? '待审核' : '未认证'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: (item === null || item === void 0 ? void 0 : item.professional_auth) === "authed" ? '已认证' : (item === null || item === void 0 ? void 0 : item.professional_auth) === "authing" ? '待审核' : '未认证'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: item !== null && item !== void 0 && item.phone_binded ? '已绑定' : '未绑定'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '10%'
},
children: item !== null && item !== void 0 && item.email_binded ? '已绑定' : '未绑定'
}), (item === null || item === void 0 ? void 0 : item.role) === '队长' ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
width: '50%',
textAlign: 'center'
},
children: [(Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$3 = Prize.teams[0]) === null || _Prize$teams$3 === void 0 || (_Prize$teams$3 = _Prize$teams$3.bank_account) === null || _Prize$teams$3 === void 0 ? void 0 : _Prize$teams$3.bank), (Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$4 = Prize.teams[0]) === null || _Prize$teams$4 === void 0 || (_Prize$teams$4 = _Prize$teams$4.bank_account) === null || _Prize$teams$4 === void 0 ? void 0 : _Prize$teams$4.second_bank), (Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$5 = Prize.teams[0]) === null || _Prize$teams$5 === void 0 || (_Prize$teams$5 = _Prize$teams$5.bank_account) === null || _Prize$teams$5 === void 0 ? void 0 : _Prize$teams$5.card_no)]
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '50%'
}
})]
});
}))]
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
gutter: [20, 20],
children: certData.map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: function onClick() {
return handleClick(item);
},
children: item.name
})
}, key);
})
})]
});
}
/* harmony default export */ var Downloadpdf = (downpdf);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(5112);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(97514);
// EXTERNAL MODULE: ./src/assets/images/account/auth.png
var auth = __webpack_require__(98814);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/component/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var componentmodules = ({"modal":"modal___A9Ovz","colorBlue":"colorBlue___XSmR5","formWrap":"formWrap___wRvaA","flexRow":"flexRow___C40dc","flexColumn":"flexColumn___LkZfj","example":"example___bz7Hw","exampleImg":"exampleImg___gNkC_","colorOrange":"colorOrange___Ka6zf","uploader":"uploader___plQRr","uploadImg":"uploadImg___cjOpL","imageTip":"imageTip___p1_lZ","uploadTipIcon":"uploadTipIcon___SpsS2","uploadTip":"uploadTip___e9JlL","color05101a":"color05101a___CDEUv","viewLargerImg":"viewLargerImg___IclRX","footerWrap":"footerWrap___beWC6","note":"note___CXi9y","schoolHintWrap":"schoolHintWrap___Ma6ly","colorCDCDCD":"colorCDCDCD___D0UWo","color0152d9":"color0152d9___hF3Bb"});
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/component/RealNameAuthModal.tsx
var _excluded = ["user", "account", "globalSetting", "loading", "dispatch"];
var RealNameAuthModal_Dragger = upload/* default */.Z.Dragger;
var MAX_NAME_LENGTH = 10;
var RealNameAuthModal = function RealNameAuthModal(_ref) {
var user = _ref.user,
account = _ref.account,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
props = objectWithoutProperties_default()(_ref, _excluded);
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState = (0,_react_17_0_2_react.useState)({}),
_useState2 = slicedToArray_default()(_useState, 2),
formValue = _useState2[0],
setFormValue = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(true),
_useState4 = slicedToArray_default()(_useState3, 2),
showRealName = _useState4[0],
setShowRealName = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
realName = _useState6[0],
setRealName = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(),
_useState8 = slicedToArray_default()(_useState7, 2),
image = _useState8[0],
setImage = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(),
_useState10 = slicedToArray_default()(_useState9, 2),
fileId = _useState10[0],
setFileId = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(),
_useState12 = slicedToArray_default()(_useState11, 2),
isLoading = _useState12[0],
setIsLoading = _useState12[1];
(0,_react_17_0_2_react.useEffect)(function () {
if (!account.basicInfo) {
return;
}
var basicInfo = account.basicInfo;
var formData = {
name: basicInfo.show_realname ? basicInfo.name : (0,util/* getHiddenName */.YA)(basicInfo.name),
gender: basicInfo.gender
};
setRealName(basicInfo.name);
setShowRealName(basicInfo.show_realname);
form.setFieldsValue(formData);
setFormValue(formData);
}, [account.basicInfo]);
var handleUploadChange = function handleUploadChange(info) {
if (info.file.status === 'uploading') {
setIsLoading(true);
return;
}
if (info.file.status === 'done') {
var _info$file$response;
console.log(info.file, info.file.response);
setFileId((_info$file$response = info.file.response) === null || _info$file$response === void 0 ? void 0 : _info$file$response.id);
(0,util/* getBase64 */.y3)(info.file.originFileObj, function (base64Img) {
setImage(base64Img);
setIsLoading(false);
});
}
};
var handleValuesChange = function handleValuesChange(changedValues) {
setFormValue(objectSpread2_default()({}, form.getFieldsValue()));
if ('name' in changedValues) {
setRealName(changedValues.name);
}
};
var handleSetShowRealName = function handleSetShowRealName() {
var nextRealNameStatus = !showRealName;
setShowRealName(nextRealNameStatus);
var nextName = nextRealNameStatus ? realName : (0,util/* getHiddenName */.YA)(realName);
form.setFieldsValue({
name: nextName
});
};
var handleFinish = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
var _account$basicInfo, _user$userInfo;
var _ref3, name, gender, id_number, res, _user$userInfo2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_ref3 = values || {}, name = _ref3.name, gender = _ref3.gender, id_number = _ref3.idNumber;
if (image) {
_context.next = 4;
break;
}
message/* default */.ZP.info('请先上传照片!');
return _context.abrupt("return");
case 4:
_context.next = 6;
return dispatch({
type: 'account/applyRealNameAuth',
payload: {
id: ((_account$basicInfo = account.basicInfo) === null || _account$basicInfo === void 0 ? void 0 : _account$basicInfo.id) || ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login),
name: name,
gender: gender,
id_number: id_number,
show_realname: showRealName,
attachment_ids: [fileId]
}
});
case 6:
res = _context.sent;
handleClose();
if (res) {
message/* default */.ZP.info("申请已提交,请等待审核!");
dispatch({
type: 'account/getBasicInfo',
payload: {
login: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login
}
});
}
case 9:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleFinish(_x) {
return _ref2.apply(this, arguments);
};
}();
var handleClose = function handleClose() {
dispatch({
type: 'account/setActionTabs',
payload: {}
});
};
var uploadProps = {
data: {
type: "real_name"
},
multiple: true,
showUploadList: false,
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
className: componentmodules.uploader,
onChange: handleUploadChange,
beforeUpload: function beforeUpload(file) {
var isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
if (!isJpgOrPng) {
message/* default */.ZP.info('请上传正确文件格式');
}
return isJpgOrPng;
}
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
centered: true,
keyboard: false,
closable: false,
destroyOnClose: true,
visible: account.actionTabs.key === 'Account-RealNameAuth',
title: "\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",
width: "600px",
footer: null,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: !!isLoading,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: componentmodules.formWrap,
form: form,
layout: "horizontal",
onValuesChange: handleValuesChange,
onFinish: handleFinish,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u59D3\u540D",
name: "name",
labelCol: {
span: 3
},
wrapperCol: {
span: 12
},
rules: [{
required: true,
message: "\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(MAX_NAME_LENGTH, "\u4E2A\u5B57\u7B26")
}, {
validator: util/* handleValidatorName */.HJ
}],
extra: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)'
}),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
disabled: !showRealName,
placeholder: "\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(MAX_NAME_LENGTH, "\u4E2A\u5B57\u7B26"),
maxLength: MAX_NAME_LENGTH,
addonAfter: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont ".concat(showRealName ? 'icon-xianshi' : 'icon-yincang', " font18 ").concat(componentmodules.color0152d9),
onClick: handleSetShowRealName
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u6027\u522B\uFF1A",
name: "gender",
labelCol: {
span: 3
},
wrapperCol: {
span: 12
},
rules: [{
required: true,
message: '请选择性别'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: 0,
children: "\u7537"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: 1,
children: "\u5973"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8BC1\u4EF6\u53F7\uFF1A",
labelCol: {
span: 3
},
name: "idNumber",
rules: [{
required: true,
message: '请输入证件号'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",
labelCol: {
span: 3
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.flexRow,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(componentmodules.flexColumn, " ").concat(componentmodules.example),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: componentmodules.exampleImg,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: auth
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "tc",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "\u793A\u4F8B\u56FE\u7247"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: "".concat(componentmodules.colorOrange, " font12"),
children: "\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.flexColumn,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RealNameAuthModal_Dragger, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
accept: ".png,.jpg,.bmp,.jpeg",
children: image ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: image,
className: componentmodules.uploadImg
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.imageTip,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-cuban2shangchuanyunduan ".concat(componentmodules.uploadTipIcon)
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: componentmodules.uploadTip,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
className: componentmodules.color05101a,
children: "\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247"
})
})]
})
})), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tc",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: componentmodules.viewLargerImg,
children: "\u67E5\u770B\u5927\u56FE"
})
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: componentmodules.footerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "mr5",
size: "large",
onClick: handleClose,
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
size: "large",
type: "primary",
htmlType: "submit",
loading: loading['account/applyRealNameAuth'],
children: "\u4FDD\u5B58"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.note,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "\u8BA4\u8BC1\u987B\u77E5\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3\u542F\u667A\u8D26\u53F7\u3002"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002"
})]
})]
})
})
});
};
/* harmony default export */ var component_RealNameAuthModal = ((0,_umi_production_exports.connect)(function (_ref4) {
var user = _ref4.user,
account = _ref4.account,
loading = _ref4.loading,
globalSetting = _ref4.globalSetting;
return {
user: user,
account: account,
globalSetting: globalSetting,
loading: loading.effects
};
})(RealNameAuthModal));
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js
var auto_complete = __webpack_require__(88522);
// EXTERNAL MODULE: ./src/assets/images/account/job.png
var job = __webpack_require__(51941);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/components/AppplyDepartmentModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AppplyDepartmentModalmodules = ({"flexRow":"flexRow___LQKDI","flexColumn":"flexColumn___NLClE","formWrap":"formWrap___mGWio","example":"example___gPghw","footerWrap":"footerWrap___qcHQ4"});
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/components/AppplyDepartmentModal/index.tsx
var AppplyDepartmentModal_excluded = ["account", "globalSetting", "loading", "dispatch", "schoolName", "departmentName", "visible", "onClose", "onSuccess"];
var TextArea = input/* default */.Z.TextArea;
var AppplyDepartmentModal = function AppplyDepartmentModal(_ref) {
var account = _ref.account,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
schoolName = _ref.schoolName,
departmentName = _ref.departmentName,
visible = _ref.visible,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
_ref$onSuccess = _ref.onSuccess,
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
props = objectWithoutProperties_default()(_ref, AppplyDepartmentModal_excluded);
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var schoolId = (0,_react_17_0_2_react.useRef)();
(0,_react_17_0_2_react.useEffect)(function () {
schoolId.current = props.schoolId;
}, [props.schoolId]);
(0,_react_17_0_2_react.useEffect)(function () {
form.setFieldsValue({
department: departmentName
});
}, [departmentName]);
var handleFinish = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
var _ref3, department, remarks, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_ref3 = values || {}, department = _ref3.department, remarks = _ref3.remarks;
_context.next = 3;
return dispatch({
type: 'account/appplyDepartment',
payload: {
school_id: schoolId.current,
name: department,
remarks: remarks
}
});
case 3:
res = _context.sent;
onClose();
if (res) {
message/* default */.ZP.success("新增院系/部门成功!");
onSuccess(department);
}
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleFinish(_x) {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
centered: true,
keyboard: false,
closable: false,
destroyOnClose: true,
visible: visible,
title: "\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",
width: "600px",
footer: null,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: AppplyDepartmentModalmodules.formWrap,
form: form,
labelCol: {
span: 4
},
wrapperCol: {
span: 20
},
onFinish: handleFinish,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5355\u4F4D\u540D\u79F0\uFF1A",
children: schoolName
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u90E8\u95E8\u540D\u79F0\uFF1A",
name: "department",
rules: [{
required: true,
message: '请输入部门或者学院名称'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8BF4\u660E\uFF1A",
name: "remarks",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AppplyDepartmentModalmodules.footerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "mr5",
size: "large",
onClick: function onClick() {
onClose();
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
size: "large",
type: "primary",
htmlType: "submit",
loading: loading['account/appplyDepartment'],
children: "\u4FDD\u5B58"
})]
})
})]
})
});
};
/* harmony default export */ var components_AppplyDepartmentModal = ((0,_umi_production_exports.connect)(function (_ref4) {
var account = _ref4.account,
loading = _ref4.loading,
globalSetting = _ref4.globalSetting;
return {
account: account,
globalSetting: globalSetting,
loading: loading.effects
};
})(AppplyDepartmentModal));
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/cascader/index.js + 18 modules
var cascader = __webpack_require__(19842);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
var CheckCircleFilled = __webpack_require__(2720);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
var CloseCircleFilled = __webpack_require__(97650);
// EXTERNAL MODULE: ./src/utils/cityData.ts
var cityData = __webpack_require__(73726);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/components/AppplySchoolModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AppplySchoolModalmodules = ({"flexRow":"flexRow___jGYtM","flexColumn":"flexColumn___NPMB3","formWrap":"formWrap___vwH9N","example":"example____BmJC","footerWrap":"footerWrap___lp1L0"});
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/components/AppplySchoolModal/index.tsx
var AppplySchoolModal_excluded = ["account", "globalSetting", "loading", "dispatch", "schoolName", "visible", "onClose", "onSuccess"];
var filter = function filter(inputValue, path) {
return path.some(function (option) {
return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
});
};
var AppplySchoolModal_TextArea = input/* default */.Z.TextArea;
var AppplySchoolModal = function AppplySchoolModal(_ref) {
var account = _ref.account,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
schoolName = _ref.schoolName,
visible = _ref.visible,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
_ref$onSuccess = _ref.onSuccess,
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
props = objectWithoutProperties_default()(_ref, AppplySchoolModal_excluded);
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
(0,_react_17_0_2_react.useEffect)(function () {
form.setFieldsValue({
name: schoolName
});
}, [schoolName]);
var handleFinish = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
var _ref3, name, _ref3$city, city, address, remarks, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_ref3 = values || {}, name = _ref3.name, _ref3$city = _ref3.city, city = _ref3$city === void 0 ? [] : _ref3$city, address = _ref3.address, remarks = _ref3.remarks;
_context.next = 3;
return dispatch({
type: 'account/appplySchool',
payload: {
name: name,
province: city[0],
city: city[1],
address: address,
remarks: remarks
}
});
case 3:
res = _context.sent;
onClose();
if (res) {
message/* default */.ZP.success("新增学校/单位成功!");
onSuccess(name);
}
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleFinish(_x) {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
centered: true,
keyboard: false,
closable: false,
destroyOnClose: true,
visible: visible,
title: "\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",
width: "600px",
footer: null,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: AppplySchoolModalmodules.formWrap,
form: form,
labelCol: {
span: 4
},
wrapperCol: {
span: 20
},
onFinish: handleFinish,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5355\u4F4D\u5168\u79F0\uFF1A",
name: "name",
rules: [{
required: true,
message: '请输入学校或工作单位'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(AppplySchoolModalmodules.flexRow, " ").concat(AppplySchoolModalmodules.example),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u793A\u4F8B\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AppplySchoolModalmodules.flexColumn,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CheckCircleFilled/* default */.Z, {
style: {
color: "rgb(82, 196, 26)"
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 ml5",
children: "\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CloseCircleFilled/* default */.Z, {
style: {
color: "red"
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 ml5",
children: "\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625"
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5730\u533A\uFF1A",
name: "city",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cascader/* default */.Z, {
allowClear: true,
size: "large",
options: cityData/* CityData */.P,
placeholder: "\u8BF7\u9009\u62E9\u6240\u5728\u5730",
showSearch: {
matchInputWidth: true,
filter: filter
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8BE6\u7EC6\u5730\u5740\uFF1A",
name: "address",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u8BF4\u660E\uFF1A",
name: "remarks",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AppplySchoolModal_TextArea, {
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AppplySchoolModalmodules.footerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "mr5",
size: "large",
onClick: function onClick() {
onClose();
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
size: "large",
type: "primary",
htmlType: "submit",
loading: loading['account/appplySchool'],
children: "\u4FDD\u5B58"
})]
})
})]
})
});
};
/* harmony default export */ var components_AppplySchoolModal = ((0,_umi_production_exports.connect)(function (_ref4) {
var account = _ref4.account,
loading = _ref4.loading,
globalSetting = _ref4.globalSetting;
return {
account: account,
globalSetting: globalSetting,
loading: loading.effects
};
})(AppplySchoolModal));
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/component/ProfessionalAuthModal.tsx
var ProfessionalAuthModal_excluded = ["user", "account", "globalSetting", "loading", "dispatch", "Scoid"];
var ProfessionalAuthModal_Option = es_select["default"].Option;
var ProfessionalAuthModal_Dragger = upload/* default */.Z.Dragger;
var ProfessionalAuthModal = function ProfessionalAuthModal(_ref) {
var _globalSetting$settin, _schoolList$find3;
var user = _ref.user,
account = _ref.account,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
Scoid = _ref.Scoid,
props = objectWithoutProperties_default()(_ref, ProfessionalAuthModal_excluded);
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState = (0,_react_17_0_2_react.useState)({}),
_useState2 = slicedToArray_default()(_useState, 2),
formValue = _useState2[0],
setFormValue = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 2),
schoolList = _useState4[0],
setSchoolList = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
filterSchoolList = _useState6[0],
setFilterSchoolList = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
departmentList = _useState8[0],
setDepartmentList = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
filterDepartmentList = _useState10[0],
setFilterDepartmentList = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(),
_useState12 = slicedToArray_default()(_useState11, 2),
image = _useState12[0],
setImage = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(),
_useState14 = slicedToArray_default()(_useState13, 2),
fileId = _useState14[0],
setFileId = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(),
_useState16 = slicedToArray_default()(_useState15, 2),
isLoading = _useState16[0],
setIsLoading = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(),
_useState18 = slicedToArray_default()(_useState17, 2),
visibleAppplySchool = _useState18[0],
setVisibleAppplySchool = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(),
_useState20 = slicedToArray_default()(_useState19, 2),
visibleAppplyDepartment = _useState20[0],
setVisibleAppplyDepartment = _useState20[1];
;
(0,_react_17_0_2_react.useEffect)(function () {
getSchoolOption();
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
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 (Scoid) {
_context.next = 2;
break;
}
return _context.abrupt("return");
case 2:
_context.next = 4;
return getDepartmentOption(Scoid);
case 4:
res = _context.sent;
setDepartmentList(res === null || res === void 0 ? void 0 : res.departments);
case 6:
case "end":
return _context.stop();
}
}, _callee);
}))();
}, [Scoid]);
var getSchoolOption = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return dispatch({
type: 'account/getSchoolOption'
});
case 2:
res = _context2.sent;
setSchoolList(res === null || res === void 0 ? void 0 : res.schools);
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function getSchoolOption() {
return _ref3.apply(this, arguments);
};
}();
var getDepartmentOption = function getDepartmentOption(schoolId) {
return dispatch({
type: 'account/getDepartmentOption',
payload: {
id: schoolId
}
});
};
(0,_react_17_0_2_react.useEffect)(function () {
if (!account.basicInfo) {
return;
}
var basicInfo = account.basicInfo;
var formData = {
identity: basicInfo.identity,
school: basicInfo.school_name,
department: basicInfo.department_name,
studentNo: basicInfo.student_id,
jobTitle: basicInfo.identity == "teacher" ? basicInfo.technical_title : "教授",
manager: basicInfo.identity == "professional" ? basicInfo.technical_title : "企业管理者"
};
form.setFieldsValue(formData);
setFormValue(formData);
}, [account.basicInfo]);
var handleApplySchool = function handleApplySchool() {
setVisibleAppplySchool(true);
};
var handleApplyDepartment = function handleApplyDepartment() {
if (!schoolList.find(function (item) {
return item.name === formValue.school;
})) {
message/* default */.ZP.info('请先选择正确的单位或者学校!');
return;
}
setVisibleAppplyDepartment(true);
};
var handleValuesChange = function handleValuesChange(changedValues) {
setFormValue(objectSpread2_default()({}, form.getFieldsValue()));
if ('school' in changedValues) {
setFilterSchoolList(schoolList.filter(function (item) {
return item.name.includes(changedValues.school);
}));
var findSchoolId = (schoolList.find(function (item) {
return item.name === changedValues.school;
}) || {}).id;
if (findSchoolId) {
handleSetDepartment(changedValues.school);
} else {
form.setFieldsValue({
department: ''
});
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
school: changedValues.school,
department: ''
}));
}
}
};
var handleSetDepartment = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(school, departmentName) {
var _schoolList$find, _res$departments;
var findSchoolId, res, name;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
findSchoolId = (_schoolList$find = schoolList.find(function (item) {
return item.name === school;
})) === null || _schoolList$find === void 0 ? void 0 : _schoolList$find.id;
_context3.next = 3;
return getDepartmentOption(findSchoolId);
case 3:
_context3.t0 = _context3.sent;
if (_context3.t0) {
_context3.next = 6;
break;
}
_context3.t0 = {};
case 6:
res = _context3.t0;
setDepartmentList(res === null || res === void 0 ? void 0 : res.departments);
name = departmentName || (res === null || res === void 0 || (_res$departments = res.departments) === null || _res$departments === void 0 || (_res$departments = _res$departments[0]) === null || _res$departments === void 0 ? void 0 : _res$departments.name);
form.setFieldsValue({
department: name
});
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
school: school,
department: name
}));
case 11:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function handleSetDepartment(_x, _x2) {
return _ref4.apply(this, arguments);
};
}();
var handleSchoolSuccess = /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(schoolName) {
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return getSchoolOption();
case 2:
form.setFieldsValue({
school: schoolName,
department: ''
});
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
school: schoolName,
department: ''
}));
case 4:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return function handleSchoolSuccess(_x3) {
return _ref5.apply(this, arguments);
};
}();
var handleUploadChange = function handleUploadChange(info) {
if (info.file.status === 'uploading') {
setIsLoading(true);
return;
}
if (info.file.status === 'done') {
var _info$file$response;
console.log(info.file, info.file.response);
setFileId((_info$file$response = info.file.response) === null || _info$file$response === void 0 ? void 0 : _info$file$response.id);
(0,util/* getBase64 */.y3)(info.file.originFileObj, function (base64Img) {
setImage(base64Img);
setIsLoading(false);
});
}
};
var handleFinish = /*#__PURE__*/function () {
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(values) {
var _schoolList$find2, _departmentList$find, _account$basicInfo, _user$userInfo;
var _ref7, school, department, identity, studentNo, jobTitle, manager, school_id, department_id, extra, res, _user$userInfo2;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_ref7 = values || {}, school = _ref7.school, department = _ref7.department, identity = _ref7.identity, studentNo = _ref7.studentNo, jobTitle = _ref7.jobTitle, manager = _ref7.manager;
if (image) {
_context5.next = 4;
break;
}
message/* default */.ZP.info('请先上传照片!');
return _context5.abrupt("return");
case 4:
school_id = (_schoolList$find2 = schoolList.find(function (item) {
return item.name === school;
})) === null || _schoolList$find2 === void 0 ? void 0 : _schoolList$find2.id;
department_id = (_departmentList$find = departmentList.find(function (item) {
return item.name === department;
})) === null || _departmentList$find === void 0 ? void 0 : _departmentList$find.id;
if (identity === 'student') {
extra = studentNo;
} else if (identity === 'teacher') {
extra = jobTitle;
} else {
extra = manager;
}
_context5.next = 9;
return dispatch({
type: 'account/applyProfessionalAuth',
payload: {
id: ((_account$basicInfo = account.basicInfo) === null || _account$basicInfo === void 0 ? void 0 : _account$basicInfo.id) || ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login),
school_id: school_id,
department_id: department_id,
identity: identity,
extra: extra,
attachment_ids: [fileId]
}
});
case 9:
res = _context5.sent;
handleClose();
if (res) {
message/* default */.ZP.info("申请已提交,请等待审核!");
dispatch({
type: 'account/getBasicInfo',
payload: {
login: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login
}
});
}
case 12:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return function handleFinish(_x4) {
return _ref6.apply(this, arguments);
};
}();
var handleClose = function handleClose() {
dispatch({
type: 'account/setActionTabs',
payload: {}
});
};
var uploadProps = {
data: {
type: "professional"
},
multiple: true,
showUploadList: false,
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
className: componentmodules.uploader,
onChange: handleUploadChange,
beforeUpload: function beforeUpload(file) {
var isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
if (!isJpgOrPng) {
message/* default */.ZP.info('请上传正确文件格式');
}
return isJpgOrPng;
}
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
centered: true,
keyboard: false,
closable: false,
destroyOnClose: true,
className: componentmodules.modal,
visible: account.actionTabs.key === 'Account-ProfessionalAuth',
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-zhiyerenzheng font18 mr5 ".concat(componentmodules.colorBlue)
}), "\u804C\u4E1A\u8BA4\u8BC1"]
}),
width: "660px",
footer: null,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: !!isLoading,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: componentmodules.formWrap,
form: form,
layout: "horizontal",
onValuesChange: handleValuesChange,
onFinish: handleFinish,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
gutter: [10, 0],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: '300px',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u804C\u4E1A",
name: "identity",
rules: [{
required: true,
message: '请先选择职业'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "teacher",
children: "\u6559\u5E08"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "student",
children: "\u5B66\u751F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "professional",
children: "\u4E13\u4E1A\u4EBA\u58EB"
})]
})
})
}), formValue.identity === 'student' && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: '200px',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
initialValue: formValue.studentNo,
name: "studentNo",
rules: [{
required: true,
message: '请先输入学号'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
type: "text",
placeholder: "\u8BF7\u8F93\u5165\u5B66\u53F7"
})
})
}), formValue.identity === 'teacher' && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: '200px',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
initialValue: formValue.jobTitle,
name: "jobTitle",
rules: [{
required: true,
message: '请先选择职称'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u6559\u6388",
children: "\u6559\u6388"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u526F\u6559\u6388",
children: "\u526F\u6559\u6388"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u8BB2\u5E08",
children: "\u8BB2\u5E08"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u52A9\u6559",
children: "\u52A9\u6559"
})]
})
})
}), formValue.identity === 'professional' && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: '200px',
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
initialValue: formValue.manager,
name: "manager",
rules: [{
required: true,
message: '请先选择职称'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u4F01\u4E1A\u7BA1\u7406\u8005",
children: "\u4F01\u4E1A\u7BA1\u7406\u8005"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u90E8\u95E8\u7BA1\u7406\u8005",
children: "\u90E8\u95E8\u7BA1\u7406\u8005"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u9AD8\u7EA7\u5DE5\u7A0B\u5E08",
children: "\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u5DE5\u7A0B\u5E08",
children: "\u5DE5\u7A0B\u5E08"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Option, {
value: "\u52A9\u7406\u5DE5\u7A0B\u5E08",
children: "\u52A9\u7406\u5DE5\u7A0B\u5E08"
})]
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5B66\u6821/\u5355\u4F4D",
name: "school",
extra: formValue.school && !(schoolList !== null && schoolList !== void 0 && schoolList.find(function (item) {
return item.name === formValue.school;
})) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.schoolHintWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: componentmodules.colorCDCDCD,
children: ["\u672A\u627E\u5230\u5305\u542B\u201C", formValue.school, "\u201D\u7684\u9AD8\u6821\uFF0C"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "".concat(componentmodules.color0152d9, " current"),
onClick: handleApplySchool,
children: "\u7533\u8BF7\u65B0\u589E"
})]
}),
rules: [{
required: true,
message: '请先选择学校/单位'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
showSearch: true,
options: filterSchoolList === null || filterSchoolList === void 0 ? void 0 : filterSchoolList.map(function (item) {
return {
value: item.name
};
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u9662\u7CFB/\u90E8\u95E8",
name: "department",
extra: formValue.department && !(departmentList !== null && departmentList !== void 0 && departmentList.find(function (item) {
return item.name === formValue.department;
})) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.schoolHintWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: componentmodules.colorCDCDCD,
children: formValue.department ? "\u672A\u627E\u5230\u5305\u542B\u201C".concat(formValue.department, "\u201D\u7684\u9AD8\u6821\uFF0C") : '未找到院系,'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "".concat(componentmodules.color0152d9, " current"),
onClick: handleApplyDepartment,
children: "\u7533\u8BF7\u65B0\u589E"
})]
}),
rules: [{
required: true,
message: '请先选择院系/部门'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
showSearch: true,
onChange: function onChange(value) {
return setFilterDepartmentList(departmentList.filter(function (item) {
return item.name.includes(value);
}));
},
options: filterDepartmentList === null || filterDepartmentList === void 0 ? void 0 : filterDepartmentList.map(function (item) {
return {
value: item.name
};
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u804C\u4E1A\u8BC1\u4E0A\u4F20",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.flexRow,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(componentmodules.flexColumn, " ").concat(componentmodules.example),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: componentmodules.exampleImg,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: job
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "tc",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "\u793A\u4F8B\u56FE\u7247"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: "".concat(componentmodules.colorOrange, " font12"),
children: "\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.flexColumn,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal_Dragger, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
accept: ".png,.jpg,.bmp,.jpeg",
children: image ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: image,
className: componentmodules.uploadImg
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.imageTip,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-cuban2shangchuanyunduan ".concat(componentmodules.uploadTipIcon)
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: componentmodules.uploadTip,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
className: componentmodules.color05101a,
children: "\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247"
})
})]
})
})), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "tc",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: componentmodules.viewLargerImg,
children: "\u67E5\u770B\u5927\u56FE"
})
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: componentmodules.footerWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "mr5",
size: "large",
onClick: handleClose,
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
size: "large",
type: "primary",
htmlType: "submit",
loading: loading['account/applyProfessionalAuth'],
children: "\u4FDD\u5B58"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: componentmodules.note,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "\u8BA4\u8BC1\u987B\u77E5\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3", !(globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.is_local) && '启智', "\u8D26\u53F7\u3002"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002"
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_AppplySchoolModal, {
visible: visibleAppplySchool,
onClose: function onClose() {
return setVisibleAppplySchool(false);
},
schoolName: formValue.school,
onSuccess: handleSchoolSuccess
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_AppplyDepartmentModal, {
visible: visibleAppplyDepartment,
onClose: function onClose() {
return setVisibleAppplyDepartment(false);
},
schoolId: (_schoolList$find3 = schoolList.find(function (item) {
return item.name === formValue.school;
})) === null || _schoolList$find3 === void 0 ? void 0 : _schoolList$find3.id,
schoolName: formValue.school,
departmentName: formValue.department,
onSuccess: function onSuccess(departmentName) {
return handleSetDepartment(formValue.school, departmentName);
}
})]
});
};
/* harmony default export */ var component_ProfessionalAuthModal = ((0,_umi_production_exports.connect)(function (_ref8) {
var user = _ref8.user,
account = _ref8.account,
loading = _ref8.loading,
globalSetting = _ref8.globalSetting;
return {
user: user,
account: account,
globalSetting: globalSetting,
loading: loading.effects
};
})(ProfessionalAuthModal));
// EXTERNAL MODULE: ./node_modules/_md5@2.3.0@md5/md5.js
var md5 = __webpack_require__(93735);
var md5_default = /*#__PURE__*/__webpack_require__.n(md5);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/UpdataPhone.tsx
//修改手机号or邮箱地址
//type 3 手机 4邮箱
function UpdataPhone(_ref) {
var type = _ref.type,
dispatch = _ref.dispatch,
userid = _ref.userid,
isshow = _ref.isshow,
setPhoneshow = _ref.setPhoneshow,
setEmailshow = _ref.setEmailshow;
var opens = "79e33abd4b6588941ab7622aed1e67e8";
var _useState = (0,_react_17_0_2_react.useState)(''),
_useState2 = slicedToArray_default()(_useState, 2),
login = _useState2[0],
setLogin = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)('获取验证码'),
_useState4 = slicedToArray_default()(_useState3, 2),
yzm = _useState4[0],
setYzm = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(60),
_useState6 = slicedToArray_default()(_useState5, 2),
seconds = _useState6[0],
setseconds = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
secondsFlag = _useState8[0],
setsecondsFlag = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(''),
_useState10 = slicedToArray_default()(_useState9, 2),
code = _useState10[0],
setCode = _useState10[1];
//获取验证码
function getversion() {
return _getversion.apply(this, arguments);
} // 获取验证码倒计时
function _getversion() {
_getversion = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var data;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (login) {
_context.next = 3;
break;
}
if (type === 3) {
message/* default */.ZP.info('手机号不能为空');
} else {
message/* default */.ZP.info('邮箱地址不能为空');
}
return _context.abrupt("return");
case 3:
_context.next = 5;
return dispatch({
type: 'competitions/getVerification',
payload: {
type: type,
login: login,
smscode: md5_default()(opens + login)
//user_id:39416
}
});
case 5:
data = _context.sent;
if (data.status === 1) {
message/* default */.ZP.info('获取验证码成功');
remainTime();
setsecondsFlag(true);
}
case 7:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getversion.apply(this, arguments);
}
function remainTime() {
setseconds(60);
var aa = setInterval(function () {
--seconds;
if (seconds > -1) {
setseconds(seconds);
} else {
clearInterval(aa);
setsecondsFlag(false);
}
}, 1000);
}
//绑定手机号
function PhoneBind() {
return _PhoneBind.apply(this, arguments);
} //绑定邮箱
function _PhoneBind() {
_PhoneBind = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var data;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return dispatch({
type: 'competitions/PhoneBind',
payload: {
userid: userid,
code: code,
phone: login
}
});
case 2:
data = _context2.sent;
if (data.status === 0) {
message/* default */.ZP.info('绑定成功');
setPhoneshow("none");
}
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _PhoneBind.apply(this, arguments);
}
function EmailBind() {
return _EmailBind.apply(this, arguments);
}
function _EmailBind() {
_EmailBind = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var data;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return dispatch({
type: 'competitions/EmailBind',
payload: {
userid: userid,
code: code,
email: login
}
});
case 2:
data = _context3.sent;
if (data.status === 0) {
message/* default */.ZP.info('绑定成功');
setEmailshow('none');
}
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _EmailBind.apply(this, arguments);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: isshow
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
value: login,
onChange: function onChange(e) {
return setLogin(e.target.value);
},
placeholder: type === 3 ? '请输入手机号' : '请输入邮箱地址',
style: {
width: '370px'
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
value: code,
onChange: function onChange(e) {
return setCode(e.target.value);
},
placeholder: type === 3 ? '请输入手机获取的验证码' : '请输入邮箱获取的验证码',
style: {
width: '250px'
}
})
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
disabled: secondsFlag,
onClick: function onClick() {
return getversion();
},
type: "primary",
style: {
marginLeft: '20px',
width: '100px'
},
children: secondsFlag ? "\u91CD\u65B0\u53D1\u9001".concat(seconds, "s") : yzm
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginTop: '30px',
width: '370px',
textAlign: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
style: {
marginRight: '15px'
},
onClick: function onClick() {
if (!code) {
message/* default */.ZP.info('验证码不能为空');
return;
}
if (type === 3) {
PhoneBind();
} else {
EmailBind();
}
},
children: "\u786E\u8BA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
marginLeft: '20px'
},
onClick: function onClick() {
if (type === 3) {
setPhoneshow("none");
} else {
setEmailshow('none');
}
},
children: "\u53D6\u6D88"
})]
})]
});
}
/* harmony default export */ var Detail_UpdataPhone = (UpdataPhone);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/Addleader.tsx
//填写银行卡号等信息
function Addleader(_ref) {
var dispatch = _ref.dispatch,
userid = _ref.userid;
var tailLayout = {
wrapperCol: {
offset: 3,
span: 21
}
};
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: '500px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: form,
name: "basic",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, objectSpread2_default()(objectSpread2_default()({}, tailLayout), {}, {
label: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: "30px"
},
children: "\u5F00\u6237\u884C"
}),
name: "bank",
rules: [{
required: true,
message: '请输入开户行'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
})), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, objectSpread2_default()(objectSpread2_default()({}, tailLayout), {}, {
label: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: "30px"
},
children: "\u652F\u884C"
}),
name: "second_bank",
rules: [{
required: true,
message: '请输入支行'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
})), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, objectSpread2_default()(objectSpread2_default()({}, tailLayout), {}, {
label: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: "30px"
},
children: "\u8D26\u53F7"
}),
name: "card_no",
rules: [{
required: true,
message: '请输入账号'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
})), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
htmlType: "submit",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
form.validateFields().then( /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(vaule) {
var data;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return dispatch({
type: 'competitions/setleader',
payload: objectSpread2_default()({
identifier: identifier,
user_id: userid
}, vaule)
});
case 2:
data = _context.sent;
if (data.status === 0) {
message/* default */.ZP.info('提交成功');
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x) {
return _ref3.apply(this, arguments);
};
}());
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
})),
children: "\u63D0\u4EA4"
})
})]
})
});
}
/* harmony default export */ var Detail_Addleader = (Addleader);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/PerfectuserInfon.tsx
//完善个人信息
var identityMap = {
"teacher": "教师",
"student": "学生",
"professional": "专业人士"
};
function PerfectUser(_ref) {
var _Prize$teams$, _Prize$teams$2, _Prize$teams$3, _Prize$teams$4;
var Prize = _ref.Prize,
Accounts = _ref.Accounts,
dispatch = _ref.dispatch,
userid = _ref.userid;
var _useState = (0,_react_17_0_2_react.useState)('none'),
_useState2 = slicedToArray_default()(_useState, 2),
phoneshow = _useState2[0],
setPhoneshow = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)('none'),
_useState4 = slicedToArray_default()(_useState3, 2),
emailshow = _useState4[0],
setEmailshow = _useState4[1];
function update(_x) {
return _update.apply(this, arguments);
}
function _update() {
_update = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(type) {
var data;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!(type === "1")) {
_context.next = 6;
break;
}
_context.next = 3;
return dispatch({
type: 'competitions/Authentication'
});
case 3:
data = _context.sent;
_context.next = 9;
break;
case 6:
_context.next = 8;
return dispatch({
type: 'competitions/Professional'
});
case 8:
data = _context.sent;
case 9:
if (data.status === 0) {
message/* default */.ZP.info('撤销成功');
}
case 10:
case "end":
return _context.stop();
}
}, _callee);
}));
return _update.apply(this, arguments);
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: 'red'
},
children: "*"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '16px'
},
children: "\u5B9E\u540D\u4FE1\u606F"
}), (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "uncertified" ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '14px',
marginLeft: '20px'
},
children: "\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"
}) : null, (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "uncertified" ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '14px',
marginLeft: '20px',
color: "#0152d9",
cursor: 'pointer'
},
onClick: function onClick() {
dispatch({
type: 'account/setActionTabs',
payload: {
key: 'Account-RealNameAuth'
}
});
},
children: "\u7ACB\u5373\u8BA4\u8BC1"
}) : null]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: '20px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u59D3\u540D\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: Accounts === null || Accounts === void 0 ? void 0 : Accounts.name
}), (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "uncertified" ? null : (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "applying" ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5F85\u5BA1\u6838"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: function onClick() {
return update("1");
},
ghost: true,
style: {
marginLeft: '20px'
},
children: "\u64A4\u9500\u8BA4\u8BC1"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#6ec76e'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-wancheng font-14 ml20"
}), " \u5DF2\u8BA4\u8BC1"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u6027\u522B\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (Accounts === null || Accounts === void 0 ? void 0 : Accounts.gender) === 0 ? '男' : '女'
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: 'red'
},
children: "*"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '16px'
},
children: "\u804C\u4E1A\u4FE1\u606F"
}), (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "uncertified" ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '14px',
marginLeft: '20px'
},
children: "\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"
}) : null, (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "uncertified" ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '14px',
marginLeft: '20px',
color: "#0152d9"
},
onClick: function onClick() {
dispatch({
type: 'account/setActionTabs',
payload: {
key: 'Account-ProfessionalAuth'
}
});
},
children: "\u7ACB\u5373\u8BA4\u8BC1"
}) : null]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: '20px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u804C\u4E1A\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: Accounts && Accounts.identity && identityMap[Accounts.identity]
}), (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "uncertified" ? null : (Accounts === null || Accounts === void 0 ? void 0 : Accounts.authentication) === "applying" ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5F85\u5BA1\u6838"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: function onClick() {
return update("2");
},
ghost: true,
style: {
marginLeft: '20px'
},
children: "\u64A4\u9500\u8BA4\u8BC1"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#6ec76e'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-wancheng font-12 ml20"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5DF2\u8BA4\u8BC1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: function onClick() {
dispatch({
type: 'account/setActionTabs',
payload: {
key: 'Account-ProfessionalAuth'
}
});
},
ghost: true,
style: {
marginLeft: '20px'
},
children: "\u91CD\u65B0\u8BA4\u8BC1"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u5B66\u53F7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (Accounts === null || Accounts === void 0 ? void 0 : Accounts.student_id) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u5B66\u6821\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (Accounts === null || Accounts === void 0 ? void 0 : Accounts.school_name) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u9662\u7CFB\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (Accounts === null || Accounts === void 0 ? void 0 : Accounts.department_name) || '--'
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: 'red'
},
children: "*"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '16px'
},
children: "\u8054\u7CFB\u65B9\u5F0F"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: '20px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '60px',
textAlign: 'right'
},
children: "\u624B\u673A\u53F7\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '150px'
},
children: (Accounts === null || Accounts === void 0 ? void 0 : Accounts.phone) || '--'
}), phoneshow === 'none' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#0152d9',
marginLeft: '20px',
cursor: 'pointer'
},
onClick: function onClick() {
setPhoneshow('block');
},
children: "\u66F4\u6362"
}) : null]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Detail_UpdataPhone, {
type: 3,
dispatch: dispatch,
userid: Accounts === null || Accounts === void 0 ? void 0 : Accounts.id,
isshow: phoneshow,
setPhoneshow: setPhoneshow,
setEmailshow: setEmailshow
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '60px',
textAlign: 'right'
},
children: "Email\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '150px'
},
children: (Accounts === null || Accounts === void 0 ? void 0 : Accounts.mail) || '--'
}), emailshow === 'none' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#0152d9',
marginLeft: '20px',
cursor: 'pointer'
},
onClick: function onClick() {
setEmailshow('block');
},
children: "\u66F4\u6362"
}) : null]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Detail_UpdataPhone, {
type: 4,
dispatch: dispatch,
userid: Accounts === null || Accounts === void 0 ? void 0 : Accounts.id,
isshow: emailshow,
setEmailshow: setEmailshow,
setPhoneshow: setPhoneshow
})]
}), Prize !== null && Prize !== void 0 && Prize.leader && Prize !== null && Prize !== void 0 && Prize.teams && Prize !== null && Prize !== void 0 && (_Prize$teams$ = Prize.teams[0]) !== null && _Prize$teams$ !== void 0 && (_Prize$teams$ = _Prize$teams$.bank_account) !== null && _Prize$teams$ !== void 0 && _Prize$teams$.bank ? /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '16px'
},
children: "\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '12px',
marginLeft: '20px'
},
children: "\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '16px'
},
children: "\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '12px',
marginLeft: '20px'
},
children: "\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Detail_Addleader, {
dispatch: dispatch,
userid: userid
})]
}), Prize !== null && Prize !== void 0 && Prize.leader ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: '20px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '60px',
textAlign: 'right'
},
children: "\u5F00\u6237\u884C\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$2 = Prize.teams[0]) === null || _Prize$teams$2 === void 0 || (_Prize$teams$2 = _Prize$teams$2.bank_account) === null || _Prize$teams$2 === void 0 ? void 0 : _Prize$teams$2.bank) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '60px',
textAlign: 'right'
},
children: "\u652F\u884C\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$3 = Prize.teams[0]) === null || _Prize$teams$3 === void 0 || (_Prize$teams$3 = _Prize$teams$3.bank_account) === null || _Prize$teams$3 === void 0 ? void 0 : _Prize$teams$3.second_bank) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '60px',
textAlign: 'right'
},
children: "\u8D26\u53F7\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (Prize === null || Prize === void 0 ? void 0 : Prize.teams) && (Prize === null || Prize === void 0 || (_Prize$teams$4 = Prize.teams[0]) === null || _Prize$teams$4 === void 0 || (_Prize$teams$4 = _Prize$teams$4.bank_account) === null || _Prize$teams$4 === void 0 ? void 0 : _Prize$teams$4.card_no) || '--'
})]
})]
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(component_ProfessionalAuthModal, {
Scoid: Accounts === null || Accounts === void 0 ? void 0 : Accounts.school_id
}), /*#__PURE__*/(0,jsx_runtime.jsx)(component_RealNameAuthModal, {})]
});
}
/* harmony default export */ var PerfectuserInfon = (PerfectUser);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/AwardPdf.tsx
//获奖证书
var AwardPdf_TabPane = tabs/* default */.Z.TabPane;
function Awardpdf(_ref) {
var Prize = _ref.Prize,
Accounts = _ref.Accounts,
getAccounts = _ref.getAccounts,
dispatch = _ref.dispatch,
userid = _ref.userid;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "fr",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mb100 ",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(tabs/* default */.Z, {
defaultActiveKey: "1",
onChange: function onChange(e) {
if (e === "2") {
getAccounts();
}
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(AwardPdf_TabPane, {
tab: "\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Downloadpdf, {
Prize: Prize
})
}, "1"), /*#__PURE__*/(0,jsx_runtime.jsx)(AwardPdf_TabPane, {
tab: "\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(PerfectuserInfon, {
userid: userid,
dispatch: dispatch,
Prize: Prize,
Accounts: Accounts
})
}, "2")]
})
})
});
}
/* harmony default export */ var AwardPdf = (Awardpdf);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(14477);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.11@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(99232);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/SubmitResult.tsx
var SubmitResult_TabPane = tabs/* default */.Z.TabPane;
function SubmitResult_Ranking(_ref) {
var _ChartRules$stages3, _ChartRules$stages4, _item$children, _item$children3, _HeaderDetail$competi;
var ChartRules = _ref.ChartRules,
ItemData = _ref.ItemData,
getCharts = _ref.getCharts,
Selectkey = _ref.Selectkey,
HeaderDetail = _ref.HeaderDetail,
getChartRules = _ref.getChartRules,
userinfo = _ref.userinfo,
Editable = _ref.Editable,
dispatch = _ref.dispatch,
StaffDetail = _ref.StaffDetail,
qs = _ref.qs;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isUpdate = _useState2[0],
setIsupdate = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
defaultValue = _useState4[0],
setDefaultValue = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(true),
_useState6 = slicedToArray_default()(_useState5, 2),
ClickButton = _useState6[0],
setClickButton = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(),
_useState8 = slicedToArray_default()(_useState7, 2),
item = _useState8[0],
setItem = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(),
_useState10 = slicedToArray_default()(_useState9, 2),
items = _useState10[0],
setItems = _useState10[1];
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
(0,_react_17_0_2_react.useEffect)(function () {
//进入初始化状态为第一个
if (ClickButton) {
var _ChartRules$stages, _ChartRules$stages2;
var data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages = ChartRules.stages) === null || _ChartRules$stages === void 0 ? void 0 : _ChartRules$stages[0];
setItem(data);
var datas = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages2 = ChartRules.stages) === null || _ChartRules$stages2 === void 0 || (_ChartRules$stages2 = _ChartRules$stages2[0]) === null || _ChartRules$stages2 === void 0 || (_ChartRules$stages2 = _ChartRules$stages2.children) === null || _ChartRules$stages2 === void 0 ? void 0 : _ChartRules$stages2[0];
setItems(datas);
if (data !== null && data !== void 0 && data.id) {
var _ChartRules$rule_cont;
getCharts(data === null || data === void 0 ? void 0 : data.id);
setDefaultValue(((_ChartRules$rule_cont = ChartRules.rule_contents) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(data === null || data === void 0 ? void 0 : data.id);
})) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont[0]) === null || _ChartRules$rule_cont === void 0 ? void 0 : _ChartRules$rule_cont['content']) || '');
} else {
var _ChartRules$rule_cont2;
getCharts(0);
setDefaultValue(((_ChartRules$rule_cont2 = ChartRules.rule_contents) === null || _ChartRules$rule_cont2 === void 0 || (_ChartRules$rule_cont2 = _ChartRules$rule_cont2.filter(function (item) {
return parseInt(item.competition_stage_id) === 0;
})) === null || _ChartRules$rule_cont2 === void 0 || (_ChartRules$rule_cont2 = _ChartRules$rule_cont2[0]) === null || _ChartRules$rule_cont2 === void 0 ? void 0 : _ChartRules$rule_cont2['content']) || '');
}
}
}, [ChartRules]);
function updateitem() {
return _updateitem.apply(this, arguments);
}
function _updateitem() {
_updateitem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var id, _ChartRules$rule_cont4, res, _ChartRules$rule_cont5, _res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (defaultValue) {
_context.next = 3;
break;
}
message/* default */.ZP.info('内容不能为空');
return _context.abrupt("return");
case 3:
setClickButton(false);
id = item === null || item === void 0 ? void 0 : item.id;
if (!id) {
_context.next = 12;
break;
}
_context.next = 8;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/update_md_content.json"), {
method: 'post',
body: {
competition_module_id: Selectkey,
content: defaultValue,
md_content_id: (_ChartRules$rule_cont4 = ChartRules.rule_contents) === null || _ChartRules$rule_cont4 === void 0 || (_ChartRules$rule_cont4 = _ChartRules$rule_cont4.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(id);
})) === null || _ChartRules$rule_cont4 === void 0 || (_ChartRules$rule_cont4 = _ChartRules$rule_cont4[0]) === null || _ChartRules$rule_cont4 === void 0 ? void 0 : _ChartRules$rule_cont4['id'],
stage_id: item === null || item === void 0 ? void 0 : item.id
}
});
case 8:
res = _context.sent;
if (res.status === 0) {
message/* default */.ZP.info('更新成功');
setIsupdate(false);
getChartRules();
}
_context.next = 16;
break;
case 12:
_context.next = 14;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/update_md_content.json"), {
method: 'post',
body: {
competition_module_id: Selectkey,
content: defaultValue,
md_content_id: (_ChartRules$rule_cont5 = ChartRules.rule_contents) === null || _ChartRules$rule_cont5 === void 0 || (_ChartRules$rule_cont5 = _ChartRules$rule_cont5.filter(function (item) {
return parseInt(item.competition_stage_id) === 0;
})) === null || _ChartRules$rule_cont5 === void 0 || (_ChartRules$rule_cont5 = _ChartRules$rule_cont5[0]) === null || _ChartRules$rule_cont5 === void 0 ? void 0 : _ChartRules$rule_cont5['id'],
stage_id: item === null || item === void 0 ? void 0 : item.id
}
});
case 14:
_res = _context.sent;
if (_res.status === 0) {
message/* default */.ZP.info('更新成功');
setIsupdate(false);
getChartRules();
}
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
return _updateitem.apply(this, arguments);
}
var columns = [{
title: 'request_id',
dataIndex: 'request_id',
width: 120,
align: 'center',
key: 'name',
render: function render(a, b, c) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: a
});
}
}, {
title: '附件',
dataIndex: 'file_name',
align: 'center',
width: 150,
key: 'file_name',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
title: text,
children: text && (text === null || text === void 0 ? void 0 : text.length) >= 10 ? (text === null || text === void 0 ? void 0 : text.substr(0, 10)) + '...' : text || '--'
})
});
}
}, {
title: '提交人',
dataIndex: 'user_name',
key: 'user_name',
width: 100,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
title: text,
children: text && (text === null || text === void 0 ? void 0 : text.length) >= 6 ? (text === null || text === void 0 ? void 0 : text.substr(0, 6)) + '...' : text || '--'
});
}
// align:'center',
}, {
title: '提交时间',
dataIndex: 'created_at',
key: 'created_at',
align: 'center'
}, {
title: '状态',
dataIndex: 'status',
key: 'status',
width: 50,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text === 1 ? '计算中' : text === 2 ? '完成' : text === 0 ? '待计算' : text === 3 && '错误'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name) === '计图挑战热身赛' && {
title: '数据指标1',
dataIndex: 'data_ranking',
key: 'data_ranking',
align: 'center',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name) === '计图挑战热身赛' && {
title: '数据指标2',
dataIndex: 'data_other',
key: 'data_other',
align: 'left',
render: function render(text) {
if ((text === null || text === void 0 ? void 0 : text.length) > 0) {
return text === null || text === void 0 ? void 0 : text.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [item === null || item === void 0 ? void 0 : item.name, "\uFF1A", item === null || item === void 0 ? void 0 : item.value, " ", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
});
});
} else {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "--"
});
}
}
}, (item === null || item === void 0 ? void 0 : item.display_four_indicators) && {
title: 'mask accuary',
dataIndex: 'data_ranking',
key: 'data_ranking',
align: 'left',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
});
}
}, (item === null || item === void 0 ? void 0 : item.display_four_indicators) && {
title: '美学评分',
dataIndex: 'data_other',
key: 'data_other',
align: 'left',
render: function render(text) {
var _text$find;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'score';
})) === null || _text$find === void 0 ? void 0 : _text$find.value) || '--'
});
}
}, (item === null || item === void 0 ? void 0 : item.display_four_indicators) && {
title: 'FID',
dataIndex: 'data_other',
key: 'data_other',
align: 'left',
render: function render(text) {
var _text$find2;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find2 = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'fid';
})) === null || _text$find2 === void 0 ? void 0 : _text$find2.value) || '--'
});
}
}, (item === null || item === void 0 ? void 0 : item.display_four_indicators) && {
title: '总分',
dataIndex: 'data_other',
key: 'data_other',
align: 'left',
render: function render(text) {
var _text$find3;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find3 = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'total_score';
})) === null || _text$find3 === void 0 ? void 0 : _text$find3.value) || '--'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name.includes('可微渲染新视角生成赛题')) && {
title: 'Car',
dataIndex: 'data_ranking',
key: 'data_ranking',
align: 'center',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name.includes('可微渲染新视角生成赛题')) && {
title: 'Coffee',
dataIndex: 'data_other',
key: 'data_other',
align: 'center',
render: function render(text) {
var _text$find4;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find4 = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'Coffee';
})) === null || _text$find4 === void 0 ? void 0 : _text$find4.value) || '--'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name.includes('可微渲染新视角生成赛题')) && {
title: 'Easyship',
dataIndex: 'data_other',
key: 'data_other',
align: 'center',
render: function render(text) {
var _text$find5;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find5 = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'Easyship';
})) === null || _text$find5 === void 0 ? void 0 : _text$find5.value) || '--'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name.includes('可微渲染新视角生成赛题')) && {
title: 'Scar',
dataIndex: 'data_other',
key: 'data_other',
align: 'center',
render: function render(text) {
var _text$find6;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find6 = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'Scar';
})) === null || _text$find6 === void 0 ? void 0 : _text$find6.value) || '--'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name.includes('可微渲染新视角生成赛题')) && {
title: 'Scarf',
dataIndex: 'data_other',
key: 'data_other',
align: 'center',
render: function render(text) {
var _text$find7;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find7 = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'Scarf';
})) === null || _text$find7 === void 0 ? void 0 : _text$find7.value) || '--'
});
}
}, !(item !== null && item !== void 0 && item.display_four_indicators) && (item === null || item === void 0 ? void 0 : item.name.includes('可微渲染新视角生成赛题')) && {
title: '总分',
dataIndex: 'data_other',
key: 'data_other',
align: 'center',
render: function render(text) {
var _text$find8;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (text === null || text === void 0 || (_text$find8 = text.find(function (item) {
return (item === null || item === void 0 ? void 0 : item.name) === 'Total';
})) === null || _text$find8 === void 0 ? void 0 : _text$find8.value) || '--'
});
}
}, {
title: '操作',
dataIndex: 'result_url',
width: 50,
key: 'result_url',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
href: text,
target: "_blank",
download: "\u9644\u4EF6",
children: "\u4E0B\u8F7D"
});
}
}].filter(function (item) {
return !!item;
});
;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [(ChartRules === null || ChartRules === void 0 || (_ChartRules$stages3 = ChartRules.stages) === null || _ChartRules$stages3 === void 0 ? void 0 : _ChartRules$stages3.length) > 0 ? null : /*#__PURE__*/(0,jsx_runtime.jsx)(RankingNuLL, {}), (ChartRules === null || ChartRules === void 0 || (_ChartRules$stages4 = ChartRules.stages) === null || _ChartRules$stages4 === void 0 ? void 0 : _ChartRules$stages4.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
animated: true,
tabBarExtraContent: userinfo !== null && userinfo !== void 0 && userinfo.admin || userinfo !== null && userinfo !== void 0 && userinfo.business || Editable ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
onClick: function onClick() {
setIsupdate(true);
},
children: qs['编辑']
}) : StaffDetail.enrolled && (item === null || item === void 0 ? void 0 : item.start_time) && (item === null || item === void 0 ? void 0 : item.end_time) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u63D0\u4EA4\u65F6\u95F4\uFF1A", dayjs_min_default()(item === null || item === void 0 ? void 0 : item.start_time).format("YYYY-MM-DD HH:mm:ss"), "\u81F3", dayjs_min_default()(item === null || item === void 0 ? void 0 : item.end_time).format("YYYY-MM-DD HH:mm:ss"), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
marginLeft: '20px'
},
disabled: dayjs_min_default()(item === null || item === void 0 ? void 0 : item.start_time).unix() > dayjs_min_default()(dayjs_min_default()().format('YYYY-MM-DD HH:mm:s')).unix() || dayjs_min_default()(dayjs_min_default()().format('YYYY-MM-DD HH:mm:s')).unix() > dayjs_min_default()(item === null || item === void 0 ? void 0 : item.end_time).unix(),
onClick: function onClick() {
// <moment(item?.end_time).unix()
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {
key: 'md-tab',
params: {
value: (items === null || items === void 0 ? void 0 : items.id) || (item === null || item === void 0 ? void 0 : item.id),
id: HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id
}
}
});
},
children: "\u63D0\u4EA4\u7ED3\u679C"
})]
}),
onChange: function onChange(e) {
var _ChartRules$stages5, _data$children, _ChartRules$rule_cont3;
setIsupdate(false);
var data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages5 = ChartRules.stages) === null || _ChartRules$stages5 === void 0 ? void 0 : _ChartRules$stages5.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
var datas = data === null || data === void 0 || (_data$children = data.children) === null || _data$children === void 0 ? void 0 : _data$children[0];
setItems(datas);
setItem(data);
setDefaultValue(((_ChartRules$rule_cont3 = ChartRules.rule_contents) === null || _ChartRules$rule_cont3 === void 0 || (_ChartRules$rule_cont3 = _ChartRules$rule_cont3.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(data === null || data === void 0 ? void 0 : data.id);
})) === null || _ChartRules$rule_cont3 === void 0 || (_ChartRules$rule_cont3 = _ChartRules$rule_cont3[0]) === null || _ChartRules$rule_cont3 === void 0 ? void 0 : _ChartRules$rule_cont3['content']) || '');
getCharts((datas === null || datas === void 0 ? void 0 : datas.id) || e);
},
children: ChartRules && ChartRules.stages.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(SubmitResult_TabPane, {
tab: item.name,
children: isUpdate === false && ChartRules && ChartRules.rule_contents.map(function (items, keys) {
if (item.id === items.competition_stage_id) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: items.content === undefined || items.content === null ? "" : items.content
}, keys);
} else if (item.id === null && items.competition_stage_id === 0) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: items.content === undefined || items.content === null ? "" : items.content
}, keys);
}
})
}, item.id === null ? 0 : item.id);
})
}), (item === null || item === void 0 || (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
activeKey: (items === null || items === void 0 ? void 0 : items.id) + '',
onChange: function onChange(e) {
var _item$children2;
var data = item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
setItems(data);
getCharts(e);
//获取参数
},
children: item === null || item === void 0 || (_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(SubmitResult_TabPane, {
tab: item.name
}, item.id === null ? 0 : item.id);
})
}), isUpdate && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
defaultValue: defaultValue,
onChange: function onChange(e) {
setDefaultValue(e);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
marginTop: '10px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
width: '90px'
},
type: "primary",
onClick: function onClick() {
return updateitem();
},
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
marginLeft: '30px',
width: '90px'
},
onClick: function onClick() {
return setIsupdate(false);
},
children: "\u53D6\u6D88"
})]
})]
}), ((_HeaderDetail$competi = HeaderDetail.competition_modules.filter(function (item) {
return item.id === Selectkey;
})) === null || _HeaderDetail$competi === void 0 || (_HeaderDetail$competi = _HeaderDetail$competi[0]) === null || _HeaderDetail$competi === void 0 ? void 0 : _HeaderDetail$competi.show_leaderboard) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
dataSource: ItemData === null || ItemData === void 0 ? void 0 : ItemData.results,
columns: columns
})]
});
}
/* harmony default export */ var SubmitResult = (SubmitResult_Ranking);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(53864);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/MakeItem.tsx
var MakeItem_TabPane = tabs/* default */.Z.TabPane;
function MakeItem_Ranking(_ref) {
var _ChartRules$stages2, _ChartRules$stages5, _ChartRules$stages6, _item$children, _item$children3, _ItemData$results;
var loading = _ref.loading,
ChartRules = _ref.ChartRules,
ItemData = _ref.ItemData,
getCharts = _ref.getCharts,
Selectkey = _ref.Selectkey,
HeaderDetail = _ref.HeaderDetail,
getChartRules = _ref.getChartRules,
userinfo = _ref.userinfo,
Editable = _ref.Editable,
dispatch = _ref.dispatch,
StaffDetail = _ref.StaffDetail;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isUpdate = _useState2[0],
setIsupdate = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
defaultValue = _useState4[0],
setDefaultValue = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(true),
_useState6 = slicedToArray_default()(_useState5, 2),
ClickButton = _useState6[0],
setClickButton = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(),
_useState8 = slicedToArray_default()(_useState7, 2),
item = _useState8[0],
setItem = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(),
_useState10 = slicedToArray_default()(_useState9, 2),
items = _useState10[0],
setItems = _useState10[1];
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
var _useState11 = (0,_react_17_0_2_react.useState)({
page: 1,
limit: 10,
sort: 'desc'
}),
_useState12 = slicedToArray_default()(_useState11, 2),
params = _useState12[0],
setparams = _useState12[1];
(0,_react_17_0_2_react.useEffect)(function () {
var _ChartRules$stages;
//进入初始化状态为第一个
if (ClickButton && ChartRules !== null && ChartRules !== void 0 && (_ChartRules$stages = ChartRules.stages) !== null && _ChartRules$stages !== void 0 && _ChartRules$stages[0]) {
getDate();
}
}, [ChartRules === null || ChartRules === void 0 || (_ChartRules$stages2 = ChartRules.stages) === null || _ChartRules$stages2 === void 0 ? void 0 : _ChartRules$stages2[0]]);
var getDate = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _ChartRules$stages3, _ChartRules$stages4;
var data, datas;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages3 = ChartRules.stages) === null || _ChartRules$stages3 === void 0 ? void 0 : _ChartRules$stages3[0];
setItem(data);
datas = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages4 = ChartRules.stages) === null || _ChartRules$stages4 === void 0 || (_ChartRules$stages4 = _ChartRules$stages4[0]) === null || _ChartRules$stages4 === void 0 || (_ChartRules$stages4 = _ChartRules$stages4.children) === null || _ChartRules$stages4 === void 0 ? void 0 : _ChartRules$stages4[0];
setItems(datas);
params.id = (datas === null || datas === void 0 ? void 0 : datas.id) || (data === null || data === void 0 ? void 0 : data.id), setparams(objectSpread2_default()({}, params));
_context.next = 7;
return getCharts(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
stage_id: params.id
}));
case 7:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getDate() {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [(ChartRules === null || ChartRules === void 0 || (_ChartRules$stages5 = ChartRules.stages) === null || _ChartRules$stages5 === void 0 ? void 0 : _ChartRules$stages5.length) > 0 ? null : /*#__PURE__*/(0,jsx_runtime.jsx)(RankingNuLL, {}), (ChartRules === null || ChartRules === void 0 || (_ChartRules$stages6 = ChartRules.stages) === null || _ChartRules$stages6 === void 0 ? void 0 : _ChartRules$stages6.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
tabBarStyle: {
height: 65,
marginLeft: 35,
marginRight: 30
},
animated: true,
onChange: ( /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(e) {
var _ChartRules$stages7, _data$children, _ChartRules$rule_cont;
var data, datas;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
setIsupdate(false);
data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages7 = ChartRules.stages) === null || _ChartRules$stages7 === void 0 ? void 0 : _ChartRules$stages7.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
datas = data === null || data === void 0 || (_data$children = data.children) === null || _data$children === void 0 ? void 0 : _data$children[0];
setItems(datas);
setItem(data);
setDefaultValue(((_ChartRules$rule_cont = ChartRules.rule_contents) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(data === null || data === void 0 ? void 0 : data.id);
})) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont[0]) === null || _ChartRules$rule_cont === void 0 ? void 0 : _ChartRules$rule_cont['content']) || '');
params.page = 1, params.limit = 10, params.id = (datas === null || datas === void 0 ? void 0 : datas.id) || e, setparams(objectSpread2_default()({}, params));
_context2.next = 9;
return getCharts(objectSpread2_default()({}, params));
case 9:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function (_x) {
return _ref3.apply(this, arguments);
};
}()),
children: ChartRules && ChartRules.stages.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(MakeItem_TabPane, {
tab: item.name
}, item.id === null ? 0 : item.id);
})
}), (item === null || item === void 0 || (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
activeKey: (items === null || items === void 0 ? void 0 : items.id) + '',
onChange: ( /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(e) {
var _item$children2;
var data;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
data = item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
setItems(data);
params.page = 1, params.limit = 10, params.id = e, setparams(objectSpread2_default()({}, params));
_context3.next = 5;
return getCharts(objectSpread2_default()({}, params));
case 5:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function (_x2) {
return _ref4.apply(this, arguments);
};
}()),
children: item === null || item === void 0 || (_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(MakeItem_TabPane, {
tab: item.name
}, item.id === null ? 0 : item.id);
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
height: 10,
background: '#F5F5F5'
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: "20px 30px"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
cursor: 'pointer',
marginRight: 20
},
onClick: function onClick() {
params.page = 1, params.sort = params.sort === 'desc' ? 'asc' : 'desc';
setparams(objectSpread2_default()({}, params));
getCharts(objectSpread2_default()({}, params));
},
children: ["\u6309\u63D0\u4EA4\u65F6\u95F4", params.sort === 'asc' ? '正' : '倒', "\u5E8F\u6392\u5E8F ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont font14 ".concat(params.sort === 'asc' ? 'icon-jiantou9' : 'icon-changyongtubiao-xianxingdaochu-zhuanqu-')
})]
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
onSearch: function onSearch(e) {
params.page = 1, params.search = e, setparams(objectSpread2_default()({}, params));
getCharts(objectSpread2_default()({}, params));
},
style: {
width: '82%'
},
placeholder: "\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: loading,
children: ItemData === null || ItemData === void 0 || (_ItemData$results = ItemData.results) === null || _ItemData$results === void 0 ? void 0 : _ItemData$results.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
border: '1px solid #E3EFFC',
height: 100,
borderRadius: '2px 2px 0px 0px',
marginTop: index === 0 ? 14 : 30
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
height: 60,
padding: 10,
display: 'flex',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + '/images/' + (item === null || item === void 0 ? void 0 : item.image_url),
style: {
width: 40,
height: 40,
borderRadius: '50%'
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginLeft: 10
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#333333',
fontWeight: 500,
fontSize: '16px'
},
children: item === null || item === void 0 ? void 0 : item.user_name
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#999999',
fontWeight: 400,
fontSize: '14px',
marginLeft: 60
},
children: ["\u6240\u5C5E\u6218\u961F", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
marginLeft: 10,
color: '#333'
},
children: (item === null || item === void 0 ? void 0 : item.team_name) || '- -'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#333333',
fontWeight: 400,
fontSize: '14px',
marginLeft: 40
},
children: ["\u5B66\u6821 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
marginLeft: 10,
color: '#333'
},
children: (item === null || item === void 0 ? void 0 : item.school_name) || '- -'
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
background: '#EEF2F8',
height: 40,
borderRadius: '0px 0px 2px 2px',
paddingLeft: 60,
paddingRight: 40,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#666666',
fontSize: '12px'
},
children: ["\u63D0\u4EA4\u65F6\u95F4\uFF1A", item === null || item === void 0 ? void 0 : item.created_at]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#666666',
fontSize: '12px',
margin: '0px 40px'
},
children: ["\u6D88\u8017\u5185\u5B58\uFF1A", (item === null || item === void 0 ? void 0 : item.ts_mem) || '- -', "MB"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#666666',
fontSize: '12px'
},
children: ["\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A", (item === null || item === void 0 ? void 0 : item.ts_time) || '- -', "\u79D2"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
style: {
display: 'flex',
alignItems: 'center'
},
href: "/tasks/".concat(item === null || item === void 0 ? void 0 : item.game_identifier),
target: "_blank",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-chakandaima",
style: {
marginRight: 4
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
lineHeight: '14px'
},
children: "\u67E5\u770B\u4EE3\u7801"
})]
})]
})]
});
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
total: ItemData === null || ItemData === void 0 ? void 0 : ItemData.total_count,
pageSize: 10,
hideOnSinglePage: true,
style: {
marginTop: 40,
textAlign: 'center'
},
showSizeChanger: false,
current: params.page,
onChange: function onChange(page, pageSize) {
params.page = page, setparams(objectSpread2_default()({}, params));
getCharts(objectSpread2_default()({}, params));
}
})]
})]
});
}
/* harmony default export */ var MakeItem = (MakeItem_Ranking);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/Challitems.tsx
//1 2 3 排名数据样式
var toChinesNum = function toChinesNum(num) {
var changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; //changeNum[0] = "零"
var unit = ["", "十", "百", "千", "万"];
num = parseInt(num);
var getWan = function getWan(temp) {
var strArr = temp.toString().split("").reverse();
var newNum = "";
for (var i = 0; i < strArr.length; i++) {
newNum = (i == 0 && strArr[i] == 0 ? "" : i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i])) + newNum;
}
return newNum;
};
var overWan = Math.floor(num / 10000);
var noWan = num % 10000;
if (noWan.toString().length < 4) noWan = "0" + noWan;
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
};
function Challitems_RankingItem(_ref) {
var _item$challenges;
var item = _ref.item,
index = _ref.index,
StaffDetail = _ref.StaffDetail;
var _useState = (0,_react_17_0_2_react.useState)(true),
_useState2 = slicedToArray_default()(_useState, 2),
content = _useState2[0],
setcontent = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(true),
_useState4 = slicedToArray_default()(_useState3, 2),
isopen = _useState4[0],
setisonen = _useState4[1];
var divcontent = (0,_react_17_0_2_react.useRef)();
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
border: '1px solid #E3EFFC',
borderRadius: '2px',
marginTop: 20
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: 10,
display: 'flex',
position: 'relative'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: env/* default */.Z.IMG_SERVER + '/' + (item === null || item === void 0 ? void 0 : item.pic),
style: {
width: 220,
height: 130,
borderRadius: '4px'
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginLeft: 20,
width: '75%'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#333333',
fontWeight: 500,
fontSize: '16px'
},
children: ["\u4EFB\u52A1", toChinesNum(index + 1), "\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#333',
fontWeight: '400'
},
children: item === null || item === void 0 ? void 0 : item.name
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#9096A3'
},
children: ["\u5173\u5361", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#333333',
marginLeft: 5
},
children: item === null || item === void 0 ? void 0 : item.challenges_count
}), " "]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
ref: divcontent,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
style: {
maxHeight: content && 100
},
value: item === null || item === void 0 ? void 0 : item.description
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
textAlign: 'center',
color: '#145DFF',
cursor: 'pointer'
},
onClick: function onClick() {
setcontent(!content);
},
children: [content ? '阅读全文 ' : '收起全文 ', /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont font14 ".concat(content ? 'icon-jiantou9' : 'icon-changyongtubiao-xianxingdaochu-zhuanqu-')
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
marginTop: 14,
maxHeight: isopen && 58,
overflow: 'hidden'
},
children: item === null || item === void 0 || (_item$challenges = item.challenges) === null || _item$challenges === void 0 ? void 0 : _item$challenges.map(function (items, j) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginTop: j === 0 ? 0 : 12
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shixunti2 c-light-primary font20"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
marginLeft: 10
},
children: ["\u7B2C", j + 1, "\u5173", items === null || items === void 0 ? void 0 : items.name]
})]
});
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
position: 'absolute',
bottom: 14,
right: 10,
color: '#145DFF',
cursor: 'pointer'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
onClick: function onClick() {
setisonen(!isopen);
},
children: [isopen ? '展开' : '收起', " ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont font14 ".concat(isopen ? 'icon-jiantou9' : 'icon-changyongtubiao-xianxingdaochu-zhuanqu-')
})]
}), " ", (StaffDetail === null || StaffDetail === void 0 ? void 0 : StaffDetail.enrolled) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
onClick: function onClick() {
window.open("/shixuns/".concat(item === null || item === void 0 ? void 0 : item.identifier, "/challenges"));
},
style: {
marginLeft: 30
},
type: "primary",
children: "\u5F00\u542F\u6311\u6218"
})]
})]
})]
})
});
}
/* harmony default export */ var Challitems = (Challitems_RankingItem);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/Entrance.tsx
var Entrance_TabPane = tabs/* default */.Z.TabPane;
function Entrance_Ranking(_ref) {
var _ChartRules$stages2, _ChartRules$stages5, _ChartRules$stages6, _item$children, _item$children3, _ItemData$results;
var loading = _ref.loading,
ChartRules = _ref.ChartRules,
ItemData = _ref.ItemData,
getCharts = _ref.getCharts,
Selectkey = _ref.Selectkey,
HeaderDetail = _ref.HeaderDetail,
getChartRules = _ref.getChartRules,
userinfo = _ref.userinfo,
Editable = _ref.Editable,
dispatch = _ref.dispatch,
StaffDetail = _ref.StaffDetail;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
isUpdate = _useState2[0],
setIsupdate = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
defaultValue = _useState4[0],
setDefaultValue = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(true),
_useState6 = slicedToArray_default()(_useState5, 2),
ClickButton = _useState6[0],
setClickButton = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(),
_useState8 = slicedToArray_default()(_useState7, 2),
item = _useState8[0],
setItem = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(),
_useState10 = slicedToArray_default()(_useState9, 2),
items = _useState10[0],
setItems = _useState10[1];
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
var _useState11 = (0,_react_17_0_2_react.useState)({
page: 1,
limit: 10
}),
_useState12 = slicedToArray_default()(_useState11, 2),
params = _useState12[0],
setparams = _useState12[1];
console.log('loading', loading);
var _useState13 = (0,_react_17_0_2_react.useState)(),
_useState14 = slicedToArray_default()(_useState13, 2),
openitem = _useState14[0],
setopenitem = _useState14[1];
(0,_react_17_0_2_react.useEffect)(function () {
var _ChartRules$stages;
//进入初始化状态为第一个
if (ClickButton && ChartRules !== null && ChartRules !== void 0 && (_ChartRules$stages = ChartRules.stages) !== null && _ChartRules$stages !== void 0 && _ChartRules$stages[0]) {
getDate();
}
}, [ChartRules === null || ChartRules === void 0 || (_ChartRules$stages2 = ChartRules.stages) === null || _ChartRules$stages2 === void 0 ? void 0 : _ChartRules$stages2[0]]);
var getDate = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _ChartRules$stages3, _ChartRules$stages4;
var data, datas;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages3 = ChartRules.stages) === null || _ChartRules$stages3 === void 0 ? void 0 : _ChartRules$stages3[0];
setItem(data);
datas = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages4 = ChartRules.stages) === null || _ChartRules$stages4 === void 0 || (_ChartRules$stages4 = _ChartRules$stages4[0]) === null || _ChartRules$stages4 === void 0 || (_ChartRules$stages4 = _ChartRules$stages4.children) === null || _ChartRules$stages4 === void 0 ? void 0 : _ChartRules$stages4[0];
setItems(datas);
params.id = (datas === null || datas === void 0 ? void 0 : datas.id) || (data === null || data === void 0 ? void 0 : data.id), setparams(objectSpread2_default()({}, params));
_context.next = 7;
return getCharts(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
stage_id: params.id
}));
case 7:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getDate() {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [(ChartRules === null || ChartRules === void 0 || (_ChartRules$stages5 = ChartRules.stages) === null || _ChartRules$stages5 === void 0 ? void 0 : _ChartRules$stages5.length) > 0 ? null : /*#__PURE__*/(0,jsx_runtime.jsx)(RankingNuLL, {}), (ChartRules === null || ChartRules === void 0 || (_ChartRules$stages6 = ChartRules.stages) === null || _ChartRules$stages6 === void 0 ? void 0 : _ChartRules$stages6.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
tabBarStyle: {
height: 65,
marginLeft: 35,
marginRight: 30
},
animated: true,
onChange: ( /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(e) {
var _ChartRules$stages7, _data$children, _ChartRules$rule_cont;
var data, datas;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
setIsupdate(false);
data = ChartRules === null || ChartRules === void 0 || (_ChartRules$stages7 = ChartRules.stages) === null || _ChartRules$stages7 === void 0 ? void 0 : _ChartRules$stages7.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
datas = data === null || data === void 0 || (_data$children = data.children) === null || _data$children === void 0 ? void 0 : _data$children[0];
setItems(datas);
setItem(data);
setDefaultValue(((_ChartRules$rule_cont = ChartRules.rule_contents) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont.filter(function (item) {
return parseInt(item.competition_stage_id) === parseInt(data === null || data === void 0 ? void 0 : data.id);
})) === null || _ChartRules$rule_cont === void 0 || (_ChartRules$rule_cont = _ChartRules$rule_cont[0]) === null || _ChartRules$rule_cont === void 0 ? void 0 : _ChartRules$rule_cont['content']) || '');
params.page = 1, params.limit = 10, params.id = (datas === null || datas === void 0 ? void 0 : datas.id) || e, setparams(objectSpread2_default()({}, params));
_context2.next = 9;
return getCharts(objectSpread2_default()({}, params));
case 9:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function (_x) {
return _ref3.apply(this, arguments);
};
}()),
children: ChartRules && ChartRules.stages.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(Entrance_TabPane, {
tab: item.name
}, item.id === null ? 0 : item.id);
})
}), (item === null || item === void 0 || (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
activeKey: (items === null || items === void 0 ? void 0 : items.id) + '',
tabBarStyle: {
height: 65,
marginLeft: 35,
marginRight: 30
},
onChange: ( /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(e) {
var _item$children2;
var data;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
data = item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.filter(function (item) {
return parseInt(e) === parseInt(item === null || item === void 0 ? void 0 : item.id);
})[0];
setItems(data);
params.page = 1, params.limit = 10, params.id = e, setparams(objectSpread2_default()({}, params));
_context3.next = 5;
return getCharts(objectSpread2_default()({}, params));
case 5:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function (_x2) {
return _ref4.apply(this, arguments);
};
}()),
children: item === null || item === void 0 || (_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(Entrance_TabPane, {
tab: item.name
}, item.id === null ? 0 : item.id);
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
height: 10,
background: '#F5F5F5'
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: "20px 30px"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
justifyContent: 'space-between'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#9096A3'
},
children: ["\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#333333',
marginLeft: 5
},
children: [ItemData === null || ItemData === void 0 ? void 0 : ItemData.start_time, "~", ItemData === null || ItemData === void 0 ? void 0 : ItemData.end_time]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#9096A3'
},
children: ["\u6210\u7EE9\u6765\u6E90", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#333333',
marginLeft: 5
},
children: (ItemData === null || ItemData === void 0 ? void 0 : ItemData.score_source) === 0 ? '经验值' : '预测准确率'
}), " "]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: loading,
children: ItemData === null || ItemData === void 0 || (_ItemData$results = ItemData.results) === null || _ItemData$results === void 0 ? void 0 : _ItemData$results.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(Challitems, {
StaffDetail: StaffDetail,
item: item,
index: index
});
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
total: ItemData === null || ItemData === void 0 ? void 0 : ItemData.total_count,
pageSize: 10,
hideOnSinglePage: true,
style: {
marginTop: 40,
textAlign: 'center'
},
showSizeChanger: false,
current: params.page,
onChange: function onChange(page, pageSize) {
params.page = page, setparams(objectSpread2_default()({}, params));
getCharts(objectSpread2_default()({}, params));
}
})]
})]
});
}
/* harmony default export */ var Entrance = (Entrance_Ranking);
// EXTERNAL MODULE: ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx
var JoinModel = __webpack_require__(23371);
// EXTERNAL MODULE: ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx
var Addteams = __webpack_require__(8873);
;// CONCATENATED MODULE: ./src/pages/Competitions/Detail/index.tsx
var Detail_excluded = ["globalSetting", "loading", "dispatch", "user", "competitions"];
//查看内容
//编辑内容
//排行榜
//获奖证书
var competitionDetails = function competitionDetails(_ref) {
var _HeaderDetail$competi5, _user$userInfo3, _HeaderDetail$permiss, _HeaderDetail$permiss2, _HeaderDetail$permiss3, _HeaderDetail$permiss4, _HeaderDetail$permiss5;
var globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
user = _ref.user,
competitions = _ref.competitions,
props = objectWithoutProperties_default()(_ref, Detail_excluded);
var _useState = (0,_react_17_0_2_react.useState)({
avatar_url: ""
}),
_useState2 = slicedToArray_default()(_useState, 2),
HeaderDetail = _useState2[0],
setHeaderDetail = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 2),
StaffDetail = _useState4[0],
setStaffDetail = _useState4[1];
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
var _useState5 = (0,_react_17_0_2_react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
ItemData = _useState6[0],
setItemData = _useState6[1];
//打开编辑还是打开查看
var _useState7 = (0,_react_17_0_2_react.useState)(true),
_useState8 = slicedToArray_default()(_useState7, 2),
ISsee = _useState8[0],
setIssee = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
MenuItem = _useState10[0],
setMenuItem = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)([]),
_useState12 = slicedToArray_default()(_useState11, 2),
ModelType = _useState12[0],
setModelType = _useState12[1];
//点击了排行榜
var _useState13 = (0,_react_17_0_2_react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
isRanKing = _useState14[0],
setIsRanKing = _useState14[1];
//获取排行榜
var _useState15 = (0,_react_17_0_2_react.useState)(false),
_useState16 = slicedToArray_default()(_useState15, 2),
ChartRules = _useState16[0],
setChartRules = _useState16[1];
//点击了获奖证书
var _useState17 = (0,_react_17_0_2_react.useState)(false),
_useState18 = slicedToArray_default()(_useState17, 2),
isAward = _useState18[0],
setIsAward = _useState18[1];
//获奖证书信息
var _useState19 = (0,_react_17_0_2_react.useState)([]),
_useState20 = slicedToArray_default()(_useState19, 2),
Prize = _useState20[0],
setPrize = _useState20[1];
//获取个人信息 Accounts
var _useState21 = (0,_react_17_0_2_react.useState)([]),
_useState22 = slicedToArray_default()(_useState21, 2),
Accounts = _useState22[0],
SetAccounts = _useState22[1];
//设置选中的条目
var _useState23 = (0,_react_17_0_2_react.useState)([]),
_useState24 = slicedToArray_default()(_useState23, 2),
Selectkey = _useState24[0],
setSeleckjey = _useState24[1];
//md_tab
var _useState25 = (0,_react_17_0_2_react.useState)(false),
_useState26 = slicedToArray_default()(_useState25, 2),
MdTab = _useState26[0],
setMdTab = _useState26[1];
//getTabResults
var _useState27 = (0,_react_17_0_2_react.useState)([]),
_useState28 = slicedToArray_default()(_useState27, 2),
TabResults = _useState28[0],
setTabResults = _useState28[1];
//弹窗
var _useState29 = (0,_react_17_0_2_react.useState)(),
_useState30 = slicedToArray_default()(_useState29, 2),
isshowType = _useState30[0],
setisshowType = _useState30[1];
var _useState31 = (0,_react_17_0_2_react.useState)(true),
_useState32 = slicedToArray_default()(_useState31, 2),
itLoading = _useState32[0],
setItLoading = _useState32[1];
var _useState33 = (0,_react_17_0_2_react.useState)(false),
_useState34 = slicedToArray_default()(_useState33, 2),
showmake = _useState34[0],
setshowmake = _useState34[1];
var _useState35 = (0,_react_17_0_2_react.useState)(false),
_useState36 = slicedToArray_default()(_useState35, 2),
entrance = _useState36[0],
setentrance = _useState36[1];
var _useState37 = (0,_react_17_0_2_react.useState)(false),
_useState38 = slicedToArray_default()(_useState37, 2),
isshowmodal = _useState38[0],
setisshowmodal = _useState38[1];
var _useState39 = (0,_react_17_0_2_react.useState)(false),
_useState40 = slicedToArray_default()(_useState39, 2),
isAddmodel = _useState40[0],
setIsAddmodel = _useState40[1]; //新建战队
var _useState41 = (0,_react_17_0_2_react.useState)(false),
_useState42 = slicedToArray_default()(_useState41, 2),
isJoin = _useState42[0],
setJoin = _useState42[1]; //加入战队
var _useState43 = (0,_react_17_0_2_react.useState)(true),
_useState44 = slicedToArray_default()(_useState43, 2),
isClick = _useState44[0],
setIsClick = _useState44[1]; //增加参数 防止点击过快 多次调用
var loction = (0,_umi_production_exports.useLocation)();
var see = (0,_react_17_0_2_react.useRef)(null);
var qs = competitions.qs;
(0,_react_17_0_2_react.useEffect)(function () {
if (identifier) {
init();
//调用默认加载第一条数据
}
(0,util/* setDocumentTitle */.Dk)('竞赛');
}, [identifier]);
function init() {
return _init.apply(this, arguments);
}
function _init() {
_init = 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.t0 = setStaffDetail;
_context.next = 3;
return dispatch({
type: 'competitions/getStaff',
payload: {
identifier: identifier
}
});
case 3:
_context.t1 = _context.sent;
(0, _context.t0)(_context.t1);
_context.next = 7;
return dispatch({
type: 'competitions/getHeader',
payload: {
identifier: identifier
}
});
case 7:
res = _context.sent;
setHeaderDetail(res);
(0,util/* setDocumentTitle */.Dk)((res === null || res === void 0 ? void 0 : res.name) || '竞赛');
case 10:
case "end":
return _context.stop();
}
}, _callee);
}));
return _init.apply(this, arguments);
}
(0,_react_17_0_2_react.useEffect)(function () {
var _loction$query;
// console.log('--------',parseInt(loction?.query?.type)===1);
setisshowType(parseInt(loction === null || loction === void 0 || (_loction$query = loction.query) === null || _loction$query === void 0 ? void 0 : _loction$query.type) === 1);
}, [loction]);
(0,_react_17_0_2_react.useEffect)(function () {
var _HeaderDetail$competi;
if ((HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$competi = HeaderDetail.competition_modules) === null || _HeaderDetail$competi === void 0 ? void 0 : _HeaderDetail$competi.length) > 0) {
var _loction$query2, _HeaderDetail$competi3;
if ((loction === null || loction === void 0 || (_loction$query2 = loction.query) === null || _loction$query2 === void 0 ? void 0 : _loction$query2.active) === '赛题发布') {
var _HeaderDetail$competi2;
var item = HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$competi2 = HeaderDetail.competition_modules) === null || _HeaderDetail$competi2 === void 0 ? void 0 : _HeaderDetail$competi2.find(function (e) {
return e.name === '赛题发布';
});
if (item) {
getrightdatas(item);
return;
}
}
getrightdatas(HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$competi3 = HeaderDetail.competition_modules) === null || _HeaderDetail$competi3 === void 0 ? void 0 : _HeaderDetail$competi3[0]);
}
}, [HeaderDetail]);
function getrightdatas(_x) {
return _getrightdatas.apply(this, arguments);
}
function _getrightdatas() {
_getrightdatas = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(item) {
var data;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
setSeleckjey(item.id);
Selectkey = item.id;
setMenuItem(item);
if (!(item.module_type === 'entrance')) {
_context2.next = 9;
break;
}
_context2.next = 6;
return dispatch({
type: 'competitions/getItem',
payload: {
url: item.module_url,
module_type: 'entrance'
}
});
case 6:
data = _context2.sent;
_context2.next = 12;
break;
case 9:
_context2.next = 11;
return dispatch({
type: 'competitions/getItem',
payload: {
url: item.module_url
}
});
case 11:
data = _context2.sent;
case 12:
setIsRanKing(false);
setIsAward(false);
setMdTab(false);
setItemData(data);
setshowmake(false);
setentrance(false);
setModelType(item.module_type);
if (item.module_type === "chart") {
setIsRanKing(true);
setIssee(false);
getChartRules();
} else if (item.module_type === "certificate") {
setIsAward(true);
setIsRanKing(false);
setIssee(false);
getPrize();
} else if (item.module_type === "md_tab") {
setMdTab(true);
setIssee(false);
localStorage.setItem('issee', '2');
setIsRanKing(false);
setIsAward(false);
// getChartRules();
getTabResults();
} else if (item.module_type === "md_shixun") {
setshowmake(true);
setIssee(false);
getTabResults();
} else if (item.module_type === 'entrance') {
setentrance(true);
setIssee(false);
getTabResults();
} else {
setIssee(true);
localStorage.setItem('issee', '1');
}
case 20:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getrightdatas.apply(this, arguments);
}
function gotocourse(_x2, _x3, _x4) {
return _gotocourse.apply(this, arguments);
}
function _gotocourse() {
_gotocourse = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(e, item, url) {
var _user$userInfo4;
var result;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
e.stopPropagation();
if ((0,verifyLogin/* handleVerify */.tJ)(dispatch)) {
_context3.next = 3;
break;
}
return _context3.abrupt("return");
case 3:
if (!(HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.is_authentication && !(user !== null && user !== void 0 && (_user$userInfo4 = user.userInfo) !== null && _user$userInfo4 !== void 0 && _user$userInfo4.authentication))) {
_context3.next = 6;
break;
}
dispatch({
type: 'shixunsDetail/setActionTabs',
payload: {
key: 'Banner-Auth'
}
});
return _context3.abrupt("return");
case 6:
if (!(HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.enroll_url)) {
_context3.next = 9;
break;
}
(0,util/* openNewWindow */.xg)(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.enroll_url);
return _context3.abrupt("return");
case 9:
if (!(url === "ismodel")) {
_context3.next = 23;
break;
}
if (!(item.member_of_course === true)) {
_context3.next = 14;
break;
}
(0,util/* openNewWindow */.xg)("/classrooms/".concat(item.course_id, "/shixun_homework"));
_context3.next = 21;
break;
case 14:
if (item.invite_code) {
_context3.next = 17;
break;
}
message/* default */.ZP.info('本竞赛只面向部分学校/单位开放,你暂时没有参赛资格');
return _context3.abrupt("return");
case 17:
_context3.next = 19;
return dispatch({
type: 'competitions/addApplytojoincourse',
payload: {
invite_code: item.invite_code,
student: 1
}
});
case 19:
result = _context3.sent;
if (result.status === 0) {
(0,util/* openNewWindow */.xg)("/classrooms/".concat(item.course_id, "/shixun_homework"));
}
case 21:
_context3.next = 27;
break;
case 23:
if (!(StaffDetail.enrolled === true)) {
_context3.next = 26;
break;
}
(0,util/* openNewWindow */.xg)(url);
return _context3.abrupt("return");
case 26:
setisshowmodal(true);
// if (url === "personal") {
// if (item.enroll_ended === true) {
// //已截止
// message.info(`报名已截止`);
// return;
// }
// if (StaffDetail.enrolled === true) {
// message.info(`你已经报名,不能重复报名!`);
// return;
// }
// const competitionTeamsresult = await dispatch({
// type: 'competitions/competitionTeams',
// payload: {
// identifier: item.identifier
// }
// })
// if (competitionTeamsresult) {
// message.info('报名成功,预祝您夺得桂冠!')
// }
// } else {
// openNewWindow(url)
// }
case 27:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _gotocourse.apply(this, arguments);
}
function getChartRules() {
return _getChartRules.apply(this, arguments);
}
function _getChartRules() {
_getChartRules = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.t0 = setChartRules;
_context4.next = 3;
return dispatch({
type: 'competitions/ChartRules',
payload: {
identifier: identifier
}
});
case 3:
_context4.t1 = _context4.sent;
_context4.next = 6;
return (0, _context4.t0)(_context4.t1);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getChartRules.apply(this, arguments);
}
function getCharts(_x5) {
return _getCharts.apply(this, arguments);
}
function _getCharts() {
_getCharts = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(id) {
var data;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return dispatch({
type: 'competitions/Charts',
payload: {
identifier: identifier,
stage_id: id
}
});
case 2:
data = _context5.sent;
setItemData(data);
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getCharts.apply(this, arguments);
}
function getshixunCharts(_x6) {
return _getshixunCharts.apply(this, arguments);
}
function _getshixunCharts() {
_getshixunCharts = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(params) {
var data;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
setItLoading(true);
_context6.next = 3;
return dispatch({
type: 'competitions/Results',
payload: objectSpread2_default()({
identifier: identifier,
stage_id: params === null || params === void 0 ? void 0 : params.id
}, params)
});
case 3:
data = _context6.sent;
setItemData(data);
setItLoading(false);
case 6:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getshixunCharts.apply(this, arguments);
}
function getEntrance(_x7) {
return _getEntrance.apply(this, arguments);
}
function _getEntrance() {
_getEntrance = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(params) {
var data;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
setItLoading(true);
_context7.next = 3;
return dispatch({
type: 'competitions/Results',
payload: objectSpread2_default()({
identifier: identifier,
stage_id: params === null || params === void 0 ? void 0 : params.id,
module_type: 'entrance'
}, params)
});
case 3:
data = _context7.sent;
setItemData(data);
setItLoading(false);
case 6:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getEntrance.apply(this, arguments);
}
function getResults(_x8) {
return _getResults.apply(this, arguments);
}
function _getResults() {
_getResults = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(id) {
var data;
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return dispatch({
type: 'competitions/Results',
payload: {
identifier: identifier,
stage_id: id
}
});
case 2:
data = _context8.sent;
if (!(localStorage.getItem('issee') === '1')) {
_context8.next = 5;
break;
}
return _context8.abrupt("return");
case 5:
setItemData(data);
case 6:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _getResults.apply(this, arguments);
}
function getTabResults() {
return _getTabResults.apply(this, arguments);
}
function _getTabResults() {
_getTabResults = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.t0 = setTabResults;
_context9.next = 3;
return dispatch({
type: 'competitions/TabResults',
payload: {
identifier: identifier,
competition_module_id: Selectkey
}
});
case 3:
_context9.t1 = _context9.sent;
(0, _context9.t0)(_context9.t1);
case 5:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getTabResults.apply(this, arguments);
}
function getPrize() {
return _getPrize.apply(this, arguments);
} //个人信息 Accounts
function _getPrize() {
_getPrize = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
var _user$userInfo5;
var data;
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return dispatch({
type: 'competitions/Prize',
payload: {
identifier: identifier,
user_id: user === null || user === void 0 || (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.user_id
//user_id:39416
}
});
case 2:
data = _context10.sent;
setPrize(data);
case 4:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _getPrize.apply(this, arguments);
}
function getAccounts() {
return _getAccounts.apply(this, arguments);
}
function _getAccounts() {
_getAccounts = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
var _user$userInfo6;
var data;
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return dispatch({
type: 'competitions/Accounts',
payload: {
id: user === null || user === void 0 || (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.user_id
//user_id:39416
}
});
case 2:
data = _context11.sent;
SetAccounts(data);
case 4:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _getAccounts.apply(this, arguments);
}
function addTeams(_x9) {
return _addTeams.apply(this, arguments);
}
function _addTeams() {
_addTeams = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(name) {
var data;
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
if (isClick) {
_context12.next = 2;
break;
}
return _context12.abrupt("return");
case 2:
setIsClick(false);
if (!isadd()) {
_context12.next = 5;
break;
}
return _context12.abrupt("return");
case 5:
_context12.next = 7;
return dispatch({
type: 'competitions/AddTeam',
payload: {
identifier: identifier,
name: name
}
});
case 7:
data = _context12.sent;
if (data && data.status === 0) {
message/* default */.ZP.info("\u521B\u5EFA\u6218\u961F\u6210\u529F");
init();
setIsAddmodel(false);
} else {
setIsClick(true);
}
case 9:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _addTeams.apply(this, arguments);
}
function isadd() {
var _user$userInfo, _user$userInfo2;
//判断 如果不符合条件 不能加入竞赛
if (user !== null && user !== void 0 && (_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.is_teacher) {
var _StaffDetail$teacher_;
if (StaffDetail !== null && StaffDetail !== void 0 && (_StaffDetail$teacher_ = StaffDetail.teacher_staff) !== null && _StaffDetail$teacher_ !== void 0 && _StaffDetail$teacher_.mutiple_limited) {
if (StaffDetail !== null && StaffDetail !== void 0 && StaffDetail.enrolled) {
message/* default */.ZP.info('你已经报名,不能重复报名');
setIsClick(true);
return true;
}
}
} else {
var _StaffDetail$member_s;
if (StaffDetail !== null && StaffDetail !== void 0 && (_StaffDetail$member_s = StaffDetail.member_staff) !== null && _StaffDetail$member_s !== void 0 && _StaffDetail$member_s.mutiple_limited) {
if (StaffDetail !== null && StaffDetail !== void 0 && StaffDetail.enrolled) {
message/* default */.ZP.info('你已经报名,不能重复报名');
setIsClick(true);
return true;
}
}
}
//判断竞赛是否关闭
if (StaffDetail !== null && StaffDetail !== void 0 && StaffDetail.enroll_ended) {
message/* default */.ZP.info('报名已截止,无需报名');
setIsClick(true);
return true;
}
//禁止老师or学生报名
if (user !== null && user !== void 0 && (_user$userInfo2 = user.userInfo) !== null && _user$userInfo2 !== void 0 && _user$userInfo2.is_teacher) {
if (!StaffDetail.teacher_staff) {
message/* default */.ZP.info('已禁止老师报名');
setIsClick(true);
return true;
}
} else {
if (!(StaffDetail !== null && StaffDetail !== void 0 && StaffDetail.member_staff)) {
message/* default */.ZP.info('已禁止学生报名');
setIsClick(true);
return true;
}
}
}
//加入战队
function JoinTeams(_x10) {
return _JoinTeams.apply(this, arguments);
}
function _JoinTeams() {
_JoinTeams = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(name) {
var data;
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
if (isClick) {
_context13.next = 2;
break;
}
return _context13.abrupt("return");
case 2:
if (!isadd()) {
_context13.next = 4;
break;
}
return _context13.abrupt("return");
case 4:
setIsClick(false);
_context13.next = 7;
return dispatch({
type: 'competitions/JoinTeam',
payload: {
identifier: identifier,
invite_code: name
}
});
case 7:
data = _context13.sent;
if (data && data.status === 0) {
message/* default */.ZP.info(qs["\u52A0\u5165\u6218\u961F\u6210\u529F"]);
setJoin(false);
setIsClick(true);
init();
} else {
// message.info(qs[data.message]);
setIsClick(true);
}
case 9:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _JoinTeams.apply(this, arguments);
}
console.log('-------', itLoading);
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "edu-container minH500",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
className: "mt10",
separator: ">",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/competitions/index",
children: qs['在线竞赛']
})
}), qs.isChinese ? /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z.Item, {
children: [HeaderDetail.name, HeaderDetail.sub_title ? '-' + HeaderDetail.sub_title : null]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z.Item, {
children: [HeaderDetail.english_name, HeaderDetail.english_sub_title ? '-' + HeaderDetail.english_sub_title : null]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10",
style: {
display: 'flex',
background: '#fff',
position: 'relative',
padding: '20px 12px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: loading.effects['competitions/getHeader'],
children: qs.isChinese ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
height: '355px',
width: "800px"
},
children: [(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.avatar_url) && (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.avatar_url) !== null && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
height: '355px',
width: '800px'
},
src: env/* default */.Z.IMG_SERVER + '/' + (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.avatar_url)
}), !(HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.avatar_url) && (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.avatar_url) == null && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
height: '355px',
width: '800px'
},
src: env/* default */.Z.IMG_SERVER + "/images/educoder/competitions/mainbanner.jpg"
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
height: '355px',
width: "800px"
},
children: [(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.english_avatar_url) && (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.english_avatar_url) !== null && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
height: '355px',
width: '800px'
},
src: env/* default */.Z.IMG_SERVER + '/' + (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.english_avatar_url)
}), !(HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.english_avatar_url) && (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.english_avatar_url) == null && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
height: '355px',
width: '800px'
},
src: env/* default */.Z.IMG_SERVER + "/images/educoder/competitions/mainbanner.jpg"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginLeft: '20px',
width: '400px'
},
children: [qs.isChinese ? /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
title: "".concat(HeaderDetail.name).concat(HeaderDetail.sub_title ? '-' + HeaderDetail.sub_title : ''),
className: "".concat(Detailmodules.titlesize),
children: [HeaderDetail.name, HeaderDetail.sub_title ? '-' + HeaderDetail.sub_title : null]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
title: "".concat(HeaderDetail.english_name).concat(HeaderDetail.english_sub_title ? '-' + HeaderDetail.english_sub_title : null),
className: "".concat(Detailmodules.titlesize),
children: [HeaderDetail.english_name, HeaderDetail.english_sub_title ? '-' + HeaderDetail.english_sub_title : null]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex',
justifyContent: 'space-between',
marginRight: 18
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: qs['奖金']
}), !!(HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.bonus) ? /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
fontSize: '24px'
},
children: ["\xA5", parseInt(HeaderDetail && HeaderDetail.bonus).toLocaleString()]
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '24px'
},
children: qs['暂无']
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: qs['浏览']
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '24px'
},
children: parseInt(HeaderDetail && HeaderDetail.visits_count).toLocaleString()
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: qs['报名']
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
fontSize: '24px'
},
children: parseInt(HeaderDetail && HeaderDetail.member_count).toLocaleString()
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: Detailmodules.timesize,
style: {
marginTop: 30
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#9b9b9b',
marginTop: '30px'
},
children: qs['竞赛时间:']
}), HeaderDetail.start_time, "~", HeaderDetail.end_time]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: Detailmodules.timesize,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#9b9b9b'
},
children: qs['报名截止:']
}), HeaderDetail.enroll_end_time]
}), HeaderDetail.competition_status === 'ended' ? /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: Detailmodules.timesize,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#9b9b9b'
},
children: qs['竞赛状态:']
}), qs['已结束']]
}) : null, HeaderDetail.competition_status === 'nearly_published' ? /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: Detailmodules.timesize,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#9b9b9b'
},
children: qs['竞赛状态:']
}), qs['未发布']]
}) : null, HeaderDetail.competition_status === 'progressing' ? /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: Detailmodules.timesize,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#9b9b9b'
},
children: qs['竞赛状态:']
}), qs['进行中']]
}) : null, /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
justifyContent: 'center'
},
children: [(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.mode) <= 2 && StaffDetail.enrolled && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
onClick: function onClick(e) {
if ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.mode) === 1) {
var _HeaderDetail$competi4;
getrightdatas((_HeaderDetail$competi4 = HeaderDetail.competition_modules) === null || _HeaderDetail$competi4 === void 0 ? void 0 : _HeaderDetail$competi4.find(function (item) {
return item.module_type === 'entrance';
}));
} else {
gotocourse(e, HeaderDetail, 'ismodel');
}
},
style: {
background: '#07C160',
color: '#fff',
border: '1px solid #07C160',
marginRight: 20,
display: (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.mode) === 2 ? '' : (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.mode) === 1 && ((_HeaderDetail$competi5 = HeaderDetail.competition_modules) === null || _HeaderDetail$competi5 === void 0 || (_HeaderDetail$competi5 = _HeaderDetail$competi5.filter(function (item) {
return item.module_type === 'entrance';
})) === null || _HeaderDetail$competi5 === void 0 ? void 0 : _HeaderDetail$competi5.length) > 0 ? '' : 'none'
},
className: Detailmodules.buttonsize,
children: [(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.mode) === 1 && qs['赛题入口'], (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.mode) === 2 && '进入课堂']
}), HeaderDetail.competition_status === "ended" ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
className: Detailmodules.buttonsize,
disabled: true,
children: qs['已结束']
}) : null, HeaderDetail.competition_status === 'nearly_published' ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
className: Detailmodules.buttonsize,
disabled: true,
children: qs['未发布']
}) : null, HeaderDetail.competition_status !== 'nearly_published' && HeaderDetail.enroll_end && HeaderDetail.competition_status !== 'ended' ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
className: Detailmodules.buttonsize,
disabled: true,
children: "\u62A5\u540D\u622A\u6B62"
}) : null, HeaderDetail.competition_status === 'progressing' && HeaderDetail.enroll_end != true ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
disabled: StaffDetail.enrolled && !HeaderDetail.need_attachment,
className: Detailmodules.buttonsize,
onClick: function onClick(e) {
if (StaffDetail.enrolled && HeaderDetail.need_attachment) {
var _see$current;
(_see$current = see.current) === null || _see$current === void 0 || _see$current.handleVisible();
return;
}
gotocourse(e, HeaderDetail, HeaderDetail.mode === 2 ? 'ismodel' : HeaderDetail.personal ? 'personal' : "/competitions/index/".concat(HeaderDetail.identifier, "/enroll"));
},
children: StaffDetail.enrolled ? HeaderDetail.need_attachment ? '上传作品' : qs['已报名'] : HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.enroll_url ? '前往大赛官网报名' : qs['立即报名']
}) : null]
}), user.userInfo.real_name != "游客" && !(HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.enroll_url) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick(e) {
return gotocourse(e, HeaderDetail, HeaderDetail.mode === 2 ? 'ismodel' : HeaderDetail.personal ? 'personal' : "/competitions/index/".concat(HeaderDetail.identifier, "/enroll"));
},
className: Detailmodules.myteam,
children: (0,authority/* isSuperAdmin */.j5)() ? '参赛战队>>' : "".concat(qs['我的战队'], ">>")
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.bootmdetail,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Detailmodules.flex1,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z, {
selectedKeys: ["".concat(Selectkey)],
children: HeaderDetail && HeaderDetail.competition_modules && HeaderDetail.competition_modules.map(function (item, index) {
if (item.module_type != "enroll") {
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
className: Detailmodules.menuItem,
onClick: function onClick() {
if (item !== null && item !== void 0 && item.is_authentication) {
if (!(0,verifyLogin/* handleVerify */.tJ)(dispatch)) {
return;
}
message/* default */.ZP.info('加入战队才能查看');
return;
}
setItLoading(false);
// if(item?.item?.has_url){
// window.open(item?.module_url)
// return
// }
getrightdatas(item);
},
children: qs.isChinese ? item.name : item.english_name
}, item.id);
}
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.flex6,
style: {
padding: (showmake || entrance) && 0
},
children: [isAward ? /*#__PURE__*/(0,jsx_runtime.jsx)(AwardPdf, {
dispatch: dispatch,
userid: user === null || user === void 0 || (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.user_id,
Prize: Prize,
Accounts: Accounts,
getAccounts: getAccounts
}) : null, isRanKing ? /*#__PURE__*/(0,jsx_runtime.jsx)(Detail_Ranking, {
qs: qs,
HeaderDetail: HeaderDetail,
userinfo: user.userInfo,
Editable: HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$permiss = HeaderDetail.permission) === null || _HeaderDetail$permiss === void 0 ? void 0 : _HeaderDetail$permiss.editable,
getCharts: getCharts,
getChartRules: getChartRules,
Selectkey: Selectkey,
ChartRules: ChartRules,
ItemData: ItemData
}) : null, ISsee ? /*#__PURE__*/(0,jsx_runtime.jsx)(Detail_SeeItem, {
qs: qs,
ref: see,
StaffDetail: StaffDetail,
HeaderDetail: HeaderDetail,
userinfo: user.userInfo,
Editable: HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$permiss2 = HeaderDetail.permission) === null || _HeaderDetail$permiss2 === void 0 ? void 0 : _HeaderDetail$permiss2.editable,
ItemData: ItemData,
setIssee: setIssee,
ModelType: ModelType,
dispatch: dispatch
}) : null, !ISsee && !showmake && !entrance && !isRanKing && !isAward && !MdTab ? /*#__PURE__*/(0,jsx_runtime.jsx)(Update, {
qs: qs,
userinfo: user.userInfo,
ModelType: ModelType,
getrightdatas: getrightdatas,
dispatch: dispatch,
MenuItem: MenuItem,
setIssee: setIssee,
identifier: identifier,
ItemData: ItemData
}) : null, MdTab && /*#__PURE__*/(0,jsx_runtime.jsx)(SubmitResult, {
qs: qs,
dispatch: dispatch,
StaffDetail: StaffDetail,
userinfo: user.userInfo,
HeaderDetail: HeaderDetail,
Editable: HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$permiss3 = HeaderDetail.permission) === null || _HeaderDetail$permiss3 === void 0 ? void 0 : _HeaderDetail$permiss3.editable,
getCharts: getResults,
getChartRules: getTabResults,
Selectkey: Selectkey,
ChartRules: TabResults,
ItemData: ItemData
}), showmake && /*#__PURE__*/(0,jsx_runtime.jsx)(MakeItem, {
loading: itLoading,
dispatch: dispatch,
StaffDetail: StaffDetail,
userinfo: user.userInfo,
HeaderDetail: HeaderDetail,
Editable: HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$permiss4 = HeaderDetail.permission) === null || _HeaderDetail$permiss4 === void 0 ? void 0 : _HeaderDetail$permiss4.editable,
getCharts: getshixunCharts,
getChartRules: getTabResults,
Selectkey: Selectkey,
ChartRules: TabResults,
ItemData: ItemData
}), entrance && /*#__PURE__*/(0,jsx_runtime.jsx)(Entrance, {
loading: itLoading,
dispatch: dispatch,
StaffDetail: StaffDetail,
userinfo: user.userInfo,
HeaderDetail: HeaderDetail,
Editable: HeaderDetail === null || HeaderDetail === void 0 || (_HeaderDetail$permiss5 = HeaderDetail.permission) === null || _HeaderDetail$permiss5 === void 0 ? void 0 : _HeaderDetail$permiss5.editable,
getCharts: getEntrance,
getChartRules: getTabResults,
Selectkey: Selectkey,
ChartRules: TabResults,
ItemData: ItemData
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AuthenticationModel/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddSubmitModel, {
getResults: getResults
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
visible: isshowType
// visible
,
footer: null,
width: 720,
title: "\u63D0\u793A",
centered: true,
onCancel: function onCancel() {
return setisshowType(false);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Detailmodules.modal,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#FF8C29'
},
children: "300,000"
}), "\u5143"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: function onClick() {
return (0,util/* openNewWindow */.xg)('https://competition.huaweicloud.com/information/1000041485/introduction');
},
children: "\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
title: qs["选择参赛方式"],
visible: isshowmodal,
onCancel: function onCancel() {
setisshowmodal(false);
},
footer: false,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
justifyContent: 'space-around',
height: 100,
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
style: {
height: 40
},
onClick: function onClick() {
setJoin(true);
setisshowmodal(false);
},
children: qs['加入战队参赛']
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
style: {
height: 40
},
onClick: function onClick() {
setIsAddmodel(true);
setisshowmodal(false);
},
children: qs['去创建战队参赛']
})]
})
}), isJoin ? /*#__PURE__*/(0,jsx_runtime.jsx)(JoinModel/* default */.Z, {
qs: qs,
isjoin: isJoin,
setJoin: setJoin,
JoinTeams: JoinTeams
}) : null, isAddmodel ? /*#__PURE__*/(0,jsx_runtime.jsx)(Addteams/* default */.Z, {
qs: qs,
isAddmodle: isAddmodel,
setIsAdd: setIsAddmodel,
createTeam: addTeams
}) : null]
});
};
/* harmony default export */ var Detail = ((0,_umi_production_exports.connect)(function (_ref2) {
var loading = _ref2.loading,
globalSetting = _ref2.globalSetting,
competitions = _ref2.competitions,
user = _ref2.user;
return {
globalSetting: globalSetting,
competitions: competitions,
loading: loading,
user: user
};
})(competitionDetails));
/***/ }),
/***/ 8873:
/*!******************************************************************!*\
!*** ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx ***!
\******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 98135);
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons */ 14834);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
//创建战队弹窗
function Addteans(_ref) {
var isAddmodle = _ref.isAddmodle,
setIsAdd = _ref.setIsAdd,
createTeam = _ref.createTeam,
qs = _ref.qs;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),
_useState2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
personname = _useState2[0],
setpersonname = _useState2[1];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
centered: true,
title: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
style: {
alignItems: 'center',
display: 'flex'
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
style: {
textAlign: 'left',
flex: '1'
},
children: qs['创建战队']
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
onClick: function onClick() {
return setIsAdd(false);
},
style: {
cursor: 'porint'
}
})]
}),
visible: isAddmodle,
closable: false,
destroyOnClose: true,
okText: qs['确定'],
cancelText: qs['取消'],
onOk: function onOk() {
if (!personname) {
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.info(qs['战队名不能为空']);
return;
}
createTeam(personname);
},
onCancel: function onCancel() {
return setIsAdd(false);
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
style: {
fontSize: '14px',
color: '#F73737'
},
children: "*"
}), qs['队名'], "\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", {
style: {
marginTop: '15px',
marginLeft: '15px'
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
placeholder: qs["请输入队名"],
value: personname,
maxLength: 60,
addonAfter: String(personname && personname.length || 0) + "/60",
onChange: function onChange(e) {
return setpersonname(e.target.value);
}
})
})]
})
});
}
/* harmony default export */ __webpack_exports__.Z = (Addteans);
/***/ }),
/***/ 23371:
/*!*******************************************************************!*\
!*** ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 98135);
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons */ 14834);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
//通过邀请码加入战队
function Jointeam(_ref) {
var isjoin = _ref.isjoin,
setJoin = _ref.setJoin,
JoinTeams = _ref.JoinTeams,
qs = _ref.qs;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),
_useState2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
code = _useState2[0],
setCode = _useState2[1];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
centered: true,
title: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
style: {
alignItems: 'center',
display: 'flex'
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
style: {
textAlign: 'left',
flex: '1'
},
children: qs['加入战队']
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
onClick: function onClick() {
return setJoin(false);
},
style: {
cursor: 'porint'
}
})]
}),
visible: isjoin,
closable: false,
destroyOnClose: true,
okText: qs['确认'],
cancelText: qs['取消'],
onOk: function onOk() {
if (!code) {
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.info(qs['邀请码不能为空']);
return;
}
JoinTeams(code);
},
onCancel: function onCancel() {
return setJoin(false);
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("p", {
style: {
marginTop: '15px',
marginLeft: '15px',
display: 'flex',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span", {
style: {
flex: 'none'
},
children: [qs['邀请码'], "\uFF1A"]
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
placeholder: qs["请输入邀请码"],
value: code,
maxLength: 60,
addonAfter: String(code && code.length || 0) + "/60",
onChange: function onChange(e) {
return setCode(e.target.value);
}
})]
})
})
});
}
/* harmony default export */ __webpack_exports__.Z = (Jointeam);
/***/ }),
/***/ 73726:
/*!*******************************!*\
!*** ./src/utils/cityData.ts ***!
\*******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ P: function() { return /* binding */ CityData; }
/* harmony export */ });
var CityData = [{
value: '北京',
label: '北京',
children: [{
value: "东城",
label: '东城'
}, {
value: "西城",
label: "西城"
}, {
value: "朝阳",
label: "朝阳"
}, {
value: "丰台",
label: "丰台"
}, {
value: "石景山",
label: "石景山"
}, {
value: "海淀",
label: "海淀"
}, {
value: "门头沟",
label: "门头沟"
}, {
value: "房山",
label: "房山"
}, {
value: "通州",
label: "通州"
}, {
value: "顺义",
label: "顺义"
}, {
value: "昌平",
label: "昌平"
}, {
value: "大兴",
label: "大兴"
}, {
value: "平谷",
label: "平谷"
}, {
value: "怀柔",
label: "怀柔"
}, {
value: "密云",
label: "密云"
}, {
value: "延庆",
label: "延庆"
}]
}, {
value: '上海',
label: '上海',
children: [{
value: "崇明",
label: '崇明'
}, {
value: '黄浦',
label: '黄浦'
}, {
value: '卢湾',
label: '卢湾'
}, {
value: '徐汇',
label: '徐汇'
}, {
value: '长宁',
label: '长宁'
}, {
value: '静安',
label: '静安'
}, {
value: '普陀',
label: '普陀'
}, {
value: '闸北',
label: '闸北'
}, {
value: '虹口',
label: '虹口'
}, {
value: '杨浦',
label: '杨浦'
}, {
value: '闵行',
label: '闵行'
}, {
value: '宝山',
label: '宝山'
}, {
value: '嘉定',
label: '嘉定'
}, {
value: '浦东',
label: '浦东'
}, {
value: '金山',
label: '金山'
}, {
value: '松江',
label: '松江'
}, {
value: '青浦',
label: '青浦'
}, {
value: '南汇',
label: '南汇'
}, {
value: '奉贤',
label: '奉贤'
}]
}, {
value: '广东',
label: '广东',
children: [{
value: "广州",
label: '广州'
}, {
value: '深圳',
label: '深圳'
}, {
value: '珠海',
label: '珠海'
}, {
value: '东莞',
label: '东莞'
}, {
value: '中山',
label: '中山'
}, {
value: '佛山',
label: '佛山'
}, {
value: '惠州',
label: '惠州'
}, {
value: '河源',
label: '河源'
}, {
value: '潮州',
label: '潮州'
}, {
value: '江门',
label: '江门'
}, {
value: '揭阳',
label: '揭阳'
}, {
value: '茂名',
label: '茂名'
}, {
value: '梅州',
label: '梅州'
}, {
value: '清远',
label: '清远'
}, {
value: '汕头',
label: '汕头'
}, {
value: '汕尾',
label: '汕尾'
}, {
value: '韶关',
label: '韶关'
}, {
value: '顺德',
label: '顺德'
}, {
value: '阳江',
label: '阳江'
}, {
value: '云浮',
label: '云浮'
}, {
value: '湛江',
label: '湛江'
}, {
value: '肇庆',
label: '肇庆'
}]
}, {
value: '江苏',
label: '江苏',
children: [{
value: "南京",
label: '南京'
}, {
value: '常熟',
label: '常熟'
}, {
value: '常州',
label: '常州'
}, {
value: '海门',
label: '海门'
}, {
value: '淮安',
label: '淮安'
}, {
value: '江都',
label: '江都'
}, {
value: '江阴',
label: '江阴'
}, {
value: '昆山',
label: '昆山'
}, {
value: '连云港',
label: '连云港'
}, {
value: '南通',
label: '南通'
}, {
value: '启东',
label: '启东'
}, {
value: '沭阳',
label: '沭阳'
}, {
value: '宿迁',
label: '宿迁'
}, {
value: '苏州',
label: '苏州'
}, {
value: '太仓',
label: '太仓'
}, {
value: '泰州',
label: '泰州'
}, {
value: '同里',
label: '同里'
}, {
value: '无锡',
label: '无锡'
}, {
value: '徐州',
label: '徐州'
}, {
value: '盐城',
label: '盐城'
}, {
value: '扬州',
label: '扬州'
}, {
value: '宜兴',
label: '宜兴'
}, {
value: '仪征',
label: '仪征'
}, {
value: '张家港',
label: '张家港'
}, {
value: '镇江',
label: '镇江'
}]
}, {
value: '重庆',
label: '重庆',
children: [{
value: "万州",
label: '万州'
}, {
value: '涪陵',
label: '涪陵'
}, {
value: '渝中',
label: '渝中'
}, {
value: '大渡口',
label: '大渡口'
}, {
value: '江北',
label: '江北'
}, {
value: '沙坪坝',
label: '沙坪坝'
}, {
value: '九龙坡',
label: '九龙坡'
}, {
value: '南岸',
label: '南岸'
}, {
value: '北碚',
label: '北碚'
}, {
value: '万盛',
label: '万盛'
}, {
value: '双挢',
label: '双挢'
}, {
value: '渝北',
label: '渝北'
}, {
value: '巴南',
label: '巴南'
}, {
value: '黔江',
label: '黔江'
}, {
value: '长寿',
label: '长寿'
}, {
value: '綦江',
label: '綦江'
}, {
value: '潼南',
label: '潼南'
}, {
value: '铜梁',
label: '铜梁'
}, {
value: '大足',
label: '大足'
}, {
value: '荣昌',
label: '荣昌'
}, {
value: '壁山',
label: '壁山'
}, {
value: '梁平',
label: '梁平'
}, {
value: '城口',
label: '城口'
}, {
value: '丰都',
label: '丰都'
}, {
value: '垫江',
label: '垫江'
}, {
value: '武隆',
label: '武隆'
}, {
value: '忠县',
label: '忠县'
}, {
value: '开县',
label: '开县'
}, {
value: '云阳',
label: '云阳'
}, {
value: '奉节',
label: '奉节'
}, {
value: '巫山',
label: '巫山'
}, {
value: '巫溪',
label: '巫溪'
}, {
value: '石柱',
label: '石柱'
}, {
value: '秀山',
label: '秀山'
}, {
value: '酉阳',
label: '酉阳'
}, {
value: '彭水',
label: '彭水'
}, {
value: '江津',
label: '江津'
}, {
value: '合川',
label: '合川'
}, {
value: '永川',
label: '永川'
}, {
value: '南川',
label: '南川'
}]
}, {
value: '安徽',
label: '安徽',
children: [{
value: "合肥",
label: '合肥'
}, {
value: '安庆',
label: '安庆'
}, {
value: '蚌埠',
label: '蚌埠'
}, {
value: '亳州',
label: '亳州'
}, {
value: '巢湖',
label: '巢湖'
}, {
value: '滁州',
label: '滁州'
}, {
value: '阜阳',
label: '阜阳'
}, {
value: '贵池',
label: '贵池'
}, {
value: '淮北',
label: '淮北'
}, {
value: '淮化',
label: '淮化'
}, {
value: '淮南',
label: '淮南'
}, {
value: '黄山',
label: '黄山'
}, {
value: '九华山',
label: '九华山'
}, {
value: '六安',
label: '六安'
}, {
value: '马鞍山',
label: '马鞍山'
}, {
value: '宿州',
label: '宿州'
}, {
value: '铜陵',
label: '铜陵'
}, {
value: '屯溪',
label: '屯溪'
}, {
value: '芜湖',
label: '芜湖'
}, {
value: '宣城',
label: '宣城'
}]
}, {
value: '福建',
label: '福建',
children: [{
value: "福州",
label: '福州'
}, {
value: '厦门',
label: '厦门'
}, {
value: '泉州',
label: '泉州'
}, {
value: '漳州',
label: '漳州'
}, {
value: '龙岩',
label: '龙岩'
}, {
value: '南平',
label: '南平'
}, {
value: '宁德',
label: '宁德'
}, {
value: '莆田',
label: '莆田'
}, {
value: '三明',
label: '三明'
}]
}, {
value: '甘肃',
label: '甘肃',
children: [{
value: "兰州",
label: '兰州'
}, {
value: "嘉峪关",
label: '嘉峪关'
}, {
value: '白银',
label: '白银'
}, {
value: '定西',
label: '定西'
}, {
value: '敦煌',
label: '敦煌'
}, {
value: '甘南',
label: '甘南'
}, {
value: '金昌',
label: '金昌'
}, {
value: '酒泉',
label: '酒泉'
}, {
value: '临夏',
label: '临夏'
}, {
value: '平凉',
label: '平凉'
}, {
value: '天水',
label: '天水'
}, {
value: '陇南',
label: '陇南'
}, {
value: '武威',
label: '武威'
}, {
value: '西峰',
label: '西峰'
}, {
value: '张掖',
label: '张掖'
}]
}, {
value: '广西',
label: '广西',
children: [{
value: "南宁",
label: '南宁'
}, {
value: "来宾",
label: '来宾'
}, {
value: '百色',
label: '百色'
}, {
value: '北海',
label: '北海'
}, {
value: '桂林',
label: '桂林'
}, {
value: '防城港',
label: '防城港'
}, {
value: '贵港',
label: '贵港'
}, {
value: '河池',
label: '河池'
}, {
value: '贺州',
label: '贺州'
}, {
value: '柳州',
label: '柳州'
}, {
value: '钦州',
label: '钦州'
}, {
value: '梧州',
label: '梧州'
}, {
value: '玉林',
label: '玉林'
}]
}, {
value: '贵州',
label: '贵州',
children: [{
value: "贵阳",
label: '贵阳'
}, {
value: '安顺',
label: '安顺'
}, {
value: '毕节',
label: '毕节'
}, {
value: '都匀',
label: '都匀'
}, {
value: '凯里',
label: '凯里'
}, {
value: '六盘水',
label: '六盘水'
}, {
value: '铜仁',
label: '铜仁'
}, {
value: '兴义',
label: '兴义'
}, {
value: '玉屏',
label: '玉屏'
}, {
value: '遵义',
label: '遵义'
}]
}, {
value: '海南',
label: '海南',
children: [{
value: "海口",
label: '海口'
}, {
value: '儋县',
label: '儋县'
}, {
value: '陵水',
label: '陵水'
}, {
value: '琼海',
label: '琼海'
}, {
value: '三亚',
label: '三亚'
}, {
value: '通什',
label: '通什'
}, {
value: '万宁',
label: '万宁'
}]
}, {
value: '河北',
label: '河北',
children: [{
value: "石家庄",
label: '石家庄'
}, {
value: '保定',
label: '保定'
}, {
value: '北戴河',
label: '北戴河'
}, {
value: '沧州',
label: '沧州'
}, {
value: '承德',
label: '承德'
}, {
value: '丰润',
label: '丰润'
}, {
value: '邯郸',
label: '邯郸'
}, {
value: '衡水',
label: '衡水'
}, {
value: '廊坊',
label: '廊坊'
}, {
value: '南戴河',
label: '南戴河'
}, {
value: '秦皇岛',
label: '秦皇岛'
}, {
value: '唐山',
label: '唐山'
}, {
value: '新城',
label: '新城'
}, {
value: '邢台',
label: '邢台'
}, {
value: '张家口',
label: '张家口'
}]
}, {
value: '黑龙江',
label: '黑龙江',
children: [{
value: "哈尔滨",
label: '哈尔滨'
}, {
value: '北安',
label: '北安'
}, {
value: '大庆',
label: '大庆'
}, {
value: '大兴安岭',
label: '大兴安岭'
}, {
value: '鹤岗',
label: '鹤岗'
}, {
value: '黑河',
label: '黑河'
}, {
value: '佳木斯',
label: '佳木斯'
}, {
value: '鸡西',
label: '鸡西'
}, {
value: '牡丹江',
label: '牡丹江'
}, {
value: '齐齐哈尔',
label: '齐齐哈尔'
}, {
value: '七台河',
label: '七台河'
}, {
value: '双鸭山',
label: '双鸭山'
}, {
value: '绥化',
label: '绥化'
}, {
value: '伊春',
label: '伊春'
}]
}, {
value: '河南',
label: '河南',
children: [{
value: "郑州",
label: '郑州'
}, {
value: '安阳',
label: '安阳'
}, {
value: '鹤壁',
label: '鹤壁'
}, {
value: '潢川',
label: '潢川'
}, {
value: '焦作',
label: '焦作'
}, {
value: '济源',
label: '济源'
}, {
value: '开封',
label: '开封'
}, {
value: '漯河',
label: '漯河'
}, {
value: '洛阳',
label: '洛阳'
}, {
value: '南阳',
label: '南阳'
}, {
value: '平顶山',
label: '平顶山'
}, {
value: '濮阳',
label: '濮阳'
}, {
value: '三门峡',
label: '三门峡'
}, {
value: '商丘',
label: '商丘'
}, {
value: '新乡',
label: '新乡'
}, {
value: '信阳',
label: '信阳'
}, {
value: '许昌',
label: '许昌'
}, {
value: '周口',
label: '周口'
}, {
value: '驻马店',
label: '驻马店'
}]
}, {
value: '香港',
label: '香港',
children: [{
value: "香港",
label: '香港'
}, {
value: '九龙',
label: '九龙'
}, {
value: '新界',
label: '新界'
}]
}, {
value: '湖北',
label: '湖北',
children: [{
value: "武汉",
label: '武汉'
}, {
value: "天门",
label: '天门'
}, {
value: '恩施',
label: '恩施'
}, {
value: '鄂州',
label: '鄂州'
}, {
value: '黄冈',
label: '黄冈'
}, {
value: '黄石',
label: '黄石'
}, {
value: '荆门',
label: '荆门'
}, {
value: '荆州',
label: '荆州'
}, {
value: '潜江',
label: '潜江'
}, {
value: '十堰',
label: '十堰'
}, {
value: '随州',
label: '随州'
}, {
value: '武穴',
label: '武穴'
}, {
value: '仙桃',
label: '仙桃'
}, {
value: '咸宁',
label: '咸宁'
}, {
value: '襄阳',
label: '襄阳'
}, {
value: '襄樊',
label: '襄樊'
}, {
value: '孝感',
label: '孝感'
}, {
value: '宜昌',
label: '宜昌'
}]
}, {
value: '湖南',
label: '湖南',
children: [{
value: "长沙",
label: '长沙'
}, {
value: '常德',
label: '常德'
}, {
value: '郴州',
label: '郴州'
}, {
value: '衡阳',
label: '衡阳'
}, {
value: '怀化',
label: '怀化'
}, {
value: '吉首',
label: '吉首'
}, {
value: '娄底',
label: '娄底'
}, {
value: '邵阳',
label: '邵阳'
}, {
value: '湘潭',
label: '湘潭'
}, {
value: '益阳',
label: '益阳'
}, {
value: '岳阳',
label: '岳阳'
}, {
value: '永州',
label: '永州'
}, {
value: '张家界',
label: '张家界'
}, {
value: '株洲',
label: '株洲'
}]
}, {
value: '江西',
label: '江西',
children: [{
value: "南昌",
label: '南昌'
}, {
value: '抚州',
label: '抚州'
}, {
value: '赣州',
label: '赣州'
}, {
value: '吉安',
label: '吉安'
}, {
value: '景德镇',
label: '景德镇'
}, {
value: '井冈山',
label: '井冈山'
}, {
value: '九江',
label: '九江'
}, {
value: '庐山',
label: '庐山'
}, {
value: '萍乡',
label: '萍乡'
}, {
value: '上饶',
label: '上饶'
}, {
value: '新余',
label: '新余'
}, {
value: '宜春',
label: '宜春'
}, {
value: '鹰潭',
label: '鹰潭'
}]
}, {
value: '吉林',
label: '吉林',
children: [{
value: "长春",
label: '长春'
}, {
value: '吉林',
label: '吉林'
}, {
value: '白城',
label: '白城'
}, {
value: '白山',
label: '白山'
}, {
value: '珲春',
label: '珲春'
}, {
value: '辽源',
label: '辽源'
}, {
value: '梅河',
label: '梅河'
}, {
value: '四平',
label: '四平'
}, {
value: '松原',
label: '松原'
}, {
value: '通化',
label: '通化'
}, {
value: '延吉',
label: '延吉'
}]
}, {
value: '辽宁',
label: '辽宁',
children: [{
value: "沈阳",
label: '沈阳'
}, {
value: '鞍山',
label: '鞍山'
}, {
value: '本溪',
label: '本溪'
}, {
value: '朝阳',
label: '朝阳'
}, {
value: '大连',
label: '大连'
}, {
value: '丹东',
label: '丹东'
}, {
value: '抚顺',
label: '抚顺'
}, {
value: '阜新',
label: '阜新'
}, {
value: '葫芦岛',
label: '葫芦岛'
}, {
value: '锦州',
label: '锦州'
}, {
value: '辽阳',
label: '辽阳'
}, {
value: '盘锦',
label: '盘锦'
}, {
value: '铁岭',
label: '铁岭'
}, {
value: '营口',
label: '营口'
}]
}, {
value: '澳门',
label: '澳门',
children: [{
value: '澳门',
label: '澳门'
}]
}, {
value: '内蒙古',
label: '内蒙古',
children: [{
value: "呼和浩特",
label: '呼和浩特'
}, {
value: '阿拉善盟',
label: '阿拉善盟'
}, {
value: '包头',
label: '包头'
}, {
value: '赤峰',
label: '赤峰'
}, {
value: '东胜',
label: '东胜'
}, {
value: '海拉尔',
label: '海拉尔'
}, {
value: '集宁',
label: '集宁'
}, {
value: '临河',
label: '临河'
}, {
value: '通辽',
label: '通辽'
}, {
value: '乌海',
label: '乌海'
}, {
value: '乌兰浩特',
label: '乌兰浩特'
}, {
value: '锡林浩特',
label: '锡林浩特'
}]
}, {
value: '宁夏',
label: '宁夏',
children: [{
value: "银川",
label: '银川'
}, {
value: '固源',
label: '固源'
}, {
value: '石嘴山',
label: '石嘴山'
}, {
value: '吴忠',
label: '吴忠'
}]
}, {
value: '青海',
label: '青海',
children: [{
value: "西宁",
label: '西宁'
}, {
value: '德令哈',
label: '德令哈'
}, {
value: '格尔木',
label: '格尔木'
}, {
value: '共和',
label: '共和'
}, {
value: '海东',
label: '海东'
}, {
value: '海晏',
label: '海晏'
}, {
value: '玛沁',
label: '玛沁'
}, {
value: '同仁',
label: '同仁'
}, {
value: '玉树',
label: '玉树'
}]
}, {
value: '山东',
label: '山东',
children: [{
value: "济南",
label: '济南'
}, {
value: '滨州',
label: '滨州'
}, {
value: '兖州',
label: '兖州'
}, {
value: '德州',
label: '德州'
}, {
value: '东营',
label: '东营'
}, {
value: '菏泽',
label: '菏泽'
}, {
value: '济宁',
label: '济宁'
}, {
value: '莱芜',
label: '莱芜'
}, {
value: '聊城',
label: '聊城'
}, {
value: '临沂',
label: '临沂'
}, {
value: '蓬莱',
label: '蓬莱'
}, {
value: '青岛',
label: '青岛'
}, {
value: '曲阜',
label: '曲阜'
}, {
value: '日照',
label: '日照'
}, {
value: '泰安',
label: '泰安'
}, {
value: '潍坊',
label: '潍坊'
}, {
value: '威海',
label: '威海'
}, {
value: '烟台',
label: '烟台'
}, {
value: '枣庄',
label: '枣庄'
}, {
value: '淄博',
label: '淄博'
}]
}, {
value: '山西',
label: '山西',
children: [{
value: "太原",
label: '太原'
}, {
value: "吕梁",
label: '吕梁'
}, {
value: '长治',
label: '长治'
}, {
value: '大同',
label: '大同'
}, {
value: '候马',
label: '候马'
}, {
value: '晋城',
label: '晋城'
}, {
value: '离石',
label: '离石'
}, {
value: '临汾',
label: '临汾'
}, {
value: '宁武',
label: '宁武'
}, {
value: '朔州',
label: '朔州'
}, {
value: '忻州',
label: '忻州'
}, {
value: '阳泉',
label: '阳泉'
}, {
value: '榆次',
label: '榆次'
}, {
value: '晋中',
label: '晋中'
}, {
value: '运城',
label: '运城'
}]
}, {
value: '陕西',
label: '陕西',
children: [{
value: "西安",
label: '西安'
}, {
value: '安康',
label: '安康'
}, {
value: '宝鸡',
label: '宝鸡'
}, {
value: '汉中',
label: '汉中'
}, {
value: '渭南',
label: '渭南'
}, {
value: '商州',
label: '商州'
}, {
value: '绥德',
label: '绥德'
}, {
value: '铜川',
label: '铜川'
}, {
value: '咸阳',
label: '咸阳'
}, {
value: '延安',
label: '延安'
}, {
value: '榆林',
label: '榆林'
}]
}, {
value: '四川',
label: '四川',
children: [{
value: "成都",
label: '成都'
}, {
value: '巴中',
label: '巴中'
}, {
value: '达川',
label: '达川'
}, {
value: '德阳',
label: '德阳'
}, {
value: '都江堰',
label: '都江堰'
}, {
value: '峨眉山',
label: '峨眉山'
}, {
value: '涪陵',
label: '涪陵'
}, {
value: '广安',
label: '广安'
}, {
value: '广元',
label: '广元'
}, {
value: '九寨沟',
label: '九寨沟'
}, {
value: '康定',
label: '康定'
}, {
value: '乐山',
label: '乐山'
}, {
value: '泸州',
label: '泸州'
}, {
value: '马尔康',
label: '马尔康'
}, {
value: '绵阳',
label: '绵阳'
}, {
value: '眉山',
label: '眉山'
}, {
value: '南充',
label: '南充'
}, {
value: '内江',
label: '内江'
}, {
value: '攀枝花',
label: '攀枝花'
}, {
value: '遂宁',
label: '遂宁'
}, {
value: '汶川',
label: '汶川'
}, {
value: '西昌',
label: '西昌'
}, {
value: '雅安',
label: '雅安'
}, {
value: '宜宾',
label: '宜宾'
}, {
value: '自贡',
label: '自贡'
}, {
value: '资阳',
label: '资阳'
}]
}, {
value: '台湾',
label: '台湾',
children: [{
value: "台北",
label: '台北'
}, {
value: '基隆',
label: '基隆'
}, {
value: '台南',
label: '台南'
}, {
value: '台中',
label: '台中'
}, {
value: '高雄',
label: '高雄'
}, {
value: '屏东',
label: '屏东'
}, {
value: '南投',
label: '南投'
}, {
value: '云林',
label: '云林'
}, {
value: '新竹',
label: '新竹'
}, {
value: '彰化',
label: '彰化'
}, {
value: '苗栗',
label: '苗栗'
}, {
value: '嘉义',
label: '嘉义'
}, {
value: '桃园',
label: '桃园'
}, {
value: '宜兰',
label: '宜兰'
}, {
value: '台东',
label: '台东'
}, {
value: '金门',
label: '金门'
}, {
value: '马祖',
label: '马祖'
}, {
value: '澎湖',
label: '澎湖'
}]
}, {
value: '天津',
label: '天津',
children: [{
value: "天津",
label: '天津'
}, {
value: '和平',
label: '和平'
}, {
value: '东丽',
label: '东丽'
}, {
value: '河东',
label: '河东'
}, {
value: '西青',
label: '西青'
}, {
value: '河西',
label: '河西'
}, {
value: '津南',
label: '津南'
}, {
value: '南开',
label: '南开'
}, {
value: '北辰',
label: '北辰'
}, {
value: '河北',
label: '河北'
}, {
value: '武清',
label: '武清'
}, {
value: '红挢',
label: '红挢'
}, {
value: '塘沽',
label: '塘沽'
}, {
value: '汉沽',
label: '汉沽'
}, {
value: '大港',
label: '大港'
}, {
value: '宁河',
label: '宁河'
}, {
value: '静海',
label: '静海'
}, {
value: '宝坻',
label: '宝坻'
}, {
value: '蓟县',
label: '蓟县'
}]
}, {
value: '新疆',
label: '新疆',
children: [{
value: "乌鲁木齐",
label: '乌鲁木齐'
}, {
value: '阿克苏',
label: '阿克苏'
}, {
value: '阿勒泰',
label: '阿勒泰'
}, {
value: '阿图什',
label: '阿图什'
}, {
value: '博乐',
label: '博乐'
}, {
value: '昌吉',
label: '昌吉'
}, {
value: '东山',
label: '东山'
}, {
value: '哈密',
label: '哈密'
}, {
value: '和田',
label: '和田'
}, {
value: '喀什',
label: '喀什'
}, {
value: '克拉玛依',
label: '克拉玛依'
}, {
value: '库车',
label: '库车'
}, {
value: '库尔勒',
label: '库尔勒'
}, {
value: '奎屯',
label: '奎屯'
}, {
value: '石河子',
label: '石河子'
}, {
value: '塔城',
label: '塔城'
}, {
value: '吐鲁番',
label: '吐鲁番'
}, {
value: '伊宁',
label: '伊宁'
}]
}, {
value: '西藏',
label: '西藏',
children: [{
value: "拉萨",
label: '拉萨'
}, {
value: '阿里',
label: '阿里'
}, {
value: '昌都',
label: '昌都'
}, {
value: '林芝',
label: '林芝'
}, {
value: '那曲',
label: '那曲'
}, {
value: '日喀则',
label: '日喀则'
}, {
value: '山南',
label: '山南'
}]
}, {
value: '云南',
label: '云南',
children: [{
value: "昆明",
label: '昆明'
}, {
value: '大理',
label: '大理'
}, {
value: '保山',
label: '保山'
}, {
value: '楚雄',
label: '楚雄'
}, {
value: '大理',
label: '大理'
}, {
value: '东川',
label: '东川'
}, {
value: '个旧',
label: '个旧'
}, {
value: '景洪',
label: '景洪'
}, {
value: '开远',
label: '开远'
}, {
value: '临沧',
label: '临沧'
}, {
value: '丽江',
label: '丽江'
}, {
value: '六库',
label: '六库'
}, {
value: '潞西',
label: '潞西'
}, {
value: '曲靖',
label: '曲靖'
}, {
value: '思茅',
label: '思茅'
}, {
value: '文山',
label: '文山'
}, {
value: '西双版纳',
label: '西双版纳'
}, {
value: '玉溪',
label: '玉溪'
}, {
value: '中甸',
label: '中甸'
}, {
value: '昭通',
label: '昭通'
}]
}, {
value: '浙江',
label: '浙江',
children: [{
value: "杭州",
label: '杭州'
}, {
value: "温州",
label: '温州'
}, {
value: '安吉',
label: '安吉'
}, {
value: '慈溪',
label: '慈溪'
}, {
value: '定海',
label: '定海'
}, {
value: '奉化',
label: '奉化'
}, {
value: '海盐',
label: '海盐'
}, {
value: '黄岩',
label: '黄岩'
}, {
value: '湖州',
label: '湖州'
}, {
value: '嘉兴',
label: '嘉兴'
}, {
value: '金华',
label: '金华'
}, {
value: '临安',
label: '临安'
}, {
value: '临海',
label: '临海'
}, {
value: '丽水',
label: '丽水'
}, {
value: '宁波',
label: '宁波'
}, {
value: '瓯海',
label: '瓯海'
}, {
value: '平湖',
label: '平湖'
}, {
value: '千岛湖',
label: '千岛湖'
}, {
value: '衢州',
label: '衢州'
}, {
value: '江山',
label: '江山'
}, {
value: '瑞安',
label: '瑞安'
}, {
value: '绍兴',
label: '绍兴'
}, {
value: '嵊州',
label: '嵊州'
}, {
value: '台州',
label: '台州'
}, {
value: '温岭',
label: '温岭'
}, {
value: '余姚',
label: '余姚'
}, {
value: '舟山',
label: '舟山'
}]
}, {
value: '海外',
label: '海外',
children: [{
value: "美国",
label: '美国'
}, {
value: '日本',
label: '日本'
}, {
value: '英国',
label: '英国'
}, {
value: '法国',
label: '法国'
}, {
value: '德国',
label: '德国'
}, {
value: '其他',
label: '其他'
}]
}];
/***/ }),
/***/ 3828:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/***/ (function() {
/* (ignored) */
/***/ })
}]);