|
|
@@ -38,21 +38,23 @@ export function useTradeAccount() {
|
|
|
const account = res[i];
|
|
|
const positionList: TradePosition[] = [];
|
|
|
|
|
|
- // 获取账户下的期货持仓列表
|
|
|
- await queryErmcpTradePosition({ accountID: account.accountid }).then((res) => {
|
|
|
- res.forEach((item) => {
|
|
|
- positionList.push({
|
|
|
- ...item,
|
|
|
- ...calcPositionValue(item),
|
|
|
+ if (account.tradestatus === 1) {
|
|
|
+ // 获取账户下的期货持仓列表
|
|
|
+ await queryErmcpTradePosition({ accountID: account.accountid }).then((res) => {
|
|
|
+ res.forEach((item) => {
|
|
|
+ positionList.push({
|
|
|
+ ...item,
|
|
|
+ ...calcPositionValue(item),
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
- })
|
|
|
|
|
|
- tmpAccountList.push({
|
|
|
- positionList,
|
|
|
- ...account,
|
|
|
- ...calcCapitalValue(account, positionList),
|
|
|
- })
|
|
|
+ tmpAccountList.push({
|
|
|
+ positionList,
|
|
|
+ ...account,
|
|
|
+ ...calcCapitalValue(account, positionList),
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
tradeAccountList.length = 0;
|