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 2a9f87c4
authored
Jun 01, 2026
by
Jaxon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(督导统计): 业务开发
1 parent
a7475128
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
377 additions
and
140 deletions
src/views/performance/components/statisticsItem/gridItem.vue
src/views/performance/components/statisticsItem/specialItem.vue
src/views/performance/components/statisticsItem/statisticsItem.vue
src/views/performance/view/index.data.js
src/views/performance/view/index.vue
src/views/performance/components/statisticsItem/gridItem.vue
0 → 100644
View file @
2a9f87c
<
template
>
<div
class=
"row-wrapper"
>
<div
v-for=
"item in schema"
:key=
"item.name"
class=
"col-wrapper van-col-wrapper"
:style=
"item.colStyle"
>
<Tooltip
:content=
"item.tips"
:hide-after=
"1500"
:options=
"
{
triggers: ['click'],
placement: 'top',
autoHide: true,
disabled: !item.tips,
}">
<div
class=
"item-wrapper"
:class=
"
{ special: item.special }"
:style="item.style">
<div
class=
"label"
>
<div
class=
"text-hide"
style=
"margin-right:2px"
>
{{
item
.
label
}}
</div>
<SvgIcon
v-if=
"item.tips"
class=
"icon"
color=
"#DCDDE1"
name=
"form-tips"
size=
"16px"
/>
</div>
<div
class=
"value text-hide "
>
{{
getValue
(
item
.
name
)
}}
</div>
</div>
</Tooltip>
</div>
</div>
<!--
<van-row
gutter=
"4"
>
<van-col
v-for=
"item in schema"
:key=
"item.name"
class=
"van-col-wrapper"
:span=
"item.col"
>
</van-col>
</van-row>
-->
</
template
>
<
script
>
import
{
get
}
from
"lodash-es"
;
import
{
Col
,
Divider
,
Icon
,
Row
}
from
"vant"
;
import
SvgIcon
from
"@/components/svgIcon/index.vue"
;
import
Tooltip
from
"@/components/tooltip/index.vue"
;
export
default
{
name
:
""
,
components
:
{
[
Col
.
name
]:
Col
,
[
Row
.
name
]:
Row
,
[
Divider
.
name
]:
Divider
,
[
Icon
.
name
]:
Icon
,
SvgIcon
,
Tooltip
,
},
props
:
{
schema
:
{
type
:
Array
,
default
:
()
=>
([]),
},
data
:
{
type
:
Object
,
default
:
()
=>
({}),
},
},
data
()
{
return
{
};
},
computed
:
{
},
mounted
()
{
},
methods
:
{
getValue
(
path
)
{
return
get
(
this
.
data
,
path
);
},
},
};
</
script
>
<
style
scoped
lang=
"scss"
>
.row-wrapper
{
display
:
flex
;
align-items
:
center
;
}
.van-col-wrapper
{
overflow
:
hidden
;
flex-shrink
:
0
;
margin-right
:
4px
;
&:last-child
{
margin-right
:
0
;
}
.item-wrapper
{
background
:
#f8f8f8
;
padding
:
8px
12px
;
overflow
:
hidden
;
box-sizing
:
border-box
;
.label
{
font-weight
:
400
;
font-size
:
12px
;
line-height
:
20px
;
color
:
rgba
(
0
,
0
,
0
,
0.26
);
display
:
flex
;
align-items
:
center
;
flex-wrap
:
nowrap
;
flex-shrink
:
0
;
.icon
{
flex-shrink
:
0
;
}
}
.value
{
margin-top
:
4px
;
font-family
:
numberNor
;
font-weight
:
500
;
font-size
:
16px
;
line-height
:
20px
;
color
:
var
(
--themeColor
);
flex-shrink
:
0
;
}
}
}
</
style
>
src/views/performance/components/statisticsItem/specialItem.vue
0 → 100644
View file @
2a9f87c
<
template
>
<van-row
gutter=
"4"
>
<van-col
v-for=
"item in schema"
:key=
"item.name"
class=
"van-col-wrapper"
:span=
"item.col"
>
<div
class=
"item-wrapper"
:class=
"
{ special: item.special }"
:style="item.style">
<div
class=
"value text-hide "
>
{{
getValue
(
item
.
name
)
}}
</div>
<div
class=
"label text-hide "
>
{{
item
.
label
}}
</div>
</div>
</van-col>
</van-row>
</
template
>
<
script
>
import
{
get
}
from
"lodash-es"
;
import
{
Col
,
Divider
,
Icon
,
Row
}
from
"vant"
;
export
default
{
name
:
""
,
components
:
{
[
Col
.
name
]:
Col
,
[
Row
.
name
]:
Row
,
[
Divider
.
name
]:
Divider
,
[
Icon
.
name
]:
Icon
,
},
props
:
{
schema
:
{
type
:
Array
,
default
:
()
=>
([]),
},
data
:
{
type
:
Object
,
default
:
()
=>
({}),
},
},
data
()
{
return
{
};
},
computed
:
{
},
mounted
()
{
},
methods
:
{
getValue
(
path
)
{
return
get
(
this
.
data
,
path
);
},
},
};
</
script
>
<
style
scoped
lang=
"scss"
>
.van-col-wrapper
{
overflow
:
hidden
;
.item-wrapper
{
background
:
#fff
;
padding
:
6px
8px
;
overflow
:
hidden
;
box-sizing
:
border-box
;
text-align
:
center
;
.label
{
font-weight
:
400
;
font-size
:
12px
;
line-height
:
16px
;
color
:
#00000042
;
margin-top
:
5px
;
}
.value
{
font-family
:
numberBold
;
font-weight
:
700
;
font-style
:
Bold
;
line-height
:
20px
;
font-size
:
20px
;
}
}
}
</
style
>
src/views/performance/components/statisticsItem/statisticsItem.vue
View file @
2a9f87c
...
...
@@ -8,22 +8,23 @@
<div
class=
"title-wrapper"
>
<div
class=
"title-label-wrapper text-hide"
>
<div
class=
"main-label text-hide"
>
張三
{{
title
}}
</div>
<div
class=
"sub-label text-hide"
>
北京博福汽车4S店北京博福汽车4S店北京博福汽车4S店北京博福汽车4S店北京博福汽车4S店北京博福汽车4S店
<div
v-if=
"subTitle"
class=
"sub-label text-hide"
>
{{
subTitle
}}
</div>
</div>
<div
class=
"title-info-wrapper"
>
<slot
name=
"title-info"
>
<div
v-for=
"item in titleInfoSchema"
:key=
"item.key"
class=
"info-item-wrapper"
>
class=
"info-item-wrapper"
@
click
.
stop
>
<div
class=
"value"
>
77
{{
getValue
(
item
.
name
)
}}
</div>
<div
class=
"label"
>
交付数
{{
item
.
label
}}
</div>
</div>
</slot>
...
...
@@ -34,65 +35,29 @@
</slot>
</div>
</div>
<van-row
class=
"container"
gutter=
"4"
>
<van-col
v-for=
"item in defaultSchema"
:key=
"item.name"
class=
"van-col-wrapper"
:span=
"item.col"
>
<div
class=
"item-wrapper"
:style=
"item.style"
>
<div
class=
"label text-hide "
>
{{
item
.
label
}}
</div>
<div
class=
"value text-hide "
>
{{
item
.
name
}}
</div>
</div>
</van-col>
<van-col
v-if=
"showMoreToggle"
span=
"24"
>
<SpecialItem
style=
"margin: 8px 0"
:data=
"data"
:schema=
"specialSchema"
>
</SpecialItem>
<GridItem
:data=
"data"
:schema=
"defaultSchema"
></GridItem>
<div
class=
"container"
gutter=
"4"
>
<div
v-show=
"showMoreToggle"
span=
"24"
>
<div
class=
"more-collapse"
:style=
"
{
height: expanded ? (`${moreHeight}px`) : '0px',
}">
<div
class=
"more-inner"
>
<van-row
gutter=
"4"
>
<van-col
v-for=
"item in moreSchema"
:key=
"item.name"
class=
"van-col-wrapper"
:span=
"item.col"
>
<div
class=
"item-wrapper"
:style=
"item.style"
>
<div
class=
"label text-hide "
>
{{
item
.
label
}}
</div>
<div
class=
"value text-hide "
>
{{
item
.
name
}}
</div>
</div>
</van-col>
</van-row>
<GridItem
:data=
"data"
:schema=
"moreSchema"
></GridItem>
</div>
</div>
<!-- 用来记录高度 -->
<div
class=
"more-measure"
>
<div
ref=
"moreMeasureInner"
class=
"more-inner"
>
<van-row
gutter=
"4"
>
<van-col
v-for=
"item in moreSchema"
:key=
"item.name"
class=
"van-col-wrapper"
:span=
"item.col"
>
<div
class=
"item-wrapper"
:style=
"item.style"
>
<div
class=
"label text-hide "
>
{{
item
.
label
}}
</div>
<div
class=
"value text-hide "
>
{{
item
.
name
}}
</div>
</div>
</van-col>
</van-row>
<GridItem
:data=
"data"
:schema=
"moreSchema"
></GridItem>
</div>
</div>
</
van-col
>
</
van-row
>
</
div
>
</
div
>
<div
v-if=
"showMoreToggle"
class=
"toggle-wrapper"
:class=
"
{ 'is-expanded': expanded }"
...
...
@@ -106,7 +71,11 @@
</
template
>
<
script
>
import
{
get
}
from
"lodash-es"
;
import
{
Col
,
Divider
,
Icon
,
Row
}
from
"vant"
;
import
Tooltip
from
"@/components/tooltip/index.vue"
;
import
GridItem
from
"./gridItem.vue"
;
import
SpecialItem
from
"./specialItem.vue"
;
export
default
{
name
:
""
,
...
...
@@ -115,12 +84,26 @@ export default {
[
Row
.
name
]:
Row
,
[
Divider
.
name
]:
Divider
,
[
Icon
.
name
]:
Icon
,
GridItem
,
SpecialItem
,
},
props
:
{
title
:
{
type
:
String
,
default
:
""
,
},
subTitle
:
{
type
:
String
,
default
:
""
,
},
schema
:
{
type
:
Array
,
default
:
()
=>
([]),
},
data
:
{
type
:
Object
,
default
:
()
=>
({}),
},
beTap
:
{
type
:
Boolean
,
default
:
true
,
...
...
@@ -138,14 +121,17 @@ export default {
},
computed
:
{
defaultSchema
()
{
return
this
.
schema
.
filter
(
item
=>
(
!
item
.
isMore
&&
!
item
.
titleInfo
));
return
this
.
schema
.
filter
(
item
=>
(
!
item
.
isMore
&&
!
item
.
titleInfo
&&
!
item
.
special
));
},
moreSchema
()
{
return
this
.
schema
.
filter
(
item
=>
item
.
isMore
&&
!
item
.
titleInfo
);
return
this
.
schema
.
filter
(
item
=>
item
.
isMore
);
},
titleInfoSchema
()
{
return
this
.
schema
.
filter
(
item
=>
item
.
titleInfo
);
},
specialSchema
()
{
return
this
.
schema
.
filter
(
item
=>
(
item
.
special
));
},
showMoreToggle
()
{
return
this
.
hasMore
&&
this
.
moreSchema
.
length
>
0
;
},
...
...
@@ -163,6 +149,9 @@ export default {
this
.
updateMoreHeight
();
},
methods
:
{
getValue
(
path
)
{
return
get
(
this
.
data
,
path
);
},
handleTapItem
()
{
this
.
$emit
(
"tap"
);
},
...
...
@@ -176,7 +165,7 @@ export default {
updateMoreHeight
()
{
this
.
$nextTick
(()
=>
{
const
moreMeasureInner
=
this
.
$refs
.
moreMeasureInner
;
this
.
moreHeight
=
moreMeasureInner
?
moreMeasureInner
.
clientHeight
+
2
8
:
0
;
this
.
moreHeight
=
moreMeasureInner
?
moreMeasureInner
.
clientHeight
+
2
2
:
0
;
});
},
},
...
...
@@ -273,35 +262,10 @@ export default {
overflow
:
hidden
;
box-sizing
:
border-box
;
border-radius
:
8px
;
margin-top
:
8
px
;
margin-top
:
4
px
;
}
}
.van-col-wrapper
{
overflow
:
hidden
;
.item-wrapper
{
background
:
#f8f8f8
;
padding
:
8px
12px
;
overflow
:
hidden
;
box-sizing
:
border-box
;
.label
{
font-weight
:
400
;
font-size
:
12px
;
line-height
:
20px
;
color
:
rgba
(
0
,
0
,
0
,
0.26
);
}
.value
{
margin-top
:
4px
;
font-family
:
numberNor
;
font-weight
:
500
;
font-size
:
16px
;
line-height
:
20px
;
color
:
var
(
--themeColor
);
}
}
}
.toggle-wrapper
{
background-image
:
linear-gradient
(
to
bottom
,
...
...
src/views/performance/view/index.data.js
View file @
2a9f87c
...
...
@@ -2,7 +2,7 @@ export const brandTypeList = [
{
showIconOnActiveOnly
:
true
,
icon
:
"brand-icon|svg"
,
key
:
"
0
"
,
key
:
"
1
"
,
label
:
"问界鸿蒙-延保权益"
,
style
:
{
backgroundColor
:
"#fff"
,
...
...
@@ -11,7 +11,7 @@ export const brandTypeList = [
{
showIconOnActiveOnly
:
true
,
icon
:
"brand-icon|svg"
,
key
:
"
1
"
,
key
:
"
2
"
,
label
:
"通用品牌-延保权益"
,
style
:
{
backgroundColor
:
"#fff"
,
...
...
@@ -40,91 +40,102 @@ export const staticInfoList = [
export
const
supervisorSchemaList
=
[
{
name
:
"
brandType
"
,
name
:
"
displayDeliveryCount
"
,
label
:
"交付数"
,
col
:
8
,
titleInfo
:
true
,
},
{
name
:
"
brandType2
"
,
name
:
"
displayPreSalesTouchCount
"
,
label
:
"触客数"
,
col
:
8
,
titleInfo
:
true
,
},
{
name
:
"
brandType3
"
,
name
:
"
displayTotalOutput
"
,
label
:
"总产值(万)"
,
col
:
8
,
titleInfo
:
true
,
},
{
name
:
"brandType"
,
label
:
"总产值"
,
col
:
8
,
style
:
"margin-bottom: 4px"
,
name
:
"staffCount"
,
label
:
"管理驻店"
,
col
:
6
,
style
:
"color: #000000E5;"
,
special
:
true
,
},
{
name
:
"brandType"
,
label
:
"交付数"
,
col
:
8
,
style
:
"margin-bottom: 4px"
,
name
:
"totalStoreCount"
,
label
:
"辖区门店"
,
col
:
6
,
style
:
"color: #000000E5;"
,
special
:
true
,
},
{
name
:
"brandType"
,
label
:
"触客数"
,
col
:
8
,
style
:
"margin-bottom: 4px"
,
name
:
"yellowStoreCount"
,
label
:
"需关注门店"
,
col
:
6
,
style
:
"color: #FF9D0A;"
,
special
:
true
,
},
{
name
:
"
brandType
"
,
label
:
"
整车延保
"
,
name
:
"
redStoreCount
"
,
label
:
"
预警门店
"
,
col
:
6
,
style
:
"margin-bottom: 4px"
,
style
:
"color: #F24724;"
,
special
:
true
,
},
{
name
:
"displayVehicleWarrantyRate"
,
label
:
"整车延保"
,
colStyle
:
"flex: 0 auto;"
,
tips
:
"整车延保触客转化率"
,
},
{
name
:
"
brandTyp
e"
,
name
:
"
displayPeaceOfMindRat
e"
,
label
:
"安心包"
,
col
:
6
,
style
:
"margin-bottom: 4px"
,
colStyle
:
"flex:1"
,
tips
:
"安心包触客转化率"
,
},
{
name
:
"
brandTyp
e"
,
name
:
"
displayBatteryWarrantyRat
e"
,
label
:
"电池"
,
col
:
6
,
style
:
"margin-bottom: 4px"
,
colStyle
:
"flex:1"
,
tips
:
"电池延保触客转化率"
,
},
{
name
:
"
brandTyp
e"
,
name
:
"
displayTireInsuranceRat
e"
,
label
:
"轮胎"
,
col
:
6
,
style
:
"margin-bottom: 4px
"
,
col
Style
:
"flex:1"
,
tips
:
"轮胎险触客转化率
"
,
},
{
name
:
"
brandTyp
e"
,
name
:
"
displayVehicleWarrantyAfterSalesRat
e"
,
label
:
"整车延保售后成交/总成交"
,
col
:
12
,
colStyle
:
"width:50%"
,
style
:
"margin-bottom: 4px;"
,
isMore
:
true
,
style
:
"margin-bottom: 4px"
,
},
{
name
:
"
brandTyp
e"
,
name
:
"
displayPeaceOfMindAfterSalesRat
e"
,
label
:
"安心包售后成交/总成交"
,
col
:
12
,
colStyle
:
"width:50%"
,
style
:
"margin-bottom: 4px;"
,
isMore
:
true
,
style
:
"margin-bottom: 4px"
,
},
{
name
:
"
brandTyp
e"
,
name
:
"
displayBatteryAfterSalesRat
e"
,
label
:
"电池售后成交/总成交"
,
col
:
12
,
col
Style
:
"width:50%"
,
isMore
:
true
,
},
{
name
:
"
brandTyp
e"
,
name
:
"
displayTireInsuranceAfterSalesRat
e"
,
label
:
"轮胎售后成交/总成交"
,
col
:
12
,
col
Style
:
"width:50%"
,
isMore
:
true
,
},
];
src/views/performance/view/index.vue
View file @
2a9f87c
...
...
@@ -8,20 +8,20 @@
</van-tabs>
<div
class=
"filter-wrapper"
>
<div
class=
"brand-filter"
>
<BrandTabs
:list=
"options.brandTypeList"
/>
<BrandTabs
v-model=
"list.query.statDimension"
:list=
"options.brandTypeList"
/>
</div>
<div
class=
"date-filter"
>
<Date
Search
show-date-type-filter
:is-sticky=
"fals
e"
:tab-selected=
"3
"
@
search=
"search"
>
</DateSearch>
<Date
TypeTabs
v-model=
"list.query.dateType"
/>
<DatePicker
v-model=
"list.query.dat
e"
style=
"margin-left:16px
"
:type=
"options.dateType[list.query.dateType]"
/
>
</div>
<div
class=
"static-wrapper"
>
<
!--
<
div
class=
"static-wrapper"
>
<StaticInfo
:list=
"options.staticInfoList"
/>
</div>
</div>
-->
<div
class=
"search-wrapper"
>
<SearchInput
/>
<SearchInput
v-model=
"list.query.searchKeyword"
/>
</div>
</div>
...
...
@@ -30,10 +30,13 @@
督导列表
</div>
<div
class=
"container-wrapper"
>
<StatisticsItem
v-for=
"(item, index) in
10
"
<StatisticsItem
v-for=
"(item, index) in
list.data
"
:key=
"index"
class=
"statistics-item"
:data=
"item"
:schema=
"options.supervisorSchemaList"
:sub-title=
"getItemSubTitle(item)"
:title=
"item.supervisorName"
@
tap=
"handleTapItem"
/>
</div>
</div>
...
...
@@ -43,7 +46,10 @@
</
template
>
<
script
>
import
DateSearch
from
"@/components/dateSearch/dateSearch.vue"
;
import
dayjs
from
"dayjs"
;
import
{
cloneDeep
,
get
}
from
"lodash-es"
;
import
DatePicker
from
"@/components/datePicker/index.vue"
;
import
DateTypeTabs
from
"@/components/dateTypeTabs/index.vue"
;
import
SearchInput
from
"@/components/searchBar/index.vue"
;
import
StaticInfo
from
"@/components/staticInfo/index.vue"
;
import
{
getSupervisorPerformance
}
from
"@/views/performance/api"
;
...
...
@@ -55,7 +61,8 @@ export default {
name
:
"PerformanceOverview"
,
components
:
{
BrandTabs
,
DateSearch
,
DatePicker
,
DateTypeTabs
,
StaticInfo
,
SearchInput
,
StatisticsItem
,
...
...
@@ -67,10 +74,24 @@ export default {
brandTypeList
,
staticInfoList
,
supervisorSchemaList
,
dateType
:
{
// "date" | "week" | "year-month"
0
:
"date"
,
1
:
"week"
,
2
:
"year-month"
,
},
},
list
:
{
loading
:
false
,
data
:
[],
query
:
{
dateType
:
0
,
statDimension
:
1
,
searchKeyword
:
""
,
date
:
{
startDayjs
:
dayjs
(),
},
},
},
};
},
...
...
@@ -78,20 +99,38 @@ export default {
await
this
.
getData
();
},
methods
:
{
log
()
{
console
.
log
(
"this.list.query"
,
this
.
list
.
query
);
},
getItemSubTitle
(
rows
)
{
return
rows
?.
storeList
?.
map
(
i
=>
i
.
merchantName
).
join
(
"、"
);
},
getQuery
()
{
return
{
...
this
.
list
.
query
,
startDate
:
this
.
list
.
query
.
date
.
startDate
,
endDate
:
this
.
list
.
query
.
date
.
endDate
,
date
:
undefined
,
};
},
async
getData
()
{
await
getSupervisorPerformance
();
this
.
list
.
data
=
await
getSupervisorPerformance
(
this
.
getQuery
());
},
afterGetData
()
{
},
filterSearchKeyword
(
list
)
{
},
handleTapItem
()
{
this
.
$router
.
push
({
name
:
"supervisorOutlet"
,
});
},
handleResetList
()
{
async
handleResetList
()
{
this
.
list
.
loading
=
true
;
setTimeout
(()
=>
{
this
.
list
.
loading
=
false
;
},
3000
);
await
this
.
getData
();
this
.
list
.
loading
=
false
;
},
search
()
{},
},
...
...
@@ -148,6 +187,9 @@ export default {
}
.date-filter
{
padding
:
8px
0
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
}
.static-wrapper
{
padding
:
8px
0
;
...
...
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