index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. <template>
  2. <view class="column flex-1 hb">
  3. <!-- <view class="headnav x-bc">
  4. <view :class="activeTab == 0 ? 'headnav-item headnav-active':'headnav-item'" @click="handleNav(0)">
  5. <view>直播计划</view>
  6. <view class="headnav-num">3</view>
  7. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/app/images/idle.png" mode="aspectFill"></image>
  8. </view>
  9. <view :class="activeTab == 1? 'headnav-item headnav-active':'headnav-item'" @click="handleNav(1)">
  10. <view>今日直播</view>
  11. <view class="headnav-num">3</view>
  12. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/app/images/streaming.png" mode="aspectFill"></image>
  13. </view>
  14. <view :class="activeTab == 2 ? 'headnav-item headnav-active':'headnav-item'" @click="handleNav(2)">
  15. <view>往日直播</view>
  16. <view class="headnav-num">3</view>
  17. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/app/images/finished.png" mode="aspectFill"></image>
  18. </view>
  19. </view> -->
  20. <view>
  21. <dropdownPanel :filterData='filterData' @onChange="onChange" @confirm="confirm" @reset="reset">
  22. <view class="column flex-1 hb hidden">
  23. <view v-if="searchbarNav == 0">
  24. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  25. :refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)"
  26. @refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
  27. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
  28. @scrolltolower="reachBottoms">
  29. <view class="p20 fs28 column flex-1 scrolly">
  30. <view v-for="(item,index) in courseOne" :key="item.index"
  31. :class="courseid==item.periodId?'actNav':''" class="m10 p10 center"
  32. style="border-bottom: 2rpx solid #eee;" @click="getCourseOne(item.periodId)">
  33. {{item.periodName}}
  34. </view>
  35. </view>
  36. <u-loadmore :status="statusA" />
  37. </scroll-view>
  38. </view>
  39. <view v-else class="p20 fs28 column flex-1 hidden">
  40. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnabled"
  41. :refresher-triggered="triggered" refresher-background="rgba(0,0,0,0)"
  42. @refresherrefresh="pullDownRefresh" @refresherrestore="triggered = false"
  43. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggered = false"
  44. @scrolltolower="reachBottom">
  45. <view v-for="(item,index) in courseTwo" :key="item.index"
  46. :class="courseids==item.videoId?'actNav':''" class="m10 p10 center"
  47. style="border-bottom: 2rpx solid #eee;" @click="getCourseTwo(item.videoId)">
  48. {{item.title}}
  49. </view>
  50. <u-loadmore :status="status" />
  51. <view class="ptb40"></view>
  52. </scroll-view>
  53. </view>
  54. </view>
  55. </dropdownPanel>
  56. </view>
  57. <view class="bgf m20 radius8 column flex-1 scrolly" style="max-height: 100%;">
  58. <view class="column flex-1 scrolly">
  59. <u-collapse ref="collapseRef" :border="false" :value="collapseValue" @change="changeCollapse">
  60. <!-- #ifdef MP-WEIXIN -->
  61. <u-collapse-item name="course" title="课程统计">
  62. <!-- #endif -->
  63. <!-- #ifndef MP-WEIXIN -->
  64. <u-collapse-item name="course">
  65. <text slot="title" class="bold fs32">课程统计</text>
  66. <!-- #endif -->
  67. <text slot="value" class="base-color fs24">{{collapseValue.includes('course')?'收回':'展开'}}</text>
  68. <view slot="right-icon">
  69. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  70. </view>
  71. <view class="justify-around ">
  72. <view class="base-bg-f8 radius16 p30 flex-1">
  73. <view class="mb12 bold">营期</view>
  74. <view class="base-color"><text class="bold fs40">
  75. {{courselist.courseNum}}</text>期</view>
  76. </view>
  77. <view class="base-bg-f8 radius16 p20 flex-1 mlr20">
  78. <view class="mb12 bold">课程数</view>
  79. <view class="base-color"><text class="bold fs40">
  80. {{courselist.videoNum}}</text>课</view>
  81. </view>
  82. <view class="base-bg-f8 radius16 p20 flex-1">
  83. <view class="mb12 bold">参与会员</view>
  84. <view class="base-color"><text class="bold fs40">
  85. {{courselist.courseUserNum}}</text>人</view>
  86. </view>
  87. </view>
  88. </u-collapse-item>
  89. <!-- #ifdef MP-WEIXIN -->
  90. <u-collapse-item name="questions" title="看课统计">
  91. <!-- #endif -->
  92. <!-- #ifndef MP-WEIXIN -->
  93. <u-collapse-item name="questions">
  94. <text slot="title" class="bold fs32">看课统计</text>
  95. <!-- #endif -->
  96. <text slot="value"
  97. class="base-color fs24">{{collapseValue.includes('questions')?'收回':'展开'}}</text>
  98. <view slot="right-icon">
  99. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  100. </view>
  101. <view class="justify-around ">
  102. <view class="base-bg-f8 radius16 p30 flex-1">
  103. <view class="mb12 bold">观看人数</view>
  104. <view class="base-color"><text class="bold fs40">{{courselist.courseWatchNum}}</text>人</view>
  105. </view>
  106. <view class="base-bg-f8 radius16 p20 flex-1 mlr20">
  107. <view class="mb12 bold">完播人数</view>
  108. <view class="base-color"><text class="bold fs40">{{courselist.courseCompleteNum}}</text>人</view>
  109. </view>
  110. <view class="base-bg-f8 radius16 p20 flex-1">
  111. <view class="mb12 bold">完播率</view>
  112. <view class="base-color"><text class="bold fs40">{{courselist.courseCompleteRate}}</text>%</view>
  113. </view>
  114. </view>
  115. </u-collapse-item>
  116. <!-- #ifdef MP-WEIXIN -->
  117. <u-collapse-item name="redenvelope" title="答题统计">
  118. <!-- #endif -->
  119. <!-- #ifndef MP-WEIXIN -->
  120. <u-collapse-item name="redenvelope">
  121. <text slot="title" class="bold fs32">答题统计</text>
  122. <!-- #endif -->
  123. <text slot="value"
  124. class="base-color fs24">{{collapseValue.includes('redenvelope')?'收回':'展开'}}</text>
  125. <view slot="right-icon">
  126. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  127. </view>
  128. <view class="justify-around ">
  129. <view class="base-bg-f8 radius16 p30 flex-1">
  130. <view class="mb12 bold">答题人数</view>
  131. <view class="base-color"><text class="bold fs40">
  132. {{courselist.answerNum}}</text>人</view>
  133. </view>
  134. <view class="base-bg-f8 radius16 p20 flex-1 mlr20">
  135. <view class="mb12 bold">正确人数</view>
  136. <view class="base-color"><text class="bold fs40">
  137. {{courselist.answerRightNum}}</text>人</view>
  138. </view>
  139. <view class="base-bg-f8 radius16 p20 flex-1">
  140. <view class="mb12 bold">正确率</view>
  141. <view class="base-color"><text class="bold fs40">
  142. {{courselist.answerRightRate}}</text>%</view>
  143. </view>
  144. </view>
  145. </u-collapse-item>
  146. <!-- #ifdef MP-WEIXIN -->
  147. <u-collapse-item name="live" title="红包统计">
  148. <!-- #endif -->
  149. <!-- #ifndef MP-WEIXIN -->
  150. <u-collapse-item name="live">
  151. <text slot="title" class="bold fs32">红包统计</text>
  152. <!-- #endif -->
  153. <text slot="value" class="base-color fs24">{{collapseValue.includes('live')?'收回':'展开'}}</text>
  154. <view slot="right-icon">
  155. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  156. </view>
  157. <view class="justify-around ">
  158. <view class="base-bg-f8 radius16 p30 flex-1">
  159. <view class="mb12 bold">红包个数</view>
  160. <view class="base-color"><text class="bold fs40">
  161. {{courselist.redPacketNum}}</text>个</view>
  162. </view>
  163. <view class="base-bg-f8 radius16 p20 mlr20 justify-start align-center">
  164. <image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/app/images/redenvelope.png" class="w102 h102"></image>
  165. <view class="ml20">
  166. <view class="mb12 bold">答题红包金额</view>
  167. <view class="base-color">
  168. <text class="bold fs40">{{courselist.redPacketAmount}}</text>元
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </u-collapse-item>
  174. <!-- #ifdef MP-WEIXIN -->
  175. <u-collapse-item name="funnel" title="转化漏斗图" v-if="!ratelistState">
  176. <!-- #endif -->
  177. <!-- #ifndef MP-WEIXIN -->
  178. <u-collapse-item name="funnel" v-if="!ratelistState">
  179. <text slot="title" class="bold fs32">转化漏斗图</text>
  180. <!-- #endif -->
  181. <text slot="value" class="base-color fs24">{{collapseValue.includes('funnel')?'收回':'展开'}}</text>
  182. <view slot="right-icon">
  183. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  184. </view>
  185. <view v-show="!ratelistState">
  186. <funnelChart :getratelist="getrateimg" />
  187. </view>
  188. <view v-show="ratelistState" class="center">暂无数据</view>
  189. </u-collapse-item>
  190. <!-- #ifdef MP-WEIXIN -->
  191. <u-collapse-item name="rank" title="排行榜">
  192. <!-- #endif -->
  193. <!-- #ifndef MP-WEIXIN -->
  194. <u-collapse-item name="rank">
  195. <text slot="title" class="bold fs32">排行榜</text>
  196. <!-- #endif -->
  197. <text slot="value" class="base-color fs24">{{collapseValue.includes('rank')?'收回':'展开'}}</text>
  198. <view slot="right-icon">
  199. <u-icon name="arrow-right" color="#1677ff" size="12"></u-icon>
  200. </view>
  201. <view class="flex-1">
  202. <view class="mt40">
  203. <view class="justify-between align-center">
  204. <view class="base-color-3 bold fs32">群管排行榜</view>
  205. <view class="justify-start" @click="ordergroup(1)" v-if="orderGroup=='asc'">
  206. <u-icon name="list-dot" size="20"></u-icon>
  207. <view>按正序(前20名)</view>
  208. </view>
  209. <view class="justify-start" @click="ordergroup(0)" v-else>
  210. <u-icon name="list-dot" size="20"></u-icon>
  211. <view>按倒序(后20名)</view>
  212. </view>
  213. </view>
  214. <view class="centerV">
  215. <u-tabs :list="list1" @click="clickTab" lineColor='#1773ff' lineWidth='40'
  216. activeStyle="font-weight:bold"></u-tabs>
  217. </view>
  218. <view class="justify-start align-center mtb28" v-for="(items,index) in rankListA"
  219. :key="index">
  220. <u-avatar :src="items.avatar" size="40"></u-avatar>
  221. <view class="flex-1 ml20">
  222. <view class="justify-between mb16">
  223. <view class="base-color-3 single-line-ellipsis">{{items.userName}}</view>
  224. <view v-if="activeA==1">{{items.completeRate}}%</view>
  225. <view v-else>{{items.answerRightRate}}%</view>
  226. </view>
  227. <u-line-progress :percentage="activeA==1?items.completeRate:items.answerRightRate" activeColor='#ed0922' />
  228. </view>
  229. </view>
  230. <view v-if="rankListA.length==0" class="center mtb32">暂无数据</view>
  231. </view>
  232. <view class="mt60 column flex-1">
  233. <view class="justify-between align-center">
  234. <view class="base-color-3 bold fs32">课程排行榜</view>
  235. <view class="justify-start" @click="ordergroupB(1)" v-if="orderGroupB=='asc'">
  236. <u-icon name="list-dot" size="20"></u-icon>
  237. <view>按正序(前20名)</view>
  238. </view>
  239. <view class="justify-start" @click="ordergroupB(0)" v-else>
  240. <u-icon name="list-dot" size="20"></u-icon>
  241. <view>按倒序(后20名)</view>
  242. </view>
  243. </view>
  244. <view class="centerV">
  245. <u-tabs :list="list1" @click="clickTabB" lineColor='#1773ff' lineWidth='40'
  246. activeStyle="font-weight:bold"></u-tabs>
  247. </view>
  248. <view class="justify-start align-center" style="height: fit-content;" v-for="(item,index) in rankListB" :key="index">
  249. <view class="flex-1 ml20">
  250. <view class="justify-between mb16">
  251. <view class="base-color-3 single-line-ellipsis">{{item.videoName}}</view>
  252. <view v-if="activeB==1">{{item.completeRate}}%</view>
  253. <view v-else>{{item.answerRightRate}}%</view>
  254. </view>
  255. <u-line-progress :percentage="activeB==1?item.completeRate:item.answerRightRate" activeColor='#ed0922' />
  256. </view>
  257. </view>
  258. <view v-if="rankListB.length==0" class="center mtb32">暂无数据</view>
  259. </view>
  260. </view>
  261. </u-collapse-item>
  262. </u-collapse>
  263. </view>
  264. </view>
  265. </view>
  266. </template>
  267. <script>
  268. import {
  269. getFsCourseList,
  270. getvideolist,
  271. getshopCoursenum,
  272. getcourseRates,
  273. getGroupRanklist,
  274. getCourseRanklist
  275. } from "@/api/courseManage.js"
  276. import dropdownPanel from "@/components/dropdownPanel.vue"
  277. import parse from "../../../uni_modules/uview-ui/libs/config/props/parse"
  278. import funnelChart from "@/components/chart.vue"
  279. export default {
  280. components: {
  281. dropdownPanel,
  282. funnelChart,
  283. },
  284. data() {
  285. return {
  286. activeTab: 0,
  287. showCalendar: false,
  288. user: {},
  289. filterData: [{
  290. name: '训练营-营期',
  291. value: 1,
  292. },
  293. {
  294. name: '课程',
  295. value: 2,
  296. }
  297. ],
  298. searchbarNav: 0,
  299. collapseValue: ['course', 'questions', 'redenvelope', 'live', 'funnel', 'rank'],
  300. courseOne: [],
  301. courseTwo: [],
  302. courseid: '',
  303. courseids: '',
  304. triggered: false,
  305. status: 'loadmore',
  306. isEnabled: true,
  307. pageNum: 1,
  308. pageSize: 10,
  309. courselist: [],
  310. answerlist: [],
  311. getrateimg: {},
  312. list1: [{
  313. name: '按完播率',
  314. }, {
  315. name: '按正确率'
  316. }],
  317. orderGroup: 'asc',
  318. orderGroupB: 'asc',
  319. rankListA: {},
  320. rankListB: {},
  321. activeA: 1,
  322. activeB: 1,
  323. triggereds: false,
  324. statusA: 'loadmore',
  325. isEnableds: true,
  326. pageNums: 1,
  327. pageSizes: 10,
  328. ratelistState:false
  329. }
  330. },
  331. async mounted() {
  332. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
  333. this.getCoursestatistics()
  334. this.getrateList()
  335. this.getrankgroup()
  336. await this.getrankCourse()
  337. this.$nextTick(() => {
  338. setTimeout(()=>{
  339. this.$refs?.collapseRef?.init()
  340. },1000)
  341. })
  342. },
  343. methods: {
  344. ordergroup(item) {
  345. if (item == 0) {
  346. this.orderGroup = 'asc'
  347. this.getrankgroup()
  348. } else {
  349. this.orderGroup = 'desc'
  350. this.getrankgroup()
  351. }
  352. },
  353. ordergroupB(item) {
  354. if (item == 0) {
  355. this.orderGroupB = 'asc'
  356. this.getrankCourse()
  357. } else {
  358. this.orderGroupB = 'desc'
  359. this.getrankCourse()
  360. }
  361. },
  362. getrankCourse() {
  363. //获取课程排行
  364. // console.log(this.orderGroupB)
  365. const params = {
  366. companyId: this.user.companyId,
  367. endTime: '',
  368. startTime: '',
  369. periodId: this.courseid,
  370. videoId: this.courseids,
  371. order: this.orderGroupB,
  372. type: this.activeB, // 0:经销商/1:群管
  373. }
  374. getCourseRanklist(params).then(res => {
  375. if (res.code == 200) {
  376. // console.log(res)
  377. this.rankListB = res.data
  378. } else {
  379. uni.showToast({
  380. icon: 'none',
  381. title: res.msg
  382. })
  383. }
  384. })
  385. },
  386. getrankgroup() {
  387. //获取群管排行
  388. const params = {
  389. companyId: this.user.companyId,
  390. periodId: this.courseid,
  391. videoId: this.courseids,
  392. order: this.orderGroup,
  393. type: this.activeA, // 0:经销商/1:群管
  394. }
  395. getGroupRanklist(params).then(res => {
  396. if (res.code == 200) {
  397. // console.log(res)
  398. this.rankListA = res.data
  399. } else {
  400. uni.showToast({
  401. icon: 'none',
  402. title: res.msg
  403. })
  404. }
  405. })
  406. },
  407. getrateList() {
  408. //获取漏斗图
  409. const params = {
  410. periodId: this.courseid,
  411. videoId: this.courseids,
  412. }
  413. getcourseRates(params).then(res => {
  414. if (res.code == 200) {
  415. this.ratelistState = res.data.every(item => item.value === 0);
  416. this.getrateimg = res
  417. } else {
  418. uni.showToast({
  419. icon: 'none',
  420. title: res.msg
  421. })
  422. }
  423. })
  424. },
  425. getCoursestatistics() {
  426. //课程统计
  427. const params = {
  428. periodId: this.courseid,
  429. videoId:this.courseids,
  430. }
  431. getshopCoursenum(params).then(res => {
  432. if (res.code == 200) {
  433. // console.log(res)
  434. this.courselist = res.data
  435. } else {
  436. uni.showToast({
  437. icon: 'none',
  438. title: res.msg
  439. })
  440. }
  441. })
  442. },
  443. pullDownRefreshs() {
  444. // 下拉
  445. this.triggereds = true; //下拉了状态为true
  446. setTimeout(() => {
  447. this.triggereds = false;
  448. uni.stopPullDownRefresh()
  449. this.pageNums = 1;
  450. this.getCourseList('refresh') //触底 不穿执行else
  451. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  452. // 请求接口
  453. }, 1000)
  454. },
  455. reachBottoms() {
  456. // status这个是加载状态
  457. console.log(111);
  458. if (this.statusA === 'loadmore') {
  459. this.statusA = 'loading'
  460. uni.showNavigationBarLoading()
  461. setTimeout(() => {
  462. this.pageNums++
  463. this.getCourseList() //触底 不穿执行else
  464. uni.hideNavigationBarLoading()
  465. }, 1000);
  466. }
  467. },
  468. pullDownRefresh() {
  469. // 下拉
  470. this.triggered = true; //下拉了状态为true
  471. setTimeout(() => {
  472. this.triggered = false;
  473. uni.stopPullDownRefresh()
  474. this.pageNum = 1;
  475. this.getCourseListsmall('refresh') //触底 不穿执行else
  476. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  477. // 请求接口
  478. }, 1000)
  479. },
  480. reachBottom() {
  481. // status这个是加载状态
  482. console.log(111);
  483. if (this.status === 'loadmore') {
  484. this.status = 'loading'
  485. uni.showNavigationBarLoading()
  486. setTimeout(() => {
  487. this.pageNum++
  488. this.getCourseListsmall() //触底 不穿执行else
  489. uni.hideNavigationBarLoading()
  490. }, 1000);
  491. }
  492. },
  493. getCourseOne(id) {
  494. this.courseid = id
  495. },
  496. getCourseTwo(id) {
  497. this.courseids = id
  498. },
  499. getCourseList(type) {
  500. this.courseOne=[]
  501. const param = {
  502. pageNum: this.pageNums,
  503. pageSize: this.pageSizes,
  504. }
  505. getFsCourseList(param).then(res => {
  506. if (res.code == 200) {
  507. if (type == 'refresh') {
  508. this.courseOne = res.data.list
  509. } else {
  510. // 加载更多 当前页和下一页合并
  511. this.courseOne = [...this.courseOne, ...res.data.list]
  512. }
  513. if (res.data.isLastPage) {
  514. this.statusA = 'nomore'
  515. } else {
  516. this.statusA = 'loadmore'
  517. }
  518. } else {
  519. uni.showToast({
  520. icon: 'none',
  521. title: res.msg
  522. })
  523. }
  524. })
  525. },
  526. getCourseListsmall(type) {
  527. const param = {
  528. courseId: this.courseid,
  529. pageNum: this.pageNum,
  530. pageSize: this.pageSize, //
  531. }
  532. getvideolist(param).then(res => {
  533. if (res.code == 200) {
  534. // refresh 下拉
  535. if (type == 'refresh') {
  536. this.courseTwo = res.data.list
  537. } else {
  538. // 加载更多 当前页和下一页合并
  539. this.courseTwo = [...this.courseTwo, ...res.data.list]
  540. }
  541. if (this.pageNum >= res.data.pages) {
  542. this.status = 'nomore'
  543. } else {
  544. this.status = 'loadmore'
  545. }
  546. } else {
  547. }
  548. })
  549. },
  550. changeCollapse(e) {
  551. this.collapseValue = e.filter(item => item.status == 'open').map(it => it.name)
  552. },
  553. handleNav(type) {
  554. this.activeTab = type
  555. },
  556. onChange(index) {
  557. this.searchbarNav = index
  558. if (index == 0) {
  559. this.getCourseList()
  560. } else {
  561. this.pageNum = 1
  562. if (this.courseid == 0) {
  563. uni.showToast({
  564. icon: 'none',
  565. title: "请先选择训练营-营期"
  566. })
  567. } else {
  568. this.getCourseListsmall('refresh')
  569. }
  570. }
  571. },
  572. confirm() {
  573. this.getCoursestatistics()
  574. this.getrateList()
  575. this.getrankgroup()
  576. this.getrankCourse()
  577. },
  578. reset() {
  579. console.log(this.searchbarNav)
  580. if (this.searchbarNav == 0) {
  581. this.courseid = ''
  582. } else {
  583. this.courseids = ''
  584. }
  585. this.getCoursestatistics()
  586. this.getrateList()
  587. this.getrankgroup()
  588. this.getrankCourse()
  589. },
  590. clickTab(item) {
  591. this.activeA = item.index + 1
  592. this.getrankgroup()
  593. console.log(this.activeA)
  594. },
  595. clickTabB(item) {
  596. this.activeB = item.index + 1
  597. this.getrankCourse()
  598. console.log(this.activeA)
  599. },
  600. }
  601. }
  602. </script>
  603. <style lang="scss" scoped>
  604. .headnav {
  605. padding: 15px 12px;
  606. margin: 0 -10px -10px 0;
  607. box-sizing: border-box;
  608. background-color: #fff;
  609. image {
  610. height: 60px;
  611. width: 50px;
  612. position: absolute;
  613. z-index: 0;
  614. bottom: 0;
  615. right: 0;
  616. display: none;
  617. }
  618. &-item {
  619. flex: 1;
  620. font-size: 16px;
  621. padding: 10px;
  622. border-radius: 10px;
  623. background: #f8f8f8;
  624. margin: 0 10px 10px 0;
  625. position: relative;
  626. z-index: 1;
  627. overflow: hidden;
  628. color: #555;
  629. }
  630. &-active {
  631. background-color: rgb(231, 241, 255) !important;
  632. .headnav-num {
  633. color: #1677ff !important;
  634. }
  635. image {
  636. display: block !important;
  637. }
  638. }
  639. &-num {
  640. font-family: DIN, DIN;
  641. font-weight: bold;
  642. font-size: 25px;
  643. margin: 5px 0;
  644. }
  645. }
  646. .actNav {
  647. color: #1677ff !important;
  648. background-color: #e7f2fe;
  649. }
  650. </style>