Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JDChain
Explorer
提交
85f3241f
E
Explorer
项目概览
JDChain
/
Explorer
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Explorer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
85f3241f
编写于
6月 07, 2021
作者:
W
wcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改顶部tab顺序添加事件账户搜索两个接口,添加参与方状态列
上级
224cd9e3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
80 addition
and
10 deletion
+80
-10
data-explorer/src/stores/headerStore.js
data-explorer/src/stores/headerStore.js
+4
-4
data-explorer/src/stores/pages/eventStore.js
data-explorer/src/stores/pages/eventStore.js
+29
-0
data-explorer/src/web/components/header/header.js
data-explorer/src/web/components/header/header.js
+9
-4
data-explorer/src/web/pages/event/event.js
data-explorer/src/web/pages/event/event.js
+37
-1
data-explorer/src/web/pages/event/event.t.html
data-explorer/src/web/pages/event/event.t.html
+1
-1
未找到文件。
data-explorer/src/stores/headerStore.js
浏览文件 @
85f3241f
...
...
@@ -14,6 +14,10 @@ const HeaderStore = types
path
:
'
block
'
,
name
:
'
区块
'
,
icon
:
'
block
'
,
},{
path
:
'
user
'
,
name
:
'
用户
'
,
icon
:
'
user
'
,
},{
path
:
'
account
'
,
name
:
'
数据账户
'
,
...
...
@@ -26,10 +30,6 @@ const HeaderStore = types
path
:
'
contract
'
,
name
:
'
合约
'
,
icon
:
'
profile
'
,
},{
path
:
'
user
'
,
name
:
'
用户
'
,
icon
:
'
user
'
,
}],
selectMenu
:[
''
],
}))
...
...
data-explorer/src/stores/pages/eventStore.js
浏览文件 @
85f3241f
...
...
@@ -135,6 +135,35 @@ const EventStore = types
).
catch
(
error
=>
{
});
},
searchEvent
(
ledger
,
param
){
return
fetchData
(
`
${
__HOST
}
/ledgers/
${
ledger
}
/events/accounts/search`
,
self
.
setEventCount
,
param
,{
method
:
'
get
'
,
headers
:
{
// accept: 'application/json',
cookie
:
document
.
cookie
,
}
}
).
catch
(
error
=>
{
});
},
eventCountSearch
(
ledger
,
keyword
){
return
fetchData
(
`
${
__HOST
}
/ledgers/
${
ledger
}
/events/accounts/count/search`
,
self
.
setEventCount
,
{
keyword
:
keyword
},{
method
:
'
get
'
,
headers
:
{
// accept: 'application/json',
cookie
:
document
.
cookie
,
}
}
).
catch
(
error
=>
{
});
},
setEventCount
(
result
)
{
if
(
result
&&
result
.
success
)
{
self
.
eventTotal
=
result
.
data
||
0
;
...
...
data-explorer/src/web/components/header/header.js
浏览文件 @
85f3241f
...
...
@@ -87,22 +87,22 @@ export default class Header extends Component {
// 交易列表
@
computed
get
tableColumns
()
{
return
[{
title
:
'
参与方
ID
'
,
title
:
'
ID
'
,
dataIndex
:
'
id
'
,
key
:
'
id
'
},
{
title
:
'
参与方
名字
'
,
title
:
'
名字
'
,
dataIndex
:
'
name
'
,
key
:
'
name
'
},
{
title
:
'
参与方
地址
'
,
title
:
'
地址
'
,
dataIndex
:
'
address.value
'
,
key
:
'
address
'
},
{
title
:
'
参与方
公钥
'
,
title
:
'
公钥
'
,
dataIndex
:
'
pubKey
'
,
key
:
'
pubKey
'
},
...
...
@@ -113,6 +113,11 @@ export default class Header extends Component {
render
:
(
text
,
record
,
index
)
=>
nj
`
${
tranBase58
(
text
)}
`
()
},
{
title
:
'
状态
'
,
dataIndex
:
'
participantNodeState
'
,
key
:
'
participantNodeState
'
}];
}
// 交易列表
...
...
data-explorer/src/web/pages/event/event.js
浏览文件 @
85f3241f
...
...
@@ -38,6 +38,7 @@ export default class Event extends Component {
onInputChange
=
e
=>
{
this
.
eventAddress
=
e
.
target
.
value
;
console
.
log
(
this
.
eventAddress
);
}
componentDidMount
()
{
...
...
@@ -76,13 +77,48 @@ export default class Event extends Component {
})
}
onSearchEvent
=
()
=>
{
const
{
store
:
{
common
,
event
}
}
=
this
.
props
;
const
closeLoading
=
Message
.
loading
(
'
正在获取数据...
'
,
0
);
let
leaders
=
common
.
getDefaultLedger
(),
keyword
=
this
.
eventAddress
,
param
=
{
fromIndex
:
(
event
.
accountcurrent
-
1
)
*
this
.
pageSize
,
count
:
this
.
pageSize
,
};
Promise
.
all
([
event
.
eventCountSearch
(
leaders
,
keyword
)
]).
then
(()
=>
{
if
(
event
.
accountcount
>
0
)
{
Promise
.
all
([
event
.
searchEvent
(
leaders
,
param
),
]).
then
(()
=>
{
closeLoading
();
});
}
else
{
closeLoading
();
}
});
}
@
autobind
onPageChange
(
page
,
pageSize
)
{
const
{
store
:
{
event
}
}
=
this
.
props
;
event
.
setCurrent
(
page
);
this
.
onSearch
();
}
@
autobind
SerchInfo
()
{
console
.
log
(
this
.
eventAddress
);
if
(
this
.
eventAddress
.
trim
()
!=
''
)
{
this
.
onSearchEvent
();
}
else
{
this
.
onSearch
()
}
}
showEvent
=
(
record
,
index
)
=>
{
const
{
store
:
{
common
,
event
}
}
=
this
.
props
;
...
...
data-explorer/src/web/pages/event/event.t.html
浏览文件 @
85f3241f
...
...
@@ -5,7 +5,7 @@
</h2>
<div
style=
"margin-bottom:20px;"
#show
={!
show
}
>
<ant-Input
style=
"width:200px;margin-right:20px"
value=
{eventAddress}
onChange=
{onInputChange}/
>
<ant-Button
style=
"margin-right:20px"
icon=
"search"
type=
"primary"
class=
"{styles.btn}"
onClick=
{
onSearch
}
>
查询
</ant-Button>
<ant-Button
style=
"margin-right:20px"
icon=
"search"
type=
"primary"
class=
"{styles.btn}"
onClick=
{
SerchInfo
}
>
查询
</ant-Button>
</div>
<div
class=
"{styles.datapanel}"
#show
={!
show
}
>
<ant-Table
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录