Commit 46ff8117 authored by wxk's avatar wxk

充提记录导出

parent 0cc2a831
......@@ -18,7 +18,7 @@
<el-menu-item index="YCC">YCC</el-menu-item>
</el-submenu>
<el-menu-item index="account">
<span slot="title">账户监控</span>
<span slot="title">银行账户</span>
</el-menu-item>
</el-menu>
</div>
......
......@@ -236,7 +236,7 @@ export default {
if(this.loginEmail==''||this.loginPassword==''){
this.$notify({
title: '提示',
message: "请输入账号、密码",
message: "信息不完整,请确认后再试",
type: 'error',
duration:'2000',
});
......@@ -279,14 +279,18 @@ export default {
//this.$router.push({path:'/index'})
})
},
//忘记密码
//重置密码
forgetpassword(){
//console.log(this.regist_email)
//console.log(this.regist_password)
if(this.forget_password == '' || this.forget_rppassword == ''){//密码格式不对
const message = !this.forget_email ? '邮箱不能为空' :
(!this.forget_yzm ? '验证码不能为空' :
(!this.forget_password ? '密码不能为空' :
(this.forget_password!==this.forget_rppassword ? '两次密码不一致,请重新输入后再试' : '')));
if(message){
this.$notify({
title: '提示',
message: "密码格式不正确,请重新输入",
message: message,
type: 'error',
duration:'2000',
});
......
......@@ -289,8 +289,11 @@
</li>
</ul>
<div class="fl">
<el-button type="primary" @click="exportExcel">导出</el-button>
<el-button type="primary" @click="exportExcel" size="mini">导出当前页</el-button>
<el-button type="primary" @click="exportExcel('all')" size="mini">导出所有</el-button>
</div>
<!--隐藏的下载表格按钮-->
<a id="download" href="" target="blank" hidden download></a>
</div>
<el-table
v-loading="recordsLoading"
......@@ -812,16 +815,50 @@
handleCurrentChange1(val) {
this.getRecords({page: val+''});
},
//'='拼接key和value
toQueryPair(key, value) {
if (typeof value == 'undefined'){
console.log(key)
return;
}
return key + '=' + (value === null ? '' : String(value));
},
//'&'拼接,数组将value转换成','连接的string
toQueryString(obj) {
var ret = [];
for(var key in obj){
var values = obj[key];
// key = encodeURIComponent(key);
if(values && values.constructor == Array){//数组
var queryValues = values.join(',');
ret.push(this.toQueryPair(key, queryValues));
}else{ //字符串
ret.push(this.toQueryPair(key, values));
}
}
return ret.join('&');
},
//导出
exportExcel() {
exportExcel(type) {
const symbol = this.robotDetailInfo.coin+'/'+this.robotDetailInfo.base;
const params = {
let params = {
account: this.robotDetailInfo.account,
symbol: symbol,
opt: this.checkedOptions1,
status: this.checkedStates1,
min_time: this.transactionTime1 ? this.transactionTime1[0] : '',
max_time: this.transactionTime1 ? this.transactionTime1[1] : '',
}
axios.post(ApiConfig.Excle,params).then( res => {
console.log(res)
})
if(type !== 'all') {
params = Object.assign(params,{
page: this.currentPage,
size: this.pageSize,
})
}
let downloadHref = document.getElementById('download');
const href = 'http://47.91.221.203:46657/recordsExcle?' + this.toQueryString(params);
downloadHref.setAttribute('href', href);
downloadHref.click();
}
},
watch: {
......@@ -1111,6 +1148,10 @@
<style>
/*select组件样式覆盖*/
.detail-box {
.count-box .el-button {
background: rgba(119,146,167,1);
border: none;
}
.select-bar-content {
padding: 2px 0 0 65px;
.el-checkbox-button:last-child .el-checkbox-button__inner, .el-checkbox-button:first-child .el-checkbox-button__inner {
......
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