forked from Gitlink/build
336 lines
16 KiB
JavaScript
336 lines
16 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
|
||
|
||
/***/ "mKwH":
|
||
/*!****************************************************************!*\
|
||
!*** ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx ***!
|
||
\****************************************************************/
|
||
/*! exports provided: default */
|
||
/*! all exports used */
|
||
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei");
|
||
/* harmony import */ var _Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony import */ var antd_es_table_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/table/style */ "g9YV");
|
||
/* harmony import */ var antd_es_table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/table */ "wCAj");
|
||
/* harmony import */ var antd_es_breadcrumb_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/breadcrumb/style */ "sPJy");
|
||
/* harmony import */ var antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/breadcrumb */ "bE4q");
|
||
/* harmony import */ var antd_es_tooltip_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/tooltip/style */ "5Dmo");
|
||
/* harmony import */ var antd_es_tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/tooltip */ "3S7+");
|
||
/* harmony import */ var antd_es_badge_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd/es/badge/style */ "Awhp");
|
||
/* harmony import */ var antd_es_badge__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd/es/badge */ "KrTs");
|
||
/* harmony import */ var _Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "5Tp6");
|
||
/* harmony import */ var _Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "k16G");
|
||
/* harmony import */ var _Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */ "SIvP");
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react */ "q1tI");
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
|
||
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! umi */ "WHYC");
|
||
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! umi */ "uYtH");
|
||
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! umi */ "9kvl");
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
//战队详情
|
||
|
||
|
||
|
||
var competitionDetails = function competitionDetails(_ref) {
|
||
var globalSetting = _ref.globalSetting,
|
||
loading = _ref.loading,
|
||
dispatch = _ref.dispatch,
|
||
user = _ref.user,
|
||
props = Object(_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(_ref, ["globalSetting", "loading", "dispatch", "user"]);
|
||
|
||
var _useParams = Object(umi__WEBPACK_IMPORTED_MODULE_13__[/* useParams */ "l"])(),
|
||
identifier = _useParams.identifier,
|
||
Teamid = _useParams.Teamid;
|
||
|
||
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_12__["useState"])(),
|
||
_useState2 = Object(_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_useState, 2),
|
||
shixundata = _useState2[0],
|
||
setshixundata = _useState2[1];
|
||
|
||
var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_12__["useState"])(),
|
||
_useState4 = Object(_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_useState3, 2),
|
||
coursedata = _useState4[0],
|
||
setcoursedata = _useState4[1];
|
||
|
||
Object(react__WEBPACK_IMPORTED_MODULE_12__["useEffect"])(function () {
|
||
function init() {
|
||
getshixun();
|
||
getCourse();
|
||
}
|
||
|
||
if (identifier) {
|
||
init();
|
||
}
|
||
}, [identifier]);
|
||
|
||
function getshixun() {
|
||
return _getshixun.apply(this, arguments);
|
||
}
|
||
|
||
function _getshixun() {
|
||
_getshixun = Object(_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
|
||
var data, newarr, newobj;
|
||
return _Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
||
while (1) {
|
||
switch (_context.prev = _context.next) {
|
||
case 0:
|
||
_context.next = 2;
|
||
return dispatch({
|
||
type: 'competitions/getShixun',
|
||
payload: {
|
||
identifier: identifier,
|
||
teamid: Teamid
|
||
}
|
||
});
|
||
|
||
case 2:
|
||
data = _context.sent;
|
||
|
||
if (data) {
|
||
newarr = data.shixuns;
|
||
newobj = {
|
||
creator: "合计:",
|
||
shixun_name: data.shixun_count,
|
||
myshixuns_count: data.total_myshixun_count,
|
||
forked_myshixun_count: data.total_forked_myshixun_count,
|
||
valid_count: data.total_valid_count,
|
||
score: data.total_shixun_score
|
||
};
|
||
newarr.push(newobj);
|
||
setshixundata(newarr);
|
||
}
|
||
|
||
case 4:
|
||
case "end":
|
||
return _context.stop();
|
||
}
|
||
}
|
||
}, _callee);
|
||
}));
|
||
return _getshixun.apply(this, arguments);
|
||
}
|
||
|
||
function getCourse() {
|
||
return _getCourse.apply(this, arguments);
|
||
}
|
||
|
||
function _getCourse() {
|
||
_getCourse = Object(_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() {
|
||
var data, newarr, newobj;
|
||
return _Users_caishi_caishi_gitlink_competition_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {
|
||
while (1) {
|
||
switch (_context2.prev = _context2.next) {
|
||
case 0:
|
||
_context2.next = 2;
|
||
return dispatch({
|
||
type: 'competitions/getCourse',
|
||
payload: {
|
||
identifier: identifier,
|
||
teamid: Teamid
|
||
}
|
||
});
|
||
|
||
case 2:
|
||
data = _context2.sent;
|
||
|
||
if (data) {
|
||
newarr = data.courses;
|
||
newobj = {
|
||
creator: "合计:",
|
||
course_name: data.total_course_count,
|
||
students_count: data.total_students_count,
|
||
shixun_homework_count: data.total_shixun_homework_count,
|
||
valid_count: data.total_valid_count,
|
||
score: data.total_course_score
|
||
};
|
||
newarr.push(newobj);
|
||
setcoursedata(newarr);
|
||
}
|
||
|
||
case 4:
|
||
case "end":
|
||
return _context2.stop();
|
||
}
|
||
}
|
||
}, _callee2);
|
||
}));
|
||
return _getCourse.apply(this, arguments);
|
||
}
|
||
|
||
console.log('shixundata', shixundata, 'coursedata', coursedata);
|
||
var shixuncolumns = [{
|
||
title: '创建者',
|
||
dataIndex: 'creator',
|
||
key: 'creator',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoutheji" : ""
|
||
}, text);
|
||
}
|
||
}, {
|
||
title: '名称',
|
||
dataIndex: 'shixun_name',
|
||
key: 'shixun_name',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text, record.forked === true ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_badge__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], {
|
||
count: "原创",
|
||
style: {
|
||
backgroundColor: '#459BE5'
|
||
}
|
||
}) : "");
|
||
}
|
||
}, {
|
||
title: '学习人数',
|
||
dataIndex: 'myshixuns_count',
|
||
key: 'myshixuns_count',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text);
|
||
}
|
||
}, {
|
||
title: '被fork发布的学习人数',
|
||
dataIndex: 'forked_myshixun_count',
|
||
key: 'forked_myshixun_count',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
|
||
placement: "bottom",
|
||
title: "fork该实训产生的新实训,学习总人数"
|
||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text));
|
||
}
|
||
}, {
|
||
title: '有效作品数',
|
||
dataIndex: 'valid_count',
|
||
key: 'valid_count',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
|
||
placement: "bottom",
|
||
title: "至少完成了1个关卡"
|
||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text));
|
||
}
|
||
}, {
|
||
title: '应用值',
|
||
dataIndex: 'score',
|
||
key: 'score',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text);
|
||
}
|
||
}];
|
||
var coursecolumns = [{
|
||
title: '创建者',
|
||
dataIndex: 'creator',
|
||
key: 'creator',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoutheji" : ""
|
||
}, text);
|
||
}
|
||
}, {
|
||
title: '名称',
|
||
dataIndex: 'course_name',
|
||
key: 'course_name',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text);
|
||
}
|
||
}, {
|
||
title: '学生数量',
|
||
dataIndex: 'students_count',
|
||
key: 'students_count',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text);
|
||
}
|
||
}, {
|
||
title: '发布的实训作业数量',
|
||
dataIndex: 'shixun_homework_count',
|
||
key: 'shixun_homework_count',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text);
|
||
}
|
||
}, {
|
||
title: '有效作品数',
|
||
dataIndex: 'valid_count',
|
||
key: 'valid_count',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
|
||
placement: "bottom",
|
||
title: "至少完成了1个关卡"
|
||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text));
|
||
}
|
||
}, {
|
||
title: '应用值',
|
||
dataIndex: 'score',
|
||
key: 'score',
|
||
render: function render(text, record) {
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: record.creator === "合计:" ? "teamsLayoucolor-orange" : ""
|
||
}, text);
|
||
}
|
||
}];
|
||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("div", {
|
||
className: "edu-container minH500"
|
||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], {
|
||
className: "mt10",
|
||
separator: ">"
|
||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].Item, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(umi__WEBPACK_IMPORTED_MODULE_14__[/* Link */ "a"], {
|
||
to: "/competitions/index"
|
||
}, "\u5728\u7EBF\u7ADE\u8D5B")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].Item, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(umi__WEBPACK_IMPORTED_MODULE_14__[/* Link */ "a"], {
|
||
to: "/competitions/index/".concat(identifier, "/enroll")
|
||
}, "\u62A5\u540D")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_breadcrumb__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].Item, null, "\u6218\u961F\u8BE6\u60C5")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("p", null, "\u5B9E\u8DF5\u9879\u76EE"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_table__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], {
|
||
className: "teamsLayoutTable",
|
||
columns: shixuncolumns,
|
||
dataSource: shixundata,
|
||
bordered: true,
|
||
pagination: false
|
||
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement("p", null, "\u6559\u5B66\u8BFE\u5802"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(antd_es_table__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], {
|
||
className: "teamsLayoutTable",
|
||
columns: coursecolumns,
|
||
dataSource: coursedata,
|
||
bordered: true,
|
||
pagination: false
|
||
}));
|
||
};
|
||
|
||
/* harmony default export */ __webpack_exports__["default"] = (Object(umi__WEBPACK_IMPORTED_MODULE_15__[/* connect */ "a"])(function (_ref2) {
|
||
var loading = _ref2.loading,
|
||
globalSetting = _ref2.globalSetting,
|
||
user = _ref2.user;
|
||
return {
|
||
globalSetting: globalSetting,
|
||
loading: loading.effects,
|
||
user: user
|
||
};
|
||
})(competitionDetails));
|
||
|
||
/***/ })
|
||
|
||
}]); |