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