|
|
|
|
@ -87,6 +87,8 @@ var spin = __webpack_require__(71418);
|
|
|
|
|
var pagination = __webpack_require__(86859);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Collection/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var Collectionmodules = ({"contentListWrap":"contentListWrap___Ddghn","li":"li___wvr6Y","bottom":"bottom___OePHJ","actionLeftItem":"actionLeftItem___Hv4KU","tipLabel":"tipLabel___t7Ubm","tipVal":"tipVal___wipZz","questionTypeName":"questionTypeName___uMnDn","more":"more___GKswk","textBtn":"textBtn___zsrM5","line":"line___g8Y3f","b1":"b1___Hkokb","b2":"b2___bklGC"});
|
|
|
|
|
@ -910,7 +912,7 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
ref: function ref(el) {
|
|
|
|
|
return childRefs.current[v.id] = el;
|
|
|
|
|
}
|
|
|
|
|
}, v.id)
|
|
|
|
|
}, v.question_id)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Collectionmodules.bottom,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
|
|
@ -945,7 +947,7 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setCancleCollectVis(true);
|
|
|
|
|
setCancleId(v.id);
|
|
|
|
|
setCancleId(v.question_id);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Collectionmodules.line,
|
|
|
|
|
@ -1024,26 +1026,32 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
setCancleCollectVis(false);
|
|
|
|
|
},
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var _user$userInfo3;
|
|
|
|
|
var bodyParams, res, updatedRefs;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
bodyParams = {
|
|
|
|
|
container_id: cancleId,
|
|
|
|
|
container_type: 'ExerciseQuestion',
|
|
|
|
|
course_id: (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 || (_user$userInfo3 = _user$userInfo3.course) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.course_id
|
|
|
|
|
};
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
return (0,service_exercise/* cancleCollectQuestion */._o)(objectSpread2_default()({}, bodyParams));
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('取消成功!');
|
|
|
|
|
updatedRefs = objectSpread2_default()({}, childRefs.current);
|
|
|
|
|
delete updatedRefs[cancleId]; // 清除已删除项的引用
|
|
|
|
|
childRefs.current = updatedRefs; // 更新引用对象
|
|
|
|
|
|
|
|
|
|
// const updatedRefs = { ...childRefs.current };
|
|
|
|
|
// delete updatedRefs[cancleId]; // 清除已删除项的引用
|
|
|
|
|
// childRefs.current = updatedRefs; // 更新引用对象
|
|
|
|
|
|
|
|
|
|
// const res = await Fetch(`/api/user_mirrors/${routeParams?.experid}/revoke_apply.json`, {
|
|
|
|
|
// method: 'post'
|
|
|
|
|
// },
|
|
|
|
|
// );
|
|
|
|
|
// if (res.status === 0) {
|
|
|
|
|
// message.success('撤销成功');
|
|
|
|
|
// getDetail()
|
|
|
|
|
// }
|
|
|
|
|
getCollectionList();
|
|
|
|
|
}
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
setCancleCollectVis(false);
|
|
|
|
|
case 3:
|
|
|
|
|
case 8:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|