QuestionnaireTaskListPage.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <div class="main_container">
  3. <div class="questionnaire_card">
  4. <div class="title">{{ questionnaire.evaluationName }}</div>
  5. <div class="time_group">
  6. <span class="time">开始时间:{{ questionnaire.evaluationStartDatetime }}</span>
  7. <span class="time">结束时间:{{ questionnaire.evaluationEndDatetime }}</span>
  8. </div>
  9. <div class="operation">
  10. <el-button class="button_border" @click="GoEnter(questionnaire)">进入</el-button>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script setup lang="ts">
  16. import { onMounted, ref } from 'vue';
  17. import { useRouter } from 'vue-router';
  18. const router = useRouter()
  19. interface QuestionnaireData {
  20. id:string
  21. evaluationName:string //任务名称
  22. evaluationStartDatetime:string //任务开始时间
  23. evaluationEndDatetime:string //任务结束时间
  24. }
  25. // 问卷列表
  26. const questionnaire = ref<QuestionnaireData|{}>({})
  27. // 处理进入问卷逻辑
  28. const GoEnter = (row)=>{
  29. console.log(row.id)
  30. if(row.showSelectSubject){
  31. router.push('/app/questionnaireElectiveSubject')
  32. }else{
  33. router.push('/main/selfQuestionnaireProcess')
  34. }
  35. }
  36. onMounted(()=>{
  37. let userInfo = JSON.parse(localStorage.getItem('userInfo') || '{}')
  38. questionnaire.value = userInfo.evaluationBO
  39. })
  40. </script>
  41. <style lang="scss" scoped>
  42. .main_container{
  43. padding-bottom: calc(90 * var(--app-rpx)) !important;
  44. align-items: center;
  45. background-color: #ffffff !important;
  46. .questionnaire_card{
  47. margin-top: calc(92 * var(--app-rpx));
  48. display: flex;
  49. flex-direction: column;
  50. align-items: flex-start;
  51. width: calc(300 * var(--app-rpx));
  52. height: calc(400 * var(--app-rpx));
  53. padding:calc(40 * var(--app-rpx)) calc(20 * var(--app-rpx));
  54. background-image: url('@/assets/studentQuestionnaire/questionnaire_bg.png');
  55. background-repeat: no-repeat;
  56. background-size: 100% 100%;
  57. .title{
  58. font-weight: 600;
  59. font-size: calc(20 * var(--app-rpx));
  60. color: #FFFFFF;
  61. margin-bottom: calc(20 * var(--app-rpx));
  62. }
  63. .time_group{
  64. display: flex;
  65. flex-direction: column;
  66. gap: calc(10 * var(--app-rpx));
  67. font-weight: 400;
  68. font-size: calc(14 * var(--app-rpx));
  69. color: rgba(255,255,255,0.8);
  70. }
  71. .operation{
  72. flex: 1 1 ;
  73. width: 100%;
  74. display: flex;
  75. flex-direction: column;
  76. justify-content: flex-end;
  77. .button_border{
  78. :deep(>span){
  79. display: flex;
  80. align-items: center;
  81. justify-content: center;
  82. }
  83. width: 100%;
  84. height: calc(52 * var(--app-rpx));
  85. font-weight: 600;
  86. font-size: calc(18 * var(--app-rpx));
  87. color: #2E64FA;
  88. }
  89. }
  90. }
  91. }
  92. </style>