index3.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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[arrayKey]" :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. labelColor="#002846"
  23. labelSize="28rpx"
  24. ></u-radio>
  25. </view>
  26. </u-radio-group>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. name: "QuestionItem",
  35. props: {
  36. item: {
  37. type: Object,
  38. required: true
  39. },
  40. index: {
  41. type: Number,
  42. required: true
  43. },
  44. arrayKey: {
  45. type: String,
  46. default:'userAnswer'
  47. },
  48. },
  49. data(){
  50. return {
  51. assessmentMethodCfg:{
  52. '1':'您对团队当前在此项陈述上所描述的实际表现的同意程度为:',
  53. '2':'此项陈述对该团队当前的重要性: '
  54. }
  55. }
  56. },
  57. methods: {
  58. radioChange(value,assessmentMethod,id) {
  59. this.$emit('change', {
  60. value,
  61. assessmentMethod,
  62. id,
  63. index: this.index
  64. });
  65. }
  66. }
  67. }
  68. </script>
  69. <style scoped lang="less">
  70. .li_box{
  71. margin-top: 20rpx;
  72. .lb_title{
  73. font-family: PingFang-SC, PingFang-SC;
  74. font-weight: bold;
  75. font-size: 32rpx;
  76. color: #002846;
  77. line-height: 48rpx;
  78. }
  79. .lb_card{
  80. background: #F2F9F9;
  81. border-radius: 24rpx;
  82. padding: 0 24rpx 40rpx;
  83. overflow: hidden;
  84. margin-top: 32rpx;
  85. }
  86. .lb_box{
  87. margin-top: 40rpx;
  88. .memo{
  89. font-family: PingFangSC, PingFang SC;
  90. font-weight: 400;
  91. font-size: 24rpx;
  92. color: #009191;
  93. line-height: 24rpx;
  94. }
  95. .lb_answers{
  96. width: 100%;
  97. margin-top: 20rpx;
  98. .la_item{
  99. padding: 31rpx 24rpx;
  100. background: #FFFFFF;
  101. border-radius: 24rpx;
  102. margin-top: 10rpx;
  103. }
  104. }
  105. }
  106. }
  107. </style>