Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
supervise-wecom
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 e2bf04ba
authored
Jun 03, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 添加审批结果页面及相关路由,优化任务页面跳转逻辑
1 parent
0f53e89e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
288 additions
and
1 deletions
src/router/modules/mine.js
src/views/mine/view/approvalResult.vue
src/views/mine/view/tasks.vue
src/router/modules/mine.js
View file @
e2bf04b
...
@@ -33,6 +33,15 @@ export const mineRoutes = [
...
@@ -33,6 +33,15 @@ export const mineRoutes = [
backgroundColor
:
"#f2f3f7"
,
backgroundColor
:
"#f2f3f7"
,
},
},
},
},
{
path
:
"approval-result"
,
name
:
"mine/approvalResult"
,
component
:
()
=>
import
(
"@/views/mine/view/approvalResult.vue"
),
meta
:
{
title
:
"查看审核结果"
,
backgroundColor
:
"#f2f3f7"
,
},
},
],
],
},
},
];
];
src/views/mine/view/approvalResult.vue
0 → 100644
View file @
e2bf04b
<
template
>
<div
class=
"approval-result-page"
>
<div
class=
"result-list"
>
<div
class=
"result-item"
>
<div
class=
"label"
>
任务处理结果
</div>
<div
class=
"status-tag"
:class=
"statusClass"
>
{{
statusText
}}
</div>
</div>
<template
v-if=
"isApproved"
>
<div
class=
"result-item"
>
<div
class=
"label"
>
指定带教督导
</div>
<div
class=
"value"
>
{{
detail
.
assignedSupervisorName
||
'-'
}}
</div>
</div>
<div
class=
"result-item"
>
<div
class=
"label"
>
带教场景
</div>
<div
class=
"value"
>
{{
detail
.
teachingSceneName
||
'未选择'
}}
</div>
</div>
<div
class=
"result-item"
>
<div
class=
"label"
>
带教时间
</div>
<div
class=
"value"
>
{{
detail
.
teachingTime
||
'未选择'
}}
</div>
</div>
<div
class=
"result-item"
>
<div
class=
"label"
>
带教方式
</div>
<div
class=
"value"
>
{{
detail
.
teachingMethodName
||
'未选择'
}}
</div>
</div>
<div
class=
"result-item"
>
<div
class=
"label"
>
带教主题
</div>
<div
class=
"value"
>
{{
detail
.
teachingTopicName
||
'未选择'
}}
</div>
</div>
</
template
>
<div
v-else
class=
"reject-reason"
>
<div
class=
"label"
>
驳回理由
</div>
<div
class=
"reason-text"
>
{{ detail.rejectReason || '-' }}
</div>
</div>
</div>
<div
class=
"section-title"
>
申请详情
</div>
<div
class=
"detail-list"
>
<div
v-for=
"item in detailFields"
:key=
"item.label"
class=
"detail-item"
:class=
"{ column: item.type === 'textarea' }"
>
<div
class=
"label"
>
{{ item.label }}
</div>
<div
v-if=
"item.type === 'tags'"
class=
"tag-list"
>
<span
v-for=
"name in toNameList(item.value)"
:key=
"name"
class=
"name-tag"
>
{{ name }}
</span>
<span
v-if=
"!toNameList(item.value).length"
class=
"value muted"
>
-
</span>
</div>
<div
v-else
class=
"value"
:class=
"{ muted: !item.value }"
>
{{ item.value || '-' }}
</div>
</div>
</div>
</div>
</template>
<
script
>
import
api
from
"@/api/mine"
;
import
util
from
"@/utils/util"
;
export
default
{
name
:
"MineApprovalResult"
,
data
()
{
return
{
userInfo
:
{},
id
:
""
,
detail
:
{},
};
},
computed
:
{
approvalStatus
()
{
return
Number
(
this
.
detail
.
approvalStatus
||
this
.
$route
.
query
.
status
);
},
isApproved
()
{
return
this
.
approvalStatus
===
1
;
},
statusText
()
{
return
this
.
isApproved
?
"通过"
:
"驳回"
;
},
statusClass
()
{
return
this
.
isApproved
?
"approved"
:
"rejected"
;
},
detailFields
()
{
return
[
{
label
:
"任务类型"
,
value
:
"专项带教"
},
{
label
:
"归属门店"
,
value
:
this
.
detail
.
merchantName
},
{
label
:
"归属业务"
,
value
:
this
.
detail
.
businessTypeName
},
{
label
:
"需带教驻店人员"
,
value
:
this
.
detail
.
teachingStaffNames
,
type
:
"tags"
},
{
label
:
"归属区域督导"
,
value
:
this
.
detail
.
supervisorNames
},
{
label
:
"申请描述"
,
value
:
this
.
detail
.
applyDescription
,
type
:
"textarea"
},
];
},
},
created
()
{
this
.
userInfo
=
util
.
getLocalStorage
(
"ww_userInfo"
)
||
{};
this
.
id
=
this
.
$route
.
query
.
id
||
""
;
this
.
getDetail
();
},
methods
:
{
async
getDetail
()
{
if
(
!
this
.
id
)
return
;
const
params
=
{
id
:
this
.
id
,
phone
:
this
.
userInfo
.
phone
};
const
res
=
await
api
.
getApprovalDetail
(
params
);
this
.
detail
=
res
.
data
||
res
||
{};
},
toNameList
(
value
)
{
if
(
Array
.
isArray
(
value
))
return
value
.
filter
(
Boolean
);
if
(
!
value
)
return
[];
return
String
(
value
).
split
(
/
[
,,
]
/
).
map
(
item
=>
item
.
trim
()).
filter
(
Boolean
);
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.approval-result-page
{
height
:
100%
;
overflow
:
auto
;
background
:
#f2f3f7
;
box-sizing
:
border-box
;
padding
:
8px
12px
20px
;
}
.result-list
,
.detail-list
{
width
:
100%
;
}
.result-item
,
.detail-item
{
min-height
:
42px
;
background
:
#fff
;
border-radius
:
6px
;
padding
:
0
12px
;
margin-bottom
:
8px
;
box-sizing
:
border-box
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
gap
:
16px
;
&.column
{
display
:
block
;
padding-top
:
12px
;
padding-bottom
:
12px
;
.value
{
margin-top
:
10px
;
text-align
:
left
;
line-height
:
21px
;
white-space
:
pre-wrap
;
}
}
}
.label
{
flex-shrink
:
0
;
font-size
:
13px
;
color
:
#000000
e5
;
}
.value
{
flex
:
1
;
text-align
:
right
;
font-size
:
13px
;
color
:
#00000066
;
line-height
:
20px
;
word-break
:
break-all
;
&.muted
{
color
:
#00000040
;
}
}
.status-tag
{
min-width
:
42px
;
height
:
24px
;
line-height
:
24px
;
text-align
:
center
;
border-radius
:
4px
;
font-size
:
13px
;
&.approved
{
color
:
#35c376
;
background
:
#eaf9f1
;
}
&
.rejected
{
color
:
#ee0a24
;
background
:
#fff1f0
;
}
}
.reject-reason
{
background
:
#fff
;
border-radius
:
6px
;
padding
:
12px
;
margin-bottom
:
8px
;
box-sizing
:
border-box
;
.reason-text
{
margin-top
:
10px
;
font-size
:
13px
;
line-height
:
21px
;
color
:
#00000066
;
word-break
:
break-all
;
}
}
.section-title
{
height
:
28px
;
line-height
:
28px
;
text-align
:
center
;
font-size
:
12px
;
color
:
#000000
e5
;
}
.tag-list
{
flex
:
1
;
display
:
flex
;
justify-content
:
flex-end
;
flex-wrap
:
wrap
;
gap
:
6px
;
}
.name-tag
{
line-height
:
22px
;
padding
:
0
9px
;
border-radius
:
4px
;
background
:
#f2f3f5
;
font-size
:
12px
;
color
:
#000000
a6
;
}
</
style
>
src/views/mine/view/tasks.vue
View file @
e2bf04b
...
@@ -131,8 +131,10 @@ export default {
...
@@ -131,8 +131,10 @@ export default {
const
id
=
item
.
id
;
const
id
=
item
.
id
;
if
(
!
id
)
if
(
!
id
)
return
;
return
;
const
status
=
Number
(
item
.
approvalStatus
);
const
routeName
=
status
===
0
?
"mine/approvalDetail"
:
"mine/approvalResult"
;
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"mine/approvalDetail"
,
name
:
routeName
,
query
:
{
id
,
status
:
item
.
approvalStatus
},
query
:
{
id
,
status
:
item
.
approvalStatus
},
});
});
},
},
...
...
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