|
@@ -661,7 +661,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button type="primary" @click="exportTask" style="width:100%;" >导出</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="exportTask" style="width:100%;" :loading="loadingExport">导出</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
@@ -680,7 +680,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
|
|
<el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
|
|
- <el-button type="primary" :underline="false" style="width:100%;">上传文件</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">上传文件</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -720,6 +720,7 @@
|
|
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ loadingExport : false,
|
|
saveTemplateLoading: false,
|
|
saveTemplateLoading: false,
|
|
joinMembList:[],
|
|
joinMembList:[],
|
|
setInchargerDialog: false,
|
|
setInchargerDialog: false,
|
|
@@ -942,9 +943,11 @@
|
|
// 批量导入人员
|
|
// 批量导入人员
|
|
importTask(item) {
|
|
importTask(item) {
|
|
//首先判断文件类型
|
|
//首先判断文件类型
|
|
|
|
+ this.loadingExport = true
|
|
let str = item.file.name.split(".");
|
|
let str = item.file.name.split(".");
|
|
let format = str[str.length - 1];
|
|
let format = str[str.length - 1];
|
|
if (format != "xls" && format != "xlsx") {
|
|
if (format != "xls" && format != "xlsx") {
|
|
|
|
+ this.loadingExport = false
|
|
this.$message({
|
|
this.$message({
|
|
message: "请选择.xls或.xlsx文件",
|
|
message: "请选择.xls或.xlsx文件",
|
|
type: "error"
|
|
type: "error"
|
|
@@ -960,6 +963,7 @@
|
|
res => {
|
|
res => {
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
|
|
+ this.loadingExport = false
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|
|
message: "导入成功",
|
|
message: "导入成功",
|
|
@@ -978,6 +982,7 @@
|
|
error => {
|
|
error => {
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
|
|
+ this.loadingExport = false
|
|
this.$message({
|
|
this.$message({
|
|
message: error,
|
|
message: error,
|
|
type: "error"
|
|
type: "error"
|
|
@@ -1065,8 +1070,10 @@
|
|
},
|
|
},
|
|
exportTask() {
|
|
exportTask() {
|
|
let _this = this;
|
|
let _this = this;
|
|
|
|
+ this.loadingExport = true
|
|
this.http.post('/task/exportTask', {projectId: this.curProjectId, taskType: this.exportTaskType},
|
|
this.http.post('/task/exportTask', {projectId: this.curProjectId, taskType: this.exportTaskType},
|
|
res => {
|
|
res => {
|
|
|
|
+ this.loadingExport = false
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
location.href = res.data;
|
|
location.href = res.data;
|
|
} else {
|
|
} else {
|