分页修复

chengdu V1.0.1
yujialong 4 years ago
parent aef27ebccd
commit 6028c3bb7c
  1. 10
      src/components/page/Assessment.vue
  2. 10
      src/components/page/Project.vue

@ -11,14 +11,14 @@
<div>
<el-form label-width="80px">
<el-form-item label="实验班级" class="userRadio">
<el-radio-group v-model="form.classId" @change="getData">
<el-radio-group v-model="form.classId" @change="initData">
<el-radio label="" border>不限</el-radio>
<el-radio v-for="(item,index) in classList" :key="index" :label="item.classId" border>{{item.className}}</el-radio>
</el-radio-group>
</el-form-item>
<div class="flex-between no-mb">
<el-form-item label="考核状态">
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="getData">
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="initData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
@ -140,7 +140,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -214,6 +214,10 @@ export default {
this.handlePage()
}).catch(err => {})
},
initData(){
this.pageNo = 1
this.getData()
},
handlePage(){
let list = this.listDataAll
this.listData = list.slice((this.pageNo - 1) * this.pageSize,this.pageNo * this.pageSize)

@ -11,7 +11,7 @@
<div>
<el-form label-width="80px">
<el-form-item label="实验时间" class="userRadio">
<el-radio-group v-model="form.month" @change="getData">
<el-radio-group v-model="form.month" @change="initData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange"
@ -19,7 +19,7 @@
</el-form-item>
<div class="flex-between no-mb">
<el-form-item label="实验状态">
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="getData">
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="initData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
@ -182,7 +182,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -234,6 +234,10 @@ export default {
}).catch(err => {})
}).catch(res => {});
},
initData(){
this.pageNo = 1
this.getData()
},
add(){
this.$store.commit("customerData", { customer_id : ''});
this.$router.push('/addclass');

Loading…
Cancel
Save