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
e91cbf62
Commit
e91cbf62
authored
Nov 30, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
老师绑定用户
parent
fcefa862
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
17 deletions
+42
-17
index.vue
src/components/class/index.vue
+2
-1
userList.vue
src/components/class/userList.vue
+26
-12
index.vue
src/components/order/index.vue
+1
-1
index.vue
src/components/putForward/index.vue
+2
-1
index.vue
src/components/teacherDetail/index.vue
+3
-1
index.vue
src/components/userDetail/index.vue
+3
-1
api.js
src/service/api.js
+5
-0
No files found.
src/components/class/index.vue
View file @
e91cbf62
...
...
@@ -287,7 +287,8 @@
periods_id
:
data
.
periods_id
,
show
:
true
,
goods_id
:
this
.
goods_id
,
title
:
`
${
data
.
teacher_name
}
班级用户列表`
title
:
`
${
data
.
teacher_name
}
班级用户列表`
,
teacherId
:
data
.
teacher_id
}
},
getTeacher
(){
...
...
src/components/class/userList.vue
View file @
e91cbf62
...
...
@@ -51,7 +51,8 @@
<el-form-item>
<el-button
type=
"primary"
@
click=
"searchList"
>
搜索
</el-button>
<el-button
type=
"success"
@
click=
"changeClass"
v-if=
"!$store.state.readonly"
>
切换班级
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser"
v-if=
"!$store.state.readonly"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(false)"
v-if=
"!$store.state.readonly"
>
+添加用户
</el-button>
<el-button
type=
"success"
@
click=
"onAddUser(true)"
v-if=
"!$store.state.readonly"
>
老师绑定用户
</el-button>
</el-form-item>
</el-form>
<el-table
...
...
@@ -411,7 +412,7 @@
<
/template
>
<
script
>
import
{
addClassUesrApi
,
getClassUserApi
,
changeUserApi
,
delClassUserApi
,
getUserListApi
,
addPeriodsClassUserDescApi
,
getClassStatisticsApi
,
userLookApi
,
getPeriodsApi
,
changeClassApi
,
getClassListApi
,
addUserTeacherApi
,
getUserDescListApi
,
updateUserPrivilegeApi
}
from
"../../service/api"
;
import
{
addClassUesrApi
,
getClassUserApi
,
changeUserApi
,
delClassUserApi
,
getUserListApi
,
addPeriodsClassUserDescApi
,
getClassStatisticsApi
,
userLookApi
,
getPeriodsApi
,
changeClassApi
,
getClassListApi
,
addUserTeacherApi
,
getUserDescListApi
,
updateUserPrivilegeApi
,
teacherBindUserApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
page2
from
'../framework/page'
import
pageDesc
from
'../framework/page'
...
...
@@ -495,7 +496,8 @@
label
:
'用户主动添加老师'
,
value
:
2
}
]
],
isBindUser
:
false
}
}
,
components
:{
...
...
@@ -728,6 +730,7 @@
if
(
!
this
.
addId
)
{
return
}
if
(
!
this
.
isBindUser
)
{
addClassUesrApi
(
this
.
userObj
.
classId
,
this
.
addId
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
...
...
@@ -736,8 +739,19 @@
this
.
addShow
=
false
;
this
.
initPage
()
}
)
}
else
{
teacherBindUserApi
(
this
.
userObj
.
teacherId
,
{
user_id
:
this
.
addId
}
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'绑定成功!'
}
);
this
.
addShow
=
false
;
}
)
}
}
,
onAddUser
(){
onAddUser
(
flag
){
this
.
isBindUser
=
flag
;
this
.
addShow
=
true
;
this
.
getUser
();
}
,
...
...
src/components/order/index.vue
View file @
e91cbf62
...
...
@@ -267,7 +267,7 @@
filterable
remote
clearable
placeholder=
"请输入名称
或者手机号
"
placeholder=
"请输入名称"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
...
...
src/components/putForward/index.vue
View file @
e91cbf62
...
...
@@ -477,6 +477,7 @@
}
getUserListApi
(
json
).
then
(
res
=>
{
this
.
userList
=
res
.
list
;
this
.
userDialog
.
total
=
res
.
total
;
})
},
confirmPutForward
(){
...
...
@@ -511,7 +512,7 @@
},
onUserPageChange
(
val
){
this
.
userDialog
.
nowPage
=
val
this
.
getUser
()
this
.
getUser
List
()
},
onUserSizeChange
(
val
){
this
.
userDialog
.
limit
=
val
...
...
src/components/teacherDetail/index.vue
View file @
e91cbf62
...
...
@@ -182,7 +182,9 @@ import chooseGoodDialog from './chooseGoodDialog'
this
.
userObj
=
{
classId
:
data
.
id
,
show
:
true
,
title
:
`
${
this
.
detail
.
name
}
班级用户列表`
title
:
`
${
this
.
detail
.
name
}
班级用户列表`
,
teacherId
:
data
.
teacher_id
,
periods_id
:
data
.
periods_id
}
},
onPageChange
(
val
){
...
...
src/components/userDetail/index.vue
View file @
e91cbf62
...
...
@@ -409,7 +409,9 @@
this
.
userObj
=
{
classId
:
data
.
class_id
,
show
:
true
,
title
:
`
${
data
.
teacher_name
}
班级用户列表`
title
:
`
${
data
.
teacher_name
}
班级用户列表`
,
teacherId
:
data
.
teacher_id
,
periods_id
:
data
.
periods_id
}
}
},
...
...
src/service/api.js
View file @
e91cbf62
...
...
@@ -739,3 +739,8 @@ const getTeacherDayRankListUrl = 'api/admin/teacher/performance/day';
export
const
getTeacherDayRankListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getTeacherDayRankListUrl
}
`
,
json
)
};
// 老师绑定用户
const
teacherBindUserUrl
=
'api/admin/teacher/bind'
;
export
const
teacherBindUserApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
teacherBindUserUrl
}
/
${
id
}
`
,
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