Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ff942401
authored
Mar 14, 2022
by
张权
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:跳到列表页
1 parent
544d09fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
35 deletions
src/components/Tab.vue
src/views/gift/create.vue
src/views/gift/detail.vue
src/views/gift/index.vue
src/components/Tab.vue
View file @
ff94240
...
@@ -58,6 +58,9 @@ export default {
...
@@ -58,6 +58,9 @@ export default {
click
(
tabIndex
)
{
click
(
tabIndex
)
{
this
.
tabIndex
=
tabIndex
this
.
tabIndex
=
tabIndex
this
.
$emit
(
'change'
,
tabIndex
)
this
.
$emit
(
'change'
,
tabIndex
)
},
handleChange
(
id
){
this
.
tabIndex
=
id
}
}
}
}
}
}
...
...
src/views/gift/create.vue
View file @
ff94240
...
@@ -344,6 +344,7 @@ export default {
...
@@ -344,6 +344,7 @@ export default {
.
then
((
resp
)
=>
{
.
then
((
resp
)
=>
{
console
.
log
(
resp
,
'已发起审批'
)
console
.
log
(
resp
,
'已发起审批'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$route
.
params
.
fromWhere
=
'create'
this
.
$router
.
back
()
this
.
$router
.
back
()
}
,
2000
)
}
,
2000
)
}
)
}
)
...
...
src/views/gift/detail.vue
View file @
ff94240
...
@@ -118,7 +118,8 @@
...
@@ -118,7 +118,8 @@
</div>
</div>
<div class="
real
-
img
" :style="
{
'margin-left'
:
(
pItem
.
items
.
itemList
.
length
>
2
&&
sonId
>
0
)
?
'42px'
:
'12px'
}
">
<div class="
real
-
img
" :style="
{
'margin-left'
:
(
pItem
.
items
.
itemList
.
length
>
2
&&
sonId
>
0
)
?
'42px'
:
'12px'
}
">
<img v-if="
sonItem
.
length
>
1
&&
sonId
===
0
" src="
..
/
..
/
assets
/
images
/
icon
/
more_avatar
.
png
" alt="">
<img v-if="
sonItem
.
length
>
1
&&
sonId
===
0
" src="
..
/
..
/
assets
/
images
/
icon
/
more_avatar
.
png
" alt="">
<img v-else :src="
sonItem
.
itemImage
" alt="">
<img v-else-if="
sonItem
.
itemImage
" :src="
sonItem
.
itemImage
" alt="">
<img v-else src="
..
/
..
/
assets
/
images
/
icon
/
unactive_avatar
.
png
" alt="">
</div>
</div>
<div class="
info
-
area
">
<div class="
info
-
area
">
<div class="
info
">
<div class="
info
">
...
@@ -209,41 +210,52 @@ export default {
...
@@ -209,41 +210,52 @@ export default {
if
(
res
.
approveUserInfo
==
null
&&
res
.
weChatOpenApprovalDataResponse
==
null
){
if
(
res
.
approveUserInfo
==
null
&&
res
.
weChatOpenApprovalDataResponse
==
null
){
this
.
isShowApprovalDetail
=
false
this
.
isShowApprovalDetail
=
false
}
}
if
(
res
?.
weChatOpenApprovalDataResponse
?.
data
?.
approvalNodes
?.
approvalNodeList
){
if
(
res
?.
weChatOpenApprovalDataResponse
!=
null
){
this
.
infoList
=
res
.
weChatOpenApprovalDataResponse
.
data
.
approvalNodes
.
approvalNodeList
if
(
res
?.
weChatOpenApprovalDataResponse
?.
data
?.
approvalNodes
?.
approvalNodeList
){
let
avtiveFlag
=
false
this
.
infoList
=
res
.
weChatOpenApprovalDataResponse
.
data
.
approvalNodes
.
approvalNodeList
this
.
infoList
.
forEach
(
element
=>
{
let
avtiveFlag
=
false
if
(
!
avtiveFlag
&&
(
element
.
nodeStatus
===
1
||
element
.
nodeStatus
===
3
)){
this
.
infoList
.
forEach
(
element
=>
{
element
.
avtive
=
true
if
(
!
avtiveFlag
&&
(
element
.
nodeStatus
===
1
||
element
.
nodeStatus
===
3
)){
avtiveFlag
=
true
element
.
avtive
=
true
}
else
{
avtiveFlag
=
true
element
.
avtive
=
false
}
else
{
}
element
.
avtive
=
false
if
(
element
.
nodeStatus
===
2
){
}
element
.
avtive
=
true
if
(
element
.
nodeStatus
===
2
){
element
.
avtive
=
true
}
if
(
element
?.
items
?.
itemList
?.
length
&&
element
.
items
.
itemList
.
length
>
1
){
element
.
items
.
itemList
.
unshift
({
"itemName"
:
""
,
"itemParty"
:
""
,
"itemImage"
:
"http://wework.qpic.cn/bizmail/FruicVOxjeICicwecCNuv4BGgI7ia2c9icZHgeo86Z3e36FPApcJrX6BZg/0"
,
"itemUserId"
:
"依次审批"
,
"itemStatus"
:
0
,
"itemSpeech"
:
''
,
"itemOpTime"
:
''
}
)
}
}
if
(
element
?.
items
?.
itemList
?.
length
&&
element
.
items
.
itemList
.
length
>
1
){
}
);
element
.
items
.
itemList
.
unshift
({
}
"itemName"
:
""
,
}
else
if
(
res
.
approveUserInfo
!=
null
){
"itemParty"
:
""
,
const
{
name
:
itemName
,
image
:
itemImage
,
status
:
itemStatus
,
opTime
:
itemOpTime
}
=
res
.
approveUserInfo
"itemImage"
:
"http://wework.qpic.cn/bizmail/FruicVOxjeICicwecCNuv4BGgI7ia2c9icZHgeo86Z3e36FPApcJrX6BZg/0"
,
const
targetObj
=
{
"itemUserId"
:
"依次审批"
,
nodeType
:
'1'
,
"itemStatus"
:
0
,
nodeStatus
:
itemStatus
,
"itemSpeech"
:
''
,
avtive
:
true
,
"itemOpTime"
:
''
items
:{
itemList
:[{
itemName
,
itemImage
,
itemStatus
,
itemOpTime
:
parseInt
(
parseInt
(
itemOpTime
)
/
1000
)
}
]
}
}
)
}
console
.
log
(
targetObj
,
typeof
itemOpTime
,
itemOpTime
)
this
.
infoList
.
push
(
targetObj
)
}
this
.
$nextTick
(()
=>
{
this
.
infoList
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
infoList
.
length
!==
index
+
1
&&
document
.
getElementById
(
'merchantItem'
+
index
).
offsetHeight
){
this
.
lineHeight
+=
document
.
getElementById
(
'merchantItem'
+
index
).
offsetHeight
}
}
}
);
console
.
log
(
this
.
infoList
)
this
.
$nextTick
(()
=>
{
this
.
infoList
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
infoList
.
length
!==
index
+
1
&&
document
.
getElementById
(
'merchantItem'
+
index
).
offsetHeight
){
this
.
lineHeight
+=
document
.
getElementById
(
'merchantItem'
+
index
).
offsetHeight
}
}
)
}
)
}
)
}
)
}
}
)
}
)
}
,
}
,
pushApproval
(){
pushApproval
(){
...
...
src/views/gift/index.vue
View file @
ff94240
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<tab
<tab
:list=
"tab"
:list=
"tab"
@
change=
"change"
@
change=
"change"
ref=
"myTab"
/>
/>
<template
v-if=
"flag"
>
<template
v-if=
"flag"
>
<template
v-if=
"list.length"
>
<template
v-if=
"list.length"
>
...
@@ -153,9 +154,13 @@ export default {
...
@@ -153,9 +154,13 @@ export default {
}
}
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
let
{
params
:
{
giftToast
}
}
=
from
let
{
params
:
{
giftToast
,
fromWhere
}
}
=
from
next
(
vm
=>
{
next
(
vm
=>
{
if
(
giftToast
)
vm
.
giftToast
=
giftToast
if
(
giftToast
)
vm
.
giftToast
=
giftToast
;
if
(
fromWhere
===
'create'
)
{
vm
.
handleChangeTab
(
2
)
vm
.
change
(
2
)
}
})
})
},
},
mounted
()
{
mounted
()
{
...
@@ -169,6 +174,10 @@ export default {
...
@@ -169,6 +174,10 @@ export default {
wxConfig
.
init
([
'shareAppMessage'
])
wxConfig
.
init
([
'shareAppMessage'
])
},
},
methods
:
{
methods
:
{
handleChangeTab
(
id
){
this
.
$refs
.
myTab
.
handleChange
(
id
)
console
.
log
(
id
,
6666
)
},
getList
(
type
)
{
getList
(
type
)
{
let
{
uuid
}
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
)
let
{
uuid
}
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
)
let
{
pageNum
,
tabIndex
,
list
,
name
,
giftToast
}
=
this
let
{
pageNum
,
tabIndex
,
list
,
name
,
giftToast
}
=
this
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment