liyongli il y a 2 ans
Parent
commit
d2088bbf03

BIN
src/assets/image/shou.png


+ 36 - 8
src/views/report/Advertisement/Charts.js

@@ -67,7 +67,6 @@ export function advertisementSpendInit(ele, list) {
           color: "#333",
           fontSize: "12px",
           formatter: params => {
-            console.log(params.value);
             return params.value.toFixed(2) - 0 + "%";
           },
         },
@@ -109,6 +108,7 @@ export function advertisementRingRatioInit(ele, list) {
   ringEcharts && ringEcharts.clear && ringEcharts.clear();
   if (!ringEcharts) ringEcharts = echarts.init(ele);
   let keys = list.F.length > list.L.length ? list.F : list.L;
+  console.log(list.C)
   ringEcharts.setOption({
     title: {
       text: list.name || "",
@@ -120,9 +120,22 @@ export function advertisementRingRatioInit(ele, list) {
     },
     tooltip: {
       trigger: "axis",
+      formatter(e) {
+        let out = "";
+        for (let i = 0; i < (e || []).length; i++) {
+          const v = (e || [])[i];
+          let month = (v.axisValue || "").split("-");
+          month = month.reverse()[0];
+          let N = v.value || 0;
+          if (N >= 100000000) N = (N / 100000000).toFixed(2) - 0 + "亿";
+          else if (N >= 10000) N = (N / 10000).toFixed(2) - 0 + "万";
+          out += v.seriesName + "-" + month + ": " + N + "<br />";
+        }
+        return out;
+      },
     },
     legend: {
-      data: [list.F[0].type, list.L[0].type],
+      data: [list.F[0].type, list.L[0].type, list.C[0].type],
       top: "30px",
     },
     grid: {
@@ -157,17 +170,24 @@ export function advertisementRingRatioInit(ele, list) {
       {
         name: list.F[0].type,
         type: "line",
-        stack: "Total",
+        stack: "F",
         showSymbol: false,
         data: list.F.map(v => v.value),
       },
       {
         name: list.L[0].type,
         type: "line",
-        stack: "Total",
+        stack: "L",
         showSymbol: false,
         data: list.L.map(v => v.value),
       },
+      {
+        name: list.C[0].type,
+        type: "line",
+        stack: "C",
+        showSymbol: false,
+        data: list.C.map(v => v.value),
+      },
     ],
   });
 }
@@ -189,10 +209,18 @@ export function advertisementFeeInit(ele, list) {
     tooltip: {
       trigger: "axis",
       formatter: a => {
-        let t =  list.L[a[0].dataIndex] || undefined;
-        let t1 =  list.F[a[1].dataIndex] || undefined;
-        if(!t) return ""
-        return t.t + ": " + (t.value.toFixed(2) - 0 + "%") + '<br/>' + t1.t + ": " + (t1.value.toFixed(2) - 0 + "%")
+        let t = list.L[a[0].dataIndex] || undefined;
+        let t1 = list.F[a[1].dataIndex] || undefined;
+        if (!t) return "";
+        return (
+          t.t +
+          ": " +
+          (t.value.toFixed(2) - 0 + "%") +
+          "<br/>" +
+          t1.t +
+          ": " +
+          (t1.value.toFixed(2) - 0 + "%")
+        );
       },
     },
     legend: {

+ 48 - 21
src/views/report/Advertisement/index.vue

@@ -59,22 +59,38 @@
           >
             <van-col span="3" v-text="i + 1"></van-col>
             <van-col span="7" v-text="item.name"></van-col>
-            <van-col span="7"  :style="item.huanbi > 0 ? 'color: red': item.huanbi < 0 ? 'color: green' : ''">
+            <van-col
+              span="7"
+              :style="
+                item.huanbi > 0
+                  ? 'color: red'
+                  : item.huanbi < 0
+                  ? 'color: green'
+                  : ''
+              "
+            >
               <counto
                 :startVal="0"
                 :endVal="item.fee1.N || 0"
                 :duration="1000"
               ></counto>
               <span v-if="item.fee1.P">.</span>
-              <counto
-                :startVal="0"
-                :endVal="item.fee1.P || 0"
-                :duration="1000"
-              ></counto
-              >{{ item.fee.wei }}
+              <counto v-if="item.fee1.P">
+                :startVal="0" :endVal="item.fee1.P || 0" :duration="1000"
+                ></counto
+              >{{ item.fee1.wei }}
             </van-col>
-            <van-col span="7" :style="item.huanbi > 0 ? 'color: red': item.huanbi < 0 ? 'color: green' : ''">
-                <span v-if="item.huanbi < 0 && item.huanbi1.N > -1">-</span>
+            <van-col
+              span="7"
+              :style="
+                item.huanbi > 0
+                  ? 'color: red'
+                  : item.huanbi < 0
+                  ? 'color: green'
+                  : ''
+              "
+            >
+              <span v-if="item.huanbi < 0 && item.huanbi1.N > -1">-</span>
               <counto
                 :startVal="0"
                 :endVal="item.huanbi1.N || 0"
@@ -82,6 +98,7 @@
               ></counto>
               <span v-if="item.huanbi1.P">.</span>
               <counto
+                v-if="item.huanbi1.P"
                 :startVal="0"
                 :endVal="item.huanbi1.P || 0"
                 :duration="1000"
@@ -119,21 +136,21 @@
     </div>
     <div class="bottom">
       <img
-        src="http://bsddata.oss-cn-hangzhou.aliyuncs.com/yuqing_oem/images/202104021135578156.png"
-        width="50%"
+        src="https://djweb.smcic.net/img/smcLogo.png"
+        width="30%"
         style="vertical-align: middle"
         alt=""
       />
       <span
         style="
           display: inline-block;
-          width: 45%;
+          width: 68%;
           vertical-align: middle;
           padding-left: 5px;
           font-weight: 600;
         "
       >
-        本数据由陕西广电融媒体集团大数据平台提供。技术支持 汪朝涵:17302954998
+        本数据由<span style="white-space: nowrap;" >“陕西广电融媒体集团大数据平台”</span>提供。技术支持 汪朝涵:17302954998
       </span>
     </div>
   </div>
@@ -167,8 +184,7 @@ export default {
   mounted() {
     if (!this.$route.query.auto) return;
     this.fontSize = (document.body.offsetWidth / 24).toFixed(2) - 0;
-    if(document.body.offsetWidth > 677) this.fontSize = 22;
-    console.log(this.fontSize);
+    if (document.body.offsetWidth > 677) this.fontSize = 22;
     const time = new dayJs(this.$route.query.date);
     watermark.setWaterMark({
       w_texts: ["陕西视听大数据"],
@@ -184,7 +200,10 @@ export default {
       const Res = r || {};
       const brand_top = Res.brand_top || { list: [] };
       for (let i = 0; i < brand_top.list.length; i++) {
-        brand_top.list[i].fee1 = this.formatType(brand_top.list[i].fee, 2);
+        brand_top.list[i].fee1 = this.formatType(
+          brand_top.list[i].fee / 10000,
+          2
+        );
         brand_top.list[i].huanbi1 = this.formatType(
           brand_top.list[i].huanbi * 100,
           2
@@ -237,17 +256,24 @@ export default {
 
       const ringRatioF = [];
       const ringRatioL = [];
+      const ringRatioC = [];
       const day_hb = this.orgin.day_hb ? this.orgin.day_hb.list : [];
       for (let i = 0; i < day_hb.length; i++) {
         const v = day_hb[i];
         const type = (v.pdt || "").split("-");
         const type1 = (v.dt || "").split("-");
-        ringRatioF.push({
+        const type2 = (v.ppdt || "").split("-");
+        v.pfee && ringRatioF.push({
           date: v.pdt || "",
           type: [type[0], type[1]].join("-"),
           value: v.pfee * 1,
         });
-        ringRatioL.push({
+        v.ppfee && ringRatioC.push({
+          date: v.ppdt || "",
+          type: [type2[0], type2[1]].join("-"),
+          value: v.ppfee * 1,
+        });
+        v.fee && ringRatioL.push({
           date: v.dt || "",
           type: [type1[0], type1[1]].join("-"),
           value: v.fee * 1,
@@ -299,6 +325,7 @@ export default {
         advertisementRingRatioInit(this.$refs.adRingRatioCanvas, {
           L: ringRatioL,
           F: ringRatioF,
+          C: ringRatioC,
           name: this.orgin.day_hb.name,
         });
       line1L.length &&
@@ -355,9 +382,9 @@ export default {
   width: 90%;
   position: relative;
   z-index: 1;
-  overflow: hidden; 
-  white-space: nowrap; 
-  text-overflow: ellipsis; 
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
 }
 .xifenxinxiTitle .right {
   background-color: #595959;

+ 25 - 12
src/views/report/Mobile/index.vue

@@ -8,11 +8,11 @@
         <div class="itemHead">
           <van-row>
             <van-col span="3" class="td"> 排名 </van-col>
-            <van-col span="5" class="td"> 部门 </van-col>
+            <van-col span="7" class="td"> 部门 </van-col>
             <van-col span="7" class="td"> 传播量(次) </van-col>
             <!-- td2 :style="width > 667 ? 'line-height: 2.5em' : 'line-height: 1.5em'" -->
             <van-col span="5" class="td"> 发稿量(件) </van-col>
-            <van-col span="4" class="td">
+            <van-col span="2" class="td">
               <img
                 src="../../../assets/image/shou.gif"
                 width="26px"
@@ -36,32 +36,30 @@
               {{ o + 1 }}
             </van-col>
             <van-col
-              span="5"
+              span="7"
               :class="{ td: true }"
-              :style="{ fontSize: fontSize * 0.7 + 'px', lineHeight: '3.6em' }"
             >
               {{ v.name }}
             </van-col>
             <van-col span="7" :class="{ td: true }">
               {{ timeFormat(v.read_count) }}
               <van-icon
-                v-if="v.user_duration_change !== '相等'"
+                v-if="v.read_count_change !== '相等'"
                 name="down"
-                :color="v.user_duration_change === '上升' ? '#f00' : '#0f0'"
-                :class="{ rise: v.user_duration_change === '上升' }"
+                :color="v.read_count_change === '上升' ? '#f00' : '#0f0'"
+                :class="{ rise: v.read_count_change === '上升' }"
               />
             </van-col>
             <van-col span="5" :class="{ td: true }">
               {{ timeFormat(v.publish_count) }}
               <van-icon
-                v-if="v.user_duration_change !== '相等'"
+                v-if="v.publish_count_change !== '相等'"
                 name="down"
-                :color="v.user_duration_change === '上升' ? '#f00' : '#0f0'"
-                :class="{ rise: v.user_duration_change === '上升' }"
+                :color="v.publish_count_change === '上升' ? '#f00' : '#0f0'"
+                :class="{ rise: v.publish_count_change === '上升' }"
               />
             </van-col>
-            <van-col span="4" class="td" style="cursor: pointer">
-              更多
+            <van-col span="2" class="td" style="cursor: pointer">
               <van-icon name="arrow" />
             </van-col>
           </van-row>
@@ -174,6 +172,21 @@
           </div>
         </van-popup>
       </van-cell-group>
+      <van-cell-group border title="爆款话题">
+        <van-cell
+          v-for="(v, i) in article"
+          :key="i"
+          title-style="flex: 3"
+          :title="v.title"
+        >
+          <template #label>
+            <van-tag size="“large”" type="primary"
+              >播放量:{{ timeFormat(v.play_count) }}</van-tag
+            >
+            {{ v.dep_name + "-" + v.nick_name }}
+          </template>
+        </van-cell>
+      </van-cell-group>
       <van-cell-group border title="爆款稿件">
         <van-cell
           v-for="(v, i) in article"

+ 131 - 89
src/views/report/Traditional/index.vue

@@ -7,11 +7,11 @@
       <div class="itemHead">
         <van-row>
           <van-col span="3" class="td"> 排名 </van-col>
-          <van-col span="5" class="td"> 频道 </van-col>
+          <van-col span="8" class="td"> 频道 </van-col>
           <van-col span="5" class="td"> 市场份额 </van-col>
           <!-- td2 :style="width > 667 ? 'line-height: 2.5em' : 'line-height: 1.5em'" -->
-          <van-col span="7" class="td"> 人均时长(分钟) </van-col>
-          <van-col span="4" class="td">
+          <van-col span="6" class="td"> 人均时长(分) </van-col>
+          <van-col span="2" class="td">
             <img
               src="../../../assets/image/shou.gif"
               width="26px"
@@ -34,11 +34,7 @@
           >
             {{ v.rank }}
           </van-col>
-          <van-col
-            span="5"
-            :class="{ td: true }"
-            :style="{ fontSize: fontSize * 0.7 + 'px', lineHeight: '3.6em' }"
-          >
+          <van-col span="8" :class="{ td: true }">
             {{ v.channelname }}
           </van-col>
           <van-col span="5" :class="{ td: true }">
@@ -50,7 +46,7 @@
               :class="{ rise: v.occrate_change === '上升' }"
             />
           </van-col>
-          <van-col span="7" :class="{ td: true }">
+          <van-col span="6" :class="{ td: true }">
             {{ timeFormat(v.user_duration) }}
             <van-icon
               v-if="v.user_duration_change !== '相等'"
@@ -59,8 +55,7 @@
               :class="{ rise: v.user_duration_change === '上升' }"
             />
           </van-col>
-          <van-col span="4" class="td" style="cursor: pointer">
-            更多
+          <van-col span="2" class="td" style="cursor: pointer">
             <van-icon name="arrow" />
           </van-col>
         </van-row>
@@ -80,101 +75,145 @@
               <van-icon name="revoke" />
             </div>
           </van-cell>
-          <van-row>
-            <van-col span="5" class="td"> 收视率: </van-col>
-            <van-col span="7" class="td">
-              {{ formatNum(ratios.watchrate, 2) }}%
-            </van-col>
-            <van-col span="7" class="td"> 市占率: </van-col>
-            <van-col span="5" class="td"
-              >{{ formatNum(ratios.occrate, 2) }}%
-            </van-col>
+          <van-cell-group title="视听收视新指标">
+            <van-row>
+              <van-col span="7" class="td"> 收视次数: </van-col>
+              <van-col span="5" class="td">
+                <counto
+                  :startVal="0"
+                  :endVal="ratios.hitcount || 0"
+                  :duration="1000"
+                ></counto>
+                <span v-if="ratios.hitcountP">.</span>
+                <counto
+                  v-if="ratios.hitcountP"
+                  :startVal="0"
+                  :endVal="ratios.hitcountP || 0"
+                  :duration="1000"
+                ></counto
+                >{{ ratios.hitcountWei }}
+              </van-col>
 
-            <van-col span="5" class="td"> 到达率: </van-col>
-            <van-col span="7" class="td"
-              >{{ formatNum(ratios.reachrate, 2) }}%
-            </van-col>
-            <van-col span="7" class="td"> 收视次数: </van-col>
-            <van-col span="5" class="td">
-              <counto
-                :startVal="0"
-                :endVal="ratios.hitcount || 0"
-                :duration="1000"
-              ></counto>
-              <span v-if="ratios.hitcountP">.</span>
-              <counto
-                v-if="ratios.hitcountP"
-                :startVal="0"
-                :endVal="ratios.hitcountP || 0"
-                :duration="1000"
-              ></counto
-              >{{ ratios.hitcountWei }}
-            </van-col>
+              <van-col span="7" class="td"> 用户数: </van-col>
+              <van-col span="5" class="td">
+                <counto
+                  :startVal="0"
+                  :endVal="ratios.usrcount || 0"
+                  :duration="1000"
+                ></counto>
+                <span v-if="ratios.usrcountP">.</span>
+                <counto
+                  v-if="ratios.usrcountP"
+                  :startVal="0"
+                  :endVal="ratios.usrcountP || 0"
+                  :duration="1000"
+                ></counto
+                >{{ ratios.usrcountWei }}
+              </van-col>
 
-            <van-col span="5" class="td"> 忠诚度: </van-col>
-            <van-col span="7" class="td"
-              >{{ formatNum(ratios.loyalty, 2) }}%
-            </van-col>
-            <van-col span="7" class="td"> 用户数: </van-col>
-            <van-col span="5" class="td">
-              <counto
-                :startVal="0"
-                :endVal="ratios.usrcount || 0"
-                :duration="1000"
-              ></counto>
-              <span v-if="ratios.usrcountP">.</span>
-              <counto
-                v-if="ratios.usrcountP"
-                :startVal="0"
-                :endVal="ratios.usrcountP || 0"
-                :duration="1000"
-              ></counto
-              >{{ ratios.usrcountWei }}
-            </van-col>
-
-            <van-col span="5" class="td"> 收视时长: </van-col>
-            <van-col span="7" class="td">
-              <counto
-                :startVal="0"
-                :endVal="ratios.timecount || 0"
-                :duration="1000"
-              ></counto>
-              <span v-if="ratios.timecountP">.</span>
-              <counto
-                v-if="ratios.timecountP"
-                :startVal="0"
-                :endVal="ratios.timecountP || 0"
-                :duration="1000"
-              ></counto
-              >{{ ratios.timecountWei }}
-            </van-col>
-            <van-col span="7" class="td"> 人均时长: </van-col>
-            <van-col span="5" class="td"
-              >{{ timeFormat(ratios.user_duration) }}分钟
-            </van-col>
-          </van-row>
+              <van-col span="10" class="td"> 月度活跃用户数: </van-col>
+              <van-col span="5" class="td">
+                <counto
+                  :startVal="0"
+                  :endVal="ratios.usrcount || 0"
+                  :duration="1000"
+                ></counto>
+                <span v-if="ratios.usrcountP">.</span>
+                <counto
+                  v-if="ratios.usrcountP"
+                  :startVal="0"
+                  :endVal="ratios.usrcountP || 0"
+                  :duration="1000"
+                ></counto
+                >{{ ratios.usrcountWei }}
+              </van-col>
+            </van-row>
+          </van-cell-group>
+          <van-cell-group title="传统指标">
+            <van-row>
+              <van-col span="7" class="td"> 收视时长: </van-col>
+              <van-col span="6" class="td">
+                <counto
+                  :startVal="0"
+                  :endVal="ratios.timecount || 0"
+                  :duration="1000"
+                ></counto>
+                <span v-if="ratios.timecountP">.</span>
+                <counto
+                  v-if="ratios.timecountP"
+                  :startVal="0"
+                  :endVal="ratios.timecountP || 0"
+                  :duration="1000"
+                ></counto
+                >{{ ratios.timecountWei }}
+              </van-col>
+              <van-col span="5" class="td"> 到达率: </van-col>
+              <van-col span="6" class="td"
+                >{{ formatNum(ratios.reachrate, 2) }}%
+              </van-col>
+              <van-col span="7" class="td"> 人均时长: </van-col>
+              <van-col span="6" class="td"
+                >{{ timeFormat(ratios.user_duration) }}分钟
+              </van-col>
+              <van-col span="5" class="td"> 收视率: </van-col>
+              <van-col span="6" class="td">
+                {{ formatNum(ratios.watchrate, 2) }}%
+              </van-col>
+              <van-col span="7" class="td"> 市场占有率: </van-col>
+              <van-col span="6" class="td"
+                >{{ formatNum(ratios.occrate, 2) }}%
+              </van-col>
+              <van-col span="5" class="td"> 忠诚度: </van-col>
+              <van-col span="6" class="td"
+                >{{ formatNum(ratios.loyalty, 2) }}%
+              </van-col>
+            </van-row>
+          </van-cell-group>
           <div ref="pie"></div>
           <div ref="day"></div>
         </div>
+        <div class="bottom content">
+          <img
+            src="https://djweb.smcic.net/img/smcLogo.png"
+            width="30%"
+            style="vertical-align: middle"
+            alt=""
+          />
+          <span
+            style="
+              display: inline-block;
+              width: 68%;
+              vertical-align: middle;
+              padding-left: 5px;
+              font-weight: 600;
+            "
+          >
+            本数据由<span style="white-space: nowrap"
+              >“陕西广电融媒体集团大数据平台”</span
+            >提供。技术支持 汪朝涵:17302954998
+          </span>
+        </div>
       </van-popup>
     </div>
     <div class="bottom content">
       <img
-        src="https://djweb.smcic.net/img/202104021135578156.png"
-        width="50%"
+        src="https://djweb.smcic.net/img/smcLogo.png"
+        width="30%"
         style="vertical-align: middle"
         alt=""
       />
       <span
         style="
           display: inline-block;
-          width: 45%;
+          width: 68%;
           vertical-align: middle;
           padding-left: 5px;
           font-weight: 600;
         "
       >
-        本数据由陕西广电融媒体集团大数据平台提供。技术支持 汪朝涵:17302954998
+        本数据由<span style="white-space: nowrap"
+          >“陕西广电融媒体集团大数据平台”</span
+        >提供。技术支持 汪朝涵:17302954998
       </span>
     </div>
   </div>
@@ -189,8 +228,10 @@ import {
   Row as vanRow,
   Icon as vanIcon,
   Popup as vanPopup,
+  cellGroup as vanCellGroup,
   Cell as vanCell,
 } from "vant";
+import "vant/lib/cell-group/style/index";
 import "vant/lib/cell/style/index";
 import "vant/lib/popup/style/index";
 import "vant/lib/icon/style/index";
@@ -298,15 +339,15 @@ export default {
     showPopup(i) {
       this.show = true;
       const reaios = this.platfromData[i] || {};
-      let hitcount = this.formatType(reaios.hitcount, 2);
+      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, 2);
+      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, 2);
+      let timecount = this.formatType(reaios.timecount / 60, 1);
       reaios.timecount = timecount.N;
       reaios.timecountP = timecount.P;
       reaios.timecountWei = timecount.wei + "小时";
@@ -466,6 +507,7 @@ export default {
     vanIcon,
     vanPopup,
     vanCell,
+    vanCellGroup,
   },
 };
 </script>