index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. <template>
  2. <div class="bank-report">
  3. <Header></Header>
  4. <section class="section">
  5. <div class="container">
  6. <div class="re_back">
  7. <el-button
  8. type="primary"
  9. plain
  10. round
  11. size="mini"
  12. class="back-btn"
  13. @click="$router.back(-1)"
  14. >返回</el-button
  15. >
  16. </div>
  17. <div
  18. class="section__header section__header--warm"
  19. v-if="!examResult.reportStatus"
  20. >
  21. <div class="title">
  22. <span class="icon">X</span>
  23. 测试未通过
  24. </div>
  25. <!-- <div class="desc">
  26. 答题时长:12分钟
  27. <span class="note">(限时60分钟)</span>
  28. </div> -->
  29. </div>
  30. <div
  31. class="section__header section__header--success"
  32. v-if="examResult.reportStatus"
  33. >
  34. <div class="title">
  35. <span class="icon">✔</span>
  36. 测试通过
  37. </div>
  38. <!-- <div class="desc">
  39. 答题时长:12分钟
  40. <span class="note">(限时60分钟)</span>
  41. </div> -->
  42. </div>
  43. <div class="section__body">
  44. <div class="section__body__content">
  45. <!-- <div class="left-box">
  46. <div class="left-box__in">
  47. <div class="title">
  48. 试卷得分
  49. <span class="note">(客观题)</span>
  50. </div>
  51. <div class="desc">78</div>
  52. <div class="other">满分100</div>
  53. </div>
  54. <div class="left-box__in left-box__in--bottom">
  55. <div class="title">
  56. 试卷得分
  57. <span class="note">(客观题+主观题)</span>
  58. </div>
  59. <div class="desc">86</div>
  60. <div class="other">满分120</div>
  61. </div>
  62. </div> -->
  63. <div class="right-box">
  64. <div class="right-box__in">
  65. <div class="title">
  66. 试卷得分
  67. <span class="note">(客观题)</span>
  68. </div>
  69. <div class="desc">{{ examResult.score }}</div>
  70. <div class="other">满分{{ examResult.totalScore }}</div>
  71. </div>
  72. <div class="right-box__in right-box__in--bottom">
  73. <div class="child">
  74. <div class="child__title child__title--success">
  75. {{ examResult.rightQuestionNum }}
  76. </div>
  77. <div class="child__desc">正确题数</div>
  78. </div>
  79. <div class="child">
  80. <div class="child__title child__title--yellow">
  81. {{ examResult.lessQuestionNum }}
  82. </div>
  83. <div class="child__desc">少选题数</div>
  84. </div>
  85. <div class="child child---right">
  86. <div class="child__title child__title--warm">
  87. {{ examResult.doWrongQuestionNum }}
  88. </div>
  89. <div class="child__desc">错误题数</div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <!-- <div class="section__footer">
  96. <el-button type="primary" class="btn">返回列表</el-button>
  97. <el-button type="primary" class="btn">练习下一节</el-button>
  98. <el-button type="primary" class="btn">重新做题</el-button>
  99. <el-button type="primary" class="btn">错题解析</el-button>
  100. <el-button type="primary" class="btn">全部解析</el-button>
  101. </div> -->
  102. <div v-if="courseList.length" class="course_list">
  103. <div class="course__header">
  104. <div class="title">相关推荐</div>
  105. </div>
  106. <div class="course__body">
  107. <!-- <p
  108. v-if="
  109. !courseList.length
  110. "
  111. class="text_align"
  112. >
  113. 无推荐课程
  114. </p> -->
  115. <ul class="list clearfix">
  116. <template v-for="(item, index) in courseList">
  117. <li class="course-item" :key="index">
  118. <GoodsItem :item="item"></GoodsItem>
  119. </li>
  120. </template>
  121. </ul>
  122. </div>
  123. <div class="pagination">
  124. <el-pagination
  125. @current-change="currentChangeCou"
  126. background
  127. layout="prev, pager, next"
  128. :total="total"
  129. :page-size="pageSize"
  130. >
  131. </el-pagination>
  132. </div>
  133. </div>
  134. </div>
  135. </section>
  136. <ToolBar></ToolBar>
  137. <Footer></Footer>
  138. </div>
  139. </template>
  140. <script>
  141. import Footer from "@/components/footer/index";
  142. import Header from "@/components/header/index";
  143. import ToolBar from "@/components/toolbar/index";
  144. import GoodsItem from "@/components/goodsItem/index";
  145. import { mapGetters } from "vuex";
  146. export default {
  147. name: "BankExplain",
  148. components: {
  149. Footer,
  150. Header,
  151. ToolBar,
  152. GoodsItem,
  153. },
  154. data() {
  155. return {
  156. examId: '',
  157. courseList: [],
  158. pageNum: 1,
  159. pageSize: 10,
  160. total: 0,
  161. };
  162. },
  163. computed: {
  164. ...mapGetters(["examResult"]),
  165. },
  166. created() {
  167. this.examId = this.$route.query.examId
  168. this.getcourList()
  169. },
  170. mounted() {
  171. if (JSON.stringify(this.examResult) == "{}") {
  172. this.$router.back(-1);
  173. }
  174. },
  175. methods: {
  176. getcourList() {
  177. this.$axios({
  178. url: '/apply/recommend/goodsList',
  179. method: 'post',
  180. data: {
  181. examId: this.examId,
  182. pageNum: this.pageNum,
  183. pageSize: this.pageSize,
  184. platform: 2,
  185. }
  186. }).then((res) => {
  187. if (res.code == 200) {
  188. this.courseList = res.rows || []
  189. this.total = res.total
  190. }
  191. })
  192. },
  193. currentChangeCou(val) {
  194. this.pageNum = val
  195. this.getcourList()
  196. },
  197. },
  198. };
  199. </script>
  200. <!-- Add "scoped" attribute to limit CSS to this component only -->
  201. <style scoped lang="scss">
  202. .bank-report {
  203. .re_back {
  204. text-align: right;
  205. margin: 10px 0px;
  206. .back-btn {
  207. width: 100px;
  208. }
  209. }
  210. .section {
  211. &__header {
  212. height: 120px;
  213. border-radius: 0px;
  214. padding-top: 10px;
  215. &--warm {
  216. background: #fff3f5;
  217. .title {
  218. text-align: center;
  219. font-size: 18px;
  220. font-family: Microsoft YaHei;
  221. font-weight: bold;
  222. color: #ff3b30;
  223. .icon {
  224. vertical-align: middle;
  225. display: inline-block;
  226. width: 48px;
  227. height: 58px;
  228. text-align: center;
  229. line-height: 58px;
  230. background: #ff3b30;
  231. color: #fff;
  232. font-size: 30px;
  233. }
  234. }
  235. }
  236. &--success {
  237. background: #f8fef9;
  238. .title {
  239. text-align: center;
  240. font-size: 18px;
  241. font-family: Microsoft YaHei;
  242. font-weight: bold;
  243. color: #34c759;
  244. .icon {
  245. vertical-align: middle;
  246. display: inline-block;
  247. width: 48px;
  248. height: 58px;
  249. text-align: center;
  250. line-height: 58px;
  251. background: #34c759;
  252. color: #fff;
  253. font-size: 30px;
  254. }
  255. }
  256. }
  257. .desc {
  258. margin-top: 20px;
  259. text-align: center;
  260. font-size: 14px;
  261. font-family: Microsoft YaHei;
  262. font-weight: 400;
  263. color: #333333;
  264. .note {
  265. font-size: 14px;
  266. font-family: Microsoft YaHei;
  267. font-weight: 400;
  268. color: #999999;
  269. }
  270. }
  271. }
  272. &__body {
  273. width: 100%;
  274. height: 305px;
  275. border-bottom: 1px solid #eee;
  276. &__content {
  277. width: 100%;
  278. height: 100%;
  279. display: flex;
  280. align-items: center;
  281. justify-content: center;
  282. .left-box {
  283. width: 300px;
  284. height: 240px;
  285. background: #ffffff;
  286. border: 1px solid #eeeeee;
  287. border-radius: 8px;
  288. display: flex;
  289. flex-direction: column;
  290. margin: 0 10px;
  291. &__in {
  292. flex: 1;
  293. border-bottom: 1px solid #eee;
  294. padding: 5px 18px;
  295. .title {
  296. font-size: 14px;
  297. font-family: Microsoft YaHei;
  298. font-weight: 400;
  299. color: #333333;
  300. line-height: 24px;
  301. .note {
  302. color: #999;
  303. }
  304. }
  305. .desc {
  306. margin-top: 20px;
  307. font-size: 48px;
  308. font-family: Microsoft YaHei;
  309. font-weight: 400;
  310. color: #333333;
  311. line-height: 24px;
  312. text-align: center;
  313. }
  314. .other {
  315. margin-top: 14px;
  316. font-size: 14px;
  317. font-family: Microsoft YaHei;
  318. font-weight: 400;
  319. color: #999999;
  320. line-height: 24px;
  321. text-align: center;
  322. }
  323. &--bottom {
  324. border: 0;
  325. }
  326. }
  327. }
  328. .right-box {
  329. margin: 0 10px;
  330. display: flex;
  331. width: 300px;
  332. height: 240px;
  333. background: #ffffff;
  334. border: 1px solid #eeeeee;
  335. border-radius: 8px;
  336. flex-direction: column;
  337. &__in {
  338. flex: 1;
  339. border-bottom: 1px solid #eee;
  340. padding: 5px 18px;
  341. .title {
  342. font-size: 14px;
  343. font-family: Microsoft YaHei;
  344. font-weight: 400;
  345. color: #333333;
  346. line-height: 24px;
  347. .note {
  348. color: #999;
  349. }
  350. }
  351. .desc {
  352. margin-top: 20px;
  353. font-size: 48px;
  354. font-family: Microsoft YaHei;
  355. font-weight: 400;
  356. color: #333333;
  357. line-height: 24px;
  358. text-align: center;
  359. }
  360. .other {
  361. margin-top: 14px;
  362. font-size: 14px;
  363. font-family: Microsoft YaHei;
  364. font-weight: 400;
  365. color: #999999;
  366. line-height: 24px;
  367. text-align: center;
  368. }
  369. &--bottom {
  370. padding: 0;
  371. border: 0;
  372. height: 100%;
  373. display: flex;
  374. .child {
  375. flex: 1;
  376. height: 100%;
  377. border-right: 1px solid #eee;
  378. padding: 5px 18px;
  379. &--right {
  380. border: 0;
  381. }
  382. &__title {
  383. margin-top: 20px;
  384. font-size: 36px;
  385. font-family: Microsoft YaHei;
  386. font-weight: 400;
  387. color: #34c759;
  388. line-height: 24px;
  389. text-align: center;
  390. &--success {
  391. color: #34c759;
  392. }
  393. &--warm {
  394. color: #ff3b30;
  395. }
  396. &--yellow {
  397. color: #ffc53d;
  398. }
  399. }
  400. &__desc {
  401. margin-top: 10px;
  402. font-size: 14px;
  403. font-family: Microsoft YaHei;
  404. font-weight: 400;
  405. color: #999999;
  406. line-height: 24px;
  407. text-align: center;
  408. }
  409. }
  410. }
  411. }
  412. }
  413. }
  414. }
  415. &__footer {
  416. display: flex;
  417. align-items: center;
  418. justify-content: center;
  419. padding: 40px 0;
  420. .btn {
  421. cursor: pointer;
  422. width: 140px;
  423. height: 32px;
  424. padding: 0;
  425. border-radius: 16px;
  426. text-align: center;
  427. line-height: 30px;
  428. font-size: 12px;
  429. margin: 0 4px;
  430. }
  431. }
  432. }
  433. .course_list {
  434. .course {
  435. background: #f5f7fa;
  436. padding-top: 40px;
  437. &__header {
  438. display: flex;
  439. align-items: center;
  440. justify-content: space-between;
  441. .title {
  442. background: url("~@/assets/video.png") no-repeat left center;
  443. padding-left: 36px;
  444. font-size: 24px;
  445. font-family: YouSheBiaoTiHei;
  446. font-weight: 400;
  447. color: #333333;
  448. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  449. }
  450. }
  451. &__body {
  452. .list {
  453. width: 100%;
  454. .course-item {
  455. float: left;
  456. }
  457. }
  458. }
  459. }
  460. .pagination {
  461. display: flex;
  462. align-items: center;
  463. justify-content: center;
  464. margin: 20px 0px;
  465. }
  466. }
  467. }
  468. </style>