From c52cad36dda69dc0be7d5f4224296866ec7b5def Mon Sep 17 00:00:00 2001 From: dingyongkang <837816638@qq.com> Date: Wed, 26 Feb 2020 18:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8C=E7=A8=8B=E7=A2=91=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 +- .../react/src/forge/Order/MilepostDetail.js | 42 ++++++++++++++++--- .../react/src/forge/Version/UpdateVersion.js | 4 +- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 1f57d0ff0..1a12e3166 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -47,8 +47,8 @@ export function initAxiosInterceptors(props) { // TODO 读取到package.json中的配置? var //proxy = "http://localhost:3000" - // proxy="http://123.59.135.93:56666" - proxy="http://localhost:3000" + proxy="http://123.59.135.93:56666" + //proxy="http://localhost:3000" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/forge/Order/MilepostDetail.js b/public/react/src/forge/Order/MilepostDetail.js index 048ec4e36..09bc8f958 100644 --- a/public/react/src/forge/Order/MilepostDetail.js +++ b/public/react/src/forge/Order/MilepostDetail.js @@ -44,6 +44,7 @@ class MilepostDetail extends Component{ //设置选择高亮 openselect:1, closeselect:undefined, + miledata:undefined // status_type: undefined } } @@ -51,6 +52,35 @@ class MilepostDetail extends Component{ componentDidMount=()=>{ this.getSelectList(); this.getIssueList(); + this.getmeil(); + } + + getmeil=()=>{ + const { projectsId } = this.props.match.params; + const { meilid } = this.props.match.params; + const url = `/projects/${projectsId}/versions/${meilid}/edit.json`; + axios.get(url,{ + params:{ + projectsId,meilid + } + }).then((result)=>{ + if(result){ + this.setState({ + miledata:result.data, + + }) + this.props.form.setFieldsValue({ + name:result.data.name, + description:result.data.description + }); + + } + }).catch((error)=>{ + console.log(error); + }) + + + } getSelectList=()=>{ @@ -70,8 +100,8 @@ class MilepostDetail extends Component{ // 获取列表数据 getIssueList=(page,limit,search,author_id,assigned_to_id,id,value,status_type)=>{ - const { projectsId } = this.props.match.params; - const url = `/projects/${projectsId}/issues.json`; + const { projectsId,meilid} = this.props.match.params; + const url = `/projects/${projectsId}/versions/${meilid}.json`; axios.get(url,{ params:{ page,limit,search,author_id,assigned_to_id,status_type, @@ -167,7 +197,7 @@ class MilepostDetail extends Component{ render(){ - const { issue_chosen , issues , limit , page , search_count , data , assigned_to_id , author_id , isSpin,openselect,closeselect } = this.state; + const { issue_chosen , issues , limit , page , search_count , data , miledata , author_id , isSpin,openselect,closeselect } = this.state; const { projectsId,meilid } = this.props.match.params; const Paginations = ( @@ -183,7 +213,7 @@ class MilepostDetail extends Component{ return(
{miledata&&miledata.name}
-