public List <Column> GetColumnDataByFieldListId(int interfaceFieldId)
        {
            var fieldList = GetByFieldListId(interfaceFieldId);

            if (fieldList != null && fieldList.Any())
            {
                List <Column> columns = new List <Column>();
                foreach (var item in fieldList)
                {
                    columns.Add(new Column
                    {
                        CmpData = new ColumnCmpData
                        {
                            Name      = item.Name,
                            Title     = item.Text,
                            Type      = item.FieldType.ToString(),
                            Visible   = TrueFalseTranslator.ToBoolean(item.IsVisible),
                            IsLink    = TrueFalseTranslator.ToBoolean(item.IsLink),
                            ShowIndex = item.SortNumber
                        }
                    });
                }
                return(columns);
            }
            return(null);
        }
        public List <Column> GetColumnDataByFieldListId(QueryPiplineContext queryPiplineContext)
        {
            var fieldListMetaFields = queryPiplineContext.FieldListMetaFieldsOfFieldListId;

            if (fieldListMetaFields != null && fieldListMetaFields.Any())
            {
                List <Column> columns = new List <Column>();
                foreach (var item in fieldListMetaFields)
                {
                    columns.Add(new Column
                    {
                        CmpData = new ColumnCmpData
                        {
                            Name      = item.Name,
                            Title     = item.Text,
                            Type      = item.FieldType.ToString(),
                            Visible   = TrueFalseTranslator.ToBoolean(item.IsVisible),
                            IsLink    = TrueFalseTranslator.ToBoolean(item.IsLink),
                            ShowIndex = item.SortNumber
                        }
                    });
                }
                return(columns);
            }
            return(null);
        }
        public IndexPageComponent GetIndexPageComponentByIndexView(IndexView indexView)
        {
            var indexPage = new IndexPageComponent();

            indexPage.Title = indexView.Title;
            indexPage.Icon  = indexView.Icon;
            //通过配置IndexView来分析
            indexPage.LayoutType = (int)LayoutType.SearchForm_TableList;

            //构建searchForm
            var conditionAggregations = searchConditionAggregationService.GetConditionItemsBySearchConditionId(indexView.SearchConditionId);

            if (conditionAggregations != null && conditionAggregations.Any())
            {
                List <SearchItem> searchItems = new List <SearchItem>();
                foreach (var item in conditionAggregations)
                {
                    searchItems.Add(new SearchItem
                    {
                        Name    = item.FieldCode,
                        Text    = item.Text,
                        Visible = TrueFalseTranslator.ToBoolean(item.Visible),
                        Value   = item.Value,
                        //字段类型
                        Type      = item.FieldType,
                        ValueType = item.ValueType
                    });
                }
                indexPage.SearchForm = new SearchFormComponent {
                    SearchItems = searchItems.ToArray()
                };
            }

            //构建buttonList

            return(indexPage);
        }