public List <ColumnFormatInfo> EvaluationResultFormat(SmallEntEvaluationBase_View entity, object val)
        {
            var result  = string.Empty;
            var bgColor = "green";

            // todo:小微评审合格标准:小型75分,微型60分
            if (entity.Status == EvaluationStatus.Completed || entity.Status == EvaluationStatus.ReportCompleted)
            {
                decimal numberScore = 0;
                decimal.TryParse(entity.Score, out numberScore);
                if ((entity.Scale == "小型" && numberScore >= 75) || (entity.Scale == "微型" && numberScore >= 60))
                {
                    result = "合格";
                }
                else
                {
                    result  = "不合格";
                    bgColor = "red";
                }
            }
            var format = new List <ColumnFormatInfo>
            {
                ColumnFormatInfo.MakeHtml(html: $"<span class='layui-badge layui-bg-{bgColor}'>{ result }</span>")
            };

            if (string.IsNullOrEmpty(result))
            {
                format = new List <ColumnFormatInfo>
                {
                    ColumnFormatInfo.MakeHtml(html: "<span></span>")
                };
            }
            return(format);
        }
        private List <ColumnFormatInfo> ReportStatusFormat(SmallEntEvaluationBase_View entity, object val)
        {
            var bgColor = "blue";

            if (entity.Status == Model.Common.EvaluationStatus.NotStarted)
            {
                bgColor = "orange";
            }
            if (entity.Status == Model.Common.EvaluationStatus.ReportCompleted)
            {
                bgColor = "green";
            }
            return(new List <ColumnFormatInfo>
            {
                ColumnFormatInfo.MakeHtml(html: $"<span class='layui-badge layui-bg-{bgColor}'>{ entity.Status.GetDescription() }</span>")
            });
        }
        private List <ColumnFormatInfo> ProgressFormat(SmallEntEvaluationBase_View entity, object val)
        {
            decimal progress = 0;

            decimal.TryParse(entity.Progress, out progress);
            var bgColor = "blue";

            if (progress < 60)
            {
                bgColor = "red";
            }
            if (progress > 99)
            {
                bgColor = "green";
            }
            var showPercent = progress == 0 ? "" : "lay-showPercent='yes'";

            return(new List <ColumnFormatInfo>
            {
                ColumnFormatInfo.MakeHtml(html: $"<div class='layui-progress' style='margin-top:10px' {showPercent}><div class='layui-progress-bar layui-bg-{bgColor}' lay-percent='{entity.Progress}%'></div></div>")
            });
        }