|
|
|
|
@ -7042,6 +7042,12 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
});
|
|
|
|
|
// 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/row/index.js
|
|
|
|
|
var row = __webpack_require__(95237);
|
|
|
|
|
// 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/switch/index.js + 2 modules
|
|
|
|
|
var es_switch = __webpack_require__(78673);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
|
|
var table = __webpack_require__(72315);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
|
|
|
@ -7120,6 +7126,11 @@ function reducer(state, action) {
|
|
|
|
|
var loading = state.loading,
|
|
|
|
|
page = state.page,
|
|
|
|
|
data = state.data;
|
|
|
|
|
var timeRefershRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
tableLoading = _useState2[0],
|
|
|
|
|
setTableLoading = _useState2[1];
|
|
|
|
|
var columns = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
|
|
var rs = [{
|
|
|
|
|
title: '排名',
|
|
|
|
|
@ -7160,41 +7171,61 @@ function reducer(state, action) {
|
|
|
|
|
|
|
|
|
|
return rs;
|
|
|
|
|
}, [data === null || data === void 0 ? void 0 : data.rank_data_name, data === null || data === void 0 ? void 0 : data.open_rank, page]);
|
|
|
|
|
var init = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var response;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setTableLoading(true);
|
|
|
|
|
_context.next = 3;
|
|
|
|
|
return (0,service/* getRanking */.i8)(taskId, {
|
|
|
|
|
page: page,
|
|
|
|
|
limit: 10
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
response = _context.sent;
|
|
|
|
|
setTableLoading(false);
|
|
|
|
|
dispatch({
|
|
|
|
|
type: Types.SET_STATE,
|
|
|
|
|
payload: {
|
|
|
|
|
loading: false,
|
|
|
|
|
data: response.data
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 6:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function init() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
function init() {
|
|
|
|
|
return _init.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
function _init() {
|
|
|
|
|
_init = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var response;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return (0,service/* getRanking */.i8)(taskId, {
|
|
|
|
|
page: page,
|
|
|
|
|
limit: 10
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
response = _context.sent;
|
|
|
|
|
dispatch({
|
|
|
|
|
type: Types.SET_STATE,
|
|
|
|
|
payload: {
|
|
|
|
|
loading: false,
|
|
|
|
|
data: response.data
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return _init.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
// async function init() {
|
|
|
|
|
// const response = await getRanking(taskId, { page, limit: 10 })
|
|
|
|
|
// dispatch({
|
|
|
|
|
// type: Types.SET_STATE,
|
|
|
|
|
// payload: {
|
|
|
|
|
// loading: false,
|
|
|
|
|
// data: response.data
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
if (activeIndex === 4) {
|
|
|
|
|
clearInterval(timeRefershRef.current);
|
|
|
|
|
if (sessionStorage.getItem("rankingShixunDetailAutoRefersh")) {
|
|
|
|
|
autoUpdata(true);
|
|
|
|
|
}
|
|
|
|
|
init();
|
|
|
|
|
} else {
|
|
|
|
|
clearInterval(timeRefershRef.current);
|
|
|
|
|
}
|
|
|
|
|
return function () {
|
|
|
|
|
clearInterval(timeRefershRef.current);
|
|
|
|
|
};
|
|
|
|
|
}, [page, activeIndex, taskId]);
|
|
|
|
|
function onPaginationChange(value) {
|
|
|
|
|
dispatch({
|
|
|
|
|
@ -7202,6 +7233,15 @@ function reducer(state, action) {
|
|
|
|
|
payload: value
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
var autoUpdata = function autoUpdata(checked) {
|
|
|
|
|
if (!checked) {
|
|
|
|
|
clearInterval(timeRefershRef.current);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
timeRefershRef.current = setInterval(function () {
|
|
|
|
|
init();
|
|
|
|
|
}, 1000 * 10);
|
|
|
|
|
};
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: "ranking-container",
|
|
|
|
|
children: loading ? /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
|
|
|
|
|
@ -7214,11 +7254,40 @@ function reducer(state, action) {
|
|
|
|
|
margin: '20% auto'
|
|
|
|
|
}
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
justify: "start",
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: '20px'
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "flex-container",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_switch/* default */.Z, {
|
|
|
|
|
className: "ml20",
|
|
|
|
|
checkedChildren: "\u5F00\u542F",
|
|
|
|
|
unCheckedChildren: "\u5173\u95ED",
|
|
|
|
|
defaultChecked: !!sessionStorage.getItem("rankingShixunDetailAutoRefersh"),
|
|
|
|
|
onChange: function onChange(checked) {
|
|
|
|
|
if (checked) {
|
|
|
|
|
sessionStorage.setItem("rankingShixunDetailAutoRefersh", "true");
|
|
|
|
|
} else {
|
|
|
|
|
sessionStorage.removeItem("rankingShixunDetailAutoRefersh");
|
|
|
|
|
}
|
|
|
|
|
autoUpdata(checked);
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "ml8",
|
|
|
|
|
children: "\u81EA\u52A8\u5237\u65B0\uFF08\u5F00\u542F\u540E\u6BCF10S\u66F4\u65B0\u4E00\u6B21\u6570\u636E\uFF09"
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
pagination: false,
|
|
|
|
|
size: "middle",
|
|
|
|
|
dataSource: data.rank_list,
|
|
|
|
|
columns: columns
|
|
|
|
|
columns: columns,
|
|
|
|
|
loading: tableLoading
|
|
|
|
|
}), data.rank_list_count > 10 ? /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: 20
|
|
|
|
|
@ -9034,8 +9103,6 @@ var LeftPanel = function LeftPanel(_ref) {
|
|
|
|
|
})(LeftPanel));
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/index.js + 5 modules
|
|
|
|
|
var statistic = __webpack_require__(31797);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
|
|
|
var row = __webpack_require__(95237);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tour/index.js + 12 modules
|
|
|
|
|
var tour = __webpack_require__(65615);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
|
|
@ -10921,8 +10988,6 @@ var input = __webpack_require__(1056);
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
|
|
|
var col = __webpack_require__(43604);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/tasks/choose-repository/topics/topic/index.jsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|