index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div class="maturity-game-page">
  3. <head-component :headinfo=headinfo></head-component>
  4. <div class="page-content">
  5. <div class="top">
  6. <img src="@/assets/images/wakeup/maturity/maturity-game-title.png" >
  7. </div>
  8. <div class="bottom">
  9. <img src="@/assets/images/wakeup/maturity/maturity-game-left.png" @click="jumpTo('/xjc-integratedmachine/wakeup/career_maturity/knowledge_explanation')">
  10. <img src="@/assets/images/wakeup/maturity/maturity-game-right.png" @click="jumpTo('/xjc-integratedmachine/wakeup/career_maturity/evaluation')">
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script setup>
  16. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  17. const router = useRouter()
  18. const headinfo = ref({})
  19. const draggedItem = ref(null);
  20. function dragStart(event) {
  21. draggedItem.value = event.target;
  22. }
  23. function drop(event) {
  24. event.preventDefault(); // 防止默认处理(例如打开链接)
  25. if (event.target !== draggedItem.value) {
  26. const target = event.target; // 获取放置的目标元素
  27. const item = draggedItem.value; // 获取被拖拽的元素
  28. // 交换位置或进行其他操作
  29. item.parentNode.insertBefore(item, target); // 将被拖拽的元素插入到目标元素之前
  30. }
  31. }
  32. function setHeadinfo(){
  33. headinfo.value = {
  34. title: '生涯唤醒学习系统',
  35. user: {
  36. avatar: '头像路径',
  37. nickName: '张三'
  38. },
  39. backUrl : '/index'
  40. }
  41. }
  42. function jumpTo(path) {
  43. router.push({
  44. path: path,
  45. query: {name: 123}
  46. })
  47. }
  48. onMounted(() => {
  49. setHeadinfo()
  50. })
  51. </script>
  52. <style scoped lang="scss">
  53. .maturity-game-page{
  54. background: url('@/assets/images/wakeup/maturity/maturity-game-bg.png') no-repeat;
  55. background-size: 1920px 1080px;
  56. z-index:10;
  57. width: 100%;
  58. height: 1080px;
  59. .page-content{
  60. width: 100%;
  61. position: absolute;
  62. top: 123px;
  63. bottom: 0;
  64. .top{
  65. width: 100%;
  66. height: 212px;
  67. display: flex;
  68. justify-content: center;
  69. margin-top: 104px;
  70. img{
  71. width: 864px;
  72. height: 212px;
  73. }
  74. }
  75. .bottom{
  76. width: 100%;
  77. height: 248px;
  78. display: flex;
  79. justify-content: space-around;
  80. margin-top:186px;
  81. img{
  82. width: 398px;
  83. height: 248px;
  84. }
  85. }
  86. }
  87. }
  88. </style>