作者 RuoYi

导出按钮点击之后添加遮罩

@@ -75,6 +75,7 @@ @@ -75,6 +75,7 @@
75 plain 75 plain
76 icon="el-icon-download" 76 icon="el-icon-download"
77 size="mini" 77 size="mini"
  78 + :loading="exportLoading"
78 @click="handleExport" 79 @click="handleExport"
79 v-hasPermi="['monitor:job:export']" 80 v-hasPermi="['monitor:job:export']"
80 >导出</el-button> 81 >导出</el-button>
@@ -274,6 +275,8 @@ export default { @@ -274,6 +275,8 @@ export default {
274 return { 275 return {
275 // 遮罩层 276 // 遮罩层
276 loading: true, 277 loading: true,
  278 + // 导出遮罩层
  279 + exportLoading: false,
277 // 选中数组 280 // 选中数组
278 ids: [], 281 ids: [],
279 // 非单个禁用 282 // 非单个禁用
@@ -477,10 +480,12 @@ export default { @@ -477,10 +480,12 @@ export default {
477 confirmButtonText: "确定", 480 confirmButtonText: "确定",
478 cancelButtonText: "取消", 481 cancelButtonText: "取消",
479 type: "warning" 482 type: "warning"
480 - }).then(function() { 483 + }).then(() => {
  484 + this.exportLoading = true;
481 return exportJob(queryParams); 485 return exportJob(queryParams);
482 }).then(response => { 486 }).then(response => {
483 this.download(response.msg); 487 this.download(response.msg);
  488 + this.exportLoading = false;
484 }) 489 })
485 } 490 }
486 } 491 }
@@ -89,6 +89,7 @@ @@ -89,6 +89,7 @@
89 plain 89 plain
90 icon="el-icon-download" 90 icon="el-icon-download"
91 size="mini" 91 size="mini"
  92 + :loading="exportLoading"
92 @click="handleExport" 93 @click="handleExport"
93 v-hasPermi="['monitor:job:export']" 94 v-hasPermi="['monitor:job:export']"
94 >导出</el-button> 95 >导出</el-button>
@@ -175,6 +176,8 @@ export default { @@ -175,6 +176,8 @@ export default {
175 return { 176 return {
176 // 遮罩层 177 // 遮罩层
177 loading: true, 178 loading: true,
  179 + // 导出遮罩层
  180 + exportLoading: false,
178 // 选中数组 181 // 选中数组
179 ids: [], 182 ids: [],
180 // 非多个禁用 183 // 非多个禁用
@@ -288,10 +291,12 @@ export default { @@ -288,10 +291,12 @@ export default {
288 confirmButtonText: "确定", 291 confirmButtonText: "确定",
289 cancelButtonText: "取消", 292 cancelButtonText: "取消",
290 type: "warning" 293 type: "warning"
291 - }).then(function() { 294 + }).then(() => {
  295 + this.exportLoading = true;
292 return exportJobLog(queryParams); 296 return exportJobLog(queryParams);
293 }).then(response => { 297 }).then(response => {
294 this.download(response.msg); 298 this.download(response.msg);
  299 + this.exportLoading = false;
295 }) 300 })
296 } 301 }
297 } 302 }
@@ -83,6 +83,7 @@ @@ -83,6 +83,7 @@
83 plain 83 plain
84 icon="el-icon-download" 84 icon="el-icon-download"
85 size="mini" 85 size="mini"
  86 + :loading="exportLoading"
