Browse Source

增加参数/优化显示

master
lizhixin 4 years ago
parent
commit
d8b4bfed02
  1. 62
      src/pages/ReCheck/AccountInfo.vue
  2. 27
      src/pages/ReCheck/OrderTable.vue
  3. 25
      src/pages/ReCheck/index.vue
  4. 46
      src/pages/prePages/js/columns.js

62
src/pages/ReCheck/AccountInfo.vue

@ -30,7 +30,7 @@
:key="index + '12'"
>{{ item.TotalPurchasePrice }}
{{
index == accountInfo.TotalPurchaseInfoList.length - 1 ? "" : "---"
index == accountInfo.TotalPurchaseInfoList.length - 1 ? "" : ""
}}</span
>
</p>
@ -80,11 +80,62 @@
</p>
<p>历史周转资金 {{ accountInfo.RealCost }}</p>
<p v-if="accountInfo.KLineUpRatioList && accountInfo.KLineUpRatioList[0]">
K线涨幅榜<span
v-for="(item, index) in accountInfo.KLineUpRatioList"
:key="index + '12'"
><span class="ratio" v-if="item.Ratio"
>{{ item.Ratio.toFixed(2) }}%</span
>
<span class="time">({{ item.Time }})</span>
{{
index == accountInfo.KLineUpRatioList.length - 1 ? "" : " → "
}}</span
>
</p>
<p
v-if="accountInfo.KLineLossRatioList && accountInfo.KLineLossRatioList[0]"
>
K线跌幅榜<span
v-for="(item, index) in accountInfo.KLineLossRatioList"
:key="index + '12'"
><span class="ratio" v-if="item.Ratio"
>{{ item.Ratio.toFixed(2) }}%</span
>
<span class="time">({{ item.Time }})</span>
{{
index == accountInfo.KLineLossRatioList.length - 1 ? "" : " → "
}}</span
>
</p>
<p
v-if="accountInfo.KLineLossRatioList && accountInfo.KLineLossRatioList[0]"
>
订单亏损榜<span
v-for="(item, index) in accountInfo.LossOrderRankList"
:key="index + '12'"
><span class="ratio" v-if="item.Ratio"
>{{ item.Ratio.toFixed(2) }}%</span
>
<span class="time">({{ item.Time }})</span>
{{
index == accountInfo.LossOrderRankList.length - 1 ? "" : " → "
}}</span
>
</p>
<p>购买交易数 {{ accountInfo.PurchaseTradeCount }}</p>
<p>卖出交易数 {{ accountInfo.SaleTradeCount }}</p>
<p>持仓成本 {{ accountInfo.TotalPurchasePrice }}</p>
<p>波段盈亏 {{ accountInfo.HistoryProfit }}</p>
<p>币本位盈亏 {{ accountInfo.BBWProfit }}</p>
<p>持币盈亏 {{ accountInfo.TotalPriceGap }}</p>
<p>浮动盈亏金额 {{ accountInfo.TotalPurchasePriceProfit }}</p>
<p>总借币利息 {{ accountInfo.TotalBorrowFee }}</p>
<p>总盈亏 {{ accountInfo.ZYK }}</p>
</div>
</template>
@ -99,4 +150,11 @@ export default {
};
</script>
<style></style>
<style>
.ratio {
color: brown;
}
.time {
color: bisque;
}
</style>

27
src/pages/ReCheck/OrderTable.vue

@ -33,8 +33,8 @@
</div>
<!-- 手持资金 -->
<div v-else-if="i.customSlot == 'CapitalAfter'">
<p>{{ scope.row.CapitalAfterPurchase || 0 }}</p>
<p>{{ scope.row.CapitalAfterSale || 0 }}</p>
<p>{{ scope.row.CapitalAfterPurchase.toFixed(2) || 0 }}</p>
<p>{{ scope.row.CapitalAfterSale.toFixed(2) || 0 }}</p>
</div>
<!-- 买卖时间 -->
<div v-else-if="i.customSlot == 'KLineId'">
@ -72,6 +72,22 @@
<p>{{ scope.row.TotalPurchasePrice || "-" }}</p>
<p>{{ scope.row.TotalSalePrice || "-" }}</p>
</div>
<!-- 借币金额 -->
<div v-else-if="i.customSlot == 'BorrowAmount'">
<p>{{ scope.row.BorrowAmount.toFixed(2) || "-" }}</p>
</div>
<!-- 借币利息 -->
<div v-else-if="i.customSlot == 'BorrowFee'">
<p>{{ scope.row.BorrowFee.toFixed(2) || "-" }}</p>
</div>
<!-- 借币比例 -->
<div v-else-if="i.customSlot == 'BorrowRatio'">
<p>{{ scope.row.BorrowRatio.toFixed(2) || "-" }}%</p>
</div>
<!-- 最大浮亏 -->
<div v-else-if="i.customSlot == 'MaxLossRatio'">
<p>{{ scope.row.MaxLossPrice || "-" }}</p>
@ -140,9 +156,4 @@ export default {
}
};
</script>
<style>
p {
word-break: break-all;
white-space: nowrap;
}
</style>
<style></style>

