|
@@ -67,7 +67,7 @@
|
|
|
style="margin: 5px auto;display: block"
|
|
|
v-if="total > tableData.length"
|
|
|
:loading="load"
|
|
|
- @click="changePage"
|
|
|
+ @click="()=>changePage(current)"
|
|
|
size="mini"
|
|
|
>
|
|
|
{{ load ? "加载中..." : "加载更多" }}
|
|
@@ -128,10 +128,9 @@ export default {
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- changePage() {
|
|
|
- // this.current = newPage;
|
|
|
- if (this.load || this.total <= this.current*this.size) return;
|
|
|
- this.current++;
|
|
|
+ changePage(num) {
|
|
|
+ if (this.load || this.total <= num * this.size) return;
|
|
|
+ this.current = ++num;
|
|
|
this.load = true;
|
|
|
const p = {
|
|
|
programId: this.item.id,
|
|
@@ -142,7 +141,9 @@ export default {
|
|
|
direction && (p.order = direction);
|
|
|
epgResult(p).then(programList => {
|
|
|
this.total = programList.total;
|
|
|
- this.tableData = [...this.tableData, ...programList.data];
|
|
|
+ if (num === 1) {
|
|
|
+ this.tableData =programList.data;
|
|
|
+ } else this.tableData = [...this.tableData, ...programList.data];
|
|
|
this.load = false;
|
|
|
});
|
|
|
},
|
|
@@ -339,7 +340,7 @@ export default {
|
|
|
sortFun(column) {
|
|
|
direction = column.order ? config.order[column.order] : "DESC";
|
|
|
type = column.prop ? column.prop.toUpperCase() : "WATCHRATE";
|
|
|
- this.changePage(1);
|
|
|
+ this.changePage(0);
|
|
|
},
|
|
|
exportfun() {
|
|
|
// window.open(config.base.url2 + '/epg-export?programId=' + this.item.id)
|