From 0d83052a5638169cd13f07e9efbc45bcc76d6a40 Mon Sep 17 00:00:00 2001
From: Chengliang <1546584672@qq.com>
Date: Wed, 8 May 2024 16:35:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/organization/apis/department.js | 23 +++++++++++--------
pc4mobx/organization/apis/resource.js | 21 +++++++++--------
.../components/department/department.js | 3 ++-
.../components/resource/resource.js | 5 ++--
pc4mobx/organization/stores/department.js | 10 ++++----
pc4mobx/organization/stores/resource.js | 10 +++++---
pc4mobx/organization/style/common.less | 6 +++++
7 files changed, 47 insertions(+), 31 deletions(-)
diff --git a/pc4mobx/organization/apis/department.js b/pc4mobx/organization/apis/department.js
index ca1407c..a98ec59 100644
--- a/pc4mobx/organization/apis/department.js
+++ b/pc4mobx/organization/apis/department.js
@@ -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) => {
diff --git a/pc4mobx/organization/apis/resource.js b/pc4mobx/organization/apis/resource.js
index d8a8aeb..3d5c366 100644
--- a/pc4mobx/organization/apis/resource.js
+++ b/pc4mobx/organization/apis/resource.js
@@ -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);
+ }))
+ });
}
diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js
index 8941a94..055a99f 100644
--- a/pc4mobx/organization/components/department/department.js
+++ b/pc4mobx/organization/components/department/department.js
@@ -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)}
/>
+