forked from lerry903/RuoYi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
26,398 additions
and
22 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoDialogController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package com.ruoyi.web.controller.demo.controller; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
/** | ||
* 模态窗口 | ||
* | ||
* @author ruoyi | ||
*/ | ||
@Controller | ||
@RequestMapping("/demo/modal") | ||
public class DemoDialogController { | ||
private String prefix = "demo/modal"; | ||
|
||
/** | ||
* 模态窗口 | ||
*/ | ||
@GetMapping("/dialog") | ||
public String dialog() { | ||
return prefix + "/dialog"; | ||
} | ||
|
||
/** | ||
* 弹层组件 | ||
*/ | ||
@GetMapping("/layer") | ||
public String layer() { | ||
return prefix + "/layer"; | ||
} | ||
|
||
/** | ||
* 表单 | ||
*/ | ||
@GetMapping("/form") | ||
public String form() { | ||
return prefix + "/form"; | ||
} | ||
|
||
/** | ||
* 表格 | ||
*/ | ||
@GetMapping("/table") | ||
public String table() { | ||
return prefix + "/table"; | ||
} | ||
|
||
/** | ||
* 表格check | ||
*/ | ||
@GetMapping("/check") | ||
public String check() { | ||
return prefix + "/table/check"; | ||
} | ||
|
||
/** | ||
* 表格radio | ||
*/ | ||
@GetMapping("/radio") | ||
public String radio() { | ||
return prefix + "/table/radio"; | ||
} | ||
|
||
/** | ||
* 表格回传父窗体 | ||
*/ | ||
@GetMapping("/parent") | ||
public String parent() { | ||
return prefix + "/table/parent"; | ||
} | ||
} |
195 changes: 195 additions & 0 deletions
195
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoFormController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
package com.ruoyi.web.controller.demo.controller; | ||
|
||
import com.ruoyi.common.base.AjaxResult; | ||
import lombok.Data; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* 表单相关 | ||
* | ||
* @author ruoyi | ||
*/ | ||
@Controller | ||
@RequestMapping("/demo/form") | ||
public class DemoFormController { | ||
private String prefix = "demo/form"; | ||
|
||
private final static List<UserFormModel> USERS = new ArrayList<>(); | ||
|
||
static { | ||
USERS.add(new UserFormModel(1, "1000001", "测试1", "15888888888")); | ||
USERS.add(new UserFormModel(2, "1000002", "测试2", "15666666666")); | ||
USERS.add(new UserFormModel(3, "1000003", "测试3", "15666666666")); | ||
USERS.add(new UserFormModel(4, "1000004", "测试4", "15666666666")); | ||
USERS.add(new UserFormModel(5, "1000005", "测试5", "15666666666")); | ||
} | ||
|
||
/** | ||
* 按钮页 | ||
*/ | ||
@GetMapping("/button") | ||
public String button() { | ||
return prefix + "/button"; | ||
} | ||
|
||
/** | ||
* 下拉框 | ||
*/ | ||
@GetMapping("/select") | ||
public String select() { | ||
return prefix + "/select"; | ||
} | ||
|
||
/** | ||
* 表单校验 | ||
*/ | ||
@GetMapping("/validate") | ||
public String validate() { | ||
return prefix + "/validate"; | ||
} | ||
|
||
/** | ||
* 功能扩展(包含文件上传) | ||
*/ | ||
@GetMapping("/jasny") | ||
public String jasny() { | ||
return prefix + "/jasny"; | ||
} | ||
|
||
/** | ||
* 拖动排序 | ||
*/ | ||
@GetMapping("/sortable") | ||
public String sortable() { | ||
return prefix + "/sortable"; | ||
} | ||
|
||
/** | ||
* 选项卡 & 面板 | ||
*/ | ||
@GetMapping("/tabs_panels") | ||
public String tabs_panels() { | ||
return prefix + "/tabs_panels"; | ||
} | ||
|
||
/** | ||
* 栅格 | ||
*/ | ||
@GetMapping("/grid") | ||
public String grid() { | ||
return prefix + "/grid"; | ||
} | ||
|
||
/** | ||
* 表单向导 | ||
*/ | ||
@GetMapping("/wizard") | ||
public String wizard() { | ||
return prefix + "/wizard"; | ||
} | ||
|
||
/** | ||
* 文件上传 | ||
*/ | ||
@GetMapping("/upload") | ||
public String upload() { | ||
return prefix + "/upload"; | ||
} | ||
|
||
/** | ||
* 日期和时间页 | ||
*/ | ||
@GetMapping("/datetime") | ||
public String datetime() { | ||
return prefix + "/datetime"; | ||
} | ||
|
||
/** | ||
* 左右互选组件 | ||
*/ | ||
@GetMapping("/duallistbox") | ||
public String duallistbox() { | ||
return prefix + "/duallistbox"; | ||
} | ||
|
||
/** | ||
* 基本表单 | ||
*/ | ||
@GetMapping("/basic") | ||
public String basic() { | ||
return prefix + "/basic"; | ||
} | ||
|
||
/** | ||
* 搜索自动补全 | ||
*/ | ||
@GetMapping("/autocomplete") | ||
public String autocomplete() { | ||
return prefix + "/autocomplete"; | ||
} | ||
|
||
/** | ||
* 获取用户数据 | ||
*/ | ||
@GetMapping("/userModel") | ||
@ResponseBody | ||
public AjaxResult userModel() { | ||
AjaxResult ajax = new AjaxResult(); | ||
|
||
ajax.put("code", 200); | ||
ajax.put("value", USERS); | ||
return ajax; | ||
} | ||
|
||
/** | ||
* 获取数据集合 | ||
*/ | ||
@GetMapping("/collection") | ||
@ResponseBody | ||
public AjaxResult collection() { | ||
String[] array = {"ruoyi 1", "ruoyi 2", "ruoyi 3", "ruoyi 4", "ruoyi 5"}; | ||
AjaxResult ajax = new AjaxResult(); | ||
ajax.put("value", array); | ||
return ajax; | ||
} | ||
} | ||
|
||
@Data | ||
class UserFormModel { | ||
/** | ||
* 用户ID | ||
*/ | ||
private int userId; | ||
|
||
/** | ||
* 用户编号 | ||
*/ | ||
private String userCode; | ||
|
||
/** | ||
* 用户姓名 | ||
*/ | ||
private String userName; | ||
|
||
/** | ||
* 用户手机 | ||
*/ | ||
private String userPhone; | ||
|
||
public UserFormModel() { | ||
|
||
} | ||
|
||
public UserFormModel(int userId, String userCode, String userName, String userPhone) { | ||
this.userId = userId; | ||
this.userCode = userCode; | ||
this.userName = userName; | ||
this.userPhone = userPhone; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoIconController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.ruoyi.web.controller.demo.controller; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
/** | ||
* 图标相关 | ||
* | ||
* @author ruoyi | ||
*/ | ||
@Controller | ||
@RequestMapping("/demo/icon") | ||
public class DemoIconController { | ||
private String prefix = "demo/icon"; | ||
|
||
/** | ||
* FontAwesome图标 | ||
*/ | ||
@GetMapping("/fontawesome") | ||
public String fontAwesome() { | ||
return prefix + "/fontawesome"; | ||
} | ||
|
||
/** | ||
* Glyphicons图标 | ||
*/ | ||
@GetMapping("/glyphicons") | ||
public String glyphicons() { | ||
return prefix + "/glyphicons"; | ||
} | ||
} |
Oops, something went wrong.