Commit c7d7fdcf authored by yht15023815643's avatar yht15023815643

代码迁移、翻页

parent a4b6e2e6
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<template v-if="activeIndex==0"> <template v-if="activeIndex==0">
<span class="count">{{ total+otherTotal }}</span><el-popover style="margin-left:8px;position: relative;top: 2px;color:#515a6e;" trigger="hover" content="央企集团数据包含国资委及财政部公示的央企名录。" placement="right"><i slot="reference" class="el-icon-warning-outline"></i></el-popover> <span class="count">{{ total+otherTotal }}</span><el-popover style="margin-left:8px;position: relative;top: 2px;color:#515a6e;" trigger="hover" content="央企集团数据包含国资委及财政部公示的央企名录。" placement="right"><i slot="reference" class="el-icon-warning-outline"></i></el-popover>
<div > <div >
<h3 style="margin-top:10px;"><b>央企 {{ total }}</b></h3> <div style="margin-top:10px;" class="count1" >央企<span> {{ total }}</span></div>
<div class="infinite-list-item" v-for="(item,index) in companData" @click="selCompany(item)" :key="index"> <div class="infinite-list-item" v-for="(item,index) in companData" @click="selCompany(item)" :key="index">
<img v-if="item.logoUrl" :src="item.logoUrl" alt="" > <img v-if="item.logoUrl" :src="item.logoUrl" alt="" >
<div v-else class="logo" :style="{background:colors[index%5]}">{{ item.combineMemberName.slice(0,4) }}</div> <div v-else class="logo" :style="{background:colors[index%5]}">{{ item.combineMemberName.slice(0,4) }}</div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</div> </div>
</div> </div>
<div > <div >
<h3 style="margin-top:10px;"><b>其他央企 {{ otherTotal }}</b></h3> <div style="margin-top:10px;" class="count1" >其他央企<span> {{ otherTotal }}</span></div>
<div class="infinite-list-item" v-for="(item,index) in otherCompanData" @click="selCompany(item)" :key="index"> <div class="infinite-list-item" v-for="(item,index) in otherCompanData" @click="selCompany(item)" :key="index">
<img v-if="item.logoUrl" :src="item.logoUrl" alt="" > <img v-if="item.logoUrl" :src="item.logoUrl" alt="" >
<div v-else class="logo" :style="{background:colors[index%5]}">{{ item.combineMemberName.slice(0,4) }}</div> <div v-else class="logo" :style="{background:colors[index%5]}">{{ item.combineMemberName.slice(0,4) }}</div>
......
...@@ -514,7 +514,6 @@ ...@@ -514,7 +514,6 @@
expandTrigger: "hover", expandTrigger: "hover",
value: "id", value: "id",
}, },
pageSize: 20,
dialogVisible2:false, dialogVisible2:false,
jskBidQueryDto: { jskBidQueryDto: {
provinceIds: [], provinceIds: [],
...@@ -578,7 +577,7 @@ ...@@ -578,7 +577,7 @@
tableData:[], tableData:[],
total:0, total:0,
pageNum:1, pageNum:1,
pageSize:20 pageSize:50
}; };
}, },
computed: { computed: {
...@@ -908,7 +907,7 @@ ...@@ -908,7 +907,7 @@
this.pageNum = 1; this.pageNum = 1;
} }
if (!pageSize) { if (!pageSize) {
this.pageSize = 20; this.pageSize = 50;
} }
if (!pageNum && !pageSize) { if (!pageNum && !pageSize) {
this.reloadPage(); this.reloadPage();
...@@ -967,13 +966,9 @@ ...@@ -967,13 +966,9 @@
} }
this.isSkeleton = true; this.isSkeleton = true;
api.uipSerach(params).then(res=>{ api.uipSerach(params).then(res=>{
this.isSkeleton = false this.isSkeleton = false
// console.log(res) this.tableData=res.rows;
if (res.code==200) { this.total=res.total;
this.tableData=res.rows;
this.total=res.total;
}
}).catch(error=>{ }).catch(error=>{
}); });
......
...@@ -171,14 +171,14 @@ ...@@ -171,14 +171,14 @@
</li> </li>
</ul> </ul>
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="limit" :page-size="limit"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -488,8 +488,13 @@ export default { ...@@ -488,8 +488,13 @@ export default {
}); });
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
this.page = page; if(page>500){
this.search(page, this.limit); this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
}
}, },
handleSizeChange(limit) { handleSizeChange(limit) {
this.limit = limit; this.limit = limit;
......
...@@ -286,14 +286,14 @@ ...@@ -286,14 +286,14 @@
</li> </li>
</ul> </ul>
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="limit" :page-size="limit"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -611,8 +611,13 @@ export default { ...@@ -611,8 +611,13 @@ export default {
}); });
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
this.page = page; if(page>500){
this.search(page, this.limit); this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
}
}, },
handleSizeChange(limit) { handleSizeChange(limit) {
this.limit = limit; this.limit = limit;
......
...@@ -253,14 +253,14 @@ ...@@ -253,14 +253,14 @@
</li> </li>
</ul> </ul>
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="limit" :page-size="limit"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -593,8 +593,14 @@ ...@@ -593,8 +593,14 @@
}); });
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page; this.page = page;
this.search(page, this.limit); this.search(page, this.limit);
this.jump1();
}
}, },
fieldCommand(command) { fieldCommand(command) {
this.field = command; this.field = command;
......
...@@ -291,14 +291,14 @@ ...@@ -291,14 +291,14 @@
</div> </div>
</li> </li>
</ul> </ul>
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="pageSize" :page-size="pageSize"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -640,8 +640,14 @@ ...@@ -640,8 +640,14 @@
}); });
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page; this.page = page;
this.search(page, this.limit); this.search(page, this.limit);
this.jump1();
}
}, },
handleSizeChange(limit) { handleSizeChange(limit) {
this.limit = limit; this.limit = limit;
......
...@@ -222,14 +222,14 @@ ...@@ -222,14 +222,14 @@
</div> </div>
</li> </li>
</ul> </ul>
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="limit" :page-size="limit"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -494,8 +494,13 @@ export default { ...@@ -494,8 +494,13 @@ export default {
}); });
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
this.page = page; if(page>500){
this.search(page, this.limit); this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
}
}, },
handleSizeChange(limit) { handleSizeChange(limit) {
this.limit = limit; this.limit = limit;
......
...@@ -270,14 +270,14 @@ ...@@ -270,14 +270,14 @@
</div> </div>
</li> </li>
</ul> </ul>
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="limit" :page-size="limit"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -839,8 +839,14 @@ ...@@ -839,8 +839,14 @@
}); });
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page; this.page = page;
this.search(page, this.limit); this.search(page, this.limit);
this.jump1();
}
}, },
handleSizeChange(limit) { handleSizeChange(limit) {
this.limit = limit; this.limit = limit;
......
...@@ -468,14 +468,14 @@ ...@@ -468,14 +468,14 @@
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="pageSize" :page-size="pageSize"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -1522,10 +1522,15 @@ ...@@ -1522,10 +1522,15 @@
this.selectedHeights = this.selectedHeights ? false : true this.selectedHeights = this.selectedHeights ? false : true
}, },
handleCurrentChange(e){ handleCurrentChange(page) {
this.page = e; if(page>500){
this.jump1(); this.$message.warning(`对不起,最多只能访问500页`);
this.search(e, this.limit); this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
this.jump1();
}
}, },
handleSizeChange(e){ handleSizeChange(e){
this.limit = e; this.limit = e;
......
...@@ -165,14 +165,14 @@ ...@@ -165,14 +165,14 @@
</li> </li>
</ul> </ul>
<template v-if="pageFlag"> <template v-if="pageFlag">
<div class="pagination clearfix" v-show="total>0"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination <el-pagination
background background
:page-size="pageSize" :page-size="pageSize"
:current-page="page" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
...@@ -446,8 +446,14 @@ ...@@ -446,8 +446,14 @@
}); });
}, },
handleCurrentChange(page) { handleCurrentChange(page) {
this.page = page; if(page>500){
this.search(page, this.limit); this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
this.jump1();
}
}, },
search(page, limit,exportFlag) { search(page, limit,exportFlag) {
if (!page) { if (!page) {
......
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