liyongli 2 年之前
父节点
当前提交
0cf2d7bcd8
共有 3 个文件被更改,包括 85 次插入105 次删除
  1. 8 11
      src/views/report/Calendar/index.vue
  2. 45 29
      src/views/report/Mobile/index.vue
  3. 32 65
      src/views/report/Traditional/index.vue

+ 8 - 11
src/views/report/Calendar/index.vue

@@ -107,7 +107,9 @@
           "
           alt=""
         />
-        <div class="bottom content" v-if="index == dataOne.length - 1">
+      </div>
+    </div>
+    <div class="bottom content">
           本数据由“陕西广电融媒体集团大数据平台”提供。
           <p>
             技术支持
@@ -115,8 +117,6 @@
             ><span style="white-space: nowrap">陈科18629350958。</span>
           </p>
         </div>
-      </div>
-    </div>
   </div>
 </template>
 
@@ -213,21 +213,18 @@ export default {
   box-sizing: border-box;
   color: #000;
 }
+.content {
+  margin: 0 auto;
+  max-width: 667px;
+}
 .bottom {
   border: 4px solid #0983a8;
-  color: #fff;
-  margin-top: 1em;
+  color: #000;
   padding: 10px;
   font-size: 0.9rem;
   padding-left: 5px;
   font-weight: 600;
   overflow: hidden;
-  position: relative;
-  z-index: 2;
-}
-.content {
-  margin: 0 auto;
-  max-width: 667px;
 }
 
 .group {

+ 45 - 29
src/views/report/Mobile/index.vue

@@ -16,7 +16,7 @@
         class="content"
         :style="
           'text-indent: 2em; font-weight: 700; padding: 0.5em 3px;font-size: ' +
-          fontSize +
+          fontSize * 1.1 +
           'px;'
         "
         v-html="desc"
@@ -38,7 +38,7 @@
                     src="../../../assets/image/shou.gif"
                     width="30px"
                     alt=""
-                    style="vertical-align: middle;transform: rotate(45deg);"
+                    style="vertical-align: middle; transform: rotate(45deg)"
                   />
                 </div>
               </van-col>
@@ -65,7 +65,7 @@
                 <van-icon
                   v-if="v.read_change !== '相等'"
                   name="down"
-                  :color="v.read_change === '上涨' ? '#f00' : '#0f0'"
+                  :color="v.read_change === '上涨' ? '#f00' : '#04c15f'"
                   :class="{ rise: v.read_change === '上涨' }"
                 />
               </van-col>
@@ -74,7 +74,7 @@
                 <van-icon
                   v-if="v.publish_change !== '相等'"
                   name="down"
-                  :color="v.publish_change === '上涨' ? '#f00' : '#0f0'"
+                  :color="v.publish_change === '上涨' ? '#f00' : '#04c15f'"
                   :class="{ rise: v.publish_change === '上涨' }"
                 />
               </van-col>
@@ -102,7 +102,7 @@
                   {{ ratios.name }}
                 </div>
               </van-cell>
-              <van-row>
+              <van-row :style="'font-size: ' + fontSize*1.1 + 'px;'">
                 <van-col span="7" class="td"> 发稿量: </van-col>
                 <van-col span="5" class="td">
                   {{ ratios.publish_count }}
@@ -113,24 +113,43 @@
                 </van-col>
               </van-row>
               <van-cell-group border title="平台账号">
-                <van-cell
-                  v-for="(v, i) in ratios.detail || []"
-                  :key="i + v.nick_name"
-                  title-style="flex: 3"
-                  :title="v.platform + ' - ' + v.nick_name"
-                  :label="ratios.channelname"
-                >
-                  <template #label>
-                    发稿量:{{ timeFormat(v.publish_count) }} 阅读量:{{
-                      timeFormat(v.read_count)
-                    }}
-                    环比:
-                    <span
-                      :style="v.read_huanbi > 0 ? 'color:#f00' : 'color:#0f0'"
-                      >{{ formatNum(v.read_huanbi || 0, 2) }}%</span
-                    >
-                  </template>
-                </van-cell>
+                <div >
+                  <van-row class="itemHead">
+                    <van-col span="4" class="td"> 平台 </van-col>
+                    <van-col span="7" class="td"> 账号 </van-col>
+                    <van-col span="4" class="td"> 发稿量 </van-col>
+                    <van-col span="4" class="td"> 阅读量 </van-col>
+                    <van-col span="5" class="td"> 环比 </van-col>
+                  </van-row>
+                  <van-row
+                    class="item"
+                    v-for="(v, i) in ratios.detail || []"
+                    :key="i + v.nick_name"
+                  >
+                    <van-col span="4" class="td"> {{ v.platform }} </van-col>
+                    <van-col span="7" class="td"> {{ v.nick_name }} </van-col>
+                    <van-col span="4" class="td">
+                      {{ timeFormat(v.publish_count) }}
+                    </van-col>
+                    <van-col span="4" class="td">
+                      {{ timeFormat(v.read_count) }}
+                    </van-col>
+                    <van-col span="5" class="td">
+                      <span
+                        :style="
+                          v.read_huanbi > 0 ? 'color:#f00' : 'color:#04c15f'
+                        "
+                        >{{ formatNum(v.read_huanbi || 0, 2) }}%</span
+                      >
+                      <van-icon
+                        v-if="v.read_huanbi != 0"
+                        name="down"
+                        :color="v.read_huanbi > 0 ? '#f00' : '#04c15f'"
+                        :class="{ rise: v.read_huanbi > 0 }"
+                      />
+                    </van-col>
+                  </van-row>
+                </div>
               </van-cell-group>
               <van-cell-group border :title="ratios.name + '热门稿件'">
                 <van-cell
@@ -140,7 +159,7 @@
                   :title="i + 1 + '、' + v.title"
                 >
                   <template #label>
-                    <van-tag size="large" color="#ffcc00" type="primary"
+                    <van-tag size="large" color="#409efe" type="primary"
                       >传播量:{{ timeFormat(v.play_count) }}</van-tag
                     >
                     {{ v.dep_name + "-" + v.nick_name }}
@@ -166,7 +185,7 @@
             :title="i + 1 + '、' + v.topic"
           >
             <template #label>
-              <van-tag size="large" color="#ffcc00" type="primary"
+              <van-tag size="large" color="#409efe" type="primary"
                 >传播量:{{ timeFormat(v.read_count) }}</van-tag
               >
               {{ v.dep + "-" + v.zhuchiren }}
@@ -181,7 +200,7 @@
             :title="i + 1 + '、' + v.title"
           >
             <template #label>
-              <van-tag size="large" color="#ffcc00" type="primary"
+              <van-tag size="large" color="#409efe" type="primary"
                 >传播量:{{ timeFormat(v.play_count) }}</van-tag
               >
               {{ v.dep_name + "-" + v.nick_name }}
@@ -373,9 +392,6 @@ export default {
   margin-top: 0;
   background-color: #f5f6f8;
 }
-.main {
-  padding: 0.5em;
-}
 .content {
   margin: 0 auto;
   max-width: 667px;

+ 32 - 65
src/views/report/Traditional/index.vue

@@ -64,7 +64,7 @@
                 src="../../../assets/image/shou.gif"
                 width="26px"
                 alt=""
-                style="vertical-align: middle;transform: rotate(45deg);"
+                style="vertical-align: middle; transform: rotate(45deg)"
               />
             </van-col>
           </van-row>
@@ -98,7 +98,7 @@
               <van-icon
                 v-if="v.occrate_change !== '相等'"
                 name="down"
-                :color="v.occrate_change === '上升' ? '#f00' : '#0f0'"
+                :color="v.occrate_change === '上升' ? '#f00' : '##04c15f'"
                 :class="{ rise: v.occrate_change === '上升' }"
               />
             </van-col>
@@ -107,7 +107,7 @@
               <van-icon
                 v-if="v.user_duration_change !== '相等'"
                 name="down"
-                :color="v.user_duration_change === '上升' ? '#f00' : '#0f0'"
+                :color="v.user_duration_change === '上升' ? '#f00' : '##04c15f'"
                 :class="{ rise: v.user_duration_change === '上升' }"
               />
             </van-col>
@@ -129,7 +129,9 @@
             >
               <div
                 @click="show = false"
-                style="color: #5470c6; cursor: pointer"
+                :style="
+                  'color: #5470c6;cursor:pointer;font-size:' + fontSize + 'px'
+                "
               >
                 <van-icon name="revoke" />
                 {{ ratios.channelname }}
@@ -137,58 +139,31 @@
             </van-cell>
             <van-cell-group title="视听收视新指标">
               <van-row>
-                <van-col span="10" class="td" style="text-align: right">
+                <van-col span="7" class="td" style="text-align: right">
                   收视总时长:
                 </van-col>
-                <van-col span="14" class="td">
-                  <counto
-                    :startVal="0"
-                    :endVal="ratios.timecount || 0"
-                    :duration="1000"
-                  ></counto>
-                  <span v-if="ratios.timecountP">.</span>
-                  {{
-                    (ratios.timecountP > 0 ? ratios.timecountP : "") +
-                    ratios.timecountWei
-                  }}
+                <van-col span="5" class="td">
+                  {{ ratios.timecount }}
                 </van-col>
-                <van-col span="10" class="td" style="text-align: right">
+                <van-col span="7" class="td" style="text-align: right">
                   收视总次数:
                 </van-col>
-                <van-col span="14" class="td">
-                  <counto
-                    :startVal="0"
-                    :endVal="ratios.hitcount || 0"
-                    :duration="1000"
-                  ></counto>
-                  <span v-if="ratios.hitcountP">.</span>
-                  {{
-                    (ratios.hitcountP > 0 ? ratios.hitcountP : "") +
-                    ratios.hitcountWei
-                  }}
+                <van-col span="5" class="td">
+                  {{ ratios.hitcount }}
                 </van-col>
 
-                <van-col span="10" class="td" style="text-align: right">
+                <van-col span="7" class="td" style="text-align: right">
                   周活跃户数:
                 </van-col>
-                <van-col span="14" class="td">
-                  <counto
-                    :startVal="0"
-                    :endVal="ratios.usrcount || 0"
-                    :duration="1000"
-                  ></counto>
-                  <span v-if="ratios.usrcountP">.</span>
-                  {{
-                    (ratios.usrcountP > 0 ? ratios.usrcountP : "") +
-                    ratios.usrcountWei
-                  }}
+                <van-col span="5" class="td">
+                  {{ ratios.usrcount }}
                 </van-col>
 
-                <van-col span="10" class="td" style="text-align: right">
-                  接触频次:
+                <van-col span="7" class="td" style="text-align: right">
+                  周接触频次:
                 </van-col>
-                <van-col span="14" class="td">
-                    {{ formatType1(ratios.touchfreq, 0) }}%
+                <van-col span="5" class="td">
+                  {{ formatType1(ratios.touchfreq, 0) }}次
                 </van-col>
               </van-row>
             </van-cell-group>
@@ -214,10 +189,6 @@
                 <van-col span="5" class="td"
                   >{{ formatNum(ratios.loyalty, 2) }}%
                 </van-col>
-                <van-col span="7" class="td"> 接触度: </van-col>
-                <van-col span="7" class="td"
-                  >{{ formatType1(ratios.hitcount, 0) }}次
-                </van-col>
               </van-row>
             </van-cell-group>
             <div ref="pie"></div>
@@ -246,7 +217,6 @@
 
 <script>
 // @ is an alias to /src
-import counto from "@/components/counto/vue-countTo.vue";
 import watermark from "watermark-package";
 import {
   Col as vanCol,
@@ -388,18 +358,9 @@ export default {
     showPopup(i) {
       this.show = true;
       const reaios = JSON.parse(JSON.stringify(this.platfromData[i] || {}));
-      let hitcount = this.formatType(reaios.hitcount, 1);
-      reaios.hitcount = hitcount.N;
-      reaios.hitcountP = hitcount.P;
-      reaios.hitcountWei = hitcount.wei;
-      let usrcount = this.formatType(reaios.usrcount, 1);
-      reaios.usrcount = usrcount.N;
-      reaios.usrcountP = usrcount.P;
-      reaios.usrcountWei = usrcount.wei;
-      let timecount = this.formatType(reaios.timecount / 60, 1);
-      reaios.timecount = timecount.N;
-      reaios.timecountP = timecount.P;
-      reaios.timecountWei = timecount.wei + "小时";
+      reaios.hitcount = this.formatType1(reaios.hitcount, 1);
+      reaios.usrcount = this.formatType1(reaios.usrcount, 1);
+      reaios.timecount = this.formatType1(reaios.timecount / 60, 1);
       this.ratios = reaios;
       this.$nextTick(() => {
         this.upEcharts();
@@ -436,7 +397,10 @@ export default {
             ? this.ratios.usrcount_compare + " 单位:户"
             : "单位:户",
           textStyle: {
-            fontSize: 14,
+            fontSize: this.fontSize * 1.05,
+          },
+          subtextStyle: {
+            fontSize: this.fontSize,
           },
         },
         tooltip: {
@@ -447,9 +411,13 @@ export default {
           type: "category",
           boundaryGap: false,
           data: key,
+          axisLabel: {
+            interval: 0,
+            rotate: 60,
+          },
         },
         grid: {
-          right: "25px",
+          right: "5px",
           left: "40px",
         },
         yAxis: {
@@ -493,7 +461,7 @@ export default {
           text: "观看时长用户分布",
           subtext: "单位:%",
           textStyle: {
-            fontSize: 14,
+            fontSize: this.fontSize * 1.05,
           },
         },
         color: [
@@ -528,7 +496,6 @@ export default {
   },
   beforeUnmount() {},
   components: {
-    counto,
     vanCol,
     vanRow,
     vanIcon,