autoUpdataFile

dev_local_v9_xingongda
eduauto 2 years ago
parent 5e3ff90f23
commit a5e3522453

@ -96,7 +96,13 @@ var _react_17_0_2_react = __webpack_require__(59301);
var _umi_production_exports = __webpack_require__(3634);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Overview/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Overviewmodules = ({"Onerow":"Onerow___Mp88y","MultiLine":"MultiLine___yp3BS","TitleStyle":"TitleStyle___c6H_a","Notify":"Notify___y8K1c","PathsBg":"PathsBg___XAFJa","PathsBgTitle":"PathsBgTitle___JnD95","PathsBgNum":"PathsBgNum___moQMD","TopItemNum":"TopItemNum___eggbY","TableStyle":"TableStyle___aBpvr","DivInit":"DivInit___wdeuk","StudentChart":"StudentChart___ZEpd8","StudentChartItem":"StudentChartItem___qjJfe","StudentChartItemPh":"StudentChartItemPh___MlJbp","StudentChartItemName":"StudentChartItemName___YZBp3","StudentChartItemNum":"StudentChartItemNum___ddVoW","StudentChartItemUpdow":"StudentChartItemUpdow___sXby3","TeacherChart":"TeacherChart___UkPLQ","TeacherChartItem":"TeacherChartItem___T5wG5","TeacherChartItemPh":"TeacherChartItemPh___LSavP","TeacherChartItemName":"TeacherChartItemName___yxOVy","TeacherChartItemNum":"TeacherChartItemNum___j4L15","TeacherChartItemUpdow":"TeacherChartItemUpdow___WlRN8","ChartStyle":"ChartStyle___LQS40","PopularityChart":"PopularityChart___CgDcE","HotChart":"HotChart___iv3uw","ClassChart":"ClassChart___rWwfR","ChartDiv":"ChartDiv___FijdG","ChartDivItem":"ChartDivItem___qexIg","ChartDivItemph":"ChartDivItemph___v3VLp","ChartDivItemName":"ChartDivItemName___lz4q4","ChartDivItemNum":"ChartDivItemNum___md18j"});
/* harmony default export */ var Overviewmodules = ({"Onerow":"Onerow___Mp88y","MultiLine":"MultiLine___yp3BS","TitleStyle":"TitleStyle___c6H_a","tabs":"tabs___CXkI8","operatingActive":"operatingActive___S2NFS","Notify":"Notify___y8K1c","PathsBg":"PathsBg___XAFJa","PathsBgTitle":"PathsBgTitle___JnD95","PathsBgNum":"PathsBgNum___moQMD","TopItemNum":"TopItemNum___eggbY","TableStyle":"TableStyle___aBpvr","DivInit":"DivInit___wdeuk","StudentChart":"StudentChart___ZEpd8","StudentChartItem":"StudentChartItem___qjJfe","StudentChartItemPh":"StudentChartItemPh___MlJbp","StudentChartItemName":"StudentChartItemName___YZBp3","StudentChartItemNum":"StudentChartItemNum___ddVoW","StudentChartItemUpdow":"StudentChartItemUpdow___sXby3","TeacherChart":"TeacherChart___UkPLQ","TeacherChartItem":"TeacherChartItem___T5wG5","TeacherChartItemPh":"TeacherChartItemPh___LSavP","TeacherChartItemName":"TeacherChartItemName___yxOVy","TeacherChartItemNum":"TeacherChartItemNum___j4L15","TeacherChartItemUpdow":"TeacherChartItemUpdow___WlRN8","ChartStyle":"ChartStyle___LQS40","PopularityChart":"PopularityChart___CgDcE","HotChart":"HotChart___iv3uw","ClassChart":"ClassChart___rWwfR","ChartDiv":"ChartDiv___FijdG","ChartDivItem":"ChartDivItem___qexIg","ChartDivItemph":"ChartDivItemph___v3VLp","ChartDivItemName":"ChartDivItemName___lz4q4","ChartDivItemNum":"ChartDivItemNum___md18j"});
// 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/select/index.js
var es_select = __webpack_require__(57809);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
var date_picker = __webpack_require__(52409);
// 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/tooltip/index.js + 3 modules
@ -187,6 +193,12 @@ var _excluded = ["index"],
var ToNumW = function ToNumW(value) {
return value / 10000 > 1 ? "".concat(Math.round(value / 10000 * 100) / 100, "w") : value;
};
var toWeek = (/* unused pure expression or super */ null && (['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '二十', '二十一', '二十二', '二十三', '二十四', '二十五', '二十六', '二十七', '二十八', '二十九', '三十']));
var toPicker = {
'1': 'day',
'2': 'week',
'3': 'month'
};
var ChartImg = function ChartImg(_ref) {
var index = _ref.index,
props = objectWithoutProperties_default()(_ref, _excluded);
@ -194,6 +206,9 @@ var ChartImg = function ChartImg(_ref) {
src: index == 1 ? ph1_namespaceObject : index == 2 ? ph2_namespaceObject : ph3_namespaceObject
}, props));
};
var TabPane = tabs/* default */.Z.TabPane;
var Option = es_select["default"].Option;
var RangePicker = date_picker["default"].RangePicker;
var ChartDiv = function ChartDiv(_ref2) {
var data = _ref2.data;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@ -239,7 +254,8 @@ var Page = function Page(_ref3) {
var SHeader = classroomsOverview.SHeader,
SBody = classroomsOverview.SBody,
RankList = classroomsOverview.RankList,
CourseUseInfos = classroomsOverview.CourseUseInfos;
CourseUseInfos = classroomsOverview.CourseUseInfos,
StatInfo = classroomsOverview.StatInfo;
var _useState = (0,_react_17_0_2_react.useState)({
page: 1,
limit: 10
@ -247,6 +263,25 @@ var Page = function Page(_ref3) {
_useState2 = slicedToArray_default()(_useState, 2),
urlData = _useState2[0],
setUrlData = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)({
start_time: dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year()).startOf('year').valueOf()).format('YYYY-MM-DD'),
end_time: dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year() + 1).startOf('year').valueOf()).format('YYYY-MM-DD'),
data_type: "Course"
}),
_useState4 = slicedToArray_default()(_useState3, 2),
statParams = _useState4[0],
setStatParams = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)({
start_time: dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year()).startOf('year')),
end_time: dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year() + 1).startOf('year'))
}),
_useState6 = slicedToArray_default()(_useState5, 2),
defauleDate = _useState6[0],
setDefaultDate = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(toPicker["".concat(StatInfo === null || StatInfo === void 0 ? void 0 : StatInfo.time_type)] || "year"),
_useState8 = slicedToArray_default()(_useState7, 2),
picker = _useState8[0],
setPicker = _useState8[1];
var ItemNum = [{
name: "发布作业总数",
num: (0,util/* toWNumber */.lF)((SHeader === null || SHeader === void 0 ? void 0 : SHeader.work_size) || 0),
@ -435,31 +470,31 @@ var Page = function Page(_ref3) {
}
},
series: [{
data: [{
data: [(SBody === null || SBody === void 0 ? void 0 : SBody.shixun_homework_size) > 0 && {
value: SBody === null || SBody === void 0 ? void 0 : SBody.shixun_homework_size,
name: "课堂实验",
itemStyle: {
color: "#00D696"
}
}, {
}, (SBody === null || SBody === void 0 ? void 0 : SBody.group_homework_size) > 0 && {
value: SBody === null || SBody === void 0 ? void 0 : SBody.group_homework_size,
name: "分组作业",
itemStyle: {
color: "#6C96F3"
}
}, {
}, (SBody === null || SBody === void 0 ? void 0 : SBody.common_homework_size) > 0 && {
value: SBody === null || SBody === void 0 ? void 0 : SBody.common_homework_size,
name: "图文作业",
itemStyle: {
color: "#FFB63B"
}
}, {
}, (SBody === null || SBody === void 0 ? void 0 : SBody.program_homework_size) > 0 && {
value: SBody === null || SBody === void 0 ? void 0 : SBody.program_homework_size,
name: "编程作业",
itemStyle: {
color: "#F9D699"
}
}, {
}, (SBody === null || SBody === void 0 ? void 0 : SBody.exercise_size) > 0 && {
value: SBody === null || SBody === void 0 ? void 0 : SBody.exercise_size,
name: "在线考试",
itemStyle: {
@ -496,25 +531,12 @@ var Page = function Page(_ref3) {
};
};
var hanleCourseOption = function hanleCourseOption() {
var _SBody$times;
// 作业发布统计
return {
title: [{
text: "作业发布统计",
textStyle: {
fontSize: 14,
color: "#282F3F"
}
}, {
text: "(展示近一周作业发布次数变化)",
left: "94px",
top: "2px",
textStyle: {
fontSize: 12,
color: "#70727E",
fontWeight: 400
}
}],
// title: [
// { text: "作业发布统计", textStyle: { fontSize: 14, color: "#282F3F" } },
// { text: "(展示近一周作业发布次数变化)", left: "94px", top: "2px", textStyle: { fontSize: 12, color: "#70727E", fontWeight: 400 } }
// ],
tooltip: {
trigger: "axis",
backgroundColor: "#fff",
@ -532,21 +554,62 @@ var Page = function Page(_ref3) {
}).join('');
}
},
legend: {
show: true,
right: 0,
itemWidth: 22,
itemHeight: 6
},
// legend: {
// show: true,
// right: 0,
// itemWidth: 22,
// itemHeight: 6,
// },
grid: {
right: 0,
bottom: "10%"
},
dataZoom: [
// 滚动条
{
start: 0,
//默认为0
end: 100 - 1500 / 31,
//默认为100
type: 'slider',
show: true,
xAxisIndex: [0],
handleSize: 0,
//滑动条的 左右2个滑动条的大小
height: 0,
//组件高度
left: '10%',
//左边的距离
right: '10%',
//右边的距离
bottom: 26,
//右边的距离
// borderColor: "#000",
// fillerColor: '#269cdb',
//borderRadius:5,
//backgroundColor: '#33384b',//两边未选中的滑动条区域的颜色
showDataShadow: false,
//是否显示数据阴影 默认auto
showDetail: false,
//即拖拽时候是否显示详细数值信息 默认true
realtime: true,
//是否实时更新
filterMode: 'filter',
zoomLock: true
},
// 拖动内容
{
type: 'inside',
show: true,
xAxisIndex: [0],
start: 0,
//默认为1
end: 100 - 1500 / 31 //默认为100
// zoomLock:true,
}],
xAxis: {
type: 'category',
data: (SBody === null || SBody === void 0 || (_SBody$times = SBody.times) === null || _SBody$times === void 0 ? void 0 : _SBody$times.map(function (item) {
return dayjs_min_default()(item).format("MM.DD");
})) || [],
data: transXAxis(),
silent: false,
axisTick: {
show: false
@ -588,10 +651,10 @@ var Page = function Page(_ref3) {
}
},
series: [{
name: '作业发布次数',
name: seriesName(),
type: 'line',
stack: 'Total',
data: (SBody === null || SBody === void 0 ? void 0 : SBody.nums) || [],
data: (StatInfo === null || StatInfo === void 0 ? void 0 : StatInfo.nums) || [],
areaStyle: {},
color: {
type: 'linear',
@ -601,15 +664,39 @@ var Page = function Page(_ref3) {
y2: 1,
colorStops: [{
offset: 0,
color: '#407BFE' // 0% 处的颜色
color: '#ED6D18' // 0% 处的颜色
}, {
offset: 1,
color: 'rgba(64, 123, 254, 0)' // 100% 处的颜色
color: '#FF9F3B' // 100% 处的颜色
}]
}
}]
};
};
var transXAxis = function transXAxis() {
var _StatInfo$times, _StatInfo$times2, _StatInfo$times3;
if ((StatInfo === null || StatInfo === void 0 ? void 0 : StatInfo.time_type) == 1) return (StatInfo === null || StatInfo === void 0 || (_StatInfo$times = StatInfo.times) === null || _StatInfo$times === void 0 ? void 0 : _StatInfo$times.map(function (item) {
return "\u7B2C".concat(item, "\u5929");
})) || [];
if ((StatInfo === null || StatInfo === void 0 ? void 0 : StatInfo.time_type) == 2) return (StatInfo === null || StatInfo === void 0 || (_StatInfo$times2 = StatInfo.times) === null || _StatInfo$times2 === void 0 ? void 0 : _StatInfo$times2.map(function (item) {
return "\u7B2C".concat(item, "\u5468");
})) || [];
if ((StatInfo === null || StatInfo === void 0 ? void 0 : StatInfo.time_type) == 3) return (StatInfo === null || StatInfo === void 0 || (_StatInfo$times3 = StatInfo.times) === null || _StatInfo$times3 === void 0 ? void 0 : _StatInfo$times3.map(function (item) {
return "\u7B2C".concat(item, "\u6708");
})) || [];
};
var seriesName = function seriesName() {
switch (statParams.data_type) {
case 'Course':
return '作业发布次数';
case 'exercise_size':
return '考试数';
case 'resource_num':
return '资源数';
case 'interact_num':
return '互动讨论数';
}
};
var getStatisticsHeader = function getStatisticsHeader() {
dispatch({
type: 'classroomsOverview/getStatisticsHeader',
@ -635,10 +722,46 @@ var Page = function Page(_ref3) {
payload: objectSpread2_default()({}, data)
});
};
var getStatData = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
dispatch({
type: 'classroomsOverview/getStatistics',
payload: objectSpread2_default()({}, statParams)
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getStatData() {
return _ref4.apply(this, arguments);
};
}();
var educationBackound = function educationBackound() {
var year = new Date().getFullYear();
return Array(31).fill({}).map(function (item, key) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: year - key,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: year - key
})
}, key);
});
};
var tabsChange = function tabsChange(key) {
statParams.data_type = key;
setStatParams(objectSpread2_default()({}, statParams));
getStatData();
};
(0,_react_17_0_2_react.useEffect)(function () {
(0,util/* setDocumentTitle */.Dk)("教学课堂概览");
getStatisticsHeader();
getStatisticsBody();
getStatData();
getRankList();
var handleHeaderAndRank = setInterval(function () {
getRankList();
@ -870,18 +993,111 @@ var Page = function Page(_ref3) {
gap: "14px 0px",
width: 493
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Overviewmodules.DivInit,
style: {
width: "100%",
height: 295
width: "100%"
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
option: hanleCourseOption(),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
className: Overviewmodules.tabs,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
className: statParams.data_type === 'Course' ? Overviewmodules.operatingActive : '',
onClick: function onClick() {
tabsChange("Course");
},
children: "\u4F5C\u4E1A\u53D1\u5E03\u7EDF\u8BA1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
className: statParams.data_type === 'exercise_size' ? Overviewmodules.operatingActive : '',
onClick: function onClick() {
tabsChange("exercise_size");
},
children: "\u8003\u8BD5\u6570\u7EDF\u8BA1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
className: statParams.data_type === 'resource_num' ? Overviewmodules.operatingActive : '',
onClick: function onClick() {
tabsChange("resource_num");
},
children: "\u8D44\u6599\u6570\u7EDF\u8BA1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
className: statParams.data_type === 'interact_num' ? Overviewmodules.operatingActive : '',
onClick: function onClick() {
tabsChange("interact_num");
},
children: "\u4E92\u52A8\u8BA8\u8BBA\u6570\u7EDF\u8BA1"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
height: "100%"
}
})
display: "flex",
alignItems: 'center',
justifyContent: "space-between"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: 99
},
defaultValue: picker,
onChange: function onChange(key) {
setPicker(key);
if (key == 'year') {
statParams.start_time = dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year()).startOf('year').valueOf()).format('YYYY-MM-DD');
statParams.end_time = dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year() + 1).startOf('year').valueOf()).format('YYYY-MM-DD');
defauleDate.start_time = dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year()).startOf('year'));
defauleDate.end_time = dayjs_min_default()(dayjs_min_default()().year(dayjs_min_default()().year() + 1).startOf('year'));
}
if (key == 'month') {
statParams.start_time = dayjs_min_default()(dayjs_min_default()().month(dayjs_min_default()().month()).startOf('month').valueOf()).format('YYYY-MM-DD');
statParams.end_time = dayjs_min_default()(dayjs_min_default()().month(dayjs_min_default()().month() + 1).startOf('month').valueOf()).format('YYYY-MM-DD');
defauleDate.start_time = dayjs_min_default()(dayjs_min_default()().month(dayjs_min_default()().month()).startOf('month'));
defauleDate.end_time = dayjs_min_default()(dayjs_min_default()().month(dayjs_min_default()().month() + 1).startOf('month'));
}
if (key == 'week') {
statParams.start_time = dayjs_min_default()(dayjs_min_default()().week(dayjs_min_default()().week()).startOf('week').valueOf()).format('YYYY-MM-DD');
statParams.end_time = dayjs_min_default()(dayjs_min_default()().week(dayjs_min_default()().week() + 1).startOf('week').valueOf()).format('YYYY-MM-DD');
defauleDate.start_time = dayjs_min_default()(dayjs_min_default()().week(dayjs_min_default()().week()).startOf('week'));
defauleDate.end_time = dayjs_min_default()(dayjs_min_default()().week(dayjs_min_default()().week() + 1).startOf('week'));
}
setStatParams(objectSpread2_default()({}, statParams));
setDefaultDate(objectSpread2_default()({}, defauleDate));
getStatData();
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "year",
children: "\u672C\u5E74"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "month",
children: "\u672C\u6708"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
value: "week",
children: "\u672C\u5468"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RangePicker, {
style: {
width: 246
},
allowClear: false,
defaultValue: [dayjs_min_default()(defauleDate.start_time, 'YYYY-MM-DD'), dayjs_min_default()(defauleDate.end_time, 'YYYY-MM-DD')],
value: [dayjs_min_default()(defauleDate.start_time, 'YYYY-MM-DD'), dayjs_min_default()(defauleDate.end_time, 'YYYY-MM-DD')],
format: 'YYYY-MM-DD',
onChange: function onChange(date, dateString) {
console.log(dateString);
statParams.start_time = dateString[0];
statParams.end_time = dateString[1];
setStatParams(objectSpread2_default()({}, statParams));
getStatData();
}
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: "100%",
height: 295
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
option: hanleCourseOption(),
style: {
height: "100%"
}
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Overviewmodules.DivInit,
style: {
@ -1025,10 +1241,10 @@ var Page = function Page(_ref3) {
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shangchuan3 font14"
}),
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var _location;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
(0,util/* downLoadFile */.FH)("", (0,util/* setUrlQuery */.NY)({
url: "".concat(env/* default */.Z.API_SERVER, "/api/course_statistics/course_use_infos.xlsx"),
@ -1038,9 +1254,9 @@ var Page = function Page(_ref3) {
}));
case 1:
case "end":
return _context.stop();
return _context2.stop();
}
}, _callee);
}, _callee2);
})),
children: "\u5BFC\u51FA"
})]
@ -1094,9 +1310,9 @@ var Page = function Page(_ref3) {
})
});
};
/* harmony default export */ var Overview = ((0,_umi_production_exports.connect)(function (_ref5) {
var loading = _ref5.loading,
classroomsOverview = _ref5.classroomsOverview;
/* harmony default export */ var Overview = ((0,_umi_production_exports.connect)(function (_ref6) {
var loading = _ref6.loading,
classroomsOverview = _ref6.classroomsOverview;
return {
loading: loading,
classroomsOverview: classroomsOverview

@ -21,6 +21,27 @@
color: #282F3F;
line-height: 22px;
}
.tabs___CXkI8 {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0;
}
.tabs___CXkI8 li {
font-size: 14px;
font-weight: 600;
color: #585E6C;
border-bottom: 2px solid transparent;
cursor: pointer;
padding-bottom: 10px;
}
.tabs___CXkI8 li:hover {
color: #ED6D18;
}
.tabs___CXkI8 li.operatingActive___S2NFS {
border-bottom: 2px solid #ED6D18;
color: #ED6D18;
}
.Notify___y8K1c {
position: absolute;
right: 0;

1434
umi.js

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save