index.vue 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940
  1. <template>
  2. <div id="courseData">
  3. <div class="my-course">
  4. <div style="padding-top: 14px">
  5. <strong style="font-size: 18px">我的课程</strong>
  6. <el-divider></el-divider>
  7. </div>
  8. <div>
  9. <span>学习进度:</span>
  10. <el-button
  11. :disabled="loading"
  12. size="small"
  13. v-for="(item, index) in studyStatusList"
  14. :key="index"
  15. :type="activeStudyStatus == item.value ? 'primary' : null"
  16. @click="studyStatusFunc(item.value)"
  17. >{{ item.label }}</el-button
  18. >
  19. </div>
  20. <div style="padding-top: 14px">
  21. <span>教育类型:</span>
  22. <el-button
  23. :disabled="loading"
  24. size="small"
  25. v-for="(tab, tabIndex) in tabList"
  26. :key="tabIndex"
  27. :type="activeName == tab.id ? 'primary' : null"
  28. @click="tabChange(tab.id)"
  29. >{{ tab.educationName }}</el-button
  30. >
  31. </div>
  32. <div
  33. v-if="
  34. $store.state.TENANT_NANE == '867735392558919680' &&
  35. oldPageJumpData &&
  36. oldPageJumpData.goodsNames.length > 0
  37. "
  38. class="oldPageJump"
  39. >
  40. <template>
  41. <h4>因系统升级,您的部分课程:</h4>
  42. <ul>
  43. <li
  44. v-for="(items, indexs) in oldPageJumpData.goodsNames"
  45. :key="indexs"
  46. >
  47. {{ items }}
  48. </li>
  49. </ul>
  50. <p>
  51. 需进入旧系统学习,给您带来不便敬请谅解!我们正在加快完成系统升级合并中!
  52. </p>
  53. </template>
  54. <p style="font-weight: bold; color: #409eff">
  55. 请问是否现在进入旧系统学习:
  56. </p>
  57. <el-button @click="goPage(oldPageJumpData.pcUrl)" type="primary"
  58. >点击进入</el-button
  59. >
  60. </div>
  61. <div class="my-course__body">
  62. <el-main class="list" v-loading="loading">
  63. <el-empty
  64. description="请前往购买商品"
  65. v-if="courseList.length === 0"
  66. ></el-empty>
  67. <div
  68. class="course-item"
  69. v-for="(item, index) in courseList"
  70. :key="index"
  71. >
  72. <div class="course-item__header"></div>
  73. <div class="course-item__body clearfix">
  74. <div class="img">
  75. <img :src="$tools.splitImgHost(item.coverUrl, true)" alt="" />
  76. </div>
  77. <div class="text">
  78. <div class="title" style="margin-bottom: 14px">
  79. {{ item.goodsName }}
  80. <div class="note">
  81. {{ item.courseNum }}课程
  82. {{ item.secAllNum + item.examNum }}节
  83. {{ item.classHours }}学时
  84. </div>
  85. <div class="note" v-if="item.orderYear">
  86. {{ item.orderYear }}年
  87. </div>
  88. </div>
  89. <div class="state" style="margin-bottom: 14px">
  90. <template v-if="item.periodStatus == -1">
  91. 学习状态:
  92. <div class="note" v-if="!item.studyStatus">未学习</div>
  93. <div
  94. class="note note--blue"
  95. v-else-if="item.stuAllNum + item.recordNum < item.secAllNum + item.examNum"
  96. >
  97. 学习中
  98. </div>
  99. <div
  100. class="note note--green"
  101. v-else
  102. >
  103. 已学完
  104. </div>
  105. </template>
  106. <template v-else>
  107. 学习状态:
  108. <div class="note" v-if="item.periodStatus == 0">
  109. 学时审核不通过
  110. </div>
  111. <div
  112. class="note note--yellow"
  113. v-else-if="item.periodStatus == 2"
  114. >
  115. 学时待审核
  116. </div>
  117. <div
  118. class="note note--yellow"
  119. v-else-if="item.periodStatus == 3"
  120. >
  121. 审核中
  122. <!-- 初审已通过 -->
  123. </div>
  124. <template v-else-if="item.periodStatus == 1">
  125. <div class="note note--green" v-if="item.periodPlush > 0">
  126. 初审完成
  127. </div>
  128. <div v-else class="note note--green">
  129. 初审通过
  130. <!-- 学时审核通过 -->
  131. </div>
  132. </template>
  133. </template>
  134. <template
  135. v-if="item.subscribeId != null && item.periodStatus == 1"
  136. >
  137. <template v-if="item.subExamStatus === null">
  138. 待预约考试
  139. </template>
  140. <template
  141. v-else-if="
  142. item.subExamStatus === 0 &&
  143. sysTime <
  144. $tools.TimeTotimestamp(
  145. $tools.timestampToTime(
  146. item.subApplySiteExamTime,
  147. true
  148. ) +
  149. ' ' +
  150. item.subApplySiteStartTime
  151. )
  152. "
  153. >
  154. 待考试,考试时间:{{
  155. $tools.timestampToTime(
  156. item.subApplySiteExamTime,
  157. true
  158. ) +
  159. " " +
  160. item.subApplySiteStartTime
  161. }}
  162. -
  163. {{
  164. $tools.timestampToTime(
  165. item.subApplySiteExamTime,
  166. true
  167. ) +
  168. " " +
  169. item.subApplySiteEndTime
  170. }}
  171. </template>
  172. <template v-else-if="item.subExamStatus === 0"
  173. >待出考试结果</template
  174. >
  175. <template v-else-if="item.subExamStatus === 1">
  176. <span v-if="item.subResult === null">待出考试结果</span>
  177. <span v-if="item.subResult === 0"
  178. >考试结果:不通过,需补考</span
  179. >
  180. <span v-else-if="item.subResult === 1"
  181. >考试结果:通过,考试成绩为{{
  182. item.subPerformance
  183. }}</span
  184. >
  185. </template>
  186. <template v-else-if="item.subExamStatus === 2">
  187. 缺考,无成绩,需补考
  188. </template>
  189. <template v-else-if="item.subExamStatus === 3">
  190. 作弊,无成绩,需补考
  191. </template>
  192. <template v-else-if="item.subExamStatus === 4">
  193. 替考,无成绩,需补考
  194. </template>
  195. </template>
  196. <template
  197. v-if="
  198. false &&
  199. !(item.classEndTime && item.classEndTime < sysTime) &&
  200. !(item.classStartTime && item.classStartTime > sysTime)
  201. "
  202. >
  203. <!-- 学时审核状态可以审核 -->
  204. <template
  205. v-if="
  206. item.periodStatus != -1 &&
  207. item.educationName != '考前培训'
  208. "
  209. >
  210. <template v-if="item.periodStatus == 0"
  211. >机构审核:
  212. <div class="note">学时审核不通过</div>
  213. </template>
  214. <template v-else-if="item.periodStatus == 2"
  215. >机构审核:
  216. <div class="note note--yellow">
  217. 学时待审核
  218. </div></template
  219. >
  220. <template v-else-if="item.periodStatus == 1">
  221. <template v-if="item.periodPlush > 0"
  222. ><div class="note note--green">
  223. 初审完成
  224. </div></template
  225. >
  226. <template v-else
  227. >机构审核:
  228. <div class="note note--green">
  229. 初审通过
  230. <!-- 学时审核通过 -->
  231. </div></template
  232. >
  233. </template>
  234. <template
  235. v-if="
  236. item.subscribeId != null && item.periodStatus == 1
  237. "
  238. >
  239. <template v-if="item.subExamStatus === null">
  240. 待预约考试
  241. </template>
  242. <template
  243. v-else-if="
  244. item.subExamStatus === 0 &&
  245. sysTime <
  246. $tools.TimeTotimestamp(
  247. $tools.timestampToTime(
  248. item.subApplySiteExamTime,
  249. true
  250. ) +
  251. ' ' +
  252. item.subApplySiteStartTime
  253. )
  254. "
  255. >
  256. 待考试,考试时间:{{
  257. $tools.timestampToTime(
  258. item.subApplySiteExamTime,
  259. true
  260. ) +
  261. " " +
  262. item.subApplySiteStartTime
  263. }}
  264. -
  265. {{
  266. $tools.timestampToTime(
  267. item.subApplySiteExamTime,
  268. true
  269. ) +
  270. " " +
  271. item.subApplySiteEndTime
  272. }}
  273. </template>
  274. <template v-else-if="item.subExamStatus === 0"
  275. >待出考试结果</template
  276. >
  277. <template v-else-if="item.subExamStatus === 1">
  278. <span v-if="item.subResult === null"
  279. >待出考试结果</span
  280. >
  281. <span v-if="item.subResult === 0"
  282. >考试结果:不通过,需补考</span
  283. >
  284. <span v-else-if="item.subResult === 1"
  285. >考试结果:通过,考试成绩为{{
  286. item.subPerformance
  287. }}</span
  288. >
  289. </template>
  290. <template v-else-if="item.subExamStatus === 2">
  291. 缺考,无成绩,需补考
  292. </template>
  293. <template v-else-if="item.subExamStatus === 3">
  294. 作弊,无成绩,需补考
  295. </template>
  296. <template v-else-if="item.subExamStatus === 4">
  297. 替考,无成绩,需补考
  298. </template>
  299. </template>
  300. </template>
  301. <template v-else>
  302. <template
  303. v-if="
  304. sysTime >= item.serviceStartTime &&
  305. sysTime <= item.serviceEndTime
  306. "
  307. >
  308. 学习状态:
  309. <div
  310. class="note"
  311. v-if="item.stuAllNum + item.recordNum == 0"
  312. >
  313. 未学习
  314. </div>
  315. <div
  316. class="note note--yellow"
  317. v-else-if="
  318. item.stuAllNum + item.recordNum > 0 &&
  319. item.stuAllNum + item.recordNum <
  320. item.secAllNum + item.examNum
  321. "
  322. >
  323. 学习中
  324. </div>
  325. <div
  326. class="note note--green"
  327. v-else-if="
  328. item.stuAllNum + item.recordNum >=
  329. item.secAllNum + item.examNum
  330. "
  331. >
  332. 已学完
  333. </div>
  334. </template>
  335. </template>
  336. </template>
  337. </div>
  338. <div class="progress" style="margin-bottom: 14px">
  339. 学习进度:
  340. <span class="class_btn">{{ progressText(item) }}</span>
  341. <span
  342. v-if="
  343. item.serviceStartTime &&
  344. item.serviceEndTime &&
  345. item.educationName != '继续教育'
  346. "
  347. >
  348. 学习服务期:<span
  349. :style="
  350. sysTime <= item.serviceStartTime ||
  351. sysTime >= item.serviceEndTime
  352. ? 'text-decoration:line-through'
  353. : null
  354. "
  355. >
  356. {{ $tools.timestampToTime(item.serviceStartTime, false) }}
  357. {{ $tools.timestampToTime(item.serviceEndTime, false) }}
  358. </span>
  359. <span
  360. v-if="
  361. item.serviceStartTime &&
  362. item.serviceEndTime &&
  363. $tools.GetRTime(item.serviceEndTime) <= 15
  364. "
  365. style="color: red"
  366. >
  367. (剩余{{
  368. $tools.GetRTime(item.serviceEndTime) > 0
  369. ? $tools.GetRTime(item.serviceEndTime)
  370. : 0
  371. }}天)
  372. </span>
  373. </span>
  374. </div>
  375. <div
  376. v-if="item.educationName != '考前培训'"
  377. class="class_style"
  378. style="margin-bottom: 14px"
  379. >
  380. 班级状态:
  381. <span class="class_btn">{{
  382. classStatusCompt(item, sysTime)
  383. }}</span>
  384. 班级有效期:
  385. <span
  386. style="text-decoration: line-through"
  387. v-if="item.classEndTime && item.classEndTime < sysTime"
  388. >
  389. {{ $tools.timestampToTime(item.classStartTime, false) }}
  390. {{ $tools.timestampToTime(item.classEndTime, false) }}
  391. </span>
  392. <span
  393. v-else-if="
  394. item.classStartTime && item.classStartTime > sysTime
  395. "
  396. >
  397. {{ $tools.timestampToTime(item.classStartTime, false) }}
  398. {{ $tools.timestampToTime(item.classEndTime, false) }}
  399. </span>
  400. <span
  401. v-else-if="
  402. item.gradeId != 0 &&
  403. item.gradeStatus == 1 &&
  404. item.classStatus != null &&
  405. item.classStatus != 0
  406. "
  407. >
  408. <span
  409. >{{ $tools.timestampToTime(item.classStartTime, false) }}
  410. {{
  411. $tools.timestampToTime(item.classEndTime, false)
  412. }}</span
  413. >
  414. </span>
  415. <span v-else>——</span>
  416. <span
  417. v-if="
  418. item.classStartTime &&
  419. item.classEndTime &&
  420. $tools.GetRTime(item.classEndTime) <= 15
  421. "
  422. style="color: red"
  423. >(剩余{{
  424. $tools.GetRTime(item.classEndTime) > 0
  425. ? $tools.GetRTime(item.classEndTime)
  426. : 0
  427. }}天)</span
  428. >
  429. </div>
  430. </div>
  431. <div class="btns-wrap">
  432. <div class="btns">
  433. <el-button
  434. :type="
  435. item.externalLinkStatus == 1
  436. ? 'primary'
  437. : computedStudyStatus(item, sysTime)
  438. ? 'info'
  439. : 'primary'
  440. "
  441. class="btn btn--normal"
  442. @click="
  443. item.externalLinkStatus == 1
  444. ? jumpLink(item)
  445. : goCourseDetail(item)
  446. "
  447. >进入学习
  448. </el-button>
  449. <!-- v-if="
  450. item.applyStatus === 1 &&
  451. !(
  452. sysTime <= item.serviceStartTime ||
  453. sysTime >= item.serviceEndTime ||
  454. (item.classStartTime &&
  455. sysTime <= item.classStartTime) ||
  456. (item.classEndTime && sysTime >= item.classEndTime) ||
  457. item.learningStatus == 2 ||
  458. item.classStatus == 0 ||
  459. (item.learningStatus == 3 &&
  460. sysTime < item.learningTimeStart) ||
  461. !item.examApplyGoodsList.length
  462. )
  463. " -->
  464. <el-button
  465. v-if="
  466. item.examApplyGoodsList &&
  467. item.examApplyGoodsList.length > 0 &&
  468. item.subscribeSign != 0
  469. "
  470. type="primary"
  471. class="btn"
  472. @click="appointment(item)"
  473. >{{ item.subscribeSign == 1 ? "预约考试" : "预约记录" }}
  474. </el-button>
  475. <el-button
  476. v-if="item.openQuestion == 1 && false"
  477. type="primary"
  478. class="btn"
  479. @click="buyAutoBank(item)"
  480. >购买题库</el-button
  481. >
  482. <el-button
  483. v-if="
  484. ((item.profileChangeStatus == 1 &&
  485. (item.profileStatus == 1 || item.profileStatus == 2)) ||
  486. (item.profileChangeStatus == 2 &&
  487. item.profileStatus != -1)) &&
  488. item.educationName == '考前培训' &&
  489. item.projectName == '施工现场专业人员'
  490. "
  491. type="primary"
  492. class="btn"
  493. @click="dataReview(item)"
  494. >学员资料</el-button
  495. >
  496. <el-button
  497. v-if="
  498. item.periodStatus == 1 &&
  499. !(item.periodPlush > 0) &&
  500. item.educationName == '继续教育' &&
  501. item.projectName == '专业技术人员' &&
  502. item.businessName == '职称继续教育'
  503. "
  504. type="primary"
  505. class="btn"
  506. @click="go('/person-center/my-classhour')"
  507. >学习凭证</el-button
  508. >
  509. <el-button
  510. type="danger"
  511. class="btn btn--warm"
  512. @click="selectClass(item)"
  513. v-if="
  514. item.gradeStatus == 1 &&
  515. item.status == 1 &&
  516. item.serviceEndTime > sysTime &&
  517. item.serviceStartTime < sysTime &&
  518. item.classEndTime &&
  519. item.classEndTime < sysTime &&
  520. (item.periodStatus == 0 || item.periodStatus == -1) &&
  521. item.studyCount > 0
  522. "
  523. >
  524. 选班重学
  525. </el-button>
  526. <el-button
  527. type="primary"
  528. class="btn"
  529. v-if="
  530. item.beforeStatus === 1 &&
  531. !(
  532. sysTime <= item.serviceStartTime ||
  533. sysTime >= item.serviceEndTime ||
  534. (item.classStartTime &&
  535. sysTime <= item.classStartTime) ||
  536. (item.classEndTime && sysTime >= item.classEndTime) ||
  537. item.learningStatus == 2 ||
  538. item.classStatus == 0 ||
  539. (item.learningStatus == 3 &&
  540. sysTime < item.learningTimeStart)
  541. )
  542. "
  543. @click="appBeforeAddress(item)"
  544. >进入刷题</el-button
  545. >
  546. </div>
  547. </div>
  548. </div>
  549. <div
  550. class="course-item__footer"
  551. style="color: red"
  552. v-if="
  553. (item.erJianErZao || sevenFunc(item)) &&
  554. !item.classStartTime &&
  555. !item.classEndTime
  556. "
  557. >
  558. 温馨提示:当前班级正在申请中,正式开班后方可进行学习,请耐心等待
  559. </div>
  560. <div
  561. class="course-item__footer"
  562. style="color: red"
  563. v-if="item.officialStatus != 1 && false"
  564. >
  565. 推送失败原因:{{ item.pushFailReason || "请先完善个人信息" }}
  566. </div>
  567. <!-- $tools.GetRTime(item.serviceEndTime) <= 20 &&
  568. ↓↓-->
  569. <!-- <div
  570. class="course-item__footer"
  571. style="color: red;"
  572. v-if="item.periodStatus == 0 || item.periodStatus == -1"
  573. >
  574. <span v-if="$tools.GetRTime(item.classEndTime) >= 0">
  575. 温馨提示:当前学习有效期至{{
  576. $tools.timestampToTime(item.classEndTime)
  577. }},超期学时无效,为防审核异常请于{{
  578. $tools.timestampToTime(item.classEndTime - 864000, false)
  579. }}
  580. 前完成学习,当前剩余有效学习时间为{{
  581. $tools.GetRTime(item.classEndTime) < 0
  582. ? 0
  583. : $tools.GetRTime(item.classEndTime)
  584. }}天。
  585. </span>
  586. <span v-else-if="$tools.GetRTime(item.serviceEndTime) >= 0">
  587. 温馨提示:当前学习有效期至{{
  588. $tools.timestampToTime(item.serviceEndTime)
  589. }},超期学时无效,为防审核异常请于{{
  590. $tools.timestampToTime(item.serviceEndTime - 864000, false)
  591. }}
  592. 前完成学习,当前剩余有效学习时间为{{
  593. $tools.GetRTime(item.serviceEndTime) < 0
  594. ? 0
  595. : $tools.GetRTime(item.serviceEndTime)
  596. }}天。
  597. </span>
  598. </div> -->
  599. <!-- 关于二建继教提示 -->
  600. <div
  601. class="course-item__footer"
  602. style="color: red"
  603. v-if="item.periodStatus == 0 || item.periodStatus == -1"
  604. >
  605. <span
  606. v-if="
  607. $tools.GetRTime(item.classEndTime) >= 0 &&
  608. $tools.GetRTime(item.classEndTime) <= 15 &&
  609. item.educationName != '考前培训'
  610. "
  611. >
  612. 温馨提示:您当前的课程班级有效期还剩
  613. {{
  614. $tools.GetRTime(item.classEndTime) > 0
  615. ? $tools.GetRTime(item.classEndTime)
  616. : 0
  617. }}
  618. 天, 请在{{
  619. $tools.timestampToTime(item.classEndTime, false)
  620. }}
  621. 前完成学习及考试,到期未完成学时将清零,需重新学习。
  622. </span>
  623. <span
  624. v-else-if="
  625. $tools.GetRTime(item.serviceEndTime) >= 0 &&
  626. $tools.GetRTime(item.serviceEndTime) <= 15 &&
  627. item.educationName != '继续教育'
  628. "
  629. >
  630. 温馨提示:您当前的课程学习服务期还剩
  631. {{
  632. $tools.GetRTime(item.serviceEndTime) > 0
  633. ? $tools.GetRTime(item.serviceEndTime)
  634. : 0
  635. }}
  636. 天, 请在{{
  637. $tools.timestampToTime(item.serviceEndTime, false)
  638. }}
  639. 前完成学习,避免课程过期作废,无法学习给您带来不便。
  640. </span>
  641. </div>
  642. <!-- 公路工程专业提示 -->
  643. <div
  644. class="course-item__footer"
  645. style="color: red"
  646. v-if="isMajorEducation(item)"
  647. >
  648. <span v-if="item.sevenPushReason === '培训周期时间未到' && item.officialStatus != 1">
  649. 温馨提示:您{{
  650. item.orderYear
  651. }}年{{ item.majorName }}专业培训周期还没到,请在{{ item.sevenPushDate }}后再进行继教。
  652. </span>
  653. <span v-if="item.sevenPushReason === '无相关专业专书'">
  654. 温馨提示:您当前的课程{{
  655. item.orderYear
  656. }}年{{ item.majorName }}专业,未能匹配到可继教证书,可前往住建证书官网查询。
  657. <span
  658. style="color: #2f9aff; cursor: pointer"
  659. @click="copy('https://rcgz.mohurd.gov.cn/Login/NetworkingSearch?type=2') "
  660. >
  661. 复制官网链接
  662. </span>
  663. </span>
  664. <span v-if="item.sevenPushReason === '无需2024继续教育'">
  665. 温馨提示:您{{
  666. item.orderYear
  667. }}年{{ item.majorName }}专业已完成继教,无需重复继教,可前往住建证书官网查询。
  668. <span
  669. style="color: #2f9aff; cursor: pointer"
  670. @click="copy('https://rcgz.mohurd.gov.cn/Login/NetworkingSearch?type=2')"
  671. >
  672. 复制官网链接
  673. </span>
  674. </span>
  675. </div>
  676. <div
  677. class="course-item__footer"
  678. style="color: red"
  679. v-if="
  680. item.gradeStatus == 1 &&
  681. item.status == 1 &&
  682. item.serviceEndTime > sysTime &&
  683. item.serviceStartTime < sysTime &&
  684. item.classEndTime &&
  685. item.classEndTime < sysTime &&
  686. (item.periodStatus == 0 || item.periodStatus == -1)
  687. "
  688. >
  689. <span v-if="item.studyCount > 0"
  690. >温馨提示:班级已过期,如需重新学习,请点击右侧“选班重学”按钮。</span
  691. >
  692. <span v-else
  693. >温馨提示:班级已过期,您的重学次数已用完,如有疑问请联系{{
  694. $store.state.userInfo.eduPhone
  695. }}</span
  696. >
  697. </div>
  698. <div
  699. class="course-item__footer"
  700. style="color: red"
  701. v-if="item.serviceEndTime && item.serviceEndTime < sysTime"
  702. >
  703. 温馨提示:学习服务期已截至,如有疑问请联系:{{
  704. $store.state.userInfo.eduPhone
  705. }}
  706. </div>
  707. <!-- 关于二建继教通过提示 -->
  708. <div
  709. class="course-item__footer"
  710. style="color: red"
  711. v-if="item.periodStatus === 1 && isTwoEducation(item)"
  712. >
  713. 温馨提示:您的学时{{
  714. $tools.timestampToTime(item.periodTime)
  715. }}机构已审核通过,
  716. 需等待信息中心约15个工作日复审通过后即可获得继续教育学时,届时请前往信息中心官网查看学时及申请证书延期。
  717. <span
  718. style="color: #2f9aff; cursor: pointer"
  719. @click="copy('http://gdzczx.gdcic.net/')"
  720. >
  721. 复制官网链接
  722. </span>
  723. </div>
  724. <!-- <div
  725. class="course-item__footer"
  726. style="color: red;"
  727. v-if="item.periodStatus === 2 && !sevenFunc(item)"
  728. >
  729. 温馨提示:您已完成本课程所有学时学习,我校将对学时进行审核,审核及推送时长预估15个工作日,如有疑问请联系:{{
  730. $store.state.userInfo.eduPhone
  731. }},学时查询网址:http://gdzczx.gdcic.net
  732. </div> -->
  733. <!-- <div
  734. class="course-item__footer"
  735. style="color: red;"
  736. v-if="item.periodStatus === 1 && !sevenFunc(item)"
  737. >
  738. 温馨提示:您的班级学习初审已通过,待广东省建设信息中心归集学时,归集完成即为完成本次继续教育学习。归集学时需约10-15个工作日,具体以广东省建设执业资格注册服务平台的“继续教育学时查询”公布学时记录为准,学时查询网址:http://gdzczx.gdcic.net
  739. </div> -->
  740. </div>
  741. </el-main>
  742. <div class="pagination" v-if="total > 0">
  743. <el-pagination
  744. @current-change="currentChange"
  745. background
  746. layout="prev, pager, next"
  747. :total="total"
  748. :pager-count="5"
  749. :current-page.sync="param.pageNum"
  750. :page-size="param.pageSize"
  751. >
  752. </el-pagination>
  753. </div>
  754. </div>
  755. </div>
  756. <!-- 预约考试弹窗 -->
  757. <appoint-test
  758. :appointModal.sync="appointModal"
  759. :appointItem="appointItem"
  760. ref="appoint"
  761. ></appoint-test>
  762. <!-- 选班重学弹窗 -->
  763. <SelectClassModal
  764. ref="selectClassModal"
  765. @selectClassOk="selectClassOk"
  766. ></SelectClassModal>
  767. <RebuildModal
  768. ref="rebuildModal"
  769. @rebuildSubmit="rebuildSubmit($event)"
  770. ></RebuildModal>
  771. <ExercisesModal ref="exercisesModal"></ExercisesModal>
  772. <el-dialog
  773. title="实名验证确认"
  774. :visible.sync="showConfirm"
  775. width="600px"
  776. class="showconfirm"
  777. :close-on-click-modal="false"
  778. :close-on-press-escape="false"
  779. :show-close="false"
  780. >
  781. <div class="showconfirm__content">
  782. <div class="text">
  783. 为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
  784. </div>
  785. <el-descriptions :column="1">
  786. <el-descriptions-item label="姓名">{{
  787. userInfo && userInfo.realname
  788. }}</el-descriptions-item>
  789. <el-descriptions-item label="手机号">{{
  790. userInfo && userInfo.telphone
  791. }}</el-descriptions-item>
  792. <el-descriptions-item label="身份证号">{{
  793. userInfo && userInfo.idCard
  794. }}</el-descriptions-item>
  795. </el-descriptions>
  796. <div class="">
  797. <el-checkbox v-model="confirmChecked">确认个人信息无误</el-checkbox>
  798. </div>
  799. </div>
  800. <span slot="footer" class="dialog-footer">
  801. <el-button @click="showConfirm = false">取 消</el-button>
  802. <el-button
  803. type="primary"
  804. @click="confirmUser()"
  805. :disabled="confirmCount > 0"
  806. :loading="confirmLoading"
  807. >{{
  808. confirmCount > 0 ? "确 定(" + confirmCount + ")" : "确 定"
  809. }}</el-button
  810. >
  811. </span>
  812. </el-dialog>
  813. <el-dialog
  814. title="考前须知"
  815. :visible.sync="applyBeforeKnow"
  816. width="800px"
  817. class="showconfirm"
  818. :close-on-click-modal="false"
  819. :close-on-press-escape="false"
  820. ><div
  821. class="ql-editor"
  822. style="white-space: pre-wrap"
  823. v-html="applyBeforeKnowValue"
  824. ></div>
  825. <span slot="footer" class="dialog-footer">
  826. <el-button @click="applyBeforeKnow = false">取 消</el-button>
  827. <el-button type="primary" @click="appointmentYes()">确 定</el-button>
  828. </span></el-dialog
  829. >
  830. <dataReview ref="dataReview" @callbackDataReview="courseGoodsList()" />
  831. </div>
  832. </template>
  833. <script>
  834. import { Loading } from "element-ui";
  835. import { mapGetters, mapActions } from "vuex";
  836. import SelectClassModal from "@/components/selectClassModal";
  837. import RebuildModal from "@/components/rebuildModal";
  838. import ExercisesModal from "@/components/exercisesModal";
  839. import dataReview from "@/components/dataReview";
  840. import AppointTest from "./components/AppointTest.vue";
  841. import * as baseUrls from "@/axios.js";
  842. export default {
  843. name: "MyCourse",
  844. components: {
  845. SelectClassModal,
  846. RebuildModal,
  847. ExercisesModal,
  848. dataReview,
  849. AppointTest,
  850. },
  851. data() {
  852. return {
  853. applyBeforeKnow: false,
  854. applyBeforeKnowValue: "",
  855. studyStatusList: [
  856. {
  857. label: "全部",
  858. value: "-1",
  859. },
  860. {
  861. label: "未开始",
  862. value: 1,
  863. },
  864. {
  865. label: "未完成",
  866. value: 2,
  867. },
  868. {
  869. label: "已完成",
  870. value: 3,
  871. },
  872. ],
  873. activeStudyStatus: "-1",
  874. appointItem: {},
  875. applyId: "",
  876. appointModal: false,
  877. activeItem: {},
  878. confirmChecked: false,
  879. confirmTimer: null,
  880. confirmLoading: false,
  881. confirmCount: 10,
  882. showConfirm: false,
  883. tabList: [],
  884. sysTime: 0,
  885. activeName: "-1",
  886. param: {
  887. pageNum: 1,
  888. pageSize: 5,
  889. },
  890. total: 0,
  891. courseList: [],
  892. loading: false,
  893. oldPageJumpData: null,
  894. };
  895. },
  896. computed: {
  897. ...mapGetters(["userInfo"]),
  898. computedStudyStatus: function () {
  899. return function (item, sysTime) {
  900. var bool = false;
  901. if (
  902. (item.serviceStartTime &&
  903. (sysTime <= item.serviceStartTime ||
  904. sysTime >= item.serviceEndTime)) ||
  905. (item.classStartTime && sysTime <= item.classStartTime) ||
  906. (item.classEndTime && sysTime >= item.classEndTime) ||
  907. item.learningStatus == 2 ||
  908. item.classStatus == 0 ||
  909. (item.learningStatus == 3 && sysTime < item.learningTimeStart)
  910. ) {
  911. bool = true;
  912. }
  913. return bool;
  914. };
  915. },
  916. classStatusCompt: function () {
  917. return function (item, sysTime) {
  918. var str = "未开班";
  919. if (item.classEndTime && item.classEndTime < sysTime) {
  920. str = "已过期";
  921. } else if (item.classStartTime && item.classStartTime > sysTime) {
  922. str = "未开始";
  923. } else if (
  924. item.gradeId &&
  925. item.gradeStatus == 1 &&
  926. item.classStatus === 1
  927. ) {
  928. str = "已开班";
  929. } else if (
  930. item.gradeId &&
  931. item.gradeStatus == 1 &&
  932. item.classStatus === 0
  933. ) {
  934. str = "未开班";
  935. }
  936. return str;
  937. };
  938. },
  939. // 二建继教提示判断
  940. isTwoEducation() {
  941. return function(item) {
  942. return (
  943. item.educationName + item.businessName + item.projectName ===
  944. "继续教育二级建造师"
  945. );
  946. }
  947. },
  948. // 公路专业(施工现场专业人员——继续教育)
  949. isMajorEducation() {
  950. return function(item) {
  951. return (
  952. item.projectName + item.educationName ===
  953. "施工现场专业人员继续教育"
  954. );
  955. }
  956. },
  957. },
  958. async mounted() {
  959. this.getUserInfo();
  960. this.sysTime = this.$tools.timest();
  961. await this.orderUserEduList();
  962. this.courseGoodsList();
  963. this.$bus.$on("getNewGoodsList", () => {
  964. this.courseGoodsList();
  965. });
  966. this.$request.courseoldgoodslist().then((res) => {
  967. if (res.data && res.data.goodsNames.length > 3) {
  968. res.data.goodsNames.splice(3, res.data.goodsNames.length, "...");
  969. }
  970. this.oldPageJumpData = res.data || null;
  971. });
  972. },
  973. methods: {
  974. ...mapActions(["getUserInfo"]),
  975. //进入外链
  976. sevenFunc(item) {
  977. return (
  978. item.educationName == "继续教育" &&
  979. item.projectName == "施工现场专业人员"
  980. );
  981. },
  982. jumpLink(item) {
  983. if (item.externalLink == "/outsideChain") {
  984. this.$router.push({
  985. path: "/outsideChain",
  986. query: {
  987. goodsId: item.goodsId,
  988. },
  989. });
  990. // window.open(item.externalLink + "?goodsId=" + item.goodsId, "_self");
  991. } else {
  992. this.goPage(item.externalLink);
  993. }
  994. },
  995. goPage(url) {
  996. window.open(url, "_blank");
  997. },
  998. //购买山东题库
  999. buyAutoBank(item) {
  1000. this.$request.goodsDetail(item.questionGoodsId).then((res) => {
  1001. res.data.relevanceId = item.orderGoodsId;
  1002. this.goPayment(res.data);
  1003. });
  1004. },
  1005. goPayment(data) {
  1006. if (!Array.isArray(data)) {
  1007. data = [data];
  1008. }
  1009. let selectGoodsList = JSON.parse(JSON.stringify(data));
  1010. localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
  1011. this.$router.push({
  1012. path: "/payment",
  1013. });
  1014. },
  1015. //学员资料
  1016. dataReview(item) {
  1017. this.$refs.dataReview.init(item, true);
  1018. },
  1019. studyStatusFunc(e) {
  1020. if (this.activeStudyStatus == e) {
  1021. return;
  1022. }
  1023. this.activeStudyStatus = e;
  1024. this.param.pageNum = 1;
  1025. this.param.pageSize = 5;
  1026. this.courseGoodsList();
  1027. },
  1028. tabChange(e) {
  1029. if (this.activeName == e) {
  1030. return;
  1031. }
  1032. this.activeName = e;
  1033. this.param.pageNum = 1;
  1034. this.param.pageSize = 5;
  1035. this.courseGoodsList();
  1036. },
  1037. confirmUser() {
  1038. if (!this.confirmChecked) {
  1039. this.$message.warning("请勾选确认个人信息无误");
  1040. return;
  1041. }
  1042. this.confirmLoading = true;
  1043. let infoJson = {
  1044. realname: this.userInfo.realname,
  1045. idCard: this.userInfo.idCard,
  1046. telphone: this.userInfo.telphone,
  1047. };
  1048. this.$request
  1049. .userConfirminfo({
  1050. infoJson: JSON.stringify(infoJson),
  1051. orderGoodsId: this.activeItem.orderGoodsId,
  1052. })
  1053. .then((res) => {
  1054. if (res.data.pushInfo) {
  1055. this.$message.success("提交成功");
  1056. } else {
  1057. this.$confirm(
  1058. `您的信息正在推送中,请稍后再进入学习!`,
  1059. "提示",
  1060. {
  1061. confirmButtonText: "确定",
  1062. closeOnClickModal: false,
  1063. closeOnPressEscape: false,
  1064. distinguishCancelAndClose: false,
  1065. showClose: false,
  1066. showCancelButton: false,
  1067. }
  1068. )
  1069. .then((_) => {})
  1070. .catch((_) => {});
  1071. }
  1072. this.showConfirm = false;
  1073. this.confirmLoading = false;
  1074. });
  1075. },
  1076. orderUserEduList() {
  1077. return new Promise((resolve) => {
  1078. this.$request
  1079. .orderUserEduList({
  1080. goodsType: 1,
  1081. })
  1082. .then((res) => {
  1083. res.rows.forEach((row) => {
  1084. row.id = row.id + "";
  1085. });
  1086. this.tabList.push(
  1087. {
  1088. educationName: "全部",
  1089. id: "-1",
  1090. },
  1091. ...res.rows
  1092. );
  1093. resolve();
  1094. });
  1095. });
  1096. },
  1097. currentChange(e) {
  1098. this.param.pageNum = e;
  1099. document.body.scrollTop = 0;
  1100. document.documentElement.scrollTop = 0;
  1101. this.courseGoodsList();
  1102. },
  1103. checkFuncA(item) {
  1104. if (item.interfaceAccountId > 0 && item.learnStatus > 0) {
  1105. const confirmText = [
  1106. "您的学习账号已经开通,请按照步骤操作,进行学习。",
  1107. "1.点击【跳转学习网址】按钮",
  1108. "2.打开学习网址后,选择【个人用户】进行登录",
  1109. "(1)账号:您个人的身份证号码",
  1110. "(2)密码:身份证号码,再加111111",
  1111. ];
  1112. const newDatas = [];
  1113. const h = this.$createElement;
  1114. for (const i in confirmText) {
  1115. newDatas.push(h("p", null, confirmText[i]));
  1116. }
  1117. this.$confirm(h("div", null, newDatas), "温馨提示", {
  1118. beforeClose: (type, y, done) => {
  1119. if (type == "confirm") {
  1120. window.open("http://admin.zhujianpeixun.com/", "_blank");
  1121. } else if (type == "cancel") {
  1122. // this.$router.back(-1);
  1123. done();
  1124. }
  1125. },
  1126. confirmButtonText: "跳转学习网址",
  1127. cancelButtonText: "关闭",
  1128. closeOnClickModal: false,
  1129. closeOnPressEscape: false,
  1130. distinguishCancelAndClose: false,
  1131. showClose: false,
  1132. }).catch(() => {});
  1133. return;
  1134. }
  1135. },
  1136. checkFuncB(item) {
  1137. let time = this.$tools.timest();
  1138. let {
  1139. interfaceAccountId,
  1140. learnStatus,
  1141. serviceStartTime,
  1142. serviceEndTime,
  1143. classStartTime,
  1144. classEndTime,
  1145. classStatus,
  1146. learningStatus,
  1147. learningTimeStart,
  1148. } = item;
  1149. console.log(interfaceAccountId, learnStatus, "xzx");
  1150. if (interfaceAccountId > 0) {
  1151. learnStatus == 1
  1152. ? this.rebuildSubmit(item)
  1153. : this.$message({
  1154. type: "warning",
  1155. message: `您的学习账号未开通,请稍后再尝试,有疑问,请联系${this.$store.state.userInfo.eduPhone}!`,
  1156. });
  1157. return false;
  1158. }
  1159. let index = [
  1160. time <= serviceStartTime || time >= serviceEndTime,
  1161. (classStartTime && time <= classStartTime) ||
  1162. (classEndTime && time >= classEndTime),
  1163. learningStatus == 2,
  1164. classStatus == 0,
  1165. learningStatus == 3 && time < learningTimeStart,
  1166. ].findIndex((e) => e);
  1167. if (index !== -1) {
  1168. this.$message({
  1169. type: "warning",
  1170. message:
  1171. [
  1172. "不在学习服务期",
  1173. "不在班级有效期",
  1174. "开放学习时间待定",
  1175. "尚未开班",
  1176. "不在开放学习时间,",
  1177. ][index] + ",不能进入学习",
  1178. });
  1179. }
  1180. return index === -1;
  1181. },
  1182. // 新增用户视频学习日志
  1183. studyLog(item, studyItem) {
  1184. this.$axios({
  1185. url: "/user/study/log",
  1186. method: "post",
  1187. data: {
  1188. goodsId: item.goodsId,
  1189. courseId: studyItem.courseId,
  1190. moduleId: studyItem.moduleId || 0,
  1191. chapterId: studyItem.chapterId || 0,
  1192. sectionId: studyItem.sectionId || 0,
  1193. fromPlat: 2, //来源平台 1小程序 2PC网站
  1194. goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
  1195. orderGoodsId: item.orderGoodsId,
  1196. },
  1197. }).then((res) => {
  1198. console.log("直播的用户学习日志:", res);
  1199. });
  1200. },
  1201. bankRecordDoNum(item, studyItem) {
  1202. return new Promise((resolve) => {
  1203. this.$request
  1204. .bankRecordDoNum({
  1205. goodsId: item.goodsId,
  1206. gradeId: item.gradeId,
  1207. chapterId: studyItem.chapterId,
  1208. courseId: studyItem.courseId,
  1209. moduleId: studyItem.moduleId,
  1210. examId: studyItem.examId,
  1211. })
  1212. .then((res) => {
  1213. resolve(res.data);
  1214. });
  1215. });
  1216. },
  1217. //重修
  1218. rebuildSubmit(item) {
  1219. //待检查-可能有误
  1220. this.courseGoodsList();
  1221. },
  1222. RequiredCourse(item) {
  1223. return new Promise((resolve) => {
  1224. // if (item.categoryName !== "必修") {
  1225. this.$request
  1226. .goodsGradeCheckFinishRequiredCourse({
  1227. businessId: item.businessId,
  1228. goodsId: item.goodsId,
  1229. })
  1230. .then((res) => {
  1231. if (res.data > 0) {
  1232. this.$message.warning("请先学习必修商品");
  1233. resolve(false);
  1234. } else {
  1235. resolve(true);
  1236. }
  1237. })
  1238. .catch((err) => {
  1239. this.$message.error(err.msg);
  1240. });
  1241. // }
  1242. });
  1243. },
  1244. async goCourseDetail(item) {
  1245. //-----------------七大员是否允许学习
  1246. try {
  1247. await this.$request.orderstudycheck(item.orderGoodsId);
  1248. } catch (error) {
  1249. this.$message.error(error.msg);
  1250. return;
  1251. }
  1252. //-----------------学习开通状态
  1253. this.checkFuncA(item);
  1254. //-----------------检测服务期
  1255. if (!this.checkFuncB(item)) {
  1256. return false;
  1257. }
  1258. //-----------------检测必修
  1259. if (!item.periodWaitTime) {
  1260. if (item.educationName == "继续教育") {
  1261. if (
  1262. item.officialName &&
  1263. item.businessName == "二级" &&
  1264. (item.projectName == "建造师" || item.projectName == "造价师")
  1265. ) {
  1266. if (!(await this.RequiredCourse(item))) {
  1267. return;
  1268. }
  1269. }
  1270. }
  1271. }
  1272. //-----------------检测重修
  1273. let rebuildStatus = await this.courseGoodsRebuildStatus(
  1274. item.goodsId,
  1275. item.gradeId
  1276. );
  1277. if (rebuildStatus == 0) {
  1278. this.$refs.rebuildModal.showModal(item);
  1279. return;
  1280. }
  1281. //-----------------E
  1282. this.$request
  1283. .lockLockStatus({
  1284. action: "jxjy",
  1285. uuid: sessionStorage.getItem("uuid"),
  1286. })
  1287. .then((res) => {
  1288. //有其他端在操作,不能学习
  1289. this.$confirm("有其他端在操作,是否将该用户踢下线?", "提示", {
  1290. confirmButtonText: "确定",
  1291. cancelButtonText: "取消",
  1292. type: "warning",
  1293. })
  1294. .then(() => {
  1295. this.$request.appuseroffline().then((r) => {
  1296. this.goCourseDetail(item);
  1297. });
  1298. })
  1299. .catch(() => {});
  1300. })
  1301. .catch((err) => {
  1302. this.$router.push({
  1303. path: `/my-course-detail/${item.goodsId}`,
  1304. query: {
  1305. gradeId: item.gradeId,
  1306. orderGoodsId: item.orderGoodsId,
  1307. },
  1308. });
  1309. });
  1310. },
  1311. go(item) {
  1312. this.$router.push({
  1313. path: `/person-center/my-classhour`,
  1314. });
  1315. },
  1316. appBeforeAddress(item) {
  1317. this.$refs.exercisesModal.showModal(item);
  1318. },
  1319. selectClass(item) {
  1320. this.$confirm(
  1321. `上次有效期内未能完成学习,还剩${item.studyCount}次学习机会,是否使用新学习机会,重选班级学习?`,
  1322. "提示",
  1323. {
  1324. confirmButtonText: "确定",
  1325. cancelButtonText: "取消",
  1326. type: "warning",
  1327. }
  1328. )
  1329. .then(() => {
  1330. this.$refs.selectClassModal.showModal(item);
  1331. })
  1332. .catch(() => {});
  1333. },
  1334. selectClassOk() {
  1335. this.courseGoodsList();
  1336. },
  1337. /**
  1338. * @param {Object} goodsId 商品id
  1339. * 查询商品重修状态
  1340. */
  1341. courseGoodsRebuildStatus(goodsId, gradeId) {
  1342. return new Promise((resolve) => {
  1343. this.$request
  1344. .courseGoodsRebuildStatus({
  1345. goodsId: goodsId,
  1346. gradeId: gradeId,
  1347. })
  1348. .then((res) => {
  1349. resolve(res.data);
  1350. });
  1351. });
  1352. },
  1353. courseGoodsList() {
  1354. this.loading = true;
  1355. let param = JSON.parse(JSON.stringify(this.param));
  1356. if (this.activeName == "-1") {
  1357. param.educationTypeId = "";
  1358. } else {
  1359. param.educationTypeId = this.activeName;
  1360. }
  1361. if (this.activeStudyStatus == "-1") {
  1362. param.studyStatus = "";
  1363. } else {
  1364. param.studyStatus = this.activeStudyStatus;
  1365. }
  1366. param.querySign = 1;
  1367. this.$request
  1368. .courseGoodsList(param)
  1369. .then((res) => {
  1370. this.courseList = res.rows;
  1371. this.total = res.total;
  1372. //判断是否有商品可以预约考试
  1373. this.getGoodsApply(res.rows);
  1374. })
  1375. .finally(() => {
  1376. this.loading = false;
  1377. });
  1378. },
  1379. getGoodsApply(array) {
  1380. const Goods = array.find(
  1381. (i) => i.subscribeSign == 1 || i.subscribeSign == 3
  1382. );
  1383. if (Goods) {
  1384. this.$confirm(
  1385. Goods.subscribeSign == 1
  1386. ? `您七大员新考【${Goods.goodsName}】课程已学完,可以预约考试了!`
  1387. : `您七大员新考【${Goods.goodsName}】课程考试未通过,请重新预约考试!`,
  1388. "提示",
  1389. {
  1390. confirmButtonText: "前往",
  1391. cancelButtonText: "关闭",
  1392. type: "warning",
  1393. }
  1394. )
  1395. .then(() => {
  1396. this.appointment(Goods);
  1397. })
  1398. .catch(() => {});
  1399. }
  1400. },
  1401. progressText(item) {
  1402. return (
  1403. item.stuAllNum + item.recordNum + "/" + (item.secAllNum + item.examNum)
  1404. );
  1405. },
  1406. async appointment(item) {
  1407. const result = await this.$request.courseoldgoodsredirect();
  1408. if (result.data) {
  1409. window.open(result.data.pcUrl);
  1410. return;
  1411. }
  1412. if (item.subscribeSign !== 1) {
  1413. this.$router.push({
  1414. path: "/person-center/my-examination/index",
  1415. });
  1416. return;
  1417. }
  1418. this.appointItem = item;
  1419. this.$request.applybeforeknow().then((res) => {
  1420. if (res.data.type == "Y") {
  1421. this.applyBeforeKnow = true;
  1422. if (res.data.value) {
  1423. res.data.value =
  1424. res.data.value &&
  1425. res.data.value.replace(
  1426. /<img/gi,
  1427. '<img style="max-width:100%;height:100%;display:block;margin:0px auto;"'
  1428. );
  1429. }
  1430. this.applyBeforeKnowValue = res.data.value;
  1431. } else {
  1432. this.appointmentYes();
  1433. }
  1434. });
  1435. },
  1436. appointmentYes() {
  1437. this.applyBeforeKnow = false;
  1438. this.applyId = "";
  1439. this.appointModal = true;
  1440. this.$refs.appoint.openBoxs();
  1441. },
  1442. // 复制操作
  1443. copy(text) {
  1444. if (navigator.clipboard) {
  1445. navigator.clipboard
  1446. .writeText(text)
  1447. .then(() => this.$message.success("复制成功~"))
  1448. .catch(() => this.$message.success("复制失败"));
  1449. return;
  1450. }
  1451. var copyInput = document.createElement("input");
  1452. copyInput.setAttribute("value", text);
  1453. document.body.appendChild(copyInput);
  1454. copyInput.select();
  1455. try {
  1456. var copyed = document.execCommand("copy");
  1457. if (copyed) {
  1458. document.body.removeChild(copyInput);
  1459. this.$message.success("复制成功");
  1460. }
  1461. } catch (err) {
  1462. this.$message.error("复制失败,请检查浏览器兼容");
  1463. }
  1464. },
  1465. },
  1466. /**
  1467. * 销毁公交
  1468. */
  1469. beforeDestroy() {
  1470. this.$bus.$off("getNewGoodsList");
  1471. },
  1472. };
  1473. </script>
  1474. <!-- Add "scoped" attribute to limit CSS to this component only -->
  1475. <style scoped lang="scss">
  1476. .oldPageJump {
  1477. margin-top: 20px;
  1478. border: 1px solid #eee;
  1479. border-left: none;
  1480. border-right: none;
  1481. padding: 20px;
  1482. & > h4 {
  1483. margin-bottom: 10px;
  1484. font-weight: 400;
  1485. }
  1486. ul > li {
  1487. margin-bottom: 10px;
  1488. font-weight: bold;
  1489. }
  1490. p {
  1491. margin-bottom: 10px;
  1492. }
  1493. }
  1494. .class_style {
  1495. color: #666;
  1496. }
  1497. .class_btn {
  1498. display: inline-block;
  1499. background-color: rgb(235, 238, 245);
  1500. color: #666;
  1501. border-radius: 12px;
  1502. text-align: center;
  1503. margin-right: 10px;
  1504. font-size: 14px;
  1505. width: 64px;
  1506. vertical-align: middle;
  1507. border: 1px solid rgb(235, 238, 245);
  1508. }
  1509. /deep/ .el-dialog {
  1510. margin-top: 6vh !important;
  1511. }
  1512. .my-course {
  1513. &__body {
  1514. .list {
  1515. overflow: unset;
  1516. padding: 20px 0px;
  1517. .course-item {
  1518. margin-top: 24px;
  1519. background: #fafbfc;
  1520. border-radius: 8px;
  1521. overflow: hidden;
  1522. padding: 30px;
  1523. border: 1px solid transparent;
  1524. transition: all 0.2s;
  1525. &:hover {
  1526. border: 1px solid #409eff;
  1527. // box-shadow: 0px 1px 6px 1px rgba(0,0,0,.3);
  1528. }
  1529. &__body {
  1530. display: flex;
  1531. .img {
  1532. float: left;
  1533. width: 250px;
  1534. height: 140px;
  1535. img {
  1536. width: 100%;
  1537. height: 100%;
  1538. }
  1539. }
  1540. .text {
  1541. flex: 1;
  1542. float: left;
  1543. margin-left: 12px;
  1544. .title {
  1545. margin-bottom: 4px;
  1546. font-size: 16px;
  1547. font-family: Microsoft YaHei;
  1548. font-weight: bold;
  1549. color: #333333;
  1550. .note {
  1551. display: inline-block;
  1552. vertical-align: middle;
  1553. border: 1px solid #333333;
  1554. border-radius: 4px;
  1555. font-size: 12px;
  1556. font-family: Microsoft YaHei;
  1557. font-weight: 400;
  1558. color: #333333;
  1559. padding: 2px 5px;
  1560. margin-left: 12px;
  1561. }
  1562. }
  1563. .state {
  1564. margin-bottom: 4px;
  1565. font-size: 14px;
  1566. font-family: Microsoft YaHei;
  1567. font-weight: 400;
  1568. color: #666666;
  1569. .red {
  1570. color: #ff3b30;
  1571. }
  1572. .note {
  1573. vertical-align: middle;
  1574. display: inline-block;
  1575. padding: 0px 10px;
  1576. background: #ffeceb;
  1577. border: 1px solid #eb5757;
  1578. border-radius: 12px;
  1579. font-size: 14px;
  1580. font-family: Microsoft YaHei;
  1581. font-weight: 400;
  1582. color: #eb5757;
  1583. text-align: center;
  1584. margin-right: 10px;
  1585. &--blue {
  1586. border-color: #498afe;
  1587. color: #498afe;
  1588. background: #ecf5ff;
  1589. }
  1590. &--yellow {
  1591. border-color: #f67205;
  1592. color: #f67205;
  1593. background: #fff8e8;
  1594. }
  1595. &--green {
  1596. border-color: #56dc68;
  1597. color: #56dc68;
  1598. background: #e6feea;
  1599. }
  1600. }
  1601. }
  1602. .time {
  1603. font-size: 14px;
  1604. font-family: Microsoft YaHei;
  1605. font-weight: 400;
  1606. color: #666666;
  1607. &--red {
  1608. color: #ff3b30;
  1609. }
  1610. }
  1611. .progress {
  1612. margin-bottom: 4px;
  1613. font-size: 14px;
  1614. font-family: Microsoft YaHei;
  1615. font-weight: 400;
  1616. color: #666;
  1617. &-line {
  1618. width: 220px;
  1619. display: inline-block;
  1620. }
  1621. /deep/ .el-progress-bar {
  1622. padding-right: 70px;
  1623. margin-right: -70px;
  1624. }
  1625. /deep/ .el-progress-bar__outer {
  1626. height: 12px !important;
  1627. }
  1628. /deep/ .el-progress__text {
  1629. font-size: 14px !important;
  1630. }
  1631. }
  1632. }
  1633. .btns-wrap {
  1634. align-self: center;
  1635. display: table;
  1636. float: right;
  1637. height: 90px;
  1638. width: 130px;
  1639. .btns {
  1640. display: table-cell;
  1641. vertical-align: middle;
  1642. text-align: center;
  1643. .el-button {
  1644. margin-bottom: 20px !important;
  1645. }
  1646. .btn {
  1647. cursor: pointer;
  1648. margin: 2px 0;
  1649. width: 122px;
  1650. height: 32px;
  1651. padding: 0;
  1652. border-radius: 16px;
  1653. display: inline-block;
  1654. text-align: center;
  1655. line-height: 32px;
  1656. color: #fff;
  1657. // &--normal {
  1658. // &.disabled {
  1659. // background: rgb(101, 164, 253);
  1660. // border-color: rgb(101, 164, 253);
  1661. // }
  1662. // }
  1663. &--warm {
  1664. background: #ff3b30;
  1665. &:hover {
  1666. background: #f56c6c;
  1667. }
  1668. }
  1669. }
  1670. }
  1671. }
  1672. }
  1673. &__footer {
  1674. padding: 20px 18px;
  1675. font-size: 14px;
  1676. color: #333;
  1677. .text {
  1678. margin-right: 20px;
  1679. &--red {
  1680. color: #ff3b30;
  1681. }
  1682. }
  1683. }
  1684. }
  1685. }
  1686. .pagination {
  1687. padding: 30px 0;
  1688. text-align: center;
  1689. }
  1690. }
  1691. .exercises-modal {
  1692. &__content {
  1693. > div {
  1694. font-size: 16px;
  1695. line-height: 30px;
  1696. text-align: center;
  1697. img {
  1698. display: inline;
  1699. }
  1700. }
  1701. }
  1702. }
  1703. .appoint-modal {
  1704. &__content {
  1705. .el-radio {
  1706. display: block;
  1707. margin: 10px 30px 10px 0;
  1708. }
  1709. }
  1710. }
  1711. }
  1712. .course-items {
  1713. margin-top: 10px;
  1714. background: #fafbfc;
  1715. border-radius: 8px;
  1716. overflow: hidden;
  1717. padding-bottom: 24px;
  1718. margin-bottom: 24px;
  1719. border-bottom: 2px solid #eee;
  1720. &__header {
  1721. height: 40px;
  1722. border-bottom: 1px solid #eee;
  1723. padding: 0 18px;
  1724. .state {
  1725. margin-top: 8px;
  1726. float: left;
  1727. font-size: 14px;
  1728. font-family: Microsoft YaHei;
  1729. font-weight: 400;
  1730. color: #666666;
  1731. .red {
  1732. color: #ff3b30;
  1733. }
  1734. .note {
  1735. vertical-align: middle;
  1736. display: inline-block;
  1737. padding: 0 10px;
  1738. height: 24px;
  1739. background: #ffeceb;
  1740. border: 1px solid #ff3b30;
  1741. border-radius: 12px;
  1742. font-size: 14px;
  1743. font-family: Microsoft YaHei;
  1744. font-weight: 400;
  1745. color: #ff3b30;
  1746. text-align: center;
  1747. line-height: 24px;
  1748. margin-right: 10px;
  1749. &--yellow {
  1750. border-color: #ffb001;
  1751. color: #ffb001;
  1752. background: #fff8e8;
  1753. }
  1754. &--green {
  1755. border-color: #56dc68;
  1756. color: #56dc68;
  1757. background: #e6feea;
  1758. }
  1759. }
  1760. }
  1761. .time {
  1762. float: right;
  1763. line-height: 40px;
  1764. text-align: right;
  1765. font-size: 12px;
  1766. font-family: Microsoft YaHei;
  1767. font-weight: 400;
  1768. color: #666666;
  1769. &--red {
  1770. color: #ff3b30;
  1771. }
  1772. }
  1773. }
  1774. &__body {
  1775. .img {
  1776. float: left;
  1777. width: 160px;
  1778. height: 90px;
  1779. img {
  1780. max-width: 100%;
  1781. max-height: 100%;
  1782. }
  1783. }
  1784. .text {
  1785. float: left;
  1786. margin-left: 12px;
  1787. .title {
  1788. margin-top: 10px;
  1789. font-size: 16px;
  1790. font-family: Microsoft YaHei;
  1791. font-weight: bold;
  1792. color: #333333;
  1793. .note {
  1794. display: inline-block;
  1795. vertical-align: middle;
  1796. border: 1px solid #333333;
  1797. border-radius: 4px;
  1798. font-size: 12px;
  1799. font-family: Microsoft YaHei;
  1800. font-weight: 400;
  1801. color: #333333;
  1802. padding: 2px 5px;
  1803. margin-left: 12px;
  1804. }
  1805. }
  1806. .progress {
  1807. font-size: 14px;
  1808. font-family: Microsoft YaHei;
  1809. font-weight: 400;
  1810. color: #333333;
  1811. &-line {
  1812. width: 220px;
  1813. display: inline-block;
  1814. }
  1815. /deep/ .el-progress-bar {
  1816. padding-right: 70px;
  1817. margin-right: -70px;
  1818. }
  1819. }
  1820. }
  1821. .btns-wrap {
  1822. display: table;
  1823. float: right;
  1824. height: 90px;
  1825. width: 130px;
  1826. .btns {
  1827. display: table-cell;
  1828. vertical-align: middle;
  1829. text-align: center;
  1830. .btn {
  1831. cursor: pointer;
  1832. margin: 2px 0;
  1833. width: 122px;
  1834. height: 32px;
  1835. padding: 0;
  1836. border-radius: 16px;
  1837. display: inline-block;
  1838. text-align: center;
  1839. line-height: 32px;
  1840. color: #fff;
  1841. // &--normal {
  1842. // &.disabled {
  1843. // background: rgb(101, 164, 253);
  1844. // border-color: rgb(101, 164, 253);
  1845. // }
  1846. // }
  1847. &--warm {
  1848. background: #ff3b30;
  1849. &:hover {
  1850. background: #f56c6c;
  1851. }
  1852. }
  1853. }
  1854. }
  1855. }
  1856. }
  1857. &__footer {
  1858. padding: 20px 18px;
  1859. font-size: 14px;
  1860. color: #333;
  1861. .text {
  1862. margin-right: 20px;
  1863. &--red {
  1864. color: #ff3b30;
  1865. }
  1866. }
  1867. }
  1868. }
  1869. </style>