| | |
| | | // @Description 显示左侧所有区域和摄像机 |
| | | // @Produce json |
| | | // @Tags menu |
| | | // @Param parentid query int true "区域的id" |
| | | // @Param parentid query string true "区域的id" |
| | | // @Param searchType query int true "查询类型(0:全部,1:分析摄像机,2:监控摄像机)" |
| | | // @Param cameraName query string false "摄像机名称" |
| | | // @Success 200 {string} json "{"code":200, msg:"目录结构数据"}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"返回错误信息"}" |
| | | // @Router /data/api-v/area/localmenu [get] |
| | |
| | | // @Description 显示Gb28181树形结构 |
| | | // @Produce json |
| | | // @Tags menu |
| | | // @Param parentid query int true "区域的id" |
| | | // @Param parentid query string true "区域的id" |
| | | // @Param searchType query int true "查询类型(0:全部,1:分析摄像机,2:监控摄像机)" |
| | | // @Param cameraName query string false "摄像机名称" |
| | | // @Success 200 {string} json "{"code":200, msg:"目录结构数据"}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"返回错误信息"}" |
| | | // @Router /data/api-v/area/localmenu [get] |
| | | // @Router /data/api-v/area/gb28181Tree [get] |
| | | func (ac AreaController) CameraGb28181Tree(c *gin.Context) { |
| | | parentIdStr := c.Query("parentid") |
| | | searchTypeStr := c.Query("searchType") |
| | |
| | | util.ResponseFormat(c, code.Success, arr) |
| | | } |
| | | |
| | | // @Summary 刷新Gb28181平台树 |
| | | // @Description 刷新Gb28181平台树 |
| | | // @Produce json |
| | | // @Tags menu |
| | | // @Param id formData string true "国标平台id" |
| | | // @Success 200 {string} json "{"code":200, data:"",msg:"请求成功", success:true}" |
| | | // @Failure 200 {string} json "{"code":500, data:"",msg:"请求失败", success:false}" |
| | | // @Router /data/api-v/area/gb28181TreeRefresh [post] |
| | | func (ac AreaController) Gb28181TreeRefresh(c *gin.Context) { |
| | | id := c.PostForm("id") |
| | | if id =="" { |
| | | util.ResponseFormat(c, code.RequestParamError, "参数错误") |
| | | return |
| | | } |
| | | var api dbapi.AreaApi |
| | | if api.Gb28181TreeRefresh(id) { |
| | | util.ResponseFormat(c,code.UpdateSuccess,"更新成功") |
| | | } else { |
| | | util.ResponseFormat(c,code.UpdateFail, "更新失败") |
| | | } |
| | | } |
| | | |
| | | // @Summary 删除Gb28181平台 |
| | | // @Description 删除Gb28181平台 |
| | | // @Produce json |
| | | // @Tags menu |
| | | // @Success 200 {string} json "{"code":200, data:"",msg:"请求成功", success:true}" |
| | | // @Failure 200 {string} json "{"code":500, data:"",msg:"请求失败", success:false}" |
| | | // @Router /data/api-v/area/gb28181TreeDelete [post] |
| | | func (ac AreaController) Gb28181TreeDelete(c *gin.Context) { |
| | | var api dbapi.AreaApi |
| | | if api.Gb28181TreeDelete() { |
| | | util.ResponseFormat(c,code.DelSuccess,"删除成功") |
| | | } else { |
| | | util.ResponseFormat(c,code.ComError, "删除失败") |
| | | } |
| | | } |
| | | |
| | | // @Summary 添加menu的区域 |
| | | // @Description 添加目录上区域 |
| | | // @Produce json |