caipin 4 anni fa
parent
commit
40dc6bc340
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 3 3
      services/contract_section_tree_service.go
  2. 1 1
      services/tree_service.go

+ 3 - 3
services/contract_section_tree_service.go

@@ -26,7 +26,7 @@ func (s *contractService) GetSecionTree(bidsectionId int, projectId int, treeTyp
 	return Node
 }
 
-// 获得合同项目节
+// 获得合同项目节-不包含合同
 func (s *contractService) GetSecionTreeNotContract(bidsectionId int, projectId int, treeType int) *viewmodels.TreeSectionContract {
 	dataList := s.treeContractDao.GetAllNotContract(bidsectionId, projectId, treeType)
 	sectionList := s.makeSectionTreeView(dataList)
@@ -421,7 +421,7 @@ func (s *contractService) makeSectionTreeView(dataList []models.CmTreeContracts)
 	sectionRoot.Id = id
 	sectionRoot.Name = "root"
 	sectionRoot.ParentId = parentId
-	sectionRoot.Children = make([]*viewmodels.TreeSectionContract, 0)
+	// sectionRoot.Children = make([]*viewmodels.TreeSectionContract, 0)
 	sectionList = append(sectionList, sectionRoot)
 	for _, data := range dataList {
 		section := s.makeSectionView(&data)
@@ -448,7 +448,7 @@ func (s *contractService) makeSectionView(data *models.CmTreeContracts) *viewmod
 	section.ProjectId = projectId
 	section.BidsectionId = bidsectionId
 	section.ContractId = contractId
-	section.Children = make([]*viewmodels.TreeSectionContract, 0)
+	// section.Children = make([]*viewmodels.TreeSectionContract, 0)
 	section.ElderBrother = true
 	section.IsEnd = false
 

+ 1 - 1
services/tree_service.go

@@ -160,7 +160,7 @@ func (s *treeService) GetAllContract(projectId int, account *models.CmProjectAcc
 	folder.Name = "root"
 	folder.ParentId = parentId
 	folder.Isfolder = 1
-	folder.Children = make([]*viewmodels.FolderContract, 0)
+	// folder.Children = make([]*viewmodels.FolderContract, 0)
 	folderlist = append(folderlist, folder)
 	// 加入数据
 	for _, data := range datalist {