dcc
2024-06-13 24e2c4a6983d3ed1c67080b460f7e28f5e2e55f9
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<template>
    <div class="lotteryRecord">
        <fx-header @back="back()" :back="false">
            <template #title>
                <van-dropdown-menu>
                  <van-dropdown-item v-model="curStock" :options="optionList" @change="changeType" />
                </van-dropdown-menu>
            </template>
            <!-- <template #right>
                <img class="search-icon" src="@/assets/image/optional/search.png" alt="">
            </template> -->
        </fx-header>
        <div class="new" v-if="curStock === 'newStock'">
          <NewStock />
        </div>
        <div class="now" v-if="curStock === 'nowStock'">
          <SpotStock />
        </div>
        <div class="record" v-if="curStock === 'record'">
          <LotteryRecord />
        </div>
        <div class="subscribe" v-if="curStock === 'subscribe'">
          <SubscribeRecord />
        </div>
    </div>
</template>
 
<script setup>
import {onMounted, ref, reactive, provide} from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from "vue-i18n";
 
import LotteryRecord from './lotteryRecord.vue'
import SubscribeRecord from './subscribeRecord.vue'
import SpotStock from './spotStock.vue';
import NewStock from './newStock.vue';
 
const { t } = useI18n()
const route = useRoute()
const router = useRouter()
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
 
const optionList = [
  { text: t('新股库存'), value: 'newStock' },
  { text: t('现股库存'), value: 'nowStock' },
  { text: t('抽签记录'), value: 'record' },
  { text: t('认缴记录'), value: 'subscribe' },
];
let curStock = ref('')
onMounted(() => {
  curStock.value = route.query?.type || 'newStock'
})
 
const stockType = route.query?.stock
const stockActive = route.query?.stockActive
provide('stockType', stockType)
 
const changeType = (e) => {
  router.push(`/ipo/stock?type=${e}&stock=${stockType}&stockActive=${stockActive}`)
}
 
console.log(route.query)
const back = () =>{
  router.push(`/quotes/index?tabActive=${stockActive}`)
}
 
</script>
<style lang="scss" scoped>
:deep(.van-cell){
  background-color: $van-bg;
 
  &.van-dropdown-item__option{
    color: $text_color;
  }
 
  &.van-dropdown-item__option--active{
    color: #1989fa;
  }
 
  &::after{
    display: none;
  }
}
 
:deep(.van-nav-bar__title){
  max-width: 70% !important;
 
  .van-dropdown-menu__bar{
    background: transparent;
  }
  .van-dropdown-menu__title{
    color: $text_color;
 
    &::after{
      right: 0;
      border-color: transparent transparent $text_color $text_color;
    }
  }
}
.lotteryRecord {
    font-size: 14px;
 
    .search-icon {
        width: 23px;
        height: 23px;
    }
 
    .tab-header {
        font-size: 13px;
        color: #747A8F;
    }
    .flex-2{
        flex: 2;
    }
    .list-div {
        padding: 20px 0;
 
        .list-title {
            width: 80px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
        }
    }
}
</style>