|
|
@@ -4,26 +4,14 @@
|
|
|
>
|
|
|
<v-container>
|
|
|
<v-row>
|
|
|
- <!-- Start Time过滤 -->
|
|
|
+ <!-- block过滤 -->
|
|
|
<v-col
|
|
|
cols="18"
|
|
|
md="2"
|
|
|
>
|
|
|
<v-text-field
|
|
|
- v-model="query.t1_str"
|
|
|
- label="Start Time(YYYY/mm/DD HH:MM:SS)"
|
|
|
- required
|
|
|
- ></v-text-field>
|
|
|
- </v-col>
|
|
|
-
|
|
|
- <!-- End Time过滤 -->
|
|
|
- <v-col
|
|
|
- cols="18"
|
|
|
- md="2"
|
|
|
- >
|
|
|
- <v-text-field
|
|
|
- v-model="query.t2_str"
|
|
|
- label="End Time(YYYY/mm/DD HH:MM:SS)"
|
|
|
+ v-model="query.block"
|
|
|
+ label="BlockNumber"
|
|
|
required
|
|
|
></v-text-field>
|
|
|
</v-col>
|
|
|
@@ -34,44 +22,20 @@
|
|
|
md="2"
|
|
|
>
|
|
|
<v-text-field
|
|
|
- v-model="query.hs"
|
|
|
+ v-model="query.hash"
|
|
|
label="Hash"
|
|
|
required
|
|
|
></v-text-field>
|
|
|
</v-col>
|
|
|
|
|
|
- <!-- From -->
|
|
|
- <v-col
|
|
|
- cols="18"
|
|
|
- md="2"
|
|
|
- >
|
|
|
- <v-text-field
|
|
|
- v-model="query.fm"
|
|
|
- label="From"
|
|
|
- required
|
|
|
- ></v-text-field>
|
|
|
- </v-col>
|
|
|
-
|
|
|
- <!-- To -->
|
|
|
- <v-col
|
|
|
- cols="18"
|
|
|
- md="2"
|
|
|
- >
|
|
|
- <v-text-field
|
|
|
- v-model="query.t"
|
|
|
- label="To"
|
|
|
- required
|
|
|
- ></v-text-field>
|
|
|
- </v-col>
|
|
|
-
|
|
|
- <!-- State -->
|
|
|
+ <!-- data过滤 -->
|
|
|
<v-col
|
|
|
cols="18"
|
|
|
- md="1"
|
|
|
+ md="6"
|
|
|
>
|
|
|
<v-text-field
|
|
|
- v-model="query.state"
|
|
|
- label="State"
|
|
|
+ v-model="query.dataVague"
|
|
|
+ label="Data"
|
|
|
required
|
|
|
></v-text-field>
|
|
|
</v-col>
|
|
|
@@ -80,7 +44,7 @@
|
|
|
cols="18"
|
|
|
md="1"
|
|
|
>
|
|
|
- <v-btn outlined tile color="primary" @click="getRecord">
|
|
|
+ <v-btn outlined x-large tile color="primary" @click="pullData">
|
|
|
<v-icon left>mdi-cloud-search-outline</v-icon>
|
|
|
Search
|
|
|
</v-btn>
|
|
|
@@ -97,7 +61,7 @@
|
|
|
<v-text-field
|
|
|
v-model="search"
|
|
|
append-icon="mdi-magnify"
|
|
|
- label="Search"
|
|
|
+ label="Local Search"
|
|
|
single-line
|
|
|
hide-details
|
|
|
></v-text-field>
|
|
|
@@ -115,37 +79,15 @@
|
|
|
:sort-by="['ts', 'block', 'nonce']"
|
|
|
:sort-desc="[true, true, true]"
|
|
|
>
|
|
|
- <template v-slot:item.ts="{ item }">
|
|
|
- {{ getTime(item.ts) }}
|
|
|
- </template>
|
|
|
- <!-- Type -->
|
|
|
- <template v-slot:item.type="{ item }">
|
|
|
- <v-chip small v-if="item.o.type.indexOf('err') !== -1" outlined label color="grey">
|
|
|
- <v-icon small left>mdi-filter-remove</v-icon>
|
|
|
- {{ item.o.type.split(':')[1] }}
|
|
|
- </v-chip>
|
|
|
- <v-chip small v-else-if="item.o.type.indexOf('WARN') !== -1" outlined label color="red lighten-2">
|
|
|
- <v-icon small left>mdi-alert-circle-outline</v-icon>
|
|
|
- {{ item.o.type.split(':')[1] }}
|
|
|
- </v-chip>
|
|
|
- <v-chip small v-else-if="item.o.type.indexOf('DS:') !== -1" outlined label color="cyan darken-3">
|
|
|
- <v-icon small left>mdi-horse-human</v-icon>
|
|
|
- {{ item.o.type.split(':')[1] }}
|
|
|
- </v-chip>
|
|
|
- <v-chip small v-else-if="item.o.type.indexOf('CASH') !== -1" outlined label color="black">
|
|
|
- <v-icon small left>mdi-currency-usd</v-icon>
|
|
|
- {{ item.o.type.split(':')[1] }}
|
|
|
- </v-chip>
|
|
|
- <v-chip small v-else-if="item.o.type.indexOf('ZIJI') !== -1" outlined label color="blue">
|
|
|
- <v-icon small left>mdi-panda</v-icon>
|
|
|
- {{ item.o.type.split(':')[1] }}
|
|
|
- </v-chip>
|
|
|
+ <!-- Block -->
|
|
|
+ <template v-slot:item.block="{ item }">
|
|
|
+ {{ item.block }}
|
|
|
</template>
|
|
|
<!-- Hash -->
|
|
|
- <template v-slot:item.hs="{ item }">
|
|
|
+ <template v-slot:item.hash="{ item }">
|
|
|
<v-tooltip right>
|
|
|
<template v-slot:activator="{ on, attrs }">
|
|
|
- <v-btn small :href="'https://etherscan.io/tx/' + item.hs" target="_blank" text v-on="on" v-bind="attrs">{{ getSimpleStr(item.hs) }}</v-btn>
|
|
|
+ <v-btn small :href="'https://etherscan.io/tx/' + item.hash" target="_blank" text v-on="on" v-bind="attrs">{{ getSimpleStr(item.hash) }}</v-btn>
|
|
|
</template>
|
|
|
<span>{{ item.hs }}</span>
|
|
|
</v-tooltip>
|
|
|
@@ -159,60 +101,39 @@
|
|
|
<!-- <span>{{ item.fm }}</span>-->
|
|
|
<!-- </v-tooltip>-->
|
|
|
<!-- </template>-->
|
|
|
- <!-- Address -->
|
|
|
- <template v-slot:item.symbolAddress="{ item }">
|
|
|
- <v-tooltip right>
|
|
|
- <template v-slot:activator="{ on, attrs }">
|
|
|
- <v-btn small :href="'https://etherscan.io/address/' + item.symbolAddress" target="_blank" text v-on="on" v-bind="attrs">{{ getSimpleStr(item.symbolAddress) }}</v-btn>
|
|
|
- </template>
|
|
|
- <span>{{ item.symbolAddress }}</span>
|
|
|
- </v-tooltip>
|
|
|
- </template>
|
|
|
- <!-- Gas -->
|
|
|
- <template v-slot:item.o="{ item }">
|
|
|
- {{ item.o.gas }}
|
|
|
- </template>
|
|
|
- <!-- 利润 -->
|
|
|
- <template v-slot:item.profit="{ item }">
|
|
|
- {{ item.o.profit }}
|
|
|
- </template>
|
|
|
- <!-- Block -->
|
|
|
- <template v-slot:item.block="{ item }">
|
|
|
- {{ item.o.blockNumber }}
|
|
|
- </template>
|
|
|
<!-- Nonce -->
|
|
|
- <template v-slot:item.nonce="{ item }">
|
|
|
- {{ item.o.nonce }}
|
|
|
- </template>
|
|
|
- <!-- origin -->
|
|
|
- <template v-slot:item.origin>
|
|
|
- {{ '' }}
|
|
|
- </template>
|
|
|
- <!-- State -->
|
|
|
- <template v-slot:item.state="{ item }">
|
|
|
- <v-chip small v-if="item.state === 'ok'" outlined label color="teal"> ok </v-chip>
|
|
|
- <v-chip small v-else-if="item.state === 'pending'" outlined label color="orange"> {{ item.state }} </v-chip>
|
|
|
- <v-chip small v-else-if="item.state === 'fail'" outlined label color="red lighten-3"> {{ item.state }} </v-chip>
|
|
|
- <v-chip small v-else-if="item.state === 'cancel'" outlined label color="blue-grey"> {{ item.state }} </v-chip>
|
|
|
- </template>
|
|
|
- <!-- Amount -->
|
|
|
- <template v-slot:item.amount="{ item }">
|
|
|
- <div v-if="!item.o.intoken">
|
|
|
- <v-chip small outlined color="red accent-1">-{{ item.o.inamount }}(TOKEN)</v-chip>
|
|
|
- >
|
|
|
- <v-chip small outlined color="teal lighten-1" @click="jump(item.o.pairAddress)">+{{ item.o.outamount }}({{ item.o.outtoken }})</v-chip>
|
|
|
- </div>
|
|
|
- <div v-else-if="!item.o.outtoken">
|
|
|
- <v-chip small outlined color="red accent-1">-{{ item.o.inamount }}({{ item.o.intoken }})</v-chip>
|
|
|
- >
|
|
|
- <v-chip small outlined color="teal lighten-1" @click="jump(item.o.pairAddress)">+{{ item.o.outamount }}(TOKEN)</v-chip>
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <v-chip small outlined color="red accent-1">-{{ item.o.inamount }}({{ item.o.intoken }})</v-chip>
|
|
|
- >
|
|
|
- <v-chip small outlined color="teal lighten-1" @click="jump(item.o.pairAddress)">+{{ item.o.outamount }}({{ item.o.outtoken }})</v-chip>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+<!-- <template v-slot:item.nonce="{ item }">-->
|
|
|
+<!-- {{ item.o.nonce }}-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <!– origin –>-->
|
|
|
+<!-- <template v-slot:item.origin>-->
|
|
|
+<!-- {{ '' }}-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <!– State –>-->
|
|
|
+<!-- <template v-slot:item.state="{ item }">-->
|
|
|
+<!-- <v-chip small v-if="item.state === 'ok'" outlined label color="teal"> ok </v-chip>-->
|
|
|
+<!-- <v-chip small v-else-if="item.state === 'pending'" outlined label color="orange"> {{ item.state }} </v-chip>-->
|
|
|
+<!-- <v-chip small v-else-if="item.state === 'fail'" outlined label color="red lighten-3"> {{ item.state }} </v-chip>-->
|
|
|
+<!-- <v-chip small v-else-if="item.state === 'cancel'" outlined label color="blue-grey"> {{ item.state }} </v-chip>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <!– Amount –>-->
|
|
|
+<!-- <template v-slot:item.amount="{ item }">-->
|
|
|
+<!-- <div v-if="!item.o.intoken">-->
|
|
|
+<!-- <v-chip small outlined color="red accent-1">-{{ item.o.inamount }}(TOKEN)</v-chip>-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <v-chip small outlined color="teal lighten-1" @click="jump(item.o.pairAddress)">+{{ item.o.outamount }}({{ item.o.outtoken }})</v-chip>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div v-else-if="!item.o.outtoken">-->
|
|
|
+<!-- <v-chip small outlined color="red accent-1">-{{ item.o.inamount }}({{ item.o.intoken }})</v-chip>-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <v-chip small outlined color="teal lighten-1" @click="jump(item.o.pairAddress)">+{{ item.o.outamount }}(TOKEN)</v-chip>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div v-else>-->
|
|
|
+<!-- <v-chip small outlined color="red accent-1">-{{ item.o.inamount }}({{ item.o.intoken }})</v-chip>-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <v-chip small outlined color="teal lighten-1" @click="jump(item.o.pairAddress)">+{{ item.o.outamount }}({{ item.o.outtoken }})</v-chip>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </template>-->
|
|
|
</v-data-table>
|
|
|
</v-card>
|
|
|
</v-card>
|
|
|
@@ -258,26 +179,20 @@
|
|
|
return ''
|
|
|
}
|
|
|
},
|
|
|
- async getRecord () {
|
|
|
- let url = '/data/getRecord'
|
|
|
+ async pullData () {
|
|
|
+ let url = '/ethmev/findByHashOrBlockOrDataVague'
|
|
|
|
|
|
this.tableData.length = 0
|
|
|
this.loading = true
|
|
|
- this.query.t1 = this.query.t1_str ? this.dateToTimestamp(this.query.t1_str) : ''
|
|
|
- this.query.t2 = this.query.t2_str ? this.dateToTimestamp(this.query.t2_str) : ''
|
|
|
- const data = await axios.get(url, { params: this.query })
|
|
|
|
|
|
- data.data.data.map(function (one) {
|
|
|
- one.origin = one.o
|
|
|
- one.o = JSON.parse(one.o.replaceAll("'", '"'))
|
|
|
- one.blockNumber = one.o.blockNumber
|
|
|
- one.gas = one.o.gas
|
|
|
- one.nonce = one.o.nonce
|
|
|
- one.profit = one.o.profit
|
|
|
- one.symbolAddress = one.o.symbolAddress
|
|
|
- })
|
|
|
+ const rst = await this.$http.post(url, this.query)
|
|
|
+
|
|
|
+ this.tableData = rst.data.data
|
|
|
+
|
|
|
+ // this.tableData.map(function (one) {
|
|
|
+ // one.data = JSON.parse(one.data)
|
|
|
+ // })
|
|
|
|
|
|
- this.tableData = data.data.data
|
|
|
this.loading = false
|
|
|
},
|
|
|
dateToTimestamp (str) {
|
|
|
@@ -294,38 +209,32 @@
|
|
|
|
|
|
data: () => ({
|
|
|
query: {
|
|
|
- t1: '',
|
|
|
- t1_str: '',
|
|
|
- t2: '',
|
|
|
- t2_str: '',
|
|
|
- fm: '',
|
|
|
- t: '',
|
|
|
- state: '',
|
|
|
- hs: ''
|
|
|
+ block: '',
|
|
|
+ hash: '',
|
|
|
+ dataVague: ''
|
|
|
},
|
|
|
search: '',
|
|
|
loading: false,
|
|
|
headers: [
|
|
|
- { text: 'Save Time', value: 'ts' },
|
|
|
+ { text: 'block', value: 'block' },
|
|
|
// { text: 'Sender', value: 'fm' },
|
|
|
- { text: '类型', value: 'type' },
|
|
|
- { text: 'Symbol', value: 'symbolAddress' },
|
|
|
- { text: '交易数量', value: 'amount' },
|
|
|
- { text: '利润', value: 'profit' },
|
|
|
- { text: 'Gas', value: 'gas' },
|
|
|
- { text: '状态', value: 'state' },
|
|
|
- { text: 'BlockNumber', value: 'blockNumber' },
|
|
|
- { text: 'Nonce', value: 'nonce' },
|
|
|
- { text: 'Hash', value: 'hs' },
|
|
|
- { text: ' ', value: 'origin' }
|
|
|
+ { text: 'hash', value: 'hash' },
|
|
|
+ { text: 'data', value: 'data' },
|
|
|
+ // { text: '交易数量', value: 'amount' },
|
|
|
+ // { text: '利润', value: 'profit' },
|
|
|
+ // { text: 'Gas', value: 'gas' },
|
|
|
+ // { text: '状态', value: 'state' },
|
|
|
+ // { text: 'BlockNumber', value: 'blockNumber' },
|
|
|
+ // { text: 'Nonce', value: 'nonce' },
|
|
|
+ // { text: 'Hash', value: 'hs' },
|
|
|
+ // { text: ' ', value: 'origin' }
|
|
|
],
|
|
|
history: {"data":[{"t":"0x8a2a17e7adb6cbf6635380a35c04c01db473ed5ca919706f1c492d3aa1d9f1a9","fm":"0x6ff6f16a2459114fad74eed1604b402b97b02717","hs":"0x8a2a17e7adb6cbf6635380a35c04c01db473ed5ca919706f1c492d3aa1d9f1a9","state":"ok","ts":1602503469,"o":"{'type': 'NO TOKEN', 'intoken': 'WETH', 'outtoken': false, 'inamount': 0.314674952033383, 'outamount': 48953401866254456333, 'symbol': false, 'gas': 56.100000233, 'profit': 0, 'balance': 0, 'stocks': 0, 'decimals': 18, 'symbolAddress': '0x054f76beed60ab6dbeb23502178c52d6c5debe40', 'pairAddress': false, 'from': '0x6ff6f16a2459114fad74eed1604b402b97b02717', 'to': '0x8a2a17e7adb6cbf6635380a35c04c01db473ed5ca919706f1c492d3aa1d9f1a9', 'hs': '0x8a2a17e7adb6cbf6635380a35c04c01db473ed5ca919706f1c492d3aa1d9f1a9'}"}],"count":1,"state":"ok"},
|
|
|
tableData: []
|
|
|
}),
|
|
|
|
|
|
- mounted() {
|
|
|
- this.query.t2_str = '2099/1/1 0:0:0'
|
|
|
- this.query.t1_str = this.dateFormat('YYYY/mm/dd HH:MM:SS', new Date(new Date().getTime() - 10 * 60 * 1000))
|
|
|
+ async mounted () {
|
|
|
+ await this.pullData()
|
|
|
}
|
|
|
}
|
|
|
</script>
|