报名学生新页面 校企新字段

main
lijingyu007 5 months ago
parent db40a0c573
commit 5ecda871bc
  1. 4
      .env.development
  2. 8
      .env.production
  3. 18
      src/api/trainService/index.js
  4. 46
      src/views/trainService/signlist.vue
  5. 169
      src/views/trainService/signupStudent.vue

@ -4,8 +4,8 @@ ENV = 'development'
# KeySaas测试云平台/开发环境 # KeySaas测试云平台/开发环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api'
# VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999'
# VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999' # VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999'
# VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999' # VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999'

@ -2,10 +2,10 @@
ENV = 'production' ENV = 'production'
# KeySaas测试云平台/生产环境 # KeySaas测试云平台/生产环境
# VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = '/test-api' # VUE_APP_BASE_API = '/test-api'
# VUE_APP_BASE_TARGET = 'https://www.keyitest.cn/prod-api' # VUE_APP_BASE_TARGET = 'https://www.keyitest.cn/prod-api'
# VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999'
VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/prod-api'
# VUE_APP_BASE_TARGET = 'http://www.keyitest.cn/prod-api' # VUE_APP_BASE_TARGET = 'http://www.keyitest.cn/prod-api'

@ -73,12 +73,11 @@ export function delSignUp(id) {
} }
// 查询已报名列表 // 查询已报名列表
export function searchNum(id, query) { export function searchNum(data) {
return request({ return request({
url: `/train/trainStudentList?trainClassId=${id}`, url: `/train/trainStudentList`,
method: 'get', method: 'post',
params: query, data,
}) })
} }
@ -171,4 +170,13 @@ export function listTeacherAll() {
url: '/talent/findAllTeacher', url: '/talent/findAllTeacher',
method: 'get', method: 'get',
}) })
}
// 添加备注
export function addRemarkI(data) {
return request({
url: '/train/addRemark',
method: 'post',
data,
})
} }

