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.
221 lines
11 KiB
221 lines
11 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[1799],{
|
|
|
|
/***/ 48207:
|
|
/*!****************************************************************!*\
|
|
!*** ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx ***!
|
|
\****************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! umi */ 67866);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ 49127);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 6848);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 66104);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 14491);
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && __getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
const competitionDetails = (_a) => {
|
|
var _b = _a, {
|
|
globalSetting,
|
|
loading,
|
|
dispatch,
|
|
user
|
|
} = _b, props = __objRest(_b, [
|
|
"globalSetting",
|
|
"loading",
|
|
"dispatch",
|
|
"user"
|
|
]);
|
|
const { identifier, Teamid } = (0,umi__WEBPACK_IMPORTED_MODULE_1__.useParams)();
|
|
const [shixundata, setshixundata] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
const [coursedata, setcoursedata] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
function init() {
|
|
getshixun();
|
|
getCourse();
|
|
}
|
|
if (identifier) {
|
|
init();
|
|
}
|
|
}, [identifier]);
|
|
function getshixun() {
|
|
return __async(this, null, function* () {
|
|
let data = yield dispatch({
|
|
type: "competitions/getShixun",
|
|
payload: {
|
|
identifier,
|
|
teamid: Teamid
|
|
}
|
|
});
|
|
if (data) {
|
|
let newarr = data.shixuns;
|
|
let newobj = {
|
|
creator: "\u5408\u8BA1:",
|
|
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);
|
|
}
|
|
});
|
|
}
|
|
function getCourse() {
|
|
return __async(this, null, function* () {
|
|
let data = yield dispatch({
|
|
type: "competitions/getCourse",
|
|
payload: {
|
|
identifier,
|
|
teamid: Teamid
|
|
}
|
|
});
|
|
if (data) {
|
|
let newarr = data.courses;
|
|
let newobj = {
|
|
creator: "\u5408\u8BA1:",
|
|
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);
|
|
}
|
|
});
|
|
}
|
|
console.log("shixundata", shixundata, "coursedata", coursedata);
|
|
const shixuncolumns = [
|
|
{
|
|
title: "\u521B\u5EFA\u8005",
|
|
dataIndex: "creator",
|
|
key: "creator",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoutheji" : "" }, text)
|
|
},
|
|
{
|
|
title: "\u540D\u79F0",
|
|
dataIndex: "shixun_name",
|
|
key: "shixun_name",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text, record.forked === true ? /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { count: "\u539F\u521B", style: { backgroundColor: "#459BE5" } }) : "")
|
|
},
|
|
{
|
|
title: "\u5B66\u4E60\u4EBA\u6570",
|
|
dataIndex: "myshixuns_count",
|
|
key: "myshixuns_count",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text)
|
|
},
|
|
{
|
|
title: "\u88ABfork\u53D1\u5E03\u7684\u5B66\u4E60\u4EBA\u6570",
|
|
dataIndex: "forked_myshixun_count",
|
|
key: "forked_myshixun_count",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { placement: "bottom", title: "fork\u8BE5\u5B9E\u8BAD\u4EA7\u751F\u7684\u65B0\u5B9E\u8BAD\uFF0C\u5B66\u4E60\u603B\u4EBA\u6570" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text))
|
|
},
|
|
{
|
|
title: "\u6709\u6548\u4F5C\u54C1\u6570",
|
|
dataIndex: "valid_count",
|
|
key: "valid_count",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { placement: "bottom", title: "\u81F3\u5C11\u5B8C\u6210\u4E861\u4E2A\u5173\u5361" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text))
|
|
},
|
|
{
|
|
title: "\u5E94\u7528\u503C",
|
|
dataIndex: "score",
|
|
key: "score",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text)
|
|
}
|
|
];
|
|
const coursecolumns = [
|
|
{
|
|
title: "\u521B\u5EFA\u8005",
|
|
dataIndex: "creator",
|
|
key: "creator",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoutheji" : "" }, text)
|
|
},
|
|
{
|
|
title: "\u540D\u79F0",
|
|
dataIndex: "course_name",
|
|
key: "course_name",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text)
|
|
},
|
|
{
|
|
title: "\u5B66\u751F\u6570\u91CF",
|
|
dataIndex: "students_count",
|
|
key: "students_count",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text)
|
|
},
|
|
{
|
|
title: "\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u6570\u91CF",
|
|
dataIndex: "shixun_homework_count",
|
|
key: "shixun_homework_count",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text)
|
|
},
|
|
{
|
|
title: "\u6709\u6548\u4F5C\u54C1\u6570",
|
|
dataIndex: "valid_count",
|
|
key: "valid_count",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { placement: "bottom", title: "\u81F3\u5C11\u5B8C\u6210\u4E861\u4E2A\u5173\u5361" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text))
|
|
},
|
|
{
|
|
title: "\u5E94\u7528\u503C",
|
|
dataIndex: "score",
|
|
key: "score",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: record.creator === "\u5408\u8BA1:" ? "teamsLayoucolor-orange" : "" }, text)
|
|
}
|
|
];
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "edu-container minH500" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { className: "mt10", separator: ">" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z.Item, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(umi__WEBPACK_IMPORTED_MODULE_1__.Link, { to: "/competitions/index" }, "\u5728\u7EBF\u7ADE\u8D5B")), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z.Item, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(umi__WEBPACK_IMPORTED_MODULE_1__.Link, { to: `/competitions/${identifier}/detail/enroll` }, "\u62A5\u540D")), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z.Item, null, "\u6218\u961F\u8BE6\u60C5")), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\u5B9E\u8DF5\u9879\u76EE"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_5__["default"], { className: "teamsLayoutTable", columns: shixuncolumns, dataSource: shixundata, bordered: true, pagination: false }), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\u6559\u5B66\u8BFE\u5802"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_5__["default"], { className: "teamsLayoutTable", columns: coursecolumns, dataSource: coursedata, bordered: true, pagination: false }));
|
|
};
|
|
/* harmony default export */ __webpack_exports__["default"] = ((0,umi__WEBPACK_IMPORTED_MODULE_1__.connect)(
|
|
({
|
|
loading,
|
|
globalSetting,
|
|
user
|
|
}) => ({
|
|
globalSetting,
|
|
loading: loading.effects,
|
|
user
|
|
})
|
|
)(competitionDetails));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |