search.vue 3.6 KB
<template>
  <div class="qulification_search">
    <NafmHeader title="资质查询" />
    <section class="logo">
    </section>
    <h3 class="search_title">会员及市场参与者情况查询</h3>
    <section class="search_box">
      <span class="select" @click="showPicker = true">
        <van-icon name="search" />
        <span class="qulification_type">{{qulificationType}}</span>
        <van-icon name="play" />
      </span>
      <span class="visual_input">{{'请输入机构名称'}}</span>
    </section>
    <section class="search_history">
      <div class="history_header">
        <span>搜索历史</span>
        <span class="delete_circle">
          <van-icon name="delete" />
        </span>
      </div>
      <div>
        <span class="history_item" v-for=" item in historyItems" :key="item.id">{{item.name}}</span>
      </div>
    </section>
    <van-popup v-model="showPicker" round position="bottom">
      <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
    </van-popup>
  </div>
</template>
<script>
export default {
  data() {
    return {
      columns: [
        '机构', '非法人产品'
      ],
      qulificationType: '机构',
      showPicker: false,
      historyItems: [{
        name: 'jdnskjfnjkds',
        id:11111
      }, {
        name: 'dksjnjkfdskjnkf',
        id: 2222
      }, {name: 'jdnskjfnjkds',
        id:111112
      }, {
        name: 'dksjnjkfdskjnkf',
        id: 22222
      }]
    }
  },
  methods: {
    onConfirm(value) {
this.qulificationType = value;
      this.showPicker = false;
    },
    popupShow() {
      this.showPicker = false
    }
  }
}
</script>
<style lang="less" scoped>
.qulification_search {
  padding: 20px;
  .logo {
    display: block;
    width: 100px;
    height: 100px;
    margin: 15px auto;
    background: url(../../assets/icon/logo.png) no-repeat;
    background-size: contain;
  }
  .search_title {
    font-size: 16px;
    font-family: PingFangSC-Semibold;
    color: #333333;
    text-align: center;
  }
  .search_box {
    width: 384px;
    margin: 30px auto 25px;
    padding: 10px 0;
    border-radius: 16px;
    background-color: rgba(246, 246, 246, 1);
    display: flex;
    font-size: 12px;
    .select {
      color: #999999;
      display: flex;
      align-items: center;
      padding: 0 10px 0 5px;
      .van-icon-search {
        margin: 0 11px;
        font-size: 12px;
      }
      .qulification_type {
        color: #333333;
        margin-right: 5px;
      }
      .van-icon-play {
        transform: rotate(90deg);
        -ms-transform: rotate(90deg); /* IE 9 */
        -moz-transform: rotate(90deg); /* Firefox */
        -webkit-transform: rotate(90deg); /* Safari 和 Chrome */
        -o-transform: rotate(90deg);
      }
    }
    .visual_input {
      // line-height: 33px;
      color: #999999;
      padding-left: 15px;
      border-left: 0.5px solid #999999;
    }
  }
  .search_history {
    .history_header {
      line-height: 25px;
      margin-bottom: 5px;
      font-size: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .delete_circle {
        display: inline-block;
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background-color: #f6f6f6;
        text-align: center;
        line-height: 25px;
        // .van-icon-delete {
        //   align-self: middle;
        // }
      }
    }
    .history_item {
      display: inline-block;
      font-size: 12px;
      color: #666666;
      padding: 6px 20px;
      border-radius: 50px;
      background-color: #f6f6f6;
      margin: 10px 10px 0 0;
    }
  }
}
</style>