소스 검색

Merge branch '0601Action' into 11/24SAAS

mo 2 년 전
부모
커밋
bc06b79c4a
4개의 변경된 파일153개의 추가작업 그리고 32개의 파일을 삭제
  1. 2 2
      src/views/main/cloudDate/index.vue
  2. 1 1
      src/views/main/cloudDate/modals/headers.vue
  3. 144 27
      src/views/main/cloudDate/organMemberList.vue
  4. 6 2
      src/views/main/constant.js

+ 2 - 2
src/views/main/cloudDate/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
-    <allDate v-permission="'studentManage/getCloudStudyStudentOverView'" class="marginBottom20" />
-    <organMemberList v-permission="'studentManage/getCloudStudyStudentOverViewList'"/>
+    <!-- <allDate v-permission="'studentManage/getCloudStudyStudentOverView'" class="marginBottom20" /> -->
+    <organMemberList v-permission="'studentManage/getCloudStudyStudentOverView'"/>
     <!-- <organDate  v-permission="'studentManage/organStudentOverView'"  class="marginBottom20"/>
     <activeUserNum  v-permission="'newIndex/clound'"  class="marginBottom20" />
     <organRanking  v-permission="'organStudentOverView'" /> -->

+ 1 - 1
src/views/main/cloudDate/modals/headers.vue

@@ -39,7 +39,7 @@ export default {
   },
   async mounted() {
     await this.$store.dispatch("setBranchs");
-    const arr = [36,38,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]
     this.specialList = this.selects.branchs.filter((item) => {
       return arr.indexOf(item.id) == -1;
     });

+ 144 - 27
src/views/main/cloudDate/organMemberList.vue

@@ -1,7 +1,45 @@
 <template>
   <div>
+    <el-card style="margin-bottom: 20px">
+      <headers title="数据总览"  @changeOrgan="changeOrgan" :special="true"/>
+      <div
+        class="wall"
+        style="height: 68px"
+        v-if="JSON.stringify(items) == '{}'"
+      >
+        暂无数据
+      </div>
+      <!--
+          -->
+      <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>
+            {{ 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>
+      </statistic>
+    </el-card>
+
     <el-card>
-      <headers title="分部数据" @changeOrgan="changeOrgan" :special="true" />
+      <headers title="分部数据"  :hidenOrgan="true"/>
       <div class="tableWrap">
         <el-table
           style="width: 100%"
@@ -27,7 +65,7 @@
           <el-table-column
             align="center"
             prop="totalStudentNum"
-            label="分部学员总数"
+            label="学员总数"
           >
             <!-- <template slot="header" slot-scope="slot">
               <div class="titleCell">
@@ -49,18 +87,19 @@
               </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="effectiveStudentNum"
+            label="有效学员数"
+          >
+          </el-table-column>
+          <el-table-column
             align="center"
-            prop="effectiveVipStudentNum"
-            label="生效中会员人数"
-          ></el-table-column>
+            prop="vipStudentNum"
+            label="会员总人数"
+          >
+          </el-table-column>
+
           <el-table-column
             align="center"
             prop="activeStudentNum"
@@ -68,9 +107,11 @@
           >
             <template slot="header" slot-scope="slot">
               <div class="titleCell">
-                <span>活跃人数</span>
+                <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="
@@ -84,7 +125,33 @@
               </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"
@@ -99,15 +166,21 @@
   </div>
 </template>
 <script>
-import headers from "./modals/headers.vue";
 import pagination from "@/components/Pagination/index";
 import { getOrganMemberList } from "../api";
 import { Export } from "@/utils/downLoadFile";
+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"],
   components: {
     headers,
     pagination,
+    countTo,
   },
   data() {
     return {
@@ -123,31 +196,44 @@ export default {
       searchList: {
         cloudStudyUseStudentDuty: "DESC",
       },
-      tenantId:''
+      tenantId: "",
+      dataList: {},
+      active: "",
     };
   },
   mounted() {
-   this.tenantId =  this.$helpers.tenantId
+    this.tenantId = this.$helpers.tenantId;
     this.getList();
   },
   methods: {
     async getList() {
+      /**
+       * try {
+      const res = await getCloudStudyStudentOverView();
+      this.dataList = res.data;
+    } catch (e) {
+      console.log(e);
+    }
+       */
       try {
-        const arr = [36,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56]
-        const res = await getOrganMemberList({
+        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.rows;
-        // this.rules.total = res.data.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) {
         console.log(e);
@@ -196,6 +282,37 @@ export default {
         name: "organRankDetail",
       });
     },
+    numeral(val) {
+      return numeral(val);
+    },
+  },
+  computed: {
+    items() {
+      let obj = {};
+      //        "eVipStudentNum",
+      let arr = [
+        "totalStudentNum",
+        "effectiveStudentNum",
+        "vipStudentNum",
+        "cloudStudyLivelyStudentNum",
+        "effectiveVipStudentNum",
+        "waitActivateVipStudentNum",
+        // "newCloudStudyStudentNum",
+        // "vipStudentRate",
+        "cloudStudyUseStudentNum",
+        "cloudStudyTodayUseStudentNum",
+      ];
+      arr.forEach((str) => {
+        if (this.dataList[str] + "") {
+          obj[str] = {
+            title: titles[str],
+            percent: this.dataList[str],
+            desc: descs[str],
+          };
+        }
+      });
+      return obj;
+    },
   },
 };
 </script>

+ 6 - 2
src/views/main/constant.js

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