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.
252 lines
9.9 KiB
252 lines
9.9 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[4610],{
|
|
|
|
/***/ 45634:
|
|
/*!*********************************************!*\
|
|
!*** ./src/pages/tasks/vnc-view/index.less ***!
|
|
\*********************************************/
|
|
/***/ (function() {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 73601:
|
|
/*!******************************************************************!*\
|
|
!*** ./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/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// 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__(86383);
|
|
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
|
|
var verifyLogin = __webpack_require__(53140);
|
|
// EXTERNAL MODULE: ./src/service/shixuns.ts
|
|
var shixuns = __webpack_require__(58215);
|
|
// EXTERNAL MODULE: ./src/pages/tasks/vnc-view/index.less
|
|
var vnc_view = __webpack_require__(45634);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
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","ul":"ul___F_zFi"});
|
|
// EXTERNAL MODULE: ./src/service/user.ts
|
|
var service_user = __webpack_require__(63203);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/LearningPath/index.tsx
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && __getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale("ZH-cn");
|
|
const ClassroomListPage = (_a) => {
|
|
var _b = _a, {
|
|
classroomList,
|
|
globalSetting,
|
|
loading,
|
|
user,
|
|
dispatch
|
|
} = _b, props = __objRest(_b, [
|
|
"classroomList",
|
|
"globalSetting",
|
|
"loading",
|
|
"user",
|
|
"dispatch"
|
|
]);
|
|
const params = (0,_umi_production_exports.useParams)();
|
|
const [data, setData] = (0,_react_17_0_2_react.useState)();
|
|
const [subjectName, setSubjectName] = (0,_react_17_0_2_react.useState)("");
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
getData();
|
|
}, []);
|
|
const getData = () => __async(void 0, null, function* () {
|
|
const res = yield (0,service_user/* getUserLearnPath */.nV)();
|
|
if ((res == null ? void 0 : res.status) === 0) {
|
|
setSubjectName(res.subject_name);
|
|
setData([...res.data]);
|
|
}
|
|
});
|
|
const 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((response) => {
|
|
var _a2;
|
|
if (response == null ? void 0 : response.identifier) {
|
|
(_a2 = _umi_production_exports.history) == null ? void 0 : _a2.push(`/tasks/${response.identifier}/jupyter`);
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
dispatch({
|
|
type: "shixunsDetail/execShixun",
|
|
payload: { id: item.identifier }
|
|
}).then((execRes) => {
|
|
var _a2;
|
|
if (execRes == null ? void 0 : execRes.game_identifier) {
|
|
(_a2 = _umi_production_exports.history) == null ? void 0 : _a2.push(`/tasks/${execRes.game_identifier}`);
|
|
return;
|
|
}
|
|
if ((execRes == null ? void 0 : execRes.status) === 2) {
|
|
handleResetGame(execRes == null ? void 0 : execRes.message);
|
|
} else if ((execRes == null ? void 0 : execRes.status) === 3) {
|
|
handleInBeta(execRes == null ? void 0 : execRes.message);
|
|
}
|
|
});
|
|
};
|
|
const handleResetGame = (url) => {
|
|
url = (url == null ? void 0 : url.includes(".json")) ? url : `${url}.json`;
|
|
modal["default"].confirm({
|
|
centered: true,
|
|
title: "\u63D0\u793A",
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
content: /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "tc font16" }, "\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),
|
|
onOk: () => __async(void 0, null, function* () {
|
|
var _a2;
|
|
const res = yield (0,shixuns/* resetMyGame */.$Q)({ url });
|
|
if (!res) {
|
|
return;
|
|
}
|
|
message/* default */.ZP.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF01");
|
|
const execRes = yield (0,shixuns/* execShixun */.Ir)({ id: res.shixun_identifier });
|
|
if (execRes == null ? void 0 : execRes.game_identifier) {
|
|
(_a2 = _umi_production_exports.history) == null ? void 0 : _a2.push(`/tasks/${execRes.game_identifier}`);
|
|
return;
|
|
}
|
|
if ((execRes == null ? void 0 : execRes.status) === 2) {
|
|
handleResetGame(execRes == null ? void 0 : execRes.message);
|
|
} else if ((execRes == null ? void 0 : execRes.status) === 3) {
|
|
handleInBeta(execRes == null ? void 0 : execRes.message);
|
|
}
|
|
})
|
|
});
|
|
};
|
|
const handleInBeta = (message2) => {
|
|
modal["default"].confirm({
|
|
centered: true,
|
|
title: "\u63D0\u793A",
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
content: /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "tc font16" }, "\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E", message2, "\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")
|
|
});
|
|
};
|
|
const columns = [
|
|
{
|
|
title: "\u5E8F\u53F7",
|
|
dataIndex: "identifier",
|
|
key: "identifier",
|
|
render: (text, record, index) => index + 1
|
|
},
|
|
{
|
|
title: "\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0",
|
|
dataIndex: "shixun_name",
|
|
width: "60%",
|
|
ellipsis: true,
|
|
key: "shixun_name"
|
|
},
|
|
{
|
|
title: "\u5B66\u4E60\u8FDB\u5EA6",
|
|
dataIndex: "challenges_count",
|
|
key: "challenges_count",
|
|
render: (text, record) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, record.leaning_challenge_count, "/", text)
|
|
},
|
|
{
|
|
title: "\u72B6\u6001",
|
|
dataIndex: "challenges_count",
|
|
key: "challenges_count",
|
|
render: (text, record) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, record.leaning_challenge_count == text ? /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-green" }, "\u5DF2\u5B8C\u6210") : /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-red" }, "\u672A\u5B8C\u6210"))
|
|
},
|
|
{
|
|
title: "\u64CD\u4F5C",
|
|
dataIndex: "shixun_name",
|
|
render: (text, record, index) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("span", { onClick: () => handleStartGame(record), className: "c-blue current" }, "\u5F00\u542F\u6311\u6218");
|
|
}
|
|
}
|
|
];
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "edu-container minH500", style: { width: "1200px", marginTop: "40px", marginBottom: "20px" } }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: "280px" }, /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: LearningPathmodules.ul }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, subjectName))), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: "1px" }), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: "1", className: "bg-white p20" }, /* @__PURE__ */ _react_17_0_2_react.createElement(table["default"], { dataSource: data || [], columns }))));
|
|
};
|
|
/* harmony default export */ var LearningPath = ((0,_umi_production_exports.connect)(
|
|
({
|
|
classroomList,
|
|
loading,
|
|
globalSetting,
|
|
user
|
|
}) => ({
|
|
classroomList,
|
|
globalSetting,
|
|
loading: loading.models.classroomList,
|
|
user
|
|
})
|
|
)(ClassroomListPage));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |