You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
642 lines
34 KiB
642 lines
34 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[96265],{
|
|
|
|
/***/ 90477:
|
|
/*!************************************************************!*\
|
|
!*** ./src/pages/virtualSpaces/Lists/Discussion/index.tsx ***!
|
|
\************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js */ 27161);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 38670);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! antd */ 78241);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! antd */ 71418);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! antd */ 95237);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! antd */ 43604);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! antd */ 6848);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! antd */ 41867);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var _components_ui_customization__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/ui-customization */ 7113);
|
|
/* harmony import */ var _components_NoData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/NoData */ 57732);
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./index.less?modules */ 55117);
|
|
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/env */ 67871);
|
|
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/utils/util */ 85578);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! moment */ 9498);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_12__);
|
|
/* harmony import */ var _pages_virtualSpaces_Lists_Discussion_AddOrEdit__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/pages/virtualSpaces/Lists/Discussion/AddOrEdit */ 53823);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["classroomList", "globalSetting", "virtualSpaces", "loading", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DiscussionPage = function DiscussionPage(_ref) {
|
|
var _menus$find, _DiscussionList$data, _DiscussionList$data2, _DiscussionList$data3, _DiscussionList$data4, _DiscussionList$data5;
|
|
var classroomList = _ref.classroomList,
|
|
globalSetting = _ref.globalSetting,
|
|
virtualSpaces = _ref.virtualSpaces,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded);
|
|
var DiscussionList = virtualSpaces.DiscussionList,
|
|
menus = virtualSpaces.menus;
|
|
var _Form$useForm = antd__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z.useForm(),
|
|
_Form$useForm2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var _useParams = (0,umi__WEBPACK_IMPORTED_MODULE_6__.useParams)(),
|
|
virtual_spacesId = _useParams.virtual_spacesId;
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
|
isAddDiscussion = _useState2[0],
|
|
setIsAddDiscussion = _useState2[1];
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)({
|
|
page: 1,
|
|
limit: 15
|
|
}),
|
|
_useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState3, 2),
|
|
urlData = _useState4[0],
|
|
setUrlData = _useState4[1];
|
|
// const moduleName = menus?.find((e: any) => e.module_url === location.pathname)?.name || '';
|
|
|
|
var moduleName = (menus === null || menus === void 0 || (_menus$find = menus.find(function (e) {
|
|
return e.id == window.localStorage.getItem('vtrsModuleId');
|
|
})) === null || _menus$find === void 0 ? void 0 : _menus$find.name) || '';
|
|
var getDiscussionList = function getDiscussionList() {
|
|
window.scrollTo(0, 0);
|
|
dispatch({
|
|
type: "virtualSpaces/getDiscussionList",
|
|
payload: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, urlData), {}, {
|
|
virtual_spacesId: virtual_spacesId,
|
|
virtual_module_id: window.localStorage.getItem('vtrsModuleId')
|
|
})
|
|
});
|
|
};
|
|
(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
|
|
getDiscussionList();
|
|
}, [urlData, window.localStorage.getItem('vtrsModuleId')]);
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z, {
|
|
spinning: loading["virtualSpaces/getDiscussionList"],
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", {
|
|
className: "ml40 mr40",
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_customization__WEBPACK_IMPORTED_MODULE_7__/* .CustomTabs */ .YG, {
|
|
value: 'all',
|
|
onChange: function onChange() {},
|
|
tabBarExtraContent: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_customization__WEBPACK_IMPORTED_MODULE_7__/* .CustomButton */ .op, {
|
|
onClick: function onClick() {
|
|
setIsAddDiscussion(true);
|
|
form.resetFields();
|
|
},
|
|
children: "\u65B0\u5EFA"
|
|
}),
|
|
dataSource: [{
|
|
id: 'all',
|
|
name: moduleName
|
|
}]
|
|
}), (DiscussionList === null || DiscussionList === void 0 || (_DiscussionList$data = DiscussionList.data) === null || _DiscussionList$data === void 0 ? void 0 : _DiscussionList$data.count) == 0 ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_NoData__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", {
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.DiscussionList,
|
|
children: DiscussionList === null || DiscussionList === void 0 || (_DiscussionList$data2 = DiscussionList.data) === null || _DiscussionList$data2 === void 0 || (_DiscussionList$data2 = _DiscussionList$data2.list) === null || _DiscussionList$data2 === void 0 ? void 0 : _DiscussionList$data2.map(function (item, index) {
|
|
var _item$cover;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, {
|
|
style: {
|
|
flexDirection: "column"
|
|
},
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.DiscussionListItem,
|
|
onClick: function onClick() {
|
|
umi__WEBPACK_IMPORTED_MODULE_6__.history.push("/".concat(_utils_util__WEBPACK_IMPORTED_MODULE_11__/* .vtrsKey */ .AS, "/").concat(virtual_spacesId, "/discussion/").concat(item.id, "/detail?leftMenuId=").concat(window.localStorage.getItem('vtrsModuleId')));
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
style: {
|
|
width: 283,
|
|
height: 177,
|
|
overflow: "hidden"
|
|
},
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("img", {
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.DiscussionListItemImg,
|
|
src: "".concat(_utils_env__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z.API_SERVER).concat(item === null || item === void 0 || (_item$cover = item.cover) === null || _item$cover === void 0 ? void 0 : _item$cover.url)
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, {
|
|
justify: "space-between",
|
|
style: {
|
|
padding: "26px 12px",
|
|
flexDirection: "column",
|
|
flex: 1,
|
|
width: 283
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z, {
|
|
placement: "topLeft",
|
|
title: item.name,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", {
|
|
className: "font16 ".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.Onerow),
|
|
style: {
|
|
color: "#333",
|
|
fontWeight: 600
|
|
},
|
|
children: item.name
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", {
|
|
className: "mt10 ".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.MultiLine),
|
|
style: {
|
|
color: "#666"
|
|
},
|
|
children: item.desc
|
|
})]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, {
|
|
style: {
|
|
marginTop: "22px"
|
|
},
|
|
align: "middle",
|
|
justify: "space-between",
|
|
wrap: false,
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("i", {
|
|
className: "iconfont icon-shijian1 font12 mr5"
|
|
}), moment__WEBPACK_IMPORTED_MODULE_12___default()(item === null || item === void 0 ? void 0 : item.created_at).format("YYYY-MM-DD")]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z, {
|
|
placement: "topLeft",
|
|
title: item.real_name,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.Onerow,
|
|
style: {
|
|
maxWidth: 150,
|
|
lineHeight: "18px"
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("img", {
|
|
className: "mr5",
|
|
width: 18,
|
|
height: 18,
|
|
src: "".concat(_utils_env__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z.IMG_SERVER, "/images/").concat(item === null || item === void 0 ? void 0 : item.user_image_url)
|
|
}), item === null || item === void 0 ? void 0 : item.real_name]
|
|
})
|
|
})]
|
|
})]
|
|
})]
|
|
}, index);
|
|
})
|
|
}), (DiscussionList === null || DiscussionList === void 0 || (_DiscussionList$data3 = DiscussionList.data) === null || _DiscussionList$data3 === void 0 ? void 0 : _DiscussionList$data3.count) != 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, {
|
|
className: "mt20 mb20",
|
|
wrap: false,
|
|
align: "middle",
|
|
justify: "space-between",
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
children: ["\u5171\xA0", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("span", {
|
|
style: {
|
|
color: "#165DFF"
|
|
},
|
|
children: (DiscussionList === null || DiscussionList === void 0 || (_DiscussionList$data4 = DiscussionList.data) === null || _DiscussionList$data4 === void 0 ? void 0 : _DiscussionList$data4.count) || 0
|
|
}), "\xA0\u6761\u6570\u636E"]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, {
|
|
showSizeChanger: false,
|
|
showQuickJumper: true,
|
|
current: urlData.page,
|
|
pageSize: urlData.limit,
|
|
onChange: function onChange(page, limit) {
|
|
return setUrlData(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, urlData), {}, {
|
|
page: page,
|
|
limit: limit
|
|
}));
|
|
},
|
|
total: (DiscussionList === null || DiscussionList === void 0 || (_DiscussionList$data5 = DiscussionList.data) === null || _DiscussionList$data5 === void 0 ? void 0 : _DiscussionList$data5.count) || 0
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_pages_virtualSpaces_Lists_Discussion_AddOrEdit__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
|
|
form: form,
|
|
title: "新建交流研讨",
|
|
width: 1200,
|
|
open: isAddDiscussion,
|
|
destroyOnClose: true,
|
|
dispatch: dispatch,
|
|
onCancel: function onCancel() {
|
|
setIsAddDiscussion(false);
|
|
form.resetFields();
|
|
},
|
|
confirmLoading: loading["virtualSpaces/postDiscussionList"],
|
|
onOk: function onOk() {
|
|
return form.submit();
|
|
},
|
|
handleFinish: /*#__PURE__*/function () {
|
|
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(ValueAll) {
|
|
var _ValueAll$attachment_;
|
|
var res;
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
ValueAll.attachment_ids = (ValueAll === null || ValueAll === void 0 || (_ValueAll$attachment_ = ValueAll.attachment_ids) === null || _ValueAll$attachment_ === void 0 ? void 0 : _ValueAll$attachment_.map(function (item) {
|
|
var _item$response;
|
|
return item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id;
|
|
})) || [];
|
|
_context.next = 3;
|
|
return dispatch({
|
|
type: "virtualSpaces/postDiscussionList",
|
|
payload: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
virtual_spacesId: virtual_spacesId
|
|
}, ValueAll), {}, {
|
|
virtual_module_id: window.localStorage.getItem('vtrsModuleId')
|
|
})
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
console.log(ValueAll);
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .ZP.success("新建成功");
|
|
form.resetFields();
|
|
setIsAddDiscussion(false);
|
|
getDiscussionList();
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function (_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}()
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__["default"] = ((0,umi__WEBPACK_IMPORTED_MODULE_6__.connect)(function (_ref3) {
|
|
var classroomList = _ref3.classroomList,
|
|
loading = _ref3.loading,
|
|
globalSetting = _ref3.globalSetting,
|
|
virtualSpaces = _ref3.virtualSpaces,
|
|
user = _ref3.user;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects,
|
|
virtualSpaces: virtualSpaces,
|
|
user: user
|
|
};
|
|
})(DiscussionPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 38854:
|
|
/*!************************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules ***!
|
|
\************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ es_dropdown; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js
|
|
var dropdown = __webpack_require__(91857);
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.0@classnames/index.js
|
|
var _classnames_2_5_0_classnames = __webpack_require__(73287);
|
|
var _classnames_2_5_0_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_0_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules
|
|
var EllipsisOutlined = __webpack_require__(93319);
|
|
// 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/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules
|
|
var space = __webpack_require__(81327);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
|
var Compact = __webpack_require__(33234);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/style/index.js + 1 modules
|
|
var style = __webpack_require__(47211);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown-button.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const DropdownButton = props => {
|
|
const {
|
|
getPopupContainer: getContextPopupContainer,
|
|
getPrefixCls,
|
|
direction
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
type = 'default',
|
|
danger,
|
|
disabled,
|
|
loading,
|
|
onClick,
|
|
htmlType,
|
|
children,
|
|
className,
|
|
menu,
|
|
arrow,
|
|
autoFocus,
|
|
overlay,
|
|
trigger,
|
|
align,
|
|
open,
|
|
onOpenChange,
|
|
placement,
|
|
getPopupContainer,
|
|
href,
|
|
icon = /*#__PURE__*/_react_17_0_2_react.createElement(EllipsisOutlined/* default */.Z, null),
|
|
title,
|
|
buttonsRender = buttons => buttons,
|
|
mouseEnterDelay,
|
|
mouseLeaveDelay,
|
|
overlayClassName,
|
|
overlayStyle,
|
|
destroyPopupOnHide,
|
|
dropdownRender
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]);
|
|
const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
|
|
const buttonPrefixCls = `${prefixCls}-button`;
|
|
const [wrapSSR, hashId] = (0,style/* default */.Z)(prefixCls);
|
|
const dropdownProps = {
|
|
menu,
|
|
arrow,
|
|
autoFocus,
|
|
align,
|
|
disabled,
|
|
trigger: disabled ? [] : trigger,
|
|
onOpenChange,
|
|
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
mouseEnterDelay,
|
|
mouseLeaveDelay,
|
|
overlayClassName,
|
|
overlayStyle,
|
|
destroyPopupOnHide,
|
|
dropdownRender
|
|
};
|
|
const {
|
|
compactSize,
|
|
compactItemClassnames
|
|
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
|
const classes = _classnames_2_5_0_classnames_default()(buttonPrefixCls, compactItemClassnames, className, hashId);
|
|
if ('overlay' in props) {
|
|
dropdownProps.overlay = overlay;
|
|
}
|
|
if ('open' in props) {
|
|
dropdownProps.open = open;
|
|
}
|
|
if ('placement' in props) {
|
|
dropdownProps.placement = placement;
|
|
} else {
|
|
dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';
|
|
}
|
|
const leftButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
|
type: type,
|
|
danger: danger,
|
|
disabled: disabled,
|
|
loading: loading,
|
|
onClick: onClick,
|
|
htmlType: htmlType,
|
|
href: href,
|
|
title: title
|
|
}, children);
|
|
const rightButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
|
type: type,
|
|
danger: danger,
|
|
icon: icon
|
|
});
|
|
const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(space/* default */.Z.Compact, Object.assign({
|
|
className: classes,
|
|
size: compactSize,
|
|
block: true
|
|
}, restProps), leftButtonToRender, /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({}, dropdownProps), rightButtonToRender)));
|
|
};
|
|
DropdownButton.__ANT_BUTTON = true;
|
|
/* harmony default export */ var dropdown_button = (DropdownButton);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js
|
|
"use client";
|
|
|
|
|
|
|
|
const Dropdown = dropdown/* default */.Z;
|
|
Dropdown.Button = dropdown_button;
|
|
/* harmony default export */ var es_dropdown = (Dropdown);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 81327:
|
|
/*!*********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules ***!
|
|
\*********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ space; }
|
|
});
|
|
|
|
// UNUSED EXPORTS: SpaceContext
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.0@classnames/index.js
|
|
var _classnames_2_5_0_classnames = __webpack_require__(73287);
|
|
var _classnames_2_5_0_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_0_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(45659);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
|
var Compact = __webpack_require__(33234);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/context.js
|
|
|
|
const SpaceContext = /*#__PURE__*/_react_17_0_2_react.createContext({
|
|
latestIndex: 0
|
|
});
|
|
const SpaceContextProvider = SpaceContext.Provider;
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Item.js
|
|
"use client";
|
|
|
|
|
|
|
|
const Item = _ref => {
|
|
let {
|
|
className,
|
|
index,
|
|
children,
|
|
split,
|
|
style
|
|
} = _ref;
|
|
const {
|
|
latestIndex
|
|
} = _react_17_0_2_react.useContext(SpaceContext);
|
|
if (children === null || children === undefined) {
|
|
return null;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: className,
|
|
style: style
|
|
}, children), index < latestIndex && split && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${className}-split`
|
|
}, split));
|
|
};
|
|
/* harmony default export */ var space_Item = (Item);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/style/index.js + 1 modules
|
|
var space_style = __webpack_require__(2856);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/utils.js
|
|
function isPresetSize(size) {
|
|
return ['small', 'middle', 'large'].includes(size);
|
|
}
|
|
function isValidGapNumber(size) {
|
|
if (!size) {
|
|
// The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it.
|
|
return false;
|
|
}
|
|
return typeof size === 'number' && !Number.isNaN(size);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Space = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
var _a, _b;
|
|
const {
|
|
getPrefixCls,
|
|
space,
|
|
direction: directionConfig
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
size = (space === null || space === void 0 ? void 0 : space.size) || 'small',
|
|
align,
|
|
className,
|
|
rootClassName,
|
|
children,
|
|
direction = 'horizontal',
|
|
prefixCls: customizePrefixCls,
|
|
split,
|
|
style,
|
|
wrap = false,
|
|
classNames: customClassNames,
|
|
styles
|
|
} = props,
|
|
otherProps = __rest(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]);
|
|
const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];
|
|
const isPresetVerticalSize = isPresetSize(verticalSize);
|
|
const isPresetHorizontalSize = isPresetSize(horizontalSize);
|
|
const isValidVerticalSize = isValidGapNumber(verticalSize);
|
|
const isValidHorizontalSize = isValidGapNumber(horizontalSize);
|
|
const childNodes = (0,toArray/* default */.Z)(children, {
|
|
keepEmpty: true
|
|
});
|
|
const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;
|
|
const prefixCls = getPrefixCls('space', customizePrefixCls);
|
|
const [wrapSSR, hashId] = (0,space_style/* default */.Z)(prefixCls);
|
|
const cls = _classnames_2_5_0_classnames_default()(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, {
|
|
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
|
|
[`${prefixCls}-align-${mergedAlign}`]: mergedAlign,
|
|
[`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,
|
|
[`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize
|
|
}, className, rootClassName);
|
|
const itemClassName = _classnames_2_5_0_classnames_default()(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.classNames) === null || _b === void 0 ? void 0 : _b.item);
|
|
// Calculate latest one
|
|
let latestIndex = 0;
|
|
const nodes = childNodes.map((child, i) => {
|
|
var _a, _b;
|
|
if (child !== null && child !== undefined) {
|
|
latestIndex = i;
|
|
}
|
|
const key = child && child.key || `${itemClassName}-${i}`;
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(space_Item, {
|
|
className: itemClassName,
|
|
key: key,
|
|
index: i,
|
|
split: split,
|
|
style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item
|
|
}, child);
|
|
});
|
|
const spaceContext = _react_17_0_2_react.useMemo(() => ({
|
|
latestIndex
|
|
}), [latestIndex]);
|
|
// =========================== Render ===========================
|
|
if (childNodes.length === 0) {
|
|
return null;
|
|
}
|
|
const gapStyle = {};
|
|
if (wrap) {
|
|
gapStyle.flexWrap = 'wrap';
|
|
}
|
|
if (!isPresetHorizontalSize && isValidHorizontalSize) {
|
|
gapStyle.columnGap = horizontalSize;
|
|
}
|
|
if (!isPresetVerticalSize && isValidVerticalSize) {
|
|
gapStyle.rowGap = verticalSize;
|
|
}
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
|
ref: ref,
|
|
className: cls,
|
|
style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style)
|
|
}, otherProps), /*#__PURE__*/_react_17_0_2_react.createElement(SpaceContextProvider, {
|
|
value: spaceContext
|
|
}, nodes)));
|
|
});
|
|
if (false) {}
|
|
const CompoundedSpace = Space;
|
|
CompoundedSpace.Compact = Compact/* default */.ZP;
|
|
/* harmony default export */ var space = (CompoundedSpace);
|
|
|
|
/***/ })
|
|
|
|
}]); |