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.
365 lines
14 KiB
365 lines
14 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[60533],{
|
|
|
|
/***/ 29544:
|
|
/*!**********************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Video/Statistics/Detail/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 */ Detail; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// 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/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(82338);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(48938);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules
|
|
var dropdown = __webpack_require__(38854);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(1710);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(58421);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules
|
|
var LeftOutlined = __webpack_require__(33853);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Video/Statistics/Detail/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___Ox04Y","flex_space_between":"flex_space_between___C6xrA","flex_box_vertical_center":"flex_box_vertical_center___ND_1v","flex_box_center_end":"flex_box_center_end___YRYaf","flex_box_column":"flex_box_column___DUfSG","title":"title___kEuJZ","statisticsWrp":"statisticsWrp___VC_CA","infoWrp":"infoWrp___y79ks","warp_task_hide":"warp_task_hide___MGcfK","task_hide":"task_hide___Qc3Yt"});
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Video/Statistics/Detail/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var video = _ref.video,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
classroomList = _ref.classroomList,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()({}, (0,_umi_production_exports.useParams)())),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
searchParams = _useSearchParams2[0];
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
sortObj = _useState4[0],
|
|
setSortObj = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
studentIdSort = _useState6[0],
|
|
setStudentIdSort = _useState6[1];
|
|
var actionTabs = classroomList.actionTabs,
|
|
courseGroups = classroomList.courseGroups,
|
|
allCourseGroups = classroomList.allCourseGroups;
|
|
var newVideoStatisticsList = video.newVideoStatisticsList,
|
|
videoStatistics = video.videoStatistics;
|
|
//定义数组 后期好维护
|
|
var statusmap = [{
|
|
type: '',
|
|
name: '全部'
|
|
}, {
|
|
type: 'finished',
|
|
name: '已看完'
|
|
}, {
|
|
type: 'unfinished',
|
|
name: '未看完'
|
|
}, {
|
|
type: 'unopened',
|
|
name: '未观看'
|
|
}];
|
|
//选中的状态
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
status = _useState8[0],
|
|
setStatus = _useState8[1];
|
|
//选中的分班id
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
groupsid = _useState10[0],
|
|
setGroupsid = _useState10[1];
|
|
params['category'] = searchParams.get("category_id");
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
dispatch({
|
|
type: 'video/getNewVideoStatisticsList',
|
|
payload: objectSpread2_default()({}, params)
|
|
});
|
|
|
|
//获取分班信息
|
|
dispatch({
|
|
type: 'classroomList/getAllCourseGroup',
|
|
payload: objectSpread2_default()({}, params)
|
|
});
|
|
}, [params.coursesId]);
|
|
var columns = [{
|
|
title: '序号',
|
|
dataIndex: 'name',
|
|
render: function render(text, record, index) {
|
|
return 20 * ((params.page || 1) - 1) + index + 1;
|
|
}
|
|
}, {
|
|
title: '用户',
|
|
dataIndex: 'user_name'
|
|
}, {
|
|
title: '是否看完',
|
|
dataIndex: 'is_finished',
|
|
render: function render(text) {
|
|
if (text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-green",
|
|
children: "\u662F"
|
|
});
|
|
} else {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-red",
|
|
children: "\u5426"
|
|
});
|
|
}
|
|
}
|
|
}, {
|
|
title: '观看次数',
|
|
dataIndex: 'feq',
|
|
sortOrder: sortObj['feq'],
|
|
sortDirections: ['descend', 'ascend'],
|
|
sorter: function sorter(a, b) {
|
|
return a.feq - b.feq;
|
|
},
|
|
render: function render(text) {
|
|
return text || '--';
|
|
}
|
|
}, {
|
|
title: '观看时长',
|
|
dataIndex: 'total_duration',
|
|
sortOrder: sortObj['total_duration'],
|
|
sortDirections: ['descend', 'ascend'],
|
|
sorter: function sorter(a, b) {
|
|
return a.total_duration - b.total_duration;
|
|
},
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text && text !== '--' ? (0,util/* toTimeFormat */.li)(text) : "--"
|
|
});
|
|
}
|
|
}, {
|
|
title: '最早观看时间',
|
|
dataIndex: 'start_at',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '最晚观看时间',
|
|
dataInex: 'end_at',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.end_at || '--'
|
|
});
|
|
}
|
|
}];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Detailmodules.bg,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: Detailmodules.infoWrp,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
flex: '1'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(LeftOutlined/* default */.Z, {
|
|
className: "current mr10 font16",
|
|
onClick: function onClick() {
|
|
return _umi_production_exports.history.back();
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
className: "font16",
|
|
children: searchParams.get("title")
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
placement: "bottomCenter",
|
|
dropdownRender: function dropdownRender() {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
background: '#fff',
|
|
padding: '0px 10px',
|
|
cursor: 'pointer',
|
|
width: '100px',
|
|
textAlign: 'center'
|
|
},
|
|
children: statusmap === null || statusmap === void 0 ? void 0 : statusmap.map(function (item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Detailmodules.task_hide,
|
|
style: {
|
|
color: status === item.type ? '#0152d9' : 'initial'
|
|
},
|
|
onClick: function onClick() {
|
|
setStatus(item.type);
|
|
params.page = 1;
|
|
setParams(objectSpread2_default()({}, params));
|
|
dispatch({
|
|
type: 'video/getNewVideoStatisticsList',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
status: item.type,
|
|
group_id: groupsid
|
|
})
|
|
});
|
|
},
|
|
children: item.name
|
|
});
|
|
})
|
|
});
|
|
},
|
|
arrow: true,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginRight: '40px',
|
|
cursor: 'default'
|
|
},
|
|
children: "\u89C2\u770B\u72B6\u6001"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
placement: "bottomCenter",
|
|
dropdownRender: function dropdownRender() {
|
|
var _concat;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.warp_task_hide,
|
|
children: (_concat = [{
|
|
id: '',
|
|
name: "全部"
|
|
}, {
|
|
id: 0,
|
|
name: "未分班"
|
|
}].concat((allCourseGroups === null || allCourseGroups === void 0 ? void 0 : allCourseGroups.course_groups) || [])) === null || _concat === void 0 ? void 0 : _concat.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: item.name,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Detailmodules.task_hide,
|
|
style: {
|
|
color: groupsid === item.id ? '#0152d9' : 'initial'
|
|
},
|
|
onClick: function onClick() {
|
|
setGroupsid(item.id);
|
|
params.page = 1;
|
|
setParams(objectSpread2_default()({}, params));
|
|
dispatch({
|
|
type: 'video/getNewVideoStatisticsList',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
group_id: item.id,
|
|
status: status
|
|
})
|
|
});
|
|
},
|
|
children: item.name
|
|
})
|
|
});
|
|
})
|
|
});
|
|
},
|
|
arrow: true,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
cursor: 'default'
|
|
},
|
|
children: "\u5206\u73ED"
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
className: "mt20",
|
|
loading: loading['video/getNewVideoStatisticsList'],
|
|
hideOnSinglePage: true,
|
|
pagination: false,
|
|
dataSource: (newVideoStatisticsList === null || newVideoStatisticsList === void 0 ? void 0 : newVideoStatisticsList.data) || [],
|
|
columns: columns,
|
|
onChange: function onChange(a, b, c) {
|
|
sortObj = {};
|
|
if (c.order === undefined) {
|
|
// sortObj[c.field] = 'descend';
|
|
// switch (c.field) {
|
|
// case 'student_id':
|
|
// setStudentIdSort('descend');
|
|
// params['order'] = c.field + '-desc';
|
|
// break;
|
|
// }
|
|
params['order'] = '';
|
|
} else {
|
|
params['order'] = c.field + '-' + c.order.replace("end", "");
|
|
sortObj[c.field] = c.order;
|
|
}
|
|
setSortObj(objectSpread2_default()({}, sortObj));
|
|
dispatch({
|
|
type: 'video/getNewVideoStatisticsList',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
status: status,
|
|
group_id: groupsid
|
|
})
|
|
});
|
|
}
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mb50 mt30",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showSizeChanger: false,
|
|
onChange: function onChange(e) {
|
|
params['page'] = e;
|
|
dispatch({
|
|
type: 'video/getNewVideoStatisticsList',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
status: status,
|
|
group_id: groupsid,
|
|
page: e
|
|
})
|
|
});
|
|
},
|
|
current: params.page || 1,
|
|
defaultPageSize: 20,
|
|
hideOnSinglePage: true,
|
|
total: newVideoStatisticsList === null || newVideoStatisticsList === void 0 ? void 0 : newVideoStatisticsList.count
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Detail = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var video = _ref2.video,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting,
|
|
classroomList = _ref2.classroomList;
|
|
return {
|
|
video: video,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects,
|
|
classroomList: classroomList
|
|
};
|
|
})(ShixunsListPage));
|
|
|
|
/***/ })
|
|
|
|
}]); |