mirror of
https://github.com/jumpserver/lina.git
synced 2025-10-22 08:08:39 +00:00
fix: 修复时间兼容firefox
This commit is contained in:
@@ -157,3 +157,10 @@ export function setUrlParam(url, name, value) {
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
export function getDayFuture(days, now) {
|
||||
if (!now) {
|
||||
now = new Date()
|
||||
}
|
||||
return new Date(now.getTime() + 3600 * 1000 * 24 * days)
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@
|
||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import AssetPermissionFormActionField from './components/AssetPermissionFormActionField'
|
||||
import AssetSelect from '@/components/AssetSelect'
|
||||
import { getDayFuture } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -24,8 +25,8 @@ export default {
|
||||
initial: {
|
||||
is_active: true,
|
||||
actions: ['all', 'connect', 'updownload', 'upload_file', 'download_file'],
|
||||
date_start: this.$moment().format('YYYY-MM-DD HH:mm:ss ZZ'),
|
||||
date_expired: '2099-12-31 00:00:00 +0800',
|
||||
date_start: new Date().toISOString(),
|
||||
date_expired: getDayFuture(36500, new Date()).toISOString(),
|
||||
nodes: nodesInitial,
|
||||
assets: assetsInitial
|
||||
},
|
||||
|
@@ -4,6 +4,8 @@
|
||||
|
||||
<script>
|
||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import { getDayFuture } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GenericCreateUpdatePage
|
||||
@@ -12,8 +14,8 @@ export default {
|
||||
return {
|
||||
initial: {
|
||||
is_active: true,
|
||||
date_start: this.$moment().format('YYYY-MM-DD HH:mm:ss ZZ'),
|
||||
date_expired: '2099-12-31 00:00:00 +0800'
|
||||
date_start: new Date().toISOString(),
|
||||
date_expired: getDayFuture(36500, new Date()).toISOString()
|
||||
},
|
||||
fields: [
|
||||
[this.$t('common.' + 'Basic'), ['name']],
|
||||
|
@@ -4,6 +4,8 @@
|
||||
|
||||
<script>
|
||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import { getDayFuture } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GenericCreateUpdatePage
|
||||
@@ -12,8 +14,8 @@ export default {
|
||||
return {
|
||||
initial: {
|
||||
is_active: true,
|
||||
date_start: this.$moment().format('YYYY-MM-DD HH:mm:ss ZZ'),
|
||||
date_expired: '2099-12-31 00:00:00 +0800'
|
||||
date_start: new Date().toISOString(),
|
||||
date_expired: getDayFuture(36500, new Date()).toISOString()
|
||||
},
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name']],
|
||||
|
@@ -5,6 +5,7 @@
|
||||
<script>
|
||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import UserPassword from '@/components/UserPassword'
|
||||
import { getDayFuture } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -17,7 +18,7 @@ export default {
|
||||
mfa_level: 0,
|
||||
source: 'local',
|
||||
role: 'User',
|
||||
date_expired: '2099-12-31 00:00:00 +0800'
|
||||
date_expired: getDayFuture(36500, new Date()).toISOString()
|
||||
},
|
||||
fields: [
|
||||
[this.$t('users.Account'), ['name', 'username', 'email', 'groups']],
|
||||
|
@@ -14,6 +14,7 @@ import { mapGetters } from 'vuex'
|
||||
import { GenericListPage } from '@/layout/components'
|
||||
import { GenericUpdateFormDialog } from '@/layout/components'
|
||||
import { createSourceIdCache } from '@/api/common'
|
||||
import { getDayFuture } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -123,7 +124,7 @@ export default {
|
||||
},
|
||||
formSetting: {
|
||||
initial: {
|
||||
date_expired: '2099-12-31 00:00:00 +0800'
|
||||
date_expired: getDayFuture(36500, new Date()).toISOString()
|
||||
},
|
||||
fields: [
|
||||
'groups', 'date_expired', 'comment'
|
||||
|
Submodule src/views/xpack updated: 89f5ee1481...10b2406942
Reference in New Issue
Block a user