export function restm (e) { let index = '' if (e == '8') { index = 0 } else if (e == '9') { index = 1 } else if (e == '10') { index = 2 } else if (e == '11') { index = 3 } else if (e == '12') { index = 4 } else if (e == '13') { index = 5 } else if (e == '14') { index = 6 } else if (e == '15') { index = 7 } else if (e == '16') { index = 8 } else if (e == '17') { index = 9 } else if (e == '18') { index = 10 } else if (e == '19') { index = 11 } else if (e == '20') { index = 12 } else if (e == '21') { index = 13 } else if (e == '22') { index = 14 } else if (e == '23') { index = 15 } else if (e == '0') { index = 16 } else if (e == '1') { index = 17 } else if (e == '2') { index = 18 } else if (e == '3') { index = 19 } else if (e == '4') { index = 20 } else if (e == '5') { index = 21 } else if (e == '6') { index = 22 } else if (e == '7') { index = 23 } return index } export const adnmZhen = adcd => { if (!adcd || !nameMap) { return undefined } if (adcd.endsWith('000000000')) { return undefined } else if (adcd.endsWith('000000')) { return nameMap[adcd] } return nameMap[`${adcd.substr(0, 9)}000000`] } export const fileChange = (file) => { let blob = new Blob([file]); let url = window.URL.createObjectURL(blob); console.log("url",url); return url } export function numberFormat(value) { let param = {} let k = 10000 let sizes = ['', '万', '亿', '万亿'] let i if (value < k) { param.value = value param.unit = '' } else { i = Math.floor(Math.log(value) / Math.log(k)); param.value = ((value / Math.pow(k, i))).toFixed(2); param.unit = sizes[i]; } console.log(param) return param; }