Explorar o código

再改一版

1
mo %!s(int64=3) %!d(string=hai) anos
pai
achega
08bf4dfe00
Modificáronse 2 ficheiros con 85 adicións e 57 borrados
  1. 81 54
      src/views/main/cloudDate/organMemberList.vue
  2. 4 3
      src/views/main/constant.js

+ 81 - 54
src/views/main/cloudDate/organMemberList.vue

@@ -1,7 +1,6 @@
 <template>
   <div>
-
-    <el-card style="margin-bottom:20px;">
+    <el-card style="margin-bottom: 20px">
       <headers title="数据总览" :hidenOrgan="true" />
       <div
         class="wall"
@@ -13,8 +12,13 @@
       <!--
           -->
       <statistic :col="4" class="statistic" :cols="0">
-        <statistic-item v-for="(item, key) in items" :key="key"  @click="active = key" :class="{ active: active === key }">
-          <span v-if="key!=='vipStudentRate'">
+        <statistic-item
+          v-for="(item, key) in items"
+          :key="key"
+          @click="active = key"
+          :class="{ active: active === key }"
+        >
+          <span>
             {{ item.title + "(人)" }}
             <el-tooltip
               v-if="item.desc"
@@ -28,20 +32,6 @@
               />
             </el-tooltip>
           </span>
-            <span v-else>
-            {{ item.title + "(%)" }}
-            <el-tooltip
-              v-if="item.desc"
-              :content="item.desc"
-              :open-delay="0.3"
-              placement="top"
-            >
-              <i
-                style="margin-left: 5px; cursor: pointer"
-                class="el-icon-warning-outline"
-              />
-            </el-tooltip>
-          </span>
 
           <span> <count-to :endVal="item.percent || 0" /> </span>
         </statistic-item>
@@ -75,7 +65,7 @@
           <el-table-column
             align="center"
             prop="totalStudentNum"
-            label="分部学员总数"
+            label="学员总数"
           >
             <!-- <template slot="header" slot-scope="slot">
               <div class="titleCell">
@@ -97,18 +87,20 @@
               </div>
             </template> -->
           </el-table-column>
-          <el-table-column align="center" prop="vipStudentNum" label="会员总数" >
-          </el-table-column>
-                <el-table-column
+
+
+          <el-table-column
             align="center"
-            prop="waitActivateVipStudentNum"
-            label="待激活会员人数"
-          ></el-table-column>
-                <el-table-column
+            prop="vipStudentNum"
+            label="会员总人数"
+          >
+          </el-table-column>
+                   <el-table-column
             align="center"
-            prop="effectiveVipStudentNum"
-            label="生效中会员人数"
-          ></el-table-column>
+            prop="effectiveStudentNum"
+            label="有效学员数"
+          >
+          </el-table-column>
           <el-table-column
             align="center"
             prop="activeStudentNum"
@@ -118,7 +110,9 @@
               <div class="titleCell">
                 <span>活跃人数</span>
                 <el-tooltip placement="top" popper-class="mTooltip">
-                  <div slot="content">过去四周内有三周及以上每周训练时长超过60分钟为活跃学员</div>
+                  <div slot="content">
+                    过去四周内有三周及以上每周训练时长超过60分钟为活跃学员
+                  </div>
                   <i
                     class="el-icon-question micon el-tooltip"
                     style="
@@ -132,7 +126,31 @@
               </div>
             </template>
           </el-table-column>
+                  <el-table-column
+            align="center"
+            prop="effectiveVipStudentNum"
+            label="生效中会员人数"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="waitActivateVipStudentNum"
+            label="待激活会员人数"
+          ></el-table-column>
 
+          <el-table-column
+            align="center"
+            prop="vipStudentRate"
+            label="会员人数占比"
+          >
+            <template slot-scope="scope">
+              <div>{{ numeral(scope.row.vipStudentRate || 0).format('0.00') }}%</div>
+            </template>
+          </el-table-column>
+                    <el-table-column
+            align="center"
+            prop="totalStudentNum"
+            label="今日使用人数"
+          ></el-table-column>
         </el-table>
         <!-- <pagination
           :autoScroll="false"
@@ -147,7 +165,6 @@
   </div>
 </template>
 <script>
-
 import pagination from "@/components/Pagination/index";
 import { getOrganMemberList } from "../api";
 import { Export } from "@/utils/downLoadFile";
