无人机管理后台前端(已迁走)
rjg
2025-05-16 52b407fa46dce7144c7f8d30d26a72c29fa248ac
license
1 files modified
16 ■■■■■ changed files
src/views/license/license.vue 16 ●●●●● patch | view | raw | blame | history
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) {