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, {
|
2021-10-09 17:30:05 +08:00
|
|
|
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, {
|
2021-10-09 17:30:05 +08:00
|
|
|
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
|
|
|
})
|