Commit fa026470 authored by wxk's avatar wxk

详情优化

parent df998225
// const originUrl = ""//本地开发
const originUrl = "/asset_monitor"//测试
const originUrl = ""//本地开发
// const originUrl = "/asset_monitor"//测试
const Api = {
Login: originUrl + "/login",//登录
Register: originUrl + "/register",//注册
......
......@@ -6,20 +6,20 @@
</div>
<el-row :gutter="20" class="operation-area">
<el-col :span="16">
<div class="dashboard" :class="[robotDetailInfo.status || 'normal']">
<div class="dashboard" :class="[robotInfo.status || 'normal']">
<div class="chart-box">
<p class="title">今日盈亏</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>
<p v-show="robotInfo.today_profit>0" class="data gain">+{{(robotInfo.today_profit*100).toFixed(2)}}%</p>
<p v-show="robotInfo.today_profit<0" class="data lose">-{{(robotInfo.today_profit*100).toFixed(2)}}%</p>
<p v-show="robotInfo.today_profit==0" class="data none">- -</p>
<div class="type-box">
<p v-show="robotDetailInfo.status==='normal'" class="type">正在运行</p>
<p v-show="robotDetailInfo.status==='stop'" class="type">停止运行</p>
<p v-show="robotInfo.status==='normal'" class="type">正在运行</p>
<p v-show="robotInfo.status==='stop'" class="type">停止运行</p>
<p>
<span class="result">总盈亏</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>
<span v-show="robotInfo.all_profit>0" class="data gain">+{{(robotInfo.all_profit*100).toFixed(2)}}%</span>
<span v-show="robotInfo.all_profit<0" class="data lose">-{{(robotInfo.all_profit*100).toFixed(2)}}%</span>
<span v-show="robotInfo.all_profit==0" class="data none">- -</span>
</p>
</div>
<div class="switch">
......@@ -36,24 +36,24 @@
<div class="dashboard-details">
<p>
<span>机器人名称</span>
<span>{{robotDetailInfo.tag}}</span>
<span>{{robotInfo.tag}}</span>
</p>
<p>
<span>交易对</span>
<span>{{robotDetailInfo.coin}}/{{robotDetailInfo.base}}</span>
<span>{{robotInfo.coin}}/{{robotInfo.base}}</span>
</p>
<p>
<span>账户地址</span>
<span>{{robotDetailInfo.account}}</span>
<span>{{robotInfo.account}}</span>
</p>
<p>
<span>运行状态</span>
<span v-show="robotDetailInfo.status==='normal'" class="green">正在运行</span>
<span v-show="robotDetailInfo.status==='stop'" class="red">停止运行</span>
<span v-show="robotInfo.status==='normal'" class="green">正在运行</span>
<span v-show="robotInfo.status==='stop'" class="red">停止运行</span>
</p>
<p>
<span>交易所</span>
<span>{{robotDetailInfo.platform}}</span>
<span>{{robotInfo.platform}}</span>
</p>
<p>
<span>行情</span>
......@@ -70,9 +70,9 @@
<div class="handle-box">
<div class="handle-content" v-loading="Loading" element-loading-text="正在刷新数据">
<div class="handle">
<span class="coin-name">{{robotDetailInfo.coin}}</span>
<span class="button" @click="clickRecharge(robotDetailInfo.coin)">充币</span>
<span class="button" @click="clickWithdraw(robotDetailInfo.coin)">提币</span>
<span class="coin-name">{{robotInfo.coin}}</span>
<span class="button" @click="clickRecharge(robotInfo.coin)">充币</span>
<span class="button" @click="clickWithdraw(robotInfo.coin)">提币</span>
</div>
<p class="item">
<span class="type-name">可用</span>
......@@ -88,18 +88,18 @@
</p>
<p class="item">
<span class="type-name">标准</span>
<span>{{robotDetailInfo.coin_normal}}</span>
<span>{{robotInfo.coin_normal}}</span>
</p>
<p class="item">
<span class="type-name">比例</span>
<span>{{robotDetailInfo.coin_percent*100+'%'}}(总量/标准)</span>
<span>{{robotInfo.coin_percent*100+'%'}}(总量/标准)</span>
</p>
</div>
<div class="handle-content" v-loading="Loading" element-loading-text="正在刷新数据">
<div class="handle">
<span class="coin-name">{{robotDetailInfo.base}}</span>
<span class="button" @click="clickRecharge(robotDetailInfo.base)">充币</span>
<span class="button" @click="clickWithdraw(robotDetailInfo.base)">提币</span>
<span class="coin-name">{{robotInfo.base}}</span>
<span class="button" @click="clickRecharge(robotInfo.base)">充币</span>
<span class="button" @click="clickWithdraw(robotInfo.base)">提币</span>
</div>
<p class="item">
<span class="type-name">可用</span>
......@@ -115,11 +115,11 @@
</p>
<p class="item">
<span class="type-name">标准</span>
<span>{{robotDetailInfo.base_normal}}</span>
<span>{{robotInfo.base_normal}}</span>
</p>
<p class="item">
<span class="type-name">比例</span>
<span>{{robotDetailInfo.base_percent*100+'%'}}(总量/标准)</span>
<span>{{robotInfo.base_percent*100+'%'}}(总量/标准)</span>
</p>
</div>
<!-- 充币弹框 -->
......@@ -221,7 +221,7 @@
<el-input v-model="account_symbol" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="From" label-width="120px">
<el-input v-model="robotDetailInfo.account" :disabled="true"></el-input>
<el-input v-model="robotInfo.account" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="To" label-width="120px">
<el-select
......@@ -457,6 +457,7 @@
export default {
data(){
return{
robotInfo: {},
username: localStorage.getItem('username'),
value1: true,
coinInfo: {},//目标币账户信息
......@@ -512,11 +513,34 @@
this.getWalletInfo();
this.getTransaction();
this.getRecords();
this.getCurrentRobot();
},
//返回上一页(关闭详情)
closeDetails() {
Bus.$emit('hideDetails')
},
//查询当前机器人信息
getCurrentRobot() {
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 => {
if (res.data.code === 200) {
// console.log(res.data.data);
this.robotInfo = res.data.data[0];
}
}).catch( error => {
this.$notify({
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
})
},
//查询账户资金信息
getWalletInfo() {
const params = {
......@@ -588,12 +612,13 @@
this.Loading = false;
this.init();
}else{
this.Loading = false;
this.$notify({
title: '提示',
message: res.data.msg,
type: 'error',
duration:'2000',
});
})
}
this.dialogFormVisible = false;
this.dialogFormVisible1 = false;
......@@ -602,15 +627,22 @@
this.amount_num = '';
this.recharge_list_value = '';
this.transferok = false;
}).catch(err=>{
// console.log(err)
}).catch( error => {
this.Loading = false;
this.dialogFormVisible = false;
this.dialogFormVisible1 = false;
this.innerVisible = false;
this.innerVisible1 = false;
this.amount_num = '';
this.recharge_list_value = '';
this.transferok = false;
this.$notify({
title: '提示',
message: "操作失败,请稍后重试!",
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
})
});
}
},
//点击提币
......
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