@@ -155,13 +172,14 @@ import headers from "./modals/headers.vue";
 import countTo from "vue-count-to";
 import { descs, titles } from "../constant";
 import { getCloudStudyStudentOverView } from "../api";
+import numeral from "numeral";
 import qs from "qs";
 export default {
-    props: ["data"],
+  props: ["data"],
   components: {
     headers,
     pagination,
-     countTo
+    countTo,
   },
   data() {
     return {
@@ -177,13 +195,13 @@ export default {
       searchList: {
         cloudStudyUseStudentDuty: "DESC",
       },
-      tenantId:'',
-       dataList:{},
-      active:''
+      tenantId: "",
+      dataList: {},
+      active: "",
     };
   },
   mounted() {
-   this.tenantId =  this.$helpers.tenantId
+    this.tenantId = this.$helpers.tenantId;
     this.getList();
   },
   methods: {
@@ -197,21 +215,23 @@ export default {
     }
        */
       try {
-        const arr = [36,39,41,42,43,44,45,46,47,48,49,50,52,54,56]
+        const arr = [
+          36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 56,
+        ];
         const res = await getCloudStudyStudentOverView({
           page: 1,
           rows: 10,
           ...this.searchList,
           organIds: this.organId,
         });
-        this.tableList  = []
-      //  res.data.forEach(ele => {
-      //    if(arr.indexOf (ele.organId) == -1){
-      //      this.tableList.push(ele)
-      //    }
-      //  });
-        this.tableList = res.data.list?.rows;
-        this.rules.total = res.data.list?.total;
+        this.tableList = [];
+        //  res.data.forEach(ele => {
+        //    if(arr.indexOf (ele.organId) == -1){
+        //      this.tableList.push(ele)
+        //    }
+        //  });
+        this.tableList = res.data.list;
+        // this.rules.total = res.data.list?.total;
         this.dataList = res.data?.overView || {};
         // console.log(this.tableList)
       } catch (e) {
@@ -261,26 +281,33 @@ export default {
         name: "organRankDetail",
       });
     },
+    numeral(val){
+      return numeral(val)
+    }
   },
-   computed: {
+  computed: {
     items() {
       let obj = {};
       //        "eVipStudentNum",
       let arr = [
         "totalStudentNum",
-        "waitActivateVipStudentNum",
-        "effectiveVipStudentNum",
+        "effectiveStudentNum",
         "vipStudentNum",
         "cloudStudyLivelyStudentNum",
+        "effectiveVipStudentNum",
+        "waitActivateVipStudentNum",
         // "newCloudStudyStudentNum",
-        // "cloudStudyTodayUseStudentNum",
-        "effectiveStudentNum",
-        "vipStudentRate",
+        // "vipStudentRate",
         "cloudStudyUseStudentNum",
+        "cloudStudyTodayUseStudentNum",
       ];
       arr.forEach((str) => {
-        if (this.dataList[str]+'') {
-          obj[str] ={title:titles[str],percent:this.dataList[str],desc:descs[str]};
+        if (this.dataList[str] + "") {
+          obj[str] = {
+            title: titles[str],
+            percent: this.dataList[str],
+            desc: descs[str],
+          };
         }
       });
       return obj;

+ 4 - 3
src/views/main/constant.js

@@ -65,19 +65,20 @@ export const descs = {
   "totalStudentNum":"分部注册学员总人数",
   // "waitActivateVipStudentNum":'待激活会员人数',
   // "effectiveVipStudentNum":"生效中会员人数",
-  "vipStudentRate":"会员总人数/有效学员数"
+  "vipStudentRate":"会员总人数/有效学员数",
+  "effectiveStudentNum":"(进行中乐团在读学员+有剩余课时的学员+有排课次数的学员)去重"
 }
 export const titles = {
   "waitActivateVipStudentNum":'待激活会员人数',
   "effectiveVipStudentNum":"生效中会员人数",
   "vipStudentNum":'会员总人数',
   "eVipStudentNum":'试用会员人数',
-  "totalStudentNum":"分部学员总数",
+  "totalStudentNum":"学员总数",
   "cloudStudyLivelyStudentNum":'活跃学员人数 ',
   "newCloudStudyStudentNum":'今日新增使用人数',
   "cloudStudyTodayUseStudentNum":'今日使用人数',
   "cloudStudyUseStudentNum":'累计使用人数',
-  "effectiveStudentNum":'有效学数',
+  "effectiveStudentNum":'有效学数',
   "vipStudentRate":'会员人数占比'
 }