NEZ-1009 feat:操作日志&终端日志 补充 排序

This commit is contained in:
zhangyu
2021-09-17 11:52:41 +08:00
parent 33f3d00767
commit 12cf613172
2 changed files with 20 additions and 10 deletions

View File

@@ -25,6 +25,7 @@
:min-width="`${item.minWidth}`" :min-width="`${item.minWidth}`"
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sortable="item.sortable"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
@@ -59,12 +60,14 @@ export default {
label: this.$t('config.operationlog.id'), label: this.$t('config.operationlog.id'),
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable: 'custom'
}, { }, {
label: this.$t('config.operationlog.username'), label: this.$t('config.operationlog.username'),
prop: 'username', prop: 'username',
show: true, show: true,
minWidth: 80 minWidth: 80,
sortable: 'custom'
}, },
{ {
label: this.$t('config.operationlog.ip'), label: this.$t('config.operationlog.ip'),
@@ -76,13 +79,15 @@ export default {
label: this.$t('config.operationlog.operation'), label: this.$t('config.operationlog.operation'),
prop: 'operation', prop: 'operation',
show: true, show: true,
minWidth: 140 minWidth: 140,
sortable: 'custom'
}, },
{ {
label: this.$t('config.operationlog.type'), label: this.$t('config.operationlog.type'),
prop: 'type', prop: 'type',
show: true, show: true,
minWidth: 80 minWidth: 80,
sortable: 'custom'
}, },
{ {
label: this.$t('config.operationlog.state'), label: this.$t('config.operationlog.state'),

View File

@@ -25,6 +25,7 @@
:min-width="`${item.minWidth}`" :min-width="`${item.minWidth}`"
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sortable="item.sortable"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
@@ -35,7 +36,7 @@
</template> </template>
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<span v-if="item.prop === 'time'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span> <span v-if="item.prop === 'time'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
<template v-else-if="item.prop === 'status'"> <template v-else-if="item.prop === 'state'">
<span>{{getStatusText(scope.row.status)}}</span> <span>{{getStatusText(scope.row.status)}}</span>
</template> </template>
<template v-else-if="item.prop === 'uuid'"> <template v-else-if="item.prop === 'uuid'">
@@ -47,6 +48,7 @@
<span slot="reference">{{scope.row.uuid.substring(0, 8).toUpperCase()}}</span> <span slot="reference">{{scope.row.uuid.substring(0, 8).toUpperCase()}}</span>
</el-popover> </el-popover>
</template> </template>
<span v-else-if="item.prop === 'sourceIp'">{{scope.row.remoteAddr}}</span>
<template v-else-if="item.prop === 'remote'"> <template v-else-if="item.prop === 'remote'">
<span>{{getRemoteText(scope.row)}}</span> <span>{{getRemoteText(scope.row)}}</span>
</template> </template>
@@ -123,7 +125,8 @@ export default {
label: this.$t('config.terminallog.id'), label: this.$t('config.terminallog.id'),
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable: 'custom'
}, { }, {
label: this.$t('config.terminallog.SessionID'), label: this.$t('config.terminallog.SessionID'),
prop: 'uuid', prop: 'uuid',
@@ -137,9 +140,10 @@ export default {
}, },
{ {
label: this.$t('config.terminallog.source'), label: this.$t('config.terminallog.source'),
prop: 'remoteAddr', prop: 'sourceIp',
minWidth: 100, minWidth: 100,
show: true show: true,
sortable: 'custom'
}, },
{ {
label: this.$t('config.terminallog.remote'), label: this.$t('config.terminallog.remote'),
@@ -170,9 +174,10 @@ export default {
}, },
{ {
label: this.$t('config.terminallog.status'), // killusername鼠标悬停形式 label: this.$t('config.terminallog.status'), // killusername鼠标悬停形式
prop: 'status', prop: 'state',
show: true, show: true,
width: 150 width: 150,
sortable: 'custom'
} }
] ]
} }