lxf
2025-04-30 f726ea231b2109be3cb9cc6eca8aa9a002ab3fce
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<template>
  <div class="wrapper">
    <!-- <mt-header fixed  title="我的持仓">
        <router-link to="/" slot="left">
            <mt-button icon="back"></mt-button>
        </router-link>
    </mt-header> -->
    <mt-navbar v-model="selected">
      <mt-tab-item id="1"><i class="iconfont icon-rongzi2"></i>科创持仓</mt-tab-item>
      <mt-tab-item id="2"><i class="iconfont icon-rongzilishi"></i>科创平仓</mt-tab-item>
    </mt-navbar>
    <mt-tab-container class="order-list" v-model="selected">
      <mt-tab-container-item id="1">
 
        <holdPosition :handleOptions='handleOptions'/>
      </mt-tab-container-item>
      <mt-tab-container-item id="2">
 
        <HistoryList :hasChangeSell="hasChangeSell" :handleOptions='handleOptions'/>
      </mt-tab-container-item>
    </mt-tab-container>
   <!-- <foot></foot> -->
  </div>
</template>
 
<script>
import foot from '@/components/foot/foot'
// import '@/assets/style/common.less'
import holdPosition from './ordercon/kchold-list'
import HistoryList from './ordercon/kchistory-list'
// import * as api from '@/axios/api'
 
export default {
  components: {
    foot,
    holdPosition,
    HistoryList
  },
  props: {},
  data () {
    return {
      selected: '1', // 选中
      list: [], // 持仓
      form: {
        pageNum: 1,
        pageSize: 10,
        currentNum: 10
      },
      list2: [], // 平仓
      form2: {
        pageNum: 1,
        pageSize: 10
      },
      hasChangeSell: false,
      hasChangeSell2: false
    }
  },
  watch: {},
  computed: {},
  created () {},
  mounted () {
    //   this.getListDetail()
    //   this.getListDetail2()
  },
  methods: {
    handleOptions (opts) {
      this.hasChangeSell = opts
      //   this.hasChangeSell = { ...this.hasChangeSell, ...opts};
      if (this.hasChangeSell) {
        this.selected = '2'
      }
    },
    handleOptions2 (opts) {
      this.hasChangeSell2 = opts
      if (this.hasChangeSell2) {
        this.selected = '4'
      }
    },
    toSearchName () {
      // 按照持仓名称查持仓订单
      this.$router.push({
        path: '/holdorderlist2',
        query: {
          type: 1 // 查询类型 1--> name 2--> code
        }
      })
    },
    toSearchCode () {
      // 按照持仓代码查持仓订单
      this.$router.push({
        path: '/holdorderlist',
        query: {
          type: 2 // 查询类型 1--> name 2--> code
        }
      })
    },
    toSearchName2 () {
      // 按照持仓名称查持仓订单
      this.$router.push({
        path: '/sellorderlist2',
        query: {
          type: 1 // 查询类型 1--> name 2--> code
        }
      })
    },
    toSearchCode2 () {
      // 按照持仓代码查持仓订单
      this.$router.push({
        path: '/sellorderlist',
        query: {
          type: 2 // 查询类型 1--> name 2--> code
        }
      })
    }
  }
}
</script>
<style lang="less" scoped>
  .is-selected .mint-tab-item-label:hover {
    text-decoration: none;
  }
 
  .wrapper /deep/ .mint-tab-item-label {
    font-size: 0.264rem;
  }
 
  .mint-navbar .mint-tab-item.is-selected {
    color: #d50000;
    border-bottom: 2px solid #d50000;
    text-decoration: none;
  }
 
  .mint-tab-container-item {
    // padding-top: 1.2rem;
    .mint-button--default {
      padding: 0 0.2rem;
      font-size: 0.24rem;
      height: 0.5rem;
      margin: 0.2rem 0.2rem 0;
      color: #607d8b;
      box-shadow: 0 0 1px #3b71b9;
      background: none;
    }
  }
 
  .mint-navbar {
    box-shadow: 0px 0px 4px rgba(6, 0, 1, 0.2);
 
    .mint-tab-item {
      // background: #21252a;
      padding: 0.2rem 0;
 
      &.is-selected {
        border: none;
        margin-bottom: 0;
      }
 
      .mint-tab-item-label {
        font-size: 0.22rem;
      }
 
      .iconfont {
        // display: block;
        font-size: 0.46rem;
        margin-bottom: 0.12rem;
        vertical-align: middle;
        margin-right: 0.12rem;
      }
    }
  }
</style>