liyongli 2 年之前
父节点
当前提交
fd2ac3ef38
共有 2 个文件被更改,包括 13 次插入11 次删除
  1. 8 6
      src/views/report/Traditional/index.vue
  2. 5 5
      src/views/report/TraditionalXian/index.vue

+ 8 - 6
src/views/report/Traditional/index.vue

@@ -135,13 +135,15 @@
                 {{ ratios.channelname }}
               </div>
             </van-cell>
-            <van-cell-group title="视听收视新指标">
+            <van-cell-group
+              title="视听收视新指标"
+            >
               <van-row>
                 <van-col span="7" class="td" style="text-align: right">
                   收视总时长:
                 </van-col>
                 <van-col span="5" class="td">
-                  {{ ratios.timecount }}
+                  {{ ratios.timecount }}小时
                 </van-col>
                 <van-col span="7" class="td" style="text-align: right">
                   收视总次数:
@@ -324,11 +326,11 @@ export default {
   computed: {},
   methods: {
     formatType1(num, W) {
-      let N = this.formatNum(num, 2);
+      let N = this.formatNum(num, W || 0);
       if (N >= 100000000) {
-        N = (N / 100000000).toFixed(W || 2) + "亿";
+        N = (N / 100000000).toFixed(W || 0) + "亿";
       } else if (N >= 10000) {
-        N = (N / 10000).toFixed(W || 2) + "万";
+        N = (N / 10000).toFixed(W || 0) + "万";
       }
       return N;
     },
@@ -363,7 +365,7 @@ export default {
       const reaios = JSON.parse(JSON.stringify(this.platfromData[i] || {}));
       reaios.hitcount = this.formatType1(reaios.hitcount, 1);
       reaios.usrcount = this.formatType1(reaios.usrcount, 1);
-      reaios.timecount = this.formatType1(reaios.timecount / 60, 1);
+      reaios.timecount = this.formatType1(reaios.timecount / 60, 0);
       this.ratios = reaios;
       this.$nextTick(() => {
         this.upEcharts();

+ 5 - 5
src/views/report/TraditionalXian/index.vue

@@ -141,7 +141,7 @@
                   收视总时长:
                 </van-col>
                 <van-col span="5" class="td">
-                  {{ ratios.timecount }}
+                  {{ ratios.timecount }}小时
                 </van-col>
                 <van-col span="7" class="td" style="text-align: right">
                   收视总次数:
@@ -324,11 +324,11 @@ export default {
   computed: {},
   methods: {
     formatType1(num, W) {
-      let N = this.formatNum(num, 2);
+      let N = this.formatNum(num, W || 0);
       if (N >= 100000000) {
-        N = (N / 100000000).toFixed(W || 2) + "亿";
+        N = (N / 100000000).toFixed(W || 0) + "亿";
       } else if (N >= 10000) {
-        N = (N / 10000).toFixed(W || 2) + "万";
+        N = (N / 10000).toFixed(W || 0) + "万";
       }
       return N;
     },
@@ -363,7 +363,7 @@ export default {
       const reaios = JSON.parse(JSON.stringify(this.platfromData[i] || {}));
       reaios.hitcount = this.formatType1(reaios.hitcount, 1);
       reaios.usrcount = this.formatType1(reaios.usrcount, 1);
-      reaios.timecount = this.formatType1(reaios.timecount / 60, 1);
+      reaios.timecount = this.formatType1(reaios.timecount / 60, 0);
       this.ratios = reaios;
       this.$nextTick(() => {
         this.upEcharts();