|
|
|
@ -34,10 +34,11 @@ const params = ref({ |
|
|
|
|
//获取学生 |
|
|
|
|
const getData = async () => { |
|
|
|
|
loading.value = true |
|
|
|
|
console.log(params.value, 'params') |
|
|
|
|
|
|
|
|
|
await stuPageService(params.value).then((res) => { |
|
|
|
|
tableData.value = res.data.Records |
|
|
|
|
total.value = res.data.totalCount |
|
|
|
|
console.log(tableData.value, 'params') |
|
|
|
|
loading.value = false |
|
|
|
|
// console.log(res.data.totalCount, 'res.data') |
|
|
|
|
isFirstLoad.value = false |
|
|
|
@ -237,160 +238,153 @@ onMounted(() => { |
|
|
|
|
}) |
|
|
|
|
</script> |
|
|
|
|
<template> |
|
|
|
|
<page-container title="文章分类"> |
|
|
|
|
<el-card class="page-container"> |
|
|
|
|
<template #header> |
|
|
|
|
<div class="card-header"> |
|
|
|
|
<span>学生信息</span> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="onResetPass">重置密码</el-button> |
|
|
|
|
<el-button type="danger" @click="onDel">批量删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
<el-card class="page-container"> |
|
|
|
|
<template #header> |
|
|
|
|
<div class="card-header"> |
|
|
|
|
<span>学生信息</span> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="onResetPass">重置密码</el-button> |
|
|
|
|
<el-button type="danger" @click="onDel">批量删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<div class="content"> |
|
|
|
|
<el-form style="display: flex"> |
|
|
|
|
<el-form-item style="width: 250px"> |
|
|
|
|
<el-input |
|
|
|
|
class="input_search" |
|
|
|
|
v-model="studentId" |
|
|
|
|
@focus="onFocus" |
|
|
|
|
placeholder="输入学号进行搜索" |
|
|
|
|
></el-input> |
|
|
|
|
<el-icon |
|
|
|
|
color="gray" |
|
|
|
|
:size="12" |
|
|
|
|
style="margin-right: 20px" |
|
|
|
|
@click="clearIdinput" |
|
|
|
|
v-if="show" |
|
|
|
|
> |
|
|
|
|
<CircleClose /> |
|
|
|
|
</el-icon> |
|
|
|
|
<el-icon><Search /></el-icon> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button class="btn_search" @click="searchNumber">搜索</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<div class="content"> |
|
|
|
|
<el-form style="display: flex"> |
|
|
|
|
<el-form-item style="width: 250px"> |
|
|
|
|
<el-input |
|
|
|
|
class="input_search" |
|
|
|
|
v-model="studentId" |
|
|
|
|
@focus="onFocus" |
|
|
|
|
placeholder="输入学号进行搜索" |
|
|
|
|
></el-input> |
|
|
|
|
<el-icon |
|
|
|
|
color="gray" |
|
|
|
|
:size="12" |
|
|
|
|
style="margin-right: 20px" |
|
|
|
|
@click="clearIdinput" |
|
|
|
|
v-if="show" |
|
|
|
|
> |
|
|
|
|
<CircleClose /> |
|
|
|
|
</el-icon> |
|
|
|
|
<el-icon><Search /></el-icon> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button class="btn_search" @click="searchNumber">搜索</el-button> |
|
|
|
|
|
|
|
|
|
<el-form-item style="width: 250px; margin-left: 30px"> |
|
|
|
|
<el-input |
|
|
|
|
class="input_search" |
|
|
|
|
v-model="studentName" |
|
|
|
|
@focus="onFocus1" |
|
|
|
|
placeholder="输入姓名进行搜索" |
|
|
|
|
></el-input> |
|
|
|
|
<el-icon |
|
|
|
|
color="gray" |
|
|
|
|
:size="12" |
|
|
|
|
style="margin-right: 20px" |
|
|
|
|
v-if="show1" |
|
|
|
|
@click="closeName" |
|
|
|
|
> |
|
|
|
|
<CircleClose /> |
|
|
|
|
</el-icon> |
|
|
|
|
<el-icon><Search /></el-icon> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button class="btn_search" @click="searchInfo">搜索</el-button> |
|
|
|
|
<el-button type="primary" @click="onReset">重置</el-button> |
|
|
|
|
</el-form> |
|
|
|
|
<el-table |
|
|
|
|
class="tableBox" |
|
|
|
|
:data="tableData" |
|
|
|
|
v-loading="loading" |
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
:header-cell-style="{ |
|
|
|
|
background: '#FAFAFA', |
|
|
|
|
color: '#666', |
|
|
|
|
fontSize: '14px', |
|
|
|
|
fontWeight: 'bold', |
|
|
|
|
height: '45px', |
|
|
|
|
lineHeight: '45px', |
|
|
|
|
borderTop: '1px solid #ebeef5', |
|
|
|
|
textAlign: 'center', |
|
|
|
|
}" |
|
|
|
|
:cell-style="{ |
|
|
|
|
color: '#666', |
|
|
|
|
fontSize: '14px', |
|
|
|
|
height: '40px', |
|
|
|
|
lineHeight: '40px', |
|
|
|
|
textAlign: 'center', |
|
|
|
|
}" |
|
|
|
|
:row-style="{ |
|
|
|
|
height: '40px', |
|
|
|
|
}" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-table-column type="selection" width="55" height="100" /> |
|
|
|
|
<el-table-column prop="icon" label="头像"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<img |
|
|
|
|
:src="scope.row.icon" |
|
|
|
|
alt="头像" |
|
|
|
|
width="40" |
|
|
|
|
height="40" |
|
|
|
|
class="rounded-circle" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="number" label="学号" width="120" /> |
|
|
|
|
<el-table-column prop="name" label="姓名" /> |
|
|
|
|
<el-table-column prop="username" label="用户名" /> |
|
|
|
|
<el-table-column prop="nickName" label="昵称" /> |
|
|
|
|
<el-table-column prop="sex" label="性别" /> |
|
|
|
|
<el-table-column prop="major" label="专业" /> |
|
|
|
|
<el-table-column prop="yearAge" label="年级" /> |
|
|
|
|
<el-table-column prop="createTime" label="创建时间" width="200" /> |
|
|
|
|
<el-table-column prop="status" label="状态"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.status" |
|
|
|
|
active-value="1" |
|
|
|
|
inactive-value="0" |
|
|
|
|
@change="handleStatusChange(scope.row)" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-form-item style="width: 250px; margin-left: 30px"> |
|
|
|
|
<el-input |
|
|
|
|
class="input_search" |
|
|
|
|
v-model="studentName" |
|
|
|
|
@focus="onFocus1" |
|
|
|
|
placeholder="输入姓名进行搜索" |
|
|
|
|
></el-input> |
|
|
|
|
<el-icon |
|
|
|
|
color="gray" |
|
|
|
|
:size="12" |
|
|
|
|
style="margin-right: 20px" |
|
|
|
|
v-if="show1" |
|
|
|
|
@click="closeName" |
|
|
|
|
> |
|
|
|
|
<CircleClose /> |
|
|
|
|
</el-icon> |
|
|
|
|
<el-icon><Search /></el-icon> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button class="btn_search" @click="searchInfo">搜索</el-button> |
|
|
|
|
<el-button type="primary" @click="onReset">重置</el-button> |
|
|
|
|
</el-form> |
|
|
|
|
<el-table |
|
|
|
|
class="tableBox" |
|
|
|
|
:data="tableData" |
|
|
|
|
v-loading="loading" |
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
:header-cell-style="{ |
|
|
|
|
background: '#FAFAFA', |
|
|
|
|
color: '#666', |
|
|
|
|
fontSize: '14px', |
|
|
|
|
fontWeight: 'bold', |
|
|
|
|
height: '45px', |
|
|
|
|
lineHeight: '45px', |
|
|
|
|
borderTop: '1px solid #ebeef5', |
|
|
|
|
textAlign: 'center', |
|
|
|
|
}" |
|
|
|
|
:cell-style="{ |
|
|
|
|
color: '#666', |
|
|
|
|
fontSize: '14px', |
|
|
|
|
height: '40px', |
|
|
|
|
lineHeight: '40px', |
|
|
|
|
textAlign: 'center', |
|
|
|
|
}" |
|
|
|
|
:row-style="{ |
|
|
|
|
height: '40px', |
|
|
|
|
}" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-table-column type="selection" width="55" height="100" /> |
|
|
|
|
<el-table-column prop="icon" label="头像"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<img |
|
|
|
|
:src="scope.row.icon" |
|
|
|
|
alt="头像" |
|
|
|
|
width="40" |
|
|
|
|
height="40" |
|
|
|
|
class="rounded-circle" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="number" label="学号" width="120" /> |
|
|
|
|
<el-table-column prop="name" label="姓名" /> |
|
|
|
|
<el-table-column prop="username" label="用户名" /> |
|
|
|
|
<el-table-column prop="nickName" label="昵称" /> |
|
|
|
|
<el-table-column prop="sex" label="性别" /> |
|
|
|
|
<el-table-column prop="major" label="专业" /> |
|
|
|
|
<el-table-column prop="createTime" label="创建时间" width="200" /> |
|
|
|
|
<el-table-column prop="status" label="状态"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.status" |
|
|
|
|
active-value="1" |
|
|
|
|
inactive-value="0" |
|
|
|
|
@change="handleStatusChange(scope.row)" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column fixed="right" label="操作" min-width="125"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
size="small" |
|
|
|
|
:icon="Edit" |
|
|
|
|
circle |
|
|
|
|
plain |
|
|
|
|
@click="editTable(row)" |
|
|
|
|
></el-button> |
|
|
|
|
<el-button |
|
|
|
|
:icon="Delete" |
|
|
|
|
type="danger" |
|
|
|
|
size="small" |
|
|
|
|
circle |
|
|
|
|
plain |
|
|
|
|
@click="delTable(row)" |
|
|
|
|
></el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<template #empty> |
|
|
|
|
<el-empty description="没有数据" /> |
|
|
|
|
<el-table-column fixed="right" label="操作" min-width="125"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
:icon="Edit" |
|
|
|
|
circle |
|
|
|
|
plain |
|
|
|
|
@click="editTable(row)" |
|
|
|
|
></el-button> |
|
|
|
|
<el-button |
|
|
|
|
:icon="Delete" |
|
|
|
|
type="danger" |
|
|
|
|
circle |
|
|
|
|
plain |
|
|
|
|
@click="delTable(row)" |
|
|
|
|
></el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table> |
|
|
|
|
<el-pagination |
|
|
|
|
v-model:current-page="params.page" |
|
|
|
|
v-model:page-size="params.pagesize" |
|
|
|
|
:page-sizes="[3, 5, 7, 10]" |
|
|
|
|
:size="small" |
|
|
|
|
:disabled="disabled" |
|
|
|
|
:background="true" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="total" |
|
|
|
|
@size-change="onSizeChange" |
|
|
|
|
@current-change="onCurrentChange" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
<!-- <edit-stu ref="stuChange"></edit-stu> --> |
|
|
|
|
</el-table-column> |
|
|
|
|
<template #empty> |
|
|
|
|
<el-empty description="没有数据" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table> |
|
|
|
|
<el-pagination |
|
|
|
|
v-model:current-page="params.page" |
|
|
|
|
v-model:page-size="params.pagesize" |
|
|
|
|
:page-sizes="[3, 5, 7, 10]" |
|
|
|
|
:background="true" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="total" |
|
|
|
|
@size-change="onSizeChange" |
|
|
|
|
@current-change="onCurrentChange" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
<!-- <edit-stu ref="stuChange"></edit-stu> --> |
|
|
|
|
|
|
|
|
|
<edit-stu ref="stuChange" @success="onSuccess()"></edit-stu> |
|
|
|
|
</page-container> |
|
|
|
|
<edit-stu ref="stuChange" @success="onSuccess()"></edit-stu> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|