liyongli 2 rokov pred
rodič
commit
03997990db

+ 32 - 16
src/views/report/Advertisement/index.vue

@@ -1,5 +1,9 @@
 <template>
-  <div v-if="orgin.html" :style="'font-size: '+ fontSize +'px;'" class="Advertisement">
+  <div
+    v-if="orgin.html"
+    :style="'font-size: ' + fontSize + 'px;'"
+    class="Advertisement"
+  >
     <div class="item">
       <section class="title">
         <section>电视广告投放简析</section>
@@ -113,15 +117,23 @@
       </div>
     </div>
     <div class="bottom">
-        <img
-          src="http://bsddata.oss-cn-hangzhou.aliyuncs.com/yuqing_oem/images/202104021135578156.png"
-          width="50%"
-          style="vertical-align: middle;"
-          alt=""
-        />
-        <span style="display: inline-block;width: 45%;vertical-align: middle;padding-left: 5px;font-weight: 600;">
-            本数据由陕西广电融媒体集团大数据平台提供。技术支持 汪朝涵:17302954998
-        </span>
+      <img
+        src="http://bsddata.oss-cn-hangzhou.aliyuncs.com/yuqing_oem/images/202104021135578156.png"
+        width="50%"
+        style="vertical-align: middle"
+        alt=""
+      />
+      <span
+        style="
+          display: inline-block;
+          width: 45%;
+          vertical-align: middle;
+          padding-left: 5px;
+          font-weight: 600;
+        "
+      >
+        本数据由陕西广电融媒体集团大数据平台提供。技术支持 汪朝涵:17302954998
+      </span>
     </div>
   </div>
 </template>
@@ -148,20 +160,21 @@ export default {
   data() {
     return {
       orgin: {},
-      fontSize: 17
+      fontSize: 17,
     };
   },
   mounted() {
     if (!this.$route.query.auto) return;
-    this.fontSize = (document.body.offsetWidth/24).toFixed(2) - 0;
-    console.log(this.fontSize)
+    this.fontSize = (document.body.offsetWidth / 24).toFixed(2) - 0;
+    if(document.body.offsetWidth > 677) this.fontSize = 22;
+    console.log(this.fontSize);
     const time = new dayJs(this.$route.query.date);
     watermark.setWaterMark({
       w_texts: ["数据来自大数据平台"],
       w_options: {
         w_opacity: "0.1",
         w_width: 360,
-        w_height: 280
+        w_height: 280,
       },
     });
     jsonAdvertisement({
@@ -263,13 +276,13 @@ export default {
         line1F.push({
           date: v.name || "",
           type: "同比" + v.name + " vs " + v.tb_name,
-          t: v.name + '同比' + v.tb_name,
+          t: v.name + "同比" + v.tb_name,
           value: v.tb * 100,
         });
         line1L.push({
           date: v.name || "",
           type: "环比" + v.name + " vs " + v.hb_name,
-          t: v.name + '环比' + v.hb_name,
+          t: v.name + "环比" + v.hb_name,
           value: v.hb * 100,
         });
       }
@@ -341,6 +354,9 @@ export default {
   width: 90%;
   position: relative;
   z-index: 1;
+  overflow: hidden; 
+  white-space: nowrap; 
+  text-overflow: ellipsis; 
 }
 .xifenxinxiTitle .right {
   background-color: #595959;

+ 27 - 26
src/views/report/Traditional/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tv-list">
+  <div class="tv-list" :style="'font-size:' + fontSize + 'px'">
     <div class="content">
       <div class="titleTop">
         {{ date.join("-") }}
@@ -34,12 +34,10 @@
           >
             {{ v.rank }}
           </van-col>
-          <van-col
-            span="5"
-            style="font-size: 12px; line-height: 40px"
-            :class="{ td: true }"
-          >
-            {{ v.channelname }}
+          <van-col span="5" :class="{ td: true }">
+            <div :style="{fontSize: fontSize*0.7+'px',lineHeight: '3.6em'}">
+              {{ v.channelname }}
+            </div>
           </van-col>
           <van-col span="5" :class="{ td: true }">
             {{ formatNum(v.occrate, 2) }}%
@@ -160,16 +158,24 @@
         </div>
       </van-popup>
     </div>
-    <div class="bottom">
-        <img
-          src="http://bsddata.oss-cn-hangzhou.aliyuncs.com/yuqing_oem/images/202104021135578156.png"
-          width="50%"
-          style="vertical-align: middle;"
-          alt=""
-        />
-        <span style="display: inline-block;width: 45%;vertical-align: middle;padding-left: 5px;font-weight: 600;">
-            本数据由陕西广电融媒体集团大数据平台提供。技术支持 汪朝涵:17302954998
-        </span>
+    <div class="bottom content">
+      <img
+        src="http://bsddata.oss-cn-hangzhou.aliyuncs.com/yuqing_oem/images/202104021135578156.png"
+        width="50%"
+        style="vertical-align: middle"
+        alt=""
+      />
+      <span
+        style="
+          display: inline-block;
+          width: 45%;
+          vertical-align: middle;
+          padding-left: 5px;
+          font-weight: 600;
+        "
+      >
+        本数据由陕西广电融媒体集团大数据平台提供。技术支持 汪朝涵:17302954998
+      </span>
     </div>
   </div>
 </template>
@@ -200,6 +206,7 @@ export default {
   name: "tv-list",
   data() {
     return {
+      fontSize: 17,
       show: false,
       charts: undefined,
       ratios: {},
@@ -213,13 +220,15 @@ export default {
   },
   watch: {},
   mounted() {
+    if (!this.$route.query.auto) return;
+    this.fontSize = (document.body.offsetWidth / 24).toFixed(2) - 0;
+    if (document.body.offsetWidth > 677) this.fontSize = 22;
     watermark.setWaterMark({
       w_texts: ["数据来自大数据平台"],
       w_options: {
         w_opacity: "0.1",
       },
     });
-    if (!this.$route.query.auto) return;
     const time = new Date(this.$route.query.date);
     let D = new Date(time);
     const lasetDay = new Dayjs(D.getTime() - D.getDay() * 86400000);
@@ -461,7 +470,6 @@ export default {
 <style scoped>
 .tv-list {
   background-color: #fff;
-  font-size: 18px;
   padding: 5px;
   height: 100%;
   overflow-y: scroll;
@@ -471,10 +479,8 @@ export default {
   border: 4px solid #0983a8;
   padding: 10px;
   margin-top: 1em;
-  font-size: 17px;
 }
 .td {
-  font-size: 16px;
   text-align: center;
   line-height: 2.5em;
   white-space: nowrap;
@@ -515,8 +521,3 @@ export default {
   text-align: center;
 }
 </style>
-<style>
-.tv-list .van-tab {
-  font-size: 16px;
-}
-</style>