NEZ-1480 fix: 修复license时间展示错误问题

This commit is contained in:
@changcode
2022-01-05 10:15:52 +08:00
parent e47443476c
commit 7bbf078c84
5 changed files with 10 additions and 10 deletions

View File

@@ -338,7 +338,6 @@ export default {
this.$emit('changeTab', tab) this.$emit('changeTab', tab)
}, },
closeRightBox (refresh) { closeRightBox (refresh) {
console.log('close')
this.rightBox.chart.show = false this.rightBox.chart.show = false
this.rightBox.chartTemp.show = false this.rightBox.chartTemp.show = false
this.$store.dispatch('clearPanel') this.$store.dispatch('clearPanel')

View File

@@ -202,7 +202,6 @@ export default {
/* 关闭弹框 */ /* 关闭弹框 */
esc (refresh) { esc (refresh) {
this.prevent_opt.save = false this.prevent_opt.save = false
console.log(12313)
this.$emit('close', refresh) this.$emit('close', refresh)
}, },
// 保存endpoint // 保存endpoint

View File

@@ -29,16 +29,16 @@
<div> <div>
<div class="license-left-boyd-title">{{$t('license.proDate')}}</div> <div class="license-left-boyd-title">{{$t('license.proDate')}}</div>
<div class="license-left-boyd-value"> <div class="license-left-boyd-value">
<span v-if="licenseList.production_date">{{utcTimeToTimezoneStr(licenseList.production_date * 1000)}}</span> <span v-if="licenseList.production_date">{{licenseList.production_date}}</span>
<span v-else>-</span> <span v-else>-</span>
</div> </div>
</div> </div>
<div> <div>
<div class="license-left-boyd-title">{{$t('license.expDate')}}</div> <div class="license-left-boyd-title">{{$t('license.expDate')}}</div>
<div class="license-left-boyd-value"> <div class="license-left-boyd-value">
<span v-if="expData.id === '20001' && expData.license.license_type === 'expiration'">{{utcTimeToTimezoneStr(expData.license.exp_date * 1000)}}</span> <span v-if="expData.id === '20001' && expData.license.license_type === 'expiration'">{{expData.license.exp_date}}</span>
<span v-else-if="expData.id === '20001' && expData.license.license_type === 'perpetual'">{{$t('license.permanent')}}</span> <span v-else-if="expData.id === '20001' && expData.license.license_type === 'perpetual'">{{licenseList.production_date}}</span>
<span v-else-if="expData.id === '20001' && expData.license.license_type === 'trial'">{{utcTimeToTimezoneStr(this.stateItem * 1000)}} ~ {{ utcTimeToTimezoneStr(this.endItem * 1000)}}</span> <span v-else-if="expData.id === '20001' && expData.license.license_type === 'trial'">{{stateItem}} ~ {{endItem}}</span>
<span v-else>-</span> <span v-else>-</span>
</div> </div>
</div> </div>
@@ -92,6 +92,8 @@
</template> </template>
<script> <script>
import bus from '@/libs/bus'
export default { export default {
name: 'license', name: 'license',
data () { data () {
@@ -124,11 +126,13 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.licenseMark = res.data.license this.licenseMark = res.data.license
this.licenseList = res.data.license.hasp this.licenseList = res.data.license.hasp
this.licenseList.production_date = bus.timeFormate(bus.computeTimezone(this.licenseList.production_date * 1000))
this.licenseList.feature.map(e => { this.licenseList.feature.map(e => {
if (e.id === '20001') { if (e.id === '20001') {
this.expData = e this.expData = e
this.stateItem = e.license.time_start this.expData.license.exp_date = bus.timeFormate(bus.computeTimezone(this.expData.license.exp_date * 1000))
this.endItem = e.license.end_time * 1 + e.license.time_start * 1 this.stateItem = bus.timeFormate(bus.computeTimezone(e.license.time_start * 1000))
this.endItem = bus.timeFormate(bus.computeTimezone(e.license.time_start * 1000)) + bus.timeFormate(bus.computeTimezone(e.license.end_time * 1000))
} }
}) })
} else { } else {

View File

@@ -18,7 +18,6 @@ router.beforeEach((to, from, next) => {
Vue.http.get(configUrl).then(config => { Vue.http.get(configUrl).then(config => {
const appearance = new Promise(resolve => { const appearance = new Promise(resolve => {
get(config.body.baseUrl + '/sys/appearance').then(res => { get(config.body.baseUrl + '/sys/appearance').then(res => {
// console.log(res)
if (res.code === 200) { if (res.code === 200) {
localStorage.setItem('nz-sys-name', res.data.system_name || '') localStorage.setItem('nz-sys-name', res.data.system_name || '')
localStorage.setItem('nz-sys-logo', res.data.system_logo || '') localStorage.setItem('nz-sys-logo', res.data.system_logo || '')

View File

@@ -172,7 +172,6 @@ const store = new Vuex.Store({
state.langList = langList state.langList = langList
}, },
setTimeFormatMain (state, timeFormat) { setTimeFormatMain (state, timeFormat) {
console.log(timeFormat)
state.timeFormatMain = timeFormat state.timeFormatMain = timeFormat
}, },
i18nReady (state, ready) { i18nReady (state, ready) {