organRankDetail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <template>
  2. <div class="m-container">
  3. <el-page-header
  4. @back="goback"
  5. style="padding-bottom: 30px"
  6. content="分部云教练排行"
  7. >
  8. </el-page-header>
  9. <div class="chioseBox">
  10. <el-date-picker
  11. v-model="date"
  12. type="date"
  13. value-format="yyyy-MM-dd"
  14. format="yyyy-MM-dd"
  15. @change="changeValue"
  16. :picker-options="bigin()"
  17. :clearable="false"
  18. >
  19. </el-date-picker>
  20. </div>
  21. <div class="tableWrap">
  22. <el-table
  23. style="width: 100%"
  24. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  25. :data="tableList"
  26. @sort-change="sortChang"
  27. :default-sort="{
  28. prop: 'cloudStudyUseStudentDuty',
  29. order: 'descending',
  30. }"
  31. >
  32. <el-table-column align="center" prop="index" label="排名">
  33. </el-table-column>
  34. <el-table-column
  35. align="center"
  36. prop="organName"
  37. label="分部"
  38. ></el-table-column>
  39. <el-table-column
  40. align="center"
  41. prop="totalStudentNum"
  42. label="学员总数"
  43. width="100px"
  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">
  50. 乐团在读学员+有剩余VIP课或网管课学员去重之和
  51. </div>
  52. <i
  53. class="el-icon-question micon el-tooltip"
  54. style="
  55. font-size: 18px;
  56. color: #f56c6c;
  57. top: 2px;
  58. position: relative;
  59. "
  60. ></i>
  61. </el-tooltip>
  62. </div>
  63. </template>
  64. </el-table-column>
  65. <el-table-column
  66. align="center"
  67. prop="cloudStudyLivelyStudentNum"
  68. label="活跃人数"
  69. width="100px"
  70. >
  71. <template slot="header" slot-scope="slot">
  72. <div class="titleCell">
  73. <span>活跃人数</span>
  74. <el-tooltip placement="top" popper-class="mTooltip">
  75. <div slot="content">近15天内使用达到5天及以上的用户总数</div>
  76. <i
  77. class="el-icon-question micon el-tooltip"
  78. style="
  79. font-size: 18px;
  80. color: #f56c6c;
  81. top: 2px;
  82. position: relative;
  83. "
  84. ></i>
  85. </el-tooltip>
  86. </div>
  87. </template>
  88. </el-table-column>
  89. <!-- -->
  90. <el-table-column
  91. sortable="custom"
  92. align="center"
  93. prop="cloudStudyLivelyStudentDuty"
  94. label="活跃人数占比"
  95. width="150px"
  96. >
  97. <template slot="header" slot-scope="slot">
  98. <div class="titleCell">
  99. <span>活跃人数占比</span>
  100. <el-tooltip placement="top" popper-class="mTooltip">
  101. <div slot="content">活跃人数 / 学员总数</div>
  102. <i
  103. class="el-icon-question micon el-tooltip"
  104. style="
  105. font-size: 18px;
  106. color: #f56c6c;
  107. top: 2px;
  108. position: relative;
  109. "
  110. ></i>
  111. </el-tooltip>
  112. </div>
  113. </template>
  114. <template slot-scope="scope">
  115. <div>{{ scope.row.cloudStudyLivelyStudentDuty }}%</div>
  116. </template>
  117. </el-table-column>
  118. <el-table-column
  119. align="center"
  120. prop="cloudStudyUseStudentNum"
  121. label="使用人数"
  122. >
  123. <template slot="header" slot-scope="slot">
  124. <div class="titleCell">
  125. <span>当日使用人数</span>
  126. <el-tooltip placement="top" popper-class="mTooltip">
  127. <div slot="content">当日使用的总人数</div>
  128. <i
  129. class="el-icon-question micon el-tooltip"
  130. style="
  131. font-size: 18px;
  132. color: #f56c6c;
  133. top: 2px;
  134. position: relative;
  135. "
  136. ></i>
  137. </el-tooltip>
  138. </div>
  139. </template>
  140. </el-table-column>
  141. <el-table-column
  142. align="center"
  143. prop="newCloudStudyStudentNum"
  144. label="新增使用人数"
  145. width="100px"
  146. >
  147. <template slot="header" slot-scope="slot">
  148. <div class="titleCell">
  149. <span>当日新增使用人数</span>
  150. <el-tooltip placement="top" popper-class="mTooltip">
  151. <div slot="content">当日第一次使用云教练的人数</div>
  152. <i
  153. class="el-icon-question micon el-tooltip"
  154. style="
  155. font-size: 18px;
  156. color: #f56c6c;
  157. top: 2px;
  158. position: relative;
  159. "
  160. ></i>
  161. </el-tooltip>
  162. </div>
  163. </template>
  164. </el-table-column>
  165. <el-table-column
  166. sortable="custom"
  167. width="150px"
  168. align="center"
  169. prop="cloudStudyUseStudentDuty"
  170. label="当日使用人数比"
  171. >
  172. <template slot="header" slot-scope="slot">
  173. <div class="titleCell">
  174. <span>使用人数占比</span>
  175. <el-tooltip placement="top" popper-class="mTooltip">
  176. <div slot="content">云教练当日使用人数 / 学员总数</div>
  177. <i
  178. class="el-icon-question micon el-tooltip"
  179. style="
  180. font-size: 18px;
  181. color: #f56c6c;
  182. top: 2px;
  183. position: relative;
  184. "
  185. ></i>
  186. </el-tooltip>
  187. </div>
  188. </template>
  189. <template slot-scope="scope">
  190. <div>{{ scope.row.cloudStudyUseStudentDuty }}%</div>
  191. </template>
  192. </el-table-column>
  193. <el-table-column
  194. sortable="custom"
  195. width="140px"
  196. align="center"
  197. prop="vipStudentNum"
  198. label="付费会员数"
  199. >
  200. <template slot="header" slot-scope="slot">
  201. <div class="titleCell">
  202. <span>付费会员数</span>
  203. <el-tooltip placement="top" popper-class="mTooltip">
  204. <div slot="content">会员生效中或待生效总人数</div>
  205. <i
  206. class="el-icon-question micon el-tooltip"
  207. style="
  208. font-size: 18px;
  209. color: #f56c6c;
  210. top: 2px;
  211. position: relative;
  212. "
  213. ></i>
  214. </el-tooltip>
  215. </div>
  216. </template>
  217. </el-table-column>
  218. <el-table-column
  219. sortable="custom"
  220. width="150px"
  221. align="center"
  222. prop="vipStudentDuty"
  223. label="付费会员比"
  224. >
  225. <template slot="header" slot-scope="slot">
  226. <div class="titleCell">
  227. <span>付费会员占比</span>
  228. <el-tooltip placement="top" popper-class="mTooltip">
  229. <div slot="content">付费会员数 / 学员总数</div>
  230. <i
  231. class="el-icon-question micon el-tooltip"
  232. style="
  233. font-size: 18px;
  234. color: #f56c6c;
  235. top: 2px;
  236. position: relative;
  237. "
  238. ></i>
  239. </el-tooltip>
  240. </div>
  241. </template>
  242. <template slot-scope="scope">
  243. <div>{{ scope.row.vipStudentDuty }}%</div>
  244. </template>
  245. </el-table-column>
  246. <!-- <el-table-column
  247. sortable="custom"
  248. align="center"
  249. prop="eVipStudentNum"
  250. label="试用会员"
  251. >
  252. <template slot="header" slot-scope="slot">
  253. <div class="titleCell">
  254. <span>试用会员数</span>
  255. <el-tooltip placement="top" popper-class="mTooltip">
  256. <div slot="content">当日试用会员总数</div>
  257. <i
  258. class="el-icon-question micon el-tooltip"
  259. style="
  260. font-size: 18px;
  261. color: #f56c6c;
  262. top: 2px;
  263. position: relative;
  264. "
  265. ></i>
  266. </el-tooltip>
  267. </div>
  268. </template>
  269. </el-table-column> -->
  270. <el-table-column
  271. align="center"
  272. prop="newMemberStudentNum"
  273. label="新增付费会员"
  274. >
  275. <template slot="header" slot-scope="slot">
  276. <div class="titleCell">
  277. <span>新增付费会员</span>
  278. <el-tooltip placement="top" popper-class="mTooltip">
  279. <div slot="content">当日新增付费会员数量</div>
  280. <i
  281. class="el-icon-question micon el-tooltip"
  282. style="
  283. font-size: 18px;
  284. color: #f56c6c;
  285. top: 2px;
  286. position: relative;
  287. "
  288. ></i>
  289. </el-tooltip>
  290. </div>
  291. </template>
  292. </el-table-column>
  293. <!-- <el-table-column
  294. sortable="custom"
  295. align="center"
  296. prop="studentId"
  297. label="活跃度"
  298. >
  299. <template slot="header" slot-scope="slot">
  300. <div class="titleCell">
  301. <span>活跃度</span>
  302. <el-tooltip placement="top" popper-class="mTooltip">
  303. <div slot="content">
  304. 当日使用过云教练的会员占比(生效中会员,含试用)
  305. </div>
  306. <i
  307. class="el-icon-question micon el-tooltip"
  308. style="
  309. font-size: 18px;
  310. color: #f56c6c;
  311. top: 2px;
  312. position: relative;
  313. "
  314. ></i>
  315. </el-tooltip>
  316. </div>
  317. </template>
  318. </el-table-column> -->
  319. </el-table>
  320. <!-- <pagination
  321. :autoScroll="false"
  322. sync
  323. :total.sync="rules.total"
  324. :page.sync="rules.page"
  325. :limit.sync="rules.limit"
  326. :page-sizes="rules.page_size"
  327. @pagination="getList"
  328. /> -->
  329. </div>
  330. </div>
  331. </template>
  332. <script>
  333. import headers from "./modals/headers.vue";
  334. import pagination from "@/components/Pagination/index";
  335. import { Export } from "@/utils/downLoadFile";
  336. import dayjs from "dayjs";
  337. import qs from "qs";
  338. import { indexStudentOverView } from "../api";
  339. export default {
  340. components: {
  341. headers,
  342. pagination,
  343. },
  344. data() {
  345. return {
  346. tableList: [],
  347. searchList: {
  348. cloudStudyUseStudentDuty: "DESC",
  349. },
  350. rules: {
  351. // 分页规则
  352. limit: 10, // 限制显示条数
  353. page: 1, // 当前页
  354. total: 0, // 总条数
  355. page_size: [10, 20, 40, 50], // 选择限制显示条数
  356. },
  357. date: "",
  358. };
  359. },
  360. mounted() {
  361. this.date = dayjs(new Date()).subtract(1, "day").format("YYYY-MM-DD");
  362. this.getList();
  363. },
  364. methods: {
  365. async getList() {
  366. try {
  367. const res = await indexStudentOverView({
  368. ...this.searchList,
  369. date: this.date,
  370. rows: 999,
  371. page: 1,
  372. });
  373. this.tableList = res.data.rows;
  374. this.rules.total = res.data.total;
  375. } catch (e) {
  376. console.log(e);
  377. }
  378. },
  379. bigin() {
  380. let self = this;
  381. return {
  382. firstDayOfWeek: 1,
  383. disabledDate(time) {
  384. if (self.endDate) {
  385. let endTime = self.$helpers.dayjs(self.endDate).valueOf();
  386. return time.getTime() > endTime;
  387. } else {
  388. return time.getTime() >= Date.now() - 24 * 60 * 60 * 1000;
  389. }
  390. },
  391. };
  392. },
  393. changeValue(val) {
  394. this.date = val;
  395. this.rules.page = 1;
  396. this.getList();
  397. },
  398. sortChang(val) {
  399. const dates = {
  400. ascending: "ASC",
  401. descending: "DESC",
  402. };
  403. this.searchList = {};
  404. if (val.prop && val.order) {
  405. this.searchList[val.prop] = dates[val.order];
  406. }
  407. this.rules.page = 1;
  408. this.getList();
  409. },
  410. rankingExport() {
  411. let params = { ...this.searchForm, date: this.date };
  412. Export(
  413. this,
  414. {
  415. url: "/api-web/export/cloudStudyStudentOverView",
  416. fileName: "分部云教练数据排行.xls",
  417. method: "post",
  418. params: qs.stringify(params),
  419. },
  420. "您确定导出分部云教练数据排行?"
  421. );
  422. },
  423. goback() {
  424. this.$store.dispatch("delVisitedViews", this.$route);
  425. this.$router.push({ path: "/main/main?tabrouter=cloudDate" });
  426. },
  427. },
  428. };
  429. </script>
  430. <style lang="scss" scoped>
  431. /deep/.el-card__body {
  432. padding-top: 0 !important;
  433. }
  434. .titleCell {
  435. display: inline-block;
  436. }
  437. .chioseBox {
  438. display: flex;
  439. flex-direction: row;
  440. align-items: center;
  441. justify-content: flex-start;
  442. margin-bottom: 30px;
  443. .lookOrgan {
  444. margin-left: 10px;
  445. }
  446. }
  447. .wrap {
  448. position: relative;
  449. display: flex;
  450. flex-direction: row;
  451. align-items: center;
  452. justify-content: space-between;
  453. margin-bottom: 20px;
  454. }
  455. </style>