diff --git a/53057.async.js b/53057.async.js index 29dca06a68..d0b36d863c 100644 --- a/53057.async.js +++ b/53057.async.js @@ -1404,7 +1404,6 @@ var env = __webpack_require__(59758); - var User_excluded = ["homePage", "user", "globalSetting", "loading", "dispatch", "shixunHomeworks", "location", "payload"]; @@ -1582,36 +1581,30 @@ var User = function User(_ref) { return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: - localStorage.setItem("loginOut", "true"); - _context.next = 3; + (0,util/* clearAllCookies */.m5)(); + _context.prev = 1; + _context.next = 4; return (0,service_user/* LoginOut */.vR)({}); - case 3: + case 4: res = _context.sent; - if ((res === null || res === void 0 ? void 0 : res.status) === 1) { - dispatch({ - type: 'user/getUserInfo', - payload: objectSpread2_default()({}, payload) - }); - dispatch({ - type: 'user/getNavigationInfo', - payload: objectSpread2_default()({}, payload) - }); - localStorage.removeItem("loginOut"); - delCookie('autologin_trustie'); - delCookie('_educoder_session'); - localStorage.removeItem('isfirst'); - localStorage.removeItem('SystemUpdateadvtime'); - localStorage.removeItem('item'); - localStorage.removeItem('iscreate'); - // localStorage.removeItem('CCshow') - message/* default.success */.ZP.success(res === null || res === void 0 ? void 0 : res.message); - _umi_production_exports.history.replace('/'); - } - case 5: + message/* default.success */.ZP.success(res === null || res === void 0 ? void 0 : res.message); + _context.next = 10; + break; + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](1); + case 10: + localStorage.removeItem('isfirst'); + localStorage.removeItem('SystemUpdateadvtime'); + localStorage.removeItem('item'); + localStorage.removeItem('iscreate'); + // localStorage.removeItem('CCshow') + _umi_production_exports.history.replace('/'); + case 15: case "end": return _context.stop(); } - }, _callee); + }, _callee, null, [[1, 8]]); })), children: "\u9000\u51FA" }) diff --git a/p__Classrooms__Lists__OnlineLearning__index.async.js b/p__Classrooms__Lists__OnlineLearning__index.async.js index 992263c17b..fb275ac1ce 100644 --- a/p__Classrooms__Lists__OnlineLearning__index.async.js +++ b/p__Classrooms__Lists__OnlineLearning__index.async.js @@ -6937,7 +6937,7 @@ var exercise = __webpack_require__(51412); var shixuns = __webpack_require__(56088); ;// CONCATENATED MODULE: ./src/pages/Paths/Detail/components/Sort/index.less?modules // extracted by mini-css-extract-plugin -/* harmony default export */ var Sortmodules = ({"tree":"tree___SHCwq","learn":"learn___buOG9","name":"name___dwQwe","sign":"sign___aQzc5","pdf_name":"pdf_name___m1wEX","name_style":"name_style___CnJ7d"}); +/* harmony default export */ var Sortmodules = ({"tree":"tree___SHCwq","learn":"learn___buOG9","name":"name___dwQwe","sign":"sign___aQzc5","pdf_name":"pdf_name___m1wEX","name_style":"name_style___CnJ7d","color333":"color333___TbHdH"}); // EXTERNAL MODULE: ./node_modules/lodash/lodash.js var lodash = __webpack_require__(96486); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DownOutlined.js + 1 modules @@ -7237,7 +7237,8 @@ var SendToClassModal = function SendToClassModal(_ref) { }; var onDrop = /*#__PURE__*/function () { var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(info) { - var dropKey, dragKey, dropPos, dropPosition, loop, data, dragObj, ar, i; + var _info$dragNode, _info$node, _info$dragNode2, _info$node2; + var dropKey, dragKey, dropPos, dropPosition, datas, loop, data, dragObj, ar, i; return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { case 0: @@ -7264,6 +7265,20 @@ var SendToClassModal = function SendToClassModal(_ref) { } return _context4.abrupt("return", false); case 11: + // 所以内容只能拖入文件夹StageCatalog 不能拖入其余类型 且 + datas = ['Attachment', 'Hack', 'Shixun', 'SubjectHomework', 'Videoltem']; //文件层集合数组datas + if (!(datas.includes((_info$dragNode = info.dragNode) === null || _info$dragNode === void 0 ? void 0 : _info$dragNode.item_type) && ((_info$node = info.node) === null || _info$node === void 0 ? void 0 : _info$node.item_type) != 'StageCatalog' && dropPosition === 0)) { + _context4.next = 14; + break; + } + return _context4.abrupt("return", false); + case 14: + if (!(((_info$dragNode2 = info.dragNode) === null || _info$dragNode2 === void 0 ? void 0 : _info$dragNode2.item_type) === 'StageCatalog' && datas.includes((_info$node2 = info.node) === null || _info$node2 === void 0 ? void 0 : _info$node2.item_type) && dropPosition === 0)) { + _context4.next = 16; + break; + } + return _context4.abrupt("return", false); + case 16: loop = function loop(data, key, callback) { for (var i = 0; i < data.length; i++) { if (data[i].key === key) { @@ -7310,17 +7325,17 @@ var SendToClassModal = function SendToClassModal(_ref) { ar.splice(i + 1, 0, dragObj); } } - _context4.next = 17; + _context4.next = 22; return updateSort({ stage_id: props.stage_id, list: data }); - case 17: + case 22: loopIndex(data, 0, 0, true); console.log('data:', data); setGdata(toConsumableArray_default()(data)); setOpenkeys([].concat(toConsumableArray_default()(openkeys), [info.node.key])); - case 21: + case 26: case "end": return _context4.stop(); } @@ -7589,12 +7604,13 @@ var SendToClassModal = function SendToClassModal(_ref) { children: loadIcon(nodeData) }), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, { flex: "1", - className: "c-grey-333", + className: Sortmodules.color333, style: { display: 'flex' }, children: [props.cust_seq && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: "mr10" + className: "".concat(Sortmodules.color333, " mr10") + // style={{flexShrink:0}} , children: nodeData.index diff --git a/p__Classrooms__Lists__OnlineLearning__index.chunk.css b/p__Classrooms__Lists__OnlineLearning__index.chunk.css index b68e5a29f8..13545fa240 100644 --- a/p__Classrooms__Lists__OnlineLearning__index.chunk.css +++ b/p__Classrooms__Lists__OnlineLearning__index.chunk.css @@ -470,9 +470,12 @@ .tree___SHCwq [class~='drag-over'] * { color: white; } -.tree___SHCwq [class~='ant-tree-treenode']:has([class~='ant-tree-title']:empty ) { +.tree___SHCwq [class~='ant-tree-treenode']:has([class~='ant-tree-title']:empty) { display: none; } +.tree___SHCwq [class~="ant-tree-draggable-icon"] { + visibility: hidden; +} .tree___SHCwq [class~='ant-row'] { min-height: 40px; padding: 0 20px 0 0; @@ -519,6 +522,7 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + color: #3061d0 !important; } .name_style___CnJ7d { display: inline-block; @@ -526,6 +530,10 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + color: #333 !important; +} +.color333___TbHdH { + color: #333 !important; } /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ diff --git a/p__Competitions__Index__index.async.js b/p__Competitions__Index__index.async.js index df0103f7ee..a61124563c 100644 --- a/p__Competitions__Index__index.async.js +++ b/p__Competitions__Index__index.async.js @@ -1921,7 +1921,7 @@ var Index_competitionsPage = function competitionsPage(_ref) { if (!(0,verifyLogin/* handleVerify */.tJ)(dispatch)) { return; } - if ((0,authority/* isAdmins */.eB)() || (_user$userInfo3 = user.userInfo) !== null && _user$userInfo3 !== void 0 && _user$userInfo3.professional_certification && (_user$userInfo4 = user.userInfo) !== null && _user$userInfo4 !== void 0 && _user$userInfo4.is_teacher) { + if ((0,authority/* isSuperAdmins */.Ny)() || (_user$userInfo3 = user.userInfo) !== null && _user$userInfo3 !== void 0 && _user$userInfo3.professional_certification && (_user$userInfo4 = user.userInfo) !== null && _user$userInfo4 !== void 0 && _user$userInfo4.is_teacher) { form.setFieldValue('name', ''); setiscreate(true); } else { diff --git a/p__Paths__Detail__id.async.js b/p__Paths__Detail__id.async.js index 34ce994fbe..63e6fac074 100644 --- a/p__Paths__Detail__id.async.js +++ b/p__Paths__Detail__id.async.js @@ -17177,6 +17177,10 @@ var knowledge_Atlas = function Atlas(_ref) { bounds = _useState48[0], setBounds = _useState48[1]; var draggleRef = (0,react.useRef)(null); + var _useState49 = (0,react.useState)(false), + _useState50 = slicedToArray_default()(_useState49, 2), + threenodata = _useState50[0], + setThreenodata = _useState50[1]; var _onStart = function onStart(_event, uiData) { var _draggleRef$current; var _window$document$docu = window.document.documentElement, @@ -17190,10 +17194,10 @@ var knowledge_Atlas = function Atlas(_ref) { bottom: clientHeight - (targetRect.bottom - uiData.y) - 70 }); }; - var _useState49 = (0,react.useState)(600), - _useState50 = slicedToArray_default()(_useState49, 2), - widths = _useState50[0], - setwidths = _useState50[1]; + var _useState51 = (0,react.useState)(600), + _useState52 = slicedToArray_default()(_useState51, 2), + widths = _useState52[0], + setwidths = _useState52[1]; (0,react.useEffect)(function () { setdatas({}); getdatas(); @@ -19114,18 +19118,23 @@ var knowledge_Atlas = function Atlas(_ref) { return item.key; }); setExpandedKeys(newExpandedKeys); + if (newExpandedKeys.length <= 0) { + setThreenodata(true); + } else { + setThreenodata(false); + } setAutoExpandParent(true); setSearchValue(e.target.value); // console.log(newExpandedKeys); } - }), /*#__PURE__*/(0,jsx_runtime.jsx)(tree/* default */.Z, { + }), threenodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tree/* default */.Z, { onExpand: function onExpand(newExpandedKeys) { setExpandedKeys(newExpandedKeys); setAutoExpandParent(false); }, style: { - maxHeight: 300, - height: 300, + maxHeight: 400, + height: 400, marginTop: 20, overflow: 'auto' }, @@ -19442,7 +19451,7 @@ var exercise = __webpack_require__(51412); var shixuns = __webpack_require__(56088); ;// CONCATENATED MODULE: ./src/pages/Paths/Detail/components/Sort/index.less?modules // extracted by mini-css-extract-plugin -/* harmony default export */ var Sortmodules = ({"tree":"tree___SHCwq","learn":"learn___buOG9","name":"name___dwQwe","sign":"sign___aQzc5","pdf_name":"pdf_name___m1wEX","name_style":"name_style___CnJ7d"}); +/* harmony default export */ var Sortmodules = ({"tree":"tree___SHCwq","learn":"learn___buOG9","name":"name___dwQwe","sign":"sign___aQzc5","pdf_name":"pdf_name___m1wEX","name_style":"name_style___CnJ7d","color333":"color333___TbHdH"}); // EXTERNAL MODULE: ./node_modules/lodash/lodash.js var lodash = __webpack_require__(96486); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DownOutlined.js + 1 modules @@ -19742,7 +19751,8 @@ var SendToClassModal = function SendToClassModal(_ref) { }; var onDrop = /*#__PURE__*/function () { var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(info) { - var dropKey, dragKey, dropPos, dropPosition, loop, data, dragObj, ar, i; + var _info$dragNode, _info$node, _info$dragNode2, _info$node2; + var dropKey, dragKey, dropPos, dropPosition, datas, loop, data, dragObj, ar, i; return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { case 0: @@ -19769,6 +19779,20 @@ var SendToClassModal = function SendToClassModal(_ref) { } return _context4.abrupt("return", false); case 11: + // 所以内容只能拖入文件夹StageCatalog 不能拖入其余类型 且 + datas = ['Attachment', 'Hack', 'Shixun', 'SubjectHomework', 'Videoltem']; //文件层集合数组datas + if (!(datas.includes((_info$dragNode = info.dragNode) === null || _info$dragNode === void 0 ? void 0 : _info$dragNode.item_type) && ((_info$node = info.node) === null || _info$node === void 0 ? void 0 : _info$node.item_type) != 'StageCatalog' && dropPosition === 0)) { + _context4.next = 14; + break; + } + return _context4.abrupt("return", false); + case 14: + if (!(((_info$dragNode2 = info.dragNode) === null || _info$dragNode2 === void 0 ? void 0 : _info$dragNode2.item_type) === 'StageCatalog' && datas.includes((_info$node2 = info.node) === null || _info$node2 === void 0 ? void 0 : _info$node2.item_type) && dropPosition === 0)) { + _context4.next = 16; + break; + } + return _context4.abrupt("return", false); + case 16: loop = function loop(data, key, callback) { for (var i = 0; i < data.length; i++) { if (data[i].key === key) { @@ -19815,17 +19839,17 @@ var SendToClassModal = function SendToClassModal(_ref) { ar.splice(i + 1, 0, dragObj); } } - _context4.next = 17; + _context4.next = 22; return updateSort({ stage_id: props.stage_id, list: data }); - case 17: + case 22: loopIndex(data, 0, 0, true); console.log('data:', data); setGdata(toConsumableArray_default()(data)); setOpenkeys([].concat(toConsumableArray_default()(openkeys), [info.node.key])); - case 21: + case 26: case "end": return _context4.stop(); } @@ -20094,12 +20118,13 @@ var SendToClassModal = function SendToClassModal(_ref) { children: loadIcon(nodeData) }), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, { flex: "1", - className: "c-grey-333", + className: Sortmodules.color333, style: { display: 'flex' }, children: [props.cust_seq && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: "mr10" + className: "".concat(Sortmodules.color333, " mr10") + // style={{flexShrink:0}} , children: nodeData.index diff --git a/p__Paths__Detail__id.chunk.css b/p__Paths__Detail__id.chunk.css index 9ceaf025a4..8f092d2479 100644 --- a/p__Paths__Detail__id.chunk.css +++ b/p__Paths__Detail__id.chunk.css @@ -3925,9 +3925,12 @@ span.CodeMirror-selectedtext { .tree___SHCwq [class~='drag-over'] * { color: white; } -.tree___SHCwq [class~='ant-tree-treenode']:has([class~='ant-tree-title']:empty ) { +.tree___SHCwq [class~='ant-tree-treenode']:has([class~='ant-tree-title']:empty) { display: none; } +.tree___SHCwq [class~="ant-tree-draggable-icon"] { + visibility: hidden; +} .tree___SHCwq [class~='ant-row'] { min-height: 40px; padding: 0 20px 0 0; @@ -3974,6 +3977,7 @@ span.CodeMirror-selectedtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + color: #3061d0 !important; } .name_style___CnJ7d { display: inline-block; @@ -3981,6 +3985,10 @@ span.CodeMirror-selectedtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + color: #333 !important; +} +.color333___TbHdH { + color: #333 !important; } /*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ diff --git a/p__virtualSpaces__Lists__Knowledge__index.async.js b/p__virtualSpaces__Lists__Knowledge__index.async.js index ea7e9553ca..b3a9826f37 100644 --- a/p__virtualSpaces__Lists__Knowledge__index.async.js +++ b/p__virtualSpaces__Lists__Knowledge__index.async.js @@ -3886,6 +3886,10 @@ var Atlas = function Atlas(_ref) { var draggleRef = (0,react.useRef)(null); var virtualSpacesDetails = virtualSpaces.virtualSpacesDetails; var permission = (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.is_member) || (0,authority/* isSuperAdmins */.Ny)(); + var _useState49 = (0,react.useState)(false), + _useState50 = slicedToArray_default()(_useState49, 2), + threenodata = _useState50[0], + setThreenodata = _useState50[1]; var _onStart = function onStart(_event, uiData) { var _draggleRef$current; var _window$document$docu = window.document.documentElement, @@ -3899,10 +3903,10 @@ var Atlas = function Atlas(_ref) { bottom: clientHeight - (targetRect.bottom - uiData.y) - 70 }); }; - var _useState49 = (0,react.useState)(600), - _useState50 = slicedToArray_default()(_useState49, 2), - widths = _useState50[0], - setwidths = _useState50[1]; + var _useState51 = (0,react.useState)(600), + _useState52 = slicedToArray_default()(_useState51, 2), + widths = _useState52[0], + setwidths = _useState52[1]; (0,react.useEffect)(function () { setdatas({}); getdatas(); @@ -5784,18 +5788,23 @@ var Atlas = function Atlas(_ref) { return item.key; }); setExpandedKeys(newExpandedKeys); + if (newExpandedKeys.length <= 0) { + setThreenodata(true); + } else { + setThreenodata(false); + } setAutoExpandParent(true); setSearchValue(e.target.value); // console.log(newExpandedKeys); } - }), /*#__PURE__*/(0,jsx_runtime.jsx)(tree/* default */.Z, { + }), threenodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tree/* default */.Z, { onExpand: function onExpand(newExpandedKeys) { setExpandedKeys(newExpandedKeys); setAutoExpandParent(false); }, style: { - maxHeight: 300, - height: 300, + maxHeight: 400, + height: 400, marginTop: 20, overflow: 'auto' }, diff --git a/umi.js b/umi.js index a6652c89ac..bc9c31fb96 100644 --- a/umi.js +++ b/umi.js @@ -75064,6 +75064,7 @@ function del(url, params) { /* harmony export */ "kk": function() { return /* binding */ pointerEvents; }, /* harmony export */ "lC": function() { return /* binding */ HomeWorkListStatus; }, /* harmony export */ "li": function() { return /* binding */ toTimeFormat; }, +/* harmony export */ "m5": function() { return /* binding */ clearAllCookies; }, /* harmony export */ "nr": function() { return /* binding */ startExercise; }, /* harmony export */ "oP": function() { return /* binding */ getJsonFromUrl; }, /* harmony export */ "oV": function() { return /* binding */ ZimuSort; }, @@ -75937,6 +75938,17 @@ function setCookie(cname, cvalue, exdays) { var delCookie = function delCookie(name) { document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;'; }; + +// 清除所有cookie +var clearAllCookies = function clearAllCookies() { + var cookies = document.cookie.split(";"); + for (var i = 0; i < cookies.length; i++) { + var cookie = cookies[i]; + var eqPos = cookie.indexOf("="); + var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; + document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; + } +}; function downLoadLink(title, url) { var link = document.createElement('a'); document.body.appendChild(link);