Files
laws-sinotruk-client/src/views/documentManage/modules/LibraryDetailUpdateLog.vue
T

117 lines
2.7 KiB
Vue

<template>
<a-modal
:title="$t('docLibrary.updateLog')"
:width="900"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-table
class="table"
:components="drag(columns,'columns')"
:columns="columns"
:pagination="ipagination"
:scroll="{x: '100%',y: 400}"
:data-source="dataSource"
:loading="loading"
>
<span slot="content" slot-scope="text">
<a-tooltip placement="topLeft" overlayClassName="tooltip-color">
<template slot="title">
<span v-html="text"></span>
</template>
<span v-html="text"></span>
</a-tooltip>
</span>
</a-table>
</a-modal>
</template>
<script>
import { getAction } from '@/api/manage'
export default {
name: 'LibraryDetailUpdateLog',
data () {
return {
visible: false, // 更新日志弹框是否可见
confirmLoading: false,
ipagination: {
current: 1,
pageSize: 50,
pageSizeOptions: ['10', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('docLibrary.modificationContent'),
dataIndex: 'content',
align: 'left',
ellipsis: true,
scopedSlots: { customRender: 'content' },
width: 484
},
{
title: this.$t('docLibrary.modificationTime'),
dataIndex: 'createTime',
align: 'left',
ellipsis: true,
width: 180
},
{
title: this.$t('docLibrary.personnel'),
dataIndex: 'createBy',
align: 'left',
ellipsis: true,
width: 180
}
],
dataSource: [],
loading: false,
url: {
list: 'log/bussLogEO/page',
}
}
},
methods: {
open () {
this.visible = true
this.bussLogList()
},
bussLogList () {
const query = {
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
documentId: this.$route.query.id
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records
this.ipagination.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
handleOk () {
this.visible = false
},
handleCancel () {
this.visible = false
},
}
}
</script>
<style scoped>
</style>