index.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540
  1. <template>
  2. <div>
  3. <Header @confirmExit="confirmExit" type="ranking"></Header>
  4. <div class="ranking">
  5. <div class="top">
  6. <div class="top-left">
  7. <div class="title1">{{ pageType == 1 ? "运动风云榜" : pageType == 2 ? currentClass.name : "" }} · {{
  8. projectObj.title
  9. }}</div>
  10. <div class="title2" @click="choiceClassWindow = true">{{ pageType == 1 ? "切换到班级榜" : pageType == 2 ? "切换到班级" :
  11. "" }}</div>
  12. </div>
  13. <div class="tab">
  14. <ul>
  15. <li @click="clickType(1)" :class="{ current: type == 1 }">男生</li>
  16. <li @click="clickType(2)" :class="{ current: type == 2 }">女生</li>
  17. </ul>
  18. <dl>
  19. <dt @click="getDateType(4)" :class="{ current: date.type == 4 }">上周</dt>
  20. <dt @click="getDateType(1)" :class="{ current: date.type == 1 }">本周</dt>
  21. <dt @click="getDateType(2)" :class="{ current: date.type == 2 }">月榜</dt>
  22. <dt @click="getDateType(3)" :class="{ current: date.type == 3 }">季度榜</dt>
  23. </dl>
  24. </div>
  25. </div>
  26. <div class="mainBox">
  27. <div class="main" v-show="pageType == 1 ? true : false">
  28. <div class="swiperBox">
  29. <!--年级排名开始-->
  30. <swiper ref="refSwiper" :slides-per-view="3" :slides-per-group="3" :space-between="10" :modules="[Navigation]" :navigation="{
  31. prevEl: '.swiper-btn-left',
  32. nextEl: '.swiper-btn-right',
  33. }">
  34. <swiper-slide v-for="(item, index) in gradeData" :key="index">
  35. <div class="item">
  36. <div class="gradeTitle">{{ item.label }}</div>
  37. <ul :ref="(el: any) => { multipleItemRef(el, item.value) }" @scroll="getScroll($event, item.value)">
  38. <li :data-items="JSON.stringify(items)" v-for="items in item.list" :key="items.student_id"
  39. @click="openReport(items)">
  40. <div class="left">
  41. <i class="pai"
  42. :class="{ 'pai1': items.rank == 1, 'pai2': items.rank == 2, 'pai3': items.rank == 3 }">{{
  43. items.rank }}</i>
  44. <div class="userInfo">
  45. <div class="touxiang">
  46. <img v-if="items.logo_url" v-lazy="items.logo_url"/>
  47. <img v-else :src="logo" />
  48. </div>
  49. <div class="nameBox">
  50. <span class="studentName">{{ items.student_name }}</span>
  51. <span class="className">{{ items.class_name }}</span>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="right" v-if="timeProjectList.includes(projectObj.exam_name)">
  56. <div class="score">{{ proxy?.$utils.runTime(items.result, false, false) }}
  57. </div>
  58. </div>
  59. <div class="right" v-else>
  60. <div class="score">{{ items.result }}
  61. </div>
  62. <div class="unit">{{ items.unit }}</div>
  63. </div>
  64. </li>
  65. </ul>
  66. </div>
  67. </swiper-slide>
  68. </swiper>
  69. <!-- 如果需要导航按钮 -->
  70. <div class="swiper-button-prev swiper-btn swiper-btn-left" slot="button-prev" @click="getStopPlaying()"
  71. v-show="gradeData.length > 3">
  72. </div>
  73. <div class="swiper-button-next swiper-btn swiper-btn-right" slot="button-next" @click="getStopPlaying()"
  74. v-show="gradeData.length > 3">
  75. </div>
  76. <!--年级排名结束-->
  77. </div>
  78. </div>
  79. <div class="main" v-show="pageType == 2 ? true : false">
  80. <div class="main-a">
  81. <!--学生排行榜-->
  82. <div class="main-a-center" v-if="studentTop.length">
  83. <div class="item" :class="{ one: index == 0, two: index == 1, three: index == 2 }"
  84. @click="openReport(item)" v-for="(item, index) in studentTop" :key="index">
  85. <div class="touxiang">
  86. <img v-if="item.logo_url" v-lazy="item.logo_url" />
  87. <img v-else :src="logo" />
  88. </div>
  89. <div class="txt">
  90. <div class="number">NO.{{ item.rank }}</div>
  91. <div class="studentName">{{ item.student_name }}</div>
  92. <div class="scoreBox" v-if="timeProjectList.includes(projectObj.exam_name)">
  93. <div class="score">{{
  94. proxy?.$utils.runTime(item.result, false, false) }}</div>
  95. </div>
  96. <div class="scoreBox" v-else>
  97. <div class="score">{{ item.result }}</div>
  98. <div class="unit">{{ item.unit }}</div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="noData" v-else>
  104. <div>
  105. <img src="@/assets/images/ranking/noData.png" />
  106. <span>暂无更多数据</span>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="main-b">
  111. <div class="btn-left" @click="getPrevious"></div>
  112. <div class="main-b-center">
  113. <div class="columns" v-for="(item, index) in studentList" :key="index">
  114. <Transition name="fade" mode="out-in">
  115. <ul v-if="item.length">
  116. <li v-for="(items, indexs) in item" :key="indexs" @click="openReport(items)">
  117. <div class="txt">
  118. <i>{{ items.rank }}</i>
  119. <div class="studentName">{{ items.student_name }}</div>
  120. <div class="right" v-if="timeProjectList.includes(projectObj.exam_name)">
  121. <div class="score">{{ proxy?.$utils.runTime(items.result, false, false) }}
  122. </div>
  123. </div>
  124. <div class="right" v-else>
  125. <div class="score">{{ items.result }}
  126. </div>
  127. <div class="unit">{{ items.unit }}</div>
  128. </div>
  129. </div>
  130. </li>
  131. </ul>
  132. <div class="noData" v-else>
  133. <div>
  134. <img src="@/assets/images/ranking/noData.png" />
  135. <span>暂无更多数据</span>
  136. </div>
  137. </div>
  138. </Transition>
  139. </div>
  140. </div>
  141. <div class="btn-right" @click="getNext"></div>
  142. </div>
  143. </div>
  144. <div class="footer">
  145. <div class="tab">
  146. <ul>
  147. <li @click="clickProject(item)" :class="{ current: projectObj.exam_name == item.exam_name }"
  148. v-for="item in projectList" :key="item.exam_name">
  149. {{ item.title }}
  150. </li>
  151. </ul>
  152. </div>
  153. </div>
  154. </div>
  155. <div class="choiceClass" v-if="choiceClassWindow">
  156. <div class="choiceClass-content">
  157. <div v-for="(item, index) in classList" :key="item.value">
  158. <div class="classTitle">{{ item.label }}</div>
  159. <ul>
  160. <li @click="openClassPage(items)" v-for="(items, indexs) in item.child" :key="items.id">
  161. {{ items.name }}
  162. </li>
  163. </ul>
  164. </div>
  165. </div>
  166. <div class="choiceClass-btn-box">
  167. <div class="choiceClass-btn choiceClass-btn-all" @click="openAllPage">
  168. 全部排名
  169. </div>
  170. <div class="choiceClass-btn" @click="choiceClassWindow = false">
  171. 关闭
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. <div class="close" @click="confirmExit"></div>
  177. <ReportWindow ref="reportWindowRef" @returnData="returnData" />
  178. </div>
  179. </template>
  180. <script setup name="Ranking" lang="ts">
  181. import { clearInterval, clearTimeout, setInterval, setTimeout } from 'worker-timers';
  182. import { Swiper, SwiperSlide } from 'swiper/vue';
  183. import { Navigation } from 'swiper/modules';
  184. import dataDictionary from "@/utils/dataDictionary"
  185. import 'dayjs/locale/zh-cn'
  186. import dayjs from 'dayjs'
  187. import weekOfYear from 'dayjs/plugin/weekOfYear'
  188. import 'swiper/css';
  189. dayjs.locale('zh-cn')
  190. dayjs.extend(weekOfYear)
  191. const { proxy } = getCurrentInstance() as any;
  192. const router = useRouter();
  193. const refSwiper = ref();
  194. const reportWindowRef = ref();
  195. const emit = defineEmits(['getClose']);
  196. const timeProjectList = ['basketballv1','run50','run60','run70','run100','run200','run400','run800','run1000','runa800','runa1000','runwb800','runwb1000'];
  197. //父值
  198. const props = defineProps({
  199. imWindow: {
  200. type: Boolean,
  201. default: false
  202. },
  203. });
  204. const data = reactive<any>({
  205. pageType: 1,//1年级排名2班级排名
  206. currentDate: "",
  207. projectList: [], //项目列表
  208. projectObj: {}, //当前项目
  209. studentTop: [], //学生前三
  210. studentList: [], //学生排名列表
  211. studentPage: {
  212. current: 1,
  213. size: 15,
  214. pages: 1,
  215. }, //学生分页
  216. type: 1, //1男生2女生
  217. timer: null, //定时器状态
  218. countDownTimer: null, //倒计时状态
  219. countDown: null, //倒计时20秒
  220. logo: "",
  221. gradeType: [],
  222. gradeData: [],
  223. classList: [],
  224. multipleItemRefList: [],
  225. currentClass: {},
  226. classIdKeyObj: {},
  227. choiceClassWindow: false,
  228. date: {
  229. type: 0, //1周2月3季度
  230. start: "",
  231. end: "",
  232. },
  233. debounceTime: '', //加载状态
  234. swiperOption: {
  235. // 设置垂直轮播vertical, 水平轮播 horizontal
  236. direction: "horizontal",
  237. // 轮播图间距
  238. spaceBetween: 30,
  239. // 循环模式选项
  240. loop: false,
  241. slidesPerView: 3,
  242. slidesPerGroup: 3,
  243. initialSlide: 1,
  244. speed: 1600,
  245. // 自动滑动
  246. autoplay: {
  247. delay: 30000,
  248. // 如果设置为true,当切换到最后一个slide时停止自动切换。
  249. stopOnLastSlide: false,
  250. // 如果设置为false,用户操作swiper之后自动切换不会停止,每次都会重新启动autoplay
  251. disableOnInteraction: false,
  252. },
  253. // 轮播图的切换前进后退按钮,如果想放在轮播图中可以看swiper官方文档,这里写在了轮播外
  254. navigation: {
  255. nextEl: ".swiper-button-next",
  256. prevEl: ".swiper-button-prev",
  257. },
  258. on: {
  259. },
  260. },
  261. });
  262. const {
  263. pageType,
  264. currentDate,
  265. projectList,
  266. projectObj,
  267. studentTop,
  268. studentList,
  269. studentPage,
  270. type,
  271. timer,
  272. countDownTimer,
  273. countDown,
  274. logo,
  275. gradeType,
  276. gradeData,
  277. classList,
  278. multipleItemRefList,
  279. currentClass,
  280. classIdKeyObj,
  281. choiceClassWindow,
  282. date,
  283. debounceTime,
  284. swiperOption
  285. } = toRefs(data);
  286. /**
  287. * 创建组件实例
  288. */
  289. const multipleItemRef = (el: any, grade: any) => {
  290. multipleItemRefList.value[grade] = el;
  291. }
  292. //获取年级列表
  293. const getClass = () => {
  294. let params = {
  295. page: 1,
  296. per_page: 9999,
  297. };
  298. proxy?.$http.common.classList(params)
  299. .then((res: any) => {
  300. let myInfo: any = localStorage.getItem("userInfo");
  301. let userInfo = JSON.parse(myInfo);
  302. let obj = dataDictionary.gradeLists.find((item) => {
  303. return userInfo.category == item.value
  304. })
  305. let gradeLists: any = []
  306. if (obj != undefined) {
  307. gradeLists = obj.child
  308. }
  309. // 重新排序一次
  310. let list: any = [];
  311. gradeLists.forEach((item: any) => {
  312. res.data.forEach((items: any) => {
  313. // classIdKeyObj.value[items.id] = items
  314. if (items.grade == item.value) {
  315. list.push(items);
  316. }
  317. })
  318. });
  319. let myClassList = gradeType.value.map((item: any) => {
  320. let newList = list.filter((items: any) => {
  321. return items.grade == item.value;
  322. })
  323. item.child = newList || [];
  324. return item;
  325. });
  326. classList.value = myClassList;
  327. })
  328. };
  329. //获取项目
  330. const getProject = () => {
  331. let params = {};
  332. proxy?.$http.ranking.examlistShow(params).then((res: any) => {
  333. if (res.status == 200) {
  334. let dic: any = dataDictionary.project;
  335. let list = res.data.map((item: any) => {
  336. item.title = dic[item.exam_name];
  337. return item;
  338. });
  339. projectList.value = list;
  340. if (list.length) {
  341. projectObj.value = list[0];
  342. getData();
  343. getAutoplay();
  344. }
  345. }
  346. });
  347. };
  348. //自动切换排行榜
  349. const getAutoplay = () => {
  350. // refSwiper.value.autoplay.start();
  351. let qieTime = swiperOption.value.autoplay.delay * (gradeData.value.length / swiperOption.value.slidesPerGroup);//切换项目时间
  352. timer.value = setInterval((res: any) => {
  353. //切换类型
  354. let type1 = JSON.parse(JSON.stringify(type.value));
  355. if (type1 == 1) {
  356. type.value = 2;
  357. }
  358. if (type1 == 2) {
  359. type.value = 1;
  360. }
  361. //切换项目归为1后切换项目
  362. if (type.value == 1) {
  363. let projectIndex = projectList.value.findIndex((item: any) => {
  364. return item.exam_name == projectObj.value.exam_name;
  365. });
  366. if (projectIndex + 1 == projectList.value.length) {
  367. //最后一个就重新开始
  368. projectObj.value = projectList.value[0];
  369. } else {
  370. //项目从左到右
  371. projectObj.value = projectList.value[projectIndex + 1];
  372. }
  373. }
  374. getData();
  375. }, qieTime);
  376. };
  377. //停止切换排行榜
  378. const getStopPlaying = (myTime?: any) => {
  379. clearInterval(timer.value);
  380. clearInterval(countDownTimer.value);
  381. // refSwiper.value.$swiper.autoplay.stop();
  382. //30秒后重新自动运行
  383. countDown.value = myTime || 20;
  384. countDownTimer.value = setInterval((res: any) => {
  385. countDown.value--;
  386. console.log("即将启动自动切换", countDown.value);
  387. if (countDown.value <= 0) {
  388. getAutoplay();
  389. clearInterval(countDownTimer.value);
  390. }
  391. }, 1000);
  392. };
  393. //请求数据
  394. const getData = () => {
  395. if (pageType.value == 1) {
  396. gradeData.value.forEach((item: any, index: any) => {
  397. gradeData.value[index].page.current = 1;
  398. })
  399. getIniGrade();
  400. }
  401. if (pageType.value == 2) {
  402. studentPage.value.current = 1;
  403. getGoodStudent();
  404. getStudentList();
  405. }
  406. };
  407. //各项目的学生前三
  408. const getGoodStudent = () => {
  409. studentTop.value = [];
  410. let params: any = {
  411. exam_name: projectObj.value.exam_name,
  412. page: 1,
  413. per_page: 3,
  414. };
  415. if (date.value.type != 0) {
  416. params.start_date = date.value.start;
  417. params.end_date = date.value.end;
  418. }
  419. if (type.value == 1) {
  420. params.gender = 1;
  421. }
  422. if (type.value == 2) {
  423. params.gender = 0;
  424. }
  425. if (pageType.value == 2) {
  426. params.class_id = currentClass.value.id;
  427. }
  428. proxy?.$http.ranking.studentRanking(params).then((res: any) => {
  429. if (res.status == 200) {
  430. let list = res.data.map((item: any) => {
  431. if (projectObj.value.exam_name == 'solidball' || projectObj.value.exam_name == 'shotball') {
  432. item.result = item.result / 100
  433. }
  434. let result = null;
  435. if (item.result.toString().indexOf(".") != -1) {
  436. if (['jump', 'longjump', 'run50', 'run60', 'run70', 'run100', 'run200', 'run400', 'run800', 'run1000', 'run15x4', 'run50x8', 'run10x4', 'basketballv1', 'basketballv1'].includes(projectObj.value.exam_name)) {
  437. result = item.result.toFixed(2)
  438. } else {
  439. result = item.result.toFixed(1);
  440. }
  441. } else {
  442. result = item.result
  443. }
  444. item.result = result;
  445. let dic: any = dataDictionary.unit;
  446. item.unit = dic[projectObj.value.exam_name];
  447. return item
  448. });
  449. studentTop.value = list;
  450. }
  451. });
  452. };
  453. //各项目的学生排名列表
  454. const getStudentList = () => {
  455. let params: any = {
  456. exam_name: projectObj.value.exam_name,
  457. page: studentPage.value.current,
  458. per_page: studentPage.value.size,
  459. offset: 3,
  460. };
  461. if (date.value.type != 0) {
  462. params.start_date = date.value.start;
  463. params.end_date = date.value.end;
  464. }
  465. if (type.value == 1) {
  466. params.gender = 1;
  467. }
  468. if (type.value == 2) {
  469. params.gender = 0;
  470. }
  471. if (pageType.value == 2) {
  472. params.class_id = currentClass.value.id;
  473. }
  474. proxy?.$http.ranking.studentRanking(params).then((res: any) => {
  475. if (res.status == 200) {
  476. let list: any = [[], [], []];
  477. let num = studentPage.value.size / 3;
  478. res.data
  479. .map((item: any) => {
  480. if (projectObj.value.exam_name == 'solidball' || projectObj.value.exam_name == 'shotball') {
  481. item.result = item.result / 100
  482. }
  483. let result = null;
  484. if (item.result.toString().indexOf(".") != -1) {
  485. if (['jump', 'longjump', 'run50', 'run60', 'run70', 'run100', 'run200', 'run400', 'run800', 'run1000', 'run15x4', 'run50x8', 'run10x4', 'basketballv1'].includes(projectObj.value.exam_name)) {
  486. result = item.result.toFixed(2)
  487. } else {
  488. result = item.result.toFixed(1);
  489. }
  490. } else {
  491. result = item.result
  492. }
  493. item.result = result;
  494. let dic: any = dataDictionary.unit;
  495. item.unit = dic[projectObj.value.exam_name];
  496. return item
  497. })
  498. .forEach((item: any, index: any) => {
  499. if (index >= 0 && index <= num * 1 - 1) {
  500. list[0].push(item);
  501. }
  502. if (index >= num && index <= num * 2 - 1) {
  503. list[1].push(item);
  504. }
  505. if (index >= num * 2 && index <= num * 3 - 1) {
  506. list[2].push(item);
  507. }
  508. });
  509. studentList.value = list;
  510. getPages(res.total);
  511. }
  512. });
  513. };
  514. //获取班级排名
  515. const getGradeList = async (grade: any) => {
  516. let index = gradeData.value.findIndex((item: any) => {
  517. return item.value == grade;
  518. })
  519. let params: any = {
  520. exam_name: projectObj.value.exam_name,
  521. page: gradeData.value[index].page.current,
  522. per_page: gradeData.value[index].page.size,
  523. grade: grade,
  524. };
  525. if (date.value.type != 0) {
  526. params.start_date = date.value.start;
  527. params.end_date = date.value.end;
  528. }
  529. if (type.value == 1) {
  530. params.gender = 1;
  531. }
  532. if (type.value == 2) {
  533. params.gender = 0;
  534. }
  535. await proxy?.$http.ranking.studentRanking(params).then((res: any) => {
  536. if (res.status == 200) {
  537. let list = res.data
  538. .map((item: any) => {
  539. if (projectObj.value.exam_name == 'solidball' || projectObj.value.exam_name == 'shotball') {
  540. item.result = item.result / 100
  541. }
  542. let result = null;
  543. if (item.result.toString().indexOf(".") != -1) {
  544. if (['jump', 'longjump', 'run50', 'run60', 'run70', 'run100', 'run200', 'run400', 'run800', 'run1000', 'run15x4', 'run50x8', 'run10x4', 'basketballv1', 'basketballv1'].includes(projectObj.value.exam_name)) {
  545. result = item.result.toFixed(2)
  546. } else {
  547. result = item.result.toFixed(1);
  548. }
  549. } else {
  550. result = item.result
  551. }
  552. item.result = result;
  553. let dic: any = dataDictionary.unit;
  554. item.unit = dic[projectObj.value.exam_name];
  555. return item
  556. })
  557. gradeData.value[index]?.page.current == 1 ?
  558. (gradeData.value[index].list = list) :
  559. gradeData.value[index]?.list.push(...list);
  560. getGradePages(res.total, grade);
  561. }
  562. });
  563. };
  564. //年级排名
  565. const getIniGrade = async () => {
  566. gradeData.value = [];
  567. for(let i:any = 0;i<gradeType.value.length;i++){
  568. let item = gradeType.value[i]
  569. //构建年级数据结构
  570. let obj: any = {
  571. label: item.label,
  572. value: item.value,
  573. page: {
  574. current: 1,
  575. size: 15,
  576. pages: 1,
  577. },
  578. list: [],
  579. }
  580. gradeData.value.push(obj);
  581. await getGradeList(item.value);
  582. }
  583. };
  584. const getScroll = (event?: any, grade?: any) => {
  585. getStopPlaying();//滚动的停止执行切换
  586. let index = gradeData.value.findIndex((item: any) => {
  587. return item.value == grade;
  588. })
  589. if (gradeData.value[index].page.current == gradeData.value[index]?.page.pages) {
  590. return false;
  591. }
  592. let obj = multipleItemRefList.value[grade];
  593. let scrollHeight = obj.scrollHeight;
  594. let scrollTop = obj.scrollTop;
  595. let clientHeight = obj.clientHeight;
  596. //提前高度加载数据
  597. if (scrollTop + clientHeight + 150 >= scrollHeight) {
  598. // console.log('到底了!')
  599. //继续加载下一页
  600. if (debounceTime.value) {
  601. clearTimeout(debounceTime.value)
  602. }
  603. debounceTime.value = setTimeout(() => {
  604. gradeData.value[index].page.current++;
  605. getGradeList(grade);
  606. }, 500)
  607. } else {
  608. // console.log('没到底')
  609. }
  610. };
  611. const openAllPage = () => {
  612. pageType.value = 1;
  613. choiceClassWindow.value = false;
  614. };
  615. const openClassPage = (data: any) => {
  616. currentClass.value = data;
  617. pageType.value = 2;
  618. getData();
  619. choiceClassWindow.value = false;
  620. };
  621. //切换排行榜
  622. const clickType = (data: any) => {
  623. type.value = data;
  624. getData();
  625. getStopPlaying();
  626. };
  627. //切换项目
  628. const clickProject = (data: any) => {
  629. projectObj.value = data;
  630. getData();
  631. getStopPlaying();
  632. };
  633. //时间类型
  634. const getDateType = (data: any) => {
  635. date.value.type = data;
  636. getTypeTime();
  637. getData();
  638. getStopPlaying();
  639. };
  640. //时间转化
  641. const getTypeTime = () => {
  642. //本周
  643. if (date.value.type == 1) {
  644. date.value.start = dayjs()
  645. .startOf("week")
  646. .format("YYYY-MM-DD");
  647. date.value.end = dayjs()
  648. .endOf("week")
  649. .format("YYYY-MM-DD");
  650. }
  651. //月
  652. if (date.value.type == 2) {
  653. date.value.start = dayjs().startOf("month").format("YYYY-MM-DD");
  654. date.value.end = dayjs().endOf("month").format("YYYY-MM-DD");
  655. }
  656. //季度
  657. if (date.value.type == 3) {
  658. let month = dayjs().month() + 1;
  659. let jiduArr = [
  660. [1, 3],
  661. [4, 6],
  662. [7, 9],
  663. [10, 12]
  664. ];
  665. let start = 0;
  666. let end = 0;
  667. let index = 0;
  668. if (month >= 1 && month <= 3) {
  669. index = 0
  670. }
  671. if (month >= 4 && month <= 6) {
  672. index = 1
  673. }
  674. if (month >= 7 && month <= 9) {
  675. index = 2
  676. }
  677. if (month >= 10 && month <= 12) {
  678. index = 3
  679. }
  680. start = jiduArr[index][0] - 1;
  681. end = jiduArr[index][1] - 1;
  682. date.value.start = dayjs().month(start).startOf("month").format("YYYY-MM-DD");
  683. date.value.end = dayjs().month(end).endOf("month").format("YYYY-MM-DD");
  684. }
  685. //上周
  686. if (date.value.type == 4) {
  687. date.value.start = dayjs()
  688. .add(-1, "week").startOf("week")
  689. .format("YYYY-MM-DD");
  690. date.value.end = dayjs()
  691. .add(-1, "week").startOf("week")
  692. .endOf("week")
  693. .format("YYYY-MM-DD");
  694. }
  695. //年
  696. if (date.value.type == 5) {
  697. date.value.start = dayjs().startOf("year").format("YYYY-MM-DD");
  698. date.value.end = dayjs().endOf("year").format("YYYY-MM-DD");
  699. }
  700. };
  701. //上一页
  702. const getPrevious = () => {
  703. if (studentPage.value.current == 1) {
  704. return false;
  705. }
  706. studentPage.value.current--;
  707. getStudentList();
  708. getStopPlaying();
  709. };
  710. //下一页
  711. const getNext = () => {
  712. if (studentPage.value.current == studentPage.value.pages) {
  713. return false;
  714. }
  715. studentPage.value.current++;
  716. getStudentList();
  717. getStopPlaying();
  718. };
  719. //计算页码
  720. const getPages = (data: any) => {
  721. studentPage.value.pages = Math.ceil(data / studentPage.value.size);
  722. };
  723. //计算年级页码
  724. const getGradePages = (data: any, grade: any) => {
  725. let index = gradeData.value.findIndex((item: any) => {
  726. return item.value == grade;
  727. })
  728. if(gradeData.value[index]?.page){
  729. gradeData.value[index].page.pages = Math.ceil(data / gradeData.value[index].page.size);
  730. }
  731. };
  732. //更新时间
  733. const setDate = () => {
  734. //currentDate.value = getDate();
  735. setTimeout(setDate, 1000);
  736. };
  737. //查看详情
  738. const openReport = (data: any) => {
  739. reportWindowRef.value.open(projectObj.value.exam_name, data);
  740. };
  741. //监听窗口事件
  742. const returnData = (data: any) => {
  743. console.log("111", data)
  744. if (data == true) {
  745. getStopPlaying(60 * 5);
  746. }
  747. if (data == false) {
  748. getStopPlaying();
  749. }
  750. };
  751. /**
  752. * 返回
  753. */
  754. const confirmExit = () => {
  755. if(props.imWindow){
  756. emit('getClose', false);
  757. }else{
  758. router.go(-1);
  759. }
  760. };
  761. onBeforeMount(() => {
  762. const myInfo: any = localStorage.getItem("userInfo");
  763. const userinfo = JSON.parse(myInfo)
  764. logo.value = userinfo.avatar_url;
  765. let obj: any = dataDictionary.gradeLists.find((item) => {
  766. return item.value == userinfo.category;
  767. })
  768. gradeType.value = obj.child || [];
  769. getClass();
  770. })
  771. onMounted(() => {
  772. getTypeTime();
  773. getProject();
  774. })
  775. onBeforeUnmount(() => {
  776. clearInterval(timer.value);
  777. clearInterval(countDownTimer.value);
  778. })
  779. </script>
  780. <style lang="scss" scoped>
  781. $topPadding: 5.19rem;
  782. $waiPadding: 6.51rem;
  783. .ranking {
  784. width: calc(100% - ($waiPadding * 2));
  785. padding-top: 9rem;
  786. margin: 0 auto;
  787. display: flex;
  788. flex-direction: column;
  789. .top {
  790. width: 100%;
  791. color: #ffffff;
  792. margin-bottom: 1vh;
  793. display: flex;
  794. justify-content: space-between;
  795. .top-left {
  796. display: flex;
  797. align-items: flex-end;
  798. .title1 {
  799. font-size: 3.14rem;
  800. line-height: 1;
  801. color: #00FFE8;
  802. margin-right: 1.49rem;
  803. }
  804. .title2 {
  805. font-size: 1.65rem;
  806. line-height: 1;
  807. color: #F9F9F9;
  808. padding-right: 2.2rem;
  809. background: url("@/assets/images/ranking/arrow.png") right center no-repeat;
  810. background-size: 1.5rem 1.1rem;
  811. cursor: pointer;
  812. }
  813. }
  814. .tab {
  815. display: flex;
  816. justify-content: space-between;
  817. align-items: center;
  818. ul {
  819. display: flex;
  820. margin: 0;
  821. margin-right: 20px;
  822. border: 1px solid #E1E4E7;
  823. border-radius: 2.3rem;
  824. overflow: hidden;
  825. box-sizing: border-box;
  826. li {
  827. height: 4.6vh;
  828. line-height: 4.6vh;
  829. padding: 0 20px;
  830. font-size: 1.2rem;
  831. color: #E1E4E7;
  832. cursor: pointer;
  833. }
  834. .current {
  835. color: #1A293A;
  836. background: radial-gradient(239% 126% at 5% 93%, #8EFFA9 0%, #07FFE7 100%);
  837. }
  838. }
  839. dl {
  840. display: flex;
  841. margin: 0;
  842. background: radial-gradient(96% 96% at 2% 32%, #FFFFFF 0%, #FCFDFD 54%, #E1E4E7 100%);
  843. border-radius: 2.3vh;
  844. height: 4.6vh;
  845. dt {
  846. height: 4.6vh;
  847. line-height: 4.6vh;
  848. padding: 0 25px;
  849. border-radius: 2.3vh;
  850. font-size: 1.2rem;
  851. color: #1A293A;
  852. cursor: pointer;
  853. }
  854. .current {
  855. background: radial-gradient(239% 126% at 5% 93%, #8EFFA9 0%, #07FFE7 100%);
  856. }
  857. }
  858. }
  859. }
  860. .mainBox {
  861. border-radius: 1.6rem;
  862. background: linear-gradient(67deg, #092941 -85%, #2A484B 96%);
  863. box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.3);
  864. .main {
  865. height: calc(80vh - 9rem);
  866. display: flex;
  867. flex-direction: column;
  868. padding: 2vh 2vh 0 2vh;
  869. box-sizing: border-box;
  870. .main-a {
  871. width: 100%;
  872. height: 27vh;
  873. position: relative;
  874. margin-bottom: 2.5vh;
  875. display: flex;
  876. .main-a-center {
  877. display: flex;
  878. justify-content: space-around;
  879. align-items: flex-end;
  880. width: 100%;
  881. box-sizing: border-box;
  882. .item {
  883. width: calc(100%/3 - 10px);
  884. height: 100%;
  885. color: #ffffff;
  886. border-radius: 1.66rem;
  887. box-sizing: border-box;
  888. display: flex;
  889. justify-content: center;
  890. align-items: center;
  891. font-size: 1.9rem;
  892. cursor: pointer;
  893. .touxiang {
  894. width: 16vh;
  895. height: 16vh;
  896. box-sizing: border-box;
  897. border-radius: 50%;
  898. background: #ffffff;
  899. border: 5px solid rgba(26, 41, 58, 0.6315);
  900. flex-shrink: 0;
  901. margin-right: 15px;
  902. position: relative;
  903. img {
  904. border-radius: 50%;
  905. width: 100%;
  906. height: 100%;
  907. overflow: hidden;
  908. }
  909. &::before {
  910. content: "";
  911. width: 6vh;
  912. height: 4vh;
  913. display: flex;
  914. position: absolute;
  915. left: 50%;
  916. margin-left: -3vh;
  917. top: calc(-4vh - 5px);
  918. background-size: 100% 100%;
  919. background-position: center center;
  920. background-repeat: no-repeat;
  921. background-image: url("@/assets/images/ranking/mao.png");
  922. }
  923. }
  924. }
  925. .txt {
  926. display: flex;
  927. justify-content: space-between;
  928. flex-direction: column;
  929. .number {
  930. color: #1A293A;
  931. font-size: 5.35rem;
  932. font-family: 'Saira-ExtraBold';
  933. line-height: 1;
  934. margin-bottom: 5px;
  935. }
  936. .studentName {
  937. display: block;
  938. white-space: nowrap;
  939. overflow: hidden;
  940. text-overflow: ellipsis;
  941. line-height: 1;
  942. text-align: center;
  943. border-radius: 3rem;
  944. padding: 0.5rem 0;
  945. background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.6571) 100%);
  946. color: #1A293A;
  947. box-sizing: border-box;
  948. border: 1px solid #FFFFFF;
  949. margin-bottom: 5px;
  950. }
  951. .scoreBox {
  952. display: flex;
  953. line-height: 1;
  954. align-items: center;
  955. justify-content: center;
  956. color: #1A293A;
  957. .score {
  958. font-size: 3.53rem;
  959. font-family: 'Saira-ExtraBold';
  960. }
  961. .unit {
  962. font-size: 2rem;
  963. margin-left: 4px;
  964. }
  965. }
  966. }
  967. }
  968. .one {
  969. background: radial-gradient(87% 129% at 96% 5%, #FAFF28 0%, #FFDC22 100%);
  970. }
  971. .two {
  972. background: radial-gradient(66% 97% at 96% 5%, #61FFC7 0%, #8BFF69 100%);
  973. }
  974. .three {
  975. background: radial-gradient(65% 96% at 96% 5%, #7BFFF1 0%, #67FFC6 100%);
  976. }
  977. }
  978. }
  979. .main-b {
  980. width: 100%;
  981. height: 40vh;
  982. position: relative;
  983. display: flex;
  984. .main-b-center {
  985. width: 100%;
  986. height: 100%;
  987. padding: 0px;
  988. box-sizing: border-box;
  989. display: flex;
  990. .columns {
  991. height: 100%;
  992. width: calc(100% / 3);
  993. flex: 1;
  994. box-sizing: border-box;
  995. padding: 0px 1.8rem;
  996. display: flex;
  997. border-right: 1.5px solid #48677E;
  998. flex-shrink: 0;
  999. &:last-child {
  1000. border: none;
  1001. }
  1002. ul {
  1003. width: 100%;
  1004. li {
  1005. height: 20%;
  1006. color: #ffffff;
  1007. font-size: 1.6rem;
  1008. overflow: hidden;
  1009. display: flex;
  1010. align-items: center;
  1011. cursor: pointer;
  1012. border-bottom: 1px solid #979797;
  1013. box-sizing: border-box;
  1014. .txt {
  1015. width: 100%;
  1016. display: flex;
  1017. align-items: center;
  1018. justify-content: space-between;
  1019. i {
  1020. font-size: 1.65rem;
  1021. min-width: 2.5rem;
  1022. margin-right: 1.5rem;
  1023. font-style: normal;
  1024. text-align: center;
  1025. color: #13ED84;
  1026. font-family: 'Saira-ExtraBold';
  1027. }
  1028. .studentName {
  1029. max-width: 20rem;
  1030. font-size: 1.65rem;
  1031. color: #F9F9F9;
  1032. display: block;
  1033. white-space: nowrap;
  1034. overflow: hidden;
  1035. text-overflow: ellipsis;
  1036. flex: 1;
  1037. }
  1038. .right {
  1039. display: flex;
  1040. line-height: 1;
  1041. align-items: center;
  1042. justify-content: center;
  1043. color: #F9F9F9;
  1044. .score {
  1045. font-size: 1.3rem;
  1046. font-family: 'Saira-ExtraBold';
  1047. }
  1048. .unit {
  1049. font-size: 0.8rem;
  1050. margin-left: 4px;
  1051. }
  1052. }
  1053. }
  1054. &:last-child {
  1055. border: none
  1056. }
  1057. }
  1058. }
  1059. }
  1060. }
  1061. .btn-left {
  1062. cursor: pointer;
  1063. width: 16px;
  1064. height: 16px;
  1065. margin-left: 0px;
  1066. background: url("@/assets/images/ranking/btn-left.png") center center no-repeat;
  1067. background-size: 100% 100%;
  1068. flex-shrink: 0;
  1069. position: absolute;
  1070. left: 0;
  1071. top: 50%;
  1072. margin-top: -8px;
  1073. }
  1074. .btn-right {
  1075. cursor: pointer;
  1076. width: 16px;
  1077. height: 16px;
  1078. margin-right: 0px;
  1079. background: url("@/assets/images/ranking/btn-right.png") center center no-repeat;
  1080. background-size: 100% 100%;
  1081. flex-shrink: 0;
  1082. position: absolute;
  1083. right: 0;
  1084. top: 50%;
  1085. margin-top: -8px;
  1086. }
  1087. }
  1088. .swiperBox {
  1089. width: 100%;
  1090. .item {
  1091. .gradeTitle {
  1092. height: 6vh;
  1093. line-height: 6vh;
  1094. width: 100%;
  1095. text-align: center;
  1096. color: #1A293A;
  1097. font-size: 1.65rem;
  1098. background: radial-gradient(120% 126% at 5% 93%, #8EFFA9 0%, #07FFE7 100%);
  1099. border-top-left-radius: 1.6rem;
  1100. border-top-right-radius: 1.6rem;
  1101. }
  1102. ul {
  1103. height: calc(80vh - 9rem - 2vh - 6vh);
  1104. margin-bottom: 0.5vh;
  1105. overflow-y: scroll;
  1106. overflow-x: hidden;
  1107. border-left: 1px solid #48677E;
  1108. border-right: 1px solid #48677E;
  1109. box-sizing: border-box;
  1110. li {
  1111. * {
  1112. pointer-events: none;
  1113. }
  1114. height: 8.2vh;
  1115. display: flex;
  1116. align-items: center;
  1117. padding: 0px 30px;
  1118. color: #ffffff;
  1119. justify-content: space-between;
  1120. cursor: pointer;
  1121. border-bottom: 1px solid #48677E;
  1122. .left {
  1123. display: flex;
  1124. i {
  1125. font-size: 1.1rem;
  1126. min-width: 2.5rem;
  1127. margin-right: 1rem;
  1128. font-style: normal;
  1129. text-align: center;
  1130. color: #13ED84;
  1131. font-family: 'Saira-ExtraBold';
  1132. }
  1133. .pai {
  1134. width: 3.5rem;
  1135. height: 2.5rem;
  1136. box-sizing: border-box;
  1137. padding-top: 0.9rem;
  1138. color: #FFFFFF;
  1139. }
  1140. .pai1 {
  1141. background: url("@/assets/images/ranking/pai1.png") left center no-repeat;
  1142. background-size: 100% 100%;
  1143. }
  1144. .pai2 {
  1145. background: url("@/assets/images/ranking/pai2.png") left center no-repeat;
  1146. background-size: 100% 100%;
  1147. }
  1148. .pai3 {
  1149. background: url("@/assets/images/ranking/pai3.png") left center no-repeat;
  1150. background-size: 100% 100%;
  1151. }
  1152. .userInfo {
  1153. display: flex;
  1154. .touxiang {
  1155. width: 6vh;
  1156. height: 6vh;
  1157. box-sizing: border-box;
  1158. border-radius: 50%;
  1159. background: #ffffff;
  1160. margin-left: 10px;
  1161. margin-right: 13px;
  1162. flex-shrink: 0;
  1163. img {
  1164. border-radius: 50%;
  1165. width: 100%;
  1166. height: 100%;
  1167. overflow: hidden;
  1168. }
  1169. }
  1170. .nameBox {
  1171. display: flex;
  1172. text-align: left;
  1173. flex-direction: column;
  1174. .studentName {
  1175. color: #F9F9F9;
  1176. font-size: 1rem;
  1177. margin-bottom: 0.5vh;
  1178. }
  1179. .className {
  1180. font-size: 0.8rem;
  1181. color: #13ED84;
  1182. }
  1183. }
  1184. }
  1185. }
  1186. .right {
  1187. display: flex;
  1188. line-height: 1;
  1189. align-items: center;
  1190. justify-content: center;
  1191. color: #F9F9F9;
  1192. .score {
  1193. font-size: 1.3rem;
  1194. font-family: 'Saira-ExtraBold';
  1195. }
  1196. .unit {
  1197. font-size: 0.8rem;
  1198. margin-left: 4px;
  1199. }
  1200. }
  1201. }
  1202. &::-webkit-scrollbar {
  1203. width: 8px;
  1204. }
  1205. &::-webkit-scrollbar-thumb {
  1206. border-width: 2px;
  1207. border-radius: 4px;
  1208. border-style: dashed;
  1209. border-color: transparent;
  1210. background: rgb(27, 72, 92);
  1211. background-clip: padding-box;
  1212. }
  1213. &::-webkit-scrollbar-button:hover {
  1214. border-radius: 5px;
  1215. background: rgba(26, 62, 78, 1);
  1216. }
  1217. }
  1218. }
  1219. }
  1220. .noData {
  1221. display: flex;
  1222. justify-content: center;
  1223. align-items: center;
  1224. flex-direction: column;
  1225. font-size: 1rem;
  1226. color: #ffffff;
  1227. text-align: center;
  1228. margin: 0 auto;
  1229. img {
  1230. max-width: 70%;
  1231. margin-bottom: 10px;
  1232. }
  1233. span {
  1234. display: block;
  1235. }
  1236. }
  1237. .swiper-btn {
  1238. width: 2.5rem;
  1239. height: 2.5rem;
  1240. display: block;
  1241. &::after {
  1242. display: none;
  1243. }
  1244. }
  1245. .swiper-btn-left {
  1246. background: url("@/assets/images/ranking/btn-left.png") left center no-repeat;
  1247. background-size: 100% 100%;
  1248. }
  1249. .swiper-btn-right {
  1250. background: url("@/assets/images/ranking/btn-right.png") left center no-repeat;
  1251. background-size: 100% 100%;
  1252. }
  1253. }
  1254. .footer {
  1255. width: 100%;
  1256. display: flex;
  1257. align-items: center;
  1258. border-top: 1px solid #48677E;
  1259. overflow: hidden;
  1260. box-sizing: border-box;
  1261. padding: 0 2vh;
  1262. .tab {
  1263. width: 100%;
  1264. padding-top: 1.5rem;
  1265. ul {
  1266. display: flex;
  1267. padding-bottom: 0.1rem;
  1268. overflow-x: scroll;
  1269. li {
  1270. height: 4.6vh;
  1271. line-height: 4.6vh;
  1272. padding: 0 20px;
  1273. font-size: 1.2rem;
  1274. color: #F9F9F9;
  1275. margin: 0 0.6rem;
  1276. border-radius: 2.3vh;
  1277. cursor: pointer;
  1278. flex-shrink: 0;
  1279. &:hover {
  1280. background: #00FFE8;
  1281. color: #1A293A;
  1282. }
  1283. }
  1284. .current {
  1285. background: #00FFE8;
  1286. color: #1A293A;
  1287. }
  1288. &::-webkit-scrollbar {
  1289. width: 6px;
  1290. }
  1291. &::-webkit-scrollbar-thumb {
  1292. border-radius: 3px;
  1293. border-style: dashed;
  1294. border-color: transparent;
  1295. background: rgb(27, 72, 92);
  1296. background-clip: padding-box;
  1297. }
  1298. &::-webkit-scrollbar-button:hover {
  1299. border-radius: 3px;
  1300. background: rgba(26, 62, 78, 1);
  1301. }
  1302. }
  1303. }
  1304. }
  1305. }
  1306. .choiceClass {
  1307. width: calc(100% - ($waiPadding * 2));
  1308. position: absolute;
  1309. z-index: 2;
  1310. top: 10vh;
  1311. left: var($waiPadding);
  1312. background: rgba(11, 29, 39, 0.9);
  1313. border-radius: 10px;
  1314. padding: 20px;
  1315. box-sizing: border-box;
  1316. box-shadow: rgba(57, 187, 187, 0.48) 0px 0px 10px 10px inset;
  1317. border: 2px solid rgb(57, 187, 187);
  1318. .choiceClass-content {
  1319. color: #ffffff;
  1320. display: flex;
  1321. justify-content: space-around;
  1322. .classTitle {
  1323. font-size: 1.4rem;
  1324. margin-bottom: 20px;
  1325. }
  1326. ul {
  1327. height: 67vh;
  1328. margin-bottom: 2vh;
  1329. overflow-y: scroll;
  1330. li {
  1331. font-size: 1.2rem;
  1332. padding: 10px 0;
  1333. cursor: pointer;
  1334. &:hover {
  1335. color: #4573df;
  1336. }
  1337. }
  1338. &::-webkit-scrollbar {
  1339. width: 10px;
  1340. }
  1341. &::-webkit-scrollbar-thumb {
  1342. border-width: 2px;
  1343. border-radius: 4px;
  1344. border-style: dashed;
  1345. border-color: transparent;
  1346. background-color: rgba(26, 62, 78, 0.5);
  1347. background-clip: padding-box;
  1348. }
  1349. &::-webkit-scrollbar-button:hover {
  1350. border-radius: 6px;
  1351. background: rgba(26, 62, 78, 1);
  1352. }
  1353. }
  1354. }
  1355. .choiceClass-btn-box {
  1356. display: flex;
  1357. justify-content: center;
  1358. .choiceClass-btn {
  1359. margin: 0 15px;
  1360. text-align: center;
  1361. width: 100px;
  1362. background: #39bbbb;
  1363. height: 35px;
  1364. line-height: 35px;
  1365. color: #fff;
  1366. cursor: pointer;
  1367. }
  1368. .choiceClass-btn-all {
  1369. background: rgba(13, 90, 245, 0.5);
  1370. }
  1371. }
  1372. }
  1373. .close {
  1374. position: absolute;
  1375. // right: calc($waiPadding - 3.2rem);
  1376. left: auto;
  1377. right: calc($topPadding / 2 - 3.2rem / 4);
  1378. top: auto;
  1379. bottom: calc($topPadding / 2 - 3.2rem / 4);
  1380. }
  1381. .fade-enter-active,
  1382. .fade-leave-active {
  1383. transition: opacity 0.5s;
  1384. }
  1385. .fade-enter,
  1386. .fade-leave-to
  1387. /* .fade-leave-active below version 2.1.8 */
  1388. {
  1389. opacity: 0;
  1390. }
  1391. </style>