forked from Gitlink/forgeplus-react
调整了前端对使用和未使用确权项目的支持
This commit is contained in:
parent
c2a21b2780
commit
fcaaef137a
|
@ -644,13 +644,6 @@ class MessageCount extends Component {
|
||||||
value={this.state.body}
|
value={this.state.body}
|
||||||
onChange={this.changbodypr}
|
onChange={this.changbodypr}
|
||||||
/>
|
/>
|
||||||
{/*<Input*/}
|
|
||||||
{/* type="select"*/}
|
|
||||||
{/* placeholder="请选择解决的issue"*/}
|
|
||||||
{/* style={{ marginTop: 20 }}*/}
|
|
||||||
{/* value={this.state.fix_issue_id}*/}
|
|
||||||
{/* onChange={this.changefixissue}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<Select
|
<Select
|
||||||
id = {'select_project'}
|
id = {'select_project'}
|
||||||
style={{ marginTop: 20, width: "500px" }}
|
style={{ marginTop: 20, width: "500px" }}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Index extends Component {
|
||||||
languageFlag:false,
|
languageFlag:false,
|
||||||
ignoreFlag:false,
|
ignoreFlag:false,
|
||||||
licenseFlag:false,
|
licenseFlag:false,
|
||||||
show_div:"hidden",
|
display: "none",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
|
@ -303,13 +303,13 @@ class Index extends Component {
|
||||||
|
|
||||||
// add by zxh: handleBlockchainChange
|
// add by zxh: handleBlockchainChange
|
||||||
handleBlockchainChange = (event) => {
|
handleBlockchainChange = (event) => {
|
||||||
if (this.state.show_div == 'hidden') {
|
if (this.state.display == "none") {
|
||||||
this.setState({
|
this.setState({
|
||||||
show_div: "visible"
|
display: "block"
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
show_div: "hidden"
|
display: "none"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -578,41 +578,7 @@ class Index extends Component {
|
||||||
<Checkbox value="limit">将项目设为私有<span className="font-13 color-grey-9">(只有项目所有人或拥有权限的项目成员才能看到)</span></Checkbox>
|
<Checkbox value="limit">将项目设为私有<span className="font-13 color-grey-9">(只有项目所有人或拥有权限的项目成员才能看到)</span></Checkbox>
|
||||||
)}
|
)}
|
||||||
</Form.Item >
|
</Form.Item >
|
||||||
{/*增加区块链选项,不要求必选,默认是选择的*/}
|
|
||||||
<Form.Item
|
|
||||||
label="确权"
|
|
||||||
style={{ margin: "0px" }}
|
|
||||||
className="privatePart"
|
|
||||||
>
|
|
||||||
{getFieldDecorator('blockchain')(
|
|
||||||
<Checkbox value="limit" onClick={this.handleBlockchainChange}>项目加入确权机制<span className="ml15 font-13 color-grey-9">(贡献确权上链并使用权益证明代表贡献)</span></Checkbox>
|
|
||||||
)}
|
|
||||||
</Form.Item >
|
|
||||||
|
|
||||||
<Form.Item
|
|
||||||
style={{ margin: "15px", display: "block" }}
|
|
||||||
className="privatePart"
|
|
||||||
ref={(blockchain_item => {this.blockchain_item = blockchain_item})}
|
|
||||||
>
|
|
||||||
<div class="div_flex_row" style={{visibility: this.state.show_div == "visible" ? "visible": "hidden"}}>
|
|
||||||
{getFieldDecorator('blockchain_token_all', {
|
|
||||||
rules: [{
|
|
||||||
required: false, message: '请填写项目token总数(单位:枚)'
|
|
||||||
}],
|
|
||||||
})(
|
|
||||||
<Input type={'number'} min={0} step={1} placeholder="请填写项目token总数(单位:枚)" />
|
|
||||||
)}
|
|
||||||
|
|
||||||
{getFieldDecorator('blockchain_init_token', {
|
|
||||||
rules: [{
|
|
||||||
required: false, message: '请填写项目创始人获取token的百分比(%)'
|
|
||||||
}],
|
|
||||||
})(
|
|
||||||
<Input type={'number'} min={0} max={100} step={1} placeholder="请填写项目创始人获取token的百分比(%)" />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</Form.Item>
|
|
||||||
|
|
||||||
{
|
{
|
||||||
projectsType && projectsType === "mirror" &&
|
projectsType && projectsType === "mirror" &&
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
@ -680,6 +646,42 @@ class Index extends Component {
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{/*增加区块链选项,不要求必选,默认是选择的*/}
|
||||||
|
<Form.Item
|
||||||
|
label="确权"
|
||||||
|
style={{ margin: "0px" }}
|
||||||
|
className="privatePart"
|
||||||
|
>
|
||||||
|
{getFieldDecorator('blockchain')(
|
||||||
|
<Checkbox value="limit" onClick={this.handleBlockchainChange}>项目加入确权机制<span className="ml15 font-13 color-grey-9">(贡献确权上链并使用权益证明代表贡献)</span></Checkbox>
|
||||||
|
)}
|
||||||
|
</Form.Item >
|
||||||
|
|
||||||
|
<Form.Item
|
||||||
|
style={{ margin: "15px", display: "block" }}
|
||||||
|
className="privatePart"
|
||||||
|
ref={(blockchain_item => {this.blockchain_item = blockchain_item})}
|
||||||
|
>
|
||||||
|
<div class="div_flex_row" style={{display: this.state.display == "block" ? "block": "none"}}>
|
||||||
|
{getFieldDecorator('blockchain_token_all', {
|
||||||
|
rules: [{
|
||||||
|
required: false, message: '请填写项目token总数(单位:枚)'
|
||||||
|
}],
|
||||||
|
})(
|
||||||
|
<Input type={'number'} min={0} step={1} placeholder="请填写项目token总数(单位:枚)" />
|
||||||
|
)}
|
||||||
|
|
||||||
|
{getFieldDecorator('blockchain_init_token', {
|
||||||
|
rules: [{
|
||||||
|
required: false, message: '请填写项目创始人获取token的百分比(%)'
|
||||||
|
}],
|
||||||
|
})(
|
||||||
|
<Input type={'number'} min={0} max={100} step={1} placeholder="请填写项目创始人获取token的百分比(%)" />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
<div className="mt20">
|
<div className="mt20">
|
||||||
注:<span className="ant-form-item-required"></span> 为必填项,否则为选填
|
注:<span className="ant-form-item-required"></span> 为必填项,否则为选填
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,8 +42,8 @@ class Detail extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
this.getDetail();
|
|
||||||
this.getBlockchainTokenNum();
|
this.getBlockchainTokenNum();
|
||||||
|
this.getDetail();
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidUpdate=()=>{
|
componentDidUpdate=()=>{
|
||||||
|
@ -362,10 +362,13 @@ class Detail extends Component {
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="grid-item-left pb15">
|
{
|
||||||
|
this.state.blockchain_token_num != -1 ? <p className="grid-item-left pb15">
|
||||||
<span className="issue_detail_info">悬赏金额:</span>
|
<span className="issue_detail_info">悬赏金额:</span>
|
||||||
<span>{this.state.blockchain_token_num}</span>
|
<span>{this.state.blockchain_token_num}</span>
|
||||||
</p>
|
</p> : ""
|
||||||
|
}
|
||||||
|
|
||||||
<p className="grid-item-left pb15">
|
<p className="grid-item-left pb15">
|
||||||
<span className="issue_detail_info">里程碑:</span>
|
<span className="issue_detail_info">里程碑:</span>
|
||||||
<span className="title_overflow">
|
<span className="title_overflow">
|
||||||
|
|
|
@ -490,18 +490,21 @@ class order_form extends Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="list-left list-left-padding issue-edit-form-right">
|
<div className="list-left list-left-padding issue-edit-form-right">
|
||||||
<div className="pd20 background-f issue-form-right">
|
<div className="pd20 background-f issue-form-right">
|
||||||
<Form.Item label="悬赏金额">
|
{issue_chosen && issue_chosen.use_blockchain ?
|
||||||
{getFieldDecorator("issue_token_num", {rules: []})(
|
<Form.Item label="悬赏金额">
|
||||||
<Input
|
{getFieldDecorator("issue_token_num", { rules: [] })(
|
||||||
ref={(input) => this.input_token=input}
|
<Input
|
||||||
type={"number"}
|
ref={(input) => this.input_token = input}
|
||||||
min={0}
|
type={"number"}
|
||||||
max={this.state.issue_token_num}
|
min={0}
|
||||||
onChange={this.adjustTokenNum.bind(this)}
|
max={this.state.issue_token_num}
|
||||||
placeholder="定义悬赏token数量"
|
onChange={this.adjustTokenNum.bind(this)}
|
||||||
/>
|
placeholder="定义悬赏token数量"
|
||||||
)}
|
/>
|
||||||
</Form.Item>
|
)}
|
||||||
|
</Form.Item>
|
||||||
|
: ""}
|
||||||
|
|
||||||
<Form.Item label="指派成员">
|
<Form.Item label="指派成员">
|
||||||
{getFieldDecorator("assigned_to_id", {rules: []})(
|
{getFieldDecorator("assigned_to_id", {rules: []})(
|
||||||
<Select
|
<Select
|
||||||
|
|
Loading…
Reference in New Issue