Commit d3c9ff24 authored by wxk's avatar wxk

接口改动,表格内容修改

parent 46ff8117
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
navClick() { navClick() {
if(this.active != 'account'){ if(this.active != 'account'){
this.$router.push('/monitor/' + this.active) this.$router.push('/monitor/' + this.active)
Bus.$emit('navClick')
}else{ }else{
this.$router.push('/monitor/account'); this.$router.push('/monitor/account');
} }
......
...@@ -301,19 +301,20 @@ ...@@ -301,19 +301,20 @@
stripe stripe
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
label="日期" label="单号">
width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.time }}</span> <span>{{ scope.row.id }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="100"
label="币种"> label="币种">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.coin }}</span> <span>{{ scope.row.coin }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="100"
label="类型"> label="类型">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.opt }}</span> <span>{{ scope.row.opt }}</span>
...@@ -322,7 +323,7 @@ ...@@ -322,7 +323,7 @@
<el-table-column <el-table-column
label="充提前数量"> label="充提前数量">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.beforeRecharge }}</span> <span>{{ scope.row.beforeRecharge===-1 ? '--' : scope.row.beforeRecharge }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -334,7 +335,7 @@ ...@@ -334,7 +335,7 @@
<el-table-column <el-table-column
label="充提后数量"> label="充提后数量">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.afterRecharge }}</span> <span>{{ scope.row.afterRecharge===-1 ? '--' : scope.row.afterRecharge }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -346,10 +347,18 @@ ...@@ -346,10 +347,18 @@
<el-table-column <el-table-column
label="操作用户"> label="操作用户">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.user }}</span> <span>{{ scope.row.user || '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="日期"
width="180">
<template slot-scope="scope">
<span>{{ scope.row.time }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
label="状态"> label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
...@@ -380,13 +389,6 @@ ...@@ -380,13 +389,6 @@
<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> </el-checkbox-group>
</div> </div>
<!-- <div class="select-bar-content status-select fl">
<span class="title">状态</span>
<el-checkbox-button :indeterminate="isIndeterminate1" v-model="checkAll1" @change="handleCheckAllChange1">全部</el-checkbox-button>
<el-checkbox-group v-model="checkedStates" @change="handleCheckedChange1">
<el-checkbox-button v-for="(state,index) in states" :label="index+''" :key="state">{{state}}</el-checkbox-button>
</el-checkbox-group>
</div>-->
</div> </div>
<el-date-picker <el-date-picker
class="fr" class="fr"
...@@ -406,10 +408,9 @@ ...@@ -406,10 +408,9 @@
stripe stripe
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
label="时间" label="单号">
width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.time }}</span> <span>{{ scope.row.id }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -443,13 +444,13 @@ ...@@ -443,13 +444,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="状态"> label="时间"
width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <span>{{ scope.row.create_time }}</span>
type="success"
disable-transitions>成功</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -497,10 +498,6 @@ ...@@ -497,10 +498,6 @@
checkAll: false, checkAll: false,
checkedOptions: [], checkedOptions: [],
options: ["买入", "卖出"], options: ["买入", "卖出"],
/* isIndeterminate1: true,
checkAll1: false,
checkedStates: [],
states: ["挂单中", "完全成交", "已撤单", "部分成交"],*/
/*充提记录参数*/ /*充提记录参数*/
transactionTime1: null,// 时间筛选 transactionTime1: null,// 时间筛选
pageSize1: 10, //表格每页的条数 pageSize1: 10, //表格每页的条数
...@@ -536,7 +533,7 @@ ...@@ -536,7 +533,7 @@
}, },
//返回上一页(关闭详情) //返回上一页(关闭详情)
closeDetails() { closeDetails() {
Bus.$emit('navClick'); // Bus.$emit('back');
this.$router.go(-1); this.$router.go(-1);
}, },
//查询行情信息 //查询行情信息
...@@ -643,7 +640,8 @@ ...@@ -643,7 +640,8 @@
duration:'2000', duration:'2000',
}); });
this.Loading = false; this.Loading = false;
setTimeout(()=>{ clearTimeout(window.Timer1);
window.Timer1 = setTimeout(()=>{
this.init(); this.init();
},500) },500)
}else{ }else{
...@@ -706,7 +704,7 @@ ...@@ -706,7 +704,7 @@
this.total = result.count; this.total = result.count;
if (result.list) { if (result.list) {
this.list = result.list.map(item => { this.list = result.list.map(item => {
const unit = item.opt === "0" ? item.base : item.coin; const unit = item.opt === "0" ? item.symbol.split('/')[1] : item.symbol.split('/')[0];
item.price = item.price + unit; item.price = item.price + unit;
item.sum = item.sum + unit; item.sum = item.sum + unit;
item.fee = item.fee + unit; item.fee = item.fee + unit;
...@@ -741,7 +739,7 @@ ...@@ -741,7 +739,7 @@
this.recordsCountList = result.total; this.recordsCountList = result.total;
if (result.list) { if (result.list) {
this.list1 = result.list.map(item => { this.list1 = result.list.map(item => {
item.fee = item.fee + item.coin; item.fee = item.fee===-1 ? '--' : item.fee + item.coin;
item.opt = item.opt==="0" ? "充币" : "提币"; item.opt = item.opt==="0" ? "充币" : "提币";
item.status = item.status==="0" ? "成功" : "失败"; item.status = item.status==="0" ? "成功" : "失败";
return item; return item;
...@@ -764,17 +762,6 @@ ...@@ -764,17 +762,6 @@
this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length;
this.getTransaction(); this.getTransaction();
}, },
/*handleCheckAllChange1(val) {
this.checkedStates = val ? ['0','1','2','3'] : [];
this.isIndeterminate1 = false;
this.getTransaction();
},
handleCheckedChange1(value) {
let checkedCount = value.length;
this.checkAll1 = checkedCount === this.states.length;
this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.states.length;
this.getTransaction();
},*/
//交易记录分页 //交易记录分页
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val+''; this.pageSize = val+'';
...@@ -840,17 +827,16 @@ ...@@ -840,17 +827,16 @@
}, },
//导出 //导出
exportExcel(type) { exportExcel(type) {
const symbol = this.robotDetailInfo.coin+'/'+this.robotDetailInfo.base;
let params = { let params = {
account: this.robotDetailInfo.account, account: this.robotDetailInfo.account,
symbol: symbol, symbol: this.robotDetailInfo.coin+'/'+this.robotDetailInfo.base,
opt: this.checkedOptions1, opt: this.checkedOptions1,
status: this.checkedStates1, status: this.checkedStates1,
min_time: this.transactionTime1 ? this.transactionTime1[0] : '', min_time: this.transactionTime1 ? this.transactionTime1[0] : '',
max_time: this.transactionTime1 ? this.transactionTime1[1] : '', max_time: this.transactionTime1 ? this.transactionTime1[1] : '',
} }
if(type !== 'all') { if(type !== 'all') {
params = Object.assign(params,{ Object.assign(params,{
page: this.currentPage, page: this.currentPage,
size: this.pageSize, size: this.pageSize,
}) })
......
...@@ -177,26 +177,40 @@ ...@@ -177,26 +177,40 @@
props: ['platInfo'], props: ['platInfo'],
created() { created() {
this.init(); this.init();
Bus.$on('navClick', ()=> { /*Bus.$on('back', ()=> {
this.robotStatus = ''; clearTimeout(window.Timer);
this.subtitle = '所有机器人'; window.Timer = setTimeout(()=>{
this.checkAll = false; //交易所筛选 const overviewParams = JSON.parse(sessionStorage.getItem('overviewParams'));
this.checkedWebs = []; this.robotStatus = overviewParams.robotStatus;
this.isIndeterminate = true; this.checkedWebs = overviewParams.checkedWebs;
this.foldExchange = true; this.checkedPairs = overviewParams.checkedPairs;
this.checkAll0 = false; //币种筛选 this.checkedCurrencies = overviewParams.checkedCurrencies;
this.checkedCurrencies = []; this.subtitle = this.robotStatus === 'normal' ? '正在运行机器人' :
this.sIndeterminate0 = true; (this.robotStatus === 'stop' ? '停止运行机器人' :
this.foldExchange0 = true; (this.robotStatus === 'profit' ? '盈利异常机器人' :
this.checkAll1 = false; //交易对筛选 (this.robotStatus === 'coin' ? '目标币异常机器人' :
this.checkedPairs = []; (this.robotStatus === 'base' ? '基础币异常机器人':'所有机器人'))));
this.pairs = []; let Params = {
this.isIndeterminate1 = true; class: "robot", //账户级别
this.foldExchange1 = true; coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
setTimeout(()=>{ symbol: [], //币种对,用于网站监控里的筛选 可选参数
this.init(); status: "", //机器人运行状态 可选参数
},0) abnormal: "", //有profit,coin,base这三种异常类别 可选参数
}); platform: [] //交易所种类 可选参数
};
if (this.robotStatus==='normal' || this.robotStatus==='stop') {
Params.status = this.robotStatus;
}else {
Params.abnormal = this.robotStatus;
}
if(!this.robotStatus) {
Params.coin = this.checkedCurrencies;
Params.symbol = this.checkedPairs;
Params.platform = this.checkedWebs;
}
this.getRobotList(Params);
},1000)
})*/
}, },
methods: { methods: {
init() { init() {
...@@ -247,6 +261,7 @@ ...@@ -247,6 +261,7 @@
}, },
//获取符合筛选条件的机器人列表 //获取符合筛选条件的机器人列表
getRobotList(params) { getRobotList(params) {
console.log(this.robotStatus)
axios.post(ApiConfig.GetMatchRobots,params).then( res => { axios.post(ApiConfig.GetMatchRobots,params).then( res => {
if (res.data.code === 200) { if (res.data.code === 200) {
// console.log(res.data.data); // console.log(res.data.data);
...@@ -326,8 +341,14 @@ ...@@ -326,8 +341,14 @@
this.getRobotList(ListParams); this.getRobotList(ListParams);
}, },
showDetails(index) { showDetails(index) {
// console.log(this.$route.path); const overviewParams = {
// this.RobotDetails = true; robotStatus: this.robotStatus,
checkedWebs: this.checkedWebs,
checkedCurrencies: this.checkedCurrencies,
checkedPairs: this.checkedPairs,
};
// console.log(overviewParams);
sessionStorage.setItem('overviewParams', JSON.stringify(overviewParams));
sessionStorage.setItem('robotDetailInfo', JSON.stringify(this.robotList[index])); sessionStorage.setItem('robotDetailInfo', JSON.stringify(this.robotList[index]));
this.$router.push(this.$route.path+'/RobotDetail'); this.$router.push(this.$route.path+'/RobotDetail');
// console.log(this.robotDetailInfo) // console.log(this.robotDetailInfo)
...@@ -398,6 +419,7 @@ ...@@ -398,6 +419,7 @@
watch:{ watch:{
$route(newVal, oldVal){ $route(newVal, oldVal){
// console.log(newVal.params.name) // console.log(newVal.params.name)
this.init();
}, },
platInfo(val){ platInfo(val){
this.webs = []; this.webs = [];
......
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