Selaa lähdekoodia

fix: 中间结果缓存问题

leo 1 vuosi sitten
vanhempi
commit
5f906aab43
2 muutettua tiedostoa jossa 11 lisäystä ja 1 poistoa
  1. 1 0
      README.md
  2. 10 1
      packages/yili-dag/src/Dag.tsx

+ 1 - 0
README.md

@@ -58,3 +58,4 @@ docker run -d \
 
 1. [开发相关的说明](./about_dev.md)
 2. [二次开发代码改动说明](./about_diff.md)
+3. [开发环境以及代码说明](./about_dev.md)

+ 10 - 1
packages/yili-dag/src/Dag.tsx

@@ -441,6 +441,10 @@ export default class Dag extends React.Component<any, any> {
   };
 
   fetchTableInfo = async (params: any) => {
+    this.setState({
+      resultTableName: '',
+      nodeTableInfo: {}
+    });
     const { data } = await getNodeResultInfo(params);
     if (data.code === 200) {
       const { table_name, location, owner, share } = data.data;
@@ -459,7 +463,9 @@ export default class Dag extends React.Component<any, any> {
 
   fetchResultTable = async (params: any) => {
     this.setState({
-      tableLoading: true
+      tableLoading: true,
+      nodeTableCol: [],
+      nodeTableData: []
     });
     const { data } = await getNodeResult(params);
     if (data.code === 200) {
@@ -943,6 +949,7 @@ export default class Dag extends React.Component<any, any> {
           title="查看结果表"
           open={this.state.isOpenTable}
           onCancel={() => this.setState({ isOpenTable: false })}
+          destroyOnClose={true}
           footer={null}
           width={'60%'}
         >
@@ -1012,6 +1019,7 @@ export default class Dag extends React.Component<any, any> {
         </Modal>
         <Modal
           title="重命名"
+          destroyOnClose={true}
           open={this.state.saveModalOpen}
           onOk={this.saveTableData}
           cancelText="取消"
@@ -1030,6 +1038,7 @@ export default class Dag extends React.Component<any, any> {
         <Modal
           title="查看执行日志"
           open={this.state.isOpenLog}
+          destroyOnClose={true}
           onCancel={() => this.setState({ isOpenLog: false })}
           footer={null}
           width={'60%'}