1)修复复制计划后,表单验证

This commit is contained in:
zhangds 2022-08-15 15:23:02 +08:00
parent 56f13879aa
commit 6fb3c6af20
1 changed files with 1 additions and 5 deletions

View File

@ -137,6 +137,7 @@ export default class add extends React.Component {
setTimeout(() => { setTimeout(() => {
for (let i = 0; i < this.state.keys.length; i++) { for (let i = 0; i < this.state.keys.length; i++) {
this.refs["step2-" + i].edit(req.keys[i]); this.refs["step2-" + i].edit(req.keys[i]);
this.refs["step2-" + i].submit();
} }
}, 500); }, 500);
} else { } else {
@ -293,7 +294,6 @@ export default class add extends React.Component {
}; };
let plan_id = sessionStorage.getItem("plan_id"); let plan_id = sessionStorage.getItem("plan_id");
console.log("obj =>", obj);
addPlanStep(plan_id, obj).then((res) => { addPlanStep(plan_id, obj).then((res) => {
handelResponse( handelResponse(
res, res,
@ -347,8 +347,6 @@ export default class add extends React.Component {
} }
} }
} else { } else {
console.log(88888, this.refs);
sessionStorage.setItem("white", 3); sessionStorage.setItem("white", 3);
for (let i = 0; i < this.state.keys.length; i++) { for (let i = 0; i < this.state.keys.length; i++) {
if (this.refs[this.state.keys[i]]) { if (this.refs[this.state.keys[i]]) {
@ -374,8 +372,6 @@ export default class add extends React.Component {
closeStep(index) { closeStep(index) {
this.state.keys[index] = ""; this.state.keys[index] = "";
this.setState({ keys: this.state.keys }); this.setState({ keys: this.state.keys });
console.log("当前的key");
console.log(this.state.keys);
} }
send(e) { send(e) {