mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-22 01:06:45 +08:00
讲师管理bug
This commit is contained in:
@@ -74,7 +74,7 @@ import { reactive, toRefs, ref,computed,watch } from "vue"
|
||||
import {getTeacherById} from "../../api/Lecturer";
|
||||
import { getNewInTeacherCourseList } from "../../api/Teaching";
|
||||
// import boe from '@/assets/boe.jpg'
|
||||
import avatar from '@/assets/avatar.png'
|
||||
import avatar from '@/assets/Avatarman.png'
|
||||
import dayjs from "dayjs";
|
||||
export default{
|
||||
name :"LookExternalLecturer",
|
||||
|
||||
@@ -185,7 +185,7 @@ export default{
|
||||
state.formParam = objA
|
||||
state.formParam.photo = state.formParam.photo ==null ?
|
||||
state.formParam.gender == 1 ? Avatarman :
|
||||
state.formParam.gender ==2 ? Avatarwoman : avatar : state.formParam.photo
|
||||
state.formParam.gender ==2 ? Avatarwoman : Avatarman : (state.formParam.photo.includes('upload')?state.formParam.photo:'/upload'+state.formParam.photo)
|
||||
state.teacherrepromo.userId=res.data.data.id
|
||||
console.log(state.teacherrepromo.id);
|
||||
isOrgNames(state.formParam.orgName)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-popover v-model:visible="visible" placement="bottom" trigger="click">
|
||||
<a-popover :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:visible="visible" placement="bottom" trigger="click">
|
||||
<template #content v-if="!disabled">
|
||||
<div class="pover">
|
||||
<div class="search">
|
||||
@@ -26,13 +30,13 @@
|
||||
</div>
|
||||
<div class="tree">
|
||||
<a-tree show-icon allow-clear tree-default-expand-all :tree-data="treeData" :loading="orgLoading"
|
||||
:load-data="onLoadData" v-model:selectedKeys="stuTreeSelectKeys"
|
||||
:load-data="onLoadData" @expand="onExpand" v-model:selectedKeys="stuTreeSelectKeys"
|
||||
v-model:expandedKeys="stuTreeExpandedKeys" :fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}" @select="stuStuOrgSelect" style="max-height: 260px;overflow-y: auto;width: 250px;">
|
||||
}" @select="stuStuOrgSelect" style="height: 300px;max-height: 300px;overflow-y: auto;width: 266px;">
|
||||
<template #smile>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
@@ -259,6 +263,9 @@ const { data: treeData, loading: orgLoading } = useRequest(
|
||||
ORG_LIST,
|
||||
{ keyword: "" },
|
||||
);
|
||||
const onExpand = (expandedKeys, aaa) => {
|
||||
console.log(expandedKeys, aaa,'xixixiiixi')
|
||||
}
|
||||
function onLoadData(treeNode) {
|
||||
teacherById.value = treeNode.id
|
||||
const promises = [];
|
||||
@@ -293,7 +300,12 @@ function onLoadData(treeNode) {
|
||||
});
|
||||
}
|
||||
function stuStuOrgSelect(e, {selected: bool, selectedNodes, node, event}) {
|
||||
console.log(selectedNodes)
|
||||
const index = stuTreeExpandedKeys.value.indexOf(node.id);
|
||||
if (index === -1) {
|
||||
stuTreeExpandedKeys.value.push(node.id);
|
||||
} else {
|
||||
stuTreeExpandedKeys.value.splice(index, 1);
|
||||
}
|
||||
teacherName.value = ''
|
||||
orgName.value = ''
|
||||
orgId.value = ''
|
||||
@@ -302,7 +314,7 @@ function stuStuOrgSelect(e, {selected: bool, selectedNodes, node, event}) {
|
||||
teacherId.value = ''
|
||||
payrollPlaceCode.value = ''
|
||||
payrollPlaceName.value = ''
|
||||
if(selectedNodes[0].isLeaf){
|
||||
if(selectedNodes[0]?.isLeaf){
|
||||
teacherName.value = selectedNodes[0].name
|
||||
orgName.value = selectedNodes[0].orgName
|
||||
orgId.value = selectedNodes[0].departId
|
||||
@@ -401,13 +413,25 @@ const changeOut = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .ant-popover{
|
||||
width: 300px;
|
||||
hight: 400px;
|
||||
top: 35px !important;
|
||||
left: 0px !important;
|
||||
}
|
||||
.pover{
|
||||
::v-deep .ant-select-selector{
|
||||
height: 30px !important;
|
||||
border-radius: 4px !important;
|
||||
line-height: 30px !important;
|
||||
}
|
||||
.search{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.tree{
|
||||
margin-top: 5px;
|
||||
border: 1px solid rgba(215, 215, 215, 1);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.btn{
|
||||
margin-top: 10px;
|
||||
@@ -418,10 +442,11 @@ const changeOut = () => {
|
||||
height: 25px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 25px;
|
||||
// line-height: 25px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn1{
|
||||
line-height: 25px;
|
||||
margin-right: 10px;
|
||||
background-color: rgba(170, 170, 170, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user