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.
3972 lines
187 KiB
3972 lines
187 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[23767,39384],{
|
|
|
|
/***/ 1365:
|
|
/*!******************************************************!*\
|
|
!*** ./src/components/AuthenticationModel/index.tsx ***!
|
|
\******************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js */ 27161);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_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 */ 45295);
|
|
/* 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_test2_node_modules_babel_runtime_7_23_2_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));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 83731:
|
|
/*!****************************************************************!*\
|
|
!*** ./src/components/HomeModal/Advertisement.tsx + 1 modules ***!
|
|
\****************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ HomeModal_Advertisement; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(11006);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
;// CONCATENATED MODULE: ./src/components/HomeModal/Advertisement.css
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CloseCircleOutlined.js + 1 modules
|
|
var CloseCircleOutlined = __webpack_require__(47104);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(78130);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/components/HomeModal/Advertisement.tsx
|
|
|
|
|
|
|
|
//首页广告弹窗
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Advertisement(_ref) {
|
|
var modeldata = _ref.modeldata,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
isModel = _useState2[0],
|
|
SetIsmodel = _useState2[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
setTimeout(function () {
|
|
var isfirst = localStorage.getItem('isfirst');
|
|
var datatime = dayjs_min_default()(localStorage.getItem('showtime') || new Date());
|
|
if (datatime.diff(dayjs_min_default()(new Date()), 'hours') > 0) {
|
|
SetIsmodel(false);
|
|
} else {
|
|
if (isfirst && isfirst === '0') {
|
|
SetIsmodel(true);
|
|
localStorage.setItem('showtime', dayjs_min_default()().add(12, "hours").format("YYYY-MM-DD HH:mm:ss"));
|
|
} else {
|
|
SetIsmodel(false);
|
|
}
|
|
}
|
|
}, 1000);
|
|
//获取保存的本地的时间
|
|
}, []);
|
|
function closemodel(_x) {
|
|
return _closemodel.apply(this, arguments);
|
|
}
|
|
function _closemodel() {
|
|
_closemodel = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(type) {
|
|
var data, datas;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
localStorage.setItem('isfirst', '2');
|
|
if (modeldata && modeldata.link) {
|
|
SetIsmodel(true);
|
|
}
|
|
if (!(modeldata && !modeldata.link)) {
|
|
_context.next = 5;
|
|
break;
|
|
}
|
|
if (!(type === 2)) {
|
|
_context.next = 5;
|
|
break;
|
|
}
|
|
return _context.abrupt("return");
|
|
case 5:
|
|
SetIsmodel(false); //UploadNotice
|
|
_context.next = 8;
|
|
return dispatch({
|
|
type: 'homePage/UploadNotice',
|
|
payload: {
|
|
t: type,
|
|
id: modeldata && modeldata.id
|
|
}
|
|
});
|
|
case 8:
|
|
data = _context.sent;
|
|
if (data) {
|
|
if (modeldata && modeldata.link) {
|
|
if (type === 2) {
|
|
if (data.is_create) {
|
|
localStorage.setItem('iscreate', "1");
|
|
datas = {
|
|
competition: data.competition,
|
|
identify: data.identify,
|
|
sub_title: data.sub_title,
|
|
team_id: data.team_id,
|
|
team_name: data.team_name
|
|
};
|
|
localStorage.setItem('item', JSON.stringify(datas));
|
|
window.location.href = "".concat(modeldata && modeldata.link);
|
|
} else {
|
|
window.location.href = "".concat(modeldata && modeldata.link);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
case 10:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _closemodel.apply(this, arguments);
|
|
}
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
open: isModel
|
|
// open={false}
|
|
,
|
|
title: null,
|
|
footer: null,
|
|
style: {
|
|
background: "transparen"
|
|
},
|
|
centered: true,
|
|
width: 670,
|
|
className: "advertisementModal",
|
|
maskClosable: false
|
|
// closable={false}
|
|
,
|
|
closeIcon: /*#__PURE__*/(0,jsx_runtime.jsx)(CloseCircleOutlined/* default */.Z, {
|
|
onClick: function onClick() {
|
|
return closemodel(1);
|
|
},
|
|
style: {
|
|
fontSize: '25px',
|
|
color: '#fff'
|
|
}
|
|
}),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
style: {
|
|
width: '600px',
|
|
height: '337px',
|
|
marginTop: '15px',
|
|
borderRadius: '10px',
|
|
cursor: modeldata && modeldata.link ? 'pointer' : ""
|
|
},
|
|
onClick: function onClick() {
|
|
return closemodel(2);
|
|
},
|
|
src: env/* default */.Z.IMG_SERVER + "".concat(modeldata && modeldata.img_url)
|
|
})
|
|
});
|
|
}
|
|
/* harmony default export */ var HomeModal_Advertisement = (Advertisement);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 73208:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
var img = _ref.img,
|
|
_ref$buttonProps = _ref.buttonProps,
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
_ref$styles = _ref.styles,
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
customText = _ref.customText,
|
|
ButtonText = _ref.ButtonText,
|
|
ButtonClick = _ref.ButtonClick,
|
|
Buttonclass = _ref.Buttonclass,
|
|
ButtonTwo = _ref.ButtonTwo,
|
|
imgStyles = _ref.imgStyles,
|
|
_ref$loading = _ref.loading,
|
|
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
|
className: "tc animated fadeIn",
|
|
style: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
|
color: '#999',
|
|
margin: '100px auto',
|
|
visibility: loading ? 'hidden' : 'visible'
|
|
}), styles),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
|
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
|
style: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
|
className: "mt20 font14",
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
className: Buttonclass,
|
|
onClick: ButtonClick
|
|
}, buttonProps), {}, {
|
|
children: ButtonText
|
|
})), ButtonTwo && ButtonTwo]
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 13657:
|
|
/*!******************************************************************!*\
|
|
!*** ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx ***!
|
|
\******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_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 */ 1056);
|
|
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons */ 99174);
|
|
/* 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;
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_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, {
|
|
className: "modal_styles",
|
|
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: "\u521B\u5EFA\u6218\u961F"
|
|
}), /*#__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'
|
|
}
|
|
})]
|
|
}),
|
|
open: isAddmodle,
|
|
closable: false,
|
|
destroyOnClose: true,
|
|
onOk: function onOk() {
|
|
if (!personname) {
|
|
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.info('战队名不能为空');
|
|
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',
|
|
marginLeft: '10px'
|
|
},
|
|
children: "*"
|
|
}), "\u961F\u540D\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", {
|
|
style: {
|
|
marginTop: '15px',
|
|
marginLeft: '10px',
|
|
marginRight: '10px'
|
|
},
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
|
|
placeholder: "请输入队名",
|
|
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);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 46646:
|
|
/*!*******************************************************************!*\
|
|
!*** ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx ***!
|
|
\*******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_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 */ 1056);
|
|
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons */ 99174);
|
|
/* 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;
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_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, {
|
|
className: "modal_styles",
|
|
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: "\u52A0\u5165\u6218\u961F"
|
|
}), /*#__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'
|
|
}
|
|
})]
|
|
}),
|
|
open: isjoin,
|
|
closable: false,
|
|
destroyOnClose: true,
|
|
onOk: function onOk() {
|
|
if (!code) {
|
|
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.info('邀请码不能为空');
|
|
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: {
|
|
marginLeft: '10px',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
marginRight: '10px'
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
|
|
style: {
|
|
flex: 'none'
|
|
},
|
|
children: "\u9080\u8BF7\u7801\uFF1A"
|
|
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
|
|
placeholder: "请输入邀请码",
|
|
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);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 30739:
|
|
/*!************************************************************!*\
|
|
!*** ./src/pages/Competitions/Index/index.tsx + 7 modules ***!
|
|
\************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Index; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(11006);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(27161);
|
|
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__(45295);
|
|
// 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/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// 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 modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(1056);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(59981);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/list/index.js + 3 modules
|
|
var list = __webpack_require__(73755);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// 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/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(41867);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(72315);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(22739);
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Index/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Indexmodules = ({"flex_box_center":"flex_box_center___KHcKj","flex_space_between":"flex_space_between___rpKE6","flex_box_vertical_center":"flex_box_vertical_center___aBwFB","flex_box_center_end":"flex_box_center_end___eszEn","flex_box_column":"flex_box_column___y2rDr","wrp":"wrp___b6xZq","tabsWrap":"tabsWrap___rNsVP","searchWrap":"searchWrap___NzDrD","search":"search___O3S5n","searchIcon":"searchIcon___S8AXh","btns":"btns___gL_1J","searchWrap_right":"searchWrap_right___GVEny","description":"description____uPzl","bg":"bg___lqNd2","list":"list___JU4aR","status":"status___d75lJ","desc":"desc___NuO07","flex1":"flex1___ibscW","item":"item___E2e6I","footer":"footer___az6N2","bottomText":"bottomText___XT9Es","CompetitionsList":"CompetitionsList___BU3Jl","shadow":"shadow___kJYAn","signup":"signup___UmfzR","CompetitionsListzhezhao":"CompetitionsListzhezhao___E2v5E","divimg":"divimg___R3hKI","commonTextBox":"commonTextBox___C7Stw","havetext":"havetext___Q_Zdl","Finishedtext":"Finishedtext___zMGI8","Comingtext":"Comingtext___cJOQk","info":"info___eIwYF","bonus":"bonus___eKcia","rmb":"rmb___4wccY","applyInfo":"applyInfo___sqck8","task_hide":"task_hide___MQUVb","task_hide_2":"task_hide_2___MoAlk","Unpublishedtext":"Unpublishedtext___tqsH6","checkboxtitle":"checkboxtitle___iwuEz","scoremodal":"scoremodal____yQdA","title":"title___jb7xW","content":"content___NsK20","bottom":"bottom___CyoKb","yes":"yes___s2kKh","no":"no___Adxtg","baseFormItem":"baseFormItem___rawKU","jsinput":"jsinput___XEFKk","top":"top___J5EnE"});
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(73208);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(78130);
|
|
// EXTERNAL MODULE: ./src/components/AuthenticationModel/index.tsx
|
|
var AuthenticationModel = __webpack_require__(1365);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(13186);
|
|
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
|
|
var verifyLogin = __webpack_require__(14341);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
|
|
var es_checkbox = __webpack_require__(24905);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(93923);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// 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/col/index.js
|
|
var col = __webpack_require__(43604);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
var divider = __webpack_require__(28103);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./node_modules/_echarts-for-react@2.0.16@echarts-for-react/lib/index.js
|
|
var lib = __webpack_require__(42441);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(91506);
|
|
// EXTERNAL MODULE: ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js
|
|
var _react_infinite_scroller_1_2_4_react_infinite_scroller = __webpack_require__(26724);
|
|
var _react_infinite_scroller_1_2_4_react_infinite_scroller_default = /*#__PURE__*/__webpack_require__.n(_react_infinite_scroller_1_2_4_react_infinite_scroller);
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
var utils_export = __webpack_require__(39384);
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Index/Statistics/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Statisticsmodules = ({"searchWrap":"searchWrap___xQK12","search":"search___yq6Qw","searchIcon":"searchIcon___leI1w","scrollWrapper":"scrollWrapper___jhUoo","checkBoxWrapper":"checkBoxWrapper___p_r14","checkboxtitle":"checkboxtitle___iHgQL","partTitle":"partTitle___dW4po","exportBtn":"exportBtn___ekb9d","pngIcon":"pngIcon___Jv1zf"});
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Index/Statistics/config.tsx
|
|
var getCourseCountOptions = function getCourseCountOptions() {
|
|
var datas = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
return {
|
|
color: ['#0152d9', '#B620E0', '#44D7B6'],
|
|
legend: {},
|
|
tooltip: {
|
|
// formatter: '{b0}: {c0}'
|
|
},
|
|
dataset: {
|
|
source: datas
|
|
},
|
|
xAxis: {
|
|
type: 'category'
|
|
},
|
|
yAxis: {},
|
|
// Declare several bar series, each will be mapped
|
|
// to a column of dataset.source by default.
|
|
|
|
series: [{
|
|
type: 'bar',
|
|
label: {
|
|
show: true,
|
|
position: 'top'
|
|
// formatter: '{b}: {@score}12321'
|
|
}
|
|
}, {
|
|
type: 'bar',
|
|
label: {
|
|
show: true,
|
|
position: 'top'
|
|
}
|
|
}, {
|
|
type: 'bar',
|
|
label: {
|
|
show: true,
|
|
position: 'top'
|
|
}
|
|
}]
|
|
};
|
|
};
|
|
;// CONCATENATED MODULE: ./src/assets/images/competition/export-icon.png
|
|
var export_icon_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAcCAYAAAB/E6/TAAAAAXNSR0IArs4c6QAAAtpJREFUSEu1lm9oTWEcx7+/57rbLLWE9oJQxPy7O2erSXmhRHlDEnnjxTkXS/6k1ChFWMv2Bomku3PLG3snEl5IvDB/yr3nXCEWa01ZQ8SV7e7u+WqzLbu7f3Yuztvn+/t+zvP8vr/nHEERj2m5x+JR46SfUvEjHtUattcnIs3x1tDxydYXDQJZKoJjccc4NRnYpEG1lrdyUKFKaakkdBOBwDBA5KjrVDcVghUEmba3EUQzwapcZgrqcCwaaskHywuqsRKWFkZAqvwm0gcVrIq3Lu3KpcsJMq2OWZAfHSQq8h6LSL9ANsed0O2idmTaXphkZKQP7wFcFeCJKHyh5h0SQUBSCtwSixo3i+6RYXtnQB4UyK1yKd3+0Kn6PhZvy+sXoVCprW4kdL0QZDgzuUSm5Q0l61AgWDb72eXFn/7UGZaXVKJ2QOGtJpdn8xBQBwVPnkaqO/ODwq5Not51jJWZRsbOxKYpDHxIM/0ob1BEkuUlWNB+qbo3547q9r6akfrZf911jNXZ3rgmnNintT4/3CeFTRD5OKrTohQG040g1quArI1Fqu/ljbcZ9i5WlE5puH9xWTITZlreAYLnRNAVd4z5E9bDicPU+rSIWhd3Qnezgjbs7yj9OZgK9mk1sz81sLCiLPA40+hbX3qPJluKBpm2ewRE49gVUyBSRYMM2+sGOWf0HhNhd95BZCAZc1Zc8310pu32kpgF4KsbNaZPZkayaczMHtXufjGXg+mlo2KSbb+vHaEIe/yD5E1QwRqgbBsXBsP2ekBW+jfMXSFAO5S6kQl6jhzT/TdwEWkjuX0s3kPffwIn/sY0a61IEuS0MVDdLndRKo3X/xw0YjhuYA3bi4E0/wdsHKjGSjRo6Ob/DjLDL+dRD3QCLPgP4fdlJtx1pu21k1zl16iQfiIo7O6gxpVChX7XBWpNPBp6MO6oaizvLIF6gmV+DXNE/F3J1JK6pxeWfP4Fq1RgLKZBv/kAAAAASUVORK5CYII=";
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Index/Statistics/Table.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["competitions", "globalSetting", "loading", "dispatch", "user", "type", "keyword"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TabPane = tabs/* default */.Z.TabPane;
|
|
var Group = es_checkbox/* default */.Z.Group;
|
|
var competitionsPage = function competitionsPage(_ref) {
|
|
var _Datas$school_level_c, _Datas$school_level_c2, _Datas$school_level_c3, _Datas$school_level_c4, _Datas$school_level_c5;
|
|
var competitions = _ref.competitions,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
user = _ref.user,
|
|
type = _ref.type,
|
|
keyword = _ref.keyword,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
data: [["东北", 0, 0, 0], ["华东", 0, 0, 0], ["华北", 0, 0, 0], ["华中", 0, 0, 0], ["华南", 0, 0, 0], ["西南", 0, 0, 0], ["西北", 0, 0, 0], ["其他", 0, 0, 0]]
|
|
}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
Datas = _useState2[0],
|
|
setDatas = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
loadings = _useState4[0],
|
|
setloadings = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
hasMore = _useState6[0],
|
|
sethasMore = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
CheckedValues = _useState8[0],
|
|
setCheckedValues = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
data = _useState10[0],
|
|
setData = _useState10[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getdata();
|
|
}, [params, keyword]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
competitions.listParams.url_suffix_name = params.Identifier;
|
|
}, [params.Identifier]);
|
|
function getdata() {
|
|
return _getdata.apply(this, arguments);
|
|
}
|
|
function _getdata() {
|
|
_getdata = 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:
|
|
setloadings(true);
|
|
competitions.listParams.page = 1;
|
|
competitions.listParams.keyword = keyword || '';
|
|
competitions.listParams.category = type;
|
|
_context3.next = 6;
|
|
return dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
case 6:
|
|
data = _context3.sent;
|
|
setloadings(false);
|
|
setCheckedValues([]);
|
|
setDatas({
|
|
data: [["东北", 0, 0, 0], ["华东", 0, 0, 0], ["华北", 0, 0, 0], ["华中", 0, 0, 0], ["华南", 0, 0, 0], ["西南", 0, 0, 0], ["西北", 0, 0, 0], ["其他", 0, 0, 0]]
|
|
});
|
|
setData(toConsumableArray_default()(data === null || data === void 0 ? void 0 : data.competitions));
|
|
case 11:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return _getdata.apply(this, arguments);
|
|
}
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "edu-container minH500",
|
|
children: [(data === null || data === void 0 ? void 0 : data.length) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), (data === null || data === void 0 ? void 0 : data.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.scrollWrapper,
|
|
style: {
|
|
overflowY: 'auto'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)((_react_infinite_scroller_1_2_4_react_infinite_scroller_default()), {
|
|
initialLoad: false,
|
|
pageStart: 1,
|
|
threshold: 20,
|
|
loadMore: /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(page) {
|
|
var _lists$competitions, lists;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
competitions.listParams.category = type;
|
|
competitions.listParams.page = page;
|
|
if (!(hasMore && !loadings)) {
|
|
_context.next = 10;
|
|
break;
|
|
}
|
|
setloadings(true);
|
|
_context.next = 6;
|
|
return dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
// payload: {
|
|
// category: type,
|
|
// page: page,
|
|
// },
|
|
});
|
|
case 6:
|
|
lists = _context.sent;
|
|
setloadings(false);
|
|
setData([].concat(toConsumableArray_default()(data), toConsumableArray_default()(lists === null || lists === void 0 ? void 0 : lists.competitions)));
|
|
if ((lists === null || lists === void 0 || (_lists$competitions = lists.competitions) === null || _lists$competitions === void 0 ? void 0 : _lists$competitions.length) < 20) sethasMore(false);
|
|
case 10:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function (_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}(),
|
|
hasMore: hasMore,
|
|
useWindow: false,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
spinning: loadings,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Group, {
|
|
value: CheckedValues,
|
|
onChange: /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(checkedValues) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
setCheckedValues(toConsumableArray_default()(checkedValues));
|
|
if (!((checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues.length) > 0)) {
|
|
_context2.next = 8;
|
|
break;
|
|
}
|
|
_context2.next = 4;
|
|
return (0,fetch/* default */.ZP)("/api/competitions/region_reports.json", {
|
|
method: 'get',
|
|
params: {
|
|
ids: checkedValues.toString()
|
|
}
|
|
});
|
|
case 4:
|
|
res = _context2.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setDatas(res);
|
|
}
|
|
_context2.next = 9;
|
|
break;
|
|
case 8:
|
|
setDatas({
|
|
data: [["东北", 0, 0, 0], ["华东", 0, 0, 0], ["华北", 0, 0, 0], ["华中", 0, 0, 0], ["华南", 0, 0, 0], ["西南", 0, 0, 0], ["西北", 0, 0, 0], ["其他", 0, 0, 0]]
|
|
});
|
|
case 9:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function (_x2) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}(),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
gutter: [16, 16],
|
|
children: data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 12,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
value: item.id,
|
|
className: Statisticsmodules.checkBoxWrapper,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(tooltip/* default */.Z, {
|
|
className: Statisticsmodules.checkboxtitle,
|
|
title: item.sub_title ? item.name + '——' + item.sub_title : item.name,
|
|
children: [item.name, item.sub_title ? '——' + item.sub_title : '']
|
|
})
|
|
})
|
|
});
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
justify: "space-between",
|
|
align: "middle",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.partTitle,
|
|
children: "\u6570\u636E\u5C55\u793A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
className: Statisticsmodules.exportBtn,
|
|
onClick: function onClick() {
|
|
(0,utils_export/* Exportcompetitions */.y8)({
|
|
ids: CheckedValues.toString()
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: export_icon_namespaceObject,
|
|
alt: "",
|
|
className: Statisticsmodules.pngIcon
|
|
}), "\u6570\u636E\u5BFC\u51FA"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginTop: '10px',
|
|
background: '#fff',
|
|
paddingBottom: '20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
style: {
|
|
padding: '0px 40px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
textAlign: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
fontSize: '20px',
|
|
fontWeight: 600
|
|
},
|
|
children: "\u7ADE\u8D5B\u62A5\u540D\u60C5\u51B5\u7EDF\u8BA1\u7B80\u62A5"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginTop: '20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u622A\u6B62\u81F3\uFF1A", dayjs_min_default()(new Date()).format('MM月DD日 HH:mm:ss')]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
marginLeft: '30px'
|
|
},
|
|
children: ["\u6240\u9009\u4E2D\u5927\u8D5B\u76EE\u524D\u5408\u8BA1\u5171\u6709\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
color: '#999999'
|
|
},
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#B620E0'
|
|
},
|
|
children: (Datas === null || Datas === void 0 ? void 0 : Datas.school_count) || 0
|
|
}), " \u6240\u9AD8\u6821 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#44D7B6',
|
|
marginLeft: '10px'
|
|
},
|
|
children: (Datas === null || Datas === void 0 ? void 0 : Datas.team_count) || 0
|
|
}), " \u652F\u961F\u4F0D ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#0152d9',
|
|
marginLeft: '10px'
|
|
},
|
|
children: (Datas === null || Datas === void 0 ? void 0 : Datas.user_count) || 0
|
|
}), " \u540D\u5B66\u751F\u62A5\u540D "]
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
height: '70px',
|
|
display: 'flex',
|
|
justifyContent: 'center',
|
|
padding: '20px 0px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
margin: '0px 40px',
|
|
textAlign: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
style: {
|
|
color: '#333333'
|
|
},
|
|
children: "985\u9662\u6821"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
color: '#999999',
|
|
fontSize: '14px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#E53333',
|
|
fontSize: '20px',
|
|
marginRight: '2px'
|
|
},
|
|
children: (Datas === null || Datas === void 0 || (_Datas$school_level_c = Datas.school_level_count) === null || _Datas$school_level_c === void 0 ? void 0 : _Datas$school_level_c[0]) || 0
|
|
}), "\u6240"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
height: '54px',
|
|
border: '1px solid #f1f1f1',
|
|
width: '1px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
margin: '0px 40px',
|
|
textAlign: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
style: {
|
|
color: '#333333'
|
|
},
|
|
children: "211\u9662\u6821"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
color: '#999999',
|
|
fontSize: '14px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FF8C29',
|
|
fontSize: '20px',
|
|
marginRight: '2px'
|
|
},
|
|
children: (Datas === null || Datas === void 0 || (_Datas$school_level_c2 = Datas.school_level_count) === null || _Datas$school_level_c2 === void 0 ? void 0 : _Datas$school_level_c2[1]) || 0
|
|
}), "\u6240"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
height: '54px',
|
|
border: '1px solid #f1f1f1',
|
|
width: '1px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
margin: '0px 40px',
|
|
textAlign: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
style: {
|
|
color: '#333333'
|
|
},
|
|
children: "\u672C\u79D1\u9662\u6821"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
color: '#999999',
|
|
fontSize: '14px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#F7B500',
|
|
fontSize: '20px',
|
|
marginRight: '2px'
|
|
},
|
|
children: (Datas === null || Datas === void 0 || (_Datas$school_level_c3 = Datas.school_level_count) === null || _Datas$school_level_c3 === void 0 ? void 0 : _Datas$school_level_c3[2]) || 0
|
|
}), "\u6240"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
height: '54px',
|
|
border: '1px solid #f1f1f1',
|
|
width: '1px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
margin: '0px 40px',
|
|
textAlign: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
style: {
|
|
color: '#333333'
|
|
},
|
|
children: "\u9AD8\u804C\u9AD8\u4E13"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
color: '#999999',
|
|
fontSize: '14px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#0152d9',
|
|
fontSize: '20px',
|
|
marginRight: '2px'
|
|
},
|
|
children: (Datas === null || Datas === void 0 || (_Datas$school_level_c4 = Datas.school_level_count) === null || _Datas$school_level_c4 === void 0 ? void 0 : _Datas$school_level_c4[3]) || 0
|
|
}), "\u6240"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
height: '54px',
|
|
border: '1px solid #f1f1f1',
|
|
width: '1px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
margin: '0px 40px',
|
|
textAlign: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
style: {
|
|
color: '#333333'
|
|
},
|
|
children: "\u5176\u4ED6\u9662\u6821"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
color: '#999999',
|
|
fontSize: '14px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666',
|
|
fontSize: '20px',
|
|
marginRight: '2px'
|
|
},
|
|
children: (Datas === null || Datas === void 0 || (_Datas$school_level_c5 = Datas.school_level_count) === null || _Datas$school_level_c5 === void 0 ? void 0 : _Datas$school_level_c5[4]) || 0
|
|
}), "\u6240"]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getCourseCountOptions(Object.values(Datas === null || Datas === void 0 ? void 0 : Datas.data)),
|
|
style: {
|
|
height: 400,
|
|
width: 1200
|
|
},
|
|
opts: {
|
|
renderer: 'svg'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
justifyContent: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
display: 'flex',
|
|
marginRight: '5px',
|
|
width: '14px',
|
|
height: '14px',
|
|
background: '#0152d9'
|
|
}
|
|
}), "\u4EBA\u6570"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
margin: '0px 20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
display: 'flex',
|
|
marginRight: '5px',
|
|
width: '14px',
|
|
height: '14px',
|
|
background: '#B620E0'
|
|
}
|
|
}), "\u5B66\u6821\u6570"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
display: 'flex',
|
|
marginRight: '5px',
|
|
width: '14px',
|
|
height: '14px',
|
|
background: '#44D7B6'
|
|
}
|
|
}), "\u961F\u4F0D\u6570\uFF08\u961F\u4F0D\u5982\u679C\u8DE8\u533A\uFF0C\u5219\u8BE5\u961F\u4F0D\u5728\u5404\u81EA\u533A\u57DF\u961F\u4F0D\u6570\u90FD\u52A01\uFF09"]
|
|
})]
|
|
})]
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var Table = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var competitions = _ref4.competitions,
|
|
loading = _ref4.loading,
|
|
globalSetting = _ref4.globalSetting,
|
|
user = _ref4.user;
|
|
return {
|
|
competitions: competitions,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.competitions,
|
|
user: user
|
|
};
|
|
})(competitionsPage));
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 32 modules
|
|
var ui_customization = __webpack_require__(89200);
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Index/Statistics/index.tsx
|
|
|
|
|
|
var Statistics_excluded = ["competitions", "globalSetting", "loading", "dispatch", "user"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Statistics_TabPane = tabs/* default */.Z.TabPane;
|
|
var Statistics_Group = es_checkbox/* default */.Z.Group;
|
|
var Statistics_competitionsPage = function competitionsPage(_ref) {
|
|
var competitions = _ref.competitions,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
user = _ref.user,
|
|
props = objectWithoutProperties_default()(_ref, Statistics_excluded);
|
|
var _useState = (0,_react_17_0_2_react.useState)(''),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
type = _useState2[0],
|
|
setType = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
keyword = _useState4[0],
|
|
setkeyword = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
inputValue = _useState6[0],
|
|
setInputValue = _useState6[1];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "edu-container minH500",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
justify: "space-between",
|
|
style: {
|
|
marginBottom: 26,
|
|
marginTop: 30
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* SuperiorTabs */.tp, {
|
|
dataSource: [{
|
|
id: '',
|
|
name: '全部'
|
|
}, {
|
|
id: 'progressing',
|
|
name: '进行中的'
|
|
}, {
|
|
id: 'ended',
|
|
name: '往期比赛'
|
|
}],
|
|
value: type,
|
|
onChange: setType
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.searchWrap,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
placeholder: "\u8BF7\u8F93\u5165\u7ADE\u8D5B\u540D\u79F0",
|
|
size: "large",
|
|
className: Statisticsmodules.search,
|
|
value: inputValue,
|
|
onChange: function onChange(e) {
|
|
if (e.target.value) {
|
|
setInputValue(e.target.value);
|
|
} else {
|
|
setkeyword(e.target.value);
|
|
setInputValue(e.target.value);
|
|
}
|
|
},
|
|
onSearch: function onSearch(value) {
|
|
setkeyword(value);
|
|
},
|
|
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-sousuo9 font14 ".concat(Statisticsmodules.searchIcon),
|
|
onClick: function onClick() {
|
|
return setkeyword(inputValue);
|
|
}
|
|
})
|
|
})
|
|
})]
|
|
}), type === "" && /*#__PURE__*/(0,jsx_runtime.jsx)(Table, {
|
|
type: type,
|
|
keyword: keyword
|
|
}), type === "progressing" && /*#__PURE__*/(0,jsx_runtime.jsx)(Table, {
|
|
type: type,
|
|
keyword: keyword
|
|
}), type === "ended" && /*#__PURE__*/(0,jsx_runtime.jsx)(Table, {
|
|
type: type,
|
|
keyword: keyword
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var Statistics = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var competitions = _ref2.competitions,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting,
|
|
user = _ref2.user;
|
|
return {
|
|
competitions: competitions,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.competitions,
|
|
user: user
|
|
};
|
|
})(Statistics_competitionsPage));
|
|
// EXTERNAL MODULE: ./src/components/ImagesIcon/index.ts + 32 modules
|
|
var ImagesIcon = __webpack_require__(12416);
|
|
// EXTERNAL MODULE: ./src/components/HomeModal/Advertisement.tsx + 1 modules
|
|
var Advertisement = __webpack_require__(83731);
|
|
;// CONCATENATED MODULE: ./src/assets/images/competition/banner.jpg
|
|
var banner_namespaceObject = __webpack_require__.p + "static/banner.15e0d263.jpg";
|
|
// EXTERNAL MODULE: ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx
|
|
var JoinModel = __webpack_require__(46646);
|
|
// EXTERNAL MODULE: ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx
|
|
var Addteams = __webpack_require__(13657);
|
|
// EXTERNAL MODULE: ./src/pages/Competitions/components/PhoneModal.tsx
|
|
var PhoneModal = __webpack_require__(52421);
|
|
// EXTERNAL MODULE: ./src/service/global.ts
|
|
var global = __webpack_require__(7939);
|
|
;// CONCATENATED MODULE: ./src/pages/Competitions/Index/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var Index_excluded = ["competitions", "globalSetting", "loading", "dispatch", "user"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Index_TabPane = tabs/* default */.Z.TabPane;
|
|
var Index_competitionsPage = function competitionsPage(_ref) {
|
|
var _user$userInfo3, _user$userInfo4, _user$userInfo5, _user$userInfo6;
|
|
var competitions = _ref.competitions,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
user = _ref.user,
|
|
props = objectWithoutProperties_default()(_ref, Index_excluded);
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
searchParams = _useSearchParams2[0];
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
isStatistics = _useState2[0],
|
|
setIsStatistics = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
modeldata = _useState4[0],
|
|
setModeldata = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
isshowmodal = _useState6[0],
|
|
setisshowmodal = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
isAddmodel = _useState8[0],
|
|
setIsAddmodel = _useState8[1]; //新建战队
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
isJoin = _useState10[0],
|
|
setJoin = _useState10[1]; //加入战队
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
isClick = _useState12[0],
|
|
setIsClick = _useState12[1]; //增加参数 防止点击过快 多次调用
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
items = _useState14[0],
|
|
setitems = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
showphone = _useState16[0],
|
|
setshowphone = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
isopen = _useState18[0],
|
|
setisopen = _useState18[1];
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
datas = _useState20[0],
|
|
setdatas = _useState20[1];
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
iscreate = _useState22[0],
|
|
setiscreate = _useState22[1];
|
|
var _useParams = (0,_umi_production_exports.useParams)(),
|
|
identifier = _useParams.identifier;
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
buttonloading = _useState24[0],
|
|
setbuttonloading = _useState24[1];
|
|
var _useState25 = (0,_react_17_0_2_react.useState)('mine'),
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
scoreByBlank = _useState26[0],
|
|
setscoreByBlank = _useState26[1];
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
certificate = _useState28[0],
|
|
setcertificate = _useState28[1];
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
keywords = _useState30[0],
|
|
setkeywords = _useState30[1];
|
|
var _useState31 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
dataItems = _useState32[0],
|
|
seetdataItems = _useState32[1];
|
|
var _useState33 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
btnshow = _useState34[0],
|
|
setbtnShow = _useState34[1];
|
|
|
|
//出现页面右侧悬浮按钮
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
dispatch({
|
|
type: 'globalSetting/onlyShowBackTopToggle',
|
|
payload: false
|
|
});
|
|
return function () {
|
|
dispatch({
|
|
type: 'globalSetting/onlyShowBackTopToggle',
|
|
payload: true
|
|
});
|
|
};
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
competitions.listParams.url_suffix_name = identifier;
|
|
}, [identifier]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
// getHomeNotice();
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
}, [competitions.name]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
(0,util/* setDocumentTitle */.Dk)('在线竞赛');
|
|
});
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (location.pathname.includes('list')) {
|
|
setbtnShow(false);
|
|
}
|
|
});
|
|
var onShowSizeChange = function onShowSizeChange(current, pageSize) {
|
|
document.body.scrollIntoView();
|
|
competitions.listParams.page = current;
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, competitions.listParams), {}, {
|
|
edu: searchParams.get("edu")
|
|
})
|
|
});
|
|
};
|
|
function noclick(e) {
|
|
e.stopPropagation();
|
|
}
|
|
function gotocourse(_x, _x2, _x3) {
|
|
return _gotocourse.apply(this, arguments);
|
|
}
|
|
function _gotocourse() {
|
|
_gotocourse = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(e, item, url) {
|
|
var _user$userInfo7;
|
|
var res, result, _user$userInfo8, data;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
e.stopPropagation();
|
|
// if (!item.invite_code) {
|
|
// message.info('本竞赛只面向部分学校/单位开放,你暂时没有参赛资格');
|
|
// return;
|
|
// }
|
|
// items=item
|
|
setitems(objectSpread2_default()({}, item));
|
|
if ((0,verifyLogin/* handleVerify */.tJ)(dispatch)) {
|
|
_context3.next = 4;
|
|
break;
|
|
}
|
|
return _context3.abrupt("return");
|
|
case 4:
|
|
if (!(item !== null && item !== void 0 && item.is_authentication && !(user !== null && user !== void 0 && (_user$userInfo7 = user.userInfo) !== null && _user$userInfo7 !== void 0 && _user$userInfo7.authentication))) {
|
|
_context3.next = 7;
|
|
break;
|
|
}
|
|
dispatch({
|
|
type: 'shixunsDetail/setActionTabs',
|
|
payload: {
|
|
key: 'Banner-Auth'
|
|
}
|
|
});
|
|
return _context3.abrupt("return");
|
|
case 7:
|
|
_context3.next = 9;
|
|
return (0,fetch/* default */.ZP)("/api/competitions/".concat(item.identifier, "/check_open.json"), {
|
|
method: 'post'
|
|
});
|
|
case 9:
|
|
res = _context3.sent;
|
|
if (!(res.status !== 0)) {
|
|
_context3.next = 12;
|
|
break;
|
|
}
|
|
return _context3.abrupt("return");
|
|
case 12:
|
|
if (!(url === 'ismodel')) {
|
|
_context3.next = 26;
|
|
break;
|
|
}
|
|
if (!(item.member_of_course === true)) {
|
|
_context3.next = 17;
|
|
break;
|
|
}
|
|
(0,util/* openNewWindow */.xg)("/classrooms/".concat(item.course_id));
|
|
_context3.next = 24;
|
|
break;
|
|
case 17:
|
|
if (item.invite_code) {
|
|
_context3.next = 20;
|
|
break;
|
|
}
|
|
message/* default */.ZP.info('本竞赛只面向部分学校/单位开放,你暂时没有参赛资格');
|
|
return _context3.abrupt("return");
|
|
case 20:
|
|
_context3.next = 22;
|
|
return dispatch({
|
|
type: 'competitions/addApplytojoincourse',
|
|
payload: {
|
|
invite_code: item.invite_code,
|
|
student: 1
|
|
}
|
|
});
|
|
case 22:
|
|
result = _context3.sent;
|
|
if (result.status === 0) {
|
|
if (item.is_new) {
|
|
_umi_production_exports.history.push("/competitions/detail/".concat(item.identifier));
|
|
} else {
|
|
(0,util/* openNewWindow */.xg)("/classrooms/".concat(item.course_id));
|
|
}
|
|
}
|
|
case 24:
|
|
_context3.next = 70;
|
|
break;
|
|
case 26:
|
|
if (!(url === 'personal')) {
|
|
_context3.next = 57;
|
|
break;
|
|
}
|
|
if (!item.is_new) {
|
|
_context3.next = 54;
|
|
break;
|
|
}
|
|
if (!(item.enrolled === true)) {
|
|
_context3.next = 31;
|
|
break;
|
|
}
|
|
(0,util/* openNewWindow */.xg)("/competitions/detail/".concat(item.identifier, "?type=1"));
|
|
return _context3.abrupt("return");
|
|
case 31:
|
|
if (!(item.teacher_need_phone || item.member_need_phone)) {
|
|
_context3.next = 35;
|
|
break;
|
|
}
|
|
e.stopPropagation();
|
|
setshowphone(true);
|
|
return _context3.abrupt("return");
|
|
case 35:
|
|
if ((0,verifyLogin/* handleVerify */.tJ)(dispatch)) {
|
|
_context3.next = 37;
|
|
break;
|
|
}
|
|
return _context3.abrupt("return");
|
|
case 37:
|
|
if (!(item !== null && item !== void 0 && item.need_check_mail)) {
|
|
_context3.next = 41;
|
|
break;
|
|
}
|
|
e.stopPropagation();
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
icon: null,
|
|
content: '您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。',
|
|
onOk: function onOk() {
|
|
window.open('/account/secure');
|
|
}
|
|
});
|
|
return _context3.abrupt("return");
|
|
case 41:
|
|
if (!(item !== null && item !== void 0 && item.is_authentication && !(user !== null && user !== void 0 && (_user$userInfo8 = user.userInfo) !== null && _user$userInfo8 !== void 0 && _user$userInfo8.authentication))) {
|
|
_context3.next = 44;
|
|
break;
|
|
}
|
|
dispatch({
|
|
type: 'shixunsDetail/setActionTabs',
|
|
payload: {
|
|
key: 'Banner-Auth'
|
|
}
|
|
});
|
|
return _context3.abrupt("return");
|
|
case 44:
|
|
if (!buttonloading) {
|
|
_context3.next = 46;
|
|
break;
|
|
}
|
|
return _context3.abrupt("return");
|
|
case 46:
|
|
setbuttonloading(true);
|
|
_context3.next = 49;
|
|
return dispatch({
|
|
type: 'competitions/AddTeam',
|
|
payload: {
|
|
identifier: item.identifier
|
|
}
|
|
});
|
|
case 49:
|
|
data = _context3.sent;
|
|
setbuttonloading(false);
|
|
if (data && data.status === 0) {
|
|
setdatas(data);
|
|
setisopen(true);
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
}
|
|
_context3.next = 55;
|
|
break;
|
|
case 54:
|
|
addTeams('');
|
|
case 55:
|
|
_context3.next = 70;
|
|
break;
|
|
case 57:
|
|
if (!(item.enrolled === true)) {
|
|
_context3.next = 60;
|
|
break;
|
|
}
|
|
(0,util/* openNewWindow */.xg)(url);
|
|
return _context3.abrupt("return");
|
|
case 60:
|
|
if (!(url === 'personal')) {
|
|
_context3.next = 68;
|
|
break;
|
|
}
|
|
if (!(item.enroll_ended === true)) {
|
|
_context3.next = 64;
|
|
break;
|
|
}
|
|
//已截止
|
|
message/* default */.ZP.info("\u62A5\u540D\u5DF2\u622A\u6B62");
|
|
return _context3.abrupt("return");
|
|
case 64:
|
|
setisshowmodal(true);
|
|
setitems(item);
|
|
_context3.next = 70;
|
|
break;
|
|
case 68:
|
|
setisshowmodal(true);
|
|
setitems(item);
|
|
case 70:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return _gotocourse.apply(this, arguments);
|
|
}
|
|
function tourl(url) {
|
|
(0,util/* openNewWindow */.xg)(url);
|
|
}
|
|
|
|
//创建战队 AddTeam
|
|
function addTeams(_x4) {
|
|
return _addTeams.apply(this, arguments);
|
|
}
|
|
function _addTeams() {
|
|
_addTeams = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(name) {
|
|
var data;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
if (isClick) {
|
|
_context4.next = 2;
|
|
break;
|
|
}
|
|
return _context4.abrupt("return");
|
|
case 2:
|
|
setIsClick(false);
|
|
if (!isadd()) {
|
|
_context4.next = 5;
|
|
break;
|
|
}
|
|
return _context4.abrupt("return");
|
|
case 5:
|
|
_context4.next = 7;
|
|
return dispatch({
|
|
type: 'competitions/AddTeam',
|
|
payload: {
|
|
identifier: items === null || items === void 0 ? void 0 : items.identifier,
|
|
name: name
|
|
}
|
|
});
|
|
case 7:
|
|
data = _context4.sent;
|
|
if (data && data.status === 0) {
|
|
setisopen(true);
|
|
setdatas(data);
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
setIsAddmodel(false);
|
|
} else {
|
|
setIsClick(true);
|
|
}
|
|
case 9:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return _addTeams.apply(this, arguments);
|
|
}
|
|
function isadd() {
|
|
var _user$userInfo;
|
|
//判断 如果不符合条件 不能加入竞赛
|
|
if (user !== null && user !== void 0 && (_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.is_teacher) {
|
|
var _items$teacher_staff;
|
|
if (items !== null && items !== void 0 && (_items$teacher_staff = items.teacher_staff) !== null && _items$teacher_staff !== void 0 && _items$teacher_staff.mutiple_limited) {
|
|
if (items !== null && items !== void 0 && items.enrolled) {
|
|
message/* default */.ZP.info('你已经报名,不能重复报名');
|
|
setIsClick(true);
|
|
return true;
|
|
}
|
|
}
|
|
} else {
|
|
var _items$member_staff;
|
|
if (items !== null && items !== void 0 && (_items$member_staff = items.member_staff) !== null && _items$member_staff !== void 0 && _items$member_staff.mutiple_limited) {
|
|
if (items !== null && items !== void 0 && items.enrolled) {
|
|
message/* default */.ZP.info('你已经报名,不能重复报名');
|
|
setIsClick(true);
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
//判断竞赛是否关闭
|
|
if (items !== null && items !== void 0 && items.enroll_ended) {
|
|
message/* default */.ZP.info('报名已截止,无需报名');
|
|
setIsClick(true);
|
|
return true;
|
|
}
|
|
|
|
//禁止老师or学生报名
|
|
console.log('---', items);
|
|
if (items !== null && items !== void 0 && items.is_new) {} else {
|
|
|
|
// if (user?.userInfo?.is_teacher) {
|
|
// if (!items.teacher_staff) {
|
|
// message.info('已禁止老师报名')
|
|
// setIsClick(true);
|
|
// return true;
|
|
// }
|
|
// } else {
|
|
// if (!items?.member_staff) {
|
|
// message.info('已禁止学生报名')
|
|
// setIsClick(true);
|
|
// return true;
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
//加入战队
|
|
function JoinTeams(_x5) {
|
|
return _JoinTeams.apply(this, arguments);
|
|
}
|
|
/**
|
|
* 列表数据点击跳转事件
|
|
*/
|
|
function _JoinTeams() {
|
|
_JoinTeams = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(name) {
|
|
var data;
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
if (isClick) {
|
|
_context5.next = 2;
|
|
break;
|
|
}
|
|
return _context5.abrupt("return");
|
|
case 2:
|
|
if (!isadd()) {
|
|
_context5.next = 4;
|
|
break;
|
|
}
|
|
return _context5.abrupt("return");
|
|
case 4:
|
|
setIsClick(false);
|
|
_context5.next = 7;
|
|
return dispatch({
|
|
type: 'competitions/JoinTeam',
|
|
payload: {
|
|
identifier: items === null || items === void 0 ? void 0 : items.identifier,
|
|
invite_code: name
|
|
}
|
|
});
|
|
case 7:
|
|
data = _context5.sent;
|
|
if (data && data.status === 0) {
|
|
setisopen(true);
|
|
setdatas(data);
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
setJoin(false);
|
|
} else {
|
|
setIsClick(true);
|
|
}
|
|
case 9:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return _JoinTeams.apply(this, arguments);
|
|
}
|
|
var onListClick = function onListClick(item) {
|
|
// 判断有没有配置外链接:
|
|
if (item.external_url) {
|
|
var _user$userInfo2;
|
|
// console.log(item.external_url,"-----item.external_url");
|
|
tourl("".concat(item.external_url) + "?login=" + (user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login) + "&websiteName=educoder");
|
|
} else {
|
|
if (item !== null && item !== void 0 && item.is_new) {
|
|
if (item.permission.editable == true) {
|
|
if (['preparing', 'not_passed', 'review'].includes(item === null || item === void 0 ? void 0 : item.competition_status)) {
|
|
tourl("/competitions/detail/".concat(item.identifier, "?type=4"));
|
|
} else {
|
|
tourl("/competitions/detail/".concat(item.identifier, "?type=1"));
|
|
}
|
|
} else {
|
|
tourl("/competitions/detail/".concat(item.identifier));
|
|
}
|
|
return;
|
|
}
|
|
if (item.competition_status === 'ended' || item.competition_status === 'progressing' || item.competition_status === 'unpublish' || item.competition_status === 'nearly_published' && item.permission.editable == true) {
|
|
tourl("/competitions/".concat(item.identifier));
|
|
}
|
|
}
|
|
};
|
|
|
|
/**
|
|
* 列表报名点击事件
|
|
*/
|
|
var onLickSignUpClick = function onLickSignUpClick(event, item) {
|
|
event.stopPropagation();
|
|
if (item.teacher_need_phone || item.member_need_phone) {
|
|
setshowphone(true);
|
|
return;
|
|
}
|
|
if (item !== null && item !== void 0 && item.need_check_mail) {
|
|
modal/* default */.Z.confirm({
|
|
title: '提示',
|
|
content: '您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。',
|
|
onOk: function onOk() {
|
|
window.open('/account/secure');
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
if (item !== null && item !== void 0 && item.enroll_url) {
|
|
(0,util/* openNewWindow */.xg)(item === null || item === void 0 ? void 0 : item.enroll_url);
|
|
return;
|
|
}
|
|
if (item.external_url) {
|
|
tourl(item.external_url);
|
|
} else {
|
|
gotocourse(event, item, item.mode === 2 ? 'ismodel' : item.personal ? 'personal' : item !== null && item !== void 0 && item.is_new ? "/competitions/detail/".concat(item.identifier, "?type=3") : "/competitions/".concat(item.identifier, "/detail/enroll"));
|
|
}
|
|
};
|
|
var _useState35 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState36 = slicedToArray_default()(_useState35, 2),
|
|
keyword = _useState36[0],
|
|
setKeyword = _useState36[1];
|
|
var handleSearch = function handleSearch(keyword) {
|
|
competitions.listParams.keyword = encodeURIComponent(keyword);
|
|
competitions.listParams.page = 1;
|
|
if (keyword) {
|
|
(0,global/* addSearchRecord */.tk)({
|
|
name: keyword,
|
|
copywriting: keyword,
|
|
position: 'Competition'
|
|
});
|
|
}
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, competitions.listParams), {}, {
|
|
edu: searchParams.get("edu")
|
|
})
|
|
});
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Indexmodules.bg,
|
|
style: {
|
|
background: globalSetting.isSaiaDomain ? "#fafafa" : "#fff",
|
|
minHeight: "100vh"
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
position: "relative",
|
|
height: "212px",
|
|
overflow: 'hidden',
|
|
width: '100%'
|
|
},
|
|
children: [competitions.listParams.url_suffix_name && competitions.banner !== '' && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: "".concat(env/* default */.Z.IMG_SERVER).concat(competitions.banner),
|
|
style: {
|
|
width: '100%',
|
|
objectFit: "cover",
|
|
height: "100%",
|
|
position: "absolute",
|
|
left: '50%',
|
|
transform: 'translateX(-50%)'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
position: "absolute",
|
|
top: "0",
|
|
width: "100%"
|
|
},
|
|
className: Indexmodules.top,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* Banner */.jL, {
|
|
title: identifier ? competitions.competition_title : "竞赛组织",
|
|
sunTitle: identifier ? '' : '激发创新活力,培养软件人才'
|
|
// img={competitions.listParams.url_suffix_name && competitions.banner ? '' : CompetitionBanner}
|
|
,
|
|
img: banner_namespaceObject,
|
|
imgWidth: 438
|
|
// bannerExtraContent={
|
|
// btnshow && <div className={styles.btns}>
|
|
// {[
|
|
// {
|
|
// name: '创建竞赛',
|
|
// click: () => {
|
|
// if (!handleVerify(dispatch)) {
|
|
// return;
|
|
// }
|
|
// if (isSuperAdmins() || (user.userInfo?.professional_certification && user.userInfo?.is_teacher)) {
|
|
// form.setFieldValue('name', '')
|
|
// setiscreate(true)
|
|
|
|
// } else {
|
|
// message.info("当前仅支持已职业认证的教师可创建")
|
|
// }
|
|
// }
|
|
// },
|
|
// {
|
|
// name: '新手指引',
|
|
// sign: true,
|
|
// click: () => {
|
|
// window.open(Env.API_SERVER + `/images/educoder/competitions/竞赛新手指引.pdf`)
|
|
// }
|
|
// },
|
|
// {
|
|
// name: '证书查询',
|
|
// click: () => {
|
|
// setcertificate(true)
|
|
// }
|
|
// },
|
|
|
|
// ].map((e, i) => user?.userInfo?.role!==15&&<div key={i} onClick={e.click}>{e.name}</div>)}
|
|
// </div>
|
|
// }
|
|
}, identifier)
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "edu-container",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.tabsWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(tabs/* default */.Z, {
|
|
defaultActiveKey: "",
|
|
tabBarExtraContent: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Indexmodules.searchWrap,
|
|
children: identifier ? '' : !globalSetting.isSaiaDomain && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
placeholder: "\u8BF7\u8F93\u5165\u7ADE\u8D5B\u540D\u79F0",
|
|
size: "large",
|
|
className: Indexmodules.search
|
|
// value={keyword}
|
|
,
|
|
onChange: function onChange(e) {
|
|
return setKeyword(e.target.value);
|
|
},
|
|
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-sousuo9 font14 ".concat(Indexmodules.searchIcon),
|
|
onClick: function onClick() {
|
|
return handleSearch(keyword);
|
|
}
|
|
}),
|
|
onSearch: handleSearch
|
|
})
|
|
}),
|
|
onChange: function onChange(v) {
|
|
if (v === 'statistics') {
|
|
setIsStatistics(true);
|
|
} else {
|
|
setIsStatistics(false);
|
|
}
|
|
competitions.count = 0;
|
|
competitions.listParams.page = 1;
|
|
competitions.listParams.category = v;
|
|
competitions.listParams.page = 1;
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Index_TabPane, {
|
|
tab: "\u5168\u90E8"
|
|
}, ""), (user === null || user === void 0 || (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.role) !== 15 && /*#__PURE__*/(0,jsx_runtime.jsx)(Index_TabPane, {
|
|
tab: "\u5373\u5C06\u53D1\u5E03"
|
|
}, "nearly_published"), (user === null || user === void 0 || (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.role) !== 15 && /*#__PURE__*/(0,jsx_runtime.jsx)(Index_TabPane, {
|
|
tab: "\u8FDB\u884C\u4E2D"
|
|
}, "progressing"), (user === null || user === void 0 || (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.role) !== 15 && /*#__PURE__*/(0,jsx_runtime.jsx)(Index_TabPane, {
|
|
tab: "\u5F80\u671F\u6BD4\u8D5B"
|
|
}, "ended"), user.userInfo.user_id !== 2 && (user === null || user === void 0 || (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.role) !== 15 && /*#__PURE__*/(0,jsx_runtime.jsx)(Index_TabPane, {
|
|
tab: "\u6211\u7684\u7ADE\u8D5B"
|
|
}, "mine"), (0,authority/* isSuperAdmins */.Ny)() && /*#__PURE__*/(0,jsx_runtime.jsx)(Index_TabPane, {
|
|
tab: "\u6570\u636E\u7EDF\u8BA1"
|
|
}, "statistics")]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Indexmodules.searchWrap_right,
|
|
children: isStatistics ? '' : competitions.listParams.url_suffix_name ? !globalSetting.isSaiaDomain && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
placeholder: "\u8BF7\u8F93\u5165\u7ADE\u8D5B\u540D\u79F0",
|
|
size: "large",
|
|
className: Indexmodules.search
|
|
// value={keyword}
|
|
,
|
|
onChange: function onChange(e) {
|
|
return setKeyword(e.target.value);
|
|
},
|
|
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-sousuo9 font14 ".concat(Indexmodules.searchIcon),
|
|
onClick: function onClick() {
|
|
return handleSearch(keyword);
|
|
}
|
|
}),
|
|
onSearch: handleSearch
|
|
}) : ''
|
|
})]
|
|
}), ['mine', 'join'].includes(competitions.listParams.category) && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* SuperiorTabs */.tp, {
|
|
dataSource: [{
|
|
name: '我管理的',
|
|
id: 'mine'
|
|
}, {
|
|
name: '我参与的',
|
|
id: 'join'
|
|
}],
|
|
className: "mb20",
|
|
value: scoreByBlank,
|
|
onChange: function onChange(value) {
|
|
competitions.listParams.page = 1;
|
|
competitions.listParams.category = value;
|
|
competitions.listParams.page = 1;
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
setscoreByBlank(value);
|
|
}
|
|
}), !isStatistics && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: competitions.count === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "edu-container minH500",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
|
|
loading: loading,
|
|
active: true,
|
|
avatar: {
|
|
size: 40
|
|
},
|
|
paragraph: {
|
|
rows: 5
|
|
},
|
|
children: competitions.competitions && /*#__PURE__*/(0,jsx_runtime.jsx)(list/* default */.Z, {
|
|
itemLayout: "vertical",
|
|
size: 'middle',
|
|
dataSource: competitions.competitions,
|
|
renderItem: function renderItem(item, key) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.CompetitionsList,
|
|
children: [item.competition_status === 'nearly_published' ? item.permission.editable == true ? '' : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Indexmodules.CompetitionsListzhezhao,
|
|
children: "\u5373\u5C06\u53D1\u5E03 \u656C\u8BF7\u671F\u5F85"
|
|
}) : '', /*#__PURE__*/(0,jsx_runtime.jsxs)(list/* default */.Z.Item, {
|
|
onClick: function onClick() {
|
|
return onListClick(item);
|
|
},
|
|
className: Indexmodules.shadow,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(list/* default */.Z.Item.Meta, {
|
|
style: {
|
|
marginBottom: '0px',
|
|
width: "87%"
|
|
},
|
|
avatar: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
className: Indexmodules.divimg,
|
|
src: item && item.image ? "".concat(env/* default */.Z.IMG_SERVER) + item.image : ImagesIcon/* mainbannerBg */.I2
|
|
}),
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
style: {
|
|
alignItems: 'center',
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [item.name, item.sub_title ? "\u2014\u2014".concat(item.sub_title) : '']
|
|
}),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
className: Indexmodules.task_hide,
|
|
children: [item.name, item.sub_title ? "\u2014\u2014".concat(item.sub_title) : '']
|
|
})
|
|
}), item.competition_status && item.competition_status === 'nearly_published' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(Indexmodules.commonTextBox, " ").concat(Indexmodules.Comingtext),
|
|
children: "\u5373\u5C06\u53D1\u5E03"
|
|
}) : '', item.competition_status && item.competition_status === 'preparing' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#DB780F',
|
|
border: '1px solid #FDDBB7'
|
|
},
|
|
className: "".concat(Indexmodules.commonTextBox, " ").concat(Indexmodules.Finishedtext),
|
|
children: "\u5F85\u5BA1\u6838"
|
|
}) : '', item.competition_status && item.competition_status === 'not_passed' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#E30000',
|
|
border: '1px solid #FFC7C7'
|
|
},
|
|
className: "".concat(Indexmodules.commonTextBox, " ").concat(Indexmodules.Finishedtext),
|
|
children: "\u88AB\u9A73\u56DE"
|
|
}) : '', item.competition_status && item.competition_status === 'review' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#4237E7',
|
|
border: '1px solid #B6B1FF'
|
|
},
|
|
className: "".concat(Indexmodules.commonTextBox, " ").concat(Indexmodules.Finishedtext),
|
|
children: "\u5BA1\u6838\u4E2D"
|
|
}) : '', item.competition_status && item.competition_status === 'progressing' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#00B187',
|
|
border: '1px solid #B1F0E1'
|
|
},
|
|
className: "".concat(Indexmodules.commonTextBox, " ").concat(Indexmodules.havetext),
|
|
children: "\u8FDB\u884C\u4E2D"
|
|
}) : '', item.competition_status && item.competition_status === 'ended' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(Indexmodules.commonTextBox, " ").concat(Indexmodules.Finishedtext),
|
|
children: "\u5DF2\u7ED3\u675F"
|
|
}) : '', item.competition_status && item.competition_status === 'unpublish' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(Indexmodules.commonTextBox, " ").concat(Indexmodules.Finishedtext),
|
|
children: "\u672A\u53D1\u5E03"
|
|
}) : '']
|
|
}),
|
|
description: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.description,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: item.description ? item.description : '暂无简介~'
|
|
}),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Indexmodules.task_hide_2,
|
|
style: {
|
|
height: '43px',
|
|
fontSize: '14px',
|
|
color: '#666666'
|
|
},
|
|
children: item.description ? item.description : '暂无简介~'
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.bottomText,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u7ADE\u8D5B\u65F6\u95F4\uFF1A", item.start_time, "\uFF5E", item.end_time]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
marginLeft: '10px'
|
|
},
|
|
children: ["\u62A5\u540D\u622A\u6B62\u65F6\u95F4\uFF1A", item && item.enroll_end_time ? item.enroll_end_time : '暂无']
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
marginLeft: '10px'
|
|
},
|
|
children: ["\u6D4F\u89C8\u6570\uFF1A", item && item.visits_count ? item.visits_count : 0]
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
width: '13%',
|
|
alignItems: 'flex-end',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
justifyContent: 'space-around'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.info,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.bonus,
|
|
style: {
|
|
visibility: item && item.bonus ? 'visible' : 'hidden'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Indexmodules.rmb,
|
|
children: "\xA5"
|
|
}), parseInt(item.bonus).toLocaleString()]
|
|
}), item.member_count ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.applyInfo,
|
|
children: ["\u5DF2\u62A5\u540D\uFF1A", item.competition_status === 'nearly_published' ? '0' : item.member_count]
|
|
}) : '']
|
|
}), item && item.competition_status === 'ended' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Indexmodules.Unpublishedtext,
|
|
onClick: function onClick(e) {
|
|
return noclick(e);
|
|
},
|
|
children: "\u5DF2\u7ED3\u675F"
|
|
}) : null, item && item.competition_status === 'nearly_published' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Indexmodules.Unpublishedtext,
|
|
onClick: function onClick(e) {
|
|
return noclick(e);
|
|
},
|
|
children: "\u672A\u53D1\u5E03"
|
|
}) : null, item && item.competition_status !== 'nearly_published' && item.enroll_end && item.competition_status !== 'ended' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Indexmodules.Unpublishedtext,
|
|
onClick: function onClick(e) {
|
|
return noclick(e);
|
|
},
|
|
children: "\u62A5\u540D\u622A\u6B62"
|
|
}) : null, item && item.competition_status === 'progressing' && item.enroll_end != true && !item.external_url && item.enroll_end_time ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: Indexmodules.signup,
|
|
onClick: function onClick(e) {
|
|
return onLickSignUpClick(e, item);
|
|
},
|
|
children: item !== null && item !== void 0 && item.enrolled ? '已报名' : '立即报名'
|
|
}) : null]
|
|
})]
|
|
}, key)]
|
|
});
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AuthenticationModel/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(Advertisement/* default */.Z, {
|
|
modeldata: modeldata,
|
|
dispatch: dispatch
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mb50 mt20",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
hideOnSinglePage: true,
|
|
showSizeChanger: false,
|
|
showQuickJumper: true,
|
|
onChange: onShowSizeChange,
|
|
defaultPageSize: 20,
|
|
current: competitions.listParams.page,
|
|
defaultCurrent: competitions.listParams.page,
|
|
total: competitions.count
|
|
})
|
|
})]
|
|
})
|
|
}), isStatistics && /*#__PURE__*/(0,jsx_runtime.jsx)(Statistics, {})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
title: "\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",
|
|
centered: true,
|
|
open: 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: "\u52A0\u5165\u6218\u961F\u53C2\u8D5B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
style: {
|
|
height: 40
|
|
},
|
|
onClick: function onClick() {
|
|
setIsAddmodel(true);
|
|
setisshowmodal(false);
|
|
},
|
|
children: "\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"
|
|
})]
|
|
})
|
|
}), isJoin ? /*#__PURE__*/(0,jsx_runtime.jsx)(JoinModel/* default */.Z, {
|
|
isjoin: isJoin,
|
|
setJoin: setJoin,
|
|
JoinTeams: JoinTeams
|
|
}) : null, isAddmodel ? /*#__PURE__*/(0,jsx_runtime.jsx)(Addteams/* default */.Z, {
|
|
isAddmodle: isAddmodel,
|
|
setIsAdd: setIsAddmodel,
|
|
createTeam: addTeams
|
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(PhoneModal/* default */.Z, {
|
|
datas: datas,
|
|
isopen: isopen,
|
|
setisopen: setisopen,
|
|
isShowPhone: showphone,
|
|
setIsShowPhone: setshowphone,
|
|
user: user,
|
|
dispatch: dispatch,
|
|
onOK: function onOK() {
|
|
dispatch({
|
|
type: 'competitions/getList',
|
|
payload: objectSpread2_default()({}, competitions.listParams)
|
|
});
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
title: false,
|
|
footer: false,
|
|
open: iscreate,
|
|
width: 610,
|
|
className: Indexmodules.scoremodal,
|
|
closable: false,
|
|
centered: true,
|
|
onCancel: function onCancel() {
|
|
setiscreate(false);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Indexmodules.title,
|
|
children: "\u521B\u5EFA\u7ADE\u8D5B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick() {
|
|
setiscreate(false);
|
|
},
|
|
style: {
|
|
cursor: 'pointer'
|
|
},
|
|
className: Indexmodules.close,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-guanbi",
|
|
style: {
|
|
color: '#979797',
|
|
fontSize: '15px'
|
|
}
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Indexmodules.content,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
form: form,
|
|
layout: "vertical",
|
|
onFinish: /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
setbuttonloading(true);
|
|
_context.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/competitions.json", {
|
|
method: 'post',
|
|
body: objectSpread2_default()({}, values)
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
setbuttonloading(false);
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.info('创建成功');
|
|
_umi_production_exports.history.push("/competitions/detail/".concat(res === null || res === void 0 ? void 0 : res.identifier, "?type=4"));
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function (_x6) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}(),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u7ADE\u8D5B\u540D\u79F0",
|
|
name: "name",
|
|
className: Indexmodules.jsinput,
|
|
rules: [{
|
|
required: true,
|
|
validator: function validator(_, value) {
|
|
var _value$replaceAll;
|
|
return (value === null || value === void 0 || (_value$replaceAll = value.replaceAll(' ', '')) === null || _value$replaceAll === void 0 ? void 0 : _value$replaceAll.length) > 0 ? Promise.resolve() : Promise.reject('请填写竞赛名称');
|
|
}
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
maxLength: 60,
|
|
className: Indexmodules.baseFormItem,
|
|
showCount: true
|
|
})
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Indexmodules.bottom,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: Indexmodules.no,
|
|
onClick: function onClick() {
|
|
setiscreate(false);
|
|
},
|
|
children: "\u53D6\u6D88"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
loading: buttonloading,
|
|
className: Indexmodules.yes,
|
|
onClick: function onClick() {
|
|
form.submit();
|
|
},
|
|
children: "\u521B\u5EFA\u7ADE\u8D5B"
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
title: false,
|
|
footer: false,
|
|
open: certificate,
|
|
width: 900,
|
|
className: Indexmodules.scoremodal,
|
|
closable: false,
|
|
centered: true,
|
|
onCancel: function onCancel() {
|
|
return setcertificate(false);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Indexmodules.title,
|
|
children: "\u8BC1\u4E66\u67E5\u8BE2"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick() {
|
|
return setcertificate(false);
|
|
},
|
|
style: {
|
|
cursor: 'pointer'
|
|
},
|
|
className: Indexmodules.close,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-guanbi",
|
|
style: {
|
|
color: '#979797',
|
|
fontSize: '15px'
|
|
}
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginTop: 30,
|
|
display: 'flex',
|
|
marginBottom: 30
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
value: keywords,
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7",
|
|
onChange: function onChange(e) {
|
|
setkeywords(e.target.value);
|
|
},
|
|
style: {
|
|
height: 40
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
style: {
|
|
marginLeft: 10,
|
|
height: 40,
|
|
width: 88
|
|
},
|
|
type: "primary",
|
|
onClick: /*#__PURE__*/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 (0,fetch/* default */.ZP)("/api/competitions/get_certificates.json", {
|
|
method: 'get',
|
|
params: {
|
|
keywords: keywords
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
seetdataItems(res === null || res === void 0 ? void 0 : res.data);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})),
|
|
children: "\u67E5\u8BE2"
|
|
})]
|
|
}), dataItems.length == 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "tc font16 c-light-black mt40 pb30",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: ImagesIcon/* noDataIcon */.z3,
|
|
width: "135",
|
|
alt: ""
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: "mt20",
|
|
style: {
|
|
fontSize: 14
|
|
},
|
|
children: "\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"
|
|
})]
|
|
}), dataItems.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTable */.Gi, {
|
|
style: {
|
|
marginLeft: 0
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
dataSource: dataItems,
|
|
pagination: false,
|
|
columns: [{
|
|
title: '获奖人',
|
|
align: 'left',
|
|
dataIndex: 'province',
|
|
render: function render(text, item) {
|
|
var _item$user;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: (item === null || item === void 0 || (_item$user = item.user) === null || _item$user === void 0 ? void 0 : _item$user.name) || '- -'
|
|
});
|
|
}
|
|
}, {
|
|
title: '获奖名称',
|
|
align: 'left',
|
|
dataIndex: 'award_name',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || '- -'
|
|
});
|
|
}
|
|
}, {
|
|
title: '证书编号',
|
|
align: 'left',
|
|
dataIndex: 'cert_num',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || '- -'
|
|
});
|
|
}
|
|
}, {
|
|
title: '竞赛名称',
|
|
align: 'left',
|
|
dataIndex: 'cert_num',
|
|
render: function render(text, item) {
|
|
var _item$competition;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: (item === null || item === void 0 || (_item$competition = item.competition) === null || _item$competition === void 0 ? void 0 : _item$competition.name) || '- -'
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
align: 'right',
|
|
dataIndex: 'province',
|
|
render: function render(text, item) {
|
|
var _item$competition2, _item$user2;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
target: "_blank",
|
|
href: "/competitions/exports?id=".concat(item === null || item === void 0 || (_item$competition2 = item.competition) === null || _item$competition2 === void 0 ? void 0 : _item$competition2.id, "&user_id=").concat(item === null || item === void 0 || (_item$user2 = item.user) === null || _item$user2 === void 0 ? void 0 : _item$user2.user_id),
|
|
children: "\u9884\u89C8\u4E0B\u8F7D"
|
|
});
|
|
}
|
|
}]
|
|
})
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Index = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var competitions = _ref4.competitions,
|
|
loading = _ref4.loading,
|
|
globalSetting = _ref4.globalSetting,
|
|
user = _ref4.user;
|
|
return {
|
|
competitions: competitions,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.competitions,
|
|
user: user
|
|
};
|
|
})(Index_competitionsPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 52421:
|
|
/*!**********************************************************!*\
|
|
!*** ./src/pages/Competitions/components/PhoneModal.tsx ***!
|
|
\**********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd */ 43418);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 1056);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/fetch */ 91506);
|
|
/* harmony import */ var _utils_hooks_useInterval__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/hooks/useInterval */ 86393);
|
|
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/util */ 22739);
|
|
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/env */ 78130);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var phoneReg = /^1\d{10}$/;
|
|
function Addmodal(_ref) {
|
|
var isShowPhone = _ref.isShowPhone,
|
|
setIsShowPhone = _ref.setIsShowPhone,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
onOK = _ref.onOK,
|
|
isopen = _ref.isopen,
|
|
setisopen = _ref.setisopen,
|
|
datas = _ref.datas;
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
|
|
phone = _useState2[0],
|
|
setphone = _useState2[1];
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),
|
|
_useState4 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState3, 2),
|
|
PhoneValue = _useState4[0],
|
|
setPhoneValue = _useState4[1];
|
|
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(60),
|
|
_useState6 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState5, 2),
|
|
countdown = _useState6[0],
|
|
setCountdown = _useState6[1];
|
|
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(),
|
|
_useState8 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState7, 2),
|
|
countdownFlag = _useState8[0],
|
|
setCountdownFlag = _useState8[1];
|
|
var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),
|
|
_useState10 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState9, 2),
|
|
isShowPoint = _useState10[0],
|
|
setIsShowPoint = _useState10[1];
|
|
var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),
|
|
_useState12 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState11, 2),
|
|
isShowUntie = _useState12[0],
|
|
setIsShowUntie = _useState12[1];
|
|
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),
|
|
_useState14 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState13, 2),
|
|
UntieValue = _useState14[0],
|
|
setUntieValue = _useState14[1];
|
|
var intervalId = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)();
|
|
(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
|
|
return function () {
|
|
intervalId.current && clearInterval(intervalId.current);
|
|
};
|
|
}, []);
|
|
(0,_utils_hooks_useInterval__WEBPACK_IMPORTED_MODULE_5__/* .useInterval */ .Y)(function () {
|
|
if (!countdownFlag) {
|
|
return;
|
|
} else {
|
|
setCountdown(60);
|
|
}
|
|
if (countdown > 0) {
|
|
setCountdown(countdown - 1);
|
|
} else {
|
|
setCountdown(60);
|
|
setCountdownFlag(false);
|
|
intervalId.current && clearInterval(intervalId.current);
|
|
}
|
|
}, 1000);
|
|
var handleGetCode = /*#__PURE__*/function () {
|
|
var _ref2 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
|
|
var _user$userInfo;
|
|
var data, smscode, res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP)("/api/users/accounts/".concat((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login, "/valid_phone.json"), {
|
|
method: 'get',
|
|
params: {
|
|
phone: phone
|
|
}
|
|
});
|
|
case 2:
|
|
data = _context.sent;
|
|
if (!((data === null || data === void 0 ? void 0 : data.status) === -1)) {
|
|
_context.next = 5;
|
|
break;
|
|
}
|
|
return _context.abrupt("return");
|
|
case 5:
|
|
if (!(data !== null && data !== void 0 && data.is_exists)) {
|
|
_context.next = 8;
|
|
break;
|
|
}
|
|
setIsShowPoint(true);
|
|
return _context.abrupt("return");
|
|
case 8:
|
|
smscode = (0,_utils_util__WEBPACK_IMPORTED_MODULE_6__/* .setmiyah */ .M)(phone);
|
|
_context.next = 11;
|
|
return dispatch({
|
|
type: 'account/getCode',
|
|
payload: {
|
|
login: phone,
|
|
type: 3,
|
|
smscode: smscode
|
|
}
|
|
});
|
|
case 11:
|
|
res = _context.sent;
|
|
if (res.status === 1) {
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('验证码已发送,请注意查收');
|
|
setCountdownFlag(true);
|
|
}
|
|
case 13:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handleGetCode() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
title: "\u5F3A\u5236\u89E3\u7ED1",
|
|
open: isShowUntie,
|
|
onCancel: function onCancel() {
|
|
return setIsShowUntie(false);
|
|
},
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2() {
|
|
var _user$userInfo2;
|
|
var data;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
if (UntieValue) {
|
|
_context2.next = 3;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('验证码不能为空');
|
|
return _context2.abrupt("return");
|
|
case 3:
|
|
_context2.next = 5;
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP)("/api/users/accounts/".concat(user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login, "/phone_force_unbind.json"), {
|
|
method: 'POST',
|
|
body: {
|
|
code: UntieValue,
|
|
phone: phone
|
|
}
|
|
});
|
|
case 5:
|
|
data = _context2.sent;
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === 0) {
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('解绑成功');
|
|
setCountdownFlag(false);
|
|
setIsShowUntie(false);
|
|
onOK();
|
|
setIsShowPhone(false);
|
|
setUntieValue('');
|
|
}
|
|
case 7:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})),
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
style: {
|
|
padding: '8px 24px'
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
children: "\u82E5\u539F\u8D26\u53F7\u53EA\u6709\u7ED1\u5B9A\u4E86\u624B\u673A\u53F7\u4E00\u79CD\u767B\u5F55\u65B9\u5F0F\uFF0C\u5F3A\u5236\u89E3\u7ED1\u540E\u4F1A\u5BFC\u81F4\u539F\u8D26\u53F7\u65E0\u6CD5\u767B\u5F55\uFF0C\u8BF7\u786E\u5B9A\u662F\u5426\u5F3A\u5236\u89E3\u7ED1"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
children: ["\u4F60\u7684\u624B\u673A\u53F7\uFF1A", phone]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
children: ["\u624B\u673A\u9A8C\u8BC1\u7801\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
|
|
value: UntieValue,
|
|
size: 'middle',
|
|
onChange: function onChange(e) {
|
|
return setUntieValue(e.target.value);
|
|
},
|
|
style: {
|
|
width: '240px'
|
|
}
|
|
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .ZP, {
|
|
disabled: countdownFlag,
|
|
type: "primary",
|
|
size: 'middle',
|
|
onClick: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3() {
|
|
var smscode, res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
smscode = (0,_utils_util__WEBPACK_IMPORTED_MODULE_6__/* .setmiyah */ .M)(phone);
|
|
_context3.next = 3;
|
|
return dispatch({
|
|
type: 'account/getCode',
|
|
payload: {
|
|
login: phone,
|
|
type: 10,
|
|
smscode: smscode
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context3.sent;
|
|
if (res.status === 1) {
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('验证码已发送,请注意查收');
|
|
setCountdownFlag(true);
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
})),
|
|
children: countdownFlag ? "\u91CD\u65B0\u53D1\u9001".concat(countdown, "s") : '获取验证码'
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
title: "\u63D0\u793A",
|
|
open: isShowPoint,
|
|
onCancel: function onCancel() {
|
|
setIsShowPoint(false);
|
|
},
|
|
okText: "\u8FDB\u884C\u5F3A\u5236\u89E3\u7ED1",
|
|
okButtonProps: {
|
|
type: "primary",
|
|
ghost: true,
|
|
style: {
|
|
width: "124px"
|
|
}
|
|
},
|
|
onOk: function onOk() {
|
|
setIsShowUntie(true);
|
|
setIsShowPoint(false);
|
|
}
|
|
// footer={<div>
|
|
// <Button style={{textAlign:'end'}} type="primary" onClick={()=>setIsShowModal(false)}>确 定</Button>
|
|
// </div>}
|
|
,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
style: {
|
|
padding: '7px 24px'
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
|
|
children: "\u8BE5\u624B\u673A\u53F7\u5DF2\u7ECF\u88AB\u7ED1\u5B9A\u8D26\u53F7\uFF0C\u5982\u679C\u9700\u8981\u5C06\u8BE5\u624B\u673A\u53F7\u7ED1\u5B9A\u5728\u5F53\u524D\u8D26\u53F7\u4E0A\uFF0C\u4F60\u53EF\u4EE5\u8FDB\u884C\u4E0B\u65B9\u4EFB\u610F\u4E00\u79CD\u89E3\u7ED1\u64CD\u4F5C\uFF1A"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("br", {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
style: {
|
|
marginTop: '1em',
|
|
display: 'flex'
|
|
},
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
|
|
style: {
|
|
flex: '1'
|
|
},
|
|
children: "1\u3001\u4F7F\u7528\u8BE5\u624B\u673A\u53F7\u767B\u5F55\u5E73\u53F0\u8FDB\u884C\u89E3\u7ED1\uFF0C\u518D\u5C06\u624B\u673A\u53F7\u7ED1\u5B9A\u5F53\u524D\u8D26\u53F7\u4E0A\u3002"
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
style: {
|
|
marginTop: '1em',
|
|
display: 'flex'
|
|
},
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
|
|
style: {
|
|
flex: '1'
|
|
},
|
|
children: "2\u3001\u5F3A\u5236\u89E3\u7ED1\uFF08\u5F3A\u5236\u89E3\u7ED1\u53EF\u80FD\u4F1A\u5BFC\u81F4\u89E3\u7ED1\u8D26\u53F7\u65E0\u6CD5\u767B\u5F55\uFF09"
|
|
})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
title: "\u7ED1\u5B9A\u624B\u673A\u53F7",
|
|
open: isShowPhone,
|
|
onCancel: function onCancel() {
|
|
return setIsShowPhone(false);
|
|
},
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee4() {
|
|
var _ref6, login, res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
if (phoneReg.test(phone)) {
|
|
_context4.next = 3;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info("请输入有效的11位手机号码");
|
|
return _context4.abrupt("return");
|
|
case 3:
|
|
if (PhoneValue) {
|
|
_context4.next = 6;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info("请输入验证码");
|
|
return _context4.abrupt("return");
|
|
case 6:
|
|
_ref6 = user.userInfo || {}, login = _ref6.login;
|
|
_context4.next = 9;
|
|
return dispatch({
|
|
type: 'account/bindPhone',
|
|
payload: {
|
|
login: login,
|
|
phone: phone,
|
|
code: PhoneValue
|
|
}
|
|
});
|
|
case 9:
|
|
res = _context4.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setIsShowPhone(false);
|
|
onOK();
|
|
}
|
|
case 11:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
})),
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
style: {
|
|
padding: '8px 24px'
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
children: "\u5E73\u53F0\u5DF2\u68C0\u6D4B\u5230\u60A8\u672A\u7ED1\u5B9A\u624B\u673A\u53F7\uFF0C\u4E3A\u4E86\u4E0D\u5F71\u54CD\u4F7F\u7528\u62A5\u540D\u529F\u80FD\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
children: ["\u4F60\u7684\u624B\u673A\u53F7\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
|
|
size: 'middle',
|
|
value: phone,
|
|
onChange: function onChange(e) {
|
|
return setphone(e.target.value);
|
|
},
|
|
style: {
|
|
width: '240px'
|
|
}
|
|
})]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
children: ["\u624B\u673A\u9A8C\u8BC1\u7801\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
|
|
size: 'middle',
|
|
value: PhoneValue,
|
|
onChange: function onChange(e) {
|
|
return setPhoneValue(e.target.value);
|
|
},
|
|
style: {
|
|
width: '240px'
|
|
}
|
|
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .ZP, {
|
|
disabled: countdownFlag,
|
|
type: "primary",
|
|
size: 'middle',
|
|
onClick: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5() {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
if (phoneReg.test(phone)) {
|
|
_context5.next = 3;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info("请输入有效的11位手机号码");
|
|
return _context5.abrupt("return");
|
|
case 3:
|
|
handleGetCode();
|
|
case 4:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
})),
|
|
children: countdownFlag ? "\u91CD\u65B0\u53D1\u9001".concat(countdown, "s") : '获取验证码'
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
open: isopen,
|
|
footer: false,
|
|
onCancel: function onCancel() {
|
|
return setisopen(false);
|
|
},
|
|
centered: true,
|
|
width: 460,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
style: {
|
|
marginTop: 50,
|
|
fontSize: 26,
|
|
color: '#3d3d3d',
|
|
textAlign: 'center',
|
|
marginBottom: 20
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("i", {
|
|
style: {
|
|
fontSize: 26,
|
|
color: '#52C41A'
|
|
},
|
|
className: "iconfont icon-tongguo"
|
|
}), " \u62A5\u540D\u6210\u529F"]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
style: {
|
|
alignItems: 'center',
|
|
textAlign: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", {
|
|
style: {
|
|
width: 180,
|
|
border: '1px solid #eeeeef',
|
|
padding: 10,
|
|
marginBottom: 20
|
|
},
|
|
src: _utils_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.IMG_SERVER + (datas === null || datas === void 0 ? void 0 : datas.QR_code)
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
style: {
|
|
color: '#AAAAAA'
|
|
},
|
|
children: "\u53C2\u8D5B\u8005\u53EF\u626B\u7801\u52A0\u5165\u5927\u8D5B\u5B98\u65B9\u4EA4\u6D41\u7FA4\uFF0C\u83B7\u53D6\u6700\u65B0\u7ADE\u8D5B\u901A\u77E5"
|
|
})]
|
|
})]
|
|
})
|
|
})]
|
|
});
|
|
}
|
|
/* harmony default export */ __webpack_exports__.Z = (Addmodal);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 39384:
|
|
/*!*****************************!*\
|
|
!*** ./src/utils/export.ts ***!
|
|
\*****************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ AD: function() { return /* binding */ ExportCollegeStudentsInfo; },
|
|
/* harmony export */ D9: function() { return /* binding */ ExportStudentanalysis; },
|
|
/* harmony export */ IM: function() { return /* binding */ get_ecs_attachment; },
|
|
/* harmony export */ Iy: function() { return /* binding */ ExportCourseWorkListScores; },
|
|
/* harmony export */ Ne: function() { return /* binding */ getec_training_objectives; },
|
|
/* harmony export */ ON: function() { return /* binding */ exportPaperlibraryPaper; },
|
|
/* harmony export */ Uj: function() { return /* binding */ exportTaskPass; },
|
|
/* harmony export */ VY: function() { return /* binding */ getrank_list; },
|
|
/* harmony export */ YO: function() { return /* binding */ exportCommitResultWord; },
|
|
/* harmony export */ YX: function() { return /* binding */ exportClassroomsPaper; },
|
|
/* harmony export */ Zn: function() { return /* binding */ ExportCourseInfo; },
|
|
/* harmony export */ _g: function() { return /* binding */ exportMoocrecord; },
|
|
/* harmony export */ _k: function() { return /* binding */ getDownFile; },
|
|
/* harmony export */ c6: function() { return /* binding */ ExportVideoStudy; },
|
|
/* harmony export */ cr: function() { return /* binding */ ExportCourseActScore; },
|
|
/* harmony export */ eV: function() { return /* binding */ ExportCourseStudentsInfo; },
|
|
/* harmony export */ fi: function() { return /* binding */ ExportCourseMemberScores; },
|
|
/* harmony export */ gh: function() { return /* binding */ ExportAttendance; },
|
|
/* harmony export */ hS: function() { return /* binding */ getec_courses; },
|
|
/* harmony export */ iA: function() { return /* binding */ ExportCourseAndOther; },
|
|
/* harmony export */ j6: function() { return /* binding */ ExportCourseTotalScore; },
|
|
/* harmony export */ je: function() { return /* binding */ ExportExerciseStudentScores; },
|
|
/* harmony export */ kS: function() { return /* binding */ getquestion_rank_list; },
|
|
/* harmony export */ o6: function() { return /* binding */ ExportVideoStudent; },
|
|
/* harmony export */ pO: function() { return /* binding */ exportUserExerciseDetail; },
|
|
/* harmony export */ rQ: function() { return /* binding */ ExportProblemset; },
|
|
/* harmony export */ sA: function() { return /* binding */ ExportPollsScores; },
|
|
/* harmony export */ xm: function() { return /* binding */ getecyears; },
|
|
/* harmony export */ xo: function() { return /* binding */ getec_graduation_requirements; },
|
|
/* harmony export */ y8: function() { return /* binding */ Exportcompetitions; }
|
|
/* harmony export */ });
|
|
/* unused harmony export ExportCourseWorkListAppendix */
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/service/classrooms */ 28787);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! umi */ 45295);
|
|
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util */ 22739);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./env */ 78130);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var showLoading = function showLoading() {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'globalSetting/setGlobalLoading',
|
|
payload: {
|
|
show: true,
|
|
text: '正在生成文件,请稍后...'
|
|
}
|
|
});
|
|
};
|
|
var hideLoading = function hideLoading() {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'globalSetting/setGlobalLoading',
|
|
payload: {
|
|
show: false,
|
|
text: ''
|
|
}
|
|
});
|
|
};
|
|
var ExportCourseInfo = /*#__PURE__*/function () {
|
|
var _ref = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
showLoading();
|
|
_context.next = 3;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportCourseInfo */ .YR)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 3:
|
|
res = _context.sent;
|
|
if (!(res.status === 0)) {
|
|
_context.next = 7;
|
|
break;
|
|
}
|
|
_context.next = 7;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFileIframe */ .QH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/export_couser_info.json"),
|
|
query: params
|
|
}));
|
|
case 7:
|
|
hideLoading();
|
|
case 8:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function ExportCourseInfo(_x) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportCourseActScore = /*#__PURE__*/function () {
|
|
var _ref2 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportCourseActScore */ .yS)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 2:
|
|
res = _context2.sent;
|
|
if (!(res.status === 0)) {
|
|
_context2.next = 8;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.info('导出任务生成成功');
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_member_act_score"));
|
|
_context2.next = 13;
|
|
break;
|
|
case 8:
|
|
if (!(res.status === -2)) {
|
|
_context2.next = 12;
|
|
break;
|
|
}
|
|
return _context2.abrupt("return", res);
|
|
case 12:
|
|
if (res.status === -3) {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'classroomList/setActionTabs',
|
|
payload: {
|
|
key: '导出提醒'
|
|
}
|
|
});
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_member_act_score"));
|
|
}
|
|
case 13:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function ExportCourseActScore(_x2) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportCourseMemberScores = /*#__PURE__*/function () {
|
|
var _ref3 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
_context3.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportCourseMemberScores */ .W0)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 2:
|
|
res = _context3.sent;
|
|
if (!(res.status === 0)) {
|
|
_context3.next = 8;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.info('导出任务生成成功');
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_score"));
|
|
_context3.next = 13;
|
|
break;
|
|
case 8:
|
|
if (!(res.status === -2)) {
|
|
_context3.next = 12;
|
|
break;
|
|
}
|
|
return _context3.abrupt("return", res);
|
|
case 12:
|
|
if (res.status === -3) {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'classroomList/setActionTabs',
|
|
payload: {
|
|
key: '导出提醒'
|
|
}
|
|
});
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_score"));
|
|
}
|
|
case 13:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return function ExportCourseMemberScores(_x3) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
//试卷
|
|
var ExportCourseAndOther = /*#__PURE__*/function () {
|
|
var _ref4 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee4(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
_context4.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportCourseAndOther */ .Nl)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 2:
|
|
res = _context4.sent;
|
|
if (!(res.status === 0)) {
|
|
_context4.next = 8;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.info('导出任务生成成功');
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
_context4.next = 13;
|
|
break;
|
|
case 8:
|
|
if (!(res.status === -2)) {
|
|
_context4.next = 12;
|
|
break;
|
|
}
|
|
return _context4.abrupt("return", res);
|
|
case 12:
|
|
if (res.status === -3) {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'classroomList/setActionTabs',
|
|
payload: {
|
|
key: '导出提醒'
|
|
}
|
|
});
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
}
|
|
case 13:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return function ExportCourseAndOther(_x4) {
|
|
return _ref4.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
//第三方幕课
|
|
var exportMoocrecord = /*#__PURE__*/function () {
|
|
var _ref5 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
_context5.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportMoocrecords */ .td)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 2:
|
|
res = _context5.sent;
|
|
if (!(res.status === 0)) {
|
|
_context5.next = 8;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.info('导出任务生成成功');
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
_context5.next = 13;
|
|
break;
|
|
case 8:
|
|
if (!(res.status === -2)) {
|
|
_context5.next = 12;
|
|
break;
|
|
}
|
|
return _context5.abrupt("return", res);
|
|
case 12:
|
|
if (res.status === -3) {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'classroomList/setActionTabs',
|
|
payload: {
|
|
key: '导出提醒'
|
|
}
|
|
});
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
}
|
|
case 13:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return function exportMoocrecord(_x5) {
|
|
return _ref5.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
//作业
|
|
var ExportCourseTotalScore = /*#__PURE__*/function () {
|
|
var _ref6 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee6(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
_context6.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportCourseTotalScore */ .QX)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 2:
|
|
res = _context6.sent;
|
|
if (!(res.status === 0)) {
|
|
_context6.next = 8;
|
|
break;
|
|
}
|
|
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.info('导出任务生成成功');
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_homework"));
|
|
_context6.next = 13;
|
|
break;
|
|
case 8:
|
|
if (!(res.status === -2)) {
|
|
_context6.next = 12;
|
|
break;
|
|
}
|
|
return _context6.abrupt("return", res);
|
|
case 12:
|
|
if (res.status === -3) {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'classroomList/setActionTabs',
|
|
payload: {
|
|
key: '导出提醒'
|
|
}
|
|
});
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_homework"));
|
|
}
|
|
case 13:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return function ExportCourseTotalScore(_x6) {
|
|
return _ref6.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportCourseWorkListScores = /*#__PURE__*/function () {
|
|
var _ref7 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee7(params, type) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee7$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
_context7.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportCourseWorkListScores */ .aP)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 2:
|
|
res = _context7.sent;
|
|
if (res.status === 0) {
|
|
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.info('导出任务生成成功');
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/").concat(type));
|
|
} else if (res.status === -3) {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'classroomList/setActionTabs',
|
|
payload: {
|
|
key: '导出提醒'
|
|
}
|
|
});
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/").concat(type));
|
|
}
|
|
// else if(res.status === -1){
|
|
// history.push(`/classrooms/${params.coursesId}/exportlist/${type}`)
|
|
// };
|
|
// console.log(JSON.stringify(params))
|
|
// if(res.status === 0) await downLoadFileIframe('',setUrlQuery({url:ENV.API_SERVER + `/api/homework_commons/${params.categoryId}/works_list.xlsx`,query:params}))
|
|
// hideLoading();
|
|
case 4:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return function ExportCourseWorkListScores(_x7, _x8) {
|
|
return _ref7.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportCourseWorkListAppendix = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
|
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
|
|
var res;
|
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
case 0:
|
|
showLoading();
|
|
_context8.next = 3;
|
|
return exportCourseWorkListAppendix(_objectSpread({}, params));
|
|
case 3:
|
|
res = _context8.sent;
|
|
if (!(res.status === 0)) {
|
|
_context8.next = 7;
|
|
break;
|
|
}
|
|
_context8.next = 7;
|
|
return downLoadFileIframe('', setUrlQuery({
|
|
url: ENV.API_SERVER + "/api/homework_commons/".concat(params.categoryId, "/works_list.zip"),
|
|
query: params
|
|
}));
|
|
case 7:
|
|
hideLoading();
|
|
case 8:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee8);
|
|
}));
|
|
return function ExportCourseWorkListAppendix(_x9) {
|
|
return _ref8.apply(this, arguments);
|
|
};
|
|
}()));
|
|
var ExportPollsScores = /*#__PURE__*/function () {
|
|
var _ref9 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee9(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee9$(_context9) {
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
case 0:
|
|
showLoading();
|
|
_context9.next = 3;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportPollsScores */ .MJ)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 3:
|
|
res = _context9.sent;
|
|
if (!(res.status === 0)) {
|
|
_context9.next = 7;
|
|
break;
|
|
}
|
|
_context9.next = 7;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFileIframe */ .QH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/polls/".concat(params.categoryId, "/commit_result.xlsx"),
|
|
query: params
|
|
}));
|
|
case 7:
|
|
hideLoading();
|
|
case 8:
|
|
case "end":
|
|
return _context9.stop();
|
|
}
|
|
}, _callee9);
|
|
}));
|
|
return function ExportPollsScores(_x10) {
|
|
return _ref9.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportAttendance = /*#__PURE__*/function () {
|
|
var _ref10 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee10(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee10$(_context10) {
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
case 0:
|
|
_context10.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/attendances/export_xlsx_data.xlsx"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context10.stop();
|
|
}
|
|
}, _callee10);
|
|
}));
|
|
return function ExportAttendance(_x11) {
|
|
return _ref10.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportVideoStudent = /*#__PURE__*/function () {
|
|
var _ref11 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee11(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee11$(_context11) {
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
case 0:
|
|
_context11.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/video_study_statics.xlsx"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context11.stop();
|
|
}
|
|
}, _callee11);
|
|
}));
|
|
return function ExportVideoStudent(_x12) {
|
|
return _ref11.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportVideoStudy = /*#__PURE__*/function () {
|
|
var _ref12 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee12(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee12$(_context12) {
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
case 0:
|
|
_context12.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/export_video_study.xlsx"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context12.stop();
|
|
}
|
|
}, _callee12);
|
|
}));
|
|
return function ExportVideoStudy(_x13) {
|
|
return _ref12.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportCourseStudentsInfo = /*#__PURE__*/function () {
|
|
var _ref13 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee13(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee13$(_context13) {
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
case 0:
|
|
_context13.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/".concat(params.coursesId, "/export_course_students_info.xlsx"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context13.stop();
|
|
}
|
|
}, _callee13);
|
|
}));
|
|
return function ExportCourseStudentsInfo(_x14) {
|
|
return _ref13.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportCollegeStudentsInfo = /*#__PURE__*/function () {
|
|
var _ref14 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee14(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee14$(_context14) {
|
|
while (1) switch (_context14.prev = _context14.next) {
|
|
case 0:
|
|
_context14.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/school_manages/students.xlsx",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context14.stop();
|
|
}
|
|
}, _callee14);
|
|
}));
|
|
return function ExportCollegeStudentsInfo(_x15) {
|
|
return _ref14.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportProblemset = /*#__PURE__*/function () {
|
|
var _ref15 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee15(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee15$(_context15) {
|
|
while (1) switch (_context15.prev = _context15.next) {
|
|
case 0:
|
|
_context15.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/item_banks/export.xlsx",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context15.stop();
|
|
}
|
|
}, _callee15);
|
|
}));
|
|
return function ExportProblemset(_x16) {
|
|
return _ref15.apply(this, arguments);
|
|
};
|
|
}();
|
|
var Exportcompetitions = /*#__PURE__*/function () {
|
|
var _ref16 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee16(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee16$(_context16) {
|
|
while (1) switch (_context16.prev = _context16.next) {
|
|
case 0:
|
|
_context16.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/competitions/region_reports.xlsx",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context16.stop();
|
|
}
|
|
}, _callee16);
|
|
}));
|
|
return function Exportcompetitions(_x17) {
|
|
return _ref16.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportExerciseStudentScores = /*#__PURE__*/function () {
|
|
var _ref17 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee17(params) {
|
|
var res;
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee17$(_context17) {
|
|
while (1) switch (_context17.prev = _context17.next) {
|
|
case 0:
|
|
_context17.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_3__/* .exportExerciseStudentScores */ .Uy)(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params));
|
|
case 2:
|
|
res = _context17.sent;
|
|
if (res.status === 0) {
|
|
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.info('导出任务生成成功');
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/exercise_score"));
|
|
} else if (res.status === -3) {
|
|
(0,umi__WEBPACK_IMPORTED_MODULE_4__.getDvaApp)()._store.dispatch({
|
|
type: 'classroomList/setActionTabs',
|
|
payload: {
|
|
key: '导出提醒'
|
|
}
|
|
});
|
|
umi__WEBPACK_IMPORTED_MODULE_4__.history.push("/classrooms/".concat(params.coursesId, "/exportlist/exercise_score"));
|
|
}
|
|
// else if(res.status === -1){
|
|
// history.push(`/classrooms/${params.coursesId}/exportlist/exercise_score`)
|
|
// };
|
|
// // https://test-newweb.educoder.net/api/exercises/4229/exercise_lists.xlsx?page=1&search=&limit=20&order=end_at&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
|
|
// if(res.status === 0) await downLoadFileIframe('',setUrlQuery({url:ENV.API_SERVER + `/api/exercises/${params.categoryId}/exercise_lists.xlsx`,query:params}))
|
|
// hideLoading();
|
|
case 4:
|
|
case "end":
|
|
return _context17.stop();
|
|
}
|
|
}, _callee17);
|
|
}));
|
|
return function ExportExerciseStudentScores(_x18) {
|
|
return _ref17.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getDownFile = /*#__PURE__*/function () {
|
|
var _ref18 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee18(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee18$(_context18) {
|
|
while (1) switch (_context18.prev = _context18.next) {
|
|
case 0:
|
|
console.log('----------', '调用下载');
|
|
_context18.next = 3;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/export_records/".concat(params.id, ".xlsx"),
|
|
query: params
|
|
}));
|
|
case 3:
|
|
case "end":
|
|
return _context18.stop();
|
|
}
|
|
}, _callee18);
|
|
}));
|
|
return function getDownFile(_x19) {
|
|
return _ref18.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getecyears = /*#__PURE__*/function () {
|
|
var _ref19 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee19(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee19$(_context19) {
|
|
while (1) switch (_context19.prev = _context19.next) {
|
|
case 0:
|
|
_context19.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/ec_major_schools/0/ec_years.xlsx",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context19.stop();
|
|
}
|
|
}, _callee19);
|
|
}));
|
|
return function getecyears(_x20) {
|
|
return _ref19.apply(this, arguments);
|
|
};
|
|
}();
|
|
var ExportStudentanalysis = /*#__PURE__*/function () {
|
|
var _ref20 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee20(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee20$(_context20) {
|
|
while (1) switch (_context20.prev = _context20.next) {
|
|
case 0:
|
|
_context20.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/").concat(params.menuKey, "_statistic.xlsx?").concat(params.checkedList.map(function (item) {
|
|
return "course_group_id[]=".concat(item);
|
|
}).join('&')),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context20.stop();
|
|
}
|
|
}, _callee20);
|
|
}));
|
|
return function ExportStudentanalysis(_x21) {
|
|
return _ref20.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getec_training_objectives = /*#__PURE__*/function () {
|
|
var _ref21 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee21(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee21$(_context21) {
|
|
while (1) switch (_context21.prev = _context21.next) {
|
|
case 0:
|
|
_context21.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_training_objectives.xlsx"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context21.stop();
|
|
}
|
|
}, _callee21);
|
|
}));
|
|
return function getec_training_objectives(_x22) {
|
|
return _ref21.apply(this, arguments);
|
|
};
|
|
}();
|
|
var get_ecs_attachment = /*#__PURE__*/function () {
|
|
var _ref22 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee22(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee22$(_context22) {
|
|
while (1) switch (_context22.prev = _context22.next) {
|
|
case 0:
|
|
_context22.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)(params === null || params === void 0 ? void 0 : params.name, (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/attachments/get_ecs_attachment.docx",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context22.stop();
|
|
}
|
|
}, _callee22);
|
|
}));
|
|
return function get_ecs_attachment(_x23) {
|
|
return _ref22.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getec_courses = /*#__PURE__*/function () {
|
|
var _ref23 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee23(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee23$(_context23) {
|
|
while (1) switch (_context23.prev = _context23.next) {
|
|
case 0:
|
|
_context23.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_courses.xlsx"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context23.stop();
|
|
}
|
|
}, _callee23);
|
|
}));
|
|
return function getec_courses(_x24) {
|
|
return _ref23.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getec_graduation_requirements = /*#__PURE__*/function () {
|
|
var _ref24 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee24(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee24$(_context24) {
|
|
while (1) switch (_context24.prev = _context24.next) {
|
|
case 0:
|
|
_context24.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_graduation_requirements.xlsx"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context24.stop();
|
|
}
|
|
}, _callee24);
|
|
}));
|
|
return function getec_graduation_requirements(_x25) {
|
|
return _ref24.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getrank_list = /*#__PURE__*/function () {
|
|
var _ref25 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee25(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee25$(_context25) {
|
|
while (1) switch (_context25.prev = _context25.next) {
|
|
case 0:
|
|
_context25.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/rank_list.xlsx",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context25.stop();
|
|
}
|
|
}, _callee25);
|
|
}));
|
|
return function getrank_list(_x26) {
|
|
return _ref25.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getquestion_rank_list = /*#__PURE__*/function () {
|
|
var _ref26 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee26(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee26$(_context26) {
|
|
while (1) switch (_context26.prev = _context26.next) {
|
|
case 0:
|
|
_context26.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/courses/question_rank_list.xlsx",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context26.stop();
|
|
}
|
|
}, _callee26);
|
|
}));
|
|
return function getquestion_rank_list(_x27) {
|
|
return _ref26.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
// 试卷库--试卷详情--试卷导出
|
|
var exportPaperlibraryPaper = /*#__PURE__*/function () {
|
|
var _ref27 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee27(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee27$(_context27) {
|
|
while (1) switch (_context27.prev = _context27.next) {
|
|
case 0:
|
|
_context27.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/examination_banks/".concat(params.id, ".json"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context27.stop();
|
|
}
|
|
}, _callee27);
|
|
}));
|
|
return function exportPaperlibraryPaper(_x28) {
|
|
return _ref27.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
// 导出当前学生试卷
|
|
var exportUserExerciseDetail = /*#__PURE__*/function () {
|
|
var _ref28 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee28(params, title) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee28$(_context28) {
|
|
while (1) switch (_context28.prev = _context28.next) {
|
|
case 0:
|
|
_context28.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)(title || '', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/exercises/".concat(params === null || params === void 0 ? void 0 : params.exercise_id, "/user_exercise_detail.json"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context28.stop();
|
|
}
|
|
}, _callee28);
|
|
}));
|
|
return function exportUserExerciseDetail(_x29, _x30) {
|
|
return _ref28.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
// 教学课堂--试卷详情--试卷导出
|
|
var exportClassroomsPaper = /*#__PURE__*/function () {
|
|
var _ref29 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee29(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee29$(_context29) {
|
|
while (1) switch (_context29.prev = _context29.next) {
|
|
case 0:
|
|
_context29.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/exercises/".concat(params.categoryId, ".json"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context29.stop();
|
|
}
|
|
}, _callee29);
|
|
}));
|
|
return function exportClassroomsPaper(_x31) {
|
|
return _ref29.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
// 导出问卷word文档
|
|
var exportCommitResultWord = /*#__PURE__*/function () {
|
|
var _ref30 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee30(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee30$(_context30) {
|
|
while (1) switch (_context30.prev = _context30.next) {
|
|
case 0:
|
|
_context30.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/polls/".concat(params === null || params === void 0 ? void 0 : params.id, "/commit_result.json"),
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context30.stop();
|
|
}
|
|
}, _callee30);
|
|
}));
|
|
return function exportCommitResultWord(_x32) {
|
|
return _ref30.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
// 导出实训word
|
|
var exportTaskPass = /*#__PURE__*/function () {
|
|
var _ref31 = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee31(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee31$(_context31) {
|
|
while (1) switch (_context31.prev = _context31.next) {
|
|
case 0:
|
|
_context31.next = 2;
|
|
return (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .downLoadFile */ .FH)('', (0,_util__WEBPACK_IMPORTED_MODULE_5__/* .setUrlQuery */ .NY)({
|
|
url: _env__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.API_SERVER + "/api/paths/get_task_pass.json",
|
|
query: params
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return _context31.stop();
|
|
}
|
|
}, _callee31);
|
|
}));
|
|
return function exportTaskPass(_x33) {
|
|
return _ref31.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
/***/ }),
|
|
|
|
/***/ 86393:
|
|
/*!*****************************************!*\
|
|
!*** ./src/utils/hooks/useInterval.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Y: function() { return /* binding */ useInterval; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
function useInterval(callback, delay) {
|
|
var savedCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
var savedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
|
|
// 保存新回调
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
savedCallback.current = callback;
|
|
});
|
|
|
|
// 建立 interval
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
function tick() {
|
|
savedCallback.current();
|
|
}
|
|
if (delay !== null) {
|
|
var id = setInterval(tick, delay);
|
|
savedId.current = id;
|
|
return function () {
|
|
return clearInterval(id);
|
|
};
|
|
}
|
|
}, [delay]);
|
|
}
|
|
|
|
/***/ })
|
|
|
|
}]); |