diff --git a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx index c22d41d6..10e10aec 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx @@ -76,8 +76,7 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt dict: dict({ data: [ { value: "CertApply", label: "JS-ACME" }, - { value: "CertApplyLego", label: "Lego-ACME" }, - { value: "CertUpload", label: "上传自定义证书" } + { value: "CertApplyLego", label: "Lego-ACME" } ] }), form: { diff --git a/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts b/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts index 16ad1922..51d803b2 100644 --- a/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts +++ b/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts @@ -21,10 +21,27 @@ export class SiteInfoController extends CrudController { async page(@Body(ALL) body: any) { body.query = body.query ?? {}; body.query.userId = this.getUserId(); + const certDomains = body.query.certDomains; + const domain = body.query.domain; + const name = body.query.name; + delete body.query.certDomains; + delete body.query.domain; + delete body.query.name; const res = await this.service.page({ query: body.query, page: body.page, sort: body.sort, + buildQuery: (bq) => { + if (domain) { + bq.andWhere('domain like :domain', { domain: `%${domain}%` }); + } + if (certDomains) { + bq.andWhere('cert_domains like :cert_domains', { cert_domains: `%${certDomains}%` }); + } + if (name) { + bq.andWhere('name like :name', { name: `%${name}%` }); + } + } }); return this.ok(res); }