Commit 5ebc038d by lixinming

no message

parent b5a82426
...@@ -169,6 +169,20 @@ export function getChartData(dataMap, unit, percent, title?, subTitle? ) { ...@@ -169,6 +169,20 @@ export function getChartData(dataMap, unit, percent, title?, subTitle? ) {
return data; return data;
} }
export function getListData( title, dataList, titleList, titleValueObj ) {
let data = { title, subTitle:title, total:dataList.length, titleList, valueList:[] };
dataList.forEach(info => {
let onceList = [];
titleList.forEach(titleName => {
onceList.push(info[ titleValueObj[titleName] ]);
});
data.valueList.push(onceList);
});
return data;
}
//按需取保留小数长度 tenNumber保留小数位 1位就填1 //按需取保留小数长度 tenNumber保留小数位 1位就填1
export function getDecimalForN(number, n) { export function getDecimalForN(number, n) {
let ten = 1; let ten = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment