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

View File

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