baotian
2024-06-04 b959135a1139fb66646523d92e5bd20c5910f283
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using iWare.Wms.Core.Util.LowCode.Front.Model;
using Furion.Extras.iWare.Wms.Util.LowCode.Front.Att;
using Furion.Extras.iWare.Wms.Util.LowCode.Front.Code;
using Furion.Extras.iWare.Wms.Util.LowCode.Front.Interface;
using Newtonsoft.Json.Linq;
 
namespace Furion.Extras.iWare.Wms.Util.LowCode.Front
{
    [FrontType("card")]
    public class Front_Card : IFront, IFrontLayout
    {
        public string Key { get; set; }
        public string Label { get; set; }
        public string Type { get; set; }
        public string Model { get; set; }
 
        /// <summary>
        /// 组件集
        /// </summary>
        public List<IFront> List { get; set; }
 
        public ViewDynamic Dynamic
        { get { return null; } }
 
        public IFront ConvertFront(JObject JData)
        {
            return new Front_Card()
            {
                Key = JData["key"].Value<string>(),
                Label = JData["label"].Value<string>(),
                Type = JData["type"].Value<string>(),
                List = AutoCode_Front.ReadFront(JData["list"].Values<JObject>().ToList())
            };
        }
 
        public void ReadFront(Action<IFront> action)
        {
            this.List.ForEach(item =>
            {
                if (item is IFrontLayout)
                {
                    (item as IFrontLayout).ReadFront(action);
                }
                else
                {
                    action(item);
                }
            });
        }
    }
}