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