From 02c9c69ee42a918719790e7ee454507c8fad28f9 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sun, 06 Jul 2025 15:50:03 +0800
Subject: [PATCH] 1
---
src/views/position/components/financing-hold.vue | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/views/position/components/financing-hold.vue b/src/views/position/components/financing-hold.vue
index b3f160d..2f213b4 100644
--- a/src/views/position/components/financing-hold.vue
+++ b/src/views/position/components/financing-hold.vue
@@ -3,8 +3,8 @@
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline">
- <a-row :gutter="48">
- <!-- <a-col :md="12" :lg="6" :sm="24">
+ <!-- <a-row :gutter="48">
+ <a-col :md="12" :lg="6" :sm="24">
<a-form-item label="持仓类型">
<a-select v-model="queryParam.positionType" placeholder="请选择持仓类型">
<a-select-option :value="''">全部</a-select-option>
@@ -160,6 +160,8 @@
<a slot="action" href="javascript:;" @click="getLockopen(record.id)" v-else>解锁</a>
<a-divider type="vertical" />
<a slot="action" href="javascript:;" @click="getCompulsoryclosing(record.positionSn)">强制平仓</a>
+ <a-divider type="vertical" />
+ <a slot="action" href="javascript:;" @click="deletekopen(record.id)">删除</a>
</template>
</a-table>
<a-modal
@@ -182,7 +184,7 @@
</div>
</template>
<script>
-import { positionlist, positionlock, positionsell } from '@/api/position'
+import { positionlist, positionlock, positionsell,positiondel } from '@/api/position'
import { nextagent } from '@/api/home'
import moment from 'moment'
export default {
@@ -360,6 +362,33 @@
this.getlist()
},
methods: {
+ deletekopen(id){
+ var that = this
+ this.$confirm({
+ title: '提示',
+ content: '确认要删除吗?',
+ onOk() {
+ var data = {
+ positionId: id,
+ }
+ positiondel(data)
+ .then((res) => {
+ if (res.status == 0) {
+ that.$message.success(res.msg)
+ that.getlist()
+ } else {
+ that.$message.error({ content: '删除失败' })
+ }
+ })
+ .catch((error) => {
+ that.$message.error({ content: '删除失败' })
+ })
+ },
+ onCancel() {
+ console.log('Cancel')
+ },
+ })
+ },
getCompulsoryclosing(val) {
var that = this
this.$confirm({
--
Gitblit v1.9.3