25
src/pages/ReCheck/index.vue

@ -133,8 +133,16 @@
v-model="trendForm"
></move-trend>
<div v-else-if="policyMode == 3">
<base-input v-model="vTForm.TradeCoinCount" label="币交易数量">
</base-input>
<base-input
v-model="vTForm.TradeCoinCount"
label="币交易数量"
></base-input>
<base-input v-model="vTForm.Balance" label="账户余额"></base-input>
<base-input
v-model="vTForm.MaxBorrowRatio"
label="最大借币比例"
></base-input>
<div>
<base-checkbox inline v-model="vTForm.IsEnableAdditionalQuantity">
启用增购
@ -261,7 +269,12 @@ export default {
lineSelect: "",
tradeColumns,
logColumns,
vTForm: { TradeCoinCount: 10, IsEnableAdditionalQuantity: false },
vTForm: {
TradeCoinCount: 10,
IsEnableAdditionalQuantity: false,
Balance: 10000,
MaxBorrowRatio: 20
},
logData: [],
PositionFund: 1,
RobotPolicyType,
@ -759,6 +772,8 @@ export default {
newExcelData.forEach(element => {
delete element.data;
delete element.accountInfo;
delete element.tradeData;
delete element.logData;
});
// -start
// let content = JSON.stringify({
@ -772,9 +787,11 @@ export default {
let params =
this.policyMode == 3
? {
TradeCoinCount: this.vTForm.TradeCoinCount,
TradeCoinCount: parseFloat(this.vTForm.TradeCoinCount),
IsEnableAdditionalQuantity: this.vTForm
.IsEnableAdditionalQuantity,
MaxBorrowRatio: this.vTForm.MaxBorrowRatio,
Balance: this.vTForm.Balance,
SymbolList: newExcelData
}
: {

46
src/pages/prePages/js/columns.js

@ -194,10 +194,28 @@ export const tradeColumns = [
key: "Count",
customSlot: "Count"
},
// {
// name: "订单投入本金",
// prop: "RealCost",
// key: "RealCost"
// },
{
name: "订单投入本金",
prop: "RealCost",
key: "RealCost"
name: "借币金额",
prop: "BorrowAmount",
key: "BorrowAmount",
customSlot: "BorrowAmount"
},
{
name: "借币利息",
prop: "BorrowFee",
key: "BorrowFee",
customSlot: "BorrowFee"
},
{
name: "借币比例",
prop: "BorrowRatio",
key: "BorrowRatio",
customSlot: "BorrowRatio"
},
{
name: "成交总价",
@ -205,18 +223,28 @@ export const tradeColumns = [
key: "Total",
customSlot: "Total"
},
{
name: "历史周转资金",
prop: "HistoryRealCost",
key: "HistoryRealCost"
// customSlot: "HistoryRealCost"
},
// {
// name: "历史周转资金",
// prop: "HistoryRealCost",
// key: "HistoryRealCost"
// // customSlot: "HistoryRealCost"
// },
{
name: "最大浮亏",
prop: "MaxLossRatio",
key: "MaxLossRatio",
customSlot: "MaxLossRatio"
},
{
name: "持币盈亏",
prop: "PriceGap",
key: "PriceGap"
},
{
name: "累计持币盈亏",
prop: "HistoryTotalPriceGap",
key: "HistoryTotalPriceGap"
},
{
name: "盈亏",
prop: "Profit",

Loading…
Cancel
Save