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
b8486857
Commit
b8486857
authored
Nov 30, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
班级列表老师加用户数,用户老师数
parent
e91cbf62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
userList.vue
src/components/class/userList.vue
+31
-2
api.js
src/service/api.js
+5
-0
No files found.
src/components/class/userList.vue
View file @
b8486857
...
...
@@ -107,6 +107,14 @@
<span>
{{
scope2
.
row
.
transform_rate
|
percent
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"老师主动添加用户数"
prop=
"teacher_add_user_num"
>
</el-table-column>
<el-table-column
label=
"用户主动添加老师数"
prop=
"user_add_teacher_num"
>
</el-table-column>
</el-table>
<el-table
:data=
"userTable"
...
...
@@ -412,7 +420,7 @@
<
/template
>
<
script
>
import
{
addClassUesrApi
,
getClassUserApi
,
changeUserApi
,
delClassUserApi
,
getUserListApi
,
addPeriodsClassUserDescApi
,
getClassStatisticsApi
,
userLookApi
,
getPeriodsApi
,
changeClassApi
,
getClassListApi
,
addUserTeacherApi
,
getUserDescListApi
,
updateUserPrivilegeApi
,
teacherBindUserApi
}
from
"../../service/api"
;
import
{
addClassUesrApi
,
getClassUserApi
,
changeUserApi
,
delClassUserApi
,
getUserListApi
,
addPeriodsClassUserDescApi
,
getClassStatisticsApi
,
userLookApi
,
getPeriodsApi
,
changeClassApi
,
getClassListApi
,
addUserTeacherApi
,
getUserDescListApi
,
updateUserPrivilegeApi
,
teacherBindUserApi
,
getJoinNumApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
page2
from
'../framework/page'
import
pageDesc
from
'../framework/page'
...
...
@@ -436,6 +444,8 @@
transform_rate
:
0
,
watch_course_rate
:
0
,
work_rate
:
0
,
teacher_add_user_num
:
0
,
user_add_teacher_num
:
0
}
,
lookDetail
:{
show
:
false
,
...
...
@@ -629,7 +639,24 @@
json
.
is_view_course
=
this
.
searchFrom
.
is_view_course
}
getClassStatisticsApi
(
this
.
userObj
.
periods_id
,
this
.
userObj
.
classId
,
json2
).
then
(
res
=>
{
this
.
statistics
=
res
this
.
statistics
.
arrive_course_rate
=
res
.
arrive_course_rate
;
this
.
statistics
.
clock_rate
=
res
.
clock_rate
;
this
.
statistics
.
over_clock_rate
=
res
.
over_clock_rate
;
this
.
statistics
.
over_course_rate
=
res
.
over_course_rate
;
this
.
statistics
.
over_work_rate
=
res
.
over_work_rate
;
this
.
statistics
.
transform_rate
=
res
.
transform_rate
;
this
.
statistics
.
watch_course_rate
=
res
.
watch_course_rate
;
this
.
statistics
.
work_rate
=
res
.
work_rate
;
}
);
getJoinNumApi
(
this
.
userObj
.
classId
).
then
(
res
=>
{
let
_list
=
res
||
[];
_list
.
forEach
((
_data
)
=>
{
if
(
_data
.
is_add_teacher
===
1
){
this
.
statistics
.
teacher_add_user_num
=
_data
.
num
}
else
if
(
_data
.
is_add_teacher
===
2
)
{
this
.
statistics
.
user_add_teacher_num
=
_data
.
num
}
}
)
}
);
getClassUserApi
(
this
.
userObj
.
classId
,
json
).
then
(
res
=>
{
this
.
userTable
=
res
.
list
...
...
@@ -661,6 +688,8 @@
transform_rate
:
0
,
watch_course_rate
:
0
,
work_rate
:
0
,
teacher_add_user_num
:
0
,
user_add_teacher_num
:
0
}
;
this
.
searchList
()
}
,
...
...
src/service/api.js
View file @
b8486857
...
...
@@ -744,3 +744,8 @@ const teacherBindUserUrl = 'api/admin/teacher/bind';
export
const
teacherBindUserApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
teacherBindUserUrl
}
/
${
id
}
`
,
json
)
};
// 获取老师加用户数,用户老师数
const
getJoinNumUrl
=
'api/admin/class/teacher/group/num/'
;
export
const
getJoinNumApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getJoinNumUrl
}${
id
}
`
)
};
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