/**
 * 数据转换
 */
export default class DataConversion {
    static doConversion(val){
        var l=val.toString().length;
		var text=""
		if(l<4){
			text=val
		}else if(l>=4&&l<5){
			text= (val/1000).toFixed(1).toString()+"k"
		}else if(l>=5&&l<7){
			text= (val/10000).toFixed(1).toString()+"w"
		}else if(l>=7&&l<9){
			text= (val/1000000).toFixed(1).toString()+"m"
		}else if(l>=9&&l<10){
			text= (val/100000000).toFixed(1).toString()+"E"
		}else if(l>=10&&l<12){
			text= (val/1000000000).toFixed(1).toString()+"b"
		}else if(l>=12&&l<13){
			text= (val/100000000000).toFixed(1).toString()+"t"
		}else if(l>=13&&l<17){
			text= (val/1000000000000).toFixed(1).toString()+"g"
		}else if(l>=17){
			text= (val/10000000000000000).toFixed(1).toString()+"z"
		}
		//console.log(text)
		return text
    }
}