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
f137b2fb
Commit
f137b2fb
authored
Aug 06, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增量流程处理
parent
4b729e8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
ProofItem.vue
src/components/ProofItem.vue
+1
-1
Index.vue
src/views/proof/Index.vue
+18
-9
No files found.
src/components/ProofItem.vue
View file @
f137b2fb
...
...
@@ -102,7 +102,7 @@ export default class ProofItem extends Vue {
private
editIncrementProof
(
incrementProof
:
any
,
currentIndex
:
number
)
{
const
preProof
=
this
.
incrementList
.
length
<
2
?
this
.
proof
:
this
.
incrementList
.
find
(
(
proof
,
index
)
=>
index
===
(
currentIndex
-
1
))
;
:
this
.
incrementList
[
currentIndex
+
1
]
;
return
{
incrementProof
,
baseProof
:
this
.
proof
,
...
...
src/views/proof/Index.vue
View file @
f137b2fb
...
...
@@ -122,6 +122,9 @@ export default class Index extends Vue {
id
:
''
,
name
:
''
,
};
private
baseProof
:
any
=
''
;
private
preProof
:
any
=
''
;
private
isZengliang
:
boolean
=
false
;
private
async
addProofHandler
()
{
let
query
:
any
=
{
...
...
@@ -129,14 +132,7 @@ export default class Index extends Vue {
proofName
:
this
.
proofName
,
};
if
(
this
.
isZengliang
)
{
let
preProof
=
null
;
if
(
this
.
currentProof
.
increment_num
>
0
)
{
const
incrementProofListResult
=
await
this
.
$api
.
proof
.
incrementList
(
this
.
currentProof
.
hash
);
preProof
=
(
incrementProofListResult
.
results
||
[])[
0
];
}
else
{
preProof
=
this
.
currentProof
;
}
query
=
{...
query
,
baseProof
:
JSON
.
stringify
(
this
.
currentProof
),
preProof
:
JSON
.
stringify
(
preProof
)};
query
=
{...
query
,
baseProof
:
JSON
.
stringify
(
this
.
baseProof
),
preProof
:
JSON
.
stringify
(
this
.
preProof
)};
}
this
.
$router
.
push
({
name
:
'ProofDetail'
,
query
});
}
...
...
@@ -296,7 +292,20 @@ export default class Index extends Vue {
private
goToBROWSER
(
proof
:
any
)
{
location
.
href
=
process
.
env
.
VUE_APP_BROWSER
+
`/product?hash=
${
proof
.
hash
}
`
;
}
private
increment
(
proof
:
any
)
{
private
async
increment
(
proof
:
any
)
{
const
{
increment_num
}
=
proof
;
if
(
increment_num
>
0
)
{
const
{
results
}
=
await
this
.
$api
.
proof
.
incrementList
(
this
.
currentProof
.
hash
);
const
preProof
=
results
[
0
];
if
(
!
preProof
.
hash
)
{
this
.
$toast
(
'请先上链上一条存证'
);
return
Promise
.
reject
(
'请先上链上一条存证'
);
}
this
.
preProof
=
preProof
;
}
else
{
this
.
preProof
=
proof
;
}
this
.
baseProof
=
proof
;
this
.
showAddProof
=
true
;
this
.
isZengliang
=
true
;
}
...
...
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