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 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 neworgName = ref('')
|
||||
const handleChange = (e,l) => {
|
||||
console.log(e,l,'handlechange');
|
||||
isOpen.value = false
|
||||
// emit('update:value',e)
|
||||
teacherName.value = e
|
||||
@@ -120,7 +119,6 @@ const handleChange = (e,l) => {
|
||||
neworgName.value= orgName.value.split('/')
|
||||
neworgName.value= neworgName.value[ neworgName.value.length-1]
|
||||
}
|
||||
console.log(neworgName,'handlechange');
|
||||
};
|
||||
function debounce(func, wait) {
|
||||
let timeout;
|
||||
@@ -142,12 +140,10 @@ const searchMembers = (keyword) => {
|
||||
}
|
||||
};
|
||||
const searchMember = (keyword) => {
|
||||
console.log(keyword,'keyword')
|
||||
getTeacherByNameOrUserNo({nameOrUserNo:keyword}).then((res) => {
|
||||
console.log(res,'res')
|
||||
if(res.data.code == 200){
|
||||
loading.value = false
|
||||
options.value = res.data.data.map((item) => {
|
||||
options.value = res.data.data.list.map((item) => {
|
||||
return {
|
||||
value: item.realName,
|
||||
label: item.realName+'('+item.userNo+')'+item.orgName,
|
||||
@@ -179,19 +175,19 @@ const { data: treeData, loading: orgLoading } = useRequest(
|
||||
{ keyword: "" },
|
||||
);
|
||||
function onLoadData(treeNode) {
|
||||
console.log(treeNode, "treeNode")
|
||||
teacherById.value = treeNode.id
|
||||
const promises = [];
|
||||
const childDatas = []
|
||||
promises.push(
|
||||
getTeacherByDepartId({organizationId:teacherById.value}).then((res) => {
|
||||
if(res.data.code == 200){
|
||||
res.data.data.map(item=>{
|
||||
res.data.data.list.map(item=>{
|
||||
return (
|
||||
item.isLeaf = true
|
||||
item.isLeaf = true,
|
||||
item.name = item.realName
|
||||
)
|
||||
})
|
||||
childDatas.unshift(...res.data.data)
|
||||
childDatas.unshift(...res.data.data.list)
|
||||
}
|
||||
}).catch((err)=>{
|
||||
console.log(err,'err')
|
||||
|
||||
Reference in New Issue
Block a user