Commit 6dcb10e9 authored by 王's avatar

分页添加size选项

parent 18496680
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<class-dialog :dialogObj="dialogObj" @reflash="onReflash"></class-dialog> <class-dialog :dialogObj="dialogObj" @reflash="onReflash"></class-dialog>
<user-list :userObj="userObj" @reflash="getClassList"/> <user-list :userObj="userObj" @reflash="getClassList"/>
</div> </div>
...@@ -307,6 +307,11 @@ ...@@ -307,6 +307,11 @@
this.nowPage = val; this.nowPage = val;
this.getClassList(); this.getClassList();
}, },
onSizeChange(val){
this.limit = val;
this.nowPage = 1;
this.getClassList();
},
onReflash(periods){ onReflash(periods){
this.periods = periods; this.periods = periods;
this.selectedGoods = [periods.goods_id, periods.id]; this.selectedGoods = [periods.goods_id, periods.id];
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
label="手机号"> label="手机号">
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="addShow = false">取 消</el-button> <el-button @click="addShow = false">取 消</el-button>
<el-button type="primary" @click="onAdd">确 定</el-button> <el-button type="primary" @click="onAdd">确 定</el-button>
...@@ -431,6 +431,11 @@ ...@@ -431,6 +431,11 @@
this.nowPage = val this.nowPage = val
this.getUser() this.getUser()
}, },
onSizeChange(val){
this.limit = val
this.nowPage = 1;
this.getUser()
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
......
<template> <template>
<div class="page-div"> <div class="page-div">
<el-pagination <el-pagination
@size-change="handleSizeChange"
:page-sizes="[5, 10, 20, 30, 40, 50, 60, 80, 100]"
:page-size="limit" :page-size="limit"
:current-page.sync="nowPage" :current-page.sync="nowPage"
layout="total , prev, pager, next, jumper" layout="total , sizes, prev, pager, next, jumper"
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -29,6 +31,12 @@ ...@@ -29,6 +31,12 @@
nowPage(value){ nowPage(value){
this.$emit("pageChange", value); this.$emit("pageChange", value);
} }
},
methods: {
handleSizeChange(val) {
this.$emit('sizeChange', val);
this.nowPage = 1
},
} }
} }
</script> </script>
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<el-dialog title="新建群发消息" <el-dialog title="新建群发消息"
:visible.sync="show"> :visible.sync="show">
<el-form ref="searchFrom" :model="searchFrom" label-width="150px"> <el-form ref="searchFrom" :model="searchFrom" label-width="150px">
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
label="手机号"> label="手机号">
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="userDialog.total" :limit="userDialog.limit" @pageChange="onUserPageChange"/> <page :total="userDialog.total" :limit="userDialog.limit" @pageChange="onUserPageChange" @sizeChange="onSizeChange"/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="userDialog.show = false">取 消</el-button> <el-button @click="userDialog.show = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button> <el-button type="primary" @click="onConfirm">确 定</el-button>
...@@ -450,6 +450,11 @@ ...@@ -450,6 +450,11 @@
this.nowPage = val this.nowPage = val
this.getMsgList() this.getMsgList()
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getMsgList()
},
getMsgResult(id){ getMsgResult(id){
if(!id) return; if(!id) return;
let json = { let json = {
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-com v-if="dialogObj.show" :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com v-if="dialogObj.show" :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
</div> </div>
</template> </template>
...@@ -114,6 +114,11 @@ ...@@ -114,6 +114,11 @@
this.nowPage = val this.nowPage = val
this.getUser() this.getUser()
}, },
onSizeChange(val){
this.limit = val
this.nowPage = 1
this.getUser()
},
getUser(){ getUser(){
this.searchFrom.page = this.nowPage; this.searchFrom.page = this.nowPage;
let json = { let json = {
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
<address-dialog v-if="dialogObj.show" :dialogObj="dialogObj" @reflash="onUpdateAddress"></address-dialog> <address-dialog v-if="dialogObj.show" :dialogObj="dialogObj" @reflash="onUpdateAddress"></address-dialog>
<refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog> <refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/> <detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<el-dialog <el-dialog
title="编辑备注" title="编辑备注"
center center
...@@ -358,6 +358,11 @@ ...@@ -358,6 +358,11 @@
this.nowPage = val this.nowPage = val
this.getOrderList() this.getOrderList()
}, },
onSizeChange(val){
this.limit = val;
this.nowPage = 1;
this.getOrderList()
},
getOrderList(){ getOrderList(){
let json = { let json = {
limit: this.limit, limit: this.limit,
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<new-dialog v-if="newDialog.show" :dialogObj="newDialog" @reflash="onSave" @changeShow="changeShow"></new-dialog> <new-dialog v-if="newDialog.show" :dialogObj="newDialog" @reflash="onSave" @changeShow="changeShow"></new-dialog>
</div> </div>
</template> </template>
...@@ -259,6 +259,11 @@ ...@@ -259,6 +259,11 @@
this.nowPage = val this.nowPage = val
this.onSearch() this.onSearch()
}, },
onSizeChange(val){
this.limit = val
this.nowPage = 1;
this.onSearch()
},
onSearch(){ onSearch(){
let json={ let json={
limit: this.limit, limit: this.limit,
......
/**
* Created by wang on 18/10/31.
*/
<template>
<div class="index">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px">
<el-row>
<el-col :span="10">
<el-form-item label="购买时间">
<el-date-picker
v-model="searchFrom.time"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00','23:59:59']">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="来源">
<el-input v-model="searchFrom.source" placeholder="名称"
size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" plain size="small" @click="initPage">
搜索
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="id"
label="id">
</el-table-column>
<el-table-column
prop="nickname"
label="宝贝名称">
</el-table-column>
<el-table-column
prop="宝贝年龄"
label="age">
</el-table-column>
<el-table-column
prop="address"
sortable
label="城市">
</el-table-column>
<el-table-column
prop="source"
sortable
label="来源">
</el-table-column>
</el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/>
</div>
</template>
<script>
import page from '../framework/page'
import CommonJs from '../../util/common';
export default {
name: "index",
components:{
page
},
data(){
return {
total:0,
nowPage:1,
limit: 10,
searchFrom: {
source:''
},
tableData:[],
}
},
created(){
this.initPage()
},
methods:{
initPage(){
let json = {
limit: this.limit,
page: this.nowPage
}
if (this.searchFrom.time) {
json.time = this.searchFrom.time
}
if (this.searchFrom.source) {
json.source = this.searchFrom.source
}
if(this.searchFrom.time && this.searchFrom.time.length > 0){
json.pay_start_at = CommonJs.dateFmt(this.searchFrom.time[0],"yyyy-MM-dd hh:mm:ss");
json.pay_end_at = CommonJs.dateFmt(this.searchFrom.time[1],"yyyy-MM-dd hh:mm:ss")
}
this.tableData = [
{
id: 1,
nickname: 'xiaoming',
age: '3',
mobile: 17326578909,
address: '上海',
source: 'fff_123'
}
]
},
onPageChange(val){
this.nowPage = val
this.initPage()
},
changeShow() {
}
}
}
</script>
<style scoped lang="less">
.index {
padding: 20px 0;
}
</style>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<el-dialog :title="dialogTitle" v-if="showDialog" :visible.sync="showDialog"> <el-dialog :title="dialogTitle" v-if="showDialog" :visible.sync="showDialog">
<el-form ref="saveuser" :model="nowObj" label-width="70px"> <el-form ref="saveuser" :model="nowObj" label-width="70px">
<el-form-item label="订单状态" v-if="!showDesc"> <el-form-item label="订单状态" v-if="!showDesc">
...@@ -208,6 +208,11 @@ ...@@ -208,6 +208,11 @@
onPageChange(val){ onPageChange(val){
this.nowPage = val; this.nowPage = val;
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getList()
},
//获取列表 //获取列表
getList:function () { getList:function () {
let json = { let json = {
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-div v-if="newObj.show" :newObj="newObj" @initPage="initPage" @changeShow="changeShow"></dialog-div> <dialog-div v-if="newObj.show" :newObj="newObj" @initPage="initPage" @changeShow="changeShow"></dialog-div>
</div> </div>
</template> </template>
...@@ -189,6 +189,11 @@ ...@@ -189,6 +189,11 @@
this.nowPage = val this.nowPage = val
this.initPage() this.initPage()
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.initPage()
},
initPage(){ initPage(){
let json = { let json = {
limit: this.limit, limit: this.limit,
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
...@@ -178,6 +178,11 @@ ...@@ -178,6 +178,11 @@
this.nowPage = val this.nowPage = val
this.getRefundList() this.getRefundList()
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getRefundList()
},
getRefundList(){ getRefundList(){
let json = { let json = {
limit: this.limit, limit: this.limit,
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
<el-dialog <el-dialog
:title="chooseDialog.title" :title="chooseDialog.title"
...@@ -243,6 +243,11 @@ ...@@ -243,6 +243,11 @@
this.nowPage = val; this.nowPage = val;
this.getUser() this.getUser()
}, },
onSizeChange(val){
this.limit = val;
this.nowPage = 1;
this.getUser()
},
copyShop(data){ copyShop(data){
this.$confirm('此操作将复制该商品?', '提示', { this.$confirm('此操作将复制该商品?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="initPage"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="initPage"/>
</div> </div>
</template> </template>
...@@ -120,6 +120,11 @@ ...@@ -120,6 +120,11 @@
this.nowPage = val this.nowPage = val
this.initPage() this.initPage()
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.initPage()
},
changeShow() { changeShow() {
}, },
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<el-dialog <el-dialog
:title="dialog.title" :title="dialog.title"
center center
...@@ -251,6 +251,11 @@ ...@@ -251,6 +251,11 @@
this.nowPage = val this.nowPage = val
this.getList() this.getList()
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getList()
},
getList(){ getList(){
let json = { let json = {
limit: this.limit, limit: this.limit,
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
label="创建时间"> label="创建时间">
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
...@@ -116,6 +116,11 @@ ...@@ -116,6 +116,11 @@
onPageChange(val){ onPageChange(val){
this.nowPage = val; this.nowPage = val;
this.getList(); this.getList();
},
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getList();
} }
} }
} }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<el-dialog <el-dialog
:title="dialog.title" :title="dialog.title"
center center
...@@ -136,6 +136,11 @@ ...@@ -136,6 +136,11 @@
this.nowPage = val; this.nowPage = val;
this.getList() this.getList()
}, },
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getList()
},
getList(){ getList(){
this.loading = true; this.loading = true;
let json = { let json = {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<el-dialog <el-dialog
:title="dialog.title" :title="dialog.title"
center center
...@@ -128,6 +128,11 @@ ...@@ -128,6 +128,11 @@
this.nowPage = val; this.nowPage = val;
this.getList(); this.getList();
}, },
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getList();
},
getList(){ getList(){
let json = { let json = {
limit: this.limit, limit: this.limit,
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getList"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getList"/>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
...@@ -101,6 +101,11 @@ ...@@ -101,6 +101,11 @@
this.nowPage = val; this.nowPage = val;
this.getList(); this.getList();
}, },
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getList();
},
add(){ add(){
this.dialogObj.id = ''; this.dialogObj.id = '';
this.dialogObj.key= ''; this.dialogObj.key= '';
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
</div> </div>
</template> </template>
...@@ -146,6 +146,11 @@ ...@@ -146,6 +146,11 @@
this.nowPage = val this.nowPage = val
this.getUser() this.getUser()
}, },
onSizeChange(val){
this.limit = val
this.nowPage = 1;
this.getUser()
},
getUser(){ getUser(){
let json = { let json = {
limit: this.limit, limit: this.limit,
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<user-list :userObj="userObj" @reflash="getTeacherDetail"/> <user-list :userObj="userObj" @reflash="getTeacherDetail"/>
</div> </div>
</template> </template>
...@@ -174,6 +174,11 @@ import UserList from '../class/userList' ...@@ -174,6 +174,11 @@ import UserList from '../class/userList'
this.nowPage = val this.nowPage = val
this.getTeacherDetail() this.getTeacherDetail()
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val;
this.getTeacherDetail()
},
getTeacherDetail(){ getTeacherDetail(){
let id = this.id; let id = this.id;
let json = { let json = {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeShow"/> <detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeShow"/>
<teacher-dialog :dialogObj="dialogObj" @reflash="getUser"></teacher-dialog> <teacher-dialog :dialogObj="dialogObj" @reflash="getUser"></teacher-dialog>
</div> </div>
...@@ -116,6 +116,11 @@ ...@@ -116,6 +116,11 @@
this.nowPage = val this.nowPage = val
this.getUser() this.getUser()
}, },
onSizeChange(val){
this.limit = val;
this.nowPage = 1;
this.getUser()
},
getUser(){ getUser(){
let json = { let json = {
page: this.nowPage, page: this.nowPage,
......
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
label="下单时间"> label="下单时间">
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<teacher-dialog :dialogObj="dialogObj" @reflash="getDetail"></teacher-dialog> <teacher-dialog :dialogObj="dialogObj" @reflash="getDetail"></teacher-dialog>
<user-list :userObj="userObj"/> <user-list :userObj="userObj"/>
</div> </div>
...@@ -324,6 +324,11 @@ ...@@ -324,6 +324,11 @@
this.nowPage = val; this.nowPage = val;
this.getUser(); this.getUser();
}, },
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getUser();
},
getUser(){ getUser(){
let json = { let json = {
user_id: this.id, user_id: this.id,
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
<template v-if="type==='video'"> <template v-if="type==='video'">
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
<template v-if="type==='voice'"> <template v-if="type==='voice'">
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
<template v-if="type==='news'"> <template v-if="type==='news'">
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
<template v-if="type==='link'"> <template v-if="type==='link'">
...@@ -529,6 +529,11 @@ ...@@ -529,6 +529,11 @@
this.nowPage = val this.nowPage = val
this.getMediaList(this.type) this.getMediaList(this.type)
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getMediaList(this.type)
},
onChangeTab(type){ onChangeTab(type){
this.type = type; this.type = type;
}, },
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</div> </div>
<div class="img-action" v-if="type === 'news'"> <div class="img-action" v-if="type === 'news'">
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page2 :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page2 :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</div> </div>
<div class="img-action" v-if="type === 'video'" style="text-align: left"> <div class="img-action" v-if="type === 'video'" style="text-align: left">
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page3 :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page3 :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</div> </div>
<div class="img-action" v-if="type === 'voice'" style="text-align: left"> <div class="img-action" v-if="type === 'voice'" style="text-align: left">
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page4 :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange"/> <page4 :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</div> </div>
<div class="inner-emotion_editor" v-else-if="type === 'text'"> <div class="inner-emotion_editor" v-else-if="type === 'text'">
...@@ -473,6 +473,11 @@ ...@@ -473,6 +473,11 @@
this.nowPage = val this.nowPage = val
this.getMediaList(this.type) this.getMediaList(this.type)
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getMediaList(this.type)
},
getMediaList(type){ getMediaList(type){
let json = { let json = {
type: type, type: type,
......
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" v-if="showMedia && mediaList.length > 0"/> <page :total="total" v-model="nowPage" :limit="limit" @pageChange="onPageChange" v-if="showMedia && mediaList.length > 0" @sizeChange="onSizeChange"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -606,7 +606,7 @@ ...@@ -606,7 +606,7 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<page2 :total="total" v-model="nowPage" :limit="limit" @pageChange="onSubPageChange" v-if="showMedia && mediaList.length > 0"/> <page2 :total="total" v-model="nowPage" :limit="limit" @pageChange="onSubPageChange" v-if="showMedia && mediaList.length > 0" @sizeChange="onSubSizeChange"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -937,6 +937,16 @@ ...@@ -937,6 +937,16 @@
this.nowPage = val this.nowPage = val
this.getMediaList(this.buttonList[this.selectedIndex].sub_button[this.selectedChildIndex].media_info.type) this.getMediaList(this.buttonList[this.selectedIndex].sub_button[this.selectedChildIndex].media_info.type)
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getMediaList(this.buttonList[this.selectedIndex].media_info.type)
},
onSubSizeChange(val){
this.nowPage = 1
this.limit = val
this.getMediaList(this.buttonList[this.selectedIndex].sub_button[this.selectedChildIndex].media_info.type)
},
getMediaList(type){ getMediaList(type){
let json = { let json = {
type: type, type: type,
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</el-card> </el-card>
</div> </div>
</div> </div>
<page v-if="mediaList.length > 0 && type === 'news'" :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page v-if="mediaList.length > 0 && type === 'news'" :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<div v-if="mediaList.length > 0 && type !== 'news'"> <div v-if="mediaList.length > 0 && type !== 'news'">
<el-table <el-table
:data="mediaList" :data="mediaList"
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -161,6 +161,11 @@ ...@@ -161,6 +161,11 @@
this.nowPage = val this.nowPage = val
this.getMediaList(this.type) this.getMediaList(this.type)
}, },
onSizeChange(val){
this.nowPage = 1
this.limit = val
this.getMediaList(this.type)
},
getMediaList(type){ getMediaList(type){
let json = { let json = {
type: type, type: type,
......
...@@ -29,6 +29,14 @@ const router =new Router({ ...@@ -29,6 +29,14 @@ const router =new Router({
skip_auth:true, skip_auth:true,
} }
}, },
{
path:'/outManager',
name:'outManager',
component: e=>require(['@/components/promotion'],e),
meta:{
skip_auth:true,
}
},
{ {
path:'/preview/:id', path:'/preview/:id',
name:'preview', name:'preview',
......
...@@ -210,7 +210,7 @@ export function fetch(url,params={}){ ...@@ -210,7 +210,7 @@ export function fetch(url,params={}){
name:'login'//从哪个页面跳转 name:'login'//从哪个页面跳转
}) })
}else if(response.data.code === 503){ }else if(response.data.code === 503){
Message.error('请勿平凡操作') Message.error('请勿频繁操作')
}else{ }else{
Message.error(response.data.msg) Message.error(response.data.msg)
} }
......
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