Commit c4ad0ff5 authored by wxk's avatar wxk

筛选框筛选ok

parent db83fe91
......@@ -6,21 +6,27 @@
</div>
<el-row :gutter="20" class="operation-area">
<el-col :span="16">
<div class="dashboard abnormal">
<div class="chart-box ">
<div class="dashboard" :class="[robotDetailInfo.status]">
<div class="chart-box">
<p class="title">今日盈亏</p>
<p class="data lose">-30.23%</p>
<p v-show="robotDetailInfo.today_profit>0" class="data gain">+{{(robotDetailInfo.today_profit*100).toFixed(2)}}%</p>
<p v-show="robotDetailInfo.today_profit<0" class="data lose">-{{(robotDetailInfo.today_profit*100).toFixed(2)}}%</p>
<p v-show="robotDetailInfo.today_profit==0" class="data none">- -</p>
<div class="type-box">
<p class="type">异常运行</p>
<p v-show="robotDetailInfo.status==='normal'" class="type">正在运行</p>
<p v-show="robotDetailInfo.status==='stop'" class="type">停止运行</p>
<p>
<span class="result">总盈亏</span>
<span class="data lose">+30.23%</span>
<span v-show="robotDetailInfo.all_profit>0" class="data gain">+{{(robotDetailInfo.all_profit*100).toFixed(2)}}%</span>
<span v-show="robotDetailInfo.all_profit<0" class="data lose">-{{(robotDetailInfo.all_profit*100).toFixed(2)}}%</span>
<span v-show="robotDetailInfo.all_profit==0" class="data none">- -</span>
</p>
</div>
<div class="switch">
<span v-show="value1">关闭</span>
<span v-show="!value1">开启</span>
<el-switch
disabled
v-model="value1"
active-color="rgba(119,146,167,1)"
inactive-color="rgba(236,239,241,1)">
......@@ -30,30 +36,31 @@
<div class="dashboard-details">
<p>
<span>机器人名称</span>
<span>YCC/BTC-SMALL-140025</span>
<span>{{robotDetailInfo.tag}}</span>
</p>
<p>
<span>交易对</span>
<span>YCC/BTC</span>
<span>{{robotDetailInfo.coin}}/{{robotDetailInfo.base}}</span>
</p>
<p>
<span>账户地址</span>
<span>sdlahfoayqwp9yrewhfjksdvkjahdhofysafdoauoidfaosfuosydofiaysdfhvjchkhfiyefsdhksvbzxvihuwo</span>
<span>{{robotDetailInfo.account}}</span>
</p>
<p>
<span>运行状态</span>
<span class="red">异常运行</span>
<span v-show="robotDetailInfo.status==='normal'" class="green">正在运行</span>
<span v-show="robotDetailInfo.status==='stop'" class="red">停止运行</span>
</p>
<p>
<span>交易所</span>
<span>找币网</span>
<span>{{robotDetailInfo.platform}}</span>
</p>
<p>
<span>行情</span>
<span>$7376.84</span>
<span class="cny">≈¥47986.10</span>
<br>
<span class="green">-1.82%</span>
<!--<span>$7376.84</span>-->
<!--<span class="cny">≈¥47986.10</span>-->
<!--<br>-->
<!--<span class="green">-1.82%</span>-->
</p>
</div>
</div>
......@@ -112,6 +119,7 @@
value1: true,
}
},
props: ['robotDetailInfo'],
methods: {
closeDetails() {
Bus.$emit('hideDetails')
......@@ -209,7 +217,7 @@
bottom: -5px;
.type {
font-size:14px;
color:rgba(76,171,115,1);
/*color:rgba(76,171,115,1);*/
line-height:20px;
margin: -10px 0 4px 0;
}
......
......@@ -79,7 +79,7 @@
<ul class="robots-box">
<li v-for="(item,index) in robotList" :key="item.tag" :class="[item.status]">
<div class="operations">
<div class="detail" @click="showDetails()">
<div class="detail" @click="showDetails(index)">
<span>查看详情</span>
<i class="el-icon-caret-right"></i>
</div>
......@@ -130,7 +130,7 @@
</ul>
<p v-if="robotList === null" class="no-data">暂无数据</p>
</div>
<robot-details v-show="robotDetails"></robot-details>
<robot-details v-show="robotDetails" :robotDetailInfo="robotDetailInfo"></robot-details>
</div>
</template>
......@@ -142,11 +142,13 @@
export default {
data() {
return {
platform: '',//导航选中的交易所
value1: true, //是否开启机器人
robotDetails: false, //是否查看机器人详情
robotStatus: '', //机器人状态
robotStatusList: [],//状态预警信息
robotList: [],//符合条件的机器人列表
robotDetailInfo: '',
subtitle: '所有机器人', //副标题
checkAll: false, //交易所筛选
checkedWebs: [],
......@@ -206,7 +208,7 @@
//筛选机器人参数
var ListParams = {
class: "robot", //账户级别
coin: "", //目标币种,用于首页里的筛选和币种监控 可选参数
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
......@@ -222,16 +224,16 @@
this.showWebFilter = true;
this.showCurrencyFilter = this.showPairFilter = false;
StatusParams.coin = RoutePath;
ListParams.coin = RoutePath;
ListParams.coin = [RoutePath];
break;
default:
this.showPairFilter = true;
this.showWebFilter = this.showCurrencyFilter = false;
var index = +RoutePath;
this.pairs = this.platInfo[index].symbol;
const platform = this.platInfo[index].platform;
StatusParams.platform = platform;
ListParams.platform = [platform];
this.platform = this.platInfo[index].platform;
StatusParams.platform = this.platform;
ListParams.platform = [this.platform];
break;
}
this.getRobotStatus(StatusParams);
......@@ -258,6 +260,15 @@
this.currencies = this.allCurrencies;
this.checkedCurrencies = [];
this.checkAll0 = false;
var ListParams = {
class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [] //交易所种类 可选参数
};
this.getRobotList(ListParams);
},
handleCheckedChange(value) {
let checkedCount = value.length;
......@@ -278,29 +289,77 @@
}
}
}
//筛选符合条件的机器人
var ListParams = {
class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
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 //交易所种类 可选参数
};
this.getRobotList(ListParams);
},
handleCheckedChange0(value) {
let checkedCount = value.length;
this.checkAll0 = checkedCount === this.webs.length;
this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length;
var ListParams = {
class: "robot", //账户级别
coin: value, //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: this.checkedWebs //交易所种类 可选参数
};
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);
},
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] //交易所种类 可选参数
};
this.getRobotList(ListParams);
},
showDetails() {
showDetails(index) {
this.robotDetails = true;
this.robotDetailInfo = this.robotList[index];
console.log(this.robotDetailInfo)
},
clickSwitch(val) {
const Tips = val ? '此操作将开启机器人, 是否继续?' : '此操作将关闭机器人, 是否继续?';
......@@ -333,7 +392,7 @@
//筛选机器人参数
var ListParams = {
class: "robot", //账户级别
coin: "", //目标币种,用于首页里的筛选和币种监控 可选参数
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
......
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