Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
892d1d9a
Commit
892d1d9a
authored
Oct 21, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增页面
parent
d60f07c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
381 additions
and
6 deletions
+381
-6
index.js
src/api/school/index.js
+51
-6
sysuser.vue
src/pages/school/sysuser.vue
+325
-0
routes.js
src/router/routes.js
+5
-0
No files found.
src/api/school/index.js
View file @
892d1d9a
...
@@ -165,12 +165,12 @@ export function deleteAssist(data) {
...
@@ -165,12 +165,12 @@ export function deleteAssist(data) {
* @param {AId} data
* @param {AId} data
*/
*/
export
function
reApplyAssist
(
data
)
{
export
function
reApplyAssist
(
data
)
{
return
request
({
return
request
({
url
:
'/user/ReApplyAssist'
,
url
:
'/user/ReApplyAssist'
,
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
}
/**
/**
* 获取班级分页列表
* 获取班级分页列表
...
@@ -300,3 +300,48 @@ export function UpdateStudentIsDisable(data) {
...
@@ -300,3 +300,48 @@ export function UpdateStudentIsDisable(data) {
data
data
})
})
}
}
/**
* 获取管理者分页列表
*/
export
function
queryManagerPage
(
data
)
{
return
request
({
url
:
'/User/GetManagerPageList'
,
method
:
'post'
,
data
})
}
/**
* 新增修改管理者
*/
export
function
saveManager
()
{
return
request
({
url
:
'/User/SetManager'
,
method
:
'post'
,
data
})
}
/**
* 获取管理者信息
*/
export
function
queryManagerInfo
()
{
return
request
({
url
:
'/User/GetManager'
,
method
:
'post'
,
data
})
}
/**
* 获取管理者信息
*/
export
function
deleteManagerInfo
()
{
return
request
({
url
:
'/User/RemoveManager'
,
method
:
'post'
,
data
})
}
src/pages/school/sysuser.vue
0 → 100644
View file @
892d1d9a
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.StuName"
label=
"学员名称"
/>
</div>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.StuTel"
label=
"学员电话"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
clearable
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"schoolTemp"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.Status"
:options=
"AuditOpts"
emit-value
map-options
label=
"状态"
/>
</div>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增学员"
@
click=
"EditStudent(null)"
/>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-right-column-table sticky-tow-column-table"
separator=
"none"
title=
"学员信息"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-StuIcon=
"props"
>
<q-td
auto-width
:props=
"props"
>
<q-avatar
size=
"md"
v-if=
"props.value"
>
<img
:src=
"props.value"
/>
</q-avatar>
<q-avatar
size=
"md"
color=
"teal-10"
text-color=
"white"
v-if=
"!props.value"
>
{{
props
.
row
.
StuName
}}
</q-avatar>
</q-td>
</
template
>
<
template
v-slot:body-cell-StuName=
"props"
>
<q-td
:props=
"props"
>
<div
class=
"text-blue cursor-pointer"
>
{{
props
.
value
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-StuSex=
"props"
>
<q-td
:props=
"props"
>
<q-badge
:color=
"props.value==1?'negative':'primary'"
:label=
"props.value==1?'女':'男'"
/>
</q-td>
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-toggle
disable
size=
"md"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"props.row.Status"
title=
"注意:关闭后,学员将无法正常使用."
/>
<!--@input="DeleteMenu(props.row)"-->
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"min-width:190px;width:100%"
>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-ziyuan"
color=
"warning"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"重置密码"
@
click=
"resetPw(props.row.StuId)"
/>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"删除"
@
click=
"deleteUser(props.row.StuId)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditStudent(props.row)"
/>
</div>
</q-td>
</
template
>
</q-table>
<student-form
v-if=
"isShowStuForm"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshPage"
>
</student-form>
</div>
</div>
</template>
<
script
>
import
{
getStudentPage
,
getSchoolDropdown
,
deleteStudent
}
from
'../../api/school/index'
import
{
resetPassword
}
from
'../../api/users/user.js'
import
studentForm
from
'../../components/school/student/student-form'
export
default
{
meta
:
{
title
:
"学员管理"
},
components
:
{
studentForm
,
},
data
()
{
return
{
currentUrl
:
""
,
columns
:
[{
name
:
'StuIcon'
,
label
:
''
,
field
:
'StuIcon'
,
align
:
'left'
,
},
{
name
:
'StuName'
,
required
:
true
,
label
:
'学员昵称'
,
align
:
'left'
,
field
:
row
=>
row
.
StuName
},
{
name
:
'StuSex'
,
label
:
'性别'
,
field
:
'StuSex'
,
align
:
'left'
},
{
name
:
'StuBirthStr'
,
label
:
'出生日期'
,
field
:
'StuBirthStr'
,
align
:
'left'
},
{
name
:
'StuTel'
,
label
:
'手机号码'
,
field
:
'StuTel'
,
align
:
'left'
},
{
name
:
'SName'
,
label
:
'所属校区'
,
field
:
'SName'
,
align
:
'left'
,
},
{
name
:
'AreaName'
,
label
:
'区域'
,
field
:
'AreaName'
,
align
:
'left'
,
},
{
name
:
'Status'
,
label
:
'状态'
,
field
:
'Status'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'CreateByName'
},
{
name
:
'CreateTimeStr'
,
label
:
'入学时间'
,
align
:
'left'
,
field
:
'CreateTimeStr'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'StuId'
}
],
data
:
[],
loading
:
true
,
AuditOpts
:
[{
label
:
'全部'
,
value
:
'-1'
},
{
label
:
'正常'
,
value
:
'0'
},
{
label
:
'禁用'
,
value
:
'1'
},
],
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
StuName
:
""
,
StuTel
:
""
,
Status
:
"-1"
,
School_Id
:
0
},
schoolTemp
:
""
,
pageCount
:
0
,
stuOption
:
null
,
schoolList
:
[],
isShowStuForm
:
false
,
resetLoading
:
false
}
},
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
this
.
getSchool
()
this
.
getStudent
()
},
methods
:
{
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
if
(
this
.
schoolTemp
)
{
this
.
msg
.
School_Id
=
this
.
schoolTemp
.
SId
}
else
{
this
.
msg
.
School_Id
=
0
}
this
.
getStudent
()
},
resetPw
(
id
)
{
let
that
=
this
this
.
$q
.
dialog
({
title
:
"重置密码"
,
message
:
"你正在进行重置密码行为,是否确认执行"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认重置"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
that
.
resetLoading
=
true
resetPassword
({
AccountType
:
4
,
AccountId
:
id
}).
then
(
res
=>
{
that
.
resetLoading
=
false
that
.
$q
.
dialog
({
title
:
"密码重置成功"
,
message
:
res
.
Message
,
persistent
:
true
,
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
})
}).
catch
(()
=>
{
that
.
resetLoading
=
false
});
});
},
deleteUser
(
id
)
{
let
that
=
this
this
.
$q
.
dialog
({
title
:
"删除学员"
,
message
:
"你正在进行删除学员行为,一旦执行无法找回,是否确认执行?"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
that
.
resetLoading
=
true
deleteStudent
({
StuId
:
id
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据删除成功!'
,
position
:
'top'
})
this
.
getStudent
()
})
});
},
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getStudent
();
},
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
;
})
},
getStudent
()
{
this
.
loading
=
true
;
getStudentPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
refreshPage
()
{
if
(
!
this
.
stuOption
)
{
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
StuName
=
""
;
this
.
msg
.
StuTel
=
""
;
this
.
msg
.
Status
=
"-1"
;
this
.
msg
.
School_Id
=
0
;
}
this
.
getStudent
()
},
EditStudent
(
obj
)
{
if
(
obj
)
{
this
.
stuOption
=
obj
;
}
else
{
this
.
stuOption
=
null
;
}
this
.
isShowStuForm
=
true
;
},
closeStuForm
()
{
this
.
isShowStuForm
=
false
;
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass');
</
style
>
src/router/routes.js
View file @
892d1d9a
...
@@ -42,6 +42,11 @@ const routes = [{
...
@@ -42,6 +42,11 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"pages/school/student.vue"
)
import
(
"pages/school/student.vue"
)
},
},
{
path
:
"/school/sysuser"
,
//后台用户管理
component
:
()
=>
import
(
"pages/school/sysuser.vue"
)
},
{
{
path
:
"/system/menu"
,
//菜单管理
path
:
"/system/menu"
,
//菜单管理
component
:
()
=>
component
:
()
=>
...
...
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