Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
d6538bc6
Commit
d6538bc6
authored
Sep 06, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提测 团队概况
parent
3f708ac9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
48 deletions
+81
-48
dialog.vue
src/components/team/dialog.vue
+47
-16
hour.vue
src/components/team/hour.vue
+10
-10
index.vue
src/components/team/index.vue
+21
-20
menuList.js
src/util/menuList.js
+3
-2
No files found.
src/components/team/dialog.vue
View file @
d6538bc6
...
...
@@ -2,8 +2,6 @@
<el-dialog
:title=
"title"
append-to-body
:visible
.
sync=
"show"
width=
"960px"
>
<div
v-loading=
"loading"
>
<div></div>
<!--回访 开始-->
<el-table
v-if=
"dialogObj.type == 'callback'"
:data=
"list"
border
size=
"small"
>
<el-table-column
label=
"销售顾问"
prop=
"staff_name"
></el-table-column>
...
...
@@ -91,15 +89,19 @@
<el-table
v-if=
"dialogObj.type == 'class'"
:data=
"list"
border
size=
"small"
>
<el-table-column
label=
"销售顾问"
prop=
"staff_name"
></el-table-column>
<el-table-column
label=
"老师名"
prop=
"teacher_name"
></el-table-column>
<el-table-column
label=
"期数名称"
prop=
"user_id"
></el-table-column>
<el-table-column
label=
"期数名称"
prop=
"user_id"
>
<
template
slot-scope=
"scope"
>
{{
periodName
(
scope
.
row
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"班级名称"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
c
ontact
_name
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
c
lass
_name
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"开课时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
contact_phone
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
start_at
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"进班人数"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
intention
||
'-'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
join_num
||
'-'
}}
</
template
>
</el-table-column>
</el-table>
<!--开课班级 结束-->
...
...
@@ -111,17 +113,17 @@
<
/el-table-column
>
<
el
-
table
-
column
label
=
"销售顾问"
>
<!--
todo
优化
-->
<
template
slot
-
scope
=
"scope"
>
{{(
dialogObj
.
t
otal
||
String
(
scope
.
row
.
staff_name
).
indexOf
(
','
)
>-
1
)
?
'-'
:
dialogObj
.
staff_name
}}
<
/template
>
<
template
slot
-
scope
=
"scope"
>
{{(
dialogObj
.
isT
otal
||
String
(
scope
.
row
.
staff_name
).
indexOf
(
','
)
>-
1
)
?
'-'
:
dialogObj
.
staff_name
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"平均转化率"
prop
=
"trans_rate"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"日课/体验课"
prop
=
"day_order_rate"
width
=
"90px"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"月课/季课"
prop
=
"month_order_rate"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"总订单"
prop
=
"total_order_num"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"一年课"
prop
=
"year_order_num"
>
<!--
todo
跳转
-->
<
/el-table-column
>
<
el
-
table
-
column
label
=
"两年课"
prop
=
"two_order_num"
>
<!--
todo
跳转
-->
<
/el-table-column
>
<
el
-
table
-
column
label
=
"总业绩"
prop
=
"total_order_money"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"一年课"
prop
=
"year_order_money"
><
/el-table-column
>
...
...
@@ -129,7 +131,7 @@
<
/el-table
>
<!--
业绩
结束
-->
<!--
todo
分页有问题
权限有问题
-->
<!--
todo
权限有问题
-->
<!--
<
page
v
-
if
=
"total"
:
total
=
"total"
:
limit
=
"limit"
@
pageChange
=
"onPageChange"
@
sizeChange
=
"onSizeChange"
/>-->
<
page
:
current
-
page
=
"nowPage"
:
total
=
"total"
:
limit
=
"limit"
@
pageChange
=
"onPageChange"
@
sizeChange
=
"onSizeChange"
/>
...
...
@@ -175,6 +177,26 @@
}
}
,
periodName
(
val
)
{
let
str
=
''
;
if
(
val
.
goods_id
)
{
str
+=
`【${val.goods_id
}
】`
}
if
(
val
.
title
)
{
str
+=
`${val.title
}
`
}
if
(
val
.
watch_num
)
{
str
+=
`${val.watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(${val.start_at.slice(5).replace('-', '')
}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d${val.has_watch_num
}
`
}
return
str
}
,
getData
()
{
// todo 名字
if
(
this
.
dialogObj
.
type
==
'callback'
)
{
this
.
getVisited
();
...
...
@@ -196,8 +218,8 @@
getVisited
()
{
// 已回访
let
json
=
{
//
teacher_id: this.dialogObj.teacher_id,
teacher_id
:
'82'
,
teacher_id
:
this
.
dialogObj
.
teacher_id
,
//
teacher_id: '82',
start_at
:
this
.
dialogObj
.
start_at
,
page
:
this
.
nowPage
,
limit
:
this
.
limit
...
...
@@ -218,8 +240,13 @@
limit
:
this
.
limit
}
getValidchatApi
(
json
.
alias
,
json
).
then
(
res
=>
{
if
(
Object
.
keys
(
res
).
length
&&
res
.
chat_friend_list
)
{
this
.
list
=
res
.
chat_friend_list
.
page_data
;
this
.
total
=
res
.
chat_friend_list
.
total
;
}
else
{
this
.
list
=
[];
this
.
total
=
0
;
}
this
.
loading
=
false
;
}
)
}
,
...
...
@@ -236,6 +263,9 @@
if
(
Object
.
keys
(
res
).
length
&&
res
.
phone_record_list
)
{
this
.
list
=
res
.
phone_record_list
.
page_data
||
[];
this
.
total
=
res
.
phone_record_list
.
total
||
0
;
}
else
{
this
.
list
=
[];
this
.
total
=
0
;
}
this
.
loading
=
false
;
}
)
...
...
@@ -243,7 +273,8 @@
getClass
()
{
let
json
=
{
teacher_id
:
this
.
dialogObj
.
teacher_id
.
toString
(),
teacher_id
:
this
.
dialogObj
.
teacher_id
,
// teacher_id: 75,
start_at
:
this
.
dialogObj
.
start_at
,
page
:
this
.
nowPage
,
limit
:
this
.
limit
...
...
@@ -266,7 +297,7 @@
getAchievementApi
(
json
).
then
(
res
=>
{
if
(
typeof
res
===
'object'
)
{
res
.
squad
=
this
.
dialogObj
.
squad
;
res
.
staff_name
=
this
.
dialogObj
.
t
otal
?
'-'
:
this
.
dialogObj
.
staff_name
;
res
.
staff_name
=
this
.
dialogObj
.
isT
otal
?
'-'
:
this
.
dialogObj
.
staff_name
;
this
.
list
=
[
res
];
this
.
total
=
0
}
...
...
src/components/team/hour.vue
View file @
d6538bc6
...
...
@@ -266,7 +266,7 @@
transStaff
(
row
)
{
if
(
row
.
total
)
{
return
'合计'
}
else
if
(
row
.
staff_name
.
indexOf
(
','
)
>-
1
)
{
}
else
if
(
row
.
staff_name
.
indexOf
(
','
)
>
-
1
)
{
return
row
.
staff_name
.
split
(
','
).
join
(
'<br>'
)
}
else
{
return
row
.
staff_name
...
...
@@ -296,7 +296,7 @@
user_id
:
row
.
user_id
,
teacher_id
:
row
.
teacher_id
,
start_at
:
this
.
search
.
start_at
,
staff_name
:
row
.
staff_name
.
indexOf
(
','
)
>
-
1
?
row
.
staff_name
.
split
(
','
).
join
(
','
)
:
row
.
staff_name
staff_name
:
row
.
staff_name
.
indexOf
(
','
)
>
-
1
?
row
.
staff_name
.
split
(
','
).
join
(
','
)
:
row
.
staff_name
}
}
,
getData
()
{
...
...
@@ -308,7 +308,7 @@
}
getTeamApi
(
json
).
then
(
res
=>
{
if
(
Object
.
keys
(
res
).
length
&&
res
.
team_list
&&
res
.
team_list
.
page_data
)
{
if
(
Object
.
keys
(
res
.
team_total
).
length
)
{
if
(
Object
.
keys
(
res
.
team_total
).
length
)
{
res
.
team_total
.
total
=
true
;
// 方便"合计" 可以这样写,也可以用scope.$index
res
.
team_list
.
page_data
.
unshift
(
res
.
team_total
);
}
...
...
src/components/team/index.vue
View file @
d6538bc6
...
...
@@ -15,7 +15,7 @@
<el-table
class=
"team-table"
border
size=
"small"
:data=
"list"
v-loading=
"loading"
:row-class-name=
"tableRowClassName"
>
<el-table-column
label=
"组别"
width=
"50px"
>
<template
slot-scope=
"scope"
>
{{
(
String
(
scope
.
row
.
squad
).
indexOf
(
','
)
>
-
1
&&
scope
.
row
.
total
)
?
'合计'
:
`T${scope.row.squad
}
`
}}
<
/template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
isTotal
?
'合计'
:
`T${scope.row.squad
}
`
}}
<
/template
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"销售顾问"
>
...
...
@@ -25,7 +25,7 @@
<
/el-table-column>--
>
<
el
-
table
-
column
v
-
if
=
"this.search.team != '1,2,3,4,5,6,7,8,9,10'"
label
=
"销售顾问"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
t
otal
?
'-'
:
scope
.
row
.
staff_name
}}
<
/template
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
isT
otal
?
'-'
:
scope
.
row
.
staff_name
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"reach_class_num"
>
...
...
@@ -119,7 +119,7 @@
<
el
-
table
-
column
prop
=
"phone_total_time"
>
<
template
slot
=
"header"
slot
-
scope
=
"scope"
>
<!--
TODO
-->
<!--
TODO
时间展示
-->
<
el
-
tooltip
effect
=
"dark"
:
content
=
"TIP_TEAM['phone_total_time']"
placement
=
"top"
>
<
span
class
=
"table-refresh-header"
>
当日
<
i
class
=
"el-icon-question"
><
/i><br>有效通
时
...
...
@@ -199,9 +199,9 @@
function
getNowFormatDate
()
{
var
date
=
new
Date
();
var
seperator1
=
"-"
;
var
year
=
date
.
getFullYear
();
//
年
var
month
=
date
.
getMonth
()
+
1
;
//
月
var
strDate
=
date
.
getDate
();
//
日
var
year
=
date
.
getFullYear
();
//
年
var
month
=
date
.
getMonth
()
+
1
;
//
月
var
strDate
=
date
.
getDate
();
//
日
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"0"
+
month
;
}
...
...
@@ -217,6 +217,7 @@
components
:
{
page
,
TeamDialog
}
,
data
()
{
return
{
isTotal
:
false
,
TIP_TEAM
:
TIP_TEAM
,
loading
:
true
,
search
:
{
...
...
@@ -264,9 +265,9 @@
}
,
methods
:
{
transStaff
(
row
)
{
if
(
row
.
t
otal
)
{
if
(
row
.
isT
otal
)
{
return
'合计'
}
else
if
(
row
.
staff_name
.
indexOf
(
','
)
>-
1
)
{
}
else
if
(
row
.
staff_name
.
indexOf
(
','
)
>
-
1
)
{
return
row
.
staff_name
.
split
(
','
).
join
(
'<br>'
)
}
else
{
return
row
.
staff_name
...
...
@@ -289,14 +290,14 @@
dialogToggle
(
row
,
type
)
{
this
.
dialogObj
=
{
alias
:
row
.
alias
,
// 老师微信号
squad
:
(
String
(
row
.
squad
).
indexOf
(
','
)
>
-
1
&&
row
.
t
otal
)
?
''
:
`${row.squad
}
`
,
squad
:
(
String
(
row
.
squad
).
indexOf
(
','
)
>
-
1
&&
row
.
isT
otal
)
?
''
:
`${row.squad
}
`
,
show
:
true
,
total
:
row
.
t
otal
,
isTotal
:
row
.
isT
otal
,
type
:
type
,
user_id
:
row
.
user_id
,
teacher_id
:
row
.
teacher_id
,
start_at
:
this
.
search
.
start_at
,
staff_name
:
row
.
staff_name
.
indexOf
(
','
)
>
-
1
?
row
.
staff_name
.
split
(
','
).
join
(
','
)
:
row
.
staff_name
staff_name
:
row
.
staff_name
.
indexOf
(
','
)
>
-
1
?
row
.
staff_name
.
split
(
','
).
join
(
','
)
:
row
.
staff_name
}
}
,
getData
()
{
...
...
@@ -308,8 +309,8 @@
}
getTeamApi
(
json
).
then
(
res
=>
{
if
(
Object
.
keys
(
res
).
length
&&
res
.
team_list
&&
res
.
team_list
.
page_data
)
{
if
(
Object
.
keys
(
res
.
team_total
).
length
)
{
res
.
team_total
.
t
otal
=
true
;
// 方便"合计" 可以这样写,也可以用scope.$index
if
(
Object
.
keys
(
res
.
team_total
).
length
)
{
res
.
team_total
.
isT
otal
=
true
;
// 方便"合计" 可以这样写,也可以用scope.$index
res
.
team_list
.
page_data
.
unshift
(
res
.
team_total
);
}
this
.
list
=
res
.
team_list
.
page_data
;
...
...
src/util/menuList.js
View file @
d6538bc6
...
...
@@ -195,7 +195,8 @@ export default [
name
:
'team'
,
component
:
e
=>
require
([
'@/components/team'
],
e
),
}
},
{
},
/*{
value: '小时动态',
routerName: 'hour',
path: '/hour',
...
...
@@ -205,7 +206,7 @@ export default [
name: 'hour',
component: e => require(['@/components/team/hour'], e),
}
},
},
*/
]
},
{
name
:
''
,
...
...
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