fix : apiKey时区问题更改
This commit is contained in:
@@ -102,6 +102,7 @@ export default {
|
|||||||
this.$refs.apiKeyBoxForm.validate((valid) => {
|
this.$refs.apiKeyBoxForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.apiKeyBox.name) {
|
if (this.apiKeyBox.name) {
|
||||||
|
this.apiKeyBox.expireAt = this.timezoneToUtcTimeStr(this.apiKeyBox.expireAt, 'YYYY-MM-DD HH:mm:ss')
|
||||||
this.$post('sys/apiKey/self', { ...this.apiKeyBox }).then(res => {
|
this.$post('sys/apiKey/self', { ...this.apiKeyBox }).then(res => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|||||||
@@ -40,10 +40,10 @@
|
|||||||
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
|
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.prop == 'expireAt'">
|
<template v-if="item.prop == 'expireAt'">
|
||||||
{{scope.row[item.prop]?timeFormates(scope.row[item.prop]):'-'}}
|
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.prop == 'createAt'">
|
<template v-if="item.prop == 'createAt'">
|
||||||
{{scope.row[item.prop]?timeFormates(scope.row[item.prop]):'-'}}
|
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.prop == 'remark'">
|
<template v-if="item.prop == 'remark'">
|
||||||
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
|
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
|
||||||
@@ -80,7 +80,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { tableCommon } from './systemCommon'
|
import { tableCommon } from './systemCommon'
|
||||||
import table from '@/components/common/mixin/table'
|
import table from '@/components/common/mixin/table'
|
||||||
import bus from '@/libs/bus'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'apiKeyTable',
|
name: 'apiKeyTable',
|
||||||
props: {
|
props: {
|
||||||
@@ -118,13 +117,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
timeFormates (data) {
|
// timeFormates (data) {
|
||||||
if (localStorage.getItem('nz-default-dateFormat')) {
|
// if (localStorage.getItem('nz-default-dateFormat')) {
|
||||||
return bus.timeFormate(new Date(data), localStorage.getItem('nz-default-dateFormat'))
|
// return bus.timeFormate(new Date(data), localStorage.getItem('nz-default-dateFormat'))
|
||||||
} else {
|
// } else {
|
||||||
return bus.timeFormate(new Date(data), 'YYYY-MM-DD HH:mm:ss')
|
// return bus.timeFormate(new Date(data), 'YYYY-MM-DD HH:mm:ss')
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user