培训班加教师

main
lijingyu007 6 months ago
parent f7a43d8bee
commit 6bd5dccdff
  1. 44
      src/api/trainService/index.js
  2. 15
      src/views/trainService/signlist.vue

@ -90,9 +90,7 @@ export function listTalent() {
return request({
url: '/talent/admin/list',
method: 'get',
headers: {
isToken: false
}
})
}
export function addTalent(data) {
@ -100,9 +98,7 @@ export function addTalent(data) {
url: '/talent/admin/add',
method: 'post',
data,
headers: {
isToken: false
}
})
}
// 修改人才
@ -111,9 +107,7 @@ export function updateTalent(data) {
url: '/talent/admin/update',
method: 'post',
data,
headers: {
isToken: false
}
})
}
@ -122,9 +116,7 @@ export function deleteTalent(id) {
return request({
url: '/talent/admin/' + id,
method: 'delete',
headers: {
isToken: false
}
})
}
@ -133,9 +125,7 @@ export function detailTalent(id) {
return request({
url: '/talent/admin/' + id,
method: 'get',
headers: {
isToken: false
}
})
}
@ -143,9 +133,7 @@ export function listTeacher() {
return request({
url: '/talent/admin/teacherList',
method: 'get',
headers: {
isToken: false
}
})
}
// 新增教师
@ -154,9 +142,7 @@ export function addTeacher(data) {
url: '/talent/admin/teacher/add',
method: 'post',
data,
headers: {
isToken: false
}
})
}
// 修改教师
@ -165,9 +151,7 @@ export function updateTeacher(data) {
url: '/talent/admin/teacher/update',
method: 'post',
data,
headers: {
isToken: false
}
})
}
@ -177,8 +161,14 @@ export function importTemplate() {
url: '/talent/admin/download',
method: 'get',
responseType: 'blob',
headers: {
isToken: false
}
})
}
// 查询所有教师
export function listTeacherAll() {
return request({
url: '/talent/findAllTeacher',
method: 'get',
})
}

@ -129,13 +129,13 @@
<el-option label="可靠性人才培训班" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="培训教师" prop="teacher">
<el-select allow-create filterable v-model="form.teacher">
<el-form-item label="培训教师" prop="teacherName">
<el-select allow-create filterable v-model="form.teacherName">
<el-option
v-for="it in teacherList"
:key="it.talentId"
:key="it.talent_id"
:label="it.name"
:value="it.talentId"
:value="it.name"
></el-option>
</el-select>
</el-form-item>
@ -275,9 +275,9 @@ import {
updateSignUp,
delSignUp,
searchNum,
listTeacherAll
} from '@/api/trainService/index.js'
import ImageUpload from '@/components/ImgUpload/index.vue'
import { listTeacher } from '@/api/trainService/index.js'
import NonimageUpload from '@/views/components/NonimageUpload'
// 1 2 3 4 5 status
export default {
@ -311,6 +311,7 @@ export default {
rules: {
classType: [{ required: true, message: '请输入培训班类型', trigger: 'change' }],
schoolId: [{ required: true, message: '请选择学校', trigger: 'change' }],
teacherName: [{ required: true, message: '请选择教师', trigger: 'change' }],
trainClassCode: [{ required: true, message: '请输入班级代号', trigger: 'blur' }],
trainClassName: [{ required: true, message: '请输入班级名称', trigger: 'blur' }],
classSize: [{ required: true, message: '请输入班级人数', trigger: 'blur' }],
@ -329,8 +330,8 @@ export default {
mounted() {},
methods: {
async getTeacherList() {
const res = await listTeacher()
this.teacherList = res.rows
const res = await listTeacherAll()
this.teacherList = res
},
//
setPackagePath(value) {

Loading…
Cancel
Save