|
|
|
@ -179,17 +179,19 @@ const renderRegularNodeHandles = (dataIns: any[], dataOuts: any[], apiIns: any[]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const formatFooter = (data: any) => {
|
|
|
|
const formatFooter = (data: any) => {
|
|
|
|
// TODO 这里后续需要优化
|
|
|
|
console.log('formatFooter:', data);
|
|
|
|
if (isJSON(data)) {
|
|
|
|
switch (data.type) {
|
|
|
|
const { duration } = JSON.parse(data);
|
|
|
|
case 'WAIT':
|
|
|
|
const hours = Math.floor(duration / 3600);
|
|
|
|
const { duration } = data.customDef;
|
|
|
|
const minutes = Math.floor((duration % 3600) / 60);
|
|
|
|
const hours = Math.floor(duration / 3600);
|
|
|
|
const seconds = Math.floor(duration % 60);
|
|
|
|
const minutes = Math.floor((duration % 3600) / 60);
|
|
|
|
return `${hours}小时${minutes}分钟${seconds}秒`;
|
|
|
|
const seconds = Math.floor(duration % 60);
|
|
|
|
}
|
|
|
|
return `${hours}小时${minutes}分钟${seconds}秒`;
|
|
|
|
else {
|
|
|
|
case 'CYCLE':
|
|
|
|
const keyMap = ['intervalSeconds'];
|
|
|
|
const { intervalSeconds } = data.customDef;
|
|
|
|
return cronstrue.toString(data.intervalSeconds, { locale: 'zh_CN' });
|
|
|
|
return cronstrue.toString(intervalSeconds, { locale: 'zh_CN' });
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return '这个类型还没开发';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -199,7 +201,7 @@ const NodeContent = ({ data }: { data: NodeContentData }) => {
|
|
|
|
const dataIns = data.parameters?.dataIns || [];
|
|
|
|
const dataIns = data.parameters?.dataIns || [];
|
|
|
|
const dataOuts = data.parameters?.dataOuts || [];
|
|
|
|
const dataOuts = data.parameters?.dataOuts || [];
|
|
|
|
const showFooter = data?.component?.customDef || false;
|
|
|
|
const showFooter = data?.component?.customDef || false;
|
|
|
|
const footerData = (showFooter && data.component?.customDef) || {};
|
|
|
|
const footerData = (showFooter && data.component) || {};
|
|
|
|
|
|
|
|
|
|
|
|
// 判断节点类型
|
|
|
|
// 判断节点类型
|
|
|
|
const isStartNode = data.type === 'start';
|
|
|
|
const isStartNode = data.type === 'start';
|
|
|
|
|