liyongli 2 年之前
父节点
当前提交
b243bf8643
共有 3 个文件被更改,包括 341 次插入134 次删除
  1. 111 9
      src/views/report/Traditional/index.vue
  2. 111 113
      src/views/report/TraditionalAndXian/index.vue
  3. 119 12
      src/views/report/TraditionalXian/index.vue

+ 111 - 9
src/views/report/Traditional/index.vue

@@ -154,12 +154,30 @@
                 <van-col span="5" class="td">
                   {{ ratios.timecount }}小时
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.timecount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.timecount_compare }}
+                </van-col>
                 <van-col span="7" class="td" style="text-align: right">
                   收视总次数:
                 </van-col>
                 <van-col span="5" class="td">
                   {{ ratios.hitcount }}
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.hitcount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.hitcount_compare }}
+                </van-col>
 
                 <van-col span="7" class="td" style="text-align: right">
                   周活跃户数:
@@ -167,37 +185,112 @@
                 <van-col span="5" class="td">
                   {{ ratios.usrcount }}
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.usrcount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.usrcount_compare }}
+                </van-col>
 
                 <van-col span="7" class="td" style="text-align: right">
                   周接触频次:
                 </van-col>
                 <van-col span="5" class="td">
-                  {{ formatType1(ratios.touchfreq, 1) }}次
+                  {{ formatType1(ratios.touchfreq, 2) }}次
+                </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.touchfreq_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.touchfreq_compare }}
                 </van-col>
               </van-row>
             </van-cell-group>
             <van-cell-group title="传统指标">
               <van-row>
-                <van-col span="5" class="td"> 到达率: </van-col>
-                <van-col span="5" class="td"
+                <van-col span="7" class="td" style="text-align: right">
+                  到达率:
+                </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="10"
+                  class="td"
+                  :style="
+                    ratios.reachrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.reachrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  周人均时长:
+                </van-col>
                 <van-col span="7" class="td"
                   >{{ timeFormat(ratios.user_duration, 0) }}分钟
                 </van-col>
-                <van-col span="5" class="td"> 收视率: </van-col>
-                <van-col span="5" class="td">
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.user_duration_ring > 0
+                      ? 'color: red'
+                      : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.user_duration_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  收视率:
+                </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="10"
+                  class="td"
+                  :style="
+                    ratios.watchrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.watchrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  市场占有率:
+                </van-col>
                 <van-col span="7" class="td"
                   >{{ formatNum(ratios.occrate, 2) }}%
                 </van-col>
-                <van-col span="5" class="td"> 忠诚度: </van-col>
-                <van-col span="5" class="td"
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.occrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.occrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  忠诚度:
+                </van-col>
+                <van-col span="7" class="td"
                   >{{ formatNum(ratios.loyalty, 2) }}%
                 </van-col>
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.loyalty_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.loyalty_compare }}
+                </van-col>
               </van-row>
             </van-cell-group>
             <div ref="pie"></div>
@@ -216,6 +309,14 @@
           </div>
         </van-popup>
       </div>
+      
+      <p
+        class="content"
+        :style="
+          'font-weight: 700; padding: 0.5em 3px;font-size: ' + fontSize + 'px;'
+        "
+        v-html="title.dataSource"
+      ></p>
       <div class="bottom content">
         本数据由<span style="color: red">“陕西广电融媒体集团大数据平台”</span
         >提供。
@@ -302,6 +403,7 @@ export default {
           name: res.name || "",
           title: res.title || "",
           desc: res.desc || "",
+          dataSource: res.dataSource || ""
         };
         this.title = title;
         this.platfromData = res.list || [];

+ 111 - 113
src/views/report/TraditionalAndXian/index.vue

@@ -116,105 +116,6 @@
             </van-col>
           </van-row>
         </div>
