Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
03ddc2eb
Commit
03ddc2eb
authored
Oct 15, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
98fd36d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
25 deletions
+32
-25
ProofItem.vue
src/views/proof/components/ProofItem.vue
+32
-25
No files found.
src/views/proof/components/ProofItem.vue
View file @
03ddc2eb
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
<div
class=
"header"
>
<div
class=
"header"
>
<span
style=
"font-weight:500;font-size:18px;"
class=
"van-ellipsis"
>
{{
proof
.
name
}}
</span>
<span
style=
"font-weight:500;font-size:18px;"
class=
"van-ellipsis"
>
{{
proof
.
name
}}
</span>
<div>
<div>
<span
class=
"status"
:class=
"
statusStr.class"
>
{{
statusStr
.
text
}}
</span>
<span
class=
"status"
:class=
"
currentProofStatusAndClass.class"
>
{{
currentProofStatusAndClass
.
text
}}
</span>
<span
class=
"time"
>
{{
proof
.
update_time
|
timeFormat
}}
</span>
<span
class=
"time"
>
{{
proof
.
update_time
|
timeFormat
}}
</span>
</div>
</div>
<common-svg
@
click
.
stop
.
native=
"showMoreAction"
class=
"more"
name=
"cunzhengliebiao-gengduo"
></common-svg>
<common-svg
@
click
.
stop
.
native=
"showMoreAction"
class=
"more"
name=
"cunzhengliebiao-gengduo"
></common-svg>
</div>
</div>
<div
class=
"increment
"
v-if=
"proof.increment_num > 0"
:class=
"proof.increment_num > 0 ? 'van-hairline--top':''
"
>
<div
class=
"increment
van-hairline--top"
v-if=
"proof.increment_num > 0
"
>
<van-steps
:active=
"active"
direction=
"vertical"
class=
"list"
active-color=
"#FF3661"
v-show=
"showIncrementList"
>
<van-steps
:active=
"active"
direction=
"vertical"
class=
"list"
active-color=
"#FF3661"
v-show=
"showIncrementList"
>
<van-step
v-for=
"(
incrementProof, index) in incrementList"
:key=
"incrementProof.
id"
>
<van-step
v-for=
"(
{ id, name, status, update_time }, index) in incrementList" :key="
id" >
<template
#
active-icon
>
<template
#
active-icon
>
<common-svg
name=
"suyuan-weishanglian"
></common-svg>
<common-svg
name=
"suyuan-weishanglian"
></common-svg>
</
template
>
</
template
>
...
@@ -18,23 +18,23 @@
...
@@ -18,23 +18,23 @@
<common-svg
name=
"suyuan-yishanglian"
></common-svg>
<common-svg
name=
"suyuan-yishanglian"
></common-svg>
</
template
>
</
template
>
<div
class=
"header"
>
<div
class=
"header"
>
<div
style=
"color:#737582;"
>
{{incrementProof.
name}}
</div>
<div
style=
"color:#737582;"
class=
"van-ellipsis"
>
{{
name}}
</div>
<div>
<div>
<span>
{{get
IncrementStatusStr(incrementProof.
status).text}}
</span>
<span>
{{get
StatusTextAndClass(
status).text}}
</span>
<span
style=
"margin-left: 10px;color:#B6B5BA;"
>
{{
incrementProof.update_time|
timeFormat}}
</span>
<span
style=
"margin-left: 10px;color:#B6B5BA;"
>
{{
update_time |
timeFormat}}
</span>
</div>
</div>
<common-svg
name=
"bianji1"
<common-svg
name=
"bianji1"
width=
"30px"
width=
"30px"
height=
"30px"
height=
"30px"
v-if=
"
incrementProof.status !== ChainStatus.SUCCESS
"
v-if=
"
[ChainStatus.NONE, ChainStatus.FAILURE].includes(status)
"
@
click
.
stop=
"editIncrementProof(in
crementProof,in
dex)"
@
click
.
stop=
"editIncrementProof(index)"
></common-svg>
></common-svg>
</div>
</div>
</van-step>
</van-step>
</van-steps>
</van-steps>
<div
class=
"desc"
@
click
.
stop=
"
showIncrementList = !showIncrementList;getIncrementList(3);
"
>
<div
class=
"desc"
@
click
.
stop=
"
toggleShowIncrementListHandler
"
>
<common-svg
name=
"suyuan-duoshaotiao1"
></common-svg>
<common-svg
name=
"suyuan-duoshaotiao1"
></common-svg>
<div>
{{isSy? '溯源' : '慈善'}}流程{{proof.increment_num}}条
</div>
<div>
{{isSy
? '溯源' : '慈善'}}流程{{proof.increment_num}}条
</div>
<common-svg
name=
"fanhui"
:style=
"{transform: showIncrementList?'rotate(180deg)':'rotate(0)'}"
></common-svg>
<common-svg
name=
"fanhui"
:style=
"{transform: showIncrementList?'rotate(180deg)':'rotate(0)'}"
></common-svg>
</div>
</div>
</div>
</div>
...
@@ -65,39 +65,46 @@ export default class ProofItem extends Vue {
...
@@ -65,39 +65,46 @@ export default class ProofItem extends Vue {
private
activeName
:
string
=
'1'
;
private
activeName
:
string
=
'1'
;
private
ChainStatus
=
ChainStatus
;
private
ChainStatus
=
ChainStatus
;
private
get
currentProofStatusAndClass
()
{
return
this
.
getStatusTextAndClass
(
this
.
proof
.
status
);
}
@
Emit
(
'show-more-action'
)
@
Emit
(
'show-more-action'
)
private
async
showMoreAction
()
{
private
async
showMoreAction
()
{
const
{
proof
:
{
increment_num
}
}
=
this
;
const
{
proof
:
{
increment_num
}
}
=
this
;
if
(
increment_num
>
0
)
{
if
(
increment_num
>
0
&&
this
.
incrementList
.
length
<=
0
)
{
await
this
.
getIncrementList
(
increment_num
);
await
this
.
getIncrementList
(
increment_num
);
}
}
return
this
.
proof
;
return
this
.
proof
;
}
}
private
getIncrementList
(
count
:
number
)
{
private
async
getIncrementList
(
count
:
number
)
{
const
{
hash
}
=
this
.
proof
;
const
{
hash
}
=
this
.
proof
;
return
this
.
$api
.
proof
.
incrementList
(
hash
).
then
((
res
:
any
)
=>
{
const
{
results
}
=
await
this
.
$api
.
proof
.
incrementList
(
hash
);
this
.
incrementList
=
res
.
results
||
[];
this
.
incrementList
=
results
||
[];
});
}
private
toggleShowIncrementListHandler
()
{
const
{
showIncrementList
,
incrementList
:
{
length
},
proof
:
{
increment_num
}
}
=
this
;
this
.
showIncrementList
=
!
showIncrementList
;
if
(
this
.
showIncrementList
&&
length
<=
0
)
{
this
.
getIncrementList
(
increment_num
);
}
}
get
statusStr
()
{
const
{
status
}
=
this
.
proof
;
return
{
text
:
ChainStatusStr
[
status
],
class
:
classEnum
[
status
],
};
}
}
private
get
IncrementStatusStr
(
status
:
number
)
{
private
get
StatusTextAndClass
(
status
:
number
)
{
return
{
return
{
text
:
ChainStatusStr
[
status
],
text
:
ChainStatusStr
[
status
],
class
:
classEnum
[
status
],
};
};
}
}
@
Emit
(
'edit-increment-proof'
)
@
Emit
(
'edit-increment-proof'
)
private
editIncrementProof
(
incrementProof
:
any
,
currentIndex
:
number
)
{
private
editIncrementProof
(
currentIndex
:
number
)
{
const
preProof
=
this
.
incrementList
.
length
<
2
const
preProof
=
this
.
incrementList
.
length
<
2
?
this
.
proof
?
this
.
proof
:
this
.
incrementList
[
currentIndex
+
1
];
:
this
.
incrementList
[
currentIndex
+
1
];
return
{
return
{
incrementProof
,
incrementProof
:
this
.
incrementList
[
currentIndex
]
,
baseProof
:
this
.
proof
,
baseProof
:
this
.
proof
,
preProof
,
preProof
,
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment