backgroundSurveyIntro.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="intro-page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title="填写问卷"></cus-header>
  4. <view class="intro-card adffcac">
  5. <view class="intro-stage">阶段 {{stage === 'background' ? '一' : '二'}}</view>
  6. <view class="intro-title">{{stageTitle}}</view>
  7. <view class="intro-line"></view>
  8. <view class="intro-description">{{description}}</view>
  9. <view class="intro-count">{{questionCount}}</view>
  10. <view class="zt_btn intro-button" @click="start">{{buttonText}}</view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import CusHeader from '@/components/CusHeader/index.vue'
  16. import backgroundSurveyRules from '@/utils/backgroundSurvey.js'
  17. const { questionnaireFillUrl } = backgroundSurveyRules
  18. export default {
  19. components:{ CusHeader },
  20. data(){
  21. return {
  22. stage:'background',
  23. teamQuestionnaireId:'',
  24. teamId:'',
  25. type:'',
  26. turnType:'',
  27. title:''
  28. }
  29. },
  30. computed:{
  31. stageTitle(){
  32. return this.stage === 'background'
  33. ? '团队背景调研'
  34. : 'PERILL团队发展动态评估'
  35. },
  36. description(){
  37. return this.stage === 'background'
  38. ? '请根据您对团队当前状态的真实认知完成选择。如果没有符合的选项,可在“其他”中填写自己的理解。'
  39. : '请继续完成PERILL专业评估。所有信息将被严格保密,并仅用于团队评估分析。'
  40. },
  41. questionCount(){
  42. return this.stage === 'background' ? '共5道单选题' : '共36道专业评估题'
  43. },
  44. buttonText(){
  45. return this.stage === 'background' ? '开始背景调研' : '开始PERILL评估'
  46. }
  47. },
  48. onLoad(options){
  49. this.stage = options.stage || 'background'
  50. this.teamQuestionnaireId = options.teamQuestionnaireId || ''
  51. this.teamId = options.teamId || ''
  52. this.type = options.type || ''
  53. this.turnType = options.turnType || ''
  54. this.title = options.title || ''
  55. },
  56. methods:{
  57. start(){
  58. const params = {
  59. teamQuestionnaireId:this.teamQuestionnaireId,
  60. teamId:this.teamId,
  61. type:this.type,
  62. turnType:this.turnType,
  63. title:this.title
  64. }
  65. if(this.stage === 'background'){
  66. uni.navigateTo({
  67. url:`/pagesPublish/backgroundSurvey?mode=member&teamQuestionnaireId=${encodeURIComponent(this.teamQuestionnaireId)}&teamId=${encodeURIComponent(this.teamId)}&type=${encodeURIComponent(this.type)}&turnType=${encodeURIComponent(this.turnType)}&title=${encodeURIComponent(this.title)}`
  68. })
  69. return
  70. }
  71. uni.navigateTo({ url:questionnaireFillUrl(params) })
  72. }
  73. }
  74. }
  75. </script>
  76. <style scoped lang="scss">
  77. .intro-page{
  78. background:#F7F7F7;
  79. box-sizing:border-box;
  80. padding:40rpx 28rpx;
  81. }
  82. .intro-card{
  83. background:#FFFFFF;
  84. border-radius:28rpx;
  85. margin-top:60rpx;
  86. padding:70rpx 42rpx 50rpx;
  87. text-align:center;
  88. }
  89. .intro-stage{
  90. font-size:26rpx;
  91. color:#199C9C;
  92. background:#EAF8F8;
  93. border-radius:28rpx;
  94. padding:12rpx 28rpx;
  95. }
  96. .intro-title{
  97. font-size:40rpx;
  98. color:#002846;
  99. font-weight:bold;
  100. line-height:56rpx;
  101. margin-top:34rpx;
  102. }
  103. .intro-line{width:80rpx;height:6rpx;background:#FFD750;border-radius:4rpx;margin-top:28rpx;}
  104. .intro-description{font-size:28rpx;color:#667E90;line-height:48rpx;margin-top:36rpx;text-align:left;}
  105. .intro-count{font-size:30rpx;color:#335368;margin-top:36rpx;}
  106. .intro-button{width:100%;margin-top:70rpx;}
  107. </style>