|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[71783],{
|
|
|
|
|
|
/***/ 64247:
|
|
|
/*!***************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/components/SelectExercise.tsx + 4 modules ***!
|
|
|
\***************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ SelectExercise; }
|
|
|
});
|
|
|
|
|
|
// 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/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// 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/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/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
|
|
|
var tabs = __webpack_require__(99313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// 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/modal/index.js + 16 modules
|
|
|
var es_modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
|
var input_number = __webpack_require__(94001);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(73782);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js
|
|
|
var _react_infinite_scroller_1_2_4_react_infinite_scroller = __webpack_require__(26724);
|
|
|
var _react_infinite_scroller_1_2_4_react_infinite_scroller_default = /*#__PURE__*/__webpack_require__.n(_react_infinite_scroller_1_2_4_react_infinite_scroller);
|
|
|
// 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-resizable@1.11.0@react-resizable/index.js
|
|
|
var _react_resizable_1_11_0_react_resizable = __webpack_require__(9221);
|
|
|
;// CONCATENATED MODULE: ./src/components/ResTable/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/ResTable/resizable.tsx
|
|
|
|
|
|
|
|
|
var _excluded = ["onResize", "width"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ResizeableTitle = function ResizeableTitle(_ref) {
|
|
|
var onResize = _ref.onResize,
|
|
|
width = _ref.width,
|
|
|
restProps = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
if (!width) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("th", objectSpread2_default()({}, restProps));
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_resizable_1_11_0_react_resizable.Resizable, {
|
|
|
width: width,
|
|
|
height: 0,
|
|
|
handle: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "react-resizable-handle",
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
}
|
|
|
}),
|
|
|
onResize: onResize,
|
|
|
draggableOpts: {
|
|
|
enableUserSelectHack: false
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("th", objectSpread2_default()({}, restProps))
|
|
|
});
|
|
|
};
|
|
|
var tableComponent = {
|
|
|
header: {
|
|
|
cell: ResizeableTitle
|
|
|
}
|
|
|
};
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(61998);
|
|
|
;// CONCATENATED MODULE: ./src/components/ResTable/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ResTable_excluded = ["pagination", "resColumns", "dataSource", "onRow"];
|
|
|
/*
|
|
|
* @Author: z-l
|
|
|
* @Date: 2020-11-06 18:10:59
|
|
|
* @LastEditTime: 2020-11-09 15:06:34
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
* @Description: 可拖拽表头 table
|
|
|
* @FilePath: /ppte5yg23/src/components/ResTable/index.tsx
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @description: 可拖拽表头
|
|
|
* @param {*}
|
|
|
* pagination: 分页信息
|
|
|
dataSource: 展示数据
|
|
|
resColumns: 表头
|
|
|
rowSelection?: 可选 多选 单选配置
|
|
|
hideSelectAll?: antd-version@4.3.0 可用 隐藏全选
|
|
|
className?: 自定义样式名称
|
|
|
* @return {*}
|
|
|
*/
|
|
|
var ResTable = function ResTable(_ref) {
|
|
|
var pagination = _ref.pagination,
|
|
|
resColumns = _ref.resColumns,
|
|
|
dataSource = _ref.dataSource,
|
|
|
onRow = _ref.onRow,
|
|
|
restProps = objectWithoutProperties_default()(_ref, ResTable_excluded);
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
isLoading = _useState2[0],
|
|
|
setIsLoading = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([{}]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
Columns = _useState4[0],
|
|
|
setColumns = _useState4[1];
|
|
|
var modelStatusRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var column = resColumns;
|
|
|
column = column.map(function (col, index) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, col), {}, {
|
|
|
onHeaderCell: function onHeaderCell(item) {
|
|
|
return {
|
|
|
width: item.width,
|
|
|
onResize: handleResize(index)
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
setColumns(column);
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
// 每次 更新 把值 复制给 modelStatusRef
|
|
|
modelStatusRef.current = Columns;
|
|
|
}, [Columns]); // 依赖的值 等modelStatus 改变了 才出发里面的值
|
|
|
var handleResize = function handleResize(index) {
|
|
|
return function (e, _ref2) {
|
|
|
var size = _ref2.size;
|
|
|
//console.log(modelStatusRef.current)
|
|
|
// console.log(size);
|
|
|
var nextColumns = toConsumableArray_default()(modelStatusRef.current);
|
|
|
nextColumns[index] = objectSpread2_default()(objectSpread2_default()({}, nextColumns[index]), {}, {
|
|
|
width: size.width
|
|
|
});
|
|
|
setColumns(nextColumns);
|
|
|
// console.log(Columns, nextColumns);
|
|
|
};
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
bordered: true,
|
|
|
components: tableComponent,
|
|
|
columns: Columns,
|
|
|
dataSource: dataSource,
|
|
|
pagination: pagination,
|
|
|
loading: isLoading,
|
|
|
onRow: onRow
|
|
|
}, restProps), {}, {
|
|
|
rowKey: function rowKey(record) {
|
|
|
return record.key || record.id;
|
|
|
}
|
|
|
}))
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_ResTable = (ResTable);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Exercisemodules = ({"flex_box_center":"flex_box_center___iyIe6","flex_space_between":"flex_space_between___g2WjG","flex_box_vertical_center":"flex_box_vertical_center___Tde0v","flex_box_center_end":"flex_box_center_end___W1D5W","flex_box_column":"flex_box_column___ZiFvs","bg":"bg___T2R2s","containerTitle":"containerTitle___yARn_","containerDesc":"containerDesc___fKSYF","menus":"menus___e8wtg","listItem":"listItem___s7xhg","info":"info___Hx2bW","title":"title___W7a1R","titleLeft":"titleLeft___C5r0w","titleRight":"titleRight___g5GZv","acitons":"acitons___H0RU0","move":"move___qYkSy","hideHeadCheckbox":"hideHeadCheckbox___Hq5gw","moveCategory":"moveCategory___bZSGQ","tabSearch":"tabSearch___NaKI4","warpModal":"warpModal___HLUgh","modalColumn":"modalColumn___F7R5w","modalRow":"modalRow___L6ghw","sup":"sup___VGKXV"});
|
|
|
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
|
|
|
var verifyLogin = __webpack_require__(99204);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(65327);
|
|
|
// EXTERNAL MODULE: ./src/components/ReuseShixunModal/index.tsx + 1 modules
|
|
|
var ReuseShixunModal = __webpack_require__(5093);
|
|
|
// EXTERNAL MODULE: ./src/service/global.ts
|
|
|
var global = __webpack_require__(96142);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(3125);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/components/SelectExercise.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TabPane = tabs/* default */.Z.TabPane;
|
|
|
var CuttOffNowShixun = function CuttOffNowShixun(_ref) {
|
|
|
var _teachGroupData$group;
|
|
|
var classroomList = _ref.classroomList,
|
|
|
exercise = _ref.exercise,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
_ref$isVtrs = _ref.isVtrs,
|
|
|
isVtrs = _ref$isVtrs === void 0 ? false : _ref$isVtrs,
|
|
|
handleVtrsOk = _ref.handleVtrsOk;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
var brankList = exercise.brankList;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
hasMore = _useState2[0],
|
|
|
setHasMore = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
btnLoading = _useState4[0],
|
|
|
setBtnLoading = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)("myself"),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
tabKey = _useState6[0],
|
|
|
setTabKey = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
tabData = _useState8[0],
|
|
|
setTabData = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
teachGroupData = _useState10[0],
|
|
|
setTeachGroupData = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
isTeacher = _useState12[0],
|
|
|
setIsTeacher = _useState12[1]; //是否为已认证老师
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
groupIdsInitialValues = _useState14[0],
|
|
|
setGroupIdsInitialValues = _useState14[1];
|
|
|
var scroll = (0,_react_17_0_2_react.useRef)(null);
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
isTips = _useState16[0],
|
|
|
setisTips = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
DetailUrl = _useState18[0],
|
|
|
setDetailUrl = _useState18[1]; //跳转 试卷设置页面
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
EditUrl = _useState20[0],
|
|
|
setEditUrl = _useState20[1]; //跳转 试卷编辑页面
|
|
|
var columns = [{
|
|
|
title: "试卷名称",
|
|
|
dataIndex: "name",
|
|
|
width: 150,
|
|
|
ellipsis: true,
|
|
|
align: 'left'
|
|
|
}, {
|
|
|
title: "知识点",
|
|
|
dataIndex: "course_list_name",
|
|
|
width: 150,
|
|
|
ellipsis: true,
|
|
|
align: 'left'
|
|
|
}, {
|
|
|
title: "类型",
|
|
|
dataIndex: "is_random",
|
|
|
width: 90,
|
|
|
align: 'left',
|
|
|
render: function render(v) {
|
|
|
return v ? '随机组卷' : '人工组卷';
|
|
|
}
|
|
|
}, {
|
|
|
title: "更新时间",
|
|
|
dataIndex: "updated_at",
|
|
|
width: 150,
|
|
|
align: 'left'
|
|
|
}, {
|
|
|
title: "试题数",
|
|
|
dataIndex: "item_num",
|
|
|
width: 60,
|
|
|
align: 'center'
|
|
|
}, {
|
|
|
title: "总分",
|
|
|
dataIndex: "total_score",
|
|
|
width: 60,
|
|
|
align: 'center'
|
|
|
}, {
|
|
|
title: "操作",
|
|
|
dataIndex: "is_random",
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
|
render: function render(v, r) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
href: v ? "/randompaper/detail/".concat(r.id) : "/paperlibrary/see/".concat(r.id, "?defaultActiveKey=1"),
|
|
|
target: "_blank>",
|
|
|
children: "\u9884\u89C8"
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)({
|
|
|
page: 0,
|
|
|
limit: 20,
|
|
|
group_id: null,
|
|
|
object_type: 'examination_bank',
|
|
|
search: '',
|
|
|
filter: 'myself'
|
|
|
}),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
query = _useState22[0],
|
|
|
setQuery = _useState22[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (exercise.actionTabs.key === '试卷选用') {
|
|
|
getData();
|
|
|
setGroupIdsInitialValues([]);
|
|
|
getTeachGroupData();
|
|
|
}
|
|
|
}, [exercise.actionTabs.key]);
|
|
|
var getTeachGroupData = /*#__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 dispatch({
|
|
|
type: 'paperlibrary/getTeachGroupData'
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
setTeachGroupData(res);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getTeachGroupData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var parser = function parser(v) {
|
|
|
var num = parseInt(v);
|
|
|
return isNaN(num) ? '' : num;
|
|
|
};
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var _res$object_list, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
if (!hasMore) {
|
|
|
_context2.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
++query.page;
|
|
|
setHasMore(false);
|
|
|
_context2.next = 5;
|
|
|
return dispatch({
|
|
|
type: 'exercise/getBrankList',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
case 5:
|
|
|
res = _context2.sent;
|
|
|
tabData = res !== null && res !== void 0 && res.object_list ? toConsumableArray_default()(tabData.concat(res === null || res === void 0 ? void 0 : res.object_list)) : tabData;
|
|
|
setIsTeacher(res.is_teacher);
|
|
|
if (((_res$object_list = res.object_list) === null || _res$object_list === void 0 ? void 0 : _res$object_list.length) < query.limit) {
|
|
|
setHasMore(false);
|
|
|
} else {
|
|
|
setHasMore(true);
|
|
|
}
|
|
|
;
|
|
|
setTabData(toConsumableArray_default()(tabData));
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function getData() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleChangeTeachGroup = function handleChangeTeachGroup(id) {
|
|
|
scroll.current.scrollTop = 0;
|
|
|
tabData = [];
|
|
|
query.page = 0;
|
|
|
query.group_id = id;
|
|
|
hasMore = true;
|
|
|
setGroupIdsInitialValues([]);
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
getData();
|
|
|
};
|
|
|
var rowSelection = {
|
|
|
selectedRowKeys: groupIdsInitialValues,
|
|
|
onChange: function onChange(e) {
|
|
|
setGroupIdsInitialValues(e);
|
|
|
},
|
|
|
type: "radio"
|
|
|
};
|
|
|
var onCancel = function onCancel() {
|
|
|
var param = {
|
|
|
page: 0,
|
|
|
limit: 20,
|
|
|
group_id: null,
|
|
|
object_type: 'examination_bank',
|
|
|
search: '',
|
|
|
filter: 'myself'
|
|
|
};
|
|
|
setQuery(objectSpread2_default()({}, param));
|
|
|
setTabData([]);
|
|
|
setHasMore(true);
|
|
|
setTabKey('myself');
|
|
|
dispatch({
|
|
|
type: 'exercise/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
setBtnLoading(false);
|
|
|
};
|
|
|
var _useReuseModal = (0,ReuseShixunModal/* useReuseModal */.P)(),
|
|
|
_useReuseModal2 = slicedToArray_default()(_useReuseModal, 4),
|
|
|
reuseModalVisible = _useReuseModal2[0],
|
|
|
closeReuseModal = _useReuseModal2[1],
|
|
|
renderData = _useReuseModal2[2],
|
|
|
showReuseModal = _useReuseModal2[3];
|
|
|
var reuseModalCallback = /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(shixunList) {
|
|
|
var is_random, shixunsInfo, res, name, modal;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
// let need_authorize = false;
|
|
|
is_random = false;
|
|
|
tabData.forEach(function (e) {
|
|
|
// if (groupIdsInitialValues.includes(e.id) && e.need_authorize) {
|
|
|
// need_authorize = e.need_authorize;
|
|
|
// }
|
|
|
if (groupIdsInitialValues.includes(e.id)) {
|
|
|
is_random = e.is_random;
|
|
|
}
|
|
|
});
|
|
|
shixunsInfo = shixunList.map(function (item) {
|
|
|
return {
|
|
|
shixun_id: item.id,
|
|
|
is_use: item.is_use,
|
|
|
is_copy: item.is_copy
|
|
|
};
|
|
|
});
|
|
|
if (is_random) {
|
|
|
_context4.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
_context4.next = 6;
|
|
|
return dispatch({
|
|
|
type: 'exercise/saveBanks',
|
|
|
payload: {
|
|
|
course_id: params.coursesId,
|
|
|
object_type: "examination_bank",
|
|
|
bank_id: groupIdsInitialValues,
|
|
|
shixuns_info: shixunsInfo
|
|
|
// categoryId: params.categoryId
|
|
|
}
|
|
|
});
|
|
|
case 6:
|
|
|
res = _context4.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
// console.log(res, "-----------res");
|
|
|
(0,util/* trackEvent */.L9)(['教学课堂', '试卷', '试卷选用']);
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomExercisesList',
|
|
|
payload: objectSpread2_default()({}, exercise.actionTabs.params)
|
|
|
});
|
|
|
// console.log(`classrooms/${res.course_identifier}/exercise/${res.exercise_id}/detail?random=${res.is_random}`);
|
|
|
setDetailUrl("/classrooms/".concat(params.coursesId, "/exercise/").concat(res.exercise_id, "/detail?random=").concat(res.is_random, "&tabs=3"));
|
|
|
setEditUrl("/classrooms/".concat(params.coursesId, "/exercise/add/").concat(res.exercise_id, "?random=").concat(res.is_random, "&type=2"));
|
|
|
setisTips(true);
|
|
|
message/* default */.ZP.success('生成试卷成功');
|
|
|
closeReuseModal();
|
|
|
onCancel();
|
|
|
}
|
|
|
return _context4.abrupt("return");
|
|
|
case 9:
|
|
|
dispatch({
|
|
|
type: 'exercise/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
closeReuseModal();
|
|
|
name = 1;
|
|
|
modal = es_modal/* default */.Z.confirm({
|
|
|
icon: null,
|
|
|
className: 'custom-modal-divider',
|
|
|
centered: true,
|
|
|
width: 500,
|
|
|
maskClosable: false,
|
|
|
keyboard: false,
|
|
|
cancelButtonProps: {
|
|
|
disabled: false
|
|
|
},
|
|
|
title: '配置出卷数量',
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Exercisemodules.modalColumn,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Exercisemodules.modalRow,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("sup", {
|
|
|
className: Exercisemodules.sup,
|
|
|
children: "*"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
children: "\u968F\u673A\u51FA\u5377\u6570\u91CF\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
parser: parser,
|
|
|
style: {
|
|
|
width: 120
|
|
|
},
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BD5\u5377\u6570\u91CF",
|
|
|
min: 1,
|
|
|
defaultValue: name,
|
|
|
onChange: function onChange(e) {
|
|
|
name = e;
|
|
|
var dom = document.getElementById('model_error');
|
|
|
if (name < 1 || name > 50) {
|
|
|
dom.style.display = 'block';
|
|
|
} else {
|
|
|
dom.style.display = 'none';
|
|
|
}
|
|
|
}
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
display: 'none',
|
|
|
marginLeft: 106
|
|
|
},
|
|
|
id: "model_error",
|
|
|
className: "c-red",
|
|
|
children: "\u8BF7\u8F93\u51651-50\u4E4B\u95F4\u7684\u6574\u6570"
|
|
|
})]
|
|
|
}),
|
|
|
okText: '确认',
|
|
|
cancelText: '取消',
|
|
|
onCancel: onCancel,
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var dom, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
if (!(name < 1 || name > 50)) {
|
|
|
_context3.next = 4;
|
|
|
break;
|
|
|
}
|
|
|
dom = document.getElementById('model_error');
|
|
|
dom.style.display = 'block';
|
|
|
return _context3.abrupt("return", Promise.reject());
|
|
|
case 4:
|
|
|
modal.update({
|
|
|
cancelButtonProps: {
|
|
|
disabled: true
|
|
|
}
|
|
|
});
|
|
|
_context3.next = 7;
|
|
|
return dispatch({
|
|
|
type: 'exercise/saveBanks',
|
|
|
payload: {
|
|
|
course_id: params.coursesId,
|
|
|
object_type: "examination_bank",
|
|
|
bank_id: groupIdsInitialValues,
|
|
|
shixuns_info: shixunsInfo,
|
|
|
// categoryId: params.categoryId,
|
|
|
num: name
|
|
|
}
|
|
|
});
|
|
|
case 7:
|
|
|
res = _context3.sent;
|
|
|
modal.update({
|
|
|
cancelButtonProps: {
|
|
|
disabled: false
|
|
|
}
|
|
|
});
|
|
|
if (res && res.status === 0) {
|
|
|
(0,util/* trackEvent */.L9)(['教学课堂', '试卷', '试卷选用']);
|
|
|
es_modal/* default */.Z.destroyAll();
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomExercisesList',
|
|
|
payload: objectSpread2_default()({}, exercise.actionTabs.params)
|
|
|
});
|
|
|
onCancel();
|
|
|
closeReuseModal();
|
|
|
message/* default */.ZP.success('生成试卷成功');
|
|
|
} else {
|
|
|
onCancel();
|
|
|
closeReuseModal();
|
|
|
}
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return function reuseModalCallback(_x) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
width: 980,
|
|
|
title: "\u9009\u62E9\u8BD5\u5377",
|
|
|
maskClosable: false,
|
|
|
destroyOnClose: true,
|
|
|
open: exercise.actionTabs.key === '试卷选用',
|
|
|
okText: "\u786E\u5B9A",
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
confirmLoading: btnLoading,
|
|
|
bodyStyle: {
|
|
|
minHeight: 200
|
|
|
},
|
|
|
wrapClassName: Exercisemodules.warpModal,
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
var _classroomList$detail;
|
|
|
var need_authorize, is_random, hasUsedShixun;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
if (groupIdsInitialValues.length) {
|
|
|
_context5.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.error('请选择试卷');
|
|
|
return _context5.abrupt("return");
|
|
|
case 3:
|
|
|
setBtnLoading(true);
|
|
|
need_authorize = false;
|
|
|
is_random = false;
|
|
|
tabData.forEach(function (e) {
|
|
|
if (groupIdsInitialValues.includes(e.id) && e.need_authorize) {
|
|
|
need_authorize = e.need_authorize;
|
|
|
}
|
|
|
if (groupIdsInitialValues.includes(e.id)) {
|
|
|
is_random = e.is_random;
|
|
|
}
|
|
|
});
|
|
|
if (!need_authorize) {
|
|
|
_context5.next = 10;
|
|
|
break;
|
|
|
}
|
|
|
(0,verifyLogin/* AuthorizeModel */.rX)(false, '该试卷中包含实训需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。');
|
|
|
return _context5.abrupt("return");
|
|
|
case 10:
|
|
|
if (!isVtrs) {
|
|
|
_context5.next = 14;
|
|
|
break;
|
|
|
}
|
|
|
handleVtrsOk(groupIdsInitialValues);
|
|
|
setBtnLoading(false);
|
|
|
return _context5.abrupt("return");
|
|
|
case 14:
|
|
|
_context5.next = 16;
|
|
|
return showReuseModal({
|
|
|
id: "".concat(groupIdsInitialValues[0]),
|
|
|
course_id: (_classroomList$detail = classroomList.detailTopBanner) === null || _classroomList$detail === void 0 ? void 0 : _classroomList$detail.course_id,
|
|
|
type: 'examination_bank'
|
|
|
});
|
|
|
case 16:
|
|
|
hasUsedShixun = _context5.sent;
|
|
|
if (!hasUsedShixun) {
|
|
|
// 没有实训的学生
|
|
|
reuseModalCallback([]);
|
|
|
}
|
|
|
setBtnLoading(false);
|
|
|
case 19:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
})),
|
|
|
onCancel: onCancel,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(tabs/* default */.Z, {
|
|
|
activeKey: tabKey,
|
|
|
onTabClick: ( /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(key) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
scroll.current.scrollTop = 0;
|
|
|
tabData = [];
|
|
|
if (tabKey !== key) {
|
|
|
setGroupIdsInitialValues([]);
|
|
|
}
|
|
|
setTabKey(key);
|
|
|
query.page = 0;
|
|
|
query.filter = key;
|
|
|
query.group_id = null;
|
|
|
hasMore = true;
|
|
|
getData();
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function (_x2) {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}()),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(TabPane, {
|
|
|
tab: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u6211\u7684\u8BD5\u5377\u5E93"
|
|
|
})
|
|
|
}, "myself"), /*#__PURE__*/(0,jsx_runtime.jsx)(TabPane, {
|
|
|
tab: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u6559\u7814\u5171\u4EAB"
|
|
|
})
|
|
|
}, "teacher"), /*#__PURE__*/(0,jsx_runtime.jsx)(TabPane, {
|
|
|
tab: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u516C\u5171\u8BD5\u5377\u5E93"
|
|
|
})
|
|
|
}, "public")]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Exercisemodules.tabSearch,
|
|
|
children: [tabKey === "teacher" && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
value: query.group_id,
|
|
|
onChange: handleChangeTeachGroup,
|
|
|
size: 'middle',
|
|
|
style: {
|
|
|
width: 200,
|
|
|
marginRight: 30
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: null,
|
|
|
children: "\u5168\u90E8\u6559\u7814\u56E2\u961F"
|
|
|
}), teachGroupData === null || teachGroupData === void 0 || (_teachGroupData$group = teachGroupData.groups) === null || _teachGroupData$group === void 0 ? void 0 : _teachGroupData$group.map(function (e) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: e === null || e === void 0 ? void 0 : e.group_id,
|
|
|
children: e === null || e === void 0 ? void 0 : e.name
|
|
|
}, e === null || e === void 0 ? void 0 : e.group_id);
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0\u8FDB\u884C\u641C\u7D22",
|
|
|
value: query.search,
|
|
|
onChange: function onChange(e) {
|
|
|
query.search = e.target.value;
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
},
|
|
|
onSearch: function onSearch(value) {
|
|
|
scroll.current.scrollTop = 0;
|
|
|
tabData = [];
|
|
|
query.page = 0;
|
|
|
hasMore = true;
|
|
|
setGroupIdsInitialValues([]);
|
|
|
if (value) {
|
|
|
(0,global/* addSearchRecord */.tk)({
|
|
|
name: value,
|
|
|
copywriting: value,
|
|
|
position: 'Exercise'
|
|
|
});
|
|
|
}
|
|
|
getData();
|
|
|
}
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
ref: scroll,
|
|
|
style: {
|
|
|
maxHeight: 350,
|
|
|
overflowY: 'auto',
|
|
|
overflowX: 'hidden',
|
|
|
marginTop: 10,
|
|
|
paddingBottom: 20
|
|
|
},
|
|
|
children: [!isTeacher && tabKey === 'public' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
flexDirection: 'column',
|
|
|
paddingTop: '30px',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u901A\u8FC7\u804C\u4E1A\u8BA4\u8BC1\u7684\u6559\u5E08\u624D\u80FD\u8BBF\u95EE\u516C\u5171\u8BFE\u7A0B\u8D44\u6E90\u5E93"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
style: {
|
|
|
cursor: 'pointer',
|
|
|
background: '#ff6800',
|
|
|
height: '30px',
|
|
|
textAlign: 'center',
|
|
|
marginTop: '5px',
|
|
|
padding: '5px 0px',
|
|
|
color: '#fff',
|
|
|
width: '80px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
window.open("/account/certification");
|
|
|
},
|
|
|
children: "\u7ACB\u5373\u8BA4\u8BC1"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)((_react_infinite_scroller_1_2_4_react_infinite_scroller_default()), {
|
|
|
initialLoad: false,
|
|
|
pageStart: 0,
|
|
|
loadMore: function loadMore() {
|
|
|
getData();
|
|
|
},
|
|
|
hasMore: hasMore,
|
|
|
useWindow: false,
|
|
|
children: exercise.actionTabs.key === '试卷选用' && isTeacher && /*#__PURE__*/(0,jsx_runtime.jsx)(components_ResTable, {
|
|
|
className: Exercisemodules.hideHeadCheckbox,
|
|
|
pagination: false,
|
|
|
hideSelectAll: true // antd-version 4.3.0
|
|
|
,
|
|
|
dataSource: tabData,
|
|
|
onRow: function onRow(record) {
|
|
|
return {
|
|
|
onClick: function onClick() {
|
|
|
setGroupIdsInitialValues([record === null || record === void 0 ? void 0 : record.id]);
|
|
|
} // 点击行
|
|
|
};
|
|
|
},
|
|
|
resColumns: columns,
|
|
|
rowSelection: rowSelection
|
|
|
})
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
title: "\u63D0\u793A",
|
|
|
open: isTips,
|
|
|
confirmLoading: false //确定按钮loading
|
|
|
,
|
|
|
centered: true,
|
|
|
okText: "\u8BBE\u7F6E\u89C4\u5219",
|
|
|
cancelText: "\u4FEE\u6539\u8BD5\u5377",
|
|
|
footer: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
onClick: function onClick() {
|
|
|
setisTips(false); //修改试卷跳转
|
|
|
_umi_production_exports.history.push(EditUrl);
|
|
|
},
|
|
|
children: "\u4FEE\u6539\u8BD5\u5377"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
onClick: function onClick() {
|
|
|
_umi_production_exports.history.push(DetailUrl); //跳转到试卷,规则设置页面
|
|
|
setisTips(false);
|
|
|
},
|
|
|
children: "\u8BBE\u7F6E\u89C4\u5219"
|
|
|
})]
|
|
|
}),
|
|
|
onCancel: function onCancel() {
|
|
|
setisTips(false); //修改试卷跳转
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: "\u8BD5\u5377\u521B\u5EFA\u5B8C\u6210\uFF01\u76EE\u524D\u5904\u4E8E\u672A\u53D1\u5E03\u72B6\u6001\uFF0C\u662F\u5426\u8BBE\u7F6E\u8003\u8BD5\u89C4\u5219\uFF1F"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ReuseShixunModal/* default */.Z, {
|
|
|
inPaper: true,
|
|
|
visible: reuseModalVisible,
|
|
|
onCancel: closeReuseModal,
|
|
|
onOk: reuseModalCallback,
|
|
|
renderData: renderData,
|
|
|
modalType: "multiple",
|
|
|
type: "examination_bank"
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var SelectExercise = ((0,_umi_production_exports.connect)(function (_ref7) {
|
|
|
var exercise = _ref7.exercise,
|
|
|
loading = _ref7.loading,
|
|
|
classroomList = _ref7.classroomList;
|
|
|
return {
|
|
|
exercise: exercise,
|
|
|
loading: loading,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(CuttOffNowShixun));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 31551:
|
|
|
/*!**********************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/components/List/index.tsx + 1 modules ***!
|
|
|
\**********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
a: function() { return /* binding */ List; }
|
|
|
});
|
|
|
|
|
|
// 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/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/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// 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/row/index.js
|
|
|
var row = __webpack_require__(95237);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
|
|
|
var es_checkbox = __webpack_require__(24905);
|
|
|
// 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/spin/index.js + 1 modules
|
|
|
var spin = __webpack_require__(71418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(3125);
|
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
|
var dayjs_min = __webpack_require__(61186);
|
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/components/List/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Listmodules = ({"itemWrap":"itemWrap___KEbZ9","checkBoxWrapper":"checkBoxWrapper___Y_kuj","listWrap":"listWrap___VlWgM","list":"list___XIr6d","flexCenter":"flexCenter___eacyI","flexRow":"flexRow___A_mOc","imgWrap":"imgWrap___KI9io","img":"img___vjS11","contentWrap":"contentWrap___NI0Vt","titleWrap":"titleWrap___SlBWX","title":"title___KGh5v","content":"content___B0PxW","bottomWrap":"bottomWrap___WVJb4","updateTime":"updateTime___sxvSt","useCount":"useCount___puqPx","actionBtn":"actionBtn___JUWfj","actionButton":"actionButton___jabv3","actionBar":"actionBar___I1pC8","typeIcon":"typeIcon___bramC","private":"private___sdERX","public":"public___noSmD","random":"random___l2hTA","actionLinkWrapper":"actionLinkWrapper___Him3y","actionLink":"actionLink___rWBLq","actionIcon":"actionIcon___lMmL7","line":"line___HQJlK","b1":"b1___Y4KZd","b2":"b2___QxMOG","actionLeftItem":"actionLeftItem___Fnq4b","export_type_modal":"export_type_modal___ISAzV","export_type_modal_con":"export_type_modal_con___qw5B2","type_item":"type_item___pdMxs","img_warp":"img_warp___cDH7f","img_warp_active":"img_warp_active___rLrYN","moveOutSty":"moveOutSty___uCEnQ"});
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(32215);
|
|
|
// EXTERNAL MODULE: ./src/service/exercise.ts
|
|
|
var exercise = __webpack_require__(18846);
|
|
|
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
|
|
|
var verifyLogin = __webpack_require__(99204);
|
|
|
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
|
|
|
var lodash = __webpack_require__(89392);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.1@@ant-design/icons/es/icons/DownloadOutlined.js + 1 modules
|
|
|
var DownloadOutlined = __webpack_require__(82234);
|
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
|
var utils_export = __webpack_require__(75842);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/components/List/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var difficultyMapping = {
|
|
|
1: '简单',
|
|
|
2: '适中',
|
|
|
3: '困难'
|
|
|
};
|
|
|
var List = function List(_ref) {
|
|
|
var _data$author, _data$author2, _data$author3, _user$userInfo2, _data$author4, _user$userInfo3;
|
|
|
var _ref$isVtrs = _ref.isVtrs,
|
|
|
isVtrs = _ref$isVtrs === void 0 ? false : _ref$isVtrs,
|
|
|
_ref$showCheckbox = _ref.showCheckbox,
|
|
|
showCheckbox = _ref$showCheckbox === void 0 ? false : _ref$showCheckbox,
|
|
|
data = _ref.data,
|
|
|
user = _ref.user,
|
|
|
authRole = _ref.authRole,
|
|
|
activeTabsKey = _ref.activeTabsKey,
|
|
|
_ref$selectIds = _ref.selectIds,
|
|
|
selectIds = _ref$selectIds === void 0 ? [] : _ref$selectIds,
|
|
|
_ref$onSetSelectIds = _ref.onSetSelectIds,
|
|
|
onSetSelectIds = _ref$onSetSelectIds === void 0 ? function () {} : _ref$onSetSelectIds,
|
|
|
_ref$onPublicReview = _ref.onPublicReview,
|
|
|
onPublicReview = _ref$onPublicReview === void 0 ? function () {} : _ref$onPublicReview,
|
|
|
_ref$onCancelPublic = _ref.onCancelPublic,
|
|
|
onCancelPublic = _ref$onCancelPublic === void 0 ? function () {} : _ref$onCancelPublic,
|
|
|
_ref$onCancelShare = _ref.onCancelShare,
|
|
|
onCancelShare = _ref$onCancelShare === void 0 ? function () {} : _ref$onCancelShare,
|
|
|
_ref$onEdit = _ref.onEdit,
|
|
|
onEdit = _ref$onEdit === void 0 ? function () {} : _ref$onEdit,
|
|
|
_ref$onDelete = _ref.onDelete,
|
|
|
onDelete = _ref$onDelete === void 0 ? function () {} : _ref$onDelete,
|
|
|
_ref$onSendToClass = _ref.onSendToClass,
|
|
|
onSendToClass = _ref$onSendToClass === void 0 ? function () {} : _ref$onSendToClass,
|
|
|
_ref$handleMoveOut = _ref.handleMoveOut,
|
|
|
handleMoveOut = _ref$handleMoveOut === void 0 ? function () {} : _ref$handleMoveOut;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
isloading = _useState2[0],
|
|
|
setisloading = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
exportTypeModal = _useState4[0],
|
|
|
setExportTypeModal = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
exporRandomModal = _useState6[0],
|
|
|
setExporRandomModal = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
exportType = _useState8[0],
|
|
|
setExportType = _useState8[1];
|
|
|
var handleWarn = function handleWarn() {
|
|
|
modal/* default */.Z.warning({
|
|
|
centered: true,
|
|
|
width: 530,
|
|
|
okText: '知道啦',
|
|
|
title: '提示',
|
|
|
icon: null,
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "tc font16",
|
|
|
children: "\u672C\u5957\u8BD5\u5377\u6240\u9009\u7528\u8BD5\u9898\u90E8\u5206\u4E22\u5931\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528\u5E76\u53CA\u65F6\u8C03\u6574\u3002"
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var toAnswer = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var res, _user$userInfo;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
setisloading(true);
|
|
|
_context.next = 3;
|
|
|
return (0,exercise/* simulateExercise */.Mb)({
|
|
|
categoryId: data.id
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
setisloading(false);
|
|
|
if (res !== null && res !== void 0 && res.exercise_id) {
|
|
|
_umi_production_exports.history.push("/classrooms/coursesId/exercise/".concat(res.exercise_id, "/").concat((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login, "/initate_answer"));
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function toAnswer() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.itemWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.listWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Listmodules.list, " ").concat(Listmodules.flexCenter),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.contentWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "top",
|
|
|
children: [showCheckbox && /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
className: "".concat(Listmodules.checkBoxWrapper, " mr10"),
|
|
|
checked: selectIds.includes(data.id),
|
|
|
onChange: function onChange(e) {
|
|
|
onSetSelectIds(data.id);
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.titleWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
onClick: function onClick() {
|
|
|
if (authRole) {
|
|
|
var url = data.is_random ? "/randompaper/detail/".concat(data.id) : "/paperlibrary/see/".concat(data.id, "?defaultActiveKey=").concat(activeTabsKey);
|
|
|
_umi_production_exports.history.push(url);
|
|
|
}
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: Listmodules.title,
|
|
|
title: data.name,
|
|
|
children: data.name
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
children: [(activeTabsKey === '0' || activeTabsKey === '2') && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [data["public"] ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Listmodules.typeIcon, " ").concat(Listmodules["public"]),
|
|
|
children: "\u5DF2\u516C\u5F00"
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Listmodules.typeIcon, " ").concat(Listmodules["private"]),
|
|
|
children: "\u81EA\u7528"
|
|
|
}), data.is_random && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Listmodules.typeIcon, " ").concat(Listmodules.random),
|
|
|
children: "\u968F\u673A"
|
|
|
})]
|
|
|
}), (activeTabsKey === '1' && (0,authority/* isCommonSuperAdminOrOperation */.ag)() || activeTabsKey === '0') && data.changed && /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-jinggao1 c-red font16 ml10 current",
|
|
|
onClick: handleWarn
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Listmodules.flexRow),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.content,
|
|
|
children: ["\u8BD5\u9898\u6570", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: data.question_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.content,
|
|
|
children: ["\u603B\u5206", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: data.total_score
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.content,
|
|
|
children: ["\u96BE\u5EA6", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: difficultyMapping[data.difficulty]
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: authRole && /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
className: "".concat(Listmodules.actionBtn),
|
|
|
onClick: function onClick() {
|
|
|
if (data !== null && data !== void 0 && data.need_authorize) {
|
|
|
(0,verifyLogin/* AuthorizeModel */.rX)(false, '该试卷中包含实训需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。');
|
|
|
return;
|
|
|
}
|
|
|
onSendToClass(data.id, data);
|
|
|
},
|
|
|
children: "\u53D1\u9001\u81F3\u8BFE\u5802"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.actionBar,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.flexRow,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.actionLeftItem,
|
|
|
children: ["\u66F4\u65B0", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: data.update_time ? dayjs_min_default()(data.update_time).format('YYYY-MM-DD') : ''
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.actionLeftItem,
|
|
|
children: ["\u4F7F\u7528\u6B21\u6570", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: data.quotes
|
|
|
})]
|
|
|
}), activeTabsKey === '1' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.actionLeftItem,
|
|
|
children: ["\u521B\u5EFA\u8005", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: (_data$author = data.author) === null || _data$author === void 0 ? void 0 : _data$author.name
|
|
|
})]
|
|
|
}), activeTabsKey === '2' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.actionLeftItem,
|
|
|
children: ["\u5206\u4EAB\u4EBA", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: (_data$author2 = data.author) === null || _data$author2 === void 0 ? void 0 : _data$author2.name
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.flexRow,
|
|
|
children: [activeTabsKey === '0' && !data["public"] && !data.is_random && data.apply && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "".concat(Listmodules.actionLink),
|
|
|
onClick: onPublicReview,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-gongkai ".concat(Listmodules.actionIcon)
|
|
|
}), "\u5BA1\u6838\u4E2D"]
|
|
|
})]
|
|
|
}), activeTabsKey === '0' && data["public"] && !data.is_random && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "".concat(Listmodules.actionLink, " current"),
|
|
|
onClick: function onClick() {
|
|
|
return onCancelPublic(data.id);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-gongkai ".concat(Listmodules.actionIcon)
|
|
|
}), "\u64A4\u9500\u516C\u5F00"]
|
|
|
})]
|
|
|
}), activeTabsKey === '0' && (data === null || data === void 0 ? void 0 : data.is_share) && !data.is_random && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "".concat(Listmodules.actionLink, " current"),
|
|
|
onClick: function onClick() {
|
|
|
return onCancelShare(data.id);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-chexiaogongxiang ".concat(Listmodules.actionIcon, " font16")
|
|
|
}), "\u64A4\u9500\u5171\u4EAB"]
|
|
|
})]
|
|
|
}), !isVtrs && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "".concat(Listmodules.actionLink),
|
|
|
onClick: function onClick() {
|
|
|
if (data.is_random) {
|
|
|
setExporRandomModal(true);
|
|
|
} else {
|
|
|
setExportType('');
|
|
|
setExportTypeModal(true);
|
|
|
}
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {
|
|
|
style: {
|
|
|
marginRight: 5
|
|
|
}
|
|
|
}), "\u5BFC\u51FA\u8BD5\u5377"]
|
|
|
})]
|
|
|
}), ((activeTabsKey === '0' || activeTabsKey === '2') && !data["public"] || activeTabsKey === '1' && ((_data$author3 = data.author) === null || _data$author3 === void 0 ? void 0 : _data$author3.login) !== ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login) && (0,authority/* isCommonSuperAdminOrOperation */.ag)()) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "".concat(Listmodules.actionLink),
|
|
|
onClick: function onClick() {
|
|
|
return onEdit(data.id, data.is_random);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-bianji10 ".concat(Listmodules.actionIcon)
|
|
|
}), "\u7F16\u8F91"]
|
|
|
})]
|
|
|
}), ((activeTabsKey === '0' || activeTabsKey === '2') && !data["public"] || activeTabsKey === '1' && ((_data$author4 = data.author) === null || _data$author4 === void 0 ? void 0 : _data$author4.login) !== ((_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login) && (0,authority/* isCommonSuperAdmin */.fn)()) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "".concat(Listmodules.actionLink),
|
|
|
onClick: function onClick() {
|
|
|
return onDelete(data.id);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-shanchu11 ".concat(Listmodules.actionIcon)
|
|
|
}), "\u5220\u9664"]
|
|
|
})]
|
|
|
}), authRole && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
|
spinning: isloading,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
className: "".concat(Listmodules.actionLink),
|
|
|
type: "primary",
|
|
|
onClick: (0,lodash.throttle)(toAnswer, 3500),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-monikaoshi2 ".concat(Listmodules.actionIcon)
|
|
|
}), "\u6A21\u62DF\u8003\u8BD5"]
|
|
|
})
|
|
|
})]
|
|
|
}), isVtrs && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
className: Listmodules.actionLinkWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: Listmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
className: "".concat(Listmodules.actionLink, " ").concat(Listmodules.moveOutSty),
|
|
|
onClick: function onClick() {
|
|
|
return handleMoveOut(data);
|
|
|
},
|
|
|
children: "\u79FB\u51FA"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
width: 450,
|
|
|
title: "\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u51FA\u7684\u7A7A\u767D\u8BD5\u5377\u683C\u5F0F",
|
|
|
open: exportTypeModal,
|
|
|
onCancel: function onCancel() {
|
|
|
return setExportTypeModal(false);
|
|
|
},
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var url;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
if (!(exportType == '')) {
|
|
|
_context2.next = 5;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.info('请选择一种导出格式');
|
|
|
return _context2.abrupt("return");
|
|
|
case 5:
|
|
|
if (exportType == 'pdf') {
|
|
|
url = "/paperlibrary/see/".concat(data.id, "?defaultActiveKey=").concat(activeTabsKey, "&exportPDF=true");
|
|
|
_umi_production_exports.history.push({
|
|
|
pathname: url,
|
|
|
state: {}
|
|
|
});
|
|
|
} else if (exportType == 'word') {
|
|
|
(0,utils_export/* exportPaperlibraryPaper */.ON)({
|
|
|
id: data === null || data === void 0 ? void 0 : data.id,
|
|
|
middle_export: 1,
|
|
|
export_type: 0
|
|
|
});
|
|
|
}
|
|
|
case 6:
|
|
|
setExportTypeModal(false);
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Listmodules.export_type_modal,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.export_type_modal_con,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.type_item,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Listmodules.img_warp, " ").concat(exportType == 'pdf' ? Listmodules.img_warp_active : ''),
|
|
|
onClick: function onClick() {
|
|
|
return setExportType('pdf');
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: __webpack_require__(/*! @/assets/images/file_type/pdf_img.png */ 45614),
|
|
|
width: 70,
|
|
|
height: 70
|
|
|
})
|
|
|
}), "pdf\u683C\u5F0F"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Listmodules.type_item,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Listmodules.img_warp, " ").concat(exportType == 'word' ? Listmodules.img_warp_active : ''),
|
|
|
onClick: function onClick() {
|
|
|
return setExportType('word');
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: __webpack_require__(/*! @/assets/images/file_type/word_img.png */ 38347),
|
|
|
width: 70,
|
|
|
height: 70
|
|
|
})
|
|
|
}), "word\u683C\u5F0F"]
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
width: 450,
|
|
|
title: "\u63D0\u793A",
|
|
|
open: exporRandomModal,
|
|
|
okText: "\u53D1\u9001\u81F3\u8BFE\u5802",
|
|
|
onCancel: function onCancel() {
|
|
|
return setExporRandomModal(false);
|
|
|
},
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
if (!(data !== null && data !== void 0 && data.need_authorize)) {
|
|
|
_context3.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
(0,verifyLogin/* AuthorizeModel */.rX)(false, '该试卷中包含实训需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。');
|
|
|
return _context3.abrupt("return");
|
|
|
case 3:
|
|
|
onSendToClass(data.id, data);
|
|
|
setExporRandomModal(false);
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})),
|
|
|
children: "\u7531\u4E8E\u6539\u8BD5\u5377\u4E3A\u968F\u673A\u7EC4\u5377\uFF0C\u8BF7\u53D1\u9001\u81F3\u8BFE\u5802\u540E\u5728\u8FDB\u884C\u5BFC\u51FA"
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 6978:
|
|
|
/*!*************************************************************************!*\
|
|
|
!*** ./src/pages/virtualSpaces/Lists/Experiment/index.tsx + 11 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 */ Experiment; }
|
|
|
});
|
|
|
|
|
|
// 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/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(85573);
|
|
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// 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/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/_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__(3125);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Experimentmodules = ({"wrap":"wrap___O1tn7"});
|
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 32 modules
|
|
|
var ui_customization = __webpack_require__(88174);
|
|
|
// 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/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules
|
|
|
var dropdown = __webpack_require__(38854);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
|
var spin = __webpack_require__(71418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
|
var pagination = __webpack_require__(27092);
|
|
|
// EXTERNAL MODULE: ./src/service/virtualSpaces.ts
|
|
|
var service_virtualSpaces = __webpack_require__(59931);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(73782);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/drawer/index.js + 9 modules
|
|
|
var drawer = __webpack_require__(43428);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// 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/checkbox/index.js + 3 modules
|
|
|
var es_checkbox = __webpack_require__(24905);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
|
var divider = __webpack_require__(28103);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Shixuns/components/SelectShixuns/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var SelectShixunsmodules = ({"flex_box_center":"flex_box_center___aqHcx","flex_space_between":"flex_space_between___CONGd","flex_box_vertical_center":"flex_box_vertical_center___lVyEh","flex_box_center_end":"flex_box_center_end___sI_Vv","flex_box_column":"flex_box_column___kaVXu","wrp":"wrp___rtMqf","drawer":"drawer___A_PEI","menu":"menu___K7LJA","actived":"actived___jzUGM","actived2":"actived2___UNcoI","subTag":"subTag___E54g9","directionName":"directionName___EyQuv","menuDirection":"menuDirection___qmHXv","listItem":"listItem___ZO5AA","info":"info___raEGy","title":"title___TE8wt","titleLeft":"titleLeft___cyNcR","titleRight":"titleRight___N91L3","search":"search___SLT83","description":"description___xhaap","menuCourse":"menuCourse___jXQvt","paginationWrap":"paginationWrap___lwYL6"});
|
|
|
// EXTERNAL MODULE: ./src/service/shixuns.ts
|
|
|
var shixuns = __webpack_require__(48741);
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
var NoData = __webpack_require__(94398);
|
|
|
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
|
|
|
var verifyLogin = __webpack_require__(99204);
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(32215);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Shixuns/components/SelectShixuns/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Search = input/* default */.Z.Search;
|
|
|
var typeFilter = {
|
|
|
id: "type",
|
|
|
name: "来源",
|
|
|
children: [{
|
|
|
name: "全部",
|
|
|
id: "all",
|
|
|
type: "type"
|
|
|
}, {
|
|
|
name: "我的",
|
|
|
id: "mine",
|
|
|
type: "type"
|
|
|
}]
|
|
|
};
|
|
|
var diffFilter = {
|
|
|
id: "diff",
|
|
|
name: "难度",
|
|
|
children: [{
|
|
|
name: "全部",
|
|
|
id: "",
|
|
|
type: "diff"
|
|
|
}, {
|
|
|
name: "初级",
|
|
|
id: 1,
|
|
|
type: "diff"
|
|
|
}, {
|
|
|
name: "中级",
|
|
|
id: 2,
|
|
|
type: "diff"
|
|
|
}, {
|
|
|
name: "中高级",
|
|
|
id: 3,
|
|
|
type: "diff"
|
|
|
}, {
|
|
|
name: "高级",
|
|
|
id: 4,
|
|
|
type: "diff"
|
|
|
}]
|
|
|
};
|
|
|
var PublishShixun = function PublishShixun(_ref) {
|
|
|
var _typeFilter$children, _diffFilter$children, _shixunLists$shixun_l2, _shixunLists$shixun_l3;
|
|
|
var classroomList = _ref.classroomList,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
cb = _ref.cb,
|
|
|
_ref$shixunIds = _ref.shixunIds,
|
|
|
shixunIds = _ref$shixunIds === void 0 ? [] : _ref$shixunIds;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
var actionTabs = classroomList.actionTabs;
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
var shixunLists = classroomList.shixunLists;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
selectArrs = _useState2[0],
|
|
|
setSelectArrs = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
directionData = _useState4[0],
|
|
|
setDirectionData = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({
|
|
|
page: 1,
|
|
|
type: "all",
|
|
|
diff: 0,
|
|
|
status: "published",
|
|
|
order: "desc",
|
|
|
limit: 10,
|
|
|
sort: "myshixuns_count",
|
|
|
tag_level: null,
|
|
|
sub_discipline_id: null,
|
|
|
discipline_id: null
|
|
|
}),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
query = _useState6[0],
|
|
|
setQuery = _useState6[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (classroomList.actionTabs.key === '选用实践项目') {
|
|
|
// query.page = 1;
|
|
|
dispatch({
|
|
|
type: 'classroomList/getShixunLists',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
}
|
|
|
}, [classroomList.actionTabs.key, query]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
getData();
|
|
|
}, [params]);
|
|
|
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,shixuns/* getShixunsMenus */.I_)({});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
//
|
|
|
setDirectionData((res === null || res === void 0 ? void 0 : res.disciplines) || []);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var menuChange = function menuChange(tag_level, sub_discipline_id, discipline_id) {
|
|
|
query.tag_level = tag_level;
|
|
|
query.sub_discipline_id = sub_discipline_id;
|
|
|
query.discipline_id = discipline_id;
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
dispatch({
|
|
|
type: 'classroomList/getShixunLists',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
};
|
|
|
var handleCancel = function handleCancel() {
|
|
|
dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
setQuery({
|
|
|
page: 1,
|
|
|
type: "all",
|
|
|
diff: 0,
|
|
|
status: "all",
|
|
|
order: "desc",
|
|
|
limit: 10,
|
|
|
sort: "myshixuns_count",
|
|
|
tag_level: null,
|
|
|
sub_discipline_id: null,
|
|
|
discipline_id: null
|
|
|
});
|
|
|
};
|
|
|
if (classroomList.actionTabs.key !== '选用实践项目') return null;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(drawer/* default */.Z, {
|
|
|
placement: "bottom",
|
|
|
height: "100%",
|
|
|
closable: true,
|
|
|
onClose: handleCancel,
|
|
|
open: classroomList.actionTabs.key === '选用实践项目' ? true : false,
|
|
|
rootClassName: SelectShixunsmodules.drawer,
|
|
|
footer: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "tc",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: 'middle',
|
|
|
onClick: function onClick() {
|
|
|
handleCancel();
|
|
|
setSelectArrs([]);
|
|
|
},
|
|
|
style: {
|
|
|
marginRight: 8
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: 'middle',
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var _loop, _ret, i;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop() {
|
|
|
var selectItem, _shixunLists$shixun_l;
|
|
|
return regeneratorRuntime_default()().wrap(function _loop$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
selectItem = selectArrs[i];
|
|
|
if (!shixunIds.includes(selectItem)) {
|
|
|
_context2.next = 4;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.info("\u8BF7\u52FF\u91CD\u590D\u9009\u62E9\uFF1A".concat(shixunLists === null || shixunLists === void 0 || (_shixunLists$shixun_l = shixunLists.shixun_list) === null || _shixunLists$shixun_l === void 0 || (_shixunLists$shixun_l = _shixunLists$shixun_l.find(function (item) {
|
|
|
return item.id === selectItem;
|
|
|
})) === null || _shixunLists$shixun_l === void 0 ? void 0 : _shixunLists$shixun_l.title));
|
|
|
return _context2.abrupt("return", {
|
|
|
v: void 0
|
|
|
});
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _loop);
|
|
|
});
|
|
|
i = 0;
|
|
|
case 2:
|
|
|
if (!(i < (selectArrs === null || selectArrs === void 0 ? void 0 : selectArrs.length))) {
|
|
|
_context3.next = 10;
|
|
|
break;
|
|
|
}
|
|
|
return _context3.delegateYield(_loop(), "t0", 4);
|
|
|
case 4:
|
|
|
_ret = _context3.t0;
|
|
|
if (!_ret) {
|
|
|
_context3.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
return _context3.abrupt("return", _ret.v);
|
|
|
case 7:
|
|
|
i++;
|
|
|
_context3.next = 2;
|
|
|
break;
|
|
|
case 10:
|
|
|
handleCancel();
|
|
|
cb(selectArrs);
|
|
|
setSelectArrs([]);
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
type: "primary",
|
|
|
children: "\u786E\u5B9A"
|
|
|
})]
|
|
|
}),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
className: "tc",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Search, {
|
|
|
placeholder: "\u5B9E\u8BAD\u4FE1\u606F/\u9662\u6821\u540D\u79F0/\u521B\u5EFA\u8005",
|
|
|
enterButton: "\u641C\u7D22",
|
|
|
size: 'middle',
|
|
|
className: SelectShixunsmodules.search,
|
|
|
onSearch: function onSearch(value) {
|
|
|
query.keyword = value;
|
|
|
query.page = 1;
|
|
|
dispatch({
|
|
|
type: 'classroomList/getShixunLists',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "edu-container",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: SelectShixunsmodules.menu,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: typeFilter.name
|
|
|
}), typeFilter === null || typeFilter === void 0 || (_typeFilter$children = typeFilter.children) === null || _typeFilter$children === void 0 ? void 0 : _typeFilter$children.map(function (val, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: query[typeFilter.id] == val.id ? SelectShixunsmodules.actived : '',
|
|
|
onClick: function onClick() {
|
|
|
query[typeFilter.id] = val.id;
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
dispatch({
|
|
|
type: 'classroomList/getShixunLists',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: val.name
|
|
|
})
|
|
|
});
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: SelectShixunsmodules.menuDirection,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: SelectShixunsmodules.directionName,
|
|
|
children: "\u65B9\u5411"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: !query.discipline_id ? SelectShixunsmodules.actived : '',
|
|
|
onClick: function onClick() {
|
|
|
menuChange(null, null, null);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: "\u5168\u90E8"
|
|
|
})
|
|
|
}), directionData === null || directionData === void 0 ? void 0 : directionData.map(function (v, k) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
className: query.discipline_id == v.id ? SelectShixunsmodules.actived : '',
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
onClick: function onClick() {
|
|
|
menuChange(1, null, v.id);
|
|
|
},
|
|
|
children: v.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: v.sub_disciplines.map(function (val, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt5",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: query.sub_discipline_id == val.id ? "".concat(SelectShixunsmodules.actived2, " ").concat(SelectShixunsmodules.subTag) : SelectShixunsmodules.subTag,
|
|
|
onClick: function onClick() {
|
|
|
menuChange(2, val.id, v.id);
|
|
|
},
|
|
|
children: val.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("ul", {
|
|
|
className: "mt5",
|
|
|
children: val.tags && val.tags.map(function (value, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: query.sub_discipline_id == value.id && query.tag_level === 3 ? SelectShixunsmodules.actived2 : '',
|
|
|
onClick: function onClick() {
|
|
|
menuChange(3, value.id, v.id);
|
|
|
},
|
|
|
children: value.name
|
|
|
}, index);
|
|
|
})
|
|
|
})]
|
|
|
}, key);
|
|
|
})
|
|
|
})]
|
|
|
}, k);
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: SelectShixunsmodules.menu,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: diffFilter.name
|
|
|
}), diffFilter === null || diffFilter === void 0 || (_diffFilter$children = diffFilter.children) === null || _diffFilter$children === void 0 ? void 0 : _diffFilter$children.map(function (val, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: query[diffFilter.id] == val.id ? SelectShixunsmodules.actived : '',
|
|
|
onClick: function onClick() {
|
|
|
query[diffFilter.id] = val.id;
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
dispatch({
|
|
|
type: 'classroomList/getShixunLists',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
children: val.name
|
|
|
})
|
|
|
});
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: SelectShixunsmodules.menuCourse,
|
|
|
style: {
|
|
|
margin: '0px 15px'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5DF2\u9009", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: selectArrs.length
|
|
|
}), "\u4E2A\u5B9E\u8BAD"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: shixunLists.shixuns_count
|
|
|
}), "\u4E2A\u8BFE\u7A0B"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
className: "current",
|
|
|
onClick: function onClick() {
|
|
|
query.order = query.order === 'asc' ? "desc" : "asc";
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
},
|
|
|
children: ["\u5B66\u4E60\u4EBA\u6570", /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "edu-sorter current ".concat(query.order),
|
|
|
children: query.order === 'asc' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-sanjiaoxing-up"
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-sanjiaoxing-down"
|
|
|
})
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: "c-grey-999",
|
|
|
children: "\u4EC5\u5DF2\u53D1\u5E03\u7684\u5B9E\u8BAD\u8FDB\u5165\u672C\u5217\u8868\u5907\u9009"
|
|
|
})]
|
|
|
}), shixunLists === null || shixunLists === void 0 || (_shixunLists$shixun_l2 = shixunLists.shixun_list) === null || _shixunLists$shixun_l2 === void 0 ? void 0 : _shixunLists$shixun_l2.map(function (v, k) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: SelectShixunsmodules.listItem,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
checked: selectArrs.includes(v.id),
|
|
|
value: v.id,
|
|
|
disabled: v === null || v === void 0 ? void 0 : v.need_authorize,
|
|
|
onChange: function onChange(e) {
|
|
|
var key = selectArrs.indexOf(v.id);
|
|
|
if (selectArrs.indexOf(v.id) > -1) {
|
|
|
setSelectArrs(selectArrs.filter(function (val) {
|
|
|
return val !== v.id;
|
|
|
}));
|
|
|
} else {
|
|
|
setSelectArrs(selectArrs.concat(v.id));
|
|
|
}
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: SelectShixunsmodules.info,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: SelectShixunsmodules.title,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: SelectShixunsmodules.titleLeft,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
className: "c-black",
|
|
|
href: "/shixuns/".concat(v === null || v === void 0 ? void 0 : v.identifier, "/challenges"),
|
|
|
target: "_blank",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
className: "font16",
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: v.title
|
|
|
}
|
|
|
})
|
|
|
}), (v === null || v === void 0 ? void 0 : v.need_authorize) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick() {
|
|
|
(0,verifyLogin/* AuthorizeModel */.rX)(false);
|
|
|
},
|
|
|
style: {
|
|
|
marginRight: 'auto'
|
|
|
},
|
|
|
className: "tag-style bg-pink current ml10",
|
|
|
children: "\u9700\u6388\u6743"
|
|
|
}), (0,authority/* isSuperAdmins */.Ny)() && (v === null || v === void 0 ? void 0 : v.mark_status) === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: v === null || v === void 0 ? void 0 : v.mark_content,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
marginRight: 'auto',
|
|
|
background: '#2FA34F'
|
|
|
},
|
|
|
className: "tag-style current ml10",
|
|
|
children: "\u6B63\u5E38"
|
|
|
})
|
|
|
}), (0,authority/* isSuperAdmins */.Ny)() && (v === null || v === void 0 ? void 0 : v.mark_status) === 2 && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: v === null || v === void 0 ? void 0 : v.mark_content,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
marginRight: 'auto',
|
|
|
background: '#FF8C29'
|
|
|
},
|
|
|
className: "tag-style current ml10",
|
|
|
children: "\u9700\u5B8C\u5584"
|
|
|
})
|
|
|
}), (0,authority/* isSuperAdmins */.Ny)() && (v === null || v === void 0 ? void 0 : v.mark_status) === 3 && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: v === null || v === void 0 ? void 0 : v.mark_content,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
marginRight: 'auto',
|
|
|
background: '#E53333'
|
|
|
},
|
|
|
className: "tag-style current ml10",
|
|
|
children: "\u65E0\u6CD5\u4F7F\u7528"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "flex-wrp mt10 font14 c-light-black",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: SelectShixunsmodules.description,
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: v.description
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: " mt15",
|
|
|
children: v.challenge_names.map(function (val, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr30 font12",
|
|
|
children: ["\u7B2C", key + 1, "\u5173 ", val, " "]
|
|
|
}, key);
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
dashed: true
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "c-light-black mt20 font12",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: v.author_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml15 mr15",
|
|
|
children: "|"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: v.author_school_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml15 mr15",
|
|
|
children: "|"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u96BE\u5EA6\u7CFB\u6570 ", v.level]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml15 mr15",
|
|
|
children: "|"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B66\u4E60\u4EBA\u6570 "
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: v.study_count
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}, k);
|
|
|
}), (shixunLists === null || shixunLists === void 0 || (_shixunLists$shixun_l3 = shixunLists.shixun_list) === null || _shixunLists$shixun_l3 === void 0 ? void 0 : _shixunLists$shixun_l3.length) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "tc mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
defaultCurrent: 1,
|
|
|
hideOnSinglePage: true,
|
|
|
defaultPageSize: 20,
|
|
|
showSizeChanger: false,
|
|
|
current: query.page || 1,
|
|
|
showQuickJumper: true,
|
|
|
total: shixunLists === null || shixunLists === void 0 ? void 0 : shixunLists.shixuns_count,
|
|
|
onChange: function onChange(page) {
|
|
|
query.page = page;
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
}
|
|
|
})
|
|
|
})]
|
|
|
}, "bottom");
|
|
|
};
|
|
|
/* harmony default export */ var SelectShixuns = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var classroomList = _ref4.classroomList,
|
|
|
loading = _ref4.loading;
|
|
|
return {
|
|
|
classroomList: classroomList,
|
|
|
loading: loading
|
|
|
};
|
|
|
})(PublishShixun));
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
|
var es_radio = __webpack_require__(5112);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/SelectCourses/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var SelectCoursesmodules = ({"flex_box_center":"flex_box_center___TJ6ml","flex_space_between":"flex_space_between___KILKX","flex_box_vertical_center":"flex_box_vertical_center___RppSx","flex_box_center_end":"flex_box_center_end___LPGnq","flex_box_column":"flex_box_column___jU2Jl","wrp":"wrp___zKb7p","drawer":"drawer___TIdMd","menu":"menu___auLdF","actived":"actived___zYS5Q","actived2":"actived2___OGoZn","subTag":"subTag___b2h92","listItem":"listItem___xctQk","listItem2":"listItem2___s8hCO","info":"info___TVoda","title":"title___tbgwQ","titleLeft":"titleLeft___itHF1","titleRight":"titleRight___iEOIZ","search":"search___p3840","filter":"filter___M4Wxe","description":"description___QUPVu","menuCourse":"menuCourse___SpFbG"});
|
|
|
// EXTERNAL MODULE: ./src/service/global.ts
|
|
|
var global = __webpack_require__(96142);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/SelectCourses/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SelectCourses_Search = input/* default */.Z.Search;
|
|
|
var SelectCourses_PublishShixun = function PublishShixun(_ref) {
|
|
|
var _coursesLists$subject, _coursesLists$subject2;
|
|
|
var classroomList = _ref.classroomList,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
onOk = _ref.onOk;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()({}, (0,_umi_production_exports.useParams)())),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
var coursesLists = classroomList.coursesLists;
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
selectArrs = _useState4[0],
|
|
|
setSelectArrs = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({
|
|
|
page: 1,
|
|
|
type: 'all',
|
|
|
order: 'desc',
|
|
|
limit: 20,
|
|
|
sort: 'myshixuns_count'
|
|
|
}),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
query = _useState6[0],
|
|
|
setQuery = _useState6[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (classroomList.actionTabs.key === '选用实践课程') {
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCoursesLists',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
setSelectArrs([]);
|
|
|
}
|
|
|
}, [classroomList.actionTabs.key, params.categoryId, query]);
|
|
|
if (classroomList.actionTabs.key !== '选用实践课程') return null;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(drawer/* default */.Z, {
|
|
|
placement: 'bottom',
|
|
|
height: '100%',
|
|
|
closable: true,
|
|
|
onClose: function onClose() {
|
|
|
dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: ''
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
open: classroomList.actionTabs.key === '选用实践课程' ? true : false,
|
|
|
rootClassName: SelectCoursesmodules.drawer,
|
|
|
footer: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "tc",
|
|
|
style: {
|
|
|
height: '64px',
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: 'middle',
|
|
|
onClick: function onClick() {
|
|
|
dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: ''
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
style: {
|
|
|
marginRight: 8,
|
|
|
width: '120px',
|
|
|
height: '40px',
|
|
|
fontSize: '16px',
|
|
|
borderRadius: '4px'
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
style: {
|
|
|
width: '120px',
|
|
|
height: '40px',
|
|
|
fontSize: '16px',
|
|
|
borderRadius: '4px'
|
|
|
},
|
|
|
size: 'middle',
|
|
|
loading: loading['classroomList/createCoursesHomework'],
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _selectArrs$;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!((selectArrs === null || selectArrs === void 0 ? void 0 : selectArrs.length) === 0)) {
|
|
|
_context.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.error('请选择一个实践课程');
|
|
|
return _context.abrupt("return", false);
|
|
|
case 3:
|
|
|
onOk((_selectArrs$ = selectArrs[0]) === null || _selectArrs$ === void 0 ? void 0 : _selectArrs$.id);
|
|
|
dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: ''
|
|
|
}
|
|
|
});
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
type: "primary",
|
|
|
children: "\u786E\u5B9A"
|
|
|
})]
|
|
|
}),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
className: "tc",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(SelectCourses_Search, {
|
|
|
placeholder: "\u8BFE\u7A0B\u540D\u79F0/\u521B\u5EFA\u8005",
|
|
|
enterButton: "\u641C\u7D22",
|
|
|
size: 'middle',
|
|
|
className: SelectCoursesmodules.search,
|
|
|
onSearch: function onSearch(value) {
|
|
|
query.keyword = value;
|
|
|
if (value) {
|
|
|
(0,global/* addSearchRecord */.tk)({
|
|
|
name: value,
|
|
|
copywriting: value,
|
|
|
position: 'Subject'
|
|
|
});
|
|
|
}
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
className: "edu-container",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
|
spinning: loading['classroomList/getCoursesLists'],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: SelectCoursesmodules.menuCourse,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5DF2\u9009", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: selectArrs.length
|
|
|
}), "\u8BFE\u7A0B"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: coursesLists.subjects_count
|
|
|
}), "\u4E2A\u8BFE\u7A0B"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
className: "current",
|
|
|
onClick: function onClick() {
|
|
|
query.order = query.order === 'asc' ? 'desc' : 'asc';
|
|
|
query.sort = 'shixuns_count';
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
},
|
|
|
children: ["\u5B9E\u8BAD\u6570", /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
className: "edu-sorter current ".concat(query.sort === 'shixuns_count' && query.order),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-sanjiaoxing-up"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-sanjiaoxing-down"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
|
className: "current",
|
|
|
onClick: function onClick() {
|
|
|
query.order = query.order === 'asc' ? 'desc' : 'asc';
|
|
|
query.sort = 'myshixuns_count';
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
},
|
|
|
children: ["\u5B66\u4E60\u4EBA\u6570", /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
className: "edu-sorter current ".concat(query.sort === 'myshixuns_count' && query.order),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-sanjiaoxing-up"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "iconfont icon-sanjiaoxing-down"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: "".concat(query.type === 'all' && 'c-blue', " current"),
|
|
|
onClick: function onClick() {
|
|
|
query.type = 'all';
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
},
|
|
|
children: "\u5168\u90E8\u8BFE\u7A0B"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: "".concat(query.type === 'mine' && 'c-blue', " current"),
|
|
|
onClick: function onClick() {
|
|
|
query.type = 'mine';
|
|
|
setQuery(objectSpread2_default()({}, query));
|
|
|
},
|
|
|
children: "\u6211\u7684\u8BFE\u7A0B"
|
|
|
})]
|
|
|
})
|
|
|
}), (coursesLists === null || coursesLists === void 0 || (_coursesLists$subject = coursesLists.subject_list) === null || _coursesLists$subject === void 0 ? void 0 : _coursesLists$subject.length) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), coursesLists === null || coursesLists === void 0 || (_coursesLists$subject2 = coursesLists.subject_list) === null || _coursesLists$subject2 === void 0 ? void 0 : _coursesLists$subject2.map(function (v, k) {
|
|
|
var _v$content, _v$content2;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: SelectCoursesmodules.listItem,
|
|
|
style: {
|
|
|
cursor: 'auto'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
checked: selectArrs.map(function (selectedItem) {
|
|
|
return selectedItem.id;
|
|
|
}).includes(v.id),
|
|
|
value: v.id
|
|
|
// size="small"
|
|
|
,
|
|
|
style: {
|
|
|
marginTop: '1px'
|
|
|
},
|
|
|
disabled: v === null || v === void 0 ? void 0 : v.need_authorize,
|
|
|
onChange: function onChange(e) {
|
|
|
setSelectArrs([{
|
|
|
id: v.id,
|
|
|
identifier: v.identifier
|
|
|
}]);
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: SelectCoursesmodules.info,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: SelectCoursesmodules.title,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: SelectCoursesmodules.titleLeft,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/paths/".concat(v.id),
|
|
|
target: "_blank",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
className: "font16",
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: v.title
|
|
|
}
|
|
|
})
|
|
|
}), (v === null || v === void 0 ? void 0 : v.need_authorize) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick() {
|
|
|
(0,verifyLogin/* AuthorizeModel */.rX)(false, '该课程中包含实训需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。');
|
|
|
},
|
|
|
style: {
|
|
|
marginRight: 'auto'
|
|
|
},
|
|
|
className: "tag-style bg-pink current ml10",
|
|
|
children: "\u9700\u6388\u6743"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
ghost: true,
|
|
|
href: "/paths/".concat(v.id),
|
|
|
type: "primary",
|
|
|
target: "_blank",
|
|
|
style: {
|
|
|
borderRadius: '50px'
|
|
|
},
|
|
|
children: "\u4F53\u9A8C\u8BFE\u7A0B"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "flex-wrp mt10 font14 c-light-black",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: SelectCoursesmodules.description,
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: v.description
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
dashed: true
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "c-light-black mt20",
|
|
|
children: [v !== null && v !== void 0 && (_v$content = v.content) !== null && _v$content !== void 0 && _v$content.author_name ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: v === null || v === void 0 || (_v$content2 = v.content) === null || _v$content2 === void 0 || (_v$content2 = _v$content2.author_name) === null || _v$content2 === void 0 ? void 0 : _v$content2[0]
|
|
|
}
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: v.author_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml15 mr15",
|
|
|
children: "|"
|
|
|
}), v.author_school_name && /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: v.author_school_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml15 mr15",
|
|
|
children: "|"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B66\u4E60\u4EBA\u6570:"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: v.myshixuns_count
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml15 mr15",
|
|
|
children: "|"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u7AE0\u8282:", v.stage_count]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml15 mr15",
|
|
|
children: "|"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u5B9E\u8BAD:", v.shixuns_count]
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}, v.id);
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "tc mt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
defaultCurrent: 1,
|
|
|
hideOnSinglePage: true,
|
|
|
defaultPageSize: 20,
|
|
|
current: query.page || 1,
|
|
|
showQuickJumper: true,
|
|
|
total: coursesLists === null || coursesLists === void 0 ? void 0 : coursesLists.subjects_count,
|
|
|
onChange: function onChange(page) {
|
|
|
query.page = page;
|
|
|
dispatch({
|
|
|
type: 'classroomList/getCoursesLists',
|
|
|
payload: objectSpread2_default()({}, query)
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
})]
|
|
|
}, 'bottom');
|
|
|
};
|
|
|
/* harmony default export */ var SelectCourses = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
var classroomList = _ref3.classroomList,
|
|
|
loading = _ref3.loading;
|
|
|
return {
|
|
|
classroomList: classroomList,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(SelectCourses_PublishShixun));
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/rate/index.js + 8 modules
|
|
|
var rate = __webpack_require__(31395);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(19219);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/ShixunItem/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var ShixunItemmodules = ({"itemWrapper":"itemWrapper___FDtjf","imgWrapper":"imgWrapper___kuAby","infoWrapper":"infoWrapper___kPiaa","name":"name___s6_8x","info":"info___f4ohA","smallText":"smallText___NUbDW","rate":"rate___uCfIz","btnWrapper":"btnWrapper___oEyAe","removeBtn":"removeBtn____Ucrs","textEllipsis":"textEllipsis___dla3G","mr6":"mr6___BYwoU","modalWrapper":"modalWrapper___Xvqvn","okBtn":"okBtn___XoB2t","cancelBtn":"cancelBtn___QjfJN"});
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(65327);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/ShixunItem/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunItem = function ShixunItem(_ref) {
|
|
|
var data = _ref.data,
|
|
|
refreshData = _ref.refreshData,
|
|
|
virtualClassroomId = _ref.virtualClassroomId,
|
|
|
user = _ref.user,
|
|
|
isCreator = _ref.isCreator;
|
|
|
var _ref2 = data || {},
|
|
|
name = _ref2.name,
|
|
|
user_name = _ref2.user_name,
|
|
|
school_name = _ref2.school_name,
|
|
|
challenges_count = _ref2.challenges_count,
|
|
|
stu_num = _ref2.stu_num,
|
|
|
level = _ref2.level,
|
|
|
score_info = _ref2.score_info,
|
|
|
pic = _ref2.pic,
|
|
|
identifier = _ref2.identifier,
|
|
|
id = _ref2.id,
|
|
|
is_self = _ref2.is_self;
|
|
|
var handleDelete = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
modal/* default */.Z.confirm({
|
|
|
title: '移出实践项目',
|
|
|
icon: null,
|
|
|
okText: '确认移出',
|
|
|
className: ShixunItemmodules.modalWrapper,
|
|
|
width: 428,
|
|
|
centered: true,
|
|
|
closable: false,
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u786E\u8BA4\u5C06\u5B9E\u8DF5\u9879\u76EE\u300A", name, "\u300B\u79FB\u51FA\u865A\u62DF\u793E\u533A\u5417\uFF1F"]
|
|
|
}),
|
|
|
okButtonProps: {
|
|
|
className: ShixunItemmodules.okBtn
|
|
|
},
|
|
|
cancelButtonProps: {
|
|
|
className: ShixunItemmodules.cancelBtn
|
|
|
},
|
|
|
onOk: function () {
|
|
|
var _onOk = 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_virtualSpaces/* deleteShixun */.Ps)({
|
|
|
virtual_classroom_id: virtualClassroomId,
|
|
|
shixun_id: id
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
refreshData();
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function handleDelete() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleStart = function handleStart() {
|
|
|
(0,util/* openNewWindow */.xg)("/shixuns/".concat(identifier, "/challenges"));
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "".concat(ShixunItemmodules.itemWrapper, " mb20"),
|
|
|
wrap: false,
|
|
|
onClick: handleStart,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "0 0 auto",
|
|
|
className: ShixunItemmodules.imgWrapper,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/").concat(pic),
|
|
|
alt: ""
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
className: "".concat(ShixunItemmodules.infoWrapper, " ml20"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
className: ShixunItemmodules.name,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: name,
|
|
|
className: ShixunItemmodules.textEllipsis,
|
|
|
children: name
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: ShixunItemmodules.info,
|
|
|
align: "middle",
|
|
|
wrap: false,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: '72px',
|
|
|
className: ShixunItemmodules.textEllipsis,
|
|
|
title: user_name,
|
|
|
children: user_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: '140px',
|
|
|
className: "ml20 ".concat(ShixunItemmodules.textEllipsis),
|
|
|
title: school_name,
|
|
|
children: school_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: '52px',
|
|
|
className: "".concat(ShixunItemmodules.smallText, " ").concat(ShixunItemmodules.textEllipsis, " ml20"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u5173\u5361\u6570",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-shixunguanqia font14 ".concat(ShixunItemmodules.mr6)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: challenges_count,
|
|
|
children: challenges_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: '72px',
|
|
|
className: "".concat(ShixunItemmodules.smallText, " ").concat(ShixunItemmodules.textEllipsis, " ml10"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u5B66\u4E60\u4EBA\u6570",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-chengyuan font14 ".concat(ShixunItemmodules.mr6)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: stu_num,
|
|
|
children: stu_num
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: '52px',
|
|
|
className: "".concat(ShixunItemmodules.smallText, " ml10"),
|
|
|
children: level
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: "ml10",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(rate/* default */.Z, {
|
|
|
className: ShixunItemmodules.rate,
|
|
|
allowHalf: true,
|
|
|
disabled: true,
|
|
|
defaultValue: score_info
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: "".concat(ShixunItemmodules.smallText, " ml5"),
|
|
|
children: score_info
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
className: ShixunItemmodules.btnWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
handleStart();
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-shiyantixi font14",
|
|
|
style: {
|
|
|
marginRight: 4
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u6311\u6218"
|
|
|
})]
|
|
|
}), (is_self || isCreator || (0,authority/* isSuperAdmins */.Ny)()) && /*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
|
|
|
className: "ml20 ".concat(ShixunItemmodules.removeBtn),
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
handleDelete();
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-shanjian font14",
|
|
|
style: {
|
|
|
marginRight: 4
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u79FB\u51FA"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_ShixunItem = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var user = _ref4.user;
|
|
|
return {
|
|
|
user: user
|
|
|
};
|
|
|
})(ShixunItem));
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/SubjectItem/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var SubjectItemmodules = ({"itemWrapper":"itemWrapper___ngbXA","imgWrapper":"imgWrapper___AT5j9","infoWrapper":"infoWrapper___xhMza","name":"name___C2Snj","info":"info___roajb","smallText":"smallText___oUD1O","rate":"rate___FSIj9","btnWrapper":"btnWrapper___d_crD","removeBtn":"removeBtn___ur6lt","textEllipsis":"textEllipsis___BHIv1","mr6":"mr6___yqxpX","modalWrapper":"modalWrapper___kXUHq","okBtn":"okBtn___FmLSD","cancelBtn":"cancelBtn___MZ1Al"});
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/SubjectItem/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SubjectItem = function SubjectItem(_ref) {
|
|
|
var data = _ref.data,
|
|
|
refreshData = _ref.refreshData,
|
|
|
virtualClassroomId = _ref.virtualClassroomId,
|
|
|
user = _ref.user,
|
|
|
isCreator = _ref.isCreator;
|
|
|
var _ref2 = data || {},
|
|
|
image_url = _ref2.image_url,
|
|
|
subject_members_names = _ref2.subject_members_names,
|
|
|
name = _ref2.name,
|
|
|
members_count = _ref2.members_count,
|
|
|
user_name = _ref2.user_name,
|
|
|
school_name = _ref2.school_name,
|
|
|
shixuns_count = _ref2.shixuns_count,
|
|
|
stages_count = _ref2.stages_count,
|
|
|
id = _ref2.id,
|
|
|
identifier = _ref2.identifier,
|
|
|
is_self = _ref2.is_self;
|
|
|
var handleDelete = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
modal/* default */.Z.confirm({
|
|
|
title: '移出实践项目',
|
|
|
icon: null,
|
|
|
okText: '确认移出',
|
|
|
className: SubjectItemmodules.modalWrapper,
|
|
|
width: 428,
|
|
|
centered: true,
|
|
|
closable: false,
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u786E\u8BA4\u5C06\u5B9E\u8DF5\u8BFE\u7A0B\u300A", name, "\u300B\u79FB\u51FA\u865A\u62DF\u793E\u533A\u5417\uFF1F"]
|
|
|
}),
|
|
|
okButtonProps: {
|
|
|
className: SubjectItemmodules.okBtn
|
|
|
},
|
|
|
cancelButtonProps: {
|
|
|
className: SubjectItemmodules.cancelBtn
|
|
|
},
|
|
|
onOk: function () {
|
|
|
var _onOk = 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_virtualSpaces/* deleteCourse */.A)({
|
|
|
virtual_classroom_id: virtualClassroomId,
|
|
|
subject_id: id
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
refreshData();
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function handleDelete() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleStart = function handleStart() {
|
|
|
(0,util/* openNewWindow */.xg)("/paths/".concat(identifier));
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "".concat(SubjectItemmodules.itemWrapper, " mb20"),
|
|
|
wrap: false,
|
|
|
onClick: handleStart,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "0 0 auto",
|
|
|
className: SubjectItemmodules.imgWrapper,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/").concat(image_url),
|
|
|
alt: ""
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
className: "".concat(SubjectItemmodules.infoWrapper, " ml20"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
className: SubjectItemmodules.name,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: name,
|
|
|
className: SubjectItemmodules.textEllipsis,
|
|
|
children: name
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: SubjectItemmodules.info,
|
|
|
align: "middle",
|
|
|
wrap: false,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: '72px',
|
|
|
className: SubjectItemmodules.textEllipsis,
|
|
|
title: user_name,
|
|
|
children: user_name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: '140px',
|
|
|
className: "ml20 ".concat(SubjectItemmodules.textEllipsis),
|
|
|
style: {
|
|
|
visibility: school_name !== null && school_name !== void 0 && school_name.length ? 'visible' : 'hidden'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u53D1\u5E03\u5355\u4F4D",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-danwei1 font14 ".concat(SubjectItemmodules.mr6)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: school_name,
|
|
|
children: school_name
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: '128px',
|
|
|
className: "ml20 ".concat(SubjectItemmodules.textEllipsis),
|
|
|
style: {
|
|
|
visibility: subject_members_names !== null && subject_members_names !== void 0 && subject_members_names.length ? 'visible' : 'hidden'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u5408\u4F5C\u8005",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-hezuozhe font14 ".concat(SubjectItemmodules.mr6)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: subject_members_names === null || subject_members_names === void 0 ? void 0 : subject_members_names.join('、'),
|
|
|
children: subject_members_names === null || subject_members_names === void 0 ? void 0 : subject_members_names.join('、')
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: '52px',
|
|
|
className: "".concat(SubjectItemmodules.smallText, " ml40"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u7AE0\u8282\u6570",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-zhangjie1 font14 ".concat(SubjectItemmodules.mr6)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: stages_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: '52px',
|
|
|
className: "".concat(SubjectItemmodules.smallText, " ml20"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u5B9E\u8BAD\u6570\u91CF",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-xianshangkaoshi font12 ".concat(SubjectItemmodules.mr6)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: shixuns_count
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: '72px',
|
|
|
className: "".concat(SubjectItemmodules.smallText, " ").concat(SubjectItemmodules.textEllipsis, " ml20"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u5B66\u4E60\u4EBA\u6570",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-chengyuan font14 ".concat(SubjectItemmodules.mr6)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: members_count,
|
|
|
children: members_count
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
className: SubjectItemmodules.btnWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
handleStart();
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-xuexi1 font14",
|
|
|
style: {
|
|
|
marginRight: 4
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B66\u4E60"
|
|
|
})]
|
|
|
}), (is_self || isCreator || (0,authority/* isSuperAdmins */.Ny)()) && /*#__PURE__*/(0,jsx_runtime.jsxs)(ui_customization/* CustomButton */.op, {
|
|
|
className: "ml20 ".concat(SubjectItemmodules.removeBtn),
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
handleDelete();
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-shanjian font14",
|
|
|
style: {
|
|
|
marginRight: 4
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u79FB\u51FA"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_SubjectItem = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var user = _ref4.user;
|
|
|
return {
|
|
|
user: user
|
|
|
};
|
|
|
})(SubjectItem));
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Add/EditPotin/components/AddQuestionsModal/index.tsx + 3 modules
|
|
|
var AddQuestionsModal = __webpack_require__(99849);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/TopicItem/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var TopicItemmodules = ({"contentListWrap":"contentListWrap___ZH7d2","li":"li___j_LdE","bottom":"bottom___vg39s","actionLeftItem":"actionLeftItem___G9LXk","questionTypeName":"questionTypeName___JxbiV","more":"more___Zc_dQ","textBtn":"textBtn___vA27R","delBtn":"delBtn___BUYGb","line":"line___D6NTm","b1":"b1___pDdQ9","b2":"b2___VvH5K"});
|
|
|
// EXTERNAL MODULE: ./src/pages/Problemset/components/Topic/index.tsx + 2 modules
|
|
|
var Topic = __webpack_require__(26506);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/components/TopicItem/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var questionType = [{
|
|
|
type: 'SINGLE',
|
|
|
name: '单选题'
|
|
|
}, {
|
|
|
type: 'MULTIPLE',
|
|
|
name: '多选题'
|
|
|
}, {
|
|
|
type: 'JUDGMENT',
|
|
|
name: '判断题'
|
|
|
}, {
|
|
|
type: 'PROGRAM',
|
|
|
name: '编程题'
|
|
|
}, {
|
|
|
type: 'SUBJECTIVE',
|
|
|
name: '简答题'
|
|
|
}, {
|
|
|
type: 'COMPLETION',
|
|
|
name: '填空题'
|
|
|
}, {
|
|
|
type: 'COMBINATION',
|
|
|
name: '组合题'
|
|
|
}, {
|
|
|
type: 'BPROGRAM',
|
|
|
name: '程序填空题'
|
|
|
}];
|
|
|
var difficultyMapping = {
|
|
|
1: "简单",
|
|
|
2: "适中",
|
|
|
3: "困难"
|
|
|
};
|
|
|
|
|
|
// interface PageProps extends Partial<ConnectProps> {
|
|
|
// problemset: ProblemsetModelState;
|
|
|
// user: UserModelState;
|
|
|
// globalSetting: GlobalSettingModelState;
|
|
|
// loading: { [key: string]: boolean; };
|
|
|
// dispatch: Dispatch;
|
|
|
// }
|
|
|
|
|
|
var TopicItem_SubjectItem = function SubjectItem(_ref) {
|
|
|
var _questionType$find, _author$name, _author$name2;
|
|
|
var data = _ref.data,
|
|
|
refreshData = _ref.refreshData,
|
|
|
virtualClassroomId = _ref.virtualClassroomId,
|
|
|
user = _ref.user,
|
|
|
isCreator = _ref.isCreator,
|
|
|
handleStartExperience = _ref.handleStartExperience;
|
|
|
var _ref2 = data || {},
|
|
|
id = _ref2.id,
|
|
|
name = _ref2.name,
|
|
|
author = _ref2.author,
|
|
|
item_type = _ref2.item_type,
|
|
|
difficulty = _ref2.difficulty,
|
|
|
updated_at = _ref2.updated_at,
|
|
|
quotes = _ref2.quotes;
|
|
|
var handleRemove = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(id) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
modal/* default */.Z.confirm({
|
|
|
title: '移出试题',
|
|
|
icon: null,
|
|
|
okText: '确认移出',
|
|
|
className: TopicItemmodules.modalWrapper,
|
|
|
width: 428,
|
|
|
centered: true,
|
|
|
closable: false,
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u786E\u8BA4\u5C06\u8BFE\u7A0B\u8BD5\u9898\u300A", name, "\u300B\u79FB\u51FA\u865A\u62DF\u793E\u533A\u5417\uFF1F"]
|
|
|
}),
|
|
|
okButtonProps: {
|
|
|
className: TopicItemmodules.okBtn
|
|
|
},
|
|
|
cancelButtonProps: {
|
|
|
className: TopicItemmodules.cancelBtn
|
|
|
},
|
|
|
onOk: function () {
|
|
|
var _onOk = 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_virtualSpaces/* delQuestion */.Lk)({
|
|
|
virtual_classroom_id: virtualClassroomId,
|
|
|
id: id
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
refreshData();
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function handleRemove(_x) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleStart = function handleStart() {
|
|
|
(0,util/* openNewWindow */.xg)("/paths/".concat(identifier));
|
|
|
};
|
|
|
|
|
|
// const handleStartExperience = async (gather: any) => {
|
|
|
// console.log(gather, 'gather')
|
|
|
// const { item_type } = gather;
|
|
|
// //编程题
|
|
|
// if (item_type === 'PROGRAM') {
|
|
|
// const { program_attr: { identifier } } = gather;
|
|
|
// const res = await dispatch({
|
|
|
// type: 'problemset/startExperience',
|
|
|
// payload: { id: identifier },
|
|
|
// });
|
|
|
// if (res.status === 0) {
|
|
|
// const identifiers = res.identifier;
|
|
|
// openNewWindow(`/myproblems/${identifiers}`);
|
|
|
// return;
|
|
|
// }
|
|
|
// message.warning(res.message);
|
|
|
// return
|
|
|
// }
|
|
|
// // 单选题 多选题 判断题 填空题
|
|
|
// dispatch({
|
|
|
// type: 'problemset/setActionTabs',
|
|
|
// payload: {
|
|
|
// key: item_type,
|
|
|
// params: gather
|
|
|
// },
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: TopicItemmodules.contentListWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: TopicItemmodules.li,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: TopicItemmodules.top,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Topic/* default */.Z, {
|
|
|
data: data,
|
|
|
showCheckbox: false
|
|
|
}, id)
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: TopicItemmodules.bottom,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
className: "".concat(TopicItemmodules.actionLeftItem, " ").concat(TopicItemmodules.questionTypeName),
|
|
|
children: ["No.", id]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "".concat(TopicItemmodules.actionLeftItem, " ").concat(TopicItemmodules.questionTypeName),
|
|
|
children: (_questionType$find = questionType.find(function (item) {
|
|
|
return item.type === item_type;
|
|
|
})) === null || _questionType$find === void 0 ? void 0 : _questionType$find.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: TopicItemmodules.actionLeftItem,
|
|
|
children: difficultyMapping[difficulty]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
className: TopicItemmodules.actionLeftItem,
|
|
|
children: ["\u521B\u5EFA\u8005", /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: author === null || author === void 0 ? void 0 : author.name,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-grey-333",
|
|
|
children: (author === null || author === void 0 || (_author$name = author.name) === null || _author$name === void 0 ? void 0 : _author$name.length) > 6 ? (author === null || author === void 0 || (_author$name2 = author.name) === null || _author$name2 === void 0 ? void 0 : _author$name2.substr(0, 5)) + '...' : author === null || author === void 0 ? void 0 : author.name
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
className: TopicItemmodules.actionLeftItem,
|
|
|
children: ["\u66F4\u65B0", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-grey-333",
|
|
|
children: updated_at
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
className: TopicItemmodules.actionLeftItem,
|
|
|
children: ["\u4F7F\u7528\u6B21\u6570", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-grey-333",
|
|
|
children: quotes
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: TopicItemmodules.more,
|
|
|
children: [['SINGLE', 'MULTIPLE', 'JUDGMENT', 'COMPLETION', 'PROGRAM'].includes(item_type) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: TopicItemmodules.textBtn,
|
|
|
style: {
|
|
|
cursor: 'pointer'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
return handleStartExperience(data);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: TopicItemmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: TopicItemmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: TopicItemmodules.b2
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-tiyan font14 mr5"
|
|
|
}), "\u4F53\u9A8C", /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: TopicItemmodules.line,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: TopicItemmodules.b1
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
className: TopicItemmodules.b2
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(TopicItemmodules.textBtn, " ").concat(TopicItemmodules.delBtn),
|
|
|
onClick: function onClick() {
|
|
|
handleRemove(id);
|
|
|
},
|
|
|
children: "\u79FB\u51FA"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var TopicItem = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var user = _ref4.user;
|
|
|
return {
|
|
|
user: user
|
|
|
};
|
|
|
})(TopicItem_SubjectItem));
|
|
|
// EXTERNAL MODULE: ./src/pages/Problemset/components/Single.tsx
|
|
|
var Single = __webpack_require__(63370);
|
|
|
// EXTERNAL MODULE: ./src/pages/Problemset/components/Multiple.tsx
|
|
|
var Multiple = __webpack_require__(55754);
|
|
|
// EXTERNAL MODULE: ./src/pages/Problemset/components/Judgment.tsx
|
|
|
var Judgment = __webpack_require__(79804);
|
|
|
// EXTERNAL MODULE: ./src/pages/Problemset/components/Completion.tsx
|
|
|
var Completion = __webpack_require__(65620);
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/components/SelectExercise.tsx + 4 modules
|
|
|
var SelectExercise = __webpack_require__(64247);
|
|
|
// EXTERNAL MODULE: ./src/pages/Paperlibrary/components/List/index.tsx + 1 modules
|
|
|
var List = __webpack_require__(31551);
|
|
|
// EXTERNAL MODULE: ./src/pages/Paperlibrary/components/SendToClassModal.tsx + 6 modules
|
|
|
var SendToClassModal = __webpack_require__(92415);
|
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Experiment/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ExperimentPage = function ExperimentPage(_ref) {
|
|
|
var _virtualSpaces$menus;
|
|
|
var classroomList = _ref.classroomList,
|
|
|
virtualSpaces = _ref.virtualSpaces,
|
|
|
user = _ref.user,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var _useParams = (0,_umi_production_exports.useParams)(),
|
|
|
virtual_spacesId = _useParams.virtual_spacesId;
|
|
|
var virtualSpacesDetails = virtualSpaces.virtualSpacesDetails;
|
|
|
var isCreator = virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.is_creator;
|
|
|
var permission = (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.is_member) || isCreator || (0,authority/* isSuperAdmins */.Ny)();
|
|
|
var experimentModuleId = virtualSpaces === null || virtualSpaces === void 0 || (_virtualSpaces$menus = virtualSpaces.menus) === null || _virtualSpaces$menus === void 0 || (_virtualSpaces$menus = _virtualSpaces$menus.find(function (menu) {
|
|
|
return menu.icon_type === 'experiment';
|
|
|
})) === null || _virtualSpaces$menus === void 0 ? void 0 : _virtualSpaces$menus.id;
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
getShixunsData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
getCourseData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
getTopicsData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
getPaperData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
}, []);
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
shixunPageloading = _useState2[0],
|
|
|
setShixunPageLoading = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
}),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
shixunPaginationParams = _useState4[0],
|
|
|
setShixunPaginationParams = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
shixunData = _useState6[0],
|
|
|
setShixunData = _useState6[1];
|
|
|
var getShixunsData = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(params) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
setShixunPageLoading(true);
|
|
|
_context.next = 3;
|
|
|
return (0,service_virtualSpaces/* getShixuns */.rV)(virtual_spacesId, params);
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
if (!('status' in res)) {
|
|
|
_context.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
return _context.abrupt("return");
|
|
|
case 6:
|
|
|
setShixunData(res);
|
|
|
setShixunPageLoading(false);
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getShixunsData(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
topicPageLoading = _useState8[0],
|
|
|
setTopicLoading = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
}),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
topicPaginationParams = _useState10[0],
|
|
|
setTopicPaginationParams = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
topicData = _useState12[0],
|
|
|
setTopicData = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
showquestion = _useState14[0],
|
|
|
setshowquestion = _useState14[1]; //题库选题显隐
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
isshixun = _useState16[0],
|
|
|
setisshixun = _useState16[1]; //是否是实训题进入选题
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
isloadings = _useState18[0],
|
|
|
setisloadings = _useState18[1]; //选题loading状态
|
|
|
var getTopicsData = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(params) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
setTopicLoading(true);
|
|
|
_context2.next = 3;
|
|
|
return (0,service_virtualSpaces/* getQuestionList */.eb)(objectSpread2_default()({
|
|
|
virtual_classroom_id: virtual_spacesId
|
|
|
}, params));
|
|
|
case 3:
|
|
|
res = _context2.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
setTopicData(res);
|
|
|
}
|
|
|
setTopicLoading(false);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function getTopicsData(_x2) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleStartExperience = /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(gather) {
|
|
|
var item_type, identifier, res, identifiers;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
console.log(gather, 'gather');
|
|
|
item_type = gather.item_type; //编程题
|
|
|
if (!(item_type === 'PROGRAM')) {
|
|
|
_context3.next = 13;
|
|
|
break;
|
|
|
}
|
|
|
identifier = gather.program_attr.identifier;
|
|
|
_context3.next = 6;
|
|
|
return dispatch({
|
|
|
type: 'problemset/startExperience',
|
|
|
payload: {
|
|
|
id: identifier
|
|
|
}
|
|
|
});
|
|
|
case 6:
|
|
|
res = _context3.sent;
|
|
|
if (!(res.status === 0)) {
|
|
|
_context3.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
identifiers = res.identifier;
|
|
|
(0,util/* openNewWindow */.xg)("/myproblems/".concat(identifiers));
|
|
|
return _context3.abrupt("return");
|
|
|
case 11:
|
|
|
message/* default */.ZP.warning(res === null || res === void 0 ? void 0 : res.message);
|
|
|
return _context3.abrupt("return");
|
|
|
case 13:
|
|
|
// 单选题 多选题 判断题 填空题
|
|
|
dispatch({
|
|
|
type: 'problemset/setActionTabs',
|
|
|
payload: {
|
|
|
key: item_type,
|
|
|
params: gather
|
|
|
}
|
|
|
});
|
|
|
case 14:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function handleStartExperience(_x3) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
paperPageLoading = _useState20[0],
|
|
|
setPaperLoading = _useState20[1];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
}),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
paperPaginationParams = _useState22[0],
|
|
|
setPaperPaginationParams = _useState22[1];
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
paperData = _useState24[0],
|
|
|
setPaperData = _useState24[1];
|
|
|
var getPaperData = /*#__PURE__*/function () {
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(params) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
setPaperLoading(true);
|
|
|
_context4.next = 3;
|
|
|
return (0,service_virtualSpaces/* getPaperList */.NZ)(objectSpread2_default()({
|
|
|
virtual_classroom_id: virtual_spacesId
|
|
|
}, params));
|
|
|
case 3:
|
|
|
res = _context4.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
setPaperData(res);
|
|
|
}
|
|
|
setPaperLoading(false);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return function getPaperData(_x4) {
|
|
|
return _ref5.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleMoveOut = /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(item) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
modal/* default */.Z.confirm({
|
|
|
title: '移出试卷',
|
|
|
icon: null,
|
|
|
okText: '确认移出',
|
|
|
className: Experimentmodules.modalWrapper,
|
|
|
width: 428,
|
|
|
centered: true,
|
|
|
closable: false,
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u786E\u8BA4\u5C06\u8BFE\u7A0B\u8BD5\u5377\u300A", item === null || item === void 0 ? void 0 : item.name, "\u300B\u79FB\u51FA\u865A\u62DF\u793E\u533A\u5417\uFF1F"]
|
|
|
}),
|
|
|
okButtonProps: {
|
|
|
className: Experimentmodules.okBtn
|
|
|
},
|
|
|
cancelButtonProps: {
|
|
|
className: Experimentmodules.cancelBtn
|
|
|
},
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
_context5.next = 2;
|
|
|
return (0,service_virtualSpaces/* delPaper */.Np)({
|
|
|
virtual_classroom_id: virtual_spacesId,
|
|
|
id: item === null || item === void 0 ? void 0 : item.id
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context5.sent;
|
|
|
if (res.status === 0) {
|
|
|
getPaperData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function handleMoveOut(_x5) {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleSendToClass = function handleSendToClass(id, data) {
|
|
|
console.log(data, 'data');
|
|
|
dispatch({
|
|
|
type: 'paperlibrary/setActionTabs',
|
|
|
payload: {
|
|
|
key: 'Paperlibrary-SendToClass',
|
|
|
params: {
|
|
|
id: id,
|
|
|
data: data
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
coursePageLoading = _useState26[0],
|
|
|
setCoursePageLoading = _useState26[1];
|
|
|
var _useState27 = (0,_react_17_0_2_react.useState)({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
}),
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
coursePaginationParams = _useState28[0],
|
|
|
setCoursePaginationParams = _useState28[1];
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
courseData = _useState30[0],
|
|
|
setCourseData = _useState30[1];
|
|
|
var getCourseData = /*#__PURE__*/function () {
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(params) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
setCoursePageLoading(true);
|
|
|
_context7.next = 3;
|
|
|
return (0,service_virtualSpaces/* getCourseList */.tS)(virtual_spacesId, params);
|
|
|
case 3:
|
|
|
res = _context7.sent;
|
|
|
if (!('status' in res)) {
|
|
|
_context7.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
return _context7.abrupt("return");
|
|
|
case 6:
|
|
|
setCourseData(res);
|
|
|
setCoursePageLoading(false);
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}));
|
|
|
return function getCourseData(_x6) {
|
|
|
return _ref7.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)('shixun'),
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
currentTab = _useState32[0],
|
|
|
setCurrentTab = _useState32[1];
|
|
|
var ExtraContent = defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, 'shixun', /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
|
placement: "bottom",
|
|
|
menu: {
|
|
|
items: [{
|
|
|
label: '从实践项目选用',
|
|
|
key: 'fromShixun'
|
|
|
}, {
|
|
|
label: '从实践课程选用',
|
|
|
key: 'fromSubject'
|
|
|
}],
|
|
|
onClick: function onClick(_ref8) {
|
|
|
var key = _ref8.key;
|
|
|
if (key === 'fromShixun') {
|
|
|
dispatch({
|
|
|
type: "classroomList/setActionTabs",
|
|
|
payload: {
|
|
|
key: "选用实践项目"
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
dispatch({
|
|
|
type: "classroomList/setActionTabs",
|
|
|
payload: {
|
|
|
key: "选用实践课程"
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
children: "\u9009\u7528\u5B9E\u9A8C"
|
|
|
})
|
|
|
})
|
|
|
})), 'subject', /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
onClick: function onClick() {
|
|
|
dispatch({
|
|
|
type: "classroomList/setActionTabs",
|
|
|
payload: {
|
|
|
key: "选用实践课程"
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: "\u6DFB\u52A0\u5B9E\u8DF5\u8BFE\u7A0B"
|
|
|
})), 'topic', /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
onClick: function onClick() {
|
|
|
// dispatch({
|
|
|
// type: "classroomList/setActionTabs",
|
|
|
// payload: { key: "选用实践课程" }
|
|
|
// });
|
|
|
setshowquestion(true);
|
|
|
},
|
|
|
children: "\u52A0\u5165\u8BD5\u9898"
|
|
|
})), 'paper', /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
onClick: function onClick() {
|
|
|
dispatch({
|
|
|
type: 'exercise/setActionTabs',
|
|
|
payload: {
|
|
|
key: '试卷选用'
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: "\u52A0\u5165\u8BD5\u5377"
|
|
|
}));
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: Experimentmodules.wrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
spinning: shixunPageloading || coursePageLoading || topicPageLoading || paperPageLoading,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTabs */.YG, {
|
|
|
value: currentTab,
|
|
|
onChange: function onChange(tab) {
|
|
|
setCurrentTab(tab);
|
|
|
},
|
|
|
tabBarExtraContent: permission ? ExtraContent[currentTab] : null,
|
|
|
dataSource: [{
|
|
|
id: 'shixun',
|
|
|
name: '实践项目',
|
|
|
total: shixunData === null || shixunData === void 0 ? void 0 : shixunData.total_count
|
|
|
}, {
|
|
|
id: 'subject',
|
|
|
name: '实践课程',
|
|
|
total: courseData === null || courseData === void 0 ? void 0 : courseData.total_count
|
|
|
}, {
|
|
|
id: 'topic',
|
|
|
name: '课程试题',
|
|
|
total: topicData === null || topicData === void 0 ? void 0 : topicData.total_count
|
|
|
}, {
|
|
|
id: 'paper',
|
|
|
name: '课程试卷',
|
|
|
total: paperData === null || paperData === void 0 ? void 0 : paperData.total_count
|
|
|
}]
|
|
|
}), currentTab === 'shixun' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
paddingTop: 25
|
|
|
},
|
|
|
children: [(shixunData === null || shixunData === void 0 ? void 0 : shixunData.total_count) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), (shixunData === null || shixunData === void 0 ? void 0 : shixunData.total_count) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [shixunData.shixuns.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(components_ShixunItem, {
|
|
|
isCreator: isCreator,
|
|
|
data: item,
|
|
|
refreshData: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
|
var previousPage;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
if (shixunData.shixuns.length <= 1) {
|
|
|
previousPage = shixunPaginationParams.page > 1 ? shixunPaginationParams.page - 1 : 1;
|
|
|
setShixunPaginationParams({
|
|
|
page: previousPage,
|
|
|
limit: 10
|
|
|
});
|
|
|
getShixunsData({
|
|
|
page: previousPage,
|
|
|
limit: 10
|
|
|
});
|
|
|
} else {
|
|
|
getShixunsData(shixunPaginationParams);
|
|
|
}
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
})),
|
|
|
virtualClassroomId: virtual_spacesId
|
|
|
}, item.id);
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
pageSize: 10,
|
|
|
hideOnSinglePage: true,
|
|
|
total: shixunData === null || shixunData === void 0 ? void 0 : shixunData.total_count,
|
|
|
current: shixunPaginationParams.page,
|
|
|
onChange: function onChange(page) {
|
|
|
setShixunPaginationParams(function (pre) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, pre), {}, {
|
|
|
page: page
|
|
|
});
|
|
|
});
|
|
|
getShixunsData({
|
|
|
page: page,
|
|
|
limit: 10
|
|
|
});
|
|
|
},
|
|
|
showQuickJumper: true
|
|
|
})]
|
|
|
})]
|
|
|
}), currentTab === 'subject' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
paddingTop: 25
|
|
|
},
|
|
|
children: [(courseData === null || courseData === void 0 ? void 0 : courseData.total_count) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), (courseData === null || courseData === void 0 ? void 0 : courseData.total_count) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [courseData.subjects.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(components_SubjectItem, {
|
|
|
isCreator: isCreator,
|
|
|
data: item,
|
|
|
refreshData: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
var previousPage;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
case 0:
|
|
|
if (courseData.subjects.length <= 1) {
|
|
|
previousPage = coursePaginationParams.page > 1 ? coursePaginationParams.page - 1 : 1;
|
|
|
setCoursePaginationParams({
|
|
|
page: previousPage,
|
|
|
limit: 10
|
|
|
});
|
|
|
getCourseData({
|
|
|
page: previousPage,
|
|
|
limit: 10
|
|
|
});
|
|
|
} else {
|
|
|
getCourseData(coursePaginationParams);
|
|
|
}
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context9.stop();
|
|
|
}
|
|
|
}, _callee9);
|
|
|
})),
|
|
|
virtualClassroomId: virtual_spacesId
|
|
|
}, item.id);
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
pageSize: 10,
|
|
|
hideOnSinglePage: true,
|
|
|
total: courseData === null || courseData === void 0 ? void 0 : courseData.total_count,
|
|
|
current: coursePaginationParams.page,
|
|
|
onChange: function onChange(page) {
|
|
|
setCoursePaginationParams(function (pre) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, pre), {}, {
|
|
|
page: page
|
|
|
});
|
|
|
});
|
|
|
getCourseData({
|
|
|
page: page,
|
|
|
limit: 10
|
|
|
});
|
|
|
},
|
|
|
showQuickJumper: true
|
|
|
})]
|
|
|
})]
|
|
|
}), currentTab === 'topic' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
paddingTop: 25
|
|
|
},
|
|
|
children: [(topicData === null || topicData === void 0 ? void 0 : topicData.total_count) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), (topicData === null || topicData === void 0 ? void 0 : topicData.total_count) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [topicData.questions.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(TopicItem, {
|
|
|
isCreator: isCreator,
|
|
|
data: item,
|
|
|
refreshData: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
|
var previousPage;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
|
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
|
case 0:
|
|
|
if (courseData.subjects.length <= 1) {
|
|
|
previousPage = topicPaginationParams.page > 1 ? topicPaginationParams.page - 1 : 1;
|
|
|
setTopicPaginationParams({
|
|
|
page: previousPage,
|
|
|
limit: 10
|
|
|
});
|
|
|
getTopicsData({
|
|
|
page: previousPage,
|
|
|
limit: 10
|
|
|
});
|
|
|
} else {
|
|
|
getTopicsData(topicPaginationParams);
|
|
|
}
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context10.stop();
|
|
|
}
|
|
|
}, _callee10);
|
|
|
})),
|
|
|
virtualClassroomId: virtual_spacesId,
|
|
|
handleStartExperience: handleStartExperience
|
|
|
}, item.id);
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
pageSize: 10,
|
|
|
hideOnSinglePage: true,
|
|
|
total: topicData === null || topicData === void 0 ? void 0 : topicData.total_count,
|
|
|
current: topicPaginationParams.page,
|
|
|
onChange: function onChange(page) {
|
|
|
setTopicPaginationParams(function (pre) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, pre), {}, {
|
|
|
page: page
|
|
|
});
|
|
|
});
|
|
|
getTopicsData({
|
|
|
page: page,
|
|
|
limit: 10
|
|
|
});
|
|
|
},
|
|
|
showQuickJumper: true
|
|
|
})]
|
|
|
})]
|
|
|
}), currentTab === 'paper' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
paddingTop: 25
|
|
|
},
|
|
|
children: [(paperData === null || paperData === void 0 ? void 0 : paperData.total_count) === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), (paperData === null || paperData === void 0 ? void 0 : paperData.total_count) > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [paperData.papers.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(List/* List */.a, {
|
|
|
isVtrs: true,
|
|
|
showCheckbox: false,
|
|
|
data: item,
|
|
|
user: user,
|
|
|
authRole: true,
|
|
|
activeTabsKey: '6',
|
|
|
selectIds: [],
|
|
|
onSetSelectIds: function onSetSelectIds() {},
|
|
|
onCancelPublic: function onCancelPublic() {},
|
|
|
onCancelShare: function onCancelShare() {},
|
|
|
onPublicReview: function onPublicReview() {},
|
|
|
onEdit: function onEdit() {},
|
|
|
onDelete: function onDelete() {},
|
|
|
onSendToClass: handleSendToClass,
|
|
|
handleMoveOut: handleMoveOut
|
|
|
}, item.id);
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: 20
|
|
|
},
|
|
|
pageSize: 10,
|
|
|
hideOnSinglePage: true,
|
|
|
total: paperData === null || paperData === void 0 ? void 0 : paperData.total_count,
|
|
|
current: paperPaginationParams.page,
|
|
|
onChange: function onChange(page) {
|
|
|
setPaperPaginationParams(function (pre) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, pre), {}, {
|
|
|
page: page
|
|
|
});
|
|
|
});
|
|
|
getPaperData({
|
|
|
page: page,
|
|
|
limit: 10
|
|
|
});
|
|
|
},
|
|
|
showQuickJumper: true
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), classroomList.actionTabs.key === '选用实践项目' && /*#__PURE__*/(0,jsx_runtime.jsx)(SelectShixuns, {
|
|
|
shixunIds: [],
|
|
|
cb: ( /*#__PURE__*/function () {
|
|
|
var _ref12 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(ids) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
|
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
|
case 0:
|
|
|
_context11.next = 2;
|
|
|
return (0,service_virtualSpaces/* addShixun */.LY)(virtual_spacesId, {
|
|
|
source: 'shixun',
|
|
|
shixun_ids: ids,
|
|
|
module_id: experimentModuleId
|
|
|
});
|
|
|
case 2:
|
|
|
_context11.next = 4;
|
|
|
return getShixunsData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context11.stop();
|
|
|
}
|
|
|
}, _callee11);
|
|
|
}));
|
|
|
return function (_x7) {
|
|
|
return _ref12.apply(this, arguments);
|
|
|
};
|
|
|
}())
|
|
|
}), classroomList.actionTabs.key === '选用实践课程' && /*#__PURE__*/(0,jsx_runtime.jsx)(SelectCourses, {
|
|
|
onOk: ( /*#__PURE__*/function () {
|
|
|
var _ref13 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(subjectId) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
case 0:
|
|
|
if (!(currentTab === 'shixun')) {
|
|
|
_context12.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
_context12.next = 3;
|
|
|
return (0,service_virtualSpaces/* addShixun */.LY)(virtual_spacesId, {
|
|
|
source: 'subject',
|
|
|
subject_id: subjectId,
|
|
|
module_id: experimentModuleId
|
|
|
});
|
|
|
case 3:
|
|
|
_context12.next = 5;
|
|
|
return getShixunsData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
case 5:
|
|
|
_context12.next = 11;
|
|
|
break;
|
|
|
case 7:
|
|
|
_context12.next = 9;
|
|
|
return (0,service_virtualSpaces/* addCourse */.bq)(virtual_spacesId, {
|
|
|
subject_ids: [subjectId],
|
|
|
module_id: experimentModuleId
|
|
|
});
|
|
|
case 9:
|
|
|
_context12.next = 11;
|
|
|
return getCourseData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context12.stop();
|
|
|
}
|
|
|
}, _callee12);
|
|
|
}));
|
|
|
return function (_x8) {
|
|
|
return _ref13.apply(this, arguments);
|
|
|
};
|
|
|
}())
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddQuestionsModal/* default */.Z, {
|
|
|
setScoreShow: setshowquestion,
|
|
|
isshixuns: isshixun,
|
|
|
isloadings: isloadings,
|
|
|
ScoreShow: showquestion,
|
|
|
checkHasUsedShixun: false,
|
|
|
onOk: ( /*#__PURE__*/function () {
|
|
|
var _ref14 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(questionIdArr, shixunIdArr, ischeck_only, listitems_length, shixunCopyIds) {
|
|
|
var params, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
|
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
|
case 0:
|
|
|
setisloadings(true);
|
|
|
params = {
|
|
|
virtual_classroom_id: virtual_spacesId,
|
|
|
question_ids: [].concat(toConsumableArray_default()(questionIdArr), toConsumableArray_default()(shixunIdArr)),
|
|
|
// shixun_ids: shixunIdArr,
|
|
|
module_id: experimentModuleId
|
|
|
};
|
|
|
_context13.next = 4;
|
|
|
return (0,service_virtualSpaces/* addQuestion */.xL)(objectSpread2_default()({}, params));
|
|
|
case 4:
|
|
|
res = _context13.sent;
|
|
|
setisloadings(false);
|
|
|
setshowquestion(false);
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
message/* default */.ZP.info('添加成功');
|
|
|
getTopicsData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
}
|
|
|
// else if (res.status === -2) {
|
|
|
// Modal.confirm({
|
|
|
// title: '提示',
|
|
|
// content: `当前已选择${listitems_length}道试题,已加入过的试题或未发布的编程题将不会重复加入`,
|
|
|
// onOk: async () => {
|
|
|
// await addquestion(params);
|
|
|
// setshowquestion(false)
|
|
|
// init();
|
|
|
// message.info('添加成功')
|
|
|
// }
|
|
|
// })
|
|
|
// }
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context13.stop();
|
|
|
}
|
|
|
}, _callee13);
|
|
|
}));
|
|
|
return function (_x9, _x10, _x11, _x12, _x13) {
|
|
|
return _ref14.apply(this, arguments);
|
|
|
};
|
|
|
}())
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Single/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(Multiple/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(Judgment/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(Completion/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(SelectExercise/* default */.Z, {
|
|
|
isVtrs: true,
|
|
|
handleVtrsOk: ( /*#__PURE__*/function () {
|
|
|
var _ref15 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14(selectIds) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee14$(_context14) {
|
|
|
while (1) switch (_context14.prev = _context14.next) {
|
|
|
case 0:
|
|
|
_context14.next = 2;
|
|
|
return (0,service_virtualSpaces/* addPaper */.rM)({
|
|
|
virtual_classroom_id: virtual_spacesId,
|
|
|
paper_ids: selectIds,
|
|
|
module_id: experimentModuleId
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context14.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
dispatch({
|
|
|
type: 'exercise/setActionTabs',
|
|
|
payload: {
|
|
|
key: ''
|
|
|
}
|
|
|
});
|
|
|
message/* default */.ZP.success("添加成功");
|
|
|
getPaperData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context14.stop();
|
|
|
}
|
|
|
}, _callee14);
|
|
|
}));
|
|
|
return function (_x14) {
|
|
|
return _ref15.apply(this, arguments);
|
|
|
};
|
|
|
}())
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(SendToClassModal/* default */.Z, {})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Experiment = ((0,_umi_production_exports.connect)(function (_ref16) {
|
|
|
var classroomList = _ref16.classroomList,
|
|
|
virtualSpaces = _ref16.virtualSpaces,
|
|
|
user = _ref16.user,
|
|
|
problemset = _ref16.problemset;
|
|
|
return {
|
|
|
classroomList: classroomList,
|
|
|
virtualSpaces: virtualSpaces,
|
|
|
user: user,
|
|
|
problemset: problemset
|
|
|
};
|
|
|
})(ExperimentPage));
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |