Commit 42ec3580 by xionglin

分页bug修改

parent f50b8f93
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
// paging // paging
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
total: 0, totals: 0,
}, },
} }
}, },
......
...@@ -65,25 +65,26 @@ ...@@ -65,25 +65,26 @@
</el-button> </el-button>
</c-col> </c-col>
</c-col> </c-col>
<c-col :span="24">
<c-paging-table <c-col :span="24" style="">
:data="oitData" <el-table :data="oitData" :columns="oitColumns" style="width:100%">
:columns="oitColumns" <el-table-column
:pageNumber="model.pageNum" v-for="(item, key) in oitColumns"
:pageSize="model.pageSize" :key="key"
:total="model.total" :label="item.label"
v-on:queryFunc="queryFunc" :prop="item.prop"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="oitInfo(scope.$index, scope.row)"
>详情</c-button
> >
<c-button
</el-table-column>
<el-table-column fixed="right" prop="op" label="操作" width="140px">
<template slot="header">
<c-col :span="11" style="text-align:center"><span>操作</span></c-col>
</template>
<template slot-scope="scope">
<c-button style="margin-left: 0" size="small" @click="oitInfo(scope.$index, scope.row)">
详情
</c-button>
<c-button
style="margin-left: 5px" style="margin-left: 5px"
size="small" size="small"
type="primary" type="primary"
...@@ -96,27 +97,20 @@ ...@@ -96,27 +97,20 @@
@click="oitDelete(scope.$index, scope.row)" @click="oitDelete(scope.$index, scope.row)"
>删除</c-button >删除</c-button
> >
<el-popover placement="top-start" width="50" trigger="click"> </template>
<ul class="table-button-item-list"> </el-table-column>
<li> </el-table>
<c-button size="small" style="margin-left: 0">指派</c-button> <el-pagination
</li> @size-change="handleSizeChange"
<li> @current-change="handleCurrentChange"
<c-button size="small" style="margin-left: 0">删除</c-button> :current-page.sync="model.pageNum"
</li> :page-sizes="[5,10, 20, 50, 100, 500]"
</ul> :page-size="model.pageSize"
<a layout="total, sizes, prev, pager, next, jumper"
slot="reference" :total="model.totals">
href="javascript:void(0)" </el-pagination>
style="margin-left: 5px" </c-col>
>
<i class="el-icon-more"></i>
</a>
</el-popover>
</template>
</c-table-column>
</c-paging-table>
</c-col>
</div> </div>
</template> </template>
...@@ -137,11 +131,11 @@ export default { ...@@ -137,11 +131,11 @@ export default {
prop: 'objtypCn', prop: 'objtypCn',
width: '120', width: '120',
}, },
{ label: 'Key', prop: 'ownref', width: '120' }, { label: 'Key', prop: 'ownref' },
{ label: 'Name', prop: 'nam', width: '120' }, { label: 'Name', prop: 'nam' },
{ label: '提示类型', prop: 'subtypCn', width: '120' }, { label: '提示类型', prop: 'subtypCn'},
{ label: '相关业务品种', prop: 'subbus', width: '150' }, { label: '相关业务品种', prop: 'subbus'},
{ label: '提示信息级别', prop: 'inflevCn', width: '200' }, { label: '提示信息级别', prop: 'inflevCn' },
], ],
} }
}, },
...@@ -195,13 +189,19 @@ export default { ...@@ -195,13 +189,19 @@ export default {
this.oitData = list this.oitData = list
this.model.pageNum = res.pageNumber this.model.pageNum = res.pageNumber
this.model.pageSize = res.pageSize this.model.pageSize = res.pageSize
this.model.total = res.total this.model.totals= parseInt(res.total)
}) })
}, },
queryFunc(pageNumber, pageSize) { // pageSize改变
this.model.pageNum = pageNumber handleSizeChange(val) {
this.model.pageSize = pageSize this.model.pageNum = 1;
this.onInfOitSearch() this.model.pageSize = val;
this.onInfOitSearch();
},
// 页码改变
handleCurrentChange(val) {
this.model.pageNum = val;
this.onInfOitSearch();
}, },
getCodesByKey(key) { getCodesByKey(key) {
return codes[key] ?? [] return codes[key] ?? []
......
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