From 3ba3fdf18b2bbb3641ecc1049cb781684d7bec7d Mon Sep 17 00:00:00 2001 From: lizhixin <382352532@qq.com> Date: Thu, 22 Jul 2021 22:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E8=AE=A2=E5=8D=95/s?= =?UTF-8?q?tatics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MainSec/OrderTable.vue | 80 +++++++++++++++++--------- src/pages/ReCheck/AccountInfo.vue | 3 +- src/pages/prePages/js/columns.js | 20 +++---- src/pages/prePages/js/selectoptions.js | 15 +++++ 4 files changed, 80 insertions(+), 38 deletions(-) diff --git a/src/pages/MainSec/OrderTable.vue b/src/pages/MainSec/OrderTable.vue index 5a3cd5c..a5d6a0d 100644 --- a/src/pages/MainSec/OrderTable.vue +++ b/src/pages/MainSec/OrderTable.vue @@ -1,13 +1,24 @@ @@ -245,7 +256,7 @@ import { } from "../../pages/prePages/js/columns"; import CustomBaseTable from "../../components/CustomBaseTable"; import Bus from "../../common/bus"; - +import { OrderStatus } from "../../pages/prePages/js/selectoptions"; import { sendSock, initWebSocket, @@ -266,6 +277,8 @@ export default { }, data() { return { + OrderStatus, + staticForm: {}, secondTradeColumns, activeName: "first", OrderColumns, @@ -281,6 +294,7 @@ export default { created() { // this.initOrders(); //初始化两个订单列表 this.initHistoryOrders(); + this.initStatics(); }, mounted() { @@ -296,6 +310,15 @@ export default { }, methods: { + initStatics() { + this.$http + .get("/Api/Robot/GetRobotAccountStatistics?robotId=" + this.RobotId) + .then(res => { + if (res.Code == 200) { + this.staticForm = res.Data; + } + }); + }, latestOrder() { this.$http.get("/Api/Order/GetSpotOrderList"); }, @@ -530,4 +553,9 @@ export default { height: 800px; overflow: auto; } +.text-eclipse { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} diff --git a/src/pages/ReCheck/AccountInfo.vue b/src/pages/ReCheck/AccountInfo.vue index de5868f..1cb3df1 100644 --- a/src/pages/ReCheck/AccountInfo.vue +++ b/src/pages/ReCheck/AccountInfo.vue @@ -126,10 +126,9 @@ }}

- +

胜率: {{ accountInfo.WinningProbability }}%

购买交易数: {{ accountInfo.PurchaseTradeCount }}

卖出交易数: {{ accountInfo.SaleTradeCount }}

-

持仓成本: {{ accountInfo.TotalPurchasePrice }}

波段盈亏 :{{ accountInfo.HistoryProfit }}

币本位盈亏: {{ accountInfo.BBWProfit }}

diff --git a/src/pages/prePages/js/columns.js b/src/pages/prePages/js/columns.js index fbf0679..0e46c28 100644 --- a/src/pages/prePages/js/columns.js +++ b/src/pages/prePages/js/columns.js @@ -283,9 +283,9 @@ export const secondTradeColumns = [ }, { name: "委托数量", - prop: "Count", - key: "Count", - customSlot: "Count", + prop: "WCount", + key: "WCount", + customSlot: "WCount", width: 80 }, { @@ -320,7 +320,7 @@ export const secondTradeColumns = [ name: "借币金额", prop: "BorrowAmount", key: "BorrowAmount", - customSlot: "BorrowAmount", + customSlot: "LoanAmount", width: 80 }, @@ -328,14 +328,14 @@ export const secondTradeColumns = [ name: "借币比例", prop: "BorrowRatio", key: "BorrowRatio", - customSlot: "BorrowRatio", + customSlot: "LoanRatio", width: 80 }, { name: "借币利息", prop: "BorrowFee", key: "BorrowFee", - customSlot: "BorrowFee", + customSlot: "LoanFee", width: 80 }, { @@ -355,10 +355,9 @@ export const secondTradeColumns = [ }, { name: "波段总盈亏", - prop: "TotalProfit", + prop: "HistoryTotalProfit", fixed: true, - key: "TotalProfit", - customSlot: "TotalProfit", + key: "HistoryTotalProfit", width: 100 }, { @@ -383,7 +382,8 @@ export const secondTradeColumns = [ name: "时间", prop: "purchaseKLineId", key: "purchaseKLineId", - customSlot: "KLineId" + customSlot: "KLineId", + width: 150 } ]; diff --git a/src/pages/prePages/js/selectoptions.js b/src/pages/prePages/js/selectoptions.js index 6714ce2..c6bf9c1 100644 --- a/src/pages/prePages/js/selectoptions.js +++ b/src/pages/prePages/js/selectoptions.js @@ -140,3 +140,18 @@ export const LogTypes = [ { title: "空交叉", value: 11 }, { title: "订单回调", value: 100 } ]; + +export const OrderStatus = [ + { title: "已挂买单市价", value: 0 }, + { title: "已挂买单限价", value: 1 }, + { title: "部分购买", value: 2 }, + { title: "已购买", value: 3 }, + { title: "部分购买被撤销", value: 4 }, + { title: "购买被撤销", value: 5 }, + { title: "已挂卖单市价", value: 6 }, + { title: "已挂卖单限价", value: 7 }, + { title: "部分卖出", value: 8 }, + { title: "已卖出", value: 9 }, + { title: "部分卖出已撤销", value: 10 }, + { title: "卖出已撤销", value: 11 } +];