|
|
|
@ -22,69 +22,69 @@ |
|
|
|
<table class="table"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th>{{ $t("contract.a9") }}</th> |
|
|
|
<th>{{ $t("contract.b0") }}</th> |
|
|
|
<th>{{ $t("contract.g7") }}</th> |
|
|
|
<!-- <th>{{ $t("contract.g7") }}({{ $t("contract.e2") }})</th> --> |
|
|
|
<th>{{ $t("contract.i3") }}</th> |
|
|
|
<!-- <th>{{ $t("contract.g8") }}({{ $t("contract.e2") }})</th> |
|
|
|
<th>{{ $t("contract.a5") }}({{ $t("contract.e2") }})</th> --> |
|
|
|
<th>{{ $t("contract.b7") }}</th> |
|
|
|
<th>{{ $t("contract.g9") }}</th> |
|
|
|
<th>{{ $t("contract.g3") }}</th> |
|
|
|
<th>{{ $t("contract.a8") }}</th> |
|
|
|
<th >{{ $t("contract.a6") }}</th> |
|
|
|
<th>{{ $t("contract.h0") }}</th> |
|
|
|
<th>{{ $t("contract.i7") }} /{{ $t("contract.i8") }}</th> |
|
|
|
<th width="18%">{{ $t("contract.c0") }}</th> |
|
|
|
<th>{{ $t("contract.a9") }}</th> |
|
|
|
<th>{{ $t("contract.b7") }}</th> |
|
|
|
<th>{{ $t("contract.b0") }}</th> |
|
|
|
<!-- <th>{{ $t("contract.g7") }}</th> --> |
|
|
|
<!-- <th>{{ $t("contract.g7") }}({{ $t("contract.e2") }})</th> --> |
|
|
|
<th>{{ $t("contract.i3") }}</th> |
|
|
|
<!-- <th>{{ $t("contract.g8") }}({{ $t("contract.e2") }})</th> |
|
|
|
<th>{{ $t("contract.a5") }}({{ $t("contract.e2") }})</th> --> |
|
|
|
<th>{{ $t("contract.g9") }}</th> |
|
|
|
<th>{{ $t("contract.g3") }}</th> |
|
|
|
<th>{{ $t("contract.a8") }}</th> |
|
|
|
<th >{{ $t("contract.a6") }}</th> |
|
|
|
<th>{{ $t("contract.h0") }}</th> |
|
|
|
<th>{{ $t("contract.i7") }} /{{ $t("contract.i8") }}</th> |
|
|
|
<th width="18%">{{ $t("contract.c0") }}</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<tr v-for="(item,index) in showList" :key="item.id" @click="getactiveItem(index)"> |
|
|
|
<td>{{ item.pair_name }}</td> |
|
|
|
<td>{{ item.lever_rate }}X</td> |
|
|
|
<td>{{ item.hold_position }}</td> |
|
|
|
<td>{{ item.side == 1 ? $t("contract.i4") : $t("contract.i5") }}</td> |
|
|
|
<!-- <td>{{ item.avail_position }}</td> |
|
|
|
<td>{{ item.freeze_position }}</td> --> |
|
|
|
<td>{{ item.position_margin }}</td> |
|
|
|
<td>{{ item.avg_price * 1 }}</td> |
|
|
|
<td>{{ item.realtimePrice }}</td> |
|
|
|
<td>{{ item.flatPrice }}</td> |
|
|
|
<td :class="item.unRealProfit>0?'increace':item.unRealProfit<0?'decreace':''">{{ item.unRealProfit }}</td> |
|
|
|
<td>{{ item.profitRate }}</td> |
|
|
|
<td>{{ item.tpPrice || "--" }}/{{ item.slPrice || "--" }}</td> |
|
|
|
<td> |
|
|
|
<button |
|
|
|
class="btn btn-sm btn-danger mb-1" |
|
|
|
@click="liquidation(item)" |
|
|
|
> |
|
|
|
{{ $t("contract.d6") }} |
|
|
|
</button> |
|
|
|
<!-- <button |
|
|
|
class="btn btn-sm btn-outline-danger mb-1" |
|
|
|
@click="allLiquidation(item)" |
|
|
|
> |
|
|
|
{{ $t("contract.h1") }} |
|
|
|
</button> --> |
|
|
|
<button |
|
|
|
class="btn btn-sm btn-outline-danger mb-1" |
|
|
|
@click="reverse(item)" |
|
|
|
> |
|
|
|
{{$t('contract.k3')}} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
class="btn btn-sm btn-primary mb-1" |
|
|
|
@click="toStoploss(item)" |
|
|
|
> |
|
|
|
{{ $t("contract.i9") }} |
|
|
|
</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr v-if="!showList.length"> |
|
|
|
<td colspan="13"> |
|
|
|
<no-record /> |
|
|
|
</td> |
|
|
|
<td>{{ item.pair_name }}</td> |
|
|
|
<td>{{ item.position_margin }}</td> |
|
|
|
<td>{{ item.lever_rate }}X</td> |
|
|
|
<!-- <td>{{ item.hold_position }}</td> --> |
|
|
|
<td>{{ item.side == 1 ? $t("contract.i4") : $t("contract.i5") }}</td> |
|
|
|
<!-- <td>{{ item.avail_position }}</td> |
|
|
|
<td>{{ item.freeze_position }}</td> --> |
|
|
|
<td>{{ item.avg_price * 1 }}</td> |
|
|
|
<td>{{ item.realtimePrice }}</td> |
|
|
|
<td>{{ item.flatPrice }}</td> |
|
|
|
<td :class="item.unRealProfit>0?'increace':item.unRealProfit<0?'decreace':''">{{ item.unRealProfit }}</td> |
|
|
|
<td>{{ item.profitRate }}</td> |
|
|
|
<td>{{ item.tpPrice || "--" }}/{{ item.slPrice || "--" }}</td> |
|
|
|
<td> |
|
|
|
<button |
|
|
|
class="btn btn-sm btn-danger mb-1" |
|
|
|
@click="liquidation(item)" |
|
|
|
> |
|
|
|
{{ $t("contract.d6") }} |
|
|
|
</button> |
|
|
|
<!-- <button |
|
|
|
class="btn btn-sm btn-outline-danger mb-1" |
|
|
|
@click="allLiquidation(item)" |
|
|
|
> |
|
|
|
{{ $t("contract.h1") }} |
|
|
|
</button> --> |
|
|
|
<button |
|
|
|
class="btn btn-sm btn-outline-danger mb-1" |
|
|
|
@click="reverse(item)" |
|
|
|
> |
|
|
|
{{$t('contract.k3')}} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
class="btn btn-sm btn-primary mb-1" |
|
|
|
@click="toStoploss(item)" |
|
|
|
> |
|
|
|
{{ $t("contract.i9") }} |
|
|
|
</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr v-if="!showList.length"> |
|
|
|
<td colspan="13"> |
|
|
|
<no-record /> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
@ -540,20 +540,20 @@ export default { |
|
|
|
$("#exampleModal").modal("show"); |
|
|
|
}, |
|
|
|
closePosition() { |
|
|
|
let data = { |
|
|
|
side: this.activeItem.side == 1 ? 2 : 1, |
|
|
|
type: this.activeItem.closeType, |
|
|
|
symbol: this.activeItem.symbol, |
|
|
|
entrust_price: this.form.entrust_price || 0, |
|
|
|
amount: this.form.amount, |
|
|
|
}; |
|
|
|
Contract.closePosition(data).then(() => { |
|
|
|
this.form.entrust_price = ""; |
|
|
|
this.form.amount = ""; |
|
|
|
this.$message.success(this.$t("contract.f6")); |
|
|
|
this.$emit("position"); |
|
|
|
$("#exampleModal").modal("hide"); |
|
|
|
}); |
|
|
|
let data = { |
|
|
|
side: this.activeItem.side == 1 ? 2 : 1, |
|
|
|
type: this.activeItem.closeType, |
|
|
|
symbol: this.activeItem.symbol, |
|
|
|
entrust_price: this.form.entrust_price || 0, |
|
|
|
amount: this.form.amount, |
|
|
|
}; |
|
|
|
Contract.closePosition(data).then(() => { |
|
|
|
this.form.entrust_price = ""; |
|
|
|
this.form.amount = ""; |
|
|
|
this.$message.success(this.$t("contract.f6")); |
|
|
|
this.$emit("position"); |
|
|
|
$("#exampleModal").modal("hide"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 全平弹窗 |
|
|
|
allLiquidation(item) { |
|
|
|
|