mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-29 08:00:25 +08:00
[系统用户]实现系统用户的增删改
This commit is contained in:
35
web/views/@default/admins/index.js
Normal file
35
web/views/@default/admins/index.js
Normal file
@@ -0,0 +1,35 @@
|
||||
Tea.context(function () {
|
||||
this.createAdmin = function () {
|
||||
teaweb.popup("/admins/createPopup", {
|
||||
height: "22em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteAdmin = function (adminId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除此系统用户吗?", function () {
|
||||
that.$post(".delete")
|
||||
.params({
|
||||
adminId: adminId
|
||||
})
|
||||
.post()
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
|
||||
this.updateAdmin = function (adminId) {
|
||||
teaweb.popup("/admins/updatePopup?adminId=" + adminId, {
|
||||
height: "22em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user