|
|
@ -1,43 +1,37 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="container" style="padding: 30px"> |
|
|
|
<div class="container" style="padding: 30px"> |
|
|
|
<el-form |
|
|
|
<el-form :model="queryParamss" ref="queryForm" inline label-width="68px"> |
|
|
|
:model="queryParamss" |
|
|
|
<el-form-item label="姓名" prop="studentName"> |
|
|
|
ref="queryForm" |
|
|
|
<el-input v-model="queryParamss.studentName" placeholder="请输入姓名" clearable size="small" /> |
|
|
|
inline |
|
|
|
</el-form-item> |
|
|
|
label-width="68px" |
|
|
|
<el-form-item label="手机号" prop="mobile"> |
|
|
|
> |
|
|
|
<el-input v-model="queryParamss.mobile" placeholder="请输入手机号" clearable size="small" /> |
|
|
|
<el-form-item label="姓名" prop="studentName"> |
|
|
|
</el-form-item> |
|
|
|
<el-input v-model="queryParamss.studentName" placeholder="请输入姓名" clearable size="small" /> |
|
|
|
<!-- <el-form-item label="所属学院" prop="homeCollege" v-if="$route.query.type == 0"> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="手机号" prop="mobile"> |
|
|
|
|
|
|
|
<el-input v-model="queryParamss.mobile" placeholder="请输入手机号" clearable size="small" /> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<!-- <el-form-item label="所属学院" prop="homeCollege" v-if="$route.query.type == 0"> |
|
|
|
|
|
|
|
<el-input v-model="queryParamss.homeCollege" placeholder="请输入所属学院" clearable size="small" /> |
|
|
|
<el-input v-model="queryParamss.homeCollege" placeholder="请输入所属学院" clearable size="small" /> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form-item> --> |
|
|
|
<el-form-item label="辅导员" prop="counsellor" v-if="$route.query.type == 0"> |
|
|
|
<el-form-item label="辅导员" prop="counsellor" v-if="$route.query.type == 0"> |
|
|
|
<el-input v-model="queryParamss.counsellor" placeholder="请输入辅导员姓名" clearable size="small" /> |
|
|
|
<el-input v-model="queryParamss.counsellor" placeholder="请输入辅导员姓名" clearable size="small" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="专业" prop="majorName" v-if="$route.query.type == 0"> |
|
|
|
<el-form-item label="专业" prop="majorName" v-if="$route.query.type == 0"> |
|
|
|
<el-input v-model="queryParamss.majorName" placeholder="请输入专业" clearable size="small" /> |
|
|
|
<el-input v-model="queryParamss.majorName" placeholder="请输入专业" clearable size="small" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 详细学生信息弹层 --> |
|
|
|
<!-- 详细学生信息弹层 --> |
|
|
|
|
|
|
|
<el-table v-if="$route.query.type != 3" :data="studentList" v-loading="loading"> |
|
|
|
<el-table :data="studentList" v-loading="loading"> |
|
|
|
|
|
|
|
<el-table-column label="序号" align="center" type="index" /> |
|
|
|
<el-table-column label="序号" align="center" type="index" /> |
|
|
|
<el-table-column label="学号" align="center" prop="studentCode" v-if="$route.query.type == 0" /> |
|
|
|
<el-table-column label="学号" align="center" prop="studentCode" v-if="$route.query.type == 0" /> |
|
|
|
<el-table-column label="姓名" align="center" prop="studentName" /> |
|
|
|
<el-table-column label="姓名" align="center" prop="studentName" /> |
|
|
|
<!-- <el-table-column label="所属学院" align="center" prop="homeCollege" v-if="$route.query.type == 0" /> --> |
|
|
|
<!-- <el-table-column label="所属学院" align="center" prop="homeCollege" v-if="$route.query.type == 0" /> --> |
|
|
|
<el-table-column label="专业名称" align="center" prop="majorName" v-if="$route.query.type == 0" /> |
|
|
|
<el-table-column label="专业名称" align="center" prop="majorName" v-if="$route.query.type == 0" /> |
|
|
|
<el-table-column label="手机号" align="center" prop="mobile" /> |
|
|
|
<el-table-column label="手机号" align="center" prop="mobile" /> |
|
|
|
<el-table-column label="辅导员" align="center" prop="counsellor" v-if="$route.query.type == 0"/> |
|
|
|
<el-table-column label="辅导员" align="center" prop="counsellor" v-if="$route.query.type == 0" /> |
|
|
|
<el-table-column label="辅导员联系方式" align="center" prop="counsellorTel" v-if="$route.query.type == 0"/> |
|
|
|
<el-table-column label="辅导员联系方式" align="center" prop="counsellorTel" v-if="$route.query.type == 0" /> |
|
|
|
<el-table-column label="报名时间" align="center" prop="registrationTime" /> |
|
|
|
<el-table-column label="报名时间" align="center" prop="registrationTime" /> |
|
|
|
<el-table-column label="备注" align="center" prop="remark" /> |
|
|
|
<el-table-column label="备注" align="center" prop="remark" /> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
@ -49,6 +43,18 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-table v-else :data="teacherList" v-loading="loading"> |
|
|
|
|
|
|
|
<el-table-column label="序号" align="center" type="index" /> |
|
|
|
|
|
|
|
<el-table-column v-for="it in headerList" :key="it" :label="headerData[it]" align="center" :prop="it" /> |
|
|
|
|
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button size="mini" type="text" v-if="scope.row.remark" @click="editRemark(scope.row)" |
|
|
|
|
|
|
|
>修改备注</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-button size="mini" type="text" v-else @click="addRemark(scope.row)">添加备注</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
<pagination |
|
|
|
<pagination |
|
|
|
v-show="totals > 0" |
|
|
|
v-show="totals > 0" |
|
|
|
:total="totals" |
|
|
|
:total="totals" |
|
|
@ -95,7 +101,7 @@ export default { |
|
|
|
mobile: null, |
|
|
|
mobile: null, |
|
|
|
majorName: null, |
|
|
|
majorName: null, |
|
|
|
counsellor: null, |
|
|
|
counsellor: null, |
|
|
|
counsellorTel: null |
|
|
|
counsellorTel: null, |
|
|
|
}, |
|
|
|
}, |
|
|
|
totals: 0, |
|
|
|
totals: 0, |
|
|
|
|
|
|
|
|
|
|
@ -108,6 +114,10 @@ export default { |
|
|
|
remark: [{ required: true, message: '请输入备注', trigger: 'blur' }], |
|
|
|
remark: [{ required: true, message: '请输入备注', trigger: 'blur' }], |
|
|
|
}, |
|
|
|
}, |
|
|
|
rowId: null, |
|
|
|
rowId: null, |
|
|
|
|
|
|
|
teacherList: [], //原始数据 |
|
|
|
|
|
|
|
// 表头数据 |
|
|
|
|
|
|
|
headerList: [], |
|
|
|
|
|
|
|
headerData: {}, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -117,8 +127,46 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
async getStudentList() { |
|
|
|
async getStudentList() { |
|
|
|
this.loading = true |
|
|
|
this.loading = true |
|
|
|
const res = await searchNum({ trainClassId: this.$route.query.id, ...this.queryParamss }) |
|
|
|
const res = await searchNum({ |
|
|
|
this.studentList = res.rows |
|
|
|
classType: this.$route.query.type, |
|
|
|
|
|
|
|
trainClassId: this.$route.query.id, |
|
|
|
|
|
|
|
...this.queryParamss, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (this.$route.query.type == 3 && res.total > 0) { |
|
|
|
|
|
|
|
// 处理json |
|
|
|
|
|
|
|
if (res.rows[0].data) { |
|
|
|
|
|
|
|
this.headerList = [] |
|
|
|
|
|
|
|
this.headerData ={} |
|
|
|
|
|
|
|
// 取第一项处理表头 |
|
|
|
|
|
|
|
const firstData = JSON.parse(res.rows[0].data) |
|
|
|
|
|
|
|
firstData.forEach((it) => { |
|
|
|
|
|
|
|
// 循环标识 |
|
|
|
|
|
|
|
this.headerList.push(it.key) |
|
|
|
|
|
|
|
// 表头文字 |
|
|
|
|
|
|
|
this.headerData[it.key] = it[it.key] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// 处理备注列 |
|
|
|
|
|
|
|
this.headerList.push('remark') |
|
|
|
|
|
|
|
this.headerData.remark = '备注' |
|
|
|
|
|
|
|
// 表格新数据 |
|
|
|
|
|
|
|
const newData = [] |
|
|
|
|
|
|
|
// 构造表格数据--解析每一条json串 |
|
|
|
|
|
|
|
res.rows.forEach((item) => { |
|
|
|
|
|
|
|
if (item.data) { |
|
|
|
|
|
|
|
const obj = {} |
|
|
|
|
|
|
|
JSON.parse(item.data).forEach((ite) => { |
|
|
|
|
|
|
|
obj[ite.key] = ite.value |
|
|
|
|
|
|
|
obj.trainingStudentId = item.trainingStudentId |
|
|
|
|
|
|
|
obj.remark = item.remark |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
newData.push(obj) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.teacherList = newData |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.studentList = res.rows |
|
|
|
|
|
|
|
} |
|
|
|
this.totals = res.total |
|
|
|
this.totals = res.total |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
}, |
|
|
|
}, |
|
|
@ -141,7 +189,7 @@ export default { |
|
|
|
this.rowId = row.trainingStudentId |
|
|
|
this.rowId = row.trainingStudentId |
|
|
|
this.visibleopen = true |
|
|
|
this.visibleopen = true |
|
|
|
this.title = '修改备注' |
|
|
|
this.title = '修改备注' |
|
|
|
this.form = {remark: row.remark} |
|
|
|
this.form = { remark: row.remark } |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交备注 |
|
|
|
// 提交备注 |
|
|
|
submitRemark() { |
|
|
|
submitRemark() { |
|
|
|