salary-management-front/pc4mobx/hrmSalary/pages/reportView/components/rightOptions.js

56 lines
1.8 KiB
JavaScript
Raw Normal View History

2023-04-23 11:28:18 +08:00
/*
* Author: 黎永顺
* name: 内容操作按钮区
* Description:
* Date: 2023/4/21
*/
import React, { Component } from "react";
2023-04-24 18:30:47 +08:00
import { WeaLocaleProvider } from "ecCom";
2023-04-23 11:28:18 +08:00
import "../index.less";
2023-04-24 18:30:47 +08:00
const { getLabel } = WeaLocaleProvider;
2023-04-23 11:28:18 +08:00
class RightOptions extends Component {
constructor(props) {
super(props);
this.state = {
show: true
};
}
render() {
const { onChange, isShare } = this.props;
2023-04-23 11:28:18 +08:00
const { show } = this.state;
return (
<div className="layoutSide" style={{ width: show ? "30px" : 0 }}>
<div className="sideBox">
<div className="sideMain">
<div className="toll-bar-container" style={{ alignItems: show && "center" }}>
2023-05-12 10:18:39 +08:00
<i className="icon-coms-background" title={getLabel(111, "数据视图")}
onClick={() => onChange("", "dataView")}/>
<i className="icon-portal-reportform-o" title={getLabel(111, "柱状图")}
onClick={() => onChange("1", "bar")}/>
<i className="icon-coms-Line" title={getLabel(111, "折线图")} onClick={() => onChange("2", "line")}/>
<i className="icon-coms-Pie" title={getLabel(111, "饼图")} onClick={() => onChange("0", "pie")}/>
{
!isShare &&
<i className="icon-coms-Flow-setting" title={getLabel(111, "设置")}
onClick={() => onChange("1", "setting")}/>
}
2023-04-23 11:28:18 +08:00
</div>
</div>
<span className="show-btn-right"
onClick={() => this.setState({ show: !show })}>
{
show ? <img src={require("../../../common/leftTree-show.png")} alt=""/> :
<img src={require("../../../common/leftTree-hide.png")} alt=""/>
}
</span>
</div>
</div>
);
}
}
export default RightOptions;