2020-11-24 17:36:42 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.createUser = function () {
|
|
|
|
|
teaweb.popup(Tea.url(".createPopup"), {
|
2021-10-03 13:09:49 +08:00
|
|
|
height: "27em",
|
|
|
|
|
width: "44em",
|
2020-11-24 17:36:42 +08:00
|
|
|
callback: function () {
|
|
|
|
|
teaweb.success("创建成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.updateUser = function (userId) {
|
|
|
|
|
teaweb.popup("/servers/certs/acme/users/updatePopup?userId=" + userId, {
|
2021-10-03 13:09:49 +08:00
|
|
|
height: "27em",
|
|
|
|
|
width: "44em",
|
2020-11-24 17:36:42 +08:00
|
|
|
callback: function () {
|
|
|
|
|
teaweb.success("保存成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.deleteUser = function (userId) {
|
|
|
|
|
let that = this
|
|
|
|
|
teaweb.confirm("确定要删除此用户吗?", function () {
|
|
|
|
|
that.$post(".delete")
|
|
|
|
|
.params({
|
|
|
|
|
userId: userId
|
|
|
|
|
})
|
|
|
|
|
.refresh()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|