Commit 4def5356 authored by wxk's avatar wxk

第一版测试

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