mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 10:46:35 +00:00
perf(licenseExpiredTip): 去掉系统设置里面license过期提醒
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!loading">
|
<div v-if="!loading">
|
||||||
<el-alert v-if="isExpire" type="error">
|
|
||||||
{{ isExpire }}
|
|
||||||
</el-alert>
|
|
||||||
<el-alert v-if="!isValidateLicense" type="success">
|
<el-alert v-if="!isValidateLicense" type="success">
|
||||||
{{ this.$t('setting.ImportLicenseTip') }}
|
{{ this.$t('setting.ImportLicenseTip') }}
|
||||||
</el-alert>
|
</el-alert>
|
||||||
@@ -33,7 +30,6 @@ import { QuickActions, Dialog } from '@/components'
|
|||||||
import DetailCard from '@/components/DetailCard/index'
|
import DetailCard from '@/components/DetailCard/index'
|
||||||
import { importLicense } from '@/api/settings'
|
import { importLicense } from '@/api/settings'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { toSafeLocalDateStr } from '@/utils/common'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'License',
|
name: 'License',
|
||||||
@@ -89,16 +85,6 @@ export default {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
isExpire() {
|
|
||||||
const intervalDays = this.getIntervalDays(this.licenseData.date_expired)
|
|
||||||
if (intervalDays < 0) {
|
|
||||||
return this.$t('setting.LicenseExpired')
|
|
||||||
}
|
|
||||||
if (intervalDays < 7) {
|
|
||||||
return this.$t('setting.LicenseWillBe') + this.licenseData.date_expired + this.$t('setting.Expire')
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
cardTitle() {
|
cardTitle() {
|
||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
@@ -172,12 +158,6 @@ export default {
|
|||||||
},
|
},
|
||||||
fileChange(e) {
|
fileChange(e) {
|
||||||
this.licenseFile['file'] = e.target.files[0]
|
this.licenseFile['file'] = e.target.files[0]
|
||||||
},
|
|
||||||
getIntervalDays(date) {
|
|
||||||
const dateExpired = new Date(toSafeLocalDateStr(date))
|
|
||||||
const dateNow = new Date()
|
|
||||||
const intervalTime = dateExpired.getTime() - dateNow.getTime()
|
|
||||||
return Math.floor(intervalTime / (24 * 3600 * 1000))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user