Sfoglia il codice sorgente

remove all semicolons

RuoYi 11 mesi fa
parent
commit
7b6fdb3a89
84 ha cambiato i file con 2097 aggiunte e 2089 eliminazioni
  1. 60 60
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
  2. 56 56
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
  3. 67 67
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
  4. 73 73
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm
  5. 2 2
      ruoyi-ui/src/App.vue
  6. 25 25
      ruoyi-ui/src/components/Crontab/day.vue
  7. 21 15
      ruoyi-ui/src/components/Crontab/hour.vue
  8. 87 87
      ruoyi-ui/src/components/Crontab/index.vue
  9. 15 15
      ruoyi-ui/src/components/Crontab/min.vue
  10. 15 15
      ruoyi-ui/src/components/Crontab/month.vue
  11. 188 189
      ruoyi-ui/src/components/Crontab/result.vue
  12. 15 15
      ruoyi-ui/src/components/Crontab/second.vue
  13. 22 22
      ruoyi-ui/src/components/Crontab/week.vue
  14. 18 18
      ruoyi-ui/src/components/Crontab/year.vue
  15. 3 3
      ruoyi-ui/src/components/DictTag/index.vue
  16. 59 59
      ruoyi-ui/src/components/Editor/index.vue
  17. 48 48
      ruoyi-ui/src/components/FileUpload/index.vue
  18. 1 1
      ruoyi-ui/src/components/HeaderSearch/index.vue
  19. 12 12
      ruoyi-ui/src/components/ImagePreview/index.vue
  20. 51 51
      ruoyi-ui/src/components/ImageUpload/index.vue
  21. 1 1
      ruoyi-ui/src/components/Pagination/index.vue
  22. 15 15
      ruoyi-ui/src/components/RightToolbar/index.vue
  23. 0 1
      ruoyi-ui/src/components/SizeSelect/index.vue
  24. 46 46
      ruoyi-ui/src/components/TopNav/index.vue
  25. 7 7
      ruoyi-ui/src/components/iFrame/index.vue
  26. 28 28
      ruoyi-ui/src/directive/dialog/drag.js
  27. 17 17
      ruoyi-ui/src/directive/dialog/dragHeight.js
  28. 14 14
      ruoyi-ui/src/directive/dialog/dragWidth.js
  29. 1 1
      ruoyi-ui/src/directive/index.js
  30. 20 20
      ruoyi-ui/src/directive/module/clipboard.js
  31. 1 1
      ruoyi-ui/src/directive/permission/hasPermi.js
  32. 1 1
      ruoyi-ui/src/directive/permission/hasRole.js
  33. 5 5
      ruoyi-ui/src/layout/components/IframeToggle/index.vue
  34. 11 11
      ruoyi-ui/src/layout/components/InnerLink/index.vue
  35. 3 3
      ruoyi-ui/src/layout/components/Navbar.vue
  36. 8 8
      ruoyi-ui/src/layout/components/Settings/index.vue
  37. 1 1
      ruoyi-ui/src/layout/components/Sidebar/Logo.vue
  38. 2 2
      ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue
  39. 12 12
      ruoyi-ui/src/layout/components/Sidebar/index.vue
  40. 5 5
      ruoyi-ui/src/layout/components/TagsView/index.vue
  41. 1 1
      ruoyi-ui/src/layout/index.vue
  42. 4 4
      ruoyi-ui/src/main.js
  43. 4 4
      ruoyi-ui/src/plugins/auth.js
  44. 2 2
      ruoyi-ui/src/plugins/cache.js
  45. 10 10
      ruoyi-ui/src/plugins/download.js
  46. 3 3
      ruoyi-ui/src/plugins/modal.js
  47. 16 16
      ruoyi-ui/src/plugins/tab.js
  48. 2 2
      ruoyi-ui/src/router/index.js
  49. 1 1
      ruoyi-ui/src/store/getters.js
  50. 1 1
      ruoyi-ui/src/store/modules/app.js
  51. 2 2
      ruoyi-ui/src/store/modules/permission.js
  52. 1 1
      ruoyi-ui/src/utils/dict/Dict.js
  53. 1 1
      ruoyi-ui/src/utils/dict/DictMeta.js
  54. 1 1
      ruoyi-ui/src/utils/dict/DictOptions.js
  55. 1 1
      ruoyi-ui/src/utils/index.js
  56. 4 4
      ruoyi-ui/src/utils/permission.js
  57. 31 31
      ruoyi-ui/src/utils/request.js
  58. 55 55
      ruoyi-ui/src/utils/ruoyi.js
  59. 6 6
      ruoyi-ui/src/views/index.vue
  60. 26 26
      ruoyi-ui/src/views/login.vue
  61. 18 18
      ruoyi-ui/src/views/register.vue
  62. 44 44
      ruoyi-ui/src/views/system/config/index.vue
  63. 54 50
      ruoyi-ui/src/views/system/dept/index.vue
  64. 55 55
      ruoyi-ui/src/views/system/dict/data.vue
  65. 43 43
      ruoyi-ui/src/views/system/dict/index.vue
  66. 31 31
      ruoyi-ui/src/views/system/logininfor/index.vue
  67. 55 55
      ruoyi-ui/src/views/system/menu/index.vue
  68. 39 39
      ruoyi-ui/src/views/system/notice/index.vue
  69. 29 29
      ruoyi-ui/src/views/system/operlog/index.vue
  70. 40 40
      ruoyi-ui/src/views/system/post/index.vue
  71. 30 30
      ruoyi-ui/src/views/system/role/authUser.vue
  72. 102 102
      ruoyi-ui/src/views/system/role/index.vue
  73. 23 23
      ruoyi-ui/src/views/system/role/selectUser.vue
  74. 26 26
      ruoyi-ui/src/views/system/user/authRole.vue
  75. 99 99
      ruoyi-ui/src/views/system/user/index.vue
  76. 11 11
      ruoyi-ui/src/views/system/user/profile/index.vue
  77. 10 10
      ruoyi-ui/src/views/system/user/profile/resetPwd.vue
  78. 29 29
      ruoyi-ui/src/views/system/user/profile/userAvatar.vue
  79. 10 10
      ruoyi-ui/src/views/system/user/profile/userInfo.vue
  80. 2 2
      ruoyi-ui/src/views/tool/gen/basicInfoForm.vue
  81. 37 37
      ruoyi-ui/src/views/tool/gen/editTable.vue
  82. 16 16
      ruoyi-ui/src/views/tool/gen/genInfoForm.vue
  83. 21 21
      ruoyi-ui/src/views/tool/gen/importTable.vue
  84. 65 65
      ruoyi-ui/src/views/tool/gen/index.vue

+ 60 - 60
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm

@@ -283,9 +283,9 @@
283 283
 </template>
284 284
 
285 285
 <script>
286
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
287
-import Treeselect from "@riophae/vue-treeselect";
288
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
286
+import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
287
+import Treeselect from "@riophae/vue-treeselect"
288
+import "@riophae/vue-treeselect/dist/vue-treeselect.css"
289 289
 
290 290
 export default {
291 291
   name: "${BusinessName}",
@@ -346,18 +346,18 @@ export default {
346 346
 #end
347 347
 #end
348 348
       }
349
-    };
349
+    }
350 350
   },
351 351
   created() {
352
-    this.getList();
352
+    this.getList()
353 353
   },
354 354
   methods: {
355 355
     /** 查询${functionName}列表 */
356 356
     getList() {
357
-      this.loading = true;
357
+      this.loading = true
358 358
 #foreach ($column in $columns)
359 359
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
360
-      this.queryParams.params = {};
360
+      this.queryParams.params = {}
361 361
 #break
362 362
 #end
363 363
 #end
@@ -365,40 +365,40 @@ export default {
365 365
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
366 366
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
367 367
       if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) {
368
-        this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0];
369
-        this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1];
368
+        this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0]
369
+        this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1]
370 370
       }
371 371
 #end
372 372
 #end
373 373
       list${BusinessName}(this.queryParams).then(response => {
374
-        this.${businessName}List = this.handleTree(response.data, "${treeCode}", "${treeParentCode}");
375
-        this.loading = false;
376
-      });
374
+        this.${businessName}List = this.handleTree(response.data, "${treeCode}", "${treeParentCode}")
375
+        this.loading = false
376
+      })
377 377
     },
378 378
     /** 转换${functionName}数据结构 */
379 379
     normalizer(node) {
380 380
       if (node.children && !node.children.length) {
381
-        delete node.children;
381
+        delete node.children
382 382
       }
383 383
       return {
384 384
         id: node.${treeCode},
385 385
         label: node.${treeName},
386 386
         children: node.children
387
-      };
387
+      }
388 388
     },
389 389
 	/** 查询${functionName}下拉树结构 */
390 390
     getTreeselect() {
391 391
       list${BusinessName}().then(response => {
392
-        this.${businessName}Options = [];
393
-        const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
394
-        data.children = this.handleTree(response.data, "${treeCode}", "${treeParentCode}");
395
-        this.${businessName}Options.push(data);
396
-      });
392
+        this.${businessName}Options = []
393
+        const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] }
394
+        data.children = this.handleTree(response.data, "${treeCode}", "${treeParentCode}")
395
+        this.${businessName}Options.push(data)
396
+      })
397 397
     },
398 398
     // 取消按钮
399 399
     cancel() {
400
-      this.open = false;
401
-      this.reset();
400
+      this.open = false
401
+      this.reset()
402 402
     },
403 403
     // 表单重置
404 404
     reset() {
@@ -410,61 +410,61 @@ export default {
410 410
         $column.javaField: null#if($foreach.count != $columns.size()),#end
411 411
 #end
412 412
 #end
413
-      };
414
-      this.resetForm("form");
413
+      }
414
+      this.resetForm("form")
415 415
     },
416 416
     /** 搜索按钮操作 */
417 417
     handleQuery() {
418
-      this.getList();
418
+      this.getList()
419 419
     },
420 420
     /** 重置按钮操作 */
421 421
     resetQuery() {
422 422
 #foreach ($column in $columns)
423 423
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
424 424
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
425
-      this.daterange${AttrName} = [];
425
+      this.daterange${AttrName} = []
426 426
 #end
427 427
 #end
428
-      this.resetForm("queryForm");
429
-      this.handleQuery();
428
+      this.resetForm("queryForm")
429
+      this.handleQuery()
430 430
     },
431 431
     /** 新增按钮操作 */
432 432
     handleAdd(row) {
433
-      this.reset();
434
-      this.getTreeselect();
433
+      this.reset()
434
+      this.getTreeselect()
435 435
       if (row != null && row.${treeCode}) {
436
-        this.form.${treeParentCode} = row.${treeCode};
436
+        this.form.${treeParentCode} = row.${treeCode}
437 437
       } else {
438
-        this.form.${treeParentCode} = 0;
438
+        this.form.${treeParentCode} = 0
439 439
       }
440
-      this.open = true;
441
-      this.title = "添加${functionName}";
440
+      this.open = true
441
+      this.title = "添加${functionName}"
442 442
     },
443 443
     /** 展开/折叠操作 */
444 444
     toggleExpandAll() {
445
-      this.refreshTable = false;
446
-      this.isExpandAll = !this.isExpandAll;
445
+      this.refreshTable = false
446
+      this.isExpandAll = !this.isExpandAll
447 447
       this.$nextTick(() => {
448
-        this.refreshTable = true;
449
-      });
448
+        this.refreshTable = true
449
+      })
450 450
     },
451 451
     /** 修改按钮操作 */
452 452
     handleUpdate(row) {
453
-      this.reset();
454
-      this.getTreeselect();
453
+      this.reset()
454
+      this.getTreeselect()
455 455
       if (row != null) {
456
-        this.form.${treeParentCode} = row.${treeParentCode};
456
+        this.form.${treeParentCode} = row.${treeParentCode}
457 457
       }
458 458
       get${BusinessName}(row.${pkColumn.javaField}).then(response => {
459
-        this.form = response.data;
459
+        this.form = response.data
460 460
 #foreach ($column in $columns)
461 461
 #if($column.htmlType == "checkbox")
462
-        this.form.$column.javaField = this.form.${column.javaField}.split(",");
462
+        this.form.$column.javaField = this.form.${column.javaField}.split(",")
463 463
 #end
464 464
 #end
465
-        this.open = true;
466
-        this.title = "修改${functionName}";
467
-      });
465
+        this.open = true
466
+        this.title = "修改${functionName}"
467
+      })
468 468
     },
469 469
     /** 提交按钮 */
470 470
     submitForm() {
@@ -472,34 +472,34 @@ export default {
472 472
         if (valid) {
473 473
 #foreach ($column in $columns)
474 474
 #if($column.htmlType == "checkbox")
475
-          this.form.$column.javaField = this.form.${column.javaField}.join(",");
475
+          this.form.$column.javaField = this.form.${column.javaField}.join(",")
476 476
 #end
477 477
 #end
478 478
           if (this.form.${pkColumn.javaField} != null) {
479 479
             update${BusinessName}(this.form).then(response => {
480
-              this.#[[$modal]]#.msgSuccess("修改成功");
481
-              this.open = false;
482
-              this.getList();
483
-            });
480
+              this.#[[$modal]]#.msgSuccess("修改成功")
481
+              this.open = false
482
+              this.getList()
483
+            })
484 484
           } else {
485 485
             add${BusinessName}(this.form).then(response => {
486
-              this.#[[$modal]]#.msgSuccess("新增成功");
487
-              this.open = false;
488
-              this.getList();
489
-            });
486
+              this.#[[$modal]]#.msgSuccess("新增成功")
487
+              this.open = false
488
+              this.getList()
489
+            })
490 490
           }
491 491
         }
492
-      });
492
+      })
493 493
     },
494 494
     /** 删除按钮操作 */
495 495
     handleDelete(row) {
496 496
       this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
497
-        return del${BusinessName}(row.${pkColumn.javaField});
497
+        return del${BusinessName}(row.${pkColumn.javaField})
498 498
       }).then(() => {
499
-        this.getList();
500
-        this.#[[$modal]]#.msgSuccess("删除成功");
501
-      }).catch(() => {});
499
+        this.getList()
500
+        this.#[[$modal]]#.msgSuccess("删除成功")
501
+      }).catch(() => {})
502 502
     }
503 503
   }
504
-};
504
+}
505 505
 </script>

+ 56 - 56
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm

@@ -353,7 +353,7 @@
353 353
 </template>
354 354
 
355 355
 <script>
356
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
356
+import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
357 357
 
358 358
 export default {
359 359
   name: "${BusinessName}",
@@ -423,18 +423,18 @@ export default {
423 423
 #end
424 424
 #end
425 425
       }
426
-    };
426
+    }
427 427
   },
428 428
   created() {
429
-    this.getList();
429
+    this.getList()
430 430
   },
431 431
   methods: {
432 432
     /** 查询${functionName}列表 */
433 433
     getList() {
434
-      this.loading = true;
434
+      this.loading = true
435 435
 #foreach ($column in $columns)
436 436
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
437
-      this.queryParams.params = {};
437
+      this.queryParams.params = {}
438 438
 #break
439 439
 #end
440 440
 #end
@@ -442,21 +442,21 @@ export default {
442 442
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
443 443
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
444 444
       if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) {
445
-        this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0];
446
-        this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1];
445
+        this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0]
446
+        this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1]
447 447
       }
448 448
 #end
449 449
 #end
450 450
       list${BusinessName}(this.queryParams).then(response => {
451
-        this.${businessName}List = response.rows;
452
-        this.total = response.total;
453
-        this.loading = false;
454
-      });
451
+        this.${businessName}List = response.rows
452
+        this.total = response.total
453
+        this.loading = false
454
+      })
455 455
     },
456 456
     // 取消按钮
457 457
     cancel() {
458
-      this.open = false;
459
-      this.reset();
458
+      this.open = false
459
+      this.reset()
460 460
     },
461 461
     // 表单重置
462 462
     reset() {
@@ -468,27 +468,27 @@ export default {
468 468
         $column.javaField: null#if($foreach.count != $columns.size()),#end
469 469
 #end
470 470
 #end
471
-      };
471
+      }
472 472
 #if($table.sub)
473
-      this.${subclassName}List = [];
473
+      this.${subclassName}List = []
474 474
 #end
475
-      this.resetForm("form");
475
+      this.resetForm("form")
476 476
     },
477 477
     /** 搜索按钮操作 */
478 478
     handleQuery() {
479
-      this.queryParams.pageNum = 1;
480
-      this.getList();
479
+      this.queryParams.pageNum = 1
480
+      this.getList()
481 481
     },
482 482
     /** 重置按钮操作 */
483 483
     resetQuery() {
484 484
 #foreach ($column in $columns)
485 485
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
486 486
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
487
-      this.daterange${AttrName} = [];
487
+      this.daterange${AttrName} = []
488 488
 #end
489 489
 #end
490
-      this.resetForm("queryForm");
491
-      this.handleQuery();
490
+      this.resetForm("queryForm")
491
+      this.handleQuery()
492 492
     },
493 493
     // 多选框选中数据
494 494
     handleSelectionChange(selection) {
@@ -498,27 +498,27 @@ export default {
498 498
     },
499 499
     /** 新增按钮操作 */
500 500
     handleAdd() {
501
-      this.reset();
502
-      this.open = true;
503
-      this.title = "添加${functionName}";
501
+      this.reset()
502
+      this.open = true
503
+      this.title = "添加${functionName}"
504 504
     },
505 505
     /** 修改按钮操作 */
506 506
     handleUpdate(row) {
507
-      this.reset();
507
+      this.reset()
508 508
       const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids
509 509
       get${BusinessName}(${pkColumn.javaField}).then(response => {
510
-        this.form = response.data;
510
+        this.form = response.data
511 511
 #foreach ($column in $columns)
512 512
 #if($column.htmlType == "checkbox")
513
-        this.form.$column.javaField = this.form.${column.javaField}.split(",");
513
+        this.form.$column.javaField = this.form.${column.javaField}.split(",")
514 514
 #end
515 515
 #end
516 516
 #if($table.sub)
517
-        this.${subclassName}List = response.data.${subclassName}List;
517
+        this.${subclassName}List = response.data.${subclassName}List
518 518
 #end
519
-        this.open = true;
520
-        this.title = "修改${functionName}";
521
-      });
519
+        this.open = true
520
+        this.title = "修改${functionName}"
521
+      })
522 522
     },
523 523
     /** 提交按钮 */
524 524
     submitForm() {
@@ -526,64 +526,64 @@ export default {
526 526
         if (valid) {
527 527
 #foreach ($column in $columns)
528 528
 #if($column.htmlType == "checkbox")
529
-          this.form.$column.javaField = this.form.${column.javaField}.join(",");
529
+          this.form.$column.javaField = this.form.${column.javaField}.join(",")
530 530
 #end
531 531
 #end
532 532
 #if($table.sub)
533
-          this.form.${subclassName}List = this.${subclassName}List;
533
+          this.form.${subclassName}List = this.${subclassName}List
534 534
 #end
535 535
           if (this.form.${pkColumn.javaField} != null) {
536 536
             update${BusinessName}(this.form).then(response => {
537
-              this.#[[$modal]]#.msgSuccess("修改成功");
538
-              this.open = false;
539
-              this.getList();
540
-            });
537
+              this.#[[$modal]]#.msgSuccess("修改成功")
538
+              this.open = false
539
+              this.getList()
540
+            })
541 541
           } else {
542 542
             add${BusinessName}(this.form).then(response => {
543
-              this.#[[$modal]]#.msgSuccess("新增成功");
544
-              this.open = false;
545
-              this.getList();
546
-            });
543
+              this.#[[$modal]]#.msgSuccess("新增成功")
544
+              this.open = false
545
+              this.getList()
546
+            })
547 547
           }
548 548
         }
549
-      });
549
+      })
550 550
     },
551 551
     /** 删除按钮操作 */
552 552
     handleDelete(row) {
553
-      const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids;
553
+      const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids
554 554
       this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() {
555
-        return del${BusinessName}(${pkColumn.javaField}s);
555
+        return del${BusinessName}(${pkColumn.javaField}s)
556 556
       }).then(() => {
557
-        this.getList();
558
-        this.#[[$modal]]#.msgSuccess("删除成功");
559
-      }).catch(() => {});
557
+        this.getList()
558
+        this.#[[$modal]]#.msgSuccess("删除成功")
559
+      }).catch(() => {})
560 560
     },
561 561
 #if($table.sub)
562 562
 	/** ${subTable.functionName}序号 */
563 563
     row${subClassName}Index({ row, rowIndex }) {
564
-      row.index = rowIndex + 1;
564
+      row.index = rowIndex + 1
565 565
     },
566 566
     /** ${subTable.functionName}添加按钮操作 */
567 567
     handleAdd${subClassName}() {
568
-      let obj = {};
568
+      let obj = {}
569 569
 #foreach($column in $subTable.columns)
570 570
 #if($column.pk || $column.javaField == ${subTableFkclassName})
571 571
 #elseif($column.list && "" != $javaField)
572
-      obj.$column.javaField = "";
572
+      obj.$column.javaField = ""
573 573
 #end
574 574
 #end
575
-      this.${subclassName}List.push(obj);
575
+      this.${subclassName}List.push(obj)
576 576
     },
577 577
     /** ${subTable.functionName}删除按钮操作 */
578 578
     handleDelete${subClassName}() {
579 579
       if (this.checked${subClassName}.length == 0) {
580
-        this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
580
+        this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据")
581 581
       } else {
582
-        const ${subclassName}List = this.${subclassName}List;
583
-        const checked${subClassName} = this.checked${subClassName};
582
+        const ${subclassName}List = this.${subclassName}List
583
+        const checked${subClassName} = this.checked${subClassName}
584 584
         this.${subclassName}List = ${subclassName}List.filter(function(item) {
585 585
           return checked${subClassName}.indexOf(item.index) == -1
586
-        });
586
+        })
587 587
       }
588 588
     },
589 589
     /** 复选框选中数据 */
@@ -598,5 +598,5 @@ export default {
598 598
       }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
599 599
     }
600 600
   }
601
-};
601
+}
602 602
 </script>

+ 67 - 67
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm

@@ -271,26 +271,26 @@
271 271
 </template>
272 272
 
273 273
 <script setup name="${BusinessName}">
274
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
274
+import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
275 275
 
276
-const { proxy } = getCurrentInstance();
276
+const { proxy } = getCurrentInstance()
277 277
 #if(${dicts} != '')
278 278
 #set($dictsNoSymbol=$dicts.replace("'", ""))
279
-const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
279
+const { ${dictsNoSymbol} } = proxy.useDict(${dicts})
280 280
 #end
281 281
 
282
-const ${businessName}List = ref([]);
283
-const ${businessName}Options = ref([]);
284
-const open = ref(false);
285
-const loading = ref(true);
286
-const showSearch = ref(true);
287
-const title = ref("");
288
-const isExpandAll = ref(true);
289
-const refreshTable = ref(true);
282
+const ${businessName}List = ref([])
283
+const ${businessName}Options = ref([])
284
+const open = ref(false)
285
+const loading = ref(true)
286
+const showSearch = ref(true)
287
+const title = ref("")
288
+const isExpandAll = ref(true)
289
+const refreshTable = ref(true)
290 290
 #foreach ($column in $columns)
291 291
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
292 292
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
293
-const daterange${AttrName} = ref([]);
293
+const daterange${AttrName} = ref([])
294 294
 #end
295 295
 #end
296 296
 
@@ -318,16 +318,16 @@ const data = reactive({
318 318
 #end
319 319
 #end
320 320
   }
321
-});
321
+})
322 322
 
323
-const { queryParams, form, rules } = toRefs(data);
323
+const { queryParams, form, rules } = toRefs(data)
324 324
 
325 325
 /** 查询${functionName}列表 */
326 326
 function getList() {
327
-  loading.value = true;
327
+  loading.value = true
328 328
 #foreach ($column in $columns)
329 329
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
330
-  queryParams.value.params = {};
330
+  queryParams.value.params = {}
331 331
 #break
332 332
 #end
333 333
 #end
@@ -335,31 +335,31 @@ function getList() {
335 335
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
336 336
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
337 337
   if (null != daterange${AttrName} && '' != daterange${AttrName}) {
338
-    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
339
-    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
338
+    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0]
339
+    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1]
340 340
   }
341 341
 #end
342 342
 #end
343 343
   list${BusinessName}(queryParams.value).then(response => {
344
-    ${businessName}List.value = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
345
-    loading.value = false;
346
-  });
344
+    ${businessName}List.value = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}")
345
+    loading.value = false
346
+  })
347 347
 }
348 348
 
349 349
 /** 查询${functionName}下拉树结构 */
350 350
 function getTreeselect() {
351 351
   list${BusinessName}().then(response => {
352
-    ${businessName}Options.value = [];
353
-    const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
354
-    data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
355
-    ${businessName}Options.value.push(data);
356
-  });
352
+    ${businessName}Options.value = []
353
+    const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] }
354
+    data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}")
355
+    ${businessName}Options.value.push(data)
356
+  })
357 357
 }
358 358
 	
359 359
 // 取消按钮
360 360
 function cancel() {
361
-  open.value = false;
362
-  reset();
361
+  open.value = false
362
+  reset()
363 363
 }
364 364
 
365 365
 // 表单重置
@@ -372,13 +372,13 @@ function reset() {
372 372
     $column.javaField: null#if($foreach.count != $columns.size()),#end
373 373
 #end
374 374
 #end
375
-  };
376
-  proxy.resetForm("${businessName}Ref");
375
+  }
376
+  proxy.resetForm("${businessName}Ref")
377 377
 }
378 378
 
379 379
 /** 搜索按钮操作 */
380 380
 function handleQuery() {
381
-  getList();
381
+  getList()
382 382
 }
383 383
 
384 384
 /** 重置按钮操作 */
@@ -386,52 +386,52 @@ function resetQuery() {
386 386
 #foreach ($column in $columns)
387 387
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
388 388
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
389
-  daterange${AttrName}.value = [];
389
+  daterange${AttrName}.value = []
390 390
 #end
391 391
 #end
392
-  proxy.resetForm("queryRef");
393
-  handleQuery();
392
+  proxy.resetForm("queryRef")
393
+  handleQuery()
394 394
 }
395 395
 
396 396
 /** 新增按钮操作 */
397 397
 function handleAdd(row) {
398
-  reset();
399
-  getTreeselect();
398
+  reset()
399
+  getTreeselect()
400 400
   if (row != null && row.${treeCode}) {
401
-    form.value.${treeParentCode} = row.${treeCode};
401
+    form.value.${treeParentCode} = row.${treeCode}
402 402
   } else {
403
-    form.value.${treeParentCode} = 0;
403
+    form.value.${treeParentCode} = 0
404 404
   }
405
-  open.value = true;
406
-  title.value = "添加${functionName}";
405
+  open.value = true
406
+  title.value = "添加${functionName}"
407 407
 }
408 408
 
409 409
 /** 展开/折叠操作 */
410 410
 function toggleExpandAll() {
411
-  refreshTable.value = false;
412
-  isExpandAll.value = !isExpandAll.value;
411
+  refreshTable.value = false
412
+  isExpandAll.value = !isExpandAll.value
413 413
   nextTick(() => {
414
-    refreshTable.value = true;
415
-  });
414
+    refreshTable.value = true
415
+  })
416 416
 }
417 417
 
418 418
 /** 修改按钮操作 */
419 419
 async function handleUpdate(row) {
420
-  reset();
421
-  await getTreeselect();
420
+  reset()
421
+  await getTreeselect()
422 422
   if (row != null) {
423
-    form.value.${treeParentCode} = row.${treeParentCode};
423
+    form.value.${treeParentCode} = row.${treeParentCode}
424 424
   }
425 425
   get${BusinessName}(row.${pkColumn.javaField}).then(response => {
426
-    form.value = response.data;
426
+    form.value = response.data
427 427
 #foreach ($column in $columns)
428 428
 #if($column.htmlType == "checkbox")
429
-    form.value.$column.javaField = form.value.${column.javaField}.split(",");
429
+    form.value.$column.javaField = form.value.${column.javaField}.split(",")
430 430
 #end
431 431
 #end
432
-    open.value = true;
433
-    title.value = "修改${functionName}";
434
-  });
432
+    open.value = true
433
+    title.value = "修改${functionName}"
434
+  })
435 435
 }
436 436
 
437 437
 /** 提交按钮 */
@@ -440,35 +440,35 @@ function submitForm() {
440 440
     if (valid) {
441 441
 #foreach ($column in $columns)
442 442
 #if($column.htmlType == "checkbox")
443
-      form.value.$column.javaField = form.value.${column.javaField}.join(",");
443
+      form.value.$column.javaField = form.value.${column.javaField}.join(",")
444 444
 #end
445 445
 #end
446 446
       if (form.value.${pkColumn.javaField} != null) {
447 447
         update${BusinessName}(form.value).then(response => {
448
-          proxy.#[[$modal]]#.msgSuccess("修改成功");
449
-          open.value = false;
450
-          getList();
451
-        });
448
+          proxy.#[[$modal]]#.msgSuccess("修改成功")
449
+          open.value = false
450
+          getList()
451
+        })
452 452
       } else {
453 453
         add${BusinessName}(form.value).then(response => {
454
-          proxy.#[[$modal]]#.msgSuccess("新增成功");
455
-          open.value = false;
456
-          getList();
457
-        });
454
+          proxy.#[[$modal]]#.msgSuccess("新增成功")
455
+          open.value = false
456
+          getList()
457
+        })
458 458
       }
459 459
     }
460
-  });
460
+  })
461 461
 }
462 462
 
463 463
 /** 删除按钮操作 */
464 464
 function handleDelete(row) {
465 465
   proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
466
-    return del${BusinessName}(row.${pkColumn.javaField});
466
+    return del${BusinessName}(row.${pkColumn.javaField})
467 467
   }).then(() => {
468
-    getList();
469
-    proxy.#[[$modal]]#.msgSuccess("删除成功");
470
-  }).catch(() => {});
468
+    getList()
469
+    proxy.#[[$modal]]#.msgSuccess("删除成功")
470
+  }).catch(() => {})
471 471
 }
472 472
 
473
-getList();
473
+getList()
474 474
 </script>

+ 73 - 73
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm

@@ -343,33 +343,33 @@
343 343
 </template>
344 344
 
345 345
 <script setup name="${BusinessName}">
346
-import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
346
+import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
347 347
 
348
-const { proxy } = getCurrentInstance();
348
+const { proxy } = getCurrentInstance()
349 349
 #if(${dicts} != '')
350 350
 #set($dictsNoSymbol=$dicts.replace("'", ""))
351
-const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
351
+const { ${dictsNoSymbol} } = proxy.useDict(${dicts})
352 352
 #end
353 353
 
354
-const ${businessName}List = ref([]);
354
+const ${businessName}List = ref([])
355 355
 #if($table.sub)
356
-const ${subclassName}List = ref([]);
356
+const ${subclassName}List = ref([])
357 357
 #end
358
-const open = ref(false);
359
-const loading = ref(true);
360
-const showSearch = ref(true);
361
-const ids = ref([]);
358
+const open = ref(false)
359
+const loading = ref(true)
360
+const showSearch = ref(true)
361
+const ids = ref([])
362 362
 #if($table.sub)
363
-const checked${subClassName} = ref([]);
363
+const checked${subClassName} = ref([])
364 364
 #end
365
-const single = ref(true);
366
-const multiple = ref(true);
367
-const total = ref(0);
368
-const title = ref("");
365
+const single = ref(true)
366
+const multiple = ref(true)
367
+const total = ref(0)
368
+const title = ref("")
369 369
 #foreach ($column in $columns)
370 370
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
371 371
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
372
-const daterange${AttrName} = ref([]);
372
+const daterange${AttrName} = ref([])
373 373
 #end
374 374
 #end
375 375
 
@@ -399,16 +399,16 @@ const data = reactive({
399 399
 #end
400 400
 #end
401 401
   }
402
-});
402
+})
403 403
 
404
-const { queryParams, form, rules } = toRefs(data);
404
+const { queryParams, form, rules } = toRefs(data)
405 405
 
406 406
 /** 查询${functionName}列表 */
407 407
 function getList() {
408
-  loading.value = true;
408
+  loading.value = true
409 409
 #foreach ($column in $columns)
410 410
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
411
-  queryParams.value.params = {};
411
+  queryParams.value.params = {}
412 412
 #break
413 413
 #end
414 414
 #end
@@ -416,22 +416,22 @@ function getList() {
416 416
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
417 417
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
418 418
   if (null != daterange${AttrName} && '' != daterange${AttrName}) {
419
-    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
420
-    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
419
+    queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0]
420
+    queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1]
421 421
   }
422 422
 #end
423 423
 #end
424 424
   list${BusinessName}(queryParams.value).then(response => {
425
-    ${businessName}List.value = response.rows;
426
-    total.value = response.total;
427
-    loading.value = false;
428
-  });
425
+    ${businessName}List.value = response.rows
426
+    total.value = response.total
427
+    loading.value = false
428
+  })
429 429
 }
430 430
 
431 431
 // 取消按钮
432 432
 function cancel() {
433
-  open.value = false;
434
-  reset();
433
+  open.value = false
434
+  reset()
435 435
 }
436 436
 
437 437
 // 表单重置
@@ -444,17 +444,17 @@ function reset() {
444 444
     $column.javaField: null#if($foreach.count != $columns.size()),#end
445 445
 #end
446 446
 #end
447
-  };
447
+  }
448 448
 #if($table.sub)
449
-  ${subclassName}List.value = [];
449
+  ${subclassName}List.value = []
450 450
 #end
451
-  proxy.resetForm("${businessName}Ref");
451
+  proxy.resetForm("${businessName}Ref")
452 452
 }
453 453
 
454 454
 /** 搜索按钮操作 */
455 455
 function handleQuery() {
456
-  queryParams.value.pageNum = 1;
457
-  getList();
456
+  queryParams.value.pageNum = 1
457
+  getList()
458 458
 }
459 459
 
460 460
 /** 重置按钮操作 */
@@ -462,44 +462,44 @@ function resetQuery() {
462 462
 #foreach ($column in $columns)
463 463
 #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
464 464
 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
465
-  daterange${AttrName}.value = [];
465
+  daterange${AttrName}.value = []
466 466
 #end
467 467
 #end
468
-  proxy.resetForm("queryRef");
469
-  handleQuery();
468
+  proxy.resetForm("queryRef")
469
+  handleQuery()
470 470
 }
471 471
 
472 472
 // 多选框选中数据
473 473
 function handleSelectionChange(selection) {
474
-  ids.value = selection.map(item => item.${pkColumn.javaField});
475
-  single.value = selection.length != 1;
476
-  multiple.value = !selection.length;
474
+  ids.value = selection.map(item => item.${pkColumn.javaField})
475
+  single.value = selection.length != 1
476
+  multiple.value = !selection.length
477 477
 }
478 478
 
479 479
 /** 新增按钮操作 */
480 480
 function handleAdd() {
481
-  reset();
482
-  open.value = true;
483
-  title.value = "添加${functionName}";
481
+  reset()
482
+  open.value = true
483
+  title.value = "添加${functionName}"
484 484
 }
485 485
 
486 486
 /** 修改按钮操作 */
487 487
 function handleUpdate(row) {
488
-  reset();
488
+  reset()
489 489
   const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value
490 490
   get${BusinessName}(_${pkColumn.javaField}).then(response => {
491
-    form.value = response.data;
491
+    form.value = response.data
492 492
 #foreach ($column in $columns)
493 493
 #if($column.htmlType == "checkbox")
494
-    form.value.$column.javaField = form.value.${column.javaField}.split(",");
494
+    form.value.$column.javaField = form.value.${column.javaField}.split(",")
495 495
 #end
496 496
 #end
497 497
 #if($table.sub)
498
-    ${subclassName}List.value = response.data.${subclassName}List;
498
+    ${subclassName}List.value = response.data.${subclassName}List
499 499
 #end
500
-    open.value = true;
501
-    title.value = "修改${functionName}";
502
-  });
500
+    open.value = true
501
+    title.value = "修改${functionName}"
502
+  })
503 503
 }
504 504
 
505 505
 /** 提交按钮 */
@@ -508,68 +508,68 @@ function submitForm() {
508 508
     if (valid) {
509 509
 #foreach ($column in $columns)
510 510
 #if($column.htmlType == "checkbox")
511
-      form.value.$column.javaField = form.value.${column.javaField}.join(",");
511
+      form.value.$column.javaField = form.value.${column.javaField}.join(",")
512 512
 #end
513 513
 #end
514 514
 #if($table.sub)
515
-      form.value.${subclassName}List = ${subclassName}List.value;
515
+      form.value.${subclassName}List = ${subclassName}List.value
516 516
 #end
517 517
       if (form.value.${pkColumn.javaField} != null) {
518 518
         update${BusinessName}(form.value).then(response => {
519
-          proxy.#[[$modal]]#.msgSuccess("修改成功");
520
-          open.value = false;
521
-          getList();
522
-        });
519
+          proxy.#[[$modal]]#.msgSuccess("修改成功")
520
+          open.value = false
521
+          getList()
522
+        })
523 523
       } else {
524 524
         add${BusinessName}(form.value).then(response => {
525
-          proxy.#[[$modal]]#.msgSuccess("新增成功");
526
-          open.value = false;
527
-          getList();
528
-        });
525
+          proxy.#[[$modal]]#.msgSuccess("新增成功")
526
+          open.value = false
527
+          getList()
528
+        })
529 529
       }
530 530
     }
531
-  });
531
+  })
532 532
 }
533 533
 
534 534
 /** 删除按钮操作 */
535 535
 function handleDelete(row) {
536
-  const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
536
+  const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value
537 537
   proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() {
538
-    return del${BusinessName}(_${pkColumn.javaField}s);
538
+    return del${BusinessName}(_${pkColumn.javaField}s)
539 539
   }).then(() => {
540
-    getList();
541
-    proxy.#[[$modal]]#.msgSuccess("删除成功");
542
-  }).catch(() => {});
540
+    getList()
541
+    proxy.#[[$modal]]#.msgSuccess("删除成功")
542
+  }).catch(() => {})
543 543
 }
