|
@@ -15,6 +15,7 @@ import {
|
|
|
debugStatus,
|
|
|
getNodeLog,
|
|
|
getNodeResult,
|
|
|
+ getNodeResultInfo,
|
|
|
saveNodeTable
|
|
|
} from './request';
|
|
|
import copy from 'copy-to-clipboard';
|
|
@@ -208,6 +209,7 @@ export default class Dag extends React.Component<any, any> {
|
|
|
logData: '暂无数据',
|
|
|
nodeTableData: [],
|
|
|
nodeTableCol: [],
|
|
|
+ tableLoading: false,
|
|
|
nodeTablePins: [],
|
|
|
nodeTableInfo: {},
|
|
|
selectedPin: 0,
|
|
@@ -434,13 +436,15 @@ export default class Dag extends React.Component<any, any> {
|
|
|
node_id: nodeId,
|
|
|
out_pin: out_pin
|
|
|
};
|
|
|
- const { data } = await getNodeResult(params);
|
|
|
+ this.fetchTableInfo(params);
|
|
|
+ this.fetchResultTable(params);
|
|
|
+ };
|
|
|
+
|
|
|
+ fetchTableInfo = async (params: any) => {
|
|
|
+ const { data } = await getNodeResultInfo(params);
|
|
|
if (data.code === 200) {
|
|
|
const { table_name, location, owner, share } = data.data;
|
|
|
- const { col, tableData } = this.formatTableData(data.data);
|
|
|
this.setState({
|
|
|
- nodeTableCol: col,
|
|
|
- nodeTableData: tableData,
|
|
|
resultTableName: table_name,
|
|
|
nodeTableInfo: {
|
|
|
location,
|
|
@@ -453,6 +457,25 @@ export default class Dag extends React.Component<any, any> {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ fetchResultTable = async (params: any) => {
|
|
|
+ this.setState({
|
|
|
+ tableLoading: true
|
|
|
+ });
|
|
|
+ const { data } = await getNodeResult(params);
|
|
|
+ if (data.code === 200) {
|
|
|
+ const { col, tableData } = this.formatTableData(data.data);
|
|
|
+ this.setState({
|
|
|
+ nodeTableCol: col,
|
|
|
+ nodeTableData: tableData
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // message.error(data.msg);
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ tableLoading: false
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
handleOpenTable = async () => {
|
|
|
const menuNode = this.state.contextMenuNode;
|
|
|
const out_pins = menuNode
|
|
@@ -982,6 +1005,7 @@ export default class Dag extends React.Component<any, any> {
|
|
|
<Table
|
|
|
columns={this.state.nodeTableCol}
|
|
|
dataSource={this.state.nodeTableData}
|
|
|
+ loading={this.state.tableLoading}
|
|
|
pagination={{ pageSize: 20 }}
|
|
|
scroll={{ x: this.state.nodeTableCol.length * 250, y: 450 }}
|
|
|
/>
|