Ver Fonte

Merge branch '07/06musicArchives' into test

mo há 3 anos atrás
pai
commit
59542dbdea

+ 12 - 0
src/store/modules/permission.js

@@ -275,6 +275,18 @@ function setDetailRoute(accessedRoutes) {
             activeMenu: '/main/main'
           }
         },
+        {
+          name: 'organRankDetail',
+          path: 'organRankDetail',
+          component: () => import('@/views/main/cloudDate/organRankDetail'),
+          hidden: true,
+          meta: {
+            noCache: '1',
+            title: '分部云教练排行',
+            belongTopMenu: "/main",
+            activeMenu: '/main/main'
+          }
+        },
         //
       ])
     }

+ 16 - 4
src/views/app/clouldSuggestion.vue

@@ -22,7 +22,7 @@
         ></el-input>
       </el-form-item>
 
-      <el-form-item  prop="clientType">
+      <el-form-item prop="clientType">
         <el-select clearable v-model="searchForm.clientType">
           <el-option
             v-for="(item, index) in clientList"
@@ -57,12 +57,12 @@
         :data="dataList"
         :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
       >
-              <el-table-column
+        <el-table-column
           align="center"
           label="用户编号"
           prop="userId"
         ></el-table-column>
-              <el-table-column
+        <el-table-column
           align="center"
           label="用户姓名"
           prop="username"
@@ -93,11 +93,23 @@
             </div>
           </template>
         </el-table-column> -->
-                        <el-table-column align="center" label="反馈时间" prop="createTime">
+        <el-table-column align="center" label="反馈时间" prop="createTime">
           <template slot-scope="scope">
             {{ scope.row.createTime | dateForMinFormat }}
           </template>
         </el-table-column>
+        <el-table-column align="center" prop="url" label="反馈图片">
+          <template slot-scope="scope">
+            <el-image
+              v-if="scope.row.url"
+              style="width: 60px; height: 60px"
+              fit="cover"
+              :src="scope.row.url.split(',')[0]"
+              :previewSrcList="scope.row.url.split(',')"
+            >
+            </el-image>
+          </template>
+        </el-table-column>
         <!-- <el-table-column align="center" prop="createTime" label="反馈时间">
         </el-table-column> -->
       </el-table>

+ 20 - 0
src/views/app/suggestion.vue

@@ -70,6 +70,26 @@
             </div>
           </template>
         </el-table-column>
+        <el-table-column
+        align="center"
+        prop="url"
+        label="反馈图片"
+      >
+        <template slot-scope="scope">
+          <el-image
+            v-if="
+              scope.row.url
+            "
+            style="width: 60px; height: 60px"
+            fit="cover"
+            :src="scope.row.url.split(',')[0]"
+            :previewSrcList="
+              scope.row.url.split(',')
+            "
+          >
+          </el-image>
+        </template>
+        </el-table-column>
         <!-- <el-table-column align="center" prop="createTime" label="反馈时间">
         </el-table-column> -->
         <!-- <el-table-column align="center"

+ 1 - 2
src/views/main/cloudDate/organDateDetail.vue

@@ -228,13 +228,12 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
-import organStudentDetail from "./organStudentDetail";
 import { Export } from "@/utils/downLoadFile";
 import { queryMemberStudentData } from "../api";
 import qs from "qs";
 export default {
   name: "organDateDetail",
-  components: { pagination, organStudentDetail },
+  components: { pagination },
   data() {
     return {
       searchForm: {

+ 458 - 0
src/views/main/cloudDate/organRankDetail.vue

@@ -0,0 +1,458 @@
+<template>
+  <div class="m-container">
+    <el-page-header
+      @back="goback"
+      style="padding-bottom: 30px"
+      content="分部云教练排行"
+    >
+    </el-page-header>
+    <div class="chioseBox">
+      <el-date-picker
+        v-model="date"
+        type="date"
+        value-format="yyyy-MM-dd"
+        format="yyyy-MM-dd"
+        @change="changeValue"
+        :picker-options="bigin()"
+        :clearable="false"
+      >
+      </el-date-picker>
+    </div>
+    <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',
+        }"
+      >
+        <el-table-column align="center" prop="index" label="排名">
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="organName"
+          label="分部"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          prop="totalStudentNum"
+          label="学员总数"
+          width="100px"
+        >
+          <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="cloudStudyLivelyStudentNum"
+          label="活跃人数"
+          width="100px"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>活跃人数</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">近15天内使用达到5天及以上的用户总数</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
+          sortable="custom"
+          align="center"
+          prop="cloudStudyLivelyStudentDuty"
+          label="活跃人数占比"
+          width="150px"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>活跃人数占比</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">活跃人数 / 学员总数</div>
+                <i
+                  class="el-icon-question micon el-tooltip"
+                  style="
+                    font-size: 18px;
+                    color: #f56c6c;
+                    top: 2px;
+                    position: relative;
+                  "
+                ></i>
+              </el-tooltip>
+            </div>
+          </template>
+          <template slot-scope="scope">
+            <div>{{ scope.row.cloudStudyLivelyStudentDuty }}%</div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="cloudStudyUseStudentNum"
+          label="使用人数"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>当日使用人数</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">当日使用的总人数</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="newCloudStudyStudentNum"
+          label="新增使用人数"
+          width="100px"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>当日新增使用人数</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">当日第一次使用云教练的人数</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
+          sortable="custom"
+          width="150px"
+          align="center"
+          prop="cloudStudyUseStudentDuty"
+          label="当日使用人数比"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>使用人数占比</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">云教练当日使用人数 / 学员总数</div>
+                <i
+                  class="el-icon-question micon el-tooltip"
+                  style="
+                    font-size: 18px;
+                    color: #f56c6c;
+                    top: 2px;
+                    position: relative;
+                  "
+                ></i>
+              </el-tooltip>
+            </div>
+          </template>
+          <template slot-scope="scope">
+            <div>{{ scope.row.cloudStudyUseStudentDuty }}%</div>
+          </template>
+        </el-table-column>
+
+        <el-table-column
+          sortable="custom"
+          width="140px"
+          align="center"
+          prop="vipStudentNum"
+          label="付费会员数"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>付费会员数</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">会员生效中或待生效总人数</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
+          sortable="custom"
+          width="150px"
+          align="center"
+          prop="vipStudentDuty"
+          label="付费会员比"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>付费会员占比</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">付费会员数 / 学员总数</div>
+                <i
+                  class="el-icon-question micon el-tooltip"
+                  style="
+                    font-size: 18px;
+                    color: #f56c6c;
+                    top: 2px;
+                    position: relative;
+                  "
+                ></i>
+              </el-tooltip>
+            </div>
+          </template>
+          <template slot-scope="scope">
+            <div>{{ scope.row.vipStudentDuty }}%</div>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
+               sortable="custom"
+            align="center"
+            prop="eVipStudentNum"
+            label="试用会员"
+          >
+            <template slot="header" slot-scope="slot">
+              <div class="titleCell">
+                <span>试用会员数</span>
+                <el-tooltip placement="top" popper-class="mTooltip">
+                  <div slot="content">当日试用会员总数</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="newMemberStudentNum"
+          label="新增付费会员"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>新增付费会员</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">当日新增付费会员数量</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
+              sortable="custom"
+            align="center"
+            prop="studentId"
+            label="活跃度"
+          >
+            <template slot="header" slot-scope="slot">
+              <div class="titleCell">
+                <span>活跃度</span>
+                <el-tooltip placement="top" popper-class="mTooltip">
+                  <div slot="content">
+                    当日使用过云教练的会员占比(生效中会员,含试用)
+                  </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"
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        /> -->
+    </div>
+  </div>
+</template>
+<script>
+import headers from "./modals/headers.vue";
+import pagination from "@/components/Pagination/index";
+import { Export } from "@/utils/downLoadFile";
+import dayjs from "dayjs";
+import qs from "qs";
+import { indexStudentOverView } from "../api";
+export default {
+  components: {
+    headers,
+    pagination,
+  },
+  data() {
+    return {
+      tableList: [],
+      searchList: {
+        cloudStudyUseStudentDuty: "DESC",
+      },
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      date: "",
+    };
+  },
+  mounted() {
+    this.date = dayjs(new Date()).subtract(1, "day").format("YYYY-MM-DD");
+    this.getList();
+  },
+  methods: {
+    async getList() {
+      try {
+        const res = await indexStudentOverView({
+          ...this.searchList,
+          date: this.date,
+          rows: 999,
+          page: 1,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    bigin() {
+      let self = this;
+      return {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+          if (self.endDate) {
+            let endTime = self.$helpers.dayjs(self.endDate).valueOf();
+            return time.getTime() > endTime;
+          } else {
+            return time.getTime() >= Date.now() - 24 * 60 * 60 * 1000;
+          }
+        },
+      };
+    },
+    changeValue(val) {
+      this.date = val;
+      this.rules.page = 1;
+      this.getList();
+    },
+    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();
+    },
+    rankingExport() {
+      let params = { ...this.searchForm, date: this.date };
+      Export(
+        this,
+        {
+          url: "/api-web/export/cloudStudyStudentOverView",
+          fileName: "分部云教练数据排行.xls",
+          method: "post",
+          params: qs.stringify(params),
+        },
+        "您确定导出分部云教练数据排行?"
+      );
+    },
+    goback() {
+      this.$store.dispatch("delVisitedViews", this.$route);
+      this.$router.push({ path: "/main/main?tabrouter=cloudDate" });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+/deep/.el-card__body {
+  padding-top: 0 !important;
+}
+.titleCell {
+  display: inline-block;
+}
+.chioseBox {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: flex-start;
+  margin-bottom: 30px;
+  .lookOrgan {
+    margin-left: 10px;
+  }
+}
+.wrap {
+  position: relative;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 20px;
+}
+</style>

+ 25 - 3
src/views/main/cloudDate/organRanking.vue

@@ -22,14 +22,26 @@
             :clearable="false"
           >
           </el-date-picker>
+          <el-button
+            type="text"
+            v-permission="'/organRankDetail'"
+            @click="gotoDetail"
+            class="lookOrgan"
+            >所有分部 ></el-button
+          >
         </div>
       </div>
       <div class="tableWrap">
         <el-table
+          ref="table"
           style="width: 100%"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="tableList"
           @sort-change="sortChang"
+          :default-sort="{
+            prop: 'cloudStudyUseStudentDuty',
+            order: 'descending',
+          }"
         >
           <el-table-column align="center" prop="index" label="排名">
           </el-table-column>
@@ -322,7 +334,7 @@
             </template>
           </el-table-column> -->
         </el-table>
-        <pagination
+        <!-- <pagination
           :autoScroll="false"
           sync
           :total.sync="rules.total"
@@ -330,7 +342,7 @@
           :limit.sync="rules.limit"
           :page-sizes="rules.page_size"
           @pagination="getList"
-        />
+        /> -->
       </div>
     </el-card>
   </div>
@@ -350,7 +362,9 @@ export default {
   data() {
     return {
       tableList: [],
-      searchList: {},
+      searchList: {
+        'cloudStudyUseStudentDuty':'DESC'
+      },
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -424,6 +438,11 @@ export default {
         "您确定导出分部云教练数据排行?"
       );
     },
+    gotoDetail() {
+      this.$router.push({
+        name: "organRankDetail",
+      });
+    },
   },
 };
 </script>
@@ -439,6 +458,9 @@ export default {
   flex-direction: row;
   align-items: center;
   justify-content: flex-end;
+  .lookOrgan {
+    margin-left: 10px;
+  }
 }
 .wrap {
   position: relative;

+ 0 - 110
src/views/main/cloudDate/organStudentDetail.vue

@@ -1,110 +0,0 @@
-<template>
-  <div class="m-core">
-    <el-form
-      :inline="true"
-      :model="searchForm"
-      @submit="search"
-      @reset="onReSet"
-    >
-      <el-form-item>
-        <el-input
-          v-model.trim="searchForm.search"
-          clearable
-          @keyup.enter.native="search"
-          placeholder="学员姓名、编号、手机号"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="organId">
-        <el-select
-          class="multiple"
-          v-model.trim="searchForm.organId"
-          filterable
-          placeholder="付费会员"
-          @change="search"
-        >
-          <el-option label="非会员" value="item.id"></el-option>
-          <el-option label="付费会员" value="item.id"></el-option>
-          <el-option label="试用会员" value="item.id"></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button native-type="submit" type="primary">搜索</el-button>
-        <el-button native-type="reset" type="danger">重置</el-button>
-      </el-form-item>
-    </el-form>
-    <div class="tableWrap">
-      <el-table
-        style="width: 100%"
-        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
-        :data="tableList"
-      >
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="学员姓名(编号)"
-        ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="手机号"
-        ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="声部"
-        ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="会员类型"
-        ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="付费会员结束时间(剩余天数)"
-        ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="试用会员结束时间(剩余天数)"
-        ></el-table-column>
-      </el-table>
-      <pagination
-        :total.sync="rules.total"
-        :page.sync="rules.page"
-        :limit.sync="rules.limit"
-        :page-sizes="rules.page_size"
-        @pagination="getList"
-      />
-    </div>
-  </div>
-</template>
-<script>
-import pagination from "@/components/Pagination/index";
-export default {
-  components:{pagination},
-  props: ["teacherId"],
-  data() {
-    return {
-      searchForm: {
-        search: "",
-      },
-      tableList:[],
-      rules: {
-        // 分页规则
-        limit: 10, // 限制显示条数
-        page: 1, // 当前页
-        total: 0, // 总条数
-        page_size: [10, 20, 40, 50], // 选择限制显示条数
-      },
-    };
-  },mounted(){},
-  methods:{
-    getList(){},
-    search(){},
-    onReSet(){}
-  }
-};
-</script>
-<style lang="scss" scoped>
-</style>