Commit f9006b9b by zhangleyuan

feat:处理重名问题

parent ac4b314f
...@@ -388,7 +388,7 @@ function DepartMentTabCon(props) { ...@@ -388,7 +388,7 @@ function DepartMentTabCon(props) {
image: college, image: college,
description: "暂无数据", description: "暂无数据",
}} }}
scroll={{ x: 1500 }} scroll={{ x: 800 }}
bordered bordered
size="middle" size="middle"
pagination={false} pagination={false}
......
.department-tab-con{ .department-tab-con{
display: flex; display: flex;
.table-con{ .table-con{
margin-left:16px;
flex:1; flex:1;
.post-name{ .post-name{
max-width: 200px; max-width: 200px;
......
...@@ -65,6 +65,8 @@ function LeftStructureTree(props) { ...@@ -65,6 +65,8 @@ function LeftStructureTree(props) {
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
}} }}
depId={record.id}
type={type}
> >
{type === 'user'? {type === 'user'?
<div><WWOpenDataCom type="userName" openid={record.userName}/></div> <div><WWOpenDataCom type="userName" openid={record.userName}/></div>
...@@ -104,17 +106,21 @@ function LeftStructureTree(props) { ...@@ -104,17 +106,21 @@ function LeftStructureTree(props) {
return placeholder return placeholder
} }
function confirmSearchSelect(value,option){ function confirmSearchSelect(value,option){
const param = {}
setOpen(false); setOpen(false);
setQueryName(value); setQueryName(value);
console.log('option',option); if(option.label.props.type === 'user'){
console.log('_option',option); param.queryName = value;
// setSelctQueryName(option.label.props.children[0].props.children.props); }else{
props.searchUserList({queryName:value},treeType,1); param.id = option.label.props.depId;
}
props.searchUserList(param,treeType,1);
} }
// 获取关键词的搜索结果 // 获取关键词的搜索结果
function getCompleteOptionData(value){ function getCompleteOptionData(value){
// setQueryName(value); // setQueryName(value);
setCompleteOption([]);
console.log("treeType",props.treeType); console.log("treeType",props.treeType);
const params = { const params = {
depType:DepType[props.treeType], depType:DepType[props.treeType],
...@@ -326,7 +332,7 @@ function LeftStructureTree(props) { ...@@ -326,7 +332,7 @@ function LeftStructureTree(props) {
let content= '删除后,该岗位组下的岗位及也将全部删除。'; let content= '删除后,该岗位组下的岗位及也将全部删除。';
if(record.departmentCount && record.departmentCount>0 ){ if(record.departmentCount && record.departmentCount>0 ){
title = '删除失败'; title = '删除失败';
if(record.level>0){ if(record.depLevel>0){
content = `${record.name}存在学员,不能删除该岗位`; content = `${record.name}存在学员,不能删除该岗位`;
}else{ }else{
content = `${record.name}存在学员,不能删除该岗位组`; content = `${record.name}存在学员,不能删除该岗位组`;
......
.left-structure-tree { .left-structure-tree {
margin-right: 24px; margin-right: 17px;
width:260px; width:260px;
flex-shrink: 0;
height: calc(~'100vh - 260px'); height: calc(~'100vh - 260px');
overflow: scroll; overflow: scroll;
flex-shrink: 0; border-right:1px solid #eee;
.organization{ .organization{
overflow: scroll;
.search-con{ .search-con{
margin-bottom: 10px; margin-bottom: 10px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment