|
|
@ -1297,7 +1297,7 @@ class DatasetControl {
|
|
|
|
this._load();
|
|
|
|
this._load();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_load(state, prev) {
|
|
|
|
_load(state, prev, callback) {
|
|
|
|
if (!this.query.pageNum)
|
|
|
|
if (!this.query.pageNum)
|
|
|
|
this.query.pageNum = 1;
|
|
|
|
this.query.pageNum = 1;
|
|
|
|
if (prev)
|
|
|
|
if (prev)
|
|
|
@ -1308,12 +1308,14 @@ class DatasetControl {
|
|
|
|
data:this.query,
|
|
|
|
data:this.query,
|
|
|
|
success:resp => {
|
|
|
|
success:resp => {
|
|
|
|
if (!prev)
|
|
|
|
if (!prev)
|
|
|
|
resp.state = state;
|
|
|
|
resp.state = state;
|
|
|
|
if (!this.appendData || this.query.pageNum == 1)
|
|
|
|
if (!this.appendData || this.query.pageNum == 1)
|
|
|
|
this.setData(resp);
|
|
|
|
this.setData(resp);
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
this.addData(resp);
|
|
|
|
this.addData(resp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (callback)
|
|
|
|
|
|
|
|
callback();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1331,8 +1333,7 @@ class DatasetControl {
|
|
|
|
this.query.fetchSize = this.dataset.length;
|
|
|
|
this.query.fetchSize = this.dataset.length;
|
|
|
|
this.query.pageNum = 1;
|
|
|
|
this.query.pageNum = 1;
|
|
|
|
this.dataset.clear();
|
|
|
|
this.dataset.clear();
|
|
|
|
this._load(state);
|
|
|
|
this._load(state, prev, () => {this.query = query;});
|
|
|
|
this.query = query;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|