master.vue 5.32 KB
<template>
  <div class="agreement_container">
    <NafmHeader navClass="nafmii-head-bg3" title="《NAGMII主协议》">
      <template slot="bottom">
        <nav class="tab_bar">
          <div v-for="navItem in barList" :key="navItem.id" :class="actNav === navItem.id ? 'act_item' : 'nav_item'" @click="navSwitch(navItem.id)">
            <p>{{navItem.title}}</p>
            <div v-show="actNav === navItem.id" class="under_line"></div>
          </div>
        </nav>
      </template>
    </NafmHeader>
    <main class="agreement_content">
      <section v-if="actNav === 'time'">
        <time-item v-for="(item, index) in timeAgreements" :key="index" :agreement-item="item">
        </time-item>
      </section>
      <section v-if="actNav === 'letter'">
        <van-index-bar :sticky-offset-top="80">
          <div v-for="item in letterAgreements" :key="item.title">
            <van-index-anchor :index="item.title" />
            <letter-item :nav-item="item"></letter-item>
          </div>
        </van-index-bar>
      </section>
    </main>
    <section class="remark">
      <h3 class="title">备注:</h3>
      <ul class="content">
        <li>《NAFMII主协议》非法人产品管理人名单自2020年起进行公示</li>
        <li>《债券回购主协议》非法人产品管理人名单自2018年起进行公示</li>
      </ul>
    </section>
    {{$t('agreement')}}
  </div>
</template>
<script>
export default {
  data() {
    return {
      barList: [{
        title: '按时间',
        id: 'time'
      }, {
        title: '按首字母',
        id: 'letter'
      }],
      actNav: 'time',
      letterAgreements: [{
        title: 'A',
        children: [{
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-03'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-04'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-05'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-06'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-07'
        }]
      }, {
        title: 'B',
        children: [{
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-03'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-04'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-05'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-06'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-07'
        }]
      }, {
        title: 'C',
        children: [{
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-03'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-04'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-05'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-06'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-07'
        }]
      }, {
        title: 'D',
        children: [{
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-03'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-04'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-05'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-06'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-07'
        }]
      }, {
        title: 'E',
        children: [{
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-03'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-04'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-05'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-06'
        }, {
          title: 'XXXXXXXXXXXXX公司',
          time: '2020-03-07'
        }]
      }],
      timeAgreements: [{
        time: '2021-03-03',
        children: [{
          title: 'XXXXXXXXXXXXX公司'
        }, {
          title: 'XXXXXXXXXXXXX公司'
        }, {
          title: 'XXX产品',
          manager: 'XXX'
        }, {
          title: 'XXXXXXXXXXXXX公司'
        }]
      }]
    }
  },
  components: {
    letterItem: ()=> import('./components/letterItem.vue'),
    timeItem: ()=> import('./components/timeItem.vue')
  },
  methods: {
    navSwitch(id) {
      this.actNav = id
    }
  }
}
</script>
<style lang="less" scoped>
.agreement_container {
  width: 384px;
  margin: 0 auto;
}
.tab_bar {
  width: 384px;
  margin: 6px auto;
  display: flex;
  justify-content: space-around;
  font-size: 15px;
  color: #ffffff;
  background: transparent;
  .act_item {
    font-size: 19px;
    font-family: PingFangSC-Semibold;
  }
  .under_line {
    width: 30px;
    height: 2.5px;
    background: #ffffff;
    margin: 0 auto;
  }
}
.remark {
  line-height: 20px;
  margin: 20px 0;
  .title {
    font-size: 14px;
    color: #333333;
    font-weight: bold;
  }
  .content {
    font-size: 12px;
    color: #999999;
  }
}
::v-deep .van-index-bar__sidebar {
  border: 0.5px solid #dadada;
  background-color: #f2f2f2;
  margin-right: 10px;
  padding: 10px 0;
  border-radius: 11px;
  .van-index-bar__index {
    display: block;
    padding: 0;
    width: 20px;
    line-height: 22px;
    text-align: center;
    font-size: 10px;
    color: #777879;
  }
}
</style>