|
|
|
|
@ -14052,7 +14052,7 @@ var ContinuousForceDirectedLayout = /*#__PURE__*/function (_go$ForceDirectedLayo
|
|
|
|
|
var colors = ['#3CDAA3', '#9C41DE', '#F84F90', '#30A7F1', '#6656FF'];
|
|
|
|
|
var textcolor = ['根节点', '课件知识单元', '实训知识单元', '文本知识单元', '知识点'];
|
|
|
|
|
var knowledge_Atlas = function Atlas(_ref) {
|
|
|
|
|
var _pathsDetail$detail3, _pathsDetail$detail4, _pathsDetail$detail5, _pathsDetail$detail6, _pathsDetail$detail7, _pathsDetail$detail8, _items$relations, _items$descriptions;
|
|
|
|
|
var _pathsDetail$detail3, _pathsDetail$detail4, _pathsDetail$detail5, _pathsDetail$detail6, _pathsDetail$detail7, _pathsDetail$detail8, _items, _items$relations, _items$descriptions;
|
|
|
|
|
var user = _ref.user,
|
|
|
|
|
pathsDetail = _ref.pathsDetail;
|
|
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
|
|
@ -14285,7 +14285,7 @@ var knowledge_Atlas = function Atlas(_ref) {
|
|
|
|
|
};
|
|
|
|
|
function layoutAll(myDiagram, id) {
|
|
|
|
|
var root = myDiagram.findNodeForKey(id);
|
|
|
|
|
debugger;
|
|
|
|
|
// debugger
|
|
|
|
|
if (root === null) return;
|
|
|
|
|
myDiagram.startTransaction("Layout");
|
|
|
|
|
// split the nodes and links into two collections
|
|
|
|
|
@ -15314,7 +15314,7 @@ var knowledge_Atlas = function Atlas(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: knowledgemodules.line
|
|
|
|
|
}), "\u5173\u7CFB"]
|
|
|
|
|
}), items === null || items === void 0 ? void 0 : (_items$relations = items.relations) === null || _items$relations === void 0 ? void 0 : _items$relations.map(function (item, index) {
|
|
|
|
|
}), (_items = items) === null || _items === void 0 ? void 0 : (_items$relations = _items.relations) === null || _items$relations === void 0 ? void 0 : _items$relations.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
@ -15346,13 +15346,14 @@ var knowledge_Atlas = function Atlas(_ref) {
|
|
|
|
|
content: '请确认是否将节点之间的关系解绑',
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
|
|
var _items2;
|
|
|
|
|
var res, _items$relations2;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setsploading(true);
|
|
|
|
|
_context9.next = 3;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/knowledge_graphs/".concat(items === null || items === void 0 ? void 0 : items.id, "/delete_relation.json"), {
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/knowledge_graphs/".concat((_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.id, "/delete_relation.json"), {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
body: {
|
|
|
|
|
relation_id: item.relation_id
|
|
|
|
|
@ -15940,6 +15941,8 @@ var knowledge_Atlas = function Atlas(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
setFileList([]);
|
|
|
|
|
items = {};
|
|
|
|
|
setitems({});
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.success) > 0) {
|
|
|
|
|
message/* default.info */.ZP.info('添加成功');
|
|
|
|
|
}
|
|
|
|
|
|