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.
377 lines
13 KiB
377 lines
13 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[27496],{
|
|
|
|
/***/ 97315:
|
|
/*!************************************************************************!*\
|
|
!*** ./src/pages/virtualSpaces/Lists/CourseData/index.tsx + 1 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 */ CourseData; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
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__(88271);
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/CourseData/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var CourseDatamodules = ({"flex_box_center":"flex_box_center____BAJL","flex_space_between":"flex_space_between___nKXPB","flex_box_vertical_center":"flex_box_vertical_center___IZCYi","flex_box_center_end":"flex_box_center_end___POJwV","flex_box_column":"flex_box_column___H9ll4","all":"all___FSE3O","TitleStyle":"TitleStyle___OMeOf","content":"content___kn9Lq","contentTile":"contentTile___YW6lk","contentLeft":"contentLeft___v8xJk","yearStyle":"yearStyle___FpIPP","schoolStyle":"schoolStyle___X_Gz8","roleStyle":"roleStyle___XI1a9","contentRight":"contentRight___nb0C7","sexStyle":"sexStyle___eHuTn","eduStyle":"eduStyle___Ou6YP"});
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(82710);
|
|
// EXTERNAL MODULE: ./node_modules/_echarts-for-react@2.0.16@echarts-for-react/lib/index.js
|
|
var lib = __webpack_require__(42441);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/CourseData/index.tsx
|
|
|
|
|
|
|
|
|
|
var _excluded = ["classroomList", "virtualSpaces", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var WorkplacePage = function WorkplacePage(_ref) {
|
|
var classroomList = _ref.classroomList,
|
|
virtualSpaces = _ref.virtualSpaces,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var httpParams = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)({}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
data = _useState2[0],
|
|
setData = _useState2[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData();
|
|
}, []);
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(httpParams === null || httpParams === void 0 ? void 0 : httpParams.virtual_spacesId, "/member_statistics.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
setData(res === null || res === void 0 ? void 0 : res.data);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getYearOption = function getYearOption() {
|
|
var _data$ages, _data$ages2;
|
|
return {
|
|
color: ['#6687F2'],
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
type: 'shadow'
|
|
}
|
|
},
|
|
grid: {
|
|
left: '1%',
|
|
right: '4%',
|
|
bottom: '10%',
|
|
top: '10%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
name: '',
|
|
type: 'category',
|
|
data: data === null || data === void 0 || (_data$ages = data.ages) === null || _data$ages === void 0 ? void 0 : _data$ages.key
|
|
// axisLabel: {//坐标轴刻度标签的相关设置。
|
|
// interval: 0,
|
|
// rotate: "45"
|
|
// },
|
|
}],
|
|
yAxis: [{
|
|
name: '',
|
|
type: 'value'
|
|
}],
|
|
series: [{
|
|
name: '年龄段',
|
|
type: 'bar',
|
|
barWidth: '40%',
|
|
data: data === null || data === void 0 || (_data$ages2 = data.ages) === null || _data$ages2 === void 0 ? void 0 : _data$ages2.value
|
|
}]
|
|
};
|
|
};
|
|
var getShoolOption = function getShoolOption() {
|
|
var _data$schools, _data$schools2;
|
|
return {
|
|
color: ['#6687F2'],
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
type: 'shadow'
|
|
}
|
|
},
|
|
grid: {
|
|
left: '1%',
|
|
right: '4%',
|
|
bottom: '1%',
|
|
top: '10%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
name: '',
|
|
type: 'category',
|
|
data: data === null || data === void 0 || (_data$schools = data.schools) === null || _data$schools === void 0 ? void 0 : _data$schools.key,
|
|
axisLabel: {
|
|
//坐标轴刻度标签的相关设置。
|
|
interval: 0,
|
|
rotate: "45"
|
|
}
|
|
}],
|
|
yAxis: [{
|
|
name: '',
|
|
type: 'value'
|
|
}],
|
|
series: [{
|
|
name: '院校',
|
|
type: 'bar',
|
|
barWidth: '40%',
|
|
data: data === null || data === void 0 || (_data$schools2 = data.schools) === null || _data$schools2 === void 0 ? void 0 : _data$schools2.value
|
|
}]
|
|
};
|
|
};
|
|
var getRoleOption = function getRoleOption() {
|
|
var _data$technical_title, _data$technical_title2;
|
|
return {
|
|
color: ['#6687F2'],
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
type: 'shadow'
|
|
}
|
|
},
|
|
grid: {
|
|
left: '1%',
|
|
right: '4%',
|
|
bottom: '10%',
|
|
top: '10%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
name: '',
|
|
type: 'category',
|
|
data: data === null || data === void 0 || (_data$technical_title = data.technical_title) === null || _data$technical_title === void 0 ? void 0 : _data$technical_title.key
|
|
// axisLabel: {//坐标轴刻度标签的相关设置。
|
|
// interval: 0,
|
|
// rotate: "45"
|
|
// },
|
|
}],
|
|
yAxis: [{
|
|
name: '',
|
|
type: 'value'
|
|
}],
|
|
series: [{
|
|
name: '职称',
|
|
type: 'bar',
|
|
barWidth: '40%',
|
|
data: data === null || data === void 0 || (_data$technical_title2 = data.technical_title) === null || _data$technical_title2 === void 0 ? void 0 : _data$technical_title2.value
|
|
}]
|
|
};
|
|
};
|
|
var getSexOption = function getSexOption() {
|
|
var _data$gender, _data$gender2;
|
|
return {
|
|
tooltip: {
|
|
trigger: 'item'
|
|
},
|
|
legend: {
|
|
bottom: '8%',
|
|
left: 'center'
|
|
},
|
|
series: [{
|
|
name: '性别',
|
|
type: 'pie',
|
|
radius: ['40%', '60%'],
|
|
center: ['50%', '40%'],
|
|
// avoidLabelOverlap: false,
|
|
label: {
|
|
show: false
|
|
},
|
|
data: [{
|
|
name: '男',
|
|
value: data === null || data === void 0 || (_data$gender = data.gender) === null || _data$gender === void 0 ? void 0 : _data$gender.A
|
|
}, {
|
|
name: '女',
|
|
value: data === null || data === void 0 || (_data$gender2 = data.gender) === null || _data$gender2 === void 0 ? void 0 : _data$gender2.B
|
|
}],
|
|
itemStyle: {
|
|
normal: {
|
|
color: function color(colors) {
|
|
var colorList = ['#FC8282', '#6687F2'];
|
|
return colorList[colors.dataIndex];
|
|
}
|
|
}
|
|
}
|
|
}]
|
|
};
|
|
};
|
|
var getEduOption = function getEduOption() {
|
|
var _data$educational_bac, _data$educational_bac2, _data$educational_bac3;
|
|
return {
|
|
tooltip: {
|
|
trigger: 'item'
|
|
},
|
|
legend: {
|
|
bottom: '8%',
|
|
left: 'center'
|
|
},
|
|
series: [{
|
|
name: '学历',
|
|
type: 'pie',
|
|
radius: ['40%', '60%'],
|
|
center: ['50%', '40%'],
|
|
// avoidLabelOverlap: false,
|
|
label: {
|
|
show: false
|
|
},
|
|
data: [{
|
|
name: '本科',
|
|
value: data === null || data === void 0 || (_data$educational_bac = data.educational_background) === null || _data$educational_bac === void 0 ? void 0 : _data$educational_bac.A
|
|
}, {
|
|
name: '硕士研究生',
|
|
value: data === null || data === void 0 || (_data$educational_bac2 = data.educational_background) === null || _data$educational_bac2 === void 0 ? void 0 : _data$educational_bac2.B
|
|
}, {
|
|
name: '博生研究生',
|
|
value: data === null || data === void 0 || (_data$educational_bac3 = data.educational_background) === null || _data$educational_bac3 === void 0 ? void 0 : _data$educational_bac3.C
|
|
}],
|
|
itemStyle: {
|
|
normal: {
|
|
color: function color(colors) {
|
|
var colorList = ['#36CBCB', '#56D57C', '#FAD337'];
|
|
return colorList[colors.dataIndex];
|
|
}
|
|
}
|
|
}
|
|
}]
|
|
};
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.all,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: CourseDatamodules.TitleStyle,
|
|
children: "\u57FA\u7840\u6570\u636E"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.contentLeft,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.yearStyle,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: CourseDatamodules.contentTile,
|
|
children: "\u5E74\u9F84\u6BB5"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getYearOption(),
|
|
style: {
|
|
height: 230,
|
|
width: 570
|
|
}
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.schoolStyle,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: CourseDatamodules.contentTile,
|
|
children: "\u9662\u6821"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getShoolOption(),
|
|
style: {
|
|
height: 250,
|
|
width: 570
|
|
}
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.roleStyle,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: CourseDatamodules.contentTile,
|
|
children: "\u804C\u79F0"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getRoleOption(),
|
|
style: {
|
|
height: 230,
|
|
width: 570
|
|
}
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.contentRight,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.sexStyle,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: CourseDatamodules.contentTile,
|
|
children: "\u6027\u522B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getSexOption(),
|
|
style: {
|
|
height: 220,
|
|
width: 270
|
|
}
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: CourseDatamodules.eduStyle,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: CourseDatamodules.contentTile,
|
|
children: "\u5B66\u5386"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: getEduOption(),
|
|
style: {
|
|
height: 220,
|
|
width: 270
|
|
}
|
|
})]
|
|
})]
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var CourseData = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var loading = _ref3.loading,
|
|
user = _ref3.user,
|
|
virtualSpaces = _ref3.virtualSpaces;
|
|
return {
|
|
loading: loading.effects,
|
|
user: user,
|
|
virtualSpaces: virtualSpaces
|
|
};
|
|
})(WorkplacePage));
|
|
|
|
/***/ })
|
|
|
|
}]); |