RegIssueLayout.vue 2.52 KB
<template>
  <div class="search-layout">
    <nafm-header title="注册发行" navClass="nafmii-head-bg3">
      <template #bottom>
        <SearchInput v-model.trim="keyword" placeholder="请输入企业名称/注册报告名称/主承销商" :readonly="readonly" @click="jumpSearch" @search="handleSearch" />
        <img :src="require('@/assets/icon/filter.png')" class="filter" v-if="!history" @click="show=true" />
      </template>
    </nafm-header>
    <div class="history-container" v-if="history">
      <SearchHistory stateKey="RegIssue" @jumpPage="handleSearch" />
    </div>
    <slot />
    <FilterPopup :checkboxArrOne="checkboxArrOne" :checkboxArrTwo="checkboxArrTwo" v-model="show" @rest="handleReset" @sure="handleSure" />
  </div>
</template>
<script>
import SearchInput from '@/components/SearchInput';
import SearchHistory from '@/components/SearchHistory';
import FilterPopup from './FilterPopup';
export default {
  name: 'RegIssueLayout',
  components: {
    SearchInput,
    SearchHistory,
    FilterPopup
  },
  props: {
    history: Boolean,
    defKeyword: String,
    readonly: Boolean
  },
  data() {
    return {
      keyword: '',
      show: false,
      checkboxArrOne: [{
        label: '待上会',
        value: 1
      }],
      checkboxArrTwo: [{
        label: 'SCP',
        value: 1
      }],
    }
  },
  watch: {
    defKeyword(val, old) {
      this.keyword = val
    },
  },
  methods: {
    // 点击历史搜索页面tag签 或者搜索关键字回车 跳转到 搜索页面
    handleSearch(val) {
      this.$store.dispatch('search/APushRegIssueSearchValue', val)
      this.onSeachAction(val)
    },
    // 确定
    handleSure(arrOne, arrTwo) {
      console.log('arrOne', arrOne);
      console.log('arrTwo', arrTwo);
      this.show = false

      this.onSeachAction()
    },
    // input click 跳转 注册发行 首页 
    jumpSearch() {
      this.$emit('jumpSeachPage')
    },
    // 注册发行搜索 回车 跳转搜索结果页面 或者 直接搜索 
    onSeachAction(val) {
      const params = {
        keyword: val,
        arrOne: this.arrOne,
        arrTwo: this.arrTwo
      }
      this.$emit('search', params)
    },
    // 重置
    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>