HomeSearch.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="h_s_b">
  3. <view class="s_i_b">
  4. <view class="select">
  5. <view>{{ searchType }}</view>
  6. <image :src="icon_arrow_down_black_16" mode=""></image>
  7. </view>
  8. <input type="text" v-model="value" @confirm="search" placeholder="请输入事件名称" />
  9. <view class="s_b" @click="search">搜索</view>
  10. </view>
  11. <u-popup v-model="show" mode="bottom" border-radius="16" height="40%">
  12. <view class="pp_b">
  13. <u-radio-group v-model="searchType" @change="radioGroupChange">
  14. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item">
  15. {{ item }}
  16. </u-radio>
  17. </u-radio-group>
  18. <view class="pp_h">分类</view>
  19. <u-radio-group v-model="type" @change="radioGroupChange">
  20. <u-radio @change="radioChange" v-for="(item, index) in typeList" :key="index" :name="item">
  21. {{ item }}
  22. </u-radio>
  23. </u-radio-group>
  24. <!-- <view class="btns">
  25. <view class="primary">
  26. </view>
  27. </view> -->
  28. </view>
  29. </u-popup>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. name: 'HomeSearch',
  35. data() {
  36. return {
  37. icon_arrow_down_black_16: require('@/static/images/icon_arrow_down_black_16.svg'),
  38. icon_arrow_up_gray_16: require('@/static/images/icon_arrow_up_gray_16.svg'),
  39. searchType: '户政',
  40. show: false,
  41. list: [
  42. '全部', '户政', '出入境', '交警', '治安', '监管', '网安', '禁毒', '边管', '安康医院', 'NGO管理', '内保', '见义勇为',
  43. ],
  44. typeList: ['全部', '个人业务', '企业业务', ],
  45. type: '',
  46. value: ''
  47. }
  48. },
  49. methods: {
  50. search() {
  51. this.$emit('search', this.value)
  52. },
  53. selectSearch() {
  54. this.show = true
  55. },
  56. radioGroupChange(e) {
  57. console.log('radioGroupChange', e)
  58. },
  59. radioChange(e) {
  60. console.log('radioChange', e)
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .btns {
  67. width: 100%;
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. }
  72. .h_s_b {
  73. padding: 24rpx;
  74. width: 100%;
  75. height: 148rpx;
  76. .pp_b {
  77. padding: 24rpx;
  78. .u-radio-group {
  79. display: flex;
  80. }
  81. .u-radio {
  82. width: 30vw !important;
  83. display: flex;
  84. }
  85. }
  86. .pp_h {
  87. width: 100%;
  88. height: 100rpx;
  89. line-height: 100rpx;
  90. color: rgba(17, 17, 17, 1);
  91. }
  92. }
  93. .s_i_b {
  94. display: flex;
  95. border-radius: 16rpx;
  96. border: 1rpx solid rgba(248, 248, 248, 1);
  97. align-items: center;
  98. uni-input {
  99. flex: 1;
  100. }
  101. .select {
  102. color: rgba(17, 17, 17, 1);
  103. display: flex;
  104. align-items: center;
  105. justify-content: center;
  106. padding: 12rpx;
  107. uni-image {
  108. width: 32rpx;
  109. height: 32rpx;
  110. color: rgba(248, 248, 248, 1);
  111. }
  112. }
  113. .s_b {
  114. background-color: rgba(16, 109, 255, 1);
  115. color: rgba(255, 255, 255, 1);
  116. padding: 12rpx;
  117. border-radius: 12rpx;
  118. }
  119. }
  120. </style>