evaluation.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <template>
  2. <div class="evaluation" v-loading="pageLoading">
  3. <head-component :headinfo=headinfo></head-component>
  4. <div class="page-content">
  5. <div class="page-box">
  6. <div>
  7. <div class="tab-box">
  8. <div :class="[onePage?'item-box-active':'item-box']" @click="showPage(1)">数据汇总</div>
  9. {{ onePage }}
  10. <div :class="[twoPage?'item-box-active':'item-box']" @click="showPage(2)">生涯决策知识</div>
  11. {{ twoPage }}
  12. <div :class="[threePage?'item-box-active':'item-box']" @click="showPage(3)">生涯决策态度</div>
  13. {{ threePage }}
  14. </div>
  15. </div>
  16. <div class="one-page" v-show="onePage">
  17. <p class="maturity-text">生涯成熟度:<span>中等</span></p>
  18. <p class="text-info">
  19. 综合来看,你对生涯发展有一定认知,但心理准备不足,缺乏系统规划,面对生涯选择时容易迷茫,易受周围同学或家长影响,尚未形成稳定的生涯发展思路。
  20. </p>
  21. <div class="table-box">
  22. </div>
  23. </div>
  24. <div class="two-page" v-show="twoPage">112</div>
  25. <div class="three-page" v-show="threePage">11112</div>
  26. </div>
  27. </div>
  28. <el-dialog v-model="centerDialogVisible" :show-close="false" width="500" center>
  29. <span>
  30. {{ describeInfo }}
  31. </span>
  32. <template #footer>
  33. <div class="dialog-footer">
  34. <el-button type="primary" @click="centerDialogVisible = false">
  35. 关闭
  36. </el-button>
  37. </div>
  38. </template>
  39. </el-dialog>
  40. </div>
  41. </template>
  42. <script setup>
  43. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  44. import {Calendar} from '@element-plus/icons-vue'
  45. import {onMounted, reactive} from "vue";
  46. import {maturityReport} from "@/api/xjc-integratedmachine/wakeup/index.js";
  47. const headinfo = ref({})
  48. const describeInfo = ref('')
  49. let pageLoading = ref(false)
  50. function setHeadinfo() {
  51. headinfo.value = {
  52. title: '生涯唤醒学习系统',
  53. user: {
  54. avatar: '头像路径',
  55. nickName: '张三'
  56. },
  57. backUrl: '/xjc-integratedmachine/wakeup/career_recognize/index'
  58. }
  59. }
  60. const centerDialogVisible = ref(false)
  61. const onePage = ref(true)
  62. const twoPage = ref(false)
  63. const threePage = ref(false)
  64. const position = reactive({x: 10, y: 10});
  65. let isDragging = false;
  66. let originX, originY;
  67. const startDrag = (e) => {
  68. console.log("e", e)
  69. isDragging = true;
  70. originX = e.clientX - position.x;
  71. originY = e.clientY - position.y;
  72. console.log("originX", originX, originY, "originY")
  73. document.addEventListener('mousemove', onMouseMove);
  74. document.addEventListener('mouseup', stopDrag);
  75. };
  76. const onMouseMove = (e) => {
  77. if (isDragging) {
  78. position.x = e.clientX - originX;
  79. position.y = e.clientY - originY;
  80. console.log("position.x", position.x, "position.y", position.y)
  81. }
  82. };
  83. const stopDrag = () => {
  84. isDragging = false;
  85. document.removeEventListener('mousemove', onMouseMove);
  86. document.removeEventListener('mouseup', stopDrag);
  87. };
  88. const describe = (val) => {
  89. describeInfo.value = val;
  90. centerDialogVisible.value = true;
  91. };
  92. const showPage = (val) => {
  93. if (val === 1) {
  94. onePage.value = true;
  95. twoPage.value = false;
  96. threePage.value = false;
  97. } else if (val === 2) {
  98. onePage.value = false;
  99. twoPage.value = true;
  100. threePage.value = false;
  101. } else if (val === 3) {
  102. onePage.value = false;
  103. twoPage.value = false;
  104. threePage.value = true;
  105. }
  106. }
  107. //请求页面数据
  108. function getMaturityReport() {
  109. pageLoading = true;
  110. let id = "60f384a7-4970-44cb-a9da-0ce00519eee9"
  111. maturityReport({id :id }).then(res => {
  112. // console
  113. if(res.exampleList.length > 0){
  114. exampleInfo.value = res.exampleList[0];
  115. }
  116. exampleData.value = res.exampleList;
  117. pageLoading = false;
  118. }).catch((err)=>{
  119. console.log("error")
  120. pageLoading = false;
  121. })
  122. }
  123. onMounted(() => {
  124. setHeadinfo()
  125. getMaturityReport()
  126. })
  127. </script>
  128. <style scoped lang="scss">
  129. p {
  130. margin: 0;
  131. padding: 0;
  132. }
  133. .evaluation {
  134. background: url('@/assets/images/login/login-home-background.png') no-repeat;
  135. background-size: 1920px 1080px;
  136. z-index: 10;
  137. width: 100%;
  138. height: 1080px;
  139. .page-content {
  140. width: 100%;
  141. height: 980px;
  142. position: absolute;
  143. top: 100px;
  144. bottom: 0;
  145. }
  146. .page-box {
  147. width: 1832px;
  148. height: 910px;
  149. background: #FFFFFF;
  150. border-radius: 35px 35px 35px 35px;
  151. margin: 13px auto 0;
  152. padding-top: 25px;
  153. position: relative;
  154. overflow: auto;
  155. .tab-box {
  156. display: flex;
  157. justify-content: center;
  158. padding-left: 279px;
  159. padding-right: 279px;
  160. }
  161. .item-box {
  162. width: 422px;
  163. height: 136px;
  164. border: 1px dashed gray;
  165. text-align: center;
  166. line-height: 136px;
  167. font-weight: 400;
  168. font-size: 32px;
  169. margin-left: 3px;
  170. color: #A8A8A8;
  171. }
  172. .item-box-active {
  173. width: 422px;
  174. height: 136px;
  175. text-align: center;
  176. line-height: 136px;
  177. font-weight: 400;
  178. font-size: 32px;
  179. margin-left: 3px;
  180. color: #0088FF;
  181. background: #CFF7FF;
  182. border: 1px dashed gray;
  183. border-top: 3px solid #0088FF;
  184. }
  185. .one-page {
  186. .maturity-text{
  187. font-weight: bold;
  188. font-size: 32px;
  189. color: #333333;
  190. line-height: 52px;
  191. margin: 95px;
  192. }
  193. .text-info{
  194. font-weight: 400;
  195. font-size: 30px;
  196. color: #333333;
  197. line-height: 52px;
  198. }
  199. .table-box{
  200. width: 1525px;
  201. height: 720px;
  202. background: #C0E7FF;
  203. opacity: 0.2;
  204. margin-top: 26px;
  205. }
  206. }
  207. .one-page ,.two-page,.three-page{
  208. padding-left: 157px;
  209. padding-right: 157px;
  210. }
  211. }
  212. .fixed-box {
  213. width: 100%;
  214. height: 100px;
  215. position: absolute;
  216. bottom: 125px;
  217. }
  218. .content-bottom {
  219. width: 100%;
  220. height: 270px;
  221. display: flex;
  222. justify-content: space-between;
  223. position: relative;
  224. align-items: center;
  225. .draw {
  226. width: 109px;
  227. height: 170px;
  228. img {
  229. width: 109px;
  230. height: 170px;
  231. }
  232. }
  233. .ai-rabit {
  234. position: absolute;
  235. right: -27px;
  236. display: flex;
  237. align-items: center;
  238. .ai-rabit-text {
  239. width: 345px;
  240. height: 89px;
  241. background: #E8EEF7;
  242. font-weight: 300;
  243. margin-bottom: 20px;
  244. font-size: 22px;
  245. color: #000000;
  246. padding: 16px;
  247. border-radius: 24px 24px 24px 24px;
  248. }
  249. img {
  250. width: 178px;
  251. height: 270px;
  252. }
  253. }
  254. }
  255. .draggable-ball {
  256. position: absolute;
  257. cursor: pointer;
  258. user-select: none; /* 防止拖拽时选中文字 */
  259. }
  260. ::v-deep .el-dialog {
  261. width: 632px;
  262. height: 343px;
  263. }
  264. ::v-deep .el-dialog--center .el-dialog__body {
  265. font-weight: 400;
  266. font-size: 30px;
  267. color: #000000;
  268. padding: 30px;
  269. height: 192px;
  270. }
  271. .el-button--primary {
  272. width: 136px;
  273. height: 60px;
  274. font-weight: 400;
  275. font-size: 24px;
  276. color: #FFFFFF;
  277. background: #35badd;
  278. }
  279. ::v-deep .el-tabs--border-card > .el-tabs__header .el-tabs__item {
  280. width: 422px;
  281. height: 136px;
  282. color: #A8A8A8;
  283. }
  284. ::v-deep .el-tabs--border-card > .el-tabs__header .el-tabs__item .is-active {
  285. background-color: #CFF7FF;
  286. color: #266EFF;
  287. }
  288. }
  289. </style>