mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-09 04:03:51 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b782b953a5 | ||
|
|
4fc2976624 | ||
|
|
c692d0e6d3 | ||
|
|
1204787cf3 | ||
|
|
2d61c21398 | ||
|
|
fe6ab3798a | ||
|
|
0c0da77ecd | ||
|
|
c530d8db15 |
@@ -6,8 +6,8 @@ SmartAdmin由河南·洛阳 [1024创新实验室](https://www.1024lab.net/)团
|
||||
github: [https://github.com/1024-lab/smart-admin](https://github.com/1024-lab/smart-admin)
|
||||
gitee: [https://gitee.com/lab1024/smart-admin](https://gitee.com/lab1024/smart-admin)
|
||||
在线预览: [http://preview.smartadmin.1024lab.net](http://preview.smartadmin.1024lab.net)
|
||||
部署文档:[http://smartadmin.1024lab.net/doc/2/168](http://smartadmin.1024lab.net/doc/2/168)
|
||||
平滑升级:[http://smartadmin.1024lab.net/doc/2/173](http://smartadmin.1024lab.net/doc/2/173)
|
||||
部署文档:[http://smartadmin.1024lab.net](http://smartadmin.1024lab.net)
|
||||
|
||||
|
||||
#### 疑惑
|
||||
有人问:又是个“轮子”? 轮子靠谱吗?为什么要选择你这个轮子?
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"cropperjs": "^1.2.2",
|
||||
"dayjs": "^1.7.7",
|
||||
"decimal.js": "^10.1.1",
|
||||
"core-js":"^2.0.0",
|
||||
"e-guide-layer": "^0.1.1",
|
||||
"echarts": "^4.0.4",
|
||||
"gq-plus": "^2.1.5",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<Col :lg="19" :md="16">
|
||||
<Card class="warp-card" dis-hover>
|
||||
<!--Row 顶部操作区 start-->
|
||||
@@ -73,8 +73,8 @@
|
||||
</Row>
|
||||
<!--Row 底部操作区 end-->
|
||||
</Card>
|
||||
</Col>
|
||||
<!--EmployeeTableAdd 添加成员弹窗 start-->
|
||||
|
||||
<!--EmployeeTableAdd 添加成员弹窗 start-->
|
||||
<EmployeeTableAdd
|
||||
:selectDepartment="selectDepartment"
|
||||
@addSuccess="getEmployeeList"
|
||||
@@ -101,7 +101,10 @@
|
||||
<!--EmployeeTableDetail 角色详情 start-->
|
||||
<EmployeeTableDetail ref="employeeTableDetail"></EmployeeTableDetail>
|
||||
<!--EmployeeTableDetail 角色详情 end-->
|
||||
</div>
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { departmentApi } from '@/api/department';
|
||||
|
||||
38
代码规范/api接口规范.md
Normal file
38
代码规范/api接口规范.md
Normal file
@@ -0,0 +1,38 @@
|
||||
### Restful接口规范
|
||||
1、不推荐使用 rest 命名 url, 只能使用 get/post 方法。url 命名上规范如下:虽然 Rest 大法好,但是有时并不能一眼根据 url看出来是什么操作。
|
||||
url 格式为:
|
||||
|
||||
/业务模块/子模块/动作
|
||||
|
||||
举例:
|
||||
```
|
||||
GET /department/get/{id} 查询某个部门详细信息
|
||||
POST /department/query 复杂查询
|
||||
POST /department/add 添加部门
|
||||
POST /department/update 更新部门
|
||||
GET /department/delete/{id} 删除部门
|
||||
```
|
||||
### controller 里接口 swagger 规范
|
||||
1、controller每个方法必须添加 swagger 文档注解 @ApiOperation ,并填写接口描述信息,描述最后必须加上作者信息 @author 哪吒
|
||||
比如:
|
||||
```java
|
||||
@ApiOperation("更新部门信息 @author 哪吒")
|
||||
@PostMapping("/department/update")
|
||||
public ResponseDTO<String> updateDepartment(@Valid @RequestBody DeptUpdateDTO deptUpdateDTO) {
|
||||
return departmentService.updateDepartment(deptUpdateDTO);
|
||||
}
|
||||
```
|
||||
|
||||
### controller 里 传入和返回 JavaBean 规范
|
||||
1、类中的每个字段添加注释
|
||||
2、对于枚举值的类型,要清楚标注清楚可能的值,以及每个值表示什么含义
|
||||
比如:
|
||||
```
|
||||
public class UserVO{
|
||||
|
||||
@ApiModelProperty("性别:0表示 女,1表示 男,2表示 未知")
|
||||
private Integer gender;
|
||||
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user