|
|
|
|
@ -78,7 +78,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
var _umi_production_exports = __webpack_require__(13032);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/CloudStudy/Detail/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var Detailmodules = ({"page":"page___EfVMq","body":"body___RJ4X6","left":"left___W8plP","dot":"dot___HpN06","right":"right___Gr7yE","btn":"btn___A_riP","search":"search___cg9mh","searchIcon":"searchIcon___QCR8t","listWrap":"listWrap___x2fwI","li":"li___YwHKX","name":"name___rb8tn","col":"col___m90Jr","numTips":"numTips___w4Sdu","btnElse":"btnElse___fpHce"});
|
|
|
|
|
/* harmony default export */ var Detailmodules = ({"page":"page___EfVMq","body":"body___RJ4X6","left":"left___W8plP","dot":"dot___HpN06","right":"right___Gr7yE","btn":"btn___A_riP","search":"search___cg9mh","searchIcon":"searchIcon___QCR8t","listWrap":"listWrap___x2fwI","li":"li___YwHKX","btns":"btns___AhyhE","name":"name___rb8tn","col":"col___m90Jr","numTips":"numTips___w4Sdu","btnElse":"btnElse___fpHce"});
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/HeaderNav/index.tsx + 4 modules
|
|
|
|
|
var HeaderNav = __webpack_require__(79624);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
|
|
@ -268,6 +268,10 @@ var row = __webpack_require__(95237);
|
|
|
|
|
var spin = __webpack_require__(71418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
|
|
|
|
var input = __webpack_require__(92832);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
|
|
|
@ -280,10 +284,6 @@ var objectWithoutProperties = __webpack_require__(39647);
|
|
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
|
|
// 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/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/popover/index.js
|
|
|
|
|
var popover = __webpack_require__(60324);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/index.js + 8 modules
|
|
|
|
|
@ -702,7 +702,7 @@ var authority = __webpack_require__(91569);
|
|
|
|
|
// 新版首页入口
|
|
|
|
|
|
|
|
|
|
var CloudStudy = function CloudStudy(_ref) {
|
|
|
|
|
var _treeData$2;
|
|
|
|
|
var _user$userInfo, _treeData$2;
|
|
|
|
|
var user = _ref.user;
|
|
|
|
|
// useResponsiveFontSize();
|
|
|
|
|
var urlParams = (0,_umi_production_exports.useParams)();
|
|
|
|
|
@ -762,15 +762,19 @@ var CloudStudy = function CloudStudy(_ref) {
|
|
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
|
|
showAddDirectory = _useState28[0],
|
|
|
|
|
setShowAddDirectory = _useState28[1];
|
|
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
|
|
showEdit = _useState30[0],
|
|
|
|
|
setShowEdit = _useState30[1];
|
|
|
|
|
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
content: "",
|
|
|
|
|
type: ""
|
|
|
|
|
}),
|
|
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
|
|
previewData = _useState30[0],
|
|
|
|
|
setPreviewData = _useState30[1];
|
|
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
|
|
previewData = _useState32[0],
|
|
|
|
|
setPreviewData = _useState32[1];
|
|
|
|
|
var _useState33 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
keyword: '',
|
|
|
|
|
category: null,
|
|
|
|
|
sort_by: 'created_at',
|
|
|
|
|
@ -778,9 +782,9 @@ var CloudStudy = function CloudStudy(_ref) {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 12
|
|
|
|
|
}),
|
|
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
|
|
params = _useState32[0],
|
|
|
|
|
setParams = _useState32[1];
|
|
|
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
|
|
|
params = _useState34[0],
|
|
|
|
|
setParams = _useState34[1];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getKnowDetail();
|
|
|
|
|
_getKnowledgesFolders2();
|
|
|
|
|
@ -1057,7 +1061,7 @@ var CloudStudy = function CloudStudy(_ref) {
|
|
|
|
|
return handleSearch(keyword);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}), (0,authority/* isSuperAdmin */.j5)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
}), (user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.role) == 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Detailmodules.btn,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setIsUpLoadEdit(false);
|
|
|
|
|
@ -1075,11 +1079,11 @@ var CloudStudy = function CloudStudy(_ref) {
|
|
|
|
|
children: [!(inforList !== null && inforList !== void 0 && inforList.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), !!(inforList !== null && inforList !== void 0 && inforList.length) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Detailmodules.listWrap,
|
|
|
|
|
children: inforList.map(function (item) {
|
|
|
|
|
var _item$attachments3;
|
|
|
|
|
var _user$userInfo2, _item$attachments3;
|
|
|
|
|
var array = [bg1_namespaceObject, bg2_namespaceObject, bg3_namespaceObject, bg4_namespaceObject];
|
|
|
|
|
var randomImg = array[Math.floor(Math.random() * array.length)];
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Detailmodules.li,
|
|
|
|
|
className: "".concat(Detailmodules.li, " ").concat(Detailmodules.li_hover),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var _item$attachments;
|
|
|
|
|
if (item !== null && item !== void 0 && (_item$attachments = item.attachments) !== null && _item$attachments !== void 0 && (_item$attachments = _item$attachments[0]) !== null && _item$attachments !== void 0 && _item$attachments.url) {
|
|
|
|
|
@ -1087,7 +1091,79 @@ var CloudStudy = function CloudStudy(_ref) {
|
|
|
|
|
preview(item === null || item === void 0 || (_item$attachments2 = item.attachments) === null || _item$attachments2 === void 0 ? void 0 : _item$attachments2[0]);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
children: [(user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.role) == 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Detailmodules.btns,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 'auto',
|
|
|
|
|
marginRight: 20
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick(e) {
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
setEditData(objectSpread2_default()({}, item));
|
|
|
|
|
setIsUpLoadEdit(true);
|
|
|
|
|
setShowUpload(true);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "icon-zzxy-xiugai current",
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 6,
|
|
|
|
|
marginTop: 2,
|
|
|
|
|
fontSize: 20
|
|
|
|
|
}
|
|
|
|
|
}), "\u7F16\u8F91"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 10
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick(e) {
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
icon: null,
|
|
|
|
|
title: "提示",
|
|
|
|
|
content: "\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8D44\u6E90\u300A".concat(item === null || item === void 0 ? void 0 : item.name, "\u300B\uFF0C\u786E\u8BA4\u5220\u9664\u540E\uFF0C\u5C06\u65E0\u6CD5\u6062\u590D\u6587\u4EF6\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C"),
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context5.next = 2;
|
|
|
|
|
return (0,knowbase/* del_resource */.fL)({
|
|
|
|
|
id: urlParams === null || urlParams === void 0 ? void 0 : urlParams.id,
|
|
|
|
|
knowledge_resource_id: item === null || item === void 0 ? void 0 : item.id
|
|
|
|
|
}).then(function (res) {
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('删除成功');
|
|
|
|
|
getKnowDetail();
|
|
|
|
|
getNewList();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "icon-zzxy-shanchu11 current",
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 6,
|
|
|
|
|
marginTop: 2,
|
|
|
|
|
fontSize: 20
|
|
|
|
|
}
|
|
|
|
|
}), "\u5220\u9664"]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
src: randomImg
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: item === null || item === void 0 ? void 0 : item.name,
|
|
|
|
|
@ -1182,6 +1258,7 @@ var CloudStudy = function CloudStudy(_ref) {
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
// setSelectedKeys([]);
|
|
|
|
|
// setDirectoryId('');
|
|
|
|
|
getKnowDetail();
|
|
|
|
|
getNewList();
|
|
|
|
|
setShowUpload(false);
|
|
|
|
|
}
|