update 流程表格分页调整

This commit is contained in:
danshihao
2024-01-19 15:52:49 +08:00
parent 1e0f2ca42a
commit 40792ad0a1
9 changed files with 29 additions and 52 deletions
@@ -22,8 +22,7 @@
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:row-selection="hasTableOperator ? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange, getCheckboxProps } : null" :row-selection="hasTableOperator ? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange, getCheckboxProps } : null"
:scroll="{x: '100%', y: '50vh'}" :scroll="{x: '100%', y: '50vh'}">
@change="tableOnChange">
<!-- 企标号、企标名称 --> <!-- 企标号、企标名称 -->
<template v-slot:standard="{text, record}"> <template v-slot:standard="{text, record}">
@@ -377,12 +376,6 @@ export default {
} }
}) })
}, },
tableOnChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination
this.getTableList()
},
// 填写意见 // 填写意见
handleWriteOpinion (record, index) { handleWriteOpinion (record, index) {
this.$refs.writeOpinionModal.show(record, index) this.$refs.writeOpinionModal.show(record, index)
@@ -15,8 +15,9 @@
:dataSource="dataSource" :dataSource="dataSource"
:can-drag="true" :can-drag="true"
rowKey="id" rowKey="id"
:pagination="false" :pagination="ipagination"
:scroll="{x: '100%',y: '50vh'}"> :scroll="{x: '100%',y: '50vh'}"
@change="handleTableChange">
</j-table> </j-table>
</a-spin> </a-spin>
</j-modal> </j-modal>
@@ -37,6 +38,18 @@ export default {
url: { url: {
list: '' list: ''
}, },
/* 分页参数 */
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
},
dataSource: [], dataSource: [],
columns: [ columns: [
{ // 征求意见对象 { // 征求意见对象
@@ -75,9 +88,7 @@ export default {
this.dataSource = [] this.dataSource = []
this.visible = false this.visible = false
}, },
tableOnChange (pagination, filters, sorter) { handleTableChange (pagination) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination this.ipagination = pagination
} }
} }
@@ -22,7 +22,7 @@
:row-selection="null" :row-selection="null"
:pagination="ipagination" :pagination="ipagination"
:scroll="{x: '100%',y: '50vh'}" :scroll="{x: '100%',y: '50vh'}"
@change="tableOnChange"> @change="handleTableChange">
<!-- 整改部门 --> <!-- 整改部门 -->
<template slot="rectificationDepartment" slot-scope="{text, record}"> <template slot="rectificationDepartment" slot-scope="{text, record}">
@@ -143,9 +143,7 @@ export default {
this.index = -1 this.index = -1
this.visible = false this.visible = false
}, },
tableOnChange (pagination, filters, sorter) { handleTableChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination this.ipagination = pagination
}, },
handleAdd () { handleAdd () {
@@ -26,7 +26,7 @@
:row-selection="null" :row-selection="null"
:pagination="ipagination" :pagination="ipagination"
:scroll="{x: '100%',y: '50vh'}" :scroll="{x: '100%',y: '50vh'}"
@change="tableOnChange"> @change="handleTableChange">
<!-- 企标号、企标名称 --> <!-- 企标号、企标名称 -->
<template v-slot:standard="{text, record}"> <template v-slot:standard="{text, record}">
@@ -192,9 +192,7 @@ export default {
} }
}) })
}, },
tableOnChange (pagination, filters, sorter) { handleTableChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination this.ipagination = pagination
}, },
handleAdd () { handleAdd () {
@@ -26,7 +26,7 @@
:row-selection="null" :row-selection="null"
:pagination="ipagination" :pagination="ipagination"
:scroll="{x: '100%',y: '50vh'}" :scroll="{x: '100%',y: '50vh'}"
@change="tableOnChange"> @change="handleTableChange">
<!-- 附件 --> <!-- 附件 -->
<template v-slot:file="{text, record}"> <template v-slot:file="{text, record}">
@@ -175,11 +175,8 @@ export default {
this.$emit('close') this.$emit('close')
this.visible = false this.visible = false
}, },
tableOnChange (pagination, filters, sorter) { handleTableChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination this.ipagination = pagination
this.getTableList()
}, },
handleAdd () { handleAdd () {
this.$refs.modalForm.add(this.model) this.$refs.modalForm.add(this.model)
@@ -13,8 +13,7 @@
:rowKey="(_, index) => index" :rowKey="(_, index) => index"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: '100%',y: '50vh'}" :scroll="{x: '100%',y: '50vh'}">
@change="tableOnChange">
<!-- 企标号、企标名称 --> <!-- 企标号、企标名称 -->
<template v-slot:standard="{text, record}"> <template v-slot:standard="{text, record}">
@@ -316,12 +315,6 @@ export default {
} }
}) })
}, },
tableOnChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination
this.getTableList()
},
// 稽查报告 // 稽查报告
handleInspectionReport (record, index) { handleInspectionReport (record, index) {
this.$refs.inspectionProcessReport.show(record, index) this.$refs.inspectionProcessReport.show(record, index)
@@ -40,7 +40,7 @@
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination" :pagination="ipagination"
:scroll="{x: '100%',y: '50vh'}" :scroll="{x: '100%',y: '50vh'}"
@change="tableOnChange"> @change="handleTableChange">
<!-- 企标号、企标名称 --> <!-- 企标号、企标名称 -->
<template v-slot:standard="{text, record}"> <template v-slot:standard="{text, record}">
<a-tooltip overlay-class-name="tooltip-style"> <a-tooltip overlay-class-name="tooltip-style">
@@ -198,11 +198,8 @@ export default {
} }
}) })
}, },
tableOnChange (pagination, filters, sorter) { handleTableChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination this.ipagination = pagination
this.getTableList()
} }
} }
} }
@@ -13,8 +13,7 @@
rowKey="id" rowKey="id"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: '100%'}" :scroll="{x: '100%'}">
@change="tableOnChange">
<!-- 企标号、企标名称 --> <!-- 企标号、企标名称 -->
<template v-slot:standard="{text, record}"> <template v-slot:standard="{text, record}">
@@ -280,12 +279,6 @@ export default {
} }
}) })
}, },
tableOnChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination
this.getTableList()
},
// 获取向上第n个父节点 // 获取向上第n个父节点
getNumParentNode (el, n) { getNumParentNode (el, n) {
if (n < 1 || el === document.body) { if (n < 1 || el === document.body) {
@@ -15,7 +15,7 @@
:row-selection="null" :row-selection="null"
:pagination="false" :pagination="false"
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
@change="tableOnChange"> @change="handleTableChange">
<!-- 企标号、企标名称 --> <!-- 企标号、企标名称 -->
<template v-slot:standard="{text, record}"> <template v-slot:standard="{text, record}">
@@ -133,11 +133,8 @@ export default {
} }
}) })
}, },
tableOnChange (pagination, filters, sorter) { handleTableChange (pagination, filters, sorter) {
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.ipagination = pagination this.ipagination = pagination
this.getTableList()
}, },
// 获取所有标准号 // 获取所有标准号
getStandardNumbers () { getStandardNumbers () {