Ruoyi Framework (2)-Introduction and code generation

Ruoyi Framework (2)-Introduction and code generation

Function

User management: The user is the system operator. This function mainly completes the system user configuration.

Department management: configure system organization (company, department, group), tree structure display supports data permissions.

Position management: Configure the positions held by system users.

Menu management: configure system menus, operation permissions, button permission identification, etc.

Role management: Assign role menu permissions, set roles, and divide data range permissions by organization.

Dictionary management: Maintain some relatively fixed data frequently used in the system.

Parameter management: Dynamically configure common parameters for the system.

Notification and announcement: System notification and announcement information is released and maintained.

Operation log: system normal operation log recording and query; system abnormal information log recording and query.

Login log: The system login log record query contains login exceptions.

Online users: Monitor the status of active users in the current system.

Scheduled tasks: Online (add, modify, delete) task scheduling includes execution result logs.

Code generation: Front-end and back-end code generation (java, html, xml, sql) supports CRUD download.

System interface: Automatically generate relevant API interface documents based on business code.

Service monitoring: Monitor the current system CPU, memory, disk, stack and other related information.

Cache monitoring: Query system cache information, command statistics, etc.

Online builder: Drag form elements to generate corresponding HTML code.

Connection pool monitoring: Monitor the current system database connection pool status, and analyze SQL to find system performance bottlenecks.

introduce

1. System management/user management

Functions: Add, delete, modify and check, import and export Excel

2. System management/role management

Function: Role menu permission allocation, setting roles to divide data scope permissions by organization.

3. System management/menu management

Function: Modify the left navigation bar and create a new student menu

4. System management/department management

Function: Add, modify, delete departments and link with user management tree diagram
Please add image description
Please add image description
5. System monitoring/data monitoring

Generate code
Please add image description

1. Create database tables (write comments)
Please add image description

2.Import
Please add image description

Please add image description
3.Edit

Basic information-Author

Generate information-generate module name, generate package path, upper-level menu-student
Please add image description

3. Generate code
! [Insert image description here] Directly upload via https:// (blog.csdni5xqumg.cn/f1589dd1dee14200a5e3d8ca5f537ea3.png#pic_center) https:/Insert image description here
Please add image description

After decompression

Please add image description

4. Import sql into the database

Please add image description

sys_menu added 7 new data

Please add image description

5. Import front-end code

Please add image description
Please add image description

Please add image description
Please add image description

Import successful
Please add image description
Please add image description

6. Import backend code

Please add image description

Import ruoyi-system or ruoyi-admin or create a new one. You can choose to import ruoyi-system here.
Please add image description

Import successful
Please add image description

7. Restart

Note: If 404 appears, rebuild the back-end project Build/rebuild project and then restart
Please add image description

Test-New
Please add image description

Please add image description
Please add image description

Front-end manual-see official documentation for details

Common method

$tab object

The $tab object is used to perform tab operations, refresh tabs, close tabs, open tabs, modify tabs, etc. It is defined in the plugins/tab.js file and has the following methods

  • Open the tab
    this.$tab.openPage("User Management", "/system/user");

    this.$tab.openPage("用户管理", "/system/user").then(() => {
      // 执行结束的逻辑
    })
    
  • Modify the page label
    const obj = Object.assign({}, this. route, title: "Customized title") this. route, { title: "Customized title" }) this.route,title:" Custom title " ) t hi s . tab.updatePage(obj);

    this.$tab.updatePage(obj).then(() => {
      // 执行结束的逻辑
    })
    
  • Close tab

  • Refresh tab

  • Close all tabs

  • Close the left tab

  • Close the right tab

  • Close other tabs

$modal object

The $modal object is used for message prompts, notification prompts, dialog prompts, secondary confirmations, masks, etc. It is defined in the plugins/modal.js file and has the following methods

  • Provide feedback on success, warnings, and errors
  • Provide success, warning and error messages
  • Provide notification information such as success, warning and error
  • Provide confirmation form information
  • Provide mask layer information

$auth object

The $auth object is used to verify whether the user has certain permissions or roles. It is defined in the plugins/auth.js file. It has the following methods

  • Verify user permissions
  • Verify user role

$cache object

The cache object is used to handle caching. We do not recommend that you use session Storage or local Storage directly, because the project's caching strategy may change, and the cache object is used to handle caching. We do not recommend that you use sessionStorage or localStorage directly because the project's caching strategy may change.The c a c h e object is used to handle caching. We do not recommend that you use sess i on St or a g e or l oc a lSt or a g e directly , because the project's caching strategy may change. It is a good choice to use the cache object to make a layer of call proxy . $cache provides two levels of cache, session and local, as follows:

Object name cache type
session session-level cache, implemented through sessionStorage
local local-level cache, implemented through localStorage

$download object

The $download object is used for file downloading. It is defined in the plugins/download.js file. It has the following methods

  • Download the file under the download path according to the name
  • Download the file under the upload path according to the name
  • Download the zip package according to the request address
  • More file download operations

Guess you like

Origin blog.csdn.net/lu947/article/details/127743647