2021-04-08 20:28:54 +08:00
|
|
|
<template>
|
2021-04-14 18:35:42 +08:00
|
|
|
<nz-bottom-data-list
|
|
|
|
|
:api="url"
|
|
|
|
|
:custom-table-title.sync="tools.customTableTitle"
|
|
|
|
|
:layout="['searchInput', 'elementSet']"
|
|
|
|
|
:search-msg="searchMsg"
|
|
|
|
|
:tabs="tabs"
|
|
|
|
|
@changeTab="changeTab"
|
2021-04-22 17:43:13 +08:00
|
|
|
@search="search"
|
2021-04-14 18:35:42 +08:00
|
|
|
>
|
|
|
|
|
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
|
|
|
|
|
<template v-slot>
|
|
|
|
|
<operation-log-table
|
|
|
|
|
ref="dataTable"
|
|
|
|
|
v-loading="tools.loading"
|
|
|
|
|
:api="url"
|
|
|
|
|
:custom-table-title="tools.customTableTitle"
|
|
|
|
|
:height="subTableHeight"
|
|
|
|
|
:table-data="tableData"
|
|
|
|
|
@del="del"
|
|
|
|
|
@edit="edit"
|
|
|
|
|
@orderBy="tableDataSort"
|
|
|
|
|
@reload="getTableData"
|
|
|
|
|
@selectionChange="selectionChange"></operation-log-table>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:pagination>
|
|
|
|
|
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
|
|
|
|
|
</template>
|
|
|
|
|
</nz-bottom-data-list>
|
2021-04-08 20:28:54 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-04-13 20:33:12 +08:00
|
|
|
import dataListMixin from '@/components/common/mixin/dataList'
|
2021-04-14 18:35:42 +08:00
|
|
|
import subDataListMixin from '@/components/common/mixin/subDataList'
|
|
|
|
|
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
2021-04-13 20:33:12 +08:00
|
|
|
import operationLogTable from '@/components/common/table/settings/operationLogTable'
|
2021-04-08 20:28:54 +08:00
|
|
|
export default {
|
|
|
|
|
name: 'operationLogTab',
|
2021-04-14 18:35:42 +08:00
|
|
|
mixins: [dataListMixin, subDataListMixin],
|
2021-04-13 20:33:12 +08:00
|
|
|
components: {
|
2021-04-14 18:35:42 +08:00
|
|
|
nzBottomDataList,
|
2021-04-13 20:33:12 +08:00
|
|
|
operationLogTable
|
|
|
|
|
},
|
2021-06-21 19:12:25 +08:00
|
|
|
props: {
|
|
|
|
|
obj: Object
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
obj (n) {
|
|
|
|
|
this.searchLabel = { userId: n.id }
|
|
|
|
|
this.getTableData()
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-08 20:28:54 +08:00
|
|
|
data () {
|
|
|
|
|
return {
|
2021-04-22 17:43:13 +08:00
|
|
|
url: 'sys/log',
|
2021-04-13 20:33:12 +08:00
|
|
|
tableId: 'operationLogTable',
|
2021-04-08 20:28:54 +08:00
|
|
|
searchMsg: { // 给搜索框子组件传递的信息
|
|
|
|
|
zheze_none: true,
|
|
|
|
|
searchLabelList: [
|
|
|
|
|
{
|
|
|
|
|
id: 11,
|
|
|
|
|
name: this.$t('config.operationlog.type'),
|
|
|
|
|
type: 'input',
|
|
|
|
|
label: 'type',
|
|
|
|
|
disabled: false
|
|
|
|
|
}, {
|
|
|
|
|
id: 12,
|
|
|
|
|
name: this.$t('config.operationlog.username'),
|
|
|
|
|
type: 'input',
|
|
|
|
|
label: 'username',
|
|
|
|
|
disabled: false
|
|
|
|
|
}, {
|
|
|
|
|
id: 13,
|
|
|
|
|
name: this.$t('config.operationlog.operation'),
|
|
|
|
|
type: 'selectString',
|
|
|
|
|
label: 'operation',
|
|
|
|
|
disabled: false
|
2021-04-22 18:03:56 +08:00
|
|
|
}, {
|
2021-04-22 17:43:13 +08:00
|
|
|
id: 14,
|
|
|
|
|
name: this.$t('config.operationlog.operaId'),
|
|
|
|
|
type: 'input',
|
|
|
|
|
label: 'operaId',
|
|
|
|
|
disabled: false
|
2021-04-22 18:03:56 +08:00
|
|
|
}, {
|
2021-04-22 17:43:13 +08:00
|
|
|
id: 16,
|
|
|
|
|
name: this.$t('config.operationlog.state'),
|
|
|
|
|
type: 'selectString',
|
|
|
|
|
label: 'state',
|
|
|
|
|
disabled: false
|
|
|
|
|
}, {
|
|
|
|
|
id: 17,
|
|
|
|
|
name: this.$t('config.operationlog.params'),
|
|
|
|
|
type: 'input',
|
|
|
|
|
label: 'params',
|
|
|
|
|
disabled: false
|
2021-04-22 18:03:56 +08:00
|
|
|
}
|
2021-04-08 20:28:54 +08:00
|
|
|
]
|
2021-04-22 17:43:13 +08:00
|
|
|
},
|
2021-04-22 18:03:56 +08:00
|
|
|
searchLabel: { userId: this.obj.id }
|
2021-04-08 20:28:54 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
messageStyle (e) {
|
|
|
|
|
if (e.column.label === this.$t('config.operationlog.state')) {
|
|
|
|
|
if (e.row.state === 'success') {
|
|
|
|
|
return 'success'
|
|
|
|
|
} else {
|
|
|
|
|
return 'danger'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return ''
|
2021-04-22 18:03:56 +08:00
|
|
|
}
|
2021-04-22 17:43:13 +08:00
|
|
|
|
2021-04-08 20:28:54 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|