2020-10-10 20:28:36 +08:00
|
|
|
Tea.context(function () {
|
2020-10-10 20:41:33 +08:00
|
|
|
// 创建节点
|
2020-10-10 20:28:36 +08:00
|
|
|
this.createNode = function () {
|
2023-03-05 12:05:18 +08:00
|
|
|
teaweb.popup(".node.createPopup", {
|
2020-10-10 20:28:36 +08:00
|
|
|
width: "50em",
|
|
|
|
|
height: "30em",
|
|
|
|
|
callback: function () {
|
|
|
|
|
teaweb.success("保存成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2020-10-10 20:41:33 +08:00
|
|
|
|
|
|
|
|
// 删除节点
|
|
|
|
|
this.deleteNode = function (nodeId) {
|
|
|
|
|
let that = this
|
|
|
|
|
teaweb.confirm("确定要删除此节点吗?", function () {
|
2023-03-05 12:05:18 +08:00
|
|
|
that.$post(".delete")
|
2020-10-10 20:41:33 +08:00
|
|
|
.params({
|
|
|
|
|
nodeId: nodeId
|
|
|
|
|
})
|
|
|
|
|
.refresh()
|
|
|
|
|
})
|
|
|
|
|
}
|
2023-03-05 12:05:18 +08:00
|
|
|
|
|
|
|
|
// 升级节点
|
|
|
|
|
this.upgradeNode = function (nodeId) {
|
|
|
|
|
teaweb.popup(".node.upgradePopup?nodeId=" + nodeId, {
|
|
|
|
|
onClose: function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2020-10-10 20:28:36 +08:00
|
|
|
})
|