Commit b0965653bf43ba99a13f925fa7314f4ad891ccab
1 parent
e472f625
删除不必要的代码
Showing
20 changed files
with
116 additions
and
176 deletions
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
| ... | ... | @@ -420,19 +420,15 @@ export default { |
| 420 | 420 | #end |
| 421 | 421 | if (this.form.${pkColumn.javaField} != null) { |
| 422 | 422 | update${BusinessName}(this.form).then(response => { |
| 423 | - if (response.code === 200) { | |
| 424 | - this.msgSuccess("修改成功"); | |
| 425 | - this.open = false; | |
| 426 | - this.getList(); | |
| 427 | - } | |
| 423 | + this.msgSuccess("修改成功"); | |
| 424 | + this.open = false; | |
| 425 | + this.getList(); | |
| 428 | 426 | }); |
| 429 | 427 | } else { |
| 430 | 428 | add${BusinessName}(this.form).then(response => { |
| 431 | - if (response.code === 200) { | |
| 432 | - this.msgSuccess("新增成功"); | |
| 433 | - this.open = false; | |
| 434 | - this.getList(); | |
| 435 | - } | |
| 429 | + this.msgSuccess("新增成功"); | |
| 430 | + this.open = false; | |
| 431 | + this.getList(); | |
| 436 | 432 | }); |
| 437 | 433 | } |
| 438 | 434 | } |
| ... | ... | @@ -449,7 +445,7 @@ export default { |
| 449 | 445 | }).then(() => { |
| 450 | 446 | this.getList(); |
| 451 | 447 | this.msgSuccess("删除成功"); |
| 452 | - }).catch(function() {}); | |
| 448 | + }) | |
| 453 | 449 | } |
| 454 | 450 | } |
| 455 | 451 | }; | ... | ... |
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
| ... | ... | @@ -436,19 +436,15 @@ export default { |
| 436 | 436 | #end |
| 437 | 437 | if (this.form.${pkColumn.javaField} != null) { |
| 438 | 438 | update${BusinessName}(this.form).then(response => { |
| 439 | - if (response.code === 200) { | |
| 440 | - this.msgSuccess("修改成功"); | |
| 441 | - this.open = false; | |
| 442 | - this.getList(); | |
| 443 | - } | |
| 439 | + this.msgSuccess("修改成功"); | |
| 440 | + this.open = false; | |
| 441 | + this.getList(); | |
| 444 | 442 | }); |
| 445 | 443 | } else { |
| 446 | 444 | add${BusinessName}(this.form).then(response => { |
| 447 | - if (response.code === 200) { | |
| 448 | - this.msgSuccess("新增成功"); | |
| 449 | - this.open = false; | |
| 450 | - this.getList(); | |
| 451 | - } | |
| 445 | + this.msgSuccess("新增成功"); | |
| 446 | + this.open = false; | |
| 447 | + this.getList(); | |
| 452 | 448 | }); |
| 453 | 449 | } |
| 454 | 450 | } |
| ... | ... | @@ -466,7 +462,7 @@ export default { |
| 466 | 462 | }).then(() => { |
| 467 | 463 | this.getList(); |
| 468 | 464 | this.msgSuccess("删除成功"); |
| 469 | - }).catch(function() {}); | |
| 465 | + }) | |
| 470 | 466 | }, |
| 471 | 467 | /** 导出按钮操作 */ |
| 472 | 468 | handleExport() { |
| ... | ... | @@ -479,7 +475,7 @@ export default { |
| 479 | 475 | return export${BusinessName}(queryParams); |
| 480 | 476 | }).then(response => { |
| 481 | 477 | this.download(response.msg); |
| 482 | - }).catch(function() {}); | |
| 478 | + }) | |
| 483 | 479 | } |
| 484 | 480 | } |
| 485 | 481 | }; | ... | ... |
ruoyi-ui/src/views/monitor/job/index.vue
| ... | ... | @@ -402,7 +402,7 @@ export default { |
| 402 | 402 | return runJob(row.jobId, row.jobGroup); |
| 403 | 403 | }).then(() => { |
| 404 | 404 | this.msgSuccess("执行成功"); |
| 405 | - }).catch(function() {}); | |
| 405 | + }) | |
| 406 | 406 | }, |
| 407 | 407 | /** 任务详细信息 */ |
| 408 | 408 | handleView(row) { |
| ... | ... | @@ -437,19 +437,15 @@ export default { |
| 437 | 437 | if (valid) { |
| 438 | 438 | if (this.form.jobId != undefined) { |
| 439 | 439 | updateJob(this.form).then(response => { |
| 440 | - if (response.code === 200) { | |
| 441 | - this.msgSuccess("修改成功"); | |
| 442 | - this.open = false; | |
| 443 | - this.getList(); | |
| 444 | - } | |
| 440 | + this.msgSuccess("修改成功"); | |
| 441 | + this.open = false; | |
| 442 | + this.getList(); | |
| 445 | 443 | }); |
| 446 | 444 | } else { |
| 447 | 445 | addJob(this.form).then(response => { |
| 448 | - if (response.code === 200) { | |
| 449 | - this.msgSuccess("新增成功"); | |
| 450 | - this.open = false; | |
| 451 | - this.getList(); | |
| 452 | - } | |
| 446 | + this.msgSuccess("新增成功"); | |
| 447 | + this.open = false; | |
| 448 | + this.getList(); | |
| 453 | 449 | }); |
| 454 | 450 | } |
| 455 | 451 | } |
| ... | ... | @@ -467,7 +463,7 @@ export default { |
| 467 | 463 | }).then(() => { |
| 468 | 464 | this.getList(); |
| 469 | 465 | this.msgSuccess("删除成功"); |
| 470 | - }).catch(function() {}); | |
| 466 | + }) | |
| 471 | 467 | }, |
| 472 | 468 | /** 导出按钮操作 */ |
| 473 | 469 | handleExport() { |
| ... | ... | @@ -480,7 +476,7 @@ export default { |
| 480 | 476 | return exportJob(queryParams); |
| 481 | 477 | }).then(response => { |
| 482 | 478 | this.download(response.msg); |
| 483 | - }).catch(function() {}); | |
| 479 | + }) | |
| 484 | 480 | } |
| 485 | 481 | } |
| 486 | 482 | }; | ... | ... |
ruoyi-ui/src/views/monitor/job/log.vue
| ... | ... | @@ -263,7 +263,7 @@ export default { |
| 263 | 263 | }).then(() => { |
| 264 | 264 | this.getList(); |
| 265 | 265 | this.msgSuccess("删除成功"); |
| 266 | - }).catch(function() {}); | |
| 266 | + }) | |
| 267 | 267 | }, |
| 268 | 268 | /** 清空按钮操作 */ |
| 269 | 269 | handleClean() { |
| ... | ... | @@ -276,7 +276,7 @@ export default { |
| 276 | 276 | }).then(() => { |
| 277 | 277 | this.getList(); |
| 278 | 278 | this.msgSuccess("清空成功"); |
| 279 | - }).catch(function() {}); | |
| 279 | + }) | |
| 280 | 280 | }, |
| 281 | 281 | /** 导出按钮操作 */ |
| 282 | 282 | handleExport() { |
| ... | ... | @@ -289,7 +289,7 @@ export default { |
| 289 | 289 | return exportJobLog(queryParams); |
| 290 | 290 | }).then(response => { |
| 291 | 291 | this.download(response.msg); |
| 292 | - }).catch(function() {}); | |
| 292 | + }) | |
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | }; | ... | ... |
ruoyi-ui/src/views/monitor/logininfor/index.vue
| ... | ... | @@ -196,7 +196,7 @@ export default { |
| 196 | 196 | }).then(() => { |
| 197 | 197 | this.getList(); |
| 198 | 198 | this.msgSuccess("删除成功"); |
| 199 | - }).catch(function() {}); | |
| 199 | + }) | |
| 200 | 200 | }, |
| 201 | 201 | /** 清空按钮操作 */ |
| 202 | 202 | handleClean() { |
| ... | ... | @@ -209,7 +209,7 @@ export default { |
| 209 | 209 | }).then(() => { |
| 210 | 210 | this.getList(); |
| 211 | 211 | this.msgSuccess("清空成功"); |
| 212 | - }).catch(function() {}); | |
| 212 | + }) | |
| 213 | 213 | }, |
| 214 | 214 | /** 导出按钮操作 */ |
| 215 | 215 | handleExport() { |
| ... | ... | @@ -222,7 +222,7 @@ export default { |
| 222 | 222 | return exportLogininfor(queryParams); |
| 223 | 223 | }).then(response => { |
| 224 | 224 | this.download(response.msg); |
| 225 | - }).catch(function() {}); | |
| 225 | + }) | |
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | }; | ... | ... |
ruoyi-ui/src/views/monitor/online/index.vue
ruoyi-ui/src/views/monitor/operlog/index.vue
| ... | ... | @@ -284,7 +284,7 @@ export default { |
| 284 | 284 | }).then(() => { |
| 285 | 285 | this.getList(); |
| 286 | 286 | this.msgSuccess("删除成功"); |
| 287 | - }).catch(function() {}); | |
| 287 | + }) | |
| 288 | 288 | }, |
| 289 | 289 | /** 清空按钮操作 */ |
| 290 | 290 | handleClean() { |
| ... | ... | @@ -297,7 +297,7 @@ export default { |
| 297 | 297 | }).then(() => { |
| 298 | 298 | this.getList(); |
| 299 | 299 | this.msgSuccess("清空成功"); |
| 300 | - }).catch(function() {}); | |
| 300 | + }) | |
| 301 | 301 | }, |
| 302 | 302 | /** 导出按钮操作 */ |
| 303 | 303 | handleExport() { |
| ... | ... | @@ -310,7 +310,7 @@ export default { |
| 310 | 310 | return exportOperlog(queryParams); |
| 311 | 311 | }).then(response => { |
| 312 | 312 | this.download(response.msg); |
| 313 | - }).catch(function() {}); | |
| 313 | + }) | |
| 314 | 314 | } |
| 315 | 315 | } |
| 316 | 316 | }; | ... | ... |
ruoyi-ui/src/views/system/config/index.vue
| ... | ... | @@ -304,19 +304,15 @@ export default { |
| 304 | 304 | if (valid) { |
| 305 | 305 | if (this.form.configId != undefined) { |
| 306 | 306 | updateConfig(this.form).then(response => { |
| 307 | - if (response.code === 200) { | |
| 308 | - this.msgSuccess("修改成功"); | |
| 309 | - this.open = false; | |
| 310 | - this.getList(); | |
| 311 | - } | |
| 307 | + this.msgSuccess("修改成功"); | |
| 308 | + this.open = false; | |
| 309 | + this.getList(); | |
| 312 | 310 | }); |
| 313 | 311 | } else { |
| 314 | 312 | addConfig(this.form).then(response => { |
| 315 | - if (response.code === 200) { | |
| 316 | - this.msgSuccess("新增成功"); | |
| 317 | - this.open = false; | |
| 318 | - this.getList(); | |
| 319 | - } | |
| 313 | + this.msgSuccess("新增成功"); | |
| 314 | + this.open = false; | |
| 315 | + this.getList(); | |
| 320 | 316 | }); |
| 321 | 317 | } |
| 322 | 318 | } |
| ... | ... | @@ -334,7 +330,7 @@ export default { |
| 334 | 330 | }).then(() => { |
| 335 | 331 | this.getList(); |
| 336 | 332 | this.msgSuccess("删除成功"); |
| 337 | - }).catch(function() {}); | |
| 333 | + }) | |
| 338 | 334 | }, |
| 339 | 335 | /** 导出按钮操作 */ |
| 340 | 336 | handleExport() { |
| ... | ... | @@ -347,14 +343,12 @@ export default { |
| 347 | 343 | return exportConfig(queryParams); |
| 348 | 344 | }).then(response => { |
| 349 | 345 | this.download(response.msg); |
| 350 | - }).catch(function() {}); | |
| 346 | + }) | |
| 351 | 347 | }, |
| 352 | 348 | /** 清理缓存按钮操作 */ |
| 353 | 349 | handleClearCache() { |
| 354 | 350 | clearCache().then(response => { |
| 355 | - if (response.code === 200) { | |
| 356 | - this.msgSuccess("清理成功"); | |
| 357 | - } | |
| 351 | + this.msgSuccess("清理成功"); | |
| 358 | 352 | }); |
| 359 | 353 | } |
| 360 | 354 | } | ... | ... |
ruoyi-ui/src/views/system/dept/index.vue
| ... | ... | @@ -284,19 +284,15 @@ export default { |
| 284 | 284 | if (valid) { |
| 285 | 285 | if (this.form.deptId != undefined) { |
| 286 | 286 | updateDept(this.form).then(response => { |
| 287 | - if (response.code === 200) { | |
| 288 | - this.msgSuccess("修改成功"); | |
| 289 | - this.open = false; | |
| 290 | - this.getList(); | |
| 291 | - } | |
| 287 | + this.msgSuccess("修改成功"); | |
| 288 | + this.open = false; | |
| 289 | + this.getList(); | |
| 292 | 290 | }); |
| 293 | 291 | } else { |
| 294 | 292 | addDept(this.form).then(response => { |
| 295 | - if (response.code === 200) { | |
| 296 | - this.msgSuccess("新增成功"); | |
| 297 | - this.open = false; | |
| 298 | - this.getList(); | |
| 299 | - } | |
| 293 | + this.msgSuccess("新增成功"); | |
| 294 | + this.open = false; | |
| 295 | + this.getList(); | |
| 300 | 296 | }); |
| 301 | 297 | } |
| 302 | 298 | } |
| ... | ... | @@ -313,7 +309,7 @@ export default { |
| 313 | 309 | }).then(() => { |
| 314 | 310 | this.getList(); |
| 315 | 311 | this.msgSuccess("删除成功"); |
| 316 | - }).catch(function() {}); | |
| 312 | + }) | |
| 317 | 313 | } |
| 318 | 314 | } |
| 319 | 315 | }; | ... | ... |
ruoyi-ui/src/views/system/dict/data.vue
| ... | ... | @@ -304,19 +304,15 @@ export default { |
| 304 | 304 | if (valid) { |
| 305 | 305 | if (this.form.dictCode != undefined) { |
| 306 | 306 | updateData(this.form).then(response => { |
| 307 | - if (response.code === 200) { | |
| 308 | - this.msgSuccess("修改成功"); | |
| 309 | - this.open = false; | |
| 310 | - this.getList(); | |
| 311 | - } | |
| 307 | + this.msgSuccess("修改成功"); | |
| 308 | + this.open = false; | |
| 309 | + this.getList(); | |
| 312 | 310 | }); |
| 313 | 311 | } else { |
| 314 | 312 | addData(this.form).then(response => { |
| 315 | - if (response.code === 200) { | |
| 316 | - this.msgSuccess("新增成功"); | |
| 317 | - this.open = false; | |
| 318 | - this.getList(); | |
| 319 | - } | |
| 313 | + this.msgSuccess("新增成功"); | |
| 314 | + this.open = false; | |
| 315 | + this.getList(); | |
| 320 | 316 | }); |
| 321 | 317 | } |
| 322 | 318 | } |
| ... | ... | @@ -334,7 +330,7 @@ export default { |
| 334 | 330 | }).then(() => { |
| 335 | 331 | this.getList(); |
| 336 | 332 | this.msgSuccess("删除成功"); |
| 337 | - }).catch(function() {}); | |
| 333 | + }) | |
| 338 | 334 | }, |
| 339 | 335 | /** 导出按钮操作 */ |
| 340 | 336 | handleExport() { |
| ... | ... | @@ -347,7 +343,7 @@ export default { |
| 347 | 343 | return exportData(queryParams); |
| 348 | 344 | }).then(response => { |
| 349 | 345 | this.download(response.msg); |
| 350 | - }).catch(function() {}); | |
| 346 | + }) | |
| 351 | 347 | } |
| 352 | 348 | } |
| 353 | 349 | }; | ... | ... |
ruoyi-ui/src/views/system/dict/index.vue
| ... | ... | @@ -308,19 +308,15 @@ export default { |
| 308 | 308 | if (valid) { |
| 309 | 309 | if (this.form.dictId != undefined) { |
| 310 | 310 | updateType(this.form).then(response => { |
| 311 | - if (response.code === 200) { | |
| 312 | - this.msgSuccess("修改成功"); | |
| 313 | - this.open = false; | |
| 314 | - this.getList(); | |
| 315 | - } | |
| 311 | + this.msgSuccess("修改成功"); | |
| 312 | + this.open = false; | |
| 313 | + this.getList(); | |
| 316 | 314 | }); |
| 317 | 315 | } else { |
| 318 | 316 | addType(this.form).then(response => { |
| 319 | - if (response.code === 200) { | |
| 320 | - this.msgSuccess("新增成功"); | |
| 321 | - this.open = false; | |
| 322 | - this.getList(); | |
| 323 | - } | |
| 317 | + this.msgSuccess("新增成功"); | |
| 318 | + this.open = false; | |
| 319 | + this.getList(); | |
| 324 | 320 | }); |
| 325 | 321 | } |
| 326 | 322 | } |
| ... | ... | @@ -338,7 +334,7 @@ export default { |
| 338 | 334 | }).then(() => { |
| 339 | 335 | this.getList(); |
| 340 | 336 | this.msgSuccess("删除成功"); |
| 341 | - }).catch(function() {}); | |
| 337 | + }) | |
| 342 | 338 | }, |
| 343 | 339 | /** 导出按钮操作 */ |
| 344 | 340 | handleExport() { |
| ... | ... | @@ -351,7 +347,7 @@ export default { |
| 351 | 347 | return exportType(queryParams); |
| 352 | 348 | }).then(response => { |
| 353 | 349 | this.download(response.msg); |
| 354 | - }).catch(function() {}); | |
| 350 | + }) | |
| 355 | 351 | }, |
| 356 | 352 | /** 清理缓存按钮操作 */ |
| 357 | 353 | handleClearCache() { | ... | ... |
ruoyi-ui/src/views/system/menu/index.vue
| ... | ... | @@ -367,19 +367,15 @@ export default { |
| 367 | 367 | if (valid) { |
| 368 | 368 | if (this.form.menuId != undefined) { |
| 369 | 369 | updateMenu(this.form).then(response => { |
| 370 | - if (response.code === 200) { | |
| 371 | - this.msgSuccess("修改成功"); | |
| 372 | - this.open = false; | |
| 373 | - this.getList(); | |
| 374 | - } | |
| 370 | + this.msgSuccess("修改成功"); | |
| 371 | + this.open = false; | |
| 372 | + this.getList(); | |
| 375 | 373 | }); |
| 376 | 374 | } else { |
| 377 | 375 | addMenu(this.form).then(response => { |
| 378 | - if (response.code === 200) { | |
| 379 | - this.msgSuccess("新增成功"); | |
| 380 | - this.open = false; | |
| 381 | - this.getList(); | |
| 382 | - } | |
| 376 | + this.msgSuccess("新增成功"); | |
| 377 | + this.open = false; | |
| 378 | + this.getList(); | |
| 383 | 379 | }); |
| 384 | 380 | } |
| 385 | 381 | } |
| ... | ... | @@ -396,7 +392,7 @@ export default { |
| 396 | 392 | }).then(() => { |
| 397 | 393 | this.getList(); |
| 398 | 394 | this.msgSuccess("删除成功"); |
| 399 | - }).catch(function() {}); | |
| 395 | + }) | |
| 400 | 396 | } |
| 401 | 397 | } |
| 402 | 398 | }; | ... | ... |
ruoyi-ui/src/views/system/notice/index.vue
| ... | ... | @@ -307,19 +307,15 @@ export default { |
| 307 | 307 | if (valid) { |
| 308 | 308 | if (this.form.noticeId != undefined) { |
| 309 | 309 | updateNotice(this.form).then(response => { |
| 310 | - if (response.code === 200) { | |
| 311 | - this.msgSuccess("修改成功"); | |
| 312 | - this.open = false; | |
| 313 | - this.getList(); | |
| 314 | - } | |
| 310 | + this.msgSuccess("修改成功"); | |
| 311 | + this.open = false; | |
| 312 | + this.getList(); | |
| 315 | 313 | }); |
| 316 | 314 | } else { |
| 317 | 315 | addNotice(this.form).then(response => { |
| 318 | - if (response.code === 200) { | |
| 319 | - this.msgSuccess("新增成功"); | |
| 320 | - this.open = false; | |
| 321 | - this.getList(); | |
| 322 | - } | |
| 316 | + this.msgSuccess("新增成功"); | |
| 317 | + this.open = false; | |
| 318 | + this.getList(); | |
| 323 | 319 | }); |
| 324 | 320 | } |
| 325 | 321 | } |
| ... | ... | @@ -337,7 +333,7 @@ export default { |
| 337 | 333 | }).then(() => { |
| 338 | 334 | this.getList(); |
| 339 | 335 | this.msgSuccess("删除成功"); |
| 340 | - }).catch(function() {}); | |
| 336 | + }) | |
| 341 | 337 | } |
| 342 | 338 | } |
| 343 | 339 | }; | ... | ... |
ruoyi-ui/src/views/system/post/index.vue
| ... | ... | @@ -276,19 +276,15 @@ export default { |
| 276 | 276 | if (valid) { |
| 277 | 277 | if (this.form.postId != undefined) { |
| 278 | 278 | updatePost(this.form).then(response => { |
| 279 | - if (response.code === 200) { | |
| 280 | - this.msgSuccess("修改成功"); | |
| 281 | - this.open = false; | |
| 282 | - this.getList(); | |
| 283 | - } | |
| 279 | + this.msgSuccess("修改成功"); | |
| 280 | + this.open = false; | |
| 281 | + this.getList(); | |
| 284 | 282 | }); |
| 285 | 283 | } else { |
| 286 | 284 | addPost(this.form).then(response => { |
| 287 | - if (response.code === 200) { | |
| 288 | - this.msgSuccess("新增成功"); | |
| 289 | - this.open = false; | |
| 290 | - this.getList(); | |
| 291 | - } | |
| 285 | + this.msgSuccess("新增成功"); | |
| 286 | + this.open = false; | |
| 287 | + this.getList(); | |
| 292 | 288 | }); |
| 293 | 289 | } |
| 294 | 290 | } |
| ... | ... | @@ -306,7 +302,7 @@ export default { |
| 306 | 302 | }).then(() => { |
| 307 | 303 | this.getList(); |
| 308 | 304 | this.msgSuccess("删除成功"); |
| 309 | - }).catch(function() {}); | |
| 305 | + }) | |
| 310 | 306 | }, |
| 311 | 307 | /** 导出按钮操作 */ |
| 312 | 308 | handleExport() { |
| ... | ... | @@ -319,7 +315,7 @@ export default { |
| 319 | 315 | return exportPost(queryParams); |
| 320 | 316 | }).then(response => { |
| 321 | 317 | this.download(response.msg); |
| 322 | - }).catch(function() {}); | |
| 318 | + }) | |
| 323 | 319 | } |
| 324 | 320 | } |
| 325 | 321 | }; | ... | ... |
ruoyi-ui/src/views/system/role/index.vue
| ... | ... | @@ -537,20 +537,16 @@ export default { |
| 537 | 537 | if (this.form.roleId != undefined) { |
| 538 | 538 | this.form.menuIds = this.getMenuAllCheckedKeys(); |
| 539 | 539 | updateRole(this.form).then(response => { |
| 540 | - if (response.code === 200) { | |
| 541 | - this.msgSuccess("修改成功"); | |
| 542 | - this.open = false; | |
| 543 | - this.getList(); | |
| 544 | - } | |
| 540 | + this.msgSuccess("修改成功"); | |
| 541 | + this.open = false; | |
| 542 | + this.getList(); | |
| 545 | 543 | }); |
| 546 | 544 | } else { |
| 547 | 545 | this.form.menuIds = this.getMenuAllCheckedKeys(); |
| 548 | 546 | addRole(this.form).then(response => { |
| 549 | - if (response.code === 200) { | |
| 550 | - this.msgSuccess("新增成功"); | |
| 551 | - this.open = false; | |
| 552 | - this.getList(); | |
| 553 | - } | |
| 547 | + this.msgSuccess("新增成功"); | |
| 548 | + this.open = false; | |
| 549 | + this.getList(); | |
| 554 | 550 | }); |
| 555 | 551 | } |
| 556 | 552 | } |
| ... | ... | @@ -561,11 +557,9 @@ export default { |
| 561 | 557 | if (this.form.roleId != undefined) { |
| 562 | 558 | this.form.deptIds = this.getDeptAllCheckedKeys(); |
| 563 | 559 | dataScope(this.form).then(response => { |
| 564 | - if (response.code === 200) { | |
| 565 | - this.msgSuccess("修改成功"); | |
| 566 | - this.openDataScope = false; | |
| 567 | - this.getList(); | |
| 568 | - } | |
| 560 | + this.msgSuccess("修改成功"); | |
| 561 | + this.openDataScope = false; | |
| 562 | + this.getList(); | |
| 569 | 563 | }); |
| 570 | 564 | } |
| 571 | 565 | }, |
| ... | ... | @@ -581,7 +575,7 @@ export default { |
| 581 | 575 | }).then(() => { |
| 582 | 576 | this.getList(); |
| 583 | 577 | this.msgSuccess("删除成功"); |
| 584 | - }).catch(function() {}); | |
| 578 | + }) | |
| 585 | 579 | }, |
| 586 | 580 | /** 导出按钮操作 */ |
| 587 | 581 | handleExport() { |
| ... | ... | @@ -594,7 +588,7 @@ export default { |
| 594 | 588 | return exportRole(queryParams); |
| 595 | 589 | }).then(response => { |
| 596 | 590 | this.download(response.msg); |
| 597 | - }).catch(function() {}); | |
| 591 | + }) | |
| 598 | 592 | } |
| 599 | 593 | } |
| 600 | 594 | }; | ... | ... |
ruoyi-ui/src/views/system/user/index.vue
| ... | ... | @@ -582,9 +582,7 @@ export default { |
| 582 | 582 | cancelButtonText: "取消" |
| 583 | 583 | }).then(({ value }) => { |
| 584 | 584 | resetUserPwd(row.userId, value).then(response => { |
| 585 | - if (response.code === 200) { | |
| 586 | - this.msgSuccess("修改成功,新密码是:" + value); | |
| 587 | - } | |
| 585 | + this.msgSuccess("修改成功,新密码是:" + value); | |
| 588 | 586 | }); |
| 589 | 587 | }).catch(() => {}); |
| 590 | 588 | }, |
| ... | ... | @@ -594,19 +592,15 @@ export default { |
| 594 | 592 | if (valid) { |
| 595 | 593 | if (this.form.userId != undefined) { |
| 596 | 594 | updateUser(this.form).then(response => { |
| 597 | - if (response.code === 200) { | |
| 598 | - this.msgSuccess("修改成功"); | |
| 599 | - this.open = false; | |
| 600 | - this.getList(); | |
| 601 | - } | |
| 595 | + this.msgSuccess("修改成功"); | |
| 596 | + this.open = false; | |
| 597 | + this.getList(); | |
| 602 | 598 | }); |
| 603 | 599 | } else { |
| 604 | 600 | addUser(this.form).then(response => { |
| 605 | - if (response.code === 200) { | |
| 606 | - this.msgSuccess("新增成功"); | |
| 607 | - this.open = false; | |
| 608 | - this.getList(); | |
| 609 | - } | |
| 601 | + this.msgSuccess("新增成功"); | |
| 602 | + this.open = false; | |
| 603 | + this.getList(); | |
| 610 | 604 | }); |
| 611 | 605 | } |
| 612 | 606 | } |
| ... | ... | @@ -624,7 +618,7 @@ export default { |
| 624 | 618 | }).then(() => { |
| 625 | 619 | this.getList(); |
| 626 | 620 | this.msgSuccess("删除成功"); |
| 627 | - }).catch(function() {}); | |
| 621 | + }) | |
| 628 | 622 | }, |
| 629 | 623 | /** 导出按钮操作 */ |
| 630 | 624 | handleExport() { |
| ... | ... | @@ -637,7 +631,7 @@ export default { |
| 637 | 631 | return exportUser(queryParams); |
| 638 | 632 | }).then(response => { |
| 639 | 633 | this.download(response.msg); |
| 640 | - }).catch(function() {}); | |
| 634 | + }) | |
| 641 | 635 | }, |
| 642 | 636 | /** 导入按钮操作 */ |
| 643 | 637 | handleImport() { | ... | ... |
ruoyi-ui/src/views/system/user/profile/resetPwd.vue
ruoyi-ui/src/views/system/user/profile/userAvatar.vue
| ... | ... | @@ -125,12 +125,10 @@ export default { |
| 125 | 125 | let formData = new FormData(); |
| 126 | 126 | formData.append("avatarfile", data); |
| 127 | 127 | uploadAvatar(formData).then(response => { |
| 128 | - if (response.code === 200) { | |
| 129 | - this.open = false; | |
| 130 | - this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; | |
| 131 | - store.commit('SET_AVATAR', this.options.img); | |
| 132 | - this.msgSuccess("修改成功"); | |
| 133 | - } | |
| 128 | + this.open = false; | |
| 129 | + this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; | |
| 130 | + store.commit('SET_AVATAR', this.options.img); | |
| 131 | + this.msgSuccess("修改成功"); | |
| 134 | 132 | this.visible = false; |
| 135 | 133 | }); |
| 136 | 134 | }); | ... | ... |
ruoyi-ui/src/views/system/user/profile/userInfo.vue
ruoyi-ui/src/views/tool/gen/index.vue
| ... | ... | @@ -270,7 +270,7 @@ export default { |
| 270 | 270 | return synchDb(tableName); |
| 271 | 271 | }).then(() => { |
| 272 | 272 | this.msgSuccess("同步成功"); |
| 273 | - }).catch(function() {}); | |
| 273 | + }) | |
| 274 | 274 | }, |
| 275 | 275 | /** 打开导入表弹窗 */ |
| 276 | 276 | openImportTable() { |
| ... | ... | @@ -313,7 +313,7 @@ export default { |
| 313 | 313 | }).then(() => { |
| 314 | 314 | this.getList(); |
| 315 | 315 | this.msgSuccess("删除成功"); |
| 316 | - }).catch(function() {}); | |
| 316 | + }) | |
| 317 | 317 | } |
| 318 | 318 | } |
| 319 | 319 | }; | ... | ... |