mo 3 anni fa
parent
commit
6b3a29f07a

+ 5 - 2
src/views/main/cloudDate/organDate.vue

@@ -7,7 +7,7 @@
           type="primary"
           v-permission="'export/organStudentOverView'"
           @click="organDateExport"
-          
+
           >导出</el-button
         >
         <el-button
@@ -66,7 +66,8 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="targetNum" label="目标人数">
+          {{$helpers.tenantId}}
+          <el-table-column align="center" prop="targetNum" label="目标人数" v-if="tenantId ==1">
             <template slot="header" slot-scope="slot">
               <div class="titleCell">
                 <span>目标人数</span>
@@ -346,9 +347,11 @@ export default {
       searchList: {
         cloudStudyUseStudentDuty: "DESC",
       },
+      tenantId:''
     };
   },
   mounted() {
+   this.tenantId =  this.$helpers.tenantId
     this.getList();
   },
   methods: {

+ 291 - 298
src/views/main/cloudDate/organRankDetail.vue

@@ -6,284 +6,277 @@
       content="分部团练宝数据"
     >
     </el-page-header>
-          <save-form
-        :inline="true"
-        :model="searchForm"
-        @submit="search"
-        ref="saveForm"
+    <save-form
+      :inline="true"
+      :model="searchForm"
+      @submit="search"
+      ref="saveForm"
+    >
+      <el-form-item prop="organId">
+        <el-select
+          class="multiple"
+          v-model.trim="searchForm.organId"
+          clearable
+          filterable
+          placeholder="请选择分部"
+          @change="search"
+        >
+          <el-option
+            v-for="(item, index) in specialList"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+    </save-form>
+    <p style="margin-bottom: 20px; font-size: 14px">
+      共{{ tableList.length }}个分部
+    </p>
+    <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-form-item prop="organId">
-          <el-select
-            class="multiple"
-            v-model.trim="searchForm.organId"
-            clearable
-            filterable
-            placeholder="请选择分部"
-            @change="search"
-          >
-            <el-option
-              v-for="(item, index) in specialList"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-      </save-form>
-      <p style="margin-bottom:20px;font-size:14px;">共{{tableList.length}}个分部</p>
-      <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="学员总数">
+          <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="targetNum"
+          label="目标人数"
+          v-if="tenantId == 1"
+        >
+          <template slot="header" slot-scope="slot">
+            <div class="titleCell">
+              <span>目标人数</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">
+                  进行中非会员乐团-已上乐团课小于等于4节学员-非本活动购买会员-弦乐声部学员
+                </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="活跃人数"
+        >
+          <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
+          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="newStudentNum" label="新用户人数">
+          <template slot="header">
+            <div class="titleCell">
+              <span>新用户人数</span>
+              <el-tooltip placement="top" popper-class="mTooltip">
+                <div slot="content">乐团在读学员已上课程≤4节</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="newStudentDuty"
+          label="新用户占比"
         >
-          <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="学员总数"
-          >
-            <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="targetNum" label="目标人数">
-            <template slot="header" slot-scope="slot">
-              <div class="titleCell">
-                <span>目标人数</span>
-                <el-tooltip placement="top" popper-class="mTooltip">
-                  <div slot="content">
-                    进行中非会员乐团-已上乐团课小于等于4节学员-非本活动购买会员-弦乐声部学员
-                  </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="活跃人数"
-          >
-            <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
-            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="newStudentNum"
-            label="新用户人数"
-          >
-            <template slot="header">
-              <div class="titleCell">
-                <span>新用户人数</span>
-                <el-tooltip placement="top" popper-class="mTooltip">
-                  <div slot="content">
-                    乐团在读学员已上课程≤4节
-                  </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="newStudentDuty"
-            label="新用户占比"
-          >
-            <template slot-scope="scope">
-              {{ scope.row.newStudentDuty }}%
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="newCloudStudyStudentNum"
-            label="新增使用人数"
-            width="130px"
-          >
-            <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="cloudStudyUseStudentDuty"
-            label="使用比例"
-            sortable="custom"
-            width="140px"
-          >
-            <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
-            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"
-            align="center"
-            prop="vipStudentDuty"
-            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.vipStudentDuty }}%</div>
-            </template>
-          </el-table-column>
-          <!-- <el-table-column
+          <template slot-scope="scope">
+            {{ scope.row.newStudentDuty }}%
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="newCloudStudyStudentNum"
+          label="新增使用人数"
+          width="130px"
+        >
+          <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="cloudStudyUseStudentDuty"
+          label="使用比例"
+          sortable="custom"
+          width="140px"
+        >
+          <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 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"
+          align="center"
+          prop="vipStudentDuty"
+          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.vipStudentDuty }}%</div>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
                sortable="custom"
             align="center"
             prop="eVipStudentNum"
@@ -310,19 +303,19 @@
             </template>
           </el-table-column> -->
 
-          <el-table-column align="center" prop="studentId" label="操作">
-            <template slot-scope="scope">
-              <div>
-                <auth auths="/organDateDetail">
-                  <el-button type="text" @click="gotoDetail(scope.row)"
-                    >详情</el-button
-                  >
-                </auth>
-              </div>
-            </template>
-          </el-table-column>
-        </el-table>
-        <!-- <pagination
+        <el-table-column align="center" prop="studentId" label="操作">
+          <template slot-scope="scope">
+            <div>
+              <auth auths="/organDateDetail">
+                <el-button type="text" @click="gotoDetail(scope.row)"
+                  >详情</el-button
+                >
+              </auth>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- <pagination
           :autoScroll="false"
           :total.sync="rules.total"
           :page.sync="rules.page"
@@ -330,7 +323,7 @@
           :page-sizes="rules.page_size"
           @pagination="getList"
         /> -->
-      </div>
+    </div>
   </div>
 </template>
 <script>
@@ -351,9 +344,7 @@ export default {
       searchList: {
         cloudStudyUseStudentDuty: "DESC",
       },
-      searchForm:{
-
-      },
+      searchForm: {},
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -362,12 +353,13 @@ export default {
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       date: "",
-      specialList:[]
+      specialList: [],
+      tenantId: "",
     };
   },
- async mounted() {
+  async mounted() {
     this.date = dayjs(new Date()).subtract(1, "day").format("YYYY-MM-DD");
-        await this.$store.dispatch("setBranchs");
+    await this.$store.dispatch("setBranchs");
     const arr = [
       36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56,
     ];
@@ -378,6 +370,7 @@ export default {
       this.searchForm.organId = this.$route.params.organId;
     }
     this.getList();
+    this.tenantId = this.$helpers.tenantId;
   },
   methods: {
     async getList() {
@@ -394,8 +387,8 @@ export default {
         console.log(e);
       }
     },
-    search(){
-      this.getList()
+    search() {
+      this.getList();
     },
     bigin() {
       let self = this;
@@ -445,7 +438,7 @@ export default {
       this.$store.dispatch("delVisitedViews", this.$route);
       this.$router.push({ path: "/main/main?tabrouter=cloudDate" });
     },
-        gotoDetail(row) {
+    gotoDetail(row) {
       // 跳转到分部数据详情 row.organId
       this.$router.push({
         name: "organDateDetail",