forked from Gitlink/forgeplus-react
add information
This commit is contained in:
parent
36691c25a4
commit
01d3972d3e
|
@ -45,6 +45,9 @@ class MessageCount extends Component {
|
||||||
copyVisible:false,
|
copyVisible:false,
|
||||||
|
|
||||||
fix_issue_id: "",
|
fix_issue_id: "",
|
||||||
|
unclosed_issue_list: [],
|
||||||
|
ownername: undefined,
|
||||||
|
reponame: undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +56,7 @@ class MessageCount extends Component {
|
||||||
SpinFlag: true,
|
SpinFlag: true,
|
||||||
});
|
});
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
|
this.getUnclosedIssueList();
|
||||||
|
|
||||||
// this.clickBody();
|
// this.clickBody();
|
||||||
};
|
};
|
||||||
|
@ -68,6 +72,8 @@ class MessageCount extends Component {
|
||||||
|
|
||||||
getDetail = () => {
|
getDetail = () => {
|
||||||
const { projectsId, mergeId, owner } = this.props.match.params;
|
const { projectsId, mergeId, owner } = this.props.match.params;
|
||||||
|
this.state.ownername = owner;
|
||||||
|
this.state.reponame = projectsId;
|
||||||
const url = `/${owner}/${projectsId}/pulls/${mergeId}.json`;
|
const url = `/${owner}/${projectsId}/pulls/${mergeId}.json`;
|
||||||
axios
|
axios
|
||||||
.get(url)
|
.get(url)
|
||||||
|
@ -171,6 +177,41 @@ class MessageCount extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
renderIssueList = (list) => {
|
||||||
|
if (list && list.length > 0) {
|
||||||
|
return list.map((item, index) => {
|
||||||
|
return (
|
||||||
|
<Option
|
||||||
|
key={item[0]}
|
||||||
|
value={item[0]}
|
||||||
|
>
|
||||||
|
{item[0] + ":" + item[1]}
|
||||||
|
</Option>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getUnclosedIssueList = () => {
|
||||||
|
const url = `/projects/blockchain/get_unclosed_issue_list`;
|
||||||
|
axios.get(url,{
|
||||||
|
params:{
|
||||||
|
"ownername": this.state.ownername,
|
||||||
|
"reponame": this.state.reponame
|
||||||
|
}
|
||||||
|
}).then(result=>{
|
||||||
|
if(result && result.data){
|
||||||
|
this.state.unclosed_issue_list = result.data.unclosed_issues;
|
||||||
|
}
|
||||||
|
}).catch(error=>{
|
||||||
|
console.log(error);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
selectIssueChange = (selectedKeys, info) => {
|
||||||
|
this.state.fix_issue_id = selectedKeys;
|
||||||
|
};
|
||||||
|
|
||||||
submitmerge = () => {
|
submitmerge = () => {
|
||||||
if (this.state.mergekey === "rebase") {
|
if (this.state.mergekey === "rebase") {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -497,12 +538,21 @@ class MessageCount extends Component {
|
||||||
value={this.state.body}
|
value={this.state.body}
|
||||||
onChange={this.changbodypr}
|
onChange={this.changbodypr}
|
||||||
/>
|
/>
|
||||||
<Input
|
{/*<Input*/}
|
||||||
placeholder="请输入解决的issue id"
|
{/* type="select"*/}
|
||||||
style={{ marginTop: 20 }}
|
{/* placeholder="请选择解决的issue"*/}
|
||||||
value={this.state.fix_issue_id}
|
{/* style={{ marginTop: 20 }}*/}
|
||||||
onChange={this.changefixissue}
|
{/* value={this.state.fix_issue_id}*/}
|
||||||
/>
|
{/* onChange={this.changefixissue}*/}
|
||||||
|
{/*/>*/}
|
||||||
|
<Select
|
||||||
|
id = {'select_project'}
|
||||||
|
style={{ marginTop: 20, width: "500px" }}
|
||||||
|
placeholder={"请选择解决的易修"}
|
||||||
|
onSelect={this.selectIssueChange}
|
||||||
|
>
|
||||||
|
{this.renderIssueList(this.state.unclosed_issue_list)}
|
||||||
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className="clearfix mt15"
|
className="clearfix mt15"
|
||||||
|
|
Loading…
Reference in New Issue