Parcourir la source

fix: bug修复

Leo il y a 2 ans
Parent
commit
9dfb1fb834

+ 6 - 3
src/module/taskmgmt/component/TaskChartEditor.jsx

@@ -286,10 +286,14 @@ export default class TaskChartEditor extends React.Component {
 
       taskEdges.splice(index, 1)
     })
-
+    this.loadStencil(graph)
     // 内容居中
     graph.centerContent()
+    // 设置图
+    this.setState({ taskGraph: graph })
+  }
 
+  loadStencil(graph) {
     // 创建侧边栏
     const stencil = new Stencil({
       title: '作业检索',
@@ -338,8 +342,6 @@ export default class TaskChartEditor extends React.Component {
       width: 200,
       height: workNodes.length * 80,
     })
-    // 设置图
-    this.setState({ taskGraph: graph })
   }
 
   // 卸载
@@ -374,6 +376,7 @@ export default class TaskChartEditor extends React.Component {
         },
       }
     })
+    this.loadStencil(this.state.taskGraph)
   }
 
   render() {

+ 0 - 1
src/module/taskmgmt/component/TaskCreaterView.jsx

@@ -176,7 +176,6 @@ const TaskCreaterView = () => {
             }
           })
           .catch(err => {
-            console.log('$$$', err)
             message.error('请检查表单数据是否完整')
           })
       })