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
913c9977
Commit
913c9977
authored
Aug 05, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
d97c5ef5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
81 deletions
+13
-81
Index.vue
src/views/proof/Index.vue
+13
-81
No files found.
src/views/proof/Index.vue
View file @
913c9977
...
...
@@ -18,14 +18,6 @@
v-if=
"!list.length && !loading"
description=
"您还未添加存证"
image=
"@/assets/empty.png"
>
<!--
<van-button
:to=
"
{name: 'TemplateList'}"
round
type="info"
color="#6C7AFE"
class="bottom-button">
添加存证
</van-button>
-->
</van-empty>
<proof-item
v-else
...
...
@@ -51,7 +43,7 @@
:text=
"currentProof.status === ChainStatus.FAILURE && item.text === '上链' ? `重新$
{item.text}`:`${item.text}`"
@click="select(item.key)">
<template
#
icon
>
<common-svg
:name=
"item.icon"
:width=
"'44px'"
:height=
"'44px'
"
></common-svg>
<common-svg
:name=
"item.icon"
width=
"44px"
height=
"44px
"
></common-svg>
</
template
>
</van-grid-item>
</van-grid>
...
...
@@ -73,26 +65,6 @@
<transition
name=
"van-slide-up"
>
<preview-template
:data=
"detail"
v-if=
"showPreview"
@
cancel=
"showPreview = false"
@
employ=
"employ"
></preview-template>
</transition>
<van-popup
v-model=
"showIncrementMore"
round
class=
"more-action"
position=
"bottom"
>
<van-grid
:column-num=
"3"
:gutter=
"10"
:border=
"false"
>
<van-grid-item
v-for=
"(item, index) in actionList"
:key=
"index"
icon=
"photo-o"
:text=
"currentProof.status === ChainStatus.FAILURE && item.text === '上链' ? `重新${item.text}`:`${item.text}`"
@
click=
"select(item.key)"
>
<
template
#
icon
>
<common-svg
:name=
"item.icon"
:width=
"'44px'"
:height=
"'44px'"
></common-svg>
</
template
>
</van-grid-item>
</van-grid>
<van-button
block
round
@
click=
"showIncrementMore = false;"
>
取消
</van-button>
</van-popup>
</div>
</template>
...
...
@@ -145,8 +117,6 @@ export default class Index extends Vue {
private
showAddFolder
:
boolean
=
false
;
private
showAddProof
:
boolean
=
false
;
private
showIncrementMore
:
boolean
=
false
;
private
proofName
:
string
=
''
;
private
templateInfo
:
any
=
{
id
:
''
,
...
...
@@ -154,6 +124,10 @@ export default class Index extends Vue {
};
private
isZengliang
:
boolean
=
false
;
private
async
addProofHandler
()
{
let
query
:
any
=
{
templateId
:
this
.
templateInfo
.
id
,
proofName
:
this
.
proofName
,
}
if
(
this
.
isZengliang
)
{
let
preProof
=
null
;
if
(
this
.
currentProof
.
increment_num
>
0
)
{
...
...
@@ -162,40 +136,18 @@ export default class Index extends Vue {
}
else
{
preProof
=
this
.
currentProof
;
}
this
.
$router
.
push
({
name
:
'ProofDetail'
,
query
:
{
templateId
:
this
.
templateInfo
.
id
,
baseProof
:
JSON
.
stringify
(
this
.
currentProof
),
preProof
:
JSON
.
stringify
(
preProof
),
proofName
:
this
.
proofName
}});
}
else
{
this
.
$router
.
push
({
name
:
'ProofDetail'
,
query
:
{
templateId
:
this
.
templateInfo
.
id
,
proofName
:
this
.
proofName
,
}});
query
=
{...
query
,
baseProof
:
JSON
.
stringify
(
this
.
currentProof
),
preProof
:
JSON
.
stringify
(
preProof
),}
}
this
.
$router
.
push
({
name
:
'ProofDetail'
,
query
});
}
private
async
addFolder
(
data
:
any
)
{
const
{
folderName
}
=
data
;
this
.
showAddFolder
=
false
;
private
async
addFolder
(
{
folderName
}:
any
)
{
this
.
showAddFolder
=
false
;
await
this
.
$api
.
template
.
addFolder
(
folderName
);
this
.
showSelectTemplate
=
false
;
}
// private async next(data: any) {
// 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;
// }
// this.$router.push({name: 'ProofDetail',
// query: { templateId: data.templateId,
// baseProof: JSON.stringify(this.currentProof),
// preProof: JSON.stringify(preProof) }});
// }
private
nextSelectedTemplate
(
data
:
any
)
{
this
.
templateInfo
.
id
=
data
.
templateId
;
this
.
templateInfo
.
name
=
data
.
templateName
;
private
nextSelectedTemplate
({
templateId
,
templateName
}:
any
)
{
this
.
templateInfo
.
id
=
templateId
;
this
.
templateInfo
.
name
=
templateName
;
this
.
showPreview
=
false
;
this
.
showSelectTemplate
=
false
;
}
...
...
@@ -205,8 +157,6 @@ export default class Index extends Vue {
this
.
showPreview
=
true
;
}
private
employ
()
{
// this.nextSelectedTemplate({templateId: this.currentTemplate.id})
// this.next({templateId: this.currentTemplate.id});
this
.
nextSelectedTemplate
({
templateId
:
this
.
currentTemplate
.
id
,
templateName
:
this
.
currentTemplate
.
name
,
...
...
@@ -316,23 +266,6 @@ export default class Index extends Vue {
});
}
private
abandonProof
(
proofId
:
number
)
{
// this.$dialog.confirm({
// title: '是否确定删除该存证?',
// message: '已删除的存证,在回收站里',
// beforeClose: (action, done) => {
// if ( action === 'confirm' ) {
// this.$api.proof.abandon(proofId, '暂无原因').then((res: any) => {
// this.$toast.success('已放入回收站');
// this.resetList();
// done();
// }).catch((err: any) => {
// done();
// });
// } else {
// done();
// }
// },
// });
this
.
$confirmdel
().
then
((
res
:
any
)
=>
{
this
.
$api
.
proof
.
abandon
(
proofId
,
'暂无原因'
).
then
(()
=>
{
this
.
$toast
.
success
(
'已放入回收站'
);
...
...
@@ -375,8 +308,7 @@ export default class Index extends Vue {
box-sizing
:
border-box
;
padding
:
11px
14px
;
background
:
#F9FBFF
;
// margin-bottom: calc($tabHeight + 50px);
margin-bottom
:
100px
;
margin-bottom
:
calc
(
#{
$tabHeight
}
+
50px
);
}
.add-proof
{
position
:
fixed
;
...
...
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