This commit is contained in:
shilin
2025-02-21 11:53:37 +08:00
parent 009d7cb8af
commit 1380bee2bd
3 changed files with 283 additions and 278 deletions

Binary file not shown.

View File

@ -504,6 +504,7 @@
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" :close-on-click-modal="false">
<div v-loading="formLoading">
<el-form ref="form" :model="form" :rules="rules" label-width="180px" style="height: 600px;overflow: hidden auto;">
<el-form-item label="交易所" prop="exchange_type">
<el-select
@ -858,10 +859,11 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer" style="text-align: right;">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</div>
</el-dialog>
<!-- 设置杠杆 保证金模式 -->
<el-dialog :title="mode.modeTitle" :visible.sync="mode.modeOpen" width="700px" :close-on-click-modal="false">
@ -1461,7 +1463,8 @@ export default {
aicoinPrice: '',
// 回本止盈点
ext: [],
re_take_profit_ratio: 0
re_take_profit_ratio: 0,
formLoading: false
}
},
computed: {
@ -1961,6 +1964,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd(title) {
this.formLoading = false
this.ext = []
this.re_take_profit_ratio = 0
this.title = title || '添加委托管理'
@ -1991,6 +1995,7 @@ export default {
submitForm: function() {
this.$refs['form'].validate(valid => {
if (valid) {
this.formLoading = true
if (this.form.price) {
this.form.price = String(this.form.price)
}
@ -1998,10 +2003,12 @@ export default {
if (this.form.id !== undefined) {
updateLinePreOrder(this.form).then(response => {
if (response.code === 200) {
this.formLoading = false
this.msgSuccess(response.msg)
this.open = false
this.getList()
} else {
this.formLoading = false
this.msgError(response.msg)
}
})
@ -2011,10 +2018,12 @@ export default {
delete params.symbol
batchAddOrder(params).then(response => {
if (response.code === 200) {
this.formLoading = false
this.msgSuccess(response.msg)
this.open = false
this.getList()
} else {
this.formLoading = false
this.msgError(response.msg)
}
})
@ -2029,10 +2038,12 @@ export default {
api_id: this.form.api_id.toString()
}).then(response => {
if (response.code === 200) {
this.formLoading = false
this.msgSuccess(response.msg)
this.open = false
this.getList()
} else {
this.formLoading = false
this.msgError(response.msg)
}
})

View File

@ -161,13 +161,13 @@
/>
</el-form-item> -->
<el-form-item label="类型" prop="type">
<el-radio-group v-model="form.type">
<el-radio-group v-model="form.type" @change="onchangeForm">
<el-radio label="1">现货</el-radio>
<el-radio label="2">合约</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="交易对" prop="curChange">
<el-radio-group v-model="curChange" @change="form.symbol=undefined">
<el-radio-group v-model="curChange" @change="form.symbol = undefined">
<el-radio :label="1">输入</el-radio>
<el-radio :label="2">选择</el-radio>
</el-radio-group>
@ -282,13 +282,6 @@ export default {
curChange: 1
}
},
watch: {
'form.type'() {
this.form.symbol = undefined
this.getSymbol({})
}
},
created() {
this.getList()
// 获取交易所字典数据
@ -384,6 +377,7 @@ export default {
row.id || this.ids
getLineSymbolGroup(id).then(response => {
this.form = response.data
// this.form.symbol = response.data.symbol ? response.data.symbol.split(',') : undefined
this.getSymbol()
this.open = true
this.title = '修改交易对组列表'