index.vue 5.99 KB
<template>
  <div class="regIssue_container">
    <NafmHeader :title="$t('title.regIssue')" navClass="nafmii-head-bg3">
      <template #bottom>
        <SearchFirst class="common_search" placeholder="请输入企业名称/注册报告名称/主承销商" />
        <img :src="require('@/assets/icon/filter.png')" class="filter" @click="show=true" />
      </template>
    </NafmHeader>

    <div class="regIssue_content">
      <van-list v-model="loading" :finished="finished" finished-text="已经到底了" @load="onLoad">
        <div class="regIssue_list">
          <div class="regIssue_item" v-for="(item,index) in list" :key="index">
            <h3>{{item.title}}</h3>
            <div class="bottom">
              <div class="btm_left">
                <img :src="require('@/assets/icon/time_update.png')">
                <span class="time">更新日期:{{item.time}} </span>
              </div>
              <div class="btm_right">{{item.type}}</div>
            </div>
          </div>
        </div>
      </van-list>
    </div>

    <van-popup v-model="show" position="right" :style="{ height: '100%',width: '85%' }">
      <div class="filter_container" v-if="show">
        <h3>项目状态</h3>
        <div class="status_list mtb15">
          <van-checkbox-group v-model="resultOne" class="checkboxGroup" ref="groupOne">
            <van-checkbox :name="item.value" class="checkbox_item_common checkbox_item_1" v-for="(item,index) in checkboxArrOne" :key="index">{{item.label}}</van-checkbox>
          </van-checkbox-group>
        </div>
        <h3>品种</h3>
        <div class="class_list mtb15">
          <van-checkbox-group v-model="resultTwo" class="checkboxGroup" ref="groupTwo">
            <van-checkbox :name="item.value" class="checkbox_item_common checkbox_item_2" v-for="(item,index) in checkboxArrTwo" :key="index">{{item.label}}</van-checkbox>
          </van-checkbox-group>
        </div>
        <div class="button">
          <div class="btn reset" @click="handleReset">重置</div>
          <div class="btn sure" @click="handleSure">确定</div>
        </div>
      </div>
    </van-popup>
  </div>
</template>
<script>
import SearchFirst from '@/components/SearchFirst'
export default {
  name: 'RegIssue',
  components: {
    SearchFirst
  },
  data() {
    return {
      loading: false,
      finished: false,
      show: true,
      list: [
        {
          title: '南京市高淳区城市投资有限公司关于发行2021年度第一期中期票据的注册报告',
          time: '2021-4-12',
          type: 'MTN'
        },
        {
          title: '南京市高淳区城市投资有限公司关于发行2021年度第一期中期票据的注册报告',
          time: '2021-4-12',
          type: 'MTN'
        }
      ],
      checkboxArrOne: [{
        label: '待上会',
        value: 1
      }, {
        label: '完成注册',
        value: 2
      }],
      resultOne: [],
      checkboxArrTwo: [{
        label: 'SCP',
        value: 1
      }, {
        label: 'SCP1',
        value: 2
      }, {
        label: 'SCP2',
        value: 3
      }, {
        label: 'SCP3',
        value: 4
      }, {
        label: 'PB-MTN',
        value: 5
      }, {
        label: 'PB-RB',
        value: 6
      }, {
        label: 'PB-其他',
        value: 7
      }],
      resultTwo: [],
    }
  },
  methods: {
    onLoad() {
      this.finished = true
      this.loading = false
    },
    // 重置
    handleReset() {
      this.$refs.groupOne.toggleAll(false)
      this.$refs.groupTwo.toggleAll(false)
    },
    // 确定
    handleSure() {
      console.log(this.resultTwo)
      console.log(this.resultOne)
      this.show = false
    }
  }
}
</script>
<style lang="less" scoped>
@import "~@/assets/css/search.less";
/deep/ .nav_bottom_container {
  display: flex;
  flex-direction: row;
  align-items: center;
  .filter {
    width: 18px;
    height: 21px;
    margin-left: 15px;
  }
}
.common_search {
  display: flex;
  flex: 1;
  width: auto;
}
.regIssue_list {
  padding: 0 15px;
  .regIssue_item {
    padding: 10px 0 12px 0;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    flex-direction: column;
    h3 {
      color: #222;
      font-size: 16px;
    }
    .bottom {
      display: flex;
      flex-direction: row;
      margin-top: 10px;
      color: #888d8d;
      font-size: 12px;
      justify-content: space-between;
      .btm_left {
        display: flex;
        align-items: center;
      }
      img {
        width: 17px;
        height: 17px;
        margin-right: 7px;
      }
    }
  }
}
.filter_container {
  display: flex;
  flex-direction: column;
  padding: 50px 15px;
  height: 100%;
}
.mtb15 {
  margin: 15px 0;
}

.checkboxGroup {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  .checkbox_item_common {
    position: relative;
    display: flex;
    height: 40px;
    align-items: center;
    justify-content: center;
    background-color: #f6f6f6;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 12px;
  }
  .checkbox_item_1 {
    width: calc(50% - 5px);
    &:nth-child(2n + 2) {
      margin-right: 0;
    }
  }
  .checkbox_item_2 {
    width: calc(33% - 10px);
    &:nth-child(3n + 3) {
      margin-right: 0;
    }
  }
}
/deep/ .van-icon-success {
  display: none;
}
/deep/ .van-checkbox__label {
  margin-left: 0;
  color: #666;
}
/deep/ .van-checkbox__icon .van-icon {
  border: 0;
}
/deep/ .van-checkbox__icon--checked {
  position: absolute;
  background-color: #135faa;
  width: 100%;
  height: 40px;
}
/deep/ .van-checkbox__icon--checked + .van-checkbox__label {
  position: absolute;
  color: #fff;
}
.button {
  // position: absolute;
  bottom: 20px;
  display: flex;
  align-items: flex-end;
  flex: 1;
  justify-content: space-between;
  .btn {
    width: 43%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45px;
    font-size: 15px;
    border-radius: 5px;
  }
  .reset {
    background-color: #f6f6f6;
    color: #666;
  }
  .sure {
    background-image: linear-gradient(to right, #25a3df, #106abc);
    color: #fff;
  }
}
</style>