feat: lIcense管理删除多余字段
This commit is contained in:
@@ -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',
|
fieldName: 'neCodeList',
|
||||||
label: $t('license.neList'),
|
label: $t('license.neList'),
|
||||||
@@ -162,19 +149,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
modelPropName: 'modelValue',
|
modelPropName: 'modelValue',
|
||||||
rules: z.array(z.object({})),
|
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',
|
fieldName: 'userNumber',
|
||||||
label: $t('license.userNumber'),
|
label: $t('license.userNumber'),
|
||||||
@@ -196,16 +170,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
min: 0,
|
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',
|
fieldName: 'remark',
|
||||||
label: $t('license.remark'),
|
label: $t('license.remark'),
|
||||||
@@ -302,14 +266,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// fieldName: 'projectId',
|
|
||||||
// label: $t('license.project'),
|
|
||||||
// component: 'Input',
|
|
||||||
// componentProps: {
|
|
||||||
// allowClear: true,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
fieldName: 'status',
|
fieldName: 'status',
|
||||||
label: $t('license.status'),
|
label: $t('license.status'),
|
||||||
@@ -329,71 +285,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
allowClear: true,
|
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',
|
fieldName: 'applicationTime',
|
||||||
label: $t('license.creationTime'),
|
label: $t('license.applicationTime'),
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
...getRangePickerDefaultProps(),
|
...getRangePickerDefaultProps(),
|
||||||
@@ -429,23 +323,6 @@ export function useGridColumns(
|
|||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
formatter: 'formatDate',
|
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',
|
field: 'userNumber',
|
||||||
title: $t('license.userNumber'),
|
title: $t('license.userNumber'),
|
||||||
@@ -456,30 +333,11 @@ export function useGridColumns(
|
|||||||
title: $t('license.ranNumber'),
|
title: $t('license.ranNumber'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// field: 'activationCode',
|
|
||||||
// title: $t('license.activationCode'),
|
|
||||||
// visible: false,
|
|
||||||
// minWidth: 120,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: 'licenseContent',
|
|
||||||
// visible: false,
|
|
||||||
// title: $t('license.licenseContent'),
|
|
||||||
// minWidth: 120,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
field: 'applicantName',
|
field: 'applicantName',
|
||||||
title: $t('license.applicant'),
|
title: $t('license.applicant'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'applicationTime',
|
|
||||||
title: $t('license.applicationTime'),
|
|
||||||
minWidth: 120,
|
|
||||||
visible: false,
|
|
||||||
formatter: 'formatDateTime',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'approverName',
|
field: 'approverName',
|
||||||
title: $t('license.approver'),
|
title: $t('license.approver'),
|
||||||
@@ -501,8 +359,8 @@ export function useGridColumns(
|
|||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createTime',
|
field: 'applicationTime',
|
||||||
title: $t('license.creationTime'),
|
title: $t('license.applicationTime'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
formatter: 'formatDateTime',
|
formatter: 'formatDateTime',
|
||||||
},
|
},
|
||||||
@@ -589,16 +447,6 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
|||||||
return formatDate(data?.expiryDate) as string;
|
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',
|
field: 'userNumber',
|
||||||
label: $t('license.userNumber'),
|
label: $t('license.userNumber'),
|
||||||
@@ -633,57 +481,5 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
|||||||
label: $t('license.remark'),
|
label: $t('license.remark'),
|
||||||
hidden: (data) => data,
|
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],
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user