作者 RuoYi

删除不必要的代码

@@ -420,19 +420,15 @@ export default { @@ -420,19 +420,15 @@ export default {
420 #end 420 #end
421 if (this.form.${pkColumn.javaField} != null) { 421 if (this.form.${pkColumn.javaField} != null) {
422 update${BusinessName}(this.form).then(response => { 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 } else { 427 } else {
430 add${BusinessName}(this.form).then(response => { 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,7 +445,7 @@ export default {
449 }).then(() => { 445 }).then(() => {
450 this.getList(); 446 this.getList();
451 this.msgSuccess("删除成功"); 447 this.msgSuccess("删除成功");
452 - }).catch(function() {}); 448 + })
453 } 449 }
454 } 450 }
455 }; 451 };
@@ -436,19 +436,15 @@ export default { @@ -436,19 +436,15 @@ export default {
436 #end 436 #end
437 if (this.form.${pkColumn.javaField} != null) { 437 if (this.form.${pkColumn.javaField} != null) {
438 update${BusinessName}(this.form).then(response => { 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 } else { 443 } else {
446 add${BusinessName}(this.form).then(response => { 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,7 +462,7 @@ export default {
466 }).then(() => { 462 }).then(() => {
467 this.getList(); 463 this.getList();
468 this.msgSuccess("删除成功"); 464 this.msgSuccess("删除成功");
469 - }).catch(function() {}); 465 + })
470 }, 466 },
471 /** 导出按钮操作 */ 467 /** 导出按钮操作 */
472 handleExport() { 468 handleExport() {
@@ -479,7 +475,7 @@ export default { @@ -479,7 +475,7 @@ export default {
479 return export${BusinessName}(queryParams); 475 return export${BusinessName}(queryParams);
480 }).then(response => { 476 }).then(response => {
481 this.download(response.msg); 477 this.download(response.msg);
482 - }).catch(function() {}); 478 + })
483 } 479 }
484 } 480 }
485 }; 481 };
@@ -402,7 +402,7 @@ export default { @@ -402,7 +402,7 @@ export default {
402 return runJob(row.jobId, row.jobGroup); 402 return runJob(row.jobId, row.jobGroup);
403 }).then(() => { 403 }).then(() => {
404 this.msgSuccess("执行成功"); 404 this.msgSuccess("执行成功");
405 - }).catch(function() {}); 405 + })
406 }, 406 },
407 /** 任务详细信息 */ 407 /** 任务详细信息 */
408 handleView(row) { 408 handleView(row) {
@@ -437,19 +437,15 @@ export default { @@ -437,19 +437,15 @@ export default {
437 if (valid) { 437 if (valid) {
438 if (this.form.jobId != undefined) { 438 if (this.form.jobId != undefined) {
439 updateJob(this.form).then(response => { 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 } else { 444 } else {
447 addJob(this.form).then(response => { 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,7 +463,7 @@ export default {
467 }).then(() => { 463 }).then(() => {
468 this.getList(); 464 this.getList();
469 this.msgSuccess("删除成功"); 465 this.msgSuccess("删除成功");
470 - }).catch(function() {}); 466 + })
471 }, 467 },
472 /** 导出按钮操作 */ 468 /** 导出按钮操作 */
473 handleExport() { 469 handleExport() {
@@ -480,7 +476,7 @@ export default { @@ -480,7 +476,7 @@ export default {
480 return exportJob(queryParams); 476 return exportJob(queryParams);
481 }).then(response => { 477 }).then(response => {
482 this.download(response.msg); 478 this.download(response.msg);
483 - }).catch(function() {}); 479 + })
484 } 480 }
485 } 481 }
486 }; 482 };
@@ -263,7 +263,7 @@ export default { @@ -263,7 +263,7 @@ export default {
263 }).then(() => { 263 }).then(() => {
264 this.getList(); 264 this.getList();
265 this.msgSuccess("删除成功"); 265 this.msgSuccess("删除成功");
266 - }).catch(function() {}); 266 + })
267 }, 267 },
268 /** 清空按钮操作 */ 268 /** 清空按钮操作 */
269 handleClean() { 269 handleClean() {
@@ -276,7 +276,7 @@ export default { @@ -276,7 +276,7 @@ export default {
276 }).then(() => { 276 }).then(() => {
277 this.getList(); 277 this.getList();
278 this.msgSuccess("清空成功"); 278 this.msgSuccess("清空成功");
279 - }).catch(function() {}); 279 + })
280 }, 280 },
281 /** 导出按钮操作 */ 281 /** 导出按钮操作 */
282 handleExport() { 282 handleExport() {
@@ -289,7 +289,7 @@ export default { @@ -289,7 +289,7 @@ export default {
289 return exportJobLog(queryParams); 289 return exportJobLog(queryParams);
290 }).then(response => { 290 }).then(response => {
291 this.download(response.msg); 291 this.download(response.msg);
292 - }).catch(function() {}); 292 + })
293 } 293 }
294 } 294 }
295 }; 295 };
@@ -196,7 +196,7 @@ export default { @@ -196,7 +196,7 @@ export default {
196 }).then(() => { 196 }).then(() => {
197 this.getList(); 197 this.getList();
198 this.msgSuccess("删除成功"); 198 this.msgSuccess("删除成功");
199 - }).catch(function() {}); 199 + })
200 }, 200 },
201 /** 清空按钮操作 */ 201 /** 清空按钮操作 */
202 handleClean() { 202 handleClean() {
@@ -209,7 +209,7 @@ export default { @@ -209,7 +209,7 @@ export default {
209 }).then(() => { 209 }).then(() => {
210 this.getList(); 210 this.getList();
211 this.msgSuccess("清空成功"); 211 this.msgSuccess("清空成功");
212 - }).catch(function() {}); 212 + })
213 }, 213 },
214 /** 导出按钮操作 */ 214 /** 导出按钮操作 */
215 handleExport() { 215 handleExport() {
@@ -222,7 +222,7 @@ export default { @@ -222,7 +222,7 @@ export default {
222 return exportLogininfor(queryParams); 222 return exportLogininfor(queryParams);
223 }).then(response => { 223 }).then(response => {
224 this.download(response.msg); 224 this.download(response.msg);
225 - }).catch(function() {}); 225 + })
226 } 226 }
227 } 227 }
228 }; 228 };
@@ -120,7 +120,7 @@ export default { @@ -120,7 +120,7 @@ export default {
120 }).then(() => { 120 }).then(() => {
121 this.getList(); 121 this.getList();
122 this.msgSuccess("强退成功"); 122 this.msgSuccess("强退成功");
123 - }).catch(function() {}); 123 + })
124 } 124 }
125 } 125 }
126 }; 126 };
@@ -284,7 +284,7 @@ export default { @@ -284,7 +284,7 @@ export default {
284 }).then(() => { 284 }).then(() => {
285 this.getList(); 285 this.getList();
286 this.msgSuccess("删除成功"); 286 this.msgSuccess("删除成功");
287 - }).catch(function() {}); 287 + })
288 }, 288 },
289 /** 清空按钮操作 */ 289 /** 清空按钮操作 */
290 handleClean() { 290 handleClean() {
@@ -297,7 +297,7 @@ export default { @@ -297,7 +297,7 @@ export default {
297 }).then(() => { 297 }).then(() => {
298 this.getList(); 298 this.getList();
299 this.msgSuccess("清空成功"); 299 this.msgSuccess("清空成功");
300 - }).catch(function() {}); 300 + })
301 }, 301 },
302 /** 导出按钮操作 */ 302 /** 导出按钮操作 */
303 handleExport() { 303 handleExport() {
@@ -310,7 +310,7 @@ export default { @@ -310,7 +310,7 @@ export default {
310 return exportOperlog(queryParams); 310 return exportOperlog(queryParams);
311 }).then(response => { 311 }).then(response => {
312 this.download(response.msg); 312 this.download(response.msg);
313 - }).catch(function() {}); 313 + })
314 } 314 }
315 } 315 }
316 }; 316 };
@@ -304,19 +304,15 @@ export default { @@ -304,19 +304,15 @@ export default {
304 if (valid) { 304 if (valid) {
305 if (this.form.configId != undefined) { 305 if (this.form.configId != undefined) {
306 updateConfig(this.form).then(response => { 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 } else { 311 } else {
314 addConfig(this.form).then(response => { 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,7 +330,7 @@ export default {
334 }).then(() => { 330 }).then(() => {
335 this.getList(); 331 this.getList();
336 this.msgSuccess("删除成功"); 332 this.msgSuccess("删除成功");
337 - }).catch(function() {}); 333 + })
338 }, 334 },
339 /** 导出按钮操作 */ 335 /** 导出按钮操作 */
340 handleExport() { 336 handleExport() {
@@ -347,14 +343,12 @@ export default { @@ -347,14 +343,12 @@ export default {
347 return exportConfig(queryParams); 343 return exportConfig(queryParams);
348 }).then(response => { 344 }).then(response => {
349 this.download(response.msg); 345 this.download(response.msg);
350 - }).catch(function() {}); 346 + })
351 }, 347 },
352 /** 清理缓存按钮操作 */ 348 /** 清理缓存按钮操作 */
353 handleClearCache() { 349 handleClearCache() {
354 clearCache().then(response => { 350 clearCache().then(response => {
355 - if (response.code === 200) {  
356 - this.msgSuccess("清理成功");  
357 - } 351 + this.msgSuccess("清理成功");
358 }); 352 });
359 } 353 }
360 } 354 }
@@ -284,19 +284,15 @@ export default { @@ -284,19 +284,15 @@ export default {
284 if (valid) { 284 if (valid) {
285 if (this.form.deptId != undefined) { 285 if (this.form.deptId != undefined) {
286 updateDept(this.form).then(response => { 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 } else { 291 } else {
294 addDept(this.form).then(response => { 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,7 +309,7 @@ export default {
313 }).then(() => { 309 }).then(() => {
314 this.getList(); 310 this.getList();
315 this.msgSuccess("删除成功"); 311 this.msgSuccess("删除成功");
316 - }).catch(function() {}); 312 + })
317 } 313 }
318 } 314 }
319 }; 315 };
@@ -304,19 +304,15 @@ export default { @@ -304,19 +304,15 @@ export default {
304 if (valid) { 304 if (valid) {
305 if (this.form.dictCode != undefined) { 305 if (this.form.dictCode != undefined) {
306 updateData(this.form).then(response => { 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 } else { 311 } else {
314 addData(this.form).then(response => { 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,7 +330,7 @@ export default {
334 }).then(() => { 330 }).then(() => {
335 this.getList(); 331 this.getList();
336 this.msgSuccess("删除成功"); 332 this.msgSuccess("删除成功");
337 - }).catch(function() {}); 333 + })
338 }, 334 },
339 /** 导出按钮操作 */ 335 /** 导出按钮操作 */
340 handleExport() { 336 handleExport() {
@@ -347,7 +343,7 @@ export default { @@ -347,7 +343,7 @@ export default {
347 return exportData(queryParams); 343 return exportData(queryParams);
348 }).then(response => { 344 }).then(response => {
349 this.download(response.msg); 345 this.download(response.msg);
350 - }).catch(function() {}); 346 + })
351 } 347 }
352 } 348 }
353 }; 349 };
@@ -308,19 +308,15 @@ export default { @@ -308,19 +308,15 @@ export default {
308 if (valid) { 308 if (valid) {
309 if (this.form.dictId != undefined) { 309 if (this.form.dictId != undefined) {
310 updateType(this.form).then(response => { 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 } else { 315 } else {
318 addType(this.form).then(response => { 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,7 +334,7 @@ export default {
338 }).then(() => { 334 }).then(() => {
339 this.getList(); 335 this.getList();
340 this.msgSuccess("删除成功"); 336 this.msgSuccess("删除成功");
341 - }).catch(function() {}); 337 + })
342 }, 338 },
343 /** 导出按钮操作 */ 339 /** 导出按钮操作 */
344 handleExport() { 340 handleExport() {
@@ -351,7 +347,7 @@ export default { @@ -351,7 +347,7 @@ export default {
351 return exportType(queryParams); 347 return exportType(queryParams);
352 }).then(response => { 348 }).then(response => {
353 this.download(response.msg); 349 this.download(response.msg);
354 - }).catch(function() {}); 350 + })
355 }, 351 },
356 /** 清理缓存按钮操作 */ 352 /** 清理缓存按钮操作 */
357 handleClearCache() { 353 handleClearCache() {
@@ -367,19 +367,15 @@ export default { @@ -367,19 +367,15 @@ export default {
367 if (valid) { 367 if (valid) {
368 if (this.form.menuId != undefined) { 368 if (this.form.menuId != undefined) {
369 updateMenu(this.form).then(response => { 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 } else { 374 } else {
377 addMenu(this.form).then(response => { 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,7 +392,7 @@ export default {
396 }).then(() => { 392 }).then(() => {
397 this.getList(); 393 this.getList();
398 this.msgSuccess("删除成功"); 394 this.msgSuccess("删除成功");
399 - }).catch(function() {}); 395 + })
400 } 396 }
401 } 397 }
402 }; 398 };
@@ -307,19 +307,15 @@ export default { @@ -307,19 +307,15 @@ export default {
307 if (valid) { 307 if (valid) {
308 if (this.form.noticeId != undefined) { 308 if (this.form.noticeId != undefined) {
309 updateNotice(this.form).then(response => { 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 } else { 314 } else {
317 addNotice(this.form).then(response => { 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,7 +333,7 @@ export default {
337 }).then(() => { 333 }).then(() => {
338 this.getList(); 334 this.getList();
339 this.msgSuccess("删除成功"); 335 this.msgSuccess("删除成功");
340 - }).catch(function() {}); 336 + })
341 } 337 }
342 } 338 }
343 }; 339 };
@@ -276,19 +276,15 @@ export default { @@ -276,19 +276,15 @@ export default {
276 if (valid) { 276 if (valid) {
277 if (this.form.postId != undefined) { 277 if (this.form.postId != undefined) {
278 updatePost(this.form).then(response => { 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 } else { 283 } else {
286 addPost(this.form).then(response => { 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,7 +302,7 @@ export default {
306 }).then(() => { 302 }).then(() => {
307 this.getList(); 303 this.getList();
308 this.msgSuccess("删除成功"); 304 this.msgSuccess("删除成功");
309 - }).catch(function() {}); 305 + })
310 }, 306 },
311 /** 导出按钮操作 */ 307 /** 导出按钮操作 */
312 handleExport() { 308 handleExport() {
@@ -319,7 +315,7 @@ export default { @@ -319,7 +315,7 @@ export default {
319 return exportPost(queryParams); 315 return exportPost(queryParams);
320 }).then(response => { 316 }).then(response => {
321 this.download(response.msg); 317 this.download(response.msg);
322 - }).catch(function() {}); 318 + })
323 } 319 }
324 } 320 }
325 }; 321 };
@@ -537,20 +537,16 @@ export default { @@ -537,20 +537,16 @@ export default {
537 if (this.form.roleId != undefined) { 537 if (this.form.roleId != undefined) {
538 this.form.menuIds = this.getMenuAllCheckedKeys(); 538 this.form.menuIds = this.getMenuAllCheckedKeys();
539 updateRole(this.form).then(response => { 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 } else { 544 } else {
547 this.form.menuIds = this.getMenuAllCheckedKeys(); 545 this.form.menuIds = this.getMenuAllCheckedKeys();
548 addRole(this.form).then(response => { 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,11 +557,9 @@ export default {
561 if (this.form.roleId != undefined) { 557 if (this.form.roleId != undefined) {
562 this.form.deptIds = this.getDeptAllCheckedKeys(); 558 this.form.deptIds = this.getDeptAllCheckedKeys();
563 dataScope(this.form).then(response => { 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,7 +575,7 @@ export default {
581 }).then(() => { 575 }).then(() => {
582 this.getList(); 576 this.getList();
583 this.msgSuccess("删除成功"); 577 this.msgSuccess("删除成功");
584 - }).catch(function() {}); 578 + })
585 }, 579 },
586 /** 导出按钮操作 */ 580 /** 导出按钮操作 */
587 handleExport() { 581 handleExport() {
@@ -594,7 +588,7 @@ export default { @@ -594,7 +588,7 @@ export default {
594 return exportRole(queryParams); 588 return exportRole(queryParams);
595 }).then(response => { 589 }).then(response => {
596 this.download(response.msg); 590 this.download(response.msg);
597 - }).catch(function() {}); 591 + })
598 } 592 }
599 } 593 }
600 }; 594 };
@@ -582,9 +582,7 @@ export default { @@ -582,9 +582,7 @@ export default {
582 cancelButtonText: "取消" 582 cancelButtonText: "取消"
583 }).then(({ value }) => { 583 }).then(({ value }) => {
584 resetUserPwd(row.userId, value).then(response => { 584 resetUserPwd(row.userId, value).then(response => {
585 - if (response.code === 200) {  
586 - this.msgSuccess("修改成功,新密码是:" + value);  
587 - } 585 + this.msgSuccess("修改成功,新密码是:" + value);
588 }); 586 });
589 }).catch(() => {}); 587 }).catch(() => {});
590 }, 588 },
@@ -594,19 +592,15 @@ export default { @@ -594,19 +592,15 @@ export default {
594 if (valid) { 592 if (valid) {
595 if (this.form.userId != undefined) { 593 if (this.form.userId != undefined) {
596 updateUser(this.form).then(response => { 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 } else { 599 } else {
604 addUser(this.form).then(response => { 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,7 +618,7 @@ export default {
624 }).then(() => { 618 }).then(() => {
625 this.getList(); 619 this.getList();
626 this.msgSuccess("删除成功"); 620 this.msgSuccess("删除成功");
627 - }).catch(function() {}); 621 + })
628 }, 622 },
629 /** 导出按钮操作 */ 623 /** 导出按钮操作 */
630 handleExport() { 624 handleExport() {
@@ -637,7 +631,7 @@ export default { @@ -637,7 +631,7 @@ export default {
637 return exportUser(queryParams); 631 return exportUser(queryParams);
638 }).then(response => { 632 }).then(response => {
639 this.download(response.msg); 633 this.download(response.msg);
640 - }).catch(function() {}); 634 + })
641 }, 635 },
642 /** 导入按钮操作 */ 636 /** 导入按钮操作 */
643 handleImport() { 637 handleImport() {
@@ -57,9 +57,7 @@ export default { @@ -57,9 +57,7 @@ export default {
57 if (valid) { 57 if (valid) {
58 updateUserPwd(this.user.oldPassword, this.user.newPassword).then( 58 updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
59 response => { 59 response => {
60 - if (response.code === 200) {  
61 - this.msgSuccess("修改成功");  
62 - } 60 + this.msgSuccess("修改成功");
63 } 61 }
64 ); 62 );
65 } 63 }
@@ -125,12 +125,10 @@ export default { @@ -125,12 +125,10 @@ export default {
125 let formData = new FormData(); 125 let formData = new FormData();
126 formData.append("avatarfile", data); 126 formData.append("avatarfile", data);
127 uploadAvatar(formData).then(response => { 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 this.visible = false; 132 this.visible = false;
135 }); 133 });
136 }); 134 });
@@ -62,9 +62,7 @@ export default { @@ -62,9 +62,7 @@ export default {
62 this.$refs["form"].validate(valid => { 62 this.$refs["form"].validate(valid => {
63 if (valid) { 63 if (valid) {
64 updateUserProfile(this.user).then(response => { 64 updateUserProfile(this.user).then(response => {
65 - if (response.code === 200) {  
66 - this.msgSuccess("修改成功");  
67 - } 65 + this.msgSuccess("修改成功");
68 }); 66 });
69 } 67 }
70 }); 68 });
@@ -270,7 +270,7 @@ export default { @@ -270,7 +270,7 @@ export default {
270 return synchDb(tableName); 270 return synchDb(tableName);
271 }).then(() => { 271 }).then(() => {
272 this.msgSuccess("同步成功"); 272 this.msgSuccess("同步成功");
273 - }).catch(function() {}); 273 + })
274 }, 274 },
275 /** 打开导入表弹窗 */ 275 /** 打开导入表弹窗 */
276 openImportTable() { 276 openImportTable() {
@@ -313,7 +313,7 @@ export default { @@ -313,7 +313,7 @@ export default {
313 }).then(() => { 313 }).then(() => {
314 this.getList(); 314 this.getList();
315 this.msgSuccess("删除成功"); 315 this.msgSuccess("删除成功");
316 - }).catch(function() {}); 316 + })
317 } 317 }
318 } 318 }
319 }; 319 };