Browse Source

fix:调整知识资源和看板部分代码

zqbao 3 months ago
parent
commit
c431796651

+ 2 - 1
controllers/bi_dashboard.go

@@ -105,6 +105,7 @@ func (this *BIDaShboardController) AddDashboard() {
 			BiDashboardId: int(id),
 			Type:          v.Type,
 			UniqueCode:    v.UniqueCode,
+			Conf:          v.Conf,
 			Sort:          i + 1,
 			CreateTime:    time.Now(),
 			ModifyTime:    time.Now(),
@@ -121,7 +122,6 @@ func (this *BIDaShboardController) AddDashboard() {
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "新增成功"
-	//br.Data =
 }
 
 // EditPpt
@@ -184,6 +184,7 @@ func (this *BIDaShboardController) EditDashboard() {
 			BiDashboardId: req.BiDashboardId,
 			Type:          v.Type,
 			UniqueCode:    v.UniqueCode,
+			Conf:          v.Conf,
 			Sort:          v.Sort,
 			CreateTime:    time.Now(),
 			ModifyTime:    time.Now(),

+ 3 - 1
controllers/knowledge/resource.go

@@ -1208,6 +1208,8 @@ func (this *ResourceController) TemplateDownload() {
 // @Success 200 {object} models.EdbdataClassifyResp
 // @Param   ResourceType   query   int  true       "资源库类型:0:事件库 1:政策库 2:观点库;3:知识库"
 // @Param   BiDashboardDetailId   query   int  true       "bi看板详情ID"
+// @Param   CurrentIndex   query   int  true       "当前页码,从1开始"
+// @Param   PageSize   query   int  true       "每页显示数量"
 // @router /resource/bi_dashboard/list [get]
 func (this *ResourceController) BiDashboardResourceList() {
 	br := new(models.BaseResponse).Init()
@@ -1218,7 +1220,7 @@ func (this *ResourceController) BiDashboardResourceList() {
 
 	biDashboardDetailId, _ := this.GetInt("BiDashboardDetailId")
 	resourceType, _ := this.GetInt("ResourceType")
-	currentIndex, _ := this.GetInt("currentIndex")
+	currentIndex, _ := this.GetInt("CurrentIndex")
 	pageSize, _ := this.GetInt("PageSize")
 
 	resp, msg, err := knowledgeServ.GetKnowledgeResourceList(biDashboardDetailId, resourceType, currentIndex, pageSize)

+ 1 - 0
models/bi_dashboard/bi_dashboard.go

@@ -82,6 +82,7 @@ type AddDashboardListReq struct {
 	Type       int
 	UniqueCode string
 	Sort       int
+	Conf       string
 }
 
 type EditDashboardReq struct {

+ 1 - 0
models/bi_dashboard/bi_dashboard_detail.go

@@ -9,6 +9,7 @@ type BiDashboardDetail struct {
 	BiDashboardDetailId int       `gorm:"primaryKey;autoIncrement;column:bi_dashboard_detail_id" ` // bi看板id
 	BiDashboardId       int       `gorm:"column:bi_dashboard_id" `                                 // 看板id
 	Type                int       `gorm:"column:type" `                                            // 1图表 2表格 3知识资源库
+	Conf                string    `gorm:"column:conf" `                                            // 配置信息
 	UniqueCode          string    `gorm:"column:unique_code;size:32;not null" `                    // 报告唯一编码
 	Sort                int       `gorm:"column:sort" `                                            // 排序字段
 	CreateTime          time.Time `gorm:"column:create_time" `                                     // 创建时间