Commit bb42032c by caoyanzhi

fix: 修复实物礼品、虚拟礼品列表没有分页控件的bug

parent 3d8fdc91
......@@ -94,6 +94,8 @@ export default {
},
visible() {
let routes = [ '/gic-card/list', '/card-package/list', '/gift-manage/real-gift', '/gift-manage/virtual-gift' ];
// 因为会挡住分页控件,ui考虑之后决定砍掉本控件
routes = [];
return routes.some(i => i.indexOf(this.$route.path) > -1);
}
},
......
......@@ -9,6 +9,7 @@ export const page = {
this.getTableList();
},
handleSizeChange(val) {
this.listParams.currentPage = 1;
this.listParams.pageSize = val;
this.getTableList();
},
......
......@@ -174,11 +174,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination-conteiner" style="background:#fff;" v-show="total > 0">
<div class="pagination">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="query.pageSize" layout="total, sizes, prev, pager, next" :total="total" v-if="total != 0"> </dm-pagination>
</div>
</div>
<dm-pagination style="text-align: right" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="query.pageSize" layout="total, sizes, prev, pager, next" :total="total"> </dm-pagination>
</div>
</div>
</div>
......@@ -321,15 +317,16 @@ export default {
this.tableData.forEach(item =>{
this.$set(item, 'visible', false);
});
this.total = res.result.totalCount;
}).finally(() => this.loading = false);
},
handleSizeChange(value){
this.query.currentPage = 1;
this.query.pageSize = value;
this.getTableList();
},
handleCurrentChange(value){
this.query.currentPage = value;
this.query.pageSize = 1;
this.getTableList();
},
// 展开与收起
......
......@@ -178,11 +178,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination-conteiner" style="background:#fff;" v-show="total > 0">
<div class="pagination">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="query.pageSize" layout="total, sizes, prev, pager, next" :total="total" v-if="total != 0"> </dm-pagination>
</div>
</div>
<dm-pagination style="text-align: right" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="query.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="query.pageSize" layout="total, sizes, prev, pager, next" :total="total"> </dm-pagination>
</div>
</div>
</div>
......@@ -348,15 +344,16 @@ export default {
this.tableData.forEach(item =>{
this.$set(item, 'visible', false);
});
this.total = res.result.totalCount;
}).finally(() => this.loading = false);
},
handleSizeChange(value){
this.query.currentPage = 1;
this.query.pageSize = value;
this.getTableList();
},
handleCurrentChange(value){
this.query.currentPage = value;
this.query.pageSize = 1;
this.getTableList();
},
closeUploadDetail(){
......
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