liyongli преди 3 месеца
родител
ревизия
445deafb0d
променени са 5 файла, в които са добавени 6 реда и са изтрити 5 реда
  1. 1 0
      src/types/Report.d.ts
  2. 1 1
      src/views/ReportFormsMonthPage.vue
  3. 2 2
      src/views/ReportFormsPage.vue
  4. 1 1
      src/views/ReportSpaceFormsMonthPage.vue
  5. 1 1
      src/views/ReportSpaceFormsPage.vue

+ 1 - 0
src/types/Report.d.ts

@@ -4,4 +4,5 @@ export interface IReportItem {
   requestCount: number
   sdate: string
   uvCount: number
+  lv: number
 }

+ 1 - 1
src/views/ReportFormsMonthPage.vue

@@ -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) {

+ 2 - 2
src/views/ReportFormsPage.vue

@@ -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')

+ 1 - 1
src/views/ReportSpaceFormsMonthPage.vue

@@ -129,7 +129,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) {

+ 1 - 1
src/views/ReportSpaceFormsPage.vue

@@ -129,7 +129,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) {