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
4a29064f
Commit
4a29064f
authored
Oct 20, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
32f66037
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
390 additions
and
379 deletions
+390
-379
teacher.vue
src/pages/school/teacher.vue
+390
-379
No files found.
src/pages/school/teacher.vue
View file @
4a29064f
<
template
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<div
class=
"col-3"
>
<q-input
@
change=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.TeacherName"
label=
"教师名称"
/>
<q-input
@
change=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.TeacherName"
</div>
label=
"教师名称"
/>
<div
class=
"col-3"
>
<!--
<q-input
@
change=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.TeacherTel"
label=
"教师电话"
/>
-->
<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.IsShow"
:options=
"ShowOpts"
emit-value
map-options
label=
"显示状态"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.AuditStatus"
:options=
"AuditOpts"
emit-value
map-options
label=
"审核状态"
/>
</div>
</div>
</div>
<div
class=
"page-option"
>
<div
class=
"col-3"
>
<!-- 原则上不能操作过三个按钮,建议不要使用查询按钮,增加用户操作次数 -->
<q-select
@
input=
"resetSearch"
clearable
filled
stack-label
option-value=
"SId"
option-label=
"SName"
<!--
<q-btn
color=
"primary"
outline
label=
"立即查询"
/>
-->
v-model=
"schoolTemp"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增教师"
@
click=
"addObj(null)"
/>
<q-btn-dropdown
outline
color=
"dark"
label=
"更多"
>
<q-list>
<q-item
clickable
v-close-popup
>
<q-item-section>
<q-item-label>
批量导入
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
>
<q-item-section>
<q-item-label>
批量导出
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.IsShow"
:options=
"ShowOpts"
emit-value
map-options
label=
"显示状态"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.AuditStatus"
:options=
"AuditOpts"
emit-value
map-options
label=
"审核状态"
/>
</div>
</div>
<div
class=
"page-option"
>
<!-- 原则上不能操作过三个按钮,建议不要使用查询按钮,增加用户操作次数 -->
<!--
<q-btn
color=
"primary"
outline
label=
"立即查询"
/>
-->
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增教师"
@
click=
"addObj(null)"
/>
<q-btn-dropdown
outline
color=
"dark"
label=
"更多"
>
<q-list>
<q-item
clickable
v-close-popup
>
<q-item-section>
<q-item-label>
批量导入
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
>
<q-item-section>
<q-item-label>
批量导出
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</div>
</div>
<div
class=
"page-content"
>
<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"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
<template
v-slot:body-cell-IsShow=
"props"
>
class=
"sticky-right-column-table sticky-tow-column-table"
separator=
"none"
title=
"教师信息"
:data=
"data"
<q-td
:props=
"props"
>
:columns=
"columns"
row-key=
"name"
>
<q-badge
:color=
"props.value==0?'negative':'primary'"
:label=
"props.value==0?'隐藏':'显示'"
/>
<template
v-slot:body-cell-IsShow=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<q-badge
:color=
"props.value==0?'negative':'primary'"
:label=
"props.value==0?'隐藏':'显示'"
/>
<
template
v-slot:body-cell-TeacherIcon=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<q-avatar
size=
"md"
>
<
template
v-slot:body-cell-TeacherIcon=
"props"
>
<img
:src=
"props.value"
/>
<q-td
:props=
"props"
>
</q-avatar>
<q-avatar
size=
"md"
>
</q-td>
<img
:src=
"props.value"
/>
</
template
>
</q-avatar>
<
template
v-slot:body-cell-TeacherName=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<div
class=
"text-blue cursor-pointer"
>
{{
props
.
value
}}
</div>
<
template
v-slot:body-cell-TeacherName=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<div
class=
"text-blue cursor-pointer"
>
{{
props
.
value
}}
</div>
<
template
v-slot:body-cell-IsRecommend=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<q-icon
v-if=
"props==1"
name=
"iconfont icon-good"
color=
"negative"
size=
"16px"
/>
<
template
v-slot:body-cell-IsRecommend=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<q-badge
:color=
"props.value==0?'negative':'primary'"
:label=
"props.value==0?'不推荐':'推荐'"
/>
<
template
v-slot:body-cell-TeachTag=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<q-badge
v-for=
"(x, i) in JSON.parse(props.value)"
:key=
"i"
color=
"red"
:label=
"x"
class=
"q-mr-xs"
/>
<
template
v-slot:body-cell-TeachTag=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<q-badge
v-for=
"(x, i) in JSON.parse(props.value)"
:key=
"i"
color=
"red"
:label=
"x"
class=
"q-mr-xs"
/>
<
template
v-slot:body-cell-AuditStatus=
"props"
>
</q-td>
<q-td
:props=
"props"
>
</
template
>
<q-badge
v-if=
"props.value==1"
color=
"dark"
label=
"审核中"
/>
<
template
v-slot:body-cell-AuditStatus=
"props"
>
<div
v-if=
"props.value==3"
>
<q-td
:props=
"props"
>
<q-badge
color=
"warning"
class=
"cursor-pointer"
label=
"审核不通过"
/>
<q-badge
v-if=
"props.value==1"
color=
"dark"
label=
"审核中"
/>
<q-popup-proxy>
<div
v-if=
"props.value==3"
>
<q-banner
class=
"bg-dark text-white"
>
<q-badge
color=
"warning"
class=
"cursor-pointer"
label=
"审核不通过"
/>
{{
props
.
row
.
AuditRemark
}}
<q-popup-proxy>
</q-banner>
<q-banner
class=
"bg-dark text-white"
>
</q-popup-proxy>
{{
props
.
row
.
AuditRemark
}}
</div>
</q-banner>
<div
v-if=
"props.value==2"
>
</q-popup-proxy>
<q-badge
v-if=
"props.value==2"
class=
"cursor-pointer"
color=
"primary"
label=
"审核通过"
/>
</div>
<q-popup-proxy>
<div
v-if=
"props.value==2"
>
<q-banner
class=
"bg-dark text-white"
>
<q-badge
v-if=
"props.value==2"
class=
"cursor-pointer"
color=
"primary"
label=
"审核通过"
/>
{{
props
.
row
.
AuditRemark
}}
<q-popup-proxy>
</q-banner>
<q-banner
class=
"bg-dark text-white"
>
</q-popup-proxy>
{{
props
.
row
.
AuditRemark
}}
</div>
</q-banner>
</q-popup-proxy>
</q-td>
</div>
</
template
>
</q-td>
<
template
v-slot:bottom
>
</
template
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
<
template
v-slot:bottom
>
</
template
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
<
template
v-slot:body-cell-optioned=
"props"
>
:input=
"true"
@
input=
"changePage"
/>
<q-td
:props=
"props"
>
</
template
>
<div
style=
"min-width:190px;width:100%"
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-btn
v-if=
"props.row.AuditStatus==1"
flat
size=
"xs"
icon=
"iconfont icon-shenhe"
color=
"info"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"审核"
@
click=
"showExamine(props.row)"
/>
<q-td
:props=
"props"
>
<q-btn
v-if=
"props.row.AuditStatus==2"
flat
size=
"xs"
icon=
"iconfont icon-ziyuan"
color=
"warning"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"重置密码"
@
click=
"resetPw(props.row.TId)"
/>
<div
style=
"min-width:190px;width:100%"
>
<q-btn
v-if=
"props.row.AuditStatus==3"
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"删除"
@
click=
"deleteUser(props.row.TId)"
/>
<q-btn
v-if=
"props.row.AuditStatus==1"
flat
size=
"xs"
icon=
"iconfont icon-shenhe"
color=
"info"
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"addObj(props.row)"
/>
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"审核"
@
click=
"showExamine(props.row)"
/>
</div>
<q-btn
v-if=
"props.row.AuditStatus==2"
flat
size=
"xs"
icon=
"iconfont icon-ziyuan"
color=
"warning"
</q-td>
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"重置密码"
@
click=
"resetPw(props.row.TId)"
/>
</
template
>
<q-btn
v-if=
"props.row.AuditStatus==3"
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
color=
"negative"
</q-table>
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"删除"
@
click=
"deleteUser(props.row.TId)"
/>
<teacher-form
v-if=
"persistent"
:save-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"addAfterQuery"
></teacher-form>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
<teacher-shenhe
v-if=
"persistentExamine"
:show-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"addAfterQuery"
></teacher-shenhe>
@
click=
"addObj(props.row)"
/>
</div>
</q-td>
</
template
>
</q-table>
<teacher-form
v-if=
"persistent"
:save-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"addAfterQuery"
>
</teacher-form>
<teacher-shenhe
v-if=
"persistentExamine"
:show-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"addAfterQuery"
>
</teacher-shenhe>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getTeacherPage
,
getTeacherPage
,
getSchoolDropdown
,
getSchoolDropdown
,
deleteTeacher
deleteTeacher
}
from
'../../api/school/index'
}
from
'../../api/school/index'
import
{
import
{
resetPassword
resetPassword
}
from
'../../api/users/user.js'
}
from
'../../api/users/user.js'
import
teacherForm
from
'../../components/school/teacher/teacher-form'
import
teacherForm
from
'../../components/school/teacher/teacher-form'
import
teacherShenhe
from
'../../components/school/teacher/teacher-shenhe'
import
teacherShenhe
from
'../../components/school/teacher/teacher-shenhe'
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
"教师管理"
title
:
"教师管理"
},
},
components
:
{
components
:
{
teacherForm
,
teacherForm
,
teacherShenhe
teacherShenhe
},
},
data
()
{
data
()
{
return
{
return
{
currentUrl
:
""
,
currentUrl
:
""
,
columns
:
[{
columns
:
[{
name
:
'TeacherIcon'
,
name
:
'TeacherIcon'
,
label
:
''
,
label
:
''
,
field
:
'TeacherIcon'
,
field
:
'TeacherIcon'
,
align
:
'left'
,
align
:
'left'
,
},
},
{
{
name
:
'TeacherName'
,
name
:
'TeacherName'
,
required
:
true
,
required
:
true
,
label
:
'教师名称'
,
label
:
'教师名称'
,
align
:
'left'
,
align
:
'left'
,
field
:
row
=>
row
.
TeacherName
field
:
row
=>
row
.
TeacherName
},
},
{
{
name
:
'TeacherTel'
,
name
:
'TeacherTel'
,
label
:
'教师电话'
,
label
:
'教师电话'
,
field
:
'TeacherTel'
,
field
:
'TeacherTel'
,
align
:
'left'
align
:
'left'
},
},
{
{
name
:
'TeachTag'
,
name
:
'TeachTag'
,
label
:
'标签'
,
label
:
'标签'
,
field
:
'TeachTag'
,
field
:
'TeachTag'
,
align
:
'left'
align
:
'left'
},
},
{
{
name
:
'SName'
,
name
:
'SName'
,
label
:
'所属校区'
,
label
:
'所属校区'
,
field
:
'SName'
,
field
:
'SName'
,
align
:
'left'
,
align
:
'left'
,
},
},
{
{
name
:
'AuditStatus'
,
name
:
'AuditStatus'
,
label
:
'审核状态'
,
label
:
'审核状态'
,
align
:
'left'
,
align
:
'left'
,
field
:
'AuditStatus'
field
:
'AuditStatus'
},
},
{
{
name
:
'IsShow'
,
name
:
'IsShow'
,
label
:
'是否显示'
,
label
:
'是否显示'
,
align
:
'left'
,
align
:
'left'
,
field
:
'IsShow'
field
:
'IsShow'
},
},
{
{
name
:
'IsRecommend'
,
name
:
'IsRecommend'
,
label
:
'是否推荐'
,
label
:
'是否推荐'
,
align
:
'left'
,
align
:
'left'
,
field
:
'IsRecommend'
field
:
'IsRecommend'
},
},
{
{
name
:
'CourseCount'
,
name
:
'CourseCount'
,
label
:
'课程数量'
,
label
:
'课程数量'
,
align
:
'left'
,
align
:
'left'
,
field
:
'CourseCount'
field
:
'CourseCount'
},
},
{
{
name
:
'OnlineClassCount'
,
name
:
'OnlineClassCount'
,
label
:
'网课产品'
,
label
:
'网课产品'
,
align
:
'left'
,
align
:
'left'
,
field
:
'OnlineClassCount'
field
:
'OnlineClassCount'
},
},
{
{
name
:
'OnlineOrderCount'
,
name
:
'OnlineOrderCount'
,
label
:
'网课订单'
,
label
:
'网课订单'
,
align
:
'left'
,
align
:
'left'
,
field
:
'OnlineOrderCount'
field
:
'OnlineOrderCount'
},
},
{
{
name
:
'CreateTimeStr'
,
name
:
'CreateTimeStr'
,
label
:
'入职时间'
,
label
:
'入职时间'
,
align
:
'left'
,
align
:
'left'
,
field
:
'CreateTimeStr'
field
:
'CreateTimeStr'
},
},
{
{
name
:
'optioned'
,
name
:
'optioned'
,
label
:
'操作'
,
label
:
'操作'
,
field
:
'TId'
field
:
'TId'
}
}
],
],
data
:
[],
data
:
[],
loading
:
true
,
loading
:
true
,
ShowOpts
:
[{
ShowOpts
:
[{
label
:
'全部'
,
label
:
'全部'
,
value
:
'-1'
value
:
'-1'
},
},
{
{
label
:
'隐藏'
,
label
:
'隐藏'
,
value
:
'0'
value
:
'0'
},
},
{
{
label
:
'显示'
,
label
:
'显示'
,
value
:
'1'
value
:
'1'
}
}
],
],
AuditOpts
:
[{
AuditOpts
:
[{
label
:
'全部'
,
label
:
'全部'
,
value
:
'-1'
value
:
'-1'
},
},
{
{
label
:
'审核中'
,
label
:
'审核中'
,
value
:
'1'
value
:
'1'
},
},
{
{
label
:
'审核通过'
,
label
:
'审核通过'
,
value
:
'2'
value
:
'2'
},
},
{
{
label
:
'审核不通过'
,
label
:
'审核不通过'
,
value
:
'3'
value
:
'3'
}
}
],
],
msg
:
{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
12
,
pageSize
:
12
,
rowsPerPage
:
12
,
rowsPerPage
:
12
,
TeacherName
:
""
,
TeacherName
:
""
,
TeacherTel
:
""
,
TeacherTel
:
""
,
AuditStatus
:
"-1"
,
AuditStatus
:
"-1"
,
IsShow
:
"-1"
,
IsShow
:
"-1"
,
School_Id
:
0
School_Id
:
0
},
},
pageCount
:
0
,
pageCount
:
0
,
persistent
:
false
,
persistent
:
false
,
objOption
:
null
,
objOption
:
null
,
schoolList
:
[],
schoolList
:
[],
schoolTemp
:
null
,
schoolTemp
:
null
,
persistentExamine
:
false
,
persistentExamine
:
false
,
resetLoading
:
false
resetLoading
:
false
}
}
},
},
mounted
()
{
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
this
.
currentUrl
=
this
.
$route
.
path
this
.
getSchool
()
this
.
getSchool
()
this
.
getTeacher
()
this
.
getTeacher
()
},
},
methods
:
{
methods
:
{
resetSearch
()
{
resetSearch
()
{
this
.
pageIndex
=
1
this
.
msg
.
pageIndex
=
1
//this.pageCount = 0
this
.
loading
=
true
this
.
loading
=
true
if
(
this
.
schoolTemp
)
{
if
(
this
.
schoolTemp
)
{
this
.
msg
.
School_Id
=
this
.
schoolTemp
.
SId
this
.
msg
.
School_Id
=
this
.
schoolTemp
.
SId
}
else
{
}
else
{
this
.
msg
.
School_Id
=
0
this
.
msg
.
School_Id
=
0
}
}
this
.
getTeacher
()
this
.
getTeacher
()
},
},
resetPw
(
id
)
{
resetPw
(
id
)
{
let
that
=
this
let
that
=
this
this
.
$q
.
dialog
({
this
.
$q
.
dialog
({
title
:
"重置密码"
,
title
:
"重置密码"
,
message
:
"你正在进行重置密码行为,是否确认执行"
,
message
:
"你正在进行重置密码行为,是否确认执行"
,
persistent
:
true
,
persistent
:
true
,
cancel
:
{
cancel
:
{
label
:
"取消"
,
label
:
"取消"
,
flat
:
true
flat
:
true
},
},
ok
:
{
ok
:
{
label
:
"确认重置"
,
label
:
"确认重置"
,
flat
:
true
,
flat
:
true
,
focus
:
true
focus
:
true
}
}
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
that
.
resetLoading
=
true
that
.
resetLoading
=
true
resetPassword
({
resetPassword
({
AccountType
:
2
,
AccountType
:
2
,
AccountId
:
id
AccountId
:
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
that
.
resetLoading
=
false
that
.
resetLoading
=
false
that
.
$q
.
dialog
({
that
.
$q
.
dialog
({
title
:
"密码重置成功"
,
title
:
"密码重置成功"
,
message
:
res
.
Message
,
message
:
res
.
Message
,
persistent
:
true
,
persistent
:
true
,
ok
:
{
ok
:
{
label
:
"确认"
,
label
:
"确认"
,
flat
:
true
,
flat
:
true
,
focus
:
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
deleteTeacher
({
TId
:
id
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据删除成功!'
,
position
:
'top'
})
this
.
getTeacher
()
})
});
},
changePage
(
val
)
{
this
.
msg
.
Status
=
this
.
StatusTemp
?
this
.
StatusTemp
.
value
:
'-1'
this
.
msg
.
pageIndex
=
1
this
.
loading
=
true
this
.
getTeacher
()
},
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
if
(
this
.
msg
.
School_Id
!=
0
)
{
this
.
schoolTemp
=
this
.
schoolList
.
filter
(
x
=>
{
if
(
this
.
objOption
.
School_Id
==
x
.
SId
)
{
return
x
}
})[
0
]
}
})
})
},
}).
catch
(()
=>
{
getTeacher
()
{
that
.
resetLoading
=
false
getTeacherPage
(
this
.
msg
).
then
(
res
=>
{
});
this
.
loading
=
false
});
this
.
data
=
res
.
Data
.
PageData
},
this
.
pageCount
=
res
.
Data
.
PageCount
deleteUser
(
id
)
{
}).
catch
(()
=>
{
let
that
=
this
this
.
loading
=
false
this
.
$q
.
dialog
({
title
:
"删除教师"
,
message
:
"你正在进行删除教师行为,一旦执行无法找回,是否确认执行?"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
that
.
resetLoading
=
true
deleteTeacher
({
TId
:
id
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据删除成功!'
,
position
:
'top'
})
})
},
addAfterQuery
()
{
if
(
!
this
.
objOption
)
{
this
.
msg
=
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
TeacherName
:
""
,
TeacherTel
:
""
,
AuditStatus
:
"-1"
,
IsShow
:
"-1"
}
}
this
.
getTeacher
()
this
.
getTeacher
()
},
})
addObj
(
obj
)
{
});
if
(
obj
)
{
},
this
.
objOption
=
obj
changePage
(
val
)
{
}
else
{
this
.
msg
.
Status
=
this
.
StatusTemp
?
this
.
StatusTemp
.
value
:
'-1'
this
.
objOption
=
null
this
.
msg
.
pageIndex
=
val
;
}
this
.
loading
=
true
;
this
.
persistent
=
true
this
.
getTeacher
();
},
},
showExamine
(
obj
)
{
getSchool
()
{
this
.
objOption
=
obj
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
persistentExamine
=
true
this
.
schoolList
=
res
.
Data
},
if
(
this
.
msg
.
School_Id
!=
0
)
{
closeSaveForm
()
{
this
.
schoolTemp
=
this
.
schoolList
.
filter
(
x
=>
{
this
.
persistent
=
false
if
(
this
.
objOption
.
School_Id
==
x
.
SId
)
{
this
.
persistentExamine
=
false
return
x
}
})[
0
]
}
})
},
getTeacher
()
{
getTeacherPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
addAfterQuery
()
{
if
(
!
this
.
objOption
)
{
this
.
msg
=
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
TeacherName
:
""
,
TeacherTel
:
""
,
AuditStatus
:
"-1"
,
IsShow
:
"-1"
}
}
}
this
.
getTeacher
()
},
addObj
(
obj
)
{
if
(
obj
)
{
this
.
objOption
=
obj
}
else
{
this
.
objOption
=
null
}
this
.
persistent
=
true
},
showExamine
(
obj
)
{
this
.
objOption
=
obj
this
.
persistentExamine
=
true
},
closeSaveForm
()
{
this
.
persistent
=
false
this
.
persistentExamine
=
false
}
},
},
}
}
</
script
>
</
script
>
<
style
lang=
"sass"
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass');
@import
url('~assets/css/table.sass');
</
style
>
</
style
>
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