部门管理
This commit is contained in:
parent
a710334a37
commit
6e5eec06fe
|
|
@ -45,6 +45,19 @@ export const version = (params) => {
|
|||
return WeaTools.callApi('/api/bs/hrmorganization/version/departmentfielddefined/save', 'POST', params);
|
||||
}
|
||||
|
||||
|
||||
export const exportData = (ids) => {
|
||||
fetch('/api/bs/hrmorganization/common/department/export').then(res => res.blob().then(blob => {
|
||||
var filename=`部门档案.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
}))
|
||||
}
|
||||
|
||||
export const selectVersions = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/version/departmentfielddefined/getVersion', 'GET', params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-06-02 09:19:37
|
||||
* @LastEditTime: 2023-07-26 18:46:24
|
||||
* @LastEditTime: 2023-09-21 18:55:33
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
||||
*/
|
||||
|
|
@ -130,7 +130,15 @@ export default class Department extends React.Component {
|
|||
department.setNeDialogTitle(i18n.label.newDept());
|
||||
department.setNewVisible(true);
|
||||
department.getDeptForm();
|
||||
}
|
||||
|
||||
export() {
|
||||
const {
|
||||
department
|
||||
} = this.props;
|
||||
|
||||
department.exportData();
|
||||
|
||||
}
|
||||
|
||||
//联查岗位
|
||||
|
|
@ -385,33 +393,33 @@ export default class Department extends React.Component {
|
|||
<Menu>
|
||||
<Menu.Item key="0">
|
||||
<a href='javascript:void(0);' onClick={() => {
|
||||
_this.view(record.id)
|
||||
}}>查看</a>
|
||||
_this.view(record.id)
|
||||
}}>查看</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="1" disabled={record.isUsed === 0 ? false : true} style={record.isUsed === 0 ? { display: 'block' } : { display: 'none' }}>
|
||||
<a href='javascript:void(0);' onClick={() => {
|
||||
_this.doDel(record.id)
|
||||
}}>删除</a>
|
||||
_this.doDel(record.id)
|
||||
}}>删除</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="2">
|
||||
<a href='javascript:void(0);' onClick={() => {
|
||||
_this.merge(record.id)
|
||||
}}>合并</a>
|
||||
_this.merge(record.id)
|
||||
}}>合并</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="3">
|
||||
<a href='javascript:void(0);' onClick={() => {
|
||||
_this.transfer(record.id)
|
||||
}}>转移</a>
|
||||
_this.transfer(record.id)
|
||||
}}>转移</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="4">
|
||||
<a href='javascript:void(0);' onClick={() => {
|
||||
_this.select(record.id)
|
||||
}}>联查岗位</a>
|
||||
_this.select(record.id)
|
||||
}}>联查岗位</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="5">
|
||||
<a href='javascript:void(0);' onClick={() => {
|
||||
_this.copy(record.id)
|
||||
}}>复制</a>
|
||||
_this.copy(record.id)
|
||||
}}>复制</a>
|
||||
</Menu.Item>
|
||||
{/* <Menu.Item key="6">
|
||||
<a href='javascript:void(0);' onClick={() => { _this.version(record) }}>另存为版本</a>
|
||||
|
|
@ -472,8 +480,8 @@ export default class Department extends React.Component {
|
|||
|
||||
const btn = [
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
|
||||
department.setCurrent(1); department.setPageSize(10); department.getTableInfo(); department.setPanelStatus(false)
|
||||
}}>{i18n.button.search()}</Button>),
|
||||
department.setCurrent(1); department.setPageSize(10); department.getTableInfo(); department.setPanelStatus(false)
|
||||
}}>{i18n.button.search()}</Button>),
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>),
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => department.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -386,6 +386,13 @@ export class DepartmentStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action("全部导出") exportData() {
|
||||
Api.exportData().then(res => {
|
||||
}, error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
updateFields(val) {
|
||||
this.form.updateFields({
|
||||
|
|
|
|||
Loading…
Reference in New Issue