diff --git a/src/views/admin/line-api-user/index.vue b/src/views/admin/line-api-user/index.vue index 6cba3f8..ac301da 100644 --- a/src/views/admin/line-api-user/index.vue +++ b/src/views/admin/line-api-user/index.vue @@ -56,7 +56,18 @@ align="center" prop="apiName" :show-overflow-tooltip="true" - /> + + + {{ exchangeTypeFormat(row) }} + + + --> + + + + + { + this.exchangeTypes = response.data + }) }, methods: { + exchangeTypeFormat(row) { + return this.selectDictLabel(this.exchangeTypes, row.exchangeType) + }, /** 查询参数列表 */ getList() { this.loading = true @@ -339,7 +377,7 @@ export default { // 表单重置 reset() { this.form = { - + exchangeType: this.exchangeTypes.length ? this.exchangeTypes[0].value : '', id: undefined, userId: undefined, jysId: undefined, diff --git a/src/views/admin/line-pre-order/index.vue b/src/views/admin/line-pre-order/index.vue index a91321a..90c8b56 100644 --- a/src/views/admin/line-pre-order/index.vue +++ b/src/views/admin/line-pre-order/index.vue @@ -334,6 +334,32 @@ prop="desc" :show-overflow-tooltip="true" /> + + + + {{ ['未对冲','已对冲'][row.hedgeStatus] }} + + + + + + + {{ ['未加仓','已加仓'][row.addPositionStatus] }} + + + - + + + + + 现货 @@ -442,9 +484,10 @@ + 无对冲 现货对合约 合约对合约 - 合约对现货 + @@ -581,7 +624,7 @@ placeholder="亏损百分比" /> - + 限价 @@ -618,7 +661,7 @@ 市价 - + 最新价 @@ -1119,6 +1162,7 @@ export default { }, // 表单校验 rules: { + exchange_type: [{ required: true, message: '交易所不能为空', trigger: 'blur' }], api_id: [{ required: true, message: 'api用户不能为空', trigger: 'blur' }], symbol: [{ required: true, message: '交易对不能为空', trigger: 'blur' }], symbol_group_id: [{ required: true, message: '交易对组不能为空', trigger: 'blur' }], @@ -1170,7 +1214,8 @@ export default { symbol: undefined, order_sn: undefined }, - btnLoading: false + btnLoading: false, + exchangeTypes: [] } }, computed: { @@ -1231,6 +1276,10 @@ export default { this.getLineApiUserItems() this.getSymbolGroup() this.getListLineApiUser() + // 获取交易所字典数据 + this.getDicts('exchange_type').then(response => { + this.exchangeTypes = response.data + }) }, methods: { onSelectAll() { @@ -1249,7 +1298,7 @@ export default { }, // 获取杠杆api用户 getListLineApiUser() { - listLineApiUser({ pageIndex: 1, pageSize: 999 }).then(response => { + listLineApiUser({ pageIndex: 1, pageSize: 999, exchangeType: this.form.exchangeType }).then(response => { this.lineUsers = response.data.list this.lineTotal = response.data.count }) @@ -1260,7 +1309,7 @@ export default { const { pageIndex } = this.symbol const symbol = typeof e === 'object' ? '' : e const apiCall = this.title === '添加委托管理' && ([1, 3].includes(this.form.cover_type)) ? getSameSymbol : listLineSymbol - apiCall({ pageIndex, pageSize: 6, type: type || this.form.order_type, symbol }).then(res => { + apiCall({ pageIndex, pageSize: 6, type: type || this.form.order_type, symbol, exchangeType: this.form.exchangeType }).then(res => { this.symbol.total = res.data.count this.symbol.symbolList = res.data.list }).finally(() => { @@ -1269,7 +1318,7 @@ export default { }, // 获取交易对组 getSymbolGroup(type = 2) { - listLineSymbolGroup({ pageIndex: 1, pageSize: 999, beginTime: undefined, endTime: undefined, type }).then(res => { + listLineSymbolGroup({ pageIndex: 1, pageSize: 999, beginTime: undefined, endTime: undefined, type, exchangeType: this.form.exchangeType }).then(res => { this.symbolGroups = res.data.list }) }, @@ -1526,6 +1575,7 @@ export default { close_type: undefined, direction: undefined, + exchange_type: this.exchangeTypes.length ? this.exchangeTypes[0].value : '', scale_type: 2, main_order_type: 'LIMIT', hedge_order_type: 'LIMIT', diff --git a/src/views/dev-tools/gen/index.vue b/src/views/dev-tools/gen/index.vue index 39a166d..cb314ff 100644 --- a/src/views/dev-tools/gen/index.vue +++ b/src/views/dev-tools/gen/index.vue @@ -109,38 +109,35 @@ icon="el-icon-view" @click="handlePreview(scope.row)" >预览 - 代码生成 + 代码生成 - 生成配置 - - - 生成迁移脚本 - - 删除 + 生成配置 + 生成迁移脚本 + 删除 @@ -159,7 +156,7 @@ - + {{ key.substring(key.lastIndexOf('/')+1,key.indexOf('.go.template')) }}