Commit aace40d0 authored by wxk's avatar wxk

预警状态查询接口ok

parent cfdf24cc
......@@ -6,23 +6,23 @@
</div>
<ul class="classify-overview">
<li class="normal" :class="{ 'filter' : robotStatus === 'normal'}" @click="statusFilter('normal')">
<p>87</p>
<p>{{robotStatusList.status_normal}}</p>
<p>正常运行(台)</p>
</li>
<li class="stop" :class="{ 'filter' : robotStatus === 'stop'}" @click="statusFilter('stop')">
<p>7</p>
<p>{{robotStatusList.status_stop}}</p>
<p>停止运行(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'profit'}" @click="statusFilter('profit')">
<p>2</p>
<p>{{robotStatusList.profit_status_abnormal}}</p>
<p>盈利异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'coin'}" @click="statusFilter('coin')">
<p>1</p>
<p>{{robotStatusList.coin_status_abnormal}}</p>
<p>目标币数量异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'base'}" @click="statusFilter('base')">
<p>0</p>
<p>{{robotStatusList.base_status_abnormal}}</p>
<p>基础币数量异常(台)</p>
</li>
</ul>
......@@ -260,12 +260,15 @@
<script>
import RobotDetails from './RobotDetails'
import Bus from '../assets/js/bus'
import axios from 'axios';
import ApiConfig from "../config/api-config";
export default {
data() {
return {
value1: true, //是否开启机器人
robotDetails: false, //是否查看机器人详情
robotStatus: '', //机器人状态
robotStatusList: [],//状态预警信息
subtitle: '所有机器人', //副标题
checkAll: false, //交易所筛选
checkedWebs: [],
......@@ -321,23 +324,52 @@
init() {
const RoutePath = this.$route.params.name;
// console.log(RoutePath);
var StatusParams = {platform: '', coin: ''};//预警状态查询入参
//筛选机器人参数
var ListParams = {
"class":"robot", //账户级别
"coin":"DCR", //目标币种,用于首页里的筛选和币种监控 可选参数
"symbol":["DCR/USDT"], //币种对,用于网站监控里的筛选 可选参数
"status":"normal", //机器人运行状态 可选参数
"abnormal":"profit", //有profit,coin,base这三种异常类别 可选参数
"platform":["zhaobi"] //交易所种类 可选参数
};
switch (RoutePath) {
case 'home':
this.showWebFilter = this.showCurrencyFilter = true;
this.showPairFilter = false;
this.getRobotStatus(StatusParams);
break;
case 'BTY':
case 'YCC':
this.showWebFilter = true;
this.showCurrencyFilter = this.showPairFilter = false;
StatusParams = {platform: '', coin: RoutePath}
this.getRobotStatus(StatusParams);
break;
default:
this.showPairFilter = true;
this.showWebFilter = this.showCurrencyFilter = false;
var index = +RoutePath;
this.pairs = this.platInfo[index].symbol;
StatusParams = {platform: this.platInfo[index].platform, coin: ''}
this.getRobotStatus(StatusParams);
break;
}
},
//机器人预警状态查询
getRobotStatus(params) {
axios.post(ApiConfig.GetRobotStatus,params).then( res => {
// console.log(res.data)
this.robotStatusList = res.data;
})
},
//获取符合筛选条件的机器人列表
getRobotList(params) {
axios.post(ApiConfig.GetMatchRobots,params).then( res => {
console.log(res.data)
})
},
//交易所过滤
handleCheckAllChange(val) {
this.checkedWebs = val ? this.webs : [];
......@@ -528,7 +560,7 @@
float: right;
.select-bar-content {
float: left;
margin-right: 10px;
margin-left: 10px;
width: 410px;
padding: 5px 10px 0 65px;
background-color: #fff;
......
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