12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using AntDesign;
- using Microsoft.AspNetCore.Components;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using wispro.sp.entity;
- namespace wispro.sp.web.Components
- {
- public partial class InputValueSetting
- {
- List<wispro.sp.entity.EnumnDescription<wispro.sp.entity.workflowDefine.EnumFieldType>> FieldTypes
- = entity.EnumHelper.getEnumDescriptionDic<wispro.sp.entity.workflowDefine.EnumFieldType>();
- ITable table;
- entity.workflowDefine.InputValueSetting EditObj;
- [Parameter]
- public List<entity.workflowDefine.InputValueSetting> DataSource { get; set; }
- IDictionary<string, (bool edit, entity.workflowDefine.InputValueSetting data)> editCache = new Dictionary<string, (bool edit, entity.workflowDefine.InputValueSetting data)>();
- private List<entity.workflowDefine.InputValueSetting> GetChildItem(entity.workflowDefine.InputValueSetting setting)
- {
- return DataSource.Where<entity.workflowDefine.InputValueSetting>(p => p.ParentSetting == setting).ToList();
- }
- void AddNew(entity.workflowDefine.InputValueSetting setting)
- {
- var newObj = new entity.workflowDefine.InputValueSetting()
- {
- valueType = entity.workflowDefine.EnumFieldType.Text,
- DisplayName = "新添栏位",
- ParentSetting = setting
-
- };
- EditObj = newObj;
- DataSource.Add(newObj);
- }
- void Delete(entity.workflowDefine.InputValueSetting setting)
- {
- //此处添加删除代码
- DataSource.Remove(setting);
- StateHasChanged();
- }
- void Edit(entity.workflowDefine.InputValueSetting setting)
- {
- EditObj = setting;
- }
- void Save(entity.workflowDefine.InputValueSetting setting)
- {
- //此处添加保存代码
- EditObj = null;
- StateHasChanged();
- }
- void OnCancel(entity.workflowDefine.InputValueSetting setting)
- {
- EditObj = null;
- }
- }
- }
|