-        <van-popup
-          :style="{ height: '100%', width: '100%' }"
-          position="right"
-          v-model="show1"
-        >
-          <div class="main">
-            <van-cell
-              title-style="flex: 3"
-              :title="ratios1.schedulename"
-              :label="ratios1.channelname"
-            >
-              <div
-                @click="show = false"
-                :style="
-                  'float:left;color: #5470c6;word-break: normal;text-align: justify;cursor:pointer;font-size:' +
-                  fontSize +
-                  'px'
-                "
-              >
-                <van-icon name="revoke" />
-                返回
-              </div>
-              <div
-                :style="
-                  'width: 100%; text-align: center;font-size:' + fontSize + 'px'
-                "
-              >
-                {{ ratios.channelname }}
-              </div>
-            </van-cell>
-            <van-cell-group title="视听收视新指标">
-              <van-row>
-                <van-col span="7" class="td" style="text-align: right">
-                  收视总时长:
-                </van-col>
-                <van-col span="5" class="td">
-                  {{ ratios1.timecount }}小时
-                </van-col>
-                <van-col span="7" class="td" style="text-align: right">
-                  收视总次数:
-                </van-col>
-                <van-col span="5" class="td">
-                  {{ ratios1.hitcount }}
-                </van-col>
-
-                <van-col span="7" class="td" style="text-align: right">
-                  周活跃户数:
-                </van-col>
-                <van-col span="5" class="td">
-                  {{ ratios1.usrcount }}
-                </van-col>
-
-                <van-col span="7" class="td" style="text-align: right">
-                  周接触频次:
-                </van-col>
-                <van-col span="5" class="td">
-                  {{ formatType1(ratios1.touchfreq, 1) }}次
-                </van-col>
-              </van-row>
-            </van-cell-group>
-            <van-cell-group title="传统指标">
-              <van-row>
-                <van-col span="5" class="td"> 到达率: </van-col>
-                <van-col span="5" class="td"
-                  >{{ formatNum(ratios1.reachrate, 2) }}%
-                </van-col>
-                <van-col span="7" class="td"> 周人均时长: </van-col>
-                <van-col span="7" class="td"
-                  >{{ timeFormat(ratios1.user_duration, 0) }}分钟
-                </van-col>
-                <van-col span="5" class="td"> 收视率: </van-col>
-                <van-col span="5" class="td">
-                  {{ formatNum(ratios1.watchrate, 2) }}%
-                </van-col>
-                <van-col span="7" class="td"> 市场占有率: </van-col>
-                <van-col span="7" class="td"
-                  >{{ formatNum(ratios1.occrate, 2) }}%
-                </van-col>
-                <van-col span="5" class="td"> 忠诚度: </van-col>
-                <van-col span="5" class="td"
-                  >{{ formatNum(ratios1.loyalty, 2) }}%
-                </van-col>
-              </van-row>
-            </van-cell-group>
-            <div ref="pie"></div>
-            <div ref="day"></div>
-          </div>
-
-          <div class="bottom content">
-            本数据由<span style="color: red"
-              >“陕西广电融媒体集团大数据平台”</span
-            >提供。
-            <p>
-              技术支持:
-              <span style="white-space: nowrap">白帆13325452244 </span>
-              <span style="white-space: nowrap">陈科18629350958。</span>
-            </p>
-          </div>
-        </van-popup>
       </div>
     </div>
 
@@ -325,17 +226,22 @@
               :title="ratios.schedulename"
               :label="ratios.channelname"
             >
-              
-            <div
+              <div
                 @click="show = false"
                 :style="
-                  'float:left;color: #5470c6;word-break: normal;text-align: justify;cursor:pointer;font-size:' + fontSize + 'px'
+                  'float:left;color: #5470c6;word-break: normal;text-align: justify;cursor:pointer;font-size:' +
+                  fontSize +
+                  'px'
                 "
               >
                 <van-icon name="revoke" />
                 返回
               </div>
-              <div :style="'width: 100%; text-align: center;font-size:' + fontSize + 'px'">
+              <div
+                :style="
+                  'width: 100%; text-align: center;font-size:' + fontSize + 'px'
+                "
+              >
                 {{ ratios.channelname }}
               </div>
             </van-cell>
