code
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -18,6 +18,8 @@ selenium-debug.log | ||||
| *.njsproj | ||||
| *.sln | ||||
| *.local | ||||
| *.rar | ||||
| *.zip | ||||
|  | ||||
| package-lock.json | ||||
| yarn.lock | ||||
|  | ||||
| @ -665,7 +665,7 @@ export default { | ||||
|     }, | ||||
|     onchangePattern(init = true) { | ||||
|       if (this.inForm.price_pattern === 'aicoin') { | ||||
|         init && (this.inForm.price = '') | ||||
|         init && (this.inForm.price = '0') | ||||
|         init && (this.inForm.price_type = 'aicoin') | ||||
|         this.aicoinPrice = undefined | ||||
|         if (this.inForm.symbol) { | ||||
| @ -683,8 +683,12 @@ export default { | ||||
|       if (this.inForm.price_pattern === 'aicoin') { | ||||
|         aicoinSymbol({ symbol: this.inForm.symbol, symbolType: this.inForm.symbol_type }).then(res => { | ||||
|           this.aicoinPrice = undefined | ||||
|           this.inForm.price = undefined | ||||
|           this.inForm.price = 0 | ||||
|           this.aicoins = res.data | ||||
|         }).catch(() => { | ||||
|           this.aicoinPrice = undefined | ||||
|           this.inForm.price = 0 | ||||
|           this.aicoins = {} | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
| @ -719,7 +723,7 @@ export default { | ||||
|         this.inForm.api_id = [] | ||||
|         return false | ||||
|       } | ||||
|       this.inForm.api_id = this.userIdOptions.map(item => item.key) | ||||
|       this.inForm.api_id = this.lineUsers.map(item => item.id + '') | ||||
|     }, | ||||
|     // 获取杠杆api用户 | ||||
|     getListLineApiUser(exchangeType) { | ||||
| @ -859,6 +863,10 @@ export default { | ||||
|         this.getListLineApiUser() | ||||
|         this.form.type === 2 && this.getSymbolGroup(this.inForm.symbol_type) | ||||
|         this.form.type === 1 && this.onCalculate() | ||||
|         // 获取交易对用于计算 | ||||
|         if (this.inForm.price_pattern === 'mixture') { | ||||
|           this.getSymbol(this.inForm.symbol) | ||||
|         } | ||||
|         this.open = true | ||||
|         this.title = '修改委托下单模板' | ||||
|         this.isEdit = true | ||||
|  | ||||
| @ -407,6 +407,15 @@ | ||||
|             width="200" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /> | ||||
|           <el-table-column | ||||
|             label="触发时间" | ||||
|             align="center" | ||||
|             prop="triggerTime" | ||||
|             width="150" | ||||
|             :show-overflow-tooltip="true" | ||||
|           > | ||||
|             <template #default="{row}">{{ row.triggerTime && parseTime(row.triggerTime) }}</template> | ||||
|           </el-table-column> | ||||
|           <el-table-column | ||||
|             label="过期时间" | ||||
|             align="center" | ||||
|  | ||||
| @ -425,6 +425,15 @@ | ||||
|             width="200" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /> | ||||
|           <el-table-column | ||||
|             label="触发时间" | ||||
|             align="center" | ||||
|             prop="triggerTime" | ||||
|             width="150" | ||||
|             :show-overflow-tooltip="true" | ||||
|           > | ||||
|             <template #default="{row}">{{ row.triggerTime && parseTime(row.triggerTime) }}</template> | ||||
|           </el-table-column> | ||||
|           <el-table-column | ||||
|             label="过期时间" | ||||
|             align="center" | ||||
| @ -1403,6 +1412,7 @@ export default { | ||||
|         reduce_num: [{ required: true, message: '主单减仓数量百分比不能为空', trigger: 'blur' }], | ||||
|         reduce_take_profit: [{ required: true, message: '主单减仓后止盈价百分比不能为空', trigger: 'blur' }], | ||||
|         // reduce_stop_price: [{ required: true, message: '主单减仓后止损价不能为空', trigger: 'blur' }], | ||||
|         buy_price: [{ required: true, message: '购买金额不能为空', trigger: 'blur' }], | ||||
|         exchange_type: [{ required: true, message: '交易所不能为空', trigger: 'blur' }], | ||||
|         api_id: [{ required: true, message: 'api用户不能为空', trigger: 'blur' }], | ||||
|         symbol: [{ required: true, message: '交易对不能为空', trigger: 'blur' }], | ||||
| @ -1524,7 +1534,7 @@ export default { | ||||
|     'form.price_pattern'(newValue) { | ||||
|       if (newValue === 'aicoin') { | ||||
|         this.aicoinPrice = undefined | ||||
|         this.form.price = undefined | ||||
|         this.form.price = 0 | ||||
|         this.form.price_type = 'aicoin' | ||||
|         if (this.form.symbol) { | ||||
|           aicoinSymbol({ symbol: this.form.symbol, symbolType: this.form.symbol_type }).then(res => { | ||||
| @ -1564,6 +1574,10 @@ export default { | ||||
|           this.aicoinPrice = undefined | ||||
|           this.form.price = undefined | ||||
|           this.aicoins = res.data | ||||
|         }).catch(() => { | ||||
|           this.aicoinPrice = undefined | ||||
|           this.form.price = 0 | ||||
|           this.aicoins = {} | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
| @ -1617,7 +1631,7 @@ export default { | ||||
|         this.form.api_id = [] | ||||
|         return false | ||||
|       } | ||||
|       this.form.api_id = this.apiIdOptions.map(item => item.key) | ||||
|       this.form.api_id = this.lineUsers.map(item => item.id) | ||||
|     }, | ||||
|     onAll() { | ||||
|       if (this.modeForm.api_user_ids && this.modeForm.api_user_ids.length > 0) { | ||||
| @ -2021,14 +2035,14 @@ 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) | ||||
|               } | ||||
|             }).finally(() => { | ||||
|               this.formLoading = false | ||||
|             }) | ||||
|           } else { | ||||
|             if (this.title === '批量添加') { | ||||
| @ -2036,14 +2050,14 @@ 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) | ||||
|                 } | ||||
|               }).finally(() => { | ||||
|                 this.formLoading = false | ||||
|               }) | ||||
|               return false | ||||
|             } | ||||
| @ -2056,14 +2070,15 @@ 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.formLoadng = false | ||||
|                 this.msgError(response.msg) | ||||
|               } | ||||
|             }).finally(() => { | ||||
|               this.formLoading = false | ||||
|             }) | ||||
|           } | ||||
|         } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 shilin
					shilin