occ_details_video.vue 14 KB

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