mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
修复分支判定;
优化代码生成器,统一删除提示
This commit is contained in:
parent
d899553c8c
commit
96362550c7
@ -6,6 +6,7 @@
|
|||||||
// <summary>流程中的连线</summary>
|
// <summary>流程中的连线</summary>
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Infrastructure.Extensions;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace OpenAuth.App.Flow
|
namespace OpenAuth.App.Flow
|
||||||
@ -31,27 +32,39 @@ namespace OpenAuth.App.Flow
|
|||||||
bool result = true;
|
bool result = true;
|
||||||
foreach (var compare in Compares)
|
foreach (var compare in Compares)
|
||||||
{
|
{
|
||||||
decimal value = decimal.Parse(compare.Value); //参考值
|
|
||||||
decimal frmvalue = decimal.Parse(frmDataJson.GetValue(compare.FieldName.ToLower()).ToString()); //表单中填写的值
|
|
||||||
|
|
||||||
switch (compare.Operation)
|
bool isDecimal = decimal.TryParse(compare.Value, out decimal value);
|
||||||
|
var fieldVal = frmDataJson.GetValue(compare.FieldName.ToLower()).ToString();
|
||||||
|
|
||||||
|
if (isDecimal) //如果是数字或小数
|
||||||
{
|
{
|
||||||
case DataCompare.Equal:
|
decimal frmvalue = decimal.Parse(fieldVal); //表单中填写的值
|
||||||
result &= compare.Value == frmDataJson.GetValue(compare.FieldName).ToString();
|
|
||||||
break;
|
switch (compare.Operation)
|
||||||
case DataCompare.Larger:
|
{
|
||||||
result &= frmvalue > value;
|
case DataCompare.Equal:
|
||||||
break;
|
result &= compare.Value == fieldVal;
|
||||||
case DataCompare.Less:
|
break;
|
||||||
result &= frmvalue < value;
|
case DataCompare.Larger:
|
||||||
break;
|
result &= frmvalue > value;
|
||||||
case DataCompare.LargerEqual:
|
break;
|
||||||
result &= frmvalue <= value;
|
case DataCompare.Less:
|
||||||
break;
|
result &= frmvalue < value;
|
||||||
case DataCompare.LessEqual:
|
break;
|
||||||
result &= frmvalue <= value;
|
case DataCompare.LargerEqual:
|
||||||
break;
|
result &= frmvalue <= value;
|
||||||
|
break;
|
||||||
|
case DataCompare.LessEqual:
|
||||||
|
result &= frmvalue <= value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else //如果只是字符串,只判断相等
|
||||||
|
{
|
||||||
|
result &= compare.Value == fieldVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.16.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="3.16.0" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.1" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.2.4" />
|
||||||
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="3.0.40" />
|
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="3.0.40" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -57,9 +57,11 @@
|
|||||||
import permissionBtn from '@/components/PermissionBtn'
|
import permissionBtn from '@/components/PermissionBtn'
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import elDragDialog from '@/directive/el-dragDialog'
|
import elDragDialog from '@/directive/el-dragDialog'
|
||||||
|
import extend from "@/extensions/delRows.js"
|
||||||
export default {
|
export default {
|
||||||
name: '{TableName}',
|
name: '{TableName}',
|
||||||
components: { Sticky, permissionBtn, Pagination },
|
components: { Sticky, permissionBtn, Pagination },
|
||||||
|
mixins: [extend],
|
||||||
directives: {
|
directives: {
|
||||||
waves,
|
waves,
|
||||||
elDragDialog
|
elDragDialog
|
||||||
@ -242,18 +244,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDelete(rows) { // 多行删除
|
handleDelete(rows) { // 多行删除
|
||||||
{TableName}s.del(rows.map(u => u.id)).then(() => {
|
this.delrows({TableName}s, rows)
|
||||||
this.$notify({
|
|
||||||
title: '成功',
|
|
||||||
message: '删除成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
rows.forEach(row => {
|
|
||||||
const index = this.list.indexOf(row)
|
|
||||||
this.list.splice(index, 1)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user