544 544
 
545 545
 #if($table.sub)
546 546
 /** ${subTable.functionName}序号 */
547 547
 function row${subClassName}Index({ row, rowIndex }) {
548
-  row.index = rowIndex + 1;
548
+  row.index = rowIndex + 1
549 549
 }
550 550
 
551 551
 /** ${subTable.functionName}添加按钮操作 */
552 552
 function handleAdd${subClassName}() {
553
-  let obj = {};
553
+  let obj = {}
554 554
 #foreach($column in $subTable.columns)
555 555
 #if($column.pk || $column.javaField == ${subTableFkclassName})
556 556
 #elseif($column.list && "" != $javaField)
557
-  obj.$column.javaField = "";
557
+  obj.$column.javaField = ""
558 558
 #end
559 559
 #end
560
-  ${subclassName}List.value.push(obj);
560
+  ${subclassName}List.value.push(obj)
561 561
 }
562 562
 
563 563
 /** ${subTable.functionName}删除按钮操作 */
564 564
 function handleDelete${subClassName}() {
565 565
   if (checked${subClassName}.value.length == 0) {
566
-    proxy.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
566
+    proxy.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据")
567 567
   } else {
568
-    const ${subclassName}s = ${subclassName}List.value;
569
-    const checked${subClassName}s = checked${subClassName}.value;
568
+    const ${subclassName}s = ${subclassName}List.value
569
+    const checked${subClassName}s = checked${subClassName}.value
570 570
     ${subclassName}List.value = ${subclassName}s.filter(function(item) {
571 571
       return checked${subClassName}s.indexOf(item.index) == -1
572
-    });
572
+    })
573 573
   }
574 574
 }
575 575
 
@@ -586,5 +586,5 @@ function handleExport() {
586 586
   }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
587 587
 }
588 588
 
589
-getList();
589
+getList()
590 590
 </script>

+ 2 - 2
ruoyi-ui/src/App.vue

@@ -6,7 +6,7 @@
6 6
 </template>
7 7
 
8 8
 <script>
9
-import ThemePicker from "@/components/ThemePicker";
9
+import ThemePicker from "@/components/ThemePicker"
10 10
 
11 11
 export default {
12 12
   name: "App",
@@ -19,7 +19,7 @@ export default {
19 19
       }
20 20
     }
21 21
   }
22
-};
22
+}
23 23
 </script>
24 24
 <style scoped>
25 25
 #app .theme-picker {

+ 25 - 25
ruoyi-ui/src/components/Crontab/day.vue

@@ -71,58 +71,58 @@ export default {
71 71
 	methods: {
72 72
 		// 单选按钮值变化时
73 73
 		radioChange() {
74
-			('day rachange');
74
+			('day rachange')
75 75
 			if (this.radioValue !== 2 && this.cron.week !== '?') {
76 76
 				this.$emit('update', 'week', '?', 'day')
77 77
 			}
78 78
 
79 79
 			switch (this.radioValue) {
80 80
 				case 1:
81
-					this.$emit('update', 'day', '*');
82
-					break;
81
+					this.$emit('update', 'day', '*')
82
+					break
83 83
 				case 2:
84
-					this.$emit('update', 'day', '?');
85
-					break;
84
+					this.$emit('update', 'day', '?')
85
+					break
86 86
 				case 3:
87
-					this.$emit('update', 'day', this.cycleTotal);
88
-					break;
87
+					this.$emit('update', 'day', this.cycleTotal)
88
+					break
89 89
 				case 4:
90
-					this.$emit('update', 'day', this.averageTotal);
91
-					break;
90
+					this.$emit('update', 'day', this.averageTotal)
91
+					break
92 92
 				case 5:
93
-					this.$emit('update', 'day', this.workday + 'W');
94
-					break;
93
+					this.$emit('update', 'day', this.workday + 'W')
94
+					break
95 95
 				case 6:
96
-					this.$emit('update', 'day', 'L');
97
-					break;
96
+					this.$emit('update', 'day', 'L')
97
+					break
98 98
 				case 7:
99
-					this.$emit('update', 'day', this.checkboxString);
100
-					break;
99
+					this.$emit('update', 'day', this.checkboxString)
100
+					break
101 101
 			}
102
-			('day rachange end');
102
+			('day rachange end')
103 103
 		},
104 104
 		// 周期两个值变化时
105 105
 		cycleChange() {
106 106
 			if (this.radioValue == '3') {
107
-				this.$emit('update', 'day', this.cycleTotal);
107
+				this.$emit('update', 'day', this.cycleTotal)
108 108
 			}
109 109
 		},
110 110
 		// 平均两个值变化时
111 111
 		averageChange() {
112 112
 			if (this.radioValue == '4') {
113
-				this.$emit('update', 'day', this.averageTotal);
113
+				this.$emit('update', 'day', this.averageTotal)
114 114
 			}
115 115
 		},
116 116
 		// 最近工作日值变化时
117 117
 		workdayChange() {
118 118
 			if (this.radioValue == '5') {
119
-				this.$emit('update', 'day', this.workdayCheck + 'W');
119
+				this.$emit('update', 'day', this.workdayCheck + 'W')
120 120
 			}
121 121
 		},
122 122
 		// checkbox值变化时
123 123
 		checkboxChange() {
124 124
 			if (this.radioValue == '7') {
125
-				this.$emit('update', 'day', this.checkboxString);
125
+				this.$emit('update', 'day', this.checkboxString)
126 126
 			}
127 127
 		}
128 128
 	},
@@ -138,23 +138,23 @@ export default {
138 138
 		cycleTotal: function () {
139 139
 			const cycle01 = this.checkNum(this.cycle01, 1, 30)
140 140
 			const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 2, 31, 31)
141
-			return cycle01 + '-' + cycle02;
141
+			return cycle01 + '-' + cycle02
142 142
 		},
143 143
 		// 计算平均用到的值
144 144
 		averageTotal: function () {
145 145
 			const average01 = this.checkNum(this.average01, 1, 30)
146 146
 			const average02 = this.checkNum(this.average02, 1, 31 - average01 || 0)
147
-			return average01 + '/' + average02;
147
+			return average01 + '/' + average02
148 148
 		},
149 149
 		// 计算工作日格式
150 150
 		workdayCheck: function () {
151 151
 			const workday = this.checkNum(this.workday, 1, 31)
152
-			return workday;
152
+			return workday
153 153
 		},
154 154
 		// 计算勾选的checkbox值合集
155 155
 		checkboxString: function () {
156
-			let str = this.checkboxList.join();
157
-			return str == '' ? '*' : str;
156
+			let str = this.checkboxList.join()
157
+			return str == '' ? '*' : str
158 158
 		}
159 159
 	}
160 160
 }

+ 21 - 15
ruoyi-ui/src/components/Crontab/hour.vue

@@ -51,37 +51,43 @@ export default {
51 51
 	methods: {
52 52
 		// 单选按钮值变化时
53 53
 		radioChange() {
54
+			if (this.cron.min === '*') {
55
+			    this.$emit('update', 'min', '0', 'hour')
56
+			}
57
+			if (this.cron.second === '*') {
58
+			    this.$emit('update', 'second', '0', 'hour')
59
+			}
54 60
 			switch (this.radioValue) {
55 61
 				case 1:
56
-        	this.$emit('update', 'hour', '*')
57
-        	break;
62
+					this.$emit('update', 'hour', '*')
63
+					break
58 64
 				case 2:
59
-					this.$emit('update', 'hour', this.cycleTotal);
60
-					break;
65
+					this.$emit('update', 'hour', this.cycleTotal)
66
+					break
61 67
 				case 3:
62
-					this.$emit('update', 'hour', this.averageTotal);
63
-					break;
68
+					this.$emit('update', 'hour', this.averageTotal)
69
+					break
64 70
 				case 4:
65
-					this.$emit('update', 'hour', this.checkboxString);
66
-					break;
71
+					this.$emit('update', 'hour', this.checkboxString)
72
+					break
67 73
 			}
68 74
 		},
69 75
 		// 周期两个值变化时
70 76
 		cycleChange() {
71 77
 			if (this.radioValue == '2') {
72
-				this.$emit('update', 'hour', this.cycleTotal);
78
+				this.$emit('update', 'hour', this.cycleTotal)
73 79
 			}
74 80
 		},
75 81
 		// 平均两个值变化时
76 82
 		averageChange() {
77 83
 			if (this.radioValue == '3') {
78
-				this.$emit('update', 'hour', this.averageTotal);
84
+				this.$emit('update', 'hour', this.averageTotal)
79 85
 			}
80 86
 		},
81 87
 		// checkbox值变化时
82 88
 		checkboxChange() {
83 89
 			if (this.radioValue == '4') {
84
-				this.$emit('update', 'hour', this.checkboxString);
90
+				this.$emit('update', 'hour', this.checkboxString)
85 91
 			}
86 92
 		}
87 93
 	},
@@ -96,18 +102,18 @@ export default {
96 102
 		cycleTotal: function () {
97 103
 			const cycle01 = this.checkNum(this.cycle01, 0, 22)
98 104
 			const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23)
99
-			return cycle01 + '-' + cycle02;
105
+			return cycle01 + '-' + cycle02
100 106
 		},
101 107
 		// 计算平均用到的值
102 108
 		averageTotal: function () {
103 109
 			const average01 = this.checkNum(this.average01, 0, 22)
104 110
 			const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0)
105
-			return average01 + '/' + average02;
111
+			return average01 + '/' + average02
106 112
 		},
107 113
 		// 计算勾选的checkbox值合集
108 114
 		checkboxString: function () {
109
-			let str = this.checkboxList.join();
110
-			return str == '' ? '*' : str;
115
+			let str = this.checkboxList.join()
116
+			return str == '' ? '*' : str
111 117
 		}
112 118
 	}
113 119
 }

+ 87 - 87
ruoyi-ui/src/components/Crontab/index.vue

@@ -113,14 +113,14 @@
113 113
 </template>
114 114
 
115 115
 <script>
116
-import CrontabSecond from "./second.vue";
117
-import CrontabMin from "./min.vue";
118
-import CrontabHour from "./hour.vue";
119
-import CrontabDay from "./day.vue";
120
-import CrontabMonth from "./month.vue";
121
-import CrontabWeek from "./week.vue";
122
-import CrontabYear from "./year.vue";
123
-import CrontabResult from "./result.vue";
116
+import CrontabSecond from "./second.vue"
117
+import CrontabMin from "./min.vue"
118
+import CrontabHour from "./hour.vue"
119
+import CrontabDay from "./day.vue"
120
+import CrontabMonth from "./month.vue"
121
+import CrontabWeek from "./week.vue"
122
+import CrontabYear from "./year.vue"
123
+import CrontabResult from "./result.vue"
124 124
 
125 125
 export default {
126 126
   data() {
@@ -137,19 +137,19 @@ export default {
137 137
         week: "?",
138 138
         year: "",
139 139
       },
140
-    };
140
+    }
141 141
   },
142 142
   name: "vcrontab",
143 143
   props: ["expression", "hideComponent"],
144 144
   methods: {
145 145
     shouldHide(key) {
146
-      if (this.hideComponent && this.hideComponent.includes(key)) return false;
147
-      return true;
146
+      if (this.hideComponent && this.hideComponent.includes(key)) return false
147
+      return true
148 148
     },
149 149
     resolveExp() {
150 150
       // 反解析 表达式
151 151
       if (this.expression) {
152
-        let arr = this.expression.split(" ");
152
+        let arr = this.expression.split(" ")
153 153
         if (arr.length >= 6) {
154 154
           //6 位以上是合法表达式
155 155
           let obj = {
@@ -160,160 +160,160 @@ export default {
160 160
             month: arr[4],
161 161
             week: arr[5],
162 162
             year: arr[6] ? arr[6] : "",
163
-          };
163
+          }
164 164
           this.crontabValueObj = {
165 165
             ...obj,
166
-          };
166
+          }
167 167
           for (let i in obj) {
168
-            if (obj[i]) this.changeRadio(i, obj[i]);
168
+            if (obj[i]) this.changeRadio(i, obj[i])
169 169
           }
170 170
         }
171 171
       } else {
172 172
         // 没有传入的表达式 则还原
173
-        this.clearCron();
173
+        this.clearCron()
174 174
       }
175 175
     },
176 176
     // tab切换值
177 177
     tabCheck(index) {
178
-      this.tabActive = index;
178
+      this.tabActive = index
179 179
     },
180 180
     // 由子组件触发,更改表达式组成的字段值
181 181
     updateCrontabValue(name, value, from) {
182
-      "updateCrontabValue", name, value, from;
183
-      this.crontabValueObj[name] = value;
182
+      "updateCrontabValue", name, value, from
183
+      this.crontabValueObj[name] = value
184 184
       if (from && from !== name) {
185
-        console.log(`来自组件 ${from} 改变了 ${name} ${value}`);
186
-        this.changeRadio(name, value);
185
+        console.log(`来自组件 ${from} 改变了 ${name} ${value}`)
186
+        this.changeRadio(name, value)
187 187
       }
188 188
     },
189 189
     // 赋值到组件
190 190
     changeRadio(name, value) {
191 191
       let arr = ["second", "min", "hour", "month"],
192 192
         refName = "cron" + name,
193
-        insValue;
193
+        insValue
194 194
 
195
-      if (!this.$refs[refName]) return;
195
+      if (!this.$refs[refName]) return
196 196
 
197 197
       if (arr.includes(name)) {
198 198
         if (value === "*") {
199
-          insValue = 1;
199
+          insValue = 1
200 200
         } else if (value.indexOf("-") > -1) {
201
-          let indexArr = value.split("-");
201
+          let indexArr = value.split("-")
202 202
           isNaN(indexArr[0])
203 203
             ? (this.$refs[refName].cycle01 = 0)
204
-            : (this.$refs[refName].cycle01 = indexArr[0]);
205
-          this.$refs[refName].cycle02 = indexArr[1];
206
-          insValue = 2;
204
+            : (this.$refs[refName].cycle01 = indexArr[0])
205
+          this.$refs[refName].cycle02 = indexArr[1]
206
+          insValue = 2
207 207
         } else if (value.indexOf("/") > -1) {
208
-          let indexArr = value.split("/");
208
+          let indexArr = value.split("/")
209 209
           isNaN(indexArr[0])
210 210
             ? (this.$refs[refName].average01 = 0)
211
-            : (this.$refs[refName].average01 = indexArr[0]);
212
-          this.$refs[refName].average02 = indexArr[1];
213
-          insValue = 3;
211
+            : (this.$refs[refName].average01 = indexArr[0])
212
+          this.$refs[refName].average02 = indexArr[1]
213
+          insValue = 3
214 214
         } else {
215
-          insValue = 4;
216
-          this.$refs[refName].checkboxList = value.split(",");
215
+          insValue = 4
216
+          this.$refs[refName].checkboxList = value.split(",")
217 217
         }
218 218
       } else if (name == "day") {
219 219
         if (value === "*") {
220
-          insValue = 1;
220
+          insValue = 1
221 221
         } else if (value == "?") {
222
-          insValue = 2;
222
+          insValue = 2
223 223
         } else if (value.indexOf("-") > -1) {
224
-          let indexArr = value.split("-");
224
+          let indexArr = value.split("-")
225 225
           isNaN(indexArr[0])
226 226
             ? (this.$refs[refName].cycle01 = 0)
227
-            : (this.$refs[refName].cycle01 = indexArr[0]);
228
-          this.$refs[refName].cycle02 = indexArr[1];
229
-          insValue = 3;
227
+            : (this.$refs[refName].cycle01 = indexArr[0])
228
+          this.$refs[refName].cycle02 = indexArr[1]
229
+          insValue = 3
230 230
         } else if (value.indexOf("/") > -1) {
231
-          let indexArr = value.split("/");
231
+          let indexArr = value.split("/")
232 232
           isNaN(indexArr[0])
233 233
             ? (this.$refs[refName].average01 = 0)
234
-            : (this.$refs[refName].average01 = indexArr[0]);
235
-          this.$refs[refName].average02 = indexArr[1];
236
-          insValue = 4;
234
+            : (this.$refs[refName].average01 = indexArr[0])
235
+          this.$refs[refName].average02 = indexArr[1]
236
+          insValue = 4
237 237
         } else if (value.indexOf("W") > -1) {
238
-          let indexArr = value.split("W");
238
+          let indexArr = value.split("W")
239 239
           isNaN(indexArr[0])
240 240
             ? (this.$refs[refName].workday = 0)
241
-            : (this.$refs[refName].workday = indexArr[0]);
242
-          insValue = 5;
241
+            : (this.$refs[refName].workday = indexArr[0])
242
+          insValue = 5
243 243
         } else if (value === "L") {
244
-          insValue = 6;
244
+          insValue = 6
245 245
         } else {
246
-          this.$refs[refName].checkboxList = value.split(",");
247
-          insValue = 7;
246
+          this.$refs[refName].checkboxList = value.split(",")
247
+          insValue = 7
248 248
         }
249 249
       } else if (name == "week") {
250 250
         if (value === "*") {
251
-          insValue = 1;
251
+          insValue = 1
252 252
         } else if (value == "?") {
253
-          insValue = 2;
253
+          insValue = 2
254 254
         } else if (value.indexOf("-") > -1) {
255
-          let indexArr = value.split("-");
255
+          let indexArr = value.split("-")
256 256
           isNaN(indexArr[0])
257 257
             ? (this.$refs[refName].cycle01 = 0)
258
-            : (this.$refs[refName].cycle01 = indexArr[0]);
259
-          this.$refs[refName].cycle02 = indexArr[1];
260
-          insValue = 3;
258
+            : (this.$refs[refName].cycle01 = indexArr[0])
259
+          this.$refs[refName].cycle02 = indexArr[1]
260
+          insValue = 3
261 261
         } else if (value.indexOf("#") > -1) {
262
-          let indexArr = value.split("#");
262
+          let indexArr = value.split("#")
263 263
           isNaN(indexArr[0])
264 264
             ? (this.$refs[refName].average01 = 1)
265
-            : (this.$refs[refName].average01 = indexArr[0]);
266
-          this.$refs[refName].average02 = indexArr[1];
267
-          insValue = 4;
265
+            : (this.$refs[refName].average01 = indexArr[0])
266
+          this.$refs[refName].average02 = indexArr[1]
267
+          insValue = 4
268 268
         } else if (value.indexOf("L") > -1) {
269
-          let indexArr = value.split("L");
269
+          let indexArr = value.split("L")
270 270
           isNaN(indexArr[0])
271 271
             ? (this.$refs[refName].weekday = 1)
272
-            : (this.$refs[refName].weekday = indexArr[0]);
273
-          insValue = 5;
272
+            : (this.$refs[refName].weekday = indexArr[0])
273
+          insValue = 5
274 274
         } else {
275
-          this.$refs[refName].checkboxList = value.split(",");
276
-          insValue = 6;
275
+          this.$refs[refName].checkboxList = value.split(",")
276
+          insValue = 6
277 277
         }
278 278
       } else if (name == "year") {
279 279
         if (value == "") {
280
-          insValue = 1;
280
+          insValue = 1
281 281
         } else if (value == "*") {
282
-          insValue = 2;
282
+          insValue = 2
283 283
         } else if (value.indexOf("-") > -1) {
284
-          insValue = 3;
284
+          insValue = 3
285 285
         } else if (value.indexOf("/") > -1) {
286
-          insValue = 4;
286
+          insValue = 4
287 287
         } else {
288
-          this.$refs[refName].checkboxList = value.split(",");
289
-          insValue = 5;
288
+          this.$refs[refName].checkboxList = value.split(",")
289
+          insValue = 5
290 290
         }
291 291
       }
292
-      this.$refs[refName].radioValue = insValue;
292
+      this.$refs[refName].radioValue = insValue
293 293
     },
294 294
     // 表单选项的子组件校验数字格式(通过-props传递)
295 295
     checkNumber(value, minLimit, maxLimit) {
296 296
       // 检查必须为整数
297
-      value = Math.floor(value);
297
+      value = Math.floor(value)
298 298
       if (value < minLimit) {
299
-        value = minLimit;
299
+        value = minLimit
300 300
       } else if (value > maxLimit) {
301
-        value = maxLimit;
301
+        value = maxLimit
302 302
       }
303
-      return value;
303
+      return value
304 304
     },
305 305
     // 隐藏弹窗
306 306
     hidePopup() {
307
-      this.$emit("hide");
307
+      this.$emit("hide")
308 308
     },
309 309
     // 填充表达式
310 310
     submitFill() {
311
-      this.$emit("fill", this.crontabValueString);
312
-      this.hidePopup();
311
+      this.$emit("fill", this.crontabValueString)
312
+      this.hidePopup()
313 313
     },
314 314
     clearCron() {
315 315
       // 还原选择项
316
-      ("准备还原");
316
+      ("准备还原")
317 317
       this.crontabValueObj = {
318 318
         second: "*",
319 319
         min: "*",
@@ -322,15 +322,15 @@ export default {
322 322
         month: "*",
323 323
         week: "?",
324 324
         year: "",
325
-      };
325
+      }
326 326
       for (let j in this.crontabValueObj) {
327
-        this.changeRadio(j, this.crontabValueObj[j]);
327
+        this.changeRadio(j, this.crontabValueObj[j])
328 328
       }
329 329
     },
330 330
   },
331 331
   computed: {
332 332
     crontabValueString: function() {
333
-      let obj = this.crontabValueObj;
333
+      let obj = this.crontabValueObj
334 334
       let str =
335 335
         obj.second +
336 336
         " " +
@@ -343,8 +343,8 @@ export default {
343 343
         obj.month +
344 344
         " " +
345 345
         obj.week +
346
-        (obj.year == "" ? "" : " " + obj.year);
347
-      return str;
346
+        (obj.year == "" ? "" : " " + obj.year)
347
+      return str
348 348
     },
349 349
   },
350 350
   components: {
@@ -364,9 +364,9 @@ export default {
364 364
     },
365 365
   },
366 366
   mounted: function() {
367
-    this.resolveExp();
367
+    this.resolveExp()
368 368
   },
369
-};
369
+}
370 370
 </script>
371 371
 <style scoped>
372 372
 .pop_btn {

+ 15 - 15
ruoyi-ui/src/components/Crontab/min.vue

@@ -54,35 +54,35 @@ export default {
54 54
 		radioChange() {
55 55
 			switch (this.radioValue) {
56 56
 				case 1:
57
-					this.$emit('update', 'min', '*', 'min');
58
-					break;
57
+					this.$emit('update', 'min', '*', 'min')
58
+					break
59 59
 				case 2:
60
-					this.$emit('update', 'min', this.cycleTotal, 'min');
61
-					break;
60
+					this.$emit('update', 'min', this.cycleTotal, 'min')
61
+					break
62 62
 				case 3:
63
-					this.$emit('update', 'min', this.averageTotal, 'min');
64
-					break;
63
+					this.$emit('update', 'min', this.averageTotal, 'min')
64
+					break
65 65
 				case 4:
66
-					this.$emit('update', 'min', this.checkboxString, 'min');
67
-					break;
66
+					this.$emit('update', 'min', this.checkboxString, 'min')
67
+					break
68 68
 			}
69 69
 		},
70 70
 		// 周期两个值变化时
71 71
 		cycleChange() {
72 72
 			if (this.radioValue == '2') {
73
-				this.$emit('update', 'min', this.cycleTotal, 'min');
73
+				this.$emit('update', 'min', this.cycleTotal, 'min')
74 74
 			}
75 75
 		},
76 76
 		// 平均两个值变化时
77 77
 		averageChange() {
78 78
 			if (this.radioValue == '3') {
79
-				this.$emit('update', 'min', this.averageTotal, 'min');
79
+				this.$emit('update', 'min', this.averageTotal, 'min')
80 80
 			}
81 81
 		},
82 82
 		// checkbox值变化时
83 83
 		checkboxChange() {
84 84
 			if (this.radioValue == '4') {
85
-				this.$emit('update', 'min', this.checkboxString, 'min');
85
+				this.$emit('update', 'min', this.checkboxString, 'min')
86 86
 			}
87 87
 		},
88 88
 
@@ -98,18 +98,18 @@ export default {
98 98
 		cycleTotal: function () {
99 99
 			const cycle01 = this.checkNum(this.cycle01, 0, 58)
100 100
 			const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 59)
101
-			return cycle01 + '-' + cycle02;
101
+			return cycle01 + '-' + cycle02
102 102
 		},
103 103
 		// 计算平均用到的值
104 104
 		averageTotal: function () {
105 105
 			const average01 = this.checkNum(this.average01, 0, 58)
106 106
 			const average02 = this.checkNum(this.average02, 1, 59 - average01 || 0)
107
-			return average01 + '/' + average02;
107
+			return average01 + '/' + average02
108 108
 		},
109 109
 		// 计算勾选的checkbox值合集
110 110
 		checkboxString: function () {
111
-			let str = this.checkboxList.join();
112
-			return str == '' ? '*' : str;
111
+			let str = this.checkboxList.join()
112
+			return str == '' ? '*' : str
113 113
 		}
114 114
 	}
115 115
 }

+ 15 - 15
ruoyi-ui/src/components/Crontab/month.vue

@@ -53,35 +53,35 @@ export default {
53 53
 		radioChange() {
54 54
 			switch (this.radioValue) {
55 55
 				case 1:
56
-					this.$emit('update', 'month', '*');
57
-					break;
56
+					this.$emit('update', 'month', '*')
57
+					break
58 58
 				case 2:
59
-					this.$emit('update', 'month', this.cycleTotal);
60
-					break;
59
+					this.$emit('update', 'month', this.cycleTotal)
60
+					break
61 61
 				case 3:
62
-					this.$emit('update', 'month', this.averageTotal);
63
-					break;
62
+					this.$emit('update', 'month', this.averageTotal)
63
+					break
64 64
 				case 4:
65
-					this.$emit('update', 'month', this.checkboxString);
66
-					break;
65
+					this.$emit('update', 'month', this.checkboxString)
66
+					break
67 67
 			}
68 68
 		},
69 69
 		// 周期两个值变化时
70 70
 		cycleChange() {
71 71
 			if (this.radioValue == '2') {
72
-				this.$emit('update', 'month', this.cycleTotal);
72
+				this.$emit('update', 'month', this.cycleTotal)
73 73
 			}
74 74
 		},
75 75
 		// 平均两个值变化时
76 76
 		averageChange() {
77 77
 			if (this.radioValue == '3') {
78
-				this.$emit('update', 'month', this.averageTotal);
78
+				this.$emit('update', 'month', this.averageTotal)
79 79
 			}
80 80
 		},
81 81
 		// checkbox值变化时
82 82
 		checkboxChange() {
83 83
 			if (this.radioValue == '4') {
84
-				this.$emit('update', 'month', this.checkboxString);
84
+				this.$emit('update', 'month', this.checkboxString)
85 85
 			}
86 86
 		}
87 87
 	},
@@ -96,18 +96,18 @@ export default {
96 96
 		cycleTotal: function () {
97 97
 			const cycle01 = this.checkNum(this.cycle01, 1, 11)
98 98
 			const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 2, 12)
99
-			return cycle01 + '-' + cycle02;
99
+			return cycle01 + '-' + cycle02
100 100
 		},
101 101
 		// 计算平均用到的值
102 102
 		averageTotal: function () {
103 103
 			const average01 = this.checkNum(this.average01, 1, 11)
104 104
 			const average02 = this.checkNum(this.average02, 1, 12 - average01 || 0)
105
-			return average01 + '/' + average02;
105
+			return average01 + '/' + average02
106 106
 		},
107 107
 		// 计算勾选的checkbox值合集
108 108
 		checkboxString: function () {
109
-			let str = this.checkboxList.join();
110
-			return str == '' ? '*' : str;
109
+			let str = this.checkboxList.join()
110
+			return str == '' ? '*' : str
111 111
 		}
112 112
 	}
113 113
 }

+ 188 - 189
ruoyi-ui/src/components/Crontab/result.vue

@@ -27,135 +27,135 @@ export default {
27 27
 		expressionChange() {
28 28
 
29 29
 			// 计算开始-隐藏结果
30
-			this.isShow = false;
30
+			this.isShow = false
31 31
 			// 获取规则数组[0秒、1分、2时、3日、4月、5星期、6年]
32
-			let ruleArr = this.$options.propsData.ex.split(' ');
32
+			let ruleArr = this.$options.propsData.ex.split(' ')
33 33
 			// 用于记录进入循环的次数
34
-			let nums = 0;
34
+			let nums = 0
35 35
 			// 用于暂时存符号时间规则结果的数组
36
-			let resultArr = [];
36
+			let resultArr = []
37 37
 			// 获取当前时间精确至[年、月、日、时、分、秒]
38
-			let nTime = new Date();
39
-			let nYear = nTime.getFullYear();
40
-			let nMonth = nTime.getMonth() + 1;
41
-			let nDay = nTime.getDate();
42
-			let nHour = nTime.getHours();
43
-			let nMin = nTime.getMinutes();
44
-			let nSecond = nTime.getSeconds();
38
+			let nTime = new Date()
39
+			let nYear = nTime.getFullYear()
40
+			let nMonth = nTime.getMonth() + 1
41
+			let nDay = nTime.getDate()
42
+			let nHour = nTime.getHours()
43
+			let nMin = nTime.getMinutes()
44
+			let nSecond = nTime.getSeconds()
45 45
 			// 根据规则获取到近100年可能年数组、月数组等等
46
-			this.getSecondArr(ruleArr[0]);
47
-			this.getMinArr(ruleArr[1]);
48
-			this.getHourArr(ruleArr[2]);
49
-			this.getDayArr(ruleArr[3]);
50
-			this.getMonthArr(ruleArr[4]);
51
-			this.getWeekArr(ruleArr[5]);
52
-			this.getYearArr(ruleArr[6], nYear);
46
+			this.getSecondArr(ruleArr[0])
47
+			this.getMinArr(ruleArr[1])
48
+			this.getHourArr(ruleArr[2])
49
+			this.getDayArr(ruleArr[3])
50
+			this.getMonthArr(ruleArr[4])
51
+			this.getWeekArr(ruleArr[5])
52
+			this.getYearArr(ruleArr[6], nYear)
53 53
 			// 将获取到的数组赋值-方便使用
54
-			let sDate = this.dateArr[0];
55
-			let mDate = this.dateArr[1];
56
-			let hDate = this.dateArr[2];
57
-			let DDate = this.dateArr[3];
58
-			let MDate = this.dateArr[4];
59
-			let YDate = this.dateArr[5];
54
+			let sDate = this.dateArr[0]
55
+			let mDate = this.dateArr[1]
56
+			let hDate = this.dateArr[2]
57
+			let DDate = this.dateArr[3]
58
+			let MDate = this.dateArr[4]
59
+			let YDate = this.dateArr[5]
60 60
 			// 获取当前时间在数组中的索引
61
-			let sIdx = this.getIndex(sDate, nSecond);
62
-			let mIdx = this.getIndex(mDate, nMin);
63
-			let hIdx = this.getIndex(hDate, nHour);
64
-			let DIdx = this.getIndex(DDate, nDay);
65
-			let MIdx = this.getIndex(MDate, nMonth);
66
-			let YIdx = this.getIndex(YDate, nYear);
61
+			let sIdx = this.getIndex(sDate, nSecond)
62
+			let mIdx = this.getIndex(mDate, nMin)
63
+			let hIdx = this.getIndex(hDate, nHour)
64
+			let DIdx = this.getIndex(DDate, nDay)
65
+			let MIdx = this.getIndex(MDate, nMonth)
66
+			let YIdx = this.getIndex(YDate, nYear)
67 67
 			// 重置月日时分秒的函数(后面用的比较多)
68 68
 			const resetSecond = function () {
69
-				sIdx = 0;
69
+				sIdx = 0
70 70
 				nSecond = sDate[sIdx]
71 71
 			}
72 72
 			const resetMin = function () {
73
-				mIdx = 0;
73
+				mIdx = 0
74 74
 				nMin = mDate[mIdx]
75
-				resetSecond();
75
+				resetSecond()
76 76
 			}
77 77
 			const resetHour = function () {
78
-				hIdx = 0;
78
+				hIdx = 0
79 79
 				nHour = hDate[hIdx]
80
-				resetMin();
80
+				resetMin()
81 81
 			}
82 82
 			const resetDay = function () {
83
-				DIdx = 0;
83
+				DIdx = 0
84 84
 				nDay = DDate[DIdx]
85
-				resetHour();
85
+				resetHour()
86 86
 			}
87 87
 			const resetMonth = function () {
88
-				MIdx = 0;
88
+				MIdx = 0
89 89
 				nMonth = MDate[MIdx]
90
-				resetDay();
90
+				resetDay()
91 91
 			}
92 92
 			// 如果当前年份不为数组中当前值
93 93
 			if (nYear !== YDate[YIdx]) {
94
-				resetMonth();
94
+				resetMonth()
95 95
 			}
96 96
 			// 如果当前月份不为数组中当前值
97 97
 			if (nMonth !== MDate[MIdx]) {
98
-				resetDay();
98
+				resetDay()
99 99
 			}
100 100
 			// 如果当前“日”不为数组中当前值
101 101
 			if (nDay !== DDate[DIdx]) {
102
-				resetHour();
102
+				resetHour()
103 103
 			}
104 104
 			// 如果当前“时”不为数组中当前值
105 105
 			if (nHour !== hDate[hIdx]) {
106
-				resetMin();
106
+				resetMin()
107 107
 			}
108 108
 			// 如果当前“分”不为数组中当前值
109 109
 			if (nMin !== mDate[mIdx]) {
110
-				resetSecond();
110
+				resetSecond()
111 111
 			}
112 112
 
113 113
 			// 循环年份数组
114 114
 			goYear: for (let Yi = YIdx; Yi < YDate.length; Yi++) {
115
-				let YY = YDate[Yi];
115
+				let YY = YDate[Yi]
116 116
 				// 如果到达最大值时
117 117
 				if (nMonth > MDate[MDate.length - 1]) {
118
-					resetMonth();
119
-					continue;
118
+					resetMonth()
119
+					continue
120 120
 				}
121 121
 				// 循环月份数组
122 122
 				goMonth: for (let Mi = MIdx; Mi < MDate.length; Mi++) {
123 123
 					// 赋值、方便后面运算
124 124
 					let MM = MDate[Mi];
125
-					MM = MM < 10 ? '0' + MM : MM;
125
+					MM = MM < 10 ? '0' + MM : MM
126 126
 					// 如果到达最大值时
127 127
 					if (nDay > DDate[DDate.length - 1]) {
128
-						resetDay();
128
+						resetDay()
129 129
 						if (Mi == MDate.length - 1) {
130
-							resetMonth();
131
-							continue goYear;
130
+							resetMonth()
131
+							continue goYear
132 132
 						}
133
-						continue;
133
+						continue
134 134
 					}
135 135
 					// 循环日期数组
136 136
 					goDay: for (let Di = DIdx; Di < DDate.length; Di++) {
137 137
 						// 赋值、方便后面运算
138
-						let DD = DDate[Di];
139
-						let thisDD = DD < 10 ? '0' + DD : DD;
138
+						let DD = DDate[Di]
139
+						let thisDD = DD < 10 ? '0' + DD : DD
140 140
 
141 141
 						// 如果到达最大值时
142 142
 						if (nHour > hDate[hDate.length - 1]) {
143
-							resetHour();
143
+							resetHour()
144 144
 							if (Di == DDate.length - 1) {
145
-								resetDay();
145
+								resetDay()
146 146
 								if (Mi == MDate.length - 1) {
147
-									resetMonth();
148
-									continue goYear;
147
+									resetMonth()
148
+									continue goYear
149 149
 								}
150
-								continue goMonth;
150
+								continue goMonth
151 151
 							}
152
-							continue;
152
+							continue
153 153
 						}
154 154
 
155 155
 						// 判断日期的合法性,不合法的话也是跳出当前循环
156 156
 						if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') {
157
-							resetDay();
158
-							continue goMonth;
157
+							resetDay()
158
+							continue goMonth
159 159
 						}
160 160
 						// 如果日期规则中有值时
161 161
 						if (this.dayRule == 'lastDay') {
@@ -163,84 +163,83 @@ export default {
163 163
 
164 164
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
165 165
 								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
166
-									DD--;
167
-
168
-									thisDD = DD < 10 ? '0' + DD : DD;
166
+									DD--
167
+									thisDD = DD < 10 ? '0' + DD : DD
169 168
 								}
170 169
 							}
171 170
 						} else if (this.dayRule == 'workDay') {
172 171
 							// 校验并调整如果是2月30号这种日期传进来时需调整至正常月底
173 172
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
174 173
 								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
175
-									DD--;
176
-									thisDD = DD < 10 ? '0' + DD : DD;
174
+									DD--
175
+									thisDD = DD < 10 ? '0' + DD : DD
177 176
 								}
178 177
 							}
179 178
 							// 获取达到条件的日期是星期X
180
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
179
+							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week')
181 180
 							// 当星期日时
182 181
 							if (thisWeek == 1) {
183 182
 								// 先找下一个日,并判断是否为月底
184
-								DD++;
185
-								thisDD = DD < 10 ? '0' + DD : DD;
183
+								DD++
184
+								thisDD = DD < 10 ? '0' + DD : DD
186 185
 								// 判断下一日已经不是合法日期
187 186
 								if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
188
-									DD -= 3;
187
+									DD -= 3
189 188
 								}
190 189
 							} else if (thisWeek == 7) {
191 190
 								// 当星期6时只需判断不是1号就可进行操作
192 191
 								if (this.dayRuleSup !== 1) {
193
-									DD--;
192
+									DD--
194 193
 								} else {
195
-									DD += 2;
194
+									DD += 2
196 195
 								}
197 196
 							}
198 197
 						} else if (this.dayRule == 'weekDay') {
199 198
 							// 如果指定了是星期几
200 199
 							// 获取当前日期是属于星期几
201
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
200
+							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week')
202 201
 							// 校验当前星期是否在星期池(dayRuleSup)中
203 202
 							if (this.dayRuleSup.indexOf(thisWeek) < 0) {
204 203
 								// 如果到达最大值时
205 204
 								if (Di == DDate.length - 1) {
206
-									resetDay();
205
+									resetDay()
207 206
 									if (Mi == MDate.length - 1) {
208
-										resetMonth();
209
-										continue goYear;
207
+										resetMonth()
208
+										continue goYear
210 209
 									}
211
-									continue goMonth;
210
+									continue goMonth
212 211
 								}
213
-								continue;
212
+								continue
214 213
 							}
215 214
 						} else if (this.dayRule == 'assWeek') {
216 215
 							// 如果指定了是第几周的星期几
217 216
 							// 获取每月1号是属于星期几
218
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
217
+							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week')
219 218
 							if (this.dayRuleSup[1] >= thisWeek) {
220
-								DD = (this.dayRuleSup[0] - 1) * 7 + this.dayRuleSup[1] - thisWeek + 1;
219
+								DD = (this.dayRuleSup[0] - 1) * 7 + this.dayRuleSup[1] - thisWeek + 1
221 220
 							} else {
222
-								DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1;
221
+								DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1
223 222
 							}
224 223
 						} else if (this.dayRule == 'lastWeek') {
225 224
 							// 如果指定了每月最后一个星期几
226 225
 							// 校验并调整如果是2月30号这种日期传进来时需调整至正常月底
227 226
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
228 227
 								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
229
-									DD--;
230
-									thisDD = DD < 10 ? '0' + DD : DD;
228
+									DD--
229
+									thisDD = DD < 10 ? '0' + DD : DD
231 230
 								}
