Commit 2ecb71f2 authored by 吴冠's avatar 吴冠

分页优化

parent 70b3106b
......@@ -26,7 +26,7 @@ import Cookies from "js-cookie"
export default {
methods:{
toSearch(){
Cookies.set("content",this.input)
Cookies.set("inputContent",this.input)
Cookies.set("contentStatus",1)
if(window.location.pathname !=="/notice/all"){
this.$router.push('/notice/all')
......
......@@ -175,13 +175,13 @@ import {getErrorList} from '@/common/list.js'
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
mess.noticeType = "ABORTIVE"
this.getErrorList(mess)
},
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.size = this.getData.size
mess.noticeType = "ABORTIVE"
mess.currentPage = val
this.getErrorList(mess);
//获取当前页
......@@ -265,7 +265,7 @@ import {getErrorList} from '@/common/list.js'
}
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -75,21 +75,25 @@ import Cookies from 'js-cookie'
Cookies.remove("content")
}, */
async asyncData({params}){
let inputContent = Cookies.get("content")
let inputContent = Cookies.get("inputContent")
console.log(inputContent+'-----------------+++++++++++++++++')
let mes ={
currentPage:1,
size:10,
title:inputContent
}
/* if(inputContent!=''){
mes.title = inputContent
} */
const res = await industryList();
const {data,total} = await getAllList(mes)
console.log(data+'------------')
Cookies.remove("inputContent")
return {
priceList : data,
total : total,
industryOptions:res
}
Cookies.remove("content")
},
data() {
return {
......@@ -193,7 +197,7 @@ import Cookies from 'js-cookie'
if(contentStatus =='1'){
if(total!='0'){
console.log(111111111111111)
/* this.$message.success */alert("查询成功!")
/* this.$message.success */
}else{
console.log(111111111111111111111)
this.$message.error("请输入正确的公告名称!")
......@@ -219,12 +223,10 @@ import Cookies from 'js-cookie'
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
this.getAllList(mess)
},
handleCurrentChange(val) {
let mess = {}
mess.size = this.getData.size
mess.currentPage = val
this.getAllList(mess);
//获取当前页
......@@ -308,7 +310,7 @@ import Cookies from 'js-cookie'
}
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -180,21 +180,15 @@ import citySelect from "@/components/citySelect.vue";
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
console.log(mess.size)
console.log(mess.currentPage)
const {data} =this.getBidingList(mess)
console.log(data+"++++++++++++++++++++++++")
mess.noticeType = "BIDDING"
this.getBidingList(mess)
},
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.size = this.getData.size
mess.currentPage = val
console.log(mess.size)
console.log(mess.currentPage)
const {data} =this.getBidingList(mess)
console.log(data+"++++++++++++++++++++++++")
mess.noticeType = "BIDDING"
this.getBidingList(mess)
//获取当前页
},
dealDisabledDate(time) {
......@@ -276,7 +270,7 @@ import citySelect from "@/components/citySelect.vue";
}
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -234,13 +234,13 @@ export default {
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
mess.noticeType = "WIN"
this.getWinList(mess)
},
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.size = this.getData.size
mess.noticeType = "WIN"
mess.currentPage = val
this.getWinList(mess);
//获取当前页
......@@ -322,7 +322,7 @@ export default {
}
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -177,13 +177,13 @@ import {getCadidateList} from '@/common/list.js'
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
mess.noticeType = "CADIDATE"
this.getCadidateList(mess)
},
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.size = this.getData.size
mess.noticeType = "CADIDATE"
mess.currentPage = val
this.getCadidateList(mess);
//获取当前页
......@@ -267,7 +267,7 @@ import {getCadidateList} from '@/common/list.js'
}
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -177,13 +177,13 @@ import {getChangeList} from '@/common/list.js'
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
mess.noticeType = "CHANGE"
this.getChangeList(mess)
},
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.size = this.getData.size
mess.noticeType = "CHANGE"
mess.currentPage = val
this.getChangeList(mess);
//获取当前页
......@@ -267,7 +267,7 @@ import {getChangeList} from '@/common/list.js'
}
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -175,13 +175,13 @@ import {getClerList} from '@/common/list.js'
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
mess.noticeType = "CLARIFIES"
this.getErrorList(mess)
},
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.size = this.getData.size
mess.noticeType = "CLARIFIES"
mess.currentPage = val
this.getErrorList(mess);
//获取当前页
......@@ -265,7 +265,7 @@ import {getClerList} from '@/common/list.js'
}
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -231,7 +231,8 @@ export default {
handleSizeChange(val) {
let mess = {}
mess.size = val
mess.currentPage = this.getData.currentPage
mess.noticeType = "ENQUIRY"
/* mess.currentPage = this.getData.currentPage */
this.getInquiryList(mess)
/* this.getInquiryList(val,this.getData.currentPage) */
......@@ -239,7 +240,8 @@ export default {
handleCurrentChange(val) {
/* this.getData.currentPage = val */
let mess = {}
mess.size = this.getData.size
mess.noticeType = "ENQUIRY"
/* mess.size = this.getData.size */
mess.currentPage = val
this.getInquiryList(mess);
/* this.getInquiryList(this.getData.size,val) */
......@@ -257,7 +259,7 @@ export default {
<style scoped>
.pagination{
position: absolute;
bottom: -1%;
bottom: -2%;
left: 55%;
transform:translateX(-50%);
}
......
......@@ -15,10 +15,10 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
let token=Cookies.get("token")
/* let token=Cookies.get("token")
if(token||token!=="undefined"){
config.headers['token']=token;
}
}*/
// if (store.getters.token) {
// let test = config.data;
// if(test){
......
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