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 0bc87d50
authored
May 22, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refactor(teamList): 调整组件生命周期并清理冗余代码
将created生命周期钩子替换为mounted,注释掉未实际使用的getStaticData方法
1 parent
9a169558
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
src/views/teamWork/teamWork/teamList.vue
src/views/teamWork/teamWork/teamList.vue
View file @
0bc87d5
...
...
@@ -126,7 +126,7 @@ export default {
searchKeyword
:
''
}
},
crea
ted
()
{
moun
ted
()
{
this
.
userInfo
=
(
this
.
$util
&&
this
.
$util
.
getUserInfo
())
||
{
name
:
''
}
// this.getStaticData()
this
.
onRefresh
()
...
...
@@ -142,19 +142,19 @@ export default {
const
res
=
decPart
?
`
${
intFmt
}
.
${
decPart
}
`
:
intFmt
return
isNeg
?
`-
${
res
}
`
:
res
},
getStaticData
()
{
api
.
getMissionData
({}).
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
if
(
code
===
0
)
{
data
.
staffCount
=
(
data
.
staffCount
??
''
)
===
''
?
'-'
:
this
.
formatThousands
(
data
.
staffCount
)
data
.
shopCount
=
(
data
.
shopCount
??
''
)
===
''
?
'-'
:
this
.
formatThousands
(
data
.
shopCount
)
data
.
totalValue
=
(
data
.
totalValue
??
''
)
===
''
?
'-'
:
this
.
formatThousands
(
data
.
totalValue
)
this
.
staticData
=
data
}
else
{
this
.
$toast
&&
this
.
$toast
(
message
)
}
})
},
//
getStaticData() {
//
api.getMissionData({}).then(res => {
//
let { code, data, message } = res
//
if (code === 0) {
//
data.staffCount = (data.staffCount ?? '') === '' ? '-' : this.formatThousands(data.staffCount)
//
data.shopCount = (data.shopCount ?? '') === '' ? '-' : this.formatThousands(data.shopCount)
//
data.totalValue = (data.totalValue ?? '') === '' ? '-' : this.formatThousands(data.totalValue)
//
this.staticData = data
//
} else {
//
this.$toast && this.$toast(message)
//
}
//
})
//
},
tabClick
(
index
)
{
const
eventCode
=
[
'supervisor_dayTask_tab'
,
'supervisor_weeklyTask_tab'
,
'supervisor_monthlyTask_tab'
,
'supervisor_specificTask_tab'
]
if
(
this
.
$track
)
{
...
...
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