232 231
 							}
233 232
 							// 获取月末最后一天是星期几
234
-							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
233
+							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week')
235 234
 							// 找到要求中最近的那个星期几
236 235
 							if (this.dayRuleSup < thisWeek) {
237
-								DD -= thisWeek - this.dayRuleSup;
236
+								DD -= thisWeek - this.dayRuleSup
238 237
 							} else if (this.dayRuleSup > thisWeek) {
239 238
 								DD -= 7 - (this.dayRuleSup - thisWeek)
240 239
 							}
241 240
 						}
242 241
 						// 判断时间值是否小于10置换成“05”这种格式
243
-						DD = DD < 10 ? '0' + DD : DD;
242
+						DD = DD < 10 ? '0' + DD : DD
244 243
 
245 244
 						// 循环“时”数组
246 245
 						goHour: for (let hi = hIdx; hi < hDate.length; hi++) {
@@ -248,76 +247,76 @@ export default {
248 247
 
249 248
 							// 如果到达最大值时
250 249
 							if (nMin > mDate[mDate.length - 1]) {
251
-								resetMin();
250
+								resetMin()
252 251
 								if (hi == hDate.length - 1) {
253
-									resetHour();
252
+									resetHour()
254 253
 									if (Di == DDate.length - 1) {
255
-										resetDay();
254
+										resetDay()
256 255
 										if (Mi == MDate.length - 1) {
257
-											resetMonth();
258
-											continue goYear;
256
+											resetMonth()
257
+											continue goYear
259 258
 										}
260
-										continue goMonth;
259
+										continue goMonth
261 260
 									}
262
-									continue goDay;
261
+									continue goDay
263 262
 								}
264
-								continue;
263
+								continue
265 264
 							}
266 265
 							// 循环"分"数组
267 266
 							goMin: for (let mi = mIdx; mi < mDate.length; mi++) {
268
-								let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi];
267
+								let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi]
269 268
 
270 269
 								// 如果到达最大值时
271 270
 								if (nSecond > sDate[sDate.length - 1]) {
272
-									resetSecond();
271
+									resetSecond()
273 272
 									if (mi == mDate.length - 1) {
274
-										resetMin();
273
+										resetMin()
275 274
 										if (hi == hDate.length - 1) {
276
-											resetHour();
275
+											resetHour()
277 276
 											if (Di == DDate.length - 1) {
278
-												resetDay();
277
+												resetDay()
279 278
 												if (Mi == MDate.length - 1) {
280
-													resetMonth();
281
-													continue goYear;
279
+													resetMonth()
280
+													continue goYear
282 281
 												}
283
-												continue goMonth;
282
+												continue goMonth
284 283
 											}
285
-											continue goDay;
284
+											continue goDay
286 285
 										}
287
-										continue goHour;
286
+										continue goHour
288 287
 									}
289
-									continue;
288
+									continue
290 289
 								}
291 290
 								// 循环"秒"数组
292 291
 								goSecond: for (let si = sIdx; si <= sDate.length - 1; si++) {
293
-									let ss = sDate[si] < 10 ? '0' + sDate[si] : sDate[si];
292
+									let ss = sDate[si] < 10 ? '0' + sDate[si] : sDate[si]
294 293
 									// 添加当前时间(时间合法性在日期循环时已经判断)
295 294
 									if (MM !== '00' && DD !== '00') {
296 295
 										resultArr.push(YY + '-' + MM + '-' + DD + ' ' + hh + ':' + mm + ':' + ss)
297
-										nums++;
296
+										nums++
298 297
 									}
299 298
 									// 如果条数满了就退出循环
300
-									if (nums == 5) break goYear;
299
+									if (nums == 5) break goYear
301 300
 									// 如果到达最大值时
302 301
 									if (si == sDate.length - 1) {
303
-										resetSecond();
302
+										resetSecond()
304 303
 										if (mi == mDate.length - 1) {
305
-											resetMin();
304
+											resetMin()
306 305
 											if (hi == hDate.length - 1) {
307
-												resetHour();
306
+												resetHour()
308 307
 												if (Di == DDate.length - 1) {
309
-													resetDay();
308
+													resetDay()
310 309
 													if (Mi == MDate.length - 1) {
311
-														resetMonth();
312
-														continue goYear;
310
+														resetMonth()
311
+														continue goYear
313 312
 													}
314
-													continue goMonth;
313
+													continue goMonth
315 314
 												}
316
-												continue goDay;
315
+												continue goDay
317 316
 											}
318
-											continue goHour;
317
+											continue goHour
319 318
 										}
320
-										continue goMin;
319
+										continue goMin
321 320
 									}
322 321
 								} //goSecond
323 322
 							} //goMin
@@ -327,33 +326,33 @@ export default {
327 326
 			}
328 327
 			// 判断100年内的结果条数
329 328
 			if (resultArr.length == 0) {
330
-				this.resultList = ['没有达到条件的结果!'];
329
+				this.resultList = ['没有达到条件的结果!']
331 330
 			} else {
332
-				this.resultList = resultArr;
331
+				this.resultList = resultArr
333 332
 				if (resultArr.length !== 5) {
334 333
 					this.resultList.push('最近100年内只有上面' + resultArr.length + '条结果!')
335 334
 				}
336 335
 			}
337 336
 			// 计算完成-显示结果
338
-			this.isShow = true;
337
+			this.isShow = true
339 338
 
340 339
 
341 340
 		},
342 341
 		// 用于计算某位数字在数组中的索引
343 342
 		getIndex(arr, value) {
344 343
 			if (value <= arr[0] || value > arr[arr.length - 1]) {
345
-				return 0;
344
+				return 0
346 345
 			} else {
347 346
 				for (let i = 0; i < arr.length - 1; i++) {
348 347
 					if (value > arr[i] && value <= arr[i + 1]) {
349
-						return i + 1;
348
+						return i + 1
350 349
 					}
351 350
 				}
352 351
 			}
353 352
 		},
354 353
 		// 获取"年"数组
355 354
 		getYearArr(rule, year) {
356
-			this.dateArr[5] = this.getOrderArr(year, year + 100);
355
+			this.dateArr[5] = this.getOrderArr(year, year + 100)
357 356
 			if (rule !== undefined) {
358 357
 				if (rule.indexOf('-') >= 0) {
359 358
 					this.dateArr[5] = this.getCycleArr(rule, year + 100, false)
@@ -366,7 +365,7 @@ export default {
366 365
 		},
367 366
 		// 获取"月"数组
368 367
 		getMonthArr(rule) {
369
-			this.dateArr[4] = this.getOrderArr(1, 12);
368
+			this.dateArr[4] = this.getOrderArr(1, 12)
370 369
 			if (rule.indexOf('-') >= 0) {
371 370
 				this.dateArr[4] = this.getCycleArr(rule, 12, false)
372 371
 			} else if (rule.indexOf('/') >= 0) {
@@ -380,58 +379,58 @@ export default {
380 379
 			// 只有当日期规则的两个值均为“”时则表达日期是有选项的
381 380
 			if (this.dayRule == '' && this.dayRuleSup == '') {
382 381
 				if (rule.indexOf('-') >= 0) {
383
-					this.dayRule = 'weekDay';
382
+					this.dayRule = 'weekDay'
384 383
 					this.dayRuleSup = this.getCycleArr(rule, 7, false)
385 384
 				} else if (rule.indexOf('#') >= 0) {
386
-					this.dayRule = 'assWeek';
387
-					let matchRule = rule.match(/[0-9]{1}/g);
388
-					this.dayRuleSup = [Number(matchRule[1]), Number(matchRule[0])];
389
-					this.dateArr[3] = [1];
385
+					this.dayRule = 'assWeek'
386
+					let matchRule = rule.match(/[0-9]{1}/g)
387
+					this.dayRuleSup = [Number(matchRule[1]), Number(matchRule[0])]
388
+					this.dateArr[3] = [1]
390 389
 					if (this.dayRuleSup[1] == 7) {
391
-						this.dayRuleSup[1] = 0;
390
+						this.dayRuleSup[1] = 0
392 391
 					}
393 392
 				} else if (rule.indexOf('L') >= 0) {
394
-					this.dayRule = 'lastWeek';
395
-					this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]);
396
-					this.dateArr[3] = [31];
393
+					this.dayRule = 'lastWeek'
394
+					this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0])
395
+					this.dateArr[3] = [31]
397 396
 					if (this.dayRuleSup == 7) {
398
-						this.dayRuleSup = 0;
397
+						this.dayRuleSup = 0
399 398
 					}
400 399
 				} else if (rule !== '*' && rule !== '?') {
401
-					this.dayRule = 'weekDay';
400
+					this.dayRule = 'weekDay'
402 401
 					this.dayRuleSup = this.getAssignArr(rule)
403 402
 				}
404 403
 			}
405 404
 		},
406 405
 		// 获取"日"数组-少量为日期规则
407 406
 		getDayArr(rule) {
408
-			this.dateArr[3] = this.getOrderArr(1, 31);
409
-			this.dayRule = '';
410
-			this.dayRuleSup = '';
407
+			this.dateArr[3] = this.getOrderArr(1, 31)
408
+			this.dayRule = ''
409
+			this.dayRuleSup = ''
411 410
 			if (rule.indexOf('-') >= 0) {
412 411
 				this.dateArr[3] = this.getCycleArr(rule, 31, false)
413
-				this.dayRuleSup = 'null';
412
+				this.dayRuleSup = 'null'
414 413
 			} else if (rule.indexOf('/') >= 0) {
415 414
 				this.dateArr[3] = this.getAverageArr(rule, 31)
416
-				this.dayRuleSup = 'null';
415
+				this.dayRuleSup = 'null'
417 416
 			} else if (rule.indexOf('W') >= 0) {
418
-				this.dayRule = 'workDay';
419
-				this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]);
420
-				this.dateArr[3] = [this.dayRuleSup];
417
+				this.dayRule = 'workDay'
418
+				this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0])
419
+				this.dateArr[3] = [this.dayRuleSup]
421 420
 			} else if (rule.indexOf('L') >= 0) {
422
-				this.dayRule = 'lastDay';
423
-				this.dayRuleSup = 'null';
424
-				this.dateArr[3] = [31];
421
+				this.dayRule = 'lastDay'
422
+				this.dayRuleSup = 'null'
423
+				this.dateArr[3] = [31]
425 424
 			} else if (rule !== '*' && rule !== '?') {
426 425
 				this.dateArr[3] = this.getAssignArr(rule)
427
-				this.dayRuleSup = 'null';
426
+				this.dayRuleSup = 'null'
428 427
 			} else if (rule == '*') {
429
-				this.dayRuleSup = 'null';
428
+				this.dayRuleSup = 'null'
430 429
 			}
431 430
 		},
432 431
 		// 获取"时"数组
433 432
 		getHourArr(rule) {
434
-			this.dateArr[2] = this.getOrderArr(0, 23);
433
+			this.dateArr[2] = this.getOrderArr(0, 23)
435 434
 			if (rule.indexOf('-') >= 0) {
436 435
 				this.dateArr[2] = this.getCycleArr(rule, 24, true)
437 436
 			} else if (rule.indexOf('/') >= 0) {
@@ -442,7 +441,7 @@ export default {
442 441
 		},
443 442
 		// 获取"分"数组
444 443
 		getMinArr(rule) {
445
-			this.dateArr[1] = this.getOrderArr(0, 59);
444
+			this.dateArr[1] = this.getOrderArr(0, 59)
446 445
 			if (rule.indexOf('-') >= 0) {
447 446
 				this.dateArr[1] = this.getCycleArr(rule, 60, true)
448 447
 			} else if (rule.indexOf('/') >= 0) {
@@ -453,7 +452,7 @@ export default {
453 452
 		},
454 453
 		// 获取"秒"数组
455 454
 		getSecondArr(rule) {
456
-			this.dateArr[0] = this.getOrderArr(0, 59);
455
+			this.dateArr[0] = this.getOrderArr(0, 59)
457 456
 			if (rule.indexOf('-') >= 0) {
458 457
 				this.dateArr[0] = this.getCycleArr(rule, 60, true)
459 458
 			} else if (rule.indexOf('/') >= 0) {
@@ -464,86 +463,86 @@ export default {
464 463
 		},
465 464
 		// 根据传进来的min-max返回一个顺序的数组
466 465
 		getOrderArr(min, max) {
467
-			let arr = [];
466
+			let arr = []
468 467
 			for (let i = min; i <= max; i++) {
469
-				arr.push(i);
468
+				arr.push(i)
470 469
 			}
471
-			return arr;
470
+			return arr
472 471
 		},
473 472
 		// 根据规则中指定的零散值返回一个数组
474 473
 		getAssignArr(rule) {
475
-			let arr = [];
476
-			let assiginArr = rule.split(',');
474
+			let arr = []
475
+			let assiginArr = rule.split(',')
477 476
 			for (let i = 0; i < assiginArr.length; i++) {
478 477
 				arr[i] = Number(assiginArr[i])
479 478
 			}
480 479
 			arr.sort(this.compare)
481
-			return arr;
480
+			return arr
482 481
 		},
483 482
 		// 根据一定算术规则计算返回一个数组
484 483
 		getAverageArr(rule, limit) {
485
-			let arr = [];
486
-			let agArr = rule.split('/');
487
-			let min = Number(agArr[0]);
488
-			let step = Number(agArr[1]);
484
+			let arr = []
485
+			let agArr = rule.split('/')
486
+			let min = Number(agArr[0])
487
+			let step = Number(agArr[1])
489 488
 			while (min <= limit) {
490
-				arr.push(min);
491
-				min += step;
489
+				arr.push(min)
490
+				min += step
492 491
 			}
493
-			return arr;
492
+			return arr
494 493
 		},
495 494
 		// 根据规则返回一个具有周期性的数组
496 495
 		getCycleArr(rule, limit, status) {
497 496
 			// status--表示是否从0开始(则从1开始)
498
-			let arr = [];
499
-			let cycleArr = rule.split('-');
500
-			let min = Number(cycleArr[0]);
501
-			let max = Number(cycleArr[1]);
497
+			let arr = []
498
+			let cycleArr = rule.split('-')
499
+			let min = Number(cycleArr[0])
500
+			let max = Number(cycleArr[1])
502 501
 			if (min > max) {
503
-				max += limit;
502
+				max += limit
504 503
 			}
505 504
 			for (let i = min; i <= max; i++) {
506
-				let add = 0;
505
+				let add = 0
507 506
 				if (status == false && i % limit == 0) {
508
-					add = limit;
507
+					add = limit
509 508
 				}
510 509
 				arr.push(Math.round(i % limit + add))
511 510
 			}
512 511
 			arr.sort(this.compare)
513
-			return arr;
512
+			return arr
514 513
 		},
515 514
 		// 比较数字大小(用于Array.sort)
516 515
 		compare(value1, value2) {
517 516
 			if (value2 - value1 > 0) {
518
-				return -1;
517
+				return -1
519 518
 			} else {
520
-				return 1;
519
+				return 1
521 520
 			}
522 521
 		},
523 522
 		// 格式化日期格式如:2017-9-19 18:04:33
524 523
 		formatDate(value, type) {
525 524
 			// 计算日期相关值
526
-			let time = typeof value == 'number' ? new Date(value) : value;
527
-			let Y = time.getFullYear();
528
-			let M = time.getMonth() + 1;
529
-			let D = time.getDate();
530
-			let h = time.getHours();
531
-			let m = time.getMinutes();
532
-			let s = time.getSeconds();
533
-			let week = time.getDay();
525
+			let time = typeof value == 'number' ? new Date(value) : value
526
+			let Y = time.getFullYear()
527
+			let M = time.getMonth() + 1
528
+			let D = time.getDate()
529
+			let h = time.getHours()
530
+			let m = time.getMinutes()
531
+			let s = time.getSeconds()
532
+			let week = time.getDay()
534 533
 			// 如果传递了type的话
535 534
 			if (type == undefined) {
536
-				return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s);
535
+				return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s)
537 536
 			} else if (type == 'week') {
538 537
 				// 在quartz中 1为星期日
539
-				return week + 1;
538
+				return week + 1
540 539
 			}
541 540
 		},
542 541
 		// 检查日期是否存在
543 542
 		checkDate(value) {
544
-			let time = new Date(value);
543
+			let time = new Date(value)
545 544
 			let format = this.formatDate(time)
546
-			return value === format;
545
+			return value === format
547 546
 		}
548 547
 	},
549 548
 	watch: {
@@ -552,7 +551,7 @@ export default {
552 551
 	props: ['ex'],
553 552
 	mounted: function () {
554 553
 		// 初始化 获取一次结果
555
-		this.expressionChange();
554
+		this.expressionChange()
556 555
 	}
557 556
 }
558 557
 

+ 15 - 15
ruoyi-ui/src/components/Crontab/second.vue

@@ -53,35 +53,35 @@ export default {
53 53
 		radioChange() {
54 54
 			switch (this.radioValue) {
55 55
 				case 1:
56
-					this.$emit('update', 'second', '*', 'second');
57
-					break;
56
+					this.$emit('update', 'second', '*', 'second')
57
+					break
58 58
 				case 2:
59
-					this.$emit('update', 'second', this.cycleTotal);
60
-					break;
59
+					this.$emit('update', 'second', this.cycleTotal)
60
+					break
61 61
 				case 3:
62
-					this.$emit('update', 'second', this.averageTotal);
63
-					break;
62
+					this.$emit('update', 'second', this.averageTotal)
63
+					break
64 64
 				case 4:
65
-					this.$emit('update', 'second', this.checkboxString);
66
-					break;
65
+					this.$emit('update', 'second', this.checkboxString)
66
+					break
67 67
 			}
68 68
 		},
69 69
 		// 周期两个值变化时
70 70
 		cycleChange() {
71 71
 			if (this.radioValue == '2') {
72
-				this.$emit('update', 'second', this.cycleTotal);
72
+				this.$emit('update', 'second', this.cycleTotal)
73 73
 			}
74 74
 		},
75 75
 		// 平均两个值变化时
76 76
 		averageChange() {
77 77
 			if (this.radioValue == '3') {
78
-				this.$emit('update', 'second', this.averageTotal);
78
+				this.$emit('update', 'second', this.averageTotal)
79 79
 			}
80 80
 		},
81 81
 		// checkbox值变化时
82 82
 		checkboxChange() {
83 83
 			if (this.radioValue == '4') {
84
-				this.$emit('update', 'second', this.checkboxString);
84
+				this.$emit('update', 'second', this.checkboxString)
85 85
 			}
86 86
 		}
87 87
 	},
@@ -99,18 +99,18 @@ export default {
99 99
 		cycleTotal: function () {
100 100
 			const cycle01 = this.checkNum(this.cycle01, 0, 58)
101 101
 			const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 59)
102
-			return cycle01 + '-' + cycle02;
102
+			return cycle01 + '-' + cycle02
103 103
 		},
104 104
 		// 计算平均用到的值
105 105
 		averageTotal: function () {
106 106
 			const average01 = this.checkNum(this.average01, 0, 58)
107 107
 			const average02 = this.checkNum(this.average02, 1, 59 - average01 || 0)
108
-			return average01 + '/' + average02;
108
+			return average01 + '/' + average02
109 109
 		},
110 110
 		// 计算勾选的checkbox值合集
111 111
 		checkboxString: function () {
112
-			let str = this.checkboxList.join();
113
-			return str == '' ? '*' : str;
112
+			let str = this.checkboxList.join()
113
+			return str == '' ? '*' : str
114 114
 		}
115 115
 	}
116 116
 }

+ 22 - 22
ruoyi-ui/src/components/Crontab/week.vue

@@ -118,52 +118,52 @@ export default {
118 118
 		// 单选按钮值变化时
119 119
 		radioChange() {
120 120
 			if (this.radioValue !== 2 && this.cron.day !== '?') {
121
-				this.$emit('update', 'day', '?', 'week');
121
+				this.$emit('update', 'day', '?', 'week')
122 122
 			}
123 123
 			switch (this.radioValue) {
124 124
 				case 1:
125
-					this.$emit('update', 'week', '*');
126
-					break;
125
+					this.$emit('update', 'week', '*')
126
+					break
127 127
 				case 2:
128
-					this.$emit('update', 'week', '?');
129
-					break;
128
+					this.$emit('update', 'week', '?')
129
+					break
130 130
 				case 3:
131
-					this.$emit('update', 'week', this.cycleTotal);
132
-					break;
131
+					this.$emit('update', 'week', this.cycleTotal)
132
+					break
133 133
 				case 4:
134
-					this.$emit('update', 'week', this.averageTotal);
135
-					break;
134
+					this.$emit('update', 'week', this.averageTotal)
135
+					break
136 136
 				case 5:
137
-					this.$emit('update', 'week', this.weekdayCheck + 'L');
138
-					break;
137
+					this.$emit('update', 'week', this.weekdayCheck + 'L')
138
+					break
139 139
 				case 6:
140
-					this.$emit('update', 'week', this.checkboxString);
141
-					break;
140
+					this.$emit('update', 'week', this.checkboxString)
141
+					break
142 142
 			}
143 143
 		},
144 144
 
145 145
 		// 周期两个值变化时
146 146
 		cycleChange() {
147 147
 			if (this.radioValue == '3') {
148
-				this.$emit('update', 'week', this.cycleTotal);
148
+				this.$emit('update', 'week', this.cycleTotal)
149 149
 			}
150 150
 		},
151 151
 		// 平均两个值变化时
152 152
 		averageChange() {
153 153
 			if (this.radioValue == '4') {
154
-				this.$emit('update', 'week', this.averageTotal);
154
+				this.$emit('update', 'week', this.averageTotal)
155 155
 			}
156 156
 		},
157 157
 		// 最近工作日值变化时
158 158
 		weekdayChange() {
159 159
 			if (this.radioValue == '5') {
160
-				this.$emit('update', 'week', this.weekday + 'L');
160
+				this.$emit('update', 'week', this.weekday + 'L')
161 161
 			}
162 162
 		},
163 163
 		// checkbox值变化时
164 164
 		checkboxChange() {
165 165
 			if (this.radioValue == '6') {
166
-				this.$emit('update', 'week', this.checkboxString);
166
+				this.$emit('update', 'week', this.checkboxString)
167 167
 			}
168 168
 		},
169 169
 	},
@@ -179,23 +179,23 @@ export default {
179 179
 		cycleTotal: function () {
180 180
 			this.cycle01 = this.checkNum(this.cycle01, 1, 7)
181 181
 			this.cycle02 = this.checkNum(this.cycle02, 1, 7)
182
-			return this.cycle01 + '-' + this.cycle02;
182
+			return this.cycle01 + '-' + this.cycle02
183 183
 		},
184 184
 		// 计算平均用到的值
185 185
 		averageTotal: function () {
186 186
 			this.average01 = this.checkNum(this.average01, 1, 4)
187 187
 			this.average02 = this.checkNum(this.average02, 1, 7)
188
-			return this.average02 + '#' + this.average01;
188
+			return this.average02 + '#' + this.average01
189 189
 		},
190 190
 		// 最近的工作日(格式)
191 191
 		weekdayCheck: function () {
192 192
 			this.weekday = this.checkNum(this.weekday, 1, 7)
193
-			return this.weekday;
193
+			return this.weekday
194 194
 		},
195 195
 		// 计算勾选的checkbox值合集
196 196
 		checkboxString: function () {
197
-			let str = this.checkboxList.join();
198
-			return str == '' ? '*' : str;
197
+			let str = this.checkboxList.join()
198
+			return str == '' ? '*' : str
199 199
 		}
200 200
 	}
201 201
 }

+ 18 - 18
ruoyi-ui/src/components/Crontab/year.vue

@@ -61,38 +61,38 @@ export default {
61 61
 		radioChange() {
62 62
 			switch (this.radioValue) {
63 63
 				case 1:
64
-					this.$emit('update', 'year', '');
65
-					break;
64
+					this.$emit('update', 'year', '')
65
+					break
66 66
 				case 2:
67
-					this.$emit('update', 'year', '*');
68
-					break;
67
+					this.$emit('update', 'year', '*')
68
+					break
69 69
 				case 3:
70
-					this.$emit('update', 'year', this.cycleTotal);
71
-					break;
70
+					this.$emit('update', 'year', this.cycleTotal)
71
+					break
72 72
 				case 4:
73
-					this.$emit('update', 'year', this.averageTotal);
74
-					break;
73
+					this.$emit('update', 'year', this.averageTotal)
74
+					break
75 75
 				case 5:
76
-					this.$emit('update', 'year', this.checkboxString);
77
-					break;
76
+					this.$emit('update', 'year', this.checkboxString)
77
+					break
78 78
 			}
79 79
 		},
80 80
 		// 周期两个值变化时
81 81
 		cycleChange() {
82 82
 			if (this.radioValue == '3') {
83
-				this.$emit('update', 'year', this.cycleTotal);
83
+				this.$emit('update', 'year', this.cycleTotal)
84 84
 			}
85 85
 		},
86 86
 		// 平均两个值变化时
87 87
 		averageChange() {
88 88
 			if (this.radioValue == '4') {
89
-				this.$emit('update', 'year', this.averageTotal);
89
+				this.$emit('update', 'year', this.averageTotal)
90 90
 			}
91 91
 		},
92 92
 		// checkbox值变化时
93 93
 		checkboxChange() {
94 94
 			if (this.radioValue == '5') {
95
-				this.$emit('update', 'year', this.checkboxString);
95
+				this.$emit('update', 'year', this.checkboxString)
96 96
 			}
97 97
 		}
98 98
 	},
@@ -107,23 +107,23 @@ export default {
107 107
 		cycleTotal: function () {
108 108
 			const cycle01 = this.checkNum(this.cycle01, this.fullYear, 2098)
109 109
 			const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : this.fullYear + 1, 2099)
110
-			return cycle01 + '-' + cycle02;
110
+			return cycle01 + '-' + cycle02
111 111
 		},
112 112
 		// 计算平均用到的值
113 113
 		averageTotal: function () {
114 114
 			const average01 = this.checkNum(this.average01, this.fullYear, 2098)
115 115
 			const average02 = this.checkNum(this.average02, 1, 2099 - average01 || this.fullYear)
116
-			return average01 + '/' + average02;
116
+			return average01 + '/' + average02
117 117
 		},
118 118
 		// 计算勾选的checkbox值合集
119 119
 		checkboxString: function () {
120
-			let str = this.checkboxList.join();
121
-			return str;
120
+			let str = this.checkboxList.join()
121
+			return str
122 122
 		}
123 123
 	},
124 124
 	mounted: function () {
125 125
 		// 仅获取当前年份
126
-		this.fullYear = Number(new Date().getFullYear());
126
+		this.fullYear = Number(new Date().getFullYear())
127 127
 		this.cycle01 = this.fullYear
128 128
 		this.average01 = this.fullYear
129 129
 	}

+ 3 - 3
ruoyi-ui/src/components/DictTag/index.vue

@@ -74,13 +74,13 @@ export default {
74 74
   },
75 75
   filters: {
76 76
     handleArray(array) {
77
-      if (array.length === 0) return '';
77
+      if (array.length === 0) return ''
78 78
       return array.reduce((pre, cur) => {
79
-        return pre + ' ' + cur;
79
+        return pre + ' ' + cur
80 80
       })
81 81
     },
82 82
   }
83
-};
83
+}
84 84
 </script>
85 85
 <style scoped>
86 86
 .el-tag + .el-tag {

+ 59 - 59
ruoyi-ui/src/components/Editor/index.vue

@@ -18,12 +18,12 @@
18 18
 </template>
19 19
 
20 20
 <script>
21
-import axios from "axios";
22
-import Quill from "quill";
23
-import "quill/dist/quill.core.css";
24
-import "quill/dist/quill.snow.css";
25
-import "quill/dist/quill.bubble.css";
26
-import { getToken } from "@/utils/auth";
21
+import axios from "axios"
22
+import Quill from "quill"
23
+import "quill/dist/quill.core.css"
24
+import "quill/dist/quill.snow.css"
25
+import "quill/dist/quill.bubble.css"
26
+import { getToken } from "@/utils/auth"
27 27
 
28 28
 export default {
29 29
   name: "Editor",
@@ -89,27 +89,27 @@ export default {
89 89
         placeholder: "请输入内容",
90 90
         readOnly: this.readOnly,
91 91
       },
92
-    };
92
+    }
93 93
   },
94 94
   computed: {
95 95
     styles() {
96
-      let style = {};
96
+      let style = {}
97 97
       if (this.minHeight) {
98
-        style.minHeight = `${this.minHeight}px`;
98
+        style.minHeight = `${this.minHeight}px`
99 99
       }
100 100
       if (this.height) {
101
-        style.height = `${this.height}px`;
101
+        style.height = `${this.height}px`
102 102
       }
103
-      return style;
104
-    },
103
+      return style
104
+    }
105 105
   },
106 106
   watch: {
107 107
     value: {
108 108
       handler(val) {
109 109
         if (val !== this.currentValue) {
110
-          this.currentValue = val === null ? "" : val;
110
+          this.currentValue = val === null ? "" : val
111 111
           if (this.Quill) {
112
-            this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue);
112
+            this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue)
113 113
           }
114 114
         }
115 115
       },
@@ -117,102 +117,102 @@ export default {
117 117
     },
118 118
   },
119 119
   mounted() {
120
-    this.init();
120
+    this.init()
121 121
   },
122 122
   beforeDestroy() {
123
-    this.Quill = null;
123
+    this.Quill = null
124 124
   },
125 125
   methods: {
126 126
     init() {
127
-      const editor = this.$refs.editor;
128
-      this.Quill = new Quill(editor, this.options);
127
+      const editor = this.$refs.editor
128
+      this.Quill = new Quill(editor, this.options)
129 129
       // 如果设置了上传地址则自定义图片上传事件
130 130
       if (this.type == 'url') {
131
-        let toolbar = this.Quill.getModule("toolbar");
131
+        let toolbar = this.Quill.getModule("toolbar")
132 132
         toolbar.addHandler("image", (value) => {
133 133
           if (value) {
134
-            this.$refs.upload.$children[0].$refs.input.click();
134
+            this.$refs.upload.$children[0].$refs.input.click()
135 135
           } else {
136
-            this.quill.format("image", false);
136
+            this.quill.format("image", false)
137 137
           }
138
-        });
139
-        this.Quill.root.addEventListener('paste', this.handlePasteCapture, true);
138
+        })
139
+        this.Quill.root.addEventListener('paste', this.handlePasteCapture, true)
140 140
       }
141
-      this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue);
141
+      this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue)
142 142
       this.Quill.on("text-change", (delta, oldDelta, source) => {
143
-        const html = this.$refs.editor.children[0].innerHTML;
144
-        const text = this.Quill.getText();
145
-        const quill = this.Quill;
146
-        this.currentValue = html;
147
-        this.$emit("input", html);
148
-        this.$emit("on-change", { html, text, quill });
149
-      });
143
+        const html = this.$refs.editor.children[0].innerHTML
144
+        const text = this.Quill.getText()
145
+        const quill = this.Quill
146
+        this.currentValue = html
147
+        this.$emit("input", html)
148
+        this.$emit("on-change", { html, text, quill })
149
+      })
150 150
       this.Quill.on("text-change", (delta, oldDelta, source) => {
151
-        this.$emit("on-text-change", delta, oldDelta, source);
152
-      });
151
+        this.$emit("on-text-change", delta, oldDelta, source)
152
+      })
153 153
       this.Quill.on("selection-change", (range, oldRange, source) => {
154
-        this.$emit("on-selection-change", range, oldRange, source);
155
-      });
154
+        this.$emit("on-selection-change", range, oldRange, source)
155
+      })
156 156
       this.Quill.on("editor-change", (eventName, ...args) => {
157
-        this.$emit("on-editor-change", eventName, ...args);
158
-      });
157
+        this.$emit("on-editor-change", eventName, ...args)
158
+      })
159 159
     },
160 160
     // 上传前校检格式和大小
161 161
     handleBeforeUpload(file) {
162
-      const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"];
163
-      const isJPG = type.includes(file.type);
162
+      const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"]
163
+      const isJPG = type.includes(file.type)
164 164
       // 检验文件格式
165 165
       if (!isJPG) {
166
-        this.$message.error(`图片格式错误!`);
167
-        return false;
166
+        this.$message.error(`图片格式错误!`)
167
+        return false
168 168
       }
169 169
       // 校检文件大小
170 170
       if (this.fileSize) {
171
-        const isLt = file.size / 1024 / 1024 < this.fileSize;
171
+        const isLt = file.size / 1024 / 1024 < this.fileSize
172 172
         if (!isLt) {
173
-          this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
174
-          return false;
173
+          this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`)
174
+          return false
175 175
         }
176 176
       }
177
-      return true;
177
+      return true
178 178
     },
179 179
     handleUploadSuccess(res, file) {
180 180
       // 如果上传成功
181 181
       if (res.code == 200) {
182 182
         // 获取富文本组件实例
183
-        let quill = this.Quill;
183
+        let quill = this.Quill
184 184
         // 获取光标所在位置
185
-        let length = quill.getSelection().index;
185
+        let length = quill.getSelection().index
186 186
         // 插入图片  res.url为服务器返回的图片地址
187
-        quill.insertEmbed(length, "image", res.data.url);
187
+        quill.insertEmbed(length, "image", res.data.url)
188 188
         // 调整光标到最后
189
-        quill.setSelection(length + 1);
189
+        quill.setSelection(length + 1)
190 190
       } else {
191
-        this.$message.error("图片插入失败");
191
+        this.$message.error("图片插入失败")
192 192
       }
193 193
     },
194 194
     handleUploadError() {
195
-      this.$message.error("图片插入失败");
195
+      this.$message.error("图片插入失败")
196 196
     },
197 197
     // 复制粘贴图片处理
198 198
     handlePasteCapture(e) {
199
-      const clipboard = e.clipboardData || window.clipboardData;
199
+      const clipboard = e.clipboardData || window.clipboardData
200 200
       if (clipboard && clipboard.items) {
201 201
         for (let i = 0; i < clipboard.items.length; i++) {
202
-          const item = clipboard.items[i];
202
+          const item = clipboard.items[i]
203 203
           if (item.type.indexOf('image') !== -1) {
204
-            e.preventDefault();
205
-            const file = item.getAsFile();
206
-            this.insertImage(file);
204
+            e.preventDefault()
205
+            const file = item.getAsFile()
206
+            this.insertImage(file)
207 207
           }
208 208
         }
209 209
       }
210 210
     },
211 211
     insertImage(file) {
212
-      const formData = new FormData();
213
-      formData.append("file", file);
212
+      const formData = new FormData()
213
+      formData.append("file", file)
214 214
       axios.post(this.uploadUrl, formData, { headers: { "Content-Type": "multipart/form-data", Authorization: this.headers.Authorization } }).then(res => {
215
-        this.handleUploadSuccess(res.data);
215
+        this.handleUploadSuccess(res.data)
216 216
       })
217 217
     }
218 218
   }

+ 48 - 48
ruoyi-ui/src/components/FileUpload/index.vue

@@ -42,7 +42,7 @@
42 42
 </template>
43 43
 
44 44
 <script>
45
-import { getToken } from "@/utils/auth";
45
+import { getToken } from "@/utils/auth"
46 46
 
47 47
 export default {
48 48
   name: "FileUpload",
@@ -93,26 +93,26 @@ export default {
93 93
         Authorization: "Bearer " + getToken(),
94 94
       },
95 95
       fileList: [],
96
-    };
96
+    }
97 97
   },
98 98
   watch: {
99 99
     value: {
100 100
       handler(val) {
101 101
         if (val) {
102
-          let temp = 1;
102
+          let temp = 1
103 103
           // 首先将值转为数组
104
-          const list = Array.isArray(val) ? val : this.value.split(',');
104
+          const list = Array.isArray(val) ? val : this.value.split(',')
105 105
           // 然后将数组转为对象数组
106 106
           this.fileList = list.map(item => {
107 107
             if (typeof item === "string") {
108
-              item = { name: item, url: item };
108
+              item = { name: item, url: item }
109 109
             }
110
-            item.uid = item.uid || new Date().getTime() + temp++;
111
-            return item;
112
-          });
110
+            item.uid = item.uid || new Date().getTime() + temp++
111
+            return item
112
+          })
113 113
         } else {
114
-          this.fileList = [];
115
-          return [];
114
+          this.fileList = []
115
+          return []
116 116
         }
117 117
       },
118 118
       deep: true,
@@ -122,7 +122,7 @@ export default {
122 122
   computed: {
123 123
     // 是否显示提示
124 124
     showTip() {
125
-      return this.isShowTip && (this.fileType || this.fileSize);
125
+      return this.isShowTip && (this.fileType || this.fileSize)
126 126
     },
127 127
   },
128 128
   methods: {
@@ -130,88 +130,88 @@ export default {
130 130
     handleBeforeUpload(file) {
131 131
       // 校检文件类型
132 132
       if (this.fileType) {
133
-        const fileName = file.name.split('.');
134
-        const fileExt = fileName[fileName.length - 1];
135
-        const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
133
+        const fileName = file.name.split('.')
134
+        const fileExt = fileName[fileName.length - 1]
135
+        const isTypeOk = this.fileType.indexOf(fileExt) >= 0
136 136
         if (!isTypeOk) {
137
-          this.$modal.msgError(`文件格式不正确,请上传${this.fileType.join("/")}格式文件!`);
138
-          return false;
137
+          this.$modal.msgError(`文件格式不正确,请上传${this.fileType.join("/")}格式文件!`)
138
+          return false
139 139
         }
140 140
       }
141 141
       // 校检文件名是否包含特殊字符
142 142
       if (file.name.includes(',')) {
143
-        this.$modal.msgError('文件名不正确,不能包含英文逗号!');
144
-        return false;
143
+        this.$modal.msgError('文件名不正确,不能包含英文逗号!')
144
+        return false
145 145
       }
146 146
       // 校检文件大小
147 147
       if (this.fileSize) {
148
-        const isLt = file.size / 1024 / 1024 < this.fileSize;
148
+        const isLt = file.size / 1024 / 1024 < this.fileSize
149 149
         if (!isLt) {
150
-          this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
151
-          return false;
150
+          this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`)
151
+          return false
152 152
         }
153 153
       }
