pro_details_video.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. <template>
  2. <div class="pro_details_video" v-loading="loading">
  3. <head-component :headinfo=headinfo ref="headinfoRef"></head-component>
  4. <div class="page-content">
  5. <div class="page-img-box">
  6. <div class="top-content">
  7. <div class="top-content-right">
  8. <div class="right-top">
  9. <p class="title">{{ entity.name }}</p>
  10. <div class="right-top-icon">
  11. <collectionComponent ref="collectionRef" :collection="collection_data"></collectionComponent>
  12. </div>
  13. </div>
  14. <div class="content-info">
  15. <p>专业代码:{{ entity.code }}</p>
  16. <p>
  17. 学历层次:
  18. <dict-tag :options="educationlevel" :value="entity.bkzk"/>
  19. </p>
  20. <p>修学年限:{{ entity.years }}</p>
  21. <p>授予学位:{{ entity.degree }}</p>
  22. </div>
  23. </div>
  24. <div class="info-box">
  25. <p class="title">开设课程</p>
  26. <div class="info-text" v-html="entity.course">
  27. </div>
  28. </div>
  29. <div class="info-box">
  30. <p class="title">相近专业</p>
  31. <div class="info">
  32. <div class="info-item" v-for="(item,index) in similar_list" @click="toDetail(item)">
  33. {{ item.name }}
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="bottom-content">
  39. <div class="tab-box">
  40. <div :class="[onePage?'item-box-active':'item-box']" @click="showPage(1)">
  41. 专业解读
  42. </div>
  43. <div :class="[twoPage?'item-box-active':'item-box']" @click="showPage(2)">
  44. 开设院校
  45. </div>
  46. <div :class="[threePage?'item-box-active':'item-box']" @click="showPage(3)">
  47. 学科评估
  48. </div>
  49. <div :class="[fourPage?'item-box-active':'item-box']" @click="showPage(4)">
  50. 就业前景
  51. </div>
  52. <div :class="[fivePage?'item-box-active':'item-box']" @click="showPage(5)">
  53. 专业视频
  54. </div>
  55. </div>
  56. <div class="one-page" v-show="onePage">
  57. <p class="title">专业解读</p>
  58. <div class="info" v-html="entity.describe"></div>
  59. </div>
  60. <div class="one-page" v-show="twoPage">
  61. <p class="title">开设院校</p>
  62. <div class="info" v-for="(item,index) in kaishe_list">
  63. {{ item.name }}
  64. </div>
  65. </div>
  66. <div class="one-page" v-show="threePage">
  67. <p class="title">学科评估</p>
  68. <div class="info" v-for="(item,index) in pinggu_list">
  69. {{ item.name }}
  70. </div>
  71. </div>
  72. <div class="one-page" v-show="fourPage">
  73. <p class="title">就业前景</p>
  74. <div class="info" v-html="entity.employment">
  75. </div>
  76. </div>
  77. <div class="one-page" v-show="fivePage">
  78. <p class="title">专业视频</p>
  79. <div ref="videoContainer" class="video-container" v-if="entity.path">
  80. <video ref="videoPlayer" id="playerId" class="video-js vjs-default-skin" controls preload="auto"
  81. :data-setup="{}">
  82. <!-- 可以在这里插入source标签以指定你的视频源 -->
  83. <source :src="entity.path" type="video/mp4">
  84. </video>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. <el-dialog
  91. v-model="fivePage"
  92. @before-close="dialogBeforeClose"
  93. destroy-on-close
  94. title="专业视频"
  95. width="1832px"
  96. height="915px"
  97. center
  98. align-center
  99. v-if="entity.path"
  100. >
  101. <div class="video-content" >
  102. <video ref="videoPlayer" video preload="auto" autoplay muted controls width="1798" height="900">
  103. <source :src="entity.path" type="video/mp4">
  104. </video>
  105. </div>
  106. </el-dialog>
  107. </div>
  108. </template>
  109. <script setup>
  110. import videojs from 'video.js';
  111. import 'video.js/dist/video-js.css';
  112. import collectionComponent from '@/views/xjc-integratedmachine/components/collection_component.vue'
  113. import {specialtyDetail} from '@/api/xjc-integratedmachine/environment/specialty.js'
  114. import {provide, ref} from "vue";
  115. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  116. import Drag_component from "@/views/xjc-integratedmachine/components/drag_component.vue";
  117. import {handleThemeStyle} from "@/utils/theme.js";
  118. import useSettingsStore from "@/store/modules/settings.js";
  119. const {proxy} = getCurrentInstance()
  120. const {educationlevel} = proxy.useDict('educationlevel')
  121. const router = useRouter()
  122. const route = useRoute()
  123. const tabIndex = ref("zyjd")
  124. const headinfo = ref({})
  125. const headinfoRef = ref(null);
  126. const onePage = ref(true)
  127. const twoPage = ref(false)
  128. const threePage = ref(false)
  129. const fourPage = ref(false)
  130. const fivePage = ref(false)
  131. const loading = ref(false)
  132. function setHeadinfo(){
  133. headinfo.value = {
  134. title: '专业详情',
  135. user: {
  136. avatar: '头像路径',
  137. nickName: '张三'
  138. },
  139. backUrl : '/xjc-integratedmachine/environment/query_universitydb_conditions',
  140. homeUrl:'/xjc-integratedmachine/environment/index',
  141. contrast:true,
  142. contrastType:2
  143. }
  144. }
  145. onMounted(() => {
  146. setHeadinfo()
  147. })
  148. const param = route.query
  149. const entity = ref({})
  150. const kaishe_list = ref([])
  151. const pinggu_list = ref([])
  152. const similar_list = ref([])
  153. const collectionRef = ref(null)
  154. const collection_data = ref({})
  155. function setCollection_data(){
  156. collection_data.value = {
  157. contentType: 2,
  158. contentId: param.id,
  159. contentVal: entity.value,
  160. source:'pro_details_video'
  161. }
  162. console.log("entity.value",entity.value)
  163. }
  164. function detail(id) {
  165. loading.value = true;
  166. specialtyDetail({
  167. id: id || param.id
  168. }).then(resp => {
  169. resp.entity.smoSpecialty = resp.smoSpecialty
  170. resp.entity.compare = resp.compare
  171. entity.value = resp.entity
  172. kaishe_list.value = resp.kaishe_list
  173. pinggu_list.value = resp.pinggu_list
  174. similar_list.value = resp.similar_list
  175. entity.value.kaishe_list = kaishe_list
  176. loading.value = false
  177. setCollection_data()
  178. collectionRef.value.getIsContrast(entity.value)
  179. if (headinfoRef.value) {
  180. headinfoRef.value.getCompareSizeData(2); // 调用子组件的 sayHello 函数
  181. }
  182. })
  183. setTimeout(() => {
  184. setCollection_data()
  185. }, 500);
  186. }
  187. const showPage = (val) => {
  188. if (val === 1) {
  189. onePage.value = true;
  190. twoPage.value = false;
  191. threePage.value = false;
  192. fourPage.value = false;
  193. fivePage.value = false;
  194. } else if (val === 2) {
  195. onePage.value = false;
  196. twoPage.value = true;
  197. threePage.value = false;
  198. fourPage.value = false;
  199. fivePage.value = false;
  200. } else if (val === 3) {
  201. onePage.value = false;
  202. twoPage.value = false;
  203. threePage.value = true;
  204. fourPage.value = false;
  205. fivePage.value = false;
  206. } else if (val === 4) {
  207. onePage.value = false;
  208. twoPage.value = false;
  209. threePage.value = false;
  210. fourPage.value = true;
  211. fivePage.value = false;
  212. } else if (val === 5) {
  213. onePage.value = false;
  214. twoPage.value = false;
  215. threePage.value = false;
  216. fourPage.value = false;
  217. fivePage.value = true;
  218. } else if (val === 6) {
  219. onePage.value = false;
  220. twoPage.value = false;
  221. threePage.value = false;
  222. fourPage.value = false;
  223. fivePage.value = false;
  224. } else if (val === 7) {
  225. onePage.value = false;
  226. twoPage.value = false;
  227. threePage.value = false;
  228. fourPage.value = false;
  229. fivePage.value = false;
  230. } else if (val === 8) {
  231. onePage.value = false;
  232. twoPage.value = false;
  233. threePage.value = false;
  234. fourPage.value = false;
  235. fivePage.value = false;
  236. }
  237. }
  238. detail()
  239. function dialogBeforeClose() {
  240. onePage.value = true;
  241. twoPage.value = false;
  242. threePage.value = false;
  243. fourPage.value = false;
  244. fivePage.value = false;
  245. sixPage.value = false
  246. senvenPage.value = false
  247. eightPage.value = false;
  248. }
  249. function toDetail(item){
  250. // router.push({
  251. // path:'/xjc-integratedmachine/environment/pro_details_video',
  252. // query : {
  253. // id : item.id
  254. // }
  255. // })
  256. detail(item.id)
  257. }
  258. const parentMethod = () => {
  259. console.log('父组件方法被调用');
  260. detail()
  261. if (headinfoRef.value) {
  262. headinfoRef.value.getCompareSizeData(1); // 调用子组件的 sayHello 函数
  263. }
  264. };
  265. provide('parentMethod', parentMethod);
  266. </script>
  267. <style scoped lang="scss">
  268. p, div {
  269. margin: 0;
  270. padding: 0;
  271. }
  272. .pro_details_video {
  273. background: url('@/assets/images/environment/university-detail.png') no-repeat;
  274. background-size: 1920px 1080px;
  275. z-index: 10;
  276. width: 100%;
  277. height: 1080px;
  278. .page-content {
  279. width: 100%;
  280. position: absolute;
  281. top: 100px;
  282. bottom: 0;
  283. display: flex;
  284. justify-content: center;
  285. }
  286. .page-img-box {
  287. width: 1832px;
  288. height: 922px;
  289. margin-top: 13px;
  290. background: rgba(255, 255, 255, 0.4);
  291. border-radius: 35px 35px 35px 35px;
  292. display: flex;
  293. flex-direction: column;
  294. .top-content {
  295. width: 1832px;
  296. display: flex;
  297. flex-direction: column;
  298. .top-content-right {
  299. margin-left: 45px;
  300. width: 1782px;
  301. margin-left: 45px;
  302. .title {
  303. font-weight: bold;
  304. font-size: 36px;
  305. color: #1E410E;
  306. line-height: 24px;
  307. }
  308. .school-level-box {
  309. display: flex;
  310. justify-content: left;
  311. .school-level {
  312. margin-right: 20px;
  313. width: 174px;
  314. height: 54px;
  315. background: #B3FC7C;
  316. border-radius: 5px 5px 5px 5px;
  317. font-weight: bold;
  318. font-size: 20px;
  319. color: #000000;
  320. line-height: 54px;
  321. text-align: center;
  322. }
  323. }
  324. .text-box {
  325. width: 1124px;
  326. p {
  327. margin-right: 20px;
  328. }
  329. }
  330. .right-top {
  331. display: flex;
  332. justify-content: space-between;
  333. align-items: center;
  334. .right-top-icon {
  335. width: 200px;
  336. height: 68px;
  337. display: flex;
  338. justify-content: space-between;
  339. margin-top: 24px;
  340. .item-img {
  341. display: flex;
  342. flex-direction: column;
  343. align-items: center;
  344. p {
  345. font-weight: 400;
  346. font-size: 20px;
  347. color: #515F6A;
  348. }
  349. img {
  350. width: 36px;
  351. height: 36px;
  352. }
  353. }
  354. }
  355. }
  356. }
  357. .content-info{
  358. display: flex;
  359. p{
  360. width: 200px;
  361. margin-right: 10px;
  362. display: flex;
  363. font-weight: 400;
  364. font-size: 20px;
  365. color: #333333;
  366. }
  367. }
  368. .info-box{
  369. margin-left: 33px;
  370. .title {
  371. height: 40px;
  372. border-left: 8px #8CE349 solid;
  373. margin-top: 33px;
  374. font-weight: 400;
  375. font-size: 28px;
  376. color: #333333;
  377. line-height: 40px;
  378. padding-left: 11px;
  379. }
  380. .info{
  381. margin-top: 19px;
  382. font-weight: 400;
  383. font-size: 20px;
  384. color: #333333;
  385. display: flex;
  386. //justify-content: space-around;
  387. flex-wrap: wrap;
  388. .info-item{
  389. width: 244px;
  390. height: 80px;
  391. margin-left: 10px;
  392. background: #FFFFFF;
  393. border-radius: 5px 5px 5px 5px;
  394. border: 1px solid #A2F57F;
  395. font-weight: 400;
  396. font-size: 30px;
  397. color: #000000;
  398. line-height: 80px;
  399. text-align: center;
  400. margin-top: 14px;
  401. }
  402. }
  403. .info-text{
  404. margin-top: 19px;
  405. font-weight: 400;
  406. font-size: 20px;
  407. color: #333333;
  408. }
  409. }
  410. }
  411. }
  412. .bottom-content {
  413. margin-top: 10px;
  414. height: 500px;
  415. .tab-box {
  416. display: flex;
  417. padding-right: 279px;
  418. img {
  419. width: 36px;
  420. height: 36px;
  421. margin-right: 12px;
  422. }
  423. }
  424. .item-box {
  425. text-align: center;
  426. display: flex;
  427. justify-content: center;
  428. align-items: center;
  429. width: 202px;
  430. height: 65px;
  431. box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.09);
  432. border-radius: 5px 5px 0px 0px;
  433. font-weight: 400;
  434. font-size: 32px;
  435. color: #979797;
  436. }
  437. .item-box-active {
  438. text-align: center;
  439. color: #000000;
  440. background: #FFFFFF;
  441. font-weight: bold;
  442. font-size: 32px;
  443. display: flex;
  444. justify-content: center;
  445. align-items: center;
  446. width: 202px;
  447. height: 65px;
  448. background: #FFFFFF;
  449. box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.09);
  450. border-radius: 5px 5px 0px 0px;
  451. }
  452. }
  453. //.editor-content div,
  454. //.editor-content span,
  455. //.editor-content p,
  456. //.editor-content h1,
  457. //.editor-content h2,
  458. //.editor-content h3,
  459. //.editor-content h4,
  460. //.editor-content h5,
  461. //.editor-content h6 {
  462. // font-size: 26px !important;
  463. // line-height: 37px !important;
  464. //}
  465. .editor-content div,
  466. .editor-content span,
  467. .editor-content p {
  468. text-indent: 2em !important;
  469. text-align: left !important;
  470. }
  471. }
  472. .one-page {
  473. width: 1832px;
  474. height: 341px;
  475. background: #FFFFFF;
  476. border-radius: 0px 0px 35px 35px;
  477. border: 1px solid #FFFFFF;
  478. overflow: auto;
  479. line-height: 32px;
  480. padding-top: 10px;
  481. .title {
  482. height: 40px;
  483. border-left: 8px #8CE349 solid;
  484. margin-left: 33px;
  485. font-weight: 400;
  486. font-size: 28px;
  487. color: #333333;
  488. line-height: 40px;
  489. padding-left: 11px;
  490. }
  491. .info {
  492. text-indent: 2em;
  493. font-weight: 400;
  494. font-size: 28px;
  495. color: #333333;
  496. line-height: 40px;
  497. }
  498. .select-div {
  499. width: 100%;
  500. height: 100px;
  501. font-weight: 400;
  502. font-size: 30px;
  503. color: #333333;
  504. line-height: 40px;
  505. display: flex;
  506. justify-content: center;
  507. align-items: center;
  508. margin-bottom: 21px;
  509. .select-box {
  510. width: 300px;
  511. height: 90px;
  512. border: 1px solid #CCCCCC;
  513. line-height: 90px;
  514. text-align: center;
  515. margin-left: 10px;
  516. }
  517. .click-search {
  518. width: 170px;
  519. height: 90px;
  520. background: linear-gradient(180deg, #73EE71 0%, #0ACB63 100%);
  521. border-radius: 5px;
  522. font-weight: 400;
  523. font-size: 24px;
  524. color: #FFFFFF;
  525. margin-left: 20px;
  526. }
  527. }
  528. ::v-deep .el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th {
  529. height: 74px !important;
  530. font-size: 24px;
  531. color: #1E410E;
  532. }
  533. ::v-deep .el-table tr {
  534. height: 74px !important;
  535. font-size: 20px;
  536. }
  537. ::v-deep .el-dialog__title {
  538. font-size: 34px !important;
  539. }
  540. ::v-deep .el-dialog {
  541. margin-top: 0px !important;
  542. }
  543. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  544. font-size: 30px !important;
  545. }
  546. }
  547. .dict-dialog{
  548. max-width: 570px;
  549. height: 800px;
  550. overflow: auto;
  551. .dict-box {
  552. font-size: 24px;
  553. line-height: 34px;
  554. color: #333333;
  555. }
  556. }
  557. </style>