SearchDataLayout.vue
1.84 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
<template>
<section class="search-data-layout">
<MenuModuleLayout class="search-menus" v-if="menus" :datas="menus" />
<HomeDataListModule v-for="(item, idx) in moduleList" :key="idx" :datas="item.list" v-bind="item" @clickMore="handleMore(item)" @clickItem="handleItem" />
</section>
</template>
<script>
import MenuModuleLayout from './MenuModuleLayout'
import HomeDataListModule from '@/components/HomeDataListModule'
export default {
name: 'SearchDataLayout',
components: { MenuModuleLayout, HomeDataListModule },
props: {
data: {
type: Object,
default: () => { return {} }
}
},
data () {
return {}
},
computed: {
menus () {
return this.data && this.data.apps
},
moduleList () {
const { modules } = this.data || {}
const result = []
modules && modules.forEach(item => {
if (item.type == 1) { // 注册发行
Object.assign(item, { name: this.$t('home.disclosure'), dateText: this.$t('home.disclosureDate') })
} else if (item.type == 2) { // 新闻动态
Object.assign(item, { name: this.$t('home.news'), dateText: this.$t('home.updateDate') })
} else if (item.type == 3) { // 信息披露
Object.assign(item, { name: this.$t('home.registered'), dateText: this.$t('home.updateDate') })
}
result.push(item)
});
return result
}
},
methods: {
handleMore (item) {
},
handleItem (dataItem) {
}
}
}
</script>
<style lang="less" scoped>
@PaddingSize: 15px;
.search-data-layout {
height: 100%;
background: white;
padding: @PaddingSize;
.search-menus {
padding-bottom: 25px;
}
/deep/.data-module {
padding-top: initial;
.module-top-container {
border-bottom: initial;
.module-name {
border-bottom: initial !important;
}
}
}
}
</style>