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.
383 lines
16 KiB
383 lines
16 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[14610],{
|
|
|
|
/***/ 87169:
|
|
/*!*******************************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
|
|
\*******************************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_ExclamationCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.28.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(60499);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(7657);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_ExclamationCircleOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_ExclamationCircleOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 48887:
|
|
/*!******************************************************************!*\
|
|
!*** ./src/pages/User/Detail/LearningPath/index.tsx + 1 modules ***!
|
|
\******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ LearningPath; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(25789);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// 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__(1710);
|
|
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
|
|
var verifyLogin = __webpack_require__(27125);
|
|
// EXTERNAL MODULE: ./src/service/shixuns.ts
|
|
var shixuns = __webpack_require__(22158);
|
|
// EXTERNAL MODULE: ./src/pages/tasks/vnc-view/index.less
|
|
var vnc_view = __webpack_require__(57065);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.19@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(66649);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/LearningPath/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var LearningPathmodules = ({"flex_box_center":"flex_box_center___ncKvk","flex_space_between":"flex_space_between___PkV7C","flex_box_vertical_center":"flex_box_vertical_center___Z_0oH","flex_box_center_end":"flex_box_center_end___QEXUZ","flex_box_column":"flex_box_column___KwQLG","flex-col":"flex-col___nfDfP","flex-row":"flex-row___yuuoy","justify-start":"justify-start___Ns1yo","justify-center":"justify-center___ikvDR","justify-end":"justify-end___yXeIm","justify-evenly":"justify-evenly___qLy_g","justify-around":"justify-around___c6aEn","justify-between":"justify-between___e0Hjx","align-start":"align-start___pzECK","align-center":"align-center___jzohh","align-end":"align-end___Y9ScK","ul":"ul___F_zFi"});
|
|
// EXTERNAL MODULE: ./src/service/user.ts
|
|
var service_user = __webpack_require__(98971);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/LearningPath/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["classroomList", "globalSetting", "loading", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('ZH-cn');
|
|
var ClassroomListPage = function ClassroomListPage(_ref) {
|
|
var classroomList = _ref.classroomList,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
data = _useState2[0],
|
|
setData = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(""),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
subjectName = _useState4[0],
|
|
setSubjectName = _useState4[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData();
|
|
}, []);
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,service_user/* getUserLearnPath */.nV)();
|
|
case 2:
|
|
res = _context.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setSubjectName(res.subject_name);
|
|
setData(toConsumableArray_default()(res.data));
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleStartGame = function handleStartGame(item) {
|
|
if (!(0,verifyLogin/* handleVerify */.tJ)(dispatch)) {
|
|
return;
|
|
}
|
|
if (item.is_jupyter || item.is_jupyter_lab) {
|
|
dispatch({
|
|
type: 'shixunsDetail/execJupyter',
|
|
payload: {
|
|
id: item.identifier
|
|
}
|
|
}).then(function (response) {
|
|
if (response !== null && response !== void 0 && response.identifier) {
|
|
_umi_production_exports.history === null || _umi_production_exports.history === void 0 || _umi_production_exports.history.push("/tasks/".concat(response.identifier, "/jupyter"));
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
dispatch({
|
|
type: 'shixunsDetail/execShixun',
|
|
payload: {
|
|
id: item.identifier
|
|
}
|
|
}).then(function (execRes) {
|
|
if (execRes !== null && execRes !== void 0 && execRes.game_identifier) {
|
|
_umi_production_exports.history === null || _umi_production_exports.history === void 0 || _umi_production_exports.history.push("/tasks/".concat(execRes.game_identifier));
|
|
return;
|
|
}
|
|
if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 2) {
|
|
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message);
|
|
} else if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 3) {
|
|
handleInBeta(execRes === null || execRes === void 0 ? void 0 : execRes.message);
|
|
}
|
|
});
|
|
};
|
|
var handleResetGame = function handleResetGame(url) {
|
|
var _url;
|
|
url = (_url = url) !== null && _url !== void 0 && _url.includes('.json') ? url : "".concat(url, ".json");
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
title: '提示',
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "tc font16",
|
|
children: "\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"
|
|
}),
|
|
onOk: function () {
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var res, execRes;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return (0,shixuns/* resetMyGame */.$Q)({
|
|
url: url
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
if (res) {
|
|
_context2.next = 5;
|
|
break;
|
|
}
|
|
return _context2.abrupt("return");
|
|
case 5:
|
|
message/* default */.ZP.success("重置成功,正在进入实践项目!");
|
|
_context2.next = 8;
|
|
return (0,shixuns/* execShixun */.Ir)({
|
|
id: res.shixun_identifier
|
|
});
|
|
case 8:
|
|
execRes = _context2.sent;
|
|
if (!(execRes !== null && execRes !== void 0 && execRes.game_identifier)) {
|
|
_context2.next = 12;
|
|
break;
|
|
}
|
|
_umi_production_exports.history === null || _umi_production_exports.history === void 0 || _umi_production_exports.history.push("/tasks/".concat(execRes.game_identifier));
|
|
return _context2.abrupt("return");
|
|
case 12:
|
|
if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 2) {
|
|
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message);
|
|
} else if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 3) {
|
|
handleInBeta(execRes === null || execRes === void 0 ? void 0 : execRes.message);
|
|
}
|
|
case 13:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
function onOk() {
|
|
return _onOk.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
};
|
|
var handleInBeta = function handleInBeta(message) {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
title: '提示',
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "tc font16",
|
|
children: ["\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E", message, "\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01"]
|
|
})
|
|
});
|
|
};
|
|
var columns = [{
|
|
title: '序号',
|
|
dataIndex: 'identifier',
|
|
key: 'identifier',
|
|
render: function render(text, record, index) {
|
|
return index + 1;
|
|
}
|
|
}, {
|
|
title: '实践项目名称',
|
|
dataIndex: 'shixun_name',
|
|
width: "60%",
|
|
ellipsis: true,
|
|
key: 'shixun_name'
|
|
}, {
|
|
title: '学习进度',
|
|
dataIndex: 'challenges_count',
|
|
key: 'challenges_count',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [record.leaning_challenge_count, "/", text]
|
|
});
|
|
}
|
|
}, {
|
|
title: '状态',
|
|
dataIndex: 'challenges_count',
|
|
key: 'challenges_count',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: record.leaning_challenge_count == text ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-green",
|
|
children: "\u5DF2\u5B8C\u6210"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-red",
|
|
children: "\u672A\u5B8C\u6210"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
dataIndex: 'shixun_name',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick() {
|
|
return handleStartGame(record);
|
|
},
|
|
className: "c-blue current",
|
|
children: "\u5F00\u542F\u6311\u6218"
|
|
});
|
|
}
|
|
}];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "edu-container minH500",
|
|
style: {
|
|
width: '1200px',
|
|
marginTop: '40px',
|
|
marginBottom: '20px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "280px",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("ul", {
|
|
className: LearningPathmodules.ul,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
children: subjectName
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1px"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
className: "bg-white p20",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
dataSource: data || [],
|
|
columns: columns
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var LearningPath = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var classroomList = _ref3.classroomList,
|
|
loading = _ref3.loading,
|
|
globalSetting = _ref3.globalSetting,
|
|
user = _ref3.user;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.classroomList,
|
|
user: user
|
|
};
|
|
})(ClassroomListPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 57065:
|
|
/*!*********************************************!*\
|
|
!*** ./src/pages/tasks/vnc-view/index.less ***!
|
|
\*********************************************/
|
|
/***/ (function() {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |