mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 01:36:47 +08:00
讲师管理修改新增讲师接口
This commit is contained in:
@@ -54,6 +54,6 @@ export const updateOutTeacher = (obj) => http.post('/admin/teacher/updateOutTeac
|
|||||||
|
|
||||||
export const fileUp = (obj) => http.post('/file/upload', obj)
|
export const fileUp = (obj) => http.post('/file/upload', obj)
|
||||||
//组织树查询讲师
|
//组织树查询讲师
|
||||||
export const getTeacherByDepartId = (obj) => http.post(`/admin/teacher/getTeacherByDepartId?organizationId=${obj.organizationId}`)
|
export const getTeacherByDepartId = (obj) => http.get(`/admin/thirdApi/user/list?departId=${obj.organizationId}&pageNo=1&pageSize=1000&keyword=`)
|
||||||
//根据姓名工号查询讲师
|
//根据姓名工号查询讲师
|
||||||
export const getTeacherByNameOrUserNo = (obj) => http.post(`/admin/teacher/getTeacherByNameOrUserNo?nameOrUserNo=${obj.nameOrUserNo}`)
|
export const getTeacherByNameOrUserNo = (obj) => http.get(`/admin/thirdApi/user/list?keyword=${obj.nameOrUserNo}&pageNo=1&pageSize=50&departId=`)
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ const systemName = ref('')
|
|||||||
const levelName = ref('')
|
const levelName = ref('')
|
||||||
const neworgName = ref('')
|
const neworgName = ref('')
|
||||||
const handleChange = (e,l) => {
|
const handleChange = (e,l) => {
|
||||||
console.log(e,l,'handlechange');
|
|
||||||
isOpen.value = false
|
isOpen.value = false
|
||||||
// emit('update:value',e)
|
// emit('update:value',e)
|
||||||
teacherName.value = e
|
teacherName.value = e
|
||||||
@@ -120,7 +119,6 @@ const handleChange = (e,l) => {
|
|||||||
neworgName.value= orgName.value.split('/')
|
neworgName.value= orgName.value.split('/')
|
||||||
neworgName.value= neworgName.value[ neworgName.value.length-1]
|
neworgName.value= neworgName.value[ neworgName.value.length-1]
|
||||||
}
|
}
|
||||||
console.log(neworgName,'handlechange');
|
|
||||||
};
|
};
|
||||||
function debounce(func, wait) {
|
function debounce(func, wait) {
|
||||||
let timeout;
|
let timeout;
|
||||||
@@ -142,12 +140,10 @@ const searchMembers = (keyword) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const searchMember = (keyword) => {
|
const searchMember = (keyword) => {
|
||||||
console.log(keyword,'keyword')
|
|
||||||
getTeacherByNameOrUserNo({nameOrUserNo:keyword}).then((res) => {
|
getTeacherByNameOrUserNo({nameOrUserNo:keyword}).then((res) => {
|
||||||
console.log(res,'res')
|
|
||||||
if(res.data.code == 200){
|
if(res.data.code == 200){
|
||||||
loading.value = false
|
loading.value = false
|
||||||
options.value = res.data.data.map((item) => {
|
options.value = res.data.data.list.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item.realName,
|
value: item.realName,
|
||||||
label: item.realName+'('+item.userNo+')'+item.orgName,
|
label: item.realName+'('+item.userNo+')'+item.orgName,
|
||||||
@@ -179,19 +175,19 @@ const { data: treeData, loading: orgLoading } = useRequest(
|
|||||||
{ keyword: "" },
|
{ keyword: "" },
|
||||||
);
|
);
|
||||||
function onLoadData(treeNode) {
|
function onLoadData(treeNode) {
|
||||||
console.log(treeNode, "treeNode")
|
|
||||||
teacherById.value = treeNode.id
|
teacherById.value = treeNode.id
|
||||||
const promises = [];
|
const promises = [];
|
||||||
const childDatas = []
|
const childDatas = []
|
||||||
promises.push(
|
promises.push(
|
||||||
getTeacherByDepartId({organizationId:teacherById.value}).then((res) => {
|
getTeacherByDepartId({organizationId:teacherById.value}).then((res) => {
|
||||||
if(res.data.code == 200){
|
if(res.data.code == 200){
|
||||||
res.data.data.map(item=>{
|
res.data.data.list.map(item=>{
|
||||||
return (
|
return (
|
||||||
item.isLeaf = true
|
item.isLeaf = true,
|
||||||
|
item.name = item.realName
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
childDatas.unshift(...res.data.data)
|
childDatas.unshift(...res.data.data.list)
|
||||||
}
|
}
|
||||||
}).catch((err)=>{
|
}).catch((err)=>{
|
||||||
console.log(err,'err')
|
console.log(err,'err')
|
||||||
|
|||||||
Reference in New Issue
Block a user