syj 2 éve
szülő
commit
2d615ba4a3
3 módosított fájl, 24 hozzáadás és 94 törlés
  1. 1 1
      package.json
  2. 1 1
      src/api/index.js
  3. 22 92
      src/views/NMedia/ActivityUser.vue

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "private": true,
   "scripts": {
     "serve": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
-    "build": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build & node ./saveGit.js",
+    "build": "vue-cli-service build & node ./saveGit.js",
     "lint": "vue-cli-service lint",
     "dll": "webpack --progress --config ./webpack.dll.js"
   },

+ 1 - 1
src/api/index.js

@@ -1102,7 +1102,7 @@ export function getAreaOverviewPage(data) {
 export function getUserActivity(data) {
   return ajax({
     urlType: "leverAudience",
-    url: "/cxzx-program/new-media/user/activity/list",
+    url: "/cxzx-program/new-media/user/activity/list-v2",
     method: "POST",
     data,
   });

+ 22 - 92
src/views/NMedia/ActivityUser.vue

@@ -111,32 +111,26 @@
         <el-button-group>
           <el-button
             size="small"
-            :type="numType === 'mau1' ? 'primary' : 'plain'"
-            @click="() => selectNumType('mau1')"
+            :type="numType === 1 ? 'primary' : 'plain'"
+            @click="() => selectNumType(1)"
           >
             日活跃用户数
           </el-button>
           <el-button
             size="small"
-            :type="numType === 'mau7' ? 'primary' : 'plain'"
-            @click="() => selectNumType('mau7')"
+            :type="numType === 2 ? 'primary' : 'plain'"
+            @click="() => selectNumType(2)"
           >
             周活跃用户数
           </el-button>
           <el-button
             size="small"
-            :type="numType === 'mau30' ? 'primary' : 'plain'"
-            @click="() => selectNumType('mau30')"
+            :type="numType === 3 ? 'primary' : 'plain'"
+            @click="() => selectNumType(3)"
           >
             月活跃用户数
           </el-button>
-          <el-button
-            size="small"
-            :type="numType === 'total' ? 'primary' : 'plain'"
-            @click="() => selectNumType('total')"
-          >
-            累积用户数
-          </el-button>
+          
         </el-button-group>
       </div>
       <br />
@@ -170,7 +164,7 @@
           show-overflow-tooltip
         >
           <template #default="scope">
-            <span v-text="scope.row.date || '-'"></span>
+            <span v-text="scope.row.udt || '-'"></span>
           </template>
         </el-table-column>
         <el-table-column
@@ -187,87 +181,29 @@
           prop="upgradeUser"
           header-align="center"
           align="center"
-          label="活跃用户数"
+          label="活跃用户数"
           show-overflow-tooltip
         >
           <template #default="scope">
             <countTo
-              :startVal="scope.row.mau1 || 0"
-              :endVal="scope.row.mau1 || 0"
+              :startVal="scope.row.activityUser || 0"
+              :endVal="scope.row.activityUser || 0"
               :duration="100"
             ></countTo>
           </template>
         </el-table-column>
         <el-table-column
-          label="日活跃度"
-          header-align="center"
-          align="center"
-          prop="mau1"
-        >
-        <template #default="scope">
-            {{ (100 * scope.row.mau1 / scope.row.total).toFixed(2) }}%
-          </template>
-          
-        </el-table-column>
-        <el-table-column
-          label="日活/月活"
+          label="活跃度"
           header-align="center"
           align="center"
           prop="mau1"
         >
         <template #default="scope">
-            {{ (100 * scope.row.mau1 / scope.row.mau30).toFixed(2) }}%
+            {{ (100 * scope.row.activityUser / scope.row.totalUser).toFixed(2) }}%
           </template>
           
         </el-table-column>
-        <el-table-column
-          label="周活跃用户数"
-          header-align="center"
-          align="center"
-          prop="mau7"
-        >
-          <template #default="scope">
-            <countTo
-              :startVal="scope.row.mau7 || 0"
-              :endVal="scope.row.mau7 || 0"
-              :duration="100"
-            ></countTo>
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="周活跃度"
-          header-align="center"
-          align="center"
-          prop="startTimes"
-        >
-          <template #default="scope">
-            {{ (100 * scope.row.mau7 / scope.row.total).toFixed(2) }}%
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="月活跃用户数"
-          header-align="center"
-          align="center"
-          prop="mau30"
-        >
-          <template #default="scope">
-            <countTo
-              :startVal="scope.row.mau30 || 0"
-              :endVal="scope.row.mau30 || 0"
-              :duration="100"
-            ></countTo>
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="月活跃度"
-          header-align="center"
-          align="center"
-          prop="startTimes"
-        >
-          <template #default="scope">
-            {{ (100 * scope.row.mau30 / scope.row.total).toFixed(2) }}%
-          </template>
-        </el-table-column>
+        
         <el-table-column
           label="累计用户数"
           header-align="center"
@@ -276,8 +212,8 @@
         >
           <template #default="scope">
             <countTo
-              :startVal="scope.row.total || 0"
-              :endVal="scope.row.total || 0"
+              :startVal="scope.row.totalUser || 0"
+              :endVal="scope.row.totalUser || 0"
               :duration="100"
             ></countTo>
           </template>
@@ -324,7 +260,7 @@ export default {
     return {
       lastParams: {},
       table: [],
-      numType: "mau1",
+      numType: 1,
       form: {
         app: "",
         version: [],
@@ -391,15 +327,8 @@ export default {
     },
     selectNumType(type) {
       this.numType = type;
-      let resChart = this.table;
-        let keyList = [],
-          valueList = [];
-        if ((resChart || []).length && chart && chart.clear) chart.clear();
-        resChart.map(v => {
-          keyList.push(v.date);
-          valueList.push(v[this.numType]);
-        });
-        this.createImage(keyList, valueList, '');
+        chart.clear();
+        this.onSubmit()
       
     },
     onSubmit() {
@@ -410,6 +339,7 @@ export default {
         manufacturer: this.form.channel == -1 ? undefined : this.form.channel,
         version: this.form.version == -1 ? undefined : this.form.version,
         lib: this.form.client == -1 ? undefined : this.form.client,
+        dtType: this.numType
       };
       
       getUserActivity(this.lastParams).then(resChart => {
@@ -420,8 +350,8 @@ export default {
         if ((resChart || []).length && chart && chart.clear) chart.clear();
        
         resChart.map(v => {
-          keyList.push(v.date);
-          valueList.push(v[this.numType]);
+          keyList.push(v.udt);
+          valueList.push(v['activityUser']);
         });
         this.createImage(keyList, valueList, '');
       });