index.vue 12 KB

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