mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
Merge remote-tracking branch 'yx/zcwy_1127_teacher' into master_1202
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import ajax from '@/utils/xajax.js'
|
import ajax from '@/utils/xajax.js'
|
||||||
|
import ajax2 from '../unionAjax.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按名称查询
|
* 按名称查询
|
||||||
@@ -9,7 +9,9 @@ const findByName = function(name) {
|
|||||||
return ajax.get('/xboe/teacher/name?name=' + name);
|
return ajax.get('/xboe/teacher/name?name=' + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const findByNameNew = function(name) {
|
||||||
|
return ajax2.get('/manageApi/admin/teacher/selectTeacher?name=' + name);
|
||||||
|
}
|
||||||
const updateTeacher=function(data){
|
const updateTeacher=function(data){
|
||||||
return ajax.postJson('/xboe/teacher/update-teacher',data);
|
return ajax.postJson('/xboe/teacher/update-teacher',data);
|
||||||
}
|
}
|
||||||
@@ -217,7 +219,7 @@ export default {
|
|||||||
update,
|
update,
|
||||||
del,
|
del,
|
||||||
detail,
|
detail,
|
||||||
findByName,
|
findByNameNew,
|
||||||
updateSysId,
|
updateSysId,
|
||||||
has,
|
has,
|
||||||
start,
|
start,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<div class="choice-box" v-if="teacherDownList.length>0">
|
<div class="choice-box" v-if="teacherDownList.length>0">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="te in teacherDownList" :key="te.key" @click="changeTeachers(te)">{{te.teacherName + te.teacherCode}}</li>
|
<li v-for="te in teacherDownList" :key="te.key" @click="changeTeachers(te)">{{te.teacherName + '(' + te.teacherCode + ')'}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-select
|
<!-- <el-select
|
||||||
@@ -88,15 +88,15 @@
|
|||||||
if (this.teacherValues !== '') {
|
if (this.teacherValues !== '') {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
const { result, message, status } = await apiTeacher.findByName(this.teacherValues);
|
const { data, message, code } = await apiTeacher.findByNameNew(this.teacherValues);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (status === 200) {
|
if (code === 200) {
|
||||||
let list = [];
|
let list = [];
|
||||||
result.forEach(item => {
|
data.forEach(item => {
|
||||||
list.push({
|
list.push({
|
||||||
teacherId: item.id,
|
teacherId: item.id,
|
||||||
teacherName: item.name,
|
teacherName: item.name,
|
||||||
teacherCode: item.code
|
teacherCode: item.mobile
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.teacherDownList = list;
|
this.teacherDownList = list;
|
||||||
|
|||||||
Reference in New Issue
Block a user