|
|
|
|
@ -3064,6 +3064,10 @@ var SwitchStudents_PublishShixun = function PublishShixun(_ref) {
|
|
|
|
|
})(SwitchStudents_PublishShixun));
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
|
|
|
var skeleton = __webpack_require__(78485);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.2@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
|
|
|
var DownOutlined = __webpack_require__(18290);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.2@@ant-design/icons/es/icons/RightOutlined.js + 1 modules
|
|
|
|
|
var RightOutlined = __webpack_require__(53878);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react-beautiful-dnd@13.0.0@react-beautiful-dnd/dist/react-beautiful-dnd.esm.js + 27 modules
|
|
|
|
|
var react_beautiful_dnd_esm = __webpack_require__(78018);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/layouts/ShixunDetail/index.d.ts
|
|
|
|
|
@ -3089,7 +3093,7 @@ var SubmenuIcons = {
|
|
|
|
|
};
|
|
|
|
|
;// CONCATENATED MODULE: ./src/layouts/ShixunDetail/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var ShixunDetailmodules = ({"flex_box_center":"flex_box_center___ztP5B","flex_space_between":"flex_space_between___ZnBAF","flex_box_vertical_center":"flex_box_vertical_center___sIQLg","flex_box_center_end":"flex_box_center_end___Yjb4r","flex_box_column":"flex_box_column___wx6hu","wrp":"wrp___eXSKX","classroomInfo":"classroomInfo___zfzoC","title":"title___BCkXZ","titleLeft":"titleLeft___XPuIq","classroomUser":"classroomUser___b_ny2","headPic":"headPic___pR9pz","teacherInfo":"teacherInfo___BeE5H","classroomDesc":"classroomDesc___csaXO","classroomDescBg":"classroomDescBg___OQixb","joinCouses":"joinCouses___RT5bw","bg":"bg___zCz6k","task_count":"task_count___GC5OH","container":"container___m1Tgk","leftMenuActions":"leftMenuActions___H7kfl","leftMenu":"leftMenu___aMBG9","menuText":"menuText___vgQ83","totalCount":"totalCount___AoAB2","actions":"actions___MsngA","open":"open___inDJH","actived":"actived___rqjRz","actived2":"actived2___x7Wvg","tipJoin":"tipJoin___uzlgb","badge":"badge___s6J4T","num":"num____292N","classromediv":"classromediv___AQhQT","glow":"glow___Ucfx9","st":"st___KjyfC","link":"link___aoTXV","sLink":"sLink___moIi9","iconH":"iconH___N915X","shareClassroom":"shareClassroom___WbdZI","copy":"copy___plAJS","btnWrap":"btnWrap___UOuN_","btn":"btn___DfMBs","tip":"tip___FDQL5"});
|
|
|
|
|
/* harmony default export */ var ShixunDetailmodules = ({"flex_box_center":"flex_box_center___ztP5B","flex_space_between":"flex_space_between___ZnBAF","flex_box_vertical_center":"flex_box_vertical_center___sIQLg","flex_box_center_end":"flex_box_center_end___Yjb4r","flex_box_column":"flex_box_column___wx6hu","wrp":"wrp___eXSKX","classroomInfo":"classroomInfo___zfzoC","title":"title___BCkXZ","titleLeft":"titleLeft___XPuIq","classroomUser":"classroomUser___b_ny2","headPic":"headPic___pR9pz","teacherInfo":"teacherInfo___BeE5H","classroomDesc":"classroomDesc___csaXO","classroomDescBg":"classroomDescBg___OQixb","joinCouses":"joinCouses___RT5bw","bg":"bg___zCz6k","task_count":"task_count___GC5OH","container":"container___m1Tgk","leftMenuActions":"leftMenuActions___H7kfl","leftMenu":"leftMenu___aMBG9","menuText":"menuText___vgQ83","totalCount":"totalCount___AoAB2","actions":"actions___MsngA","open":"open___inDJH","close":"close___nrldR","actived":"actived___rqjRz","actived2":"actived2___x7Wvg","tipJoin":"tipJoin___uzlgb","badge":"badge___s6J4T","num":"num____292N","classromediv":"classromediv___AQhQT","glow":"glow___Ucfx9","st":"st___KjyfC","link":"link___aoTXV","sLink":"sLink___moIi9","iconH":"iconH___N915X","shareClassroom":"shareClassroom___WbdZI","copy":"copy___plAJS"});
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
|
|
var authority = __webpack_require__(71763);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/layouts/ShixunDetail/LeftMenus/index.tsx
|
|
|
|
|
@ -3112,20 +3116,143 @@ var _excluded = ["classroomList", "globalSetting", "user", "loading", "dispatch"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var LeftMenus_TabPane = tabs/* default */.Z.TabPane;
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
var _user$userInfo, _user$userInfo2, _modules$course_modul;
|
|
|
|
|
var classroomList = _ref.classroomList,
|
|
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
|
|
user = _ref.user,
|
|
|
|
|
loading = _ref.loading,
|
|
|
|
|
dispatch = _ref.dispatch,
|
|
|
|
|
_children = _ref.children,
|
|
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
|
|
var Leftitem = function Leftitem(_ref) {
|
|
|
|
|
var value = _ref.value,
|
|
|
|
|
index = _ref.index,
|
|
|
|
|
layNum = _ref.layNum,
|
|
|
|
|
_ref$onDragEnd = _ref.onDragEnd,
|
|
|
|
|
onDragEnd = _ref$onDragEnd === void 0 ? function () {} : _ref$onDragEnd,
|
|
|
|
|
_ref$golink = _ref.golink,
|
|
|
|
|
golink = _ref$golink === void 0 ? function () {} : _ref$golink,
|
|
|
|
|
_ref$getLink = _ref.getLink,
|
|
|
|
|
getLink = _ref$getLink === void 0 ? function () {} : _ref$getLink,
|
|
|
|
|
_ref$content = _ref.content,
|
|
|
|
|
_content = _ref$content === void 0 ? function () {} : _ref$content,
|
|
|
|
|
_ref$isOpen = _ref.isOpen,
|
|
|
|
|
isOpen = _ref$isOpen === void 0 ? [] : _ref$isOpen;
|
|
|
|
|
// value是上级内容,index是上级的索引,layNum是当前层数刚开始是第二层
|
|
|
|
|
var items = value.second_category || value.third_category || value.fourth_category || value.fifth_category || value.sixth_category || [];
|
|
|
|
|
return items.length != 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* DragDropContext */.Z5, {
|
|
|
|
|
onDragEnd: onDragEnd,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Droppable */.bK, {
|
|
|
|
|
isDropDisabled: (layNum == 2 || layNum == 3) && (0,authority/* isAdmin */.GJ)() ? false : true,
|
|
|
|
|
droppableId: "".concat(value.id || value.category_id),
|
|
|
|
|
children: function children(provided, snapshot) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: layNum == 2 ? 0 : -30,
|
|
|
|
|
overflowX: "hidden"
|
|
|
|
|
},
|
|
|
|
|
ref: provided.innerRef
|
|
|
|
|
}, provided.droppableProps), {}, {
|
|
|
|
|
className: isOpen.includes(value.id || value.category_id) ? ShixunDetailmodules.open : ShixunDetailmodules.close,
|
|
|
|
|
children: [items === null || items === void 0 ? void 0 : items.map(function (fvalue, findex) {
|
|
|
|
|
var _fvalue$category_id;
|
|
|
|
|
var itemsChild = fvalue.second_category || fvalue.third_category || fvalue.fourth_category || fvalue.fifth_category || fvalue.sixth_category || [];
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Draggable */._l, {
|
|
|
|
|
index: findex,
|
|
|
|
|
draggableId: "".concat((_fvalue$category_id = fvalue.category_id) === null || _fvalue$category_id === void 0 ? void 0 : _fvalue$category_id.toString(), "-").concat(value.itemDraggableId, "-").concat(findex),
|
|
|
|
|
children: function children(provided, snapshot) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
ref: provided.innerRef
|
|
|
|
|
}, provided.draggableProps), provided.dragHandleProps), {}, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: location.pathname.indexOf(fvalue.second_category_url) > -1 && ShixunDetailmodules.actived2,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: "1",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "right",
|
|
|
|
|
title: fvalue.category_name,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
|
|
className: ['font14', ShixunDetailmodules.menuText].join(' '),
|
|
|
|
|
to: getLink(fvalue, 3),
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 9,
|
|
|
|
|
padding: '16px 0px'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick(e) {
|
|
|
|
|
if (layNum == 2) e.preventDefault();
|
|
|
|
|
golink(fvalue, index, layNum);
|
|
|
|
|
},
|
|
|
|
|
children: fvalue.category_name
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [(0,authority/* isAdmins */.eB)() && /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
|
|
|
placement: "right",
|
|
|
|
|
trigger: "hover",
|
|
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
|
|
return trigger.parentNode.parentNode;
|
|
|
|
|
},
|
|
|
|
|
content: function content() {
|
|
|
|
|
return _content(fvalue, layNum);
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ['iconfont icon-sandian', ShixunDetailmodules.actions].join(' ')
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: "center"
|
|
|
|
|
},
|
|
|
|
|
children: [fvalue.category_count != 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: "20px"
|
|
|
|
|
},
|
|
|
|
|
className: ShixunDetailmodules.totalCount,
|
|
|
|
|
children: fvalue.category_count
|
|
|
|
|
}), itemsChild.length != 0 && (isOpen.includes(fvalue.category_id) ? /*#__PURE__*/(0,jsx_runtime.jsx)(DownOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
top: "-6px"
|
|
|
|
|
},
|
|
|
|
|
className: ShixunDetailmodules.totalCount,
|
|
|
|
|
rev: undefined
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(RightOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
top: "-6px"
|
|
|
|
|
},
|
|
|
|
|
className: ShixunDetailmodules.totalCount
|
|
|
|
|
}))]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), findex), /*#__PURE__*/(0,jsx_runtime.jsx)(Leftitem, {
|
|
|
|
|
value: objectSpread2_default()(objectSpread2_default()({}, fvalue), {}, {
|
|
|
|
|
itemDraggableId: "".concat(value.itemDraggableId, "-").concat(index)
|
|
|
|
|
}),
|
|
|
|
|
index: findex,
|
|
|
|
|
layNum: layNum + 1,
|
|
|
|
|
onDragEnd: onDragEnd,
|
|
|
|
|
golink: golink,
|
|
|
|
|
getLink: getLink,
|
|
|
|
|
content: _content,
|
|
|
|
|
isOpen: isOpen
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, fvalue.category_id);
|
|
|
|
|
}), provided.placeholder]
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {});
|
|
|
|
|
};
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref2) {
|
|
|
|
|
var _modules$course_modul;
|
|
|
|
|
var classroomList = _ref2.classroomList,
|
|
|
|
|
globalSetting = _ref2.globalSetting,
|
|
|
|
|
user = _ref2.user,
|
|
|
|
|
loading = _ref2.loading,
|
|
|
|
|
dispatch = _ref2.dispatch,
|
|
|
|
|
children = _ref2.children,
|
|
|
|
|
props = objectWithoutProperties_default()(_ref2, _excluded);
|
|
|
|
|
var query = (0,_umi_production_exports.useParams)();
|
|
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
|
|
var detailTopBanner = classroomList.detailTopBanner,
|
|
|
|
|
detailLeftMenus = classroomList.detailLeftMenus;
|
|
|
|
|
var detailLeftMenus = classroomList.detailLeftMenus;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
leftMenu = _useState2[0],
|
|
|
|
|
@ -3138,77 +3265,23 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
secondOpen = _useState6[0],
|
|
|
|
|
setSecondOpen = _useState6[1];
|
|
|
|
|
var userInfo = user.userInfo;
|
|
|
|
|
var Content = layout/* default */.Z.Content,
|
|
|
|
|
Sider = layout/* default */.Z.Sider;
|
|
|
|
|
var Sider = layout/* default */.Z.Sider;
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
modules = _useState8[0],
|
|
|
|
|
setModulse = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
openKeys = _useState10[0],
|
|
|
|
|
setOpenKeys = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
checkedValues = _useState10[0],
|
|
|
|
|
setcheckedValues = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
|
|
selectKeys = _useState12[0],
|
|
|
|
|
setSelectKeys = _useState12[1];
|
|
|
|
|
isShowModal = _useState12[0],
|
|
|
|
|
setIsshowModal = _useState12[1];
|
|
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
checkedValues = _useState14[0],
|
|
|
|
|
setcheckedValues = _useState14[1];
|
|
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
|
|
isShowModal = _useState16[0],
|
|
|
|
|
setIsshowModal = _useState16[1];
|
|
|
|
|
var checkboxOption = [{
|
|
|
|
|
label: '公告栏',
|
|
|
|
|
value: 'announcement'
|
|
|
|
|
}, {
|
|
|
|
|
label: '实训作业',
|
|
|
|
|
value: 'shixun_homework'
|
|
|
|
|
}, {
|
|
|
|
|
label: '普通作业',
|
|
|
|
|
value: 'common_homework'
|
|
|
|
|
}, ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.main_site) && {
|
|
|
|
|
label: '分组作业',
|
|
|
|
|
value: 'group_homework'
|
|
|
|
|
}, {
|
|
|
|
|
label: '试卷',
|
|
|
|
|
value: 'exercise'
|
|
|
|
|
}, {
|
|
|
|
|
label: '问卷',
|
|
|
|
|
value: 'poll'
|
|
|
|
|
}, {
|
|
|
|
|
label: '教学资料',
|
|
|
|
|
value: 'attachment'
|
|
|
|
|
}, {
|
|
|
|
|
label: '视频直播',
|
|
|
|
|
value: 'video'
|
|
|
|
|
}, {
|
|
|
|
|
label: '讨论',
|
|
|
|
|
value: 'board'
|
|
|
|
|
}, {
|
|
|
|
|
label: '分班',
|
|
|
|
|
value: 'course_group'
|
|
|
|
|
}, {
|
|
|
|
|
label: '统计',
|
|
|
|
|
value: 'statistics'
|
|
|
|
|
}, {
|
|
|
|
|
label: '签到',
|
|
|
|
|
value: 'attendance'
|
|
|
|
|
}, ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.admin) && {
|
|
|
|
|
label: '模板管理',
|
|
|
|
|
value: 'template'
|
|
|
|
|
}].filter(function (item) {
|
|
|
|
|
var _globalSetting$settin;
|
|
|
|
|
if (!item) return false;
|
|
|
|
|
if (globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.is_local) {
|
|
|
|
|
return item.label !== '视频直播';
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
isOpen = _useState14[0],
|
|
|
|
|
setIsOpen = _useState14[1];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
var _classroomList$detail;
|
|
|
|
|
if ((_classroomList$detail = classroomList.detailLeftMenus) !== null && _classroomList$detail !== void 0 && _classroomList$detail.course_modules) {
|
|
|
|
|
@ -3268,8 +3341,8 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var getleftmenus = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _data$course_modules$;
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _data$course_modules;
|
|
|
|
|
var data;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
@ -3283,7 +3356,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
data = _context.sent;
|
|
|
|
|
_umi_production_exports.history.push("".concat(data === null || data === void 0 || (_data$course_modules$ = data.course_modules[0]) === null || _data$course_modules$ === void 0 ? void 0 : _data$course_modules$.category_url));
|
|
|
|
|
_umi_production_exports.history.push("".concat(data === null || data === void 0 || (_data$course_modules = data.course_modules) === null || _data$course_modules === void 0 || (_data$course_modules = _data$course_modules[0]) === null || _data$course_modules === void 0 ? void 0 : _data$course_modules.category_url));
|
|
|
|
|
// console.log('--------',data);
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
@ -3292,14 +3365,16 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getleftmenus() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var confirm = function confirm(content, okCb) {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
title: '提示',
|
|
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {}),
|
|
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
|
|
|
|
|
rev: undefined
|
|
|
|
|
}),
|
|
|
|
|
content: content,
|
|
|
|
|
okText: '确认',
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
@ -3333,42 +3408,51 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
dom.setAttribute('id', 'appointId');
|
|
|
|
|
};
|
|
|
|
|
var actionClick = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(key, val, type, e) {
|
|
|
|
|
var _ref5;
|
|
|
|
|
var res, _payload;
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(key, val, type, e) {
|
|
|
|
|
var _ref6;
|
|
|
|
|
var res, _payload, _detailLeftMenus$cour, _detailLeftMenus$cour2;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context4.t0 = key;
|
|
|
|
|
_context4.next = _context4.t0 === 1 ? 3 : _context4.t0 === 2 ? 6 : _context4.t0 === 3 ? 8 : _context4.t0 === 4 ? 10 : _context4.t0 === 5 ? 15 : _context4.t0 === 6 ? 17 : 19;
|
|
|
|
|
_context4.next = _context4.t0 === 1 ? 3 : _context4.t0 === 2 ? 8 : _context4.t0 === 3 ? 10 : _context4.t0 === 4 ? 12 : _context4.t0 === 5 ? 17 : _context4.t0 === 6 ? 19 : 21;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
_payload = {
|
|
|
|
|
category_id: type === 2 ? val.root_id : val.id || val.category_id,
|
|
|
|
|
parent_id: type === 2 ? val.category_id : "",
|
|
|
|
|
category_id: val.id || val.category_id,
|
|
|
|
|
parent_id: val.category_id,
|
|
|
|
|
nodeModules: val,
|
|
|
|
|
type: val.type || val.category_type
|
|
|
|
|
}; // if (val.category_type === 'attachment') {
|
|
|
|
|
// _payload.category_id = detailLeftMenus?.course_modules?.filter((v: any) => v.type === "attachment")?.[0]?.["id"]
|
|
|
|
|
// }
|
|
|
|
|
type: val.type
|
|
|
|
|
};
|
|
|
|
|
if (val.category_type === 'attachment') {
|
|
|
|
|
_payload.category_id = detailLeftMenus === null || detailLeftMenus === void 0 || (_detailLeftMenus$cour = detailLeftMenus.course_modules) === null || _detailLeftMenus$cour === void 0 || (_detailLeftMenus$cour = _detailLeftMenus$cour.filter(function (v) {
|
|
|
|
|
return v.type === 'attachment';
|
|
|
|
|
})) === null || _detailLeftMenus$cour === void 0 || (_detailLeftMenus$cour = _detailLeftMenus$cour[0]) === null || _detailLeftMenus$cour === void 0 ? void 0 : _detailLeftMenus$cour['id'];
|
|
|
|
|
} else {
|
|
|
|
|
_payload.category_id = detailLeftMenus === null || detailLeftMenus === void 0 || (_detailLeftMenus$cour2 = detailLeftMenus.course_modules) === null || _detailLeftMenus$cour2 === void 0 || (_detailLeftMenus$cour2 = _detailLeftMenus$cour2.filter(function (v) {
|
|
|
|
|
return v.type === val.type || v.type === val.category_type || v.type == "program_homework" && val.category_type == "hack";
|
|
|
|
|
})) === null || _detailLeftMenus$cour2 === void 0 || (_detailLeftMenus$cour2 = _detailLeftMenus$cour2[0]) === null || _detailLeftMenus$cour2 === void 0 ? void 0 : _detailLeftMenus$cour2['id'];
|
|
|
|
|
}
|
|
|
|
|
console.log('----', _payload, val, detailLeftMenus);
|
|
|
|
|
|
|
|
|
|
// setAppointId(e);
|
|
|
|
|
dispatch({
|
|
|
|
|
type: "classroomList/setActionTabs",
|
|
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
|
|
payload: {
|
|
|
|
|
key: "添加目录",
|
|
|
|
|
key: '添加目录',
|
|
|
|
|
selectArrs: _payload,
|
|
|
|
|
cb: function cb() {
|
|
|
|
|
getMenus();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context4.abrupt("break", 19);
|
|
|
|
|
case 6:
|
|
|
|
|
return _context4.abrupt("break", 21);
|
|
|
|
|
case 8:
|
|
|
|
|
// setAppointId(e);
|
|
|
|
|
dispatch({
|
|
|
|
|
type: "classroomList/setActionTabs",
|
|
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
|
|
payload: {
|
|
|
|
|
key: "目录重命名",
|
|
|
|
|
key: '目录重命名',
|
|
|
|
|
selectArrs: {
|
|
|
|
|
name: val.name || val.category_name,
|
|
|
|
|
category_id: val.category_id,
|
|
|
|
|
@ -3380,8 +3464,8 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context4.abrupt("break", 19);
|
|
|
|
|
case 8:
|
|
|
|
|
return _context4.abrupt("break", 21);
|
|
|
|
|
case 10:
|
|
|
|
|
confirm( /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
|
|
children: ["\u9690\u85CF\u540E\u5C06\u4E0D\u518D\u663E\u793A\u6B64\u6A21\u5757,", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u540E\u7EED\u53EF\u5728\u8BFE\u5802\u8BBE\u7F6E\u4E2D\u91CD\u65B0\u52FE\u9009\u6A21\u5757\u6062\u590D\u663E\u793A"]
|
|
|
|
|
}), /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
@ -3395,7 +3479,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success("操作成功");
|
|
|
|
|
message/* default */.ZP.success('操作成功');
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/getClassroomLeftMenus',
|
|
|
|
|
payload: {
|
|
|
|
|
@ -3409,16 +3493,16 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})));
|
|
|
|
|
return _context4.abrupt("break", 19);
|
|
|
|
|
case 10:
|
|
|
|
|
_context4.next = 12;
|
|
|
|
|
return _context4.abrupt("break", 21);
|
|
|
|
|
case 12:
|
|
|
|
|
_context4.next = 14;
|
|
|
|
|
return (0,classrooms/* stickyModule */.yd)({
|
|
|
|
|
id: val.id
|
|
|
|
|
});
|
|
|
|
|
case 12:
|
|
|
|
|
case 14:
|
|
|
|
|
res = _context4.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success("操作成功");
|
|
|
|
|
message/* default */.ZP.success('操作成功');
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/getClassroomLeftMenus',
|
|
|
|
|
payload: {
|
|
|
|
|
@ -3426,16 +3510,16 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return _context4.abrupt("break", 19);
|
|
|
|
|
case 15:
|
|
|
|
|
return _context4.abrupt("break", 21);
|
|
|
|
|
case 17:
|
|
|
|
|
confirm( /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
|
|
children: ["\u8BE5\u76EE\u5F55\u4E0B\u7684\u5185\u5BB9\u5C06\u88AB\u79FB\u52A8\u5230", (_ref5 = ['exercise', 'board', 'attachment']) !== null && _ref5 !== void 0 && _ref5.includes(val.category_type) ? '父' : '未分配', "\u76EE\u5F55,", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u662F\u5426\u786E\u8BA4\u5220\u9664?"]
|
|
|
|
|
children: ["\u8BE5\u76EE\u5F55\u4E0B\u7684\u5185\u5BB9\u5C06\u88AB\u79FB\u52A8\u5230", (_ref6 = ['exercise', 'board', 'attachment']) !== null && _ref6 !== void 0 && _ref6.includes(val.category_type) ? '父' : '未分配', "\u76EE\u5F55,", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u662F\u5426\u786E\u8BA4\u5220\u9664?"]
|
|
|
|
|
}), /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var _detailLeftMenus$cour, _aa$, aa;
|
|
|
|
|
var _detailLeftMenus$cour3, _aa$, aa;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(val.category_type === "board")) {
|
|
|
|
|
if (!(val.category_type === 'board')) {
|
|
|
|
|
_context3.next = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -3456,9 +3540,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
case 9:
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success("删除成功");
|
|
|
|
|
if (val.category_type === "board") {
|
|
|
|
|
aa = detailLeftMenus === null || detailLeftMenus === void 0 || (_detailLeftMenus$cour = detailLeftMenus.course_modules) === null || _detailLeftMenus$cour === void 0 ? void 0 : _detailLeftMenus$cour.filter(function (item) {
|
|
|
|
|
message/* default */.ZP.success('删除成功');
|
|
|
|
|
if (val.category_type === 'board') {
|
|
|
|
|
aa = detailLeftMenus === null || detailLeftMenus === void 0 || (_detailLeftMenus$cour3 = detailLeftMenus.course_modules) === null || _detailLeftMenus$cour3 === void 0 ? void 0 : _detailLeftMenus$cour3.filter(function (item) {
|
|
|
|
|
return (item === null || item === void 0 ? void 0 : item.type) === 'board';
|
|
|
|
|
});
|
|
|
|
|
_umi_production_exports.history.push("/classrooms/".concat(query.coursesId, "/").concat(val.category_type, "/").concat(aa === null || aa === void 0 || (_aa$ = aa[0]) === null || _aa$ === void 0 ? void 0 : _aa$.main_id));
|
|
|
|
|
@ -3478,8 +3562,8 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
})));
|
|
|
|
|
return _context4.abrupt("break", 19);
|
|
|
|
|
case 17:
|
|
|
|
|
return _context4.abrupt("break", 21);
|
|
|
|
|
case 19:
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
|
|
payload: {
|
|
|
|
|
@ -3487,40 +3571,38 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
params: query
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context4.abrupt("break", 19);
|
|
|
|
|
case 19:
|
|
|
|
|
return _context4.abrupt("break", 21);
|
|
|
|
|
case 21:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}));
|
|
|
|
|
return function actionClick(_x, _x2, _x3, _x4) {
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var showAdd = function showAdd(text) {
|
|
|
|
|
// if(detailTopBanner.excellent && (text == 'board' || text === 'attachment') ){
|
|
|
|
|
// return false
|
|
|
|
|
// }
|
|
|
|
|
if (text === "attendance" || text === 'announcement' || text === "poll" || text === 'graduation' || text === 'course_group' || text === 'new_graduation') {
|
|
|
|
|
if (text === 'attendance' || text === 'announcement' || text === 'poll' || text === 'graduation' || text === "online_learning" || text === "board" || text === "statistics") {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var _content = function content(val, type) {
|
|
|
|
|
var _content2 = function content(val, type) {
|
|
|
|
|
// type 1是顶层目录,2是二级目录
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ShixunDetailmodules.leftMenuActions,
|
|
|
|
|
children: [
|
|
|
|
|
// (val.type != "course_group" && val.main_id || (val.category_type === 'attachment' && type === 2)) &&
|
|
|
|
|
showAdd(val.type) && type <= 2 && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
children: [(val.type != 'course_group' && val.main_id || type === 2 || type === 3 || type == 4 || type == 5) && showAdd(val.type) && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
className: "current",
|
|
|
|
|
onClick: function onClick(e) {
|
|
|
|
|
return actionClick(1, val, type, e);
|
|
|
|
|
},
|
|
|
|
|
children: "\u65B0\u5EFA\u5B50\u76EE\u5F55"
|
|
|
|
|
}), val.type === "course_group" && type === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
}), val.type === 'course_group' && type === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
className: "current",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return actionClick(6, val, type);
|
|
|
|
|
@ -3556,50 +3638,25 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
var getLink = function getLink(val, type) {
|
|
|
|
|
// type 1是顶层目录,2是二级目录
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
if (val.type === "board") {
|
|
|
|
|
if (val.type === 'board') {
|
|
|
|
|
return "/classrooms/".concat(query.coursesId, "/").concat(val.type, "/").concat(val.main_id);
|
|
|
|
|
}
|
|
|
|
|
if (val.type === "graduation") {
|
|
|
|
|
if (val.type === 'graduation') {
|
|
|
|
|
return "/classrooms/".concat(query.coursesId, "/graduation_topics");
|
|
|
|
|
}
|
|
|
|
|
return "/classrooms/".concat(query.coursesId, "/").concat(val.type);
|
|
|
|
|
} else {
|
|
|
|
|
if (val.category_type === 'hack' && type === 3) return val.second_category_url;
|
|
|
|
|
if (val.category_type === "messages") val.category_type = "board";
|
|
|
|
|
if (val.category_type === 'messages') val.category_type = 'board';
|
|
|
|
|
return "/classrooms/".concat(query.coursesId, "/").concat(val.category_type, "/").concat(val.category_id);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var setDefaultOpen = function setDefaultOpen() {
|
|
|
|
|
var pathname = location.pathname.split("/");
|
|
|
|
|
setOpenKeys(["".concat(pathname[3], "|").concat(query.coursesId)]);
|
|
|
|
|
setSelectKeys(["".concat(pathname[3], "|").concat(query.coursesId), "".concat(pathname[3], "|").concat(pathname[4])]);
|
|
|
|
|
};
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
try {
|
|
|
|
|
var p = sessionStorage._nav_.split(",");
|
|
|
|
|
var p2 = sessionStorage._nav_open_.split(",");
|
|
|
|
|
if (!sessionStorage._nav_open_) {
|
|
|
|
|
setDefaultOpen();
|
|
|
|
|
} else {
|
|
|
|
|
setOpenKeys(p2);
|
|
|
|
|
}
|
|
|
|
|
setSelectKeys(p);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
setDefaultOpen();
|
|
|
|
|
}
|
|
|
|
|
return function () {
|
|
|
|
|
sessionStorage.removeItem('_nav_open_');
|
|
|
|
|
sessionStorage.removeItem('_nav_');
|
|
|
|
|
};
|
|
|
|
|
}, [classroomList.name, location === null || location === void 0 ? void 0 : location.pathname]);
|
|
|
|
|
var onDragEnd = /*#__PURE__*/function () {
|
|
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(data) {
|
|
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(data) {
|
|
|
|
|
var _leftMenu$rootIndex;
|
|
|
|
|
var draggableId, source, destination, arr, rootIndex, sourceIndex, res, obj;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
// console.log("data:11111", data)
|
|
|
|
|
draggableId = data.draggableId, source = data.source, destination = data.destination;
|
|
|
|
|
if (destination) {
|
|
|
|
|
_context5.next = 3;
|
|
|
|
|
@ -3607,7 +3664,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
return _context5.abrupt("return", false);
|
|
|
|
|
case 3:
|
|
|
|
|
arr = draggableId.split("-");
|
|
|
|
|
arr = draggableId.split('-');
|
|
|
|
|
rootIndex = arr[1];
|
|
|
|
|
sourceIndex = arr[2];
|
|
|
|
|
if (!(((_leftMenu$rootIndex = leftMenu[rootIndex]) === null || _leftMenu$rootIndex === void 0 ? void 0 : _leftMenu$rootIndex.type) === 'board')) {
|
|
|
|
|
@ -3635,7 +3692,6 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
if (arr.length === 3) {
|
|
|
|
|
obj = leftMenu[rootIndex]['second_category'][sourceIndex];
|
|
|
|
|
;
|
|
|
|
|
leftMenu[rootIndex]['second_category'].splice(sourceIndex, 1);
|
|
|
|
|
leftMenu[rootIndex]['second_category'].splice(destination.index, 0, obj);
|
|
|
|
|
} else {
|
|
|
|
|
@ -3652,7 +3708,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}));
|
|
|
|
|
return function onDragEnd(_x5) {
|
|
|
|
|
return _ref7.apply(this, arguments);
|
|
|
|
|
return _ref8.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
|
@ -3663,19 +3719,64 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
var scrollToBody = function scrollToBody() {
|
|
|
|
|
// window.scrollTo(0, 336)
|
|
|
|
|
};
|
|
|
|
|
var golink = function golink(value, index, layNum) {
|
|
|
|
|
// layNum层数
|
|
|
|
|
var itemId = [];
|
|
|
|
|
var recursion = function recursion(reValue) {
|
|
|
|
|
reValue.map(function (item) {
|
|
|
|
|
var items = item.second_category || item.third_category || item.fourth_category || item.fifth_category || item.sixth_category || [];
|
|
|
|
|
items.length != 0 && recursion(items);
|
|
|
|
|
itemId.push(item.id || item.category_id);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
recursion(value.second_category || value.third_category || value.fourth_category || value.fifth_category || value.sixth_category || []);
|
|
|
|
|
itemId.push(value.id || value.category_id);
|
|
|
|
|
if (isOpen.includes(value.category_id)) {
|
|
|
|
|
setIsOpen(isOpen.filter(function (item) {
|
|
|
|
|
return !itemId.includes(item);
|
|
|
|
|
}));
|
|
|
|
|
} else {
|
|
|
|
|
setIsOpen([].concat(toConsumableArray_default()(isOpen), [value.category_id]));
|
|
|
|
|
}
|
|
|
|
|
if (layNum == 2) {
|
|
|
|
|
if (location.pathname.indexOf(value.second_category_url) > -1) {
|
|
|
|
|
if (thirdOpen.includes(index)) {
|
|
|
|
|
thirdOpen.splice(thirdOpen.indexOf(index), 1);
|
|
|
|
|
} else {
|
|
|
|
|
thirdOpen.push(index);
|
|
|
|
|
}
|
|
|
|
|
setThirdOpen(toConsumableArray_default()(thirdOpen));
|
|
|
|
|
} else {
|
|
|
|
|
if (!thirdOpen.includes(index)) {
|
|
|
|
|
thirdOpen.push(index);
|
|
|
|
|
}
|
|
|
|
|
setThirdOpen(toConsumableArray_default()(thirdOpen));
|
|
|
|
|
if (['shixun_homework', 'hack', 'common_homework', 'group_homework'].includes(value.category_type)) {
|
|
|
|
|
_umi_production_exports.history.replace("".concat(value.second_category_url, "?tabs=0"));
|
|
|
|
|
} else if (['exercise'].includes(value.category_type)) {
|
|
|
|
|
_umi_production_exports.history.replace("".concat(value.second_category_url, "?tabs=all"));
|
|
|
|
|
} else {
|
|
|
|
|
_umi_production_exports.history.replace(value.second_category_url);
|
|
|
|
|
}
|
|
|
|
|
scrollToBody();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
scrollToBody();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Sider, {
|
|
|
|
|
width: 264,
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: 24,
|
|
|
|
|
height: 'auto',
|
|
|
|
|
background: "none"
|
|
|
|
|
background: 'none'
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
|
|
className: ShixunDetailmodules.leftMenu,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
|
|
|
loading: detailLeftMenus.course_modules ? false : true,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
|
|
open: isShowModal,
|
|
|
|
|
visible: isShowModal,
|
|
|
|
|
title: "\u8BFE\u5802\u6A21\u5757\u8BBE\u7F6E",
|
|
|
|
|
centered: true,
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
|
|
@ -3721,6 +3822,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
setIsshowModal(false);
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
padding: '24px'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u901A\u8FC7\u52FE\u9009\u53EF\u4EE5\u663E\u793A/\u9690\u85CF\u6A21\u5757"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z.Group, {
|
|
|
|
|
@ -3728,11 +3832,11 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
setcheckedValues(toConsumableArray_default()(checkedValues));
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: "10px"
|
|
|
|
|
marginTop: '20px'
|
|
|
|
|
},
|
|
|
|
|
value: checkedValues,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
|
|
children: modules === null || modules === void 0 || (_modules$course_modul = modules.course_modules) === null || _modules$course_modul === void 0 ? void 0 : _modules$course_modul.map(function (item, index) {
|
|
|
|
|
children: modules === null || modules === void 0 || (_modules$course_modul = modules.course_modules) === null || _modules$course_modul === void 0 ? void 0 : _modules$course_modul.map(function (item) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
span: 6,
|
|
|
|
|
style: {
|
|
|
|
|
@ -3755,15 +3859,14 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
|
|
className: location.pathname.indexOf(v.category_url) > -1 || specialActive(v) ? ShixunDetailmodules.actived : '',
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
// console.log('------');
|
|
|
|
|
// window.document.body.scrollTop=1000
|
|
|
|
|
// window.scrollTo(0, 100);
|
|
|
|
|
if (location.pathname === v.category_url) {
|
|
|
|
|
// if (secondOpen === -1) {
|
|
|
|
|
// setSecondOpen(k)
|
|
|
|
|
// } else {
|
|
|
|
|
// setSecondOpen(-1)
|
|
|
|
|
// }
|
|
|
|
|
if (isOpen.includes(v.id)) {
|
|
|
|
|
setIsOpen(isOpen.filter(function (item) {
|
|
|
|
|
return item != v.id;
|
|
|
|
|
}));
|
|
|
|
|
} else {
|
|
|
|
|
setIsOpen([].concat(toConsumableArray_default()(isOpen), [v.id]));
|
|
|
|
|
}
|
|
|
|
|
if (secondOpen.includes(k)) {
|
|
|
|
|
secondOpen.splice(secondOpen.indexOf(k), 1);
|
|
|
|
|
if (secondOpen.includes(k)) {
|
|
|
|
|
@ -3774,13 +3877,13 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
setSecondOpen(toConsumableArray_default()(secondOpen));
|
|
|
|
|
} else {
|
|
|
|
|
v.type == "new_graduation" ? window.open(v.category_url) : _umi_production_exports.history.push(v.category_url);
|
|
|
|
|
_umi_production_exports.history.push(v.category_url);
|
|
|
|
|
scrollToBody();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
padding: "13px 0 13px 24px"
|
|
|
|
|
padding: '13px 0 13px 24px'
|
|
|
|
|
},
|
|
|
|
|
align: "middle",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
@ -3793,182 +3896,34 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
className: "tr",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ShixunDetailmodules.totalCount,
|
|
|
|
|
children: v.task_count === 0 ? "" : v.task_count
|
|
|
|
|
}), (0,authority/* isAdmins */.eB)() && v.type !== 'statistics' && v.type !== 'ecs' && v.type !== "new_graduation" && /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
|
|
|
children: v.task_count === 0 ? '' : v.task_count
|
|
|
|
|
}), (0,authority/* isAdmins */.eB)() && v.type !== 'statistics' && v.type !== 'ecs' && /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
|
|
return trigger.parentNode;
|
|
|
|
|
},
|
|
|
|
|
destroyTooltipOnHide: true,
|
|
|
|
|
placement: "right",
|
|
|
|
|
content: function content() {
|
|
|
|
|
return _content(v, 1);
|
|
|
|
|
return _content2(v, 1);
|
|
|
|
|
},
|
|
|
|
|
trigger: "hover",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ["iconfont icon-sandian", ShixunDetailmodules.actions].join(" ")
|
|
|
|
|
className: ['iconfont icon-sandian', ShixunDetailmodules.actions].join(' ')
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* DragDropContext */.Z5, {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Leftitem, {
|
|
|
|
|
value: objectSpread2_default()(objectSpread2_default()({}, v), {}, {
|
|
|
|
|
itemDraggableId: "".concat(k)
|
|
|
|
|
}),
|
|
|
|
|
index: k,
|
|
|
|
|
layNum: 2,
|
|
|
|
|
onDragEnd: onDragEnd,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Droppable */.bK, {
|
|
|
|
|
isDropDisabled: (0,authority/* isAdmin */.GJ)() ? false : true,
|
|
|
|
|
droppableId: String(v.id),
|
|
|
|
|
children: function children(provided, snapshot) {
|
|
|
|
|
var _v$second_category;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
ref: provided.innerRef
|
|
|
|
|
}, provided.droppableProps), {}, {
|
|
|
|
|
onScroll: function onScroll() {},
|
|
|
|
|
className: secondOpen.includes(k) ? ShixunDetailmodules.open : '',
|
|
|
|
|
children: (_v$second_category = v.second_category) === null || _v$second_category === void 0 ? void 0 : _v$second_category.map(function (val, key) {
|
|
|
|
|
var _val$category_id;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Draggable */._l, {
|
|
|
|
|
draggableId: "".concat((_val$category_id = val.category_id) === null || _val$category_id === void 0 ? void 0 : _val$category_id.toString(), "-").concat(k, "-").concat(key),
|
|
|
|
|
index: key,
|
|
|
|
|
children: function children(provided, snapshot) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
ref: provided.innerRef
|
|
|
|
|
}, provided.draggableProps), provided.dragHandleProps), {}, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
|
|
className: location.pathname.indexOf(val.second_category_url) > -1 ? ShixunDetailmodules.actived2 : '',
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
span: 20,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
|
|
className: ["font14", ShixunDetailmodules.menuText].join(" "),
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 16,
|
|
|
|
|
padding: '16px 2px'
|
|
|
|
|
},
|
|
|
|
|
to: val.second_category_url,
|
|
|
|
|
onClick: function onClick(e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
if (location.pathname.indexOf(val.second_category_url) > -1) {
|
|
|
|
|
// if (thirdOpen === -1) {
|
|
|
|
|
// setThirdOpen(key)
|
|
|
|
|
// } else {
|
|
|
|
|
// setThirdOpen(-1)
|
|
|
|
|
// }
|
|
|
|
|
if (thirdOpen.includes(key)) {
|
|
|
|
|
thirdOpen.splice(thirdOpen.indexOf(key), 1);
|
|
|
|
|
} else {
|
|
|
|
|
thirdOpen.push(key);
|
|
|
|
|
}
|
|
|
|
|
setThirdOpen(toConsumableArray_default()(thirdOpen));
|
|
|
|
|
} else {
|
|
|
|
|
if (!thirdOpen.includes(key)) thirdOpen.push(key);
|
|
|
|
|
setThirdOpen(toConsumableArray_default()(thirdOpen));
|
|
|
|
|
if (['shixun_homework', 'hack', 'common_homework', 'group_homework'].includes(val.category_type)) {
|
|
|
|
|
// history.replace(val.second_category_url+'?tabs=0')
|
|
|
|
|
_umi_production_exports.history.replace("".concat(val.second_category_url, "?tabs=0"));
|
|
|
|
|
} else if (['exercise'].includes(val.category_type)) {
|
|
|
|
|
_umi_production_exports.history.replace(val.second_category_url + '?tabs=all');
|
|
|
|
|
} else {
|
|
|
|
|
_umi_production_exports.history.replace(val.second_category_url);
|
|
|
|
|
}
|
|
|
|
|
scrollToBody();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
children: val.category_name
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
span: 4,
|
|
|
|
|
className: "tr",
|
|
|
|
|
children: [(0,authority/* isAdmins */.eB)() && v.type.indexOf('statistics') < 0 && (val === null || val === void 0 ? void 0 : val.category_name) !== '未分配目录' && /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
|
|
|
autoAdjustOverflow: false,
|
|
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
|
|
return trigger.parentNode.parentNode;
|
|
|
|
|
},
|
|
|
|
|
placement: "right",
|
|
|
|
|
content: function content() {
|
|
|
|
|
return _content(val, 2);
|
|
|
|
|
},
|
|
|
|
|
trigger: "hover",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ["iconfont icon-sandian", ShixunDetailmodules.actions].join(" ")
|
|
|
|
|
})
|
|
|
|
|
}), val.category_count != 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ShixunDetailmodules.totalCount,
|
|
|
|
|
children: val.category_count
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), val.third_category && /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* DragDropContext */.Z5, {
|
|
|
|
|
onDragEnd: onDragEnd,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Droppable */.bK, {
|
|
|
|
|
isDropDisabled: (0,authority/* isAdmin */.GJ)() ? false : true,
|
|
|
|
|
droppableId: String(val.category_id),
|
|
|
|
|
children: function children(provided, snapshot) {
|
|
|
|
|
var _val$third_category;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
ref: provided.innerRef
|
|
|
|
|
}, provided.droppableProps), {}, {
|
|
|
|
|
onScroll: function onScroll() {},
|
|
|
|
|
className: thirdOpen.includes(key) ? ShixunDetailmodules.open : '',
|
|
|
|
|
children: (_val$third_category = val.third_category) === null || _val$third_category === void 0 ? void 0 : _val$third_category.map(function (value, index) {
|
|
|
|
|
var _value$category_id;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Draggable */._l, {
|
|
|
|
|
draggableId: "".concat((_value$category_id = value.category_id) === null || _value$category_id === void 0 ? void 0 : _value$category_id.toString(), "-").concat(k, "-").concat(key, "-").concat(index),
|
|
|
|
|
index: index,
|
|
|
|
|
children: function children(provided, snapshot) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
ref: provided.innerRef
|
|
|
|
|
}, provided.draggableProps), provided.dragHandleProps), {}, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: location.pathname.indexOf(value.second_category_url) > -1 && ShixunDetailmodules.actived2,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
flex: "1",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
|
|
className: ["font14", ShixunDetailmodules.menuText].join(" "),
|
|
|
|
|
to: getLink(value, 3),
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 9,
|
|
|
|
|
padding: '16px 0px',
|
|
|
|
|
width: '85%'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
scrollToBody();
|
|
|
|
|
},
|
|
|
|
|
children: value.category_name
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [(0,authority/* isAdmins */.eB)() && /*#__PURE__*/(0,jsx_runtime.jsx)(popover/* default */.Z, {
|
|
|
|
|
placement: "right",
|
|
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
|
|
return trigger.parentNode.parentNode;
|
|
|
|
|
},
|
|
|
|
|
content: function content() {
|
|
|
|
|
return _content(value, 3);
|
|
|
|
|
},
|
|
|
|
|
trigger: "hover",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ["iconfont icon-sandian", ShixunDetailmodules.actions].join(" ")
|
|
|
|
|
})
|
|
|
|
|
}), value.category_count != 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ShixunDetailmodules.totalCount,
|
|
|
|
|
children: value.category_count
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), index);
|
|
|
|
|
}
|
|
|
|
|
}, value.category_id);
|
|
|
|
|
})
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), key);
|
|
|
|
|
}
|
|
|
|
|
}, val.category_id);
|
|
|
|
|
})
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
golink: golink,
|
|
|
|
|
getLink: getLink,
|
|
|
|
|
content: _content2,
|
|
|
|
|
isOpen: isOpen
|
|
|
|
|
})]
|
|
|
|
|
}, k);
|
|
|
|
|
}), (0,authority/* isAdmins */.eB)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -3977,7 +3932,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
setIsshowModal(true);
|
|
|
|
|
getmodules();
|
|
|
|
|
},
|
|
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
children: [' ', /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 6
|
|
|
|
|
},
|
|
|
|
|
@ -3991,11 +3946,11 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var LeftMenus = ((0,_umi_production_exports.connect)(function (_ref9) {
|
|
|
|
|
var classroomList = _ref9.classroomList,
|
|
|
|
|
loading = _ref9.loading,
|
|
|
|
|
globalSetting = _ref9.globalSetting,
|
|
|
|
|
user = _ref9.user;
|
|
|
|
|
/* harmony default export */ var LeftMenus = ((0,_umi_production_exports.connect)(function (_ref10) {
|
|
|
|
|
var classroomList = _ref10.classroomList,
|
|
|
|
|
loading = _ref10.loading,
|
|
|
|
|
globalSetting = _ref10.globalSetting,
|
|
|
|
|
user = _ref10.user;
|
|
|
|
|
return {
|
|
|
|
|
classroomList: classroomList,
|
|
|
|
|
globalSetting: globalSetting,
|