10.10综合交易所原始源码_移动端
1
admin
2026-01-06 c55c23dd9fa020e2436541718d811462a9eff26e
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
<template>
  <!-- 历史持仓 -->
  <div id="cryptos">
    <template v-if="listData.length > 0">
      <div class="border-b-color" v-for="item in listData" :key="item.order_no">
        <div class="flex justify-between pt-5 pb-7 text-28">
          <div class="flex items-center">
            <div class="px-6 pt-2 pb-2 text-white rounded-md" :class="item.direction == 'buy' ? ' bg-green' : 'bg-red'">
              {{ item.direction == 'buy' ? $t('开多') : $t('开空') }}
            </div>
            <div class="ml-4 text-30 font-bold textColor">{{ item.name }} {{ $t('永续') }}</div>
          </div>
 
        </div>
        <div class="flex justify-between pb-7 text-28">
          <div class="text-grey">{{ $t('订单号') }}</div>
          <div class="textColor">{{ item.order_no }}</div>
        </div>
        <div class="flex justify-between pb-7 text-28">
          <div class="text-grey">{{ $t('价格') }}</div>
          <div class="textColor">{{ item.trade_avg_price }}</div>
        </div>
        <div class="flex justify-between pb-7 text-28">
          <div class="text-grey">{{ $t('成交数量') }}</div>
          <div class="textColor">{{ item.volume_open }}</div>
        </div>
        <div class="flex justify-between pb-7 text-28">
          <div class="text-grey">{{ $t('手续费') }}</div>
          <div class="textColor">{{ item.fee }}</div>
        </div>
        <div class="flex justify-between pb-7 text-28">
          <div class="text-grey">{{ $t('实现盈亏') }}</div>
          <div :class="{
            'text-green': item.profit / 1 > 0,
            'text-red': item.profit / 1 < 0,
          }">{{ item.profit / 1 > 0 ? '+' + item.profit : item.profit }}</div>
        </div>
        <div class="flex justify-between pb-7 items-center text-28">
          <div class="text-grey">{{ $t('操作') }}</div>
          <button class="border-none pl-8   text-blue bg-none colorMain" @click="goDetail(item)">{{ $t('详情') }}</button>
        </div>
      </div>
    </template>
  </div>
</template>
 
<script>
export default {
  name: "perpetualHistoryPosition",
  props: {
    listData: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      historyData: [
        { name: "BTC/USDT", direction: "buy", amount: "200", price: "23000", create_time: "2022-07-20 10:05:15" },
      ]
    }
  },
  methods: {
    goDetail(item) {
      this.$router.push({ path: "/cryptos/orderDetail", query: { order_no: item.order_no } });
    }
  }
 
}
</script>
<style lang="scss" scoped>
// .pb-28 {
//   padding-bottom: 10px;
// }
</style>