From 9b1f6f7c8d6e8aa1a8ae0ce709cb647df38c9271 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Thu, 3 Jul 2025 17:33:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=9A=E9=80=89=E6=A1=86=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=85=A8=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web-antd/src/api/license/license/index.ts | 2 +- .../src/locales/langs/en-US/license.json | 3 +- .../src/locales/langs/zh-CN/license.json | 3 +- .../src/views/license/license/data.ts | 33 ++++++++---- .../views/license/license/modules/form.vue | 52 ++++++++++++++++++- 5 files changed, 78 insertions(+), 15 deletions(-) diff --git a/apps/web-antd/src/api/license/license/index.ts b/apps/web-antd/src/api/license/license/index.ts index 8200b42..0129f3c 100644 --- a/apps/web-antd/src/api/license/license/index.ts +++ b/apps/web-antd/src/api/license/license/index.ts @@ -12,7 +12,7 @@ export namespace LicenseApi { projectId?: number; // 项目ID sn?: string; // sn expirationTime: Dayjs | string; // 到期时间 - neSwitch: string; // 网元开关 + neSwitch: number[]; // 网元开关 userNum: number; // 用户数 baseStationNum: number; // 基站数 activationCode: string; // 激活码 diff --git a/apps/web-antd/src/locales/langs/en-US/license.json b/apps/web-antd/src/locales/langs/en-US/license.json index 677a759..60e4865 100644 --- a/apps/web-antd/src/locales/langs/en-US/license.json +++ b/apps/web-antd/src/locales/langs/en-US/license.json @@ -13,5 +13,6 @@ "remark": "Remark", "creationTime": "Creation Time", "operation": "Operation", - "list": "License List" + "list": "License List", + "checkAll": "Check All" } diff --git a/apps/web-antd/src/locales/langs/zh-CN/license.json b/apps/web-antd/src/locales/langs/zh-CN/license.json index b60c887..f6c0e00 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/license.json +++ b/apps/web-antd/src/locales/langs/zh-CN/license.json @@ -13,5 +13,6 @@ "remark": "备注", "creationTime": "创建时间", "operation": "操作", - "list": "License列表" + "list": "License列表", + "checkAll": "全选" } diff --git a/apps/web-antd/src/views/license/license/data.ts b/apps/web-antd/src/views/license/license/data.ts index f341276..735fc33 100644 --- a/apps/web-antd/src/views/license/license/data.ts +++ b/apps/web-antd/src/views/license/license/data.ts @@ -102,19 +102,23 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'neSwitch', label: $t('license.neSwitch'), component: 'CheckboxGroup', - componentProps: { - options: getDictOptions(DICT_TYPE.LIC_NE_SWITCH, 'number'), - }, + modelPropName: 'modelValue', }, { fieldName: 'userNum', label: $t('license.userNum'), - component: 'Input', + component: 'InputNumber', + componentProps: { + min: 0, + }, }, { fieldName: 'baseStationNum', label: $t('license.baseStationNum'), - component: 'Input', + component: 'InputNumber', + componentProps: { + min: 0, + }, }, { fieldName: 'activationCode', @@ -196,10 +200,19 @@ export function useGridFormSchema(): VbenFormSchema[] { allowClear: true, }, }, - // { - // fieldName: 'neSwitch', - // label: $t('license.neSwitch'), - // }, + { + fieldName: 'neSwitch', + label: $t('license.neSwitch'), + component: 'Select', + componentProps: { + allowClear: true, + mode: 'multiple', + options: getDictOptions(DICT_TYPE.LIC_NE_SWITCH, 'number'), + showSearch: true, + filterOption: (input: string, option: any) => + option.label.toLowerCase().includes(input.toLowerCase()), + }, + }, { fieldName: 'userNum', label: $t('license.userNum'), @@ -310,7 +323,7 @@ export function useGridColumns( title: $t('license.neSwitch'), minWidth: 120, cellRender: { - name: 'CellDict', + name: 'CellDictGroup', props: { type: DICT_TYPE.LIC_NE_SWITCH }, }, }, diff --git a/apps/web-antd/src/views/license/license/modules/form.vue b/apps/web-antd/src/views/license/license/modules/form.vue index 61bcb59..8d6df5b 100644 --- a/apps/web-antd/src/views/license/license/modules/form.vue +++ b/apps/web-antd/src/views/license/license/modules/form.vue @@ -1,7 +1,7 @@