questionnaire.wxml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <t-navbar title="满意度问卷" left-arrow />
  2. <scroll-view class="page-container" scroll-y>
  3. <!-- 加载状态 -->
  4. <view class="loading-container" wx:if="{{loading}}">
  5. <view class="loading-text">加载中...</view>
  6. </view>
  7. <!-- 问卷内容 -->
  8. <view class="questionnaire-container" wx:elif="{{!showEmpty}}">
  9. <!-- 标题 -->
  10. <view class="questionnaire-title">{{followDetail.name || '满意度问卷'}}</view>
  11. <!-- 介绍文字 -->
  12. <view class="questionnaire-intro" wx:if="{{followDetail.startSentence}}">
  13. {{followDetail.startSentence}}
  14. </view>
  15. <!-- 分数说明 -->
  16. <view class="score-explanation">
  17. <text class="score-explanation-text">分数说明:1分表示非常不满意,2分表示不满意,3分表示一般,4分表示满意,5分表示非常满意</text>
  18. </view>
  19. <!-- 问题组 -->
  20. <view class="question-groups" wx:if="{{followDetail.groups}}">
  21. <view class="question-group" wx:for="{{followDetail.groups}}" wx:key="index" wx:for-index="groupIndex">
  22. <!-- 问题组标题 -->
  23. <view class="group-title">{{item.name}}</view>
  24. <!-- 问题列表 -->
  25. <view class="question-list">
  26. <view class="question-item" wx:for="{{item.items}}" wx:key="index" wx:for-index="itemIndex">
  27. <!-- 问题名称 -->
  28. <view class="question-name">{{itemIndex + 1}}、{{item.name}}</view>
  29. <!-- 分数选择(单选) -->
  30. <t-radio-group value="{{item.selectedScore || item.score}}" borderless t-class="box" bind:change="onScoreChange" data-group-index="{{groupIndex}}" data-item-index="{{itemIndex}}">
  31. <t-radio block="{{false}}" :label="{{item.label}}" :value="{{item.value}}" wx:for="{{scoreList}}" wx:key="value" style="margin-right:20rpx" />
  32. </t-radio-group>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 其他意见 -->
  38. <view class="other-comment-section">
  39. <view class="other-comment-title">其他意见:</view>
  40. <textarea class="other-comment-input" placeholder="请给我们留言您的其他意见" value="{{suggestion}}" bindinput="onCommentInput" maxlength="500" show-confirm-bar="{{false}}" />
  41. </view>
  42. <!-- 结束语 -->
  43. <view class="questionnaire-end">
  44. {{followDetail.endSentence}}
  45. </view>
  46. </view>
  47. <!-- 无数据提示 -->
  48. <view class="empty-container" wx:elif="{{showEmpty}}">
  49. <view class="empty-text">暂无问卷数据</view>
  50. </view>
  51. </scroll-view>
  52. <!-- 保存按钮 -->
  53. <view class="save-button-container" wx:if="{{!showEmpty}}">
  54. <button class="save-button" bindtap="onSave" disabled="{{saving}}">
  55. <text wx:if="{{saving}}">保存中...</text>
  56. <text wx:else>保存</text>
  57. </button>
  58. </view>