From cbd6abb29de3fb3e1944e06640355f97902bac4d Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Thu, 10 Oct 2024 14:07:11 +0800 Subject: [PATCH] chore: 1 --- packages/ui/certd-client/src/views/certd/access/common.tsx | 5 ++++- packages/ui/certd-client/src/views/certd/access/crud.tsx | 5 ++++- .../src/modules/pipeline/service/pipeline-service.ts | 7 ++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/access/common.tsx b/packages/ui/certd-client/src/views/certd/access/common.tsx index 29a8f27a4..946432fd9 100644 --- a/packages/ui/certd-client/src/views/certd/access/common.tsx +++ b/packages/ui/certd-client/src/views/certd/access/common.tsx @@ -59,7 +59,10 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any) { show: false }, column: { - width: 120 + width: 200, + component: { + color: "auto" + } }, form: { component: { diff --git a/packages/ui/certd-client/src/views/certd/access/crud.tsx b/packages/ui/certd-client/src/views/certd/access/crud.tsx index 4a164942f..05d11d4de 100644 --- a/packages/ui/certd-client/src/views/certd/access/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/access/crud.tsx @@ -51,7 +51,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti key: "id", type: "number", column: { - width: 50 + width: 100 }, form: { show: false @@ -65,6 +65,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti }, form: { rules: [{ required: true, message: "必填项" }] + }, + column: { + width: 300 } }, ...commonColumnsDefine diff --git a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts index e74bb57db..d0ead8183 100644 --- a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts +++ b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts @@ -118,10 +118,11 @@ export class PipelineService extends BaseService { const isUpdate = bean.id > 0 && old != null; if (!isPlus()) { let count = await this.repository.count(); - if (isUpdate) { - count -= 1; + if (!isUpdate) { + //如果是添加要加1 + count += 1; } - if (count >= freeCount) { + if (count > freeCount) { throw new NeedVIPException('免费版最多只能创建10个pipeline'); } }