diff --git a/OpenAuth.App/Flow/FlowLine.cs b/OpenAuth.App/Flow/FlowLine.cs index 51633043..c3e69e65 100644 --- a/OpenAuth.App/Flow/FlowLine.cs +++ b/OpenAuth.App/Flow/FlowLine.cs @@ -6,6 +6,7 @@ // 流程中的连线 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; diff --git a/OpenAuth.Repository/OpenAuth.Repository.csproj b/OpenAuth.Repository/OpenAuth.Repository.csproj index 1e3d9224..6a397f5c 100644 --- a/OpenAuth.Repository/OpenAuth.Repository.csproj +++ b/OpenAuth.Repository/OpenAuth.Repository.csproj @@ -19,7 +19,7 @@ - + diff --git a/OpenAuth.WebApi/Template/BuildVue.html b/OpenAuth.WebApi/Template/BuildVue.html index 4cbb0902..eb9f40cf 100644 --- a/OpenAuth.WebApi/Template/BuildVue.html +++ b/OpenAuth.WebApi/Template/BuildVue.html @@ -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) } } } diff --git a/README.md b/README.md index 4489af02..9a55e2a1 100644 --- a/README.md +++ b/README.md @@ -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 "流程设计")