This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nezha-nezha-fronted/nezha-fronted/src/components/page/config/operationLog.vue

96 lines
2.8 KiB
Vue
Raw Normal View History

<template>
2021-04-13 20:33:12 +08:00
<div>
<nz-data-list
ref="dataList"
2021-04-13 20:33:12 +08:00
:api="url"
2021-08-23 18:50:08 +08:00
:layout="['searchInput', 'elementSet', 'pagination']"
:custom-table-title.sync="tools.customTableTitle"
2021-04-09 10:25:11 +08:00
:from="fromRoute.operationLog"
@search="search"
2021-04-13 20:33:12 +08:00
:search-msg="searchMsg">
<template v-slot:default="slotProps">
2021-04-13 20:33:12 +08:00
<operation-log-table
ref="dataTable"
2021-05-18 19:18:14 +08:00
v-loading="tools.loading"
2021-10-22 17:47:42 +08:00
:loading="tools.loading"
2021-04-13 20:33:12 +08:00
:api="url"
:custom-table-title="tools.customTableTitle"
:height="mainTableHeight"
2021-04-13 20:33:12 +08:00
:table-data="tableData"
@del="del"
@edit="edit"
@orderBy="tableDataSort"
@reload="getTableData"
@selectionChange="selectionChange"
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"></operation-log-table>
</template>
<!-- 分页组件 -->
<template v-slot:pagination>
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
</template>
</nz-data-list>
</div>
</template>
<script>
import nzDataList from '@/components/common/table/nzDataList'
2021-04-13 20:33:12 +08:00
import dataListMixin from '@/components/common/mixin/dataList'
import operationLogTable from '@/components/common/table/settings/operationLogTable'
export default {
2021-04-13 20:33:12 +08:00
name: 'oparetionLog',
components: {
2021-04-13 20:33:12 +08:00
nzDataList,
operationLogTable
},
2021-04-13 20:33:12 +08:00
mixins: [dataListMixin],
data () {
return {
url: 'sys/log',
tableId: 'operationLogTable', // 需要分页的table的id用于记录每页数量
searchMsg: { // 给搜索框子组件传递的信息
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
}, {
id: 14,
name: this.$t('config.operationlog.operaId'),
type: 'input',
label: 'operaId',
disabled: false
2021-04-22 18:03:56 +08:00
}, {
id: 16,
name: this.$t('config.operationlog.state'),
type: 'selectString',
label: 'state',
readonly: true,
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-22 18:03:56 +08:00
}
}
}
}
</script>