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
553f4966
Commit
553f4966
authored
Sep 02, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
20c77822
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
178 additions
and
11 deletions
+178
-11
dialog.vue
src/components/class/dialog.vue
+1
-0
dialog.vue
src/components/team/dialog.vue
+86
-0
index.vue
src/components/team/index.vue
+83
-11
api.js
src/service/api.js
+8
-0
No files found.
src/components/class/dialog.vue
View file @
553f4966
...
...
@@ -154,6 +154,7 @@
this
.
form
=
{
teacher_id
:
''
,
max_join_num
:
''
,
class_name
:
''
,
source
:
''
,
qr
:
""
};
...
...
src/components/team/dialog.vue
0 → 100644
View file @
553f4966
<
template
>
<el-dialog
:title=
"title"
append-to-body
:visible
.
sync=
"show"
width=
"800px"
>
<div
v-loading=
"loading"
>
<el-table
:data=
"list"
>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
getVisitedApi
,
getClassOpenedApi
}
from
"@service/api"
;
import
page
from
'@framework/page'
export
default
{
name
:
"TeamDialog"
,
props
:
{
dialogObj
:
{
type
:
Object
,
required
:
true
,
default
:
()
=>
{}
}
},
data
()
{
return
{
show
:
false
,
loading
:
true
,
list
:
[],
title
:
''
,
total
:
0
,
nowPage
:
1
,
limit
:
10
,
}
},
mounted
()
{
this
.
initDialog
()
},
methods
:
{
initDialog
()
{
console
.
log
(
this
.
dialogObj
)
if
(
this
.
dialogObj
)
{
this
.
show
=
this
.
dialogObj
.
show
;
if
(
this
.
dialogObj
.
type
==
'callback'
)
{
}
else
if
(
this
.
dialogObj
.
type
==
'class'
)
{
}
}
},
getVisited
()
{
getVisitedApi
().
then
(
res
=>
{
})
},
onPageChange
(
val
)
{
this
.
nowPage
=
val
this
.
getData
()
},
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getData
()
},
},
watch
:
{
dialogObj
:
{
handler
:
function
()
{
this
.
loading
=
true
;
this
.
initDialog
()
},
deep
:
true
},
show
(
value
)
{
this
.
$emit
(
"changeShow"
,
value
);
}
}
}
</
script
>
src/components/team/index.vue
View file @
553f4966
<
template
>
<div
class=
"admin-refresh"
>
<el-date-picker
style=
"margin: 10px 0 0 10px; width: 185px;"
:clearable=
"false"
v-model=
"search.start_at"
value-format=
"yyyy-MM-dd"
align=
"right"
type=
"date"
placeholder=
"选择日期"
:picker-options=
"pickerOptions"
>
</el-date-picker>
<el-tabs
v-model=
"search.team"
type=
"card"
class=
"tabs-refresh"
@
tab-click=
"getData"
>
<el-tab-pane
label=
"总计"
name=
""
/>
<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-tabs>
<el-table
class=
"team-table"
border
size=
"small"
:data=
"list"
v-loading=
"loading"
>
<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"
>
{{
`T${scope.row.squad
}
`
}}
<
/template
>
<
/el-table-column
>
...
...
@@ -59,7 +67,7 @@
<
/el-tooltip
>
<
/template
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
link
@
click
=
"dialogToggle"
>
{{
scope
.
row
.
over_visit_num
}}
<
/el-link
>
<
el
-
link
@
click
=
"dialogToggle
('callback')
"
>
{{
scope
.
row
.
over_visit_num
}}
<
/el-link
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"chat_contact_count"
>
...
...
@@ -80,7 +88,7 @@
<
/el-tooltip
>
<
/template
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
link
@
click
=
"dialogToggle"
>
{{
scope
.
row
.
valid_chat_contact_count
}}
<
/el-link
>
<
el
-
link
@
click
=
"dialogToggle
('callback')
"
>
{{
scope
.
row
.
valid_chat_contact_count
}}
<
/el-link
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"valid_phone_counts"
>
...
...
@@ -92,7 +100,7 @@
<
/el-tooltip
>
<
/template
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
link
@
click
=
"dialogToggle"
>
{{
scope
.
row
.
valid_phone_counts
}}
<
/el-link
>
<
el
-
link
@
click
=
"dialogToggle
('callback')
"
>
{{
scope
.
row
.
valid_phone_counts
}}
<
/el-link
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"phone_total_time"
>
...
...
@@ -161,36 +169,95 @@
<
page
:
total
=
"total"
:
limit
=
"limit"
@
pageChange
=
"onPageChange"
@
sizeChange
=
"onSizeChange"
/>
<
team
-
dialog
:
dialog
-
obj
=
"dialogObj"
/>
<
/div
>
<
/template
>
<
script
>
import
page
from
'@framework/page'
import
TeamDialog
from
'./dialog'
import
{
getTeamApi
}
from
'@service/api'
;
import
{
TIP_TEAM
}
from
'@util/tipArr'
;
function
getNowFormatDate
()
{
var
date
=
new
Date
();
var
seperator1
=
"-"
;
var
year
=
date
.
getFullYear
();
//年
var
month
=
date
.
getMonth
()
+
1
;
//月
var
strDate
=
date
.
getDate
();
//日
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"0"
+
month
;
}
if
(
strDate
>=
0
&&
strDate
<=
9
)
{
strDate
=
"0"
+
strDate
;
}
var
currentdate
=
year
+
seperator1
+
month
+
seperator1
+
strDate
;
return
currentdate
;
}
export
default
{
name
:
"index"
,
components
:
{
page
}
,
components
:
{
page
,
TeamDialog
}
,
data
()
{
return
{
TIP_TEAM
:
TIP_TEAM
,
loading
:
true
,
search
:
{
team
:
'1'
team
:
'1'
,
// start_at: getNowFormatDate()
start_at
:
new
Date
(
)
}
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
();
}
,
shortcuts
:
[{
text
:
'今天'
,
onClick
(
picker
)
{
picker
.
$emit
(
'pick'
,
new
Date
());
}
}
,
{
text
:
'昨天'
,
onClick
(
picker
)
{
const
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
-
3600
*
1000
*
24
);
picker
.
$emit
(
'pick'
,
date
);
}
}
,
{
text
:
'一周前'
,
onClick
(
picker
)
{
const
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
-
3600
*
1000
*
24
*
7
);
picker
.
$emit
(
'pick'
,
date
);
}
}
]
}
,
list
:
[],
total
:
0
,
nowPage
:
1
,
limit
:
10
,
dialogObj
:
{
show
:
false
,
type
:
''
,
// callback, class
}
}
}
,
mounted
()
{
this
.
getData
();
}
,
methods
:
{
dialogToggle
()
{
tableRowClassName
({
row
,
rowIndex
}
)
{
if
(
rowIndex
===
0
)
{
return
'primary-row'
;
}
return
''
;
}
,
dialogToggle
(
type
)
{
this
.
dialogObj
=
{
show
:
true
,
type
:
type
}
}
,
getData
()
{
this
.
loading
=
true
;
...
...
@@ -198,8 +265,10 @@
team
:
this
.
search
.
team
}
getTeamApi
(
json
).
then
(
res
=>
{
res
.
team_total
[
1
].
total
=
true
;
// 方便"合计"
res
.
team_list
.
page_data
.
unshift
(
res
.
team_total
[
1
]);
if
(
res
.
team_total
[
1
])
{
res
.
team_total
[
1
].
total
=
true
;
// 方便"合计" 可以这样写,也可以用scope.$index
res
.
team_list
.
page_data
.
unshift
(
res
.
team_total
[
1
]);
}
this
.
list
=
res
.
team_list
.
page_data
;
this
.
total
=
res
.
team_list
.
total
;
this
.
loading
=
false
;
...
...
@@ -224,5 +293,8 @@
font
-
weight
:
normal
;
text
-
decoration
:
underline
;
}
.
primary
-
row
{
background
:
#
f5f7fa
;
}
}
<
/style
>
src/service/api.js
View file @
553f4966
...
...
@@ -1473,3 +1473,11 @@ export const deleteBrokerageApi = function (id) {
export
const
getTeamApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/teacher/teamprofile`
,
json
)
};
// 获取已回访列表
export
const
getVisitedApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/teacher/overvisitlist`
,
json
)
};
// 获取最近开班列表
export
const
getClassOpenedApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/teacher/reachstartclasslist`
,
json
)
};
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