|
@@ -1239,13 +1239,46 @@ func (this *ResourceController) BiDashboardResourceList() {
|
|
|
br.Data = resp
|
|
|
}
|
|
|
|
|
|
-// BiDashboardResourceAdd
|
|
|
+// BiDashboardTmpResourceList
|
|
|
+// @Title 获取bi看报中的知识资源列表
|
|
|
+// @Description 获取bi看报中的知识资源列表
|
|
|
+// @Success 200 {object} models.EdbdataClassifyResp
|
|
|
+// @Param ResourceType query int true "资源库类型:0:事件库 1:政策库 2:观点库;3:知识库"
|
|
|
+// @Param BiDashboardDetailId query int true "bi看板详情ID"
|
|
|
+// @router /resource/bi_dashboard/cache/list [get]
|
|
|
+func (this *ResourceController) BiDashboardTmpResourceList() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+
|
|
|
+ biDashboardDetailId, _ := this.GetInt("BiDashboardDetailId")
|
|
|
+ resourceType, _ := this.GetInt("ResourceType")
|
|
|
+
|
|
|
+ msg, err := knowledgeServ.GetKnowledgeResourceTmpList(biDashboardDetailId, resourceType, this.SysUser.AdminId)
|
|
|
+ if err != nil {
|
|
|
+ if msg == "" {
|
|
|
+ msg = "获取数据失败"
|
|
|
+ }
|
|
|
+ br.Msg = msg
|
|
|
+ br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ // br.Data = resp
|
|
|
+}
|
|
|
+
|
|
|
+// BiDashboardResourceSave
|
|
|
// @Title 将知识资源库添加到bi看板
|
|
|
// @Description 将知识资源库添加到bi看板
|
|
|
// @Param request body knowledge.DeleteReq true "type json string"
|
|
|
// @Success 200 {object} models.EdbdataClassifyResp
|
|
|
// @router /resource/bi_dashboard/save [post]
|
|
|
-func (this *ResourceController) BiDashboardResourceAdd() {
|
|
|
+func (this *ResourceController) BiDashboardResourceSave() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
|
defer func() {
|
|
|
this.Data["json"] = br
|