154
-      this.$modal.loading("正在上传文件,请稍候...");
155
-      this.number++;
156
-      return true;
154
+      this.$modal.loading("正在上传文件,请稍候...")
155
+      this.number++
156
+      return true
157 157
     },
158 158
     // 文件个数超出
159 159
     handleExceed() {
160
-      this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
160
+      this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`)
161 161
     },
162 162
     // 上传失败
163 163
     handleUploadError(err) {
164
-      this.$modal.msgError("上传文件失败,请重试");
165
-      this.$modal.closeLoading();
164
+      this.$modal.msgError("上传文件失败,请重试")
165
+      this.$modal.closeLoading()
166 166
     },
167 167
     // 上传成功回调
168 168
     handleUploadSuccess(res, file) {
169 169
       if (res.code === 200) {
170
-        this.uploadList.push({ name: res.data.url, url: res.data.url });
171
-        this.uploadedSuccessfully();
170
+        this.uploadList.push({ name: res.data.url, url: res.data.url })
171
+        this.uploadedSuccessfully()
172 172
       } else {
173
-        this.number--;
174
-        this.$modal.closeLoading();
175
-        this.$modal.msgError(res.msg);
176
-        this.$refs.fileUpload.handleRemove(file);
177
-        this.uploadedSuccessfully();
173
+        this.number--
174
+        this.$modal.closeLoading()
175
+        this.$modal.msgError(res.msg)
176
+        this.$refs.fileUpload.handleRemove(file)
177
+        this.uploadedSuccessfully()
178 178
       }
179 179
     },
180 180
     // 删除文件
181 181
     handleDelete(index) {
182
-      this.fileList.splice(index, 1);
183
-      this.$emit("input", this.listToString(this.fileList));
182
+      this.fileList.splice(index, 1)
183
+      this.$emit("input", this.listToString(this.fileList))
184 184
     },
185 185
     // 上传结束处理
186 186
     uploadedSuccessfully() {
187 187
       if (this.number > 0 && this.uploadList.length === this.number) {
188
-        this.fileList = this.fileList.concat(this.uploadList);
189
-        this.uploadList = [];
190
-        this.number = 0;
191
-        this.$emit("input", this.listToString(this.fileList));
192
-        this.$modal.closeLoading();
188
+        this.fileList = this.fileList.concat(this.uploadList)
189
+        this.uploadList = []
190
+        this.number = 0
191
+        this.$emit("input", this.listToString(this.fileList))
192
+        this.$modal.closeLoading()
193 193
       }
194 194
     },
195 195
     // 获取文件名称
196 196
     getFileName(name) {
197 197
       // 如果是url那么取最后的名字 如果不是直接返回
198 198
       if (name.lastIndexOf("/") > -1) {
199
-        return name.slice(name.lastIndexOf("/") + 1);
199
+        return name.slice(name.lastIndexOf("/") + 1)
200 200
       } else {
201
-        return name;
201
+        return name
202 202
       }
203 203
     },
204 204
     // 对象转成指定字符串分隔
205 205
     listToString(list, separator) {
206
-      let strs = "";
207
-      separator = separator || ",";
206
+      let strs = ""
207
+      separator = separator || ","
208 208
       for (let i in list) {
209
-        strs += list[i].url + separator;
209
+        strs += list[i].url + separator
210 210
       }
211
-      return strs != '' ? strs.substr(0, strs.length - 1) : '';
211
+      return strs != '' ? strs.substr(0, strs.length - 1) : ''
212 212
     }
213 213
   }
214
-};
214
+}
215 215
 </script>
216 216
 
217 217
 <style scoped lang="scss">

+ 1 - 1
ruoyi-ui/src/components/HeaderSearch/index.vue

@@ -90,7 +90,7 @@ export default {
90 90
       const query = val.query
91 91
       if(isHttp(val.path)) {
92 92
         // http(s):// 路径新窗口打开
93
-        const pindex = path.indexOf("http");
93
+        const pindex = path.indexOf("http")
94 94
         window.open(path.substr(pindex, path.length), "_blank")
95 95
       } else {
96 96
         if (query) {

+ 12 - 12
ruoyi-ui/src/components/ImagePreview/index.vue

@@ -31,30 +31,30 @@ export default {
31 31
   computed: {
32 32
     realSrc() {
33 33
       if (!this.src) {
34
-        return;
34
+        return
35 35
       }
36
-      let real_src = this.src.split(",")[0];
37
-      return real_src;
36
+      let real_src = this.src.split(",")[0]
37
+      return real_src
38 38
     },
39 39
     realSrcList() {
40 40
       if (!this.src) {
41
-        return;
41
+        return
42 42
       }
43
-      let real_src_list = this.src.split(",");
44
-      let srcList = [];
43
+      let real_src_list = this.src.split(",")
44
+      let srcList = []
45 45
       real_src_list.forEach(item => {
46
-        return srcList.push(item);
47
-      });
48
-      return srcList;
46
+        return srcList.push(item)
47
+      })
48
+      return srcList
49 49
     },
50 50
     realWidth() {
51
-      return typeof this.width == "string" ? this.width : `${this.width}px`;
51
+      return typeof this.width == "string" ? this.width : `${this.width}px`
52 52
     },
53 53
     realHeight() {
54
-      return typeof this.height == "string" ? this.height : `${this.height}px`;
54
+      return typeof this.height == "string" ? this.height : `${this.height}px`
55 55
     }
56 56
   },
57
-};
57
+}
58 58
 </script>
59 59
 
60 60
 <style lang="scss" scoped>

+ 51 - 51
ruoyi-ui/src/components/ImageUpload/index.vue

@@ -44,7 +44,7 @@
44 44
 </template>
45 45
 
46 46
 <script>
47
-import { getToken } from "@/utils/auth";
47
+import { getToken } from "@/utils/auth"
48 48
 
49 49
 export default {
50 50
   props: {
@@ -91,24 +91,24 @@ export default {
91 91
         Authorization: "Bearer " + getToken(),
92 92
       },
93 93
       fileList: []
94
-    };
94
+    }
95 95
   },
96 96
   watch: {
97 97
     value: {
98 98
       handler(val) {
99 99
         if (val) {
100 100
           // 首先将值转为数组
101
-          const list = Array.isArray(val) ? val : this.value.split(',');
101
+          const list = Array.isArray(val) ? val : this.value.split(',')
102 102
           // 然后将数组转为对象数组
103 103
           this.fileList = list.map(item => {
104 104
             if (typeof item === "string") {
105
-              item = { name: item, url: item };
105
+              item = { name: item, url: item }
106 106
             }
107
-            return item;
108
-          });
107
+            return item
108
+          })
109 109
         } else {
110
-          this.fileList = [];
111
-          return [];
110
+          this.fileList = []
111
+          return []
112 112
         }
113 113
       },
114 114
       deep: true,
@@ -118,103 +118,103 @@ export default {
118 118
   computed: {
119 119
     // 是否显示提示
120 120
     showTip() {
121
-      return this.isShowTip && (this.fileType || this.fileSize);
121
+      return this.isShowTip && (this.fileType || this.fileSize)
122 122
     },
123 123
   },
124 124
   methods: {
125 125
     // 上传前loading加载
126 126
     handleBeforeUpload(file) {
127
-      let isImg = false;
127
+      let isImg = false
128 128
       if (this.fileType.length) {
129
-        let fileExtension = "";
129
+        let fileExtension = ""
130 130
         if (file.name.lastIndexOf(".") > -1) {
131
-          fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
131
+          fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1)
132 132
         }
133 133
         isImg = this.fileType.some(type => {
134
-          if (file.type.indexOf(type) > -1) return true;
135
-          if (fileExtension && fileExtension.indexOf(type) > -1) return true;
136
-          return false;
137
-        });
134
+          if (file.type.indexOf(type) > -1) return true
135
+          if (fileExtension && fileExtension.indexOf(type) > -1) return true
136
+          return false
137
+        })
138 138
       } else {
139
-        isImg = file.type.indexOf("image") > -1;
139
+        isImg = file.type.indexOf("image") > -1
140 140
       }
141 141
 
142 142
       if (!isImg) {
143
-        this.$modal.msgError(`文件格式不正确,请上传${this.fileType.join("/")}图片格式文件!`);
144
-        return false;
143
+        this.$modal.msgError(`文件格式不正确,请上传${this.fileType.join("/")}图片格式文件!`)
144
+        return false
145 145
       }
146 146
       if (file.name.includes(',')) {
147
-        this.$modal.msgError('文件名不正确,不能包含英文逗号!');
148
-        return false;
147
+        this.$modal.msgError('文件名不正确,不能包含英文逗号!')
148
+        return false
149 149
       }
150 150
       if (this.fileSize) {
151
-        const isLt = file.size / 1024 / 1024 < this.fileSize;
151
+        const isLt = file.size / 1024 / 1024 < this.fileSize
152 152
         if (!isLt) {
153
-          this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
154
-          return false;
153
+          this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`)
154
+          return false
155 155
         }
156 156
       }
157
-      this.$modal.loading("正在上传图片,请稍候...");
158
-      this.number++;
157
+      this.$modal.loading("正在上传图片,请稍候...")
158
+      this.number++
159 159
     },
160 160
     // 文件个数超出
