export const GetPercent = (num, total)=> { /// /// 求百分比 /// /// 当前数 /// 总数 num = parseFloat(num); total = parseFloat(total); if (isNaN(num) || isNaN(total)) { return "-"; } return total <= 0 ? "0%" : (Math.round(num / total * 10000) / 100.00)+"%"; } export const GetMax = (arr)=> { let max = 1; if(arr ==undefined) return 1; arr.forEach(v => { if (max