From 21ec6df82177f813be928fdb296b3b57115cfe0d Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 22 Jul 2020 10:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Order/order_form.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index f8867dd1a..2570e1835 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -17,11 +17,11 @@ class order_form extends Component { branch_name: "", issue_tag_ids: "", fixed_version_id: "", - tracker_id: "", + tracker_id: "1", issue_type: "1", - status_id: "", + status_id: "1", assigned_to_id: "", - priority_id: "", + priority_id: "1", done_ratio: "0%", issue_chosen: undefined, branches: undefined, @@ -44,7 +44,7 @@ class order_form extends Component { } componentDidMount = () => { this.getSelectList(); - setTimeout(this.get_detail(),800); + }; get_detail = () => { this.setState({ @@ -102,7 +102,15 @@ class order_form extends Component { this.setState({ issue_chosen: result.data.issue_chosen, branches: result.data.branches, + isSpin:false }); + if(this.props.form_type === "edit"){ + this.get_detail(); + }else{ + this.props.form.setFieldsValue({ + ...this.state + }); + } } }).catch((error) => { console.log(error);