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