questionnaire.wxml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!-- 弹窗蒙层 -->
  2. <view class="ques_pop {{tipsshow?'ques_pop_active':''}}" catchtouchmove="preventTouchMove"></view>
  3. <view class="ques_page" catchtouchmove="preventTouchMove">
  4. <image class="bg_page" src="../../static/images/page-bg.png" />
  5. <image class="bg_close" bindtap="closePage" src="../../static/images/quesClose.png" />
  6. <view class="ques_main">
  7. <view class="ques_title">问卷调查</view>
  8. <view class="ques_tips">感谢您参加这次问卷调查,您的每一条反馈,都促使我们做得更好!</view>
  9. <!-- 询问星级 -->
  10. <view wx:if="{{!answer}}">
  11. <view class="ques_txt"><text>* </text>{{firstDate.questionName}}</view>
  12. <view class="ques_star">
  13. <van-rate size="{{ 30 }}"
  14. color="#FF8800"
  15. void-color="#ffffff"
  16. void-icon="star"
  17. gutter="6"
  18. bind:change="starChange"
  19. ></van-rate>
  20. <text>对环境进行星级评价</text>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 少于四颗星答题 -->
  25. <scroll-view scroll-y="{{true}}" catchtouchmove="{{false}}" scroll-top="{{textScroll}}" class="ques_list" id="ques_list" wx:if="{{answer}}" >
  26. <view class="qus_listbox" id="qus_listbox">
  27. <view wx:for="{{otherDate}}" :key="{{index}}">
  28. <view class="ques_txt ques_txt_list"><text>* </text>{{item.questionName}}</view>
  29. <van-checkbox-group value="{{ item.checked }}" bind:change="selectChange" data-index="{{index}}">
  30. <van-checkbox wx:for="{{item.questionAnswerList}}" wx:for-item='items' custom-class="ques_checkbox"
  31. checked-color="#04b49c"
  32. shape="square"
  33. name="{{items.answerId}}"
  34. label-class="{{m1.getIncludes(item.checked,items.answerId)?'radio_active':'radio_span'}}">
  35. {{items.answerName}}
  36. </van-checkbox>
  37. </van-checkbox-group>
  38. <view wx:if="{{item.remark}}">
  39. <textarea placeholder="请输入" value="{{item.remarkTxt}}" bindinput="inputChange" data-index="{{index}}" class="txtarea" maxlength="200" cursor-spacing="10"/>
  40. </view>
  41. </view>
  42. </view>
  43. </scroll-view>
  44. <view class="footer footer_active" wx:if="{{answer}}">
  45. <button class="submit {{!submitFlag?'submit_noactive':''}} flex_row" catchtap="submitFeed">
  46. 提交
  47. </button>
  48. </view>
  49. </view>
  50. <!-- 是否下次提醒弹窗 -->
  51. <view class="dialog_box" wx:if="{{tipsshow}}">
  52. <view class="title">是否关闭当前问卷反馈?</view>
  53. <view class="content">
  54. <van-radio-group value="{{ dialogRadio }}" bind:change="radioChange">
  55. <van-radio name="1" checked-color="#04B49C" custom-class="radio_custom" icon-size="24px" label-class="{{dialogRadio==1?'radio_active':'radio_span'}}">不再提醒</van-radio>
  56. <van-radio name="2" checked-color="#04B49C" custom-class="radio_custom" icon-size="24px" label-class="{{dialogRadio==2?'radio_active':'radio_span'}}">下次提醒</van-radio>
  57. </van-radio-group>
  58. </view>
  59. <view class="dialog_footer flex_row">
  60. <view bindtap="closeDialog" class="dialog_btn flex_row">取消</view>
  61. <view class="line"></view>
  62. <view bindtap="submitMsg" class="dialog_btn flex_row">确定</view>
  63. </view>
  64. </view>
  65. <wxs module="m1">
  66. var getIncludes = function(array,target) {
  67. var max = false;
  68. for(var i=0;i<array.length;i++){
  69. if(!max){
  70. if(array[i]==target){
  71. max=true;
  72. }
  73. }
  74. }
  75. return max;
  76. }
  77. module.exports.getIncludes = getIncludes;
  78. </wxs>