|
@@ -204,7 +204,7 @@ const onSubmit = (isExport = false) => {
|
|
|
const list = (data.records || []).map((v: IReportItem) => {
|
|
|
return {
|
|
|
...v,
|
|
|
- lv: (v.clickCount / v.exposureCount).toFixed(2) - 0,
|
|
|
+ lv: Number((v.clickCount / v.exposureCount).toFixed(2)) * 100,
|
|
|
}
|
|
|
})
|
|
|
if (!isExport) {
|
|
@@ -220,7 +220,7 @@ const onSubmit = (isExport = false) => {
|
|
|
// 生成数据
|
|
|
let strcsv = 'data:text/csv;charset=utf-8,\uFEFF日期,曝光数,点击数,点击率,用户数\r\n'
|
|
|
list.map((v: IReportItem) => {
|
|
|
- strcsv += `${v.sdate},${v.exposureCount},${v.clickCount},${v.lv}%,${v.uvCount},\r\n`
|
|
|
+ strcsv += `${v.sdate},${v.exposureCount},${v.clickCount},${v.lv},${v.uvCount},\r\n`
|
|
|
})
|
|
|
// 导出
|
|
|
let link: HTMLAnchorElement | undefined = document.createElement('a')
|