diff --git a/internal/web/actions/default/servers/certs/selectPopup.go b/internal/web/actions/default/servers/certs/selectPopup.go index 9210a58a..f48f3082 100644 --- a/internal/web/actions/default/servers/certs/selectPopup.go +++ b/internal/web/actions/default/servers/certs/selectPopup.go @@ -34,6 +34,8 @@ func (this *SelectPopupAction) RunGet(params struct { SelectedCertIds string Keyword string }) { + this.Data["searchingServerId"] = params.ServerId + // 服务相关 if params.ServerId > 0 { serverResp, err := this.RPC().ServerRPC().FindEnabledUserServerBasic(this.AdminContext(), &pb.FindEnabledUserServerBasicRequest{ServerId: params.ServerId}) @@ -66,7 +68,8 @@ func (this *SelectPopupAction) RunGet(params struct { } // 用户相关 - this.Data["userId"] = params.UserId + this.Data["userId"] = params.UserId // 可变 + this.Data["searchingUserId"] = params.UserId // 域名搜索相关 var url = this.Request.URL.Path @@ -82,6 +85,7 @@ func (this *SelectPopupAction) RunGet(params struct { if len(searchingDomains) > maxDomains { searchingDomains = searchingDomains[:maxDomains] } + this.Data["allSearchingDomains"] = params.SearchingDomains this.Data["searchingDomains"] = searchingDomains this.Data["keyword"] = params.Keyword diff --git a/web/public/js/components/server/user-selector.js b/web/public/js/components/server/user-selector.js index 8dddf5b6..6cd14939 100644 --- a/web/public/js/components/server/user-selector.js +++ b/web/public/js/components/server/user-selector.js @@ -24,9 +24,12 @@ Vue.component("user-selector", { } else { this.$emit("change", 0) } + }, + clear: function () { + this.$refs.comboBox.clear() } }, template: `
- +
` }) \ No newline at end of file diff --git a/web/views/@default/servers/certs/selectPopup.html b/web/views/@default/servers/certs/selectPopup.html index 8e9d5880..b856668e 100644 --- a/web/views/@default/servers/certs/selectPopup.html +++ b/web/views/@default/servers/certs/selectPopup.html @@ -3,13 +3,13 @@

选择证书 (当前服务域名:{{searchingDomains[0]}}等{{searchingDomains.length}}个域名

-
+
- +
@@ -25,6 +25,8 @@
+ 当前用户未指定用户 + 所有证书 ({{totalAll}}) | 域名匹配证书 ({{totalMatch}}) @@ -38,7 +40,9 @@
-

暂时还没有跟所添加域名匹配的相关证书。

+

+ 暂时还没有跟所添加域名匹配的相关证书[尝试搜索未指定用户证书]。 +

diff --git a/web/views/@default/servers/certs/selectPopup.js b/web/views/@default/servers/certs/selectPopup.js index a3075da7..4cb4411b 100644 --- a/web/views/@default/servers/certs/selectPopup.js +++ b/web/views/@default/servers/certs/selectPopup.js @@ -74,4 +74,11 @@ Tea.context(function () { } }) } + + this.searchNoneUserCerts = function () { + this.$refs.userSelector.clear() + this.$delay(function () { + this.$refs.searchForm.submit() + }, 10) + } }) \ No newline at end of file