index.vue 2.44 KB
<template>
  <div class="search-layout">
    <nafm-header title="注册发行" navClass="nafmii-head-bg3">
      <template #bottom>
        <SearchInput v-model.trim="keyword" placeholder="请输入企业名称/注册报告名称/主承销商" :readonly="true" :keyword="keyword" @click="jumpSearch" />
        <img :src="require('@/assets/icon/filter.png')" class="filter" @click="show=true" />
      </template>
    </nafm-header>
    <RegIssueList :params="filterParams" />
    <FilterPopup :checkboxArrOne="checkboxArrOne" :checkboxArrTwo="checkboxArrTwo" v-model="show" @rest="handleReset" @sure="handleSure" />
  </div>
</template>
<script>
import RegIssueList from './components/RegIssueList';
import SearchInput from '@/components/SearchInput';
import FilterPopup from './components/FilterPopup';
import mixinKeepAlive from '@/mixins/mixinKeepAlive'
import { KeywordBus } from '@/utils/eventBus'
export default {
  name: 'RegIssue', // 注册发行首页
  components: {
    SearchInput,
    FilterPopup,
    RegIssueList
  },
  mixins: [mixinKeepAlive],
  data() {
    return {
      keyword: '',
      show: false,
      checkboxArrOne: [{
        label: '待上会',
        value: 1
      }],
      checkboxArrTwo: [{
        label: 'SCP',
        value: 1
      }],
    }
  },
  computed: {
    filterParams() {
      return {
        keyword: this.keyword,
        checkboxArrOne: this.checkboxArrOne,
        checkboxArrTwo: this.checkboxArrTwo
      }
    }
  },
  mounted() {
    KeywordBus.on(keyword => {
      this.keyword = keyword
    })
  },

  methods: {
    // input click 跳转 注册发行 首页 
    jumpSearch() {
      this.$router.push({
        name: 'RegIssueSearch'
      })
    },
    // 确定
    handleSure(arrOne, arrTwo) {
      console.log('arrOne', arrOne);
      console.log('arrTwo', arrTwo);
      this.show = false

      this.onSeachAction()
    },
    // 注册发行搜索 回车 跳转搜索结果页面 或者 直接搜索 
    onSeachAction(val) {
      const params = {
        keyword: val,
        arrOne: this.arrOne,
        arrTwo: this.arrTwo
      }
    },
    // 重置
    handleReset() {

    },
  },
}
</script>
<style lang="less" scoped>
.search-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  .history-container {
    flex: 1;
  }
}
/deep/ .nav_bottom_container {
  display: flex;
  flex-direction: row;
  align-items: center;
  .filter {
    width: 18px;
    height: 21px;
    margin-left: 15px;
  }
}
</style>