liyongli 2 сар өмнө
parent
commit
06a18fa523

+ 12 - 0
src/api/index.js

@@ -925,6 +925,18 @@ export function getContentTotle(data) {
     data
   });
 }
+/**
+ * 获取大数据平台内容分析 检索关键词汇总new-media;
+ * @return {AxjxPromise}
+ */
+export function getKeyTotle(data) {
+  return ajax({
+    urlType: 'leverAudience',
+    url: '/cxzx-program/new-media/content/keyword-total',
+    method: 'POST',
+    data
+  });
+}
 /**
  * 获取大数据平台内容分析 图形;
  * @return {AxjxPromise}

+ 31 - 32
src/views/AppReport/App.vue

@@ -116,7 +116,6 @@
 import {
   appReportList,
   appReportUpdate,
-  appReportUpload,
   appReportChagngeStatus,
   appHistory
 } from '@/api/portrait';
@@ -208,37 +207,37 @@ export default {
           });
       }, 200);
     },
-    onUploadData() {
-      let userinfo = JSON.parse(parent.localStorage.userinfo || '{}');
-      if (!userinfo.loginname) {
-        ElMessage({
-          message: '请登录后再试',
-          type: 'error'
-        });
-        return;
-      }
-      if (this.t) clearTimeout(this.t);
-      this.t = setTimeout(() => {
-        this.t = clearTimeout(this.t);
-        const { id } = this.form;
-        appReportUpload({
-          id,
-          loginName: userinfo.loginname || ''
-        })
-          .then(() => {
-            ElMessage({
-              message: '成功',
-              type: 'success'
-            });
-          })
-          .catch(err => {
-            ElMessage({
-              message: err.message || '请重试',
-              type: 'error'
-            });
-          });
-      }, 200);
-    }
+    // onUploadData() {
+    //   let userinfo = JSON.parse(parent.localStorage.userinfo || '{}');
+    //   if (!userinfo.loginname) {
+    //     ElMessage({
+    //       message: '请登录后再试',
+    //       type: 'error'
+    //     });
+    //     return;
+    //   }
+    //   if (this.t) clearTimeout(this.t);
+    //   this.t = setTimeout(() => {
+    //     this.t = clearTimeout(this.t);
+    //     const { id } = this.form;
+    //     appReportUpload({
+    //       id,
+    //       loginName: userinfo.loginname || ''
+    //     })
+    //       .then(() => {
+    //         ElMessage({
+    //           message: '成功',
+    //           type: 'success'
+    //         });
+    //       })
+    //       .catch(err => {
+    //         ElMessage({
+    //           message: err.message || '请重试',
+    //           type: 'error'
+    //         });
+    //       });
+    //   }, 200);
+    // }
   },
   components: {}
 };

+ 33 - 0
src/views/Content/index.vue

@@ -188,6 +188,22 @@
       </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>{{ item.name }}</div>
+          <div class="value">
+            <!-- oriData.total.activeUser -->
+            <countTo
+              v-if="!isNaN(item.value)"
+              :startVal="0"
+              :endVal="item.value - 0"
+              :duration="1500"
+            ></countTo>
+            <span v-else v-text="item.value"></span>
+          </div>
+        </div>
+      </div>
+      <br />
       <el-table
         :data="table.records || []"
         style="width: 100%"
@@ -373,6 +389,7 @@ import {
   getContentChart,
   getContentPage,
   getContentTotle,
+  getKeyTotle,
   getAppColumn
 } from '@/api/index';
 
@@ -414,6 +431,7 @@ export default {
         client: ''
       },
       match: '',
+      keyTotal: [],
       cycle: [],
       showList: [],
       version: [],
@@ -555,6 +573,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 || [];
+      });
       getContentTop10({
         app: this.form.app,
         start: this.FormData(this.form.date[0]),
@@ -892,6 +924,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);
       window.open(url);
     }
   },