diff --git a/src/api/trainService/index.js b/src/api/trainService/index.js index cd46a79..d280d7f 100644 --- a/src/api/trainService/index.js +++ b/src/api/trainService/index.js @@ -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', }) } \ No newline at end of file diff --git a/src/views/trainService/signlist.vue b/src/views/trainService/signlist.vue index ebbf544..050267f 100644 --- a/src/views/trainService/signlist.vue +++ b/src/views/trainService/signlist.vue @@ -129,13 +129,13 @@ - - + + @@ -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) {