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

This commit is contained in:
YunaiV
2022-02-15 21:28:11 +08:00
parent d44d4da428
commit e7d0024eb0
20 changed files with 124 additions and 346 deletions

View File

@@ -37,7 +37,7 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
<el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport"
v-hasPermi="['infra:api-access-log:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -123,6 +123,8 @@ export default {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
@@ -204,10 +206,12 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(() => {
this.exportLoading = true;
return exportApiAccessLogExcel(params);
}).then(response => {
this.downloadExcel(response, 'API 访问日志.xls');
this.exportLoading = false;
})
}
}

View File

@@ -37,7 +37,7 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['infra:api-error-log:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -130,6 +130,8 @@ export default {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
@@ -226,10 +228,12 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(() => {
this.exportLoading = true;
return exportApiErrorLogExcel(params);
}).then(response => {
this.downloadExcel(response, 'API 错误日志.xls');
this.exportLoading = false;
})
}
}

View File

@@ -43,13 +43,8 @@
v-hasPermi="['infra:config:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['infra:config:export']"
>导出</el-button>
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['infra:config:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -130,6 +125,8 @@ export default {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
@@ -279,11 +276,13 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(() => {
this.exportLoading = true;
return exportConfig(queryParams);
}).then(response => {
this.downloadExcel(response, '参数配置.xls');
})
this.exportLoading = false;
})
},
}
};

View File

@@ -25,7 +25,7 @@
v-hasPermi="['infra:job:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['infra:job:export']">导出</el-button>
</el-col>
<el-col :span="1.5">
@@ -136,6 +136,8 @@ export default {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
@@ -326,10 +328,12 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(() => {
this.exportLoading = true;
return exportJob(queryParams);
}).then(response => {
this.downloadExcel(response, '定时任务.xls');
this.exportLoading = false;
})
}
}

View File

@@ -54,7 +54,7 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" :loading="exportLoading"
v-hasPermi="['infra:job:query']">详细</el-button>
</template>
</el-table-column>
@@ -96,6 +96,8 @@ export default {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
@@ -165,10 +167,12 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(() => {
this.exportLoading = true;
return exportJobLogExcel(params);
}).then(response => {
this.downloadExcel(response, '定时任务日志.xls');
this.exportLoading = false;
})
}
}