Commit e7d0024eb0c0eda990099155c3e12ef8cbfa6a1c
1 parent
d44d4da4
v3.5.0 导出按钮点击之后添加遮罩
Showing
20 changed files
with
124 additions
and
346 deletions
yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm
| ... | ... | @@ -51,7 +51,7 @@ |
| 51 | 51 | v-hasPermi="['${permissionPrefix}:create']">新增</el-button> |
| 52 | 52 | </el-col> |
| 53 | 53 | <el-col :span="1.5"> |
| 54 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 54 | + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 55 | 55 | v-hasPermi="['${permissionPrefix}:export']">导出</el-button> |
| 56 | 56 | </el-col> |
| 57 | 57 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -207,6 +207,8 @@ export default { |
| 207 | 207 | return { |
| 208 | 208 | // 遮罩层 |
| 209 | 209 | loading: true, |
| 210 | + // 导出遮罩层 | |
| 211 | + exportLoading: false, | |
| 210 | 212 | // 显示搜索条件 |
| 211 | 213 | showSearch: true, |
| 212 | 214 | // 总条数 |
| ... | ... | @@ -392,10 +394,12 @@ export default { |
| 392 | 394 | confirmButtonText: "确定", |
| 393 | 395 | cancelButtonText: "取消", |
| 394 | 396 | type: "warning" |
| 395 | - }).then(function() { | |
| 397 | + }).then(() => { | |
| 398 | + this.exportLoading = true; | |
| 396 | 399 | return export${simpleClassName}Excel(params); |
| 397 | 400 | }).then(response => { |
| 398 | 401 | this.downloadExcel(response, '${table.classComment}.xls'); |
| 402 | + this.exportLoading = false; | |
| 399 | 403 | }) |
| 400 | 404 | } |
| 401 | 405 | } | ... | ... |
yudao-ui-admin/src/views/infra/apiAccessLog/index.vue
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | <!-- 操作工具栏 --> |
| 38 | 38 | <el-row :gutter="10" class="mb8"> |
| 39 | 39 | <el-col :span="1.5"> |
| 40 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 40 | + <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport" | |
| 41 | 41 | v-hasPermi="['infra:api-access-log:export']">导出</el-button> |
| 42 | 42 | </el-col> |
| 43 | 43 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -123,6 +123,8 @@ export default { |
| 123 | 123 | return { |
| 124 | 124 | // 遮罩层 |
| 125 | 125 | loading: true, |
| 126 | + // 导出遮罩层 | |
| 127 | + exportLoading: false, | |
| 126 | 128 | // 显示搜索条件 |
| 127 | 129 | showSearch: true, |
| 128 | 130 | // 总条数 |
| ... | ... | @@ -204,10 +206,12 @@ export default { |
| 204 | 206 | confirmButtonText: "确定", |
| 205 | 207 | cancelButtonText: "取消", |
| 206 | 208 | type: "warning" |
| 207 | - }).then(function() { | |
| 209 | + }).then(() => { | |
| 210 | + this.exportLoading = true; | |
| 208 | 211 | return exportApiAccessLogExcel(params); |
| 209 | 212 | }).then(response => { |
| 210 | 213 | this.downloadExcel(response, 'API 访问日志.xls'); |
| 214 | + this.exportLoading = false; | |
| 211 | 215 | }) |
| 212 | 216 | } |
| 213 | 217 | } | ... | ... |
yudao-ui-admin/src/views/infra/apiErrorLog/index.vue
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | <!-- 操作工具栏 --> |
| 38 | 38 | <el-row :gutter="10" class="mb8"> |
| 39 | 39 | <el-col :span="1.5"> |
| 40 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 40 | + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 41 | 41 | v-hasPermi="['infra:api-error-log:export']">导出</el-button> |
| 42 | 42 | </el-col> |
| 43 | 43 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -130,6 +130,8 @@ export default { |
| 130 | 130 | return { |
| 131 | 131 | // 遮罩层 |
| 132 | 132 | loading: true, |
| 133 | + // 导出遮罩层 | |
| 134 | + exportLoading: false, | |
| 133 | 135 | // 显示搜索条件 |
| 134 | 136 | showSearch: true, |
| 135 | 137 | // 总条数 |
| ... | ... | @@ -226,10 +228,12 @@ export default { |
| 226 | 228 | confirmButtonText: "确定", |
| 227 | 229 | cancelButtonText: "取消", |
| 228 | 230 | type: "warning" |
| 229 | - }).then(function() { | |
| 231 | + }).then(() => { | |
| 232 | + this.exportLoading = true; | |
| 230 | 233 | return exportApiErrorLogExcel(params); |
| 231 | 234 | }).then(response => { |
| 232 | 235 | this.downloadExcel(response, 'API 错误日志.xls'); |
| 236 | + this.exportLoading = false; | |
| 233 | 237 | }) |
| 234 | 238 | } |
| 235 | 239 | } | ... | ... |
yudao-ui-admin/src/views/infra/config/index.vue
| ... | ... | @@ -43,13 +43,8 @@ |
| 43 | 43 | v-hasPermi="['infra:config:create']">新增</el-button> |
| 44 | 44 | </el-col> |
| 45 | 45 | <el-col :span="1.5"> |
| 46 | - <el-button | |
| 47 | - type="warning" | |
| 48 | - icon="el-icon-download" | |
| 49 | - size="mini" | |
| 50 | - @click="handleExport" | |
| 51 | - v-hasPermi="['infra:config:export']" | |
| 52 | - >导出</el-button> | |
| 46 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 47 | + v-hasPermi="['infra:config:export']">导出</el-button> | |
| 53 | 48 | </el-col> |
| 54 | 49 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| 55 | 50 | </el-row> |
| ... | ... | @@ -130,6 +125,8 @@ export default { |
| 130 | 125 | return { |
| 131 | 126 | // 遮罩层 |
| 132 | 127 | loading: true, |
| 128 | + // 导出遮罩层 | |
| 129 | + exportLoading: false, | |
| 133 | 130 | // 显示搜索条件 |
| 134 | 131 | showSearch: true, |
| 135 | 132 | // 总条数 |
| ... | ... | @@ -279,11 +276,13 @@ export default { |
| 279 | 276 | confirmButtonText: "确定", |
| 280 | 277 | cancelButtonText: "取消", |
| 281 | 278 | type: "warning" |
| 282 | - }).then(function() { | |
| 279 | + }).then(() => { | |
| 280 | + this.exportLoading = true; | |
| 283 | 281 | return exportConfig(queryParams); |
| 284 | 282 | }).then(response => { |
| 285 | 283 | this.downloadExcel(response, '参数配置.xls'); |
| 286 | - }) | |
| 284 | + this.exportLoading = false; | |
| 285 | + }) | |
| 287 | 286 | }, |
| 288 | 287 | } |
| 289 | 288 | }; | ... | ... |
yudao-ui-admin/src/views/infra/job/index.vue
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | v-hasPermi="['infra:job:create']">新增</el-button> |
| 26 | 26 | </el-col> |
| 27 | 27 | <el-col :span="1.5"> |
| 28 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 28 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 29 | 29 | v-hasPermi="['infra:job:export']">导出</el-button> |
| 30 | 30 | </el-col> |
| 31 | 31 | <el-col :span="1.5"> |
| ... | ... | @@ -136,6 +136,8 @@ export default { |
| 136 | 136 | return { |
| 137 | 137 | // 遮罩层 |
| 138 | 138 | loading: true, |
| 139 | + // 导出遮罩层 | |
| 140 | + exportLoading: false, | |
| 139 | 141 | // 显示搜索条件 |
| 140 | 142 | showSearch: true, |
| 141 | 143 | // 总条数 |
| ... | ... | @@ -326,10 +328,12 @@ export default { |
| 326 | 328 | confirmButtonText: "确定", |
| 327 | 329 | cancelButtonText: "取消", |
| 328 | 330 | type: "warning" |
| 329 | - }).then(function() { | |
| 331 | + }).then(() => { | |
| 332 | + this.exportLoading = true; | |
| 330 | 333 | return exportJob(queryParams); |
| 331 | 334 | }).then(response => { |
| 332 | 335 | this.downloadExcel(response, '定时任务.xls'); |
| 336 | + this.exportLoading = false; | |
| 333 | 337 | }) |
| 334 | 338 | } |
| 335 | 339 | } | ... | ... |
yudao-ui-admin/src/views/infra/job/log.vue
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | </el-table-column> |
| 55 | 55 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| 56 | 56 | <template slot-scope="scope"> |
| 57 | - <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" | |
| 57 | + <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" :loading="exportLoading" | |
| 58 | 58 | v-hasPermi="['infra:job:query']">详细</el-button> |
| 59 | 59 | </template> |
| 60 | 60 | </el-table-column> |
| ... | ... | @@ -96,6 +96,8 @@ export default { |
| 96 | 96 | return { |
| 97 | 97 | // 遮罩层 |
| 98 | 98 | loading: true, |
| 99 | + // 导出遮罩层 | |
| 100 | + exportLoading: false, | |
| 99 | 101 | // 显示搜索条件 |
| 100 | 102 | showSearch: true, |
| 101 | 103 | // 总条数 |
| ... | ... | @@ -165,10 +167,12 @@ export default { |
| 165 | 167 | confirmButtonText: "确定", |
| 166 | 168 | cancelButtonText: "取消", |
| 167 | 169 | type: "warning" |
| 168 | - }).then(function() { | |
| 170 | + }).then(() => { | |
| 171 | + this.exportLoading = true; | |
| 169 | 172 | return exportJobLogExcel(params); |
| 170 | 173 | }).then(response => { |
| 171 | 174 | this.downloadExcel(response, '定时任务日志.xls'); |
| 175 | + this.exportLoading = false; | |
| 172 | 176 | }) |
| 173 | 177 | } |
| 174 | 178 | } | ... | ... |
yudao-ui-admin/src/views/pay/merchant/index.vue
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | v-hasPermi="['pay:merchant:create']">新增</el-button> |
| 38 | 38 | </el-col> |
| 39 | 39 | <el-col :span="1.5"> |
| 40 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 40 | + <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport" | |
| 41 | 41 | v-hasPermi="['pay:merchant:export']">导出</el-button> |
| 42 | 42 | </el-col> |
| 43 | 43 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -124,6 +124,8 @@ export default { |
| 124 | 124 | return { |
| 125 | 125 | // 遮罩层 |
| 126 | 126 | loading: true, |
| 127 | + // 导出遮罩层 | |
| 128 | + exportLoading: false, | |
| 127 | 129 | // 显示搜索条件 |
| 128 | 130 | showSearch: true, |
| 129 | 131 | // 总条数 |
| ... | ... | @@ -285,10 +287,12 @@ export default { |
| 285 | 287 | confirmButtonText: "确定", |
| 286 | 288 | cancelButtonText: "取消", |
| 287 | 289 | type: "warning" |
| 288 | - }).then(function() { | |
| 290 | + }).then(() => { | |
| 291 | + this.exportLoading = true; | |
| 289 | 292 | return exportMerchantExcel(params); |
| 290 | 293 | }).then(response => { |
| 291 | 294 | this.downloadExcel(response, '支付商户信息.xls'); |
| 295 | + this.exportLoading = false; | |
| 292 | 296 | }) |
| 293 | 297 | } |
| 294 | 298 | } | ... | ... |
yudao-ui-admin/src/views/system/dict/data.vue
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | v-hasPermi="['system:dict:create']">新增</el-button> |
| 27 | 27 | </el-col> |
| 28 | 28 | <el-col :span="1.5"> |
| 29 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 29 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 30 | 30 | v-hasPermi="['system:dict:export']">导出</el-button> |
| 31 | 31 | </el-col> |
| 32 | 32 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -102,6 +102,8 @@ export default { |
| 102 | 102 | return { |
| 103 | 103 | // 遮罩层 |
| 104 | 104 | loading: true, |
| 105 | + // 导出遮罩层 | |
| 106 | + exportLoading: false, | |
| 105 | 107 | // 显示搜索条件 |
| 106 | 108 | showSearch: true, |
| 107 | 109 | // 总条数 |
| ... | ... | @@ -266,11 +268,13 @@ export default { |
| 266 | 268 | confirmButtonText: "确定", |
| 267 | 269 | cancelButtonText: "取消", |
| 268 | 270 | type: "warning" |
| 269 | - }).then(function() { | |
| 271 | + }).then(() => { | |
| 272 | + this.exportLoading = true; | |
| 270 | 273 | return exportData(queryParams); |
| 271 | 274 | }).then(response => { |
| 272 | 275 | this.downloadExcel(response, '字典数据.xls'); |
| 273 | - }) | |
| 276 | + this.exportLoading = false; | |
| 277 | + }) | |
| 274 | 278 | } |
| 275 | 279 | } |
| 276 | 280 | }; | ... | ... |
yudao-ui-admin/src/views/system/dict/index.vue
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | v-hasPermi="['system:dict:create']">新增</el-button> |
| 29 | 29 | </el-col> |
| 30 | 30 | <el-col :span="1.5"> |
| 31 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 31 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 32 | 32 | v-hasPermi="['system:dict:export']">导出</el-button> |
| 33 | 33 | </el-col> |
| 34 | 34 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -102,6 +102,8 @@ export default { |
| 102 | 102 | return { |
| 103 | 103 | // 遮罩层 |
| 104 | 104 | loading: true, |
| 105 | + // 导出遮罩层 | |
| 106 | + exportLoading: false, | |
| 105 | 107 | // 显示搜索条件 |
| 106 | 108 | showSearch: true, |
| 107 | 109 | // 总条数 |
| ... | ... | @@ -252,10 +254,12 @@ export default { |
| 252 | 254 | confirmButtonText: "确定", |
| 253 | 255 | cancelButtonText: "取消", |
| 254 | 256 | type: "warning" |
| 255 | - }).then(function() { | |
| 257 | + }).then(() => { | |
| 258 | + this.exportLoading = true; | |
| 256 | 259 | return exportType(params); |
| 257 | 260 | }).then(response => { |
| 258 | 261 | this.downloadExcel(response, '字典类型.xls'); |
| 262 | + this.exportLoading = false; | |
| 259 | 263 | }) |
| 260 | 264 | } |
| 261 | 265 | } | ... | ... |
yudao-ui-admin/src/views/system/errorCode/index.vue
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | v-hasPermi="['system:error-code:create']">新增</el-button> |
| 36 | 36 | </el-col> |
| 37 | 37 | <el-col :span="1.5"> |
| 38 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 38 | + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 39 | 39 | v-hasPermi="['system:error-code:export']">导出</el-button> |
| 40 | 40 | </el-col> |
| 41 | 41 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -106,6 +106,8 @@ export default { |
| 106 | 106 | return { |
| 107 | 107 | // 遮罩层 |
| 108 | 108 | loading: true, |
| 109 | + // 导出遮罩层 | |
| 110 | + exportLoading: false, | |
| 109 | 111 | // 显示搜索条件 |
| 110 | 112 | showSearch: true, |
| 111 | 113 | // 总条数 |
| ... | ... | @@ -245,10 +247,12 @@ export default { |
| 245 | 247 | confirmButtonText: "确定", |
| 246 | 248 | cancelButtonText: "取消", |
| 247 | 249 | type: "warning" |
| 248 | - }).then(function() { | |
| 250 | + }).then(() => { | |
| 251 | + this.exportLoading = true; | |
| 249 | 252 | return exportErrorCodeExcel(params); |
| 250 | 253 | }).then(response => { |
| 251 | 254 | this.downloadExcel(response, '错误码.xls'); |
| 255 | + this.exportLoading = false; | |
| 252 | 256 | }) |
| 253 | 257 | } |
| 254 | 258 | } | ... | ... |
yudao-ui-admin/src/views/system/loginlog/index.vue
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | |
| 28 | 28 | <el-row :gutter="10" class="mb8"> |
| 29 | 29 | <el-col :span="1.5"> |
| 30 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 30 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 31 | 31 | v-hasPermi="['system:login-log:export']">导出</el-button> |
| 32 | 32 | </el-col> |
| 33 | 33 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -70,6 +70,8 @@ export default { |
| 70 | 70 | return { |
| 71 | 71 | // 遮罩层 |
| 72 | 72 | loading: true, |
| 73 | + // 导出遮罩层 | |
| 74 | + exportLoading: false, | |
| 73 | 75 | // 显示搜索条件 |
| 74 | 76 | showSearch: true, |
| 75 | 77 | // 总条数 |
| ... | ... | @@ -129,11 +131,13 @@ export default { |
| 129 | 131 | confirmButtonText: "确定", |
| 130 | 132 | cancelButtonText: "取消", |
| 131 | 133 | type: "warning" |
| 132 | - }).then(function() { | |
| 134 | + }).then(() => { | |
| 135 | + this.exportLoading = true; | |
| 133 | 136 | return exportLoginLog(queryParams); |
| 134 | 137 | }).then(response => { |
| 135 | 138 | this.downloadExcel(response, '登录日志.xls'); |
| 136 | - }) | |
| 139 | + this.exportLoading = false; | |
| 140 | + }) | |
| 137 | 141 | } |
| 138 | 142 | } |
| 139 | 143 | }; | ... | ... |
yudao-ui-admin/src/views/system/operatelog/index.vue
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | |
| 34 | 34 | <el-row :gutter="10" class="mb8"> |
| 35 | 35 | <el-col :span="1.5"> |
| 36 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 36 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 37 | 37 | v-hasPermi="['system:operate-log:export']">导出</el-button> |
| 38 | 38 | </el-col> |
| 39 | 39 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -138,6 +138,8 @@ export default { |
| 138 | 138 | return { |
| 139 | 139 | // 遮罩层 |
| 140 | 140 | loading: true, |
| 141 | + // 导出遮罩层 | |
| 142 | + exportLoading: false, | |
| 141 | 143 | // 显示搜索条件 |
| 142 | 144 | showSearch: true, |
| 143 | 145 | // 总条数 |
| ... | ... | @@ -216,11 +218,13 @@ export default { |
| 216 | 218 | confirmButtonText: "确定", |
| 217 | 219 | cancelButtonText: "取消", |
| 218 | 220 | type: "warning" |
| 219 | - }).then(function() { | |
| 221 | + }).then(() => { | |
| 222 | + this.exportLoading = true; | |
| 220 | 223 | return exportOperateLog(queryParams); |
| 221 | 224 | }).then(response => { |
| 222 | 225 | this.downloadExcel(response, '操作日志.xls'); |
| 223 | - }) | |
| 226 | + this.exportLoading = false; | |
| 227 | + }) | |
| 224 | 228 | } |
| 225 | 229 | } |
| 226 | 230 | }; | ... | ... |
yudao-ui-admin/src/views/system/post/index.vue
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | v-hasPermi="['system:post:create']">新增</el-button> |
| 25 | 25 | </el-col> |
| 26 | 26 | <el-col :span="1.5"> |
| 27 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 27 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 28 | 28 | v-hasPermi="['system:post:export']">导出</el-button> |
| 29 | 29 | </el-col> |
| 30 | 30 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -96,6 +96,8 @@ export default { |
| 96 | 96 | return { |
| 97 | 97 | // 遮罩层 |
| 98 | 98 | loading: true, |
| 99 | + // 导出遮罩层 | |
| 100 | + exportLoading: false, | |
| 99 | 101 | // 显示搜索条件 |
| 100 | 102 | showSearch: true, |
| 101 | 103 | // 总条数 |
| ... | ... | @@ -238,11 +240,13 @@ export default { |
| 238 | 240 | confirmButtonText: "确定", |
| 239 | 241 | cancelButtonText: "取消", |
| 240 | 242 | type: "warning" |
| 241 | - }).then(function() { | |
| 243 | + }).then(() => { | |
| 244 | + this.exportLoading = true; | |
| 242 | 245 | return exportPost(queryParams); |
| 243 | 246 | }).then(response => { |
| 244 | - this.downloadExcel(response, '岗位数据.xls'); | |
| 245 | - }) | |
| 247 | + this.downloadExcel(response, '岗位数据.xls'); | |
| 248 | + this.exportLoading = false; | |
| 249 | + }) | |
| 246 | 250 | } |
| 247 | 251 | } |
| 248 | 252 | }; | ... | ... |
yudao-ui-admin/src/views/system/role/index.vue
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | v-hasPermi="['system:role:create']">新增</el-button> |
| 31 | 31 | </el-col> |
| 32 | 32 | <el-col :span="1.5"> |
| 33 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 33 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 34 | 34 | v-hasPermi="['system:role:export']">导出</el-button> |
| 35 | 35 | </el-col> |
| 36 | 36 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -188,6 +188,8 @@ export default { |
| 188 | 188 | return { |
| 189 | 189 | // 遮罩层 |
| 190 | 190 | loading: true, |
| 191 | + // 导出遮罩层 | |
| 192 | + exportLoading: false, | |
| 191 | 193 | // 显示搜索条件 |
| 192 | 194 | showSearch: true, |
| 193 | 195 | // 总条数 |
| ... | ... | @@ -504,10 +506,12 @@ export default { |
| 504 | 506 | cancelButtonText: "取消", |
| 505 | 507 | type: "warning" |
| 506 | 508 | }).then(function() { |
| 509 | + this.exportLoading = true; | |
| 507 | 510 | return exportRole(queryParams); |
| 508 | 511 | }).then(response => { |
| 509 | 512 | this.downloadExcel(response, '角色数据.xls'); |
| 510 | - }) | |
| 513 | + this.exportLoading = false; | |
| 514 | + }) | |
| 511 | 515 | } |
| 512 | 516 | } |
| 513 | 517 | }; | ... | ... |
yudao-ui-admin/src/views/system/sms/smsChannel.vue
| ... | ... | @@ -28,10 +28,6 @@ |
| 28 | 28 | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| 29 | 29 | v-hasPermi="['system:sms-channel:create']">新增</el-button> |
| 30 | 30 | </el-col> |
| 31 | - <el-col :span="1.5"> | |
| 32 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 33 | - v-hasPermi="['system:sms-channel:export']">导出</el-button> | |
| 34 | - </el-col> | |
| 35 | 31 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| 36 | 32 | </el-row> |
| 37 | 33 | |
| ... | ... | @@ -247,295 +243,6 @@ export default { |
| 247 | 243 | this.getList(); |
| 248 | 244 | this.msgSuccess("删除成功"); |
| 249 | 245 | }) |
| 250 | - }, | |
| 251 | - /** 导出按钮操作 */ | |
| 252 | - handleExport() { | |
| 253 | - // 处理查询参数 | |
| 254 | - let params = {...this.queryParams}; | |
| 255 | - params.pageNo = undefined; | |
| 256 | - params.pageSize = undefined; | |
| 257 | - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); | |
| 258 | - // 执行导出 | |
| 259 | - this.$confirm('是否确认导出所有短信渠道数据项?', "警告", { | |
| 260 | - confirmButtonText: "确定", | |
| 261 | - cancelButtonText: "取消", | |
| 262 | - type: "warning" | |
| 263 | - }).then(function() { | |
| 264 | - return exportSmsChannelExcel(params); | |
| 265 | - }).then(response => { | |
| 266 | - this.downloadExcel(response, '短信渠道.xls'); | |
| 267 | - }) | |
| 268 | - } | |
| 269 | - } | |
| 270 | -}; | |
| 271 | -</script><template> | |
| 272 | - <div class="app-container"> | |
| 273 | - | |
| 274 | - <!-- 搜索工作栏 --> | |
| 275 | - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 276 | - <el-form-item label="短信签名" prop="signature"> | |
| 277 | - <el-input v-model="queryParams.signature" placeholder="请输入短信签名" clearable size="small" @keyup.enter.native="handleQuery"/> | |
| 278 | - </el-form-item> | |
| 279 | - <el-form-item label="启用状态" prop="status"> | |
| 280 | - <el-select v-model="queryParams.status" placeholder="请选择启用状态" clearable size="small"> | |
| 281 | - <el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" | |
| 282 | - :key="dict.value" :label="dict.label" :value="dict.value"/> | |
| 283 | - </el-select> | |
| 284 | - </el-form-item> | |
| 285 | - <el-form-item label="创建时间"> | |
| 286 | - <el-date-picker v-model="dateRangeCreateTime" size="small" style="width: 240px" value-format="yyyy-MM-dd" | |
| 287 | - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> | |
| 288 | - </el-form-item> | |
| 289 | - <el-form-item> | |
| 290 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 291 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 292 | - </el-form-item> | |
| 293 | - </el-form> | |
| 294 | - | |
| 295 | - <!-- 操作工具栏 --> | |
| 296 | - <el-row :gutter="10" class="mb8"> | |
| 297 | - <el-col :span="1.5"> | |
| 298 | - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" | |
| 299 | - v-hasPermi="['system:sms-channel:create']">新增</el-button> | |
| 300 | - </el-col> | |
| 301 | - <el-col :span="1.5"> | |
| 302 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 303 | - v-hasPermi="['system:sms-channel:export']">导出</el-button> | |
| 304 | - </el-col> | |
| 305 | - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 306 | - </el-row> | |
| 307 | - | |
| 308 | - <!-- 列表 --> | |
| 309 | - <el-table v-loading="loading" :data="list"> | |
| 310 | - <el-table-column label="编号" align="center" prop="id" /> | |
| 311 | - <el-table-column label="短信签名" align="center" prop="signature" /> | |
| 312 | - <el-table-column label="渠道编码" align="center" prop="code"> | |
| 313 | - <template slot-scope="scope"> | |
| 314 | - <span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, scope.row.code) }}</span> | |
| 315 | - </template> | |
| 316 | - </el-table-column>> | |
| 317 | - <el-table-column label="启用状态" align="center" prop="status"> | |
| 318 | - <template slot-scope="scope"> | |
| 319 | - <span>{{ getDictDataLabel(DICT_TYPE.COMMON_STATUS, scope.row.status) }}</span> | |
| 320 | - </template> | |
| 321 | - </el-table-column>> | |
| 322 | - <el-table-column label="备注" align="center" prop="remark" /> | |
| 323 | - <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | |
| 324 | - <template slot-scope="scope"> | |
| 325 | - <span>{{ parseTime(scope.row.createTime) }}</span> | |
| 326 | - </template> | |
| 327 | - </el-table-column> | |
| 328 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 329 | - <template slot-scope="scope"> | |
| 330 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | |
| 331 | - v-hasPermi="['system:sms-channel:update']">修改</el-button> | |
| 332 | - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" | |
| 333 | - v-hasPermi="['system:sms-channel:delete']">删除</el-button> | |
| 334 | - </template> | |
| 335 | - </el-table-column> | |
| 336 | - </el-table> | |
| 337 | - <!-- 分页组件 --> | |
| 338 | - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" | |
| 339 | - @pagination="getList"/> | |
| 340 | - | |
| 341 | - <!-- 对话框(添加 / 修改) --> | |
| 342 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 343 | - <el-form ref="form" :model="form" :rules="rules" label-width="130px"> | |
| 344 | - <el-form-item label="短信签名" prop="signature"> | |
| 345 | - <el-input v-model="form.signature" placeholder="请输入短信签名" /> | |
| 346 | - </el-form-item> | |
| 347 | - <el-form-item label="渠道编码" prop="code"> | |
| 348 | - <el-select v-model="form.code" placeholder="请选择渠道编码" :disabled="form.id > 0"> | |
| 349 | - <el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE)" | |
| 350 | - :key="dict.value" :label="dict.label" :value="dict.value" /> | |
| 351 | - </el-select> | |
| 352 | - </el-form-item> | |
| 353 | - <el-form-item label="启用状态"> | |
| 354 | - <el-radio-group v-model="form.status"> | |
| 355 | - <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" | |
| 356 | - :key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio> | |
| 357 | - </el-radio-group> | |
| 358 | - </el-form-item> | |
| 359 | - <el-form-item label="备注" prop="remark"> | |
| 360 | - <el-input v-model="form.remark" placeholder="请输入备注" /> | |
| 361 | - </el-form-item> | |
| 362 | - <el-form-item label="短信 API 的账号" prop="apiKey"> | |
| 363 | - <el-input v-model="form.apiKey" placeholder="请输入短信 API 的账号" /> | |
| 364 | - </el-form-item> | |
| 365 | - <el-form-item v-if="form.code !== 'YUN_PIAN'" label="短信 API 的秘钥" prop="apiSecret"> | |
| 366 | - <el-input v-model="form.apiSecret" placeholder="请输入短信 API 的秘钥" /> | |
| 367 | - </el-form-item> | |
| 368 | - <el-form-item label="短信发送回调 URL" prop="callbackUrl"> | |
| 369 | - <el-input v-model="form.callbackUrl" placeholder="请输入短信发送回调 URL" /> | |
| 370 | - </el-form-item> | |
| 371 | - </el-form> | |
| 372 | - <div slot="footer" class="dialog-footer"> | |
| 373 | - <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 374 | - <el-button @click="cancel">取 消</el-button> | |
| 375 | - </div> | |
| 376 | - </el-dialog> | |
| 377 | - </div> | |
| 378 | -</template> | |
| 379 | - | |
| 380 | -<script> | |
| 381 | -import { createSmsChannel, updateSmsChannel, deleteSmsChannel, getSmsChannel, getSmsChannelPage } from "@/api/system/sms/smsChannel"; | |
| 382 | - | |
| 383 | -export default { | |
| 384 | - name: "SmsChannel", | |
| 385 | - components: { | |
| 386 | - }, | |
| 387 | - data() { | |
| 388 | - return { | |
| 389 | - // 遮罩层 | |
| 390 | - loading: true, | |
| 391 | - // 显示搜索条件 | |
| 392 | - showSearch: true, | |
| 393 | - // 总条数 | |
| 394 | - total: 0, | |
| 395 | - // 短信渠道列表 | |
| 396 | - list: [], | |
| 397 | - // 弹出层标题 | |
| 398 | - title: "", | |
| 399 | - // 是否显示弹出层 | |
| 400 | - open: false, | |
| 401 | - dateRangeCreateTime: [], | |
| 402 | - // 查询参数 | |
| 403 | - queryParams: { | |
| 404 | - pageNo: 1, | |
| 405 | - pageSize: 10, | |
| 406 | - signature: null, | |
| 407 | - status: null, | |
| 408 | - }, | |
| 409 | - // 表单参数 | |
| 410 | - form: {}, | |
| 411 | - // 表单校验 | |
| 412 | - apiKeyEnableChannelCodes: ['YUN_PIAN'], | |
| 413 | - rules: { | |
| 414 | - signature: [{ required: true, message: "短信签名不能为空", trigger: "blur" }], | |
| 415 | - code: [{ required: true, message: "渠道编码不能为空", trigger: "blur" }], | |
| 416 | - status: [{ required: true, message: "启用状态不能为空", trigger: "blur" }], | |
| 417 | - apiKey: [{ required: true, message: "短信 API 的账号不能为空", trigger: "blur" }], | |
| 418 | - apiSecret: [{ required: true, message: "短信 API 的秘钥不能为空", trigger: "blur" }], | |
| 419 | - } | |
| 420 | - }; | |
| 421 | - }, | |
| 422 | - created() { | |
| 423 | - this.getList(); | |
| 424 | - }, | |
| 425 | - methods: { | |
| 426 | - /** 查询列表 */ | |
| 427 | - getList() { | |
| 428 | - this.loading = true; | |
| 429 | - // 处理查询参数 | |
| 430 | - let params = {...this.queryParams}; | |
| 431 | - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); | |
| 432 | - // 执行查询 | |
| 433 | - getSmsChannelPage(params).then(response => { | |
| 434 | - this.list = response.data.list; | |
| 435 | - this.total = response.data.total; | |
| 436 | - this.loading = false; | |
| 437 | - }); | |
| 438 | - }, | |
| 439 | - /** 取消按钮 */ | |
| 440 | - cancel() { | |
| 441 | - this.open = false; | |
| 442 | - this.reset(); | |
| 443 | - }, | |
| 444 | - /** 表单重置 */ | |
| 445 | - reset() { | |
| 446 | - this.form = { | |
| 447 | - id: undefined, | |
| 448 | - signature: undefined, | |
| 449 | - code: undefined, | |
| 450 | - status: undefined, | |
| 451 | - remark: undefined, | |
| 452 | - apiKey: undefined, | |
| 453 | - apiSecret: undefined, | |
| 454 | - callbackUrl: undefined, | |
| 455 | - }; | |
| 456 | - this.resetForm("form"); | |
| 457 | - }, | |
| 458 | - /** 搜索按钮操作 */ | |
| 459 | - handleQuery() { | |
| 460 | - this.queryParams.pageNo = 1; | |
| 461 | - this.getList(); | |
| 462 | - }, | |
| 463 | - /** 重置按钮操作 */ | |
| 464 | - resetQuery() { | |
| 465 | - this.dateRangeCreateTime = []; | |
| 466 | - this.resetForm("queryForm"); | |
| 467 | - this.handleQuery(); | |
| 468 | - }, | |
| 469 | - /** 新增按钮操作 */ | |
| 470 | - handleAdd() { | |
| 471 | - this.reset(); | |
| 472 | - this.open = true; | |
| 473 | - this.title = "添加短信渠道"; | |
| 474 | - }, | |
| 475 | - /** 修改按钮操作 */ | |
| 476 | - handleUpdate(row) { | |
| 477 | - this.reset(); | |
| 478 | - const id = row.id; | |
| 479 | - getSmsChannel(id).then(response => { | |
| 480 | - this.form = response.data; | |
| 481 | - this.open = true; | |
| 482 | - this.title = "修改短信渠道"; | |
| 483 | - }); | |
| 484 | - }, | |
| 485 | - /** 提交按钮 */ | |
| 486 | - submitForm() { | |
| 487 | - this.$refs["form"].validate(valid => { | |
| 488 | - if (!valid) { | |
| 489 | - return; | |
| 490 | - } | |
| 491 | - // 修改的提交 | |
| 492 | - if (this.form.id != null) { | |
| 493 | - updateSmsChannel(this.form).then(response => { | |
| 494 | - this.msgSuccess("修改成功"); | |
| 495 | - this.open = false; | |
| 496 | - this.getList(); | |
| 497 | - }); | |
| 498 | - return; | |
| 499 | - } | |
| 500 | - // 添加的提交 | |
| 501 | - createSmsChannel(this.form).then(response => { | |
| 502 | - this.msgSuccess("新增成功"); | |
| 503 | - this.open = false; | |
| 504 | - this.getList(); | |
| 505 | - }); | |
| 506 | - }); | |
| 507 | - }, | |
| 508 | - /** 删除按钮操作 */ | |
| 509 | - handleDelete(row) { | |
| 510 | - const id = row.id; | |
| 511 | - this.$confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?', "警告", { | |
| 512 | - confirmButtonText: "确定", | |
| 513 | - cancelButtonText: "取消", | |
| 514 | - type: "warning" | |
| 515 | - }).then(function() { | |
| 516 | - return deleteSmsChannel(id); | |
| 517 | - }).then(() => { | |
| 518 | - this.getList(); | |
| 519 | - this.msgSuccess("删除成功"); | |
| 520 | - }) | |
| 521 | - }, | |
| 522 | - /** 导出按钮操作 */ | |
| 523 | - handleExport() { | |
| 524 | - // 处理查询参数 | |
| 525 | - let params = {...this.queryParams}; | |
| 526 | - params.pageNo = undefined; | |
| 527 | - params.pageSize = undefined; | |
| 528 | - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); | |
| 529 | - // 执行导出 | |
| 530 | - this.$confirm('是否确认导出所有短信渠道数据项?', "警告", { | |
| 531 | - confirmButtonText: "确定", | |
| 532 | - cancelButtonText: "取消", | |
| 533 | - type: "warning" | |
| 534 | - }).then(function() { | |
| 535 | - return exportSmsChannelExcel(params); | |
| 536 | - }).then(response => { | |
| 537 | - this.downloadExcel(response, '短信渠道.xls'); | |
| 538 | - }) | |
| 539 | 246 | } |
| 540 | 247 | } |
| 541 | 248 | }; | ... | ... |
yudao-ui-admin/src/views/system/sms/smsLog.vue
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | v-hasPermi="['system:sms-log:create']">新增</el-button> |
| 50 | 50 | </el-col> |
| 51 | 51 | <el-col :span="1.5"> |
| 52 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 52 | + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 53 | 53 | v-hasPermi="['system:sms-log:export']">导出</el-button> |
| 54 | 54 | </el-col> |
| 55 | 55 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -195,6 +195,8 @@ export default { |
| 195 | 195 | return { |
| 196 | 196 | // 遮罩层 |
| 197 | 197 | loading: true, |
| 198 | + // 导出遮罩层 | |
| 199 | + exportLoading: false, | |
| 198 | 200 | // 显示搜索条件 |
| 199 | 201 | showSearch: true, |
| 200 | 202 | // 总条数 |
| ... | ... | @@ -275,10 +277,12 @@ export default { |
| 275 | 277 | confirmButtonText: "确定", |
| 276 | 278 | cancelButtonText: "取消", |
| 277 | 279 | type: "warning" |
| 278 | - }).then(function() { | |
| 280 | + }).then(() => { | |
| 281 | + this.exportLoading = true; | |
| 279 | 282 | return exportSmsLogExcel(params); |
| 280 | 283 | }).then(response => { |
| 281 | 284 | this.downloadExcel(response, '短信日志.xls'); |
| 285 | + this.exportLoading = false; | |
| 282 | 286 | }) |
| 283 | 287 | }, |
| 284 | 288 | /** 详细按钮操作 */ | ... | ... |
yudao-ui-admin/src/views/system/sms/smsTemplate.vue
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | v-hasPermi="['system:sms-template:create']">新增</el-button> |
| 46 | 46 | </el-col> |
| 47 | 47 | <el-col :span="1.5"> |
| 48 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 48 | + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 49 | 49 | v-hasPermi="['system:sms-template:export']">导出</el-button> |
| 50 | 50 | </el-col> |
| 51 | 51 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -171,6 +171,8 @@ export default { |
| 171 | 171 | return { |
| 172 | 172 | // 遮罩层 |
| 173 | 173 | loading: true, |
| 174 | + // 导出遮罩层 | |
| 175 | + exportLoading: false, | |
| 174 | 176 | // 显示搜索条件 |
| 175 | 177 | showSearch: true, |
| 176 | 178 | // 总条数 |
| ... | ... | @@ -336,10 +338,12 @@ export default { |
| 336 | 338 | confirmButtonText: "确定", |
| 337 | 339 | cancelButtonText: "取消", |
| 338 | 340 | type: "warning" |
| 339 | - }).then(function() { | |
| 341 | + }).then(() => { | |
| 342 | + this.exportLoading = true; | |
| 340 | 343 | return exportSmsTemplateExcel(params); |
| 341 | 344 | }).then(response => { |
| 342 | 345 | this.downloadExcel(response, '短信模板.xls'); |
| 346 | + this.exportLoading = false; | |
| 343 | 347 | }) |
| 344 | 348 | }, |
| 345 | 349 | /** 发送短息按钮 */ | ... | ... |
yudao-ui-admin/src/views/system/tenant/index.vue
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | v-hasPermi="['system:tenant:create']">新增</el-button> |
| 36 | 36 | </el-col> |
| 37 | 37 | <el-col :span="1.5"> |
| 38 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 38 | + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 39 | 39 | v-hasPermi="['system:tenant:export']">导出</el-button> |
| 40 | 40 | </el-col> |
| 41 | 41 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -109,6 +109,8 @@ export default { |
| 109 | 109 | return { |
| 110 | 110 | // 遮罩层 |
| 111 | 111 | loading: true, |
| 112 | + // 导出遮罩层 | |
| 113 | + exportLoading: false, | |
| 112 | 114 | // 显示搜索条件 |
| 113 | 115 | showSearch: true, |
| 114 | 116 | // 总条数 |
| ... | ... | @@ -248,11 +250,13 @@ export default { |
| 248 | 250 | confirmButtonText: "确定", |
| 249 | 251 | cancelButtonText: "取消", |
| 250 | 252 | type: "warning" |
| 251 | - }).then(function() { | |
| 253 | + }).then(() => { | |
| 254 | + this.exportLoading = true; | |
| 252 | 255 | return exportTenantExcel(params); |
| 253 | 256 | }).then(response => { |
| 254 | 257 | this.downloadExcel(response, '租户.xls'); |
| 255 | - }) | |
| 258 | + this.exportLoading = false; | |
| 259 | + }) | |
| 256 | 260 | } |
| 257 | 261 | } |
| 258 | 262 | }; | ... | ... |
yudao-ui-admin/src/views/system/user/index.vue
| ... | ... | @@ -47,7 +47,7 @@ |
| 47 | 47 | v-hasPermi="['system:user:import']">导入</el-button> |
| 48 | 48 | </el-col> |
| 49 | 49 | <el-col :span="1.5"> |
| 50 | - <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 50 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 51 | 51 | v-hasPermi="['system:user:export']">导出</el-button> |
| 52 | 52 | </el-col> |
| 53 | 53 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> |
| ... | ... | @@ -261,6 +261,8 @@ export default { |
| 261 | 261 | return { |
| 262 | 262 | // 遮罩层 |
| 263 | 263 | loading: true, |
| 264 | + // 导出遮罩层 | |
| 265 | + exportLoading: false, | |
| 264 | 266 | // 显示搜索条件 |
| 265 | 267 | showSearch: true, |
| 266 | 268 | // 总条数 |
| ... | ... | @@ -599,11 +601,13 @@ export default { |
| 599 | 601 | confirmButtonText: "确定", |
| 600 | 602 | cancelButtonText: "取消", |
| 601 | 603 | type: "warning" |
| 602 | - }).then(function() { | |
| 604 | + }).then(() => { | |
| 605 | + this.exportLoading = true; | |
| 603 | 606 | return exportUser(queryParams); |
| 604 | 607 | }).then(response => { |
| 605 | 608 | this.downloadExcel(response, '用户数据.xls'); |
| 606 | - }) | |
| 609 | + this.exportLoading = false; | |
| 610 | + }) | |
| 607 | 611 | }, |
| 608 | 612 | /** 导入按钮操作 */ |
| 609 | 613 | handleImport() { | ... | ... |
yudao-ui-admin/src/views/tool/testDemo/index.vue
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | v-hasPermi="['tool:test-demo:create']">新增</el-button> |
| 40 | 40 | </el-col> |
| 41 | 41 | <el-col :span="1.5"> |
| 42 | - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" | |
| 42 | + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | |
| 43 | 43 | v-hasPermi="['tool:test-demo:export']">导出</el-button> |
| 44 | 44 | </el-col> |
| 45 | 45 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| ... | ... | @@ -113,6 +113,8 @@ export default { |
| 113 | 113 | return { |
| 114 | 114 | // 遮罩层 |
| 115 | 115 | loading: true, |
| 116 | + // 导出遮罩层 | |
| 117 | + exportLoading: false, | |
| 116 | 118 | // 显示搜索条件 |
| 117 | 119 | showSearch: true, |
| 118 | 120 | // 总条数 |
| ... | ... | @@ -255,11 +257,13 @@ export default { |
| 255 | 257 | confirmButtonText: "确定", |
| 256 | 258 | cancelButtonText: "取消", |
| 257 | 259 | type: "warning" |
| 258 | - }).then(function() { | |
| 260 | + }).then(() => { | |
| 261 | + this.exportLoading = true; | |
| 259 | 262 | return exportTestDemoExcel(params); |
| 260 | 263 | }).then(response => { |
| 261 | 264 | this.downloadExcel(response, '字典类型.xls'); |
| 262 | - }) | |
| 265 | + this.exportLoading = false; | |
| 266 | + }) | |
| 263 | 267 | } |
| 264 | 268 | } |
| 265 | 269 | }; | ... | ... |