mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-09 00:20:26 +08:00
27 lines
576 B
JavaScript
27 lines
576 B
JavaScript
|
|
Tea.context(function () {
|
||
|
|
this.createItem = function () {
|
||
|
|
teaweb.popup(Tea.url(".createPopup?category=" + this.category), {
|
||
|
|
callback: function () {
|
||
|
|
teaweb.success("保存成功", function () {
|
||
|
|
teaweb.reload()
|
||
|
|
})
|
||
|
|
},
|
||
|
|
height: "26em"
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
this.deleteItem = function (itemId) {
|
||
|
|
let that = this
|
||
|
|
teaweb.confirm("确定要删除此指标吗?", function () {
|
||
|
|
that.$post(".delete")
|
||
|
|
.params({
|
||
|
|
itemId: itemId
|
||
|
|
})
|
||
|
|
.success(function () {
|
||
|
|
teaweb.success("删除成功", function () {
|
||
|
|
teaweb.reload()
|
||
|
|
})
|
||
|
|
})
|
||
|
|
})
|
||
|
|
}
|
||
|
|
})
|