diff --git a/ui/src/api/license.ts b/ui/src/api/license.ts new file mode 100644 index 000000000..16e5acdf6 --- /dev/null +++ b/ui/src/api/license.ts @@ -0,0 +1,24 @@ +import { Result } from '@/request/Result' +import { get, post, del, put } from '@/request/index' +import { type Ref } from 'vue' + +const prefix = '/license' + +/** + * 获得license信息 + */ +const getLicense: (loading?: Ref) => Promise> = (loading) => { + return get(`${prefix}/profile`, undefined, loading) +} +/** + * 更新license信息 + * @param 参数 license_file:file + */ +const putLicense: (data: any, loading?: Ref) => Promise> = (data, loading) => { + return put(`${prefix}/profile`, data, undefined, loading) +} + +export default { + getLicense, + putLicense +} diff --git a/ui/src/enums/common.ts b/ui/src/enums/common.ts index 3afd8fc26..e63bf033f 100644 --- a/ui/src/enums/common.ts +++ b/ui/src/enums/common.ts @@ -14,3 +14,8 @@ export enum ValidCount { Dataset = 50, User = 2 } + +export enum EditionType { + Standard = '社区版', + Enterprise = '专业版' +} diff --git a/ui/src/layout/components/top-bar/avatar/AboutDialog.vue b/ui/src/layout/components/top-bar/avatar/AboutDialog.vue index 35e1f5308..16491b937 100644 --- a/ui/src/layout/components/top-bar/avatar/AboutDialog.vue +++ b/ui/src/layout/components/top-bar/avatar/AboutDialog.vue @@ -9,31 +9,55 @@ -
- -
- - {{ $t('layout.topbar.wiki') }} -
-
- -
- - {{ $t('layout.topbar.github') }} -
-
- -
- - {{ $t('layout.topbar.forum') }} -
-
+
+
+ 授权给{{ licenseInfo?.corporation || '-' }} +
+
+ ISV{{ licenseInfo?.isv || '-' }} +
+
+ 过期时间{{ licenseInfo?.expired || '-' }} +
+
+ 版本{{ + licenseInfo?.edition ? EditionType[licenseInfo.edition as keyof typeof EditionType] : '-' + }} +
+
+ 版本号{{ licenseInfo?.licenseVersion || '-' }} +
+
+ 序列号{{ licenseInfo?.serialNo || '-' }} +
+
+ 备注{{ licenseInfo?.remark || '-' }} +
+ +
+ + 更新 License + + + 获取技术支持 +
-
{{ $t('layout.topbar.avatar.version') }}:{{ user.version }}
+ +