index.vue 41 KB

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