161 161
     handleExceed() {
162
-      this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
162
+      this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`)
163 163
     },
164 164
     // 上传成功回调
165 165
     handleUploadSuccess(res, file) {
166 166
       if (res.code === 200) {
167
-        this.uploadList.push({ name: res.data.url, url: res.data.url });
168
-        this.uploadedSuccessfully();
167
+        this.uploadList.push({ name: res.data.url, url: res.data.url })
168
+        this.uploadedSuccessfully()
169 169
       } else {
170
-        this.number--;
171
-        this.$modal.closeLoading();
172
-        this.$modal.msgError(res.msg);
173
-        this.$refs.imageUpload.handleRemove(file);
174
-        this.uploadedSuccessfully();
170
+        this.number--
171
+        this.$modal.closeLoading()
172
+        this.$modal.msgError(res.msg)
173
+        this.$refs.imageUpload.handleRemove(file)
174
+        this.uploadedSuccessfully()
175 175
       }
176 176
     },
177 177
     // 删除图片
178 178
     handleDelete(file) {
179
-      const findex = this.fileList.map(f => f.name).indexOf(file.name);
179
+      const findex = this.fileList.map(f => f.name).indexOf(file.name)
180 180
       if (findex > -1) {
181
-        this.fileList.splice(findex, 1);
182
-        this.$emit("input", this.listToString(this.fileList));
181
+        this.fileList.splice(findex, 1)
182
+        this.$emit("input", this.listToString(this.fileList))
183 183
       }
184 184
     },
185 185
     // 上传失败
186 186
     handleUploadError() {
187
-      this.$modal.msgError("上传图片失败,请重试");
188
-      this.$modal.closeLoading();
187
+      this.$modal.msgError("上传图片失败,请重试")
188
+      this.$modal.closeLoading()
189 189
     },
190 190
     // 上传结束处理
191 191
     uploadedSuccessfully() {
192 192
       if (this.number > 0 && this.uploadList.length === this.number) {
193
-        this.fileList = this.fileList.concat(this.uploadList);
194
-        this.uploadList = [];
195
-        this.number = 0;
196
-        this.$emit("input", this.listToString(this.fileList));
197
-        this.$modal.closeLoading();
193
+        this.fileList = this.fileList.concat(this.uploadList)
194
+        this.uploadList = []
195
+        this.number = 0
196
+        this.$emit("input", this.listToString(this.fileList))
197
+        this.$modal.closeLoading()
198 198
       }
199 199
     },
200 200
     // 预览
201 201
     handlePictureCardPreview(file) {
202
-      this.dialogImageUrl = file.url;
203
-      this.dialogVisible = true;
202
+      this.dialogImageUrl = file.url
203
+      this.dialogVisible = true
204 204
     },
205 205
     // 对象转成指定字符串分隔
206 206
     listToString(list, separator) {
207
-      let strs = "";
208
-      separator = separator || ",";
207
+      let strs = ""
208
+      separator = separator || ","
209 209
       for (let i in list) {
210 210
         if (list[i].url) {
211
-          strs += list[i].url.replace(this.baseUrl, "") + separator;
211
+          strs += list[i].url.replace(this.baseUrl, "") + separator
212 212
         }
213 213
       }
214
-      return strs != '' ? strs.substr(0, strs.length - 1) : '';
214
+      return strs != '' ? strs.substr(0, strs.length - 1) : ''
215 215
     }
216 216
   }
217
-};
217
+}
218 218
 </script>
219 219
 <style scoped lang="scss">
220 220
 // .el-upload--picture-card 控制加号部分

+ 1 - 1
ruoyi-ui/src/components/Pagination/index.vue

@@ -63,7 +63,7 @@ export default {
63 63
   },
64 64
   data() {
65 65
     return {
66
-    };
66
+    }
67 67
   },
68 68
   computed: {
69 69
     currentPage: {

+ 15 - 15
ruoyi-ui/src/components/RightToolbar/index.vue

@@ -47,7 +47,7 @@ export default {
47 47
       title: "显示/隐藏",
48 48
       // 是否显示弹出层
49 49
       open: false
50
-    };
50
+    }
51 51
   },
52 52
   props: {
53 53
     /* 是否显示检索条件 */
@@ -77,20 +77,20 @@ export default {
77 77
   },
78 78
   computed: {
79 79
     style() {
80
-      const ret = {};
80
+      const ret = {}
81 81
       if (this.gutter) {
82
-        ret.marginRight = `${this.gutter / 2}px`;
82
+        ret.marginRight = `${this.gutter / 2}px`
83 83
       }
84
-      return ret;
84
+      return ret
85 85
     },
86 86
     isChecked: {
87 87
       get() {
88
-        return this.columns.every((col) => col.visible);
88
+        return this.columns.every((col) => col.visible)
89 89
       },
90 90
       set() {}
91 91
     },
92 92
     isIndeterminate() {
93
-      return this.columns.some((col) => col.visible) && !this.isChecked;
93
+      return this.columns.some((col) => col.visible) && !this.isChecked
94 94
     }
95 95
   },
96 96
   created() {
@@ -98,7 +98,7 @@ export default {
98 98
       // 显隐列初始默认隐藏列
99 99
       for (let item in this.columns) {
100 100
         if (this.columns[item].visible === false) {
101
-          this.value.push(parseInt(item));
101
+          this.value.push(parseInt(item))
102 102
         }
103 103
       }
104 104
     }
@@ -106,34 +106,34 @@ export default {
106 106
   methods: {
107 107
     // 搜索
108 108
     toggleSearch() {
109
-      this.$emit("update:showSearch", !this.showSearch);
109
+      this.$emit("update:showSearch", !this.showSearch)
110 110
     },
111 111
     // 刷新
112 112
     refresh() {
113
-      this.$emit("queryTable");
113
+      this.$emit("queryTable")
114 114
     },
115 115
     // 右侧列表元素变化
116 116
     dataChange(data) {
117 117
       for (let item in this.columns) {
118
-        const key = this.columns[item].key;
119
-        this.columns[item].visible = !data.includes(key);
118
+        const key = this.columns[item].key
119
+        this.columns[item].visible = !data.includes(key)
120 120
       }
121 121
     },
122 122
     // 打开显隐列dialog
123 123
     showColumn() {
124
-      this.open = true;
124
+      this.open = true
125 125
     },
126 126
     // 单勾选
127 127
     checkboxChange(event, label) {
128
-      this.columns.filter(item => item.label == label)[0].visible = event;
128
+      this.columns.filter(item => item.label == label)[0].visible = event
129 129
     },
130 130
     // 切换全选/反选
131 131
     toggleCheckAll() {
132
-      const newValue = !this.isChecked;
132
+      const newValue = !this.isChecked
133 133
       this.columns.forEach((col) => (col.visible = newValue))
134 134
     }
135 135
   },
136
-};
136
+}
137 137
 </script>
138 138
 <style lang="scss" scoped>
139 139
 ::v-deep .el-transfer__button {

+ 0 - 1
ruoyi-ui/src/components/SizeSelect/index.vue

@@ -51,6 +51,5 @@ export default {
51 51
       })
52 52
     }
53 53
   }
54
-
55 54
 }
56 55
 </script>

+ 46 - 46
ruoyi-ui/src/components/TopNav/index.vue

@@ -32,11 +32,11 @@
32 32
 </template>
33 33
 
34 34
 <script>
35
-import { constantRoutes } from "@/router";
36
-import { isHttp } from "@/utils/validate";
35
+import { constantRoutes } from "@/router"
36
+import { isHttp } from "@/utils/validate"
37 37
 
38 38
 // 隐藏侧边栏路由
39
-const hideList = ['/index', '/user/profile'];
39
+const hideList = ['/index', '/user/profile']
40 40
 
41 41
 export default {
42 42
   data() {
@@ -45,67 +45,67 @@ export default {
45 45
       visibleNumber: 5,
46 46
       // 当前激活菜单的 index
47 47
       currentIndex: undefined
48
-    };
48
+    }
49 49
   },
50 50
   computed: {
51 51
     theme() {
52
-      return this.$store.state.settings.theme;
52
+      return this.$store.state.settings.theme
53 53
     },
54 54
     // 顶部显示菜单
55 55
     topMenus() {
56
-      let topMenus = [];
56
+      let topMenus = []
57 57
       this.routers.map((menu) => {
58 58
         if (menu.hidden !== true) {
59 59
           // 兼容顶部栏一级菜单内部跳转
60 60
           if (menu.path === '/' && menu.children) {
61
-            topMenus.push(menu.children[0]);
61
+            topMenus.push(menu.children[0])
62 62
           } else {
63
-            topMenus.push(menu);
63
+            topMenus.push(menu)
64 64
           }
65 65
         }
66
-      });
67
-      return topMenus;
66
+      })
67
+      return topMenus
68 68
     },
69 69
     // 所有的路由信息
70 70
     routers() {
71
-      return this.$store.state.permission.topbarRouters;
71
+      return this.$store.state.permission.topbarRouters
72 72
     },
73 73
     // 设置子路由
74 74
     childrenMenus() {
75
-      var childrenMenus = [];
75
+      var childrenMenus = []
76 76
       this.routers.map((router) => {
77 77
         for (var item in router.children) {
78 78
           if (router.children[item].parentPath === undefined) {
79 79
             if(router.path === "/") {
80
-              router.children[item].path = "/" + router.children[item].path;
80
+              router.children[item].path = "/" + router.children[item].path
81 81
             } else {
82 82
               if(!isHttp(router.children[item].path)) {
83
-                router.children[item].path = router.path + "/" + router.children[item].path;
83
+                router.children[item].path = router.path + "/" + router.children[item].path
84 84
               }
85 85
             }
86
-            router.children[item].parentPath = router.path;
86
+            router.children[item].parentPath = router.path
87 87
           }
88
-          childrenMenus.push(router.children[item]);
88
+          childrenMenus.push(router.children[item])
89 89
         }
90
-      });
91
-      return constantRoutes.concat(childrenMenus);
90
+      })
91
+      return constantRoutes.concat(childrenMenus)
92 92
     },
93 93
     // 默认激活的菜单
94 94
     activeMenu() {
95
-      const path = this.$route.path;
96
-      let activePath = path;
95
+      const path = this.$route.path
96
+      let activePath = path
97 97
       if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) {
98
-        const tmpPath = path.substring(1, path.length);
98
+        const tmpPath = path.substring(1, path.length)
99 99
         if (!this.$route.meta.link) {
100
-          activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"));
101
-          this.$store.dispatch('app/toggleSideBarHide', false);
100
+          activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/"))
101
+          this.$store.dispatch('app/toggleSideBarHide', false)
102 102
         }
103 103
       } else if(!this.$route.children) {
104
-        activePath = path;
105
-        this.$store.dispatch('app/toggleSideBarHide', true);
104
+        activePath = path
105
+        this.$store.dispatch('app/toggleSideBarHide', true)
106 106
       }
107
-      this.activeRoutes(activePath);
108
-      return activePath;
107
+      this.activeRoutes(activePath)
108
+      return activePath
109 109
     },
110 110
   },
111 111
   beforeMount() {
@@ -115,55 +115,55 @@ export default {
115 115
     window.removeEventListener('resize', this.setVisibleNumber)
116 116
   },
117 117
   mounted() {
118
-    this.setVisibleNumber();
118
+    this.setVisibleNumber()
119 119
   },
120 120
   methods: {
121 121
     // 根据宽度计算设置显示栏数
122 122
     setVisibleNumber() {
123
-      const width = document.body.getBoundingClientRect().width / 3;
124
-      this.visibleNumber = parseInt(width / 85);
123
+      const width = document.body.getBoundingClientRect().width / 3
124
+      this.visibleNumber = parseInt(width / 85)
125 125
     },
126 126
     // 菜单选择事件
127 127
     handleSelect(key, keyPath) {
128
-      this.currentIndex = key;
129
-      const route = this.routers.find(item => item.path === key);
128
+      this.currentIndex = key
129
+      const route = this.routers.find(item => item.path === key)
130 130
       if (isHttp(key)) {
131 131
         // http(s):// 路径新窗口打开
132
-        window.open(key, "_blank");
132
+        window.open(key, "_blank")
133 133
       } else if (!route || !route.children) {
134 134
         // 没有子路由路径内部打开
135
-        const routeMenu = this.childrenMenus.find(item => item.path === key);
135
+        const routeMenu = this.childrenMenus.find(item => item.path === key)
136 136
         if (routeMenu && routeMenu.query) {
137
-          let query = JSON.parse(routeMenu.query);
138
-          this.$router.push({ path: key, query: query });
137
+          let query = JSON.parse(routeMenu.query)
138
+          this.$router.push({ path: key, query: query })
139 139
         } else {
140
-          this.$router.push({ path: key });
140
+          this.$router.push({ path: key })
141 141
         }
142
-        this.$store.dispatch('app/toggleSideBarHide', true);
142
+        this.$store.dispatch('app/toggleSideBarHide', true)
143 143
       } else {
144 144
         // 显示左侧联动菜单
145
-        this.activeRoutes(key);
146
-        this.$store.dispatch('app/toggleSideBarHide', false);
145
+        this.activeRoutes(key)
146
+        this.$store.dispatch('app/toggleSideBarHide', false)
147 147
       }
148 148
     },
149 149
     // 当前激活的路由
150 150
     activeRoutes(key) {
151
-      var routes = [];
151
+      var routes = []
152 152
       if (this.childrenMenus && this.childrenMenus.length > 0) {
153 153
         this.childrenMenus.map((item) => {
154 154
           if (key == item.parentPath || (key == "index" && "" == item.path)) {
155
-            routes.push(item);
155
+            routes.push(item)
156 156
           }
157
-        });
157
+        })
158 158
       }
159 159
       if(routes.length > 0) {
160
-        this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
160
+        this.$store.commit("SET_SIDEBAR_ROUTERS", routes)
161 161
       } else {
162
-        this.$store.dispatch('app/toggleSideBarHide', true);
162
+        this.$store.dispatch('app/toggleSideBarHide', true)
163 163
       }
164 164
     }
165 165
   },
166
-};
166
+}
167 167
 </script>
168 168
 
169 169
 <style lang="scss">

+ 7 - 7
ruoyi-ui/src/components/iFrame/index.vue

@@ -21,16 +21,16 @@ export default {
21 21
       height: document.documentElement.clientHeight - 94.5 + "px;",
22 22
       loading: true,
23 23
       url: this.src
24
-    };
24
+    }
25 25
   },
26 26
   mounted: function () {
27 27
     setTimeout(() => {
28
-      this.loading = false;
29
-    }, 300);
30
-    const that = this;
28
+      this.loading = false
29
+    }, 300)
30
+    const that = this
31 31
     window.onresize = function temp() {
32
-      that.height = document.documentElement.clientHeight - 94.5 + "px;";
33
-    };
32
+      that.height = document.documentElement.clientHeight - 94.5 + "px;"
33
+    }
34 34
   }
35
-};
35
+}
36 36
 </script>

+ 28 - 28
ruoyi-ui/src/directive/dialog/drag.js

@@ -8,57 +8,57 @@ export default {
8 8
     const value = binding.value
9 9
     if (value == false) return
10 10
     // 获取拖拽内容头部
11
-    const dialogHeaderEl = el.querySelector('.el-dialog__header');
12
-    const dragDom = el.querySelector('.el-dialog');
13
-    dialogHeaderEl.style.cursor = 'move';
14
-    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
15
-    const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
16
-    dragDom.style.position = 'absolute';
17
-    dragDom.style.marginTop = 0;
18
-    let width = dragDom.style.width;
11
+    const dialogHeaderEl = el.querySelector('.el-dialog__header')
12
+    const dragDom = el.querySelector('.el-dialog')
13
+    dialogHeaderEl.style.cursor = 'move'
14
+    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null)
15
+    const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
16
+    dragDom.style.position = 'absolute'
17
+    dragDom.style.marginTop = 0
18
+    let width = dragDom.style.width
19 19
     if (width.includes('%')) {
20
-      width = +document.body.clientWidth * (+width.replace(/\%/g, '') / 100);
20
+      width = +document.body.clientWidth * (+width.replace(/\%/g, '') / 100)
21 21
     } else {
22
-      width = +width.replace(/\px/g, '');
22
+      width = +width.replace(/\px/g, '')
23 23
     }
24
-    dragDom.style.left = `${(document.body.clientWidth - width) / 2}px`;
24
+    dragDom.style.left = `${(document.body.clientWidth - width) / 2}px`
25 25
     // 鼠标按下事件
26 26
     dialogHeaderEl.onmousedown = (e) => {
27 27
       // 鼠标按下,计算当前元素距离可视区的距离 (鼠标点击位置距离可视窗口的距离)
28
-      const disX = e.clientX - dialogHeaderEl.offsetLeft;
29
-      const disY = e.clientY - dialogHeaderEl.offsetTop;
28
+      const disX = e.clientX - dialogHeaderEl.offsetLeft
29
+      const disY = e.clientY - dialogHeaderEl.offsetTop
30 30
 
31 31
       // 获取到的值带px 正则匹配替换
32
-      let styL, styT;
32
+      let styL, styT
33 33
 
34 34
       // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
35 35
       if (sty.left.includes('%')) {
36
-        styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
37
-        styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
36
+        styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
37
+        styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
38 38
       } else {
39
-        styL = +sty.left.replace(/\px/g, '');
40
-        styT = +sty.top.replace(/\px/g, '');
41
-      };
39
+        styL = +sty.left.replace(/\px/g, '')
40
+        styT = +sty.top.replace(/\px/g, '')
41
+      }
42 42
 
43 43
       // 鼠标拖拽事件
44 44
       document.onmousemove = function (e) {
45 45
         // 通过事件委托,计算移动的距离 (开始拖拽至结束拖拽的距离)
46
-        const l = e.clientX - disX;
47
-        const t = e.clientY - disY;
46
+        const l = e.clientX - disX
47
+        const t = e.clientY - disY
48 48
 
49 49
         let finallyL = l + styL
50 50
         let finallyT = t + styT
51 51
 
52 52
         // 移动当前元素
53
-        dragDom.style.left = `${finallyL}px`;
54
-        dragDom.style.top = `${finallyT}px`;
53
+        dragDom.style.left = `${finallyL}px`
54
+        dragDom.style.top = `${finallyT}px`
55 55
 
56
-      };
56
+      }
57 57
 
58 58
       document.onmouseup = function (e) {
59
-        document.onmousemove = null;
60
-        document.onmouseup = null;
61
-      };
59
+        document.onmousemove = null
60
+        document.onmouseup = null
61
+      }
62 62
     }
63 63
   }
64
-};
64
+}

+ 17 - 17
ruoyi-ui/src/directive/dialog/dragHeight.js

@@ -5,30 +5,30 @@
5 5
 
6 6
 export default {
7 7
   bind(el) {
8
-    const dragDom = el.querySelector('.el-dialog');
9
-    const lineEl = document.createElement('div');
10
-    lineEl.style = 'width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;';
8
+    const dragDom = el.querySelector('.el-dialog')
9
+    const lineEl = document.createElement('div')
10
+    lineEl.style = 'width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;'
11 11
     lineEl.addEventListener('mousedown',
12 12
       function(e) {
13 13
         // 鼠标按下,计算当前元素距离可视区的距离
14
-        const disX = e.clientX - el.offsetLeft;
15
-        const disY = e.clientY - el.offsetTop;
14
+        const disX = e.clientX - el.offsetLeft
15
+        const disY = e.clientY - el.offsetTop
16 16
         // 当前宽度 高度
17
-        const curWidth = dragDom.offsetWidth;
18
-        const curHeight = dragDom.offsetHeight;
17
+        const curWidth = dragDom.offsetWidth
18
+        const curHeight = dragDom.offsetHeight
19 19
         document.onmousemove = function(e) {
20
-          e.preventDefault(); // 移动时禁用默认事件
20
+          e.preventDefault() // 移动时禁用默认事件
21 21
           // 通过事件委托,计算移动的距离
22
-          const xl = e.clientX - disX;
22
+          const xl = e.clientX - disX
23 23
           const yl = e.clientY - disY
24
-          dragDom.style.width = `${curWidth + xl}px`;
25
-          dragDom.style.height = `${curHeight + yl}px`;
26
-        };
24
+          dragDom.style.width = `${curWidth + xl}px`
25
+          dragDom.style.height = `${curHeight + yl}px`
26
+        }
27 27
         document.onmouseup = function(e) {
28
-          document.onmousemove = null;
29
-          document.onmouseup = null;
30
-        };
31
-      }, false);
32
-    dragDom.appendChild(lineEl);
28
+          document.onmousemove = null
29
+          document.onmouseup = null
30
+        }
31
+      }, false)
32
+    dragDom.appendChild(lineEl)
33 33
   }
34 34
 }

+ 14 - 14
ruoyi-ui/src/directive/dialog/dragWidth.js

@@ -5,26 +5,26 @@
5 5
 
6 6
 export default {
7 7
   bind(el) {
8
-    const dragDom = el.querySelector('.el-dialog');
9
-    const lineEl = document.createElement('div');
10
-    lineEl.style = 'width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;';
8
+    const dragDom = el.querySelector('.el-dialog')
9
+    const lineEl = document.createElement('div')
10
+    lineEl.style = 'width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;'
11 11
     lineEl.addEventListener('mousedown',
12 12
       function (e) {
13 13
         // 鼠标按下,计算当前元素距离可视区的距离
14
-        const disX = e.clientX - el.offsetLeft;
14
+        const disX = e.clientX - el.offsetLeft
15 15
         // 当前宽度
16
-        const curWidth = dragDom.offsetWidth;
16
+        const curWidth = dragDom.offsetWidth
17 17
         document.onmousemove = function (e) {
18
-          e.preventDefault(); // 移动时禁用默认事件
18
+          e.preventDefault() // 移动时禁用默认事件
19 19
           // 通过事件委托,计算移动的距离
20
-          const l = e.clientX - disX;
21
-          dragDom.style.width = `${curWidth + l}px`;
22
-        };
20
+          const l = e.clientX - disX
21
+          dragDom.style.width = `${curWidth + l}px`
22
+        }
23 23
         document.onmouseup = function (e) {
24
-          document.onmousemove = null;
25
-          document.onmouseup = null;
26
-        };
27
-      }, false);
28
-    dragDom.appendChild(lineEl);
24
+          document.onmousemove = null
25
+          document.onmouseup = null
26
+        }
27
+      }, false)
28
+    dragDom.appendChild(lineEl)
29 29
   }
30 30
 }

+ 1 - 1
ruoyi-ui/src/directive/index.js

@@ -17,7 +17,7 @@ const install = function(Vue) {
17 17
 if (window.Vue) {
18 18
   window['hasRole'] = hasRole
19 19
   window['hasPermi'] = hasPermi
20
-  Vue.use(install); // eslint-disable-line
20
+  Vue.use(install) // eslint-disable-line
21 21
 }
22 22
 
23 23
 export default install

+ 20 - 20
ruoyi-ui/src/directive/module/clipboard.js

@@ -8,47 +8,47 @@ export default {
8 8
   bind(el, binding, vnode) {
9 9
     switch (binding.arg) {
10 10
       case 'success':
11
-        el._vClipBoard_success = binding.value;
12
-        break;
11
+        el._vClipBoard_success = binding.value
12
+        break
13 13
       case 'error':
14
-        el._vClipBoard_error = binding.value;
15
-        break;
14
+        el._vClipBoard_error = binding.value
15
+        break
16 16
       default: {
17 17
         const clipboard = new Clipboard(el, {
18 18
           text: () => binding.value,
19 19
           action: () => binding.arg === 'cut' ? 'cut' : 'copy'
20
-        });
20
+        })
21 21
         clipboard.on('success', e => {
22
-          const callback = el._vClipBoard_success;
23
-          callback && callback(e);
24
-        });
22
+          const callback = el._vClipBoard_success
23
+          callback && callback(e)
24
+        })
25 25
         clipboard.on('error', e => {
26
-          const callback = el._vClipBoard_error;
27
-          callback && callback(e);
28
-        });
29
-        el._vClipBoard = clipboard;
26
+          const callback = el._vClipBoard_error
27
+          callback && callback(e)
28
+        })
29
+        el._vClipBoard = clipboard
30 30
       }
31 31
     }
32 32
   },
33 33
   update(el, binding) {
34 34
     if (binding.arg === 'success') {
35
-      el._vClipBoard_success = binding.value;
35
+      el._vClipBoard_success = binding.value
36 36
     } else if (binding.arg === 'error') {
37
-      el._vClipBoard_error = binding.value;
37
+      el._vClipBoard_error = binding.value
38 38
     } else {
39
-      el._vClipBoard.text = function () { return binding.value; };
40
-      el._vClipBoard.action = () => binding.arg === 'cut' ? 'cut' : 'copy';
39
+      el._vClipBoard.text = function () { return binding.value }
40
+      el._vClipBoard.action = () => binding.arg === 'cut' ? 'cut' : 'copy'
41 41
     }
42 42
   },
43 43
   unbind(el, binding) {
44 44
     if (!el._vClipboard) return
45 45
     if (binding.arg === 'success') {
46
-      delete el._vClipBoard_success;
46
+      delete el._vClipBoard_success
47 47
     } else if (binding.arg === 'error') {
48
-      delete el._vClipBoard_error;
48
+      delete el._vClipBoard_error
49 49
     } else {
50
-      el._vClipBoard.destroy();
51
-      delete el._vClipBoard;
50
+      el._vClipBoard.destroy()
51
+      delete el._vClipBoard
52 52
     }
53 53
   }
54 54
 }

+ 1 - 1
ruoyi-ui/src/directive/permission/hasPermi.js

@@ -8,7 +8,7 @@ import store from '@/store'
8 8
 export default {
9 9
   inserted(el, binding, vnode) {
10 10
     const { value } = binding
11
-    const all_permission = "*:*:*";
11
+    const all_permission = "*:*:*"
12 12
     const permissions = store.getters && store.getters.permissions
13 13
 
14 14
     if (value && value instanceof Array && value.length > 0) {

+ 1 - 1
ruoyi-ui/src/directive/permission/hasRole.js

@@ -8,7 +8,7 @@ import store from '@/store'
8 8
 export default {
9 9
   inserted(el, binding, vnode) {
10 10
     const { value } = binding
11
-    const super_admin = "admin";
11
+    const super_admin = "admin"
12 12
     const roles = store.getters && store.getters.roles
13 13
 
14 14
     if (value && value instanceof Array && value.length > 0) {

+ 5 - 5
ruoyi-ui/src/layout/components/IframeToggle/index.vue

@@ -11,22 +11,22 @@
11 11
 </template>
12 12
 
13 13
 <script>
14
-import InnerLink from "../InnerLink/index";
14
+import InnerLink from "../InnerLink/index"
15 15
 
16 16
 export default {
17 17
   components: { InnerLink },
18 18
   computed: {
19 19
     iframeViews() {
20
-      return this.$store.state.tagsView.iframeViews;
20
+      return this.$store.state.tagsView.iframeViews
21 21
     }
22 22
   },
23 23
   methods: {
24 24
     iframeUrl(url, query) {
25 25
       if (Object.keys(query).length > 0) {
26
-        let params = Object.keys(query).map((key) => key + "=" + query[key]).join("&");
27
-        return url + "?" + params;
26
+        let params = Object.keys(query).map((key) => key + "=" + query[key]).join("&")
27
+        return url + "?" + params
28 28
       }
29
-      return url;
29
+      return url
30 30
     }
31 31
   }
32 32
 }

+ 11 - 11
ruoyi-ui/src/layout/components/InnerLink/index.vue

@@ -24,24 +24,24 @@ export default {
24 24
     return {
25 25
       loading: false,
26 26
       height: document.documentElement.clientHeight - 94.5 + "px;"
27
-    };
27
+    }
28 28
   },
29 29
   mounted() {
30
-    var _this = this;
31
-    const iframeId = ("#" + this.iframeId).replace(/\//g, "\\/");
32
-    const iframe = document.querySelector(iframeId);
30
+    var _this = this
31
+    const iframeId = ("#" + this.iframeId).replace(/\//g, "\\/")
32
+    const iframe = document.querySelector(iframeId)
33 33
     // iframe页面loading控制
34 34
     if (iframe.attachEvent) {
35
-      this.loading = true;
35
+      this.loading = true
36 36
       iframe.attachEvent("onload", function () {
37
-        _this.loading = false;
38
-      });
37
+        _this.loading = false
38
+      })
39 39
     } else {
40
-      this.loading = true;
40
+      this.loading = true
41 41
       iframe.onload = function () {
42
-        _this.loading = false;
43
-      };
42
+        _this.loading = false
43
+      }
44 44
     }
45 45
   }
46
-};
46
+}
47 47
 </script>

+ 3 - 3
ruoyi-ui/src/layout/components/Navbar.vue

@@ -95,16 +95,16 @@ export default {
95 95
     toggleSideBar() {
96 96
       this.$store.dispatch('app/toggleSideBar')
97 97
     },
98
-    async logout() {
98
+    logout() {
99 99
       this.$confirm('确定注销并退出系统吗?', '提示', {
100 100
         confirmButtonText: '确定',
101 101
         cancelButtonText: '取消',
102 102
         type: 'warning'
103 103
       }).then(() => {
104 104
         this.$store.dispatch('LogOut').then(() => {
105
-          location.href = '/index';
105
+          location.href = '/index'
106 106
         })
107
-      }).catch(() => {});
107
+      }).catch(() => {})
108 108
     }
109 109
   }
110 110
 }

+ 8 - 8
ruoyi-ui/src/layout/components/Settings/index.vue

@@ -82,7 +82,7 @@ export default {
82 82
     return {
83 83
       theme: this.$store.state.settings.theme,
84 84
       sideTheme: this.$store.state.settings.sideTheme
85
-    };
85
+    }
86 86
   },
87 87
   computed: {
88 88
     visible: {
@@ -111,8 +111,8 @@ export default {
111 111
           value: val
112 112
         })
113 113
         if (!val) {
114
-          this.$store.dispatch('app/toggleSideBarHide', false);
115
-          this.$store.commit("SET_SIDEBAR_ROUTERS", this.$store.state.permission.defaultRoutes);
114
+          this.$store.dispatch('app/toggleSideBarHide', false)
115
+          this.$store.commit("SET_SIDEBAR_ROUTERS", this.$store.state.permission.defaultRoutes)
116 116
         }
117 117
       }
118 118
     },
@@ -156,17 +156,17 @@ export default {
156 156
         key: 'theme',
157 157
         value: val
158 158
       })
159
-      this.theme = val;
159
+      this.theme = val
160 160
     },
161 161
     handleTheme(val) {
162 162
       this.$store.dispatch('settings/changeSetting', {
163 163
         key: 'sideTheme',
164 164
         value: val
165 165
       })
166
-      this.sideTheme = val;
166
+      this.sideTheme = val
167 167
     },
168 168
     saveSetting() {
169
-      this.$modal.loading("正在保存到本地,请稍候...");
169
+      this.$modal.loading("正在保存到本地,请稍候...")
170 170
       this.$cache.local.set(
171 171
         "layout-setting",
172 172
         `{
@@ -178,11 +178,11 @@ export default {
178 178
             "sideTheme":"${this.sideTheme}",
179 179
             "theme":"${this.theme}"
180 180
           }`
181
-      );
181
+      )
182 182
       setTimeout(this.$modal.closeLoading(), 1000)
183 183
     },
184 184
     resetSetting() {
185
-      this.$modal.loading("正在清除设置缓存并刷新,请稍候...");
185
+      this.$modal.loading("正在清除设置缓存并刷新,请稍候...")
186 186
       this.$cache.local.remove("layout-setting")
187 187
       setTimeout("window.location.reload()", 1000)
188 188
     }

+ 1 - 1
ruoyi-ui/src/layout/components/Sidebar/Logo.vue

@@ -27,7 +27,7 @@ export default {
27 27
   },
28 28
   computed: {
29 29
     variables() {
30
-      return variables;
30
+      return variables
31 31
     },
32 32
     sideTheme() {
33 33
       return this.$store.state.settings.sideTheme

+ 2 - 2
ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue

@@ -57,7 +57,7 @@ export default {
57 57
   methods: {
58 58
     hasOneShowingChild(children = [], parent) {
59 59
       if (!children) {
60
-        children = [];
60
+        children = []
61 61
       }
62 62
       const showingChildren = children.filter(item => {
63 63
         if (item.hidden) {
@@ -89,7 +89,7 @@ export default {
89 89
         return this.basePath
90 90
       }
91 91
       if (routeQuery) {
92
-        let query = JSON.parse(routeQuery);
92
+        let query = JSON.parse(routeQuery)
93 93
         return { path: path.resolve(this.basePath, routePath), query: query }
94 94
       }
95 95
       return path.resolve(this.basePath, routePath)

+ 12 - 12
ruoyi-ui/src/layout/components/Sidebar/index.vue

@@ -24,10 +24,10 @@
24 24
 </template>
25 25
 
26 26
 <script>
27
-import { mapGetters, mapState } from "vuex";
28
-import Logo from "./Logo";
29
-import SidebarItem from "./SidebarItem";
30
-import variables from "@/assets/styles/variables.scss";
27
+import { mapGetters, mapState } from "vuex"
28
+import Logo from "./Logo"
29
+import SidebarItem from "./SidebarItem"
30
+import variables from "@/assets/styles/variables.scss"
31 31
 
32 32
 export default {
33 33
     components: { SidebarItem, Logo },
@@ -35,23 +35,23 @@ export default {
35 35
         ...mapState(["settings"]),
36 36
         ...mapGetters(["sidebarRouters", "sidebar"]),
37 37
         activeMenu() {
38
-            const route = this.$route;
39
-            const { meta, path } = route;
38
+            const route = this.$route
39
+            const { meta, path } = route
40 40
             // if set path, the sidebar will highlight the path you set
41 41
             if (meta.activeMenu) {
42
-                return meta.activeMenu;
42
+                return meta.activeMenu
43 43
             }
44
-            return path;
44
+            return path
45 45
         },
46 46
         showLogo() {
47
-            return this.$store.state.settings.sidebarLogo;
47
+            return this.$store.state.settings.sidebarLogo
48 48
         },
49 49
         variables() {
50
-            return variables;
50
+            return variables
51 51
         },
52 52
         isCollapse() {
53
-            return !this.sidebar.opened;
53
+            return !this.sidebar.opened
54 54
         }
55 55
     }
56
-};
56
+}
57 57
 </script>

+ 5 - 5
ruoyi-ui/src/layout/components/TagsView/index.vue

@@ -51,7 +51,7 @@ export default {
51 51
       return this.$store.state.permission.routes
52 52
     },
53 53
     theme() {
54
-      return this.$store.state.settings.theme;
54
+      return this.$store.state.settings.theme
55 55
     }
56 56
   },
57 57
   watch: {
@@ -76,11 +76,11 @@ export default {
76 76
       return route.path === this.$route.path
77 77
     },
78 78
     activeStyle(tag) {
79
-      if (!this.isActive(tag)) return {};
79
+      if (!this.isActive(tag)) return {}
80 80
       return {
81 81
         "background-color": this.theme,
82 82
         "border-color": this.theme
83
-      };
83
+      }
84 84
     },
85 85
     isAffix(tag) {
86 86
       return tag.meta && tag.meta.affix
@@ -151,7 +151,7 @@ export default {
151 151
       })
152 152
     },
153 153
     refreshSelectedTag(view) {
154
-      this.$tab.refreshPage(view);
154
+      this.$tab.refreshPage(view)
155 155
       if (this.$route.meta.link) {
156 156
         this.$store.dispatch('tagsView/delIframeView', this.$route)
157 157
       }
@@ -178,7 +178,7 @@ export default {
178 178
       })
179 179
     },
180 180
     closeOthersTags() {
181
-      this.$router.push(this.selectedTag.fullPath).catch(()=>{});
181
+      this.$router.push(this.selectedTag.fullPath).catch(()=>{})
182 182
       this.$tab.closeOtherPage(this.selectedTag).then(() => {
183 183
         this.moveToCurrentTag()
184 184
       })

+ 1 - 1
ruoyi-ui/src/layout/index.vue

@@ -51,7 +51,7 @@ export default {
51 51
       }
52 52
     },
53 53
     variables() {
54
-      return variables;
54
+      return variables
55 55
     }
56 56
   },
57 57
   methods: {

+ 4 - 4
ruoyi-ui/src/main.js

@@ -16,11 +16,11 @@ import { download } from '@/utils/request'
16 16
 
17 17
 import './assets/icons' // icon
18 18
 import './permission' // permission control
19
-import { getDicts } from "@/api/system/dict/data";
20
-import { getConfigKey } from "@/api/system/config";
21
-import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
19
+import { getDicts } from "@/api/system/dict/data"
20
+import { getConfigKey } from "@/api/system/config"
21
+import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"
22 22
 // 分页组件
23
-import Pagination from "@/components/Pagination";
23
+import Pagination from "@/components/Pagination"
24 24
 // 自定义表格工具组件
25 25
 import RightToolbar from "@/components/RightToolbar"
26 26
 // 富文本组件

+ 4 - 4
ruoyi-ui/src/plugins/auth.js

@@ -1,7 +1,7 @@
1 1
 import store from '@/store'
2 2
 
3 3
 function authPermission(permission) {
4
-  const all_permission = "*:*:*";
4
+  const all_permission = "*:*:*"
5 5
   const permissions = store.getters && store.getters.permissions
6 6
   if (permission && permission.length > 0) {
7 7
     return permissions.some(v => {
@@ -13,7 +13,7 @@ function authPermission(permission) {
13 13
 }
14 14
 
15 15
 function authRole(role) {
16
-  const super_admin = "admin";
16
+  const super_admin = "admin"
17 17
   const roles = store.getters && store.getters.roles
18 18
   if (role && role.length > 0) {
19 19
     return roles.some(v => {
@@ -27,7 +27,7 @@ function authRole(role) {
27 27
 export default {
28 28
   // 验证用户是否具备某权限
29 29
   hasPermi(permission) {
30
-    return authPermission(permission);
30
+    return authPermission(permission)
31 31
   },
32 32
   // 验证用户是否含有指定权限,只需包含其中一个
33 33
   hasPermiOr(permissions) {
@@ -43,7 +43,7 @@ export default {
43 43
   },
44 44
   // 验证用户是否具备某角色
45 45
   hasRole(role) {
46
-    return authRole(role);
46
+    return authRole(role)
47 47
   },
48 48
   // 验证用户是否含有指定角色,只需包含其中一个
49 49
   hasRoleOr(roles) {

+ 2 - 2
ruoyi-ui/src/plugins/cache.js

@@ -29,7 +29,7 @@ const sessionCache = {
29 29
     return null
30 30
   },
31 31
   remove (key) {
32
-    sessionStorage.removeItem(key);
32
+    sessionStorage.removeItem(key)
33 33
   }
34 34
 }
35 35
 const localCache = {
@@ -63,7 +63,7 @@ const localCache = {
63 63
     return null
64 64
   },
65 65
   remove (key) {
66
-    localStorage.removeItem(key);
66
+    localStorage.removeItem(key)
67 67
   }
68 68
 }
69 69
 

+ 10 - 10
ruoyi-ui/src/plugins/download.js

@@ -3,10 +3,10 @@ import {Loading, Message} from 'element-ui'
3 3
 import { saveAs } from 'file-saver'
4 4
 import { getToken } from '@/utils/auth'
5 5
 import errorCode from '@/utils/errorCode'
6
-import { blobValidate } from "@/utils/ruoyi";
6
+import { blobValidate } from "@/utils/ruoyi"
7 7
 
8 8
 const baseURL = process.env.VUE_APP_BASE_API
9
-let downloadLoadingInstance;
9
+let downloadLoadingInstance
10 10
 
11 11
 export default {
12 12
   zip(url, name) {
@@ -18,28 +18,28 @@ export default {
18 18
       responseType: 'blob',
19 19
       headers: { 'Authorization': 'Bearer ' + getToken() }
20 20
     }).then((res) => {
21
-      const isBlob = blobValidate(res.data);
21
+      const isBlob = blobValidate(res.data)
22 22
       if (isBlob) {
23 23
         const blob = new Blob([res.data], { type: 'application/zip' })
24 24
         this.saveAs(blob, name)
25 25
       } else {
26
-        this.printErrMsg(res.data);
26
+        this.printErrMsg(res.data)
27 27
       }
28
-      downloadLoadingInstance.close();
28
+      downloadLoadingInstance.close()
29 29
     }).catch((r) => {
30 30
       console.error(r)
31 31
       Message.error('下载文件出现错误,请联系管理员!')
32
-      downloadLoadingInstance.close();
32
+      downloadLoadingInstance.close()
33 33
     })
34 34
   },
35 35
   saveAs(text, name, opts) {
36
-    saveAs(text, name, opts);
36
+    saveAs(text, name, opts)
37 37
   },
38 38
   async printErrMsg(data) {
39
-    const resText = await data.text();
40
-    const rspObj = JSON.parse(resText);
39
+    const resText = await data.text()
40
+    const rspObj = JSON.parse(resText)
41 41
     const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
42
-    Message.error(errMsg);
42
+    Message.error(errMsg)
43 43
   }
44 44
 }
45 45
 

+ 3 - 3
ruoyi-ui/src/plugins/modal.js

@@ -1,6 +1,6 @@
1 1
 import { Message, MessageBox, Notification, Loading } from 'element-ui'
2 2
 
3
-let loadingInstance;
3
+let loadingInstance
4 4
 
5 5
 export default {
6 6
   // 消息提示
@@ -41,7 +41,7 @@ export default {
41 41
   },
42 42
   // 错误通知
43 43
   notifyError(content) {
44
-    Notification.error(content);
44
+    Notification.error(content)
45 45
   },
46 46
   // 成功通知
47 47
   notifySuccess(content) {
@@ -78,6 +78,6 @@ export default {
78 78
   },
79 79
   // 关闭遮罩层
80 80
   closeLoading() {
81
-    loadingInstance.close();
81
+    loadingInstance.close()
82 82
   }
83 83
 }

+ 16 - 16
ruoyi-ui/src/plugins/tab.js

@@ -1,18 +1,18 @@
1 1
 import store from '@/store'
2
-import router from '@/router';
2
+import router from '@/router'
3 3
 
4 4
 export default {
5 5
   // 刷新当前tab页签
6 6
   refreshPage(obj) {
7
-    const { path, query, matched } = router.currentRoute;
7
+    const { path, query, matched } = router.currentRoute
8 8
     if (obj === undefined) {
9 9
       matched.forEach((m) => {
10 10
         if (m.components && m.components.default && m.components.default.name) {
11 11
           if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
12
-            obj = { name: m.components.default.name, path: path, query: query };
12
+            obj = { name: m.components.default.name, path: path, query: query }
13 13
           }
14 14
         }
15
-      });
15
+      })
16 16
     }
17 17
     return store.dispatch('tagsView/delCachedView', obj).then(() => {
18 18
       const { path, query } = obj
@@ -24,9 +24,9 @@ export default {
24 24
   },
25 25
   // 关闭当前tab页签,打开新页签
26 26
   closeOpenPage(obj) {
27
-    store.dispatch("tagsView/delView", router.currentRoute);
27
+    store.dispatch("tagsView/delView", router.currentRoute)
28 28
     if (obj !== undefined) {
29
-      return router.push(obj);
29
+      return router.push(obj)
30 30
     }
31 31
   },
32 32
   // 关闭指定tab页签
@@ -37,35 +37,35 @@ export default {
37 37
         if (latestView) {
38 38
           return router.push(latestView.fullPath)
39 39
         }
40
-        return router.push('/');
41
-      });
40
+        return router.push('/')
41
+      })
42 42
     }
43
-    return store.dispatch('tagsView/delView', obj);
43
+    return store.dispatch('tagsView/delView', obj)
44 44
   },
45 45
   // 关闭所有tab页签
46 46
   closeAllPage() {
47
-    return store.dispatch('tagsView/delAllViews');
47
+    return store.dispatch('tagsView/delAllViews')
48 48
   },
49 49
   // 关闭左侧tab页签
50 50
   closeLeftPage(obj) {
51
-    return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute);
51
+    return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute)
52 52
   },
53 53
   // 关闭右侧tab页签
54 54
   closeRightPage(obj) {
55
-    return store.dispatch('tagsView/delRightTags', obj || router.currentRoute);
55
+    return store.dispatch('tagsView/delRightTags', obj || router.currentRoute)
56 56
   },
57 57
   // 关闭其他tab页签
58 58
   closeOtherPage(obj) {
59
-    return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
59
+    return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute)
60 60
   },
61 61
   // 添加tab页签
62 62
   openPage(title, url, params) {
63 63
     const obj = { path: url, meta: { title: title } }
64
-    store.dispatch('tagsView/addView', obj);
65
-    return router.push({ path: url, query: params });
64
+    store.dispatch('tagsView/addView', obj)
65
+    return router.push({ path: url, query: params })
66 66
   },
67 67
   // 修改tab页签
68 68
   updatePage(obj) {
69
-    return store.dispatch('tagsView/updateVisitedView', obj);
69
+    return store.dispatch('tagsView/updateVisitedView', obj)
70 70
   }
71 71
 }

+ 2 - 2
ruoyi-ui/src/router/index.js

@@ -165,8 +165,8 @@ export const dynamicRoutes = [
165 165
 ]
166 166
 
167 167
 // 防止连续点击多次路由报错
168
-let routerPush = Router.prototype.push;
169
-let routerReplace = Router.prototype.replace;
168
+let routerPush = Router.prototype.push
169
+let routerReplace = Router.prototype.replace
170 170
 // push
171 171
 Router.prototype.push = function push(location) {
172 172
   return routerPush.call(this, location).catch(err => err)

+ 1 - 1
ruoyi-ui/src/store/getters.js

@@ -14,6 +14,6 @@ const getters = {
14 14
   permission_routes: state => state.permission.routes,
15 15
   topbarRouters:state => state.permission.topbarRouters,
16 16
   defaultRoutes:state => state.permission.defaultRoutes,
17
-  sidebarRouters:state => state.permission.sidebarRouters,
17
+  sidebarRouters:state => state.permission.sidebarRouters
18 18
 }
19 19
 export default getters

+ 1 - 1
ruoyi-ui/src/store/modules/app.js

@@ -13,7 +13,7 @@ const state = {
13 13
 const mutations = {
14 14
   TOGGLE_SIDEBAR: state => {
15 15
     if (state.sidebar.hide) {
16
-      return false;
16
+      return false
17 17
     }
18 18
     state.sidebar.opened = !state.sidebar.opened
19 19
     state.sidebar.withoutAnimation = false

+ 2 - 2
ruoyi-ui/src/store/modules/permission.js

@@ -38,9 +38,9 @@ const permission = {
38 38
           const rdata = JSON.parse(JSON.stringify(res.data))
39 39
           const sidebarRoutes = filterAsyncRouter(sdata)
40 40
           const rewriteRoutes = filterAsyncRouter(rdata, false, true)
41
-          const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
41
+          const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
42 42
           rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
43
-          router.addRoutes(asyncRoutes);
43
+          router.addRoutes(asyncRoutes)
44 44
           commit('SET_ROUTES', rewriteRoutes)
45 45
           commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
46 46
           commit('SET_DEFAULT_ROUTES', sidebarRoutes)

+ 1 - 1
ruoyi-ui/src/utils/dict/Dict.js

@@ -1,5 +1,5 @@
1 1
 import Vue from 'vue'
2
-import { mergeRecursive } from "@/utils/ruoyi";
2
+import { mergeRecursive } from "@/utils/ruoyi"
3 3
 import DictMeta from './DictMeta'
4 4
 import DictData from './DictData'
5 5
 

+ 1 - 1
ruoyi-ui/src/utils/dict/DictMeta.js

@@ -1,4 +1,4 @@
1
-import { mergeRecursive } from "@/utils/ruoyi";
1
+import { mergeRecursive } from "@/utils/ruoyi"
2 2
 import DictOptions from './DictOptions'
3 3
 
4 4
 /**

+ 1 - 1
ruoyi-ui/src/utils/dict/DictOptions.js

@@ -1,4 +1,4 @@
1
-import { mergeRecursive } from "@/utils/ruoyi";
1
+import { mergeRecursive } from "@/utils/ruoyi"
2 2
 import dictConverter from './DictConverter'
3 3
 
4 4
 export const options = {

+ 1 - 1
ruoyi-ui/src/utils/index.js

@@ -4,7 +4,7 @@ import { parseTime } from './ruoyi'
4 4
  * 表格时间格式化
5 5
  */
6 6
 export function formatDate(cellValue) {
7
-  if (cellValue == null || cellValue == "") return "";
7
+  if (cellValue == null || cellValue == "") return ""
8 8
   var date = new Date(cellValue)
9 9
   var year = date.getFullYear()
10 10
   var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1

+ 4 - 4
ruoyi-ui/src/utils/permission.js

@@ -9,13 +9,13 @@ export function checkPermi(value) {
9 9
   if (value && value instanceof Array && value.length > 0) {
10 10
     const permissions = store.getters && store.getters.permissions
11 11
     const permissionDatas = value
12
-    const all_permission = "*:*:*";
12
+    const all_permission = "*:*:*"
13 13
 
14 14
     const hasPermission = permissions.some(permission => {
15 15
       return all_permission === permission || permissionDatas.includes(permission)
16 16
     })
17 17
 
18
-    return hasPermission;
18
+    return hasPermission
19 19
 
20 20
   } else {
21 21
     console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
@@ -32,13 +32,13 @@ export function checkRole(value) {
32 32
   if (value && value instanceof Array && value.length > 0) {
33 33
     const roles = store.getters && store.getters.roles
34 34
     const permissionRoles = value
35
-    const super_admin = "admin";
35
+    const super_admin = "admin"
36 36
 
37 37
     const hasRole = roles.some(role => {
38 38
       return super_admin === role || permissionRoles.includes(role)
39 39
     })
40 40
 
41
-    return hasRole;
41
+    return hasRole
42 42
 
43 43
   } else {
44 44
     console.error(`need roles! Like checkRole="['admin','editor']"`)

+ 31 - 31
ruoyi-ui/src/utils/request.js

@@ -3,13 +3,13 @@ import { Notification, MessageBox, Message, Loading } from 'element-ui'
3 3
 import store from '@/store'
4 4
 import { getToken } from '@/utils/auth'
5 5
 import errorCode from '@/utils/errorCode'
6
-import { tansParams, blobValidate } from "@/utils/ruoyi";
6
+import { tansParams, blobValidate } from "@/utils/ruoyi"
7 7
 import cache from '@/plugins/cache'
8 8
 import { saveAs } from 'file-saver'
9 9
 
10
-let downloadLoadingInstance;
10
+let downloadLoadingInstance
11 11
 // 是否显示重新登录
12
-export let isRelogin = { show: false };
12
+export let isRelogin = { show: false }
13 13
 
14 14
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
15 15
 // 创建axios实例
@@ -31,10 +31,10 @@ service.interceptors.request.use(config => {
31 31
   }
32 32
   // get请求映射params参数
33 33
   if (config.method === 'get' && config.params) {
34
-    let url = config.url + '?' + tansParams(config.params);
35
-    url = url.slice(0, -1);
36
-    config.params = {};
37
-    config.url = url;
34
+    let url = config.url + '?' + tansParams(config.params)
35
+    url = url.slice(0, -1)
36
+    config.params = {}
37
+    config.url = url
38 38
   }
39 39
   if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
40 40
     const requestObj = {
@@ -42,22 +42,22 @@ service.interceptors.request.use(config => {
42 42
       data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
43 43
       time: new Date().getTime()
44 44
     }
45
-    const requestSize = Object.keys(JSON.stringify(requestObj)).length; // 请求数据大小
46
-    const limitSize = 5 * 1024 * 1024; // 限制存放数据5M
45
+    const requestSize = Object.keys(JSON.stringify(requestObj)).length // 请求数据大小
46
+    const limitSize = 5 * 1024 * 1024 // 限制存放数据5M
47 47
     if (requestSize >= limitSize) {
48 48
       console.warn(`[${config.url}]: ` + '请求数据大小超出允许的5M限制,无法进行防重复提交验证。')
49
-      return config;
49
+      return config
50 50
     }
51 51
     const sessionObj = cache.session.getJSON('sessionObj')
52 52
     if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
53 53
       cache.session.setJSON('sessionObj', requestObj)
54 54
     } else {
55
-      const s_url = sessionObj.url;                  // 请求地址
56
-      const s_data = sessionObj.data;                // 请求数据
57
-      const s_time = sessionObj.time;                // 请求时间
58
-      const interval = 1000;                         // 间隔时间(ms),小于此时间视为重复提交
55
+      const s_url = sessionObj.url                  // 请求地址
56
+      const s_data = sessionObj.data                // 请求数据
57
+      const s_time = sessionObj.time                // 请求时间
58
+      const interval = 1000                         // 间隔时间(ms),小于此时间视为重复提交
59 59
       if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
60
-        const message = '数据正在处理,请勿重复提交';
60
+        const message = '数据正在处理,请勿重复提交'
61 61
         console.warn(`[${s_url}]: ` + message)
62 62
         return Promise.reject(new Error(message))
63 63
       } else {
@@ -74,7 +74,7 @@ service.interceptors.request.use(config => {
74 74
 // 响应拦截器
75 75
 service.interceptors.response.use(res => {
76 76
     // 未设置状态码则默认成功状态
77
-    const code = res.data.code || 200;
77
+    const code = res.data.code || 200
78 78
     // 获取错误信息
79 79
     const msg = errorCode[code] || res.data.msg || errorCode['default']
80 80
     // 二进制数据则直接返回
@@ -83,15 +83,15 @@ service.interceptors.response.use(res => {
83 83
     }
84 84
     if (code === 401) {
85 85
       if (!isRelogin.show) {
86
-        isRelogin.show = true;
86
+        isRelogin.show = true
87 87
         MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
88
-          isRelogin.show = false;
88
+          isRelogin.show = false
89 89
           store.dispatch('LogOut').then(() => {
90
-            location.href = '/index';
90
+            location.href = '/index'
91 91
           })
92 92
       }).catch(() => {
93
-        isRelogin.show = false;
94
-      });
93
+        isRelogin.show = false
94
+      })
95 95
     }
96 96
       return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
97 97
     } else if (code === 500) {
@@ -109,13 +109,13 @@ service.interceptors.response.use(res => {
109 109
   },
110 110
   error => {
111 111
     console.log('err' + error)
112
-    let { message } = error;
112
+    let { message } = error
113 113
     if (message == "Network Error") {
114
-      message = "后端接口连接异常";
114
+      message = "后端接口连接异常"
115 115
     } else if (message.includes("timeout")) {
116
-      message = "系统接口请求超时";
116
+      message = "系统接口请求超时"
117 117
     } else if (message.includes("Request failed with status code")) {
118
-      message = "系统接口" + message.substr(message.length - 3) + "异常";
118
+      message = "系统接口" + message.substr(message.length - 3) + "异常"
119 119
     }
120 120
     Message({ message: message, type: 'error', duration: 5 * 1000 })
121 121
     return Promise.reject(error)
@@ -131,21 +131,21 @@ export function download(url, params, filename, config) {
131 131
     responseType: 'blob',
132 132
     ...config
133 133
   }).then(async (data) => {
134
-    const isBlob = blobValidate(data);
134
+    const isBlob = blobValidate(data)
135 135
     if (isBlob) {
136 136
       const blob = new Blob([data])
137 137
       saveAs(blob, filename)
138 138
     } else {
139
-      const resText = await data.text();
140
-      const rspObj = JSON.parse(resText);
139
+      const resText = await data.text()
140
+      const rspObj = JSON.parse(resText)
141 141
       const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
142
-      Message.error(errMsg);
142
+      Message.error(errMsg)
143 143
     }
144
-    downloadLoadingInstance.close();
144
+    downloadLoadingInstance.close()
145 145
   }).catch((r) => {
146 146
     console.error(r)
147 147
     Message.error('下载文件出现错误,请联系管理员!')
148
-    downloadLoadingInstance.close();
148
+    downloadLoadingInstance.close()
149 149
   })
150 150
 }
151 151
 

+ 55 - 55
ruoyi-ui/src/utils/ruoyi.js

@@ -16,7 +16,7 @@ export function parseTime(time, pattern) {
16 16
     if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
17 17
       time = parseInt(time)
18 18
     } else if (typeof time === 'string') {
19
-      time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
19
+      time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '')
20 20
     }
21 21
     if ((typeof time === 'number') && (time.toString().length === 10)) {
22 22
       time = time * 1000
@@ -47,89 +47,89 @@ export function parseTime(time, pattern) {
47 47
 // 表单重置
48 48
 export function resetForm(refName) {
49 49
   if (this.$refs[refName]) {
50
-    this.$refs[refName].resetFields();
50
+    this.$refs[refName].resetFields()
51 51
   }
52 52
 }
53 53
 
54 54
 // 添加日期范围
55 55
 export function addDateRange(params, dateRange, propName) {
56
-  let search = params;
57
-  search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
58
-  dateRange = Array.isArray(dateRange) ? dateRange : [];
56
+  let search = params
57
+  search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {}
58
+  dateRange = Array.isArray(dateRange) ? dateRange : []
59 59
   if (typeof (propName) === 'undefined') {
60
-    search.params['beginTime'] = dateRange[0];
61
-    search.params['endTime'] = dateRange[1];
60
+    search.params['beginTime'] = dateRange[0]
61
+    search.params['endTime'] = dateRange[1]
62 62
   } else {
63
-    search.params['begin' + propName] = dateRange[0];
64
-    search.params['end' + propName] = dateRange[1];
63
+    search.params['begin' + propName] = dateRange[0]
64
+    search.params['end' + propName] = dateRange[1]
65 65
   }
66
-  return search;
66
+  return search
67 67
 }
68 68
 
69 69
 // 回显数据字典
70 70
 export function selectDictLabel(datas, value) {
71 71
   if (value === undefined) {
72
-    return "";
72
+    return ""
73 73
   }
74
-  var actions = [];
74
+  var actions = []
75 75
   Object.keys(datas).some((key) => {
76 76
     if (datas[key].value == ('' + value)) {
77
-      actions.push(datas[key].label);
78
-      return true;
77
+      actions.push(datas[key].label)
78
+      return true
79 79
     }
80 80
   })
81 81
   if (actions.length === 0) {
82
-    actions.push(value);
82
+    actions.push(value)
83 83
   }
84
-  return actions.join('');
84
+  return actions.join('')
85 85
 }
86 86
 
87 87
 // 回显数据字典(字符串、数组)
88 88
 export function selectDictLabels(datas, value, separator) {
89 89
   if (value === undefined || value.length ===0) {
90
-    return "";
90
+    return ""
91 91
   }
92 92
   if (Array.isArray(value)) {
93
-    value = value.join(",");
93
+    value = value.join(",")
94 94
   }
95
-  var actions = [];
96
-  var currentSeparator = undefined === separator ? "," : separator;
97
-  var temp = value.split(currentSeparator);
95
+  var actions = []
96
+  var currentSeparator = undefined === separator ? "," : separator
97
+  var temp = value.split(currentSeparator)
98 98
   Object.keys(value.split(currentSeparator)).some((val) => {
99
-    var match = false;
99
+    var match = false
100 100
     Object.keys(datas).some((key) => {
101 101
       if (datas[key].value == ('' + temp[val])) {
102
-        actions.push(datas[key].label + currentSeparator);
103
-        match = true;
102
+        actions.push(datas[key].label + currentSeparator)
103
+        match = true
104 104
       }
105 105
     })
106 106
     if (!match) {
107
-      actions.push(temp[val] + currentSeparator);
107
+      actions.push(temp[val] + currentSeparator)
108 108
     }
109 109
   })
110
-  return actions.join('').substring(0, actions.join('').length - 1);
110
+  return actions.join('').substring(0, actions.join('').length - 1)
111 111
 }
112 112
 
113 113
 // 字符串格式化(%s )
114 114
 export function sprintf(str) {
115
-  var args = arguments, flag = true, i = 1;
115
+  var args = arguments, flag = true, i = 1
116 116
   str = str.replace(/%s/g, function () {
117
-    var arg = args[i++];
117
+    var arg = args[i++]
118 118
     if (typeof arg === 'undefined') {
119
-      flag = false;
120
-      return '';
119
+      flag = false
120
+      return ''
121 121
     }
122
-    return arg;
123
-  });
124
-  return flag ? str : '';
122
+    return arg
123
+  })
124
+  return flag ? str : ''
125 125
 }
126 126
 
127 127
 // 转换字符串,undefined,null等转化为""
128 128
 export function parseStrEmpty(str) {
129 129
   if (!str || str == "undefined" || str == "null") {
130
-    return "";
130
+    return ""
131 131
   }
132
-  return str;
132
+  return str
133 133
 }
134 134
 
135 135
 // 数据合并
@@ -137,16 +137,16 @@ export function mergeRecursive(source, target) {
137 137
   for (var p in target) {
138 138
     try {
139 139
       if (target[p].constructor == Object) {
140
-        source[p] = mergeRecursive(source[p], target[p]);
140
+        source[p] = mergeRecursive(source[p], target[p])
141 141
       } else {
142
-        source[p] = target[p];
142
+        source[p] = target[p]
143 143
       }
144 144
     } catch (e) {
145
-      source[p] = target[p];
145
+      source[p] = target[p]
146 146
     }
147 147
   }
148
-  return source;
149
-};
148
+  return source
149
+}
150 150
 
151 151
 /**
152 152
  * 构造树型结构数据
@@ -160,15 +160,15 @@ export function handleTree(data, id, parentId, children) {
160 160
     id: id || 'id',
161 161
     parentId: parentId || 'parentId',
162 162
     childrenList: children || 'children'
163
-  };
163
+  }
164 164
 
165
-  var childrenListMap = {};
166
-  var tree = [];
165
+  var childrenListMap = {}
166
+  var tree = []
167 167
   for (let d of data) {
168
-    let id = d[config.id];
169
-    childrenListMap[id] = d;
168
+    let id = d[config.id]
169
+    childrenListMap[id] = d
170 170
     if (!d[config.childrenList]) {
171
-      d[config.childrenList] = [];
171
+      d[config.childrenList] = []
172 172
     }
173 173
   }
174 174
 
@@ -176,12 +176,12 @@ export function handleTree(data, id, parentId, children) {
176 176
     let parentId = d[config.parentId]
177 177
     let parentObj = childrenListMap[parentId]
178 178
     if (!parentObj) {
179
-      tree.push(d);
179
+      tree.push(d)
180 180
     } else {
181 181
       parentObj[config.childrenList].push(d)
182 182
     }
183 183
   }
184
-  return tree;
184
+  return tree
185 185
 }
186 186
 
187 187
 /**
@@ -191,19 +191,19 @@ export function handleTree(data, id, parentId, children) {
191 191
 export function tansParams(params) {
192 192
   let result = ''
193 193
   for (const propName of Object.keys(params)) {
194
-    const value = params[propName];
195
-    var part = encodeURIComponent(propName) + "=";
194
+    const value = params[propName]
195
+    var part = encodeURIComponent(propName) + "="
196 196
     if (value !== null && value !== "" && typeof (value) !== "undefined") {
197 197
       if (typeof value === 'object') {
198 198
         for (const key of Object.keys(value)) {
199 199
           if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
200
-            let params = propName + '[' + key + ']';
201
-            var subPart = encodeURIComponent(params) + "=";
202
-            result += subPart + encodeURIComponent(value[key]) + "&";
200
+            let params = propName + '[' + key + ']'
201
+            var subPart = encodeURIComponent(params) + "="
202
+            result += subPart + encodeURIComponent(value[key]) + "&"
203 203
           }
204 204
         }
205 205
       } else {
206
-        result += part + encodeURIComponent(value) + "&";
206
+        result += part + encodeURIComponent(value) + "&"
207 207
       }
208 208
     }
209 209
   }
@@ -214,7 +214,7 @@ export function tansParams(params) {
214 214
 export function getNormalPath(p) {
215 215
   if (p.length === 0 || !p || p == 'undefined') {
216 216
     return p
217
-  };
217
+  }
218 218
   let res = p.replace('//', '/')
219 219
   if (res[res.length - 1] === '/') {
220 220
     return res.slice(0, res.length - 1)

+ 6 - 6
ruoyi-ui/src/views/index.vue

@@ -909,15 +909,15 @@ export default {
909 909
   data() {
910 910
     return {
911 911
       // 版本号
912
-      version: "3.6.5",
913
-    };
912
+      version: "3.6.5"
913
+    }
914 914
   },
915 915
   methods: {
916 916
     goTarget(href) {
917
-      window.open(href, "_blank");
918
-    },
919
-  },
920
-};
917
+      window.open(href, "_blank")
918
+    }
919
+  }
920
+}
921 921
 </script>
922 922
 
923 923
 <style scoped lang="scss">

+ 26 - 26
ruoyi-ui/src/views/login.vue

@@ -62,8 +62,8 @@
62 62
 </template>
63 63
 
64 64
 <script>
65
-import { getCodeImg } from "@/api/login";
66
-import Cookies from "js-cookie";
65
+import { getCodeImg } from "@/api/login"
66
+import Cookies from "js-cookie"
67 67
 import { encrypt, decrypt } from '@/utils/jsencrypt'
68 68
 
69 69
 export default {
@@ -94,66 +94,66 @@ export default {
94 94
       // 注册开关
95 95
       register: false,
96 96
       redirect: undefined
97
-    };
97
+    }
98 98
   },
99 99
   watch: {
100 100
     $route: {
101 101
       handler: function(route) {
102
-        this.redirect = route.query && route.query.redirect;
102
+        this.redirect = route.query && route.query.redirect
103 103
       },
104 104
       immediate: true
105 105
     }
106 106
   },
107 107
   created() {
108
-    this.getCode();
109
-    this.getCookie();
108
+    this.getCode()
109
+    this.getCookie()
110 110
   },
111 111
   methods: {
112 112
     getCode() {
113 113
       getCodeImg().then(res => {
114
-        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
114
+        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
115 115
         if (this.captchaEnabled) {
116
-          this.codeUrl = "data:image/gif;base64," + res.img;
117
-          this.loginForm.uuid = res.uuid;
116
+          this.codeUrl = "data:image/gif;base64," + res.img
117
+          this.loginForm.uuid = res.uuid
118 118
         }
119
-      });
119
+      })
120 120
     },
121 121
     getCookie() {
122
-      const username = Cookies.get("username");
123
-      const password = Cookies.get("password");
122
+      const username = Cookies.get("username")
123
+      const password = Cookies.get("password")
124 124
       const rememberMe = Cookies.get('rememberMe')
125 125
       this.loginForm = {
126 126
         username: username === undefined ? this.loginForm.username : username,
127 127
         password: password === undefined ? this.loginForm.password : decrypt(password),
128 128
         rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
129
-      };
129
+      }
130 130
     },
131 131
     handleLogin() {
132 132
       this.$refs.loginForm.validate(valid => {
133 133
         if (valid) {
134
-          this.loading = true;
134
+          this.loading = true
135 135
           if (this.loginForm.rememberMe) {
136
-            Cookies.set("username", this.loginForm.username, { expires: 30 });
137
-            Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
138
-            Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
136
+            Cookies.set("username", this.loginForm.username, { expires: 30 })
137
+            Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 })
138
+            Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 })
139 139
           } else {
140
-            Cookies.remove("username");
141
-            Cookies.remove("password");
142
-            Cookies.remove('rememberMe');
140
+            Cookies.remove("username")
141
+            Cookies.remove("password")
142
+            Cookies.remove('rememberMe')
143 143
           }
144 144
           this.$store.dispatch("Login", this.loginForm).then(() => {
145
-            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
145
+            this.$router.push({ path: this.redirect || "/" }).catch(()=>{})
146 146
           }).catch(() => {
147
-            this.loading = false;
147
+            this.loading = false
148 148
             if (this.captchaEnabled) {
149
-              this.getCode();
149
+              this.getCode()
150 150
             }
151
-          });
151
+          })
152 152
         }
153
-      });
153
+      })
154 154
     }
155 155
   }
156
-};
156
+}
157 157
 </script>
158 158
 
159 159
 <style rel="stylesheet/scss" lang="scss">

+ 18 - 18
ruoyi-ui/src/views/register.vue

@@ -67,18 +67,18 @@
67 67
 </template>
68 68
 
69 69
 <script>
70
-import { getCodeImg, register } from "@/api/login";
70
+import { getCodeImg, register } from "@/api/login"
71 71
 
72 72
 export default {
73 73
   name: "Register",
74 74
   data() {
75 75
     const equalToPassword = (rule, value, callback) => {
76 76
       if (this.registerForm.password !== value) {
77
-        callback(new Error("两次输入的密码不一致"));
77
+        callback(new Error("两次输入的密码不一致"))
78 78
       } else {
79
-        callback();
79
+        callback()
80 80
       }
81
-    };
81
+    }
82 82
     return {
83 83
       title: process.env.VUE_APP_TITLE,
84 84
       codeUrl: "",
@@ -107,44 +107,44 @@ export default {
107 107
       },
108 108
       loading: false,
109 109
       captchaEnabled: true
110
-    };
110
+    }
111 111
   },
112 112
   created() {
113
-    this.getCode();
113
+    this.getCode()
114 114
   },
115 115
   methods: {
116 116
     getCode() {
117 117
       getCodeImg().then(res => {
118
-        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
118
+        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
119 119
         if (this.captchaEnabled) {
120
-          this.codeUrl = "data:image/gif;base64," + res.img;
121
-          this.registerForm.uuid = res.uuid;
120
+          this.codeUrl = "data:image/gif;base64," + res.img
121
+          this.registerForm.uuid = res.uuid
122 122
         }
123
-      });
123
+      })
124 124
     },
125 125
     handleRegister() {
126 126
       this.$refs.registerForm.validate(valid => {
127 127
         if (valid) {
128
-          this.loading = true;
128
+          this.loading = true
129 129
           register(this.registerForm).then(res => {
130
-            const username = this.registerForm.username;
130
+            const username = this.registerForm.username
131 131
             this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
132 132
               dangerouslyUseHTMLString: true,
133 133
               type: 'success'
134 134
             }).then(() => {
135
-              this.$router.push("/login");
136
-            }).catch(() => {});
135
+              this.$router.push("/login")
136
+            }).catch(() => {})
137 137
           }).catch(() => {
138
-            this.loading = false;
138
+            this.loading = false
139 139
             if (this.captchaEnabled) {
140
-              this.getCode();
140
+              this.getCode()
141 141
             }
142 142
           })
143 143
         }
144
-      });
144
+      })
145 145
     }
146 146
   }
147
-};
147
+}
148 148
 </script>
149 149
 
150 150
 <style rel="stylesheet/scss" lang="scss">

+ 44 - 44
ruoyi-ui/src/views/system/config/index.vue

@@ -181,7 +181,7 @@
181 181
 </template>
182 182
 
183 183
 <script>
184
-import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
184
+import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config"
185 185
 
186 186
 export default {
187 187
   name: "Config",
@@ -230,26 +230,26 @@ export default {
230 230
           { required: true, message: "参数键值不能为空", trigger: "blur" }
231 231
         ]
232 232
       }
233
-    };
233
+    }
234 234
   },
235 235
   created() {
236
-    this.getList();
236
+    this.getList()
237 237
   },
238 238
   methods: {
239 239
     /** 查询参数列表 */
240 240
     getList() {
241
-      this.loading = true;
241
+      this.loading = true
242 242
       listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
243
-          this.configList = response.rows;
244
-          this.total = response.total;
245
-          this.loading = false;
243
+          this.configList = response.rows
244
+          this.total = response.total
245
+          this.loading = false
246 246
         }
247
-      );
247
+      )
248 248
     },
249 249
     // 取消按钮
250 250
     cancel() {
251
-      this.open = false;
252
-      this.reset();
251
+      this.open = false
252
+      this.reset()
253 253
     },
254 254
     // 表单重置
255 255
     reset() {
@@ -260,25 +260,25 @@ export default {
260 260
         configValue: undefined,
261 261
         configType: "Y",
262 262
         remark: undefined
263
-      };
264
-      this.resetForm("form");
263
+      }
264
+      this.resetForm("form")
265 265
     },
266 266
     /** 搜索按钮操作 */
267 267
     handleQuery() {
268
-      this.queryParams.pageNum = 1;
269
-      this.getList();
268
+      this.queryParams.pageNum = 1
269
+      this.getList()
270 270
     },
271 271
     /** 重置按钮操作 */
272 272
     resetQuery() {
273
-      this.dateRange = [];
274
-      this.resetForm("queryForm");
275
-      this.handleQuery();
273
+      this.dateRange = []
274
+      this.resetForm("queryForm")
275
+      this.handleQuery()
276 276
     },
277 277
     /** 新增按钮操作 */
278 278
     handleAdd() {
279
-      this.reset();
280
-      this.open = true;
281
-      this.title = "添加参数";
279
+      this.reset()
280
+      this.open = true
281
+      this.title = "添加参数"
282 282
     },
283 283
     // 多选框选中数据
284 284
     handleSelectionChange(selection) {
@@ -288,13 +288,13 @@ export default {
288 288
     },
289 289
     /** 修改按钮操作 */
290 290
     handleUpdate(row) {
291
-      this.reset();
291
+      this.reset()
292 292
       const configId = row.configId || this.ids
293 293
       getConfig(configId).then(response => {
294
-        this.form = response.data;
295
-        this.open = true;
296
-        this.title = "修改参数";
297
-      });
294
+        this.form = response.data
295
+        this.open = true
296
+        this.title = "修改参数"
297
+      })
298 298
     },
299 299
     /** 提交按钮 */
300 300
     submitForm: function() {
@@ -302,29 +302,29 @@ export default {
302 302
         if (valid) {
303 303
           if (this.form.configId != undefined) {
304 304
             updateConfig(this.form).then(response => {
305
-              this.$modal.msgSuccess("修改成功");
306
-              this.open = false;
307
-              this.getList();
308
-            });
305
+              this.$modal.msgSuccess("修改成功")
306
+              this.open = false
307
+              this.getList()
308
+            })
309 309
           } else {
310 310
             addConfig(this.form).then(response => {
311
-              this.$modal.msgSuccess("新增成功");
312
-              this.open = false;
313
-              this.getList();
314
-            });
311
+              this.$modal.msgSuccess("新增成功")
312
+              this.open = false
313
+              this.getList()
314
+            })
315 315
           }
316 316
         }
317
-      });
317
+      })
318 318
     },
319 319
     /** 删除按钮操作 */
320 320
     handleDelete(row) {
321
-      const configIds = row.configId || this.ids;
321
+      const configIds = row.configId || this.ids
322 322
       this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function() {
323
-          return delConfig(configIds);
324
-        }).then(() => {
325
-          this.getList();
326
-          this.$modal.msgSuccess("删除成功");
327
-        }).catch(() => {});
323
+        return delConfig(configIds)
324
+      }).then(() => {
325
+        this.getList()
326
+        this.$modal.msgSuccess("删除成功")
327
+      }).catch(() => {})
328 328
     },
329 329
     /** 导出按钮操作 */
330 330
     handleExport() {
@@ -335,9 +335,9 @@ export default {
335 335
     /** 刷新缓存按钮操作 */
336 336
     handleRefreshCache() {
337 337
       refreshCache().then(() => {
338
-        this.$modal.msgSuccess("刷新成功");
339
-      });
338
+        this.$modal.msgSuccess("刷新成功")
339
+      })
340 340
     }
341 341
   }
342
-};
343
-</script>
342
+}
343
+</script>

+ 54 - 50
ruoyi-ui/src/views/system/dept/index.vue

@@ -158,9 +158,9 @@
158 158
 </template>
159 159
 
160 160
 <script>
161
-import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
162
-import Treeselect from "@riophae/vue-treeselect";
163
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
161
+import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept"
162
+import Treeselect from "@riophae/vue-treeselect"
163
+import "@riophae/vue-treeselect/dist/vue-treeselect.css"
164 164
 
165 165
 export default {
166 166
   name: "Dept",
@@ -217,35 +217,35 @@ export default {
217 217
           }
218 218
         ]
219 219
       }
220
-    };
220
+    }
221 221
   },
222 222
   created() {
223
-    this.getList();
223
+    this.getList()
224 224
   },
225 225
   methods: {
226 226
     /** 查询部门列表 */
227 227
     getList() {
228
-      this.loading = true;
228
+      this.loading = true
229 229
       listDept(this.queryParams).then(response => {
230
-        this.deptList = this.handleTree(response.data, "deptId");
231
-        this.loading = false;
232
-      });
230
+        this.deptList = this.handleTree(response.data, "deptId")
231
+        this.loading = false
232
+      })
233 233
     },
234 234
     /** 转换部门数据结构 */
235 235
     normalizer(node) {
236 236
       if (node.children && !node.children.length) {
237
-        delete node.children;
237
+        delete node.children
238 238
       }
239 239
       return {
240 240
         id: node.deptId,
241 241
         label: node.deptName,
242 242
         children: node.children
243
-      };
243
+      }
244 244
     },
245 245
     // 取消按钮
246 246
     cancel() {
247
-      this.open = false;
248
-      this.reset();
247
+      this.open = false
248
+      this.reset()
249 249
     },
250 250
     // 表单重置
251 251
     reset() {
@@ -258,49 +258,53 @@ export default {
258 258
         phone: undefined,
259 259
         email: undefined,
260 260
         status: "0"
261
-      };
262
-      this.resetForm("form");
261
+      }
262
+      this.resetForm("form")
263 263
     },
264 264
     /** 搜索按钮操作 */
265 265
     handleQuery() {
266
-      this.getList();
266
+      this.getList()
267 267
     },
268 268
     /** 重置按钮操作 */
269 269
     resetQuery() {
270
-      this.resetForm("queryForm");
271
-      this.handleQuery();
270
+      this.resetForm("queryForm")
271
+      this.handleQuery()
272 272
     },
273 273
     /** 新增按钮操作 */
274 274
     handleAdd(row) {
275
-      this.reset();
275
+      this.reset()
276 276
       if (row != undefined) {
277
-        this.form.parentId = row.deptId;
277
+        this.form.parentId = row.deptId
278 278
       }
279
-      this.open = true;
280
-      this.title = "添加部门";
279
+      this.open = true
280
+      this.title = "添加部门"
281 281
       listDept().then(response => {
282
-        this.deptOptions = this.handleTree(response.data, "deptId");
283
-      });
282
+        this.deptOptions = this.handleTree(response.data, "deptId")
283
+      })
284 284
     },
285 285
     /** 展开/折叠操作 */
286 286
     toggleExpandAll() {
287
-      this.refreshTable = false;
288
-      this.isExpandAll = !this.isExpandAll;
287
+      this.refreshTable = false
288
+      this.isExpandAll = !this.isExpandAll
289 289
       this.$nextTick(() => {
290
-        this.refreshTable = true;
291
-      });
290
+        this.refreshTable = true
291
+      })
292 292
     },
293 293
     /** 修改按钮操作 */
294 294
     handleUpdate(row) {
295
-      this.reset();
295
+      this.reset()
296 296
       getDept(row.deptId).then(response => {
297
-        this.form = response.data;
298
-        this.open = true;
299
-        this.title = "修改部门";
300
-      });
301
-      listDeptExcludeChild(row.deptId).then(response => {
302
-        this.deptOptions = this.handleTree(response.data, "deptId");
303
-      });
297
+        this.form = response.data
298
+        this.open = true
299
+        this.title = "修改部门"
300
+        listDeptExcludeChild(row.deptId).then(response => {
301
+          this.deptOptions = this.handleTree(response.data, "deptId")
302
+          if (this.deptOptions.length == 0) {
303
+            const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] }
304
+            this.deptOptions.push(noResultsOptions)
305
+          }
306
+        })
307
+      })
304 308
     },
305 309
     /** 提交按钮 */
306 310
     submitForm: function() {
@@ -308,29 +312,29 @@ export default {
308 312
         if (valid) {
309 313
           if (this.form.deptId != undefined) {
310 314
             updateDept(this.form).then(response => {
311
-              this.$modal.msgSuccess("修改成功");
312
-              this.open = false;
313
-              this.getList();
314
-            });
315
+              this.$modal.msgSuccess("修改成功")
316
+              this.open = false
317
+              this.getList()
318
+            })
315 319
           } else {
316 320
             addDept(this.form).then(response => {
317
-              this.$modal.msgSuccess("新增成功");
318
-              this.open = false;
319
-              this.getList();
320
-            });
321
+              this.$modal.msgSuccess("新增成功")
322
+              this.open = false
323
+              this.getList()
324
+            })
321 325
           }
322 326
         }
323
-      });
327
+      })
324 328
     },
325 329
     /** 删除按钮操作 */
326 330
     handleDelete(row) {
327 331
       this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function() {
328
-        return delDept(row.deptId);
332
+        return delDept(row.deptId)
329 333
       }).then(() => {
330
-        this.getList();
331
-        this.$modal.msgSuccess("删除成功");
332
-      }).catch(() => {});
334
+        this.getList()
335
+        this.$modal.msgSuccess("删除成功")
336
+      }).catch(() => {})
333 337
     }
334 338
   }
335
-};
339
+}
336 340
 </script>

+ 55 - 55
ruoyi-ui/src/views/system/dict/data.vue

@@ -190,8 +190,8 @@
190 190
 </template>
191 191
 
192 192
 <script>
193
-import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
194
-import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
193
+import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data"
194
+import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type"
195 195
 
196 196
 export default {
197 197
   name: "Data",
@@ -269,41 +269,41 @@ export default {
269 269
           { required: true, message: "数据顺序不能为空", trigger: "blur" }
270 270
         ]
271 271
       }
272
-    };
272
+    }
273 273
   },
274 274
   created() {
275
-    const dictId = this.$route.params && this.$route.params.dictId;
276
-    this.getType(dictId);
277
-    this.getTypeList();
275
+    const dictId = this.$route.params && this.$route.params.dictId
276
+    this.getType(dictId)
277
+    this.getTypeList()
278 278
   },
279 279
   methods: {
280 280
     /** 查询字典类型详细 */
281 281
     getType(dictId) {
282 282
       getType(dictId).then(response => {
283
-        this.queryParams.dictType = response.data.dictType;
284
-        this.defaultDictType = response.data.dictType;
285
-        this.getList();
286
-      });
283
+        this.queryParams.dictType = response.data.dictType
284
+        this.defaultDictType = response.data.dictType
285
+        this.getList()
286
+      })
287 287
     },
288 288
     /** 查询字典类型列表 */
289 289
     getTypeList() {
290 290
       getDictOptionselect().then(response => {
291
-        this.typeOptions = response.data;
292
-      });
291
+        this.typeOptions = response.data
292
+      })
293 293
     },
294 294
     /** 查询字典数据列表 */
295 295
     getList() {
296
-      this.loading = true;
296
+      this.loading = true
297 297
       listData(this.queryParams).then(response => {
298
-        this.dataList = response.rows;
299
-        this.total = response.total;
300
-        this.loading = false;
301
-      });
298
+        this.dataList = response.rows
299
+        this.total = response.total
300
+        this.loading = false
301
+      })
302 302
     },
303 303
     // 取消按钮
304 304
     cancel() {
305
-      this.open = false;
306
-      this.reset();
305
+      this.open = false
306
+      this.reset()
307 307
     },
308 308
     // 表单重置
309 309
     reset() {
@@ -316,31 +316,31 @@ export default {
316 316
         dictSort: 0,
317 317
         status: "0",
318 318
         remark: undefined
319
-      };
320
-      this.resetForm("form");
319
+      }
320
+      this.resetForm("form")
321 321
     },
322 322
     /** 搜索按钮操作 */
323 323
     handleQuery() {
324
-      this.queryParams.pageNum = 1;
325
-      this.getList();
324
+      this.queryParams.pageNum = 1
325
+      this.getList()
326 326
     },
327 327
     /** 返回按钮操作 */
328 328
     handleClose() {
329
-      const obj = { path: "/system/dict" };
330
-      this.$tab.closeOpenPage(obj);
329
+      const obj = { path: "/system/dict" }
330
+      this.$tab.closeOpenPage(obj)
331 331
     },
332 332
     /** 重置按钮操作 */
333 333
     resetQuery() {
334
-      this.resetForm("queryForm");
335
-      this.queryParams.dictType = this.defaultDictType;
336
-      this.handleQuery();
334
+      this.resetForm("queryForm")
335
+      this.queryParams.dictType = this.defaultDictType
336
+      this.handleQuery()
337 337
     },
338 338
     /** 新增按钮操作 */
339 339
     handleAdd() {
340
-      this.reset();
341
-      this.open = true;
342
-      this.title = "添加字典数据";
343
-      this.form.dictType = this.queryParams.dictType;
340
+      this.reset()
341
+      this.open = true
342
+      this.title = "添加字典数据"
343
+      this.form.dictType = this.queryParams.dictType
344 344
     },
345 345
     // 多选框选中数据
346 346
     handleSelectionChange(selection) {
@@ -350,13 +350,13 @@ export default {
350 350
     },
351 351
     /** 修改按钮操作 */
352 352
     handleUpdate(row) {
353
-      this.reset();
353
+      this.reset()
354 354
       const dictCode = row.dictCode || this.ids
355 355
       getData(dictCode).then(response => {
356
-        this.form = response.data;
357
-        this.open = true;
358
-        this.title = "修改字典数据";
359
-      });
356
+        this.form = response.data
357
+        this.open = true
358
+        this.title = "修改字典数据"
359
+      })
360 360
     },
361 361
     /** 提交按钮 */
362 362
     submitForm: function() {
@@ -364,32 +364,32 @@ export default {
364 364
         if (valid) {
365 365
           if (this.form.dictCode != undefined) {
366 366
             updateData(this.form).then(response => {
367
-              this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
368
-              this.$modal.msgSuccess("修改成功");
369
-              this.open = false;
370
-              this.getList();
371
-            });
367
+              this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
368
+              this.$modal.msgSuccess("修改成功")
369
+              this.open = false
370
+              this.getList()
371
+            })
372 372
           } else {
373 373
             addData(this.form).then(response => {
374
-              this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
375
-              this.$modal.msgSuccess("新增成功");
376
-              this.open = false;
377
-              this.getList();
378
-            });
374
+              this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
375
+              this.$modal.msgSuccess("新增成功")
376
+              this.open = false
377
+              this.getList()
378
+            })
379 379
           }
380 380
         }
381
-      });
381
+      })
382 382
     },
383 383
     /** 删除按钮操作 */
384 384
     handleDelete(row) {
385
-      const dictCodes = row.dictCode || this.ids;
385
+      const dictCodes = row.dictCode || this.ids
386 386
       this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
387
-        return delData(dictCodes);
387
+        return delData(dictCodes)
388 388
       }).then(() => {
389
-        this.getList();
390
-        this.$modal.msgSuccess("删除成功");
391
-        this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
392
-      }).catch(() => {});
389
+        this.getList()
390
+        this.$modal.msgSuccess("删除成功")
391
+        this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
392
+      }).catch(() => {})
393 393
     },
394 394
     /** 导出按钮操作 */
395 395
     handleExport() {
@@ -398,5 +398,5 @@ export default {
398 398
       }, `data_${new Date().getTime()}.xlsx`)
399 399
     }
400 400
   }
401
-};
401
+}
402 402
 </script>

+ 43 - 43
ruoyi-ui/src/views/system/dict/index.vue

@@ -188,7 +188,7 @@
188 188
 </template>
189 189
 
190 190
 <script>
191
-import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
191
+import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"
192 192
 
193 193
 export default {
194 194
   name: "Dict",
@@ -234,26 +234,26 @@ export default {
234 234
           { required: true, message: "字典类型不能为空", trigger: "blur" }
235 235
         ]
236 236
       }
237
-    };
237
+    }
238 238
   },
239 239
   created() {
240
-    this.getList();
240
+    this.getList()
241 241
   },
242 242
   methods: {
243 243
     /** 查询字典类型列表 */
244 244
     getList() {
245
-      this.loading = true;
245
+      this.loading = true
246 246
       listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
247
-          this.typeList = response.rows;
248
-          this.total = response.total;
249
-          this.loading = false;
247
+          this.typeList = response.rows
248
+          this.total = response.total
249
+          this.loading = false
250 250
         }
251
-      );
251
+      )
252 252
     },
253 253
     // 取消按钮
254 254
     cancel() {
255
-      this.open = false;
256
-      this.reset();
255
+      this.open = false
256
+      this.reset()
257 257
     },
258 258
     // 表单重置
259 259
     reset() {
@@ -263,25 +263,25 @@ export default {
263 263
         dictType: undefined,
264 264
         status: "0",
265 265
         remark: undefined
266
-      };
267
-      this.resetForm("form");
266
+      }
267
+      this.resetForm("form")
268 268
     },
269 269
     /** 搜索按钮操作 */
270 270
     handleQuery() {
271
-      this.queryParams.pageNum = 1;
272
-      this.getList();
271
+      this.queryParams.pageNum = 1
272
+      this.getList()
273 273
     },
274 274
     /** 重置按钮操作 */
275 275
     resetQuery() {
276
-      this.dateRange = [];
277
-      this.resetForm("queryForm");
278
-      this.handleQuery();
276
+      this.dateRange = []
277
+      this.resetForm("queryForm")
278
+      this.handleQuery()
279 279
     },
280 280
     /** 新增按钮操作 */
281 281
     handleAdd() {
282
-      this.reset();
283
-      this.open = true;
284
-      this.title = "添加字典类型";
282
+      this.reset()
283
+      this.open = true
284
+      this.title = "添加字典类型"
285 285
     },
286 286
     // 多选框选中数据
287 287
     handleSelectionChange(selection) {
@@ -291,13 +291,13 @@ export default {
291 291
     },
292 292
     /** 修改按钮操作 */
293 293
     handleUpdate(row) {
294
-      this.reset();
294
+      this.reset()
295 295
       const dictId = row.dictId || this.ids
296 296
       getType(dictId).then(response => {
297
-        this.form = response.data;
298
-        this.open = true;
299
-        this.title = "修改字典类型";
300
-      });
297
+        this.form = response.data
298
+        this.open = true
299
+        this.title = "修改字典类型"
300
+      })
301 301
     },
302 302
     /** 提交按钮 */
303 303
     submitForm: function() {
@@ -305,29 +305,29 @@ export default {
305 305
         if (valid) {
306 306
           if (this.form.dictId != undefined) {
307 307
             updateType(this.form).then(response => {
308
-              this.$modal.msgSuccess("修改成功");
309
-              this.open = false;
310
-              this.getList();
311
-            });
308
+              this.$modal.msgSuccess("修改成功")
309
+              this.open = false
310
+              this.getList()
311
+            })
312 312
           } else {
313 313
             addType(this.form).then(response => {
314
-              this.$modal.msgSuccess("新增成功");
315
-              this.open = false;
316
-              this.getList();
317
-            });
314
+              this.$modal.msgSuccess("新增成功")
315
+              this.open = false
316
+              this.getList()
317
+            })
318 318
           }
319 319
         }
320
-      });
320
+      })
321 321
     },
322 322
     /** 删除按钮操作 */
323 323
     handleDelete(row) {
324
-      const dictIds = row.dictId || this.ids;
324
+      const dictIds = row.dictId || this.ids
325 325
       this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
326
-        return delType(dictIds);
326
+        return delType(dictIds)
327 327
       }).then(() => {
328
-        this.getList();
329
-        this.$modal.msgSuccess("删除成功");
330
-      }).catch(() => {});
328
+        this.getList()
329
+        this.$modal.msgSuccess("删除成功")
330
+      }).catch(() => {})
331 331
     },
332 332
     /** 导出按钮操作 */
333 333
     handleExport() {
@@ -338,10 +338,10 @@ export default {
338 338
     /** 刷新缓存按钮操作 */
339 339
     handleRefreshCache() {
340 340
       refreshCache().then(() => {
341
-        this.$modal.msgSuccess("刷新成功");
342
-        this.$store.dispatch('dict/cleanDict');
343
-      });
341
+        this.$modal.msgSuccess("刷新成功")
342
+        this.$store.dispatch('dict/cleanDict')
343
+      })
344 344
     }
345 345
   }
346
-};
346
+}
347 347
 </script>

+ 31 - 31
ruoyi-ui/src/views/system/logininfor/index.vue

@@ -127,7 +127,7 @@
127 127
 </template>
128 128
 
129 129
 <script>
130
-import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/api/system/logininfor";
130
+import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/api/system/logininfor"
131 131
 
132 132
 export default {
133 133
   name: "Logininfor",
@@ -162,32 +162,32 @@ export default {
162 162
         userName: undefined,
163 163
         status: undefined
164 164
       }
165
-    };
165
+    }
166 166
   },
167 167
   created() {
168
-    this.getList();
168
+    this.getList()
169 169
   },
170 170
   methods: {
171 171
     /** 查询登录日志列表 */
172 172
     getList() {
173
-      this.loading = true;
173
+      this.loading = true
174 174
       list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
175
-          this.list = response.rows;
176
-          this.total = response.total;
177
-          this.loading = false;
175
+          this.list = response.rows
176
+          this.total = response.total
177
+          this.loading = false
178 178
         }
179
-      );
179
+      )
180 180
     },
181 181
     /** 搜索按钮操作 */
182 182
     handleQuery() {
183
-      this.queryParams.pageNum = 1;
184
-      this.getList();
183
+      this.queryParams.pageNum = 1
184
+      this.getList()
185 185
     },
186 186
     /** 重置按钮操作 */
187 187
     resetQuery() {
188
-      this.dateRange = [];
189
-      this.resetForm("queryForm");
190
-      this.queryParams.pageNum = 1;
188
+      this.dateRange = []
189
+      this.resetForm("queryForm")
190
+      this.queryParams.pageNum = 1
191 191
       this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
192 192
     },
193 193
     /** 多选框选中数据 */
@@ -195,41 +195,41 @@ export default {
195 195
       this.ids = selection.map(item => item.infoId)
196 196
       this.single = selection.length!=1
197 197
       this.multiple = !selection.length
198
-      this.selectName = selection.map(item => item.userName);
198
+      this.selectName = selection.map(item => item.userName)
199 199
     },
200 200
     /** 排序触发事件 */
201 201
     handleSortChange(column, prop, order) {
202
-      this.queryParams.orderByColumn = column.prop;
203
-      this.queryParams.isAsc = column.order;
204
-      this.getList();
202
+      this.queryParams.orderByColumn = column.prop
203
+      this.queryParams.isAsc = column.order
204
+      this.getList()
205 205
     },
206 206
     /** 删除按钮操作 */
207 207
     handleDelete(row) {
208
-      const infoIds = row.infoId || this.ids;
208
+      const infoIds = row.infoId || this.ids
209 209
       this.$modal.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?').then(function() {
210
-        return delLogininfor(infoIds);
210
+        return delLogininfor(infoIds)
211 211
       }).then(() => {
212
-        this.getList();
213
-        this.$modal.msgSuccess("删除成功");
214
-      }).catch(() => {});
212
+        this.getList()
213
+        this.$modal.msgSuccess("删除成功")
214
+      }).catch(() => {})
215 215
     },
216 216
     /** 清空按钮操作 */
217 217
     handleClean() {
218 218
       this.$modal.confirm('是否确认清空所有登录日志数据项?').then(function() {
219
-        return cleanLogininfor();
219
+        return cleanLogininfor()
220 220
       }).then(() => {
221
-        this.getList();
222
-        this.$modal.msgSuccess("清空成功");
223
-      }).catch(() => {});
221
+        this.getList()
222
+        this.$modal.msgSuccess("清空成功")
223
+      }).catch(() => {})
224 224
     },
225 225
     /** 解锁按钮操作 */
226 226
     handleUnlock() {
227
-      const username = this.selectName;
227
+      const username = this.selectName
228 228
       this.$modal.confirm('是否确认解锁用户"' + username + '"数据项?').then(function() {
229
-        return unlockLogininfor(username);
229
+        return unlockLogininfor(username)
230 230
       }).then(() => {
231
-        this.$modal.msgSuccess("用户" + username + "解锁成功");
232
-      }).catch(() => {});
231
+        this.$modal.msgSuccess("用户" + username + "解锁成功")
232
+      }).catch(() => {})
233 233
     },
234 234
     /** 导出按钮操作 */
235 235
     handleExport() {
@@ -238,6 +238,6 @@ export default {
238 238
       }, `logininfor_${new Date().getTime()}.xlsx`)
239 239
     }
240 240
   }
241
-};
241
+}
242 242
 </script>
243 243
 

+ 55 - 55
ruoyi-ui/src/views/system/menu/index.vue

@@ -299,10 +299,10 @@
299 299
 </template>
300 300
 
301 301
 <script>
302
-import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu";
303
-import Treeselect from "@riophae/vue-treeselect";
304
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
305
-import IconSelect from "@/components/IconSelect";
302
+import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu"
303
+import Treeselect from "@riophae/vue-treeselect"
304
+import "@riophae/vue-treeselect/dist/vue-treeselect.css"
305
+import IconSelect from "@/components/IconSelect"
306 306
 
307 307
 export default {
308 308
   name: "Menu",
@@ -345,48 +345,48 @@ export default {
345 345
           { required: true, message: "路由地址不能为空", trigger: "blur" }
346 346
         ]
347 347
       }
348
-    };
348
+    }
349 349
   },
350 350
   created() {
351
-    this.getList();
351
+    this.getList()
352 352
   },
353 353
   methods: {
354 354
     // 选择图标
355 355
     selected(name) {
356
-      this.form.icon = name;
356
+      this.form.icon = name
357 357
     },
358 358
     /** 查询菜单列表 */
359 359
     getList() {
360
-      this.loading = true;
360
+      this.loading = true
361 361
       listMenu(this.queryParams).then(response => {
362
-        this.menuList = this.handleTree(response.data, "menuId");
363
-        this.loading = false;
364
-      });
362
+        this.menuList = this.handleTree(response.data, "menuId")
363
+        this.loading = false
364
+      })
365 365
     },
366 366
     /** 转换菜单数据结构 */
367 367
     normalizer(node) {
368 368
       if (node.children && !node.children.length) {
369
-        delete node.children;
369
+        delete node.children
370 370
       }
371 371
       return {
372 372
         id: node.menuId,
373 373
         label: node.menuName,
374 374
         children: node.children
375
-      };
375
+      }
376 376
     },
377 377
     /** 查询菜单下拉树结构 */
378 378
     getTreeselect() {
379 379
       listMenu().then(response => {
380
-        this.menuOptions = [];
381
-        const menu = { menuId: 0, menuName: '主类目', children: [] };
382
-        menu.children = this.handleTree(response.data, "menuId");
383
-        this.menuOptions.push(menu);
384
-      });
380
+        this.menuOptions = []
381
+        const menu = { menuId: 0, menuName: '主类目', children: [] }
382
+        menu.children = this.handleTree(response.data, "menuId")
383
+        this.menuOptions.push(menu)
384
+      })
385 385
     },
386 386
     // 取消按钮
387 387
     cancel() {
388
-      this.open = false;
389
-      this.reset();
388
+      this.open = false
389
+      this.reset()
390 390
     },
391 391
     // 表单重置
392 392
     reset() {
@@ -401,47 +401,47 @@ export default {
401 401
         isCache: "0",
402 402
         visible: "0",
403 403
         status: "0"
404
-      };
405
-      this.resetForm("form");
404
+      }
405
+      this.resetForm("form")
406 406
     },
407 407
     /** 搜索按钮操作 */
408 408
     handleQuery() {
409
-      this.getList();
409
+      this.getList()
410 410
     },
411 411
     /** 重置按钮操作 */
412 412
     resetQuery() {
413
-      this.resetForm("queryForm");
414
-      this.handleQuery();
413
+      this.resetForm("queryForm")
414
+      this.handleQuery()
415 415
     },
416 416
     /** 新增按钮操作 */
417 417
     handleAdd(row) {
418
-      this.reset();
419
-      this.getTreeselect();
418
+      this.reset()
419
+      this.getTreeselect()
420 420
       if (row != null && row.menuId) {
421
-        this.form.parentId = row.menuId;
421
+        this.form.parentId = row.menuId
422 422
       } else {
423
-        this.form.parentId = 0;
423
+        this.form.parentId = 0
424 424
       }
425
-      this.open = true;
426
-      this.title = "添加菜单";
425
+      this.open = true
426
+      this.title = "添加菜单"
427 427
     },
428 428
     /** 展开/折叠操作 */
429 429
     toggleExpandAll() {
430
-      this.refreshTable = false;
431
-      this.isExpandAll = !this.isExpandAll;
430
+      this.refreshTable = false
431
+      this.isExpandAll = !this.isExpandAll
432 432
       this.$nextTick(() => {
433
-        this.refreshTable = true;
434
-      });
433
+        this.refreshTable = true
434
+      })
435 435
     },
436 436
     /** 修改按钮操作 */
437 437
     handleUpdate(row) {
438
-      this.reset();
439
-      this.getTreeselect();
438
+      this.reset()
439
+      this.getTreeselect()
440 440
       getMenu(row.menuId).then(response => {
441
-        this.form = response.data;
442
-        this.open = true;
443
-        this.title = "修改菜单";
444
-      });
441
+        this.form = response.data
442
+        this.open = true
443
+        this.title = "修改菜单"
444
+      })
445 445
     },
446 446
     /** 提交按钮 */
447 447
     submitForm: function() {
@@ -449,29 +449,29 @@ export default {
449 449
         if (valid) {
450 450
           if (this.form.menuId != undefined) {
451 451
             updateMenu(this.form).then(response => {
452
-              this.$modal.msgSuccess("修改成功");
453
-              this.open = false;
454
-              this.getList();
455
-            });
452
+              this.$modal.msgSuccess("修改成功")
453
+              this.open = false
454
+              this.getList()
455
+            })
456 456
           } else {
457 457
             addMenu(this.form).then(response => {
458
-              this.$modal.msgSuccess("新增成功");
459
-              this.open = false;
460
-              this.getList();
461
-            });
458
+              this.$modal.msgSuccess("新增成功")
459
+              this.open = false
460
+              this.getList()
461
+            })
462 462
           }
463 463
         }
464
-      });
464
+      })
465 465
     },
466 466
     /** 删除按钮操作 */
467 467
     handleDelete(row) {
468 468
       this.$modal.confirm('是否确认删除名称为"' + row.menuName + '"的数据项?').then(function() {
469
-        return delMenu(row.menuId);
469
+        return delMenu(row.menuId)
470 470
       }).then(() => {
471
-        this.getList();
472
-        this.$modal.msgSuccess("删除成功");
473
-      }).catch(() => {});
471
+        this.getList()
472
+        this.$modal.msgSuccess("删除成功")
473
+      }).catch(() => {})
474 474
     }
475 475
   }
476
-};
476
+}
477 477
 </script>

+ 39 - 39
ruoyi-ui/src/views/system/notice/index.vue

@@ -170,7 +170,7 @@
170 170
 </template>
171 171
 
172 172
 <script>
173
-import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice";
173
+import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice"
174 174
 
175 175
 export default {
176 176
   name: "Notice",
@@ -214,25 +214,25 @@ export default {
214 214
           { required: true, message: "公告类型不能为空", trigger: "change" }
215 215
         ]
216 216
       }
217
-    };
217
+    }
218 218
   },
219 219
   created() {
220
-    this.getList();
220
+    this.getList()
221 221
   },
222 222
   methods: {
223 223
     /** 查询公告列表 */
224 224
     getList() {
225
-      this.loading = true;
225
+      this.loading = true
226 226
       listNotice(this.queryParams).then(response => {
227
-        this.noticeList = response.rows;
228
-        this.total = response.total;
229
-        this.loading = false;
230
-      });
227
+        this.noticeList = response.rows
228
+        this.total = response.total
229
+        this.loading = false
230
+      })
231 231
     },
232 232
     // 取消按钮
233 233
     cancel() {
234
-      this.open = false;
235
-      this.reset();
234
+      this.open = false
235
+      this.reset()
236 236
     },
237 237
     // 表单重置
238 238
     reset() {
@@ -242,18 +242,18 @@ export default {
242 242
         noticeType: undefined,
243 243
         noticeContent: undefined,
244 244
         status: "0"
245
-      };
246
-      this.resetForm("form");
245
+      }
246
+      this.resetForm("form")
247 247
     },
248 248
     /** 搜索按钮操作 */
249 249
     handleQuery() {
250
-      this.queryParams.pageNum = 1;
251
-      this.getList();
250
+      this.queryParams.pageNum = 1
251
+      this.getList()
252 252
     },
253 253
     /** 重置按钮操作 */
254 254
     resetQuery() {
255
-      this.resetForm("queryForm");
256
-      this.handleQuery();
255
+      this.resetForm("queryForm")
256
+      this.handleQuery()
257 257
     },
258 258
     // 多选框选中数据
259 259
     handleSelectionChange(selection) {
@@ -263,19 +263,19 @@ export default {
263 263
     },
264 264
     /** 新增按钮操作 */
265 265
     handleAdd() {
266
-      this.reset();
267
-      this.open = true;
268
-      this.title = "添加公告";
266
+      this.reset()
267
+      this.open = true
268
+      this.title = "添加公告"
269 269
     },
270 270
     /** 修改按钮操作 */
271 271
     handleUpdate(row) {
272
-      this.reset();
272
+      this.reset()
273 273
       const noticeId = row.noticeId || this.ids
274 274
       getNotice(noticeId).then(response => {
275
-        this.form = response.data;
276
-        this.open = true;
277
-        this.title = "修改公告";
278
-      });
275
+        this.form = response.data
276
+        this.open = true
277
+        this.title = "修改公告"
278
+      })
279 279
     },
280 280
     /** 提交按钮 */
281 281
     submitForm: function() {
@@ -283,30 +283,30 @@ export default {
283 283
         if (valid) {
284 284
           if (this.form.noticeId != undefined) {
285 285
             updateNotice(this.form).then(response => {
286
-              this.$modal.msgSuccess("修改成功");
287
-              this.open = false;
288
-              this.getList();
289
-            });
286
+              this.$modal.msgSuccess("修改成功")
287
+              this.open = false
288
+              this.getList()
289
+            })
290 290
           } else {
291 291
             addNotice(this.form).then(response => {
292
-              this.$modal.msgSuccess("新增成功");
293
-              this.open = false;
294
-              this.getList();
295
-            });
292
+              this.$modal.msgSuccess("新增成功")
293
+              this.open = false
294
+              this.getList()
295
+            })
296 296
           }
297 297
         }
298
-      });
298
+      })
299 299
     },
300 300
     /** 删除按钮操作 */
301 301
     handleDelete(row) {
302 302
       const noticeIds = row.noticeId || this.ids
303 303
       this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function() {
304
-        return delNotice(noticeIds);
304
+        return delNotice(noticeIds)
305 305
       }).then(() => {
306
-        this.getList();
307
-        this.$modal.msgSuccess("删除成功");
308
-      }).catch(() => {});
306
+        this.getList()
307
+        this.$modal.msgSuccess("删除成功")
308
+      }).catch(() => {})
309 309
     }
310 310
   }
311
-};
312
-</script>
311
+}
312
+</script>

+ 29 - 29
ruoyi-ui/src/views/system/operlog/index.vue

@@ -207,7 +207,7 @@
207 207
 </template>
208 208
 
209 209
 <script>
210
-import { list, delOperlog, cleanOperlog } from "@/api/system/operlog";
210
+import { list, delOperlog, cleanOperlog } from "@/api/system/operlog"
211 211
 
212 212
 export default {
213 213
   name: "Operlog",
@@ -244,36 +244,36 @@ export default {
244 244
         businessType: undefined,
245 245
         status: undefined
246 246
       }
247
-    };
247
+    }
248 248
   },
249 249
   created() {
250
-    this.getList();
250
+    this.getList()
251 251
   },
252 252
   methods: {
253 253
     /** 查询登录日志 */
254 254
     getList() {
255
-      this.loading = true;
255
+      this.loading = true
256 256
       list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
257
-          this.list = response.rows;
258
-          this.total = response.total;
259
-          this.loading = false;
257
+          this.list = response.rows
258
+          this.total = response.total
259
+          this.loading = false
260 260
         }
261
-      );
261
+      )
262 262
     },
263 263
     // 操作日志类型字典翻译
264 264
     typeFormat(row, column) {
265
-      return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType);
265
+      return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType)
266 266
     },
267 267
     /** 搜索按钮操作 */
268 268
     handleQuery() {
269
-      this.queryParams.pageNum = 1;
270
-      this.getList();
269
+      this.queryParams.pageNum = 1
270
+      this.getList()
271 271
     },
272 272
     /** 重置按钮操作 */
273 273
     resetQuery() {
274
-      this.dateRange = [];
275
-      this.resetForm("queryForm");
276
-      this.queryParams.pageNum = 1;
274
+      this.dateRange = []
275
+      this.resetForm("queryForm")
276
+      this.queryParams.pageNum = 1
277 277
       this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
278 278
     },
279 279
     /** 多选框选中数据 */
@@ -283,33 +283,33 @@ export default {
283 283
     },
284 284
     /** 排序触发事件 */
285 285
     handleSortChange(column, prop, order) {
286
-      this.queryParams.orderByColumn = column.prop;
287
-      this.queryParams.isAsc = column.order;
288
-      this.getList();
286
+      this.queryParams.orderByColumn = column.prop
287
+      this.queryParams.isAsc = column.order
288
+      this.getList()
289 289
     },
290 290
     /** 详细按钮操作 */
291 291
     handleView(row) {
292
-      this.open = true;
293
-      this.form = row;
292
+      this.open = true
293
+      this.form = row
294 294
     },
295 295
     /** 删除按钮操作 */
296 296
     handleDelete(row) {
297
-      const operIds = row.operId || this.ids;
297
+      const operIds = row.operId || this.ids
298 298
       this.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function() {
299
-        return delOperlog(operIds);
299
+        return delOperlog(operIds)
300 300
       }).then(() => {
301
-        this.getList();
302
-        this.$modal.msgSuccess("删除成功");
303
-      }).catch(() => {});
301
+        this.getList()
302
+        this.$modal.msgSuccess("删除成功")
303
+      }).catch(() => {})
304 304
     },
305 305
     /** 清空按钮操作 */
306 306
     handleClean() {
307 307
       this.$modal.confirm('是否确认清空所有操作日志数据项?').then(function() {
308
-        return cleanOperlog();
308
+        return cleanOperlog()
309 309
       }).then(() => {
310
-        this.getList();
311
-        this.$modal.msgSuccess("清空成功");
312
-      }).catch(() => {});
310
+        this.getList()
311
+        this.$modal.msgSuccess("清空成功")
312
+      }).catch(() => {})
313 313
     },
314 314
     /** 导出按钮操作 */
315 315
     handleExport() {
@@ -318,6 +318,6 @@ export default {
318 318
       }, `operlog_${new Date().getTime()}.xlsx`)
319 319
     }
320 320
   }
321
-};
321
+}
322 322
 </script>
323 323
 

+ 40 - 40
ruoyi-ui/src/views/system/post/index.vue

@@ -157,7 +157,7 @@
157 157
 </template>
158 158
 
159 159
 <script>
160
-import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
160
+import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post"
161 161
 
162 162
 export default {
163 163
   name: "Post",
@@ -204,25 +204,25 @@ export default {
204 204
           { required: true, message: "岗位顺序不能为空", trigger: "blur" }
205 205
         ]
206 206
       }
207
-    };
207
+    }
208 208
   },
209 209
   created() {
210
-    this.getList();
210
+    this.getList()
211 211
   },
212 212
   methods: {
213 213
     /** 查询岗位列表 */
214 214
     getList() {
215
-      this.loading = true;
215
+      this.loading = true
216 216
       listPost(this.queryParams).then(response => {
217
-        this.postList = response.rows;
218
-        this.total = response.total;
219
-        this.loading = false;
220
-      });
217
+        this.postList = response.rows
218
+        this.total = response.total
219
+        this.loading = false
220
+      })
221 221
     },
222 222
     // 取消按钮
223 223
     cancel() {
224
-      this.open = false;
225
-      this.reset();
224
+      this.open = false
225
+      this.reset()
226 226
     },
227 227
     // 表单重置
228 228
     reset() {
@@ -233,18 +233,18 @@ export default {
233 233
         postSort: 0,
234 234
         status: "0",
235 235
         remark: undefined
236
-      };
237
-      this.resetForm("form");
236
+      }
237
+      this.resetForm("form")
238 238
     },
239 239
     /** 搜索按钮操作 */
240 240
     handleQuery() {
241
-      this.queryParams.pageNum = 1;
242
-      this.getList();
241
+      this.queryParams.pageNum = 1
242
+      this.getList()
243 243
     },
244 244
     /** 重置按钮操作 */
245 245
     resetQuery() {
246
-      this.resetForm("queryForm");
247
-      this.handleQuery();
246
+      this.resetForm("queryForm")
247
+      this.handleQuery()
248 248
     },
249 249
     // 多选框选中数据
250 250
     handleSelectionChange(selection) {
@@ -254,19 +254,19 @@ export default {
254 254
     },
255 255
     /** 新增按钮操作 */
256 256
     handleAdd() {
257
-      this.reset();
258
-      this.open = true;
259
-      this.title = "添加岗位";
257
+      this.reset()
258
+      this.open = true
259
+      this.title = "添加岗位"
260 260
     },
261 261
     /** 修改按钮操作 */
262 262
     handleUpdate(row) {
263
-      this.reset();
263
+      this.reset()
264 264
       const postId = row.postId || this.ids
265 265
       getPost(postId).then(response => {
266
-        this.form = response.data;
267
-        this.open = true;
268
-        this.title = "修改岗位";
269
-      });
266
+        this.form = response.data
267
+        this.open = true
268
+        this.title = "修改岗位"
269
+      })
270 270
     },
271 271
     /** 提交按钮 */
272 272
     submitForm: function() {
@@ -274,29 +274,29 @@ export default {
274 274
         if (valid) {
275 275
           if (this.form.postId != undefined) {
276 276
             updatePost(this.form).then(response => {
277
-              this.$modal.msgSuccess("修改成功");
278
-              this.open = false;
279
-              this.getList();
280
-            });
277
+              this.$modal.msgSuccess("修改成功")
278
+              this.open = false
279
+              this.getList()
280
+            })
281 281
           } else {
282 282
             addPost(this.form).then(response => {
283
-              this.$modal.msgSuccess("新增成功");
284
-              this.open = false;
285
-              this.getList();
286
-            });
283
+              this.$modal.msgSuccess("新增成功")
284
+              this.open = false
285
+              this.getList()
286
+            })
287 287
           }
288 288
         }
289
-      });
289
+      })
290 290
     },
291 291
     /** 删除按钮操作 */
292 292
     handleDelete(row) {
293
-      const postIds = row.postId || this.ids;
293
+      const postIds = row.postId || this.ids
294 294
       this.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function() {
295
-        return delPost(postIds);
295
+        return delPost(postIds)
296 296
       }).then(() => {
297
-        this.getList();
298
-        this.$modal.msgSuccess("删除成功");
299
-      }).catch(() => {});
297
+        this.getList()
298
+        this.$modal.msgSuccess("删除成功")
299
+      }).catch(() => {})
300 300
     },
301 301
     /** 导出按钮操作 */
302 302
     handleExport() {
@@ -305,5 +305,5 @@ export default {
305 305
       }, `post_${new Date().getTime()}.xlsx`)
306 306
     }
307 307
   }
308
-};
309
-</script>
308
+}
309
+</script>

+ 30 - 30
ruoyi-ui/src/views/system/role/authUser.vue

@@ -100,8 +100,8 @@
100 100
 </template>
101 101
 
102 102
 <script>
103
-import { allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role";
104
-import selectUser from "./selectUser";
103
+import { allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role"
104
+import selectUser from "./selectUser"
105 105
 
106 106
 export default {
107 107
   name: "AuthUser",
@@ -129,40 +129,40 @@ export default {
129 129
         userName: undefined,
130 130
         phonenumber: undefined
131 131
       }
132
-    };
132
+    }
133 133
   },
134 134
   created() {
135
-    const roleId = this.$route.params && this.$route.params.roleId;
135
+    const roleId = this.$route.params && this.$route.params.roleId
136 136
     if (roleId) {
137
-      this.queryParams.roleId = roleId;
138
-      this.getList();
137
+      this.queryParams.roleId = roleId
138
+      this.getList()
139 139
     }
140 140
   },
141 141
   methods: {
142 142
     /** 查询授权用户列表 */
143 143
     getList() {
144
-      this.loading = true;
144
+      this.loading = true
145 145
       allocatedUserList(this.queryParams).then(response => {
146
-          this.userList = response.rows;
147
-          this.total = response.total;
148
-          this.loading = false;
146
+          this.userList = response.rows
147
+          this.total = response.total
148
+          this.loading = false
149 149
         }
150
-      );
150
+      )
151 151
     },
152 152
     // 返回按钮
153 153
     handleClose() {
154
-      const obj = { path: "/system/role" };
155
-      this.$tab.closeOpenPage(obj);
154
+      const obj = { path: "/system/role" }
155
+      this.$tab.closeOpenPage(obj)
156 156
     },
157 157
     /** 搜索按钮操作 */
158 158
     handleQuery() {
159
-      this.queryParams.pageNum = 1;
160
-      this.getList();
159
+      this.queryParams.pageNum = 1
160
+      this.getList()
161 161
     },
162 162
     /** 重置按钮操作 */
163 163
     resetQuery() {
164
-      this.resetForm("queryForm");
165
-      this.handleQuery();
164
+      this.resetForm("queryForm")
165
+      this.handleQuery()
166 166
     },
167 167
     // 多选框选中数据
168 168
     handleSelectionChange(selection) {
@@ -171,29 +171,29 @@ export default {
171 171
     },
172 172
     /** 打开授权用户表弹窗 */
173 173
     openSelectUser() {
174
-      this.$refs.select.show();
174
+      this.$refs.select.show()
175 175
     },
176 176
     /** 取消授权按钮操作 */
177 177
     cancelAuthUser(row) {
178
-      const roleId = this.queryParams.roleId;
178
+      const roleId = this.queryParams.roleId
179 179
       this.$modal.confirm('确认要取消该用户"' + row.userName + '"角色吗?').then(function() {
180
-        return authUserCancel({ userId: row.userId, roleId: roleId });
180
+        return authUserCancel({ userId: row.userId, roleId: roleId })
181 181
       }).then(() => {
182
-        this.getList();
183
-        this.$modal.msgSuccess("取消授权成功");
184
-      }).catch(() => {});
182
+        this.getList()
183
+        this.$modal.msgSuccess("取消授权成功")
184
+      }).catch(() => {})
185 185
     },
186 186
     /** 批量取消授权按钮操作 */
187 187
     cancelAuthUserAll(row) {
188
-      const roleId = this.queryParams.roleId;
189
-      const userIds = this.userIds.join(",");
188
+      const roleId = this.queryParams.roleId
189
+      const userIds = this.userIds.join(",")
190 190
       this.$modal.confirm('是否取消选中用户授权数据项?').then(function() {
191
-        return authUserCancelAll({ roleId: roleId, userIds: userIds });
191
+        return authUserCancelAll({ roleId: roleId, userIds: userIds })
192 192
       }).then(() => {
193
-        this.getList();
194
-        this.$modal.msgSuccess("取消授权成功");
195
-      }).catch(() => {});
193
+        this.getList()
194
+        this.$modal.msgSuccess("取消授权成功")
195
+      }).catch(() => {})
196 196
     }
197 197
   }
198
-};
198
+}
199 199
 </script>

+ 102 - 102
ruoyi-ui/src/views/system/role/index.vue

@@ -252,8 +252,8 @@
252 252
 </template>
253 253
 
254 254
 <script>
255
-import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
256
-import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
255
+import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"
256
+import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"
257 257
 
258 258
 export default {
259 259
   name: "Role",
@@ -339,85 +339,85 @@ export default {
339 339
           { required: true, message: "角色顺序不能为空", trigger: "blur" }
340 340
         ]
341 341
       }
342
-    };
342
+    }
343 343
   },
344 344
   created() {
345
-    this.getList();
345
+    this.getList()
346 346
   },
347 347
   methods: {
348 348
     /** 查询角色列表 */
349 349
     getList() {
350
-      this.loading = true;
350
+      this.loading = true
351 351
       listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
352
-          this.roleList = response.rows;
353
-          this.total = response.total;
354
-          this.loading = false;
352
+          this.roleList = response.rows
353
+          this.total = response.total
354
+          this.loading = false
355 355
         }
356
-      );
356
+      )
357 357
     },
358 358
     /** 查询菜单树结构 */
359 359
     getMenuTreeselect() {
360 360
       menuTreeselect().then(response => {
361
-        this.menuOptions = response.data;
362
-      });
361
+        this.menuOptions = response.data
362
+      })
363 363
     },
364 364
     // 所有菜单节点数据
365 365
     getMenuAllCheckedKeys() {
366 366
       // 目前被选中的菜单节点
367
-      let checkedKeys = this.$refs.menu.getCheckedKeys();
367
+      let checkedKeys = this.$refs.menu.getCheckedKeys()
368 368
       // 半选中的菜单节点
369
-      let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
370
-      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
371
-      return checkedKeys;
369
+      let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys()
370
+      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
371
+      return checkedKeys
372 372
     },
373 373
     // 所有部门节点数据
374 374
     getDeptAllCheckedKeys() {
375 375
       // 目前被选中的部门节点
376
-      let checkedKeys = this.$refs.dept.getCheckedKeys();
376
+      let checkedKeys = this.$refs.dept.getCheckedKeys()
377 377
       // 半选中的部门节点
378
-      let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
379
-      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
380
-      return checkedKeys;
378
+      let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys()
379
+      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
380
+      return checkedKeys
381 381
     },
382 382
     /** 根据角色ID查询菜单树结构 */
383 383
     getRoleMenuTreeselect(roleId) {
384 384
       return roleMenuTreeselect(roleId).then(response => {
385
-        this.menuOptions = response.menus;
386
-        return response;
387
-      });
385
+        this.menuOptions = response.menus
386
+        return response
387
+      })
388 388
     },
389 389
     /** 根据角色ID查询部门树结构 */
390 390
     getDeptTree(roleId) {
391 391
       return deptTreeSelect(roleId).then(response => {
392
-        this.deptOptions = response.depts;
393
-        return response;
394
-      });
392
+        this.deptOptions = response.depts
393
+        return response
394
+      })
395 395
     },
396 396
     // 角色状态修改
397 397
     handleStatusChange(row) {
398
-      let text = row.status === "0" ? "启用" : "停用";
398
+      let text = row.status === "0" ? "启用" : "停用"
399 399
       this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() {
400
-        return changeRoleStatus(row.roleId, row.status);
400
+        return changeRoleStatus(row.roleId, row.status)
401 401
       }).then(() => {
402
-        this.$modal.msgSuccess(text + "成功");
402
+        this.$modal.msgSuccess(text + "成功")
403 403
       }).catch(function() {
404
-        row.status = row.status === "0" ? "1" : "0";
405
-      });
404
+        row.status = row.status === "0" ? "1" : "0"
405
+      })
406 406
     },
407 407
     // 取消按钮
408 408
     cancel() {
409
-      this.open = false;
410
-      this.reset();
409
+      this.open = false
410
+      this.reset()
411 411
     },
412 412
     // 取消按钮(数据权限)
413 413
     cancelDataScope() {
414
-      this.openDataScope = false;
415
-      this.reset();
414
+      this.openDataScope = false
415
+      this.reset()
416 416
     },
417 417
     // 表单重置
418 418
     reset() {
419 419
       if (this.$refs.menu != undefined) {
420
-        this.$refs.menu.setCheckedKeys([]);
420
+        this.$refs.menu.setCheckedKeys([])
421 421
       }
422 422
       this.menuExpand = false,
423 423
       this.menuNodeAll = false,
@@ -434,19 +434,19 @@ export default {
434 434
         menuCheckStrictly: true,
435 435
         deptCheckStrictly: true,
436 436
         remark: undefined
437
-      };
438
-      this.resetForm("form");
437
+      }
438
+      this.resetForm("form")
439 439
     },
440 440
     /** 搜索按钮操作 */
441 441
     handleQuery() {
442
-      this.queryParams.pageNum = 1;
443
-      this.getList();
442
+      this.queryParams.pageNum = 1
443
+      this.getList()
444 444
     },
445 445
     /** 重置按钮操作 */
446 446
     resetQuery() {
447
-      this.dateRange = [];
448
-      this.resetForm("queryForm");
449
-      this.handleQuery();
447
+      this.dateRange = []
448
+      this.resetForm("queryForm")
449
+      this.handleQuery()
450 450
     },
451 451
     // 多选框选中数据
452 452
     handleSelectionChange(selection) {
@@ -458,141 +458,141 @@ export default {
458 458
     handleCommand(command, row) {
459 459
       switch (command) {
460 460
         case "handleDataScope":
461
-          this.handleDataScope(row);
462
-          break;
461
+          this.handleDataScope(row)
462
+          break
463 463
         case "handleAuthUser":
464
-          this.handleAuthUser(row);
465
-          break;
464
+          this.handleAuthUser(row)
465
+          break
466 466
         default:
467
-          break;
467
+          break
468 468
       }
469 469
     },
470 470
     // 树权限(展开/折叠)
471 471
     handleCheckedTreeExpand(value, type) {
472 472
       if (type == 'menu') {
473
-        let treeList = this.menuOptions;
473
+        let treeList = this.menuOptions
474 474
         for (let i = 0; i < treeList.length; i++) {
475
-          this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value;
475
+          this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value
476 476
         }
477 477
       } else if (type == 'dept') {
478
-        let treeList = this.deptOptions;
478
+        let treeList = this.deptOptions
479 479
         for (let i = 0; i < treeList.length; i++) {
480
-          this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value;
480
+          this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value
481 481
         }
482 482
       }
483 483
     },
484 484
     // 树权限(全选/全不选)
485 485
     handleCheckedTreeNodeAll(value, type) {
486 486
       if (type == 'menu') {
487
-        this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []);
487
+        this.$refs.menu.setCheckedNodes(value ? this.menuOptions: [])
488 488
       } else if (type == 'dept') {
489
-        this.$refs.dept.setCheckedNodes(value ? this.deptOptions: []);
489
+        this.$refs.dept.setCheckedNodes(value ? this.deptOptions: [])
490 490
       }
491 491
     },
492 492
     // 树权限(父子联动)
493 493
     handleCheckedTreeConnect(value, type) {
494 494
       if (type == 'menu') {
495
-        this.form.menuCheckStrictly = value ? true: false;
495
+        this.form.menuCheckStrictly = value ? true: false
496 496
       } else if (type == 'dept') {
497
-        this.form.deptCheckStrictly = value ? true: false;
497
+        this.form.deptCheckStrictly = value ? true: false
498 498
       }
499 499
     },
500 500
     /** 新增按钮操作 */
501 501
     handleAdd() {
502
-      this.reset();
503
-      this.getMenuTreeselect();
504
-      this.open = true;
505
-      this.title = "添加角色";
502
+      this.reset()
503
+      this.getMenuTreeselect()
504
+      this.open = true
505
+      this.title = "添加角色"
506 506
     },
507 507
     /** 修改按钮操作 */
508 508
     handleUpdate(row) {
509
-      this.reset();
509
+      this.reset()
510 510
       const roleId = row.roleId || this.ids
511
-      const roleMenu = this.getRoleMenuTreeselect(roleId);
511
+      const roleMenu = this.getRoleMenuTreeselect(roleId)
512 512
       getRole(roleId).then(response => {
513
-        this.form = response.data;
514
-        this.open = true;
513
+        this.form = response.data
514
+        this.open = true
515 515
         this.$nextTick(() => {
516 516
           roleMenu.then(res => {
517 517
             let checkedKeys = res.checkedKeys
518 518
             checkedKeys.forEach((v) => {
519 519
                 this.$nextTick(()=>{
520
-                    this.$refs.menu.setChecked(v, true ,false);
520
+                    this.$refs.menu.setChecked(v, true ,false)
521 521
                 })
522 522
             })
523
-          });
524
-        });
525
-      });
526
-      this.title = "修改角色";
523
+          })
524
+        })
525
+      })
526
+      this.title = "修改角色"
527 527
     },
528 528
     /** 选择角色权限范围触发 */
529 529
     dataScopeSelectChange(value) {
530 530
       if(value !== '2') {
531
-        this.$refs.dept.setCheckedKeys([]);
531
+        this.$refs.dept.setCheckedKeys([])
532 532
       }
533 533
     },
534 534
     /** 分配数据权限操作 */
535 535
     handleDataScope(row) {
536
-      this.reset();
537
-      const deptTreeSelect = this.getDeptTree(row.roleId);
536
+      this.reset()
537
+      const deptTreeSelect = this.getDeptTree(row.roleId)
538 538
       getRole(row.roleId).then(response => {
539
-        this.form = response.data;
540
-        this.openDataScope = true;
539
+        this.form = response.data
540
+        this.openDataScope = true
541 541
         this.$nextTick(() => {
542 542
           deptTreeSelect.then(res => {
543
-            this.$refs.dept.setCheckedKeys(res.checkedKeys);
544
-          });
545
-        });
546
-      });
547
-      this.title = "分配数据权限";
543
+            this.$refs.dept.setCheckedKeys(res.checkedKeys)
544
+          })
545
+        })
546
+      })
547
+      this.title = "分配数据权限"
548 548
     },
549 549
     /** 分配用户操作 */
550 550
     handleAuthUser: function(row) {
551
-      const roleId = row.roleId;
552
-      this.$router.push("/system/role-auth/user/" + roleId);
551
+      const roleId = row.roleId
552
+      this.$router.push("/system/role-auth/user/" + roleId)
553 553
     },
554 554
     /** 提交按钮 */
555 555
     submitForm: function() {
556 556
       this.$refs["form"].validate(valid => {
557 557
         if (valid) {
558 558
           if (this.form.roleId != undefined) {
559
-            this.form.menuIds = this.getMenuAllCheckedKeys();
559
+            this.form.menuIds = this.getMenuAllCheckedKeys()
560 560
             updateRole(this.form).then(response => {
561
-              this.$modal.msgSuccess("修改成功");
562
-              this.open = false;
563
-              this.getList();
564
-            });
561
+              this.$modal.msgSuccess("修改成功")
562
+              this.open = false
563
+              this.getList()
564
+            })
565 565
           } else {
566
-            this.form.menuIds = this.getMenuAllCheckedKeys();
566
+            this.form.menuIds = this.getMenuAllCheckedKeys()
567 567
             addRole(this.form).then(response => {
568
-              this.$modal.msgSuccess("新增成功");
569
-              this.open = false;
570
-              this.getList();
571
-            });
568
+              this.$modal.msgSuccess("新增成功")
569
+              this.open = false
570
+              this.getList()
571
+            })
572 572
           }
573 573
         }
574
-      });
574
+      })
575 575
     },
576 576
     /** 提交按钮(数据权限) */
577 577
     submitDataScope: function() {
578 578
       if (this.form.roleId != undefined) {
579
-        this.form.deptIds = this.getDeptAllCheckedKeys();
579
+        this.form.deptIds = this.getDeptAllCheckedKeys()
580 580
         dataScope(this.form).then(response => {
581
-          this.$modal.msgSuccess("修改成功");
582
-          this.openDataScope = false;
583
-          this.getList();
584
-        });
581
+          this.$modal.msgSuccess("修改成功")
582
+          this.openDataScope = false
583
+          this.getList()
584
+        })
585 585
       }
586 586
     },
587 587
     /** 删除按钮操作 */
588 588
     handleDelete(row) {
589
-      const roleIds = row.roleId || this.ids;
589
+      const roleIds = row.roleId || this.ids
590 590
       this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
591
-        return delRole(roleIds);
591
+        return delRole(roleIds)
592 592
       }).then(() => {
593
-        this.getList();
594
-        this.$modal.msgSuccess("删除成功");
595
-      }).catch(() => {});
593
+        this.getList()
594
+        this.$modal.msgSuccess("删除成功")
595
+      }).catch(() => {})
596 596
     },
597 597
     /** 导出按钮操作 */
598 598
     handleExport() {
@@ -601,5 +601,5 @@ export default {
601 601
       }, `role_${new Date().getTime()}.xlsx`)
602 602
     }
603 603
   }
604
-};
604
+}
605 605
 </script>

+ 23 - 23
ruoyi-ui/src/views/system/role/selectUser.vue

@@ -57,7 +57,7 @@
57 57
 </template>
58 58
 
59 59
 <script>
60
-import { unallocatedUserList, authUserSelectAll } from "@/api/system/role";
60
+import { unallocatedUserList, authUserSelectAll } from "@/api/system/role"
61 61
 export default {
62 62
   dicts: ['sys_normal_disable'],
63 63
   props: {
@@ -84,53 +84,53 @@ export default {
84 84
         userName: undefined,
85 85
         phonenumber: undefined
86 86
       }
87
-    };
87
+    }
88 88
   },
89 89
   methods: {
90 90
     // 显示弹框
91 91
     show() {
92
-      this.queryParams.roleId = this.roleId;
93
-      this.getList();
94
-      this.visible = true;
92
+      this.queryParams.roleId = this.roleId
93
+      this.getList()
94
+      this.visible = true
95 95
     },
96 96
     clickRow(row) {
97
-      this.$refs.table.toggleRowSelection(row);
97
+      this.$refs.table.toggleRowSelection(row)
98 98
     },
99 99
     // 多选框选中数据
100 100
     handleSelectionChange(selection) {
101
-      this.userIds = selection.map(item => item.userId);
101
+      this.userIds = selection.map(item => item.userId)
102 102
     },
103 103
     // 查询表数据
104 104
     getList() {
105 105
       unallocatedUserList(this.queryParams).then(res => {
106
-        this.userList = res.rows;
107
-        this.total = res.total;
108
-      });
106
+        this.userList = res.rows
107
+        this.total = res.total
108
+      })
109 109
     },
110 110
     /** 搜索按钮操作 */
111 111
     handleQuery() {
112
-      this.queryParams.pageNum = 1;
113
-      this.getList();
112
+      this.queryParams.pageNum = 1
113
+      this.getList()
114 114
     },
115 115
     /** 重置按钮操作 */
116 116
     resetQuery() {
117
-      this.resetForm("queryForm");
118
-      this.handleQuery();
117
+      this.resetForm("queryForm")
118
+      this.handleQuery()
119 119
     },
120 120
     /** 选择授权用户操作 */
121 121
     handleSelectUser() {
122
-      const roleId = this.queryParams.roleId;
123
-      const userIds = this.userIds.join(",");
122
+      const roleId = this.queryParams.roleId
123
+      const userIds = this.userIds.join(",")
124 124
       if (userIds == "") {
125
-        this.$modal.msgError("请选择要分配的用户");
126
-        return;
125
+        this.$modal.msgError("请选择要分配的用户")
126
+        return
127 127
       }
128 128
       authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => {
129
-        this.$modal.msgSuccess(res.msg);
130
-        this.visible = false;
131
-        this.$emit("ok");
132
-      });
129
+        this.$modal.msgSuccess(res.msg)
130
+        this.visible = false
131
+        this.$emit("ok")
132
+      }) 
133 133
     }
134 134
   }
135
-};
135
+}
136 136
 </script>

+ 26 - 26
ruoyi-ui/src/views/system/user/authRole.vue

@@ -46,7 +46,7 @@
46 46
 </template>
47 47
 
48 48
 <script>
49
-import { getAuthRole, updateAuthRole } from "@/api/system/user";
49
+import { getAuthRole, updateAuthRole } from "@/api/system/user"
50 50
 
51 51
 export default {
52 52
   name: "AuthRole",
@@ -64,60 +64,60 @@ export default {
64 64
       roles: [],
65 65
       // 用户信息
66 66
       form: {}
67
-    };
67
+    }
68 68
   },
69 69
   created() {
70
-    const userId = this.$route.params && this.$route.params.userId;
70
+    const userId = this.$route.params && this.$route.params.userId
71 71
     if (userId) {
72
-      this.loading = true;
72
+      this.loading = true
73 73
       getAuthRole(userId).then((response) => {
74
-        this.form = response.user;
75
-        this.roles = response.roles;
76
-        this.total = this.roles.length;
74
+        this.form = response.user
75
+        this.roles = response.roles
76
+        this.total = this.roles.length
77 77
         this.$nextTick(() => {
78 78
           this.roles.forEach((row) => {
79 79
             if (row.flag) {
80
-              this.$refs.table.toggleRowSelection(row);
80
+              this.$refs.table.toggleRowSelection(row)
81 81
             }
82
-          });
83
-        });
84
-        this.loading = false;
85
-      });
82
+          })
83
+        })
84
+        this.loading = false
85
+      })
86 86
     }
87 87
   },
88 88
   methods: {
89 89
     /** 单击选中行数据 */
90 90
     clickRow(row) {
91 91
       if (this.checkSelectable(row)) {
92
-        this.$refs.table.toggleRowSelection(row);
92
+        this.$refs.table.toggleRowSelection(row)
93 93
       }
94 94
     },
95 95
     // 多选框选中数据
96 96
     handleSelectionChange(selection) {
97
-      this.roleIds = selection.map((item) => item.roleId);
97
+      this.roleIds = selection.map((item) => item.roleId)
98 98
     },
99 99
     // 保存选中的数据编号
100 100
     getRowKey(row) {
101
-      return row.roleId;
101
+      return row.roleId
102 102
     },
103 103
     // 检查角色状态
104 104
     checkSelectable(row) {
105
-      return row.status === "0" ? true : false;
105
+      return row.status === "0" ? true : false
106 106
     },
107 107
     /** 提交按钮 */
108 108
     submitForm() {
109
-      const userId = this.form.userId;
110
-      const roleIds = this.roleIds.join(",");
109
+      const userId = this.form.userId
110
+      const roleIds = this.roleIds.join(",")
111 111
       updateAuthRole({ userId: userId, roleIds: roleIds }).then((response) => {
112
-        this.$modal.msgSuccess("授权成功");
113
-        this.close();
114
-      });
112
+        this.$modal.msgSuccess("授权成功")
113
+        this.close()
114
+      })
115 115
     },
116 116
     /** 关闭按钮 */
117 117
     close() {
118
-      const obj = { path: "/system/user" };
119
-      this.$tab.closeOpenPage(obj);
120
-    },
121
-  },
122
-};
118
+      const obj = { path: "/system/user" }
119
+      this.$tab.closeOpenPage(obj)
120
+    }
121
+  }
122
+}
123 123
 </script>

+ 99 - 99
ruoyi-ui/src/views/system/user/index.vue

@@ -201,12 +201,12 @@
201 201
 </template>
202 202
 
203 203
 <script>
204
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
205
-import { getToken } from "@/utils/auth";
206
-import Treeselect from "@riophae/vue-treeselect";
207
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
208
-import { Splitpanes, Pane } from "splitpanes";
209
-import "splitpanes/dist/splitpanes.css";
204
+import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user"
205
+import { getToken } from "@/utils/auth"
206
+import Treeselect from "@riophae/vue-treeselect"
207
+import "@riophae/vue-treeselect/dist/vue-treeselect.css"
208
+import { Splitpanes, Pane } from "splitpanes"
209
+import "splitpanes/dist/splitpanes.css"
210 210
 
211 211
 export default {
212 212
   name: "User",
@@ -315,76 +315,76 @@ export default {
315 315
           }
316 316
         ]
317 317
       }
318
-    };
318
+    }
319 319
   },
320 320
   watch: {
321 321
     // 根据名称筛选部门树
322 322
     deptName(val) {
323
-      this.$refs.tree.filter(val);
323
+      this.$refs.tree.filter(val)
324 324
     }
325 325
   },
326 326
   created() {
327
-    this.getList();
328
-    this.getDeptTree();
327
+    this.getList()
328
+    this.getDeptTree()
329 329
     this.getConfigKey("sys.user.initPassword").then(response => {
330
-      this.initPassword = response.msg;
331
-    });
330
+      this.initPassword = response.msg
331
+    })
332 332
   },
333 333
   methods: {
334 334
     /** 查询用户列表 */
335 335
     getList() {
336
-      this.loading = true;
336
+      this.loading = true
337 337
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
338
-          this.userList = response.rows;
339
-          this.total = response.total;
340
-          this.loading = false;
338
+          this.userList = response.rows
339
+          this.total = response.total
340
+          this.loading = false
341 341
         }
342
-      );
342
+      )
343 343
     },
344 344
     /** 查询部门下拉树结构 */
345 345
     getDeptTree() {
346 346
       deptTreeSelect().then(response => {
347
-        this.deptOptions = response.data;
348
-        this.enabledDeptOptions = this.filterDisabledDept(JSON.parse(JSON.stringify(response.data)));
349
-      });
347
+        this.deptOptions = response.data
348
+        this.enabledDeptOptions = this.filterDisabledDept(JSON.parse(JSON.stringify(response.data)))
349
+      })
350 350
     },
351 351
     // 过滤禁用的部门
352 352
     filterDisabledDept(deptList) {
353 353
       return deptList.filter(dept => {
354 354
         if (dept.disabled) {
355
-          return false;
355
+          return false
356 356
         }
357 357
         if (dept.children && dept.children.length) {
358
-          dept.children = this.filterDisabledDept(dept.children);
358
+          dept.children = this.filterDisabledDept(dept.children)
359 359
         }
360
-        return true;
361
-      });
360
+        return true
361
+      })
362 362
     },
363 363
     // 筛选节点
364 364
     filterNode(value, data) {
365
-      if (!value) return true;
366
-      return data.label.indexOf(value) !== -1;
365
+      if (!value) return true
366
+      return data.label.indexOf(value) !== -1
367 367
     },
368 368
     // 节点单击事件
369 369
     handleNodeClick(data) {
370
-      this.queryParams.deptId = data.id;
371
-      this.handleQuery();
370
+      this.queryParams.deptId = data.id
371
+      this.handleQuery()
372 372
     },
373 373
     // 用户状态修改
374 374
     handleStatusChange(row) {
375
-      let text = row.status === "0" ? "启用" : "停用";
375
+      let text = row.status === "0" ? "启用" : "停用"
376 376
       this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
377
-        return changeUserStatus(row.userId, row.status);
377
+        return changeUserStatus(row.userId, row.status)
378 378
       }).then(() => {
379
-        this.$modal.msgSuccess(text + "成功");
379
+        this.$modal.msgSuccess(text + "成功")
380 380
       }).catch(function() {
381
-        row.status = row.status === "0" ? "1" : "0";
382
-      });
381
+        row.status = row.status === "0" ? "1" : "0"
382
+      })
383 383
     },
384 384
     // 取消按钮
385 385
     cancel() {
386
-      this.open = false;
387
-      this.reset();
386
+      this.open = false
387
+      this.reset()
388 388
     },
389 389
     // 表单重置
390 390
     reset() {
@@ -401,66 +401,66 @@ export default {
401 401
         remark: undefined,
402 402
         postIds: [],
403 403
         roleIds: []
404
-      };
405
-      this.resetForm("form");
404
+      }
405
+      this.resetForm("form")
406 406
     },
407 407
     /** 搜索按钮操作 */
408 408
     handleQuery() {
409
-      this.queryParams.pageNum = 1;
410
-      this.getList();
409
+      this.queryParams.pageNum = 1
410
+      this.getList()
411 411
     },
412 412
     /** 重置按钮操作 */
413 413
     resetQuery() {
414
-      this.dateRange = [];
415
-      this.resetForm("queryForm");
416
-      this.queryParams.deptId = undefined;
417
-      this.$refs.tree.setCurrentKey(null);
418
-      this.handleQuery();
414
+      this.dateRange = []
415
+      this.resetForm("queryForm")
416
+      this.queryParams.deptId = undefined
417
+      this.$refs.tree.setCurrentKey(null)
418
+      this.handleQuery()
419 419
     },
420 420
     // 多选框选中数据
421 421
     handleSelectionChange(selection) {
422
-      this.ids = selection.map(item => item.userId);
423
-      this.single = selection.length != 1;
424
-      this.multiple = !selection.length;
422
+      this.ids = selection.map(item => item.userId)
423
+      this.single = selection.length != 1
424
+      this.multiple = !selection.length
425 425
     },
426 426
     // 更多操作触发
427 427
     handleCommand(command, row) {
428 428
       switch (command) {
429 429
         case "handleResetPwd":
430
-          this.handleResetPwd(row);
431
-          break;
430
+          this.handleResetPwd(row)
431
+          break
432 432
         case "handleAuthRole":
433
-          this.handleAuthRole(row);
434
-          break;
433
+          this.handleAuthRole(row)
434
+          break
435 435
         default:
436
-          break;
436
+          break
437 437
       }
438 438
     },
439 439
     /** 新增按钮操作 */
440 440
     handleAdd() {
441
-      this.reset();
441
+      this.reset()
442 442
       getUser().then(response => {
443
-        this.postOptions = response.posts;
444
-        this.roleOptions = response.roles;
445
-        this.open = true;
446
-        this.title = "添加用户";
447
-        this.form.password = this.initPassword;
448
-      });
443
+        this.postOptions = response.posts
444
+        this.roleOptions = response.roles
445
+        this.open = true
446
+        this.title = "添加用户"
447
+        this.form.password = this.initPassword
448
+      })
449 449
     },
450 450
     /** 修改按钮操作 */
451 451
     handleUpdate(row) {
452
-      this.reset();
453
-      const userId = row.userId || this.ids;
452
+      this.reset()
453
+      const userId = row.userId || this.ids
454 454
       getUser(userId).then(response => {
455
-        this.form = response.data;
456
-        this.postOptions = response.posts;
457
-        this.roleOptions = response.roles;
458
-        this.$set(this.form, "postIds", response.postIds);
459
-        this.$set(this.form, "roleIds", response.roleIds);
460
-        this.open = true;
461
-        this.title = "修改用户";
462
-        this.form.password = "";
463
-      });
455
+        this.form = response.data
456
+        this.postOptions = response.posts
457
+        this.roleOptions = response.roles
458
+        this.$set(this.form, "postIds", response.postIds)
459
+        this.$set(this.form, "roleIds", response.roleIds)
460
+        this.open = true
461
+        this.title = "修改用户"
462
+        this.form.password = ""
463
+      })
464 464
     },
465 465
     /** 重置密码按钮操作 */
466 466
     handleResetPwd(row) {
@@ -477,14 +477,14 @@ export default {
477 477
         },
478 478
       }).then(({ value }) => {
479 479
           resetUserPwd(row.userId, value).then(response => {
480
-            this.$modal.msgSuccess("修改成功,新密码是:" + value);
481
-          });
482
-        }).catch(() => {});
480
+            this.$modal.msgSuccess("修改成功,新密码是:" + value)
481
+          })
482
+        }).catch(() => {})
483 483
     },
484 484
     /** 分配角色操作 */
485 485
     handleAuthRole: function(row) {
486
-      const userId = row.userId;
487
-      this.$router.push("/system/user-auth/role/" + userId);
486
+      const userId = row.userId
487
+      this.$router.push("/system/user-auth/role/" + userId)
488 488
     },
489 489
     /** 提交按钮 */
490 490
     submitForm: function() {
@@ -492,29 +492,29 @@ export default {
492 492
         if (valid) {
493 493
           if (this.form.userId != undefined) {
494 494
             updateUser(this.form).then(response => {
495
-              this.$modal.msgSuccess("修改成功");
496
-              this.open = false;
497
-              this.getList();
498
-            });
495
+              this.$modal.msgSuccess("修改成功")
496
+              this.open = false
497
+              this.getList()
498
+            })
499 499
           } else {
500 500
             addUser(this.form).then(response => {
501
-              this.$modal.msgSuccess("新增成功");
502
-              this.open = false;
503
-              this.getList();
504
-            });
501
+              this.$modal.msgSuccess("新增成功")
502
+              this.open = false
503
+              this.getList()
504
+            })
505 505
           }
506 506
         }
507
-      });
507
+      })
508 508
     },
509 509
     /** 删除按钮操作 */
510 510
     handleDelete(row) {
511
-      const userIds = row.userId || this.ids;
511
+      const userIds = row.userId || this.ids
512 512
       this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
513
-        return delUser(userIds);
513
+        return delUser(userIds)
514 514
       }).then(() => {
515
-        this.getList();
516
-        this.$modal.msgSuccess("删除成功");
517
-      }).catch(() => {});
515
+        this.getList()
516
+        this.$modal.msgSuccess("删除成功")
517
+      }).catch(() => {})
518 518
     },
519 519
     /** 导出按钮操作 */
520 520
     handleExport() {
@@ -524,8 +524,8 @@ export default {
524 524
     },
525 525
     /** 导入按钮操作 */
526 526
     handleImport() {
527
-      this.upload.title = "用户导入";
528
-      this.upload.open = true;
527
+      this.upload.title = "用户导入"
528
+      this.upload.open = true
529 529
     },
530 530
     /** 下载模板操作 */
531 531
     importTemplate() {
@@ -534,20 +534,20 @@ export default {
534 534
     },
535 535
     // 文件上传中处理
536 536
     handleFileUploadProgress(event, file, fileList) {
537
-      this.upload.isUploading = true;
537
+      this.upload.isUploading = true
538 538
     },
539 539
     // 文件上传成功处理
540 540
     handleFileSuccess(response, file, fileList) {
541
-      this.upload.open = false;
542
-      this.upload.isUploading = false;
543
-      this.$refs.upload.clearFiles();
544
-      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
545
-      this.getList();
541
+      this.upload.open = false
542
+      this.upload.isUploading = false
543
+      this.$refs.upload.clearFiles()
544
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true })
545
+      this.getList()
546 546
     },
547 547
     // 提交上传文件
548 548
     submitFileForm() {
549
-      this.$refs.upload.submit();
549
+      this.$refs.upload.submit()
550 550
     }
551 551
   }
552
-};
552
+}
553 553
 </script>

+ 11 - 11
ruoyi-ui/src/views/system/user/profile/index.vue

@@ -59,10 +59,10 @@
59 59
 </template>
60 60
 
61 61
 <script>
62
-import userAvatar from "./userAvatar";
63
-import userInfo from "./userInfo";
64
-import resetPwd from "./resetPwd";
65
-import { getUserProfile } from "@/api/system/user";
62
+import userAvatar from "./userAvatar"
63
+import userInfo from "./userInfo"
64
+import resetPwd from "./resetPwd"
65
+import { getUserProfile } from "@/api/system/user"
66 66
 
67 67
 export default {
68 68
   name: "Profile",
@@ -73,19 +73,19 @@ export default {
73 73
       roleGroup: {},
74 74
       postGroup: {},
75 75
       activeTab: "userinfo"
76
-    };
76
+    }
77 77
   },
78 78
   created() {
79
-    this.getUser();
79
+    this.getUser()
80 80
   },
81 81
   methods: {
82 82
     getUser() {
83 83
       getUserProfile().then(response => {
84
-        this.user = response.data;
85
-        this.roleGroup = response.roleGroup;
86
-        this.postGroup = response.postGroup;
87
-      });
84
+        this.user = response.data
85
+        this.roleGroup = response.roleGroup
86
+        this.postGroup = response.postGroup
87
+      })
88 88
     }
89 89
   }
90
-};
90
+}
91 91
 </script>

+ 10 - 10
ruoyi-ui/src/views/system/user/profile/resetPwd.vue

@@ -17,17 +17,17 @@
17 17
 </template>
18 18
 
19 19
 <script>
20
-import { updateUserPwd } from "@/api/system/user";
20
+import { updateUserPwd } from "@/api/system/user"
21 21
 
22 22
 export default {
23 23
   data() {
24 24
     const equalToPassword = (rule, value, callback) => {
25 25
       if (this.user.newPassword !== value) {
26
-        callback(new Error("两次输入的密码不一致"));
26
+        callback(new Error("两次输入的密码不一致"))
27 27
       } else {
28
-        callback();
28
+        callback()
29 29
       }
30
-    };
30
+    }
31 31
     return {
32 32
       user: {
33 33
         oldPassword: undefined,
@@ -49,21 +49,21 @@ export default {
49 49
           { required: true, validator: equalToPassword, trigger: "blur" }
50 50
         ]
51 51
       }
52
-    };
52
+    }
53 53
   },
54 54
   methods: {
55 55
     submit() {
56 56
       this.$refs["form"].validate(valid => {
57 57
         if (valid) {
58 58
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
59
-            this.$modal.msgSuccess("修改成功");
60
-          });
59
+            this.$modal.msgSuccess("修改成功")
60
+          })
61 61
         }
62
-      });
62
+      })
63 63
     },
64 64
     close() {
65
-      this.$tab.closePage();
65
+      this.$tab.closePage()
66 66
     }
67 67
   }
68
-};
68
+}
69 69
 </script>

+ 29 - 29
ruoyi-ui/src/views/system/user/profile/userAvatar.vue

@@ -54,9 +54,9 @@
54 54
 </template>
55 55
 
56 56
 <script>
57
-import store from "@/store";
58
-import { VueCropper } from "vue-cropper";
59
-import { uploadAvatar } from "@/api/system/user";
57
+import store from "@/store"
58
+import { VueCropper } from "vue-cropper"
59
+import { uploadAvatar } from "@/api/system/user"
60 60
 import { debounce } from '@/utils'
61 61
 
62 62
 export default {
@@ -80,16 +80,16 @@ export default {
80 80
       },
81 81
       previews: {},
82 82
       resizeHandler: null
83
-    };
83
+    }
84 84
   },
85 85
   methods: {
86 86
     // 编辑头像
87 87
     editCropper() {
88
-      this.open = true;
88
+      this.open = true
89 89
     },
90 90
     // 打开弹出层结束时的回调
91 91
     modalOpened() {
92
-      this.visible = true;
92
+      this.visible = true
93 93
       if (!this.resizeHandler) {
94 94
         this.resizeHandler = debounce(() => {
95 95
           this.refresh()
@@ -99,63 +99,63 @@ export default {
99 99
     },
100 100
     // 刷新组件
101 101
     refresh() {
102
-      this.$refs.cropper.refresh();
102
+      this.$refs.cropper.refresh()
103 103
     },
104 104
     // 覆盖默认的上传行为
105 105
     requestUpload() {
106 106
     },
107 107
     // 向左旋转
108 108
     rotateLeft() {
109
-      this.$refs.cropper.rotateLeft();
109
+      this.$refs.cropper.rotateLeft()
110 110
     },
111 111
     // 向右旋转
112 112
     rotateRight() {
113
-      this.$refs.cropper.rotateRight();
113
+      this.$refs.cropper.rotateRight()
114 114
     },
115 115
     // 图片缩放
116 116
     changeScale(num) {
117
-      num = num || 1;
118
-      this.$refs.cropper.changeScale(num);
117
+      num = num || 1
118
+      this.$refs.cropper.changeScale(num)
119 119
     },
120 120
     // 上传预处理
121 121
     beforeUpload(file) {
122 122
       if (file.type.indexOf("image/") == -1) {
123
-        this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
123
+        this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。")
124 124
       } else {
125
-        const reader = new FileReader();
126
-        reader.readAsDataURL(file);
125
+        const reader = new FileReader()
126
+        reader.readAsDataURL(file)
127 127
         reader.onload = () => {
128
-          this.options.img = reader.result;
129
-          this.options.filename = file.name;
130
-        };
128
+          this.options.img = reader.result
129
+          this.options.filename = file.name
130
+        }
131 131
       }
132 132
     },
133 133
     // 上传图片
134 134
     uploadImg() {
135 135
       this.$refs.cropper.getCropBlob(data => {
136
-        let formData = new FormData();
137
-        formData.append("avatarfile", data, this.options.filename);
136
+        let formData = new FormData()
137
+        formData.append("avatarfile", data, this.options.filename)
138 138
         uploadAvatar(formData).then(response => {
139
-          this.open = false;
140
-          this.options.img = response.imgUrl;
141
-          store.commit('SET_AVATAR', this.options.img);
142
-          this.$modal.msgSuccess("修改成功");
143
-          this.visible = false;
144
-        });
145
-      });
139
+          this.open = false
140
+          this.options.img = response.imgUrl
141
+          store.commit('SET_AVATAR', this.options.img)
142
+          this.$modal.msgSuccess("修改成功")
143
+          this.visible = false
144
+        })
145
+      })
146 146
     },
147 147
     // 实时预览
148 148
     realTime(data) {
149
-      this.previews = data;
149
+      this.previews = data
150 150
     },
151 151
     // 关闭窗口
152 152
     closeDialog() {
153 153
       this.options.img = store.getters.avatar
154
-      this.visible = false;
154
+      this.visible = false
155 155
       window.removeEventListener("resize", this.resizeHandler)
156 156
     }
157 157
   }
158
-};
158
+}
159 159
 </script>
160 160
 <style scoped lang="scss">
161 161
 .user-info-head {

+ 10 - 10
ruoyi-ui/src/views/system/user/profile/userInfo.vue

@@ -23,7 +23,7 @@
23 23
 </template>
24 24
 
25 25
 <script>
26
-import { updateUserProfile } from "@/api/system/user";
26
+import { updateUserProfile } from "@/api/system/user"
27 27
 
28 28
 export default {
29 29
   props: {
@@ -56,13 +56,13 @@ export default {
56 56
           }
57 57
         ]
58 58
       }
59
-    };
59
+    }
60 60
   },
61 61
   watch: {
62 62
     user: {
63 63
       handler(user) {
64 64
         if (user) {
65
-          this.form = { nickName: user.nickName, phonenumber: user.phonenumber, email: user.email, sex: user.sex };
65
+          this.form = { nickName: user.nickName, phonenumber: user.phonenumber, email: user.email, sex: user.sex }
66 66
         }
67 67
       },
68 68
       immediate: true
@@ -73,16 +73,16 @@ export default {
73 73
       this.$refs["form"].validate(valid => {
74 74
         if (valid) {
75 75
           updateUserProfile(this.form).then(response => {
76
-            this.$modal.msgSuccess("修改成功");
77
-            this.user.phonenumber = this.form.phonenumber;
78
-            this.user.email = this.form.email;
79
-          });
76
+            this.$modal.msgSuccess("修改成功")
77
+            this.user.phonenumber = this.form.phonenumber
78
+            this.user.email = this.form.email
79
+          })
80 80
         }
81
-      });
81
+      })
82 82
     },
83 83
     close() {
84
-      this.$tab.closePage();
84
+      this.$tab.closePage()
85 85
     }
86 86
   }
87
-};
87
+}
88 88
 </script>

+ 2 - 2
ruoyi-ui/src/views/tool/gen/basicInfoForm.vue

@@ -54,7 +54,7 @@ export default {
54 54
           { required: true, message: "请输入作者", trigger: "blur" }
55 55
         ]
56 56
       }
57
-    };
57
+    }
58 58
   }
59
-};
59
+}
60 60
 </script>

+ 37 - 37
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -127,11 +127,11 @@
127 127
 </template>
128 128
 
129 129
 <script>
130
-import { getGenTable, updateGenTable } from "@/api/tool/gen";
131
-import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
132
-import { listMenu as getMenuTreeselect } from "@/api/system/menu";
133
-import basicInfoForm from "./basicInfoForm";
134
-import genInfoForm from "./genInfoForm";
130
+import { getGenTable, updateGenTable } from "@/api/tool/gen"
131
+import { optionselect as getDictOptionselect } from "@/api/system/dict/type"
132
+import { listMenu as getMenuTreeselect } from "@/api/system/menu"
133
+import basicInfoForm from "./basicInfoForm"
134
+import genInfoForm from "./genInfoForm"
135 135
 import Sortable from 'sortablejs'
136 136
 
137 137
 export default {
@@ -156,79 +156,79 @@ export default {
156 156
       menus: [],
157 157
       // 表详细信息
158 158
       info: {}
159
-    };
159
+    }
160 160
   },
161 161
   created() {
162
-    const tableId = this.$route.params && this.$route.params.tableId;
162
+    const tableId = this.$route.params && this.$route.params.tableId
163 163
     if (tableId) {
164 164
       // 获取表详细信息
165 165
       getGenTable(tableId).then(res => {
166
-        this.columns = res.data.rows;
167
-        this.info = res.data.info;
168
-        this.tables = res.data.tables;
169
-      });
166
+        this.columns = res.data.rows
167
+        this.info = res.data.info
168
+        this.tables = res.data.tables
169
+      })
170 170
       /** 查询字典下拉列表 */
171 171
       getDictOptionselect().then(response => {
172
-        this.dictOptions = response.data;
173
-      });
172
+        this.dictOptions = response.data
173
+      })
174 174
       /** 查询菜单下拉列表 */
175 175
       getMenuTreeselect().then(response => {
176
-        this.menus = this.handleTree(response.data, "menuId");
177
-      });
176
+        this.menus = this.handleTree(response.data, "menuId")
177
+      })
178 178
     }
179 179
   },
180 180
   methods: {
181 181
     /** 提交按钮 */
182 182
     submitForm() {
183
-      const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
184
-      const genForm = this.$refs.genInfo.$refs.genInfoForm;
183
+      const basicForm = this.$refs.basicInfo.$refs.basicInfoForm
184
+      const genForm = this.$refs.genInfo.$refs.genInfoForm
185 185
       Promise.all([basicForm, genForm].map(this.getFormPromise)).then(res => {
186
-        const validateResult = res.every(item => !!item);
186
+        const validateResult = res.every(item => !!item)
187 187
         if (validateResult) {
188
-          const genTable = Object.assign({}, basicForm.model, genForm.model);
189
-          genTable.columns = this.columns;
188
+          const genTable = Object.assign({}, basicForm.model, genForm.model)
189
+          genTable.columns = this.columns
190 190
           genTable.params = {
191 191
             treeCode: genTable.treeCode,
192 192
             treeName: genTable.treeName,
193 193
             treeParentCode: genTable.treeParentCode,
194 194
             parentMenuId: genTable.parentMenuId
195
-          };
195
+          }
196 196
           updateGenTable(genTable).then(res => {
197
-            this.$modal.msgSuccess(res.msg);
197
+            this.$modal.msgSuccess(res.msg)
198 198
             if (res.code === 200) {
199
-              this.close();
199
+              this.close()
200 200
             }
201
-          });
201
+          })
202 202
         } else {
203
-          this.$modal.msgError("表单校验未通过,请重新检查提交内容");
203
+          this.$modal.msgError("表单校验未通过,请重新检查提交内容")
204 204
         }
205
-      });
205
+      })
206 206
     },
207 207
     getFormPromise(form) {
208 208
       return new Promise(resolve => {
209 209
         form.validate(res => {
210
-          resolve(res);
211
-        });
212
-      });
210
+          resolve(res)
211
+        })
212
+      })
213 213
     },
214 214
     /** 关闭按钮 */
215 215
     close() {
216
-      const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } };
217
-      this.$tab.closeOpenPage(obj);
216
+      const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } }
217
+      this.$tab.closeOpenPage(obj)
218 218
     }
219 219
   },
220 220
   mounted() {
221
-    const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];
221
+    const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0]
222 222
     const sortable = Sortable.create(el, {
223 223
       handle: ".allowDrag",
224 224
       onEnd: evt => {
225
-        const targetRow = this.columns.splice(evt.oldIndex, 1)[0];
226
-        this.columns.splice(evt.newIndex, 0, targetRow);
225
+        const targetRow = this.columns.splice(evt.oldIndex, 1)[0]
226
+        this.columns.splice(evt.newIndex, 0, targetRow)
227 227
         for (let index in this.columns) {
228
-          this.columns[index].sort = parseInt(index) + 1;
228
+          this.columns[index].sort = parseInt(index) + 1
229 229
         }
230 230
       }
231
-    });
231
+    })
232 232
   }
233
-};
233
+}
234 234
 </script>

+ 16 - 16
ruoyi-ui/src/views/tool/gen/genInfoForm.vue

@@ -223,8 +223,8 @@
223 223
 </template>
224 224
 
225 225
 <script>
226
-import Treeselect from "@riophae/vue-treeselect";
227
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
226
+import Treeselect from "@riophae/vue-treeselect"
227
+import "@riophae/vue-treeselect/dist/vue-treeselect.css"
228 228
 
229 229
 export default {
230 230
   components: { Treeselect },
@@ -240,7 +240,7 @@ export default {
240 240
     menus: {
241 241
       type: Array,
242 242
       default: []
243
-    },
243
+    }
244 244
   },
245 245
   data() {
246 246
     return {
@@ -260,17 +260,17 @@ export default {
260 260
         ],
261 261
         functionName: [
262 262
           { required: true, message: "请输入生成功能名", trigger: "blur" }
263
-        ],
263
+        ]
264 264
       }
265
-    };
265
+    }
266 266
   },
267 267
   watch: {
268 268
     'info.subTableName': function(val) {
269
-      this.setSubTableColumns(val);
269
+      this.setSubTableColumns(val)
270 270
     },
271 271
     'info.tplWebType': function(val) {
272 272
       if (val === '') {
273
-        this.info.tplWebType = "element-ui";
273
+        this.info.tplWebType = "element-ui"
274 274
       }
275 275
     }
276 276
   },
@@ -278,35 +278,35 @@ export default {
278 278
     /** 转换菜单数据结构 */
279 279
     normalizer(node) {
280 280
       if (node.children && !node.children.length) {
281
-        delete node.children;
281
+        delete node.children
282 282
       }
283 283
       return {
284 284
         id: node.menuId,
285 285
         label: node.menuName,
286 286
         children: node.children
287
-      };
287
+      }
288 288
     },
289 289
     /** 选择子表名触发 */
290 290
     subSelectChange(value) {
291
-      this.info.subTableFkName = '';
291
+      this.info.subTableFkName = ''
292 292
     },
293 293
     /** 选择生成模板触发 */
294 294
     tplSelectChange(value) {
295 295
       if(value !== 'sub') {
296
-        this.info.subTableName = '';
297
-        this.info.subTableFkName = '';
296
+        this.info.subTableName = ''
297
+        this.info.subTableFkName = ''
298 298
       }
299 299
     },
300 300
     /** 设置关联外键 */
301 301
     setSubTableColumns(value) {
302 302
       for (var item in this.tables) {
303
-        const name = this.tables[item].tableName;
303
+        const name = this.tables[item].tableName
304 304
         if (value === name) {
305
-          this.subColumns = this.tables[item].columns;
306
-          break;
305
+          this.subColumns = this.tables[item].columns
306
+          break
307 307
         }
308 308
       }
309 309
     }
310 310
   }
311
-};
311
+}
312 312
 </script>

+ 21 - 21
ruoyi-ui/src/views/tool/gen/importTable.vue

@@ -47,7 +47,7 @@
47 47
 </template>
48 48
 
49 49
 <script>
50
-import { listDbTable, importTable } from "@/api/tool/gen";
50
+import { listDbTable, importTable } from "@/api/tool/gen"
51 51
 export default {
52 52
   data() {
53 53
     return {
@@ -66,55 +66,55 @@ export default {
66 66
         tableName: undefined,
67 67
         tableComment: undefined
68 68
       }
69
-    };
69
+    }
70 70
   },
71 71
   methods: {
72 72
     // 显示弹框
73 73
     show() {
74
-      this.getList();
75
-      this.visible = true;
74
+      this.getList()
75
+      this.visible = true
76 76
     },
77 77
     clickRow(row) {
78
-      this.$refs.table.toggleRowSelection(row);
78
+      this.$refs.table.toggleRowSelection(row)
79 79
     },
80 80
     // 多选框选中数据
81 81
     handleSelectionChange(selection) {
82
-      this.tables = selection.map(item => item.tableName);
82
+      this.tables = selection.map(item => item.tableName)
83 83
     },
84 84
     // 查询表数据
85 85
     getList() {
86 86
       listDbTable(this.queryParams).then(res => {
87 87
         if (res.code === 200) {
88
-          this.dbTableList = res.rows;
89
-          this.total = res.total;
88
+          this.dbTableList = res.rows
89
+          this.total = res.total
90 90
         }
91
-      });
91
+      })
92 92
     },
93 93
     /** 搜索按钮操作 */
94 94
     handleQuery() {
95
-      this.queryParams.pageNum = 1;
96
-      this.getList();
95
+      this.queryParams.pageNum = 1
96
+      this.getList()
97 97
     },
98 98
     /** 重置按钮操作 */
99 99
     resetQuery() {
100
-      this.resetForm("queryForm");
101
-      this.handleQuery();
100
+      this.resetForm("queryForm")
101
+      this.handleQuery()
102 102
     },
103 103
     /** 导入按钮操作 */
104 104
     handleImportTable() {
105
-      const tableNames = this.tables.join(",");
105
+      const tableNames = this.tables.join(",")
106 106
       if (tableNames == "") {
107
-        this.$modal.msgError("请选择要导入的表");
108
-        return;
107
+        this.$modal.msgError("请选择要导入的表")
108
+        return
109 109
       }
110 110
       importTable({ tables: tableNames }).then(res => {
111
-        this.$modal.msgSuccess(res.msg);
111
+        this.$modal.msgSuccess(res.msg)
112 112
         if (res.code === 200) {
113
-          this.visible = false;
114
-          this.$emit("ok");
113
+          this.visible = false
114
+          this.$emit("ok")
115 115
         }
116
-      });
116
+      })
117 117
     }
118 118
   }
119
-};
119
+}
120 120
 </script>

+ 65 - 65
ruoyi-ui/src/views/tool/gen/index.vue

@@ -158,16 +158,16 @@
158 158
 </template>
159 159
 
160 160
 <script>
161
-import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen";
162
-import importTable from "./importTable";
163
-import hljs from "highlight.js/lib/highlight";
164
-import "highlight.js/styles/github-gist.css";
165
-hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));
166
-hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"));
167
-hljs.registerLanguage("html", require("highlight.js/lib/languages/xml"));
168
-hljs.registerLanguage("vue", require("highlight.js/lib/languages/xml"));
169
-hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascript"));
170
-hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"));
161
+import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen"
162
+import importTable from "./importTable"
163
+import hljs from "highlight.js/lib/highlight"
164
+import "highlight.js/styles/github-gist.css"
165
+hljs.registerLanguage("java", require("highlight.js/lib/languages/java"))
166
+hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"))
167
+hljs.registerLanguage("html", require("highlight.js/lib/languages/xml"))
168
+hljs.registerLanguage("vue", require("highlight.js/lib/languages/xml"))
169
+hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascript"))
170
+hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"))
171 171
 
172 172
 export default {
173 173
   name: "Gen",
@@ -210,121 +210,121 @@ export default {
210 210
         data: {},
211 211
         activeName: "domain.java"
212 212
       }
213
-    };
213
+    }
214 214
   },
215 215
   created() {
216
-    this.queryParams.orderByColumn = this.defaultSort.prop;
217
-    this.queryParams.isAsc = this.defaultSort.order;
218
-    this.getList();
216
+    this.queryParams.orderByColumn = this.defaultSort.prop
217
+    this.queryParams.isAsc = this.defaultSort.order
218
+    this.getList()
219 219
   },
220 220
   activated() {
221
-    const time = this.$route.query.t;
221
+    const time = this.$route.query.t
222 222
     if (time != null && time != this.uniqueId) {
223
-      this.uniqueId = time;
224
-      this.queryParams.pageNum = Number(this.$route.query.pageNum);
225
-      this.getList();
223
+      this.uniqueId = time
224
+      this.queryParams.pageNum = Number(this.$route.query.pageNum)
225
+      this.getList()
226 226
     }
227 227
   },
228 228
   methods: {
229 229
     /** 查询表集合 */
230 230
     getList() {
231
-      this.loading = true;
231
+      this.loading = true
232 232
       listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
233
-          this.tableList = response.rows;
234
-          this.total = response.total;
235
-          this.loading = false;
233
+          this.tableList = response.rows
234
+          this.total = response.total
235
+          this.loading = false
236 236
         }
237
-      );
237
+      )
238 238
     },
239 239
     /** 搜索按钮操作 */
240 240
     handleQuery() {
241
-      this.queryParams.pageNum = 1;
242
-      this.getList();
241
+      this.queryParams.pageNum = 1
242
+      this.getList()
243 243
     },
244 244
     /** 生成代码操作 */
245 245
     handleGenTable(row) {
246
-      const tableNames = row.tableName || this.tableNames;
246
+      const tableNames = row.tableName || this.tableNames
247 247
       if (tableNames == "") {
248
-        this.$modal.msgError("请选择要生成的数据");
249
-        return;
248
+        this.$modal.msgError("请选择要生成的数据")
249
+        return
250 250
       }
251 251
       if(row.genType === "1") {
252 252
         genCode(row.tableName).then(response => {
253
-          this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath);
254
-        });
253
+          this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath)
254
+        })
255 255
       } else {
256
-        this.$download.zip("/code/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip");
256
+        this.$download.zip("/code/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip")
257 257
       }
258 258
     },
259 259
     /** 同步数据库操作 */
260 260
     handleSynchDb(row) {
261
-      const tableName = row.tableName;
261
+      const tableName = row.tableName
262 262
       this.$modal.confirm('确认要强制同步"' + tableName + '"表结构吗?').then(function() {
263
-        return synchDb(tableName);
263
+        return synchDb(tableName)
264 264
       }).then(() => {
265
-        this.$modal.msgSuccess("同步成功");
266
-      }).catch(() => {});
265
+        this.$modal.msgSuccess("同步成功")
266
+      }).catch(() => {})
267 267
     },
268 268
     /** 打开导入表弹窗 */
269 269
     openImportTable() {
270
-      this.$refs.import.show();
270
+      this.$refs.import.show()
271 271
     },
272 272
     /** 重置按钮操作 */
273 273
     resetQuery() {
274
-      this.dateRange = [];
275
-      this.resetForm("queryForm");
276
-      this.queryParams.pageNum = 1;
274
+      this.dateRange = []
275
+      this.resetForm("queryForm")
276
+      this.queryParams.pageNum = 1
277 277
       this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
278 278
     },
279 279
     /** 预览按钮 */
280 280
     handlePreview(row) {
281 281
       previewTable(row.tableId).then(response => {
282
-        this.preview.data = response.data;
283
-        this.preview.open = true;
284
-        this.preview.activeName = "domain.java";
285
-      });
282
+        this.preview.data = response.data
283
+        this.preview.open = true
284
+        this.preview.activeName = "domain.java"
285
+      })
286 286
     },
287 287
     /** 高亮显示 */
288 288
     highlightedCode(code, key) {
289
-      const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
290
-      var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
291
-      const result = hljs.highlight(language, code || "", true);
292
-      return result.value || '&nbsp;';
289
+      const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"))
290
+      var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length)
291
+      const result = hljs.highlight(language, code || "", true)
292
+      return result.value || '&nbsp;'
293 293
     },
294 294
     /** 复制代码成功 */
295 295
     clipboardSuccess() {
296
-      this.$modal.msgSuccess("复制成功");
296
+      this.$modal.msgSuccess("复制成功")
297 297
     },
298 298
     // 多选框选中数据
299 299
     handleSelectionChange(selection) {
300
-      this.ids = selection.map(item => item.tableId);
301
-      this.tableNames = selection.map(item => item.tableName);
302
-      this.single = selection.length != 1;
303
-      this.multiple = !selection.length;
300
+      this.ids = selection.map(item => item.tableId)
301
+      this.tableNames = selection.map(item => item.tableName)
302
+      this.single = selection.length != 1
303
+      this.multiple = !selection.length
304 304
     },
305 305
     /** 排序触发事件 */
306 306
     handleSortChange(column, prop, order) {
307
-      this.queryParams.orderByColumn = column.prop;
308
-      this.queryParams.isAsc = column.order;
309
-      this.getList();
307
+      this.queryParams.orderByColumn = column.prop
308
+      this.queryParams.isAsc = column.order
309
+      this.getList()
310 310
     },
311 311
     /** 修改按钮操作 */
312 312
     handleEditTable(row) {
313
-      const tableId = row.tableId || this.ids[0];
314
-      const tableName = row.tableName || this.tableNames[0];
315
-      const params = { pageNum: this.queryParams.pageNum };
316
-      this.$tab.openPage("修改[" + tableName + "]生成配置", '/tool/gen-edit/index/' + tableId, params);
313
+      const tableId = row.tableId || this.ids[0]
314
+      const tableName = row.tableName || this.tableNames[0]
315
+      const params = { pageNum: this.queryParams.pageNum }
316
+      this.$tab.openPage("修改[" + tableName + "]生成配置", '/tool/gen-edit/index/' + tableId, params)
317 317
     },
318 318
     /** 删除按钮操作 */
319 319
     handleDelete(row) {
320
-      const tableIds = row.tableId || this.ids;
320
+      const tableIds = row.tableId || this.ids
321 321
       this.$modal.confirm('是否确认删除表编号为"' + tableIds + '"的数据项?').then(function() {
322
-        return delTable(tableIds);
322
+        return delTable(tableIds)
323 323
       }).then(() => {
324
-        this.getList();
325
-        this.$modal.msgSuccess("删除成功");
326
-      }).catch(() => {});
324
+        this.getList()
325
+        this.$modal.msgSuccess("删除成功")
326
+      }).catch(() => {})
327 327
     }
328 328
   }
329
-};
329
+}
330 330
 </script>