[前台] 圖資管理前端程序更新
This commit is contained in:
parent
e5b20132ad
commit
01b4db1b92
@ -144,6 +144,7 @@
|
|||||||
var uploadFiles = {};
|
var uploadFiles = {};
|
||||||
var curActGraid = 0;
|
var curActGraid = 0;
|
||||||
var cookies = new YourTeam.Utility.Cookie();
|
var cookies = new YourTeam.Utility.Cookie();
|
||||||
|
|
||||||
var token = cookies.get("JWT-Authorization");
|
var token = cookies.get("JWT-Authorization");
|
||||||
$(function () {
|
$(function () {
|
||||||
initList();
|
initList();
|
||||||
@ -337,15 +338,15 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function getGraCatList(callback) {
|
function getGraCatList(callback) {
|
||||||
let url = baseApiUrl + "/GraphManage/GraphManageTreeList";
|
let url = baseApiUrl + "/GraphManage/GraphManageTreeList";
|
||||||
|
|
||||||
ytAjax = new YourTeam.Ajax(url, null, function (res) {
|
ytAjax = new YourTeam.Ajax(url, null, function (res) {
|
||||||
if (!res || res.code != "0000" || !res.data) {
|
if (!res || res.code != "0000" || !res.data) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
res.data.forEach(x => x.parent = x.system_parent_id);
|
res.data.forEach(x => x.parent = x.parent_id);
|
||||||
res.data.forEach(x => x.text = x.system_key);
|
res.data.forEach(x => x.text = x.name);
|
||||||
res.data.forEach(x => x.parent = x.parent);
|
// res.data.forEach(x => x.parent = x.parent);
|
||||||
callback ? callback(res.data) : "";
|
callback ? callback(res.data) : "";
|
||||||
}
|
}
|
||||||
}, null, "POST").send();
|
}, null, "POST").send();
|
||||||
@ -454,12 +455,12 @@
|
|||||||
})
|
})
|
||||||
$("#graTree").on('create_node.jstree', function (e, data) {
|
$("#graTree").on('create_node.jstree', function (e, data) {
|
||||||
let main = {};
|
let main = {};
|
||||||
main.system_key = data.node.text;
|
main.name = data.node.text;
|
||||||
main.system_parent_id = parseInt(data.node.parent);
|
main.parent_id = parseInt(data.node.parent);
|
||||||
|
|
||||||
objSendData.Data = main;
|
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") {
|
if (!res || res.code != "0000") {
|
||||||
data.instance.delete_node(data.node);
|
data.instance.delete_node(data.node);
|
||||||
toast_error(res.msg || common.SysErr);
|
toast_error(res.msg || common.SysErr);
|
||||||
@ -475,10 +476,10 @@
|
|||||||
let main = {}
|
let main = {}
|
||||||
|
|
||||||
main.id = parseInt(data.node.id);
|
main.id = parseInt(data.node.id);
|
||||||
main.system_key = data.node.text;
|
main.name = data.node.text;
|
||||||
|
|
||||||
objSendData.Data = main;
|
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) {
|
if (!res || res.code != "0000" || !res.data) {
|
||||||
toast_error(res.msg || common.SysErr);
|
toast_error(res.msg || common.SysErr);
|
||||||
} else {
|
} else {
|
||||||
@ -495,7 +496,7 @@
|
|||||||
if (!isNaN(parseInt(data.node.id))) {
|
if (!isNaN(parseInt(data.node.id))) {
|
||||||
main.id = parseInt(data.node.id);
|
main.id = parseInt(data.node.id);
|
||||||
objSendData.Data = main;
|
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) {
|
if (!res || res.code != "0000" || !res.data) {
|
||||||
toast_error(res.msg || common.SysErr);
|
toast_error(res.msg || common.SysErr);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user