index3.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div class="li_box">
  3. <div class="lb_title">
  4. {{index+1}}. {{item.question}}
  5. </div>
  6. <div class="lb_card">
  7. <div class="lb_box" v-for="(ua,ui) in item.userAnswer" :key="ui">
  8. <div class="memo">{{assessmentMethodCfg[ua.assessmentMethod]|''}}</div>
  9. <div class="lb_answers">
  10. <u-radio-group
  11. :value="ua.answer"
  12. placement="column"
  13. @change="e=>radioChange(e,ua.assessmentMethod,item.id)"
  14. >
  15. <view class="la_item" v-for="(pre,idx) in ua.questionOption" :key="idx">
  16. <u-radio
  17. :label="pre.questionOption"
  18. :name="pre.questionOption"
  19. activeColor="#833478"
  20. size="36rpx"
  21. iconSize="32rpx"
  22. labelSize="32rpx"
  23. ></u-radio>
  24. </view>
  25. </u-radio-group>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. name: "QuestionItem",
  34. props: {
  35. item: {
  36. type: Object,
  37. required: true
  38. },
  39. index: {
  40. type: Number,
  41. required: true
  42. }
  43. },
  44. data(){
  45. return {
  46. assessmentMethodCfg:{
  47. '1':'您对团队当前在此项陈述上所描述的实际表现的同意程度为:',
  48. '2':'此项陈述对该团队当前的重要性: '
  49. }
  50. }
  51. },
  52. methods: {
  53. radioChange(value,assessmentMethod,id) {
  54. this.$emit('change', {
  55. value,
  56. assessmentMethod,
  57. id,
  58. index: this.index
  59. });
  60. }
  61. }
  62. }
  63. </script>
  64. <style scoped lang="less">
  65. .li_box{
  66. .lb_title{
  67. font-family: PingFang-SC, PingFang-SC;
  68. font-weight: bold;
  69. font-size: 32rpx;
  70. color: #002846;
  71. line-height: 48rpx;
  72. }
  73. .lb_card{
  74. background: #F8F4F8;
  75. border-radius: 24rpx;
  76. padding: 0 24rpx 40rpx;
  77. overflow: hidden;
  78. margin-top: 32rpx;
  79. }
  80. .lb_box{
  81. margin-top: 40rpx;
  82. .memo{
  83. font-family: PingFangSC, PingFang SC;
  84. font-weight: 400;
  85. font-size: 24rpx;
  86. color: #761E6A;
  87. line-height: 24rpx;
  88. }
  89. .lb_answers{
  90. width: 100%;
  91. margin-top: 20rpx;
  92. .la_item{
  93. padding: 31rpx 24rpx;
  94. background: #FFFFFF;
  95. border-radius: 24rpx;
  96. margin-top: 10rpx;
  97. }
  98. }
  99. }
  100. }
  101. </style>