diff --git a/Frontend/_graphManagement.html b/Frontend/_graphManagement.html index 7207b36..ddbe838 100644 --- a/Frontend/_graphManagement.html +++ b/Frontend/_graphManagement.html @@ -144,6 +144,7 @@ var uploadFiles = {}; var curActGraid = 0; var cookies = new YourTeam.Utility.Cookie(); + var token = cookies.get("JWT-Authorization"); $(function () { initList(); @@ -335,17 +336,17 @@ //uploader["graMyAsBuilt"][0].dropzone.removeAllFiles(true); //$("#graMyAsBuilt .dz-preview").remove(); }) - + function getGraCatList(callback) { - let url = baseApiUrl + "/GraphManage/GraphManageTreeList"; + let url = baseApiUrl + "/GraphManage/GraphManageTreeList"; ytAjax = new YourTeam.Ajax(url, null, function (res) { if (!res || res.code != "0000" || !res.data) { } else { - res.data.forEach(x => x.parent = x.system_parent_id); - res.data.forEach(x => x.text = x.system_key); - res.data.forEach(x => x.parent = x.parent); + res.data.forEach(x => x.parent = x.parent_id); + res.data.forEach(x => x.text = x.name); + // res.data.forEach(x => x.parent = x.parent); callback ? callback(res.data) : ""; } }, null, "POST").send(); @@ -454,12 +455,12 @@ }) $("#graTree").on('create_node.jstree', function (e, data) { let main = {}; - main.system_key = data.node.text; - main.system_parent_id = parseInt(data.node.parent); + main.name = data.node.text; + main.parent_id = parseInt(data.node.parent); objSendData.Data = main; - ytAjax = new YourTeam.Ajax(baseApiUrl + "/GraphManage/SaveVar", objSendData, function (res) { + ytAjax = new YourTeam.Ajax(baseApiUrl + "/GraphManage/SaveGraphManageTree", objSendData, function (res) { if (!res || res.code != "0000") { data.instance.delete_node(data.node); toast_error(res.msg || common.SysErr); @@ -475,10 +476,10 @@ let main = {} main.id = parseInt(data.node.id); - main.system_key = data.node.text; + main.name = data.node.text; objSendData.Data = main; - ytAjax = new YourTeam.Ajax(baseApiUrl + "/GraphManage/EditVar", objSendData, function (res) { + ytAjax = new YourTeam.Ajax(baseApiUrl + "/GraphManage/EditGraphManageTree", objSendData, function (res) { if (!res || res.code != "0000" || !res.data) { toast_error(res.msg || common.SysErr); } else { @@ -495,7 +496,7 @@ if (!isNaN(parseInt(data.node.id))) { main.id = parseInt(data.node.id); objSendData.Data = main; - ytAjax = new YourTeam.Ajax(baseApiUrl + "/GraphManage/DelVar", objSendData, function (res) { + ytAjax = new YourTeam.Ajax(baseApiUrl + "/GraphManage/DelGraphManageTree", objSendData, function (res) { if (!res || res.code != "0000" || !res.data) { toast_error(res.msg || common.SysErr); } else {