liteflow-editor-process 1.0.2 → 1.0.4
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,86 @@ var ComponentPropertiesEditor = function ComponentPropertiesEditor(_ref) {
|
|
|
1455
1455
|
|
|
1456
1456
|
// 提取字段结构构造逻辑
|
|
1457
1457
|
function generateInputParams(logFields) {
|
|
1458
|
+
var curlogFields = transformTreeData(logFields);
|
|
1458
1459
|
setCaseAttrField(logFields.filter(function (log) {
|
|
1459
1460
|
return log.fieldAttribute === "CASE";
|
|
1460
1461
|
}).map(function (field) {
|
|
1461
1462
|
return field.fieldName;
|
|
1462
1463
|
}));
|
|
1463
|
-
return
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
children
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
}, {
|
|
1486
|
-
id: "p_start_time",
|
|
1487
|
-
label: "案例开始时间",
|
|
1488
|
-
icon: "el-icon-date",
|
|
1489
|
-
type: "Distribution",
|
|
1490
|
-
fieldsType: "TIME"
|
|
1491
|
-
}, {
|
|
1492
|
-
id: "p_cycle_time",
|
|
1493
|
-
label: "案例持续时间",
|
|
1494
|
-
icon: "el-icon-files",
|
|
1495
|
-
type: "Standard",
|
|
1496
|
-
fieldsType: "TIME TANG"
|
|
1497
|
-
}, {
|
|
1498
|
-
id: "pnum",
|
|
1499
|
-
label: "案例数",
|
|
1500
|
-
icon: "el-icon-files",
|
|
1501
|
-
type: "Standard",
|
|
1502
|
-
fieldsType: "INT"
|
|
1503
|
-
}, {
|
|
1504
|
-
id: "p_end_time",
|
|
1505
|
-
label: "案例结束时间",
|
|
1506
|
-
icon: "el-icon-date",
|
|
1507
|
-
type: "Distribution",
|
|
1508
|
-
fieldsType: "TIME"
|
|
1509
|
-
}, {
|
|
1510
|
-
id: "activity_per_process_num",
|
|
1511
|
-
label: "每个案例的活动数",
|
|
1512
|
-
icon: "el-icon-files",
|
|
1513
|
-
type: "Standard",
|
|
1514
|
-
fieldsType: "INT"
|
|
1515
|
-
}, {
|
|
1516
|
-
id: "connections_per_process_num",
|
|
1517
|
-
label: "每个案例的连接数",
|
|
1518
|
-
icon: "el-icon-files",
|
|
1519
|
-
type: "Standard",
|
|
1520
|
-
fieldsType: "INT"
|
|
1521
|
-
}]
|
|
1522
|
-
}, {
|
|
1523
|
-
id: "activity",
|
|
1524
|
-
label: "活动",
|
|
1525
|
-
icon: "el-icon-c-scale-to-original",
|
|
1526
|
-
children: [{
|
|
1527
|
-
id: "activity_name",
|
|
1528
|
-
label: "活动名称",
|
|
1529
|
-
icon: "el-icon-files",
|
|
1530
|
-
type: "Standard",
|
|
1531
|
-
fieldsType: "TEXT"
|
|
1532
|
-
}, {
|
|
1533
|
-
id: "start_time",
|
|
1534
|
-
label: "活动开始时间",
|
|
1535
|
-
icon: "el-icon-date",
|
|
1536
|
-
type: "Distribution",
|
|
1537
|
-
fieldsType: "TIME"
|
|
1538
|
-
}, {
|
|
1539
|
-
id: "a_occurrence",
|
|
1540
|
-
label: "出现次数",
|
|
1541
|
-
icon: "el-icon-files",
|
|
1542
|
-
type: "Standard",
|
|
1543
|
-
fieldsType: "INT"
|
|
1544
|
-
}, {
|
|
1545
|
-
id: "startnum",
|
|
1546
|
-
label: "开始活动数",
|
|
1547
|
-
icon: "el-icon-files",
|
|
1548
|
-
type: "Standard",
|
|
1549
|
-
fieldsType: "INT"
|
|
1550
|
-
}, {
|
|
1551
|
-
id: "a_cycle_time",
|
|
1552
|
-
label: "活动周期时间",
|
|
1553
|
-
icon: "el-icon-files",
|
|
1554
|
-
type: "Standard",
|
|
1555
|
-
fieldsType: "TIME TANG"
|
|
1556
|
-
}, {
|
|
1557
|
-
id: "a_processing_time",
|
|
1558
|
-
label: "活动持续时间",
|
|
1559
|
-
icon: "el-icon-files",
|
|
1560
|
-
type: "Standard",
|
|
1561
|
-
fieldsType: "TIME TANG"
|
|
1562
|
-
}, {
|
|
1563
|
-
id: "fnum",
|
|
1564
|
-
label: "活动数",
|
|
1565
|
-
icon: "el-icon-files",
|
|
1566
|
-
type: "Standard",
|
|
1567
|
-
fieldsType: "INT"
|
|
1568
|
-
}, {
|
|
1569
|
-
id: "a_wait_time",
|
|
1570
|
-
label: "活动等待时间",
|
|
1571
|
-
icon: "el-icon-files",
|
|
1572
|
-
type: "Standard",
|
|
1573
|
-
fieldsType: "TIME TANG"
|
|
1574
|
-
}, {
|
|
1575
|
-
id: "end_time",
|
|
1576
|
-
label: "活动结束时间",
|
|
1577
|
-
icon: "el-icon-date",
|
|
1578
|
-
type: "Distribution",
|
|
1579
|
-
fieldsType: "TIME"
|
|
1580
|
-
}, {
|
|
1581
|
-
id: "endnum",
|
|
1582
|
-
label: "结束活动数",
|
|
1583
|
-
icon: "el-icon-files",
|
|
1584
|
-
type: "Standard",
|
|
1585
|
-
fieldsType: "INT"
|
|
1586
|
-
}]
|
|
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
|
-
}, {
|
|
1604
|
-
id: "连接",
|
|
1605
|
-
label: "连接",
|
|
1606
|
-
icon: "el-icon-c-scale-to-original",
|
|
1607
|
-
children: [{
|
|
1608
|
-
id: "c_occurrence",
|
|
1609
|
-
label: "出现次数",
|
|
1610
|
-
icon: "el-icon-files",
|
|
1611
|
-
type: "Standard",
|
|
1612
|
-
fieldsType: "INT"
|
|
1613
|
-
}, {
|
|
1614
|
-
id: "from_name",
|
|
1615
|
-
label: "自(活动)",
|
|
1616
|
-
icon: "el-icon-files",
|
|
1617
|
-
type: "Standard",
|
|
1618
|
-
fieldsType: "TEXT"
|
|
1619
|
-
}, {
|
|
1620
|
-
id: "to_name",
|
|
1621
|
-
label: "至(活动)",
|
|
1622
|
-
icon: "el-icon-files",
|
|
1623
|
-
type: "Standard",
|
|
1624
|
-
fieldsType: "TEXT"
|
|
1625
|
-
}, {
|
|
1626
|
-
id: "c_cycle_time",
|
|
1627
|
-
label: "连接持续时间",
|
|
1628
|
-
icon: "el-icon-files",
|
|
1629
|
-
type: "Standard",
|
|
1630
|
-
fieldsType: "TIME TANG"
|
|
1631
|
-
}, {
|
|
1632
|
-
id: "cnum",
|
|
1633
|
-
label: "连接数",
|
|
1634
|
-
icon: "el-icon-files",
|
|
1635
|
-
type: "Standard",
|
|
1636
|
-
fieldsType: "INT"
|
|
1637
|
-
}]
|
|
1638
|
-
}, {
|
|
1639
|
-
id: "preset",
|
|
1640
|
-
label: "自定义",
|
|
1641
|
-
icon: "el-icon-news",
|
|
1642
|
-
children: logFields.filter(function (log) {
|
|
1643
|
-
return log.id && !log.aggType;
|
|
1644
|
-
}).map(function (item) {
|
|
1464
|
+
return curlogFields;
|
|
1465
|
+
}
|
|
1466
|
+
function transformTreeData(nodes) {
|
|
1467
|
+
return nodes.map(function (node) {
|
|
1468
|
+
// 检查是否是分组节点(有children或fieldEntityList)
|
|
1469
|
+
var hasChildren = node.children && node.children.length > 0;
|
|
1470
|
+
var hasFieldEntityList = node.fieldEntityList && Array.isArray(node.fieldEntityList);
|
|
1471
|
+
|
|
1472
|
+
// 处理分组节点
|
|
1473
|
+
if (hasChildren || hasFieldEntityList) {
|
|
1474
|
+
var childrenNodes = [];
|
|
1475
|
+
|
|
1476
|
+
// 优先处理children
|
|
1477
|
+
if (hasChildren) {
|
|
1478
|
+
childrenNodes = transformTreeData(node.children);
|
|
1479
|
+
}
|
|
1480
|
+
// 处理fieldEntityList(包括空数组)
|
|
1481
|
+
else if (hasFieldEntityList) {
|
|
1482
|
+
childrenNodes = node.fieldEntityList.map(function (field) {
|
|
1483
|
+
return transformFieldNode(field);
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1645
1486
|
return {
|
|
1646
|
-
id:
|
|
1647
|
-
label:
|
|
1648
|
-
icon:
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1487
|
+
id: node.id || node.groupName || "",
|
|
1488
|
+
label: node.label || node.groupName || "未命名分组",
|
|
1489
|
+
icon: node.icon || "el-icon-folder",
|
|
1490
|
+
isGroup: true,
|
|
1491
|
+
isEmptyGroup: childrenNodes.length === 0,
|
|
1492
|
+
// 标记空分组
|
|
1493
|
+
children: childrenNodes.length ? childrenNodes : undefined,
|
|
1494
|
+
helperName: node.helperName,
|
|
1495
|
+
tableName: node.tableName,
|
|
1496
|
+
istype: node.type
|
|
1654
1497
|
};
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
// 处理单个字段节点
|
|
1501
|
+
return transformFieldNode(node);
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1504
|
+
function transformFieldNode(item) {
|
|
1505
|
+
return item.isShowName ? {
|
|
1506
|
+
id: item.fieldName ? item.fieldName : "",
|
|
1507
|
+
label: item.shownFieldName ? item.shownFieldName : "",
|
|
1508
|
+
icon: item.type === "TIME" ? "el-icon-date" : "el-icon-files",
|
|
1509
|
+
type: item.type === "TIME" ? "Distribution" : "Standard",
|
|
1510
|
+
fieldsType: item.type,
|
|
1511
|
+
fieldsId: item.id,
|
|
1512
|
+
fieldAttribute: item.fieldAttribute,
|
|
1513
|
+
aggType: item.aggType,
|
|
1514
|
+
panelData: item.panelData,
|
|
1515
|
+
variable: item.variable,
|
|
1516
|
+
targetValue: item.targetValue,
|
|
1517
|
+
helperName: item.helperName,
|
|
1518
|
+
tableName: item.tableName,
|
|
1519
|
+
isGroup: false
|
|
1520
|
+
} : {
|
|
1521
|
+
id: item.fieldName ? item.fieldName : "",
|
|
1522
|
+
label: item.fieldName ? item.fieldName : "",
|
|
1523
|
+
icon: item.type === "TIME" ? "el-icon-date" : "el-icon-files",
|
|
1524
|
+
type: item.type === "TIME" ? "Distribution" : "Standard",
|
|
1525
|
+
fieldsType: item.type,
|
|
1526
|
+
fieldsId: item.id,
|
|
1527
|
+
fieldAttribute: item.fieldAttribute,
|
|
1528
|
+
aggType: item.aggType,
|
|
1529
|
+
panelData: item.panelData,
|
|
1530
|
+
variable: item.variable,
|
|
1531
|
+
targetValue: item.targetValue,
|
|
1532
|
+
helperName: item.helperName,
|
|
1533
|
+
tableName: item.tableName,
|
|
1534
|
+
isGroup: false
|
|
1535
|
+
};
|
|
1657
1536
|
}
|
|
1537
|
+
;
|
|
1658
1538
|
function getFieldCategory(type) {
|
|
1659
1539
|
if (type === "TEXT") return "ValueFilter";
|
|
1660
1540
|
if (["DOUBLE", "INT", "TIME", "TIME TANG"].includes(type)) return "RangeFilter";
|