liyongli 2 years ago
parent
commit
1f811476a6

+ 26 - 10
src/views/AdvertisingEye/components/allTrend.vue

@@ -280,11 +280,19 @@ export default {
               out +=
                 "<div style='display:inline-block;width: 10px;height: 10px;border-radius: 50%;background: " +
                 c[i] +
-                "' ></div> " +
-                time[0] +
-                "-" +
-                time[1];
-              this.industryRang + 1 <= 2 ? (out += "-" + day) : "";
+                "' ></div> ";
+              if (this.industryRang + 1 <= 2) {
+                out += time[0] + "-" + time[1] + "-" + day;
+              } else {
+                let M = day - 0 + (time[1] - 0) - 1;
+                let y = time[0];
+                if (M > 12) {
+                  y++;
+                  M = M - 12;
+                }
+                M < 10 ? (M = "0" + M) : "";
+                out += y + "-" + M;
+              }
               out +=
                 ": " + val + this.hard_list[this.hard_act].unit + "<br />";
             }
@@ -353,11 +361,19 @@ export default {
               out +=
                 "<div style='display:inline-block;width: 10px;height: 10px;border-radius: 50%;background: " +
                 c[i] +
-                "' ></div> " +
-                time[0] +
-                "-" +
-                time[1];
-              this.industryRang + 1 <= 2 ? (out += "-" + day) : "";
+                "' ></div> ";
+              if (this.industryRang + 1 <= 2) {
+                out += time[0] + "-" + time[1] + "-" + day;
+              } else {
+                let M = day - 0 + (time[1] - 0) - 1;
+                let y = time[0];
+                if (M > 12) {
+                  y++;
+                  M = M - 12;
+                }
+                M < 10 ? (M = "0" + M) : "";
+                out += y + "-" + M;
+              }
               out +=
                 ": " + val + this.soft_list[this.soft_act].unit + "<br />";
             }

+ 1 - 1
src/views/AdvertisingEye/components/focus.vue

@@ -19,7 +19,7 @@
     <el-row>
       <el-col :span="12">
         <com-table
-          title="广-广告主投放top10"
+          title="广-广告主投放top10"
           :child="true"
           :tableList="hardMarster"
         >