ScaleMid.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. <script setup lang="ts">
  2. import CpmdHeader from '@/components/CpmdHeader.vue';
  3. import { onMounted, onUnmounted, ref } from 'vue'
  4. import { Check } from '@element-plus/icons-vue'
  5. import { number } from 'echarts';
  6. import { ElMessage } from 'element-plus';
  7. import { useRouter, useRoute } from 'vue-router';
  8. const router = useRouter()
  9. const route = useRoute()
  10. //持久化设置 菜单状态
  11. // import { menuStatusStore } from '@/stores'
  12. // const menuStatus = menuStatusStore();
  13. // menuStatus.saveActiveIndex('3')
  14. //当前量表是否已经提交
  15. const isCompleted = ref<boolean>(true)
  16. const flag = ref<string>('')
  17. const flagName = ref<string>('')
  18. const planId = ref<string>('')
  19. const planName = ref<string>('')
  20. const num = ref<string>('')
  21. //当前题的对象
  22. //点击跳转到下一列表
  23. const subScaleData = () => {
  24. }
  25. //返回计划列表
  26. const goBackList = () => {
  27. router.push({ name: 'plan' })
  28. }
  29. //跳转到下一个任务
  30. const nextTask = () => {
  31. if (num.value == '1') {
  32. router.push({
  33. name: 'scale', params: {
  34. planId: planId.value,
  35. planName: planName.value,
  36. flag: flag.value,
  37. flagName: flagName.value,
  38. num: '2'
  39. }
  40. })
  41. }
  42. if (num.value == '2') {
  43. router.push({
  44. name: 'cognize', params: {
  45. planId: planId.value,
  46. planName: planName.value,
  47. flag: flag.value,
  48. flagName: flagName.value,
  49. num: '3'
  50. }
  51. })
  52. }
  53. if (num.value == '3') {
  54. router.push({
  55. name: 'cognize', params: {
  56. planId: planId.value,
  57. planName: planName.value,
  58. flag: flag.value,
  59. flagName: flagName.value,
  60. num: '4'
  61. }
  62. })
  63. }
  64. if (num.value == '4') {
  65. //跳转到测试记录页面
  66. router.push({
  67. name: 'testRecord'
  68. })
  69. }
  70. }
  71. //跳转到下一个任务
  72. //刚进入页面就将高度设置为页面需要的
  73. onMounted(() => {
  74. flag.value = route.params.flag as string;
  75. planId.value = route.params.planId as string
  76. planName.value = route.params.planName as string
  77. flagName.value = route.params.flagName as string
  78. num.value = route.params.num as string
  79. //进到界面开始轮询
  80. })
  81. //界面销毁函数
  82. //轮旋切换页面的方法
  83. //退出页面销毁 方法
  84. onUnmounted(() => {
  85. })
  86. </script>
  87. <template>
  88. <div class="home_header_out">
  89. <div class=" home_header_inner">
  90. <CpmdHeader />
  91. <div class="report_top">
  92. <div class="report_jt">
  93. <span v-show="isCompleted">心灵万花筒测试完成</span>
  94. <span v-show="isCompleted" class="des">以上测试已完成,请选择进行下一个测试或返回任务。</span>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="kply">
  99. <div class="kply_inner" :style="{ border: isCompleted ? '8px solid #ffffff' : '8px solid #B2F2D2' }">
  100. <div style="padding :20px 40px">
  101. <div v-show="isCompleted" class="finish_calss">
  102. <div class="finish_img">
  103. <img width="30%" src="../assets/scale/complete.png" />
  104. <div class="finish_font">测试已完成</div>
  105. </div>
  106. <div class="scale_button">
  107. <el-row>
  108. <el-col :span="12" class="scale_button_inner">
  109. <div class="scale_button_self" @click="goBackList">返回计划列表
  110. </div>
  111. </el-col>
  112. <el-col :span="12" class="scale_button_inner">
  113. <div class="scale_button_self" v-show="num != '4'" @click="nextTask">
  114. &nbsp;下一个任务&nbsp;
  115. </div>
  116. <div class="scale_button_self" v-show="num == '4'" @click="nextTask">
  117. &nbsp;下一个任务&nbsp;
  118. </div>
  119. </el-col>
  120. </el-row>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </template>
  128. <style lang="scss" scoped>
  129. :deep(.el-progress-bar__outer) {
  130. background-color: #ffffff;
  131. border-radius: 100px;
  132. height: 6px;
  133. overflow: hidden;
  134. position: relative;
  135. vertical-align: middle;
  136. }
  137. :deep(.el-radio-group) {
  138. align-items: center;
  139. display: flex;
  140. flex-wrap: wrap;
  141. font-size: 0;
  142. flex-direction: column;
  143. }
  144. :deep(.el-radio-button) {
  145. display: inline-block;
  146. outline: none;
  147. position: relative;
  148. width: 80% !important;
  149. }
  150. :deep(.el-radio-button__inner) {
  151. width: 100%;
  152. border-radius: 40px !important;
  153. margin-top: 30px;
  154. border: 10px solid #B2F2D2;
  155. border-left: 10px solid #B2F2D2 !important;
  156. padding: 20px 20px;
  157. font-size: 20px;
  158. font-weight: 700;
  159. text-align: left;
  160. }
  161. :deep(.el-radio-button__inner:hover) {
  162. width: 100%;
  163. border-radius: 40px !important;
  164. margin-top: 30px;
  165. border: 10px solid #B2F2D2;
  166. border-left: 10px solid #B2F2D2 !important;
  167. padding: 20px 20px;
  168. font-size: 20px;
  169. font-weight: 700;
  170. text-align: left;
  171. color: #000000;
  172. background-color: #48D68E;
  173. color: #ffffff;
  174. }
  175. :deep().el-radio-button__original-radio:checked+.el-radio-button__inner {
  176. background-color: #48D68E;
  177. border-color: #B2F2D2;
  178. box-shadow: 0 0 0 0 var(--el-radio-button-checked-border-color, var(--el-color-primary));
  179. color: var(--el-radio-button-checked-text-color, var(--el-color-white));
  180. }
  181. .home_header_out {
  182. // position: relative;
  183. padding-bottom: 60px;
  184. width: 100%;
  185. min-width: 1200px;
  186. background-image: url('../assets/home/bg_ty.png');
  187. background-repeat: no-repeat;
  188. background-size: contain;
  189. background-color: #FAFAFA; //估计是需要动态
  190. //获取屏幕宽度home_header_out 这个div的宽度--然后宽度*1000再除1920即为当前div的宽度
  191. .home_header_inner {
  192. min-height: 1;
  193. left: 0;
  194. right: 0;
  195. margin: auto;
  196. // height: 100px;
  197. width: 1200px;
  198. .report_top {
  199. margin-top: 50px;
  200. display: flex;
  201. flex-direction: row;
  202. justify-content: space-between;
  203. align-items: center;
  204. margin-bottom: 40px;
  205. .xlts_img {
  206. margin-right: 100px;
  207. width: 200px;
  208. }
  209. .report_jt {
  210. display: flex;
  211. flex-direction: column;
  212. font-size: 50px;
  213. font-weight: 700;
  214. letter-spacing: 3px;
  215. .des {
  216. color: #888888;
  217. // opacity: 0.4;
  218. font-size: 20px;
  219. letter-spacing: 0px;
  220. margin-top: 10px;
  221. }
  222. }
  223. }
  224. }
  225. .kply {
  226. width: 100%;
  227. margin-top: 40px;
  228. // background-color: #FAFAFA;
  229. .kply_inner {
  230. // border: 8px solid #B2F2D2;
  231. min-height: 500px;
  232. left: 0;
  233. right: 0;
  234. margin: auto;
  235. width: 1200px;
  236. // padding: 20px 20px;
  237. background-color: #ffffff;
  238. border-radius: 40px;
  239. .scale_title {
  240. margin-top: 20px;
  241. font-size: 35px;
  242. letter-spacing: 4px;
  243. line-height: 60px;
  244. .scale_radio_group {
  245. display: flex;
  246. flex-direction: column;
  247. }
  248. }
  249. .scale_button {
  250. margin-top: 60px;
  251. margin-bottom: 20px;
  252. .scale_button_inner {
  253. text-align: center;
  254. display: flex;
  255. justify-content: center;
  256. .scale_button_self {
  257. border-radius: 12px;
  258. border: 3px solid #48D68E;
  259. color: #ffffff;
  260. background-color: #000000;
  261. margin-right: 20px;
  262. padding: 10px 90px;
  263. cursor: pointer;
  264. display: flex;
  265. align-items: center;
  266. font-size: 24px;
  267. }
  268. }
  269. }
  270. .finish_calss {
  271. display: flex;
  272. flex-direction: column;
  273. .finish_img {
  274. margin-top: 60px;
  275. display: flex;
  276. flex-direction: column;
  277. align-items: center;
  278. .finish_font {
  279. margin-top: 40px;
  280. font-size: 30px;
  281. margin-bottom: 100px;
  282. }
  283. }
  284. }
  285. }
  286. }
  287. }
  288. .home_mid {
  289. // background-color: blanchedalmond;
  290. width: 1200px;
  291. left: 0;
  292. right: 0;
  293. margin: auto;
  294. margin-top: 40px;
  295. // position: relative;
  296. .kepu_title {
  297. text-align: center;
  298. font-size: 50px;
  299. color: #111111;
  300. line-height: 95px;
  301. // width: 100%;
  302. // left: 0;
  303. // right: 0;
  304. // margin: auto
  305. }
  306. .kepu_title_sub {
  307. margin-top: 30px;
  308. text-align: center;
  309. font-size: 28px;
  310. color: #48D68E;
  311. line-height: 26px;
  312. }
  313. .man1_group {
  314. margin-top: 60px;
  315. height: 100%;
  316. display: flex;
  317. .man1 {
  318. position: relative;
  319. width: 327px;
  320. // height: 100%;
  321. // height: 100%
  322. .man1_img {
  323. position: absolute;
  324. bottom: 0;
  325. /* bottom: 0px; */
  326. /* height: auto; */
  327. width: 100%;
  328. left: 100px
  329. }
  330. }
  331. .des {
  332. border: #48D68E solid 5px;
  333. border-radius: 40px;
  334. padding: 20px;
  335. letter-spacing: 6px;
  336. flex: 1;
  337. .des_inner {
  338. border: 1px dashed #48D68E;
  339. border-radius: 40px;
  340. padding-bottom: 40px;
  341. padding-top: 30px;
  342. padding-left: 100px;
  343. padding-right: 20px;
  344. letter-spacing: 6px;
  345. font-weight: normal;
  346. font-size: 24px;
  347. color: #333333;
  348. line-height: 40px;
  349. }
  350. }
  351. }
  352. .man2_group {
  353. margin-top: 60px;
  354. height: 100%;
  355. display: flex;
  356. .man2 {
  357. position: relative;
  358. width: 327px;
  359. // height: 100%;
  360. // height: 100%
  361. .man2_img {
  362. position: absolute;
  363. bottom: 0;
  364. /* bottom: 0px; */
  365. /* height: auto; */
  366. width: 100%;
  367. left: -100px
  368. }
  369. }
  370. .des2 {
  371. border: #48D68E solid 5px;
  372. border-radius: 40px;
  373. padding: 20px;
  374. letter-spacing: 6px;
  375. flex: 1;
  376. .des2_inner {
  377. border: 1px dashed #48D68E;
  378. border-radius: 40px;
  379. padding-bottom: 40px;
  380. padding-top: 30px;
  381. padding-left: 20px;
  382. padding-right: 100px;
  383. letter-spacing: 6px;
  384. font-weight: normal;
  385. font-size: 24px;
  386. color: #333333;
  387. line-height: 40px;
  388. }
  389. }
  390. }
  391. .get_more {
  392. text-align: center;
  393. img {
  394. width: 300px;
  395. margin-top: 60px;
  396. margin-bottom: 60px;
  397. }
  398. }
  399. }
  400. // .home_footer_out {
  401. // width: 100%;
  402. // background-color: #000000;
  403. // }</style>