perf: 优化显示效果 及 formatter row cellvalue的区分

This commit is contained in:
xingyu4j
2025-05-29 14:52:03 +08:00
parent 8be5c19154
commit b4a77266a1
40 changed files with 12 additions and 302 deletions

View File

@@ -65,12 +65,10 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'id',
title: '编号',
minWidth: 100,
},
{
field: 'userType',
title: '用户类型',
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.USER_TYPE },
@@ -79,27 +77,22 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'userId',
title: '用户编号',
minWidth: 100,
},
{
field: 'templateCode',
title: '模板编码',
minWidth: 120,
},
{
field: 'templateNickname',
title: '发送人名称',
minWidth: 180,
},
{
field: 'templateContent',
title: '模版内容',
minWidth: 200,
},
{
field: 'templateParams',
title: '模版参数',
minWidth: 180,
formatter: ({ cellValue }) => {
try {
return JSON.stringify(cellValue);
@@ -111,7 +104,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'templateType',
title: '模版类型',
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE },
@@ -120,7 +112,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'readStatus',
title: '是否已读',
minWidth: 100,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
@@ -129,13 +120,11 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'readTime',
title: '阅读时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{
field: 'createTime',
title: '创建时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{

View File

@@ -45,18 +45,15 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'templateNickname',
title: '发送人',
minWidth: 180,
},
{
field: 'createTime',
title: '发送时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{
field: 'templateType',
title: '类型',
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE },
@@ -65,12 +62,10 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'templateContent',
title: '消息内容',
minWidth: 300,
},
{
field: 'readStatus',
title: '是否已读',
minWidth: 100,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
@@ -79,7 +74,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'readTime',
title: '阅读时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{

View File

@@ -229,32 +229,26 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'id',
title: '编号',
minWidth: 100,
},
{
field: 'name',
title: '模板名称',
minWidth: 120,
},
{
field: 'code',
title: '模板编码',
minWidth: 120,
},
{
field: 'nickname',
title: '发送人名称',
minWidth: 120,
},
{
field: 'content',
title: '模板内容',
minWidth: 200,
},
{
field: 'type',
title: '模板类型',
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE },
@@ -263,7 +257,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'status',
title: '状态',
minWidth: 100,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.COMMON_STATUS },
@@ -272,12 +265,10 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'remark',
title: '备注',
minWidth: 120,
},
{
field: 'createTime',
title: '创建时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{