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
d8fe2550
Commit
d8fe2550
authored
Sep 19, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团队概况、小时动态 [新增] 销售分部页面
parent
df5dca73
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
149 additions
and
6 deletions
+149
-6
App.vue
src/App.vue
+14
-1
hour.vue
src/components/team/hour.vue
+40
-1
index.vue
src/components/team/index.vue
+46
-4
menuList.js
src/util/menuList.js
+6
-0
wordbook.js
src/util/wordbook.js
+43
-0
No files found.
src/App.vue
View file @
d8fe2550
...
...
@@ -37,7 +37,9 @@
return
x
.
cover
===
j
.
cover
;
});
if
(
find
)
{
j
.
router
.
meta
=
{};
if
(
!
j
.
router
.
meta
||
JSON
.
stringify
(
j
.
router
.
meta
)
==
'{}'
)
{
j
.
router
.
meta
=
{};
}
j
.
router
.
meta
.
readonly
=
!!
find
.
readonly
;
j
.
router
.
meta
.
delete
=
!!
find
.
delete
;
j
.
router
.
meta
.
export
=
!!
find
.
export
;
...
...
@@ -288,6 +290,7 @@
.table-refresh-header {
display: inline-block;
cursor: help;
i {
color: #409eff;
}
...
...
@@ -301,16 +304,20 @@
text-decoration: underline;
transition: color 240ms, background-color 240ms;
color: #444;
& + .cell-link {
margin-left: 0;
}
a {
color: #444;
transition: color 240ms, background-color 240ms;
}
&:hover {
background-color: #cce4ff;
color: #007fff;
a {
color: #007fff;
}
...
...
@@ -330,6 +337,7 @@
.tabs-refresh {
margin-top: 10px;
&.el-tabs--card > .el-tabs__header {
margin-bottom: 10px;
/*margin-top: 10px;*/
...
...
@@ -362,20 +370,25 @@
border: solid 1px #EBEEF5;
border-spacing: 0;
border-collapse: collapse;
thead {
color: #909399;
font-weight: 500;
th {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
tbody {
tr {
transition: background-color 240ms;
&:hover {
background-color: #F5F7FA;
}
td {
padding: 12px 10px;
border: 1px solid #EBEEF5;
...
...
src/components/team/hour.vue
View file @
d8fe2550
...
...
@@ -10,7 +10,8 @@
<el-tabs
v-if=
"teacherType == ''"
v-model=
"search.team"
type=
"card"
class=
"tabs-refresh"
@
tab-click=
"getData"
>
<!--
<el-tab-pane
label=
"总计"
name=
"1,2,3,4,5,6,7,8,9,10"
/>
-->
<el-tab-pane
v-for=
"i in 10"
:key=
"i"
:label=
"'T'+i"
:name=
"i.toString()"
/>
<!--
<el-tab-pane
v-for=
"i in 10"
:key=
"i"
:label=
"'T'+i"
:name=
"i.toString()"
/>
-->
<el-tab-pane
v-for=
"i in 10"
:key=
"i+(index-1)*10"
:label=
"'T'+(i+(index-1)*10)"
:name=
"(i+(index-1)*10).toString()"
/>
</el-tabs>
<!--
<table
class=
"custom-table"
v-loading=
"loading"
>
...
...
@@ -93,6 +94,9 @@
components
:
{
page
,
HourDialog
}
,
data
()
{
return
{
index
:
''
,
// teamTotalString: '',
teamLength
:
10
,
time
:
[],
table
:
{
th
:
[],
...
...
@@ -141,10 +145,44 @@
teacherType
:
''
// 'teacher_leader' // 'teacher' // ''
}
}
,
watch
:
{
$route
()
{
this
.
index
=
this
.
$route
.
meta
.
index
;
this
.
search
.
type
=
this
.
$route
.
meta
.
type
;
/*var arr = [];
for (var i = 0; i < this.teamLength; i++) {
arr.push(i + 1 + (this.index - 1) * 10)
}
this.teamTotalString = arr.join(',');*/
var
phoneNum
=
localStorage
.
getItem
(
"phoneNum"
);
this
.
teacherType
=
phoneNum
&&
JSON
.
parse
(
phoneNum
)
&&
JSON
.
parse
(
phoneNum
).
teacher_type
?
JSON
.
parse
(
phoneNum
).
teacher_type
:
''
;
if
(
this
.
teacherType
==
''
)
{
// 总监
this
.
search
.
team
=
((
this
.
index
-
1
)
*
10
+
1
).
toString
();
this
.
getData
();
}
else
if
(
this
.
teacherType
==
'teacher_leader'
)
{
// 组长
this
.
search
.
team
=
JSON
.
parse
(
phoneNum
).
squad
;
this
.
getData
();
}
else
if
(
this
.
teacherType
==
'teacher'
)
{
// 组员
console
.
log
(
'组员无权限!'
)
}
}
,
}
,
mounted
()
{
this
.
index
=
this
.
$route
.
meta
.
index
;
this
.
search
.
type
=
this
.
$route
.
meta
.
type
;
/*var arr = [];
for (var i = 0; i < this.teamLength; i++) {
arr.push(i + 1 + (this.index - 1) * 10)
}
this.teamTotalString = arr.join(',');*/
var
phoneNum
=
localStorage
.
getItem
(
"phoneNum"
);
this
.
teacherType
=
phoneNum
&&
JSON
.
parse
(
phoneNum
)
&&
JSON
.
parse
(
phoneNum
).
teacher_type
?
JSON
.
parse
(
phoneNum
).
teacher_type
:
''
;
if
(
this
.
teacherType
==
''
)
{
// 总监
this
.
search
.
team
=
((
this
.
index
-
1
)
*
10
+
1
).
toString
();
this
.
getData
();
}
else
if
(
this
.
teacherType
==
'teacher_leader'
)
{
// 组长
this
.
search
.
team
=
JSON
.
parse
(
phoneNum
).
squad
;
...
...
@@ -188,6 +226,7 @@
this
.
loading
=
true
;
let
json
=
{
team
:
this
.
search
.
team
,
type
:
this
.
search
.
type
,
page
:
this
.
nowPage
,
limit
:
this
.
limit
,
start_at
:
this
.
search
.
start_at
...
...
src/components/team/index.vue
View file @
d8fe2550
...
...
@@ -9,8 +9,9 @@
</el-date-picker>
<el-tabs
v-if=
"teacherType == ''"
v-model=
"search.team"
type=
"card"
class=
"tabs-refresh"
@
tab-click=
"getData"
>
<el-tab-pane
label=
"总计"
name=
"1,2,3,4,5,6,7,8,9,10"
/>
<el-tab-pane
v-for=
"i in 10"
:key=
"i"
:label=
"'T'+i"
:name=
"i.toString()"
/>
<!--
<el-tab-pane
label=
"总计"
name=
"1,2,3,4,5,6,7,8,9,10"
/>
-->
<el-tab-pane
label=
"总计"
:name=
"teamTotalString"
/>
<el-tab-pane
v-for=
"i in 10"
:key=
"i+(index-1)*10"
:label=
"'T'+(i+(index-1)*10)"
:name=
"(i+(index-1)*10).toString()"
/>
</el-tabs>
<el-table
class=
"team-table"
border
size=
"small"
:data=
"list"
v-loading=
"loading"
:row-class-name=
"tableRowClassName"
>
...
...
@@ -24,7 +25,8 @@
<
/template
>
<
/el-table-column>--
>
<
el
-
table
-
column
v
-
if
=
"this.search.team != '1,2,3,4,5,6,7,8,9,10'"
label
=
"销售顾问"
>
<!--
<
el
-
table
-
column
v
-
if
=
"this.search.team != '1,2,3,4,5,6,7,8,9,10'"
label
=
"销售顾问"
>-->
<
el
-
table
-
column
v
-
if
=
"search.team != teamTotalString"
label
=
"销售顾问"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
isTotal
?
'-'
:
scope
.
row
.
staff_name
}}
<
/template
>
<
/el-table-column
>
...
...
@@ -196,6 +198,7 @@
import
{
getTeamApi
}
from
'@service/api'
;
import
{
TIP_TEAM
}
from
'@util/tipArr'
;
import
CommonJs
from
'@util/common'
;
import
{
TEACHER_TYPE
}
from
'@/util/wordbook'
function
getNowFormatDate
()
{
var
date
=
new
Date
();
...
...
@@ -218,11 +221,15 @@
components
:
{
page
,
TeamDialog
}
,
data
()
{
return
{
index
:
''
,
teamTotalString
:
''
,
teamLength
:
10
,
isTotal
:
false
,
TIP_TEAM
:
TIP_TEAM
,
loading
:
true
,
search
:
{
team
:
'1'
,
type
:
''
,
start_at
:
getNowFormatDate
()
// start_at: new Date()
}
,
...
...
@@ -262,10 +269,44 @@
teacherType
:
''
// 'teacher_leader' // 'teacher' // ''
}
}
,
watch
:
{
$route
()
{
this
.
index
=
this
.
$route
.
meta
.
index
;
this
.
search
.
type
=
this
.
$route
.
meta
.
type
;
var
arr
=
[];
for
(
var
i
=
0
;
i
<
this
.
teamLength
;
i
++
)
{
arr
.
push
(
i
+
1
+
(
this
.
index
-
1
)
*
10
)
}
this
.
teamTotalString
=
arr
.
join
(
','
);
var
phoneNum
=
localStorage
.
getItem
(
"phoneNum"
);
this
.
teacherType
=
phoneNum
&&
JSON
.
parse
(
phoneNum
)
&&
JSON
.
parse
(
phoneNum
).
teacher_type
?
JSON
.
parse
(
phoneNum
).
teacher_type
:
''
;
if
(
this
.
teacherType
==
''
)
{
// 总监
this
.
search
.
team
=
((
this
.
index
-
1
)
*
10
+
1
).
toString
();
this
.
getData
();
}
else
if
(
this
.
teacherType
==
'teacher_leader'
)
{
// 组长
this
.
search
.
team
=
JSON
.
parse
(
phoneNum
).
squad
;
this
.
getData
();
}
else
if
(
this
.
teacherType
==
'teacher'
)
{
// 组员
console
.
log
(
'组员无权限!'
)
}
}
,
}
,
mounted
()
{
this
.
index
=
this
.
$route
.
meta
.
index
;
this
.
search
.
type
=
this
.
$route
.
meta
.
type
;
var
arr
=
[];
for
(
var
i
=
0
;
i
<
this
.
teamLength
;
i
++
)
{
arr
.
push
(
i
+
1
+
(
this
.
index
-
1
)
*
10
)
}
this
.
teamTotalString
=
arr
.
join
(
','
);
var
phoneNum
=
localStorage
.
getItem
(
"phoneNum"
);
this
.
teacherType
=
phoneNum
&&
JSON
.
parse
(
phoneNum
)
&&
JSON
.
parse
(
phoneNum
).
teacher_type
?
JSON
.
parse
(
phoneNum
).
teacher_type
:
''
;
if
(
this
.
teacherType
==
''
)
{
// 总监
this
.
search
.
team
=
((
this
.
index
-
1
)
*
10
+
1
).
toString
();
this
.
getData
();
}
else
if
(
this
.
teacherType
==
'teacher_leader'
)
{
// 组长
this
.
search
.
team
=
JSON
.
parse
(
phoneNum
).
squad
;
...
...
@@ -317,9 +358,10 @@
this
.
loading
=
true
;
let
json
=
{
team
:
this
.
search
.
team
,
type
:
this
.
search
.
type
,
page
:
this
.
nowPage
,
limit
:
this
.
limit
,
start_at
:
this
.
search
.
start_at
start_at
:
this
.
search
.
start_at
,
}
getTeamApi
(
json
).
then
(
res
=>
{
if
(
Object
.
keys
(
res
).
length
&&
res
.
team_list
&&
res
.
team_list
.
page_data
)
{
...
...
src/util/menuList.js
View file @
d8fe2550
...
...
@@ -224,6 +224,7 @@ export default [
path
:
'/team1'
,
name
:
'team1'
,
component
:
e
=>
require
([
'@/components/team'
],
e
),
meta
:
{
index
:
1
,
type
:
0
}
}
},
{
value
:
'团队概况(2部)'
,
...
...
@@ -234,6 +235,7 @@ export default [
path
:
'/team2'
,
name
:
'team2'
,
component
:
e
=>
require
([
'@/components/team'
],
e
),
meta
:
{
index
:
2
,
type
:
5
}
}
},
{
value
:
'团队概况(3部)'
,
...
...
@@ -244,6 +246,7 @@ export default [
path
:
'/team3'
,
name
:
'team3'
,
component
:
e
=>
require
([
'@/components/team'
],
e
),
meta
:
{
index
:
3
,
type
:
6
}
}
},
{
value
:
'小时动态(1部)'
,
...
...
@@ -254,6 +257,7 @@ export default [
path
:
'/hour1'
,
name
:
'hour1'
,
component
:
e
=>
require
([
'@/components/team/hour'
],
e
),
meta
:
{
index
:
1
,
type
:
0
}
}
},
{
value
:
'小时动态(2部)'
,
...
...
@@ -264,6 +268,7 @@ export default [
path
:
'/hour2'
,
name
:
'hour2'
,
component
:
e
=>
require
([
'@/components/team/hour'
],
e
),
meta
:
{
index
:
2
,
type
:
5
}
}
},
{
value
:
'小时动态(3部)'
,
...
...
@@ -274,6 +279,7 @@ export default [
path
:
'/hour3'
,
name
:
'hour3'
,
component
:
e
=>
require
([
'@/components/team/hour'
],
e
),
meta
:
{
index
:
3
,
type
:
6
}
}
},
]
...
...
src/util/wordbook.js
View file @
d8fe2550
...
...
@@ -283,6 +283,49 @@ export const STAFF_TYPE = [{
value
:
4
}];
/*export const STAFF_TYPE = [{
label: '销售1部',
value: 1
}, {
label: '销售2部',
value: 5
}, {
label: '销售3部',
value: 6
}, {
label: '助教',
value: 2
}, {
label: 'TMK',
value: 3
}, {
label: '增长',
value: 4
}];*/
export
const
TEACHER_TYPE
=
[{
label
:
'销售1部'
,
value
:
0
,
},
{
label
:
'销售2部'
,
value
:
5
},
{
label
:
'销售3部'
,
value
:
6
},
{
label
:
'新星妈妈'
,
value
:
1
},
{
label
:
'用户服务'
,
value
:
2
},
{
label
:
'增长运营'
,
value
:
3
},
{
label
:
'TMK'
,
value
:
4
}];
export
const
STAFF
=
[
{
label
:
'岗位名称'
...
...
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