|
@@ -59,7 +59,7 @@
|
|
<el-link type="primary" :underline="false" @click="downloadmb" v-if="user.company.packageCustomer == 1 || user.company.packageProvider == 1 || user.timeType.mainProjectState == 1 || user.companyId == '936'">{{ $t('Downloadthetemplate') }}</el-link>
|
|
<el-link type="primary" :underline="false" @click="downloadmb" v-if="user.company.packageCustomer == 1 || user.company.packageProvider == 1 || user.timeType.mainProjectState == 1 || user.companyId == '936'">{{ $t('Downloadthetemplate') }}</el-link>
|
|
<el-link type="primary" :underline="false" href="./upload/项目导入模板.xlsx" :download="$t('importtemplateproject') + '.xlsx'" v-else>{{ $t('Downloadthetemplate') }}</el-link>
|
|
<el-link type="primary" :underline="false" href="./upload/项目导入模板.xlsx" :download="$t('importtemplateproject') + '.xlsx'" v-else>{{ $t('Downloadthetemplate') }}</el-link>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
- <el-dropdown-item v-if="permissions.projectExport">
|
|
|
|
|
|
+ <el-dropdown-item v-if="permissions.projectExport" :disabled="exportDisabled">
|
|
<el-link type="primary" :underline="false" @click="exportProjectData" :download="$t('exportProject') + '.xlsx'">{{ $t('exportProject') }}</el-link>
|
|
<el-link type="primary" :underline="false" @click="exportProjectData" :download="$t('exportProject') + '.xlsx'">{{ $t('exportProject') }}</el-link>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
<el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectExport">
|
|
<el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectExport">
|
|
@@ -1505,6 +1505,9 @@ a {
|
|
searchPersonnelFlgnum: 1,
|
|
searchPersonnelFlgnum: 1,
|
|
|
|
|
|
createDate: [], // 项目筛选时间段
|
|
createDate: [], // 项目筛选时间段
|
|
|
|
+
|
|
|
|
+ exportDisabled: false,
|
|
|
|
+ exportNotification: null,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 过滤器
|
|
// 过滤器
|
|
@@ -2341,9 +2344,19 @@ a {
|
|
if(this.deptId.length){param.deptId = this.deptId[this.deptId.length-1]}
|
|
if(this.deptId.length){param.deptId = this.deptId[this.deptId.length-1]}
|
|
if(this.inchagerId){param.inchagerId = this.inchagerId}
|
|
if(this.inchagerId){param.inchagerId = this.inchagerId}
|
|
if(this.participationId){param.participation = this.participationId}
|
|
if(this.participationId){param.participation = this.participationId}
|
|
|
|
+
|
|
|
|
+ this.exportDisabled = true
|
|
|
|
+ this.exportNotification = this.$notify({
|
|
|
|
+ title: '导出项目',
|
|
|
|
+ message: '项目导出中、请稍后...',
|
|
|
|
+ duration: 0,
|
|
|
|
+ showClose: false
|
|
|
|
+ });
|
|
//导出项目
|
|
//导出项目
|
|
this.http.post('/project/exportData',param,
|
|
this.http.post('/project/exportData',param,
|
|
res => {
|
|
res => {
|
|
|
|
+ this.exportDisabled = false
|
|
|
|
+ this.exportNotification.close()
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
var filePath = res.data;
|
|
var filePath = res.data;
|
|
const a = document.createElement('a'); // 创建a标签
|
|
const a = document.createElement('a'); // 创建a标签
|
|
@@ -2354,6 +2367,8 @@ a {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
|
|
+ this.exportDisabled = false
|
|
|
|
+ this.exportNotification.close()
|
|
this.$message({
|
|
this.$message({
|
|
message: error,
|
|
message: error,
|
|
type: "error"
|
|
type: "error"
|