forked from Gitlink/forgeplus-react
Compare commits
42 Commits
Author | SHA1 | Date |
---|---|---|
Jasder | f1a6078184 | |
Jasder | 9aa68eedd6 | |
sylor_huang@126.com | 90b87a3e9a | |
caishi | 914e653b13 | |
Jasder | 42ce1b31cc | |
caishi | 5aac2da26e | |
caishi | c7a69239e5 | |
sylor_huang@126.com | 9fe7d6471c | |
sylor_huang@126.com | 35509a24ab | |
sylor_huang@126.com | c24a1eca51 | |
caishi | 2a1dd2e9cf | |
caishi | aa64820873 | |
caishi | cb38a97da2 | |
caishi | 092de9828c | |
caishi | 060d9bd4e9 | |
caishi | 3a3d043d8e | |
caishi | 49141aa7a6 | |
caishi | 37d76676a5 | |
sylor_huang@126.com | 420788ec66 | |
sylor_huang@126.com | e1f450cf54 | |
sylor_huang@126.com | ab2368dad4 | |
caishi | 833f1bfe1a | |
caishi | 75a612391c | |
caishi | 223b2dbe5d | |
caishi | e3f336acc1 | |
sylor_huang@126.com | 33d9b6e6dc | |
sylor_huang@126.com | d792ba3563 | |
sylor_huang@126.com | df2c2d0f06 | |
sylor_huang@126.com | 0e2f84f5dd | |
sylor_huang@126.com | 0dcf0ca19c | |
sylor_huang@126.com | 6f7288729b | |
caishi | f6d5d6c64e | |
caishi | d50e26fb12 | |
caishi | dbcf595d55 | |
caishi | 8ba6ad24b0 | |
caishi | 3b58518e37 | |
caishi | 89bc05060c | |
sylor_huang@126.com | 2d2b1c25f9 | |
sylor_huang@126.com | 3ce5494b7f | |
sylor_huang@126.com | 0b84de9bcd | |
sylor_huang@126.com | 4da3d1a7ff | |
sylor_huang@126.com | 155ff88a26 |
|
@ -2658,7 +2658,7 @@ a.color-green:hover {
|
|||
|
||||
/*百分比宽度*/
|
||||
.width100 {
|
||||
width: 100%;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.width89 {
|
||||
|
|
|
@ -23,7 +23,9 @@ class UpdateMerge extends Component {
|
|||
|
||||
//获取新建分枝数据
|
||||
getmergelist = () => {
|
||||
this.setState({ isSpin: true });
|
||||
this.setState({
|
||||
isSpin: true,
|
||||
});
|
||||
const { projectsId, mergeId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/pull_requests/${mergeId}/edit.json`;
|
||||
axios
|
||||
|
@ -37,11 +39,15 @@ class UpdateMerge extends Component {
|
|||
merge: result.data.base,
|
||||
});
|
||||
} else {
|
||||
this.setState({ isSpin: false });
|
||||
this.setState({
|
||||
isSpin: false,
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({ isSpin: false });
|
||||
this.setState({
|
||||
isSpin: false,
|
||||
});
|
||||
console.log(error);
|
||||
});
|
||||
};
|
||||
|
@ -52,6 +58,7 @@ class UpdateMerge extends Component {
|
|||
<div>
|
||||
<div className="main">
|
||||
<Spin spinning={isSpin}>
|
||||
{" "}
|
||||
{data ? (
|
||||
<div>
|
||||
<div className="merge-header width100 inline-block">
|
||||
|
@ -66,17 +73,17 @@ class UpdateMerge extends Component {
|
|||
defaultValue={data.is_original ? `${data.fork_project_user}:${pull}` : `${pull}`}
|
||||
className="minW50 merge-flex1"
|
||||
disabled
|
||||
></Select>
|
||||
</Input.Group>
|
||||
</div>
|
||||
></Select>{" "}
|
||||
</Input.Group>{" "}
|
||||
</div>{" "}
|
||||
<div className="width10 pull-left text-center mt25">
|
||||
<i
|
||||
className={"iconfont icon-youjiang color-grey-c font-32"}
|
||||
></i>
|
||||
</div>
|
||||
></i>{" "}
|
||||
</div>{" "}
|
||||
<div className="width45 pull-left">
|
||||
<div>
|
||||
<div className="color-grey-3 mb10 fwb">目标分支:</div>
|
||||
<div className="color-grey-3 mb10 fwb"> 目标分支 : </div>{" "}
|
||||
<Input.Group compact className="display-flex">
|
||||
<Button className="merge-header-button maxW50 hide-1 task-hide">
|
||||
{`${data.project_author}/${data.project_name}`}
|
||||
|
@ -85,19 +92,18 @@ class UpdateMerge extends Component {
|
|||
defaultValue={data.is_original ? `${data.project_login}:${merge}` : `${merge}`}
|
||||
className="minW50 merge-flex1"
|
||||
disabled
|
||||
></Select>
|
||||
</Input.Group>
|
||||
</div>
|
||||
</div>
|
||||
></Select>{" "}
|
||||
</Input.Group>{" "}
|
||||
</div>{" "}
|
||||
</div>{" "}
|
||||
</div>
|
||||
|
||||
<MergeForm
|
||||
{...this.props}
|
||||
merge_type="edit"
|
||||
data={data}
|
||||
merge={merge}
|
||||
pull={pull}
|
||||
></MergeForm>
|
||||
></MergeForm>{" "}
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
|
|
|
@ -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`}
|
||||
|
@ -313,18 +318,17 @@ class Detail extends Component {
|
|||
<span className="issue_detail_info">分支:</span>
|
||||
<span>{data && data.branch_name ? data.branch_name : "--"}</span>
|
||||
</p>
|
||||
{/* <p className="grid-item pb15">
|
||||
<p className="grid-item-left pb15">
|
||||
<span className="issue_detail_info">是否上链:</span>
|
||||
<span>{data && data.issue_type==="2" ? '是' : "--"}</span>
|
||||
<span>{data && data.issue_type==="2" ? '是' : "否"}</span>
|
||||
</p>
|
||||
{
|
||||
data && data.issue_type==="2" &&
|
||||
<p className="grid-item pb15">
|
||||
<p className="grid-item-left pb15">
|
||||
<span className="issue_detail_info">token值:</span>
|
||||
<span>{data && data.token ? data.token : "--"}</span>
|
||||
</p>
|
||||
} */}
|
||||
|
||||
}
|
||||
<p className="grid-item-left pb15">
|
||||
<span className="issue_detail_info">标签:</span>
|
||||
<span>
|
||||
|
|
|
@ -56,6 +56,9 @@ class OrderItem extends Component {
|
|||
<div className="flex-1">
|
||||
<p className="mb15 df" style={{alignItems:"center"}}>
|
||||
<Link to={`/projects/${projectsId}/orders/${item.id}/detail`} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"300px"}}>{item.name}</Link>
|
||||
{
|
||||
item.issue_type !== "普通" && TagInfo("悬赏","mr10")
|
||||
}
|
||||
{TagInfo(item.priority,"mr10")}
|
||||
</p>
|
||||
<p className="color-grey-6 font-12">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from "react";
|
||||
import { Form, Input, Select, Button, DatePicker, Switch } from "antd";
|
||||
import { Form, Input, Select, Button, DatePicker, Switch,InputNumber } from "antd";
|
||||
import Upload from "../Upload/Index";
|
||||
import UploadImg from "../Images/upload.png";
|
||||
import MDEditor from "../../modules/tpm/challengesnew/tpm-md-editor";
|
||||
|
@ -34,6 +34,8 @@ class order_form extends Component {
|
|||
subject: "",
|
||||
get_attachments: undefined,
|
||||
show_token: false,
|
||||
cannot_edit: false,
|
||||
issue_current_user: true
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -50,6 +52,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();
|
||||
|
@ -96,6 +100,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()
|
||||
);
|
||||
|
@ -132,7 +138,7 @@ class order_form extends Component {
|
|||
if (result) {
|
||||
this.setState({
|
||||
issue_chosen: result.data.issue_chosen,
|
||||
branches: result.data.branches,
|
||||
branches: result.data.branches
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -300,6 +306,7 @@ class order_form extends Component {
|
|||
});
|
||||
this.setState({
|
||||
done_ratio: "0",
|
||||
issue_current_user: true,
|
||||
});
|
||||
} else if (e === "3") {
|
||||
this.props.form.setFieldsValue({
|
||||
|
@ -307,6 +314,11 @@ class order_form extends Component {
|
|||
});
|
||||
this.setState({
|
||||
done_ratio: "100",
|
||||
issue_current_user: true,
|
||||
});
|
||||
}else if (e === "5") {
|
||||
this.setState({
|
||||
issue_current_user: false,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -351,6 +363,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">
|
||||
|
@ -437,7 +451,7 @@ class order_form extends Component {
|
|||
rules: [],
|
||||
initialValue: branch_name,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
<Option value={""}>分支未指定</Option>
|
||||
{branches &&
|
||||
branches.length > 0 &&
|
||||
|
@ -461,7 +475,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
|
||||
)}
|
||||
|
@ -478,7 +492,7 @@ class order_form extends Component {
|
|||
],
|
||||
initialValue: tracker_id,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
{this.renderSelect(issue_chosen && issue_chosen.tracker)}
|
||||
</Select>
|
||||
)}
|
||||
|
@ -494,7 +508,7 @@ class order_form extends Component {
|
|||
],
|
||||
initialValue: priority_id,
|
||||
})(
|
||||
<Select>
|
||||
<Select disabled={cannot_edit}>
|
||||
{this.renderSelect(issue_chosen && issue_chosen.priority)}
|
||||
</Select>
|
||||
)}
|
||||
|
@ -505,7 +519,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
|
||||
? "未选择里程碑"
|
||||
|
@ -522,7 +536,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
|
||||
? "未选择标签"
|
||||
|
@ -538,7 +552,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
|
||||
|
@ -552,6 +566,7 @@ class order_form extends Component {
|
|||
style={{ width: "100%" }}
|
||||
placeholder="请选择开始日期"
|
||||
onChange={this.changeBeginTime}
|
||||
disabled={cannot_edit}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="结束日期">
|
||||
|
@ -560,6 +575,7 @@ class order_form extends Component {
|
|||
style={{ width: "100%" }}
|
||||
placeholder="请选择结束日期"
|
||||
onChange={this.changeEndTime}
|
||||
disabled={cannot_edit}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="完成度">
|
||||
|
@ -567,18 +583,19 @@ 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>
|
||||
)}
|
||||
</Form.Item>
|
||||
{/* <Form.Item label="是否上链">
|
||||
<Form.Item label="是否上链">
|
||||
<Switch
|
||||
checkedChildren="是"
|
||||
unCheckedChildren="否"
|
||||
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")) && (
|
||||
|
@ -591,9 +608,9 @@ class order_form extends Component {
|
|||
},
|
||||
],
|
||||
initialValue: token,
|
||||
})(<Input placeholder="请填写token值" />)}
|
||||
})(<InputNumber placeholder="请填写整数token值" min={1} step={1} className="width100" disabled={cannot_edit || !issue_current_user}/>)}
|
||||
</Form.Item>
|
||||
)} */}
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
|
|
|
@ -351,6 +351,11 @@ class Collaborator extends Component {
|
|||
dataIndex: "email",
|
||||
render: (text) => <span>{text}</span>,
|
||||
},
|
||||
{
|
||||
title: "Token值",
|
||||
dataIndex: "token",
|
||||
render: (text) => <span>{text}</span>,
|
||||
},
|
||||
{
|
||||
title: roleTitle,
|
||||
dataIndex: "role_name",
|
||||
|
|
Loading…
Reference in New Issue