mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 05:13:25 +08:00
fix issue #I7XLQK checkbox控件值表单条件判断
This commit is contained in:
parent
24db84cda4
commit
19fc3bc933
@ -6,6 +6,8 @@
|
|||||||
// <summary>流程中的连线</summary>
|
// <summary>流程中的连线</summary>
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Infrastructure;
|
||||||
using Infrastructure.Extensions;
|
using Infrastructure.Extensions;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
@ -38,7 +40,16 @@ namespace OpenAuth.App.Flow
|
|||||||
|
|
||||||
if (isDecimal) //如果是数字或小数
|
if (isDecimal) //如果是数字或小数
|
||||||
{
|
{
|
||||||
decimal frmvalue = decimal.Parse(fieldVal); //表单中填写的值
|
decimal frmvalue = 0;
|
||||||
|
if (fieldVal.Contains("["))//表单中的数据包含[],为数组,一般是checkbox的值
|
||||||
|
{
|
||||||
|
var tempvals = JsonHelper.Instance.Deserialize<List<decimal>>(fieldVal);
|
||||||
|
frmvalue = tempvals.Max();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
frmvalue = decimal.Parse(fieldVal); //表单中填写的值
|
||||||
|
}
|
||||||
|
|
||||||
switch (compare.Operation)
|
switch (compare.Operation)
|
||||||
{
|
{
|
||||||
@ -60,10 +71,19 @@ namespace OpenAuth.App.Flow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //如果只是字符串,只判断相等
|
else //如果只是字符串,只判断相等
|
||||||
|
{
|
||||||
|
if (fieldVal.Contains("["))//表单中的数据包含[],为数组,一般是checkbox的值
|
||||||
|
{
|
||||||
|
var tempvals = JsonHelper.Instance.Deserialize<List<string>>(fieldVal);
|
||||||
|
result &= tempvals.Contains(compare.Value);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
result &= compare.Value == fieldVal;
|
result &= compare.Value == fieldVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user