修复已知功能
This commit is contained in:
parent
69343a6193
commit
0d83052a56
|
|
@ -46,8 +46,10 @@ export const version = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const exportData = (ids) => {
|
export const exportData = () => {
|
||||||
|
return new Promise(resolve => {
|
||||||
fetch('/api/bs/hrmorganization/common/department/export').then(res => res.blob().then(blob => {
|
fetch('/api/bs/hrmorganization/common/department/export').then(res => res.blob().then(blob => {
|
||||||
|
resolve();
|
||||||
var filename=`部门档案.xlsx`
|
var filename=`部门档案.xlsx`
|
||||||
var a = document.createElement('a');
|
var a = document.createElement('a');
|
||||||
var url = window.URL.createObjectURL(blob);
|
var url = window.URL.createObjectURL(blob);
|
||||||
|
|
@ -56,6 +58,7 @@ export const exportData = (ids) => {
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
}))
|
}))
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const selectVersions = (params) => {
|
export const selectVersions = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,9 @@ export const version = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const exportResource = (ids) => {
|
export const exportResource = (ids) => {
|
||||||
|
return new Promise(resolve => {
|
||||||
fetch('/api/bs/hrmorganization/common/resource/export?ids='+ids).then(res => res.blob().then(blob => {
|
fetch('/api/bs/hrmorganization/common/resource/export?ids='+ids).then(res => res.blob().then(blob => {
|
||||||
|
resolve();
|
||||||
var filename=`人员档案.xlsx`
|
var filename=`人员档案.xlsx`
|
||||||
var a = document.createElement('a');
|
var a = document.createElement('a');
|
||||||
var url = window.URL.createObjectURL(blob);
|
var url = window.URL.createObjectURL(blob);
|
||||||
|
|
@ -58,6 +60,7 @@ export const exportResource = (ids) => {
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
}))
|
}))
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -622,7 +622,7 @@ export default class Department extends React.Component {
|
||||||
isPanelShow, departmentName, conditionNum, visible, condition, form,
|
isPanelShow, departmentName, conditionNum, visible, condition, form,
|
||||||
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
|
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
|
||||||
form1, isEdit, newVisible, jobDataSource, jobColumns, selectedRowKeys, total, current, pageSize, init,
|
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;
|
} = department;
|
||||||
|
|
||||||
if (hasRight === false) {
|
if (hasRight === false) {
|
||||||
|
|
@ -690,6 +690,7 @@ export default class Department extends React.Component {
|
||||||
}}
|
}}
|
||||||
onSearchChange={val => this.onSearchChange(val)}
|
onSearchChange={val => this.onSearchChange(val)}
|
||||||
/>
|
/>
|
||||||
|
<Spin size="large" spinning={exSpinning} tip="正在导出请稍候...." className="hrm-loading-center-small"/>
|
||||||
{
|
{
|
||||||
init ? <div className='hrm-new-weatable-spin'>
|
init ? <div className='hrm-new-weatable-spin'>
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={init}></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 NewWeaTableEditDialog from '../NewWeaTableEditDialog';
|
||||||
import GroupList from './GroupList';
|
import GroupList from './GroupList';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const toJS = mobx.toJS;
|
const toJS = mobx.toJS;
|
||||||
const confirm = Modal.confirm;
|
const confirm = Modal.confirm;
|
||||||
const WeaTable = WeaTableNew.WeaTable;
|
const WeaTable = WeaTableNew.WeaTable;
|
||||||
|
|
@ -506,7 +504,7 @@ export default class Resource extends React.Component {
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const {
|
const {
|
||||||
isPanelShow, form2, lastName, conditionNum, tableStore, nEdialogTitle, visible, condition,
|
isPanelShow, form2, lastName, conditionNum, tableStore, nEdialogTitle, visible, condition,
|
||||||
form, dialogLoading, isEdit, date, hasRight, defaultShowLeft,enable
|
form, dialogLoading, isEdit, date, hasRight, defaultShowLeft,enable,exSpinning
|
||||||
} = store;
|
} = store;
|
||||||
|
|
||||||
if (hasRight === false) {
|
if (hasRight === false) {
|
||||||
|
|
@ -544,6 +542,7 @@ export default class Resource extends React.Component {
|
||||||
onSearch={() => {store.hideRadioGroup();store.getTableInfo();}}
|
onSearch={() => {store.hideRadioGroup();store.getTableInfo();}}
|
||||||
onSearchChange={val => this.onSearchChange(val)}
|
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} />}
|
{enable && <GroupList ecId={`${this && this.props && this.props.ecId || ''}_GroupList@2le78y`} store={store} />}
|
||||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
||||||
comsWeaTableStore={tableStore}
|
comsWeaTableStore={tableStore}
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ export class DepartmentStore {
|
||||||
@observable confirmLoading = true;
|
@observable confirmLoading = true;
|
||||||
@observable isMerge = true;
|
@observable isMerge = true;
|
||||||
@observable hasRight = '';
|
@observable hasRight = '';
|
||||||
|
@observable exSpinning = false;
|
||||||
|
|
||||||
@observable selectTreeNodeInfo;
|
@observable selectTreeNodeInfo;
|
||||||
saveAndSetting = false;
|
saveAndSetting = false;
|
||||||
|
|
@ -386,11 +387,10 @@ export class DepartmentStore {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("全部导出") exportData() {
|
@action("全部导出") async exportData() {
|
||||||
Api.exportData().then(res => {
|
this.exSpinning = true;
|
||||||
}, error => {
|
await Api.exportData();
|
||||||
message.warning(error.msg);
|
this.exSpinning = false;
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ export class ResourceStore {
|
||||||
@observable dialogLoading = true;
|
@observable dialogLoading = true;
|
||||||
@observable userId = '';
|
@observable userId = '';
|
||||||
@observable date = '';
|
@observable date = '';
|
||||||
|
@observable exSpinning = false;
|
||||||
|
|
||||||
@observable defaultShowLeft = true;
|
@observable defaultShowLeft = true;
|
||||||
@observable companysId = 1
|
@observable companysId = 1
|
||||||
|
|
@ -60,7 +61,7 @@ export class ResourceStore {
|
||||||
@observable selectTreeNodeInfo;
|
@observable selectTreeNodeInfo;
|
||||||
|
|
||||||
@observable enable = false;
|
@observable enable = false;
|
||||||
@observable _showRadioGroup = true;
|
@observable _showRadioGroup = false;
|
||||||
@computed get showRadioGroup() { return this._showRadioGroup }
|
@computed get showRadioGroup() { return this._showRadioGroup }
|
||||||
set showRadioGroup(v) {
|
set showRadioGroup(v) {
|
||||||
this._showRadioGroup = v;
|
this._showRadioGroup = v;
|
||||||
|
|
@ -246,12 +247,15 @@ export class ResourceStore {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("导出") export() {
|
@action("导出") async export() {
|
||||||
const params = {
|
const params = {
|
||||||
...this.form.getFormParams()
|
...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 = [];
|
this.tableStore.selectedRowKeys = [];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("另存为版本") version(id) {
|
@action("另存为版本") version(id) {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -8px;
|
margin-left: -8px;
|
||||||
margin-top: -8px;
|
margin-top: -8px;
|
||||||
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -141,4 +142,9 @@
|
||||||
max-width: 200px;
|
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