diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/base/codeGen/data.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/base/codeGen/data.ts index 3dfd9382..361712bc 100644 --- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/base/codeGen/data.ts +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/base/codeGen/data.ts @@ -2,6 +2,8 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { BaseCodeRuleApi } from '#/api/base/codegen'; +import { h } from 'vue'; + import { getRangePickerDefaultProps } from '#/utils'; /** 字母大小写选项 */ @@ -84,6 +86,17 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'seqStrategy', label: '序号策略', component: 'RadioGroup', + help: () => + h('div', { style: { lineHeight: '1.6' } }, [ + h( + 'p', + '号段预分配:提前从数据库批量获取序号段,减少数据库访问,高并发下性能更好,但服务重启可能浪费部分号段;', + ), + h( + 'p', + '分布式锁实时:每次获取序号都通过分布式锁与数据库同步,保证严格连续不浪费,但高并发下性能较低。', + ), + ]), componentProps: { options: SEQ_STRATEGY_OPTIONS, buttonStyle: 'solid', @@ -163,19 +176,19 @@ export function useGridColumns(): VxeTableGridOptions[ { field: 'ruleName', title: '规则名称', - minWidth: 160, + minWidth: 120, }, { field: 'ruleCode', title: '规则编码', - minWidth: 160, + minWidth: 120, }, { - field: 'segmentConfig', + field: 'segments', title: '分段配置', - minWidth: 240, + minWidth: 280, formatter: ({ cellValue }: { cellValue: BaseCodeRuleApi.SegmentConfig[] }) => { - if (!cellValue || cellValue.length === 0) return '-'; + if (!cellValue || cellValue.length === 0) return ''; return cellValue .map((s) => { switch (s.type) { @@ -196,7 +209,7 @@ export function useGridColumns(): VxeTableGridOptions[ field: 'separator', title: '分隔符', minWidth: 80, - formatter: ({ cellValue }: { cellValue: string }) => cellValue || '-', + formatter: ({ cellValue }: { cellValue: string }) => cellValue || '', }, { field: 'seqStrategy', @@ -220,7 +233,7 @@ export function useGridColumns(): VxeTableGridOptions[ }, { title: '操作', - width: 180, + width: 200, fixed: 'right', slots: { default: 'actions' }, },