This commit is contained in:
2019-04-16 19:22:26 +08:00
parent c3b3cec3cb
commit 368f4fc733
4 changed files with 206 additions and 9 deletions

View File

@@ -53,5 +53,62 @@ const meta = {
},
linkSave({link}) {
return red.postX('/meta/link_save', {link: JSON.stringify(link)})
},
linkInfo({alias}) {
return red.postX('/meta/link_info', {alias})
},
tableInfo({name, alias}) {
return red.postX('/meta/tableinfo', {name, alias})
}
}
}
let a = [
{
name: '',
alias: '',
link: [
{"a.id": "b.x"}
],
}
]
/*
let list = [
{id: 1, pid:0},
{id: 2, pid:0},
{id: 3, pid:0},
{id: 4, pid:1},
{id: 5, pid:2},
{id: 6, pid:5},
{id: 7, pid:1},
{id: 8, pid:0},
]
class Tree {
constructor(id, pid) {
this.id = id
this.pid = pid
this.left = undefined;
this.right = undefined;
this.nodes = []
}
add(tree) {
this.nodes.push(tree)
}
}
let nodes = new Tree(null, 0);
for (let x of list) {
if (x.pid == 0) {
nodes.add(x)
continue
}
for (let i = 0; i < x.nodes.length; i++) {
}
}*/