1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-02-22 00:06:24 +08:00

feat: Improve the name of the professional version (#7855)

This commit is contained in:
ssongliu 2025-02-12 21:50:15 +08:00 committed by GitHub
parent 9a73537dfb
commit ab03d5e40e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 80 additions and 101 deletions

View File

@ -219,6 +219,7 @@ export namespace Setting {
licenseName: string; licenseName: string;
assigneeName: string; assigneeName: string;
productPro: string; productPro: string;
versionConstraint: string;
trial: boolean; trial: boolean;
status: string; status: string;
message: string; message: string;

View File

@ -16,15 +16,15 @@
<el-divider direction="vertical" /> <el-divider direction="vertical" />
</div> </div>
<div class="flex flex-wrap items-center"> <div class="flex flex-wrap items-center">
<el-link :underline="false" type="primary" @click="toLxware"> <el-link :underline="false" class="-ml-2" type="primary" @click="toLxware">
{{ $t(!isMasterProductPro ? 'license.community' : 'license.pro') }} {{ $t(!isMasterProductPro ? 'license.community' : 'license.pro') }}
</el-link> </el-link>
<el-link :underline="false" class="version" type="primary" @click="copyText(version)"> <el-link :underline="false" class="version" type="primary" @click="copyText(version)">
{{ version }} {{ version }}
</el-link> </el-link>
<el-badge is-dot class="-mt-0.5" v-if="version !== 'Waiting' && globalStore.hasNewVersion"> <el-badge is-dot class="-mt-0.5" v-if="version !== 'Waiting' && globalStore.hasNewVersion">
<el-link :underline="false" type="primary" @click="onLoadUpgradeInfo"> <el-link class="ml-2" :underline="false" type="primary" @click="onLoadUpgradeInfo">
{{ $t('setting.hasNewVersion') }} {{ $t('commons.button.update') }}
</el-link> </el-link>
</el-badge> </el-badge>
<el-link <el-link
@ -33,7 +33,7 @@
:underline="false" :underline="false"
@click="onLoadUpgradeInfo" @click="onLoadUpgradeInfo"
> >
{{ $t('setting.upgradeCheck') }} {{ $t('commons.button.update') }}
</el-link> </el-link>
<el-tag v-if="version === 'Waiting'" round style="margin-left: 10px"> <el-tag v-if="version === 'Waiting'" round style="margin-left: 10px">
{{ $t('setting.upgrading') }} {{ $t('setting.upgrading') }}
@ -136,10 +136,19 @@ onMounted(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.line-height {
line-height: 25px;
}
:deep(.el-link__inner) {
font-weight: 400;
}
.version { .version {
margin-left: 8px;
font-size: 14px; font-size: 14px;
color: var(--panel-color-primary-light-4); color: var(--panel-color-primary-light-4);
text-decoration: none; text-decoration: none;
letter-spacing: 0.5px; letter-spacing: 0.5px;
cursor: pointer;
font-family: auto;
} }
</style> </style>

View File

@ -114,9 +114,6 @@ defineExpose({
font-size: 16px; font-size: 16px;
} }
} }
:deep(.el-link__inner) {
font-weight: 400;
}
:deep(.md-editor-dark) { :deep(.md-editor-dark) {
background-color: var(--panel-main-bg-color-9); background-color: var(--panel-main-bg-color-9);
} }

View File

@ -52,7 +52,7 @@ const message = {
refresh: 'Refresh', refresh: 'Refresh',
get: 'Get', get: 'Get',
upgrade: 'Upgrade', upgrade: 'Upgrade',
update: 'update', update: 'Update',
ignore: 'Ignore upgrade', ignore: 'Ignore upgrade',
copy: 'Copy', copy: 'Copy',
random: 'Random', random: 'Random',
@ -1763,20 +1763,18 @@ const message = {
backupRecoverMessage: 'Please enter the compression or decompression password (leave blank to not set)', backupRecoverMessage: 'Please enter the compression or decompression password (leave blank to not set)',
}, },
license: { license: {
community: 'Community Edition: ', community: 'OSS',
community2: 'Community Edition', oss: 'Open Source Software',
pro: 'Professional Edition: ', pro: 'Pro',
xpack: 'Professional Edition', trial: 'Trial',
trial: 'Trial Version', subscription: 'Subscription',
perpetual: 'Perpetual',
versionConstraint: '{0} Version Buyout',
forceDelete: 'Force delete, will ignore errors during the deletion process and eventually remove metadata', forceDelete: 'Force delete, will ignore errors during the deletion process and eventually remove metadata',
deleteHelper: 'Deleting the license may cause child nodes to be unable to switch, please proceed with caution!', deleteHelper: 'Deleting the license may cause child nodes to be unable to switch, please proceed with caution!',
office: 'Official Version',
trialInfo: 'Version', trialInfo: 'Version',
authorizationId: 'Subscription Authorization ID', authorizationId: 'Authorization ID',
authorizedUser: 'Authorized User', authorizedUser: 'Authorized User',
expiresAt: 'Expiration Date',
productName: 'Product Name',
productStatus: 'Product Status',
lostHelper: lostHelper:
'The license has reached the maximum number of retry attempts. Please manually click the sync button to ensure the professional version functions properly. detail: ', 'The license has reached the maximum number of retry attempts. Please manually click the sync button to ensure the professional version functions properly. detail: ',
exceptionalHelper: exceptionalHelper:
@ -1788,7 +1786,6 @@ const message = {
'There are currently other nodes besides the master node. The {0} operation is not supported. Please delete the nodes in the node management and try again.', 'There are currently other nodes besides the master node. The {0} operation is not supported. Please delete the nodes in the node management and try again.',
importLicense: 'Import License', importLicense: 'Import License',
importHelper: 'Please click or drag the license file here', importHelper: 'Please click or drag the license file here',
indefinitePeriod: 'Indefinite Period',
levelUpPro: 'Upgrade to Professional Edition', levelUpPro: 'Upgrade to Professional Edition',
licenseSync: 'License Sync', licenseSync: 'License Sync',
knowMorePro: 'Learn More', knowMorePro: 'Learn More',

View File

@ -1630,17 +1630,13 @@ const message = {
community: '無料', community: '無料',
oss: '無料', oss: '無料',
pro: '専門', pro: '専門',
trial: 'トライアル', trial: '体験',
office: '正式', subscription: 'サブスクリプション',
perpetual: '永久ライセンス',
versionConstraint: '{0} バージョン買い取り',
trialInfo: 'バージョン', trialInfo: 'バージョン',
authorizationId: 'サブスクリプション承認ID', authorizationId: 'サブスクリプション承認ID',
authorizedUser: '認定ユーザー', authorizedUser: '認定ユーザー',
expiresAt: '有効期限',
productName: '製品名',
productStatus: '製品ステータス',
Lost: '失った',
Enable: '有効になっています',
Disable: '無効',
lostHelper: lostHelper:
'ライセンスは再試行の最大数に達しましたプロのバージョン機能が適切に機能していることを確認するには手動で同期ボタンをクリックしてください세부사항: ', 'ライセンスは再試行の最大数に達しましたプロのバージョン機能が適切に機能していることを確認するには手動で同期ボタンをクリックしてください세부사항: ',
disableHelper: disableHelper:
@ -1652,7 +1648,6 @@ const message = {
importHelper: 'ここでライセンスファイルをクリックまたはドラッグしてください', importHelper: 'ここでライセンスファイルをクリックまたはドラッグしてください',
technicalAdvice: '技術的な相談', technicalAdvice: '技術的な相談',
advice: '相談', advice: '相談',
indefinitePeriod: '無期限',
levelUpPro: 'Proにアップグレードします', levelUpPro: 'Proにアップグレードします',
licenseSync: 'ライセンス同期', licenseSync: 'ライセンス同期',
knowMorePro: 'もっと詳しく知る', knowMorePro: 'もっと詳しく知る',

View File

@ -1604,16 +1604,12 @@ const message = {
oss: '오픈 소스 소프트웨어', oss: '오픈 소스 소프트웨어',
pro: 'Pro', pro: 'Pro',
trial: '체험판', trial: '체험판',
office: '공식', subscription: '구독',
perpetual: '영구 라이선스',
versionConstraint: '{0} 버전 일시불 구매',
trialInfo: '버전', trialInfo: '버전',
authorizationId: '구독 인증 ID', authorizationId: '구독 인증 ID',
authorizedUser: '인증된 사용자', authorizedUser: '인증된 사용자',
expiresAt: '만료일',
productName: '제품명',
productStatus: '제품 상태',
Lost: '분실',
Enable: '활성화됨',
Disable: '비활성화됨',
lostHelper: lostHelper:
'라이센스가 최대 재시도 횟수를 초과했습니다. 전문가 버전 기능이 제대로 작동하는지 확인하려면 동기화 버튼을 수동으로 클릭하세요.', '라이센스가 최대 재시도 횟수를 초과했습니다. 전문가 버전 기능이 제대로 작동하는지 확인하려면 동기화 버튼을 수동으로 클릭하세요.',
disableHelper: disableHelper:
@ -1625,7 +1621,6 @@ const message = {
importHelper: '라이센스 파일을 여기에 클릭하거나 드래그하세요', importHelper: '라이센스 파일을 여기에 클릭하거나 드래그하세요',
technicalAdvice: '기술 상담', technicalAdvice: '기술 상담',
advice: '상담', advice: '상담',
indefinitePeriod: '무제한 기간',
levelUpPro: 'Pro 업그레이드', levelUpPro: 'Pro 업그레이드',
licenseSync: '라이센스 동기화', licenseSync: '라이센스 동기화',
knowMorePro: ' 알아보기', knowMorePro: ' 알아보기',

View File

@ -1687,16 +1687,12 @@ const message = {
oss: 'Perisian Sumber Terbuka', oss: 'Perisian Sumber Terbuka',
pro: 'Pro', pro: 'Pro',
trial: 'Percubaan', trial: 'Percubaan',
office: 'Rasmi', subscription: 'Langganan',
perpetual: 'Lesen Perpetual',
versionConstraint: '{0} Pembelian versi',
trialInfo: 'Versi', trialInfo: 'Versi',
authorizationId: 'ID Kebenaran Langganan', authorizationId: 'ID Kebenaran Langganan',
authorizedUser: 'Pengguna yang Dibenarkan', authorizedUser: 'Pengguna yang Dibenarkan',
expiresAt: 'Tarikh Tamat Tempoh',
productName: 'Nama Produk',
productStatus: 'Status Produk',
Lost: 'Hilang',
Enable: 'Diaktifkan',
Disable: 'Dilumpuhkan',
lostHelper: lostHelper:
'Lesen telah mencapai jumlah percubaan semula maksimum. Sila klik butang penyegerakan secara manual untuk memastikan ciri versi profesional berfungsi dengan baik. butiran: ', 'Lesen telah mencapai jumlah percubaan semula maksimum. Sila klik butang penyegerakan secara manual untuk memastikan ciri versi profesional berfungsi dengan baik. butiran: ',
disableHelper: disableHelper:
@ -1708,7 +1704,6 @@ const message = {
importHelper: 'Sila klik atau seret fail lesen ke sini', importHelper: 'Sila klik atau seret fail lesen ke sini',
technicalAdvice: 'Konsultasi Teknikal', technicalAdvice: 'Konsultasi Teknikal',
advice: 'Konsultasi', advice: 'Konsultasi',
indefinitePeriod: 'Tempoh Tidak Terhad',
levelUpPro: 'Tingkatkan ke Pro', levelUpPro: 'Tingkatkan ke Pro',
licenseSync: 'Penyegerakan Lesen', licenseSync: 'Penyegerakan Lesen',
knowMorePro: 'Ketahui Lebih Lanjut', knowMorePro: 'Ketahui Lebih Lanjut',

View File

@ -1671,18 +1671,15 @@ const message = {
}, },
license: { license: {
community: 'Gratuito', community: 'Gratuito',
oss: 'Open Source Software',
pro: 'Pro', pro: 'Pro',
trial: 'Teste', trial: 'Teste',
office: 'Oficial', subscription: 'Assinatura',
perpetual: 'Licença Perpétua',
versionConstraint: '{0} Compra do versão',
trialInfo: 'Versão', trialInfo: 'Versão',
authorizationId: 'ID de autorização de assinatura', authorizationId: 'ID de autorização',
authorizedUser: 'Usuário autorizado', authorizedUser: 'Usuário autorizado',
expiresAt: 'Data de expiração',
productName: 'Nome do Produto',
productStatus: 'Status do Produto',
Lost: 'Perdido',
Enable: 'Habilitado',
Disable: 'Desabilitado',
lostHelper: lostHelper:
'A licença atingiu o número máximo de tentativas de reenvio. Por favor, clique manualmente no botão de sincronização para garantir que os recursos da versão profissional estão funcionando corretamente. detalhes: ', 'A licença atingiu o número máximo de tentativas de reenvio. Por favor, clique manualmente no botão de sincronização para garantir que os recursos da versão profissional estão funcionando corretamente. detalhes: ',
disableHelper: disableHelper:
@ -1695,7 +1692,6 @@ const message = {
importHelper: 'Clique ou arraste o arquivo de licença aqui', importHelper: 'Clique ou arraste o arquivo de licença aqui',
technicalAdvice: 'Consultoria técnica', technicalAdvice: 'Consultoria técnica',
advice: 'Consultoria', advice: 'Consultoria',
indefinitePeriod: 'Período Indefinido',
levelUpPro: 'Upgrade para Pro', levelUpPro: 'Upgrade para Pro',
licenseSync: 'Sincronização de Licença', licenseSync: 'Sincronização de Licença',
knowMorePro: 'Saiba mais', knowMorePro: 'Saiba mais',

View File

@ -1670,17 +1670,13 @@ const message = {
community: 'OSS', community: 'OSS',
oss: 'Open Source Software', oss: 'Open Source Software',
pro: 'Pro', pro: 'Pro',
trial: 'Trial', trial: 'Пробная версия',
office: 'Official', subscription: 'Подписка',
perpetual: 'Пожизненная лицензия',
versionConstraint: '{0} Выкуп версии',
trialInfo: 'Версия', trialInfo: 'Версия',
authorizationId: 'ID авторизации подписки', authorizationId: 'ID авторизации подписки',
authorizedUser: 'Авторизованный пользователь', authorizedUser: 'Авторизованный пользователь',
expiresAt: 'Дата истечения',
productName: 'Название продукта',
productStatus: 'Статус продукта',
Lost: 'Потеряна',
Enable: 'Включена',
Disable: 'Отключена',
lostHelper: lostHelper:
'Лицензия достигла максимального количества попыток повторной проверки. Пожалуйста, вручную нажмите кнопку синхронизации, чтобы убедиться, что функции профессиональной версии работают правильно. Детали: ', 'Лицензия достигла максимального количества попыток повторной проверки. Пожалуйста, вручную нажмите кнопку синхронизации, чтобы убедиться, что функции профессиональной версии работают правильно. Детали: ',
disableHelper: disableHelper:
@ -1692,7 +1688,6 @@ const message = {
importHelper: 'Пожалуйста, нажмите или перетащите файл лицензии сюда', importHelper: 'Пожалуйста, нажмите или перетащите файл лицензии сюда',
technicalAdvice: 'Техническая консультация', technicalAdvice: 'Техническая консультация',
advice: 'Консультация', advice: 'Консультация',
indefinitePeriod: 'Бессрочный период',
levelUpPro: 'Обновить до Pro', levelUpPro: 'Обновить до Pro',
licenseSync: 'Синхронизация лицензии', licenseSync: 'Синхронизация лицензии',
knowMorePro: 'Узнать больше', knowMorePro: 'Узнать больше',

View File

@ -52,7 +52,7 @@ const message = {
refresh: '刷新', refresh: '刷新',
get: '獲取', get: '獲取',
upgrade: '升級', upgrade: '升級',
update: '編輯', update: '更新',
ignore: '忽略升級', ignore: '忽略升級',
install: '安裝', install: '安裝',
copy: '復製', copy: '復製',
@ -1656,20 +1656,18 @@ const message = {
backupRecoverMessage: '請輸入壓縮或解壓縮密碼留空則不設定', backupRecoverMessage: '請輸入壓縮或解壓縮密碼留空則不設定',
}, },
license: { license: {
community: '社區版', community: '社區版',
community2: '社區版', oss: '社區版',
pro: '專業版', pro: '專業版',
xpack: '專業版', trial: '試用',
trial: '試用版', subscription: '訂閱',
perpetual: '永久授權',
versionConstraint: '{0} 版本買斷',
forceDelete: '強制刪除會忽略刪除過程中產生的錯誤並最終刪除元數據', forceDelete: '強制刪除會忽略刪除過程中產生的錯誤並最終刪除元數據',
deleteHelper: '刪除許可證可能導致子節點無法切換請謹慎操作', deleteHelper: '刪除許可證可能導致子節點無法切換請謹慎操作',
office: '正式版',
trialInfo: '版本', trialInfo: '版本',
authorizationId: '訂閱授權 ID', authorizationId: '訂閱授權 ID',
authorizedUser: '被授權方', authorizedUser: '被授權方',
expiresAt: '到期時間',
productName: '產品名稱',
productStatus: '產品狀態',
lostHelper: '許可證已達到最大重試次數請手動點擊同步按鈕以確保專業版功能正常使用詳情', lostHelper: '許可證已達到最大重試次數請手動點擊同步按鈕以確保專業版功能正常使用詳情',
exceptionalHelper: '許可證同步驗證異常請手動點擊同步按鈕以確保專業版功能正常使用詳情', exceptionalHelper: '許可證同步驗證異常請手動點擊同步按鈕以確保專業版功能正常使用詳情',
quickUpdate: '快速更新', quickUpdate: '快速更新',
@ -1678,7 +1676,6 @@ const message = {
unbindMasterHelper: '當前已存在除主節點外其他節點不支持 {0} 操作請在節點管理中刪除節點後重試', unbindMasterHelper: '當前已存在除主節點外其他節點不支持 {0} 操作請在節點管理中刪除節點後重試',
importLicense: '導入許可證', importLicense: '導入許可證',
importHelper: '請點擊或拖動許可文件到此處', importHelper: '請點擊或拖動許可文件到此處',
indefinitePeriod: '無期限',
levelUpPro: '升級專業版', levelUpPro: '升級專業版',
licenseSync: '許可證同步', licenseSync: '許可證同步',
knowMorePro: '了解更多', knowMorePro: '了解更多',

View File

@ -1624,20 +1624,18 @@ const message = {
backupRecoverMessage: '请输入压缩或解压缩密码留空则不设置', backupRecoverMessage: '请输入压缩或解压缩密码留空则不设置',
}, },
license: { license: {
community: '社区版', community: '社区版',
community2: '社区版', oss: '社区版',
pro: '专业版', pro: '专业版',
xpack: '专业版', trial: '试用',
trial: '试用版', subscription: '订阅',
perpetual: '永久授权',
versionConstraint: '{0} 版本买断',
forceDelete: '强制删除会忽略删除过程中产生的错误并最终删除元数据', forceDelete: '强制删除会忽略删除过程中产生的错误并最终删除元数据',
deleteHelper: '删除许可证可能导致子节点无法切换请谨慎操作', deleteHelper: '删除许可证可能导致子节点无法切换请谨慎操作',
office: '正式版',
trialInfo: '版本', trialInfo: '版本',
authorizationId: '订阅授权 ID', authorizationId: '订阅授权 ID',
authorizedUser: '被授权方', authorizedUser: '被授权方',
expiresAt: '到期时间',
productName: '产品名称',
productStatus: '产品状态',
lostHelper: '许可证已达到最大重试次数请手动点击同步按钮以确保专业版功能正常使用详情', lostHelper: '许可证已达到最大重试次数请手动点击同步按钮以确保专业版功能正常使用详情',
exceptionalHelper: '许可证同步验证异常请手动点击同步按钮以确保专业版功能正常使用详情', exceptionalHelper: '许可证同步验证异常请手动点击同步按钮以确保专业版功能正常使用详情',
quickUpdate: '快速更新', quickUpdate: '快速更新',
@ -1646,7 +1644,6 @@ const message = {
unbindMasterHelper: '当前已存在除主节点外其他节点不支持 {0} 操作请在节点管理中删除节点后重试', unbindMasterHelper: '当前已存在除主节点外其他节点不支持 {0} 操作请在节点管理中删除节点后重试',
importLicense: '导入许可证', importLicense: '导入许可证',
importHelper: '请点击或拖动许可文件到此处', importHelper: '请点击或拖动许可文件到此处',
indefinitePeriod: '无限期',
levelUpPro: '升级专业版', levelUpPro: '升级专业版',
licenseSync: '许可证同步', licenseSync: '许可证同步',
knowMorePro: '了解更多', knowMorePro: '了解更多',

View File

@ -40,7 +40,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { getSettingInfo, getSystemAvailable } from '@/api/modules/setting'; import { getSystemAvailable } from '@/api/modules/setting';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import SystemUpgrade from '@/components/system-upgrade/index.vue'; import SystemUpgrade from '@/components/system-upgrade/index.vue';
import { GlobalStore } from '@/store'; import { GlobalStore } from '@/store';
@ -48,13 +48,7 @@ import PrimaryLogo from '@/assets/images/1panel-logo.svg?component';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
const globalStore = GlobalStore(); const globalStore = GlobalStore();
const { docsUrl } = storeToRefs(globalStore); const { docsUrl } = storeToRefs(globalStore);
const version = ref();
const loading = ref(); const loading = ref();
const search = async () => {
const res = await getSettingInfo();
version.value = res.data.systemVersion;
};
const toDoc = () => { const toDoc = () => {
window.open(docsUrl.value, '_blank', 'noopener,noreferrer'); window.open(docsUrl.value, '_blank', 'noopener,noreferrer');
@ -70,7 +64,6 @@ const toGithubStar = () => {
}; };
onMounted(() => { onMounted(() => {
search();
getSystemAvailable(); getSystemAvailable();
}); });
</script> </script>

View File

@ -6,6 +6,10 @@
{{ $t('commons.button.add') }} {{ $t('commons.button.add') }}
</el-button> </el-button>
</template> </template>
<template #rightToolBar>
<TableRefresh @search="search()" />
<TableSetting title="backup-account-refresh" @search="search()" />
</template>
<template #main> <template #main>
<ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data"> <ComplexTable :pagination-config="paginationConfig" @sort-change="search" @search="search" :data="data">
<el-table-column <el-table-column
@ -19,9 +23,9 @@
{{ row.assigneeName || '-' }} {{ row.assigneeName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('license.expiresAt')" prop="expiresAt" show-overflow-tooltip> <el-table-column :label="$t('license.trialInfo')" show-overflow-tooltip :min-width="120">
<template #default="{ row }"> <template #default="{ row }">
{{ row.expiresAt || '-' }} {{ loadVersion(row) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('commons.table.status')" prop="status" show-overflow-tooltip> <el-table-column :label="$t('commons.table.status')" prop="status" show-overflow-tooltip>
@ -171,10 +175,7 @@ const search = async () => {
data.value = res.data.items || []; data.value = res.data.items || [];
for (const item of data.value) { for (const item of data.value) {
item.productName = 'product-1panel-pro'; item.productName = 'product-1panel-pro';
item.expiresAt = item.expiresAt = item.productPro === '0' ? '' : timestampToDate(Number(item.productPro));
item.productPro === '0'
? i18n.global.t('license.indefinitePeriod')
: timestampToDate(Number(item.productPro));
} }
paginationConfig.total = res.data.total; paginationConfig.total = res.data.total;
}) })
@ -203,6 +204,19 @@ const toUpload = () => {
licenseRef.value.acceptParams(); licenseRef.value.acceptParams();
}; };
const loadVersion = (row: any) => {
if (row.trial === 'yes') {
return i18n.global.t('license.trial');
}
if (row.productPro && row.productPro !== '0') {
return i18n.global.t('license.subscription') + ' [ ' + row.expiresAt + ' ] ';
}
if (row.versionConstraint !== 'all') {
return i18n.global.t('license.versionConstraint', ['v' + row.versionConstraint.replace('.x', '')]);
}
return i18n.global.t('license.perpetual');
};
const buttons = [ const buttons = [
{ {
label: i18n.global.t('commons.button.bind'), label: i18n.global.t('commons.button.bind'),
@ -255,12 +269,10 @@ const buttons = [
{ {
label: i18n.global.t('commons.button.delete'), label: i18n.global.t('commons.button.delete'),
click: (row: any) => { click: (row: any) => {
for (const item of data.value) { if (row.freeNodes && row.freeCount != 0) {
if (item.bindNode && row.freeCount != 0) {
MsgError(i18n.global.t('license.unbindMasterHelper', [i18n.global.t('commons.button.delete')])); MsgError(i18n.global.t('license.unbindMasterHelper', [i18n.global.t('commons.button.delete')]));
return; return;
} }
}
delRef.value.acceptParams({ id: row.id, name: row.licenseName }); delRef.value.acceptParams({ id: row.id, name: row.licenseName });
}, },
}, },