liyongli 3 лет назад
Родитель
Сommit
c700ac8c1a

+ 2 - 0
src/views/AdvertisingEye/components/allTrend.vue

@@ -244,6 +244,7 @@ export default {
         yAxis: {
         yAxis: {
           type: "value",
           type: "value",
           scale: true,
           scale: true,
+          name: '单位:' + this.hard_list[this.hard_act].unit,
           axisLabel: {
           axisLabel: {
             formatter: arr => {
             formatter: arr => {
               return this.formatNum(arr);
               return this.formatNum(arr);
@@ -335,6 +336,7 @@ export default {
         },
         },
         yAxis: {
         yAxis: {
           type: "value",
           type: "value",
+          name: '单位:' + this.soft_list[this.soft_act].unit,
           scale: true,
           scale: true,
           axisLabel: {
           axisLabel: {
             formatter: arr => {
             formatter: arr => {

+ 2 - 0
src/views/AdvertisingEye/components/allTrendB.vue

@@ -234,6 +234,7 @@ export default {
         },
         },
         color: ["#1b9ade", "#fd5555"],
         color: ["#1b9ade", "#fd5555"],
         yAxis: {
         yAxis: {
+          name: '单位:' + this.hard_list[this.hard_act].unit,
           type: "value",
           type: "value",
           scale: true,
           scale: true,
           axisLabel: {
           axisLabel: {
@@ -326,6 +327,7 @@ export default {
         yAxis: {
         yAxis: {
           type: "value",
           type: "value",
           scale: true,
           scale: true,
+          name: '单位:' + this.soft_list[this.soft_act].unit,
           axisLabel: {
           axisLabel: {
             formatter: arr => {
             formatter: arr => {
               return this.formatNum(arr);
               return this.formatNum(arr);

+ 18 - 12
src/views/AdvertisingEye/components/comTrendWeek.vue

@@ -107,18 +107,23 @@ export default {
       let key = this.week_list[this.week_act].proportionType || "";
       let key = this.week_list[this.week_act].proportionType || "";
       var option = {
       var option = {
         tooltip: {
         tooltip: {
-          trigger: "item",
-          formatter: obj => {
-            let v = obj.value || 0;
-            if (!isNaN(v)) v = v - 0;
-            return (
-              obj.seriesName +
-              "<br />" +
-              obj.name +
-              "<br />" +
-              (v.toFixed(2) - 0) +
-              this.week_list[this.week_act].unit
-            );
+          trigger: "axis",
+          textStyle: {
+            color: "#000000",
+          },
+          backgroundColor: "rgba(255,255,255,.8)",
+          borderColor: "#1b9ade",
+          borderWidth: 1,
+          formatter: li => {
+            let out = "";
+            for (let i = 0; i < li.length; i++) {
+                const v = li[i];
+                let val = isNaN(v.value) ? 0 : Number(v.value);
+                if(val > 100000000) val = (val/100000000).toFixed(2) - 0 + '亿';
+                if(val > 10000) val = (val/10000).toFixed(2) - 0 + '万';
+                out += v.seriesName + ": " + val + this.week_list[this.week_act].unit + '<br />';
+            }
+            return out
           },
           },
         },
         },
         legend: {
         legend: {
@@ -132,6 +137,7 @@ export default {
         },
         },
         yAxis: {
         yAxis: {
           type: "value",
           type: "value",
+          name: '单位:' + this.week_list[this.week_act].unit
         },
         },
         series: list.map((v, i) => {
         series: list.map((v, i) => {
           return {
           return {

+ 2 - 2
src/views/HardAdvertisement/HardAdvertisement.vue

@@ -233,7 +233,7 @@
                             customer_list[customer_act].customerType ===
                             customer_list[customer_act].customerType ===
                               'timeSize'
                               'timeSize'
                           "
                           "
-                          >{{ (item.timeSize / 1000).toFixed(2) }}</span
+                          >{{ (item.timeSize / 60000).toFixed(2) }}</span
                         >
                         >
                         <span
                         <span
                           v-if="
                           v-if="
@@ -290,7 +290,7 @@
                             customer_list[customer_act].customerType ===
                             customer_list[customer_act].customerType ===
                               'timeSize'
                               'timeSize'
                           "
                           "
-                          >{{ (item.timeSize / 1000).toFixed(2) }}</span
+                          >{{ (item.timeSize / 60000).toFixed(2) }}</span
                         >
                         >
                         <span
                         <span
                           v-if="
                           v-if="