CourseTree.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648
  1. <template>
  2. <div class="course_tree">
  3. <div v-for="(courseItem, courseIndex) in treeList" :key="courseIndex">
  4. <div v-if="courseItem.courseList" class="teacherList_name">
  5. <div
  6. v-for="tea in courseItem.courseList"
  7. :key="tea.courseId"
  8. class="names"
  9. :class="{ nactive: tea.courseId == courseItem.courseId }"
  10. @click="activeFunc(tea.courseId, courseIndex)"
  11. >
  12. {{ tea.aliasName }}
  13. </div>
  14. </div>
  15. <div
  16. class="item__title"
  17. @click="getMenuList(courseItem)"
  18. v-if="treeList.length != 1"
  19. >
  20. <i
  21. :class="{
  22. 'el-icon-caret-right': !courseItem.showList,
  23. 'el-icon-caret-bottom': courseItem.showList
  24. }"
  25. ></i>
  26. {{ courseItem.courseName }}
  27. </div>
  28. <div
  29. v-if="courseItem.showList"
  30. :style="{ paddingLeft: treeList.length != 1 ? '12px' : '0' }"
  31. >
  32. <div class="item" v-for="(menu, index) in courseItem.list" :key="index">
  33. <template v-if="menu.type == 1">
  34. <div
  35. class="item__title"
  36. @click="openModule(menu)"
  37. style="padding:0px 8px;"
  38. >
  39. <i
  40. :class="{
  41. 'el-icon-caret-right': !menu.showList,
  42. 'el-icon-caret-bottom': menu.showList
  43. }"
  44. ></i>
  45. <div class="MenuNames">
  46. {{ menu.menuName }}
  47. </div>
  48. <el-tag v-if="menu.commonSign == 1" size="mini">公共章</el-tag>
  49. <span
  50. class="btn_status"
  51. style="height: 20px;line-height: 20px;font-weight: 400;"
  52. :class="'btn_status_' + getNewModuleStudyStatus(menu, true)"
  53. >{{ getNewModuleStudyStatus(menu) }}</span
  54. >
  55. </div>
  56. <div class="item__content">
  57. <div class="bank-chapter" v-if="menu.showList">
  58. <div
  59. class="bank-chapter__item"
  60. v-for="chapter in menu.list"
  61. :key="chapter.id"
  62. >
  63. <div
  64. v-if="chapter.type == 1"
  65. class="bank-chapter__item__text"
  66. @click="openChapter(chapter)"
  67. >
  68. <i
  69. :class="{
  70. 'el-icon-caret-right': !chapter.showList,
  71. 'el-icon-caret-bottom': chapter.showList
  72. }"
  73. ></i
  74. >{{ chapter.name }}
  75. <el-tag v-if="chapter.commonSign == 1" size="mini"
  76. >公共章</el-tag
  77. >
  78. <span
  79. class="btn_status"
  80. :class="
  81. 'btn_status_' + getNewChapterStudyStatus(chapter, true)
  82. "
  83. >{{ getNewChapterStudyStatus(chapter) }}</span
  84. >
  85. </div>
  86. <div
  87. class="bank-section"
  88. v-if="chapter.showList && chapter.type == 1"
  89. >
  90. <div
  91. :id="'section-' + section.typeId"
  92. class="bank-section__item"
  93. :class="{
  94. active: isActive(section)
  95. }"
  96. v-for="(section, sectionIndex) in chapter.list"
  97. :key="sectionIndex"
  98. @click="getResource(section, 1, courseIndex)"
  99. >
  100. <template v-if="section.type != 2">
  101. <template>
  102. <div
  103. class="note note--blue"
  104. v-if="section.sectionType == 1"
  105. >
  106. 视频
  107. </div>
  108. <div class="note" v-if="section.sectionType == 2">
  109. 直播
  110. </div>
  111. <div
  112. class="note note--yellow"
  113. v-if="section.sectionType == 3"
  114. >
  115. 回放
  116. </div>
  117. <div class="bank-section__item__text">
  118. {{ section.name }}
  119. <div
  120. style="font-size: 12px"
  121. v-if="section.liveStartTime > nowTime"
  122. >
  123. <span>{{
  124. $tools.timestampToTime(
  125. section.liveStartTime,
  126. (isDay = false)
  127. )
  128. }}</span>
  129. -
  130. <span>{{
  131. $tools.timestampToTime(
  132. section.liveEndTime,
  133. (isDay = false)
  134. )
  135. }}</span>
  136. </div>
  137. </div>
  138. </template>
  139. <div class="lear-state" v-if="isActive(section)">
  140. <img src="@/assets/learing.gif" alt="" />
  141. </div>
  142. <template v-if="section.durationTime > 0">
  143. <div class="during">
  144. {{ $tools.secondToDate(section.durationTime) }}
  145. </div>
  146. </template>
  147. <template>
  148. <div class="btn" v-if="section.rebuild > 0">
  149. 待重修
  150. </div>
  151. <template v-else>
  152. <div
  153. class="btn btn--green"
  154. v-if="section.learning == 1"
  155. >
  156. 已学完
  157. </div>
  158. </template>
  159. </template>
  160. <template
  161. v-if="
  162. section.liveStartTime && section.sectionType == 2
  163. "
  164. >
  165. <div
  166. class="live-btn live-btn--blue"
  167. v-if="section.liveStartTime > nowTime"
  168. >
  169. 待开播
  170. </div>
  171. <div
  172. class="live-btn live-btn--yellow"
  173. v-if="
  174. section.liveStartTime <= nowTime &&
  175. section.liveEndTime > nowTime
  176. "
  177. >
  178. 直播中
  179. </div>
  180. <div
  181. class="live-btn"
  182. v-if="section.liveEndTime < nowTime"
  183. >
  184. 已结束
  185. </div>
  186. </template>
  187. <template
  188. v-if="checkSection(section.sectionId, 'sectionExam')"
  189. >
  190. <div
  191. class="exercises"
  192. @click.stop="
  193. handelPracticeOrRxam(
  194. section,
  195. 2,
  196. courseItem.courseId
  197. )
  198. "
  199. >
  200. 习题
  201. <i class="el-icon-arrow-right icons"></i>
  202. </div>
  203. </template>
  204. </template>
  205. <template v-if="section.type == 2">
  206. <template>
  207. <div class="test-btn" v-if="section.doType == 1">
  208. 练习
  209. </div>
  210. <div class="test-btn" v-if="section.doType != 1">
  211. 考试
  212. </div>
  213. </template>
  214. <div class="bank-section__item__text">
  215. {{ section.name }}
  216. </div>
  217. <template>
  218. <div class="btn" v-if="section.rebuild > 0">
  219. 待重修
  220. </div>
  221. <template v-else>
  222. <div
  223. class="btn btn--green"
  224. v-if="section.learning == 1"
  225. >
  226. 合格
  227. </div>
  228. <div
  229. class="btn btn--red"
  230. v-if="section.learning == 0"
  231. >
  232. 不及格(需重考)
  233. </div>
  234. <div
  235. class="btn btn--green"
  236. v-if="section.rebuild > 0"
  237. >
  238. 待重测
  239. </div>
  240. </template>
  241. </template>
  242. </template>
  243. </div>
  244. </div>
  245. <div
  246. v-if="chapter.type == 2"
  247. class="bank-section__item"
  248. @click="getResource(chapter, 3, courseIndex)"
  249. >
  250. <template>
  251. <template>
  252. <div class="test-btn" v-if="chapter.doType == 1">
  253. 练习
  254. </div>
  255. <div class="test-btn" v-if="chapter.doType != 1">
  256. 考试
  257. </div>
  258. </template>
  259. <div class="bank-section__item__text">
  260. {{ chapter.name }}
  261. </div>
  262. <template>
  263. <div class="btn" v-if="chapter.rebuild > 0">待重修</div>
  264. <template v-else>
  265. <div
  266. class="btn btn--green"
  267. v-if="chapter.learning == 1"
  268. >
  269. 合格
  270. </div>
  271. <div
  272. class="btn btn--red"
  273. v-if="chapter.learning == 0"
  274. >
  275. 不及格(需重考)
  276. </div></template
  277. >
  278. </template>
  279. </template>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. </template>
  285. <template v-if="menu.type == 2">
  286. <div class="item__content">
  287. <div class="bank-chapter">
  288. <div class="bank-chapter__item">
  289. <div
  290. class="bank-chapter__item__text"
  291. @click="openChapter(menu)"
  292. >
  293. <i
  294. :class="{
  295. 'el-icon-caret-right': !menu.showList,
  296. 'el-icon-caret-bottom': menu.showList
  297. }"
  298. ></i
  299. >{{ menu.menuName }}
  300. <el-tag v-if="menu.commonSign == 1" size="mini"
  301. >公共章</el-tag
  302. >
  303. <span
  304. class="btn_status"
  305. :class="
  306. 'btn_status_' + getNewChapterStudyStatus(menu, true)
  307. "
  308. >{{ getNewChapterStudyStatus(menu) }}</span
  309. >
  310. </div>
  311. <div class="bank-section" v-if="menu.showList">
  312. <div
  313. class="bank-section__item"
  314. :class="{
  315. active: isActive(section)
  316. }"
  317. v-for="(section, sectionIndex) in menu.list"
  318. :key="sectionIndex"
  319. @click="getResource(section, 1, courseIndex)"
  320. :id="'section-' + section.typeId"
  321. >
  322. <template v-if="section.type != 2">
  323. <template>
  324. <div
  325. class="note note--blue"
  326. v-if="section.sectionType == 1"
  327. >
  328. 视频
  329. </div>
  330. <div class="note" v-if="section.sectionType == 2">
  331. 直播
  332. </div>
  333. <div
  334. class="note note--yellow"
  335. v-if="section.sectionType == 3"
  336. >
  337. 回放
  338. </div>
  339. </template>
  340. <div class="bank-section__item__text">
  341. {{ section.name }}
  342. <div
  343. style="font-size: 12px"
  344. v-if="section.liveStartTime > nowTime"
  345. >
  346. <span>{{
  347. $tools.timestampToTime(
  348. section.liveStartTime,
  349. (isDay = false)
  350. )
  351. }}</span>
  352. -
  353. <span>{{
  354. $tools.timestampToTime(
  355. section.liveEndTime,
  356. (isDay = false)
  357. )
  358. }}</span>
  359. </div>
  360. </div>
  361. <div class="lear-state" v-if="isActive(section)">
  362. <img src="@/assets/learing.gif" alt="" />
  363. </div>
  364. <template v-if="section.durationTime > 0">
  365. <div class="during">
  366. {{ $tools.secondToDate(section.durationTime) }}
  367. </div>
  368. </template>
  369. <template>
  370. <div class="btn" v-if="section.rebuild > 0">
  371. 待重修
  372. </div>
  373. <template v-else>
  374. <div
  375. class="btn btn--green"
  376. v-if="section.learning == 1"
  377. >
  378. 已学完
  379. </div>
  380. </template>
  381. </template>
  382. <template
  383. v-if="
  384. section.liveStartTime && section.sectionType == 2
  385. "
  386. >
  387. <div
  388. class="live-btn live-btn--blue"
  389. v-if="section.liveStartTime > nowTime"
  390. >
  391. 待开播
  392. </div>
  393. <div
  394. class="live-btn live-btn--yellow"
  395. v-if="
  396. section.liveStartTime <= nowTime &&
  397. section.liveEndTime > nowTime
  398. "
  399. >
  400. 直播中
  401. </div>
  402. <div
  403. class="live-btn"
  404. v-if="section.liveEndTime < nowTime"
  405. >
  406. 已结束
  407. </div>
  408. </template>
  409. <template
  410. v-if="checkSection(section.sectionId, 'sectionExam')"
  411. >
  412. <div
  413. class="exercises"
  414. @click.stop="
  415. handelPracticeOrRxam(
  416. section,
  417. 2,
  418. courseItem.courseId
  419. )
  420. "
  421. >
  422. 习题
  423. <i class="el-icon-arrow-right icons"></i>
  424. </div>
  425. </template>
  426. </template>
  427. <template v-if="section.type == 2">
  428. <template>
  429. <div class="test-btn" v-if="section.doType == 1">
  430. 练习
  431. </div>
  432. <div class="test-btn" v-if="section.doType != 1">
  433. 考试
  434. </div>
  435. </template>
  436. <div class="bank-section__item__text">
  437. {{ section.name }}
  438. </div>
  439. <template>
  440. <div class="btn" v-if="section.rebuild > 0">
  441. 待重修
  442. </div>
  443. <template v-else>
  444. <div
  445. class="btn btn--green"
  446. v-if="section.learning == 1"
  447. >
  448. 合格
  449. </div>
  450. <div
  451. class="btn btn--red"
  452. v-if="section.learning == 0"
  453. >
  454. 不及格(需重考)
  455. </div>
  456. <div
  457. class="btn btn--green"
  458. v-if="section.rebuild > 0"
  459. >
  460. 待重测
  461. </div>
  462. </template>
  463. </template>
  464. </template>
  465. </div>
  466. </div>
  467. </div>
  468. </div>
  469. </div>
  470. </template>
  471. <template v-if="menu.type == 3">
  472. <div class="item__content">
  473. <div class="bank-section">
  474. <div
  475. :id="'section-' + menu.typeId"
  476. class="bank-section__item"
  477. :class="{
  478. active: isActive(menu)
  479. }"
  480. @click="getResource(menu, 1, courseIndex)"
  481. >
  482. <template>
  483. <div class="note note--blue" v-if="menu.sectionType == 1">
  484. 视频
  485. </div>
  486. <div class="note" v-if="menu.sectionType == 2">直播</div>
  487. <div class="note note--yellow" v-if="menu.sectionType == 3">
  488. 回放
  489. </div>
  490. <div class="bank-section__item__text">
  491. {{ menu.name }}
  492. <div
  493. style="font-size: 12px"
  494. v-if="menu.liveStartTime > nowTime"
  495. >
  496. <span>{{
  497. $tools.timestampToTime(
  498. menu.liveStartTime,
  499. (isDay = false)
  500. )
  501. }}</span>
  502. -
  503. <span>{{
  504. $tools.timestampToTime(
  505. menu.liveEndTime,
  506. (isDay = false)
  507. )
  508. }}</span>
  509. </div>
  510. </div>
  511. </template>
  512. <div class="lear-state" v-if="isActive(menu)">
  513. <img src="@/assets/learing.gif" alt="" />
  514. </div>
  515. <template v-if="menu.durationTime > 0">
  516. <div class="during">
  517. {{ $tools.secondToDate(menu.durationTime) }}
  518. </div>
  519. </template>
  520. <template>
  521. <div class="btn" v-if="menu.rebuild > 0">待重修</div>
  522. <template v-else>
  523. <div class="btn btn--green" v-if="menu.learning == 1">
  524. 已学完
  525. </div>
  526. </template>
  527. </template>
  528. <template v-if="menu.liveStartTime && menu.sectionType == 2">
  529. <div
  530. class="live-btn live-btn--blue"
  531. v-if="menu.liveStartTime > nowTime"
  532. >
  533. 待开播
  534. </div>
  535. <div
  536. class="live-btn live-btn--yellow"
  537. v-if="
  538. menu.liveStartTime <= nowTime &&
  539. menu.liveEndTime > nowTime
  540. "
  541. >
  542. 直播中
  543. </div>
  544. <div class="live-btn" v-if="menu.liveEndTime < nowTime">
  545. 已结束
  546. </div>
  547. </template>
  548. <template v-if="checkSection(menu.menuId, 'sectionExamList')">
  549. <div
  550. class="exercises"
  551. @click.stop="
  552. handelPracticeOrRxam(menu, 3, courseItem.courseId)
  553. "
  554. >
  555. 习题
  556. <i class="el-icon-arrow-right icons"></i>
  557. </div>
  558. </template>
  559. </div>
  560. </div>
  561. </div>
  562. </template>
  563. </div>
  564. </div>
  565. </div>
  566. <el-dialog
  567. title="温馨提示"
  568. width="380px"
  569. @open="getAllSectionList"
  570. center
  571. class="tip-dialog"
  572. :visible.sync="dialogPalyVisible"
  573. :close-on-click-modal="false"
  574. :close-on-press-escape="false"
  575. :show-close="false"
  576. >
  577. <template v-if="isLastVideo == 0">
  578. <p>当前视频已学完,继续学习下一个视频?</p>
  579. <div class="btn1">
  580. <el-button type="info" plain round @click="dialogPalyVisible = false"
  581. >取 消</el-button
  582. >
  583. <el-button type="primary" @click="comfirm" round>确定</el-button>
  584. </div>
  585. </template>
  586. <template v-else-if="isLastVideo == 2">
  587. <p>
  588. 本章视频已学习完成,继续进行下一个考试?
  589. </p>
  590. <div class="btn2" style="display: flex;">
  591. <el-button type="primary" round @click="dialogPalyVisible = false"
  592. >取消</el-button
  593. >
  594. <el-button type="primary" round @click="gotoExamination"
  595. >确定</el-button
  596. >
  597. </div>
  598. </template>
  599. <template v-else>
  600. <p>
  601. 恭喜您课程学习全部完成,教务会在1-3个工作日内完成学习初审,请耐心等待。
  602. </p>
  603. <div class="btn2">
  604. <el-button type="primary" round @click="jumpPage">确定</el-button>
  605. </div>
  606. </template>
  607. </el-dialog>
  608. </div>
  609. </template>
  610. <script>
  611. export default {
  612. props: {
  613. courseList: {
  614. type: Array,
  615. default: () => {
  616. return [];
  617. }
  618. },
  619. goodsLearningOrder: {
  620. type: Number
  621. },
  622. sectionMaxNum: {
  623. type: Number
  624. },
  625. sectionItem: {
  626. type: Object,
  627. default: () => {
  628. return {};
  629. }
  630. },
  631. rebuild: {
  632. type: Number,
  633. default: 0
  634. }
  635. },
  636. data() {
  637. return {
  638. teaIndex: 0,
  639. nowTime: 0,
  640. treeList: [],
  641. sectionExam: [],
  642. sectionExamList: [],
  643. dialogPalyVisible: false,
  644. allSectionList: []
  645. };
  646. },
  647. created() {
  648. this.init();
  649. },
  650. methods: {
  651. jumpPage() {
  652. this.$router.replace({
  653. path: "person-center/my-course"
  654. });
  655. },
  656. gotoExamination() {
  657. let A = this.allSectionList.findIndex(
  658. i =>
  659. i.moduleId == this.sectionItem.moduleId &&
  660. i.chapterId == this.sectionItem.chapterId &&
  661. i.sectionId == this.sectionItem.sectionId
  662. );
  663. if (A !== -1) {
  664. var a = "section-" + this.allSectionList[A + 1].examId;
  665. const btn = document.getElementById(a);
  666. btn.onclick = () => {
  667. //
  668. };
  669. const event = new MouseEvent("click", {
  670. view: window,
  671. bubbles: true,
  672. cancelable: true
  673. });
  674. btn.dispatchEvent(event);
  675. console.log(a);
  676. }
  677. return;
  678. },
  679. async init() {
  680. this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  681. await this.getAllSectionList();
  682. this.treeList = await this.getDoubleTeacherList();
  683. let sectionItem = await this.backNextItem(
  684. this.treeList.find(e => e.courseId == this.activeCourseId),
  685. 0,
  686. false
  687. );
  688. if (this.query.sectionType == 1 && !!this.query.rebuild == this.rebuild) {
  689. this.toPlay(sectionItem);
  690. }
  691. //生成唯一ID定位Start
  692. document.getElementsByClassName("lear-state")[0].scrollIntoView(true);
  693. //生成唯一ID定位End
  694. },
  695. activeFunc(courseId, index) {
  696. let { courseId: nowCourseId, courseList } = this.treeList[index];
  697. if (courseId == nowCourseId) {
  698. return;
  699. }
  700. let course = this.courseList.find(e => e.courseId == courseId);
  701. if (course) {
  702. course.courseList = courseList;
  703. course.list = [];
  704. course.showList = false;
  705. }
  706. this.treeList.splice(index, 1, JSON.parse(JSON.stringify(course)));
  707. this.getMenuList(this.treeList[index]);
  708. },
  709. getMenuList(course, isFresh = false) {
  710. let { showList, courseId, list } = course;
  711. if (!isFresh) {
  712. course.showList = !showList;
  713. if (list.length) return;
  714. }
  715. this.$request
  716. .reSectionExamList({
  717. chapterId: 0,
  718. courseId,
  719. gradeId: this.gradeId,
  720. orderGoodsId: this.orderGoodsId
  721. })
  722. .then(res => {
  723. this.sectionExamList = res.data;
  724. });
  725. return this.$request
  726. .reMenuList({
  727. courseId,
  728. gradeId: this.gradeId,
  729. orderGoodsId: this.orderGoodsId
  730. })
  731. .then(res => {
  732. for (let i = 0; i < res.rows.length; i++) {
  733. let item = res.rows[i];
  734. item.id = item.menuId;
  735. item.name = item.menuName;
  736. item.menuType = item.type;
  737. item.showList = false;
  738. item.list = [];
  739. item.parent = course;
  740. }
  741. course.list = res.rows;
  742. return Promise.resolve(res.rows);
  743. });
  744. },
  745. openModule(module, isFresh = false) {
  746. console.log("openModule");
  747. let { list, isRebuild, id, courseId, showList } = module;
  748. if (!isFresh) {
  749. module.showList = !showList;
  750. if (list.length) return;
  751. }
  752. return this.$request
  753. .reChapterList({
  754. moduleId: id,
  755. gradeId: this.gradeId,
  756. orderGoodsId: this.orderGoodsId,
  757. courseId: courseId,
  758. rebuild: isRebuild ? 1 : undefined
  759. })
  760. .then(res => {
  761. for (let i = 0; i < res.data.length; i++) {
  762. let item = res.data[i];
  763. item.id = item.chapterId;
  764. item.showList = false;
  765. item.list = [];
  766. item.parent = module;
  767. isRebuild ? (item.isRebuild = 1) : (item.menuType = 2);
  768. }
  769. module.list = res.data;
  770. return Promise.resolve(res.data);
  771. });
  772. },
  773. openChapter(chapter, isFresh = false) {
  774. let {
  775. chapterId,
  776. menuId,
  777. list,
  778. moduleId,
  779. id,
  780. isRebuild,
  781. courseId,
  782. showList
  783. } = chapter;
  784. if (!isFresh) {
  785. chapter.showList = !showList;
  786. if (list.length) return;
  787. }
  788. this.$request
  789. .reSectionExamList({
  790. chapterId: chapterId || menuId,
  791. courseId,
  792. gradeId: this.gradeId,
  793. orderGoodsId: this.orderGoodsId
  794. })
  795. .then(res => {
  796. this.sectionExam = [...this.sectionExam, ...res.data];
  797. });
  798. return this.$request
  799. .reSectionList({
  800. chapterId: id,
  801. gradeId: this.gradeId,
  802. courseId,
  803. rebuild: isRebuild ? 1 : undefined,
  804. moduleId: moduleId || 0,
  805. orderGoodsId: this.orderGoodsId
  806. })
  807. .then(res => {
  808. chapter.canLearn = res.data
  809. .filter(item => item.type != 2)
  810. .every(item => item.learning == 1);
  811. res.data.forEach(section => {
  812. section.parent = chapter;
  813. section.courseId = courseId;
  814. });
  815. chapter.list = res.data;
  816. return Promise.resolve(chapter.list);
  817. });
  818. },
  819. getAllSectionList() {
  820. return this.$request
  821. .studyrecordgoodsAllListWithExam({
  822. gradeId: this.gradeId,
  823. orderGoodsId: this.orderGoodsId,
  824. goodsId: this.goodsId,
  825. rebuild: this.rebuild
  826. })
  827. .then(res => {
  828. let { skipPort } = this.query;
  829. if (skipPort) {
  830. let { moduleId, chapterId, sectionId } = res.data[0];
  831. const query = JSON.parse(JSON.stringify(this.$route.query));
  832. query.moduleId = moduleId;
  833. query.chapterId = chapterId;
  834. query.sectionId = sectionId;
  835. query.skipPort = undefined;
  836. console.log("route", { path: this.$route.path, query });
  837. this.$router.push({ path: this.$route.path, query });
  838. }
  839. this.allSectionList = res.data.filter(i => i.doType != 1);
  840. return Promise.resolve(res.data);
  841. });
  842. },
  843. /**
  844. * 判断是否是当前播放的节
  845. */
  846. isActive(section) {
  847. let moduleId = section.moduleId || 0;
  848. let chapterId = section.chapterId || 0;
  849. let sectionId = section.sectionId || section.menuId;
  850. let moduleId1 = this.sectionItem.moduleId || 0;
  851. let chapterId1 = this.sectionItem.chapterId || 0;
  852. let sectionId1 = this.sectionItem.sectionId || this.sectionItem.menuId;
  853. return (
  854. moduleId == moduleId1 &&
  855. chapterId == chapterId1 &&
  856. sectionId == sectionId1
  857. );
  858. },
  859. comfirm() {
  860. this.dialogPalyVisible = false;
  861. this.playNextVideo();
  862. },
  863. // 自动播放下一个视频
  864. async playNextVideo(sectionItem = this.sectionItem) {
  865. let { menuId, parent, courseId, projectId } = sectionItem;
  866. let list = (menuId
  867. ? this.treeList.find(e => e.courseId == courseId).list
  868. : projectId
  869. ? this.treeList
  870. : parent.list
  871. ).filter(e => !e.doType);
  872. let index = list.findIndex(e => e.id == sectionItem.id);
  873. let nextItem = {};
  874. if (list.length - 1 > index) {
  875. nextItem = list[index + 1];
  876. this.toPlay(
  877. await this.backNextItem(nextItem, projectId ? 0 : nextItem.menuType)
  878. );
  879. } else {
  880. this.playNextVideo(parent);
  881. }
  882. },
  883. // 获取模块/章/节
  884. async backNextItem(nextItem, type, isNext = true) {
  885. if (type == undefined || type == 3) return nextItem;
  886. let key = ["getMenuList", "openModule", "openChapter"][type];
  887. let list = nextItem.list.length
  888. ? nextItem.list
  889. : await this[key](nextItem);
  890. if (isNext) {
  891. nextItem = type == 2 ? list.find(e => e.type == 1) : list[0];
  892. } else {
  893. // 初始化 获取播放位置
  894. let { moduleId, chapterId, sectionId } = this.query;
  895. nextItem = list.find(e => {
  896. if (moduleId * 1 && type == 0) {
  897. return e.menuId == moduleId;
  898. }
  899. if (chapterId * 1 && type < 2) {
  900. return e[moduleId * 1 ? "chapterId" : "menuId"] == chapterId;
  901. }
  902. return (
  903. e[moduleId * 1 || chapterId * 1 ? "sectionId" : "id"] == sectionId
  904. );
  905. });
  906. }
  907. return this.backNextItem(nextItem, nextItem.menuType, isNext);
  908. },
  909. async getResource(section, type, courseIndex) {
  910. if (section.doType != 1 && section.learning == 1 && section.type == 2) {
  911. this.$message.warning("考试已通过,请勿重复考试");
  912. return false;
  913. }
  914. if (
  915. section.type != 2 &&
  916. this.isActive(section) &&
  917. section.sectionType != 3 &&
  918. section.sectionType != 2
  919. ) {
  920. return;
  921. }
  922. if (
  923. !(await this.orderTopTobottom(section, type, courseIndex)) &&
  924. section.sectionType != 2
  925. ) {
  926. console.log(section, type, courseIndex);
  927. this.clickLock = false;
  928. this.$message({
  929. type: "warning",
  930. message:
  931. section.type == 2
  932. ? "请学完视频课程再进行练习和测试"
  933. : "请按顺序学习视频课程"
  934. });
  935. return false;
  936. }
  937. //视频 回放
  938. if (section.sectionType == 1 || section.sectionType == 3) {
  939. if (!section.recordingUrl) {
  940. this.$message({
  941. type: "warning",
  942. message: `暂无播放地址数据`
  943. });
  944. return false;
  945. }
  946. }
  947. // 直播
  948. if (section.sectionType == 2) {
  949. if (!section.liveUrl) {
  950. this.$message({
  951. type: "warning",
  952. message: `暂无直播地址数据`
  953. });
  954. return false;
  955. }
  956. let data = await this.studyRecordGetChannelBasicInfo(section.liveUrl);
  957. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  958. this.$message({
  959. type: "warning",
  960. message: `直播已结束`
  961. });
  962. return false;
  963. }
  964. if (data.watchStatus == "waiting") {
  965. this.$message({
  966. type: "warning",
  967. message: `直播未开始`
  968. });
  969. return false;
  970. }
  971. }
  972. // 学习次数
  973. if (!(await this.exceedLearnNum(section))) {
  974. return false;
  975. }
  976. section.type == 2
  977. ? this.toCourseExam(section, type, courseIndex)
  978. : this.toPlay(section);
  979. },
  980. async toCourseExam(section, type, courseIndex) {
  981. //试卷
  982. // 学习次数
  983. let num =
  984. this.goodsLearningOrder != 2 || section.rebuild
  985. ? await this.bankRecordDoNum(section.typeId)
  986. : section.doNum;
  987. if (
  988. (section.answerNum - num > 0 && section.answerNum > 0) ||
  989. section.answerNum == 0
  990. ) {
  991. this.$router.push({
  992. path: "/course-exam/" + this.goodsId,
  993. query: {
  994. courseId: this.treeList[courseIndex].courseId,
  995. gradeId: this.gradeId,
  996. moduleId: section.moduleId || 0,
  997. sectionId: section.sectionId || 0,
  998. examId: section.typeId,
  999. learning: section.learning,
  1000. type: type,
  1001. chapterId: section.chapterId || 0,
  1002. nextStatus: "next", //是否继续播放课程
  1003. orderGoodsId: this.orderGoodsId
  1004. }
  1005. });
  1006. } else {
  1007. this.$message({
  1008. type: "warning",
  1009. message: "该试卷只能答题" + section.answerNum + "次"
  1010. });
  1011. return;
  1012. }
  1013. },
  1014. // 节卷不需要控制
  1015. handelPracticeOrRxam(section, type, courseId) {
  1016. if (type == 3) {
  1017. //节卷
  1018. let data = this.sectionExamList.filter(
  1019. x => x.sectionId == section.menuId
  1020. );
  1021. if (data && data.length > 0) {
  1022. section = data[0];
  1023. }
  1024. } else if (type == 2) {
  1025. //节卷
  1026. let data = this.sectionExam.filter(
  1027. x => x.sectionId == section.sectionId
  1028. );
  1029. if (data && data.length > 0) {
  1030. section = data[0];
  1031. }
  1032. }
  1033. this.$router.push({
  1034. path: "/course-exam/" + this.goodsId,
  1035. query: {
  1036. courseId,
  1037. gradeId: this.gradeId,
  1038. moduleId: section.moduleId || 0,
  1039. sectionId: section.sectionId || 0,
  1040. examId: section.typeId,
  1041. learning: section.learning,
  1042. type: type,
  1043. chapterId: section.chapterId || 0,
  1044. nextStatus: "next", //是否继续播放课程
  1045. orderGoodsId: this.orderGoodsId
  1046. }
  1047. });
  1048. },
  1049. async exceedLearnNum(section) {
  1050. let learnNum = await this.goodsTodayStudySectionNum();
  1051. let hasLearn = await this.gradeCheckGoodsStudy(
  1052. section.type == 2 ? section.typeId : section
  1053. );
  1054. if (this.sectionMaxNum > 0) {
  1055. if (learnNum >= this.sectionMaxNum && !hasLearn) {
  1056. this.$message({
  1057. type: "warning",
  1058. message: `每天最多学习${this.sectionMaxNum}节`
  1059. });
  1060. return false;
  1061. }
  1062. }
  1063. return true;
  1064. },
  1065. goodsTodayStudySectionNum() {
  1066. return new Promise(resolve => {
  1067. this.$request
  1068. .goodsTodayStudySectionNum({
  1069. goodsId: this.goodsId,
  1070. gradeId: this.gradeId,
  1071. orderGoodsId: this.orderGoodsId
  1072. })
  1073. .then(res => {
  1074. resolve(res.data);
  1075. });
  1076. });
  1077. },
  1078. gradeCheckGoodsStudy(option) {
  1079. return new Promise(resolve => {
  1080. this.$request
  1081. .gradeCheckGoodsStudy({
  1082. goodsId: this.goodsId,
  1083. gradeId: this.gradeId,
  1084. orderGoodsId: this.orderGoodsId,
  1085. moduleId: option.moduleId || 0,
  1086. chapterId: option.chapterId || 0,
  1087. sectionId: option.sectionId || option.menuId
  1088. })
  1089. .then(res => {
  1090. resolve(res.data);
  1091. });
  1092. });
  1093. },
  1094. bankRecordDoNum(section) {
  1095. return new Promise(resolve => {
  1096. this.$request
  1097. .bankRecordDoNum({
  1098. goodsId: this.goodsId,
  1099. gradeId: this.gradeId,
  1100. orderGoodsId: this.orderGoodsId,
  1101. chapterId: section.chapterId,
  1102. courseId: this.courseId,
  1103. moduleId: 0,
  1104. examId: section.typeId
  1105. })
  1106. .then(res => {
  1107. resolve(res.data);
  1108. });
  1109. });
  1110. },
  1111. toPlay(section) {
  1112. this.$emit("getResource", section, this.rebuild);
  1113. },
  1114. //获取商品双师资模板
  1115. getDoubleTeacherList() {
  1116. let rows = JSON.parse(JSON.stringify(this.courseList));
  1117. rows.forEach(e => {
  1118. e.list = [];
  1119. e.showList = false;
  1120. e.id = e.courseId;
  1121. });
  1122. return this.$request
  1123. .courseTeacherList({
  1124. goodsId: this.$route.params.goodsId
  1125. })
  1126. .then(({ data }) => {
  1127. data.forEach(ele => {
  1128. rows.forEach((e, i) => {
  1129. let actvieIndex = ele.courseIds.indexOf(this.activeCourseId);
  1130. let index = ele.courseIds.indexOf(e.courseId);
  1131. if (actvieIndex != -1 && index != -1) {
  1132. if (e.courseId == this.activeCourseId) {
  1133. e.courseList = ele.courseList;
  1134. } else {
  1135. delete rows[i];
  1136. }
  1137. } else {
  1138. if (index == 0) {
  1139. e.courseList = ele.courseList;
  1140. }
  1141. if (index > 0) {
  1142. delete rows[i];
  1143. }
  1144. }
  1145. });
  1146. });
  1147. console.log(
  1148. "rows.filter(e => e)",
  1149. rows.filter(e => e)
  1150. );
  1151. return Promise.resolve(rows.filter(e => e));
  1152. });
  1153. },
  1154. async orderTopTobottom(section, type, courseIndex) {
  1155. // let { rebuild, moduleId, chapterId } = section;
  1156. let { rebuild, moduleId, chapterId, parentId, menuId } = section;
  1157. if (this.goodsLearningOrder != 2) {
  1158. return true;
  1159. }
  1160. if (this.treeList.length > 1 && courseIndex > 0) {
  1161. let isAllLear = this.treeList
  1162. .filter((e, i) => i < courseIndex)
  1163. .every(ele => ele.stuAllNum == ele.secAllNum);
  1164. if (!isAllLear) return false;
  1165. }
  1166. let list = await this.studyRecordMenuAllList(
  1167. this.treeList[courseIndex].courseId
  1168. );
  1169. type = type == 1 && section.type == 2 ? 2 : type;
  1170. if (type == 1) {
  1171. if (parentId >= 0 && menuId >= 0) {
  1172. var index = list.findIndex(e => {
  1173. return parentId
  1174. ? e.moduleId == moduleId &&
  1175. e.chapterId == chapterId &&
  1176. e.id == section.sectionId
  1177. : e.id == menuId;
  1178. });
  1179. } else {
  1180. var index = list.findIndex(
  1181. e =>
  1182. e.moduleId == moduleId &&
  1183. e.chapterId == chapterId &&
  1184. e.id == section.sectionId
  1185. );
  1186. }
  1187. list = list.slice(0, index);
  1188. } else if (type != 3) {
  1189. list = list.filter(
  1190. e => e.moduleId == moduleId && e.chapterId == chapterId
  1191. );
  1192. var index = list.findIndex(
  1193. e =>
  1194. e.moduleId == moduleId &&
  1195. e.chapterId == chapterId &&
  1196. e.examId == section.typeId
  1197. );
  1198. list = list.slice(0, index);
  1199. }
  1200. return list.every(item => item.studyStatus == 1);
  1201. },
  1202. studyRecordMenuAllList(courseId) {
  1203. return new Promise(resolve => {
  1204. this.$request
  1205. .studyRecordMenuAllListWithExam({
  1206. courseId,
  1207. gradeId: this.gradeId,
  1208. orderGoodsId: this.orderGoodsId,
  1209. goodsId: this.goodsId
  1210. })
  1211. .then(res => {
  1212. resolve(res.data);
  1213. });
  1214. });
  1215. },
  1216. //校验节是否有试卷
  1217. checkSection(sectionId, key) {
  1218. let _data = this[key];
  1219. if (_data.length == 0) {
  1220. return false;
  1221. }
  1222. return _data.some(section => section.sectionId == sectionId);
  1223. },
  1224. // 刷新数据
  1225. refreshList() {
  1226. let { parent, menuId } = this.sectionItem;
  1227. if (menuId) {
  1228. this.getMenuList(playCourse, true);
  1229. } else {
  1230. this.openChapter(parent, true);
  1231. }
  1232. },
  1233. studyRecordGetChannelBasicInfo(channelId) {
  1234. return new Promise(resolve => {
  1235. this.$request
  1236. .studyRecordGetChannelBasicInfo({
  1237. channelId
  1238. })
  1239. .then(res => {
  1240. resolve(res.data);
  1241. })
  1242. .catch(err => {});
  1243. });
  1244. }
  1245. },
  1246. computed: {
  1247. getNewChapterStudyStatus: function() {
  1248. return function(item, style_type) {
  1249. const Array1 = this.allSectionList.filter(
  1250. i =>
  1251. (i.chapterId == item.chapterId || i.chapterId == item.menuId) &&
  1252. (i.moduleId == item.moduleId || i.moduleId == 0)
  1253. );
  1254. var str = "";
  1255. console.log("chapter", this.sectionItem, item);
  1256. if (Array1.every(i => i.studyStatus == 1)) {
  1257. item.studyStatus = 1;
  1258. str = style_type ? 1 : "已学完";
  1259. } else {
  1260. item.studyStatus = -1;
  1261. str = style_type ? -1 : "待学习";
  1262. }
  1263. if (
  1264. (item.menuId == this.sectionItem.chapterId &&
  1265. 0 == this.sectionItem.moduleId) ||
  1266. (item.chapterId == this.sectionItem.chapterId &&
  1267. item.moduleId == this.sectionItem.moduleId)
  1268. ) {
  1269. item.studyStatus = 0;
  1270. str = style_type ? 0 : "学习中";
  1271. }
  1272. return str;
  1273. };
  1274. },
  1275. getNewModuleStudyStatus: function() {
  1276. return function(item, style_type) {
  1277. const Array1 = this.allSectionList.filter(
  1278. i => i.moduleId == item.menuId || i.moduleId == 0
  1279. );
  1280. var str = "";
  1281. if (Array1.every(i => i.studyStatus == 1)) {
  1282. item.studyStatus = 1;
  1283. str = style_type ? 1 : "已学完";
  1284. } else {
  1285. item.studyStatus = -1;
  1286. str = style_type ? -1 : "待学习";
  1287. }
  1288. if (item.menuId == this.sectionItem.moduleId) {
  1289. item.studyStatus = 0;
  1290. str = style_type ? 0 : "学习中";
  1291. }
  1292. return str;
  1293. };
  1294. },
  1295. query() {
  1296. return this.$route.query;
  1297. },
  1298. gradeId() {
  1299. return this.query.gradeId;
  1300. },
  1301. activeCourseId() {
  1302. let courseId = this.query.courseId;
  1303. if (!courseId && this.treeList.length) {
  1304. courseId = this.treeList[0].courseId;
  1305. }
  1306. return courseId;
  1307. },
  1308. goodsId() {
  1309. return this.$route.params.goodsId;
  1310. },
  1311. playCourseId() {
  1312. return this.sectionItem.courseId;
  1313. },
  1314. playCourse() {
  1315. return this.treeList.find(e => e.courseId == this.playCourseId);
  1316. },
  1317. isLastVideo() {
  1318. try {
  1319. let sectionId =
  1320. this.sectionItem.sectionId || this.sectionItem.menuId || 0;
  1321. let chapterId = this.sectionItem.chapterId || 0;
  1322. let courseId = this.sectionItem.courseId || 0;
  1323. let lastVideo = this.allSectionList.slice(-1)[0];
  1324. if (
  1325. sectionId == lastVideo.sectionId &&
  1326. chapterId == lastVideo.chapterId &&
  1327. courseId == lastVideo.courseId
  1328. ) {
  1329. return 1;
  1330. } else {
  1331. const index = this.allSectionList.findIndex(
  1332. i =>
  1333. i.sectionId == sectionId &&
  1334. i.chapterId == chapterId &&
  1335. i.courseId == courseId
  1336. );
  1337. if (
  1338. this.allSectionList[index + 1].type == 4 ||
  1339. this.allSectionList[index + 1].type == 5
  1340. ) {
  1341. return 2;
  1342. } else {
  1343. return 0;
  1344. }
  1345. }
  1346. } catch (error) {
  1347. return 0;
  1348. }
  1349. },
  1350. orderGoodsId() {
  1351. return this.query.orderGoodsId;
  1352. }
  1353. }
  1354. };
  1355. </script>
  1356. <style scoped lang="scss">
  1357. .btn_status {
  1358. float: right;
  1359. padding: 0px 4px;
  1360. font-size: 12px;
  1361. border: 1px solid #d9ecff;
  1362. border-radius: 4px;
  1363. box-sizing: border-box;
  1364. white-space: nowrap;
  1365. }
  1366. .btn_status_-1 {
  1367. background-color: #ecf5ff;
  1368. border-color: #d9ecff;
  1369. color: #409eff;
  1370. }
  1371. .btn_status_1 {
  1372. background-color: #f0f9eb;
  1373. border-color: #e1f3d8;
  1374. color: #67c23a;
  1375. }
  1376. .btn_status_0 {
  1377. background-color: #fdf6ec;
  1378. border-color: #faecd8;
  1379. color: #e6a23c;
  1380. }
  1381. .item__title {
  1382. display: flex;
  1383. align-items: center;
  1384. & > .MenuNames {
  1385. flex: 1;
  1386. flex-shrink: 0;
  1387. overflow: hidden;
  1388. white-space: nowrap;
  1389. text-overflow: ellipsis;
  1390. -o-text-overflow: ellipsis;
  1391. }
  1392. }
  1393. .course_tree {
  1394. height: 380px;
  1395. overflow-y: scroll;
  1396. &::-webkit-scrollbar {
  1397. display: none;
  1398. }
  1399. .item {
  1400. &__title {
  1401. padding-left: 12px;
  1402. height: 40px;
  1403. line-height: 40px;
  1404. cursor: pointer;
  1405. font-size: 14px;
  1406. font-family: Microsoft YaHei;
  1407. font-weight: bold;
  1408. color: #fff;
  1409. .el-icon-caret-right,
  1410. .el-icon-caret-bottom {
  1411. color: #999;
  1412. }
  1413. }
  1414. &__content {
  1415. .bank-chapter {
  1416. &__item {
  1417. color: #fff;
  1418. font-size: 14px;
  1419. &__text {
  1420. padding: 8px 8px 8px 24px;
  1421. cursor: pointer;
  1422. flex: 1;
  1423. .el-icon-caret-right,
  1424. .el-icon-caret-bottom {
  1425. color: #999;
  1426. }
  1427. }
  1428. }
  1429. }
  1430. .bank-section {
  1431. &__item {
  1432. user-select: none;
  1433. color: #fff;
  1434. font-size: 14px;
  1435. display: flex;
  1436. align-items: center;
  1437. .lear-state {
  1438. height: 20px;
  1439. padding-right: 8px;
  1440. img {
  1441. width: 20px;
  1442. height: 20px;
  1443. // margin-right: 4px;
  1444. }
  1445. }
  1446. &.active {
  1447. background: #132b4d;
  1448. font-size: 14px;
  1449. font-family: Microsoft YaHei;
  1450. font-weight: bold;
  1451. color: #3f8dfd;
  1452. }
  1453. &__text {
  1454. flex: 1;
  1455. padding: 8px 8px 8px 12px;
  1456. // height: 40px;
  1457. max-height: 70px;
  1458. display: flex;
  1459. flex-direction: column;
  1460. justify-content: center;
  1461. cursor: pointer;
  1462. .el-icon-caret-right,
  1463. .el-icon-caret-bottom {
  1464. color: #999;
  1465. }
  1466. & > div > span {
  1467. font-size: 12px !important;
  1468. }
  1469. }
  1470. .test-btn {
  1471. margin-left: 10px;
  1472. width: 32px;
  1473. height: 20px;
  1474. background: #007aff;
  1475. border-radius: 4px;
  1476. line-height: 18px;
  1477. color: #fff;
  1478. text-align: center;
  1479. }
  1480. .note {
  1481. margin-left: 10px;
  1482. width: 32px;
  1483. height: 20px;
  1484. border: 1px solid #ff3b30;
  1485. border-radius: 4px;
  1486. line-height: 18px;
  1487. color: #ff3b30;
  1488. text-align: center;
  1489. &--yellow {
  1490. border-color: #ff9500;
  1491. color: #ff9500;
  1492. }
  1493. &--blue {
  1494. border-color: #3f8dfd;
  1495. color: #3f8dfd;
  1496. }
  1497. }
  1498. .during {
  1499. color: #999;
  1500. margin-right: 10px;
  1501. }
  1502. .btn {
  1503. margin-right: 12px;
  1504. padding: 0 2px;
  1505. height: 20px;
  1506. border: 1px solid #ff3b30;
  1507. background: #ff3b30;
  1508. border-radius: 4px;
  1509. line-height: 18px;
  1510. color: #fff;
  1511. text-align: center;
  1512. &--green {
  1513. border: 1px solid #34c759;
  1514. background: #34c759;
  1515. }
  1516. }
  1517. .live-btn {
  1518. margin-left: 20px;
  1519. width: 60px;
  1520. height: 20px;
  1521. border-radius: 4px;
  1522. background: #eeeeee;
  1523. line-height: 18px;
  1524. color: #666666;
  1525. text-align: center;
  1526. &--yellow {
  1527. background: #fff7eb;
  1528. color: #ff9500;
  1529. }
  1530. &--blue {
  1531. border-color: #ebf4ff;
  1532. color: #007aff;
  1533. }
  1534. }
  1535. .exercises {
  1536. cursor: pointer;
  1537. font-size: 14px;
  1538. color: #498afe;
  1539. }
  1540. }
  1541. }
  1542. }
  1543. }
  1544. .teacherList_name {
  1545. display: flex;
  1546. margin-left: 20px;
  1547. margin-top: 10px;
  1548. .names {
  1549. font-size: 13px;
  1550. color: #383838;
  1551. margin-right: 8px;
  1552. cursor: pointer;
  1553. background: #818181;
  1554. border-radius: 4px;
  1555. padding: 3px 6px;
  1556. &.nactive {
  1557. background: #cccccc;
  1558. }
  1559. }
  1560. }
  1561. .tip-dialog {
  1562. /deep/ {
  1563. .el-dialog__body {
  1564. padding: 6px 40px 44px;
  1565. }
  1566. .el-dialog__header {
  1567. padding-top: 36px;
  1568. }
  1569. .el-dialog__title {
  1570. font-weight: bold;
  1571. color: #222222;
  1572. }
  1573. }
  1574. p {
  1575. color: #666666;
  1576. font-size: 16px;
  1577. text-align: center;
  1578. }
  1579. .btn1 {
  1580. display: flex;
  1581. justify-content: space-between;
  1582. margin-top: 50px;
  1583. .el-button {
  1584. width: 140px;
  1585. }
  1586. }
  1587. .btn2 {
  1588. width: 200px;
  1589. margin: 32px auto 0;
  1590. .el-button {
  1591. width: 200px;
  1592. }
  1593. }
  1594. }
  1595. }
  1596. </style>