feat: lIcense管理删除多余字段

This commit is contained in:
caiyuchao
2025-07-31 18:18:13 +08:00
parent 73b05b95ce
commit f9b2a8fdf3

View File

@@ -141,19 +141,6 @@ export function useFormSchema(): VbenFormSchema[] {
],
},
},
// {
// fieldName: 'neList',
// label: $t('license.neList'),
// component: 'CheckboxGroup',
// formItemClass: 'col-span-2',
// modelPropName: 'modelValue',
// },
// {
// fieldName: 'activationCode',
// label: $t('license.activationCode'),
// component: 'Textarea',
// formItemClass: 'col-span-2',
// },
{
fieldName: 'neCodeList',
label: $t('license.neList'),
@@ -162,19 +149,6 @@ export function useFormSchema(): VbenFormSchema[] {
modelPropName: 'modelValue',
rules: z.array(z.object({})),
},
// {
// fieldName: 'licenseContent',
// label: $t('license.licenseContent'),
// component: 'Textarea',
// },
// {
// fieldName: 'applicant',
// label: $t('license.applicant'),
// component: 'Select',
// componentProps: {
// options: [],
// },
// },
{
fieldName: 'userNumber',
label: $t('license.userNumber'),
@@ -196,16 +170,6 @@ export function useFormSchema(): VbenFormSchema[] {
min: 0,
},
},
// {
// fieldName: 'status',
// label: $t('license.status'),
// component: 'Select',
// componentProps: {
// options: getDictOptions(DICT_TYPE.LIC_LICENSE_STATUS, 'number'),
// buttonStyle: 'solid',
// optionType: 'button',
// },
// },
{
fieldName: 'remark',
label: $t('license.remark'),
@@ -302,14 +266,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
option.label.toLowerCase().includes(input.toLowerCase()),
},
},
// {
// fieldName: 'projectId',
// label: $t('license.project'),
// component: 'Input',
// componentProps: {
// allowClear: true,
// },
// },
{
fieldName: 'status',
label: $t('license.status'),
@@ -329,71 +285,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
allowClear: true,
},
},
// {
// fieldName: 'neList',
// label: $t('license.neList'),
// component: 'Select',
// componentProps: {
// allowClear: true,
// mode: 'multiple',
// options: getDictOptions(DICT_TYPE.LIC_NE_LIST, 'number'),
// showSearch: true,
// filterOption: (input: string, option: any) =>
// option.label.toLowerCase().includes(input.toLowerCase()),
// },
// },
// {
// fieldName: 'userNumber',
// label: $t('license.userNumber'),
// component: 'Input',
// componentProps: {
// allowClear: true,
// },
// },
// {
// fieldName: 'ranNumber',
// label: $t('license.ranNumber'),
// component: 'Input',
// componentProps: {
// allowClear: true,
// },
// },
// {
// fieldName: 'activationCode',
// label: $t('license.activationCode'),
// component: 'Input',
// componentProps: {
// allowClear: true,
// },
// },
// {
// fieldName: 'licenseContent',
// label: $t('license.licenseContent'),
// component: 'Input',
// componentProps: {
// allowClear: true,
// },
// },
// {
// fieldName: 'applicationTime',
// label: $t('license.applicationTime'),
// component: 'RangePicker',
// componentProps: {
// ...getRangePickerDefaultProps(),
// allowClear: true,
// },
// },
// {
// fieldName: 'remark',
// label: $t('license.remark'),
// component: 'Input',
// componentProps: {
// allowClear: true,
// },
// },
{
fieldName: 'createTime',
label: $t('license.creationTime'),
fieldName: 'applicationTime',
label: $t('license.applicationTime'),
component: 'RangePicker',
componentProps: {
...getRangePickerDefaultProps(),
@@ -429,23 +323,6 @@ export function useGridColumns(
minWidth: 120,
formatter: 'formatDate',
},
// {
// field: 'neList',
// title: $t('license.neList'),
// minWidth: 120,
// cellRender: {
// name: 'CellDictGroup',
// props: {
// type: [
// DICT_TYPE.LIC_NE_ALL,
// DICT_TYPE.LIC_NE_5G,
// DICT_TYPE.LIC_NE_4G,
// DICT_TYPE.LIC_NE_23G,
// DICT_TYPE.LIC_NE_ADD,
// ],
// },
// },
// },
{
field: 'userNumber',
title: $t('license.userNumber'),
@@ -456,30 +333,11 @@ export function useGridColumns(
title: $t('license.ranNumber'),
minWidth: 120,
},
// {
// field: 'activationCode',
// title: $t('license.activationCode'),
// visible: false,
// minWidth: 120,
// },
// {
// field: 'licenseContent',
// visible: false,
// title: $t('license.licenseContent'),
// minWidth: 120,
// },
{
field: 'applicantName',
title: $t('license.applicant'),
minWidth: 120,
},
{
field: 'applicationTime',
title: $t('license.applicationTime'),
minWidth: 120,
visible: false,
formatter: 'formatDateTime',
},
{
field: 'approverName',
title: $t('license.approver'),
@@ -501,8 +359,8 @@ export function useGridColumns(
minWidth: 120,
},
{
field: 'createTime',
title: $t('license.creationTime'),
field: 'applicationTime',
title: $t('license.applicationTime'),
minWidth: 120,
formatter: 'formatDateTime',
},
@@ -589,16 +447,6 @@ export function useDetailSchema(): DescriptionItemSchema[] {
return formatDate(data?.expiryDate) as string;
},
},
// {
// field: 'neList',
// label: $t('license.neList'),
// content: (data) => {
// return h(DictTagGroup, {
// type: DICT_TYPE.LIC_NE_LIST,
// value: data.neList,
// });
// },
// },
{
field: 'userNumber',
label: $t('license.userNumber'),
@@ -633,57 +481,5 @@ export function useDetailSchema(): DescriptionItemSchema[] {
label: $t('license.remark'),
hidden: (data) => data,
},
// {
// field: 'fileUrl',
// label: $t('license.licenseFile'),
// hidden: (data) => data.status !== 2,
// content: (data) => {
// const fileName = `${data.fileUrl?.slice(
// Math.max(0, data.fileUrl.lastIndexOf('/') + 1),
// data.fileUrl.lastIndexOf('_'),
// )}.ini`;
// // 创建下载链接
// const link = h(
// 'span',
// {
// style: {
// marginRight: '15px',
// },
// },
// fileName,
// );
// // 创建下载按钮
// const button = h(
// Button,
// {
// onClick: async () => {
// const res = await fetch(data.fileUrl);
// if (!res.ok) {
// message.error($t('license.downloadFailed'));
// return;
// }
// const blob = await res.blob();
// downloadFileFromBlobPart({ fileName, source: blob });
// },
// type: 'primary',
// },
// $t('license.download'),
// );
// // 包裹容器
// return h(
// 'div',
// {
// style: {
// display: 'flex',
// alignItems: 'center',
// },
// },
// [link, button],
// );
// },
// },
];
}