feat:完善项目
This commit is contained in:
@ -135,7 +135,7 @@ func (*User) Select(c *gin.Context) {
|
||||
* "link": "",
|
||||
* "component": "",
|
||||
* "icon": "",
|
||||
* "parent_id": "0",
|
||||
* "parent_id": "",
|
||||
* "checked": true,
|
||||
* "checked": [],
|
||||
* }
|
||||
@ -476,7 +476,7 @@ func (*User) Frozen(c *gin.Context) {
|
||||
* {
|
||||
* "id": "EgmJ4Ga7LQ",
|
||||
* "name": "分管领导",
|
||||
* "parent_id": "0",
|
||||
* "parent_id": "",
|
||||
* "checked": true,
|
||||
* "children": [
|
||||
* {
|
||||
|
@ -200,15 +200,16 @@ func (*Work) Instance(c *gin.Context) {
|
||||
*/
|
||||
func (*Work) Person(c *gin.Context) {
|
||||
form := &struct {
|
||||
MaterialID uint64 `json:"material_id" form:"material_id"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
EquipmentCode string `json:"equipment_code" form:"equipment_code"`
|
||||
EquipmentTitle string `json:"equipment_title" form:"equipment_title"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
PageForm
|
||||
}{}
|
||||
if err := bind(form)(c); err != nil {
|
||||
APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Person(form.MaterialID, form.Kind, form.Page, form.PageSize)
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Person(form.EquipmentCode, form.EquipmentTitle, form.Kind, form.Page, form.PageSize)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
@ -263,15 +264,16 @@ func (*Work) Person(c *gin.Context) {
|
||||
*/
|
||||
func (*Work) Workbench(c *gin.Context) {
|
||||
form := &struct {
|
||||
MaterialID uint64 `json:"material_id" form:"material_id"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
EquipmentCode string `json:"equipment_code" form:"equipment_code"`
|
||||
EquipmentTitle string `json:"equipment_title" form:"equipment_title"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
PageForm
|
||||
}{}
|
||||
if err := bind(form)(c); err != nil {
|
||||
APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Workbench(form.MaterialID, form.Kind, form.Page, form.PageSize)
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Workbench(form.EquipmentCode, form.EquipmentTitle, form.Kind, form.Page, form.PageSize)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user