CourseList.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. <script setup>
  2. import { ref,onMounted } from 'vue'
  3. const courseList = ref([])
  4. const courseList1 = ref([
  5. {
  6. id: 0,
  7. title: "人脸追踪向日葵",
  8. principle: 3,
  9. structure: 2,
  10. programming: 3,
  11. feature: "太阳花自动追踪人脸",
  12. desc: "人脸检测的概念、伺服马达控制、人脸检测程式、人脸追踪太阳花交互。",
  13. courseNum: 3,
  14. imgSrc: "./image/chu1.png",
  15. codeSrc: "./image/chu1code.png",
  16. },
  17. {
  18. id: 1,
  19. title: "智能夜灯",
  20. principle: 3,
  21. structure: 2,
  22. programming: 3,
  23. feature: "通过光线数值、语音指令控制灯光效果,并呈现当前的环境数值。",
  24. desc: "语音识别原理、RGB灯的使用、温湿度传感器及光照传感器的使用。",
  25. courseNum: 3,
  26. imgSrc: "./image/chu2.png",
  27. codeSrc: "./image/chu2code.png",
  28. },
  29. {
  30. id: 2,
  31. title: "重力感应迷宫",
  32. principle: 3,
  33. structure: 2,
  34. programming: 3,
  35. feature: "通过运动传感器检测模组姿态,控制小球运动,穿梭迷宫到达终点。",
  36. desc: "运动传感器的原理、舵机控制、重力感应迷宫程式设计。",
  37. courseNum: 3,
  38. imgSrc: "./image/chu3.png",
  39. codeSrc: "./image/chu3code.png",
  40. },
  41. {
  42. id: 3,
  43. title: "着火报警器",
  44. principle: 3,
  45. structure: 2,
  46. programming: 3,
  47. feature: "通过火焰传感器及烟雾传感器对环境进行火情监测。",
  48. desc: "认识并使用火焰传感器与烟雾传感器、设计实现著火报警器程式。",
  49. courseNum: 3,
  50. imgSrc: "./image/chu4.png",
  51. codeSrc: "./image/chu4code.png",
  52. },
  53. {
  54. id: 4,
  55. title: "数字识别大转盘",
  56. principle: 3,
  57. structure: 2,
  58. programming: 3,
  59. feature: "识别数字后,指针根据识别到的数字转动到对应位置。",
  60. desc: "手写数字识别的原理、舵机控制、手写数字大转盘程式设计。",
  61. courseNum: 3,
  62. imgSrc: "./image/chu5.png",
  63. codeSrc: "./image/chu5code.png",
  64. },
  65. {
  66. id: 5,
  67. title: "猜拳机器人",
  68. principle: 3,
  69. structure: 2,
  70. programming: 3,
  71. feature: "使用手势识别技术辨识包、剪、揼,并与机械人进行包剪揼游戏。",
  72. desc: "手势识别概念、舵机控制、机器学习原理和手势识别程式设计。",
  73. courseNum: 3,
  74. imgSrc: "./image/chu6.png",
  75. codeSrc: "./image/chu6code.png",
  76. },
  77. {
  78. id: 6,
  79. title: "智能风扇",
  80. principle: 3,
  81. structure: 2,
  82. programming: 3,
  83. feature: "通过语音指令控制风扇的打开、关闭以及风速的切换。",
  84. desc: "语音识别的原理、电机控制、智能语音风扇程式。",
  85. courseNum: 3,
  86. imgSrc: "./image/chu7.png",
  87. codeSrc: "./image/chu7code.png",
  88. },
  89. {
  90. id: 7,
  91. title: "戏剧变脸",
  92. principle: 3,
  93. structure: 2,
  94. programming: 3,
  95. feature: "检测到人脸后,自动切换戏剧人物的脸谱。",
  96. desc: "人脸检测原理、舵机的使用、齿轮机构。",
  97. courseNum: 3,
  98. imgSrc: "./image/chu2.png",
  99. codeSrc: "./image/chu2code.png",
  100. }
  101. ])
  102. const courseList2 = ref([
  103. {
  104. id: 0,
  105. title: "种子筛选机",
  106. principle: 4,
  107. structure: 3,
  108. programming: 3,
  109. feature: "通过自定义识别模型,对种子进行筛选,实现科学选种。",
  110. desc: "智慧农业应用、机器学习原理、自定义模型训练与识别、舵机控制。",
  111. courseNum: 3,
  112. imgSrc: "./image/zhong1.png",
  113. codeSrc: "./image/zhong1code.png",
  114. },
  115. {
  116. id: 1,
  117. title: "垃圾分类箱",
  118. principle: 4,
  119. structure: 3,
  120. programming: 3,
  121. feature: "通过自定义识别模型,识别不同的垃圾卡片,实现对应垃圾箱的翻盖与复位。",
  122. desc: "舵机控制、机器学习原理和自定义模型训练与识别。",
  123. courseNum: 3,
  124. imgSrc: "./image/zhong2.png",
  125. codeSrc: "./image/zhong2code.png",
  126. },
  127. {
  128. id: 2,
  129. title: "情绪小怪兽",
  130. principle: 3,
  131. structure: 2,
  132. programming: 3,
  133. feature: "辨识人们不同的情绪,根据情绪显示不同颜色的灯光效果。",
  134. desc: "情绪识别原理、搭建情绪小怪兽装置、设计并实现情绪小怪兽程式。",
  135. courseNum: 3,
  136. imgSrc: "./image/zhong3.png",
  137. codeSrc: "./image/zhong3code.png",
  138. },
  139. {
  140. id: 3,
  141. title: "智能气象站",
  142. principle: 2,
  143. structure: 2,
  144. programming: 3,
  145. feature: "获取实时环境温湿度及光线强度,在物联网云平台绘制可视化图表。",
  146. desc: "物联网技术概述、温湿度传感器及光照传感器的使用、云平台使用。",
  147. courseNum: 4,
  148. imgSrc: "./image/zhong4.png",
  149. codeSrc: "./image/zhong4code.png",
  150. },
  151. {
  152. id: 4,
  153. title: "环境感应屋",
  154. principle: 3,
  155. structure: 4,
  156. programming: 3,
  157. feature: "雨滴落到屋顶,窗户自动关闭;环境光线不足时,灯光自动亮起。",
  158. desc: "智能家居应用、雨滴传感器使用、舵机控制、光线传感器使用。",
  159. courseNum: 4,
  160. imgSrc: "./image/zhong5.png",
  161. codeSrc: "./image/zhong5code.png",
  162. },
  163. {
  164. id: 5,
  165. title: "作物浇灌系统",
  166. principle: 2,
  167. structure: 2,
  168. programming: 3,
  169. feature: "土壤湿度小于某个值时,水泵自动浇水;湿度低于某个值,空气加湿器启动并开始加湿。",
  170. desc: "了解智慧农业场景、土壤湿度及温湿度传感器使用、水泵控制、作物浇灌系统程式设计。",
  171. courseNum: 4,
  172. imgSrc: "./image/zhong6.png",
  173. codeSrc: "",
  174. },
  175. {
  176. id: 6,
  177. title: "智能药箱",
  178. principle: 4,
  179. structure: 3,
  180. programming: 3,
  181. feature: "识别不同类型的药物并归类,按时提醒服用相应类型的药物。",
  182. desc: "机器学习原理、自定义模型训练与识别、RGB灯带的使用。",
  183. courseNum: 4,
  184. imgSrc: "./image/zhong7.png",
  185. codeSrc: "",
  186. },
  187. {
  188. id: 7,
  189. title: "无人驾驶车",
  190. principle: 4,
  191. structure: 2,
  192. programming: 3,
  193. feature: "透过循线识别与路标识别控制小车的行驶。",
  194. desc: "无人驾驶的概念与原理、TT电机控制、循线运动实现、机器学习原理、自定义模型训练与识别。",
  195. courseNum: 5,
  196. imgSrc: "./image/zhong8.png",
  197. codeSrc: "./image/zhong8code.png",
  198. }
  199. ])
  200. const courseList3 = ref([
  201. {
  202. id: 0,
  203. title: "万向麦轮车",
  204. principle: 3,
  205. structure: 3,
  206. programming: 4,
  207. feature: "使用视觉识别、语音识别等不同方式控制麦轮车进行各方向运动。",
  208. desc: "认识麦克纳姆轮、小车的运动控制、语音识别、路标识别。",
  209. courseNum: 5,
  210. imgSrc: "./image/gao1.png",
  211. codeSrc: "./image/gao1code.png",
  212. },
  213. {
  214. id: 1,
  215. title: "自动售货机",
  216. principle: 3,
  217. structure: 4,
  218. programming: 4,
  219. feature: "识别特定人脸后,透过按键选择商品,实现扣款和商品掉落。",
  220. desc: "人脸识别的原理、按键选择控制、萤幕UI设计、舵机控制。",
  221. courseNum: 5,
  222. imgSrc: "./image/gao2.png",
  223. codeSrc: "./image/gao2code.png",
  224. },
  225. {
  226. id: 2,
  227. title: "马戏团机械人",
  228. principle: 4,
  229. structure: 4,
  230. programming: 4,
  231. feature: "透过动作卡牌与路标控制机械人行驶与表演,如前进、左转、右转、摆手、转圈等。",
  232. desc: "TT电机控制、舵机控制、机器学习原理、自定义模型训练与识别。",
  233. courseNum: 5,
  234. imgSrc: "./image/gao3.png",
  235. codeSrc: "./image/gao3code.png",
  236. },
  237. {
  238. id: 3,
  239. title: "智慧物流车",
  240. principle: 4,
  241. structure: 4,
  242. programming: 4,
  243. feature: "透过循线识别与路标识别控制小车的行驶,并实现小车的装卸货。",
  244. desc: "智慧物流概念、TT电机控制、舵机控制、循线运动、机器学习原理、自定义模型训练与识别。",
  245. courseNum: 6,
  246. imgSrc: "./image/gao4.png",
  247. codeSrc: "./image/gao4code.png",
  248. },
  249. {
  250. id: 4,
  251. title: "流浪猫救助屋",
  252. principle: 3,
  253. structure: 3,
  254. programming: 5,
  255. feature: "透过猫隻辨识及照片记录猫隻出现的时间与样貌,实现自动喂食、邮件提醒等功能。",
  256. desc: "迷你照相机、Wi-Fi连接、获取网络时间、IFTTT应用、物体识别技术、舵机控制。",
  257. courseNum: 6,
  258. imgSrc: "./image/gao5.png",
  259. codeSrc: "./image/gao5code.png",
  260. },
  261. {
  262. id: 5,
  263. title: "语音交互机械鸟",
  264. principle: 4,
  265. structure: 1,
  266. programming: 5,
  267. feature: "透过语音识别、机器翻译与语音合成技术,实现即时传译。",
  268. desc: "语音识别、机器翻译、语音合成的原理与程式设计,语音交互机械鸟完整程式设计。",
  269. courseNum: 6,
  270. imgSrc: "./image/gao6.png",
  271. codeSrc: "./image/gao6code.png",
  272. },
  273. {
  274. id: 6,
  275. title: "共用体育用品柜",
  276. principle: 4,
  277. structure: 4,
  278. programming: 4,
  279. feature: "使用人脸识别确定借用者身份,语音识别借取体育用品,自定义模型识别确认所归还的物品。",
  280. desc: "人脸识别、语音识别、机器学习原理、自定义模型识别、舵机控制。",
  281. courseNum: 6,
  282. imgSrc: "./image/gao7.png",
  283. codeSrc: "./image/gao7code.png",
  284. },
  285. {
  286. id: 7,
  287. title: "可可助手",
  288. principle: 4,
  289. structure: 2,
  290. programming: 5,
  291. feature: "实现文本、图片及语音的自动生成,识别图像内容自动生成文本与语音。",
  292. desc: "认识语音交互、连接网络、语音/图片/文本自动生成、识别图像内容自动生成文本和语音。",
  293. courseNum: 6,
  294. imgSrc: "./image/zhong2.png",
  295. codeSrc: "./image/gao2code.png",
  296. }
  297. ])
  298. const active = ref(0)
  299. onMounted(() => {
  300. courseList.value = courseList1.value
  301. })
  302. const courseListSwitch = (list,ind) => {
  303. courseList.value = list
  304. active.value = ind
  305. }
  306. </script>
  307. <template>
  308. <div class="course-list">
  309. <h2 style="text-align: center;margin-bottom: 80px;">课程列表</h2>
  310. <div class="course-list-tab">
  311. <div class="content course-list-tab-div">
  312. <div @click="courseListSwitch(courseList1,0)">
  313. <span :class="active === 0 ? 'active' : ''">
  314. 初级
  315. </span>
  316. </div>
  317. <div @click="courseListSwitch(courseList2,1)">
  318. <span :class="active === 1 ? 'active' : ''">
  319. 中级
  320. </span>
  321. </div>
  322. <div @click="courseListSwitch(courseList3,2)">
  323. <span :class="active === 2 ? 'active' : ''">
  324. 高级
  325. </span>
  326. </div>
  327. </div>
  328. </div>
  329. <div class="course-list-content content">
  330. <div class="course-list-content-div active">
  331. <div class="course-list-content-div-item" v-for="(item, index) in courseList" :key="index">
  332. <span class="course-list-content-div-item-title">{{ item.title }}</span>
  333. <span class="course-list-content-div-item-num"><i>{{ item.courseNum }}</i>节</span>
  334. <div class="course-list-content-div-item-star">
  335. <span>
  336. 原理:<img v-for="i in item.principle" src="../../assets/img/star.png" alt="">
  337. </span>
  338. <span>
  339. 结构:<img v-for="i in item.structure" src="../../assets/img/star.png" alt="">
  340. </span>
  341. <span>
  342. 编程:<img v-for="i in item.programming" src="../../assets/img/star.png" alt="">
  343. </span>
  344. </div>
  345. <div class="course-list-content-div-item-img">
  346. <img class="img" :src="item.imgSrc" alt="">
  347. <span class="code-img">
  348. <img class="code" :src="item.codeSrc" alt=""><br />
  349. 演示视频
  350. </span>
  351. </div>
  352. <div class="course-list-content-div-item-desc">
  353. <span>功能:</span>
  354. <p style="margin-bottom: 10px;">{{ item.feature }}</p>
  355. <span>原理:</span>
  356. <p>{{ item.desc }}</p>
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. </div>
  362. </template>
  363. <style scoped>
  364. .course-list {
  365. margin-top: 80px;
  366. background-color: #F3F7FD;
  367. padding: 80px 0;
  368. .course-list-tab{
  369. border-bottom: 1px solid #E2EEFF;
  370. .course-list-tab-div {
  371. display: flex;
  372. justify-content: space-between;
  373. div {
  374. width: 30%;
  375. text-align: center;
  376. span{
  377. display: inline-block;
  378. padding: 0 10px 20px;
  379. border-bottom: 1px solid #AECCFE;
  380. cursor: pointer;
  381. color: #86B3FD;
  382. font-weight: 700;
  383. font-size: 32px;
  384. }
  385. .active{
  386. border-bottom: 1px solid #3681FC;
  387. color: #000;
  388. }
  389. }
  390. }
  391. }
  392. .course-list-content-div {
  393. margin-top: 48px;
  394. display: flex;
  395. justify-content: space-between;
  396. flex-wrap: wrap;
  397. .course-list-content-div-item {
  398. margin-top: 60px;
  399. width: 22%;
  400. background-color: #fff;
  401. border: 1px solid #FFFFFFE5;
  402. border-radius: 24px;
  403. box-shadow: 0px 4px 4px #1D398314;
  404. position: relative;
  405. padding: 20px;
  406. .course-list-content-div-item-title {
  407. width: 142px;
  408. display: inline-block;
  409. background-color: #E2EEFF;
  410. padding: 8px 0 8px;
  411. font-size: 18px;
  412. color: #3681FC;
  413. position: absolute;
  414. top: -22px;
  415. left: 0;
  416. }
  417. .course-list-content-div-item-title::after {
  418. content: "";
  419. width: 0;
  420. height: 0;
  421. position: absolute;
  422. top: 0;
  423. right: -40px;
  424. border-width: 20px;
  425. border-style: solid;
  426. border-color: transparent transparent transparent #E2EEFF;
  427. }
  428. .course-list-content-div-item-num {
  429. display: inline-block;
  430. position: absolute;
  431. right: -30px;
  432. top: -32px;
  433. padding: 8px 12px;
  434. border: 1px solid #AECCFE;
  435. border-radius: 50%;
  436. font-weight: 700;
  437. font-size: 10px;
  438. background-color: #fff;
  439. box-shadow: 0px 4px 4px #1D398314;
  440. i {
  441. font-style: normal;
  442. font-size: 32px;
  443. }
  444. }
  445. .course-list-content-div-item-star {
  446. padding: 8px 0;
  447. text-align: left;
  448. display: flex;
  449. justify-content: space-between;
  450. span {
  451. color: #3681FC;
  452. font-size: 12px;
  453. }
  454. }
  455. .course-list-content-div-item-img {
  456. position: relative;
  457. padding: 10px;
  458. .img {
  459. width: 100%;
  460. }
  461. .code-img {
  462. cursor: pointer;
  463. position: absolute;
  464. bottom: 13px;
  465. left: 10px;
  466. display: inline-block;
  467. vertical-align: bottom;
  468. font-size: 8px;
  469. padding: 3px;
  470. background-color: #fff;
  471. .code {
  472. width: 50px;
  473. }
  474. }
  475. .code-img:hover {
  476. .code {
  477. width: 100%;
  478. }
  479. }
  480. }
  481. .course-list-content-div-item-desc {
  482. text-align: left;
  483. span {
  484. font-size: 16px;
  485. font-weight: 700;
  486. line-height: 24px;
  487. }
  488. p {
  489. margin-top: 5px;
  490. font-size: 14px;
  491. line-height: 20px;
  492. color: #00000099;
  493. word-break: break-all;
  494. text-overflow: ellipsis;
  495. display: -webkit-box;
  496. -webkit-box-orient: vertical;
  497. line-clamp: 2;
  498. /* 这里是超出几行省略 */
  499. overflow: hidden;
  500. min-height: 40px;
  501. }
  502. }
  503. }
  504. }
  505. }
  506. </style>