diff --git a/src/stores/Distribution.js b/src/stores/Distribution.js index d394d9a..fd8bbbf 100644 --- a/src/stores/Distribution.js +++ b/src/stores/Distribution.js @@ -44,12 +44,11 @@ class Distribution { const json = dynamicsX === false ? await req.fetchJSON(modelMapper[mkey].url, param) : await this.getApartDataStep(param); if (json.errcode === 0) { const dataLength = json.result.length; - const pickResult = dataLength > 20 ? json.result.slice(0, 30) : json.result; - const dataSource = calcDiff({ result: pickResult, resultToY: json.resultToY, resultToQ: json.resultToQ }, modelMapper[mkey].keySort); + const dataSource = calcDiff({ result: json.result, resultToY: json.resultToY, resultToQ: json.resultToQ }, modelMapper[mkey].keySort); runInAction(() => { this[mkey].loading = false; this[mkey].originData = json.result; - this[mkey].dataSource = dataSource; + this[mkey].dataSource = dataLength > 20 ? dataSource.slice(0,30) : dataSource; this.pageLoading = false; }); }