Browse Source

Merge branch '0601Action' into 11/24SAAS

mo 3 years ago
parent
commit
f4a631bd53

+ 7 - 0
src/views/main/api.js

@@ -182,3 +182,10 @@ export const getHasFreeCourseList = (data) => request2({
   params: data
 })
 
+// 学员会员数
+export const getOrganMemberList = (data) => request2({
+  url: '/api-web/studentManage/getCloudStudyStudentOverViewList',
+  method: 'get',
+  params: data,
+  requestType:'form'
+})

+ 4 - 1
src/views/main/cloudDate/allDate.vue

@@ -11,7 +11,7 @@
       </div>
       <!--
           -->
-      <statistic :col="6" class="statistic" :cols="0">
+      <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 + "(人)" }}
@@ -64,6 +64,9 @@ export default {
       let obj = {};
       //        "eVipStudentNum",
       let arr = [
+        "totalStudentNum",
+        "waitActivateVipStudentNum",
+        "effectiveVipStudentNum",
         "vipStudentNum",
         "cloudStudyLivelyStudentNum",
         "newCloudStudyStudentNum",

+ 8 - 5
src/views/main/cloudDate/index.vue

@@ -1,9 +1,10 @@
 <template>
   <div>
     <allDate v-permission="'studentManage/getCloudStudyStudentOverView'" class="marginBottom20" />
-    <organDate  v-permission="'studentManage/organStudentOverView'"  class="marginBottom20"/>
+    <organMemberList v-permission="'studentManage/getCloudStudyStudentOverViewList'"/>
+    <!-- <organDate  v-permission="'studentManage/organStudentOverView'"  class="marginBottom20"/>
     <activeUserNum  v-permission="'newIndex/clound'"  class="marginBottom20" />
-    <organRanking  v-permission="'organStudentOverView'" />
+    <organRanking  v-permission="'organStudentOverView'" /> -->
   </div>
 </template>
 <script>
@@ -11,12 +12,14 @@ import allDate from './allDate.vue'
 import organDate from './organDate.vue'
 import activeUserNum from './activeUserNum.vue'
 import organRanking from './organRanking.vue'
+import organMemberList from './organMemberList.vue'
 export default {
   components:{
     allDate,
-    organDate,
-    activeUserNum,
-    organRanking
+    organMemberList,
+    // organDate,
+    // activeUserNum,
+    // organRanking
   },
   data(){
     return{

+ 212 - 0
src/views/main/cloudDate/organMemberList.vue

@@ -0,0 +1,212 @@
+<template>
+  <div>
+    <el-card>
+      <headers title="分部数据" @changeOrgan="changeOrgan" :special="true" />
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+          @sort-change="sortChang"
+          :default-sort="{
+            prop: 'cloudStudyUseStudentDuty',
+            order: 'descending',
+          }"
+          sortable="custom"
+        >
+          <el-table-column
+            align="center"
+            prop="organId"
+            label="分部编号"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="分部名称"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="totalStudentNum"
+            label="会员总人数"
+          >
+            <!-- <template slot="header" slot-scope="slot">
+              <div class="titleCell">
+                <span>学员总数</span>
+                <el-tooltip placement="top" popper-class="mTooltip">
+                  <div slot="content">
+                    乐团在读学员+有剩余VIP课或网管课学员去重之和
+                  </div>
+                  <i
+                    class="el-icon-question micon el-tooltip"
+                    style="
+                      font-size: 18px;
+                      color: #f56c6c;
+                      top: 2px;
+                      position: relative;
+                    "
+                  ></i>
+                </el-tooltip>
+              </div>
+            </template> -->
+          </el-table-column>
+          <el-table-column align="center" prop="vipStudentNum" label="会员总数" >
+          </el-table-column>
+                <el-table-column
+            align="center"
+            prop="waitActivateVipStudentNum"
+            label="待激活会员人数"
+          ></el-table-column>
+                <el-table-column
+            align="center"
+            prop="effectiveVipStudentNum"
+            label="生效中会员人数"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="activeStudentNum"
+            label="活跃会员"
+          >
+            <template slot="header" slot-scope="slot">
+              <div class="titleCell">
+                <span>活跃人数</span>
+                <el-tooltip placement="top" popper-class="mTooltip">
+                  <div slot="content">过去四周内有三周及以上每周训练时长超过60分钟为活跃学员</div>
+                  <i
+                    class="el-icon-question micon el-tooltip"
+                    style="
+                      font-size: 18px;
+                      color: #f56c6c;
+                      top: 2px;
+                      position: relative;
+                    "
+                  ></i>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+
+        </el-table>
+        <!-- <pagination
+          :autoScroll="false"
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        /> -->
+      </div>
+    </el-card>
+  </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 qs from "qs";
+export default {
+  components: {
+    headers,
+    pagination,
+  },
+  data() {
+    return {
+      tableList: [],
+      organId: "",
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      searchList: {
+        cloudStudyUseStudentDuty: "DESC",
+      },
+      tenantId:''
+    };
+  },
+  mounted() {
+   this.tenantId =  this.$helpers.tenantId
+    this.getList();
+  },
+  methods: {
+    async getList() {
+      try {
+        // const arr = [36,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56]
+        const res = await getOrganMemberList({
+          page: 1,
+          rows: 10,
+          ...this.searchList,
+          organIds: this.organId,
+        });
+        this.tableList = res.data;
+        // this.tableList = res.data.rows;
+        // this.rules.total = res.data.total;
+        // console.log(this.tableList)
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    sortChang(val) {
+      const dates = {
+        ascending: "ASC",
+        descending: "DESC",
+      };
+      this.searchList = {};
+      if (val.prop && val.order) {
+        this.searchList[val.prop] = dates[val.order];
+      }
+      this.rules.page = 1;
+      this.getList();
+    },
+    gotoDetail(row) {
+      // 跳转到分部数据详情 row.organId
+      this.$router.push({
+        name: "organDateDetail",
+        params: { organId: row.organId },
+      });
+    },
+    changeOrgan(val) {
+      this.organId = val;
+      this.rules.page = 1;
+      this.getList();
+    },
+    organDateExport() {
+      let params = { ...this.searchList, organIds: this.organId };
+      Export(
+        this,
+        {
+          url: "/api-web/export/organStudentOverView",
+          fileName: "分部团练宝数据.xls",
+          method: "post",
+          params: qs.stringify(params),
+        },
+        "您确定导出分部团练宝数据列表?"
+      );
+    },
+
+    gotoAll() {
+      this.$router.push({
+        name: "organRankDetail",
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+/deep/.el-card__body {
+  padding-top: 0 !important;
+}
+.titleCell {
+  display: inline-block;
+}
+.tableWrap {
+  margin-top: 20px;
+}
+.btnList {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+</style>

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

@@ -56,17 +56,23 @@ export const descs = {
   OTHER_AMOUNT: "其他收入金额总和",
   RENEW_AMOUNT: "乐团续费、临时加课、合班缴费金额总和",
   VIP_AMOUNT: "VIP课购买、续费、复学、课程组新增学员收入金额总和",
-  "vipStudentNum":'会员生效中或待生效总人数',
+  "vipStudentNum":'待激活及生效中的会员人数(去重)',
   "eVipStudentNum":'如果是试用会员又是付费会员,则不算试用会员数',
-  "cloudStudyLivelyStudentNum":'近15天内使用达到5天及以上的用户总数',
+  "cloudStudyLivelyStudentNum":'过去四周内有三周及以上每周训练时长超过60分钟为活跃学员',
   "newCloudStudyStudentNum":'第一次使用团练宝的人数',
   "cloudStudyTodayUseStudentNum":'今日使用的总人数',
   "cloudStudyUseStudentNum":'累计使用的总人数',
+  "totalStudentNum":"分部注册学员总人数",
+  "waitActivateVipStudentNum":'待激活会员人数',
+  "effectiveVipStudentNum":"生效中会员人数"
 }
 export const titles = {
-  "vipStudentNum":'付费会员人数',
+  "waitActivateVipStudentNum":'待激活会员人数',
+  "effectiveVipStudentNum":"生效中会员人数",
+  "vipStudentNum":'会员总人数',
   "eVipStudentNum":'试用会员人数',
-  "cloudStudyLivelyStudentNum":'活跃用户 ',
+  "totalStudentNum":"分部学员总数",
+  "cloudStudyLivelyStudentNum":'活跃学员人数 ',
   "newCloudStudyStudentNum":'今日新增使用人数',
   "cloudStudyTodayUseStudentNum":'今日使用人数',
   "cloudStudyUseStudentNum":'累计使用人数',