@ -1,6 +1,5 @@
<template> <template>
<div class="container" style="padding: 30px"> <div class="container" style="padding: 30px">
<el-form <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
@ -80,6 +79,11 @@
{{ (scope.row.trainEndTime && scope.row.trainEndTime.slice(0, 10)) || '未录入' }} {{ (scope.row.trainEndTime && scope.row.trainEndTime.slice(0, 10)) || '未录入' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否限制人数" align="center" prop="limitApply">
<template slot-scope="scope">
{{ scope.row.limitApply == 1 ? '是': '否' }}
</template>
</el-table-column>
<el-table-column label="已报名/总人数" align="center" prop="classSize"> <el-table-column label="已报名/总人数" align="center" prop="classSize">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="searchUp(scope.row)">{{ <el-button size="mini" type="text" @click="searchUp(scope.row)">{{
@ -163,10 +167,17 @@
<el-option label="高级" :value="2"></el-option> <el-option label="高级" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="班级人数" prop="classSize"> <el-form-item label="班级人数" prop="classSize">
<el-input v-model="form.classSize" placeholder="请输入班级人数" clearable size="small" /> <el-input v-model="form.classSize" placeholder="请输入班级人数" clearable size="small" />
</el-form-item> </el-form-item>
<!-- 是否限制人数 -->
<el-form-item label="是否限制人数" prop="limitApply" class="limitApply">
<el-radio-group v-model="form.limitApply">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="报名开始时间" prop="registrationStartTime"> <el-form-item label="报名开始时间" prop="registrationStartTime">
<el-date-picker <el-date-picker
clearable clearable
@ -275,7 +286,7 @@ import {
updateSignUp, updateSignUp,
delSignUp, delSignUp,
searchNum, searchNum,
listTeacherAll listTeacherAll,
} from '@/api/trainService/index.js' } from '@/api/trainService/index.js'
import ImageUpload from '@/components/ImgUpload/index.vue' import ImageUpload from '@/components/ImgUpload/index.vue'
import NonimageUpload from '@/views/components/NonimageUpload' import NonimageUpload from '@/views/components/NonimageUpload'
@ -303,10 +314,11 @@ export default {
pageSize: 10, pageSize: 10,
}, },
totals: 0, totals: 0,
title: '新增学校', title: '新增班级',
visibleopen: false, visibleopen: false,
form: { form: {
classType: 0, classType: 0,
limitApply: '1',
}, },
rules: { rules: {
classType: [{ required: true, message: '请输入培训班类型', trigger: 'change' }], classType: [{ required: true, message: '请输入培训班类型', trigger: 'change' }],
@ -314,7 +326,14 @@ export default {
teacherName: [{ required: true, message: '请选择教师', trigger: 'change' }], teacherName: [{ required: true, message: '请选择教师', trigger: 'change' }],
trainClassCode: [{ required: true, message: '请输入班级代号', trigger: 'blur' }], trainClassCode: [{ required: true, message: '请输入班级代号', trigger: 'blur' }],
trainClassName: [{ required: true, message: '请输入班级名称', trigger: 'blur' }], trainClassName: [{ required: true, message: '请输入班级名称', trigger: 'blur' }],
classSize: [{ required: true, message: '请输入班级人数', trigger: 'blur' }], limitApply: [{ required: true, message: '请选择是否限制人数', trigger: 'change' }],
classSize: [
{
required: true,
message: '请输入班级人数',
trigger: blur,
},
],
classLevel: [{ required: true, message: '请输入班级等级', trigger: 'change' }], classLevel: [{ required: true, message: '请输入班级等级', trigger: 'change' }],
registrationStartTime: [{ required: true, message: '报名开始时间', trigger: 'blur' }], registrationStartTime: [{ required: true, message: '报名开始时间', trigger: 'blur' }],
registrationEndTime: [{ required: true, message: '报名结束时间', trigger: 'blur' }], registrationEndTime: [{ required: true, message: '报名结束时间', trigger: 'blur' }],
@ -352,12 +371,12 @@ export default {
}, },
// //
addsign() { addsign() {
this.title = '新增学校' this.title = '新增班级'
this.visibleopen = true this.visibleopen = true
}, },
// //
async modify(row) { async modify(row) {
this.title = '修改信息' this.title = '修改班级'
this.visibleopen = true this.visibleopen = true
this.form = row this.form = row
// //
@ -417,7 +436,10 @@ export default {
colsedia() { colsedia() {
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
this.visibleopen = false this.visibleopen = false
this.form = {} this.form = {
classType: 0,
limitApply: '1',
}
}, },
handleQuery() { handleQuery() {
this.getList() this.getList()
@ -428,8 +450,9 @@ export default {
}, },
// //
searchUp(rwo) { searchUp(rwo) {
this.activeR = rwo // this.activeR = rwo
this.getStudentList() // this.getStudentList()
this.$router.push(`/signupStudent?id=${rwo.trainClassId}&type=${rwo.classType}`)
}, },
async getStudentList() { async getStudentList() {
const res = await searchNum(this.activeR.trainClassId) const res = await searchNum(this.activeR.trainClassId)
@ -447,4 +470,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-radio-group {
width: 220px;
}
</style> </style>

@ -0,0 +1,169 @@
<template>
<div class="container" style="padding: 30px">
<el-form
:model="queryParamss"
ref="queryForm"
inline
label-width="68px"
>
<el-form-item label="姓名" prop="studentName">
<el-input v-model="queryParamss.studentName" placeholder="请输入姓名" clearable size="small" />
</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-form-item> -->
<el-form-item label="辅导员" prop="counsellor" v-if="$route.query.type == 0">
<el-input v-model="queryParamss.counsellor" placeholder="请输入辅导员姓名" clearable size="small" />
</el-form-item>
<el-form-item label="专业" prop="majorName" v-if="$route.query.type == 0">
<el-input v-model="queryParamss.majorName" placeholder="请输入专业" clearable size="small" />
</el-form-item>
<el-form-item>
<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-form-item>
</el-form>
<!-- 详细学生信息弹层 -->
<el-table :data="studentList" v-loading="loading">
<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="studentName" />
<!-- <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="mobile" />
<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="registrationTime" />
<el-table-column label="备注" align="center" prop="remark" />
<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
v-show="totals > 0"
:total="totals"
:page.sync="queryParamss.pageNum"
:limit.sync="queryParamss.pageSize"
@pagination="getStudentList"
/>
<!-- 弹层 -->
<el-dialog
class="diaform"
:title="title"
:visible.sync="visibleopen"
:close-on-click-modal="false"
width="500px"
append-to-body
@close="colsedia"
>
<el-form :model="form" :rules="rules" ref="form">
<!-- 类型 -->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" clearable size="small" type="textarea" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="colsedia"> </el-button>
<el-button type="primary" @click="submitRemark"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { searchNum, addRemarkI } from '@/api/trainService/index.js'
// 1 2 3 4 5 status
export default {
name: 'peixunbaoming',
data() {
return {
loading: false,
//
queryParamss: {
pageNum: 1,
pageSize: 10,
studentName: null,
mobile: null,
majorName: null,
counsellor: null,
counsellorTel: null
},
totals: 0,
studentList: [],
//
title: '添加备注',
visibleopen: false,
form: {},
rules: {
remark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
},
rowId: null,
}
},
mounted() {
this.getStudentList()
},
methods: {
async getStudentList() {
this.loading = true
const res = await searchNum({ trainClassId: this.$route.query.id, ...this.queryParamss })
this.studentList = res.rows
this.totals = res.total
this.loading = false
},
handleQuery() {
this.getStudentList()
},
resetQuery() {
this.resetForm('queryForm')
this.getStudentList()
},
//
addRemark(row) {
this.title = '添加备注'
this.visibleopen = true
// trainClassId trainingStudentId userId
this.rowId = row.trainingStudentId
},
//
editRemark(row) {
this.rowId = row.trainingStudentId
this.visibleopen = true
this.title = '修改备注'
this.form = {remark: row.remark}
},
//
submitRemark() {
this.$refs['form'].validate((valid) => {
if (valid) {
addRemarkI({ trainingStudentId: this.rowId, remark: this.form.remark }).then(() => {
this.$message.success('备注成功!')
this.getStudentList()
this.colsedia()
})
}
})
},
//
colsedia() {
this.form = {}
this.visibleopen = false
},
},
created() {},
}
</script>
<style lang="scss" scoped>
</style>
Loading…
Cancel
Save