feat: 个性化列本地保存和默认配置

This commit is contained in:
caiyuchao
2025-07-08 15:17:45 +08:00
parent 5e09229143
commit 1ae87e9ecb
5 changed files with 38 additions and 15 deletions

View File

@@ -97,6 +97,10 @@ const [Grid, gridApi] = useVbenVxeGrid({
pagerConfig: { pagerConfig: {
enabled: true, enabled: true,
}, },
id: 'license-customer-list',
customConfig: {
storage: true,
},
proxyConfig: { proxyConfig: {
ajax: { ajax: {
query: async ({ page }, formValues) => { query: async ({ page }, formValues) => {

View File

@@ -398,10 +398,12 @@ export function useGridColumns(
{ {
field: 'activationCode', field: 'activationCode',
title: $t('license.activationCode'), title: $t('license.activationCode'),
visible: false,
minWidth: 120, minWidth: 120,
}, },
{ {
field: 'licenseContent', field: 'licenseContent',
visible: false,
title: $t('license.licenseContent'), title: $t('license.licenseContent'),
minWidth: 120, minWidth: 120,
}, },
@@ -414,6 +416,7 @@ export function useGridColumns(
field: 'applicationTime', field: 'applicationTime',
title: $t('license.applicationTime'), title: $t('license.applicationTime'),
minWidth: 120, minWidth: 120,
visible: false,
formatter: 'formatDateTime', formatter: 'formatDateTime',
}, },
{ {
@@ -433,6 +436,7 @@ export function useGridColumns(
{ {
field: 'remark', field: 'remark',
title: $t('license.remark'), title: $t('license.remark'),
visible: false,
minWidth: 120, minWidth: 120,
}, },
{ {

View File

@@ -102,6 +102,10 @@ const [Grid, gridApi] = useVbenVxeGrid({
pagerConfig: { pagerConfig: {
enabled: true, enabled: true,
}, },
id: 'license-license-list',
customConfig: {
storage: true,
},
proxyConfig: { proxyConfig: {
ajax: { ajax: {
query: async ({ page }, formValues) => { query: async ({ page }, formValues) => {

View File

@@ -401,12 +401,19 @@ export function useGridColumns(
field: 'code', field: 'code',
title: $t('project.code'), title: $t('project.code'),
minWidth: 120, minWidth: 120,
visible: false,
}, },
{ {
field: 'customerName', field: 'customerName',
title: $t('project.belongCustomer'), title: $t('project.belongCustomer'),
minWidth: 120, minWidth: 120,
}, },
{
field: 'startTime',
title: $t('project.startTime'),
minWidth: 120,
formatter: 'formatDateTime',
},
{ {
field: 'contractCode', field: 'contractCode',
title: $t('project.contractCode'), title: $t('project.contractCode'),
@@ -416,11 +423,21 @@ export function useGridColumns(
field: 'businessStatus', field: 'businessStatus',
title: $t('project.businessStatus'), title: $t('project.businessStatus'),
minWidth: 120, minWidth: 120,
visible: false,
cellRender: { cellRender: {
name: 'CellDict', name: 'CellDict',
props: { type: DICT_TYPE.LIC_BUSINESS_STATUS }, props: { type: DICT_TYPE.LIC_BUSINESS_STATUS },
}, },
}, },
{
field: 'status',
title: $t('project.status'),
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.LIC_PROJECT_STATUS },
},
},
{ {
field: 'businessOwnerName', field: 'businessOwnerName',
title: $t('project.businessOwner'), title: $t('project.businessOwner'),
@@ -429,6 +446,7 @@ export function useGridColumns(
{ {
field: 'customerOwnerName', field: 'customerOwnerName',
title: $t('project.customerOwner'), title: $t('project.customerOwner'),
visible: false,
minWidth: 120, minWidth: 120,
}, },
{ {
@@ -446,40 +464,29 @@ export function useGridColumns(
title: $t('project.technicalOwnerC'), title: $t('project.technicalOwnerC'),
minWidth: 120, minWidth: 120,
}, },
{
field: 'startTime',
title: $t('project.startTime'),
minWidth: 120,
formatter: 'formatDateTime',
},
{ {
field: 'endTime', field: 'endTime',
title: $t('project.endTime'), title: $t('project.endTime'),
visible: false,
minWidth: 120, minWidth: 120,
formatter: 'formatDateTime', formatter: 'formatDateTime',
}, },
{
field: 'status',
title: $t('project.status'),
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.LIC_PROJECT_STATUS },
},
},
{ {
field: 'envInfo', field: 'envInfo',
title: $t('project.envInfo'), title: $t('project.envInfo'),
visible: false,
minWidth: 120, minWidth: 120,
}, },
{ {
field: 'remark', field: 'remark',
title: $t('project.remarks'), title: $t('project.remarks'),
visible: false,
minWidth: 120, minWidth: 120,
}, },
{ {
field: 'createTime', field: 'createTime',
title: $t('project.creationTime'), title: $t('project.creationTime'),
visible: false,
minWidth: 120, minWidth: 120,
formatter: 'formatDateTime', formatter: 'formatDateTime',
}, },

View File

@@ -96,6 +96,10 @@ const [Grid, gridApi] = useVbenVxeGrid({
pagerConfig: { pagerConfig: {
enabled: true, enabled: true,
}, },
id: 'license-project-list',
customConfig: {
storage: true,
},
proxyConfig: { proxyConfig: {
ajax: { ajax: {
query: async ({ page }, formValues) => { query: async ({ page }, formValues) => {