Commit aace40d0 authored by wxk's avatar wxk

预警状态查询接口ok

parent cfdf24cc
...@@ -6,23 +6,23 @@ ...@@ -6,23 +6,23 @@
</div> </div>
<ul class="classify-overview"> <ul class="classify-overview">
<li class="normal" :class="{ 'filter' : robotStatus === 'normal'}" @click="statusFilter('normal')"> <li class="normal" :class="{ 'filter' : robotStatus === 'normal'}" @click="statusFilter('normal')">
<p>87</p> <p>{{robotStatusList.status_normal}}</p>
<p>正常运行(台)</p> <p>正常运行(台)</p>
</li> </li>
<li class="stop" :class="{ 'filter' : robotStatus === 'stop'}" @click="statusFilter('stop')"> <li class="stop" :class="{ 'filter' : robotStatus === 'stop'}" @click="statusFilter('stop')">
<p>7</p> <p>{{robotStatusList.status_stop}}</p>
<p>停止运行(台)</p> <p>停止运行(台)</p>
</li> </li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'profit'}" @click="statusFilter('profit')"> <li class="abnormal" :class="{ 'filter' : robotStatus === 'profit'}" @click="statusFilter('profit')">
<p>2</p> <p>{{robotStatusList.profit_status_abnormal}}</p>
<p>盈利异常(台)</p> <p>盈利异常(台)</p>
</li> </li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'coin'}" @click="statusFilter('coin')"> <li class="abnormal" :class="{ 'filter' : robotStatus === 'coin'}" @click="statusFilter('coin')">
<p>1</p> <p>{{robotStatusList.coin_status_abnormal}}</p>
<p>目标币数量异常(台)</p> <p>目标币数量异常(台)</p>
</li> </li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'base'}" @click="statusFilter('base')"> <li class="abnormal" :class="{ 'filter' : robotStatus === 'base'}" @click="statusFilter('base')">
<p>0</p> <p>{{robotStatusList.base_status_abnormal}}</p>
<p>基础币数量异常(台)</p> <p>基础币数量异常(台)</p>
</li> </li>
</ul> </ul>
...@@ -260,12 +260,15 @@ ...@@ -260,12 +260,15 @@
<script> <script>
import RobotDetails from './RobotDetails' import RobotDetails from './RobotDetails'
import Bus from '../assets/js/bus' import Bus from '../assets/js/bus'
import axios from 'axios';
import ApiConfig from "../config/api-config";
export default { export default {
data() { data() {
return { return {
value1: true, //是否开启机器人 value1: true, //是否开启机器人
robotDetails: false, //是否查看机器人详情 robotDetails: false, //是否查看机器人详情
robotStatus: '', //机器人状态 robotStatus: '', //机器人状态
robotStatusList: [],//状态预警信息
subtitle: '所有机器人', //副标题 subtitle: '所有机器人', //副标题
checkAll: false, //交易所筛选 checkAll: false, //交易所筛选
checkedWebs: [], checkedWebs: [],
...@@ -321,23 +324,52 @@ ...@@ -321,23 +324,52 @@
init() { init() {
const RoutePath = this.$route.params.name; const RoutePath = this.$route.params.name;
// console.log(RoutePath); // 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) { switch (RoutePath) {
case 'home': case 'home':
this.showWebFilter = this.showCurrencyFilter = true; this.showWebFilter = this.showCurrencyFilter = true;
this.showPairFilter = false; this.showPairFilter = false;
this.getRobotStatus(StatusParams);
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 = {platform: '', coin: RoutePath}
this.getRobotStatus(StatusParams);
break; break;
default: default:
this.showPairFilter = true; this.showPairFilter = true;
this.showWebFilter = this.showCurrencyFilter = false; this.showWebFilter = this.showCurrencyFilter = false;
var index = +RoutePath; var index = +RoutePath;
this.pairs = this.platInfo[index].symbol; 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) { handleCheckAllChange(val) {
this.checkedWebs = val ? this.webs : []; this.checkedWebs = val ? this.webs : [];
...@@ -528,7 +560,7 @@ ...@@ -528,7 +560,7 @@
float: right; float: right;
.select-bar-content { .select-bar-content {
float: left; float: left;
margin-right: 10px; margin-left: 10px;
width: 410px; width: 410px;
padding: 5px 10px 0 65px; padding: 5px 10px 0 65px;
background-color: #fff; 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