index3.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="li_box">
  3. <view class="lb_title">
  4. {{index+1}}. {{item.question}}
  5. </view>
  6. <view class="lb_card">
  7. <view class="lb_box" v-for="(ua,ui) in item.userAnswer" :key="ui">
  8. <view class="memo">{{assessmentMethodCfg[ua.assessmentMethod]||''}}</view>
  9. <view 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="#33A7A7"
  20. size="36rpx"
  21. iconSize="32rpx"
  22. labelSize="32rpx"
  23. ></u-radio>
  24. </view>
  25. </u-radio-group>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  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. margin-top: 20rpx;
  67. .lb_title{
  68. font-family: PingFang-SC, PingFang-SC;
  69. font-weight: bold;
  70. font-size: 32rpx;
  71. color: #002846;
  72. line-height: 48rpx;
  73. }
  74. .lb_card{
  75. background: #F2F9F9;
  76. border-radius: 24rpx;
  77. padding: 0 24rpx 40rpx;
  78. overflow: hidden;
  79. margin-top: 32rpx;
  80. }
  81. .lb_box{
  82. margin-top: 40rpx;
  83. .memo{
  84. font-family: PingFangSC, PingFang SC;
  85. font-weight: 400;
  86. font-size: 24rpx;
  87. color: #009191;
  88. line-height: 24rpx;
  89. }
  90. .lb_answers{
  91. width: 100%;
  92. margin-top: 20rpx;
  93. .la_item{
  94. padding: 31rpx 24rpx;
  95. background: #FFFFFF;
  96. border-radius: 24rpx;
  97. margin-top: 10rpx;
  98. }
  99. }
  100. }
  101. }
  102. </style>