From dce10d37ad35efe8ed1d39d6e5fcf7e4904381df Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Fri, 12 Jun 2026 13:19:53 +0800
Subject: [PATCH] 1
---
src/components/Transform/perpetual-order/index.vue | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/src/components/Transform/perpetual-order/index.vue b/src/components/Transform/perpetual-order/index.vue
index e37b1bc..d6872ba 100644
--- a/src/components/Transform/perpetual-order/index.vue
+++ b/src/components/Transform/perpetual-order/index.vue
@@ -10,6 +10,8 @@
orderHold.length }})</span></div>
<div class="px-2 ml-12 py-2 flex items-center textColor1y text-28" @click="tabClick('2')"
:class="type == '2' ? 'active-line' : ''">{{ $t('当前委托') }}</div>
+ <div class="px-2 ml-12 py-2 flex items-center textColor1 text-28" @click="tabClick('5')"
+ :class="type == '5' ? 'active-line' : ''">{{ $t('历史仓位') }}</div>
</template>
<template v-else>
<div class="px-2 py-2 flex items-center textColor1 text-28" @click="tabClick('3')"
@@ -20,8 +22,8 @@
:class="type == '4' ? 'active-line' : ''">{{ $t('历史仓位') }}</div>
</template>
</div>
- <img src="../../../assets/image/public/record.png" alt="record-img" class="w-16 h-9 pr-8 record-img"
- @click="goHistory" />
+ <!-- <img src="../../../assets/image/public/record.png" alt="record-img" class="w-16 h-9 pr-8 record-img"
+ @click="goHistory" /> -->
</div>
<!-- 永续-->
<template v-if="topIndex / 1 === 1">
@@ -32,6 +34,11 @@
<!-- 持有仓位列表 -->
<div v-if="type == '2'">
<PerpetualEntrustList :list-data="orderCur" @recall="$emit('recall', $event)"></PerpetualEntrustList>
+ </div>
+ <!-- 历史仓位列表 -->
+ <div v-if="type == '5'">
+ <PerpetualHistoryPosition :list-data="perpetualHistroy" />
+ <div class="text-grey text-center py-72 text-30" v-if="perpetualHistroy.length == 0">{{ $t('您目前没有持仓') }}</div>
</div>
</template>
<!-- 交割-->
@@ -52,6 +59,7 @@
<script>
import PerpetualEntrustList from '../perpetual-entrust-list/index.vue';
import PerpetualPositionList from '../perpetual-position-list/index.vue';
+import PerpetualHistoryPosition from '../perpetual-history-position/index.vue';
import futrueHoldList from '../deliveryContract/hold.vue'
import futrueHistroyPosition from '../deliveryContract/position.vue'
import { mapGetters } from 'vuex'
@@ -60,7 +68,7 @@
name: "perpetualOrder",
data() {
return {
- type: '1', // 1:永续持有,2:永续当前,3:交割持有,4:交割历史
+ type: '1', // 1:永续持有,2:永续当前,5:永续历史,3:交割持有,4:交割历史
};
},
props: {
@@ -96,9 +104,19 @@
return []
}
},
+ perpetualHistroy: {
+ type: Array,
+ default() {
+ return []
+ }
+ },
price: {
type: [Number, String],
default: '0.00'
+ },
+ symbolType: {
+ type: String,
+ default: 'cryptos'
},
},
watch: {
@@ -147,17 +165,17 @@
if (type === '4') {
this.$emit('tab', 'fetchFutrueHistory')
}
+ if (type === '5') {
+ this.$emit('tab', 'fetchPerpetualHistory')
+ }
// this.$emit(type)
},
goHistory() {
if (this.userInfo.token) {
- let type = 'cryptos'
- if (this.$route.query.type) {
- type = this.$route.query.type
- }
+ const type = this.symbolType || 'cryptos'
const url = this.topIndex / 1 === 1 ? '/cryptos/perpetualHistory' : '/cryptos/deliveryContractHistory'
this.$router.push({
- path: url, query: { symbol: this.symbol, type: type }
+ path: url, query: { symbol: this.symbol, type }
});
} else {
this.$router.push('/login')
@@ -165,7 +183,7 @@
}
},
- components: { PerpetualEntrustList, PerpetualPositionList, futrueHistroyPosition, futrueHoldList },
+ components: { PerpetualEntrustList, PerpetualPositionList, PerpetualHistoryPosition, futrueHistroyPosition, futrueHoldList },
computed: {
...mapGetters('user', ['userInfo']),
},
--
Gitblit v1.9.3