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.
1330 lines
46 KiB
1330 lines
46 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[3585],{
|
|
|
|
/***/ 76510:
|
|
/*!**************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Statistics/StudentSituation/index.tsx + 2 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 */ Statistics_StudentSituation; }
|
|
});
|
|
|
|
// 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/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// 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/.umi-production/exports.ts + 8 modules
|
|
var _umi_production_exports = __webpack_require__(66660);
|
|
// 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/breadcrumb/index.js + 6 modules
|
|
var breadcrumb = __webpack_require__(66104);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
|
|
var tabs = __webpack_require__(99313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(72315);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(97174);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/StudentSituation/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var StudentSituationmodules = ({"flex_box_center":"flex_box_center___j1bAE","flex_space_between":"flex_space_between___IbaMC","flex_box_vertical_center":"flex_box_vertical_center___TcvEM","flex_box_center_end":"flex_box_center_end___MqTuc","flex_box_column":"flex_box_column___idplU","bg":"bg___oFrjP","title":"title___Lhfh_","img":"img___x1Ip0","right":"right___l5YAN","top":"top___ku6kq","font":"font___OYhDA","bottom":"bottom___MllAb","li":"li___d6sjF","num":"num___YfZHN","ling":"ling___ijtU2","content":"content___FWvET"});
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(47015);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/StudentSituation/columns.tsx
|
|
|
|
|
|
var init_work_status = [{
|
|
text: '未开启',
|
|
color: '#272A3A'
|
|
}, {
|
|
text: '未通关',
|
|
color: '#E30000'
|
|
}, {
|
|
text: '按时通关',
|
|
color: '#038D00'
|
|
}, {
|
|
text: '迟交通关',
|
|
color: '#0152D9'
|
|
}];
|
|
var columns = function columns(key, params) {
|
|
var status = {
|
|
shixun_homework: [{
|
|
text: '未开启',
|
|
color: '#272A3A'
|
|
}, {
|
|
text: '未通关',
|
|
color: '#E30000'
|
|
}, {
|
|
text: '按时通关',
|
|
color: '#038D00'
|
|
}, {
|
|
text: '迟交通关',
|
|
color: '#0152D9'
|
|
}],
|
|
program_homework: [{
|
|
text: '未开启',
|
|
color: '#272A3A'
|
|
}, {
|
|
text: '未通关',
|
|
color: '#E30000'
|
|
}, {
|
|
text: '按时通关',
|
|
color: '#038D00'
|
|
}, {
|
|
text: '迟交通关',
|
|
color: '#0152D9'
|
|
}, {
|
|
text: '截止通关',
|
|
color: '#E30000'
|
|
} //不确定会不会出现
|
|
],
|
|
|
|
common_homework: [{
|
|
text: '未提交',
|
|
color: '#272A3A'
|
|
}, {
|
|
text: '按时提交',
|
|
color: '#038D00'
|
|
}, {
|
|
text: '延时提交',
|
|
color: '#0152D9'
|
|
}],
|
|
group_homework: [{
|
|
text: '未提交',
|
|
color: '#272A3A'
|
|
}, {
|
|
text: '按时提交',
|
|
color: '#038D00'
|
|
}, {
|
|
text: '延时提交',
|
|
color: '#0152D9'
|
|
}],
|
|
exercise: [{
|
|
text: '未开始',
|
|
color: '#272A3A'
|
|
}, {
|
|
text: '考试中',
|
|
color: '#0152D9'
|
|
}, {
|
|
text: '已交卷',
|
|
color: '#038D00'
|
|
}, {
|
|
text: '已交卷/未答',
|
|
color: '#038D00'
|
|
}],
|
|
video: [{
|
|
text: '未完成',
|
|
color: '#272A3A'
|
|
}, {
|
|
text: '已完成',
|
|
color: '#038D00'
|
|
}]
|
|
};
|
|
var work_status = status[key] || init_work_status;
|
|
var data = {
|
|
shixun_homework: [{
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: "\u5B9E\u9A8C\u540D\u79F0"
|
|
}),
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/shixun_homework/").concat(item === null || item === void 0 ? void 0 : item.id, "/").concat(item === null || item === void 0 ? void 0 : item.student_work_id, "/comment"),
|
|
target: "_blank",
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业状态',
|
|
dataIndex: 'work_status',
|
|
render: function render(text) {
|
|
var _work_status$text, _work_status$text2;
|
|
return text === -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FF9D18'
|
|
},
|
|
children: "\u91CD\u505A\u4E2D"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: (_work_status$text = work_status[text]) === null || _work_status$text === void 0 ? void 0 : _work_status$text.color
|
|
},
|
|
children: (_work_status$text2 = work_status[text]) === null || _work_status$text2 === void 0 ? void 0 : _work_status$text2.text
|
|
});
|
|
}
|
|
}, {
|
|
title: '完成时间',
|
|
dataIndex: 'update_time'
|
|
// render: (text: any) => '2022-06-02 12:34:12',
|
|
}, {
|
|
title: '通关情况',
|
|
dataIndex: 'current_complete_count',
|
|
align: 'center',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text + '/' + (item === null || item === void 0 ? void 0 : item.complete_count)
|
|
});
|
|
}
|
|
}, {
|
|
title: '最终成绩',
|
|
dataIndex: 'work_score',
|
|
align: 'center',
|
|
key: 'address',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: 100 === parseInt(text) ? '#FF6800' : '#E30000'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业达成情况',
|
|
dataIndex: 'rate',
|
|
align: 'center',
|
|
render: function render(text) {
|
|
return "".concat(text, "%");
|
|
}
|
|
}],
|
|
common_homework: [{
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: "\u4F5C\u4E1A\u540D\u79F0"
|
|
}),
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/common_homework/").concat(item === null || item === void 0 ? void 0 : item.id, "/review/").concat(item === null || item === void 0 ? void 0 : item.student_work_id),
|
|
target: "_blank",
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业状态',
|
|
dataIndex: 'work_status',
|
|
render: function render(text) {
|
|
var _work_status$text3, _work_status$text4;
|
|
return text === -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FF9D18'
|
|
},
|
|
children: "\u91CD\u505A\u4E2D"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: (_work_status$text3 = work_status[text]) === null || _work_status$text3 === void 0 ? void 0 : _work_status$text3.color
|
|
},
|
|
children: (_work_status$text4 = work_status[text]) === null || _work_status$text4 === void 0 ? void 0 : _work_status$text4.text
|
|
});
|
|
}
|
|
}, {
|
|
title: '完成时间',
|
|
dataIndex: 'update_time',
|
|
render: function render(text) {
|
|
return '2022-06-02 12:34:12';
|
|
}
|
|
}, {
|
|
title: '最终成绩',
|
|
dataIndex: 'work_score',
|
|
align: 'center',
|
|
key: 'address',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: 100 === parseInt(text) ? '#FF6800' : '#E30000'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业达成情况',
|
|
dataIndex: 'rate',
|
|
align: 'center',
|
|
render: function render(text) {
|
|
return "".concat(text, "%");
|
|
}
|
|
}],
|
|
group_homework: [{
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: "\u4F5C\u4E1A\u540D\u79F0"
|
|
}),
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/group_homework/").concat(item === null || item === void 0 ? void 0 : item.id, "/review/").concat(item === null || item === void 0 ? void 0 : item.student_work_id),
|
|
target: "_blank",
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业状态',
|
|
dataIndex: 'work_status',
|
|
render: function render(text) {
|
|
var _work_status$text5, _work_status$text6;
|
|
return text === -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FF9D18'
|
|
},
|
|
children: "\u91CD\u505A\u4E2D"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: (_work_status$text5 = work_status[text]) === null || _work_status$text5 === void 0 ? void 0 : _work_status$text5.color
|
|
},
|
|
children: (_work_status$text6 = work_status[text]) === null || _work_status$text6 === void 0 ? void 0 : _work_status$text6.text
|
|
});
|
|
}
|
|
}, {
|
|
title: '完成时间',
|
|
dataIndex: 'update_time',
|
|
render: function render(text) {
|
|
return '2022-06-02 12:34:12';
|
|
}
|
|
}, {
|
|
title: '最终成绩',
|
|
dataIndex: 'work_score',
|
|
align: 'center',
|
|
key: 'address',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: 100 === parseInt(text) ? '#FF6800' : '#E30000'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业达成情况',
|
|
dataIndex: 'rate',
|
|
align: 'center',
|
|
render: function render(text) {
|
|
return "".concat(text, "%");
|
|
}
|
|
}],
|
|
program_homework: [{
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: "\u4F5C\u4E1A\u540D\u79F0"
|
|
}),
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业状态',
|
|
dataIndex: 'work_status',
|
|
render: function render(text) {
|
|
var _work_status$text7, _work_status$text8;
|
|
return text === -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FF9D18'
|
|
},
|
|
children: "\u91CD\u505A\u4E2D"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: (_work_status$text7 = work_status[text]) === null || _work_status$text7 === void 0 ? void 0 : _work_status$text7.color
|
|
},
|
|
children: (_work_status$text8 = work_status[text]) === null || _work_status$text8 === void 0 ? void 0 : _work_status$text8.text
|
|
});
|
|
}
|
|
}, {
|
|
title: '完成时间',
|
|
dataIndex: 'update_time',
|
|
render: function render(text) {
|
|
return '2022-06-02 12:34:12';
|
|
}
|
|
}, {
|
|
title: '通关情况',
|
|
dataIndex: 'current_complete_count',
|
|
align: 'center',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text + '/' + (item === null || item === void 0 ? void 0 : item.complete_count)
|
|
});
|
|
}
|
|
}, {
|
|
title: '最终成绩',
|
|
dataIndex: 'work_score',
|
|
align: 'center',
|
|
key: 'address',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: 100 === parseInt(text) ? '#FF6800' : '#E30000'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '作业达成情况',
|
|
dataIndex: 'rate',
|
|
align: 'center',
|
|
render: function render(text) {
|
|
return "".concat(text, "%");
|
|
}
|
|
}],
|
|
exercise: [{
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: "\u8003\u8BD5\u540D\u79F0"
|
|
}),
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/exercise/").concat(item === null || item === void 0 ? void 0 : item.id, "/review/").concat(params.login),
|
|
target: "_blank",
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '考试状态',
|
|
dataIndex: 'work_status',
|
|
render: function render(text) {
|
|
var _work_status$text9, _work_status$text10;
|
|
return text === -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#FF9D18'
|
|
},
|
|
children: "\u91CD\u505A\u4E2D"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: (_work_status$text9 = work_status[text]) === null || _work_status$text9 === void 0 ? void 0 : _work_status$text9.color
|
|
},
|
|
children: (_work_status$text10 = work_status[text]) === null || _work_status$text10 === void 0 ? void 0 : _work_status$text10.text
|
|
});
|
|
}
|
|
}, {
|
|
title: '交卷时间',
|
|
dataIndex: 'update_time',
|
|
render: function render(text) {
|
|
return '2022-06-02 12:34:12';
|
|
}
|
|
}, {
|
|
title: '最终成绩',
|
|
dataIndex: 'score',
|
|
align: 'center',
|
|
key: 'address',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: 100 === parseInt(text) ? '#FF6800' : '#E30000'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '考试达成情况',
|
|
dataIndex: 'rate',
|
|
align: 'center',
|
|
render: function render(text) {
|
|
return "".concat(text, "%");
|
|
}
|
|
}],
|
|
video: [{
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: "\u89C6\u9891\u540D\u79F0"
|
|
}),
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '是否观看完成',
|
|
dataIndex: 'work_status',
|
|
render: function render(text) {
|
|
var _work_status, _work_status2;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: (_work_status = work_status[text ? 1 : 0]) === null || _work_status === void 0 ? void 0 : _work_status.color
|
|
},
|
|
children: (_work_status2 = work_status[text ? 1 : 0]) === null || _work_status2 === void 0 ? void 0 : _work_status2.text
|
|
});
|
|
}
|
|
}, {
|
|
title: '观看时长',
|
|
dataIndex: 'watch_duration'
|
|
}, {
|
|
title: '观看达成状态',
|
|
dataIndex: 'rate',
|
|
align: 'center',
|
|
render: function render(text) {
|
|
return "".concat(text, "%");
|
|
}
|
|
}],
|
|
attendance: [{
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: "\u7B7E\u5230\u540D\u79F0"
|
|
}),
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text, item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginLeft: 12
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '签到状态',
|
|
dataIndex: 'work_status'
|
|
}, {
|
|
title: '签到达成状态',
|
|
dataIndex: 'rate',
|
|
align: 'center',
|
|
render: function render(text) {
|
|
return "".concat(text, "%");
|
|
}
|
|
}]
|
|
};
|
|
return data[key];
|
|
};
|
|
/* harmony default export */ var StudentSituation_columns = (columns);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Statistics/StudentSituation/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('zh-cn');
|
|
var StudentSituation = function StudentSituation() {
|
|
var _data$course_modules, _data$course_target_u, _data$course_modules2;
|
|
var urlParams = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()(objectSpread2_default()({}, urlParams), {}, {
|
|
page: 1,
|
|
limit: 10
|
|
})),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
data = _useState4[0],
|
|
setData = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
list = _useState6[0],
|
|
setList = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(0),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
total = _useState8[0],
|
|
setTotal = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)('0'),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
activityKey = _useState10[0],
|
|
seActivityKey = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
tableLoading = _useState12[0],
|
|
setTableLoading = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
loading = _useState14[0],
|
|
setLoading = _useState14[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData(urlParams, true);
|
|
}, []);
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(record) {
|
|
var isFirstLoad,
|
|
res,
|
|
_res$table_data,
|
|
_res$table_data2,
|
|
_args = arguments;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
isFirstLoad = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
|
|
if (isFirstLoad) {
|
|
setLoading(true);
|
|
} else {
|
|
setTableLoading(true);
|
|
}
|
|
_context.next = 4;
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/course_members/").concat(urlParams.login, "/student_detail"), {
|
|
method: 'get',
|
|
params: record
|
|
});
|
|
case 4:
|
|
res = _context.sent;
|
|
if (res) {
|
|
if (isFirstLoad) {
|
|
setData(res);
|
|
seActivityKey(String((res === null || res === void 0 ? void 0 : res.homework_type) || 0));
|
|
}
|
|
setList((res === null || res === void 0 || (_res$table_data = res.table_data) === null || _res$table_data === void 0 ? void 0 : _res$table_data.list) || []);
|
|
setTotal((res === null || res === void 0 || (_res$table_data2 = res.table_data) === null || _res$table_data2 === void 0 ? void 0 : _res$table_data2.total_count) || 0);
|
|
}
|
|
setLoading(false);
|
|
setTableLoading(false);
|
|
case 8:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData(_x) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
// const tabs = [{
|
|
// type: '4',
|
|
// name: '实训作业',
|
|
// key: 'shixun_homework',
|
|
// }, {
|
|
// name: '普通作业',
|
|
// type: '1',
|
|
// key: 'common_homework',
|
|
// }, {
|
|
// type: '3',
|
|
// name: '分组作业',
|
|
// key: 'group_homework',
|
|
// }, {
|
|
// type: '5',
|
|
// name: '编程作业',
|
|
// key: 'program_homework',
|
|
// }, {
|
|
// type: '6',
|
|
// name: '在线考试',
|
|
// key: 'exercise',
|
|
// }, {
|
|
// type: '7',
|
|
// name: '视频直播',
|
|
// key: 'video',
|
|
// }, {
|
|
// type: '8',
|
|
// name: '课堂签到',
|
|
// key: 'attendance',
|
|
// }]
|
|
|
|
var handleChangePage = function handleChangePage(param) {
|
|
params.page = param === null || param === void 0 ? void 0 : param.current;
|
|
params.limit = param === null || param === void 0 ? void 0 : param.pageSize;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getData(params);
|
|
};
|
|
var handleTabs = function handleTabs(e) {
|
|
seActivityKey(e);
|
|
params.page = 1;
|
|
params.type = e;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getData(params);
|
|
};
|
|
var columnsKey = data === null || data === void 0 || (_data$course_modules = data.course_modules) === null || _data$course_modules === void 0 || (_data$course_modules = _data$course_modules.find(function (e) {
|
|
return String(e.type) === activityKey;
|
|
})) === null || _data$course_modules === void 0 ? void 0 : _data$course_modules.module_type;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
className: StudentSituationmodules.bg,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
loading: loading,
|
|
active: true,
|
|
paragraph: {
|
|
rows: 5
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
|
separator: ">",
|
|
style: {
|
|
marginTop: 20
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
children: "\u6559\u5B66\u8BFE\u5802"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
href: "/classrooms/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId),
|
|
children: data === null || data === void 0 ? void 0 : data.course_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
href: "/classrooms/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.coursesId, "/statistics/").concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.categoryId),
|
|
children: "\u5B66\u751F\u5206\u6790"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
children: "\u5B66\u751F\u5B66\u4E60\u8BE6\u60C5"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.title,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: StudentSituationmodules.img,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: env/* default */.Z.IMG_SERVER + '/images/' + (data === null || data === void 0 ? void 0 : data.image_url)
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.right,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: StudentSituationmodules.top,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: StudentSituationmodules.font,
|
|
children: ["\u59D3\u540D\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: data === null || data === void 0 ? void 0 : data.username
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: StudentSituationmodules.font,
|
|
children: ["\u5B66\u53F7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: (data === null || data === void 0 ? void 0 : data.student_id) || '- -'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: StudentSituationmodules.font,
|
|
children: ["\u5206\u73ED\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: (data === null || data === void 0 ? void 0 : data.course_group) || '- -'
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.bottom,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.li,
|
|
style: {
|
|
marginLeft: 0
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.num,
|
|
style: {
|
|
color: '#0152D9'
|
|
},
|
|
children: [data === null || data === void 0 ? void 0 : data.total_rate, "%"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: "\u6574\u4F53\u8FBE\u6210\u5EA6"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: StudentSituationmodules.ling
|
|
}), data === null || data === void 0 || (_data$course_target_u = data.course_target_users) === null || _data$course_target_u === void 0 ? void 0 : _data$course_target_u.map(function (e, i) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.li,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.num,
|
|
children: [e.rate, "%"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: e.target_name
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: StudentSituationmodules.ling
|
|
})]
|
|
}, i);
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: StudentSituationmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
|
|
activeKey: activityKey,
|
|
onChange: handleTabs,
|
|
tabBarStyle: {
|
|
paddingLeft: 20,
|
|
height: 55
|
|
},
|
|
children: data === null || data === void 0 || (_data$course_modules2 = data.course_modules) === null || _data$course_modules2 === void 0 ? void 0 : _data$course_modules2.map(function (e) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z.TabPane, {
|
|
style: {
|
|
marginRight: 68
|
|
},
|
|
tab: e.module_name
|
|
}, String(e.type));
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
style: {
|
|
padding: '12px 20px 0 20px'
|
|
},
|
|
dataSource: list,
|
|
columns: StudentSituation_columns(columnsKey, params),
|
|
onChange: handleChangePage,
|
|
loading: tableLoading,
|
|
pagination: {
|
|
pageSize: params.limit,
|
|
total: total,
|
|
current: params.page,
|
|
showQuickJumper: true,
|
|
showSizeChanger: false,
|
|
hideOnSinglePage: true,
|
|
position: ["bottomCenter"],
|
|
showTotal: function showTotal(total) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "mr10",
|
|
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-orange",
|
|
children: total
|
|
}), "\u6761\u6570\u636E"]
|
|
});
|
|
}
|
|
}
|
|
})]
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var Statistics_StudentSituation = (StudentSituation);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 66104:
|
|
/*!**************************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules ***!
|
|
\**************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ breadcrumb; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
|
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
|
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(45659);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/pickAttrs.js
|
|
var pickAttrs = __webpack_require__(3286);
|
|
// 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/_util/reactNode.js
|
|
var reactNode = __webpack_require__(92343);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
var DownOutlined = __webpack_require__(42884);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js
|
|
var dropdown = __webpack_require__(91857);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbSeparator.js
|
|
"use client";
|
|
|
|
|
|
|
|
const BreadcrumbSeparator = _ref => {
|
|
let {
|
|
children
|
|
} = _ref;
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('breadcrumb');
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("li", {
|
|
className: `${prefixCls}-separator`,
|
|
"aria-hidden": "true"
|
|
}, children === '' ? children : children || '/');
|
|
};
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItemRender.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
function getBreadcrumbName(route, params) {
|
|
if (route.title === undefined || route.title === null) {
|
|
return null;
|
|
}
|
|
const paramsKeys = Object.keys(params).join('|');
|
|
return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
|
|
}
|
|
function renderItem(prefixCls, item, children, href) {
|
|
if (children === null || children === undefined) {
|
|
return null;
|
|
}
|
|
const {
|
|
className,
|
|
onClick
|
|
} = item,
|
|
restItem = __rest(item, ["className", "onClick"]);
|
|
const passedProps = Object.assign(Object.assign({}, (0,pickAttrs/* default */.Z)(restItem, {
|
|
data: true,
|
|
aria: true
|
|
})), {
|
|
onClick
|
|
});
|
|
if (href !== undefined) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("a", Object.assign({}, passedProps, {
|
|
className: _classnames_2_3_2_classnames_default()(`${prefixCls}-link`, className),
|
|
href: href
|
|
}), children);
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, passedProps, {
|
|
className: _classnames_2_3_2_classnames_default()(`${prefixCls}-link`, className)
|
|
}), children);
|
|
}
|
|
function useItemRender(prefixCls, itemRender) {
|
|
const mergedItemRender = (item, params, routes, path, href) => {
|
|
if (itemRender) {
|
|
return itemRender(item, params, routes, path);
|
|
}
|
|
const name = getBreadcrumbName(item, params);
|
|
return renderItem(prefixCls, item, name, href);
|
|
};
|
|
return mergedItemRender;
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbItem.js
|
|
"use client";
|
|
|
|
var BreadcrumbItem_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const InternalBreadcrumbItem = props => {
|
|
const {
|
|
prefixCls,
|
|
separator = '/',
|
|
children,
|
|
menu,
|
|
overlay,
|
|
dropdownProps,
|
|
href
|
|
} = props;
|
|
// Warning for deprecated usage
|
|
if (false) {}
|
|
/** If overlay is have Wrap a Dropdown */
|
|
const renderBreadcrumbNode = breadcrumbItem => {
|
|
if (menu || overlay) {
|
|
const mergeDropDownProps = Object.assign({}, dropdownProps);
|
|
if (menu) {
|
|
const _a = menu || {},
|
|
{
|
|
items
|
|
} = _a,
|
|
menuProps = BreadcrumbItem_rest(_a, ["items"]);
|
|
mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
|
|
items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
|
|
var {
|
|
key,
|
|
title,
|
|
label,
|
|
path
|
|
} = _a,
|
|
itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
|
|
let mergedLabel = label !== null && label !== void 0 ? label : title;
|
|
if (path) {
|
|
mergedLabel = /*#__PURE__*/_react_17_0_2_react.createElement("a", {
|
|
href: `${href}${path}`
|
|
}, mergedLabel);
|
|
}
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
key: key !== null && key !== void 0 ? key : index,
|
|
label: mergedLabel
|
|
});
|
|
})
|
|
});
|
|
} else if (overlay) {
|
|
mergeDropDownProps.overlay = overlay;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({
|
|
placement: "bottom"
|
|
}, mergeDropDownProps), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${prefixCls}-overlay-link`
|
|
}, breadcrumbItem, /*#__PURE__*/_react_17_0_2_react.createElement(DownOutlined/* default */.Z, null)));
|
|
}
|
|
return breadcrumbItem;
|
|
};
|
|
// wrap to dropDown
|
|
const link = renderBreadcrumbNode(children);
|
|
if (link !== undefined && link !== null) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("li", null, link), separator && /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
|
|
}
|
|
return null;
|
|
};
|
|
const BreadcrumbItem = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
children,
|
|
href
|
|
} = props,
|
|
restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
|
|
prefixCls: prefixCls
|
|
}), renderItem(prefixCls, restProps, children, href));
|
|
};
|
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/style/index.js
|
|
|
|
|
|
const genBreadcrumbStyle = token => {
|
|
const {
|
|
componentCls,
|
|
iconCls
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
color: token.itemColor,
|
|
fontSize: token.fontSize,
|
|
[iconCls]: {
|
|
fontSize: token.iconFontSize
|
|
},
|
|
ol: {
|
|
display: 'flex',
|
|
flexWrap: 'wrap',
|
|
margin: 0,
|
|
padding: 0,
|
|
listStyle: 'none'
|
|
},
|
|
a: Object.assign({
|
|
color: token.linkColor,
|
|
transition: `color ${token.motionDurationMid}`,
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
borderRadius: token.borderRadiusSM,
|
|
height: token.lineHeight * token.fontSize,
|
|
display: 'inline-block',
|
|
marginInline: -token.marginXXS,
|
|
'&:hover': {
|
|
color: token.linkHoverColor,
|
|
backgroundColor: token.colorBgTextHover
|
|
}
|
|
}, (0,style/* genFocusStyle */.Qy)(token)),
|
|
[`li:last-child`]: {
|
|
color: token.lastItemColor
|
|
},
|
|
[`${componentCls}-separator`]: {
|
|
marginInline: token.separatorMargin,
|
|
color: token.separatorColor
|
|
},
|
|
[`${componentCls}-link`]: {
|
|
[`
|
|
> ${iconCls} + span,
|
|
> ${iconCls} + a
|
|
`]: {
|
|
marginInlineStart: token.marginXXS
|
|
}
|
|
},
|
|
[`${componentCls}-overlay-link`]: {
|
|
borderRadius: token.borderRadiusSM,
|
|
height: token.lineHeight * token.fontSize,
|
|
display: 'inline-block',
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
marginInline: -token.marginXXS,
|
|
[`> ${iconCls}`]: {
|
|
marginInlineStart: token.marginXXS,
|
|
fontSize: token.fontSizeIcon
|
|
},
|
|
'&:hover': {
|
|
color: token.linkHoverColor,
|
|
backgroundColor: token.colorBgTextHover,
|
|
a: {
|
|
color: token.linkHoverColor
|
|
}
|
|
},
|
|
a: {
|
|
'&:hover': {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
}
|
|
},
|
|
// rtl style
|
|
[`&${token.componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var breadcrumb_style = ((0,genComponentStyleHook/* default */.Z)('Breadcrumb', token => {
|
|
const BreadcrumbToken = (0,statistic/* merge */.TS)(token, {});
|
|
return [genBreadcrumbStyle(BreadcrumbToken)];
|
|
}, token => ({
|
|
itemColor: token.colorTextDescription,
|
|
lastItemColor: token.colorText,
|
|
iconFontSize: token.fontSize,
|
|
linkColor: token.colorTextDescription,
|
|
linkHoverColor: token.colorText,
|
|
separatorColor: token.colorTextDescription,
|
|
separatorMargin: token.marginXS
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItems.js
|
|
var useItems_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
function route2item(route) {
|
|
const {
|
|
breadcrumbName,
|
|
children
|
|
} = route,
|
|
rest = useItems_rest(route, ["breadcrumbName", "children"]);
|
|
const clone = Object.assign({
|
|
title: breadcrumbName
|
|
}, rest);
|
|
if (children) {
|
|
clone.menu = {
|
|
items: children.map(_a => {
|
|
var {
|
|
breadcrumbName: itemBreadcrumbName
|
|
} = _a,
|
|
itemProps = useItems_rest(_a, ["breadcrumbName"]);
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
title: itemBreadcrumbName
|
|
});
|
|
})
|
|
};
|
|
}
|
|
return clone;
|
|
}
|
|
function useItems(items, routes) {
|
|
return (0,_react_17_0_2_react.useMemo)(() => {
|
|
if (items) {
|
|
return items;
|
|
}
|
|
if (routes) {
|
|
return routes.map(route2item);
|
|
}
|
|
return null;
|
|
}, [items, routes]);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/Breadcrumb.js
|
|
"use client";
|
|
|
|
var Breadcrumb_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getPath = (params, path) => {
|
|
if (path === undefined) {
|
|
return path;
|
|
}
|
|
let mergedPath = (path || '').replace(/^\//, '');
|
|
Object.keys(params).forEach(key => {
|
|
mergedPath = mergedPath.replace(`:${key}`, params[key]);
|
|
});
|
|
return mergedPath;
|
|
};
|
|
const Breadcrumb = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
separator = '/',
|
|
style,
|
|
className,
|
|
rootClassName,
|
|
routes: legacyRoutes,
|
|
items,
|
|
children,
|
|
itemRender,
|
|
params = {}
|
|
} = props,
|
|
restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
breadcrumb
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
let crumbs;
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
const [wrapSSR, hashId] = breadcrumb_style(prefixCls);
|
|
const mergedItems = useItems(items, legacyRoutes);
|
|
if (false) {}
|
|
const mergedItemRender = useItemRender(prefixCls, itemRender);
|
|
if (mergedItems && mergedItems.length > 0) {
|
|
// generated by route
|
|
const paths = [];
|
|
const itemRenderRoutes = items || legacyRoutes;
|
|
crumbs = mergedItems.map((item, index) => {
|
|
const {
|
|
path,
|
|
key,
|
|
type,
|
|
menu,
|
|
overlay,
|
|
onClick,
|
|
className: itemClassName,
|
|
separator: itemSeparator,
|
|
dropdownProps
|
|
} = item;
|
|
const mergedPath = getPath(params, path);
|
|
if (mergedPath !== undefined) {
|
|
paths.push(mergedPath);
|
|
}
|
|
const mergedKey = key !== null && key !== void 0 ? key : index;
|
|
if (type === 'separator') {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, {
|
|
key: mergedKey
|
|
}, itemSeparator);
|
|
}
|
|
const itemProps = {};
|
|
const isLastItem = index === mergedItems.length - 1;
|
|
if (menu) {
|
|
itemProps.menu = menu;
|
|
} else if (overlay) {
|
|
itemProps.overlay = overlay;
|
|
}
|
|
let {
|
|
href
|
|
} = item;
|
|
if (paths.length && mergedPath !== undefined) {
|
|
href = `#/${paths.join('/')}`;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({
|
|
key: mergedKey
|
|
}, itemProps, (0,pickAttrs/* default */.Z)(item, {
|
|
data: true,
|
|
aria: true
|
|
}), {
|
|
className: itemClassName,
|
|
dropdownProps: dropdownProps,
|
|
href: href,
|
|
separator: isLastItem ? '' : separator,
|
|
onClick: onClick,
|
|
prefixCls: prefixCls
|
|
}), mergedItemRender(item, params, itemRenderRoutes, paths, href));
|
|
});
|
|
} else if (children) {
|
|
const childrenLength = (0,toArray/* default */.Z)(children).length;
|
|
crumbs = (0,toArray/* default */.Z)(children).map((element, index) => {
|
|
if (!element) {
|
|
return element;
|
|
}
|
|
// =================== Warning =====================
|
|
if (false) {}
|
|
false ? 0 : void 0;
|
|
const isLastItem = index === childrenLength - 1;
|
|
return (0,reactNode/* cloneElement */.Tm)(element, {
|
|
separator: isLastItem ? '' : separator,
|
|
key: index
|
|
});
|
|
});
|
|
}
|
|
const breadcrumbClassName = _classnames_2_3_2_classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, className, rootClassName, hashId);
|
|
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("nav", Object.assign({
|
|
className: breadcrumbClassName,
|
|
style: mergedStyle
|
|
}, restProps), /*#__PURE__*/_react_17_0_2_react.createElement("ol", null, crumbs)));
|
|
};
|
|
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
|
|
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
|
|
if (false) {}
|
|
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js
|
|
"use client";
|
|
|
|
|
|
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
|
|
|
|
/***/ })
|
|
|
|
}]); |