2021-06-27 21:59:06 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.createItem = function () {
|
|
|
|
|
teaweb.popup(Tea.url(".createPopup", {
|
2021-06-30 19:59:59 +08:00
|
|
|
clusterId: this.clusterId,
|
|
|
|
|
category: this.category
|
2021-06-27 21:59:06 +08:00
|
|
|
}), {
|
|
|
|
|
callback: function () {
|
|
|
|
|
teaweb.success("保存成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
},
|
2021-06-30 19:59:59 +08:00
|
|
|
onClose: function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
},
|
2021-06-27 21:59:06 +08:00
|
|
|
width: "50em",
|
|
|
|
|
height: "25em"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.deleteItem = function (itemId) {
|
|
|
|
|
let that = this
|
|
|
|
|
teaweb.confirm("确定要删除这个指标吗?", function () {
|
|
|
|
|
that.$post(".delete")
|
|
|
|
|
.params({
|
2021-06-30 19:59:59 +08:00
|
|
|
clusterId: that.clusterId,
|
2021-06-27 21:59:06 +08:00
|
|
|
itemId: itemId
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.success("删除成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|