forked from Gitlink/forgeplus-react
修改chaine相关的
This commit is contained in:
parent
4da3d1a7ff
commit
0b84de9bcd
|
|
@ -100,7 +100,7 @@ export function initAxiosInterceptors(props) {
|
|||
// TODO 读取到package.json中的配置?
|
||||
var proxy = "http://localhost:3000"
|
||||
// proxy = "https://pre-newweb.educoder.net"
|
||||
proxy = "https://testforgeplus.trustie.net/"
|
||||
// proxy = "https://testforgeplus.trustie.net/"
|
||||
|
||||
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
|
||||
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
|
||||
|
|
|
|||
|
|
@ -251,10 +251,13 @@ class Detail extends Component {
|
|||
</span>
|
||||
{data && data.user_permission ? (
|
||||
<span className="pull-right">
|
||||
<a className="color-blue fr" onClick={this.copydetail}>
|
||||
{
|
||||
data.issue_type === "1" &&
|
||||
<a className="color-blue fr" onClick={this.copydetail}>
|
||||
复制
|
||||
</a>
|
||||
<Popconfirm
|
||||
}
|
||||
<Popconfirm
|
||||
placement="bottom"
|
||||
title={"您确定要删除吗"}
|
||||
okText="是"
|
||||
|
|
@ -268,6 +271,8 @@ class Detail extends Component {
|
|||
删除
|
||||
</a>
|
||||
</Popconfirm>
|
||||
|
||||
|
||||
|
||||
<Link
|
||||
to={`/projects/${projectsId}/orders/${orderId}/updatedetail`}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class order_form extends Component {
|
|||
subject: "",
|
||||
get_attachments: undefined,
|
||||
show_token: false,
|
||||
cannot_edit: false,
|
||||
issue_current_user: true
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -43,6 +45,8 @@ class order_form extends Component {
|
|||
};
|
||||
get_detail = () => {
|
||||
const { form_type } = this.props;
|
||||
console.log("form_type",form_type)
|
||||
|
||||
if (form_type === "new") {
|
||||
this.InitData();
|
||||
this.getSelectList();
|
||||
|
|
@ -89,6 +93,8 @@ class order_form extends Component {
|
|||
start_date: result.data.start_date,
|
||||
due_date: result.data.due_date,
|
||||
subject: result.data.subject,
|
||||
cannot_edit: result.data.cannot_edit_tags && form_type !== "copy",
|
||||
issue_current_user: result.data.issue_current_user
|
||||
},
|
||||
() => this.InitData()
|
||||
);
|
||||
|
|
@ -125,7 +131,7 @@ class order_form extends Component {
|
|||
if (result) {
|
||||
this.setState({
|
||||
issue_chosen: result.data.issue_chosen,
|
||||
branches: result.data.branches,
|
||||
branches: result.data.branches
|
||||
});
|
||||
}
|
||||
})
|
||||
|
|
@ -344,6 +350,8 @@ class order_form extends Component {
|
|||
due_date,
|
||||
token,
|
||||
show_token,
|
||||
cannot_edit,
|
||||
issue_current_user
|
||||
} = this.state;
|
||||
return (
|
||||
<div className="ProjectListIndex issue-form-index">
|
||||
|
|
@ -430,7 +438,7 @@ class order_form extends Component {
|
|||
rules: [],
|
||||
initialValue: branch_name,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
<Option value={""}>分支未指定</Option>
|
||||
{branches &&
|
||||
branches.length > 0 &&
|
||||
|
|
@ -454,7 +462,7 @@ class order_form extends Component {
|
|||
],
|
||||
initialValue: status_id,
|
||||
})(
|
||||
<Select onChange={this.changeStatus}>
|
||||
<Select onChange={this.changeStatus} disabled={cannot_edit}>
|
||||
{this.renderSelect(
|
||||
issue_chosen && issue_chosen.issue_status
|
||||
)}
|
||||
|
|
@ -471,7 +479,7 @@ class order_form extends Component {
|
|||
],
|
||||
initialValue: tracker_id,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
{this.renderSelect(issue_chosen && issue_chosen.tracker)}
|
||||
</Select>
|
||||
)}
|
||||
|
|
@ -487,7 +495,7 @@ class order_form extends Component {
|
|||
],
|
||||
initialValue: priority_id,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
{this.renderSelect(issue_chosen && issue_chosen.priority)}
|
||||
</Select>
|
||||
)}
|
||||
|
|
@ -498,7 +506,7 @@ class order_form extends Component {
|
|||
rules: [],
|
||||
initialValue: fixed_version_id,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
<Option value={""}>
|
||||
{issue_chosen && issue_chosen.issue_version.length > 0
|
||||
? "未选择里程碑"
|
||||
|
|
@ -515,7 +523,7 @@ class order_form extends Component {
|
|||
rules: [],
|
||||
initialValue: issue_tag_ids,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
<Option value={""}>
|
||||
{issue_chosen && issue_chosen.issue_tag.length > 0
|
||||
? "未选择标签"
|
||||
|
|
@ -531,7 +539,7 @@ class order_form extends Component {
|
|||
rules: [{}],
|
||||
initialValue: assigned_to_id,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
<Option value={""}>未指派成员</Option>
|
||||
{this.renderSelect(
|
||||
issue_chosen && issue_chosen.assign_user
|
||||
|
|
@ -545,6 +553,7 @@ class order_form extends Component {
|
|||
style={{ width: "100%" }}
|
||||
placeholder="请选择开始日期"
|
||||
onChange={this.changeBeginTime}
|
||||
disabled={cannot_edit}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="结束日期">
|
||||
|
|
@ -553,6 +562,7 @@ class order_form extends Component {
|
|||
style={{ width: "100%" }}
|
||||
placeholder="请选择结束日期"
|
||||
onChange={this.changeEndTime}
|
||||
disabled={cannot_edit}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="完成度">
|
||||
|
|
@ -560,7 +570,7 @@ class order_form extends Component {
|
|||
rules: [],
|
||||
initialValue: done_ratio,
|
||||
})(
|
||||
<Select onChange={this.changeRatio}>
|
||||
<Select onChange={this.changeRatio} disabled={cannot_edit}>
|
||||
{this.renderSelect(issue_chosen && issue_chosen.done_ratio)}
|
||||
</Select>
|
||||
)}
|
||||
|
|
@ -572,6 +582,7 @@ class order_form extends Component {
|
|||
defaultChecked={false}
|
||||
checked={issue_type && issue_type === "2"}
|
||||
onChange={this.change_issue_type}
|
||||
disabled={cannot_edit || !issue_current_user}
|
||||
/>
|
||||
</Form.Item>
|
||||
{(show_token || (issue_type && issue_type === "2")) && (
|
||||
|
|
@ -584,7 +595,7 @@ class order_form extends Component {
|
|||
},
|
||||
],
|
||||
initialValue: token,
|
||||
})(<InputNumber placeholder="请填写整数token值" min={1} step={1} className="width100"/>)}
|
||||
})(<InputNumber placeholder="请填写整数token值" min={1} step={1} className="width100" disabled={cannot_edit || !issue_current_user}/>)}
|
||||
</Form.Item>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue