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