Commit d3c9ff24 authored by wxk's avatar wxk

接口改动,表格内容修改

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