SkillPackageIndex.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <!--
  2. * @Description: 技能培训 => 技能包
  3. * @Author: 空白格
  4. * @Date: 2022-08-26 10:41:50
  5. * @LastEditors: 空白格
  6. * @LastEditTime: 2022-08-29 14:44:17
  7. * @FilePath: \veterans_client_web\src\views\SkillTraining\SkillPackage\SkillPackageIndex.vue
  8. * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  9. -->
  10. <template>
  11. <div>
  12. <div class="topBox">
  13. <div class="_center">
  14. <div class="package">
  15. <div class="tit-img">
  16. <img :src="skillDetail.img" alt />
  17. </div>
  18. <div class="right-top">
  19. <div class="title-right">
  20. <!-- <span class="tags">检验</span> -->
  21. <span class="tag-title">{{ skillDetail.name }}</span>
  22. </div>
  23. <div class="introduce">
  24. <!-- <p>无人机教学班 2021.09.23</p> -->
  25. <p>培训学校:{{ schoolName }}</p>
  26. <p>培训导师:{{ skillDetail.teacherName }}</p>
  27. <p>培训周期:{{ skillDetail.cycle }}个月</p>
  28. <p>
  29. <span>报名人数:{{ skillDetail.applyCount }}</span>
  30. <span style="margin-left: 10px"
  31. >开班人数:{{ skillDetail.classCount }}</span
  32. >
  33. </p>
  34. <p>
  35. <span style="margin-right: 6px">难度</span>
  36. <el-rate v-model="skillDetail.difficult" disabled></el-rate>
  37. </p>
  38. </div>
  39. <div class="tag-btn">
  40. <span class="tag-state">{{ skillDetail.statusStr }}</span>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="selected-box">
  47. <div class="_center">
  48. <div class="selected-center">
  49. <div class="selected-title">
  50. <h3>精选课程</h3>
  51. <span @click="more">更多></span>
  52. </div>
  53. <div class="swpier-box">
  54. <swiper :options="swiperOption">
  55. <swiper-slide
  56. v-for="(img, index) in skillDetail.courseList"
  57. :key="index"
  58. >
  59. <div class="news-box" @click="skillClick(img)">
  60. <img :src="img.img" alt />
  61. <div class="video"></div>
  62. <p class="title">{{ img.name }}</p>
  63. <!-- <p class="state">线上课程</p> -->
  64. </div>
  65. </swiper-slide>
  66. </swiper>
  67. <div class="swiper-button-prev" slot="button-prev"></div>
  68. <div class="swiper-button-next" slot="button-next"></div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="skill-box">
  74. <div class="_center">
  75. <div class="skill-center">
  76. <h2>技能详解</h2>
  77. <div class="ql-editor" v-html="skillDetail.description"></div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </template>
  83. <script>
  84. import { getSkillDetail } from "@/api/SkillTraining/index";
  85. export default {
  86. name: "SkillPackageIndex",
  87. data() {
  88. return {
  89. newsId: this.$route.query.id,
  90. schoolName: this.$route.query.schoolName,
  91. train: 3,
  92. itemList: [
  93. {
  94. img: require("@/assets/images/selected.png"),
  95. },
  96. {
  97. img: require("@/assets/images/selected.png"),
  98. },
  99. {
  100. img: require("@/assets/images/selected.png"),
  101. },
  102. {
  103. img: require("@/assets/images/selected.png"),
  104. },
  105. ],
  106. swiperOption: {
  107. slidesPerView: 4,
  108. // 设置前进后退按钮
  109. navigation: {
  110. nextEl: ".swiper-button-next",
  111. prevEl: ".swiper-button-prev",
  112. },
  113. // 设置自动轮播
  114. autoplay: {
  115. delay: 2000, // 5秒切换一次
  116. },
  117. // 设置轮播可循环
  118. // loop: true
  119. },
  120. skillDetail: {},
  121. };
  122. },
  123. created() {
  124. this.getSkillDetail();
  125. },
  126. methods: {
  127. getSkillDetail() {
  128. getSkillDetail(this.newsId).then((res) => {
  129. this.skillDetail = res.data;
  130. });
  131. },
  132. more() {
  133. this.$router.push({
  134. path: "/skilltraining/selectedcourses",
  135. query: { id: this.newsId },
  136. });
  137. },
  138. /**
  139. * 点击课程
  140. * @date 2022-08-29
  141. * @param {any} item
  142. * @returns {any}
  143. */
  144. skillClick(item) {
  145. this.$router.push({
  146. path: "/skilltraining/coursevideo",
  147. query: {
  148. id: item.id,
  149. },
  150. });
  151. },
  152. },
  153. };
  154. </script>
  155. <style lang="scss" scoped>
  156. .news-box {
  157. width: 280px;
  158. height: 174px;
  159. // overflow: hidden;
  160. position: relative;
  161. display: inline-block;
  162. p {
  163. list-style: 30px;
  164. }
  165. .news-box {
  166. font-size: 20px;
  167. color: #2e2e2e;
  168. }
  169. .state {
  170. font-size: 14px;
  171. color: #818181;
  172. }
  173. }
  174. .news-box img {
  175. cursor: pointer;
  176. width: 100%;
  177. height: 100%;
  178. }
  179. .news-box img::after {
  180. width: 70px;
  181. height: 70px;
  182. background-image: url("@/assets/images/shipin.png");
  183. background-size: 70px 70px;
  184. position: absolute;
  185. top: 25%;
  186. left: 35%;
  187. }
  188. .video {
  189. width: 70px;
  190. height: 70px;
  191. background-image: url("@/assets/images/shipin.png");
  192. background-size: 70px 70px;
  193. position: absolute;
  194. top: 25%;
  195. left: 35%;
  196. }
  197. .title {
  198. color: #2e2e2e;
  199. margin-top: 10px;
  200. font-size: 14px;
  201. }
  202. .topBox {
  203. background-color: #43565f;
  204. width: 100%;
  205. padding-bottom: 40px;
  206. }
  207. ._center {
  208. width: 70%;
  209. min-width: 70%;
  210. margin: 0 auto;
  211. }
  212. .package {
  213. display: flex;
  214. padding-top: 35px;
  215. justify-content: left;
  216. .tit-img {
  217. width: 266px;
  218. height: 266px;
  219. border: 1px #ccc dashed;
  220. img {
  221. width: 100%;
  222. height: 100%;
  223. object-fit: fill;
  224. }
  225. }
  226. .right-top {
  227. margin-left: 30px;
  228. color: #fff;
  229. .title-right {
  230. margin-bottom: 14px;
  231. .tags {
  232. width: 64px;
  233. height: 28px;
  234. font-size: 18px;
  235. background-image: linear-gradient(153deg, #f89e42 0%, #ff7833 97%);
  236. border-radius: 14px;
  237. display: inline-block;
  238. text-align: center;
  239. line-height: 28px;
  240. }
  241. .tag-title {
  242. font-size: 26px;
  243. margin-left: 10px;
  244. }
  245. }
  246. .introduce {
  247. display: flex;
  248. flex-direction: column;
  249. p {
  250. line-height: 30px;
  251. height: 30px;
  252. display: flex;
  253. justify-content: left;
  254. align-items: center;
  255. }
  256. }
  257. .tag-btn {
  258. padding: 10px 0;
  259. .tag-state {
  260. width: 320px;
  261. height: 36px;
  262. border: 2px solid #ffffff;
  263. border-radius: 39px;
  264. text-align: center;
  265. line-height: 36px;
  266. display: inline-block;
  267. }
  268. }
  269. }
  270. }
  271. .selected-box,
  272. .skill-box {
  273. margin-top: 20px;
  274. }
  275. .skill-box {
  276. padding-bottom: 40px;
  277. }
  278. .selected-center,
  279. .skill-center {
  280. background-color: #ffffff;
  281. padding: 20px;
  282. }
  283. .selected-title {
  284. display: flex;
  285. justify-content: space-between;
  286. align-items: flex-end;
  287. height: 40px;
  288. margin-bottom: 20px;
  289. h3 {
  290. color: #222222;
  291. font-size: 26px;
  292. }
  293. span {
  294. color: #a3a3a3;
  295. font-size: 14px;
  296. cursor: pointer;
  297. }
  298. }
  299. ::v-deep .swiper-container {
  300. width: 91%;
  301. }
  302. .swpier-box {
  303. position: relative;
  304. .swiper-button-prev {
  305. width: 30px;
  306. height: 174px;
  307. top: 12%;
  308. background: #f3f3f3;
  309. }
  310. .swiper-button-next {
  311. width: 30px;
  312. height: 174px;
  313. top: 12%;
  314. background: #f3f3f3;
  315. }
  316. .swiper-button-prev:after,
  317. .swiper-button-next:after {
  318. font-size: 30px;
  319. color: #dedede;
  320. }
  321. }
  322. </style>