.NET CORE开源工作流引擎 - 可视化流程设计器 - 工作流表单设计器 - .NET快速开发平台 - .NET三层代码生成器 - 通用权限管理

.NET MVC CORE开源工作流平台,可视化流程设计器
RoadFlowEle6.2.9升级说明

1、修改了下拉选择获取选项方式为sql时sql加密。

    修改文件:\RoadFlow.WebUIElement\src\roadui-pages\flow\run\index.vue

    image.png

    修改文件:\RoadFlow.Web\Areas\RoadFlowApi\Controllers\FormController.cs

    image.png

2、修改了文件管理的文件目录判断。

    修改文件:\RoadFlow\RoadFlow.Service\File.cs

    image.png

3、修改了登录token要验证ip,避免token复制到其他地方使用。

    修改文件:\RoadFlow.Utility\Token.cs 文件修改比较多,直接覆盖。

    修改文件:\RoadFlow.Web\Areas\RoadFlowApi\Controllers\HomeController.cs

    image.png

    修改文件:\RoadFlow\RoadFlow.Service\User.cs

    image.png

    修改文件:\RoadFlow.Web\Areas\RoadFlowApi\Controllers\ApiValidateAttribute.cs

    image.png

4、修改了升级登录验证后移动端无法登录问题。

    修改文件:\RoadFlow.Web\Areas\RoadFlowMobileApi\Controllers\HomeController.cs

    image.png

    修改文件:\RoadFlow.Service\User.cs

    image.png

5、修改了流程设计属性不设置数据连接标识事件无法保存的问题。

    修改文件:\RoadFlow.WebUIElement\src\roadui-pages\flow\design\attr.vue

    image.png

6、修改了附件上传控件change事件没有响应的问题。

    修改文件:\RoadFlow.WebUIElement\src\roadui-components\el_selectfile.vue

    image.png

7、修改了弹出层查看图片过大时溢出的问题。

    修改文件:\RoadFlow.WebUIElement\src\roadui-pages\index.vue

    image.png

8、修改了弹出选择控件清空了值弹出选择是还有选中的问题。

    修改文件:\RoadFlow.WebUIElement\src\roadui-components\el_selectdiv.vue

    image.png

9、修改弹出选择控件按条件查询后选择值有重复问题。

    修改文件:\RoadFlow.WebUIElement\src\roadui-components\el_selectdiv.vue

    image.png

10、修改了自定义表单可以定义字段类型。

    修改文件:\RoadFlow.Service\FlowData.cs

    image.png

    image.png

    自定义表单字段:

    image.png

11、修改了表单设计流水号设置多个时出现错误的问题。

    修改文件:\RoadFlow.WebUIElement\src\roadui-pages\flow\run\index.vue

    image.png

  //判断符合条件的流水号
if (utils.hasKey(form.value.formData, 'serialNumber') && utils.length(form.value.formData['serialNumber']) > 0) {
    for (let i = 0; i < form.value.formData['serialNumber'].length; i++) {
        let serialNumberi = form.value.formData['serialNumber'][i];
        let serialNumberRemove = [];
        for (let j = 0; j < serialNumberi['serials'].length; j++) {
            let serialData = serialNumberi['serials'][j]['data'];
            //如果数据条件为空,表示满足。
            if (utils.length(serialData) === 0) {
                continue;
            }
            let fun = new Function('formData', serialData);
            let funResult = fun(form.value.formData);
            if (!funResult) {
                serialNumberRemove.push(j);
            }
        }
        for (let j = 0; j < serialNumberRemove.length; j++) {
            delete serialNumberi['serials'][serialNumberRemove[j]]
        }
        //ADV:移除空元素,保证号码正确
        serialNumberi['serials'] = serialNumberi['serials'].filter(item => item !== "");
    }
}

12、修改了应用程序设计运行时提示propsQueryString未定义的问题。

    修改文件:\RoadFlow.WebUIElement\src\roadui-pages\program\run\index.vue

    image.png

13、修改了应用程序设计查询条件日期范围设置默认值。

    修改文件:\RoadFlow.Service\Program.cs   

    image.png

    if (queryModel.InputType == 2 || queryModel.InputType == 4)
    {
        defaultValueJObject.Add(queryModel.ControlName, RoadFlow.Utility.Json.ParseArray(RoadFlow.Service.Wildcard.Replace(queryModel.DefaultValue)));
    }
    else
    {
        defaultValueJObject.Add(queryModel.ControlName, RoadFlow.Service.Wildcard.Replace(queryModel.DefaultValue));
    }

14、修改了流程分支条件判断数据条件支持子表数据作为条件。

    修改文件:\RoadFlow.Service\FlowRun.cs

    image.png

    修改整个方法:

  /// <summary>
