.main
the-title-and-search.the-search(:title='tabTitle' @tabChange='tabChange')
template(#button)
.btn-group.flex.flex-row.flex-start
a-button.btn-i.flex.flex-row.justify-between.align-items-center(
type='primary'
@click="changeBoolean(activeTab === 0?'modalTeacherAdd':'modalStudentAdd',true)" )
b-icon(type='iconjia')
span.pad-left-8 新建
a-button.btn-i.flex.flex-row.justify-between.align-items-center(
type='primary'
ghost
@click='delUser(undefined)'
)
b-icon(type='iconshanchu')
span.pad-left-8 删除
template(#search)
the-search(@getSearch='searchChange')
.table-container
a-table.table(
rowKey='code'
size='middle'
:columns='activeTab === 0 ? columnTeacher : columnStudent'
:data-source='activeTab === 0 ? teacherData : studentData'
:pagination='false'
:loading="loadingUserList"
:row-selection='{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }'
)
template(v-slot:operation='{ text, record }')
.operation.flex.flex-row.justify-between.align-items-center
.btn-link.pointer.btns-link-primary(@click="editUser(record)") 编辑
.btn-column
.btn-link.pointer.btns-link-primary(@click="resetUser(record)") 重置密码
.btn-column
.btn-link.pointer.btns-link-primary(@click='delUser(record.code)') 删除
.page.flex.flex-row.justify-end
a-pagination(
:size='pageConfig.size'
:current='pageConfig.current'
:total='pageConfig.totalSize'
:page-size="pageConfig.pageSize"
:page-size-options='pageConfig.options'
:show-quick-jumper='pageConfig.showJumper'
:showSizeChanger='pageConfig.showSize'
@change='getFetchData'
@showSizeChange='onChangeSize'
)
//- modal
the-edit-student(
key='modalStudentEdit'
:isEdit='true'
:visible='modalEditStudent'
@onSubmit="modalCallback('modalStudentEdit')"
@onCancel="modalCallback('modalStudentEdit')"
)
the-add-student(
key='modalStudentAdd'
:isEdit='false'
:visible='modalAddStudent'
@onSubmit="modalCallback('modalStudentAdd')"
@onCancel="modalCallback('modalStudentAdd')"
)
the-edit-teacher(
key='modalTeacherEdit'
:isEdit='true'
:visible='modalEditTeacher'
@onSubmit="modalCallback('modalTeacherEdit')"
@onCancel="modalCallback('modalTeacherEdit')"
)
the-add-teacher(
key='modalTeacherAdd'
:isEdit='false'
:visible='modalAddTeacher'
@onSubmit="modalCallback('modalTeacherAdd')"
@onCancel="modalCallback('modalTeacherAdd')"
)