@@ -347,12 +253,30 @@
                 <van-col span="5" class="td">
                   {{ ratios.timecount }}小时
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.timecount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.timecount_compare }}
+                </van-col>
                 <van-col span="7" class="td" style="text-align: right">
                   收视总次数:
                 </van-col>
                 <van-col span="5" class="td">
                   {{ ratios.hitcount }}
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.hitcount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.hitcount_compare }}
+                </van-col>
 
                 <van-col span="7" class="td" style="text-align: right">
                   周活跃户数:
@@ -360,6 +284,15 @@
                 <van-col span="5" class="td">
                   {{ ratios.usrcount }}
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.usrcount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.usrcount_compare }}
+                </van-col>
 
                 <van-col span="7" class="td" style="text-align: right">
                   周接触频次:
@@ -367,30 +300,96 @@
                 <van-col span="5" class="td">
                   {{ formatType1(ratios.touchfreq, 2) }}次
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.touchfreq_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.touchfreq_compare }}
+                </van-col>
               </van-row>
             </van-cell-group>
             <van-cell-group title="传统指标">
               <van-row>
-                <van-col span="5" class="td"> 到达率: </van-col>
-                <van-col span="5" class="td"
+                <van-col span="7" class="td" style="text-align: right">
+                  到达率:
+                </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="10"
+                  class="td"
+                  :style="
+                    ratios.reachrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.reachrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  周人均时长:
+                </van-col>
                 <van-col span="7" class="td"
                   >{{ timeFormat(ratios.user_duration, 0) }}分钟
                 </van-col>
-                <van-col span="5" class="td"> 收视率: </van-col>
-                <van-col span="5" class="td">
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.user_duration_ring > 0
+                      ? 'color: red'
+                      : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.user_duration_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  收视率:
+                </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="10"
+                  class="td"
+                  :style="
+                    ratios.watchrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.watchrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  市场占有率:
+                </van-col>
                 <van-col span="7" class="td"
                   >{{ formatNum(ratios.occrate, 2) }}%
                 </van-col>
-                <van-col span="5" class="td"> 忠诚度: </van-col>
-                <van-col span="5" class="td"
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.occrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.occrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  忠诚度:
+                </van-col>
+                <van-col span="7" class="td"
                   >{{ formatNum(ratios.loyalty, 2) }}%
                 </van-col>
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.loyalty_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.loyalty_compare }}
+                </van-col>
               </van-row>
             </van-cell-group>
             <div ref="pie"></div>
@@ -457,10 +456,8 @@ export default {
       fene: false,
       fontSize: 17,
       show: false,
-      show1: false,
       charts: undefined,
       ratios: {},
-      ratios1: {},
       platfromData: [],
       platfromData1: [],
       color: ["#ff0036", "#ff9b00", "#ffcc00"],
@@ -605,6 +602,7 @@ export default {
       reaios.usrcount = this.formatType1(reaios.usrcount, 1);
       reaios.timecount = this.formatType1(reaios.timecount / 60, 0);
       this.ratios = reaios;
+      console.log(reaios);
       this.$nextTick(() => {
         this.upEcharts();
         this.dayEchartsFun();

+ 119 - 12
src/views/report/TraditionalXian/index.vue

@@ -127,20 +127,26 @@
               :title="ratios.schedulename"
               :label="ratios.channelname"
             >
-              
-            <div
+              <div
                 @click="show = false"
                 :style="
-                  'float:left;color: #5470c6;word-break: normal;text-align: justify;cursor:pointer;font-size:' + fontSize + 'px'
+                  'float:left;color: #5470c6;word-break: normal;text-align: justify;cursor:pointer;font-size:' +
+                  fontSize +
+                  'px'
                 "
               >
                 <van-icon name="revoke" />
                 返回
               </div>
-              <div :style="'width: 100%; text-align: center;font-size:' + fontSize + 'px'">
+              <div
+                :style="
+                  'width: 100%; text-align: center;font-size:' + fontSize + 'px'
+                "
+              >
                 {{ ratios.channelname }}
               </div>
             </van-cell>
+
             <van-cell-group title="视听收视新指标">
               <van-row>
                 <van-col span="7" class="td" style="text-align: right">
@@ -149,12 +155,30 @@
                 <van-col span="5" class="td">
                   {{ ratios.timecount }}小时
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.timecount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.timecount_compare }}
+                </van-col>
                 <van-col span="7" class="td" style="text-align: right">
                   收视总次数:
                 </van-col>
                 <van-col span="5" class="td">
                   {{ ratios.hitcount }}
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.hitcount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.hitcount_compare }}
+                </van-col>
 
                 <van-col span="7" class="td" style="text-align: right">
                   周活跃户数:
