diff --git a/src/api/admin/line-pre-order.js b/src/api/admin/line-pre-order.js index e4ac232..df931a5 100644 --- a/src/api/admin/line-pre-order.js +++ b/src/api/admin/line-pre-order.js @@ -134,3 +134,20 @@ export function getOrderPage(params) { }) } +// aicoin买入点 +export function aiCoinPrice(data) { + return request({ + url: '/api/v1/line-pre-order/aiCoinPrice', + method: 'post', + data + }) +} +// aicoin交易对 +export function aicoinSymbol(params) { + return request({ + url: '/api/v1/line-direction/symbol', + method: 'get', + params + }) +} + diff --git a/src/views/admin/line-order-template-logs/index.vue b/src/views/admin/line-order-template-logs/index.vue index abe5bff..a081c27 100644 --- a/src/views/admin/line-order-template-logs/index.vue +++ b/src/views/admin/line-order-template-logs/index.vue @@ -182,7 +182,7 @@ /> - + - - - - 现货 - 合约 + + + + + + + + + 现货 + 合约 - + @@ -258,6 +276,7 @@ :remote-method="getSymbol" :loading="searchLoding" size="small" + @change="onchangeSymbol" > - + 百分比 主单实价委托百分比 + aiCoin买入点 @@ -308,7 +328,16 @@ + > + + @@ -320,7 +349,7 @@ 计算 - + 限价 市价 - + 最新价 - 标记价 + 标记价 + aicoin @@ -411,6 +441,50 @@ 直接执行 + + + + + + + + + + + + + + + 新增 + +
+ + +
加仓类型
+ + 限价 + 市价 + +
+ +
加仓方式
+ + 百分比 + 实际金额 + +
+ 加仓数值 + 加仓价格百分比 + 加仓后止盈百分比 +
+ + 减仓价格百分比 + 减仓数量百分比 + 减仓后止盈百分比 + 减仓后止损百分比 +
删除 + +
@@ -305,7 +306,7 @@ :show-overflow-tooltip="true" > - {{ ['未加仓','已加仓'][row.addPositionStatus] }} - + --> 0) { - for (const x in this.cacheRefresh) { - // 当前的刷新 - if (`${row.symbol}${row.id}` === x) { - const curr = this.cacheRefresh[`${symbol}${id}`] - curr.expandCount++ - // 如果是展开状态,且展开次数大于1,且上一次的状态为折叠,则请求api数据,不需要更新子菜单 - if (expanded && curr.expandCount > 1 && !curr.prevStatus) { - getChildOrder({ id }).then(res => { - curr.resolve(res.data) - }).finally(() => {}) - } - curr.expandCount = 1 - curr.prevStatus = expanded - } else { - if (this.cacheRefresh[x].prevStatus) { - const flag = this.linePreOrderList.findIndex(item => `${item.symbol}${item.id}` === x) - this.cacheRefresh[x].expandCount = 0 - this.cacheRefresh[x].prevStatus = false - this.$refs.table.toggleRowExpansion(this.linePreOrderList[flag], false) - } - } - } - } + // // 查询后更新数据 + // if (Object.keys(row).length > 0) { + // for (const x in this.cacheRefresh) { + // // 当前的刷新 + // if (`${row.symbol}${row.id}` === x) { + // const curr = this.cacheRefresh[`${symbol}${id}`] + // curr.expandCount++ + // // 如果是展开状态,且展开次数大于1,且上一次的状态为折叠,则请求api数据,不需要更新子菜单 + // if (expanded && curr.expandCount > 1 && !curr.prevStatus) { + // getChildOrder({ id }).then(res => { + // curr.resolve(res.data) + // }).finally(() => {}) + // } + // curr.expandCount = 1 + // curr.prevStatus = expanded + // } else { + // if (this.cacheRefresh[x].prevStatus) { + // const flag = this.linePreOrderList.findIndex(item => `${item.symbol}${item.id}` === x) + // this.cacheRefresh[x].expandCount = 0 + // this.cacheRefresh[x].prevStatus = false + // this.$refs.table.toggleRowExpansion(this.linePreOrderList[flag], false) + // } + // } + // } + // } }, // 获取子数据 onLoadChild(tree, treeNode, resolve) { - const { symbol, id } = tree - this.currentExpandId = tree.id - this.cacheRefresh[`${symbol}${id}`] = {} - this.cacheRefresh[`${symbol}${id}`].resolve = resolve - this.cacheRefresh[`${symbol}${id}`].expandCount = 0 + const { id } = tree + // this.currentExpandId = tree.id + // this.cacheRefresh[`${symbol}${id}`] = {} + // this.cacheRefresh[`${symbol}${id}`].resolve = resolve + // this.cacheRefresh[`${symbol}${id}`].expandCount = 0 getChildOrder({ id }).then(res => { - resolve(res.data) + const r = res.data.map((item) => ({ ...item, hasChildren: item.child_num > 0 })) + resolve(r) }).finally(() => {}) }, /** 查询参数列表 */ @@ -1326,13 +1317,13 @@ export default { this.linePreOrderList = response.data.list.map(item => ({ ...item, hasChildren: true })) this.total = response.data.count // 查询后更新数据 - for (const x in this.cacheRefresh) { - const flag = this.linePreOrderList.findIndex(item => `${item.symbol}${item.id}` === x) - if (flag !== -1 && this.cacheRefresh[x].prevStatus) { - this.$refs.table && this.$refs.table.toggleRowExpansion(this.linePreOrderList[flag], false) - this.$refs.table && this.$refs.table.toggleRowExpansion(this.linePreOrderList[flag], true) - } - } + // for (const x in this.cacheRefresh) { + // const flag = this.linePreOrderList.findIndex(item => `${item.symbol}${item.id}` === x) + // if (flag !== -1 && this.cacheRefresh[x].prevStatus) { + // this.$refs.table && this.$refs.table.toggleRowExpansion(this.linePreOrderList[flag], false) + // this.$refs.table && this.$refs.table.toggleRowExpansion(this.linePreOrderList[flag], true) + // } + // } this.loading = false }) }, diff --git a/src/views/admin/line-pre-order/index.vue b/src/views/admin/line-pre-order/index.vue index ff97e05..33e31e8 100644 --- a/src/views/admin/line-pre-order/index.vue +++ b/src/views/admin/line-pre-order/index.vue @@ -35,7 +35,7 @@ @keyup.enter.native="handleQuery" /> - - + --> @@ -264,7 +265,7 @@ :show-overflow-tooltip="true" > - - + + 合约 - + + 合约对现货 - + --> @@ -573,6 +575,7 @@ :loading="searchLoding" remote size="small" + @change="onchangeSymbol" > 百分比 主单实价委托百分比 + aiCoin买入点 @@ -623,7 +627,16 @@ + > + +
@@ -641,13 +654,13 @@ placeholder="止盈百分比" /> - + + - + - + 现货 合约 @@ -1086,7 +1144,7 @@ placeholder="请选择交易对" clearable filterable - :remote-method="(e)=>getSymbol(e,positionForm.close_type,positionForm.exchangeType)" + :remote-method="(e)=>getSymbol(e,positionForm.close_type,positionForm.exchange_type)" :loading="searchLoding" remote size="small" @@ -1105,7 +1163,7 @@ layout="prev, pager, next" :page.sync="symbol.pageIndex" :limit.sync="symbol.pageSize" - @pagination="getSymbol($event,positionForm.close_type,positionForm.exchangeType)" + @pagination="getSymbol($event,positionForm.close_type,positionForm.exchange_type)" />
@@ -1179,7 +1237,7 @@