organDate.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <div>
  3. <el-card>
  4. <headers title="分部数据" :hidenOrgan="true" />
  5. <div class="tableWrap">
  6. <el-table
  7. style="width: 100%"
  8. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  9. :data="tableList"
  10. @sort-change="sortChang(val)"
  11. >
  12. <el-table-column
  13. align="center"
  14. prop="organName"
  15. label="分部"
  16. ></el-table-column>
  17. <el-table-column
  18. align="center"
  19. prop="totalStudentNum"
  20. label="学员总数"
  21. >
  22. <template slot="header" slot-scope="slot">
  23. <div class="titleCell">
  24. <span>学员总数</span>
  25. <el-tooltip placement="top" popper-class="mTooltip">
  26. <div slot="content">该分部下所有学员</div>
  27. <i
  28. class="el-icon-question micon el-tooltip"
  29. style="
  30. font-size: 18px;
  31. color: #f56c6c;
  32. top: 2px;
  33. position: relative;
  34. "
  35. ></i>
  36. </el-tooltip>
  37. </div>
  38. </template>
  39. </el-table-column>
  40. <el-table-column
  41. align="center"
  42. prop="cloudStudyLivelyStudentNum"
  43. label="活跃人数"
  44. >
  45. <template slot="header" slot-scope="slot">
  46. <div class="titleCell">
  47. <span>活跃人数</span>
  48. <el-tooltip placement="top" popper-class="mTooltip">
  49. <div slot="content">近15天内使用达到5天及以上的用户数</div>
  50. <i
  51. class="el-icon-question micon el-tooltip"
  52. style="
  53. font-size: 18px;
  54. color: #f56c6c;
  55. top: 2px;
  56. position: relative;
  57. "
  58. ></i>
  59. </el-tooltip>
  60. </div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column
  64. align="center"
  65. prop="cloudStudyUseStudentDuty"
  66. label="使用比例"
  67. sortable
  68. >
  69. <template slot="header" slot-scope="slot">
  70. <div class="titleCell">
  71. <span>使用比例</span>
  72. <el-tooltip placement="top" popper-class="mTooltip">
  73. <div slot="content">云教练使用人数 / 学员总数</div>
  74. <i
  75. class="el-icon-question micon el-tooltip"
  76. style="
  77. font-size: 18px;
  78. color: #f56c6c;
  79. top: 2px;
  80. position: relative;
  81. "
  82. ></i>
  83. </el-tooltip>
  84. </div>
  85. </template>
  86. <template slot-scope="scope">
  87. <div>{{ scope.row.cloudStudyUseStudentDuty }}%</div>
  88. </template>
  89. </el-table-column>
  90. <el-table-column
  91. align="center"
  92. prop="vipStudentNum"
  93. label="付费会员数"
  94. >
  95. <template slot="header" slot-scope="slot">
  96. <div class="titleCell">
  97. <span>付费会员数</span>
  98. <el-tooltip placement="top" popper-class="mTooltip">
  99. <div slot="content">该分部生效中、待生效付费会员总数</div>
  100. <i
  101. class="el-icon-question micon el-tooltip"
  102. style="
  103. font-size: 18px;
  104. color: #f56c6c;
  105. top: 2px;
  106. position: relative;
  107. "
  108. ></i>
  109. </el-tooltip>
  110. </div>
  111. </template>
  112. </el-table-column>
  113. <el-table-column
  114. sortable="custom"
  115. align="center"
  116. prop="vipStudentDuty"
  117. label="付费会员占比"
  118. >
  119. <template slot="header" slot-scope="slot">
  120. <div class="titleCell">
  121. <span>付费会员占比</span>
  122. <el-tooltip placement="top" popper-class="mTooltip">
  123. <div slot="content">付费会员数 / 学员总数</div>
  124. <i
  125. class="el-icon-question micon el-tooltip"
  126. style="
  127. font-size: 18px;
  128. color: #f56c6c;
  129. top: 2px;
  130. position: relative;
  131. "
  132. ></i>
  133. </el-tooltip>
  134. </div>
  135. </template>
  136. <template slot-scope="scope">
  137. <div>{{ scope.row.vipStudentDuty }}%</div>
  138. </template>
  139. </el-table-column>
  140. <el-table-column
  141. sortable
  142. align="center"
  143. prop="eVipStudentNum"
  144. label="试用会员"
  145. >
  146. <template slot="header" slot-scope="slot">
  147. <div class="titleCell">
  148. <span>试用会员</span>
  149. <el-tooltip placement="top" popper-class="mTooltip">
  150. <div slot="content">
  151. 有生效中或待生效的付费会员,不统计在内
  152. </div>
  153. <i
  154. class="el-icon-question micon el-tooltip"
  155. style="
  156. font-size: 18px;
  157. color: #f56c6c;
  158. top: 2px;
  159. position: relative;
  160. "
  161. ></i>
  162. </el-tooltip>
  163. </div>
  164. </template>
  165. </el-table-column>
  166. <el-table-column align="center" prop="studentId" label="操作">
  167. <template slot-scope="scope">
  168. <div>
  169. <el-button type="text" @click="gotoDetail(scope.row)">详情</el-button>
  170. </div>
  171. </template>
  172. </el-table-column>
  173. </el-table>
  174. <pagination
  175. :total.sync="rules.total"
  176. :page.sync="rules.page"
  177. :limit.sync="rules.limit"
  178. :page-sizes="rules.page_size"
  179. @pagination="getList"
  180. />
  181. </div>
  182. </el-card>
  183. </div>
  184. </template>
  185. <script>
  186. import headers from "./modals/headers.vue";
  187. import pagination from "@/components/Pagination/index";
  188. import { organStudentOverView } from "../api";
  189. export default {
  190. components: {
  191. headers,
  192. pagination,
  193. },
  194. data() {
  195. return {
  196. tableList: [],
  197. rules: {
  198. // 分页规则
  199. limit: 10, // 限制显示条数
  200. page: 1, // 当前页
  201. total: 0, // 总条数
  202. page_size: [10, 20, 40, 50], // 选择限制显示条数
  203. },
  204. };
  205. },
  206. mounted() {
  207. this.getList();
  208. },
  209. methods: {
  210. async getList() {
  211. try {
  212. const arr = [36,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56]
  213. const res = await organStudentOverView({page:this.rules.page,rows:this.rules.limit});
  214. this.tableList= res.data.rows
  215. this.rules.total = res.data.total;
  216. // console.log(this.tableList)
  217. } catch (e) {
  218. console.log(e);
  219. }
  220. },
  221. sortChang(val){
  222. console.log('val',val)
  223. },
  224. gotoDetail(row) {
  225. // 跳转到分部数据详情 row.organId
  226. this.$router.push({ name: "organDateDetail", params: { organId: row.organId } });
  227. },
  228. },
  229. };
  230. </script>
  231. <style lang="scss" scoped>
  232. /deep/.el-card__body {
  233. padding-top: 0 !important;
  234. }
  235. .titleCell {
  236. display: inline-block;
  237. }
  238. </style>