86 @click="handleExport" 87 @click="handleExport"
87 v-hasPermi="['monitor:logininfor:export']" 88 v-hasPermi="['monitor:logininfor:export']"
88 >导出</el-button> 89 >导出</el-button>
@@ -126,6 +127,8 @@ export default { @@ -126,6 +127,8 @@ export default {
126 return { 127 return {
127 // 遮罩层 128 // 遮罩层
128 loading: true, 129 loading: true,
  130 + // 导出遮罩层
  131 + exportLoading: false,
129 // 选中数组 132 // 选中数组
130 ids: [], 133 ids: [],
131 // 非多个禁用 134 // 非多个禁用
@@ -221,10 +224,12 @@ export default { @@ -221,10 +224,12 @@ export default {
221 confirmButtonText: "确定", 224 confirmButtonText: "确定",
222 cancelButtonText: "取消", 225 cancelButtonText: "取消",
223 type: "warning" 226 type: "warning"
224 - }).then(function() { 227 + }).then(() => {
  228 + this.exportLoading = true;
225 return exportLogininfor(queryParams); 229 return exportLogininfor(queryParams);
226 }).then(response => { 230 }).then(response => {
227 this.download(response.msg); 231 this.download(response.msg);
  232 + this.exportLoading = false;
228 }) 233 })
229 } 234 }
230 } 235 }
@@ -99,6 +99,7 @@ @@ -99,6 +99,7 @@
99 plain 99 plain
100 icon="el-icon-download" 100 icon="el-icon-download"
101 size="mini" 101 size="mini"
  102 + :loading="exportLoading"
102 @click="handleExport" 103 @click="handleExport"
103 v-hasPermi="['monitor:operlog:export']" 104 v-hasPermi="['monitor:operlog:export']"
104 >导出</el-button> 105 >导出</el-button>
@@ -195,6 +196,8 @@ export default { @@ -195,6 +196,8 @@ export default {
195 return { 196 return {
196 // 遮罩层 197 // 遮罩层
197 loading: true, 198 loading: true,
  199 + // 导出遮罩层
  200 + exportLoading: false,
198 // 选中数组 201 // 选中数组
199 ids: [], 202 ids: [],
200 // 非多个禁用 203 // 非多个禁用
@@ -309,10 +312,12 @@ export default { @@ -309,10 +312,12 @@ export default {
309 confirmButtonText: "确定", 312 confirmButtonText: "确定",
310 cancelButtonText: "取消", 313 cancelButtonText: "取消",
311 type: "warning" 314 type: "warning"
312 - }).then(function() { 315 + }).then(() => {
  316 + this.exportLoading = true;
313 return exportOperlog(queryParams); 317 return exportOperlog(queryParams);
314 }).then(response => { 318 }).then(response => {
315 this.download(response.msg); 319 this.download(response.msg);
  320 + this.exportLoading = false;
316 }) 321 })
317 } 322 }
318 } 323 }
@@ -88,6 +88,7 @@ @@ -88,6 +88,7 @@
88 plain 88 plain
89 icon="el-icon-download" 89 icon="el-icon-download"
90 size="mini" 90 size="mini"
  91 + :loading="exportLoading"
91 @click="handleExport" 92 @click="handleExport"
92 v-hasPermi="['system:config:export']" 93 v-hasPermi="['system:config:export']"
93 >导出</el-button> 94 >导出</el-button>
@@ -188,6 +189,8 @@ export default { @@ -188,6 +189,8 @@ export default {
188 return { 189 return {
189 // 遮罩层 190 // 遮罩层
190 loading: true, 191 loading: true,
  192 + // 导出遮罩层
  193 + exportLoading: false,
191 // 选中数组 194 // 选中数组
192 ids: [], 195 ids: [],
193 // 非单个禁用 196 // 非单个禁用
@@ -344,10 +347,12 @@ export default { @@ -344,10 +347,12 @@ export default {
344 confirmButtonText: "确定", 347 confirmButtonText: "确定",
345 cancelButtonText: "取消", 348 cancelButtonText: "取消",
346 type: "warning" 349 type: "warning"
347 - }).then(function() { 350 + }).then(() => {
  351 + this.exportLoading = true;
348 return exportConfig(queryParams); 352 return exportConfig(queryParams);
349 }).then(response => { 353 }).then(response => {
350 this.download(response.msg); 354 this.download(response.msg);
  355 + this.exportLoading = false;
351 }) 356 })
352 }, 357 },
353 /** 清理缓存按钮操作 */ 358 /** 清理缓存按钮操作 */
@@ -75,6 +75,7 @@ @@ -75,6 +75,7 @@
75 plain 75 plain
76 icon="el-icon-download" 76 icon="el-icon-download"
77 size="mini" 77 size="mini"
  78 + :loading="exportLoading"
