index.vue 61 KB

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