Merge pull request '修复已知功能' (#46) from feature/cl into dev
Reviewed-on: http://221.226.25.34:3000/liang.cheng/trunk/pulls/46
This commit is contained in:
commit
fa78430b8f
|
|
@ -46,16 +46,19 @@ export const version = (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 exportData = () => {
|
||||
return new Promise(resolve => {
|
||||
fetch('/api/bs/hrmorganization/common/department/export').then(res => res.blob().then(blob => {
|
||||
resolve();
|
||||
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) => {
|
||||
|
|
|
|||
|
|
@ -49,15 +49,18 @@ export const version = (params) => {
|
|||
}
|
||||
|
||||
export const exportResource = (ids) => {
|
||||
fetch('/api/bs/hrmorganization/common/resource/export?ids='+ids).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);
|
||||
}))
|
||||
return new Promise(resolve => {
|
||||
fetch('/api/bs/hrmorganization/common/resource/export?ids='+ids).then(res => res.blob().then(blob => {
|
||||
resolve();
|
||||
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);
|
||||
}))
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -622,7 +622,7 @@ export default class Department extends React.Component {
|
|||
isPanelShow, departmentName, conditionNum, visible, condition, form,
|
||||
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
|
||||
form1, isEdit, newVisible, jobDataSource, jobColumns, selectedRowKeys, total, current, pageSize, init,
|
||||
defaultShowLeft, confirmVisible, confirmLoading, postionDataSource, postionColumns, isMerge, hasRight
|
||||
defaultShowLeft, confirmVisible, confirmLoading, postionDataSource, postionColumns, isMerge, hasRight,exSpinning
|
||||
} = department;
|
||||
|
||||
if (hasRight === false) {
|
||||
|
|
@ -690,6 +690,7 @@ export default class Department extends React.Component {
|
|||
}}
|
||||
onSearchChange={val => this.onSearchChange(val)}
|
||||
/>
|
||||
<Spin size="large" spinning={exSpinning} tip="正在导出请稍候...." className="hrm-loading-center-small"/>
|
||||
{
|
||||
init ? <div className='hrm-new-weatable-spin'>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={init}></Spin>
|
||||
|
|
|
|||
|
|
@ -43,8 +43,6 @@ import SearchCustomDialog from './SearchCustomDialog';
|
|||
import NewWeaTableEditDialog from '../NewWeaTableEditDialog';
|
||||
import GroupList from './GroupList';
|
||||
|
||||
|
||||
|
||||
const toJS = mobx.toJS;
|
||||
const confirm = Modal.confirm;
|
||||
const WeaTable = WeaTableNew.WeaTable;
|
||||
|
|
@ -506,7 +504,7 @@ export default class Resource extends React.Component {
|
|||
} = this.props;
|
||||
const {
|
||||
isPanelShow, form2, lastName, conditionNum, tableStore, nEdialogTitle, visible, condition,
|
||||
form, dialogLoading, isEdit, date, hasRight, defaultShowLeft,enable
|
||||
form, dialogLoading, isEdit, date, hasRight, defaultShowLeft,enable,exSpinning
|
||||
} = store;
|
||||
|
||||
if (hasRight === false) {
|
||||
|
|
@ -544,6 +542,7 @@ export default class Resource extends React.Component {
|
|||
onSearch={() => {store.hideRadioGroup();store.getTableInfo();}}
|
||||
onSearchChange={val => this.onSearchChange(val)}
|
||||
/>
|
||||
<Spin size="large" spinning={exSpinning} tip="正在导出请稍候...." className="hrm-loading-center-small"/>
|
||||
{enable && <GroupList ecId={`${this && this.props && this.props.ecId || ''}_GroupList@2le78y`} store={store} />}
|
||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
||||
comsWeaTableStore={tableStore}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ export class DepartmentStore {
|
|||
@observable confirmLoading = true;
|
||||
@observable isMerge = true;
|
||||
@observable hasRight = '';
|
||||
@observable exSpinning = false;
|
||||
|
||||
@observable selectTreeNodeInfo;
|
||||
saveAndSetting = false;
|
||||
|
|
@ -386,11 +387,10 @@ export class DepartmentStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action("全部导出") exportData() {
|
||||
Api.exportData().then(res => {
|
||||
}, error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
@action("全部导出") async exportData() {
|
||||
this.exSpinning = true;
|
||||
await Api.exportData();
|
||||
this.exSpinning = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export class ResourceStore {
|
|||
@observable dialogLoading = true;
|
||||
@observable userId = '';
|
||||
@observable date = '';
|
||||
@observable exSpinning = false;
|
||||
|
||||
@observable defaultShowLeft = true;
|
||||
@observable companysId = 1
|
||||
|
|
@ -60,7 +61,7 @@ export class ResourceStore {
|
|||
@observable selectTreeNodeInfo;
|
||||
|
||||
@observable enable = false;
|
||||
@observable _showRadioGroup = true;
|
||||
@observable _showRadioGroup = false;
|
||||
@computed get showRadioGroup() { return this._showRadioGroup }
|
||||
set showRadioGroup(v) {
|
||||
this._showRadioGroup = v;
|
||||
|
|
@ -246,12 +247,15 @@ export class ResourceStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action("导出") export() {
|
||||
@action("导出") async export() {
|
||||
const params = {
|
||||
...this.form.getFormParams()
|
||||
}
|
||||
Api.exportResource(toJS(this.tableStore.selectedRowKeys).toString());
|
||||
this.exSpinning = true;
|
||||
await Api.exportResource(toJS(this.tableStore.selectedRowKeys).toString());
|
||||
this.exSpinning = false;
|
||||
this.tableStore.selectedRowKeys = [];
|
||||
|
||||
}
|
||||
|
||||
@action("另存为版本") version(id) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
left: 50%;
|
||||
margin-left: -8px;
|
||||
margin-top: -8px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -141,4 +142,9 @@
|
|||
max-width: 200px;
|
||||
}
|
||||
|
||||
//weaLeftTree
|
||||
.wea-left-tree-antd.ant-tree .wea-tree-wrap>span.ant-tree-switcher {
|
||||
width: 13px !important;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue