2022-05-25 15:39:34 +08:00
|
|
|
import {
|
|
|
|
|
WeaPopoverHrm,
|
|
|
|
|
WeaLocaleProvider
|
|
|
|
|
} from 'ecCom';
|
|
|
|
|
import {
|
|
|
|
|
WeaLogView
|
|
|
|
|
} from 'comsMobx';
|
|
|
|
|
import {
|
|
|
|
|
isEnableMultiLang
|
|
|
|
|
} from '../apis/common';
|
|
|
|
|
const WeaLogViewComp = WeaLogView.Component;
|
|
|
|
|
const {
|
|
|
|
|
LogStore
|
|
|
|
|
} = WeaLogView;
|
2022-07-07 18:06:02 +08:00
|
|
|
import LogView from "./log/LogView";
|
2022-07-05 18:54:56 +08:00
|
|
|
|
|
|
|
|
import {LogViewStore} from "../stores/logview"
|
2022-05-25 15:39:34 +08:00
|
|
|
|
|
|
|
|
class Home extends React.Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
2022-07-05 18:54:56 +08:00
|
|
|
keys: new Date().getTime(),
|
2022-05-25 15:39:34 +08:00
|
|
|
visible: false,
|
2022-07-05 18:54:56 +08:00
|
|
|
logViewStore: new LogViewStore()
|
|
|
|
|
|
2022-05-25 15:39:34 +08:00
|
|
|
}
|
2022-07-05 18:54:56 +08:00
|
|
|
window.setLogViewProp = this.setLogViewProp;
|
2022-05-25 15:39:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
isEnableMultiLang().then(data => {
|
|
|
|
|
window.inputType = {
|
|
|
|
|
inputType: 'NORMAL'
|
|
|
|
|
}
|
|
|
|
|
if (data.status === '1') {
|
|
|
|
|
if (data.isEnableMultiLang) {
|
|
|
|
|
window.inputType = {
|
|
|
|
|
inputType: 'MULTILANG',
|
|
|
|
|
isBase64: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, error => {
|
|
|
|
|
window.inputType = {
|
|
|
|
|
inputType: 'NORMAL'
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-05 18:54:56 +08:00
|
|
|
setLogViewProp = (props) => {
|
2022-05-25 15:39:34 +08:00
|
|
|
this.setState({
|
|
|
|
|
visible: true,
|
2022-07-05 18:54:56 +08:00
|
|
|
logViewStore: new LogViewStore(),
|
2022-05-25 15:39:34 +08:00
|
|
|
...props
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
onCancel = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
visible: false
|
|
|
|
|
})
|
|
|
|
|
}
|
2022-07-05 18:54:56 +08:00
|
|
|
|
2022-05-25 15:39:34 +08:00
|
|
|
render() {
|
|
|
|
|
//const isSingle = window.location.pathname.indexOf('/spa/hrm/engine') > -1;
|
|
|
|
|
return (
|
|
|
|
|
<div style={{height:"100%"}}>
|
2022-07-11 10:06:45 +08:00
|
|
|
<WeaPopoverHrm inDialog={true} ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@jp3tsb`} />
|
2022-07-05 18:54:56 +08:00
|
|
|
<LogView ecId={`${this && this.props && this.props.ecId || ''}_LogView@mc1954`} {...this.state} onCancel={this.onCancel}/>
|
|
|
|
|
{/* <WeaLogViewComp ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@mc1954`} {...this.state} onCancel={this.onCancel}/> */}
|
2022-05-25 15:39:34 +08:00
|
|
|
<WeaLocaleProvider ecId={`${this && this.props && this.props.ecId || ''}_WeaLocaleProvider@3on3aj`}>
|
|
|
|
|
{this.props.children}
|
|
|
|
|
</WeaLocaleProvider>
|
2022-07-05 18:54:56 +08:00
|
|
|
|
2022-05-25 15:39:34 +08:00
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Home
|