index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <div class="career-example-page" v-loading="pageLoading">
  3. <head-component :headinfo=headinfo></head-component>
  4. <div class="page-content">
  5. <div class="content-left">
  6. <p>{{exampleInfo.shortIntroduce}}</p>
  7. <p>{{exampleInfo.name}}:{{exampleInfo.type}}</p>
  8. <div class="left-main">
  9. <!-- <div class="img-box">-->
  10. <!--&lt;!&ndash; <img src="@/assets/images/wakeup/float-box.png" />&ndash;&gt;-->
  11. <!--&lt;!&ndash; <img :src= "`${baseUrl}`+ exampleInfo.picPath" />&ndash;&gt;-->
  12. <!-- </div>-->
  13. <div class="text-box" v-html="exampleInfo.introduce">
  14. </div>
  15. </div>
  16. </div>
  17. <div class="content-right">
  18. <div class="item-box" v-for="(item,index) in exampleData" @click="showInfo(item)">
  19. <img :src= "`${baseUrl}`+ item.picPath" />
  20. <div>{{item.name}}</div>
  21. <p >{{item.type}}</p>
  22. <p >{{item.shortIntroduce}}</p>
  23. </div>
  24. </div>
  25. <!-- <div class="content-box">-->
  26. <!-- </div>-->
  27. <!-- <div class="content-bottom">-->
  28. <!-- <div class="draw draggable-ball" @mousedown="startDrag" :style="{ left: position.x + 'px', top: position.y + 'px' }">-->
  29. <!-- <img src="@/assets/images/wakeup/float-box.png" />-->
  30. <!-- </div>-->
  31. <!-- <div class="ai-rabit">-->
  32. <!-- <div class="ai-rabit-text">-->
  33. <!-- 你好,同学欢迎进入生涯学习系统-->
  34. <!-- </div>-->
  35. <!-- <img src="@/assets/images/wakeup/ai-rabit.png" />-->
  36. <!-- </div>-->
  37. <!-- </div>-->
  38. </div>
  39. <el-dialog
  40. v-model="centerDialogVisible"
  41. destroy-on-close
  42. :title="videoName"
  43. width="1832px"
  44. height="915px"
  45. center
  46. @before-close="dialogBeforeClose"
  47. align-center
  48. >
  49. <div class="video-content">
  50. <video ref="videoPlayer" video preload="auto" autoplay muted controls width="1798" height="900" >
  51. <source :src="`${videoPath}`" type="video/ogg">
  52. </video>
  53. </div>
  54. </el-dialog>
  55. </div>
  56. </template>
  57. <script setup>
  58. import { reactive, onMounted } from 'vue';
  59. import {cinemaList, exampleList} from "@/api/xjc-integratedmachine/wakeup/index.js";
  60. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  61. const router = useRouter()
  62. const headinfo = ref({})
  63. const exampleData = ref({})
  64. const baseUrl = ref('https://www.shengyazhidao.com')
  65. const centerDialogVisible = ref(false)
  66. const videoPlayer = ref(null);
  67. const videoPath = ref(null);
  68. const videoName = ref(null);
  69. let pageLoading = ref(false)
  70. let exampleInfo = ref({
  71. })
  72. // const isDragging = ref(false)
  73. const offset = ref({ x: 0, y: 0 })
  74. const startX = ref(0)
  75. const startY = ref(0)
  76. function setHeadinfo(){
  77. headinfo.value = {
  78. title: '生涯榜样',
  79. user: {
  80. avatar: '头像路径',
  81. nickName: '张三'
  82. },
  83. backUrl : '/xjc-integratedmachine/wakeup/index'
  84. }
  85. }
  86. function jumpTo(path) {
  87. router.push({
  88. path: path,
  89. query: {name: 123}
  90. })
  91. }
  92. onMounted(() => {
  93. getExampleList();
  94. setHeadinfo();
  95. })
  96. //请求页面数据
  97. function getExampleList() {
  98. pageLoading = true;
  99. exampleList().then(res => {
  100. // console
  101. if(res.exampleList.length > 0){
  102. exampleInfo = res.exampleList[0];
  103. }
  104. exampleData.value = res.exampleList;
  105. pageLoading = false;
  106. }).catch((err)=>{
  107. console.log("error")
  108. pageLoading = false;
  109. })
  110. }
  111. function playVideo(filmPath,name) {
  112. centerDialogVisible.value = true;
  113. videoPath.value = filmPath
  114. videoName.value = name
  115. }
  116. function dialogBeforeClose(){
  117. videoPath.value = null;
  118. }
  119. function showInfo(val){
  120. exampleInfo.value = val;
  121. }
  122. </script>
  123. <style scoped lang="scss">
  124. p{
  125. margin: 0;
  126. padding: 0;
  127. }
  128. .career-example-page{
  129. background: url('@/assets/images/login/login-home-background.png') no-repeat;
  130. background-size: 1920px 1080px;
  131. z-index:10;
  132. width: 100%;
  133. height: 1080px;
  134. .page-content{
  135. width: 100%;
  136. position: absolute;
  137. top: 123px;
  138. bottom: 0;
  139. display: flex;
  140. justify-content: space-around;
  141. .content-left{
  142. width: 1290px;
  143. height: 919px;
  144. background: #FFFFFF;
  145. border-radius: 35px 35px 35px 35px;
  146. p:nth-child(1){
  147. font-weight: bold;
  148. font-size: 32px;
  149. color: #333333;
  150. line-height: 52px;
  151. margin-top: 28px;
  152. background: #EAFAFF;
  153. margin-left: 52px;
  154. }
  155. p:nth-child(2){
  156. font-weight: bold;
  157. font-size: 32px;
  158. color: #333333;
  159. //background: #EAFAFF;
  160. line-height: 52px;
  161. margin-left: 52px;
  162. }
  163. .left-main{
  164. display: flex;
  165. justify-content: space-around;
  166. .img-box{
  167. width: 361px;
  168. height: 459px;
  169. //border: 1px solid;
  170. margin-top: 26px;
  171. margin-left: 26px;
  172. img{
  173. width: 361px;
  174. height: 459px;
  175. }
  176. }
  177. .text-box{
  178. width: 1290px;
  179. height: 777px;
  180. font-weight: 400;
  181. font-size: 30px;
  182. color: #333333;
  183. line-height: 52px;
  184. //border: 1px solid;
  185. text-indent: 2em;
  186. overflow: auto;
  187. padding-right: 52px;
  188. padding-left: 52px;
  189. }
  190. }
  191. }
  192. .content-right{
  193. width: 521px;
  194. height: 910px;
  195. background: #FFFFFF;
  196. border-radius: 35px 35px 35px 35px;
  197. overflow: auto;
  198. .item-box{
  199. width: 470px;
  200. height: 370px;
  201. //border: 1px solid;
  202. background: #F8F8F8;
  203. margin: 17px auto;
  204. border-radius: 35px 35px 35px 35px;
  205. img{
  206. width: 115px;
  207. height: 115px;
  208. border-radius: 50%;
  209. //border: 1px solid;
  210. margin-left: 192px;
  211. margin-top: 28px;
  212. }
  213. p
  214. {
  215. font-weight: bold;
  216. font-size: 32px;
  217. color: #333333;
  218. line-height: 52px;
  219. padding-left: 10px;
  220. //background: #EAFAFF;
  221. }
  222. div{
  223. font-weight: bold;
  224. font-size: 32px;
  225. color: #333333;
  226. line-height: 52px;
  227. text-align: center;
  228. }
  229. //p:nth-child(1){
  230. // text-align:center;
  231. //}
  232. }
  233. .item-box:hover{
  234. background: #EAFAFF;
  235. }
  236. }
  237. }
  238. }
  239. //{
  240. // background: #EAFAFF;
  241. //}
  242. </style>