@@ -162,6 +186,15 @@
                 <van-col span="5" class="td">
                   {{ ratios.usrcount }}
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.usrcount_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.usrcount_compare }}
+                </van-col>
 
                 <van-col span="7" class="td" style="text-align: right">
                   周接触频次:
@@ -169,30 +202,96 @@
                 <van-col span="5" class="td">
                   {{ formatType1(ratios.touchfreq, 2) }}次
                 </van-col>
+                <van-col
+                  span="12"
+                  class="td"
+                  :style="
+                    ratios.touchfreq_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.touchfreq_compare }}
+                </van-col>
               </van-row>
             </van-cell-group>
             <van-cell-group title="传统指标">
               <van-row>
-                <van-col span="5" class="td"> 到达率: </van-col>
-                <van-col span="5" class="td"
+                <van-col span="7" class="td" style="text-align: right">
+                  到达率:
+                </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="10"
+                  class="td"
+                  :style="
+                    ratios.reachrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.reachrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  周人均时长:
+                </van-col>
                 <van-col span="7" class="td"
                   >{{ timeFormat(ratios.user_duration, 0) }}分钟
                 </van-col>
-                <van-col span="5" class="td"> 收视率: </van-col>
-                <van-col span="5" class="td">
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.user_duration_ring > 0
+                      ? 'color: red'
+                      : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.user_duration_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  收视率:
+                </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="10"
+                  class="td"
+                  :style="
+                    ratios.watchrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.watchrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  市场占有率:
+                </van-col>
                 <van-col span="7" class="td"
                   >{{ formatNum(ratios.occrate, 2) }}%
                 </van-col>
-                <van-col span="5" class="td"> 忠诚度: </van-col>
-                <van-col span="5" class="td"
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.occrate_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.occrate_compare }}
+                </van-col>
+                <van-col span="7" class="td" style="text-align: right">
+                  忠诚度:
+                </van-col>
+                <van-col span="7" class="td"
                   >{{ formatNum(ratios.loyalty, 2) }}%
                 </van-col>
+                <van-col
+                  span="10"
+                  class="td"
+                  :style="
+                    ratios.loyalty_ring > 0 ? 'color: red' : 'color: #04c15f'
+                  "
+                >
+                  {{ ratios.loyalty_compare }}
+                </van-col>
               </van-row>
             </van-cell-group>
             <div ref="pie"></div>
@@ -212,6 +311,13 @@
           </div>
         </van-popup>
       </div>
+      <p
+        class="content"
+        :style="
+          'font-weight: 700; padding: 0.5em 3px;font-size: ' + fontSize + 'px;'
+        "
+        v-html="title.dataSource"
+      ></p>
       <div class="bottom content">
         本数据由<span style="color: red">“陕西广电融媒体集团大数据平台”</span
         >提供。
@@ -299,6 +405,7 @@ export default {
           name: res.name || "",
           title: res.title || "",
           desc: res.desc || "",
+          dataSource: res.dataSource || "",
         };
         this.title = title;
         this.platfromData = res.list || [];