Commit 4def5356 authored by wxk's avatar wxk

第一版测试

parent 2621048a
...@@ -488,7 +488,7 @@ ...@@ -488,7 +488,7 @@
}, },
props: ['robotDetailInfo','robotBankList'], props: ['robotDetailInfo','robotBankList'],
created() { created() {
this.init();
}, },
methods: { methods: {
//页面初始化 //页面初始化
...@@ -569,10 +569,8 @@ ...@@ -569,10 +569,8 @@
type: 'success', type: 'success',
duration:'2000', duration:'2000',
}); });
setTimeout(()=>{ this.Loading = false;
this.Loading = false; this.init();
this.init();
},1000);
}else{ }else{
this.$notify({ this.$notify({
title: '提示', title: '提示',
...@@ -589,7 +587,7 @@ ...@@ -589,7 +587,7 @@
this.recharge_list_value = ''; this.recharge_list_value = '';
this.transferok = false; this.transferok = false;
}).catch(err=>{ }).catch(err=>{
console.log(err) // console.log(err)
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: "操作失败,请稍后重试!", message: "操作失败,请稍后重试!",
...@@ -648,8 +646,8 @@ ...@@ -648,8 +646,8 @@
size: this.pageSize1+'', size: this.pageSize1+'',
opt: this.checkedOptions1, opt: this.checkedOptions1,
status: this.checkedStates1, status: this.checkedStates1,
min_time: this.transactionTime ? this.transactionTime[0] : '', min_time: this.transactionTime1 ? this.transactionTime1[0] : '',
max_time: this.transactionTime ? this.transactionTime[1] : '', max_time: this.transactionTime1 ? this.transactionTime1[1] : '',
}; };
params = Object.assign({},baseParams,params); params = Object.assign({},baseParams,params);
axios.post(ApiConfig.Records, params).then( res => { axios.post(ApiConfig.Records, params).then( res => {
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
</ul> </ul>
<p v-if="robotList === null" class="no-data">暂无数据</p> <p v-if="robotList === null" class="no-data">暂无数据</p>
</div> </div>
<robot-details v-show="robotDetails" :robotDetailInfo="robotDetailInfo" :robotBankList="robotBankList"></robot-details> <robot-details v-if="robotDetails" :robotDetailInfo="robotDetailInfo" :robotBankList="robotBankList"></robot-details>
</div> </div>
</template> </template>
...@@ -147,6 +147,14 @@ ...@@ -147,6 +147,14 @@
robotDetails: false, //是否查看机器人详情 robotDetails: false, //是否查看机器人详情
robotStatus: '', //机器人状态 robotStatus: '', //机器人状态
robotStatusList: [],//状态预警信息 robotStatusList: [],//状态预警信息
RobotListParams: {
class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [] //交易所种类 可选参数
},//筛选机器人参数
robotList: [],//符合条件的机器人列表 robotList: [],//符合条件的机器人列表
robotDetailInfo: '', robotDetailInfo: '',
subtitle: '所有机器人', //副标题 subtitle: '所有机器人', //副标题
...@@ -205,26 +213,20 @@ ...@@ -205,26 +213,20 @@
const RoutePath = this.$route.params.name; const RoutePath = this.$route.params.name;
// console.log(RoutePath); // console.log(RoutePath);
var StatusParams = {platform: '', coin: ''};//预警状态查询入参 var StatusParams = {platform: '', coin: ''};//预警状态查询入参
//筛选机器人参数
var ListParams = {
class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [] //交易所种类 可选参数
};
switch (RoutePath) { switch (RoutePath) {
case 'home': case 'home':
this.showWebFilter = this.showCurrencyFilter = true; this.showWebFilter = this.showCurrencyFilter = true;
this.showPairFilter = false; this.showPairFilter = false;
this.RobotListParams.coin = [];
this.RobotListParams.platform = [];
break; break;
case 'BTY': case 'BTY':
case 'YCC': case 'YCC':
this.showWebFilter = true; this.showWebFilter = true;
this.showCurrencyFilter = this.showPairFilter = false; this.showCurrencyFilter = this.showPairFilter = false;
StatusParams.coin = RoutePath; StatusParams.coin = RoutePath;
ListParams.coin = [RoutePath]; this.RobotListParams.coin = [RoutePath];
this.RobotListParams.platform = [];
break; break;
default: default:
this.showPairFilter = true; this.showPairFilter = true;
...@@ -233,11 +235,12 @@ ...@@ -233,11 +235,12 @@
this.pairs = JSON.parse(sessionStorage.getItem('platInfo'))[index].symbol; this.pairs = JSON.parse(sessionStorage.getItem('platInfo'))[index].symbol;
this.platform = JSON.parse(sessionStorage.getItem('platInfo'))[index].platform; this.platform = JSON.parse(sessionStorage.getItem('platInfo'))[index].platform;
StatusParams.platform = this.platform; StatusParams.platform = this.platform;
ListParams.platform = [this.platform]; this.RobotListParams.platform = [this.platform];
this.RobotListParams.coin = [];
break; break;
} }
this.getRobotStatus(StatusParams); this.getRobotStatus(StatusParams);
this.getRobotList(ListParams); this.getRobotList(this.RobotListParams);
}, },
//机器人预警状态查询 //机器人预警状态查询
getRobotStatus(params) { getRobotStatus(params) {
...@@ -255,6 +258,13 @@ ...@@ -255,6 +258,13 @@
// console.log(res.data.data); // console.log(res.data.data);
this.robotList = res.data.data; this.robotList = res.data.data;
} }
}).catch( error => {
this.$notify({
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
}) })
}, },
//交易所过滤 //交易所过滤
...@@ -264,15 +274,7 @@ ...@@ -264,15 +274,7 @@
this.currencies = this.allCurrencies; this.currencies = this.allCurrencies;
this.checkedCurrencies = []; this.checkedCurrencies = [];
this.checkAll0 = false; this.checkAll0 = false;
var ListParams = { this.getRobotList(this.RobotListParams);
class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [] //交易所种类 可选参数
};
this.getRobotList(ListParams);
}, },
handleCheckedChange(value) { handleCheckedChange(value) {
let checkedCount = value.length; let checkedCount = value.length;
...@@ -294,70 +296,39 @@ ...@@ -294,70 +296,39 @@
} }
} }
//筛选符合条件的机器人 //筛选符合条件的机器人
var ListParams = { var ListParams = this.RobotListParams;
class: "robot", //账户级别 ListParams.platform = value;
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: value //交易所种类 可选参数
};
this.getRobotList(ListParams); this.getRobotList(ListParams);
}, },
//币种过滤 //币种过滤
handleCheckAllChange0(val) { handleCheckAllChange0(val) {
this.checkedCurrencies = val ? this.currencies : []; this.checkedCurrencies = val ? this.currencies : [];
this.isIndeterminate0 = false; this.isIndeterminate0 = false;
var ListParams = { let ListParams = this.RobotListParams;
class: "robot", //账户级别 ListParams.platform = this.checkedWebs;
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: this.checkedWebs //交易所种类 可选参数
};
this.getRobotList(ListParams); this.getRobotList(ListParams);
}, },
handleCheckedChange0(value) { handleCheckedChange0(value) {
let checkedCount = value.length; let checkedCount = value.length;
this.checkAll0 = checkedCount === this.currencies.length; this.checkAll0 = checkedCount === this.currencies.length;
this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length; this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length;
var ListParams = { let ListParams = this.RobotListParams;
class: "robot", //账户级别 ListParams.platform = this.checkedWebs;
coin: value, //目标币种,用于首页里的筛选和币种监控 可选参数 ListParams.coin = value;
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: this.checkedWebs //交易所种类 可选参数
};
this.getRobotList(ListParams); this.getRobotList(ListParams);
}, },
//交易对过滤 //交易对过滤
handleCheckAllChange1(val) { handleCheckAllChange1(val) {
this.checkedPairs = val ? this.pairs : []; this.checkedPairs = val ? this.pairs : [];
this.isIndeterminate1 = false; this.isIndeterminate1 = false;
var ListParams = { this.getRobotList(this.RobotListParams);
class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [this.platform] //交易所种类 可选参数
};
this.getRobotList(ListParams);
}, },
handleCheckedChange1(value) { handleCheckedChange1(value) {
let checkedCount = value.length; let checkedCount = value.length;
this.checkAll1 = checkedCount === this.pairs.length; this.checkAll1 = checkedCount === this.pairs.length;
this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.pairs.length; this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.pairs.length;
var ListParams = { let ListParams = Object.assign({},this.RobotListParams);
class: "robot", //账户级别 ListParams.symbol = value;
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: value, //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [this.platform] //交易所种类 可选参数
};
this.getRobotList(ListParams); this.getRobotList(ListParams);
}, },
showDetails(index) { showDetails(index) {
...@@ -394,13 +365,16 @@ ...@@ -394,13 +365,16 @@
(status === 'coin' ? '目标币异常机器人' : (status === 'coin' ? '目标币异常机器人' :
(status === 'base' ? '基础币异常机器人':'所有机器人')))); (status === 'base' ? '基础币异常机器人':'所有机器人'))));
//筛选机器人参数 //筛选机器人参数
const path = this.$route.params.name;
let Coin = path === 'BTY' || path === 'YCC' ? [path] : [];
let Platform = (path!=='home'&&path!=='BTY'&&path !== 'YCC') ? [this.platform] : [];
var ListParams = { var ListParams = {
class: "robot", //账户级别 class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数 coin: Coin, //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数 symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数 status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数 abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [] //交易所种类 可选参数 platform: Platform, //交易所种类 可选参数
}; };
if (status==='normal' || status==='stop') { if (status==='normal' || status==='stop') {
ListParams.status = status; ListParams.status = status;
......
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