Browse Source

fix state

zwxi 6 months ago
parent
commit
051c608f08

+ 1 - 0
controllers/bi_dashboard.go

@@ -888,6 +888,7 @@ func (this *BIDaShboardController) Public() {
 	}
 	
 	item.BiDashboardClassifyId = req.ClassifyId
+	item.State = 4
 
 	err = bi_dashboard.EditDashboard(item)
 	if err != nil {

+ 1 - 1
models/bi_dashboard/bi_dashboard.go

@@ -14,7 +14,7 @@ type BiDashboard struct {
 	Sort                  int       `gorm:"column:sort" `                                    // 排序字段
 	CreateTime            time.Time `gorm:"column:create_time" `                             // 创建时间
 	ModifyTime            time.Time `gorm:"column:modify_time"`                              // 更新时间
-	State                 int       `gorm:"column:state"`                                    // 状态
+	State                 int       `gorm:"column:state"`                                    // 状态 1:未公开; 4-待审批;5-已驳回;6-已通过
 }
 
 // tableName

+ 8 - 0
models/bi_dashboard/bi_dashboard_classify.go

@@ -109,4 +109,12 @@ func GetBiDashboardClassifyMaxSort() (sort int, err error) {
 // del
 func DelBiDashboardClassify(id int) (err error) {
 	return global.DEFAULT_DmSQL.Where("bi_dashboard_classify_id = ?", id).Delete(&BiDashboardClassify{}).Error
+}
+
+type RespPublicGroupListItem struct {
+	GroupId       int64  `description:"目录id"`
+	GroupName     string `description:"目录名称"`
+	AdminId       int    `description:"目录创建者账号ID"`
+	DashboardList []*BiDashboard
+	Children      []*RespPublicGroupListItem
 }