|
@@ -30,10 +30,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="app-container-head-right">
|
|
|
- <div class="app-container-head-right-button1">
|
|
|
+ <div class="app-container-head-right-button1" @click="exportAddress">
|
|
|
导出地址
|
|
|
</div>
|
|
|
- <div class="app-container-head-right-button1" @click="downloadAddress">
|
|
|
+ <div class="app-container-head-right-button1" @click="downloadAddress()">
|
|
|
下载 KeyStore
|
|
|
</div>
|
|
|
<div class="app-container-head-right-button1" @click="drawerImport = true">
|
|
@@ -127,7 +127,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right">
|
|
|
<template v-slot="scope">
|
|
|
- <div class="view" @click="viewAddress">
|
|
|
+ <div class="view" @click="viewAddress(scope.row)">
|
|
|
查看
|
|
|
</div>
|
|
|
</template>
|
|
@@ -157,7 +157,7 @@
|
|
|
钱包名称
|
|
|
</div>
|
|
|
<div class="drawerView-container-walletAddress">
|
|
|
- 0x00581a605...ca48ddebe60b2a4ca4da
|
|
|
+ {{drawerViewData.address}}
|
|
|
</div>
|
|
|
<div class="drawerView-container-statistics">
|
|
|
<div class="drawerView-container-statistics-item">
|
|
@@ -165,7 +165,7 @@
|
|
|
累计花费
|
|
|
</div>
|
|
|
<div class="drawerView-container-statistics-item-amounts">
|
|
|
- <span class="number">89.11</span>
|
|
|
+ <span class="number">{{drawerViewData.gas}}</span>
|
|
|
<span class="currency">USDT</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -174,7 +174,7 @@
|
|
|
剩余本金
|
|
|
</div>
|
|
|
<div class="drawerView-container-statistics-item-amounts">
|
|
|
- <span class="number">700.00</span>
|
|
|
+ <span class="number">{{drawerViewData.balance}}</span>
|
|
|
<span class="currency">USDT</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -185,7 +185,7 @@
|
|
|
钱包活动
|
|
|
</div>
|
|
|
<div class="drawerView-container-total">
|
|
|
- 总计钱包: 222
|
|
|
+ 总计钱包: {{drawerViewData.total}}
|
|
|
</div>
|
|
|
<div class="drawerView-container-table-screening">
|
|
|
<div class="drawerView-container-table-screening-item">
|
|
@@ -196,26 +196,33 @@
|
|
|
时间
|
|
|
<img src="../../assets/address/filter_list.svg" alt="filter_list">
|
|
|
</div>
|
|
|
+ <div class="drawerView-container-table-screening-item" style="margin-left: 26px;margin-right: -10px">
|
|
|
+ Gas
|
|
|
+ <img src="../../assets/address/unfold_more.svg" alt="unfold_more">
|
|
|
+ </div>
|
|
|
<div class="drawerView-container-table-screening-item">
|
|
|
- 余额
|
|
|
+ 交易金额
|
|
|
<img src="../../assets/address/unfold_more.svg" alt="unfold_more">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="drawerView-container-table-main">
|
|
|
- <div v-for="item in drawerViewTableData" class="drawerView-container-table-main-item">
|
|
|
+ <div v-for="item in drawerViewData.table" class="drawerView-container-table-main-item">
|
|
|
<div class="activity">
|
|
|
- <div class="activity-item" v-if="item.activity === 'Mint'" style="background: #F2C94C;">
|
|
|
- {{item.activity}}
|
|
|
+ <div class="activity-item" v-if="item.taskType !== 'SWAP'" style="background: #F2C94C;">
|
|
|
+ {{item.taskName}}
|
|
|
</div>
|
|
|
- <div class="activity-item" v-if="item.activity === 'Swap'" style="background: #6FCF97;">
|
|
|
- {{item.activity}}
|
|
|
+ <div class="activity-item" v-if="item.taskType === 'SWAP'" style="background: #6FCF97;">
|
|
|
+ {{item.taskName}}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="time">
|
|
|
- {{item.time}}
|
|
|
+ {{item.createTime}}
|
|
|
+ </div>
|
|
|
+ <div class="gas">
|
|
|
+ {{parseFloat(item.gas).toFixed(4)}}
|
|
|
</div>
|
|
|
<div class="balance">
|
|
|
- {{item.balance}}
|
|
|
+ {{parseFloat(item.amount).toFixed(4)}}
|
|
|
</div>
|
|
|
<div class="link">
|
|
|
详情
|
|
@@ -229,17 +236,18 @@
|
|
|
<el-pagination
|
|
|
small
|
|
|
layout="prev, pager, next"
|
|
|
- :total="1000">
|
|
|
+ :page-size="10"
|
|
|
+ :total="drawerViewData.total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
- <div class="manageAccount">
|
|
|
- <img src="../../assets/address/page_info.svg" alt="page_info">
|
|
|
- 管理账号
|
|
|
- </div>
|
|
|
- <div class="disassociation">
|
|
|
- <img src="../../assets/address/link_off.svg" alt="link_off">
|
|
|
- 取消关联
|
|
|
- </div>
|
|
|
+<!-- <div class="manageAccount">-->
|
|
|
+<!-- <img src="../../assets/address/page_info.svg" alt="page_info">-->
|
|
|
+<!-- 管理账号-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="disassociation">-->
|
|
|
+<!-- <img src="../../assets/address/link_off.svg" alt="link_off">-->
|
|
|
+<!-- 取消关联-->
|
|
|
+<!-- </div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
@@ -395,7 +403,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="confirm" @click="addBatchAddress">
|
|
|
- <img src="../../assets/address/Stroke-2.svg" alt="Stroke">
|
|
|
+ <img v-if="!confirmLoading" src="../../assets/address/Stroke-2.svg" alt="Stroke">
|
|
|
+ <div v-if="confirmLoading" style="width: 20px;height: 20px;margin-top: -2px">
|
|
|
+ <Loading/>
|
|
|
+ </div>
|
|
|
开始生成
|
|
|
</div>
|
|
|
<div class="tip">
|
|
@@ -415,7 +426,7 @@
|
|
|
<img src="../../assets/address/Rectangle.png" alt="Rectangle">
|
|
|
<div class="description">
|
|
|
<div class="address">
|
|
|
- 成功生成 100 个钱包地址
|
|
|
+ 成功生成 {{addressList.length}} 个钱包地址
|
|
|
</div>
|
|
|
<div class="tip">
|
|
|
请牢记您的 Keystore 文件及密码,系统无法帮你找回
|
|
@@ -437,7 +448,7 @@
|
|
|
<el-pagination
|
|
|
small
|
|
|
layout="prev, pager, next"
|
|
|
- :total="1000">
|
|
|
+ :total="addressList.length">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -448,7 +459,7 @@
|
|
|
<img src="../../assets/address/upload.svg" alt="upload">
|
|
|
导出地址
|
|
|
</div>
|
|
|
- <div class="download">
|
|
|
+ <div class="download" @click="downloadAddress(batchAddressObj.groupName)">
|
|
|
<img src="../../assets/address/download.svg" alt="download">
|
|
|
下载Keystore
|
|
|
</div>
|
|
@@ -464,13 +475,16 @@ import {
|
|
|
addPremiumAddress,
|
|
|
batchAddress,
|
|
|
downloadAddress,
|
|
|
- getCountAddress,
|
|
|
+ getCountAddress, getEventRecord,
|
|
|
getGroupList,
|
|
|
pageAddress
|
|
|
} from '@/api/adress'
|
|
|
-import AES from "@/utils/aes";
|
|
|
import Axios from "axios";
|
|
|
+import Loading from "@/components/Loading";
|
|
|
+import {saveAs} from 'file-saver';
|
|
|
+
|
|
|
export default {
|
|
|
+ components: {Loading},
|
|
|
data() {
|
|
|
return {
|
|
|
table:{
|
|
@@ -485,39 +499,15 @@ export default {
|
|
|
premiumCount:0
|
|
|
},
|
|
|
tableData: [],
|
|
|
+ exportTableData:[],
|
|
|
drawerView:false,
|
|
|
- drawerViewTableData:[
|
|
|
- {
|
|
|
- activity:'Mint',
|
|
|
- time:'06:42',
|
|
|
- txId:'',
|
|
|
- balance:89.23
|
|
|
- },
|
|
|
- {
|
|
|
- activity:'Swap',
|
|
|
- time:'06:42',
|
|
|
- txId:'',
|
|
|
- balance:89.23
|
|
|
- },
|
|
|
- {
|
|
|
- activity:'Mint',
|
|
|
- time:'06:42',
|
|
|
- txId:'',
|
|
|
- balance:89.23
|
|
|
- },
|
|
|
- {
|
|
|
- activity:'Swap',
|
|
|
- time:'06:42',
|
|
|
- txId:'',
|
|
|
- balance:89.23
|
|
|
- },
|
|
|
- {
|
|
|
- activity:'Swap',
|
|
|
- time:'06:42',
|
|
|
- txId:'',
|
|
|
- balance:89.23
|
|
|
- },
|
|
|
- ],
|
|
|
+ drawerViewData:{
|
|
|
+ address:'',
|
|
|
+ table:[],
|
|
|
+ gas:0,
|
|
|
+ balance:0,
|
|
|
+ total:0
|
|
|
+ },
|
|
|
drawerAddress:false,
|
|
|
addressArr:[
|
|
|
{
|
|
@@ -542,19 +532,9 @@ export default {
|
|
|
drawerImport:false,
|
|
|
drawerImportSelect:1,
|
|
|
completeGeneration:false,
|
|
|
- addressList:[
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- '0xc63988ae669C41125ecB4e8113f4D0eF21874637',
|
|
|
- ],
|
|
|
- url: process.env.VUE_APP_BASEURL,
|
|
|
+ addressList:[],
|
|
|
+ confirmLoading:false,
|
|
|
+ url: process.env.VUE_APP_BASE_API,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -594,8 +574,20 @@ export default {
|
|
|
this.table.page = 1
|
|
|
this.getAddressGroupAddress()
|
|
|
},
|
|
|
- viewAddress(){
|
|
|
- this.drawerView = true
|
|
|
+ viewAddress(row){
|
|
|
+ let params = {
|
|
|
+ page:1,
|
|
|
+ pageSize:10,
|
|
|
+ queryValue:row.address
|
|
|
+ }
|
|
|
+ getEventRecord(params).then(res=>{
|
|
|
+ this.drawerViewData.address = row.address
|
|
|
+ this.drawerViewData.gas = row.totalGas
|
|
|
+ this.drawerViewData.total = res.total
|
|
|
+ this.drawerViewData.table = res.records
|
|
|
+ this.drawerView = true
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
addBoutiqueAccount(){
|
|
|
let params = this.addressArr
|
|
@@ -638,25 +630,22 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
let params = this.batchAddressObj
|
|
|
+ this.confirmLoading = true
|
|
|
batchAddress(params).then(res=>{
|
|
|
- console.log(res);
|
|
|
+ this.addressList = res
|
|
|
this.completeGeneration = true
|
|
|
+ this.confirmLoading = true
|
|
|
})
|
|
|
},
|
|
|
- downloadKeyStore(){
|
|
|
- let params = {
|
|
|
- groupName:this.table.walletNameGroup[this.table.walletNameGroupIndex]
|
|
|
+ downloadAddress(el) {
|
|
|
+ let groupName = this.table.walletNameGroup[this.table.walletNameGroupIndex]
|
|
|
+ if(el){
|
|
|
+ groupName = el
|
|
|
}
|
|
|
- downloadAddress(params).then(res=>{
|
|
|
- console.log(res);
|
|
|
- })
|
|
|
- },
|
|
|
- downloadAddress() {
|
|
|
-
|
|
|
Axios.post(
|
|
|
this.url + "ams/address/download/batch-keystore",
|
|
|
{
|
|
|
- groupName: this.table.walletNameGroup[this.table.walletNameGroupIndex],
|
|
|
+ groupName: groupName,
|
|
|
},
|
|
|
{
|
|
|
responseType: "arraybuffer",
|
|
@@ -666,37 +655,55 @@ export default {
|
|
|
}
|
|
|
)
|
|
|
.then((response) => {
|
|
|
- console.log(response.data);
|
|
|
let buffer = response.data;
|
|
|
let view = new DataView(buffer);
|
|
|
-
|
|
|
let str = "";
|
|
|
for (let i = 0; i < view.byteLength; i++) {
|
|
|
str += String.fromCharCode(view.getUint8(i));
|
|
|
}
|
|
|
if (str.includes(".json")) {
|
|
|
- console.log(str.includes(".json"));
|
|
|
- this.downloadFile(response.data);
|
|
|
+ this.downloadFile(response.data,groupName);
|
|
|
} else {
|
|
|
const data = JSON.parse(str);
|
|
|
this.$message.error(data.message);
|
|
|
}
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
- console.log(e);
|
|
|
this.$message.error(e);
|
|
|
});
|
|
|
},
|
|
|
- downloadFile(data) {
|
|
|
+ downloadFile(data,groupName) {
|
|
|
let blob = new Blob([data], { type: "application/zip" });
|
|
|
let url = window.URL.createObjectURL(blob);
|
|
|
const link = document.createElement("a"); // 创建a标签
|
|
|
link.href = url;
|
|
|
- link.download = this.table.walletNameGroup[this.table.walletNameGroupIndex] + ".zip";
|
|
|
+ link.download = groupName + ".zip";
|
|
|
link.click();
|
|
|
URL.revokeObjectURL(url); // 释放内存
|
|
|
this.downloadModal = false;
|
|
|
},
|
|
|
+ exportAddress() {
|
|
|
+ let params
|
|
|
+ if(this.table.walletNameGroupIndex === 0){
|
|
|
+ params = {
|
|
|
+ page:1,
|
|
|
+ pageSize:1000,
|
|
|
+ addressType:0
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ params = {
|
|
|
+ page:1,
|
|
|
+ pageSize:1000,
|
|
|
+ groupName:this.table.walletNameGroup[this.table.walletNameGroupIndex]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ pageAddress(params).then(res=>{
|
|
|
+ this.exportTableData = res.records
|
|
|
+ this.exportTableData.forEach(item=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
success(message) {
|
|
|
this.$notify({
|
|
|
title: '成功',
|
|
@@ -1002,7 +1009,7 @@ export default {
|
|
|
height: 52px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- gap:120px;
|
|
|
+ gap:60px;
|
|
|
border-bottom: 1px solid #f5f5f5;
|
|
|
border-top: 1px solid #f5f5f5;
|
|
|
.drawerView-container-table-screening-item{
|
|
@@ -1013,6 +1020,7 @@ export default {
|
|
|
font-size: 15px;
|
|
|
line-height: 20px;
|
|
|
color: #4d4d4e;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
}
|
|
|
.drawerView-container-table-main{
|
|
@@ -1024,7 +1032,7 @@ export default {
|
|
|
align-items: center;
|
|
|
height: 30px;
|
|
|
.activity{
|
|
|
- width: 210px;
|
|
|
+ width: 120px;
|
|
|
.activity-item{
|
|
|
width: 72px;
|
|
|
height: 30px;
|
|
@@ -1059,6 +1067,13 @@ export default {
|
|
|
color: #222222;
|
|
|
width: 120px;
|
|
|
}
|
|
|
+ .gas{
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 15px;
|
|
|
+ line-height: 20px;
|
|
|
+ color: #222222;
|
|
|
+ width: 120px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1067,7 +1082,7 @@ export default {
|
|
|
padding: 30px 10px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: space-around;
|
|
|
+ //justify-content: space-around;
|
|
|
.pagination{
|
|
|
width: 250px;
|
|
|
}
|
|
@@ -1416,6 +1431,7 @@ export default {
|
|
|
font-size: 17px;
|
|
|
line-height: 22px;
|
|
|
color: #222222;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
}
|