occ_details_video.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  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 headinfoRef = ref(null);
  118. const onePage = ref(true)
  119. const twoPage = ref(false)
  120. const threePage = ref(false)
  121. const fourPage = ref(false)
  122. const fivePage = ref(false)
  123. const sixPage = ref(false)
  124. function setHeadinfo(){
  125. headinfo.value = {
  126. title: '职业详情',
  127. user: {
  128. avatar: '头像路径',
  129. nickName: '张三'
  130. },
  131. backUrl : '/xjc-integratedmachine/environment/query_universitydb_conditions',
  132. homeUrl:'/xjc-integratedmachine/environment/index',
  133. contrast:true,
  134. contrastType:3
  135. }
  136. }
  137. onMounted(() => {
  138. setHeadinfo()
  139. })
  140. const param = route.query
  141. const entity = ref({})
  142. const collectionRef = ref(null)
  143. const collection_data = ref({})
  144. function setCollection_data(){
  145. collection_data.value = {
  146. contentType: 3,
  147. contentId: param.id,
  148. contentVal: entity.value,
  149. source:'occ_details_video'
  150. }
  151. }
  152. const bk_list = ref([])
  153. const zk_list = ref([])
  154. function detail() {
  155. occupationDetail({
  156. id: param.id
  157. }).then(resp => {
  158. resp.entity.bk_list = resp.bk_list
  159. resp.entity.compare = resp.compare
  160. entity.value = resp.entity
  161. bk_list.value = entity.value.bk_list
  162. zk_list.value = resp.zk_list
  163. setCollection_data()
  164. collectionRef.value.getIsContrast(entity.value)
  165. if (headinfoRef.value) {
  166. headinfoRef.value.getCompareSizeData(3); // 调用子组件的 sayHello 函数
  167. }
  168. setTimeout(() => {
  169. setCollection_data();
  170. }, 1000);
  171. })
  172. }
  173. const parentMethod = () => {
  174. console.log('父组件方法被调用');
  175. detail()
  176. };
  177. provide('parentMethod', parentMethod);
  178. const showPage = (val) => {
  179. if (val === 1) {
  180. onePage.value = true;
  181. twoPage.value = false;
  182. threePage.value = false;
  183. fourPage.value = false;
  184. fivePage.value = false;
  185. sixPage.value = false;
  186. } else if (val === 2) {
  187. onePage.value = false;
  188. twoPage.value = true;
  189. threePage.value = false;
  190. fourPage.value = false;
  191. fivePage.value = false;
  192. sixPage.value = false;
  193. } else if (val === 3) {
  194. onePage.value = false;
  195. twoPage.value = false;
  196. threePage.value = true;
  197. fourPage.value = false;
  198. fivePage.value = false;
  199. sixPage.value = false;
  200. } else if (val === 4) {
  201. onePage.value = false;
  202. twoPage.value = false;
  203. threePage.value = false;
  204. fourPage.value = true;
  205. fivePage.value = false;
  206. sixPage.value = false;
  207. } else if (val === 5) {
  208. onePage.value = false;
  209. twoPage.value = false;
  210. threePage.value = false;
  211. fourPage.value = false;
  212. fivePage.value = true;
  213. sixPage.value = false;
  214. } else if (val === 6) {
  215. onePage.value = false;
  216. twoPage.value = false;
  217. threePage.value = false;
  218. fourPage.value = false;
  219. fivePage.value = false;
  220. sixPage.value = true;
  221. }
  222. }
  223. detail()
  224. function dialogBeforeClose() {
  225. onePage.value = true;
  226. twoPage.value = false;
  227. threePage.value = false;
  228. fourPage.value = false;
  229. fivePage.value = false;
  230. sixPage.value = false
  231. senvenPage.value = false
  232. eightPage.value = false;
  233. }
  234. function jumpZY(item){
  235. router.push({
  236. path : '/xjc-integratedmachine/environment/pro_details_video',
  237. query :{
  238. id : item.id
  239. }
  240. })
  241. }
  242. </script>
  243. <style scoped lang="scss">
  244. p, div {
  245. margin: 0;
  246. padding: 0;
  247. }
  248. .pro_details_video {
  249. background: url('@/assets/images/environment/university-detail.png') no-repeat;
  250. background-size: 1920px 1080px;
  251. z-index: 10;
  252. width: 100%;
  253. height: 1080px;
  254. .page-content {
  255. width: 100%;
  256. position: absolute;
  257. top: 100px;
  258. bottom: 0;
  259. display: flex;
  260. justify-content: center;
  261. }
  262. .page-img-box {
  263. width: 1832px;
  264. height: 922px;
  265. margin-top: 13px;
  266. background: rgba(255, 255, 255, 0.4);
  267. border-radius: 35px 35px 35px 35px;
  268. display: flex;
  269. flex-direction: column;
  270. .top-content {
  271. width: 1832px;
  272. display: flex;
  273. justify-content: space-between;
  274. .top-content-left{
  275. width: 764px;
  276. height: 500px;
  277. background: #D9D9D9;
  278. border-radius: 5px 5px 5px 5px;
  279. margin-top:15px;
  280. margin-left: 34px;
  281. }
  282. .top-content-right {
  283. margin-left: 45px;
  284. width: 1782px;
  285. margin-left: 45px;
  286. //border: 1px solid;
  287. .title {
  288. font-weight: bold;
  289. font-size: 36px;
  290. color: #1E410E;
  291. line-height: 24px;
  292. }
  293. .school-level-box {
  294. display: flex;
  295. justify-content: left;
  296. .school-level {
  297. margin-right: 20px;
  298. width: 174px;
  299. height: 54px;
  300. background: #B3FC7C;
  301. border-radius: 5px 5px 5px 5px;
  302. font-weight: bold;
  303. font-size: 20px;
  304. color: #000000;
  305. line-height: 54px;
  306. text-align: center;
  307. }
  308. }
  309. .text-box {
  310. width: 1124px;
  311. p {
  312. margin-right: 20px;
  313. }
  314. }
  315. .right-top {
  316. display: flex;
  317. justify-content: space-between;
  318. align-items: center;
  319. .right-top-icon {
  320. width: 200px;
  321. height: 68px;
  322. display: flex;
  323. justify-content: space-between;
  324. margin-top: 24px;
  325. .item-img {
  326. display: flex;
  327. flex-direction: column;
  328. align-items: center;
  329. p {
  330. font-weight: 400;
  331. font-size: 20px;
  332. color: #515F6A;
  333. }
  334. img {
  335. width: 36px;
  336. height: 36px;
  337. }
  338. }
  339. }
  340. }
  341. }
  342. .info-box{
  343. //border: 1px solid;
  344. //margin-left: 33px;
  345. .title {
  346. height: 40px;
  347. border-left: 8px #8CE349 solid;
  348. margin-top: 33px;
  349. font-weight: 400;
  350. font-size: 28px;
  351. color: #333333;
  352. line-height: 40px;
  353. padding-left: 11px;
  354. }
  355. .answer{
  356. font-weight: 400;
  357. font-size: 20px;
  358. color: #333333;
  359. margin-top: 20px;
  360. margin-left: 20px;
  361. }
  362. }
  363. }
  364. }
  365. .bottom-content {
  366. margin-top: 10px;
  367. height: 500px;
  368. .tab-box {
  369. display: flex;
  370. padding-right: 279px;
  371. img {
  372. width: 36px;
  373. height: 36px;
  374. margin-right: 12px;
  375. }
  376. }
  377. .item-box {
  378. text-align: center;
  379. display: flex;
  380. justify-content: center;
  381. align-items: center;
  382. width: 202px;
  383. height: 65px;
  384. box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.09);
  385. border-radius: 5px 5px 0px 0px;
  386. font-weight: 400;
  387. font-size: 32px;
  388. color: #979797;
  389. }
  390. .item-box-active {
  391. text-align: center;
  392. color: #000000;
  393. background: #FFFFFF;
  394. font-weight: bold;
  395. font-size: 32px;
  396. display: flex;
  397. justify-content: center;
  398. align-items: center;
  399. width: 202px;
  400. height: 65px;
  401. background: #FFFFFF;
  402. box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.09);
  403. border-radius: 5px 5px 0px 0px;
  404. }
  405. }
  406. //.editor-content div,
  407. //.editor-content span,
  408. //.editor-content p,
  409. //.editor-content h1,
  410. //.editor-content h2,
  411. //.editor-content h3,
  412. //.editor-content h4,
  413. //.editor-content h5,
  414. //.editor-content h6 {
  415. // font-size: 26px !important;
  416. // line-height: 37px !important;
  417. //}
  418. .editor-content div,
  419. .editor-content span,
  420. .editor-content p {
  421. text-indent: 2em !important;
  422. text-align: left !important;
  423. }
  424. }
  425. .one-page {
  426. width: 1832px;
  427. height: 341px;
  428. background: #FFFFFF;
  429. border-radius: 0px 0px 35px 35px;
  430. border: 1px solid #FFFFFF;
  431. overflow: auto;
  432. line-height: 32px;
  433. padding-top: 10px;
  434. .title {
  435. height: 40px;
  436. border-left: 8px #8CE349 solid;
  437. margin-left: 33px;
  438. font-weight: 400;
  439. font-size: 28px;
  440. color: #333333;
  441. line-height: 40px;
  442. padding-left: 11px;
  443. }
  444. .info {
  445. text-indent: 2em;
  446. font-weight: 400;
  447. font-size: 28px;
  448. color: #333333;
  449. line-height: 40px;
  450. }
  451. .major{
  452. margin-top: 19px;
  453. font-weight: 400;
  454. font-size: 20px;
  455. color: #333333;
  456. display: flex;
  457. //justify-content: space-around;
  458. flex-wrap: wrap;
  459. .info-item{
  460. width: 244px;
  461. height: 80px;
  462. margin-left: 10px;
  463. background: #FFFFFF;
  464. border-radius: 5px 5px 5px 5px;
  465. border: 1px solid #A2F57F;
  466. font-weight: 400;
  467. font-size: 30px;
  468. padding-left: 10px;
  469. padding-right: 10px;
  470. color: #000000;
  471. line-height: 80px;
  472. text-align: center;
  473. margin-top: 14px;
  474. .info-text{
  475. margin-top: 19px;
  476. font-weight: 400;
  477. font-size: 20px;
  478. color: #333333;
  479. }
  480. }
  481. }
  482. .select-div {
  483. width: 100%;
  484. height: 100px;
  485. font-weight: 400;
  486. font-size: 30px;
  487. color: #333333;
  488. line-height: 40px;
  489. display: flex;
  490. justify-content: center;
  491. align-items: center;
  492. margin-bottom: 21px;
  493. .select-box {
  494. width: 300px;
  495. height: 90px;
  496. border: 1px solid #CCCCCC;
  497. line-height: 90px;
  498. text-align: center;
  499. margin-left: 10px;
  500. }
  501. .click-search {
  502. width: 170px;
  503. height: 90px;
  504. background: linear-gradient(180deg, #73EE71 0%, #0ACB63 100%);
  505. border-radius: 5px;
  506. font-weight: 400;
  507. font-size: 24px;
  508. color: #FFFFFF;
  509. margin-left: 20px;
  510. }
  511. }
  512. ::v-deep .el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th {
  513. height: 74px !important;
  514. font-size: 24px;
  515. color: #1E410E;
  516. }
  517. ::v-deep .el-table tr {
  518. height: 74px !important;
  519. font-size: 20px;
  520. }
  521. ::v-deep .el-dialog__title {
  522. font-size: 34px !important;
  523. }
  524. ::v-deep .el-dialog {
  525. margin-top: 0px !important;
  526. }
  527. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  528. font-size: 30px !important;
  529. }
  530. }
  531. .dict-dialog{
  532. max-width: 570px;
  533. height: 800px;
  534. overflow: auto;
  535. .dict-box {
  536. font-size: 24px;
  537. line-height: 34px;
  538. color: #333333;
  539. }
  540. }
  541. </style>