diff --git a/src/pages/plan/add/add.js b/src/pages/plan/add/add.js index 2fca7fa8..e2231526 100644 --- a/src/pages/plan/add/add.js +++ b/src/pages/plan/add/add.js @@ -87,15 +87,26 @@ export default class add extends React.Component{ let data = null if(this.refs[this.state.keys[i]]) { + + console.log("key",this.state.keys[i]) + + data = this.refs[this.state.keys[i]].submit(); } + else{ + + continue; + } + + + if(data) { temp.push(data) } else{ - + console.log(7777) return; } } diff --git a/src/pages/plan/add/edit.js b/src/pages/plan/add/edit.js index cd35fb22..a09ad535 100644 --- a/src/pages/plan/add/edit.js +++ b/src/pages/plan/add/edit.js @@ -129,7 +129,22 @@ export default class add extends React.Component{ for(let i = 0;i < this.state.keys.length;i++) { - let data = this.refs["step2-"+i].submit(); + + let data = null + if(this.refs[this.state.keys[i]]) + { + + console.log("key",this.state.keys[i]) + + + data = this.refs[this.state.keys[i]].submit(); + } + else{ + + continue; + } + + if(data) { @@ -137,9 +152,11 @@ export default class add extends React.Component{ } else{ - + console.log(7777) return; } + + } console.log("第二部过了")