liteflow-editor-process 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1455,206 +1455,267 @@ var ComponentPropertiesEditor = function ComponentPropertiesEditor(_ref) {
|
|
|
1455
1455
|
|
|
1456
1456
|
// 提取字段结构构造逻辑
|
|
1457
1457
|
function generateInputParams(logFields) {
|
|
1458
|
-
|
|
1459
|
-
return log.fieldAttribute === "CASE";
|
|
1460
|
-
}).map(function (field) {
|
|
1461
|
-
return field.fieldName;
|
|
1462
|
-
}));
|
|
1463
|
-
return [{
|
|
1458
|
+
var staticFields = [{
|
|
1464
1459
|
id: "case",
|
|
1465
1460
|
label: "案例",
|
|
1466
1461
|
icon: "el-icon-c-scale-to-original",
|
|
1462
|
+
isGroup: true,
|
|
1467
1463
|
children: [{
|
|
1468
1464
|
id: "case_id",
|
|
1469
|
-
label: "案例
|
|
1465
|
+
label: "案例ID",
|
|
1470
1466
|
icon: "el-icon-files",
|
|
1471
1467
|
type: "Standard",
|
|
1472
|
-
fieldsType: "TEXT"
|
|
1468
|
+
fieldsType: "TEXT",
|
|
1469
|
+
isGroup: false
|
|
1473
1470
|
}, {
|
|
1474
1471
|
id: "variant_id",
|
|
1475
1472
|
label: "变体ID",
|
|
1476
1473
|
icon: "el-icon-files",
|
|
1477
1474
|
type: "Standard",
|
|
1478
|
-
fieldsType: "TEXT"
|
|
1475
|
+
fieldsType: "TEXT",
|
|
1476
|
+
isGroup: false
|
|
1479
1477
|
}, {
|
|
1480
1478
|
id: "案例状态",
|
|
1481
1479
|
label: "案例状态",
|
|
1482
1480
|
icon: "el-icon-files",
|
|
1483
1481
|
type: "Standard",
|
|
1484
|
-
fieldsType: "TEXT"
|
|
1482
|
+
fieldsType: "TEXT",
|
|
1483
|
+
isGroup: false
|
|
1485
1484
|
}, {
|
|
1486
1485
|
id: "p_start_time",
|
|
1487
1486
|
label: "案例开始时间",
|
|
1488
1487
|
icon: "el-icon-date",
|
|
1489
1488
|
type: "Distribution",
|
|
1490
|
-
fieldsType: "TIME"
|
|
1489
|
+
fieldsType: "TIME",
|
|
1490
|
+
isGroup: false
|
|
1491
1491
|
}, {
|
|
1492
1492
|
id: "p_cycle_time",
|
|
1493
1493
|
label: "案例持续时间",
|
|
1494
1494
|
icon: "el-icon-files",
|
|
1495
1495
|
type: "Standard",
|
|
1496
|
-
fieldsType: "TIME TANG"
|
|
1496
|
+
fieldsType: "TIME TANG",
|
|
1497
|
+
isGroup: false
|
|
1497
1498
|
}, {
|
|
1498
1499
|
id: "pnum",
|
|
1499
1500
|
label: "案例数",
|
|
1500
1501
|
icon: "el-icon-files",
|
|
1501
1502
|
type: "Standard",
|
|
1502
|
-
fieldsType: "INT"
|
|
1503
|
+
fieldsType: "INT",
|
|
1504
|
+
isGroup: false
|
|
1503
1505
|
}, {
|
|
1504
1506
|
id: "p_end_time",
|
|
1505
1507
|
label: "案例结束时间",
|
|
1506
1508
|
icon: "el-icon-date",
|
|
1507
1509
|
type: "Distribution",
|
|
1508
|
-
fieldsType: "TIME"
|
|
1510
|
+
fieldsType: "TIME",
|
|
1511
|
+
isGroup: false
|
|
1509
1512
|
}, {
|
|
1510
1513
|
id: "activity_per_process_num",
|
|
1511
1514
|
label: "每个案例的活动数",
|
|
1512
1515
|
icon: "el-icon-files",
|
|
1513
1516
|
type: "Standard",
|
|
1514
|
-
fieldsType: "INT"
|
|
1517
|
+
fieldsType: "INT",
|
|
1518
|
+
isGroup: false
|
|
1515
1519
|
}, {
|
|
1516
1520
|
id: "connections_per_process_num",
|
|
1517
1521
|
label: "每个案例的连接数",
|
|
1518
1522
|
icon: "el-icon-files",
|
|
1519
1523
|
type: "Standard",
|
|
1520
|
-
fieldsType: "INT"
|
|
1524
|
+
fieldsType: "INT",
|
|
1525
|
+
isGroup: false
|
|
1521
1526
|
}]
|
|
1522
1527
|
}, {
|
|
1523
1528
|
id: "activity",
|
|
1524
1529
|
label: "活动",
|
|
1525
1530
|
icon: "el-icon-c-scale-to-original",
|
|
1531
|
+
isGroup: true,
|
|
1526
1532
|
children: [{
|
|
1527
1533
|
id: "activity_name",
|
|
1528
1534
|
label: "活动名称",
|
|
1529
1535
|
icon: "el-icon-files",
|
|
1530
1536
|
type: "Standard",
|
|
1531
|
-
fieldsType: "TEXT"
|
|
1537
|
+
fieldsType: "TEXT",
|
|
1538
|
+
isGroup: false
|
|
1532
1539
|
}, {
|
|
1533
1540
|
id: "start_time",
|
|
1534
1541
|
label: "活动开始时间",
|
|
1535
1542
|
icon: "el-icon-date",
|
|
1536
1543
|
type: "Distribution",
|
|
1537
|
-
fieldsType: "TIME"
|
|
1544
|
+
fieldsType: "TIME",
|
|
1545
|
+
isGroup: false
|
|
1538
1546
|
}, {
|
|
1539
1547
|
id: "a_occurrence",
|
|
1540
1548
|
label: "出现次数",
|
|
1541
1549
|
icon: "el-icon-files",
|
|
1542
1550
|
type: "Standard",
|
|
1543
|
-
fieldsType: "INT"
|
|
1551
|
+
fieldsType: "INT",
|
|
1552
|
+
isGroup: false
|
|
1544
1553
|
}, {
|
|
1545
1554
|
id: "startnum",
|
|
1546
1555
|
label: "开始活动数",
|
|
1547
1556
|
icon: "el-icon-files",
|
|
1548
1557
|
type: "Standard",
|
|
1549
|
-
fieldsType: "INT"
|
|
1558
|
+
fieldsType: "INT",
|
|
1559
|
+
isGroup: false
|
|
1550
1560
|
}, {
|
|
1551
1561
|
id: "a_cycle_time",
|
|
1552
1562
|
label: "活动周期时间",
|
|
1553
1563
|
icon: "el-icon-files",
|
|
1554
1564
|
type: "Standard",
|
|
1555
|
-
fieldsType: "TIME TANG"
|
|
1565
|
+
fieldsType: "TIME TANG",
|
|
1566
|
+
isGroup: false
|
|
1556
1567
|
}, {
|
|
1557
1568
|
id: "a_processing_time",
|
|
1558
1569
|
label: "活动持续时间",
|
|
1559
1570
|
icon: "el-icon-files",
|
|
1560
1571
|
type: "Standard",
|
|
1561
|
-
fieldsType: "TIME TANG"
|
|
1572
|
+
fieldsType: "TIME TANG",
|
|
1573
|
+
isGroup: false
|
|
1562
1574
|
}, {
|
|
1563
1575
|
id: "fnum",
|
|
1564
1576
|
label: "活动数",
|
|
1565
1577
|
icon: "el-icon-files",
|
|
1566
1578
|
type: "Standard",
|
|
1567
|
-
fieldsType: "INT"
|
|
1579
|
+
fieldsType: "INT",
|
|
1580
|
+
isGroup: false
|
|
1568
1581
|
}, {
|
|
1569
1582
|
id: "a_wait_time",
|
|
1570
1583
|
label: "活动等待时间",
|
|
1571
1584
|
icon: "el-icon-files",
|
|
1572
1585
|
type: "Standard",
|
|
1573
|
-
fieldsType: "TIME TANG"
|
|
1586
|
+
fieldsType: "TIME TANG",
|
|
1587
|
+
isGroup: false
|
|
1574
1588
|
}, {
|
|
1575
1589
|
id: "end_time",
|
|
1576
1590
|
label: "活动结束时间",
|
|
1577
1591
|
icon: "el-icon-date",
|
|
1578
1592
|
type: "Distribution",
|
|
1579
|
-
fieldsType: "TIME"
|
|
1593
|
+
fieldsType: "TIME",
|
|
1594
|
+
isGroup: false
|
|
1580
1595
|
}, {
|
|
1581
1596
|
id: "endnum",
|
|
1582
1597
|
label: "结束活动数",
|
|
1583
1598
|
icon: "el-icon-files",
|
|
1584
1599
|
type: "Standard",
|
|
1585
|
-
fieldsType: "INT"
|
|
1600
|
+
fieldsType: "INT",
|
|
1601
|
+
isGroup: false
|
|
1586
1602
|
}]
|
|
1587
|
-
}, {
|
|
1588
|
-
id: 21,
|
|
1589
|
-
label: "日志字段",
|
|
1590
|
-
icon: "el-icon-c-scale-to-original",
|
|
1591
|
-
children: logFields.filter(function (log) {
|
|
1592
|
-
return log.fieldType !== "TYPE_INDEX";
|
|
1593
|
-
}).map(function (item) {
|
|
1594
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
1595
|
-
id: item.fieldName || "",
|
|
1596
|
-
label: item.fieldName || "",
|
|
1597
|
-
icon: "el-icon-files",
|
|
1598
|
-
type: item.type === "TIME" ? "Distribution" : "Standard",
|
|
1599
|
-
fieldsType: item.type,
|
|
1600
|
-
category: getFieldCategory(item.type)
|
|
1601
|
-
});
|
|
1602
|
-
})
|
|
1603
1603
|
}, {
|
|
1604
1604
|
id: "连接",
|
|
1605
1605
|
label: "连接",
|
|
1606
1606
|
icon: "el-icon-c-scale-to-original",
|
|
1607
|
+
isGroup: true,
|
|
1607
1608
|
children: [{
|
|
1608
1609
|
id: "c_occurrence",
|
|
1609
1610
|
label: "出现次数",
|
|
1610
1611
|
icon: "el-icon-files",
|
|
1611
1612
|
type: "Standard",
|
|
1612
|
-
fieldsType: "INT"
|
|
1613
|
+
fieldsType: "INT",
|
|
1614
|
+
isGroup: false
|
|
1613
1615
|
}, {
|
|
1614
1616
|
id: "from_name",
|
|
1615
1617
|
label: "自(活动)",
|
|
1616
1618
|
icon: "el-icon-files",
|
|
1617
1619
|
type: "Standard",
|
|
1618
|
-
fieldsType: "TEXT"
|
|
1620
|
+
fieldsType: "TEXT",
|
|
1621
|
+
isGroup: false
|
|
1619
1622
|
}, {
|
|
1620
1623
|
id: "to_name",
|
|
1621
1624
|
label: "至(活动)",
|
|
1622
1625
|
icon: "el-icon-files",
|
|
1623
1626
|
type: "Standard",
|
|
1624
|
-
fieldsType: "TEXT"
|
|
1627
|
+
fieldsType: "TEXT",
|
|
1628
|
+
isGroup: false
|
|
1625
1629
|
}, {
|
|
1626
1630
|
id: "c_cycle_time",
|
|
1627
1631
|
label: "连接持续时间",
|
|
1628
1632
|
icon: "el-icon-files",
|
|
1629
1633
|
type: "Standard",
|
|
1630
|
-
fieldsType: "TIME TANG"
|
|
1634
|
+
fieldsType: "TIME TANG",
|
|
1635
|
+
isGroup: false
|
|
1631
1636
|
}, {
|
|
1632
1637
|
id: "cnum",
|
|
1633
1638
|
label: "连接数",
|
|
1634
1639
|
icon: "el-icon-files",
|
|
1635
1640
|
type: "Standard",
|
|
1636
|
-
fieldsType: "INT"
|
|
1641
|
+
fieldsType: "INT",
|
|
1642
|
+
isGroup: false
|
|
1637
1643
|
}]
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1644
|
+
}];
|
|
1645
|
+
var treeFields = transformTreeData(logFields);
|
|
1646
|
+
var curlogFields = treeFields.map(function (field) {
|
|
1647
|
+
if (field.label === "模型字段") {
|
|
1648
|
+
return _objectSpread(_objectSpread({}, field), {}, {
|
|
1649
|
+
children: staticFields.concat(field.children ? field.children : [])
|
|
1650
|
+
});
|
|
1651
|
+
} else {
|
|
1652
|
+
return field;
|
|
1653
|
+
}
|
|
1654
|
+
});
|
|
1655
|
+
setCaseAttrField(logFields.filter(function (log) {
|
|
1656
|
+
return log.fieldAttribute === "CASE";
|
|
1657
|
+
}).map(function (field) {
|
|
1658
|
+
return field.fieldName;
|
|
1659
|
+
}));
|
|
1660
|
+
return curlogFields;
|
|
1661
|
+
}
|
|
1662
|
+
function transformTreeData(nodes) {
|
|
1663
|
+
return nodes.map(function (node) {
|
|
1664
|
+
// 检查是否是分组节点(有children或fieldEntityList)
|
|
1665
|
+
var hasChildren = node.children && node.children.length > 0;
|
|
1666
|
+
var hasFieldEntityList = node.fieldEntityList && Array.isArray(node.fieldEntityList);
|
|
1667
|
+
|
|
1668
|
+
// 处理分组节点
|
|
1669
|
+
if (hasChildren || hasFieldEntityList) {
|
|
1670
|
+
var childrenNodes = [];
|
|
1671
|
+
|
|
1672
|
+
// 优先处理children
|
|
1673
|
+
if (hasChildren) {
|
|
1674
|
+
childrenNodes = transformTreeData(node.children);
|
|
1675
|
+
}
|
|
1676
|
+
// 处理fieldEntityList(包括空数组)
|
|
1677
|
+
else if (hasFieldEntityList) {
|
|
1678
|
+
childrenNodes = node.fieldEntityList.map(function (field) {
|
|
1679
|
+
return transformFieldNode(field);
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1645
1682
|
return {
|
|
1646
|
-
id:
|
|
1647
|
-
label:
|
|
1648
|
-
icon:
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1683
|
+
id: node.id || node.groupName || "",
|
|
1684
|
+
label: node.label || node.groupName || "未命名分组",
|
|
1685
|
+
icon: node.icon || "el-icon-folder",
|
|
1686
|
+
isGroup: true,
|
|
1687
|
+
isEmptyGroup: childrenNodes.length === 0,
|
|
1688
|
+
// 标记空分组
|
|
1689
|
+
children: childrenNodes.length ? childrenNodes : undefined,
|
|
1690
|
+
helperName: node.helperName,
|
|
1691
|
+
tableName: node.tableName,
|
|
1692
|
+
istype: node.type
|
|
1654
1693
|
};
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
// 处理单个字段节点
|
|
1697
|
+
return transformFieldNode(node);
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
function transformFieldNode(item) {
|
|
1701
|
+
return {
|
|
1702
|
+
id: item.fieldName ? item.fieldName : "",
|
|
1703
|
+
label: item.fieldName ? item.fieldName : "",
|
|
1704
|
+
icon: item.type === "TIME" ? "el-icon-date" : "el-icon-files",
|
|
1705
|
+
type: item.type === "TIME" ? "Distribution" : "Standard",
|
|
1706
|
+
fieldsType: item.type,
|
|
1707
|
+
fieldsId: item.id,
|
|
1708
|
+
fieldAttribute: item.fieldAttribute,
|
|
1709
|
+
aggType: item.aggType,
|
|
1710
|
+
panelData: item.panelData,
|
|
1711
|
+
variable: item.variable,
|
|
1712
|
+
targetValue: item.targetValue,
|
|
1713
|
+
helperName: item.helperName,
|
|
1714
|
+
tableName: item.tableName,
|
|
1715
|
+
isGroup: false
|
|
1716
|
+
};
|
|
1657
1717
|
}
|
|
1718
|
+
;
|
|
1658
1719
|
function getFieldCategory(type) {
|
|
1659
1720
|
if (type === "TEXT") return "ValueFilter";
|
|
1660
1721
|
if (["DOUBLE", "INT", "TIME", "TIME TANG"].includes(type)) return "RangeFilter";
|