[update] 修改bug80276
This commit is contained in:
+23
-5
@@ -29,11 +29,12 @@
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:rowKey="(record, index) => { return (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index }"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading">
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
|
||||
@@ -66,6 +67,18 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '30', '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('serialNumber'),
|
||||
@@ -137,6 +150,9 @@ export default {
|
||||
return false
|
||||
}
|
||||
},
|
||||
handleTableChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
},
|
||||
// 新增征求意见
|
||||
handleAdd () {
|
||||
// 不知道左侧要预览哪个文件
|
||||
@@ -149,7 +165,8 @@ export default {
|
||||
// 不知道左侧要预览哪个文件
|
||||
const file = ''
|
||||
this.$refs.commentModal.title = this.$t('edit')
|
||||
this.$refs.commentModal.edit(file, record, index)
|
||||
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
|
||||
this.$refs.commentModal.edit(file, record, dataIndex)
|
||||
},
|
||||
// 征求意见的删除
|
||||
handleDelete (index) {
|
||||
@@ -157,7 +174,8 @@ export default {
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: this.$t('areYouSure'),
|
||||
onOk: () => {
|
||||
this.dataSource.splice(index, 1)
|
||||
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
|
||||
this.dataSource.splice(dataIndex, 1)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user