diff --git a/src/views/admin/line-order-template-logs/index.vue b/src/views/admin/line-order-template-logs/index.vue index a4e750a..463ffa7 100644 --- a/src/views/admin/line-order-template-logs/index.vue +++ b/src/views/admin/line-order-template-logs/index.vue @@ -337,6 +337,9 @@ + @@ -623,6 +626,20 @@ export default { computed: { comSymbols() { return this.form.type === 2 ? this.symbolGroups : this.symbol.symbolList + }, + comPrice() { + // (this.form.price-?)/? *100 + '%' + // 主单委托实际价下 获取交易对行情价 + const { symbol, price, price_pattern } = this.inForm + if (symbol && price_pattern === 'mixture') { + const s = this.comSymbols.find(item => item.symbol === symbol) + if (s) { + const res = ((price - s.lastPrice) / s.lastPrice) * 100 + return `${res}%` + } + return 0 + } + return 0 } }, created() { @@ -662,6 +679,7 @@ export default { } }, onchangeSymbol() { + this.inForm.price = 0 if (this.inForm.price_pattern === 'aicoin') { aicoinSymbol({ symbol: this.inForm.symbol, symbolType: this.inForm.symbol_type }).then(res => { this.aicoinPrice = undefined diff --git a/src/views/admin/line-order/index.vue b/src/views/admin/line-order/index.vue index 1dbe212..86d8d2e 100644 --- a/src/views/admin/line-order/index.vue +++ b/src/views/admin/line-order/index.vue @@ -70,8 +70,8 @@ @keyup.enter.native="handleQuery" /> - - - - - - - - - @@ -1089,7 +1063,7 @@ export default { rate: undefined, site: undefined, orderSn: undefined, - orderType: undefined, + symbolType: undefined, idOrder: 'desc', addPositionStatus: -1, hedgeStatus: -1, diff --git a/src/views/admin/line-pre-order/index.vue b/src/views/admin/line-pre-order/index.vue index 2bc1440..169fbec 100644 --- a/src/views/admin/line-pre-order/index.vue +++ b/src/views/admin/line-pre-order/index.vue @@ -71,8 +71,8 @@ @keyup.enter.native="handleQuery" /> - {{ status[row.status] ? status[row.status].l : '' }} - - - {{ ['未减仓','已减仓'][row.reduce_status] }} + + + + @@ -1385,7 +1388,7 @@ export default { rate: undefined, site: undefined, orderSn: undefined, - orderType: undefined, + symbolType: undefined, idOrder: 'desc', addPositionStatus: -1, hedgeStatus: -1, @@ -1484,6 +1487,20 @@ export default { return {} } } + }, + comPrice() { + // (this.form.price-?)/? *100 + '%' + // 主单委托实际价下 获取交易对行情价 + const { symbol, price, price_pattern } = this.form + if (symbol && price_pattern === 'mixture') { + const s = this.comSymbols.find(item => item.symbol === symbol) + if (s) { + const res = ((price - s.lastPrice) / s.lastPrice) * 100 + return `${res}%` + } + return 0 + } + return 0 } }, watch: { @@ -1541,6 +1558,7 @@ export default { }, methods: { onchangeSymbol() { + this.form.price = 0 if (this.form.price_pattern === 'aicoin') { aicoinSymbol({ symbol: this.form.symbol, symbolType: this.form.symbol_type }).then(res => { this.aicoinPrice = undefined diff --git a/src/views/admin/line-symbol-group/index.vue b/src/views/admin/line-symbol-group/index.vue index 7711e12..2908352 100644 --- a/src/views/admin/line-symbol-group/index.vue +++ b/src/views/admin/line-symbol-group/index.vue @@ -208,7 +208,6 @@ @@ -360,6 +359,7 @@ export default { /** 新增按钮操作 */ handleAdd() { this.reset() + this.getSymbol() this.open = true this.title = '添加交易对组列表' this.isEdit = false