basic
This commit is contained in:
@@ -1,186 +0,0 @@
|
||||
<template>
|
||||
<div class="chain-page">
|
||||
<div class="card-content">
|
||||
<div @click="showModal" class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1"></div>
|
||||
</div>
|
||||
|
||||
<div class="table-content elevation-1">
|
||||
<div class="panel-header">
|
||||
<h3>{{ $t('chain.tableHeader') }}</h3>
|
||||
<div class="search-input">
|
||||
<v-text-field
|
||||
:placeholder="$t('chain.searchHolder')"
|
||||
:value="filter"
|
||||
@input="inputFilter"
|
||||
append-icon="search" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="itemList"
|
||||
:total-items="100"
|
||||
:rows-per-page-items="pageEntity"
|
||||
:loading="fetching"
|
||||
class="panel-content elevation-1"
|
||||
>
|
||||
<template slot="headerCell" slot-scope="props">
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.height }}</td>
|
||||
<td>{{ props.item.timestamp }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.hash }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('chain.tableNone') }}
|
||||
</template>
|
||||
</v-data-table>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<v-dialog v-model="modal" persistent>
|
||||
<v-card class="app-modal">
|
||||
<v-card-title>事务列表</v-card-title>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="itemList"
|
||||
:total-items="100"
|
||||
:rows-per-page-items="pageEntity"
|
||||
:loading="fetching"
|
||||
class="panel-content elevation-1"
|
||||
>
|
||||
<template slot="headerCell" slot-scope="props">
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.height }}</td>
|
||||
<td>{{ props.item.timestamp }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.hash }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('chain.tableNone') }}
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" flat @click.native="hideModal">Close</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createNamespacedHelpers,
|
||||
} from 'vuex'
|
||||
|
||||
import Vue from 'vue'
|
||||
import store from '../store'
|
||||
import VueSocketio from 'vue-socket.io'
|
||||
import io from 'socket.io-client'
|
||||
// import axios from 'axios'
|
||||
|
||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
|
||||
const socketUrl = `ws://${location.hostname}:60000`
|
||||
|
||||
// Vue.use(VueSocketio, io(socketUrl), store)
|
||||
|
||||
export default {
|
||||
name: 'Chain',
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'headers',
|
||||
'itemList',
|
||||
'pageEntity',
|
||||
'fetching',
|
||||
'filter',
|
||||
'modal',
|
||||
]),
|
||||
...mapGetters([]),
|
||||
},
|
||||
// sockets: {
|
||||
// connect() {
|
||||
// console.log('socket connected')
|
||||
// },
|
||||
// newBlock(msg) {
|
||||
// this.addNewBlock(msg)
|
||||
// },
|
||||
// },
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
'queryBlockList',
|
||||
'addNewBlock',
|
||||
]),
|
||||
...mapMutations([
|
||||
'inputFilter',
|
||||
'showModal',
|
||||
'hideModal',
|
||||
'addItem',
|
||||
]),
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// this.queryBlockList()
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.chain-page {
|
||||
height: 0;
|
||||
overflow: auto;
|
||||
z-index: 1;
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
|
||||
.app-card {
|
||||
flex: 1;
|
||||
height: 100px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.app-sep {
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-content {
|
||||
flex: 1;
|
||||
margin: 0 20px 20px;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 20px;
|
||||
|
||||
.search-input {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
margin: 0 20px 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -9,11 +9,11 @@
|
||||
dark autofocus
|
||||
single-line
|
||||
:error="inputError"
|
||||
:error-messages="errorMnemonic"
|
||||
:error-messages="erroruser"
|
||||
:value="user"
|
||||
:loading="signing"
|
||||
:renewing="renewing"
|
||||
@input="updateMnemonic"
|
||||
@input="updateUserName"
|
||||
label="用户名" />
|
||||
|
||||
<v-text-field
|
||||
@@ -21,11 +21,12 @@
|
||||
dark autofocus
|
||||
single-line
|
||||
:error="inputError"
|
||||
:error-messages="errorMnemonic"
|
||||
:error-messages="erroruser"
|
||||
:value="passwd"
|
||||
:loading="signing"
|
||||
:renewing="renewing"
|
||||
@input="updateMnemonic"
|
||||
@input="updatePasswd"
|
||||
type='password'
|
||||
@keyup.13="login"
|
||||
label="密码" />
|
||||
|
||||
@@ -72,7 +73,7 @@ export default {
|
||||
...mapState([
|
||||
'user',
|
||||
'passwd',
|
||||
'errorMnemonic',
|
||||
'erroruser',
|
||||
'signing',
|
||||
'renewing',
|
||||
]),
|
||||
@@ -87,7 +88,8 @@ export default {
|
||||
|
||||
methods: {
|
||||
...mapMutations([
|
||||
'updateMnemonic',
|
||||
'updateUserName',
|
||||
'updatePasswd'
|
||||
]),
|
||||
...mapActions([
|
||||
'login',
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<template>
|
||||
<div class="market-page">
|
||||
Market
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Market',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.market-page {
|
||||
}
|
||||
</style>
|
||||
@@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<div class="netnode-page">
|
||||
<div class="card-content">
|
||||
<div class="app-card elevation-1">
|
||||
<div>主机地址 <br> {{ ipAddress }}</div>
|
||||
</div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1">
|
||||
<div>在线用户 <br> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-content elevation-1">
|
||||
<div class="panel-header">
|
||||
<h3>{{ $t('netnode.tableHeader') }}</h3>
|
||||
@@ -21,11 +11,10 @@
|
||||
append-icon="search" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="blockList"
|
||||
:items="itemList"
|
||||
:total-items="100"
|
||||
:rows-per-page-items="pageEntity"
|
||||
:loading="fetching"
|
||||
@@ -35,13 +24,11 @@
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.height }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.hash }}</td>
|
||||
<td>{{ props.item.timestamp }}</td>
|
||||
<!-- <td>{{ props.item.winnerPubkey }}</td> -->
|
||||
<td>{{ props.item.packerPubkey }}</td>
|
||||
<td>{{ props.item.rewardPacker }}</td>
|
||||
<td>{{ props.item._id }}</td>
|
||||
<td>{{ props.item.tokenType }}</td>
|
||||
<td>{{ props.item.amount }}</td>
|
||||
<td>{{ props.item.createdAt }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('netnode.tableNone') }}
|
||||
@@ -66,19 +53,17 @@ export default {
|
||||
computed: {
|
||||
...mapState([
|
||||
'headers',
|
||||
'blockList',
|
||||
'itemList',
|
||||
'pageEntity',
|
||||
'fetching',
|
||||
'filter',
|
||||
'modal',
|
||||
'ipAddress',
|
||||
]),
|
||||
...mapGetters([]),
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
'updateNodeInfo',
|
||||
'queryUserInfo',
|
||||
'queryOne',
|
||||
]),
|
||||
...mapMutations([
|
||||
'inputFilter',
|
||||
@@ -87,7 +72,7 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.updateNodeInfo()
|
||||
this.queryUserInfo()
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<div class="network-page">
|
||||
<div class="card-content">
|
||||
<div class="app-card elevation-1">
|
||||
<div>当前邻居节点数 <br>{{ nodeNumber }}</div>
|
||||
</div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1">
|
||||
<div>当前全网节点数 <br>{{ nodeNumber }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-content elevation-1">
|
||||
<div class="panel-header">
|
||||
<h3>{{ $t('network.tableHeader') }}</h3>
|
||||
@@ -35,10 +25,12 @@
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.index }}</td>
|
||||
<td>{{ props.item.accessPoint }}</td>
|
||||
<td>{{ props.item.ownerAddress }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.userId }}</td>
|
||||
<td>{{ props.item.status }}</td>
|
||||
<td>{{ props.item.targetAddress }}</td>
|
||||
<td>{{ props.item.action.amount }}</td>
|
||||
<td>{{ props.item.createdAt }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('network.tableNone') }}
|
||||
@@ -66,15 +58,13 @@ export default {
|
||||
'pageEntity',
|
||||
'fetching',
|
||||
'filter',
|
||||
'nodeNumber',
|
||||
'nodeNumber',
|
||||
]),
|
||||
...mapGetters([]),
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
'updateNetInfo',
|
||||
'queryTickets',
|
||||
]),
|
||||
...mapMutations([
|
||||
'inputFilter',
|
||||
@@ -84,7 +74,7 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.updateNetInfo()
|
||||
this.queryTickets()
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -1,77 +1,14 @@
|
||||
<template>
|
||||
<div class="owner-page">
|
||||
<v-dialog
|
||||
:value="transferVisible"
|
||||
@input="toggleTransferDlg"
|
||||
:width="500"
|
||||
:max-width="600"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<section class='dlg-body'>
|
||||
<span class="title-decoration dlg-line">我的地址</span>
|
||||
<span class="address-decoration dlg-line">{{ address }}</span>
|
||||
|
||||
<span class="title-decoration dlg-line">接受地址</span>
|
||||
<v-text-field
|
||||
autofocus
|
||||
single-line
|
||||
:error-messages="wrongAddress"
|
||||
:value="targetAddress"
|
||||
@input="changeTargetAddress"
|
||||
></v-text-field>
|
||||
|
||||
<div class="group-line">
|
||||
<span class="title-decoration title-left">转账金额</span>
|
||||
<v-text-field
|
||||
single-line
|
||||
:error-messages="wrongAmount"
|
||||
:value="transferAmount"
|
||||
@input="changeTransferAmount"
|
||||
></v-text-field>
|
||||
<span class="title-decoration title-right">TIC</span>
|
||||
</div>
|
||||
|
||||
<div class="group-line">
|
||||
<span class="title-decoration title-left">手续费</span>
|
||||
<v-text-field
|
||||
single-line
|
||||
:error-messages="wrongFee"
|
||||
:value="transferFee"
|
||||
@input="changeTransferFee"
|
||||
></v-text-field>
|
||||
<span class="title-decoration title-right">TIC</span>
|
||||
</div>
|
||||
|
||||
<span class="title-decoration dlg-line">备注</span>
|
||||
<v-text-field
|
||||
:value="transferRemark"
|
||||
@input="changeTransferRemark"
|
||||
></v-text-field>
|
||||
</section>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<span class="result-hint">{{ transferResult }}</span>
|
||||
<v-btn color="grey darken-1" flat @click="hideTransferDlg">关闭</v-btn>
|
||||
<v-btn
|
||||
color="blue darken-1"
|
||||
flat
|
||||
@click="performTransfer"
|
||||
:loading="submitting"
|
||||
>转账</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<div class="card-content">
|
||||
<div class="app-card elevation-1">
|
||||
<div class="card-body">
|
||||
<span>主人地址</span>
|
||||
<span>{{ address }}</span>
|
||||
<span>用户总数</span>
|
||||
<span>{{ userNumSum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-sep"></div>
|
||||
<div class="app-card elevation-1">
|
||||
<!-- <div class="app-card elevation-1">
|
||||
<div class="card-body">
|
||||
<span>余额: {{ balance }}</span>
|
||||
<v-btn
|
||||
@@ -79,11 +16,11 @@
|
||||
color="info"
|
||||
>转账</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="table-content elevation-1">
|
||||
<div class="panel-header">
|
||||
<h3>{{ $t('owner.tableHeader') }}</h3>
|
||||
<h3>用户列表</h3>
|
||||
<div class="search-input">
|
||||
<v-text-field
|
||||
:placeholder="$t('owner.searchHolder')"
|
||||
@@ -106,14 +43,10 @@
|
||||
<span>{{ $t(props.header.text) }}</span>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td>{{ props.item.hash }}</td>
|
||||
<td>{{ props.item.type }}</td>
|
||||
<td>{{ props.item.actorAddress }}</td>
|
||||
<td>{{ props.item.toAddress }}</td>
|
||||
<td>{{ props.item.timestamp }}</td>
|
||||
<td>{{ props.item.amount }}</td>
|
||||
<td>{{ props.item.fee }}</td>
|
||||
<td>{{ props.item.message }}</td>
|
||||
<td>{{ props.item._id }}</td>
|
||||
<td>{{ props.item.phone }}</td>
|
||||
<td>{{ props.item.group.length }}</td>
|
||||
<td>{{ props.item.vic }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('owner.tableNone') }}
|
||||
@@ -136,31 +69,19 @@ export default {
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'userNumSum',
|
||||
'headers',
|
||||
'itemList',
|
||||
'pageEntity',
|
||||
'fetching',
|
||||
'filter',
|
||||
'balance',
|
||||
'address',
|
||||
'transferVisible',
|
||||
'targetAddress',
|
||||
'transferAmount',
|
||||
'transferFee',
|
||||
'transferRemark',
|
||||
'submitting',
|
||||
'wrongAddress',
|
||||
'wrongAmount',
|
||||
'wrongFee',
|
||||
'transferResult',
|
||||
]),
|
||||
...mapGetters([]),
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
'updateOwnerInfo',
|
||||
'performTransfer',
|
||||
'queryUserInfo',
|
||||
'queryOne',
|
||||
]),
|
||||
...mapMutations([
|
||||
'inputFilter',
|
||||
@@ -183,7 +104,7 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.updateOwnerInfo()
|
||||
this.queryUserInfo()
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user