78 @click="handleExport" 79 @click="handleExport"
79 v-hasPermi="['system:dict:export']" 80 v-hasPermi="['system:dict:export']"
80 >导出</el-button> 81 >导出</el-button>
@@ -169,6 +170,8 @@ export default { @@ -169,6 +170,8 @@ export default {
169 return { 170 return {
170 // 遮罩层 171 // 遮罩层
171 loading: true, 172 loading: true,
  173 + // 导出遮罩层
  174 + exportLoading: false,
172 // 选中数组 175 // 选中数组
173 ids: [], 176 ids: [],
174 // 非单个禁用 177 // 非单个禁用
@@ -343,10 +346,12 @@ export default { @@ -343,10 +346,12 @@ export default {
343 confirmButtonText: "确定", 346 confirmButtonText: "确定",
344 cancelButtonText: "取消", 347 cancelButtonText: "取消",
345 type: "warning" 348 type: "warning"
346 - }).then(function() { 349 + }).then(() => {
  350 + this.exportLoading = true;
347 return exportData(queryParams); 351 return exportData(queryParams);
348 }).then(response => { 352 }).then(response => {
349 this.download(response.msg); 353 this.download(response.msg);
  354 + this.exportLoading = false;
350 }) 355 })
351 } 356 }
352 } 357 }
@@ -94,6 +94,7 @@ @@ -94,6 +94,7 @@
94 plain 94 plain
95 icon="el-icon-download" 95 icon="el-icon-download"
96 size="mini" 96 size="mini"
  97 + :loading="exportLoading"
97 @click="handleExport" 98 @click="handleExport"
98 v-hasPermi="['system:dict:export']" 99 v-hasPermi="['system:dict:export']"
99 >导出</el-button> 100 >导出</el-button>
@@ -196,6 +197,8 @@ export default { @@ -196,6 +197,8 @@ export default {
196 return { 197 return {
197 // 遮罩层 198 // 遮罩层
198 loading: true, 199 loading: true,
  200 + // 导出遮罩层
  201 + exportLoading: false,
199 // 选中数组 202 // 选中数组
200 ids: [], 203 ids: [],
201 // 非单个禁用 204 // 非单个禁用
@@ -348,10 +351,12 @@ export default { @@ -348,10 +351,12 @@ export default {
348 confirmButtonText: "确定", 351 confirmButtonText: "确定",
349 cancelButtonText: "取消", 352 cancelButtonText: "取消",
350 type: "warning" 353 type: "warning"
351 - }).then(function() { 354 + }).then(() => {
  355 + this.exportLoading = true;
352 return exportType(queryParams); 356 return exportType(queryParams);
353 }).then(response => { 357 }).then(response => {
354 this.download(response.msg); 358 this.download(response.msg);
  359 + this.exportLoading = false;
355 }) 360 })
356 }, 361 },
357 /** 清理缓存按钮操作 */ 362 /** 清理缓存按钮操作 */
@@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
74 plain 74 plain
75 icon="el-icon-download" 75 icon="el-icon-download"
76 size="mini" 76 size="mini"
  77 + :loading="exportLoading"
