This commit is contained in:
yubaolee 2021-03-09 23:36:19 +08:00
commit f7088c9d29
4 changed files with 37 additions and 33 deletions

View File

@ -6,6 +6,7 @@
// <summary>流程中的连线</summary>
using System.Collections.Generic;
using Infrastructure.Extensions;
using Newtonsoft.Json.Linq;
namespace OpenAuth.App.Flow
@ -31,27 +32,39 @@ namespace OpenAuth.App.Flow
bool result = true;
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:
result &= compare.Value == frmDataJson.GetValue(compare.FieldName).ToString();
break;
case DataCompare.Larger:
result &= frmvalue > value;
break;
case DataCompare.Less:
result &= frmvalue < value;
break;
case DataCompare.LargerEqual:
result &= frmvalue <= value;
break;
case DataCompare.LessEqual:
result &= frmvalue <= value;
break;
decimal frmvalue = decimal.Parse(fieldVal); //表单中填写的值
switch (compare.Operation)
{
case DataCompare.Equal:
result &= compare.Value == fieldVal;
break;
case DataCompare.Larger:
result &= frmvalue > value;
break;
case DataCompare.Less:
result &= frmvalue < value;
break;
case DataCompare.LargerEqual:
result &= frmvalue <= value;
break;
case DataCompare.LessEqual:
result &= frmvalue <= value;
break;
}
}
else //如果只是字符串,只判断相等
{
result &= compare.Value == fieldVal;
}
}
return result;

View File

@ -19,7 +19,7 @@
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.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" />
</ItemGroup>

View File

@ -57,9 +57,11 @@
import permissionBtn from '@/components/PermissionBtn'
import Pagination from '@/components/Pagination'
import elDragDialog from '@/directive/el-dragDialog'
import extend from "@/extensions/delRows.js"
export default {
name: '{TableName}',
components: { Sticky, permissionBtn, Pagination },
mixins: [extend],
directives: {
waves,
elDragDialog
@ -242,18 +244,7 @@
})
},
handleDelete(rows) { // 多行删除
{TableName}s.del(rows.map(u => u.id)).then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
})
rows.forEach(row => {
const index = this.list.indexOf(row)
this.list.splice(index, 1)
})
})
this.delrows({TableName}s, rows)
}
}
}

View File

@ -45,7 +45,8 @@
版本附赠VIP服务提供VIP专属QQ群企业发票、专属内部文档、技术咨询服务等。[如何获取请查看这里](http://openauth.me/question/detail.html?id=a2be2d61-7fcb-4df8-8be2-9f296c22a89c)快加入VIP大家庭 **与有理想的.NET开发者一起成长**
效果如下:
![openauth.pro](http://demo.openauth.me:8887/upload_files/200420211433125.gif "企业版效果图")
![](https://images.gitee.com/uploads/images/2021/0128/224913_6bda2388_362401.png "form.png")
![](https://images.gitee.com/uploads/images/2021/0128/225024_57595ce9_362401.png "flow.png")
## 官方QQ交流群
@ -94,7 +95,6 @@
## 秀外
![输入图片说明](http://demo.openauth.me:8887/upload_files/200414221432025.png "表单设计")
![输入图片说明](https://gitee.com/uploads/images/2018/0328/173337_6e017075_362401.png "表单设计")
![输入图片说明](https://gitee.com/uploads/images/2018/0328/150758_26ef9d61_362401.png "流程设计")