/// 判断连线条件-数据条件是否满足-单个条件是否满足
/// </summary>
/// <param name="formDataJson"></param>
/// <param name="lineDataCondition">连线数据条件实体</param>
/// <returns></returns>
public static bool GetLineIsPass_DataCondition_Single(JObject? formDataJson, RoadFlow.Model.FlowRunModel.LineDataCondition? lineDataCondition)
{
    if (lineDataCondition == null || formDataJson == null
        || string.IsNullOrWhiteSpace(lineDataCondition.Field)
        || string.IsNullOrWhiteSpace(lineDataCondition.Condition)
        || string.IsNullOrWhiteSpace(lineDataCondition.Value))
    {
        return false;
    }

    //是否是子表求和
    bool isSubtableSum = lineDataCondition.Condition.StartsWith("subtablesum", StringComparison.CurrentCultureIgnoreCase);
    string fieldType = string.IsNullOrWhiteSpace(lineDataCondition.FieldType) ? "string" : lineDataCondition.FieldType;//字段数据类型
    //string formFieldValue = string.Empty;//表单字段数据
    string fieldValue = lineDataCondition.Value.Trim();//条件设置的字段值
    decimal subtableSumData = 0;//子表求和数据
    decimal subtableSumData1 = 0;//条件设置的字段值数字,是子表会给这里赋值,不用比较时去转换。
    List<string> formFieldValueList = new();
    //如果是子表求和则要循环子表对应的字段数据。
    if (isSubtableSum)
    {
        //如果要比较的值不是数字则直接返回false
        if (!fieldValue.IsDecimal(out subtableSumData1))
        {
            return false;
        }
        string[] fieldArray = lineDataCondition.Field.SplitToArray(".");
        string subtable = fieldArray.Length > 0 ? fieldArray[0] : string.Empty;
        string fieldId = fieldArray.Length > 1 ? fieldArray[1] : string.Empty;
        if (!string.IsNullOrWhiteSpace(subtable) && !string.IsNullOrWhiteSpace(fieldId))
        {
            var subtableJArray = formDataJson.GetJArray(subtable);
            foreach (var subtableJ in subtableJArray)
            {
                subtableSumData += subtableJ.GetDecimal(fieldId);
            }
        }
    }
    else
    {
        if (lineDataCondition.Field.Contains('.'))
        {
            //如果是子表字段,则要取每行字段数据。
            string[] fieldArray = lineDataCondition.Field.SplitToArray(".");
            string subtable = fieldArray.Length > 0 ? fieldArray[0] : string.Empty;
            string fieldId = fieldArray.Length > 1 ? fieldArray[1] : string.Empty;
            if (!string.IsNullOrWhiteSpace(subtable) && !string.IsNullOrWhiteSpace(fieldId))
            {
                var subtableJArray = formDataJson.GetJArray(subtable);
                foreach (var subtableJ in subtableJArray)
                {
                    formFieldValueList.Add(subtableJ.GetString(fieldId));
                }
            }
        }
        else
        {
            string dataKey = lineDataCondition.Field;
            //如果formDataJson中没有lineDataCondition.Field则查找以字段为key的json数据。兼容自定义表单,自定义表单key直接是字段名。
            if (!formDataJson.ContainsKey(dataKey))
            {
                string[] dataKeyArray = dataKey.SplitToArray("-");
                if (dataKeyArray.Length > 1)
                {
                    dataKey = dataKeyArray[1];
                }
            }
            formFieldValueList.Add(formDataJson.GetString(dataKey).Trim());
        }
    }
    switch (lineDataCondition.Condition)
    {
        case "=":
            if (fieldValue.EqualsIgnoreCase("null"))
            {
                //如果判断值设置的是null,则是判断字段为空。
                foreach (string formFieldValue in formFieldValueList)
                {
                    if (string.IsNullOrWhiteSpace(formFieldValue))
                    {
                        return true;
                    }
                }
                return false;
            }
            else
            {
                switch (fieldType)
                {
                    case "string":
                        foreach (string formFieldValue in formFieldValueList)
                        {
                            if (formFieldValue.EqualsIgnoreCase(fieldValue))
                            {
                                return true;
                            }
                        }
                        return false;
                    case "number":
                        foreach (string formFieldValue in formFieldValueList)
                        {
                            if (formFieldValue.IsDecimal(out decimal formFieldDecimalValue) && fieldValue.IsDecimal(out decimal fieldDecimalValue) && formFieldDecimalValue.CompareTo(fieldDecimalValue) == 0)
                            {
                                return true;
                            }
                        }
                        return false;
                    case "date":
                    case "datetime":
                        foreach (string formFieldValue in formFieldValueList)
                        {
                            if (formFieldValue.IsDateTime(out DateTime formFieldDateTimeValue) && fieldValue.IsDateTime(out DateTime fieldDateTimeValue) && formFieldDateTimeValue.CompareTo(fieldDateTimeValue) == 0)
                            {
                                return true;
                            }
                        }
                        return false;
                }
            }
            break;
        case "!=":
            if (fieldValue.EqualsIgnoreCase("null"))
            {
                //如果判断值设置的是null,则是判断字段不为空。
                foreach (string formFieldValue in formFieldValueList)
                {
                    if (!string.IsNullOrWhiteSpace(formFieldValue))
                    {
                        return true;
                    }
                }
                return false;
            }
            else
            {
                switch (fieldType)
                {
                    case "string":
                        foreach (string formFieldValue in formFieldValueList)
                        {
                            if (!formFieldValue.EqualsIgnoreCase(fieldValue))
                            {
                                return true;
                            }
                        }
                        return false;
                    case "number":
                        foreach (string formFieldValue in formFieldValueList)
                        {
                            if (formFieldValue.IsDecimal(out decimal formFieldDecimalValue) && fieldValue.IsDecimal(out decimal fieldDecimalValue) && formFieldDecimalValue.CompareTo(fieldDecimalValue) != 0)
                            {
                                return true;
                            }
                        }
                        return false;
                    case "date":
                    case "datetime":
                        foreach (string formFieldValue in formFieldValueList)
                        {
                            if (formFieldValue.IsDateTime(out DateTime formFieldDateTimeValue) && fieldValue.IsDateTime(out DateTime fieldDateTimeValue) && formFieldDateTimeValue.CompareTo(fieldDateTimeValue) != 0)
                            {
                                return true;
                            }
                        }
                        return false;
                }
            }
            break;
        case ">":
            switch (fieldType)
            {
                case "string":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.CompareTo(fieldValue) > 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "number":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDecimal(out decimal formFieldDecimalValue) && fieldValue.IsDecimal(out decimal fieldDecimalValue) && formFieldDecimalValue.CompareTo(fieldDecimalValue) > 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "date":
                case "datetime":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDateTime(out DateTime formFieldDateTimeValue) && fieldValue.IsDateTime(out DateTime fieldDateTimeValue) && formFieldDateTimeValue.CompareTo(fieldDateTimeValue) > 0)
                        {
                            return true;
                        }
                    }
                    return false;
            }
            break;
        case ">=":
            switch (fieldType)
            {
                case "string":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.CompareTo(fieldValue) >= 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "number":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDecimal(out decimal formFieldDecimalValue) && fieldValue.IsDecimal(out decimal fieldDecimalValue) && formFieldDecimalValue.CompareTo(fieldDecimalValue) >= 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "date":
                case "datetime":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDateTime(out DateTime formFieldDateTimeValue) && fieldValue.IsDateTime(out DateTime fieldDateTimeValue) && formFieldDateTimeValue.CompareTo(fieldDateTimeValue) >= 0)
                        {
                            return true;
                        }
                    }
                    return false;
            }
            break;
        case "<":
            switch (fieldType)
            {
                case "string":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.CompareTo(fieldValue) < 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "number":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDecimal(out decimal formFieldDecimalValue) && fieldValue.IsDecimal(out decimal fieldDecimalValue) && formFieldDecimalValue.CompareTo(fieldDecimalValue) < 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "date":
                case "datetime":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDateTime(out DateTime formFieldDateTimeValue) && fieldValue.IsDateTime(out DateTime fieldDateTimeValue) && formFieldDateTimeValue.CompareTo(fieldDateTimeValue) < 0)
                        {
                            return true;
                        }
                    }
                    return false;
            }
            break;
        case "<=":
            switch (fieldType)
            {
                case "string":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.CompareTo(fieldValue) <= 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "number":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDecimal(out decimal formFieldDecimalValue) && fieldValue.IsDecimal(out decimal fieldDecimalValue) && formFieldDecimalValue.CompareTo(fieldDecimalValue) <= 0)
                        {
                            return true;
                        }
                    }
                    return false;
                case "date":
                case "datetime":
                    foreach (string formFieldValue in formFieldValueList)
                    {
                        if (formFieldValue.IsDateTime(out DateTime formFieldDateTimeValue) && fieldValue.IsDateTime(out DateTime fieldDateTimeValue) && formFieldDateTimeValue.CompareTo(fieldDateTimeValue) <= 0)
                        {
                            return true;
                        }
                    }
                    return false;
            }
            break;
        case "like":
            foreach (string formFieldValue in formFieldValueList)
            {
                if (formFieldValue.ContainsIgnoreCase(fieldValue))
                {
                    return true;
                }
            }
            return false;
        case "notlike":
            foreach (string formFieldValue in formFieldValueList)
            {
                if (!formFieldValue.ContainsIgnoreCase(fieldValue))
                {
                    return true;
                }
            }
            return false;
        case "subtablesum="://子表求和等于
            return subtableSumData.CompareTo(subtableSumData1) == 0;
        case "subtablesum!="://子表求和不等于
            return subtableSumData.CompareTo(subtableSumData1) != 0;
        case "subtablesum>"://子表求和大于
            return subtableSumData.CompareTo(subtableSumData1) > 0;
        case "subtablesum>="://子表求和大于等于
            return subtableSumData.CompareTo(subtableSumData1) >= 0;
        case "subtablesum<"://子表求和小于
            return subtableSumData.CompareTo(subtableSumData1) < 0;
        case "subtablesum<="://子表求和小于等于
            return subtableSumData.CompareTo(subtableSumData1) <= 0;
    }
    return false;
}

15、升级element-plus到2.4.3

    npm install element-plus@2.4.3



联系QQ:493501010电话:136 0832 5512(微信同号)邮箱:road@roadflow.net
Copyright 2014 - 2024 重庆天知软件技术有限公司 版权所有