From 52b407fa46dce7144c7f8d30d26a72c29fa248ac Mon Sep 17 00:00:00 2001
From: rjg <746338628@qq.com>
Date: Fri, 16 May 2025 13:56:09 +0800
Subject: [PATCH] license
---
src/views/license/license.vue | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/views/license/license.vue b/src/views/license/license.vue
index dc1cad4..76a4ee2 100644
--- a/src/views/license/license.vue
+++ b/src/views/license/license.vue
@@ -19,20 +19,23 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
-
@on-load="onLoad">
- <template #url="scope">
+
+ <!-- 自定义证书地址列 -->
+ <template #url="scope">
<el-link
:href="scope.row.url"
+ :download="scope.row.licenseName + '.lic'"
target="_blank"
type="primary">
下载证书
</el-link>
</template>
+
<!-- 自定义过期时间列 -->
<template #expireDay="scope">
<span :style="{ color: isExpired(scope.row.expireDay) ? 'red' : 'inherit' }">
- {{ formatExpireDay(scope.row.expireDay) }}
+ {{ formatExpireDay(scope.row.expireDay,scope.row.licenseType) }}
</span>
</template>
@@ -305,10 +308,13 @@
const now = new Date();
return new Date(expireDay) < now;
},
- formatExpireDay(expireDay) {
- if (this.isExpired(expireDay)) {
+ formatExpireDay(expireDay,licenseType) {
+ if (licenseType==2&& this.isExpired(expireDay)) {
return `${expireDay} (已过期)`;
}
+ if(licenseType==1){
+ return `永久`;
+ }
return expireDay;
},
rowSave(row, done, loading) {
--
Gitblit v1.9.3