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
4e6795cc
Commit
4e6795cc
authored
Oct 15, 2020
by
JYbmarawcp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of
https://gitlab.33.cn/yyh/traceSourceMb
into development
parents
41a5220d
fb11c362
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
36 deletions
+79
-36
Index.vue
src/views/proof/Index.vue
+0
-1
ProofItem.vue
src/views/proof/components/ProofItem.vue
+76
-33
SelectTemplate.vue
src/views/template/components/SelectTemplate.vue
+1
-1
vue.config.js
vue.config.js
+2
-1
No files found.
src/views/proof/Index.vue
View file @
4e6795cc
...
@@ -59,7 +59,6 @@ import AddBaseinfo from './components/AddBaseinfo.vue';
...
@@ -59,7 +59,6 @@ import AddBaseinfo from './components/AddBaseinfo.vue';
import
SelectTemplate
from
'@/views/template/components/SelectTemplate.vue'
;
import
SelectTemplate
from
'@/views/template/components/SelectTemplate.vue'
;
import
PreviewTemplate
from
'@/views/template/components/PreviewTemplate.vue'
;
import
PreviewTemplate
from
'@/views/template/components/PreviewTemplate.vue'
;
import
AddFolder
from
'@/views/template/components/AddFolder.vue'
;
import
AddFolder
from
'@/views/template/components/AddFolder.vue'
;
import
proof
from
'@/api/modules/proof'
;
@
Component
({
@
Component
({
components
:
{
components
:
{
ProofItem
,
ProofItem
,
...
...
src/views/proof/components/ProofItem.vue
View file @
4e6795cc
<
template
>
<
template
>
<div
class=
"proof-item"
>
<div
<div
class=
"header"
>
class=
"proof-item"
>
<span
style=
"font-weight:500;font-size:18px;"
class=
"van-ellipsis"
>
{{
proof
.
name
}}
</span>
<div
class=
"header"
>
<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
<span
class=
"time"
>
{{
proof
.
update_time
|
timeFormat
}}
</span>
class=
"status"
:class=
"currentProofStatusAndClass.class"
>
{{
currentProofStatusAndClass
.
text
}}
</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"
name=
"cunzhengliebiao-gengduo"
class=
"more"
></common-svg>
</div>
</div>
<div
class=
"increment"
v-if=
"proof.increment_num > 0"
:class=
"proof.increment_num > 0 ? 'van-hairline--top':''"
>
<div
<van-steps
:active=
"active"
direction=
"vertical"
class=
"list"
active-color=
"#FF3661"
v-show=
"showIncrementList"
>
v-if=
"proof.increment_num > 0"
<van-step
v-for=
"(incrementProof, index) in incrementList"
:key=
"incrementProof.id"
>
class=
"increment van-hairline--top"
>
<van-steps
v-show=
"showIncrementList"
:active=
"active"
direction=
"vertical"
class=
"list"
active-color=
"#FF3661"
>
<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,24 +39,33 @@
...
@@ -18,24 +39,33 @@
<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>
{{getIncrementStatusStr(incrementProof.status).text}}
</span>
<span>
{{getStatusTextAndClass(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
v-if=
"[ChainStatus.NONE, ChainStatus.FAILURE].includes(status)"
@
click
.
stop=
"editIncrementProof(index)"
name=
"bianji1"
width=
"30px"
width=
"30px"
height=
"30px"
height=
"30px"
v-if=
"incrementProof.status !== ChainStatus.SUCCESS"
@
click
.
stop=
"editIncrementProof(incrementProof,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"
class=
"arrow"
:class=
"{ expand: showIncrementList }"
></common-svg>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -65,39 +95,46 @@ export default class ProofItem extends Vue {
...
@@ -65,39 +95,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
||
[];
});
}
}
get
statusStr
()
{
private
toggleShowIncrementListHandler
()
{
const
{
status
}
=
this
.
proof
;
const
{
return
{
showIncrementList
,
text
:
ChainStatusStr
[
status
],
incrementList
:
{
length
},
class
:
classEnum
[
status
],
proof
:
{
increment_num
}
};
}
=
this
;
this
.
showIncrementList
=
!
showIncrementList
;
if
(
this
.
showIncrementList
&&
length
<=
0
)
{
this
.
getIncrementList
(
increment_num
);
}
}
}
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
,
};
};
...
@@ -166,6 +203,12 @@ export default class ProofItem extends Vue {
...
@@ -166,6 +203,12 @@ export default class ProofItem extends Vue {
padding-top
:
10px
;
padding-top
:
10px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#B6B5BA
;
color
:
#B6B5BA
;
.arrow
{
transition
:
all
.3s
linear
;
&
.expand
{
transform
:
rotate
(
180deg
);
}
}
}
}
}
}
}
}
...
...
src/views/template/components/SelectTemplate.vue
View file @
4e6795cc
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
v-model=
"searchValue"
v-model=
"searchValue"
show-action
show-action
placeholder=
"请输入搜索关键词"
placeholder=
"请输入搜索关键词"
:left-icon=
"require('@/assets/search2.png')
"
left-icon=
"@/assets/search2.png
"
@
search=
"onSearch"
@
search=
"onSearch"
@
input=
"onSearch"
></van-search>
@
input=
"onSearch"
></van-search>
<div
v-if=
"searchValue"
class=
"folder-detail"
>
<div
v-if=
"searchValue"
class=
"folder-detail"
>
...
...
vue.config.js
View file @
4e6795cc
...
@@ -57,7 +57,8 @@ module.exports = {
...
@@ -57,7 +57,8 @@ module.exports = {
options
=
merge
(
options
,
{
options
=
merge
(
options
,
{
transformAssetUrls
:{
transformAssetUrls
:{
'van-image'
:
[
'src'
],
'van-image'
:
[
'src'
],
'van-empty'
:
[
'image'
]
'van-empty'
:
[
'image'
],
'van-search'
:
[
'left-icon'
]
}
}
});
});
return
options
;
return
options
;
...
...
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