@ -20,6 +20,7 @@ import './index.less';
let addNodeChildFunc = null ;
let orgChart = null ;
let active = 'top' ;
let compact = 0 ;
export default class DrawerComponents extends React . Component {
constructor ( props ) {
super ( props ) ;
@ -31,7 +32,7 @@ export default class DrawerComponents extends React.Component {
dataSource : [ ] ,
columns : [ ] ,
spinning : true ,
showJob : tru e,
showJob : fals e,
} ;
}
@ -39,6 +40,15 @@ export default class DrawerComponents extends React.Component {
/ / 点 击 节 点
onNodeClick ( node ) { }
/ / o n N o d e C l i c k = ( n o d e ) = > {
/ / i f ( n o d e . f t y p e = = ' 2 ' | | n o d e . f t y p e = = ' 4 ' ) {
/ / o r g C h a r t & &
/ / o r g C h a r t
/ / . c o m p a c t ( f a l s e )
/ / . r e n d e r ( )
/ / . f i t ( ) ;
/ / }
/ / } ;
onButtonClick ( event , d ) {
if ( d . children ) {
@ -51,6 +61,9 @@ export default class DrawerComponents extends React.Component {
if ( idsList . length == 0 ) {
return ;
}
orgChart && orgChart . compact ( false ) . render ( ) . fit ( ) ;
} else {
orgChart && orgChart . compact ( false ) . render ( ) . fit ( ) ;
}
}
@ -239,7 +252,11 @@ export default class DrawerComponents extends React.Component {
< img src = "./img/department.png" style = "width: 58px; height: 58px;position:absolute;left:29px; border-radius: 50%; margin-top: 16px;position:absolute;left:29px;z-index:999" / >
< / div >
< div style = "display: inline-block; margin-left: 6px;width: 55%" >
< div class = "dept-box" style = "font-size: 15px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 900;color: #333333;height: 25px;line-height: 25px;width:110px,white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" >
< div class = "dept-box" onclick = " if ( $ {
d . data . smsFj
} == 0 ) return alert ( '该部门未维护部门说明书' ) ; window . open ( '/spa/document/index2file.jsp?imagefileId=' + $ {
d . data . smsFj
} ) " style=" font - size : 15 px ; font - family : Microsoft YaHei - Regular , Microsoft YaHei ; font - weight : 900 ; color : # 333333 ; height : 25 px ; line - height : 25 px ; width : 110 px , white - space : nowrap ; overflow : hidden ; text - overflow : ellipsis ; " >
$ { d . data . fname }
< / div >
< div style = "font-size: 13px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;height: 25px;line-height: 25px;" >
@ -284,13 +301,20 @@ export default class DrawerComponents extends React.Component {
} " style=" width : 58 px ; height : 58 px ; border - radius : 50 % ; margin - top : 16 px ; margin - left : - 6 px ; z - index : 999 " / >
< / div >
< div style = "display: inline-block; margin-left: 6px;width: 55%;height:100%" >
< div style = 'display:flex;align-items:center;height: 25px;line-height: 25px;margin-top:15px' >
< div style = "font-weight: bold;font-size: 15px;ont-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;" > ${
d . data . fname
} < / div >
< / div >
< div style = "font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;display: flex;height: 25px;line-height: 25px;" >
< div style = "font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;height: 25px;line-height: 25px;" >
< div onclick = " if ( ${
d . data . jobFj
} == 0 ) return alert ( '该岗位未维护岗位说明书' ) ; window . open ( '/spa/document/index2file.jsp?id=' + $ {
d . data . jobFj
} ) " > 岗位 : $ { d . data . jobTitle } < / div >
< span > 司龄 : $ { d . data . companyWorkYear } 年 < / span >
< div style = 'display:flex;align-items:center;height: 25px;line-height: 25px;margin-top:15px' >
< div onclick = " window.open ( ' / spa / hrm / index_mobx.html # / main / hrm / card / cardInfo / ' + $ {
d . data . id
} ) " style=" font - weight : bold ; font - size : 15 px ; ont - family : Microsoft YaHei - Bold , Microsoft YaHei ; color : # 333333 ; " > $ {
d . data . fname
} < / div >
< / div >
< / div >
< / div >
< / div >
@ -299,19 +323,19 @@ export default class DrawerComponents extends React.Component {
} ;
showDrawer = ( params ) => {
const showJob = params . fclass == '0' ? '1' : '0' ;
const showJob = '0' ;
this . getDeatilDatas ( params , 'chart' , showJob ) ;
this . setState ( { open : true , params : params } ) ;
} ;
onClose = ( ) => {
this . setState ( { open : false , detailType : 'chart' , showJob : tru e } ) ;
this . setState ( { open : false , detailType : 'chart' , showJob : fals e } ) ;
} ;
changeDetail = ( ) => {
const { detailType , params } = this . state ;
let type = detailType == 'chart' ? 'table' : 'chart' ;
const showJob = this . state . showJob ? '1' : '0' ;
const showJob = '0' ;
this . setState ( {
detailType : type ,
} ) ;
@ -350,25 +374,6 @@ export default class DrawerComponents extends React.Component {
} }
extra = {
< Space >
{ detailType == 'chart' && params && params . fclass == '0' && (
< Checkbox
style = { { marginTop : '5px' , marginLeft : 100 } }
checked = { showJob }
onChange = { ( e ) => {
this . setState ( {
showJob : e . target . checked ,
} ) ;
this . getDeatilDatas (
params ,
detailType ,
e . target . checked ? '1' : '0' ,
) ;
} }
>
是否显示岗位
< / Checkbox >
) }
< Dropdown overlay = { menu } >
< Button type = "primary" > 导出 < / Button >
< / Dropdown >