index.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <template>
  2. <div class="development_stage">
  3. <head-component :headinfo=headinfo></head-component>
  4. <div class="page-content">
  5. <div class="page-box">
  6. <!-- <p class="text-info">请通过回顾过去和设想未来,绘制您自己的生涯彩虹图。请依次选择以下6种角色,并分别针对每种角色设置年龄段及在该年龄段的精力投入程度。</p>-->
  7. <!-- <div class="page-main">-->
  8. <!-- <div class="page-left">-->
  9. <!-- </div>-->
  10. <!-- <div class="page-right">-->
  11. <!-- <div class="page-right-top">-->
  12. <!-- <div class="color-box">-->
  13. <!-- <p class="box-left" style="background: #FFC300;"></p>-->
  14. <!-- <p class="box-label">子女身份</p>-->
  15. <!-- </div>-->
  16. <!-- <div class="color-box">-->
  17. <!-- <p class="box-left" style="background: #F72585"></p>-->
  18. <!-- <p class="box-label">学生身份</p>-->
  19. <!-- </div>-->
  20. <!-- <div class="color-box" >-->
  21. <!-- <p class="box-left" style="background: #4CC9F0"></p>-->
  22. <!-- <p class="box-label">休闲者身份</p>-->
  23. <!-- </div>-->
  24. <!-- <div class="color-box">-->
  25. <!-- <p class="box-left" style="background: #A000FF"></p>-->
  26. <!-- <p class="box-label">公民身份</p>-->
  27. <!-- </div>-->
  28. <!-- <div class="color-box">-->
  29. <!-- <p class="box-left" style="background: #FFC9F6"></p>-->
  30. <!-- <p class="box-label">工作者身份</p>-->
  31. <!-- </div>-->
  32. <!-- <div class="color-box">-->
  33. <!-- <p class="box-left" style="background: #9DE617"></p>-->
  34. <!-- <p class="box-label">持家者身份</p>-->
  35. <!-- </div>-->
  36. <!-- </div>-->
  37. <!-- <div class="page-right-btn-group">-->
  38. <!-- <div class="eraser-box">-->
  39. <!-- &lt;!&ndash; <img src="@/assets/images/wakeup/rainbow/eraser-shadom.png">&ndash;&gt;-->
  40. <!-- <img src="@/assets/images/wakeup/rainbow/eraser.png">-->
  41. <!-- </div>-->
  42. <!-- <img class="img-btn" src="@/assets/images/wakeup/rainbow/clear.png">-->
  43. <!-- <img class="img-btn" src="@/assets/images/wakeup/rainbow/Drawing-completed.png">-->
  44. <!-- <img class="img-btn" src="@/assets/images/wakeup/rainbow/seed-email.png">-->
  45. <!-- <img class="img-btn" src="@/assets/images/wakeup/rainbow/save-btn.png">-->
  46. <!-- </div>-->
  47. <!-- </div>-->
  48. <!-- </div>-->
  49. <!-- &lt;!&ndash; 下一步&ndash;&gt;-->
  50. <!-- <div class="img-box" >-->
  51. <!-- <img src="@/assets/images/wakeup/knowledge_explanation-button1.png" @click="jumpTo('/xjc-integratedmachine/wakeup/rainbow/index')">-->
  52. <!-- </div>-->
  53. <!-- &lt;!&ndash; 机器人&ndash;&gt;-->
  54. <!-- <div class="fixed-box">-->
  55. <!-- <div class="content-bottom">-->
  56. <!-- <div class="draw draggable-ball" @mousedown="startDrag" :style="{ left: position.x + 'px', top: position.y + 'px' }">-->
  57. <!-- <img src="@/assets/images/wakeup/float-box.png" />-->
  58. <!-- </div>-->
  59. <!-- <div class="ai-rabit">-->
  60. <!-- <img src="@/assets/images/wakeup/ai-rabit.png" />-->
  61. <!-- </div>-->
  62. <!-- </div>-->
  63. <!-- </div>-->
  64. </div>
  65. </div>
  66. </div>
  67. </template>
  68. <script setup>
  69. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  70. import {onMounted, reactive} from "vue";
  71. const headinfo = ref({})
  72. const router = useRouter()
  73. function setHeadinfo(){
  74. headinfo.value = {
  75. title: '生涯彩虹图',
  76. user: {
  77. avatar: '头像路径',
  78. nickName: '张三'
  79. },
  80. backUrl : '/xjc-integratedmachine/wakeup/rainbow/knowledge_explanation_1'
  81. }
  82. }
  83. const position = reactive({ x: 10, y: 10 });
  84. let isDragging = false;
  85. let originX, originY;
  86. function jumpTo(path) {
  87. console.log(path)
  88. router.push({
  89. path: path,
  90. query: {name: 123}
  91. })
  92. }
  93. const startDrag = (e) => {
  94. console.log("e",e)
  95. isDragging = true;
  96. originX = e.clientX - position.x;
  97. originY = e.clientY - position.y;
  98. console.log("originX",originX,originY,"originY")
  99. document.addEventListener('mousemove', onMouseMove);
  100. document.addEventListener('mouseup', stopDrag);
  101. };
  102. const onMouseMove = (e) => {
  103. if (isDragging) {
  104. position.x = e.clientX - originX;
  105. position.y = e.clientY - originY;
  106. console.log("position.x",position.x,"position.y",position.y)
  107. }
  108. };
  109. const stopDrag = () => {
  110. isDragging = false;
  111. document.removeEventListener('mousemove', onMouseMove);
  112. document.removeEventListener('mouseup', stopDrag);
  113. };
  114. onMounted(() => {
  115. setHeadinfo()
  116. })
  117. </script>
  118. <style scoped lang="scss">
  119. p{
  120. margin: 0;
  121. padding: 0;
  122. }
  123. .development_stage{
  124. background: url('@/assets/images/login/login-home-background.png') no-repeat;
  125. background-size: 1920px 1080px;
  126. z-index:10;
  127. width: 100%;
  128. height: 1080px;
  129. .page-content {
  130. width: 100%;
  131. height: 980px;
  132. position: absolute;
  133. top: 100px;
  134. bottom: 0;
  135. }
  136. .page-box{
  137. width: 1832px;
  138. height: 910px;
  139. background: black;
  140. border-radius: 35px 35px 35px 35px;
  141. margin: 13px auto 0;
  142. padding-top: 25px;
  143. position: relative;
  144. .text-info{
  145. font-weight: bold;
  146. font-size: 28px;
  147. color: #333333;
  148. line-height: 46px;
  149. padding: 0 150px;
  150. //text-align: center;
  151. text-indent: 2em;
  152. }
  153. .page-main{
  154. width:1546px;
  155. height: 681px;
  156. //border: 1px solid;
  157. margin: 12px auto;
  158. background: url('@/assets/images/wakeup/rainbow/backgroud-rainbow.png') no-repeat;
  159. background-size: 1546px 681px;
  160. display: flex;
  161. justify-content: space-between;
  162. .page-left{
  163. width: 1273px;
  164. height: 571px;
  165. background: #000000;
  166. border-radius: 10px 10px 10px 10px;
  167. margin-left: 26px;
  168. //border: #FFFFFF 1px solid;
  169. margin-top: 95px;
  170. background: url('@/assets/images/wakeup/rainbow/rainbow-border.png') no-repeat;
  171. background-size:1200px 500px;
  172. //border: 1px solid #FFFFFF;
  173. }
  174. .page-right{
  175. width: 250px;
  176. height: 681px;
  177. //border: 1px solid #FFFFFF;
  178. margin-right: 26px;
  179. .page-right-top{
  180. width: 250px;
  181. height:260px;
  182. //border: 1px solid white;
  183. .color-box:nth-child(1){
  184. margin-top: 24px;
  185. }
  186. .color-box{
  187. //border: 1px solid white;
  188. display: flex;
  189. justify-content: center;
  190. align-items: center;
  191. margin-top: 10px;
  192. .box-left{
  193. width: 53px;
  194. height: 25px;
  195. background: #FFC300;
  196. border-radius: 10px 10px 10px 10px;
  197. //border: 1px solid white;
  198. }
  199. .box-label{
  200. width: 122px;
  201. font-weight: 400;
  202. font-size: 20px;
  203. color: #FFFFFF;
  204. margin-left: 10px;
  205. }
  206. }
  207. }
  208. .page-right-btn-group{
  209. display: flex;
  210. flex-direction: column;
  211. justify-content: center;
  212. align-items: center;
  213. .img-btn{
  214. width: 170px;
  215. height: 54px;
  216. margin-top: 20px;
  217. }
  218. .eraser-box{
  219. width: 165px;
  220. height: 50px;
  221. background: url('@/assets/images/wakeup/rainbow/eraser-shadom.png') no-repeat;
  222. background-size: 163px 47px;
  223. position: relative;
  224. img{
  225. width: 165px;
  226. height: 83px;
  227. position: absolute;
  228. top: -33px;
  229. left: 10px;
  230. }
  231. }
  232. }
  233. }
  234. }
  235. }
  236. .img-box{
  237. width: 100%;
  238. height: 100px;
  239. display: flex;
  240. justify-content: center;
  241. align-items: center;
  242. margin-top: 6px;
  243. z-index:10;
  244. img{
  245. width: 244px;
  246. height: 92px;
  247. z-index:10;
  248. }
  249. }
  250. .fixed-box{
  251. width: 100%;
  252. height: 100px;
  253. position: absolute;
  254. bottom: 125px;
  255. }
  256. .content-bottom{
  257. width: 100%;
  258. height: 270px;
  259. display: flex;
  260. justify-content: space-between;
  261. position: relative;
  262. align-items: center;
  263. .draw{
  264. width: 109px;
  265. height: 170px;
  266. img{
  267. width: 109px;
  268. height: 170px;
  269. }
  270. }
  271. .ai-rabit{
  272. position: absolute;
  273. right: -27px;
  274. //top: -271px;
  275. display: flex;
  276. align-items: center;
  277. .ai-rabit-text{
  278. width: 345px;
  279. height: 89px;
  280. background: #E8EEF7;
  281. font-weight: 300;
  282. margin-bottom: 20px;
  283. font-size: 22px;
  284. color: #000000;
  285. padding:16px;
  286. border-radius: 24px 24px 24px 24px;
  287. }
  288. img{
  289. width: 178px;
  290. height: 270px;
  291. }
  292. }
  293. }
  294. .draggable-ball {
  295. position: absolute;
  296. cursor: pointer;
  297. user-select: none; /* 防止拖拽时选中文字 */
  298. }
  299. }
  300. </style>