From d4e1b2f41406a7881200dda62bf6c44de56c7efb Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 16 Jun 2021 15:51:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85banner=E6=95=B0=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=BC=80=E5=90=AF=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E9=87=8F=EF=BC=8C=E4=B8=94=E6=89=A7=E8=A1=8C=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=88=96=E8=80=85=E6=8B=92=E7=BB=9D=E7=AD=89=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=8A=B6=E6=80=81=E7=9A=84=E6=93=8D=E4=BD=9C=E6=97=B6?= =?UTF-8?q?=E8=A6=81=E6=9B=B4=E6=96=B0=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Detail.js | 2 +- src/forge/Main/Index.scss | 13 ------------- src/forge/Merge/MessageCount.js | 25 ++++++++++++++----------- src/forge/Merge/merge.js | 10 ++++------ src/forge/Order/Milepost.js | 9 +++++---- src/forge/Order/MilepostDetail.js | 31 ++++++++++++++++++++++++++++++- src/forge/Order/OrderItem.js | 4 ++-- src/forge/Order/newMilepost.js | 2 ++ src/forge/Order/order.css | 4 +++- src/forge/Order/order.js | 9 ++++----- src/forge/Order/order_form.js | 3 ++- src/forge/css/index.scss | 13 +++++++++++++ 12 files changed, 80 insertions(+), 45 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 07bb194e..a62fb1df 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -425,7 +425,7 @@ class Detail extends Component {
- +
{project && project.author && diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index 1c99ba3d..368d6c2d 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -102,19 +102,6 @@ } } } -.projectallName{ - display: flex; - align-items: center; - font-size: 22px; - font-weight: normal; - .projectN{ - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - flex: 1; - max-width: 500px; - } -} // coderDepot .Panels{ max-width: 1200px; diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index 9c526d6d..064e3444 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -102,6 +102,8 @@ class MessageCount extends Component { isSpin: false, pr_status: 2, }); + const { getDetail } = this.props; + getDetail && getDetail(); } else { this.setState({ isSpin: false, @@ -138,6 +140,8 @@ class MessageCount extends Component { SpinMerge: false, pr_status: 1, }); + const { getDetail } = this.props; + getDetail && getDetail(); } else { this.setState({ SpinMerge: false }); } @@ -471,17 +475,16 @@ class MessageCount extends Component { : !ismesrge ? "block" : "none", }} > -

- } - disabled={!pull_request || (pull_request && !pull_request.mergeable) } - > - {this.state.mergename} - -

+ } + disabled={!pull_request || (pull_request && !pull_request.mergeable) } + > + {this.state.mergename} + {pull_request && pull_request.mergeable ? { console.log(error); @@ -228,8 +229,8 @@ class Milepost extends Component { 编辑
diff --git a/src/forge/Order/MilepostDetail.js b/src/forge/Order/MilepostDetail.js index 7954630d..38303e5d 100644 --- a/src/forge/Order/MilepostDetail.js +++ b/src/forge/Order/MilepostDetail.js @@ -69,6 +69,27 @@ class MilepostDetail extends Component { }) } + deletedetail = (id) => { + const { projectsId , owner } = this.props.match.params; + const url = `/${owner}/${projectsId}/issues/${id}.json`; + axios.delete(url, { + data: { + project_id: projectsId, + id: id, + }, + }) + .then((result) => { + if (result) { + const { page } = this.state; + this.getIssueList(page); + const { getDetail } = this.props; + getDetail && getDetail(); + } + }) + .catch((error) => { + console.log(error); + }); + }; // 获取列表数据 getIssueList = ( page , item , value , update , updateValue , type ) => { const { projectsId, meilid , owner } = this.props.match.params; @@ -275,7 +296,15 @@ class MilepostDetail extends Component { : issues && issues.length>0 && issues.map((item,key)=>{ return( - + ) }) } diff --git a/src/forge/Order/OrderItem.js b/src/forge/Order/OrderItem.js index 150b95d2..f7589c9c 100644 --- a/src/forge/Order/OrderItem.js +++ b/src/forge/Order/OrderItem.js @@ -92,12 +92,12 @@ class OrderItem extends Component { {item.journals_count} { current_user && current_user.login ? -
+
- this.deletedetail(item.id)}> + document.getElementById("hoverBox")} title={'您确定要删除当前易修吗?'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
diff --git a/src/forge/Order/newMilepost.js b/src/forge/Order/newMilepost.js index 965e5a6a..5d7b090f 100644 --- a/src/forge/Order/newMilepost.js +++ b/src/forge/Order/newMilepost.js @@ -64,6 +64,8 @@ class NewMilepost extends Component { if (result) { this.setState({ isSpin: false }) this.props.history.push(`/projects/${owner}/${projectsId}/milestones`); + const { getDetail } = this.props; + getDetail && getDetail(); } }).catch(error => { this.setState({ isSpin: false }) diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css index dd592aca..7a357d4f 100644 --- a/src/forge/Order/order.css +++ b/src/forge/Order/order.css @@ -17,7 +17,9 @@ line-height: 18px; color: red; } - +.overlayBox{ + width: 230px; +} .topmilepost { box-sizing: border-box; display: flex; diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index 5cd17054..2443d105 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -268,11 +268,8 @@ class order extends Component { checkedValue:[], all:undefined }); - this.state.select_params = { - search: undefined, - page: 1, - limit: 15, - }; + this.state.select_params.page = 1; + this.state.select_params.limit = 15; this.getIssueList(type); }; @@ -337,6 +334,8 @@ class order extends Component { const { status_type } = this.state; this.getIssueList(status_type); + const { getDetail } = this.props; + getDetail && getDetail(); } }) .catch((error) => { diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 89a5766b..45433631 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -193,13 +193,14 @@ class order_form extends Component { if (result) { this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`); this.props.showNotification("任务更新成功!"); + const { getDetail } = this.props; + getDetail && getDetail(); } }) .catch((error) => { this.setState({ isSpin: false, }); - console.log(error); }); } } diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index c1241e67..7f905ef5 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -7,6 +7,19 @@ ul,ol,dl{ .color-black{ color: #333; } +.projectallName{ + display: flex; + align-items: center; + font-size: 22px; + font-weight: normal; + .projectN{ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + flex: 1; + max-width: 500px; + } +} .main{ width: 1200px; padding:20px;