index.vue 21 KB

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