feat:完善项目信息
This commit is contained in:
@ -149,22 +149,6 @@ func (*Manage) ExpertExamine(c *gin.Context) {
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) Laboratory(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
||||
func (*Manage) LaboratoryExamine(c *gin.Context) {
|
||||
form := new(manageExamineForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
form.Identity = config.TenantUserIdentityForLaboratory
|
||||
err := form.handle(api.GetSession()(c).(*session.Admin), nil)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) Research(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.TenantIDStringForm
|
||||
@ -191,6 +175,19 @@ func (*Manage) ResearchSelect(c *gin.Context) {
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) ResearchForm(c *gin.Context) {
|
||||
form := &struct {
|
||||
manageForm
|
||||
config.IdentityForResearch
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewResearch()(api.GetSession()(c).(*session.Admin)).Form(form.bind(), &form.IdentityForResearch)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) ResearchExamine(c *gin.Context) {
|
||||
form := new(manageExamineForm)
|
||||
|
||||
@ -214,6 +211,70 @@ func (*Manage) ResearchDetail(c *gin.Context) {
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) Laboratory(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.TenantIDStringForm
|
||||
Name string `json:"name" form:"name"`
|
||||
ExamineStatus int `json:"examine_status" form:"examine_status"`
|
||||
api.PageForm
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Admin)).Instance(form.Convert(), form.Name, form.ExamineStatus, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) LaboratoryForm(c *gin.Context) {
|
||||
form := &struct {
|
||||
manageForm
|
||||
config.IdentityForLaboratory
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewLaboratory()(api.GetSession()(c).(*session.Admin)).Form(form.bind(), &form.IdentityForLaboratory)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) LaboratorySelect(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.TenantIDStringForm
|
||||
ResearchID uint64 `json:"research_id" form:"research_id"`
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Admin)).Select(form.Convert(), form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) LaboratoryDetail(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Admin)).Detail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) LaboratoryExamine(c *gin.Context) {
|
||||
form := new(manageExamineForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
form.Identity = config.TenantUserIdentityForLaboratory
|
||||
err := form.handle(api.GetSession()(c).(*session.Admin), nil)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) Agent(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user