77 @click="handleExport" 78 @click="handleExport"
78 v-hasPermi="['system:post:export']" 79 v-hasPermi="['system:post:export']"
79 >导出</el-button> 80 >导出</el-button>
@@ -163,6 +164,8 @@ export default { @@ -163,6 +164,8 @@ export default {
163 return { 164 return {
164 // 遮罩层 165 // 遮罩层
165 loading: true, 166 loading: true,
  167 + // 导出遮罩层
  168 + exportLoading: false,
166 // 选中数组 169 // 选中数组
167 ids: [], 170 ids: [],
168 // 非单个禁用 171 // 非单个禁用
@@ -315,10 +318,12 @@ export default { @@ -315,10 +318,12 @@ export default {
315 confirmButtonText: "确定", 318 confirmButtonText: "确定",
316 cancelButtonText: "取消", 319 cancelButtonText: "取消",
317 type: "warning" 320 type: "warning"
318 - }).then(function() { 321 + }).then(() => {
  322 + this.exportLoading = true;
319 return exportPost(queryParams); 323 return exportPost(queryParams);
320 }).then(response => { 324 }).then(response => {
321 this.download(response.msg); 325 this.download(response.msg);
  326 + this.exportLoading = false;
322 }) 327 })
323 } 328 }
324 } 329 }
@@ -94,6 +94,7 @@ @@ -94,6 +94,7 @@
94 plain 94 plain
95 icon="el-icon-download" 95 icon="el-icon-download"
96 size="mini" 96 size="mini"
  97 + :loading="exportLoading"
97 @click="handleExport" 98 @click="handleExport"
98 v-hasPermi="['system:role:export']" 99 v-hasPermi="['system:role:export']"
99 >导出</el-button> 100 >导出</el-button>
@@ -258,6 +259,8 @@ export default { @@ -258,6 +259,8 @@ export default {
258 return { 259 return {
259 // 遮罩层 260 // 遮罩层
260 loading: true, 261 loading: true,
  262 + // 导出遮罩层
  263 + exportLoading: false,
261 // 选中数组 264 // 选中数组
262 ids: [], 265 ids: [],
263 // 非单个禁用 266 // 非单个禁用
@@ -599,10 +602,12 @@ export default { @@ -599,10 +602,12 @@ export default {
599 confirmButtonText: "确定", 602 confirmButtonText: "确定",
600 cancelButtonText: "取消", 603 cancelButtonText: "取消",
601 type: "warning" 604 type: "warning"
602 - }).then(function() { 605 + }).then(() => {
  606 + this.exportLoading = true;
603 return exportRole(queryParams); 607 return exportRole(queryParams);
604 }).then(response => { 608 }).then(response => {
605 this.download(response.msg); 609 this.download(response.msg);
  610 + this.exportLoading = false;
606 }) 611 })
607 } 612 }
608 } 613 }
@@ -131,6 +131,7 @@ @@ -131,6 +131,7 @@
131 plain 131 plain
132 icon="el-icon-download" 132 icon="el-icon-download"
133 size="mini" 133 size="mini"
  134 + :loading="exportLoading"
134 @click="handleExport" 135 @click="handleExport"
135 v-hasPermi="['system:user:export']" 136 v-hasPermi="['system:user:export']"
136 >导出</el-button> 137 >导出</el-button>
@@ -356,6 +357,8 @@ export default { @@ -356,6 +357,8 @@ export default {
356 return { 357 return {
357 // 遮罩层 358 // 遮罩层
358 loading: true, 359 loading: true,
  360 + // 导出遮罩层
  361 + exportLoading: false,
359 // 选中数组 362 // 选中数组
360 ids: [], 363 ids: [],
361 // 非单个禁用 364 // 非单个禁用
@@ -637,10 +640,12 @@ export default { @@ -637,10 +640,12 @@ export default {
637 confirmButtonText: "确定", 640 confirmButtonText: "确定",
638 cancelButtonText: "取消", 641 cancelButtonText: "取消",
639 type: "warning" 642 type: "warning"
640 - }).then(function() { 643 + }).then(() => {
  644 + this.exportLoading = true;
641 return exportUser(queryParams); 645 return exportUser(queryParams);
642 }).then(response => { 646 }).then(response => {
643 this.download(response.msg); 647 this.download(response.msg);
  648 + this.exportLoading = false;
644 }) 649 })
645 }, 650 },
646 /** 导入按钮操作 */ 651 /** 导入按钮操作 */