Commit d061f8b9 authored by wxk's avatar wxk

增加机器人账户搜索机器人、导出充提bugfix

parent 7f17940f
......@@ -6,16 +6,20 @@
</div>
<el-row :gutter="20" class="operation-area">
<el-col :span="16">
<div class="dashboard" :class="[(robotDetailInfo.base_status==='abnormal' ||robotDetailInfo.coin_status==='abnormal' || robotDetailInfo.profit_status === 'abnormal') ? 'abnormal' : robotDetailInfo.status || 'normal']">
<div class="dashboard"
:class="[(robotDetailInfo.base_status==='abnormal' ||robotDetailInfo.coin_status==='abnormal' || robotDetailInfo.profit_status === 'abnormal') ? 'abnormal' : robotDetailInfo.status || 'normal']">
<div class="chart-box">
<p class="title">今日盈亏</p>
<p class="data" :class="robotInfo.today_profit && robotInfo.today_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{robotInfo.today_profit}}</p>
<p class="data"
:class="robotInfo.today_profit && robotInfo.today_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">
{{robotInfo.today_profit}}</p>
<div class="type-box">
<p v-show="robotInfo.status==='normal'" class="type">正在运行</p>
<p v-show="robotInfo.status==='stop'" class="type">停止运行</p>
<p>
<span class="result">总盈亏</span>
<span class="data" :class="robotInfo.all_profit && robotInfo.all_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{robotInfo.all_profit}}</span>
<span class="data"
:class="robotInfo.all_profit && robotInfo.all_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{robotInfo.all_profit}}</span>
</p>
</div>
<div class="switch">
......@@ -122,7 +126,7 @@
title="充币"
:visible.sync="dialogFormVisible"
:before-close="handleClose"
:close-on-click-modal = "false"
:close-on-click-modal="false"
center>
<!-- 内层确认弹框 -->
<el-dialog
......@@ -130,14 +134,16 @@
title="确认充值"
:visible.sync="innerVisible"
:before-close="handleClose"
:close-on-click-modal = "false"
:close-on-click-modal="false"
append-to-body
center>
<el-card class="box-card" style="text-align:left;">
<p>充值数量:&nbsp;&nbsp;<span>{{amount_num}}</span></p>
<p>充值币种:&nbsp;&nbsp;<span>{{account_symbol}}</span></p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;From:&nbsp;&nbsp;<span>{{recharge_list_value}}</span></p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To:&nbsp;&nbsp;<span>{{robotDetailInfo.account}}</span></p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;From:&nbsp;&nbsp;<span>{{recharge_list_value}}</span>
</p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To:&nbsp;&nbsp;<span>{{robotDetailInfo.account}}</span>
</p>
<p>&nbsp;&nbsp;&nbsp;操作人:&nbsp;&nbsp;<span>{{username}}</span></p>
</el-card>
<p class="tips">操作前请确认信息</p>
......@@ -176,7 +182,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel(),dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="amount_num&&recharge_list_value ? innerVisible=true : innerVisible=false">确 定</el-button>
<el-button type="primary"
@click="amount_num&&recharge_list_value ? innerVisible=true : innerVisible=false">确 定
</el-button>
</div>
</el-dialog>
<!-- 提币弹框 -->
......@@ -184,7 +192,7 @@
title="提币"
:visible.sync="dialogFormVisible1"
:before-close="handleClose"
:close-on-click-modal = "false"
:close-on-click-modal="false"
center>
<!-- 内层确认弹框 -->
<el-dialog
......@@ -192,14 +200,16 @@
title="确认提币"
:visible.sync="innerVisible1"
:before-close="handleClose"
:close-on-click-modal = "false"
:close-on-click-modal="false"
append-to-body
center>
<el-card class="box-card" style="text-align:left;">
<p>提现数量:&nbsp;&nbsp;<span>{{amount_num}}</span></p>
<p>提现币种:&nbsp;&nbsp;<span>{{account_symbol}}</span></p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;From:&nbsp;&nbsp;<span>{{robotDetailInfo.account}}</span></p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To:&nbsp;&nbsp;<span>{{recharge_list_value}}</span></p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;From:&nbsp;&nbsp;<span>{{robotDetailInfo.account}}</span>
</p>
<p style="overflow: hidden;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To:&nbsp;&nbsp;<span>{{recharge_list_value}}</span>
</p>
<p>&nbsp;&nbsp;&nbsp;操作人:&nbsp;&nbsp;<span>{{username}}</span></p>
</el-card>
<p class="tips">操作前请确认信息</p>
......@@ -238,7 +248,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel(),dialogFormVisible1 = false">取 消</el-button>
<el-button type="primary" @click="amount_num&&recharge_list_value ? innerVisible1=true : innerVisible1=false">确 定</el-button>
<el-button type="primary"
@click="amount_num&&recharge_list_value ? innerVisible1=true : innerVisible1=false">确 定
</el-button>
</div>
</el-dialog>
</div>
......@@ -251,21 +263,29 @@
<div class="select-bar fr clearfix">
<div class="select-bar-content fl">
<span class="title">类型</span>
<el-checkbox-button :indeterminate="isIndeterminate2" v-model="checkAll2" @change="handleCheckAllChange2">全部</el-checkbox-button>
<el-checkbox-button :indeterminate="isIndeterminate2" v-model="checkAll2" @change="handleCheckAllChange2">
全部
</el-checkbox-button>
<el-checkbox-group v-model="checkedOptions1" @change="handleCheckedChange2">
<el-checkbox-button v-for="(option,index) in options1" :label="index+''" :key="option">{{option}}</el-checkbox-button>
<el-checkbox-button v-for="(option,index) in options1" :label="index+''" :key="option">{{option}}
</el-checkbox-button>
</el-checkbox-group>
</div>
<div class="select-bar-content fl">
<span class="title">状态</span>
<el-checkbox-button :indeterminate="isIndeterminate3" v-model="checkAll3" @change="handleCheckAllChange3">全部</el-checkbox-button>
<el-checkbox-button :indeterminate="isIndeterminate3" v-model="checkAll3" @change="handleCheckAllChange3">
全部
</el-checkbox-button>
<el-checkbox-group v-model="checkedStates1" @change="handleCheckedChange3">
<el-checkbox-button v-for="(state,index) in states1" :label="index+''" :key="state">{{state}}</el-checkbox-button>
<el-checkbox-button v-for="(state,index) in states1" :label="index+''" :key="state">{{state}}
</el-checkbox-button>
</el-checkbox-group>
</div>
<div class="select-bar-content fl">
<span class="title">币种</span>
<el-checkbox-button :indeterminate="isIndeterminate4" v-model="checkAll4" @change="handleCheckAllChange4">全部</el-checkbox-button>
<el-checkbox-button :indeterminate="isIndeterminate4" v-model="checkAll4" @change="handleCheckAllChange4">
全部
</el-checkbox-button>
<el-checkbox-group v-model="checkedCoins" @change="handleCheckedChange4">
<el-checkbox-button v-for="coin in coins" :label="coin" :key="coin">{{coin}}</el-checkbox-button>
</el-checkbox-group>
......@@ -366,7 +386,8 @@
<template slot-scope="scope">
<el-tag
:type="scope.row.status === '成功' ? 'success' : 'danger'"
disable-transitions>{{scope.row.status}}</el-tag>
disable-transitions>{{scope.row.status}}
</el-tag>
</template>
</el-table-column>
</el-table>
......@@ -387,9 +408,11 @@
<div class="select-bar fr clearfix">
<div class="select-bar-content fl">
<span class="title">类型</span>
<el-checkbox-button :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全部</el-checkbox-button>
<el-checkbox-button :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全部
</el-checkbox-button>
<el-checkbox-group v-model="checkedOptions" @change="handleCheckedChange">
<el-checkbox-button v-for="(option, index) in options" :label="index+''" :key="option">{{option}}</el-checkbox-button>
<el-checkbox-button v-for="(option, index) in options" :label="index+''" :key="option">{{option}}
</el-checkbox-button>
</el-checkbox-group>
</div>
</div>
......@@ -460,7 +483,7 @@
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 30]"
:page-size="10"
:page-size="pageSize"
layout="total, prev, pager, next, sizes"
:total="total">
</el-pagination>
......@@ -472,9 +495,10 @@
import Bus from '../assets/js/bus'
import axios from 'axios';
import ApiConfig from "../config/api-config";
export default {
data(){
return{
data() {
return {
robotBankList: JSON.parse(sessionStorage.getItem('robotBankList')),
robotDetailInfo: JSON.parse(sessionStorage.getItem('robotDetailInfo')),
robotInfo: {},
......@@ -483,11 +507,11 @@
value1: true,
coinInfo: {},//目标币账户信息
baseInfo: {},//基础币账户信息
amount_num:'',//充值数量
dialogFormVisible:false,//充值弹框
transferok:false,
amount_num: '',//充值数量
dialogFormVisible: false,//充值弹框
transferok: false,
innerVisible: false,//充值确认弹框
dialogFormVisible1:false,//提现弹框
dialogFormVisible1: false,//提现弹框
innerVisible1: false,//提现确认弹框
recharge_list_value: '',//充值时候选择的账户
account_symbol: '',//充提币种
......@@ -546,36 +570,36 @@
},
//查询行情信息
getTicket() {
const symbol = this.robotDetailInfo.coin+'/'+this.robotDetailInfo.base;
const symbol = this.robotDetailInfo.coin + '/' + this.robotDetailInfo.base;
const params = {
symbol: symbol,
platform: this.robotDetailInfo.platform,
}
axios.post(ApiConfig.Ticket,params).then( res => {
if(res.data.code === 200) {
axios.post(ApiConfig.Ticket, params).then(res => {
if (res.data.code === 200) {
this.ticketInfo = res.data.data;
}
})
},
//查询当前机器人信息
getCurrentRobot() {
const symbol = this.robotDetailInfo.coin+'/'+this.robotDetailInfo.base;
const symbol = this.robotDetailInfo.coin + '/' + this.robotDetailInfo.base;
const params = {
class: 'robot',
account: this.robotDetailInfo.account,
symbol: [symbol]
}
axios.post(ApiConfig.GetMatchRobots,params).then( res => {
axios.post(ApiConfig.GetMatchRobots, params).then(res => {
if (res.data.code === 200) {
// console.log(res.data.data);
this.robotInfo = res.data.data[0];
}
}).catch( error => {
}).catch(error => {
this.$notify({
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
duration: '2000',
});
})
},
......@@ -586,7 +610,7 @@
coin: this.robotDetailInfo.coin,
base: this.robotDetailInfo.base,
}
axios.post(ApiConfig.GetWalletInfo,params).then( res=> {
axios.post(ApiConfig.GetWalletInfo, params).then(res => {
if (res.data.code === 200) {
const Data = res.data.data;
for (let item of Data) {
......@@ -604,7 +628,8 @@
this.recharge_list_value = '';
this.transferok = false;
})
.catch(_ => {});
.catch(_ => {
});
},
//点击充币
clickRecharge(symbol) {
......@@ -612,13 +637,13 @@
this.dialogFormVisible = true;
},
//取消充值
cancel(){
cancel() {
this.amount_num = '';
this.recharge_list_value = '';
this.transferok = false;
},
//弹框确认充值
sure_recharge(key){
sure_recharge(key) {
const params = {
user: this.username,
from_account: this.recharge_list_value,
......@@ -628,36 +653,36 @@
symbol: this.robotDetailInfo.coin + '/' + this.robotDetailInfo.base,
opt: key
};
if(!Number(this.amount_num) || this.amount_num<0.00000001 || this.amount_num>1800000000){
if (!Number(this.amount_num) || this.amount_num < 0.00000001 || this.amount_num > 1800000000) {
this.$notify({
title: '提示',
message: "数量错误",
type: 'error',
duration:'2000',
duration: '2000',
});
return;
}else{
} else {
this.transferok = true;
this.Loading = true;
axios.post(ApiConfig.Transfer,params).then(res=>{
if(res.data.code === 200){
axios.post(ApiConfig.Transfer, params).then(res => {
if (res.data.code === 200) {
this.$notify({
title: '提示',
message: key === "0" ? '充值 : '+ this.amount_num +" "+ this.account_symbol + ' 成功' : '提现: ' + this.amount_num +" "+ this.account_symbol + '成功',
message: key === "0" ? '充值 : ' + this.amount_num + " " + this.account_symbol + ' 成功' : '提现: ' + this.amount_num + " " + this.account_symbol + '成功',
type: 'success',
duration:'2000',
duration: '2000',
});
this.Loading = false;
setTimeout(()=>{
setTimeout(() => {
this.init();
},500)
}else{
}, 500)
} else {
this.Loading = false;
this.$notify({
title: '提示',
message: res.data.msg,
type: 'error',
duration:'2000',
duration: '2000',
})
}
this.dialogFormVisible = false;
......@@ -667,7 +692,7 @@
this.amount_num = '';
this.recharge_list_value = '';
this.transferok = false;
}).catch( error => {
}).catch(error => {
this.Loading = false;
this.dialogFormVisible = false;
this.dialogFormVisible1 = false;
......@@ -680,7 +705,7 @@
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
duration: '2000',
});
});
}
......@@ -698,24 +723,24 @@
coin: this.robotDetailInfo.coin,
base: this.robotDetailInfo.base,
page: "1",
size: this.pageSize+'',
size: this.pageSize + '',
opt: this.checkedOptions,
min_time: this.transactionTime ? this.transactionTime[0] : '',
max_time: this.transactionTime ? this.transactionTime[1] : '',
};
params = Object.assign({},baseParams,params);
axios.post(ApiConfig.Transaction, params).then( res => {
if (res.data.code === 200){
params = Object.assign({}, baseParams, params);
axios.post(ApiConfig.Transaction, params).then(res => {
if (res.data.code === 200) {
this.transactionLoading = false;
let result = res.data.data;
this.total = result.count;
if (result.list) {
this.list = result.list.map(item => {
item.opt = item.opt==="0" ? "买入" : "卖出";
item.opt = item.opt === "0" ? "买入" : "卖出";
return item;
})
}else {
this.list =[];
} else {
this.list = [];
}
}
})
......@@ -728,26 +753,26 @@
account: this.robotDetailInfo.account,
coin: Coin,
page: "1",
size: this.pageSize1+'',
size: this.pageSize1 + '',
opt: this.checkedOptions1,
status: this.checkedStates1,
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 => {
if (res.data.code === 200){
params = Object.assign({}, baseParams, params);
axios.post(ApiConfig.Records, params).then(res => {
if (res.data.code === 200) {
this.recordsLoading = false;
let result = res.data.data;
this.total1 = result.count;
this.recordsCountList = result.total;
if (result.list) {
this.list1 = result.list.map(item => {
item.opt = item.opt==="0" ? "充币" : "提币";
item.status = item.status==="0" ? "成功" : "失败";
item.opt = item.opt === "0" ? "充币" : "提币";
item.status = item.status === "0" ? "成功" : "失败";
return item;
})
}else {
} else {
this.list1 = [];
}
}
......@@ -755,7 +780,7 @@
},
//交易记录筛选
handleCheckAllChange(val) {
this.checkedOptions = val ? ['0','1'] : [];
this.checkedOptions = val ? ['0', '1'] : [];
this.isIndeterminate = false;
this.getTransaction();
},
......@@ -767,11 +792,11 @@
},
//交易记录分页
handleSizeChange(val) {
this.pageSize = val+'';
this.pageSize = val;
this.getTransaction();
},
handleCurrentChange(val) {
this.getTransaction({page: val+''});
this.getTransaction({page: val + ''});
},
/*充提记录筛选*/
//类型筛选
......@@ -813,15 +838,16 @@
},
//分页
handleSizeChange1(val) {
this.pageSize1 = val+'';
this.pageSize1 = val;
this.getRecords();
},
handleCurrentChange1(val) {
this.getRecords({page: val+''});
this.currentPage1 = val;
this.getRecords({page: val + ''});
},
//'='拼接key和value
toQueryPair(key, value) {
if (typeof value == 'undefined'){
if (typeof value == 'undefined') {
console.log(key)
return;
}
......@@ -830,13 +856,13 @@
//'&'拼接,数组将value转换成','连接的string
toQueryString(obj) {
var ret = [];
for(var key in obj){
for (var key in obj) {
var values = obj[key];
// key = encodeURIComponent(key);
if(values && values.constructor == Array){//数组
if (values && values.constructor == Array) {//数组
var queryValues = values.join(',');
ret.push(this.toQueryPair(key, queryValues));
}else{ //字符串
} else { //字符串
ret.push(this.toQueryPair(key, values));
}
}
......@@ -846,16 +872,16 @@
exportExcel(type) {
let params = {
account: this.robotDetailInfo.account,
symbol: this.robotDetailInfo.coin+'/'+this.robotDetailInfo.base,
symbol: this.robotDetailInfo.coin + '/' + this.robotDetailInfo.base,
opt: this.checkedOptions1,
status: this.checkedStates1,
min_time: this.transactionTime1 ? this.transactionTime1[0] : '',
max_time: this.transactionTime1 ? this.transactionTime1[1] : '',
}
if(type !== 'all') {
Object.assign(params,{
page: this.currentPage,
size: this.pageSize,
if (type !== 'all') {
Object.assign(params, {
page: this.currentPage1,
size: this.pageSize1,
})
}
let downloadHref = document.getElementById('download');
......@@ -868,6 +894,35 @@
$route() {
// console.log(this.$route.path.indexOf('RobotDetail'))
if (this.$route.path.indexOf('RobotDetail') !== -1) {
/*交易记录参数*/
this.transactionTime = null;// 时间筛选
this.pageSize = 10; //表格每页的条数
this.currentPage = 1; //分页(当前页数)
this.total = 0; //记录总条数
this.list = [];//表格数据
this.isIndeterminate = true;
this.checkAll = false;
this.checkedOptions = [];
/*充提记录参数*/
this.transactionTime1 = null;// 时间筛选
this.pageSize1 = 10; //表格每页的条数
this.currentPage1 = 1; //分页(当前页数)
this.total1 = 0; //记录总条数
this.list1 = [];//表格数据
this.recordsCountList = [];//充提记录统计
this.isIndeterminate2 = true;
this.checkAll2 = false;
this.checkedOptions1 = [];
this.isIndeterminate3 = true;
this.checkAll3 = false;
this.checkedStates1 = [];
this.isIndeterminate4 = true;//币种筛选
this.checkAll4 = false;
this.checkedCoins = [];
this.coins = [];
this.Loading = false;//充提币后数据加载标志
this.transactionLoading = false; //充提记录查询加载
this.recordsLoading = false;//交易记录查询加载
this.init();
}
},
......@@ -887,57 +942,61 @@
.detail-box {
overflow: hidden;
}
.back-button {
cursor: pointer;
width: 80px;
height: 40px;
line-height: 40px;
background:rgba(119,146,167,1);
border-radius:4px;
font-size:18px;
color:rgba(255,255,255,1);
background: rgba(119, 146, 167, 1);
border-radius: 4px;
font-size: 18px;
color: rgba(255, 255, 255, 1);
i {
position: relative;
left: 5px;
}
}
.operation-area {
margin-top: 20px;
.dashboard {
height: 290px;
border-radius:4px;
border-radius: 4px;
}
.normal {
border:1px solid rgba(146,208,171,1);
border: 1px solid rgba(146, 208, 171, 1);
.chart-box {
border: 3px solid #73C795;
}
.type {
color:rgba(76,171,115,1);
color: rgba(76, 171, 115, 1);
}
}
.stop {
border:1px solid rgba(208,216,220,1);
border: 1px solid rgba(208, 216, 220, 1);
.chart-box {
border: 3px solid rgba(208,216,220,1);
border: 3px solid rgba(208, 216, 220, 1);
}
.type {
color:rgba(121,130,134,1);
color: rgba(121, 130, 134, 1);
}
}
.abnormal {
border:1px solid rgba(217,120,120,1);
border: 1px solid rgba(217, 120, 120, 1);
.chart-box {
border: 3px solid rgba(217,120,120,1);
border: 3px solid rgba(217, 120, 120, 1);
}
.type {
color:rgba(217,120,120,1);
color: rgba(217, 120, 120, 1);
}
}
}
.dashboard {
position: relative;
}
.chart-box {
float: left;
margin: 43px 0 0 40px;
......@@ -950,21 +1009,21 @@
padding-top: 43px;
.title {
height: 17px;
font-size:12px;
color:rgba(128,128,128,1);
line-height:17px;
font-size: 12px;
color: rgba(128, 128, 128, 1);
line-height: 17px;
}
.data {
font-size:24px;
line-height:33px;
font-size: 24px;
line-height: 33px;
&.gain {
color:rgba(217,120,120,1);
color: rgba(217, 120, 120, 1);
}
&.lose {
color:rgba(76,171,115,1);
color: rgba(76, 171, 115, 1);
}
&.none {
color:rgba(208,216,220,1);
color: rgba(208, 216, 220, 1);
}
}
.type-box {
......@@ -974,23 +1033,24 @@
position: absolute;
bottom: -5px;
.type {
font-size:14px;
font-size: 14px;
/*color:rgba(76,171,115,1);*/
line-height:20px;
line-height: 20px;
margin: -10px 0 4px 0;
}
.result {
font-size:12px;
color:rgba(128,128,128,1);
line-height:17px;
font-size: 12px;
color: rgba(128, 128, 128, 1);
line-height: 17px;
}
.data {
font-size:14px;
color:rgba(217,120,120,1);
line-height:20px;
font-size: 14px;
color: rgba(217, 120, 120, 1);
line-height: 20px;
}
}
}
.chart-box .switch {
height: 20px;
position: absolute;
......@@ -998,6 +1058,7 @@
left: -34px;
bottom: -50px;
}
.dashboard-details {
margin: 43px 0 0 205px;
p {
......@@ -1005,8 +1066,8 @@
padding: 0 25px 9px 100px;
position: relative;
.cny {
font-size:12px;
color:rgba(128,128,128,1);
font-size: 12px;
color: rgba(128, 128, 128, 1);
}
.green {
color: #4CAB73;
......@@ -1018,9 +1079,9 @@
color: #D0D8DC;
}
span {
font-size:14px;
color:rgba(51,51,51,1);
word-break:break-all;
font-size: 14px;
color: rgba(51, 51, 51, 1);
word-break: break-all;
&:first-child {
position: absolute;
width: 100px;
......@@ -1028,16 +1089,17 @@
left: -10px;
margin-right: 10px;
text-align: right;
font-size:12px;
color:rgba(128,128,128,1);
font-size: 12px;
color: rgba(128, 128, 128, 1);
}
}
}
}
.handle-content {
height: 140px;
border-radius:4px;
border:1px solid rgba(119,146,167,1);
border-radius: 4px;
border: 1px solid rgba(119, 146, 167, 1);
padding: 10px 0 0 20px;
.handle {
height: 25px;
......@@ -1045,23 +1107,23 @@
margin-bottom: 4px;
}
.coin-name {
font-size:18px;
font-family:PingFang-SC-Bold;
color:rgba(51,51,51,1);
line-height:25px;
font-size: 18px;
font-family: PingFang-SC-Bold;
color: rgba(51, 51, 51, 1);
line-height: 25px;
}
.button {
position: absolute;
width:60px;
height:25px;
width: 60px;
height: 25px;
top: 0;
left: 58px;
background:rgba(119,146,167,1);
border-radius:4px;
background: rgba(119, 146, 167, 1);
border-radius: 4px;
line-height: 25px;
text-align: center;
color:rgba(255,255,255,1);
font-size:12px;
color: rgba(255, 255, 255, 1);
font-size: 12px;
cursor: pointer;
&:last-child {
left: 128px;
......@@ -1072,51 +1134,55 @@
}
.item {
line-height: 18px;
font-size:13px;
color:rgba(51,51,51,1);
font-size: 13px;
color: rgba(51, 51, 51, 1);
.abnormal {
color: rgb(217,120,120);
color: rgb(217, 120, 120);
border: none;
}
.normal {
color: rgba(76,171,115,1);
color: rgba(76, 171, 115, 1);
border: none;
}
/*margin-bottom: 4px;*/
.type-name {
display: inline-block;
width: 35px;
font-size:12px;
color:rgba(128,128,128,1);
font-size: 12px;
color: rgba(128, 128, 128, 1);
}
}
}
.tips {
color: red;
margin-top: 30px;
}
.record-box {
background:rgba(255,255,255,1);
border-radius:4px;
border:1px solid rgba(119,146,167,1);
background: rgba(255, 255, 255, 1);
border-radius: 4px;
border: 1px solid rgba(119, 146, 167, 1);
padding: 20px;
margin: 20px 0 20px 0;
}
.title-box {
&>.title {
& > .title {
display: inline-block;
margin-bottom: 20px;
line-height: 40px;
font-size:18px;
color:rgba(51,51,51,1);
font-size: 18px;
color: rgba(51, 51, 51, 1);
}
}
.select-bar-content {
width: 255px;
margin: 0 0 20px 20px;
background-color: #fff;
border-radius:4px;
border:1px solid rgba(224,224,224,1);
border-radius: 4px;
border: 1px solid rgba(224, 224, 224, 1);
height: 40px;
line-height: 40px;
.title {
......@@ -1126,13 +1192,14 @@
position: relative;
left: -40px;
font-size: 12px;
color:rgba(119,146,167,1);
color: rgba(119, 146, 167, 1);
}
}
/*操作记录总计*/
.count-box {
line-height: 30px;
color: rgba(51,51,51,1);
color: rgba(51, 51, 51, 1);
.title {
font-size: 16px;
margin-right: 10px;
......@@ -1142,7 +1209,7 @@
margin-right: 10px;
span:first-child {
font-size: 14px;
color: rgba(128,128,128,1);
color: rgba(128, 128, 128, 1);
}
}
}
......@@ -1151,7 +1218,7 @@
/*select组件样式覆盖*/
.detail-box {
.count-box .el-button {
background: rgba(119,146,167,1);
background: rgba(119, 146, 167, 1);
border: none;
}
.select-bar-content {
......@@ -1160,7 +1227,7 @@
border-radius: 3px;
}
&.pair {
.el-checkbox-button__inner{
.el-checkbox-button__inner {
width: 85px;
}
.el-checkbox-group .el-checkbox-button:first-child {
......@@ -1189,7 +1256,7 @@
.el-checkbox-button.is-focus .el-checkbox-button__inner {
border-color: #dcdfe6;
}
&>.el-checkbox-button {
& > .el-checkbox-button {
margin-left: -69px;
}
.el-checkbox-group {
......@@ -1209,7 +1276,7 @@
.el-checkbox-button.is-focus .el-checkbox-button__inner {
border-color: #dcdfe6;
}
&>.el-checkbox-button {
& > .el-checkbox-button {
margin-left: -40px;
position: relative;
top: -2px;
......
......@@ -75,6 +75,11 @@
</div>
</div>
</div>
<div v-show="!robotStatus" class="search-box">
<el-input v-model="robotAccount" placeholder="通过机器人账户搜索">
<el-button @click="searchByAccount" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<ul class="robots-box">
<li v-for="(item,index) in robotList" :key="item.tag"
:class="[(item.base_status==='abnormal' ||item.coin_status==='abnormal' || item.profit_status === 'abnormal') ? 'abnormal' : item.status || 'normal']">
......@@ -134,6 +139,8 @@
export default {
data() {
return {
robotAccount: '',//通过机器人账户搜索
_robotAccount: '',//说明通过机器人账户搜索成功
platform: '',//导航选中的交易所
value1: true, //是否开启机器人
robotStatus: '', //机器人状态
......@@ -176,6 +183,7 @@
this.currencies = this.currencies.length === 0 && sessionStorage.getItem('currencies') ? JSON.parse(sessionStorage.getItem('currencies')) : this.currencies;
this.init();
Bus.$on('refresh', ()=>{
this.robotAccount = this._robotAccount ='';
this.checkAll = false;
this.isIndeterminate = true;
this.foldExchange = true;
......@@ -259,8 +267,8 @@
Params.coin = Coin.length !== 0 ? Coin : this.checkedCurrencies;
Params.platform = Platform.length !== 0 ? Platform : this.checkedWebs;
Params.symbol = this.checkedPairs;
console.log(Params.platform)
}
Params = this._robotAccount!=='' ? {class: "robot", account: this._robotAccount} : Params;
this.getRobotList(Params);
}else {
this.getRobotList(this.RobotListParams);
......@@ -293,6 +301,7 @@
},
//交易所过滤
handleCheckAllChange(val) {
this.robotAccount = this._robotAccount ='';
this.checkedWebs = val ? this.webs : [];
this.isIndeterminate = false;
this.currencies = this.allCurrencies;
......@@ -305,6 +314,7 @@
this.getRobotList(ListParams);
},
handleCheckedChange(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll = checkedCount === this.webs.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.webs.length;
......@@ -332,6 +342,7 @@
},
//币种过滤
handleCheckAllChange0(val) {
this.robotAccount = this._robotAccount ='';
this.checkedCurrencies = val ? this.currencies : [];
this.isIndeterminate0 = false;
let ListParams = this.RobotListParams;
......@@ -340,6 +351,7 @@
this.getRobotList(ListParams);
},
handleCheckedChange0(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll0 = checkedCount === this.currencies.length;
this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length;
......@@ -350,11 +362,13 @@
},
//交易对过滤
handleCheckAllChange1(val) {
this.robotAccount = this._robotAccount ='';
this.checkedPairs = val ? this.pairs : [];
this.isIndeterminate1 = false;
this.getRobotList(this.RobotListParams);
},
handleCheckedChange1(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll1 = checkedCount === this.pairs.length;
this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.pairs.length;
......@@ -388,6 +402,7 @@
},
//通过机器人状态筛选
statusFilter(status) {
this.robotAccount = this._robotAccount ='';
this.robotStatus = status;
this.subtitle = status === 'normal' ? '正在运行机器人' :
(status === 'stop' ? '停止运行机器人' :
......@@ -427,7 +442,38 @@
default:
break
}
},
//通过机器人账户搜索
searchByAccount() {
if (!this.robotAccount) {
this.$notify({
title: '错误',
message: "请先输入账户地址后再试",
type: 'error',
duration:'2000',
});
return;
}
this.checkAll = false;
this.isIndeterminate = true;
this.foldExchange = true;
this.checkAll0 = false;
this.isIndeterminate0 = true;
this.foldExchange0 = true;
this.checkAll1 = false;
this.checkedPairs = [];
this.isIndeterminate1 = true;
this.foldExchange1 = true;
this.checkedWebs = [];
this.checkedCurrencies = [];
this.checkedPairs = [];
let Params = {
class:"robot", //账户级别 有robot bank admin三个返回数据也不同
account: this.robotAccount,
}
this._robotAccount = this.robotAccount;
this.getRobotList(Params);
},
},
watch:{
platInfo(val){
......@@ -687,6 +733,10 @@
font-size: 20px;
margin-top: 100px;
}
.search-box {
width: 600px;
margin: -20px 0 20px 0;
}
</style>
<style>
/*select组件样式覆盖*/
......
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