SkillTrainingIndex.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. <!--
  2. * @Description: 我的技能培训
  3. * @Author: 空白格
  4. * @Date: 2022-08-24 10:02:17
  5. * @LastEditors: wangcc
  6. * @LastEditTime: 2022-08-26 11:19:34
  7. * @FilePath: \veterans_client_web\src\views\PersonalCenter\SkillTraining\SkillTrainingIndex.vue
  8. * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  9. -->
  10. <template>
  11. <div>
  12. <banner title="我的技能培训" :breadcrumb="false"></banner>
  13. <div class="breadcrumb">
  14. <div class="_container">
  15. <div class="banner-breadcrumb-breadcrumb">
  16. <el-breadcrumb separator-class="el-icon-arrow-right">
  17. <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
  18. <el-breadcrumb-item :to="{ path: '/personalcenter'}">我的</el-breadcrumb-item>
  19. <el-breadcrumb-item>我的技能培训</el-breadcrumb-item>
  20. </el-breadcrumb>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="deliverBox">
  25. <div class="_container">
  26. <div class="box-list">
  27. <div class="tabs">
  28. <span
  29. @click="tabsClick(index,item)"
  30. :class="{activeSpan:currentClass==index}"
  31. v-for="(item,index) in tabsList"
  32. :key="index"
  33. >{{item.name}}</span>
  34. </div>
  35. <div style="display:table;width:100%">
  36. <div class="deliverList-box" v-for="(train,index) in deliverList" :key="index" @click="trainDetail(train)">
  37. <div class="line"></div>
  38. <h3 class="title-h3">{{train.name}}</h3>
  39. <div class="deliver">
  40. <div class="log">
  41. <img :src="train.img" alt />
  42. </div>
  43. <div class="center">
  44. <h3>培训学校:{{train.schoolName}}</h3>
  45. <p style="display: flex;">
  46. <span style="margin-right:6px">难度</span>
  47. <el-rate v-model="train.difficult" disabled text-color="#ff9900"></el-rate>
  48. </p>
  49. <!-- <p class="comment">报名人数:16/60</p> -->
  50. <p class="comment">培训周期:{{train.cycle}}个月</p>
  51. </div>
  52. <div class="right-box">
  53. <span class="time">开始时间:{{train.applyTime.slice(0,10)}}</span>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="pagination" v-if="total">
  59. <el-pagination
  60. background
  61. layout="prev, pager, next"
  62. :page-size="queryParams.pageSize"
  63. :total="total"
  64. @current-change="currentChange"
  65. />
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. import banner from '@/components/BannerBreadcrumb/index.vue';
  74. import { myTrainList } from '@/api/PersonalCenter/index';
  75. export default {
  76. name: 'EvaluateIndex',
  77. components: { banner },
  78. data() {
  79. return {
  80. value: 3,
  81. queryParams: {
  82. pageNum: 1,
  83. pageSize: 10,
  84. type: '1'
  85. },
  86. total: 0,
  87. loading: false,
  88. currentClass: 0,
  89. deliverList: [],
  90. tabsList: [
  91. {
  92. id: 1,
  93. name: '培训中'
  94. },
  95. {
  96. id: 0,
  97. name: '已报名'
  98. }
  99. ]
  100. };
  101. },
  102. created() {
  103. this.getList()
  104. },
  105. methods: {
  106. /**
  107. * 分页切换触发
  108. * @date 2022-08-16
  109. * @param {any} page
  110. * @returns {any}
  111. */
  112. currentChange(page) {
  113. this.queryParams.pageNum = page;
  114. this.getList();
  115. },
  116. /**
  117. * 获取列表
  118. * @date 2022-08-11
  119. * @returns {any}
  120. */
  121. getList() {
  122. this.loading = true;
  123. myTrainList(this.queryParams).then((res) => {
  124. this.deliverList = res.rows;
  125. this.total = Number(res.total);
  126. this.loading = false;
  127. });
  128. },
  129. tabsClick(index,item) {
  130. this.currentClass = index;
  131. this.queryParams.type = item.id
  132. this.getList()
  133. },
  134. trainDetail(item) {
  135. this.$router.push({
  136. name: 'SkillsTrainingDetails',
  137. query: { id:item.id }
  138. });
  139. }
  140. }
  141. };
  142. </script>
  143. <style lang='scss' scoped>
  144. ._container {
  145. width: 1200px !important;
  146. margin-right: auto;
  147. margin-left: auto;
  148. padding-right: 15px;
  149. padding-left: 15px;
  150. max-width: none !important;
  151. }
  152. ._container:after,
  153. ._container:before {
  154. display: table;
  155. content: ' ';
  156. clear: both;
  157. }
  158. .breadcrumb {
  159. background-color: #f5f7fa;
  160. height: 70px;
  161. display: flex;
  162. align-items: center;
  163. }
  164. .banner-breadcrumb-breadcrumb {
  165. .el-breadcrumb {
  166. font-size: 18px;
  167. }
  168. :deep(.el-breadcrumb__inner.is-link) {
  169. color: #7e7e7e;
  170. font-weight: normal;
  171. }
  172. :deep(.el-breadcrumb__item:last-child .el-breadcrumb__inner) {
  173. color: #ff0000;
  174. }
  175. }
  176. .box-list {
  177. background-color: #fff;
  178. padding: 10px 0 80px 0;
  179. display: table;
  180. width: 100%;
  181. .tabs {
  182. padding: 10px 20px;
  183. span {
  184. color: #1a1a1a;
  185. display: inline-block;
  186. height: 35px;
  187. font-size: 22px;
  188. cursor: pointer;
  189. margin-right: 36px;
  190. }
  191. .activeSpan {
  192. color: #416050;
  193. border-bottom: 4px solid #416050;
  194. }
  195. }
  196. h1 {
  197. color: #222222;
  198. font-size: 26px;
  199. margin: 19px 20px;
  200. }
  201. .deliver {
  202. cursor: pointer;
  203. width: 100%;
  204. background: #ffffff;
  205. display: flex;
  206. align-items: self-start;
  207. justify-content: space-between;
  208. float: left;
  209. margin-top: 20px;
  210. .log {
  211. width: 60px;
  212. height: 60px;
  213. background: #ffffff;
  214. border: 1px solid #e2e2e2;
  215. border-radius: 4px;
  216. overflow: hidden;
  217. img {
  218. width: 100%;
  219. height: 100%;
  220. }
  221. }
  222. .center {
  223. width: 290px;
  224. h3 {
  225. color: #1a1a1a;
  226. margin-bottom: 10px;
  227. font-size: 18px;
  228. font-family: 'SourceHanSansCN';
  229. font-weight: 400;
  230. }
  231. p {
  232. color: #666666;
  233. font-size: 14px;
  234. line-height: 20px;
  235. .meta_cell {
  236. display: inline-block;
  237. margin-right: 5px;
  238. }
  239. .meta_cell:after {
  240. padding: 0 1px 0 4px;
  241. display: inline-block;
  242. color: #919090;
  243. content: '|';
  244. }
  245. .meta_cell:last-child:after {
  246. content: '';
  247. }
  248. }
  249. .comment {
  250. width: 100%;
  251. overflow: hidden;
  252. white-space: nowrap;
  253. text-overflow: ellipsis;
  254. }
  255. }
  256. .right-box {
  257. display: flex;
  258. flex-direction: column;
  259. justify-content: right;
  260. span {
  261. text-align: right;
  262. }
  263. .pir {
  264. color: #ef651f;
  265. font-size: 20px;
  266. }
  267. .time {
  268. color: #999999;
  269. font-size: 14px;
  270. margin-top: 75px;
  271. }
  272. .postStatus {
  273. line-height: 40px;
  274. color: #0f0f0f;
  275. }
  276. }
  277. }
  278. }
  279. .pagination {
  280. text-align: center;
  281. margin-top: 20px;
  282. :deep(.el-pager .active) {
  283. background-color: #ff3939;
  284. }
  285. :deep(.el-pagination.is-background .el-pager li:not(.disabled).active) {
  286. background-color: #ff3939;
  287. }
  288. }
  289. .deliverList-box {
  290. display: flex;
  291. flex-direction: column;
  292. border: 1px solid rgba(0, 0, 0, 0.11);
  293. padding: 10px 20px;
  294. margin: 10px 20px;
  295. transition: 0.5s;
  296. border-radius: 3px;
  297. width: 518px;
  298. position: relative;
  299. float: left;
  300. .title-h3 {
  301. color: #222222;
  302. line-height: 40px;
  303. font-size: 20px;
  304. }
  305. .line {
  306. width: 4px;
  307. height: 30px;
  308. position: absolute;
  309. background-color: #ef651f;
  310. left: 0;
  311. top: 16px;
  312. }
  313. }
  314. .deliverList-box:hover {
  315. box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.11);
  316. }
  317. .interview-state {
  318. display: flex;
  319. justify-content: space-between;
  320. border-bottom: 1px dashed #ccc;
  321. line-height: 50px;
  322. font-size: 22px;
  323. color: #3ca7fe;
  324. .grey {
  325. color: #999999;
  326. }
  327. .green {
  328. color: #709078;
  329. }
  330. .red {
  331. color: #ff3939;
  332. }
  333. }
  334. .button-btn {
  335. width: 100%;
  336. display: flex;
  337. justify-content: center;
  338. margin: 10px 0;
  339. }
  340. .video {
  341. width: 200px;
  342. }
  343. </style>