分页缓存

dev_2022-05-11
yujialong 3 years ago
parent d3c8999921
commit 91033ece9d
  1. 19
      src/pages/achievement/list/index.vue
  2. 5
      src/pages/assessment/list/index.vue
  3. 3
      src/pages/course/list/courseManagement/index.vue
  4. 3
      src/pages/information/contentManage/contentList.vue
  5. 3
      src/pages/match/list/index.vue
  6. 2
      src/pages/project/add/index.vue
  7. 37
      src/pages/project/list/index.vue

@ -141,7 +141,7 @@ export default {
}
],
date: "",
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
loadIns: null
@ -248,7 +248,13 @@ export default {
});
},
perChange(val) {
this.$router.push(`list?per=${val}`)
this.$router.push({
path: 'list',
query: {
...this.$route.query,
per: val
}
})
this.getData()
},
initData() {
@ -317,7 +323,14 @@ export default {
this.multipleSelection = val;
},
handleCurrentChange(val) { //
this.page = val;
this.page = val
this.$router.push({
path: 'list',
query: {
...this.$route.query,
page: val
}
})
this.getData();
}
}

@ -180,7 +180,7 @@ export default {
endTime: "",
month: ""
},
pageNum: 1, //
pageNum: +this.$route.query.page || 1, //
pageSize: 10, // 10
total: 0, //
listData: [], //
@ -422,7 +422,8 @@ export default {
this.getData();
},
handleCurrentChange(val) {
this.pageNum = val;
this.pageNum = val
this.$router.push(`list?page=${val}`)
this.sss = 0
this.getData();
},

@ -85,7 +85,7 @@ export default {
courseData: [],
multipleSelection: [],
classificationList: [],
current: 1, //
current: +this.$route.query.page || 1, //
pageSize: 10,
totals: 0
};
@ -195,6 +195,7 @@ export default {
},
handleCurrentChange(val) {
this.current = val;
this.$router.push(`list?page=${val}`)
this.getData();
},
switchOff(val, row, index) {

@ -72,7 +72,7 @@ export default {
},
listData: [],
multipleSelection: [],
pageNo: 1,
pageNo: +this.$route.query.page || 1,
pageSize: 10,
totals: 0
};
@ -108,6 +108,7 @@ export default {
},
handleCurrentChange(val) {
this.pageNo = val;
this.$router.push(`list?page=${val}`)
this.getData();
},
addArticle() {

@ -134,7 +134,7 @@ export default {
}
],
date: [],
pageNo: 1,
pageNo: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
transferPublishStatus: ["已发布", "未发布"]
@ -243,6 +243,7 @@ export default {
},
handleCurrentChange(val) {
this.pageNo = val;
this.$router.push(`list?page=${val}`)
this.getData();
},
transferTime(date, type) {

@ -679,7 +679,7 @@ export default {
},
//
toList() {
this.$router.push(`/project/list?founder=${this.founder}`)
this.$router.back()
},
//
back() {

@ -9,7 +9,7 @@
<ul class="filter">
<li>
<label>创建人</label>
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" @change="initData">
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" @change="founderChange">
<el-option
v-for="(item,index) in founderList"
:key="index"
@ -148,7 +148,7 @@ export default {
curriculumList: [],
queryData: {
platformId: 1, // :1 :3
founder: 2, // (0: 1: 2:)
founder: +this.$route.query.founder || 2, // (0: 1: 2:)
state: "", // (0:稿 1:)
permissions: "", // (0: 1: 2:)
cid: ''
@ -209,13 +209,14 @@ export default {
0: "草稿箱",
1: "已发布"
},
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
multipleSelection: [],
copyVisible: false,
projectName: "",
currentRow: {}, //
listDataAll: []
listDataAll: [],
isFirst: true
};
},
computed: {
@ -247,11 +248,6 @@ export default {
if(this.queryDataStatus.platformId) {
this.queryData = this.queryDataStatus
}
if(this.$route.query.founder && this.$route.query.founder != 'undefined'){
this.queryData.founder = +this.$route.query.founder
}else{
this.queryData.founder = 2
}
},
methods: {
...mapActions("project", [
@ -266,13 +262,12 @@ export default {
this.systemListAll = res.data;
// systemIdsystemIdsystemId
this.getschoolCourse()
}else{
}
});
},
getData() {
this.setSystemId(this.systemId);
if (this.isFirst) this.page = +this.$route.query.page || 1
let data = {
...this.queryData,
projectName: this.keyword,
@ -281,6 +276,7 @@ export default {
systemId: this.systemId
};
this.$post(this.api.queryProjectManage, data).then(res => {
this.isFirst = false
this.listData = res.data.records;
this.total = res.data.total;
}).catch(err => {
@ -301,9 +297,19 @@ export default {
courseChange(val) {
const systemIds = this.curriculumList.find(e => e.cid == this.queryData.cid).systemId.split(',') // systemId
this.systemList = this.systemListAll.filter(e => systemIds.includes(e.id + '')) //
this.systemId = this.systemList[0].id
if (this.systemList.length) this.systemId = this.systemList[0].id
this.initData()
},
//
founderChange(val) {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
founder: val
}
})
},
initData() {
this.page = 1;
this.getData();
@ -315,6 +321,13 @@ export default {
},
handleCurrentChange(val) { //
this.page = val;
this.$router.push({
path: 'list',
query: {
...this.$route.query,
page: val
}
})
this.getData();
},
add() { //

Loading…
Cancel
Save