Commit d061f8b9 authored by wxk's avatar wxk

增加机器人账户搜索机器人、导出充提bugfix

parent 7f17940f
This diff is collapsed.
......@@ -75,6 +75,11 @@
</div>
</div>
</div>
<div v-show="!robotStatus" class="search-box">
<el-input v-model="robotAccount" placeholder="通过机器人账户搜索">
<el-button @click="searchByAccount" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<ul class="robots-box">
<li v-for="(item,index) in robotList" :key="item.tag"
:class="[(item.base_status==='abnormal' ||item.coin_status==='abnormal' || item.profit_status === 'abnormal') ? 'abnormal' : item.status || 'normal']">
......@@ -134,6 +139,8 @@
export default {
data() {
return {
robotAccount: '',//通过机器人账户搜索
_robotAccount: '',//说明通过机器人账户搜索成功
platform: '',//导航选中的交易所
value1: true, //是否开启机器人
robotStatus: '', //机器人状态
......@@ -176,6 +183,7 @@
this.currencies = this.currencies.length === 0 && sessionStorage.getItem('currencies') ? JSON.parse(sessionStorage.getItem('currencies')) : this.currencies;
this.init();
Bus.$on('refresh', ()=>{
this.robotAccount = this._robotAccount ='';
this.checkAll = false;
this.isIndeterminate = true;
this.foldExchange = true;
......@@ -259,8 +267,8 @@
Params.coin = Coin.length !== 0 ? Coin : this.checkedCurrencies;
Params.platform = Platform.length !== 0 ? Platform : this.checkedWebs;
Params.symbol = this.checkedPairs;
console.log(Params.platform)
}
Params = this._robotAccount!=='' ? {class: "robot", account: this._robotAccount} : Params;
this.getRobotList(Params);
}else {
this.getRobotList(this.RobotListParams);
......@@ -293,6 +301,7 @@
},
//交易所过滤
handleCheckAllChange(val) {
this.robotAccount = this._robotAccount ='';
this.checkedWebs = val ? this.webs : [];
this.isIndeterminate = false;
this.currencies = this.allCurrencies;
......@@ -305,6 +314,7 @@
this.getRobotList(ListParams);
},
handleCheckedChange(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll = checkedCount === this.webs.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.webs.length;
......@@ -332,6 +342,7 @@
},
//币种过滤
handleCheckAllChange0(val) {
this.robotAccount = this._robotAccount ='';
this.checkedCurrencies = val ? this.currencies : [];
this.isIndeterminate0 = false;
let ListParams = this.RobotListParams;
......@@ -340,6 +351,7 @@
this.getRobotList(ListParams);
},
handleCheckedChange0(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll0 = checkedCount === this.currencies.length;
this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length;
......@@ -350,11 +362,13 @@
},
//交易对过滤
handleCheckAllChange1(val) {
this.robotAccount = this._robotAccount ='';
this.checkedPairs = val ? this.pairs : [];
this.isIndeterminate1 = false;
this.getRobotList(this.RobotListParams);
},
handleCheckedChange1(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll1 = checkedCount === this.pairs.length;
this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.pairs.length;
......@@ -388,6 +402,7 @@
},
//通过机器人状态筛选
statusFilter(status) {
this.robotAccount = this._robotAccount ='';
this.robotStatus = status;
this.subtitle = status === 'normal' ? '正在运行机器人' :
(status === 'stop' ? '停止运行机器人' :
......@@ -427,7 +442,38 @@
default:
break
}
}
},
//通过机器人账户搜索
searchByAccount() {
if (!this.robotAccount) {
this.$notify({
title: '错误',
message: "请先输入账户地址后再试",
type: 'error',
duration:'2000',
});
return;
}
this.checkAll = false;
this.isIndeterminate = true;
this.foldExchange = true;
this.checkAll0 = false;
this.isIndeterminate0 = true;
this.foldExchange0 = true;
this.checkAll1 = false;
this.checkedPairs = [];
this.isIndeterminate1 = true;
this.foldExchange1 = true;
this.checkedWebs = [];
this.checkedCurrencies = [];
this.checkedPairs = [];
let Params = {
class:"robot", //账户级别 有robot bank admin三个返回数据也不同
account: this.robotAccount,
}
this._robotAccount = this.robotAccount;
this.getRobotList(Params);
},
},
watch:{
platInfo(val){
......@@ -687,6 +733,10 @@
font-size: 20px;
margin-top: 100px;
}
.search-box {
width: 600px;
margin: -20px 0 20px 0;
}
</style>
<style>
/*select组件样式覆盖*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment