Commit c06eb519 by yangxiaolei

加上分页

parent 8ec19730
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-box">
<el-pagination <el-pagination
style="margin-right: 30px;" style="margin-right: 30px;"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -74,12 +73,10 @@ ...@@ -74,12 +73,10 @@
:current-page.sync="pagination.pageIndex" :current-page.sync="pagination.pageIndex"
:page-sizes="[10, 20, 50, 100, 500]" :page-sizes="[10, 20, 50, 100, 500]"
:page-size="pagination.pageSize" :page-size="pagination.pageSize"
layout="sizes, prev, pager, next"
:total="pagination.total"> :total="pagination.total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div>
<el-dialog title="节假日导入" :visible.sync="importDialog" class="eContainer-dialog" center> <el-dialog title="节假日导入" :visible.sync="importDialog" class="eContainer-dialog" center>
<el-form ref="importForm" label-position="left" label-width="150px" size="small"> <el-form ref="importForm" label-position="left" label-width="150px" size="small">
<el-upload name="upload" ref="upload" action="abc" :auto-upload="true" :http-request="httpRequest" :limit="1" <el-upload name="upload" ref="upload" action="abc" :auto-upload="true" :http-request="httpRequest" :limit="1"
...@@ -106,6 +103,7 @@ ...@@ -106,6 +103,7 @@
} from "~/utils/format"; } from "~/utils/format";
import OperateParams from "../model/OperateParams" import OperateParams from "../model/OperateParams"
import CodeTable from "~/config/CodeTable"; import CodeTable from "~/config/CodeTable";
import commonFunctions from '~/mixin/commonFunctions.js';
// import { // import {
// insertParaApv, // insertParaApv,
// importParaApvFile // importParaApvFile
...@@ -113,6 +111,7 @@ ...@@ -113,6 +111,7 @@
export default { export default {
name:"holiday", name:"holiday",
mixins: [commonFunctions],
components: { components: {
'm-currency-list': CurrencyList 'm-currency-list': CurrencyList
}, },
...@@ -129,7 +128,7 @@ ...@@ -129,7 +128,7 @@
//以key-value形式存储数据 发送文件 //以key-value形式存储数据 发送文件
formData: new FormData(), formData: new FormData(),
//文件上传进度显示 //文件上传进度显示
loading: false,
fileName: "", fileName: "",
columnsConfig: [{ columnsConfig: [{
type: 'selection', type: 'selection',
...@@ -193,12 +192,14 @@ ...@@ -193,12 +192,14 @@
this.handleSearch(); this.handleSearch();
}, },
async getList(){ async getList(){
const loading = this.loading();
const res = await this.$Api.post('/service/hol/list', { const res = await this.$Api.post('/service/hol/list', {
...this.searchParams ...this.searchParams
}); });
if (res.data && res.data.length) { if (res.respCode === "AAAAAA") {
loading.close()
this.tableData = res.data this.tableData = res.data
this.pagination.total = res.data.length this.pagination.total = Number(res.data.length)
} }
}, },
httpRequest(params) { httpRequest(params) {
...@@ -264,9 +265,10 @@ ...@@ -264,9 +265,10 @@
this.holidayList = [] this.holidayList = []
this.searchParams = { this.searchParams = {
pageNum: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
...params.data ...params.data
} }
console.log("this.searchParams=>",this.searchParams)
this.getList() this.getList()
}, },
handleReset() { handleReset() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment