| | |
| | | @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> |
| | | |
| | |
| | | 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) { |