Files
EdgeAdmin/web/views/@default/servers/certs/index.js

54 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-09-30 17:46:38 +08:00
Tea.context(function () {
// 上传证书
this.uploadCert = function () {
2023-04-23 10:44:37 +08:00
teaweb.popup("/servers/certs/uploadPopup?userId=" + this.searchingUserId, {
height: "30em",
2020-09-30 17:46:38 +08:00
callback: function () {
teaweb.success("上传成功", function () {
window.location.reload()
})
}
})
}
2023-03-24 15:05:31 +08:00
// 批量上传证书
this.uploadBatch = function () {
2023-04-23 10:44:37 +08:00
teaweb.popup("/servers/certs/uploadBatchPopup?userId=" + this.searchingUserId, {
2023-03-24 15:05:31 +08:00
callback: function () {
window.location.reload()
}
})
}
2020-09-30 17:46:38 +08:00
// 删除证书
this.deleteCert = function (certId) {
let that = this
teaweb.confirm("确定要删除此证书吗?", function () {
2020-11-24 17:36:42 +08:00
that.$post("/servers/certs/delete")
2020-09-30 17:46:38 +08:00
.params({
certId: certId
})
.refresh()
})
}
// 查看证书
this.viewCert = function (certId) {
2020-11-24 17:36:42 +08:00
teaweb.popup("/servers/certs/certPopup?certId=" + certId, {
2020-09-30 17:46:38 +08:00
height: "28em",
width: "48em"
})
}
2020-10-02 17:22:24 +08:00
// 修改证书
this.updateCert = function (certId) {
2020-11-24 17:36:42 +08:00
teaweb.popup("/servers/certs/updatePopup?certId=" + certId, {
height: "30em",
2020-10-02 17:22:24 +08:00
callback: function () {
2023-08-10 09:12:25 +08:00
teaweb.success("修改成功", function () {
2020-10-02 17:22:24 +08:00
window.location.reload()
})
}
})
}
2020-09-30 17:46:38 +08:00
})