Compare commits

...

2 Commits

Author SHA1 Message Date
Chengliang 62d8c9dea0 上海港湾二开去除抽屉页面岗位维度 2024-06-17 09:48:09 +08:00
Mlin 9784c9669c 港湾 2024-06-17 09:46:43 +08:00
2 changed files with 12 additions and 25 deletions

View File

@ -32,7 +32,7 @@ export default class DrawerComponents extends React.Component {
dataSource: [],
columns: [],
spinning: true,
showJob: false,
showJob: false, //
};
}
@ -70,8 +70,8 @@ export default class DrawerComponents extends React.Component {
}
//
getDeatilDatas(params, type = 'chart', showJob = '1') {
this.setState({ spinning: true, data: [], dataSource: [] });
getDeatilDatas(params, type = 'chart', showJob = '0') {
this.setState({ spinning: true });
d3.json(
'/api/bs/hrmorganization/orgchart/getDepartmentDetail?' +
qs.stringify({ detauleType: type, ...params, showJob }),
@ -315,6 +315,9 @@ export default class DrawerComponents extends React.Component {
d.data.companyWorkYear
} ${getLabel(547526, labelData)}</span>
</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;">
<span>岗位: ${d.data.jobName}</span>
</div>
</div>
</div>
</div>`;
@ -322,18 +325,21 @@ export default class DrawerComponents extends React.Component {
};
showDrawer = (params) => {
this.getDeatilDatas(params, 'chart', '0');
//
const showJob = '0';
this.getDeatilDatas(params, 'chart', showJob);
this.setState({ open: true, params: params });
};
onClose = () => {
this.setState({ open: false, detailType: 'chart', showJob: false });
this.setState({ open: false, detailType: 'chart', showJob: false });
};
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,
});
@ -375,25 +381,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',
);
}}
>
{getLabel(547447, labelData)}
</Checkbox>
)}
<Dropdown overlay={menu}>
<Button type="primary">{getLabel(547314, labelData)}</Button>
</Dropdown>

View File

@ -305,7 +305,7 @@ export class TopBar extends React.Component {
</Tooltip>
</Col>
<Col span={16}>
<Button
{/* <Button
type="primary"
style={{ marginRight: '10px' }}
disabled={disabled}