RegIssueLayout.vue
2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<template>
<div class="search-layout">
<nafm-header title="注册发行" navClass="nafmii-head-bg3">
<template #bottom>
<SearchInput v-model="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: {
//
handleSearch(val) {
console.log('value', val)
this.$store.dispatch('search/APushRegIssueSearchValue', val)
this.onSeachAction()
},
// 确定
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 = {}
if (!this.history) {
// todo api
}
this.$emit('search', val)
},
// 重置
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>