|
|
<script setup>
|
|
|
import * as enterpriseUser from '@/api/enterpriseUser';
|
|
|
import useUserStore from '@/store/modules/user';
|
|
|
const userStore = useUserStore();
|
|
|
// 验证
|
|
|
const dialogVisible = ref(false);
|
|
|
// 解密
|
|
|
const decodeVisible = ref(false);
|
|
|
const tableData = reactive([
|
|
|
{
|
|
|
Coding:'xxxxxxxxxx',
|
|
|
Amount:'123',
|
|
|
Address:'xxxxxx',
|
|
|
new:'xxxx',
|
|
|
wallet:'xxxxx',
|
|
|
date: "2016-05-02",
|
|
|
name: "王小虎",
|
|
|
address: "上海市",
|
|
|
},
|
|
|
{
|
|
|
Coding:'xxxxxxxxxx',
|
|
|
date: "2016-05-04",
|
|
|
name: "王小虎",
|
|
|
address: "上海市",
|
|
|
},
|
|
|
{
|
|
|
Coding:'xxxxxxxxxx',
|
|
|
date: "2016-05-01",
|
|
|
name: "王小虎",
|
|
|
address: "上海市",
|
|
|
},
|
|
|
{
|
|
|
Coding:'xxxxxxxxxx',
|
|
|
date: "2016-05-03",
|
|
|
name: "王小虎",
|
|
|
address: "上海市",
|
|
|
},
|
|
|
]);
|
|
|
// 交易明细params
|
|
|
const transactionParams=reactive({
|
|
|
userId:userStore.userId,
|
|
|
index:1,
|
|
|
size:5
|
|
|
})
|
|
|
// 上链广播parasm
|
|
|
const broadcastParams=reactive({
|
|
|
userId:userStore.userId,
|
|
|
index:1,
|
|
|
size:5
|
|
|
})
|
|
|
// 上链广播数据存储
|
|
|
const broadcastData=ref(null)
|
|
|
// 存储交易信息数据
|
|
|
const transactionData=ref(null)
|
|
|
// 交易信息total
|
|
|
const transactionTotal=ref(0)
|
|
|
// 广播total
|
|
|
const broadcastTotal=ref(0)
|
|
|
// 获取交易明细
|
|
|
function getTransaction(){
|
|
|
enterpriseUser.getEnterpriseUserTransactionRecord(transactionParams).then(res=>{
|
|
|
transactionData.value=res.data.list
|
|
|
transactionTotal.value=res.data.total
|
|
|
})
|
|
|
}
|
|
|
// 获取交易数据广播
|
|
|
function getBroadcast(){
|
|
|
enterpriseUser.getTransactionRecord(broadcastParams).then(res=>{
|
|
|
broadcastData.value=res.data.list
|
|
|
broadcastTotal.value=res.data.total
|
|
|
})
|
|
|
}
|
|
|
getBroadcast()
|
|
|
getTransaction()
|
|
|
</script>
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<img src="../../../assets/images/25.png" alt="" />
|
|
|
<span>交易明细记录</span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="el-tab el-tab1">
|
|
|
<el-table
|
|
|
:data="transactionData"
|
|
|
style="width: 100%"
|
|
|
stripe >
|
|
|
<el-table-column align="center" prop="transactionCode" label="交易编码/信息摘要" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="transactionAmount" label="交易金额" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="address" label="时间戳" >
|
|
|
<template #default="scope">
|
|
|
<span>{{ parseTime(scope.row.transactionTime,'{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="recipientName" label="转入账户名称" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="recipientWalletAddress" label="转入账户钱包地址">
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="senderName" label="转出账户名称">
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="senderWalletAddress" label="转出账户钱包地址">
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="transactionType" label="交易类型" width="200">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
v-show="transactionTotal>0"
|
|
|
:total="transactionTotal"
|
|
|
v-model:page="transactionParams.index"
|
|
|
v-model:limit="transactionParams.size"
|
|
|
@pagination="getTransaction"
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<img src="../../../assets/images/26.png" alt="" />
|
|
|
<span>交易数据上链广播</span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="el-tab el-tab1 el-tab2" style="width: 50%">
|
|
|
<el-table
|
|
|
:data="broadcastData"
|
|
|
style="width: 100%"
|
|
|
stripe
|
|
|
>
|
|
|
<el-table-column align="center" prop="transactionCode" label=" 交易编码/信息摘要" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="broadcastNode" label="广播节点" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="timestamp" label="时问数" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="" label="操作" >
|
|
|
<template #default="scope">
|
|
|
<el-button link @click="dialogVisible = true">哈希函数详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
v-show="broadcastTotal>0"
|
|
|
:total="broadcastTotal"
|
|
|
v-model:page="broadcastParams.index"
|
|
|
v-model:limit="broadcastParams.size"
|
|
|
@pagination="getBroadcast"
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
<el-dialog
|
|
|
v-model="dialogVisible"
|
|
|
title="查看数字货币"
|
|
|
width="56%"
|
|
|
>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
stripe >
|
|
|
<el-table-column align="center" prop="date" label="数字货币名(冠字号)" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="name" label="属主钱包地址" >
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="name" label="数字货币面额" >
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
:total="20"
|
|
|
/>
|
|
|
</el-dialog>
|
|
|
<!-- 生成数字货币 -->
|
|
|
<el-dialog
|
|
|
v-model="decodeVisible"
|
|
|
title="生成数字货币"
|
|
|
width="34%"
|
|
|
>
|
|
|
<el-form class="demo-form-inline">
|
|
|
<el-form-item label="额度控制位:">
|
|
|
<el-input clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="署 主 信 息 :">
|
|
|
<el-input clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="央 行 私 钥 :">
|
|
|
<el-input clearable />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
|
|
|
<el-button type="primary" @click="decodeVisible = false">数字签名 生成数字货币</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<style lang='scss' scoped>
|
|
|
:deep(.el-button.is-link){
|
|
|
color: #ffffff;
|
|
|
}
|
|
|
:deep(.el-button--primary){
|
|
|
width: 202px;
|
|
|
height: 42px;
|
|
|
border: 2px solid #25F4F9;
|
|
|
background: linear-gradient(0deg, #0654B5 0%, #003155 50%, #2CD1E4 100%);
|
|
|
box-shadow: 0px 5px 6px 0px rgba(0,48,255,0.77);
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
.grabble{
|
|
|
display: flex;
|
|
|
height: 38px;
|
|
|
label{
|
|
|
width: 132px;
|
|
|
text-align: center;
|
|
|
line-height: 38px;
|
|
|
margin-left: 54px;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
:deep(.el-input__wrapper){
|
|
|
background-color: transparent !important;
|
|
|
width: 275px;
|
|
|
height: 41px;
|
|
|
background:url('../../../assets/images/企业用户-切图/钱包管理/筛选框.png') no-repeat !important;
|
|
|
background-size: 100% 100% !important;
|
|
|
box-shadow: none !important;
|
|
|
// 输入框光标改变颜色
|
|
|
caret-color: #ffffff;
|
|
|
}
|
|
|
// 按钮
|
|
|
|
|
|
}
|
|
|
.el-col-24 {
|
|
|
height: 69px;
|
|
|
padding: 15px 13px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
span {
|
|
|
padding-left: 15px;
|
|
|
font-weight: bold;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
.el-tab {
|
|
|
padding: 0 13px;
|
|
|
}
|
|
|
.el-tab1 {
|
|
|
border: 1px solid #1854a6;
|
|
|
padding: 6px;
|
|
|
--el-table-row-hover-bg-color: transparent;
|
|
|
:deep(.el-table .el-table__header-wrapper th) {
|
|
|
background-color: #D1A506!important;
|
|
|
color: #ffffff !important;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
.el-tab2{
|
|
|
:deep(.el-table .el-table__header-wrapper th) {
|
|
|
background-color: #13B7DA!important;
|
|
|
color: #ffffff !important;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
}
|
|
|
.svg-icon{
|
|
|
margin-right: 6px;
|
|
|
}
|
|
|
</style> |