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.
736 lines
31 KiB
736 lines
31 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[64217],{
|
|
|
|
/***/ 94912:
|
|
/*!*****************************************************************!*\
|
|
!*** ./src/components/BehavioralAnalysis/index.tsx + 1 modules ***!
|
|
\*****************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
_s: function() { return /* binding */ PhotosList; },
|
|
Uf: function() { return /* binding */ dealOncFnc; },
|
|
ZP: function() { return /* binding */ components_BehavioralAnalysis; }
|
|
});
|
|
|
|
// 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/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./src/components/BehavioralAnalysis/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var BehavioralAnalysismodules = ({"flex_box_center":"flex_box_center___swvFl","flex_space_between":"flex_space_between___AqPFV","flex_box_vertical_center":"flex_box_vertical_center___XWInJ","flex_box_center_end":"flex_box_center_end___GB61t","flex_box_column":"flex_box_column___dJnz1","analysis":"analysis___xyV_c","title":"title___DQ3VK","itemWrap":"itemWrap___vFE5r","item":"item___NjeOt","list":"list___BbMrm","wrap":"wrap___UQTTb","img":"img___tNvUo","tips":"tips___Eu4wH","footer":"footer___ZbR9W"});
|
|
// 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/_echarts-for-react@2.0.16@echarts-for-react/lib/index.js
|
|
var lib = __webpack_require__(42441);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(47015);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/components/BehavioralAnalysis/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dealOncFnc = function dealOncFnc() {
|
|
var _data$emotion, _data$focus, _data$action, _data$intention;
|
|
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
var emotion = data === null || data === void 0 || (_data$emotion = data.emotion) === null || _data$emotion === void 0 ? void 0 : _data$emotion.map(function (v) {
|
|
return objectSpread2_default()({
|
|
value: v === null || v === void 0 ? void 0 : v.rate
|
|
}, v);
|
|
});
|
|
var focus = data === null || data === void 0 || (_data$focus = data.focus) === null || _data$focus === void 0 ? void 0 : _data$focus.map(function (v) {
|
|
return objectSpread2_default()({
|
|
value: v === null || v === void 0 ? void 0 : v.rate
|
|
}, v);
|
|
});
|
|
var action = data === null || data === void 0 || (_data$action = data.action) === null || _data$action === void 0 ? void 0 : _data$action.map(function (v) {
|
|
return objectSpread2_default()({
|
|
value: v === null || v === void 0 ? void 0 : v.rate
|
|
}, v);
|
|
});
|
|
var intention = data === null || data === void 0 || (_data$intention = data.intention) === null || _data$intention === void 0 ? void 0 : _data$intention.map(function (v) {
|
|
return objectSpread2_default()({
|
|
value: v === null || v === void 0 ? void 0 : v.rate
|
|
}, v);
|
|
});
|
|
return [{
|
|
title: '表情占比',
|
|
color: ['#f7ca2e', '#4ccf71', '#3791ee', '#f9ac95', '#4f74ee', '#f0e999'],
|
|
data: emotion || []
|
|
}, {
|
|
title: '专注度占比',
|
|
color: ['#4f74ee', '#f9ac95', '#9cb5fe', '#eaa170', '#3791ee', '#a39bed'],
|
|
data: focus || []
|
|
}, {
|
|
title: '行为占比情况',
|
|
color: ['#5eca9c', '#a39bed', '#f68238', '#f0e999', '#eaa170', '#f9ac95'],
|
|
data: action || []
|
|
}, {
|
|
title: '意图占比情况',
|
|
color: ['#eaa170', '#739fcb', '#f0e999', '#f9ac95', '#4f74ee', '#5eca9c'],
|
|
data: intention || []
|
|
}];
|
|
};
|
|
var PhotosList = function PhotosList(_ref) {
|
|
var className = _ref.className,
|
|
_ref$dataSource = _ref.dataSource,
|
|
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
|
|
_ref$col = _ref.col,
|
|
col = _ref$col === void 0 ? 4 : _ref$col,
|
|
right = _ref.right,
|
|
_ref$bottom = _ref.bottom,
|
|
bottom = _ref$bottom === void 0 ? 23 : _ref$bottom,
|
|
_ref$precision = _ref.precision,
|
|
precision = _ref$precision === void 0 ? 0 : _ref$precision,
|
|
_ref$wrapWidth = _ref.wrapWidth,
|
|
wrapWidth = _ref$wrapWidth === void 0 ? 1200 : _ref$wrapWidth;
|
|
var cutText = function cutText() {
|
|
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
var num = arguments.length > 1 ? arguments[1] : undefined;
|
|
var init = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '--';
|
|
if (!str) return init;
|
|
return (str === null || str === void 0 ? void 0 : str.length) > num ? (str === null || str === void 0 ? void 0 : str.slice(0, num - 1)) + '...' : str;
|
|
};
|
|
var width = Math.floor((wrapWidth - (col - 1) * right) / col);
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: _classnames_2_3_2_classnames_default()(BehavioralAnalysismodules.list, className),
|
|
children: !!(dataSource !== null && dataSource !== void 0 && dataSource.length) && (dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item, index) {
|
|
var cover_pic = item.cover_pic,
|
|
created_at = item.created_at,
|
|
emotion = item.emotion,
|
|
action = item.action,
|
|
intention = item.intention,
|
|
focus = item.focus;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: BehavioralAnalysismodules.wrap,
|
|
style: {
|
|
width: width,
|
|
marginRight: (1 + index) % col === 0 ? 0 : right + precision,
|
|
marginBottom: bottom
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: BehavioralAnalysismodules.img,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: "".concat(env/* default */.Z.API_SERVER).concat(cover_pic)
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: BehavioralAnalysismodules.tips,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-paisheshijian mr5 font14"
|
|
}), " \u62CD\u6444\u65F6\u95F4"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: created_at
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: BehavioralAnalysismodules.footer,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-biaoqing"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u8868\u60C5\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: emotion,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-grey-333",
|
|
children: cutText(emotion, 4)
|
|
})
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-hangwei"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u884C\u4E3A\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: action,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-grey-333",
|
|
children: cutText(action, 4)
|
|
})
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-yitu"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u610F\u56FE\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: intention,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-grey-333",
|
|
children: cutText(intention, 4)
|
|
})
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-zhuangtai"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u4E13\u6CE8\u5EA6\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: focus,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-grey-333",
|
|
children: cutText(focus, 3)
|
|
})
|
|
})]
|
|
})]
|
|
})]
|
|
})]
|
|
})]
|
|
}, index);
|
|
}))
|
|
});
|
|
};
|
|
var BehavioralAnalysis = function BehavioralAnalysis(_ref2) {
|
|
var className = _ref2.className,
|
|
style = _ref2.style,
|
|
_ref2$data = _ref2.data,
|
|
data = _ref2$data === void 0 ? [] : _ref2$data,
|
|
title = _ref2.title,
|
|
_ref2$hideBar = _ref2.hideBar,
|
|
hideBar = _ref2$hideBar === void 0 ? false : _ref2$hideBar;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: _classnames_2_3_2_classnames_default()(BehavioralAnalysismodules.analysis, className),
|
|
style: style,
|
|
children: [!!title && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: BehavioralAnalysismodules.title,
|
|
children: [!hideBar && /*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: title
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: BehavioralAnalysismodules.itemWrap,
|
|
children: data === null || data === void 0 ? void 0 : data.map(function (v, k) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: BehavioralAnalysismodules.item,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(lib/* default */.Z, {
|
|
option: {
|
|
tooltip: {
|
|
trigger: "item",
|
|
formatter: "{a} <br/>{b}: {c}%"
|
|
},
|
|
title: {
|
|
left: 'center',
|
|
bottom: 15,
|
|
text: v === null || v === void 0 ? void 0 : v.title
|
|
},
|
|
legend: {
|
|
top: 10,
|
|
right: 10,
|
|
orient: 'vertical',
|
|
show: true,
|
|
align: 'left',
|
|
icon: 'circle',
|
|
itemWidth: 10,
|
|
itemHeight: 10,
|
|
formatter: function formatter(name) {
|
|
for (var i in v === null || v === void 0 ? void 0 : v.data) {
|
|
if (name == (v === null || v === void 0 ? void 0 : v.data[i].name)) {
|
|
return name + ' ' + (v === null || v === void 0 ? void 0 : v.data[i].value) + '%';
|
|
}
|
|
}
|
|
},
|
|
textStyle: {
|
|
color: '#767676',
|
|
fontSize: 12
|
|
}
|
|
},
|
|
color: v === null || v === void 0 ? void 0 : v.color,
|
|
series: [{
|
|
type: 'pie',
|
|
radius: ['20%', '35%'],
|
|
center: ['20%', '40%'],
|
|
avoidLabelOverlap: false,
|
|
label: {
|
|
show: false
|
|
},
|
|
labelLine: {
|
|
show: false
|
|
},
|
|
data: v === null || v === void 0 ? void 0 : v.data
|
|
}]
|
|
},
|
|
style: {
|
|
height: 145
|
|
}
|
|
})
|
|
}, k);
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var components_BehavioralAnalysis = (BehavioralAnalysis);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 30026:
|
|
/*!***************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Video/Statistics/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; }
|
|
});
|
|
|
|
// 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: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(97174);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(27291);
|
|
// 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/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/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
|
|
var pagination = __webpack_require__(41867);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules
|
|
var LeftOutlined = __webpack_require__(52063);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Video/Statistics/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Statisticsmodules = ({"flex_box_center":"flex_box_center___OtxZ1","flex_space_between":"flex_space_between___Iv0vg","flex_box_vertical_center":"flex_box_vertical_center___lRjIl","flex_box_center_end":"flex_box_center_end___RZyEa","flex_box_column":"flex_box_column___tnIy3","title":"title___BVf_l","statisticsWrp":"statisticsWrp___AFSeR","statistics":"statistics___VhLdy","infoWrp":"infoWrp___v6ya3","divwidth":"divwidth___QoNXd","table_caozuo":"table_caozuo___JPF0b","change_button":"change_button___C7wgN","button_no":"button_no___HL5ih","button_active":"button_active___zXAgk","caozuo_button":"caozuo_button___R4kUc","button_img":"button_img___H7JFl","studentListTable":"studentListTable___xqGFG","bg":"bg___U4gVx","analysisWrp":"analysisWrp___xT_K8","imgWrapper":"imgWrapper___YPNIe","echarts_list":"echarts_list___N0w4N","echarts_item":"echarts_item___Wscsd"});
|
|
;// CONCATENATED MODULE: ./src/assets/images/daochu.png
|
|
var daochu_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAcCAYAAAB/E6/TAAAAAXNSR0IArs4c6QAAAtpJREFUSEu1lm9oTWEcx7+/57rbLLWE9oJQxPy7O2erSXmhRHlDEnnjxTkXS/6k1ChFWMv2Bomku3PLG3snEl5IvDB/yr3nXCEWa01ZQ8SV7e7u+WqzLbu7f3Yuztvn+/t+zvP8vr/nHEERj2m5x+JR46SfUvEjHtUattcnIs3x1tDxydYXDQJZKoJjccc4NRnYpEG1lrdyUKFKaakkdBOBwDBA5KjrVDcVghUEmba3EUQzwapcZgrqcCwaaskHywuqsRKWFkZAqvwm0gcVrIq3Lu3KpcsJMq2OWZAfHSQq8h6LSL9ANsed0O2idmTaXphkZKQP7wFcFeCJKHyh5h0SQUBSCtwSixo3i+6RYXtnQB4UyK1yKd3+0Kn6PhZvy+sXoVCprW4kdL0QZDgzuUSm5Q0l61AgWDb72eXFn/7UGZaXVKJ2QOGtJpdn8xBQBwVPnkaqO/ODwq5Not51jJWZRsbOxKYpDHxIM/0ob1BEkuUlWNB+qbo3547q9r6akfrZf911jNXZ3rgmnNintT4/3CeFTRD5OKrTohQG040g1quArI1Fqu/ljbcZ9i5WlE5puH9xWTITZlreAYLnRNAVd4z5E9bDicPU+rSIWhd3Qnezgjbs7yj9OZgK9mk1sz81sLCiLPA40+hbX3qPJluKBpm2ewRE49gVUyBSRYMM2+sGOWf0HhNhd95BZCAZc1Zc8310pu32kpgF4KsbNaZPZkayaczMHtXufjGXg+mlo2KSbb+vHaEIe/yD5E1QwRqgbBsXBsP2ekBW+jfMXSFAO5S6kQl6jhzT/TdwEWkjuX0s3kPffwIn/sY0a61IEuS0MVDdLndRKo3X/xw0YjhuYA3bi4E0/wdsHKjGSjRo6Ob/DjLDL+dRD3QCLPgP4fdlJtx1pu21k1zl16iQfiIo7O6gxpVChX7XBWpNPBp6MO6oaizvLIF6gmV+DXNE/F3J1JK6pxeWfP4Fq1RgLKZBv/kAAAAASUVORK5CYII=";
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
var utils_export = __webpack_require__(64125);
|
|
// EXTERNAL MODULE: ./src/components/BehavioralAnalysis/index.tsx + 1 modules
|
|
var BehavioralAnalysis = __webpack_require__(94912);
|
|
// 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/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var video = _ref.video,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
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 _useState7 = (0,_react_17_0_2_react.useState)('a'),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
type = _useState8[0],
|
|
setType = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
StudentList = _useState10[0],
|
|
setStudentList = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
page = _useState12[0],
|
|
setPage = _useState12[1];
|
|
var videoStatisticsList = video.videoStatisticsList,
|
|
videoStatistics = video.videoStatistics;
|
|
params['category'] = searchParams.get("category_id");
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
dispatch({
|
|
type: 'video/getVideoStatisticsList',
|
|
payload: objectSpread2_default()({}, params)
|
|
});
|
|
dispatch({
|
|
type: 'video/getVideoStatistics',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
all: true
|
|
})
|
|
});
|
|
}, [params.coursesId]);
|
|
var columns = [{
|
|
title: '序号',
|
|
dataIndex: 'name',
|
|
render: function render(text, record, index) {
|
|
return index + 1;
|
|
}
|
|
}, {
|
|
title: '视频名称',
|
|
dataIndex: 'title'
|
|
}, {
|
|
title: '观看人数',
|
|
dataIndex: 'people_num',
|
|
sortOrder: sortObj['people_num'],
|
|
sortDirections: ['descend', 'ascend'],
|
|
sorter: function sorter(a, b) {
|
|
return a.people_num - b.people_num;
|
|
},
|
|
render: function render(text) {
|
|
return text || '--';
|
|
}
|
|
}, {
|
|
title: '观看时长',
|
|
dataIndex: 'total_time',
|
|
sortOrder: sortObj['total_time'],
|
|
sortDirections: ['descend', 'ascend'],
|
|
sorter: function sorter(a, b) {
|
|
return a.total_time - b.total_time;
|
|
},
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text ? (0,util/* toTimeFormat */.li)(text) : "--"
|
|
});
|
|
}
|
|
}, {
|
|
title: '发布人',
|
|
dataIndex: 'user_name'
|
|
}, {
|
|
title: '操作',
|
|
dataInex: 'action',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(params.coursesId, "/video/").concat(params.categoryId, "/statistics/").concat(record.id),
|
|
className: "c-blue",
|
|
children: "\u8BE6\u60C5"
|
|
})
|
|
});
|
|
}
|
|
}];
|
|
var columns_student = [{
|
|
title: '姓名',
|
|
dataIndex: 'user_name',
|
|
align: "center",
|
|
fixed: 'left',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '学号',
|
|
dataIndex: 'student_id',
|
|
align: "center"
|
|
}, {
|
|
title: '学习视频数',
|
|
align: "center",
|
|
dataIndex: 'num',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '班级',
|
|
align: 'center',
|
|
dataIndex: 'course_group_name'
|
|
}, {
|
|
title: '累计学习时长',
|
|
align: "center",
|
|
dataIndex: 'total_duration',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: (0,util/* toTimeFormat */.li)(parseInt(text)) || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '平均学习完成度',
|
|
align: "center",
|
|
dataIndex: 'rate',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text ? text + "%" : '0%'
|
|
});
|
|
}
|
|
}, {
|
|
title: '开始学习时间',
|
|
align: "center",
|
|
dataIndex: 'start_at',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '最后学习时间',
|
|
align: "center",
|
|
dataIndex: 'end_at',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-black",
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
align: "center",
|
|
fixed: 'right',
|
|
dataIndex: 'course_group_name',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/classrooms/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/video_statistics/").concat(params === null || params === void 0 ? void 0 : params.categoryId, "/Student/").concat(record === null || record === void 0 ? void 0 : record.user_id),
|
|
children: "\u8BE6\u60C5"
|
|
});
|
|
}
|
|
}];
|
|
var getStudentList = function getStudentList(pageNum) {
|
|
setPage(pageNum);
|
|
(0,fetch/* default */.ZP)("/api/courses/".concat(params === null || params === void 0 ? void 0 : params.coursesId, "/video_study_statics.json"), {
|
|
method: 'get',
|
|
params: {
|
|
page: pageNum,
|
|
per_page: 10,
|
|
course_id: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
course_group_id: -1
|
|
}
|
|
}).then(function (result) {
|
|
if (result) {
|
|
setStudentList(result);
|
|
}
|
|
});
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Statisticsmodules.bg,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: Statisticsmodules.statisticsWrp,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
justify: "space-between",
|
|
className: "mt10 mb20",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: "16",
|
|
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: "\u89C6\u9891\u7EDF\u8BA1\u603B\u89C8"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: "8",
|
|
className: "c-light-black tr",
|
|
children: ["\u64AD\u653E\u6570\u636E\u4ECE ", videoStatistics.begin_at, " \u5F00\u59CB\u7EDF\u8BA1"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
justify: "space-between",
|
|
className: Statisticsmodules.statistics,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: "7",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u89C2\u770B\u4EBA\u6570 \uFF08\u4EBA\uFF09"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
title: videoStatistics.num,
|
|
className: Statisticsmodules.divwidth,
|
|
children: videoStatistics.num
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: "7",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u89C2\u770B\u603B\u4EBA\u6B21 \uFF08\u6B21\uFF09"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
title: videoStatistics.freq,
|
|
className: Statisticsmodules.divwidth,
|
|
children: videoStatistics.freq
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
span: "7",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u603B\u89C2\u770B\u65F6\u957F \uFF08\u65F6\uFF09"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
title: videoStatistics.total_duration ? (0,util/* toTimeFormat */.li)(videoStatistics.total_duration) : "--",
|
|
className: Statisticsmodules.divwidth,
|
|
children: videoStatistics.total_duration ? (0,util/* toTimeFormat */.li)(videoStatistics.total_duration) : "--"
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(BehavioralAnalysis/* default */.ZP, {
|
|
hideBar: true,
|
|
title: "\u89C6\u9891\u5B66\u4E60\u5206\u6790\u603B\u89C8",
|
|
className: "p20",
|
|
data: (0,BehavioralAnalysis/* dealOncFnc */.Uf)(videoStatisticsList)
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: Statisticsmodules.infoWrp,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
className: "font16",
|
|
children: "\u7EDF\u8BA1\u5217\u8868"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Statisticsmodules.table_caozuo,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.change_button,
|
|
children: type === 'a' ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.button_active,
|
|
children: "\u89C6\u9891\u7EF4\u5EA6"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.button_no,
|
|
onClick: function onClick() {
|
|
setType('b');
|
|
getStudentList(1);
|
|
},
|
|
children: "\u5B66\u751F\u7EF4\u5EA6"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.button_no,
|
|
onClick: function onClick() {
|
|
setType('a');
|
|
},
|
|
children: "\u89C6\u9891\u7EF4\u5EA6"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Statisticsmodules.button_active,
|
|
children: "\u5B66\u751F\u7EF4\u5EA6"
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Statisticsmodules.caozuo_button,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: daochu_namespaceObject,
|
|
className: Statisticsmodules.button_img
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
onClick: function onClick() {
|
|
(0,utils_export/* ExportVideoStudy */.c6)({
|
|
coursesId: params === null || params === void 0 ? void 0 : params.coursesId,
|
|
course_group_id: -1
|
|
});
|
|
},
|
|
children: "\u5BFC\u51FA\u6570\u636E"
|
|
})]
|
|
})]
|
|
}), type == 'a' && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
className: "mt10",
|
|
loading: loading['video/getVideoStatisticsList'],
|
|
hideOnSinglePage: true,
|
|
pagination: false,
|
|
dataSource: videoStatisticsList.videos,
|
|
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;
|
|
}
|
|
} else {
|
|
params['order'] = c.field + '-' + c.order.replace("end", "");
|
|
sortObj[c.field] = c.order;
|
|
}
|
|
setSortObj(objectSpread2_default()({}, sortObj));
|
|
dispatch({
|
|
type: 'video/getVideoStatisticsList',
|
|
payload: objectSpread2_default()({}, params)
|
|
});
|
|
}
|
|
}), type == 'b' && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
dataSource: StudentList === null || StudentList === void 0 ? void 0 : StudentList.student,
|
|
pagination: false,
|
|
columns: columns_student,
|
|
className: Statisticsmodules.studentListTable,
|
|
scroll: {
|
|
x: 'max-content'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mb50 mt30 mb20",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
hideOnSinglePage: true,
|
|
showSizeChanger: false,
|
|
onChange: function onChange(current, pageSize) {
|
|
getStudentList(current);
|
|
},
|
|
current: page || 1,
|
|
defaultPageSize: 10,
|
|
total: StudentList === null || StudentList === void 0 ? void 0 : StudentList.count
|
|
})
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mb50 mt30",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showSizeChanger: false,
|
|
onChange: function onChange(page) {
|
|
params.page = page;
|
|
dispatch({
|
|
type: 'video/getVideoStatisticsList',
|
|
payload: objectSpread2_default()({}, params)
|
|
});
|
|
},
|
|
defaultCurrent: 1,
|
|
current: params.page || 1,
|
|
pageSize: 20,
|
|
hideOnSinglePage: true,
|
|
total: videoStatisticsList === null || videoStatisticsList === void 0 ? void 0 : videoStatisticsList.count
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Statistics = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var video = _ref2.video,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting;
|
|
return {
|
|
video: video,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects
|
|
};
|
|
})(ShixunsListPage));
|
|
|
|
/***/ })
|
|
|
|
}]); |