创建服务时如果选择了所属用户,则证书列表中默认显示该用户的证书

This commit is contained in:
刘祥超
2023-03-26 10:36:47 +08:00
parent 2bc43ee2a5
commit bd899b649d
2 changed files with 8 additions and 3 deletions

View File

@@ -6,7 +6,8 @@ Vue.component("ssl-certs-box", {
"v-view-size", // 弹窗尺寸normal, mini
"v-single-mode", // 单证书模式
"v-description", // 描述文字
"v-domains" // 搜索的域名列表或者函数
"v-domains", // 搜索的域名列表或者函数
"v-user-id" // 用户ID
],
data: function () {
let certs = this.vCerts
@@ -73,8 +74,12 @@ Vue.component("ssl-certs-box", {
let selectedCertIds = this.certs.map(function (cert) {
return cert.id
})
let userId = this.vUserId
if (userId == null) {
userId = 0
}
teaweb.popup("/servers/certs/selectPopup?viewSize=" + viewSize + "&searchingDomains=" + window.encodeURIComponent(searchingDomains.join(",")) + "&selectedCertIds=" + selectedCertIds.join(","), {
teaweb.popup("/servers/certs/selectPopup?viewSize=" + viewSize + "&searchingDomains=" + window.encodeURIComponent(searchingDomains.join(",")) + "&selectedCertIds=" + selectedCertIds.join(",") + "&userId=" + userId, {
width: width,
height: height,
callback: function (resp) {