mo 3 jaren geleden
bovenliggende
commit
18af7008bd

+ 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;
     });

+ 99 - 10
src/views/main/cloudDate/organMemberList.vue

@@ -1,5 +1,53 @@
 <template>
   <div>
+
+    <el-card style="margin-bottom:20px;">
+      <headers title="数据总览" :hidenOrgan="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 v-if="key!=='vipStudentRate'">
+            {{ 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 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>
+      </statistic>
+    </el-card>
+
     <el-card>
       <headers title="分部数据" @changeOrgan="changeOrgan" :special="true" />
       <div class="tableWrap">
@@ -99,15 +147,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 qs from "qs";
 export default {
+    props: ["data"],
   components: {
     headers,
     pagination,
+     countTo
   },
   data() {
     return {
@@ -123,7 +177,9 @@ export default {
       searchList: {
         cloudStudyUseStudentDuty: "DESC",
       },
-      tenantId:''
+      tenantId:'',
+       dataList:{},
+      active:''
     };
   },
   mounted() {
@@ -132,22 +188,31 @@ export default {
   },
   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,56]
-        const res = await getOrganMemberList({
+        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;
+      //  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.dataList = res.data?.overView || {};
         // console.log(this.tableList)
       } catch (e) {
         console.log(e);
@@ -197,6 +262,30 @@ export default {
       });
     },
   },
+   computed: {
+    items() {
+      let obj = {};
+      //        "eVipStudentNum",
+      let arr = [
+        "totalStudentNum",
+        "waitActivateVipStudentNum",
+        "effectiveVipStudentNum",
+        "vipStudentNum",
+        "cloudStudyLivelyStudentNum",
+        // "newCloudStudyStudentNum",
+        // "cloudStudyTodayUseStudentNum",
+        "effectiveStudentNum",
+        "vipStudentRate",
+        "cloudStudyUseStudentNum",
+      ];
+      arr.forEach((str) => {
+        if (this.dataList[str]+'') {
+          obj[str] ={title:titles[str],percent:this.dataList[str],desc:descs[str]};
+        }
+      });
+      return obj;
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

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

@@ -64,7 +64,8 @@ export const descs = {
   // "cloudStudyUseStudentNum":'累计使用的总人数',
   "totalStudentNum":"分部注册学员总人数",
   // "waitActivateVipStudentNum":'待激活会员人数',
-  // "effectiveVipStudentNum":"生效中会员人数"
+  // "effectiveVipStudentNum":"生效中会员人数",
+  "vipStudentRate":"会员总人数/有效学员数"
 }
 export const titles = {
   "waitActivateVipStudentNum":'待激活会员人数',
@@ -76,6 +77,8 @@ export const titles = {
   "newCloudStudyStudentNum":'今日新增使用人数',
   "cloudStudyTodayUseStudentNum":'今日使用人数',
   "cloudStudyUseStudentNum":'累计使用人数',
+  "effectiveStudentNum":'有效学生数',
+  "vipStudentRate":'会员人数占比'
 }