#QC3421143# 基本状况分析明细数据,工龄状况修改为司龄状况
This commit is contained in:
parent
a4535b2ceb
commit
b73ef8e8a5
|
|
@ -1,7 +1,4 @@
|
|||
import {
|
||||
inject,
|
||||
observer,
|
||||
} from 'mobx-react';
|
||||
import { inject, observer } from 'mobx-react'
|
||||
|
||||
import {
|
||||
WeaTop,
|
||||
|
|
@ -10,15 +7,13 @@ import {
|
|||
WeaRightMenu,
|
||||
WeaRadioGroup,
|
||||
WeaMoreButton,
|
||||
} from 'ecCom';
|
||||
|
||||
WeaLocaleProvider,
|
||||
WeaDialog
|
||||
} from 'ecCom'
|
||||
import {
|
||||
Row,
|
||||
Col,
|
||||
Tabs,
|
||||
Spin,
|
||||
Button,
|
||||
} from 'antd'
|
||||
WeaTableNew
|
||||
} from 'comsMobx'
|
||||
import { Row, Col, Tabs, Spin, Button } from 'antd'
|
||||
|
||||
import React from 'react'
|
||||
import * as mobx from 'mobx'
|
||||
|
|
@ -27,114 +22,168 @@ import RadioGroupWrapper from './RadioGroupWrapper'
|
|||
import ReportChart from './ReportChart'
|
||||
import DataStatistics from './DataStatistics'
|
||||
import More from './More'
|
||||
import {addContentPath} from '../../util/index.js'
|
||||
import { addContentPath } from '../../util/index.js'
|
||||
|
||||
import '../../style/report.css';
|
||||
import {
|
||||
i18n
|
||||
} from '../../public/i18n';
|
||||
import {Authority} from '../../public/coms/index.js';
|
||||
import '../../style/report.css'
|
||||
import { i18n } from '../../public/i18n'
|
||||
import { Authority } from '../../public/coms/index.js'
|
||||
|
||||
const toJS = mobx.toJS;
|
||||
const TabPane = Tabs.TabPane;
|
||||
const toJS = mobx.toJS
|
||||
const TabPane = Tabs.TabPane
|
||||
const getLabel = WeaLocaleProvider.getLabel
|
||||
|
||||
const WeaTable = WeaTableNew.WeaTable;
|
||||
|
||||
@inject('hrmPerStatusReport')
|
||||
|
||||
@observer
|
||||
class BasicConditionAnalysis extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
constructor (props) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
this.pre();
|
||||
componentWillMount () {
|
||||
this.pre()
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const{hrmPerStatusReport:store}=this.props;
|
||||
store.getRight().then(hasRight=>{
|
||||
hasRight && this.init();
|
||||
componentDidMount () {
|
||||
const { hrmPerStatusReport: store } = this.props
|
||||
store.getRight().then(hasRight => {
|
||||
hasRight && this.init()
|
||||
})
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
componentWillReceiveProps (nextProps) {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
|
||||
if (this.props.location.key !== nextProps.location.key) {
|
||||
this.pre(nextProps);
|
||||
hrmPerStatusReport.optionReset();
|
||||
hrmPerStatusReport.conditionReset();
|
||||
hrmPerStatusReport.paramReset();
|
||||
hrmPerStatusReport.apiFinishedStatusReset();
|
||||
hrmPerStatusReport.getSearchCondition();
|
||||
hrmPerStatusReport.tabKeyReset();
|
||||
this.refs.page && this.refs.page.click();
|
||||
this.init();
|
||||
this.pre(nextProps)
|
||||
hrmPerStatusReport.optionReset()
|
||||
hrmPerStatusReport.conditionReset()
|
||||
hrmPerStatusReport.paramReset()
|
||||
hrmPerStatusReport.apiFinishedStatusReset()
|
||||
hrmPerStatusReport.getSearchCondition()
|
||||
hrmPerStatusReport.tabKeyReset()
|
||||
this.refs.page && this.refs.page.click()
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
|
||||
pre(nextProps) {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
let pathname;
|
||||
pre (nextProps) {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
let pathname
|
||||
|
||||
if (!nextProps) {
|
||||
pathname = this.props.location.pathname.split('/').pop();
|
||||
pathname = this.props.location.pathname.split('/').pop()
|
||||
} else {
|
||||
pathname = nextProps.location.pathname.split('/').pop();
|
||||
pathname = nextProps.location.pathname.split('/').pop()
|
||||
}
|
||||
|
||||
hrmPerStatusReport.optionReset();
|
||||
hrmPerStatusReport.setPathName(pathname);
|
||||
hrmPerStatusReport.pathToTitle();
|
||||
hrmPerStatusReport.getCurWindowWidth();
|
||||
hrmPerStatusReport.optionReset()
|
||||
hrmPerStatusReport.setPathName(pathname)
|
||||
hrmPerStatusReport.pathToTitle()
|
||||
hrmPerStatusReport.getCurWindowWidth()
|
||||
}
|
||||
|
||||
init() {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
const {
|
||||
pathname
|
||||
} = hrmPerStatusReport;
|
||||
hrmPerStatusReport.setKey('1');
|
||||
if (pathname !== 'basicConditionAnalysis') hrmPerStatusReport.setIntervalShow(false);
|
||||
init () {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
const { pathname } = hrmPerStatusReport
|
||||
hrmPerStatusReport.setKey('1')
|
||||
if (pathname !== 'basicConditionAnalysis')
|
||||
hrmPerStatusReport.setIntervalShow(false)
|
||||
}
|
||||
|
||||
getTabPanes() {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
const {
|
||||
tabKey
|
||||
} = hrmPerStatusReport;
|
||||
getTabPanes () {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
const { tabKey } = hrmPerStatusReport
|
||||
return (
|
||||
<div style={{margin: '8px 16px'}}>
|
||||
<Tabs ecId={`${this && this.props && this.props.ecId || ''}_Tabs@gs0hfe`} activeKey={tabKey} onTabClick={key => {hrmPerStatusReport.setKey(key); hrmPerStatusReport.getData()}} type="card">
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@9cn3g1`} tab={i18n.label.ageStatus()} key="1"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@esi1fz`} tab={i18n.label.genderStatus()} key="2"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@7y3472`} tab={i18n.label.workingAgeStatus()} key="3"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@b43k25`} tab={i18n.label.eduStatus()} key="4"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@wlbzlu`} tab={i18n.label.maritalStatus()} key="5"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@uzc70h`} tab={i18n.label.proTitleStatus()} key="6"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@g0s8cy`} tab={i18n.label.rankStatus()} key="7"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@w5q6jf`} tab={i18n.label.workNature()} key="10"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@4fswhv`} tab={i18n.label.stateStatistics()} key="11"></TabPane>
|
||||
<TabPane ecId={`${this && this.props && this.props.ecId || ''}_TabPane@k2w6ke`} tab={i18n.label.securtitylevel()} key="12"></TabPane>
|
||||
<div style={{ margin: '8px 16px' }}>
|
||||
<Tabs
|
||||
ecId={`${(this && this.props && this.props.ecId) || ''}_Tabs@gs0hfe`}
|
||||
activeKey={tabKey}
|
||||
onTabClick={key => {
|
||||
hrmPerStatusReport.setKey(key)
|
||||
hrmPerStatusReport.getData()
|
||||
}}
|
||||
type='card'
|
||||
>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@9cn3g1`}
|
||||
tab={i18n.label.ageStatus()}
|
||||
key='1'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@esi1fz`}
|
||||
tab={i18n.label.genderStatus()}
|
||||
key='2'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@7y3472`}
|
||||
tab={getLabel('548320', '司龄状况')}
|
||||
key='3'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@b43k25`}
|
||||
tab={i18n.label.eduStatus()}
|
||||
key='4'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@wlbzlu`}
|
||||
tab={i18n.label.maritalStatus()}
|
||||
key='5'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@uzc70h`}
|
||||
tab={i18n.label.proTitleStatus()}
|
||||
key='6'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@g0s8cy`}
|
||||
tab={i18n.label.rankStatus()}
|
||||
key='7'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@w5q6jf`}
|
||||
tab={i18n.label.workNature()}
|
||||
key='10'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@4fswhv`}
|
||||
tab={i18n.label.stateStatistics()}
|
||||
key='11'
|
||||
></TabPane>
|
||||
<TabPane
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_TabPane@k2w6ke`}
|
||||
tab={i18n.label.securtitylevel()}
|
||||
key='12'
|
||||
></TabPane>
|
||||
</Tabs>
|
||||
{this.getChart(hrmPerStatusReport.getTabName())}
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
getChart(tagName) {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
getChart (tagName) {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
const {
|
||||
option1,
|
||||
option2,
|
||||
|
|
@ -150,64 +199,73 @@ class BasicConditionAnalysis extends React.Component {
|
|||
ids,
|
||||
yAxisData,
|
||||
linkList,
|
||||
winWidth
|
||||
} = hrmPerStatusReport;
|
||||
winWidth,
|
||||
cmd
|
||||
} = hrmPerStatusReport
|
||||
|
||||
return (
|
||||
<ReportChart ecId={`${this && this.props && this.props.ecId || ''}_ReportChart@8tx6up`}
|
||||
option={[toJS(option1), toJS(option2)]}
|
||||
isIntervalShow={isIntervalShow}
|
||||
interval={interval}
|
||||
tabKey={tabKey}
|
||||
<ReportChart
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_ReportChart@8tx6up`}
|
||||
option={[toJS(option1), toJS(option2)]}
|
||||
isIntervalShow={isIntervalShow}
|
||||
interval={interval}
|
||||
tabKey={tabKey}
|
||||
pathname={pathname}
|
||||
chartTitle={[typeof(chartTitle1) == 'function' ? `${chartTitle1()}(Top5)` : chartTitle1, typeof(chartTitle2) == 'function' ? `${chartTitle2()}(Top5)` : chartTitle2]}
|
||||
chartTitle={[
|
||||
typeof chartTitle1 == 'function'
|
||||
? `${chartTitle1()}(Top5)`
|
||||
: chartTitle1,
|
||||
typeof chartTitle2 == 'function'
|
||||
? `${chartTitle2()}(Top5)`
|
||||
: chartTitle2
|
||||
]}
|
||||
isChartsShow={[isEchartsShow, isLeftEchartsShow, isRightEchartsShow]}
|
||||
ids={toJS(ids)}
|
||||
yAxisData={toJS(yAxisData)}
|
||||
linkList={linkList}
|
||||
tagName={tagName}
|
||||
cmd={cmd}
|
||||
winWidth={winWidth}
|
||||
setGap={(val) => hrmPerStatusReport.setGap(val)}
|
||||
getData={(tag) => hrmPerStatusReport.getData(tag)}
|
||||
setGap={val => hrmPerStatusReport.setGap(val)}
|
||||
getData={tag => hrmPerStatusReport.getData(tag)}
|
||||
showDialog = {() => hrmPerStatusReport.setDialogVisible(true)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
getDeadline() {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
const {
|
||||
deadline
|
||||
} = hrmPerStatusReport;
|
||||
getDeadline () {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
const { deadline } = hrmPerStatusReport
|
||||
|
||||
return (
|
||||
<div style={{color: '#989898', marginTop: 4, marginRight: 16}}>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@9z095w`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@mifi75`}>
|
||||
<p style={{textAlign: 'right'}}>{deadline}</p>
|
||||
<div style={{ color: '#989898', marginTop: 4, marginRight: 16 }}>
|
||||
<Row
|
||||
ecId={`${(this && this.props && this.props.ecId) || ''}_Row@9z095w`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${(this && this.props && this.props.ecId) || ''}_Col@mifi75`}
|
||||
>
|
||||
<p style={{ textAlign: 'right' }}>{deadline}</p>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
search(v) {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
hrmPerStatusReport.setSearchCondition(v);
|
||||
hrmPerStatusReport.getData('search');
|
||||
search (v) {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
hrmPerStatusReport.setSearchCondition(v)
|
||||
hrmPerStatusReport.getData('search')
|
||||
}
|
||||
|
||||
handleMenuClick(key) {
|
||||
if (key == '0') this.refs.a.click();
|
||||
handleMenuClick (key) {
|
||||
if (key == '0') this.refs.a.click()
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
hrmPerStatusReport
|
||||
} = this.props;
|
||||
render () {
|
||||
const { hrmPerStatusReport } = this.props
|
||||
const {
|
||||
title,
|
||||
pathname,
|
||||
|
|
@ -220,72 +278,168 @@ class BasicConditionAnalysis extends React.Component {
|
|||
isApiOneFinished,
|
||||
isApiTwoFinished,
|
||||
authorityStore,
|
||||
} = hrmPerStatusReport;
|
||||
dialogVisible
|
||||
} = hrmPerStatusReport
|
||||
|
||||
const btn = [
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@zo2az2@1`} type="primary" onClick={() => this.refs.a.click()} >
|
||||
<a ref='a' href={ addContentPath((pathname == 'departmentStatistics') ? '/api/hrm/resourceState/downloadExcel?cmd=DepartmentRp' + paramsStr: '/api/hrm/resourceState/downloadExcel?cmd=JobRp' + paramsStr)}>{i18n.button.export1()}</a>
|
||||
</Button>),
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@4f1zjp@2`} type="primary" onClick={() => this.refs.a1.click()} >
|
||||
<a href={addContentPath(href) } ref='a1'>{i18n.button.export()}</a>
|
||||
</Button>),
|
||||
(<WeaMoreButton ecId={`${this && this.props && this.props.ecId || ''}_WeaMoreButton@e4ss8c@3`} />)
|
||||
<Button
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Button@zo2az2@1`}
|
||||
type='primary'
|
||||
onClick={() => this.refs.a.click()}
|
||||
>
|
||||
<a
|
||||
ref='a'
|
||||
href={addContentPath(
|
||||
pathname == 'departmentStatistics'
|
||||
? '/api/hrm/resourceState/downloadExcel?cmd=DepartmentRp' +
|
||||
paramsStr
|
||||
: '/api/hrm/resourceState/downloadExcel?cmd=JobRp' + paramsStr
|
||||
)}
|
||||
>
|
||||
{i18n.button.export1()}
|
||||
</a>
|
||||
</Button>,
|
||||
<Button
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Button@4f1zjp@2`}
|
||||
type='primary'
|
||||
onClick={() => this.refs.a1.click()}
|
||||
>
|
||||
<a href={addContentPath(href)} ref='a1'>
|
||||
{i18n.button.export()}
|
||||
</a>
|
||||
</Button>,
|
||||
<WeaMoreButton
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaMoreButton@e4ss8c@3`}
|
||||
/>
|
||||
]
|
||||
|
||||
const btn1 = btn.slice(0, 1);
|
||||
const btn2 = btn.slice(1, 3);
|
||||
const btn1 = btn.slice(0, 1)
|
||||
const btn2 = btn.slice(1, 3)
|
||||
|
||||
const dropMenuDatas = [{
|
||||
key: '0',
|
||||
content: i18n.button.export1(),
|
||||
icon: <i className='icon-coms-leading-in' />
|
||||
}, {
|
||||
key: '1',
|
||||
content: i18n.button.more(),
|
||||
disabled: true,
|
||||
icon: <i className='icon-coms-task-list' />
|
||||
}, ]
|
||||
const dropMenuDatas = [
|
||||
{
|
||||
key: '0',
|
||||
content: i18n.button.export1(),
|
||||
icon: <i className='icon-coms-leading-in' />
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
content: i18n.button.more(),
|
||||
disabled: true,
|
||||
icon: <i className='icon-coms-task-list' />
|
||||
}
|
||||
]
|
||||
|
||||
const dropMenuDatas1 = dropMenuDatas.slice(0, 1);
|
||||
const dropMenuDatas2 = dropMenuDatas.slice(1, 2);
|
||||
const dropMenuDatas1 = dropMenuDatas.slice(0, 1)
|
||||
const dropMenuDatas2 = dropMenuDatas.slice(1, 2)
|
||||
|
||||
return (
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ''}_Authority@q2pgvy`} store={authorityStore}>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@565xx0`} spinning={ !(isApiOneFinished && isApiTwoFinished)}>
|
||||
<div style={{backgroundColor: '#fff'}} ref='page'>
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@5l9z5o`}
|
||||
datas={(pathname == 'departmentStatistics' || pathname == 'postStatistics') ? dropMenuDatas1 : dropMenuDatas2}
|
||||
onClick={(e) => this.handleMenuClick(e)}
|
||||
collectParams={{favname: title,favouritetype:5}}
|
||||
>
|
||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@qwurqz`}
|
||||
title={title}
|
||||
icon={<i className='icon-coms-hrm' />}
|
||||
iconBgcolor='#217346'
|
||||
loading={true}
|
||||
buttons={ (pathname == 'departmentStatistics' || pathname == 'postStatistics') ? btn1 : []}
|
||||
showDropIcon={true}
|
||||
dropMenuDatas={(pathname == 'departmentStatistics' || pathname == 'postStatistics') ? dropMenuDatas1 : dropMenuDatas2}
|
||||
onDropMenuClick={(e) => this.handleMenuClick(e)}
|
||||
>
|
||||
<RadioGroupWrapper ecId={`${this && this.props && this.props.ecId || ''}_RadioGroupWrapper@2kc6vr`} />
|
||||
{pathname == 'basicConditionAnalysis' ? this.getTabPanes() : ''}
|
||||
{pathname !== 'basicConditionAnalysis' ? <DataStatistics ecId={`${this && this.props && this.props.ecId || ''}_DataStatistics@9vnmnn`} countDatas={toJS(countDatas)} pathname={pathname} /> : '' }
|
||||
{pathname !== 'basicConditionAnalysis' ? this.getChart() : '' }
|
||||
{this.getDeadline()}
|
||||
</WeaTop>
|
||||
<Authority
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Authority@q2pgvy`}
|
||||
store={authorityStore}
|
||||
>
|
||||
<Spin
|
||||
ecId={`${(this && this.props && this.props.ecId) || ''}_Spin@565xx0`}
|
||||
spinning={!(isApiOneFinished && isApiTwoFinished)}
|
||||
>
|
||||
<div style={{ backgroundColor: '#fff' }} ref='page'>
|
||||
<WeaRightMenu
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaRightMenu@5l9z5o`}
|
||||
datas={
|
||||
pathname == 'departmentStatistics' ||
|
||||
pathname == 'postStatistics'
|
||||
? dropMenuDatas1
|
||||
: dropMenuDatas2
|
||||
}
|
||||
onClick={e => this.handleMenuClick(e)}
|
||||
collectParams={{ favname: title, favouritetype: 5 }}
|
||||
>
|
||||
<WeaTop
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaTop@qwurqz`}
|
||||
title={title}
|
||||
icon={<i className='icon-coms-hrm' />}
|
||||
iconBgcolor='#217346'
|
||||
loading={true}
|
||||
buttons={
|
||||
pathname == 'departmentStatistics' ||
|
||||
pathname == 'postStatistics'
|
||||
? btn1
|
||||
: []
|
||||
}
|
||||
showDropIcon={true}
|
||||
dropMenuDatas={
|
||||
pathname == 'departmentStatistics' ||
|
||||
pathname == 'postStatistics'
|
||||
? dropMenuDatas1
|
||||
: dropMenuDatas2
|
||||
}
|
||||
onDropMenuClick={e => this.handleMenuClick(e)}
|
||||
>
|
||||
<RadioGroupWrapper
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_RadioGroupWrapper@2kc6vr`}
|
||||
/>
|
||||
{pathname == 'basicConditionAnalysis' ? this.getTabPanes() : ''}
|
||||
{pathname !== 'basicConditionAnalysis' ? (
|
||||
<DataStatistics
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_DataStatistics@9vnmnn`}
|
||||
countDatas={toJS(countDatas)}
|
||||
pathname={pathname}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{pathname !== 'basicConditionAnalysis' ? this.getChart() : ''}
|
||||
{this.getDeadline()}
|
||||
</WeaTop>
|
||||
|
||||
<More ecId={`${this && this.props && this.props.ecId || ''}_More@6dxvt0`}
|
||||
title={hrmPerStatusReport.getChartTitle()}
|
||||
visible={visible}
|
||||
buttons={btn2}
|
||||
onCancel={() => hrmPerStatusReport.setVisible(false)}
|
||||
search={(v) => this.search(v)}
|
||||
tableStore={tableStore}
|
||||
loading={tableStore.loading}
|
||||
strokeColor={'#6FBCEA'}
|
||||
/>
|
||||
</WeaRightMenu>
|
||||
<More
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_More@6dxvt0`}
|
||||
title={hrmPerStatusReport.getChartTitle()}
|
||||
visible={visible}
|
||||
buttons={btn2}
|
||||
onCancel={() => hrmPerStatusReport.setVisible(false)}
|
||||
search={v => this.search(v)}
|
||||
tableStore={tableStore}
|
||||
loading={tableStore.loading}
|
||||
strokeColor={'#6FBCEA'}
|
||||
/>
|
||||
|
||||
<WeaDialog
|
||||
onCancel={() =>hrmPerStatusReport.setDialogVisible(false)}
|
||||
title={'明细数据'}
|
||||
visible={dialogVisible}
|
||||
style={{ width: 800, height: 500 }}
|
||||
hasScroll
|
||||
buttons={<Button type="primary">导出明细</Button>}
|
||||
>
|
||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
||||
comsWeaTableStore={tableStore}
|
||||
hasOrder={true}
|
||||
needScroll={true}
|
||||
//getColumns={c => this.reRenderColumns(c)}
|
||||
//onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
|
||||
/>
|
||||
</WeaDialog>
|
||||
|
||||
</WeaRightMenu>
|
||||
</div>
|
||||
</Spin>
|
||||
</Authority>
|
||||
|
|
@ -293,5 +447,4 @@ class BasicConditionAnalysis extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
export default BasicConditionAnalysis
|
||||
export default BasicConditionAnalysis
|
||||
|
|
|
|||
|
|
@ -1,169 +1,225 @@
|
|||
import {
|
||||
WeaInput,
|
||||
WeaEchart,
|
||||
} from 'ecCom'
|
||||
import { WeaInput, WeaEchart,WeaLocaleProvider } from 'ecCom'
|
||||
|
||||
import {
|
||||
Row,
|
||||
Col,
|
||||
message,
|
||||
} from 'antd';
|
||||
import {
|
||||
i18n
|
||||
} from '../../public/i18n';
|
||||
import { Row, Col, message } from 'antd'
|
||||
import { i18n } from '../../public/i18n'
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
import React from 'react'
|
||||
|
||||
import {
|
||||
jumpToHrmDept
|
||||
} from '../../util/pulic-func'
|
||||
import { jumpToHrmDept } from '../../util/pulic-func'
|
||||
|
||||
class ReportChart extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
constructor (props) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
if (this.refs.echart) this.refs.echart.paint();
|
||||
if (this.refs.echart1) this.refs.echart1.paint();
|
||||
componentDidUpdate () {
|
||||
if (this.refs.echart) this.refs.echart.paint()
|
||||
if (this.refs.echart1) this.refs.echart1.paint()
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
componentWillReceiveProps (nextProps) {
|
||||
if (this.props.winWidth !== nextProps.winWidth) {
|
||||
if (this.refs.echart) this.refs.echart.chart.resize();
|
||||
if (this.refs.echart1) this.refs.echart1.chart.resize();
|
||||
if (this.refs.echart) this.refs.echart.chart.resize()
|
||||
if (this.refs.echart1) this.refs.echart1.chart.resize()
|
||||
}
|
||||
}
|
||||
|
||||
getDOM(interval, key, setGap, getData, isIntervalShow, pathname, tag, isChartsShow, chartTitle) {
|
||||
|
||||
getDOM (
|
||||
interval,
|
||||
key,
|
||||
setGap,
|
||||
getData,
|
||||
isIntervalShow,
|
||||
pathname,
|
||||
tag,
|
||||
isChartsShow,
|
||||
chartTitle
|
||||
) {
|
||||
return (
|
||||
<div style={{position: 'absolute', right: 0}}>
|
||||
<div style={ isIntervalShow ? {display: 'block',float: 'left'} : {display: 'none'} }>
|
||||
<div className='hrm-report-interval'>
|
||||
{this.getName(key) + ':'}
|
||||
</div>
|
||||
<div style={{width: 70, paddingTop: 8, paddingLeft: 0}} className='hrm-report-interval hrm-report-input'>
|
||||
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@f9l569`}
|
||||
type="text"
|
||||
viewAttr='2'
|
||||
value={interval}
|
||||
onChange={(val) => setGap(val)}
|
||||
<div style={{ position: 'absolute', right: 0 }}>
|
||||
<div
|
||||
style={
|
||||
isIntervalShow
|
||||
? { display: 'block', float: 'left' }
|
||||
: { display: 'none' }
|
||||
}
|
||||
>
|
||||
<div className='hrm-report-interval'>{this.getName(key) + ':'}</div>
|
||||
<div
|
||||
style={{ width: 70, paddingTop: 8, paddingLeft: 0 }}
|
||||
className='hrm-report-interval hrm-report-input'
|
||||
>
|
||||
<WeaInput
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaInput@f9l569`}
|
||||
type='text'
|
||||
viewAttr='2'
|
||||
value={interval}
|
||||
onChange={val => setGap(val)}
|
||||
/>
|
||||
</div>
|
||||
<div className='hrm-report-interval' style={{paddingLeft: 0}}>
|
||||
<div className='hrm-report-interval' style={{ paddingLeft: 0 }}>
|
||||
{this.getSuffix(key)}
|
||||
</div>
|
||||
<div className='hrm-report-interval' style={{fontSize: 16}}>
|
||||
<a onClick={() => getData()} className='hrm-report-linkStyle' title={i18n.button.refresh()}>
|
||||
<div className='hrm-report-interval' style={{ fontSize: 16 }}>
|
||||
<a
|
||||
onClick={() => getData()}
|
||||
className='hrm-report-linkStyle'
|
||||
title={i18n.button.refresh()}
|
||||
>
|
||||
<i className='icon-coms-Refresh' />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style={pathname !== 'basicConditionAnalysis' ? {display: 'block', float: 'left', padding: '10px 0'} : {display: 'none'} }>
|
||||
<a onClick={() => getData(tag)} className='hrm-report-linkStyle'>{i18n.button.more()}</a>
|
||||
</div>
|
||||
<div className='hrm-report-interval' style={{padding: '8px 20px 10px 10px', fontSize: 16}}>
|
||||
{ isChartsShow ? <a onClick={() => this.getImgSrc(tag, chartTitle)} className='hrm-report-linkStyle' title={i18n.button.saveAsImage()}>
|
||||
<i className='icon-coms-download2' />
|
||||
</a>
|
||||
: <a onClick={() => {message.info(i18n.message.dataNone())}} className='hrm-report-linkStyle' title={i18n.button.saveAsImage()}>
|
||||
<i className='icon-coms-download2' />
|
||||
</a>
|
||||
<div
|
||||
style={
|
||||
pathname !== 'basicConditionAnalysis'
|
||||
? { display: 'block', float: 'left', padding: '10px 0' }
|
||||
: { display: 'none' }
|
||||
}
|
||||
>
|
||||
<a onClick={() => getData(tag)} className='hrm-report-linkStyle'>
|
||||
{i18n.button.more()}
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className='hrm-report-interval'
|
||||
style={{ padding: '8px 20px 10px 10px', fontSize: 16 }}
|
||||
>
|
||||
{isChartsShow ? (
|
||||
<a
|
||||
onClick={() => this.getImgSrc(tag, chartTitle)}
|
||||
className='hrm-report-linkStyle'
|
||||
title={i18n.button.saveAsImage()}
|
||||
>
|
||||
<i className='icon-coms-download2' />
|
||||
</a>
|
||||
) : (
|
||||
<a
|
||||
onClick={() => {
|
||||
message.info(i18n.message.dataNone())
|
||||
}}
|
||||
className='hrm-report-linkStyle'
|
||||
title={i18n.button.saveAsImage()}
|
||||
>
|
||||
<i className='icon-coms-download2' />
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
getName(key) {
|
||||
getName (key) {
|
||||
switch (key) {
|
||||
case '1':
|
||||
return i18n.label.ageRange();
|
||||
return i18n.label.ageRange()
|
||||
case '3':
|
||||
return i18n.label.workingAgeRange();
|
||||
return getLabel('548321', "司龄区间")
|
||||
case '7':
|
||||
return i18n.label.rankingInterval();
|
||||
return i18n.label.rankingInterval()
|
||||
}
|
||||
}
|
||||
|
||||
getSuffix(key) {
|
||||
getSuffix (key) {
|
||||
switch (key) {
|
||||
case '7':
|
||||
return i18n.label.level();
|
||||
return i18n.label.level()
|
||||
default:
|
||||
return i18n.label.year();
|
||||
return i18n.label.year()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getImgSrc(tag, chartTitle) {
|
||||
let cvs = document.getElementsByTagName('canvas');
|
||||
getImgSrc (tag, chartTitle) {
|
||||
let cvs = document.getElementsByTagName('canvas')
|
||||
if (tag !== 'right') {
|
||||
this.downloadCvs2Img(cvs[0], chartTitle);
|
||||
this.downloadCvs2Img(cvs[0], chartTitle)
|
||||
} else {
|
||||
this.downloadCvs2Img(cvs[1], chartTitle);
|
||||
this.downloadCvs2Img(cvs[1], chartTitle)
|
||||
}
|
||||
}
|
||||
|
||||
downloadCvs2Img(cvs, chartTitle) {
|
||||
let $a = document.createElement('a');
|
||||
$a.download = chartTitle + '.jpg';
|
||||
$a.target = '_blank';
|
||||
let url;
|
||||
downloadCvs2Img (cvs, chartTitle) {
|
||||
let $a = document.createElement('a')
|
||||
$a.download = chartTitle + '.jpg'
|
||||
$a.target = '_blank'
|
||||
let url
|
||||
if (cvs) {
|
||||
url = cvs.toDataURL("image/jpg");
|
||||
url = cvs.toDataURL('image/jpg')
|
||||
} else {
|
||||
message.info(i18n.message.dataNone());
|
||||
message.info(i18n.message.dataNone())
|
||||
}
|
||||
if (url) $a.href = url;
|
||||
if (url) $a.href = url
|
||||
if (typeof MouseEvent === 'function') {
|
||||
var evt = new MouseEvent('click', {
|
||||
view: window,
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
});
|
||||
$a.dispatchEvent(evt);
|
||||
})
|
||||
$a.dispatchEvent(evt)
|
||||
} else {
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
var bstr = atob(url.split(',')[1]);
|
||||
var n = bstr.length;
|
||||
var u8arr = new Uint8Array(n);
|
||||
var bstr = atob(url.split(',')[1])
|
||||
var n = bstr.length
|
||||
var u8arr = new Uint8Array(n)
|
||||
while (n--) {
|
||||
u8arr[n] = bstr.charCodeAt(n);
|
||||
u8arr[n] = bstr.charCodeAt(n)
|
||||
}
|
||||
var blob = new Blob([u8arr]);
|
||||
window.navigator.msSaveOrOpenBlob(blob, chartTitle + '.jpg');
|
||||
var blob = new Blob([u8arr])
|
||||
window.navigator.msSaveOrOpenBlob(blob, chartTitle + '.jpg')
|
||||
} else {
|
||||
var html = '' +
|
||||
var html =
|
||||
'' +
|
||||
'<body style="margin:0;">' +
|
||||
'<img src="' + url + '" style="max-width:100%;" title="" />' +
|
||||
'</body>';
|
||||
var tab = window.open();
|
||||
tab.document.write(html);
|
||||
'<img src="' +
|
||||
url +
|
||||
'" style="max-width:100%;" title="" />' +
|
||||
'</body>'
|
||||
var tab = window.open()
|
||||
tab.document.write(html)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
chartAction(chart, ids, yAxisData, linkList) {
|
||||
chart.off('click');
|
||||
chart.on('click', (params) => this.handleClick(params, ids, yAxisData, linkList));
|
||||
chartAction (chart, ids, yAxisData, linkList) {
|
||||
chart.off('click')
|
||||
chart.on('click', params =>
|
||||
this.handleClick(params, ids, yAxisData, linkList)
|
||||
)
|
||||
}
|
||||
|
||||
handleClick(params, ids, yAxisData, linkList) {
|
||||
const {
|
||||
pathname
|
||||
} = this.props;
|
||||
if (pathname !== 'departmentStatistics') return false;
|
||||
let anid = params.event.target.anid;
|
||||
// #QC3421143# pie图增加点击事件,弹出框显示明细
|
||||
basicChartAction = chart => {
|
||||
chart.off("click");
|
||||
chart.on("click", params => {
|
||||
this.handleBasicClick(params);
|
||||
});
|
||||
};
|
||||
|
||||
handleBasicClick (params) {
|
||||
const { pathname,cmd,showDialog } = this.props
|
||||
if (pathname !== 'basicConditionAnalysis') return false;
|
||||
if (cmd == 'AgeRp' || cmd == 'SexRp' || cmd == 'SeniorityRp' || cmd == 'EduRp') {
|
||||
console.log("params", params);
|
||||
showDialog();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
handleClick (params, ids, yAxisData, linkList) {
|
||||
const { pathname } = this.props
|
||||
if (pathname !== 'departmentStatistics') return false
|
||||
let anid = params.event.target.anid
|
||||
if (!anid) {
|
||||
return
|
||||
}
|
||||
let index = anid.split('_')[1];
|
||||
let index = anid.split('_')[1]
|
||||
jumpToHrmDept(ids[index])
|
||||
}
|
||||
|
||||
render() {
|
||||
render () {
|
||||
const {
|
||||
option,
|
||||
isIntervalShow,
|
||||
|
|
@ -178,109 +234,395 @@ class ReportChart extends React.Component {
|
|||
yAxisData,
|
||||
linkList,
|
||||
tagName
|
||||
} = this.props;
|
||||
} = this.props
|
||||
|
||||
return (
|
||||
<div style={{padding: '8px 16px'}}>
|
||||
{(pathname == 'basicConditionAnalysis') ? (<div style={{height: 500, position: 'relative'}}>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@bk161k`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@tiem4w`} span={24}>
|
||||
<div style={{ height: 50 }}>
|
||||
{this.getDOM(interval, tabKey, setGap, getData, isIntervalShow, pathname, pathname, isChartsShow[0], tagName)}
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@yyxmps`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@r3yrz9`} span={24}>
|
||||
{isChartsShow[0] ? (<div style={{height: 400}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@94v101`} ref="echart" option={option[0]} useDefault={false}/>
|
||||
</div>)
|
||||
: <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -40, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 80}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 20, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>) : ''}
|
||||
{ (pathname == 'departmentStatistics' || pathname == 'postStatistics') ? <div style={{height: 350, border: '1px solid #DDD', borderRadius: 3}}>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@xs2v2c`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@e1wc91`} span={24}>
|
||||
<div style={{height: 40, backgroundColor: '#F9F9F9', position: 'relative'}}>
|
||||
<div style={{display: 'block', width: '30%', height: '100%', float: 'left', padding: '11px 0 12px 16px' }}>{chartTitle[0]}</div>
|
||||
<div style={{ height: 50 }}>
|
||||
{this.getDOM(interval, tabKey, setGap, getData, isIntervalShow, pathname, pathname, isChartsShow[0], chartTitle[0])}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@zdbixg`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@cpfhsg`} span={20} offset={2}>
|
||||
{isChartsShow[0] ? (<div style={{height: 300}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@5ri10l`} ref="echart" option={option[0]} useDefault={false} chartAction={(chart) => this.chartAction(chart, ids, yAxisData, linkList)}/>
|
||||
</div>)
|
||||
: <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -40, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 80}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 20, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>}
|
||||
</Col>
|
||||
</Row>
|
||||
</div> : ''}
|
||||
{ (pathname == 'jobStatusStatistics') ? <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@d50f92`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@4odteb`} span={12}>
|
||||
<div style={{height: 350, marginRight: 8, border: '1px solid #DDD', borderRadius: 3}}>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@9vp3z8`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@j8v6ki`}>
|
||||
<div style={{height: 40, backgroundColor: '#F9F9F9', position: 'relative'}}>
|
||||
<div style={{height: '100%', padding: '11px 0 12px 16px', float: 'left' }}>{chartTitle[0]}</div>
|
||||
<div style={{height: 50 }}>
|
||||
{this.getDOM(interval, tabKey, setGap, getData, isIntervalShow, pathname, 'left', isChartsShow[1], chartTitle[0])}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@z1e7gk`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@6gm6oz`}>
|
||||
{isChartsShow[1] ? <div style={{height: 300}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@mgu4rb`} ref="echart" option={option[0]} useDefault={false}/>
|
||||
</div>
|
||||
: <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -20, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 50}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</Col>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@j3wbd0`} span={12}>
|
||||
<div style={{height: 350, marginLeft: 8, border: '1px solid #DDD', borderRadius: 3}}>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@kx8mey`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@d3qj2t`}>
|
||||
<div style={{height: 40, backgroundColor: '#F9F9F9', position: 'relative'}}>
|
||||
<div style={{height: '100%', padding: '11px 0 12px 16px', float: 'left' }}>{chartTitle[1]}</div>
|
||||
<div style={{ height: 50 }}>
|
||||
{this.getDOM(interval, tabKey, setGap, getData, isIntervalShow, pathname, 'right', isChartsShow[2], chartTitle[1])}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@i0dgsy`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@svragf`}>
|
||||
{isChartsShow[2] ? <div style={{height: 300}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@ohcxa9`} ref="echart1" option={option[1]} useDefault={false}/>
|
||||
</div>
|
||||
: <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -20, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 50}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</Col>
|
||||
</Row> : ''}
|
||||
</div>
|
||||
<div style={{ padding: '8px 16px' }}>
|
||||
{pathname == 'basicConditionAnalysis' ? (
|
||||
<div style={{ height: 500, position: 'relative' }}>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@bk161k`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@tiem4w`}
|
||||
span={24}
|
||||
>
|
||||
<div style={{ height: 50 }}>
|
||||
{this.getDOM(
|
||||
interval,
|
||||
tabKey,
|
||||
setGap,
|
||||
getData,
|
||||
isIntervalShow,
|
||||
pathname,
|
||||
pathname,
|
||||
isChartsShow[0],
|
||||
tagName
|
||||
)}
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@yyxmps`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@r3yrz9`}
|
||||
span={24}
|
||||
>
|
||||
{isChartsShow[0] ? (
|
||||
<div style={{ height: 400 }}>
|
||||
<WeaEchart
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaEchart@94v101`}
|
||||
ref='echart'
|
||||
option={option[0]}
|
||||
useDefault={false}
|
||||
chartAction={chart =>
|
||||
this.basicChartAction(chart)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 100,
|
||||
left: '50%',
|
||||
marginLeft: -40,
|
||||
textAlign: 'center'
|
||||
}}
|
||||
>
|
||||
<div style={{ fontSize: 80 }}>
|
||||
<i className='icon-coms-blank'></i>
|
||||
</div>
|
||||
<div style={{ fontSize: 20, color: '#B2B2B2' }}>
|
||||
{i18n.message.dataNone()}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{pathname == 'departmentStatistics' || pathname == 'postStatistics' ? (
|
||||
<div
|
||||
style={{ height: 350, border: '1px solid #DDD', borderRadius: 3 }}
|
||||
>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@xs2v2c`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@e1wc91`}
|
||||
span={24}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
height: 40,
|
||||
backgroundColor: '#F9F9F9',
|
||||
position: 'relative'
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'block',
|
||||
width: '30%',
|
||||
height: '100%',
|
||||
float: 'left',
|
||||
padding: '11px 0 12px 16px'
|
||||
}}
|
||||
>
|
||||
{chartTitle[0]}
|
||||
</div>
|
||||
<div style={{ height: 50 }}>
|
||||
{this.getDOM(
|
||||
interval,
|
||||
tabKey,
|
||||
setGap,
|
||||
getData,
|
||||
isIntervalShow,
|
||||
pathname,
|
||||
pathname,
|
||||
isChartsShow[0],
|
||||
chartTitle[0]
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@zdbixg`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@cpfhsg`}
|
||||
span={20}
|
||||
offset={2}
|
||||
>
|
||||
{isChartsShow[0] ? (
|
||||
<div style={{ height: 300 }}>
|
||||
<WeaEchart
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaEchart@5ri10l`}
|
||||
ref='echart'
|
||||
option={option[0]}
|
||||
useDefault={false}
|
||||
chartAction={chart =>
|
||||
this.chartAction(chart, ids, yAxisData, linkList)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 100,
|
||||
left: '50%',
|
||||
marginLeft: -40,
|
||||
textAlign: 'center'
|
||||
}}
|
||||
>
|
||||
<div style={{ fontSize: 80 }}>
|
||||
<i className='icon-coms-blank'></i>
|
||||
</div>
|
||||
<div style={{ fontSize: 20, color: '#B2B2B2' }}>
|
||||
{i18n.message.dataNone()}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{pathname == 'jobStatusStatistics' ? (
|
||||
<Row
|
||||
ecId={`${(this && this.props && this.props.ecId) || ''}_Row@d50f92`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@4odteb`}
|
||||
span={12}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
height: 350,
|
||||
marginRight: 8,
|
||||
border: '1px solid #DDD',
|
||||
borderRadius: 3
|
||||
}}
|
||||
>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@9vp3z8`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@j8v6ki`}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
height: 40,
|
||||
backgroundColor: '#F9F9F9',
|
||||
position: 'relative'
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
height: '100%',
|
||||
padding: '11px 0 12px 16px',
|
||||
float: 'left'
|
||||
}}
|
||||
>
|
||||
{chartTitle[0]}
|
||||
</div>
|
||||
<div style={{ height: 50 }}>
|
||||
{this.getDOM(
|
||||
interval,
|
||||
tabKey,
|
||||
setGap,
|
||||
getData,
|
||||
isIntervalShow,
|
||||
pathname,
|
||||
'left',
|
||||
isChartsShow[1],
|
||||
chartTitle[0]
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@z1e7gk`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@6gm6oz`}
|
||||
>
|
||||
{isChartsShow[1] ? (
|
||||
<div style={{ height: 300 }}>
|
||||
<WeaEchart
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaEchart@mgu4rb`}
|
||||
ref='echart'
|
||||
option={option[0]}
|
||||
useDefault={false}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 100,
|
||||
left: '50%',
|
||||
marginLeft: -20,
|
||||
textAlign: 'center'
|
||||
}}
|
||||
>
|
||||
<div style={{ fontSize: 50 }}>
|
||||
<i className='icon-coms-blank'></i>
|
||||
</div>
|
||||
<div style={{ fontSize: 15, color: '#B2B2B2' }}>
|
||||
{i18n.message.dataNone()}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</Col>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@j3wbd0`}
|
||||
span={12}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
height: 350,
|
||||
marginLeft: 8,
|
||||
border: '1px solid #DDD',
|
||||
borderRadius: 3
|
||||
}}
|
||||
>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@kx8mey`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@d3qj2t`}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
height: 40,
|
||||
backgroundColor: '#F9F9F9',
|
||||
position: 'relative'
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
height: '100%',
|
||||
padding: '11px 0 12px 16px',
|
||||
float: 'left'
|
||||
}}
|
||||
>
|
||||
{chartTitle[1]}
|
||||
</div>
|
||||
<div style={{ height: 50 }}>
|
||||
{this.getDOM(
|
||||
interval,
|
||||
tabKey,
|
||||
setGap,
|
||||
getData,
|
||||
isIntervalShow,
|
||||
pathname,
|
||||
'right',
|
||||
isChartsShow[2],
|
||||
chartTitle[1]
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Row@i0dgsy`}
|
||||
>
|
||||
<Col
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_Col@svragf`}
|
||||
>
|
||||
{isChartsShow[2] ? (
|
||||
<div style={{ height: 300 }}>
|
||||
<WeaEchart
|
||||
ecId={`${
|
||||
(this && this.props && this.props.ecId) || ''
|
||||
}_WeaEchart@ohcxa9`}
|
||||
ref='echart1'
|
||||
option={option[1]}
|
||||
useDefault={false}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 100,
|
||||
left: '50%',
|
||||
marginLeft: -20,
|
||||
textAlign: 'center'
|
||||
}}
|
||||
>
|
||||
<div style={{ fontSize: 50 }}>
|
||||
<i className='icon-coms-blank'></i>
|
||||
</div>
|
||||
<div style={{ fontSize: 15, color: '#B2B2B2' }}>
|
||||
{i18n.message.dataNone()}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default ReportChart
|
||||
export default ReportChart
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ export class HrmPerStatusReport {
|
|||
case '2':
|
||||
return getLabel('386389', "性别状况");
|
||||
case '3':
|
||||
return getLabel('386390', "工龄状况");
|
||||
return getLabel('548320', "司龄状况");
|
||||
case '4':
|
||||
return getLabel('386391', "学历状况");
|
||||
case '5':
|
||||
|
|
@ -545,6 +545,16 @@ export class HrmPerStatusReport {
|
|||
}
|
||||
}
|
||||
|
||||
/**************** #QC3421143# 基本状况分析明细数据**************************/
|
||||
@observable dialogVisible = false;
|
||||
@observable tableStore = new TableStore();
|
||||
|
||||
setDialogVisible(bool) {
|
||||
this.dialogVisible = bool;
|
||||
}
|
||||
|
||||
/**************** #QC3421143# 基本状况分析明细数据**************************/
|
||||
|
||||
setIntervalShow(bool) {
|
||||
this.isIntervalShow = bool;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue