liyongli před 2 roky
rodič
revize
47b59b16a8
1 změnil soubory, kde provedl 15 přidání a 14 odebrání
  1. 15 14
      src/views/report/Advertisement/index.vue

+ 15 - 14
src/views/report/Advertisement/index.vue

@@ -59,30 +59,31 @@
           >
             <van-col span="3" v-text="i + 1"></van-col>
             <van-col span="7" v-text="item.name"></van-col>
-            <van-col span="7">
+            <van-col span="7"  :style="item.huanbi > 0 ? 'color: red': item.huanbi < 0 ? 'color: green' : ''">
               <counto
                 :startVal="0"
-                :endVal="item.fee.N || 0"
+                :endVal="item.fee1.N || 0"
                 :duration="1000"
               ></counto>
-              <span v-if="item.fee.P">.</span>
+              <span v-if="item.fee1.P">.</span>
               <counto
                 :startVal="0"
-                :endVal="item.fee.P || 0"
+                :endVal="item.fee1.P || 0"
                 :duration="1000"
               ></counto
               >{{ item.fee.wei }}
             </van-col>
-            <van-col span="7">
+            <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.huanbi.N || 0"
+                :endVal="item.huanbi1.N || 0"
                 :duration="1000"
               ></counto>
-              <span v-if="item.huanbi.P">.</span>
+              <span v-if="item.huanbi1.P">.</span>
               <counto
                 :startVal="0"
-                :endVal="item.huanbi.P || 0"
+                :endVal="item.huanbi1.P || 0"
                 :duration="1000"
               ></counto
               >{{ item.huanbi.wei }}%
@@ -183,8 +184,8 @@ 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].fee = this.formatType(brand_top.list[i].fee, 2);
-        brand_top.list[i].huanbi = this.formatType(
+        brand_top.list[i].fee1 = this.formatType(brand_top.list[i].fee, 2);
+        brand_top.list[i].huanbi1 = this.formatType(
           brand_top.list[i].huanbi * 100,
           2
         );
@@ -275,14 +276,14 @@ export default {
         const v = month_thb[i];
         line1F.push({
           date: v.name || "",
-          type: "同比" + v.name + " vs " + v.tb_name,
-          t: v.name + "同比" + v.tb_name,
+          type: "同比",
+          t: "同比",
           value: v.tb * 100,
         });
         line1L.push({
           date: v.name || "",
-          type: "环比" + v.name + " vs " + v.hb_name,
-          t: v.name + "环比" + v.hb_name,
+          type: "环比",
+          t: "环比",
           value: v.hb * 100,
         });
       }