124 lines
2.9 KiB
Java
124 lines
2.9 KiB
Java
<template>
|
|
<a-modal
|
|
:title="$t('UpdateLog')"
|
|
:width="900"
|
|
:visible="visible"
|
|
:confirm-loading="confirmLoading"
|
|
:maskClosable="false"
|
|
@cancel="visible = false"
|
|
>
|
|
<template slot="footer">
|
|
<a-button key="back" @click="visible = false">
|
|
{{$t('cancel')}}
|
|
</a-button>
|
|
</template>
|
|
<a-table
|
|
class="table"
|
|
:columns="columns"
|
|
:pagination="false"
|
|
:scroll="{y: 420}"
|
|
:data-source="dataSource"
|
|
:loading="loading"
|
|
>
|
|
<span slot="content" slot-scope="text,record">
|
|
<a-tooltip placement="topLeft">
|
|
<template slot="title">
|
|
<span v-html="text"></span>
|
|
</template>
|
|
<span v-html="text"></span>
|
|
</a-tooltip>
|
|
</span>
|
|
</a-table>
|
|
<div class="page" v-if="dataSource.length > 0">
|
|
<a-pagination
|
|
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
|
show-quick-jumper
|
|
show-size-changer
|
|
:page-size.sync="pageSize "
|
|
:total="total"
|
|
:current="pageNo"
|
|
@change="onChange"
|
|
@showSizeChange="SizeChange"
|
|
/>
|
|
</div>
|
|
</a-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction, } from '@/api/manage'
|
|
export default {
|
|
name: 'index',
|
|
props:['url'],
|
|
data(){
|
|
return{
|
|
visible:false,
|
|
confirmLoading:false,
|
|
dataSource:[],
|
|
loading:false,
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
queryId:{},
|
|
total: 0,
|
|
columns: [
|
|
{
|
|
title: this.$t('OperationDetails'),
|
|
dataIndex: 'logContent',
|
|
align: 'center',
|
|
ellipsis: true,
|
|
scopedSlots: { customRender: 'content' }
|
|
},
|
|
{
|
|
title: this.$t('OperationTime'),
|
|
dataIndex: 'createTime',
|
|
align: 'center',
|
|
ellipsis: true,
|
|
width: 180
|
|
},
|
|
]
|
|
}
|
|
},
|
|
mounted() {
|
|
},
|
|
methods:{
|
|
getList(data){
|
|
this.visible = true
|
|
this.pageNo = 1
|
|
this.queryId = data
|
|
this.bussLogList()
|
|
},
|
|
onChange(page, pageSize) {
|
|
this.pageNo = page
|
|
this.bussLogList()
|
|
},
|
|
SizeChange(page, pageSize) {
|
|
this.pageNo = 1
|
|
this.pageSize = pageSize
|
|
this.bussLogList()
|
|
},
|
|
bussLogList(){
|
|
let query = {
|
|
pageNo: this.pageNo,
|
|
pageSize: this.pageSize,
|
|
...this.queryId
|
|
}
|
|
this.loading = true
|
|
getAction(this.url.logList, query).then((res) => {
|
|
if (res.success) {
|
|
this.dataSource = res.result.records
|
|
this.total = res.result.total
|
|
this.loading = false
|
|
} else {
|
|
this.loading = false
|
|
}
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page {
|
|
text-align: right;
|
|
margin-top: 20px;
|
|
}
|
|
</style> |