liyongli hai 2 meses
pai
achega
406efbbc50
Modificáronse 1 ficheiros con 21 adicións e 17 borrados
  1. 21 17
      src/views/Content/index.vue

+ 21 - 17
src/views/Content/index.vue

@@ -188,8 +188,12 @@
       </el-input>
       <br />
       <br />
-      <div class="head" v-if="total">
-        <div v-for="(item, i) in keyTotal" :key="i + item.name" class="head-item">
+      <div class="head" v-if="match">
+        <div
+          v-for="(item, i) in keyTotal"
+          :key="i + item.name"
+          class="head-item"
+        >
           <div>{{ item.name }}</div>
           <div class="value">
             <!-- oriData.total.activeUser -->
@@ -573,20 +577,20 @@ export default {
       }).then(r => {
         this.total = r || [];
       });
-      getKeyTotle({
-        start: this.FormData(this.form.date[0]),
-        end: this.FormData(this.form.date[1]),
-        app: this.form.app,
-        version: this.form.version == -1 ? undefined : this.form.version,
-        lib: this.form.client == -1 ? undefined : this.form.client,
-        channelName:
-          this.form.appColumn === '不限' || !this.form.appColumn
-            ? undefined
-            : this.form.appColumn,
-        match: this.match
-      }).then(r => {
-        this.keyTotal = r || [];
-      });
+      if (this.match)
+        getKeyTotle({
+          start: this.FormData(this.form.date[0]),
+          end: this.FormData(this.form.date[1]),
+          app: this.form.app,
+          version: this.form.version == -1 ? undefined : this.form.version,
+          lib: this.form.client == -1 ? undefined : this.form.client,
+          channelName:
+            this.form.appColumn === '不限' || !this.form.appColumn
+              ? undefined
+              : this.form.appColumn,
+          match: this.match
+        }).then(r => (this.keyTotal = r || []));
+      else this.keyTotal = [];
       getContentTop10({
         app: this.form.app,
         start: this.FormData(this.form.date[0]),
@@ -924,7 +928,7 @@ export default {
       this.lastParams.lib && (url += '&lib=' + this.lastParams.lib);
       this.lastParams.channelName &&
         (url += '&channelName=' + this.lastParams.channelName);
-    this.match && (url += '&match=' + this.match);
+      this.match && (url += '&match=' + this.match);
       window.open(url);
     }
   },