index3.vue 2.4 KB

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