Merge pull request #169 from jumpserver/audit_fix

fix(audit): 修复时间显示兼容firefox
This commit is contained in:
Orange 2020-07-09 12:01:28 +08:00 committed by GitHub
commit 781bbe0ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 9 deletions

View File

@ -9,7 +9,7 @@
<script type="text/jsx"> <script type="text/jsx">
import GenericListPage from '@/layout/components/GenericListPage' import GenericListPage from '@/layout/components/GenericListPage'
import { getDaysAgo } from '@/utils/common' import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
import { Dialog, ListTable } from '@/components' import { Dialog, ListTable } from '@/components'
import { DisplayFormatter } from '@/components/ListTable/formatters' import { DisplayFormatter } from '@/components/ListTable/formatters'
import { setUrlParam } from '@/utils/common' import { setUrlParam } from '@/utils/common'
@ -66,7 +66,10 @@ export default {
} }
}, },
date_start: { date_start: {
width: '160px' width: '160px',
formatter: function(row, cell, value) {
return toSafeLocalDateStr(value)
}
} }
}, },
extraQuery: { extraQuery: {

View File

@ -4,7 +4,7 @@
<script> <script>
import GenericListPage from '@/layout/components/GenericListPage' import GenericListPage from '@/layout/components/GenericListPage'
import { getDaysAgo } from '@/utils/common' import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
export default { export default {
components: { components: {
@ -42,6 +42,11 @@ export default {
}, },
is_success: { is_success: {
width: '80px' width: '80px'
},
date_start: {
formatter: function(row, cell, value) {
return toSafeLocalDateStr(value)
}
} }
}, },
extraQuery: { extraQuery: {

View File

@ -4,7 +4,7 @@
<script> <script>
import GenericListPage from '@/layout/components/GenericListPage' import GenericListPage from '@/layout/components/GenericListPage'
import { getDaysAgo } from '@/utils/common' import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
export default { export default {
components: { components: {
@ -40,7 +40,10 @@ export default {
width: '100px' width: '100px'
}, },
datetime: { datetime: {
width: '160px' width: '160px',
formatter: function(row, cell, value) {
return toSafeLocalDateStr(value)
}
}, },
reason: { reason: {
showOverflowTooltip: true showOverflowTooltip: true

View File

@ -4,7 +4,7 @@
<script> <script>
import GenericListPage from '@/layout/components/GenericListPage' import GenericListPage from '@/layout/components/GenericListPage'
import { getDaysAgo } from '@/utils/common' import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
export default { export default {
components: { components: {
@ -29,7 +29,10 @@ export default {
showOverflowTooltip: true showOverflowTooltip: true
}, },
datetime: { datetime: {
width: '160px' width: '160px',
formatter: function(row, cell, value) {
return toSafeLocalDateStr(value)
}
}, },
remote_addr: { remote_addr: {
width: '140px' width: '140px'

View File

@ -4,7 +4,7 @@
<script> <script>
import GenericListPage from '@/layout/components/GenericListPage' import GenericListPage from '@/layout/components/GenericListPage'
import { getDaysAgo } from '@/utils/common' import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
export default { export default {
components: { components: {
@ -29,7 +29,10 @@ export default {
showOverflowTooltip: true showOverflowTooltip: true
}, },
datetime: { datetime: {
width: '180px' width: '180px',
formatter: function(row, cell, value) {
return toSafeLocalDateStr(value)
}
} }
}, },
extraQuery: { extraQuery: {