forked from Gitlink/forgeplus-react
update
This commit is contained in:
parent
e094edc262
commit
6cd4b09954
|
|
@ -68,13 +68,14 @@ function Datas({checkbox ,item , projectsId,owner}){
|
|||
item.assigners && item.assigners.length > 0 ?
|
||||
<Tooltip title={renderName(item.assigners)} placement="bottomRight">
|
||||
<div className={item.assigners.length > 1 ?"principal hovers":"principal"}>
|
||||
{
|
||||
{/* {
|
||||
item.assigners.map((i,k)=>{
|
||||
return(
|
||||
k<5 && <Link to={`/${i.login}`} style={{right:`${(item.assigners.length-k-1)*(22-7)}px`,zIndex:k+1}}><img src={getImageUrl(i.image_url)} alt="" /></Link>
|
||||
)
|
||||
})
|
||||
}
|
||||
} */}
|
||||
<span className="task-hide" style={{wordBreak:'break-all'}}>{renderName(item.assigners)}</span>
|
||||
</div>
|
||||
</Tooltip>
|
||||
:""
|
||||
|
|
|
|||
|
|
@ -372,48 +372,50 @@ function Details(props){
|
|||
/>
|
||||
</div>
|
||||
:
|
||||
<div className="editpanel">
|
||||
<div className="detailbanner">
|
||||
<div className="detailtitle">
|
||||
<div className="mb12">
|
||||
{details.priority && <span className={statusTag(details.priority.name)}>{ details.priority.name }</span> }
|
||||
<p className="name">{details.subject}</p>
|
||||
</div>
|
||||
<div>
|
||||
<div className="ilog mt5">
|
||||
<Copy value={`/${owner}/${projectsId}/issues/${index}`}><span className="number">#{details.project_issues_index}</span></Copy>
|
||||
<div>
|
||||
<div className="editpanel">
|
||||
<div className="detailbanner">
|
||||
<div className="detailtitle">
|
||||
<div className="mb12">
|
||||
{details.priority && <span className={statusTag(details.priority.name)}>{ details.priority.name }</span> }
|
||||
<p className="name">{details.subject}</p>
|
||||
</div>
|
||||
{
|
||||
details.author &&
|
||||
<div>
|
||||
<Link to={`/${details.author.login}`} className="author"><img src={getImageUrl(details.author.image_url)} alt="" />{details.author.name}</Link>
|
||||
<span className="ml10" style={{color:"#898d9d"}}>添加于{details.created_at}</span>
|
||||
<div>
|
||||
<div className="ilog mt5">
|
||||
<Copy value={`/${owner}/${projectsId}/issues/${index}`}><span className="number">#{details.project_issues_index}</span></Copy>
|
||||
</div>
|
||||
}
|
||||
{
|
||||
details.author &&
|
||||
<div>
|
||||
<Link to={`/${details.author.login}`} className="author"><img src={getImageUrl(details.author.image_url)} alt="" />{details.author.name}</Link>
|
||||
<span className="ml10" style={{color:"#898d9d"}}>添加于{details.created_at}</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
details.user_permission &&
|
||||
<ul className="detailoperate">
|
||||
<li><a className="color-blue" onClick={()=>setEdit(true)}><i className="iconfont icon-a-bianji12 font-12 mr5"></i>编辑</a></li>
|
||||
<li><Link to={`/${owner}/${projectsId}/issues/${index}/copy`} className="color-blue ml20"><i className="iconfont icon-a-fuzhi2 font-12 mr5"></i>复制</Link></li>
|
||||
<li><a className="color-red ml20" onClick={()=>setDelVisible(true)}><i className="iconfont icon-fuzhi-shanchu font-12 mr5"></i>删除</a></li>
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
<div class="descPanel">
|
||||
{details.description ?
|
||||
<RenderHtml className="break_word_comments imageLayerParent" value={details.description} url={props.history.location} />
|
||||
:
|
||||
<span className="color-grey-9 ml3 mr3">暂无描述</span>
|
||||
}
|
||||
{details.attachments && details.attachments.length > 0 ?
|
||||
<Attachments
|
||||
attachments={details.attachments}
|
||||
showNotification={props.showNotification}
|
||||
/>
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
{
|
||||
details.user_permission &&
|
||||
<ul className="detailoperate">
|
||||
<li><a className="color-blue" onClick={()=>setEdit(true)}><i className="iconfont icon-a-bianji12 font-12 mr5"></i>编辑</a></li>
|
||||
<li><Link to={`/${owner}/${projectsId}/issues/${index}/copy`} className="color-blue ml20"><i className="iconfont icon-a-fuzhi2 font-12 mr5"></i>复制</Link></li>
|
||||
<li><a className="color-red ml20" onClick={()=>setDelVisible(true)}><i className="iconfont icon-fuzhi-shanchu font-12 mr5"></i>删除</a></li>
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
<div class="descPanel">
|
||||
{details.description ?
|
||||
<RenderHtml className="break_word_comments imageLayerParent" value={details.description} url={props.history.location} />
|
||||
:
|
||||
<span className="color-grey-9 ml3 mr3">暂无描述</span>
|
||||
}
|
||||
{details.attachments && details.attachments.length > 0 ?
|
||||
<Attachments
|
||||
attachments={details.attachments}
|
||||
showNotification={props.showNotification}
|
||||
/>
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
<div id="commentList">
|
||||
<CommentList {...props} issueInfo={details} reload = {commentReload} reloadComment = {()=>{setCommentReload(Math.random())}}/>
|
||||
|
|
|
|||
|
|
@ -79,12 +79,12 @@ function List(props){
|
|||
|
||||
useEffect(()=>{
|
||||
let v = allValue && allValue > 0;
|
||||
if((updateIds && !v && (updateIds.author_id || updateIds.issue_priorities_id || updateIds.issue_tag_ids || updateIds.milestone_id || updateIds.sort_by || updateIds.status_id ||updateIds.assigner_id)) || value){
|
||||
if((updateIds && !v && (updateIds.author_id || updateIds.issue_priorities_id || updateIds.issue_tag_ids || updateIds.milestone_id || updateIds.sort_by || updateIds.status_id ||updateIds.assigner_id)) || value || end_date || begin_date){
|
||||
setClearFlag(true);
|
||||
}else{
|
||||
setClearFlag(false);
|
||||
}
|
||||
},[updateIds,value,allValue])
|
||||
},[updateIds,value,allValue,begin_date,end_date])
|
||||
// 自定义一个初始不更新的hook
|
||||
const useUpdateEffect = (fn, inputs) => {
|
||||
const didMountRef = useRef(false);
|
||||
|
|
@ -191,7 +191,9 @@ function List(props){
|
|||
setAllValue([]);
|
||||
setValue(undefined);
|
||||
setNames(undefined);
|
||||
!value && Init();
|
||||
setEnd(undefined);
|
||||
setBegin(undefined);
|
||||
(!value || begin_date || end_date ) && Init();
|
||||
// 清除下拉选项
|
||||
menuRef.current && menuRef.current.clearChoose();
|
||||
}
|
||||
|
|
@ -349,13 +351,13 @@ function List(props){
|
|||
}
|
||||
</div>
|
||||
<div>
|
||||
<DatePicker
|
||||
{/* <DatePicker
|
||||
value={begin_date ? moment(begin_date, 'YYYY-MM-DD') : ""}
|
||||
style={{ marginRight: "20px",width:125 }}
|
||||
placeholder="选择开始时间"
|
||||
onChange={changeBeginTime}
|
||||
/>
|
||||
<DatePicker style={{ marginRight: "20px",width:125 }} value={end_date ? moment(end_date, 'YYYY-MM-DD') : ""} placeholder="选择结束时间" onChange={changeEndTime} />
|
||||
<DatePicker style={{ marginRight: "20px",width:125 }} value={end_date ? moment(end_date, 'YYYY-MM-DD') : ""} placeholder="选择结束时间" onChange={changeEndTime} /> */}
|
||||
{
|
||||
permission && permission !== "Reporter" &&
|
||||
<Link to={`/${owner}/${projectsId}/issues/sign`} className="dorpdownButton"><img src={bj} alt="" className="mr5" />标记管理</Link>
|
||||
|
|
|
|||
|
|
@ -267,32 +267,35 @@
|
|||
color: #40424a;
|
||||
.principal{
|
||||
position: relative;
|
||||
height: 22px;
|
||||
&.hovers:hover{
|
||||
a{
|
||||
position:initial;
|
||||
}
|
||||
}
|
||||
a{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
transition: 0.6s;
|
||||
}
|
||||
img,span{
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
span{
|
||||
background-color:#ced5ef;
|
||||
text-align: center;
|
||||
line-height: 12px;
|
||||
color:#000000;
|
||||
z-index: 6;
|
||||
}
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
width: 150px;
|
||||
text-align: justify;
|
||||
// &.hovers:hover{
|
||||
// a{
|
||||
// position:initial;
|
||||
// }
|
||||
// }
|
||||
// a{
|
||||
// position: absolute;
|
||||
// right: 0px;
|
||||
// transition: 0.6s;
|
||||
// }
|
||||
// img,span{
|
||||
// width: 22px;
|
||||
// height: 22px;
|
||||
// border-radius: 50%;
|
||||
// }
|
||||
// span{
|
||||
// background-color:#ced5ef;
|
||||
// text-align: center;
|
||||
// line-height: 12px;
|
||||
// color:#000000;
|
||||
// z-index: 6;
|
||||
// }
|
||||
}
|
||||
&>div{
|
||||
width: 110px;
|
||||
width: 90px;
|
||||
text-align: right;
|
||||
}
|
||||
.commentnum{
|
||||
|
|
|
|||
Loading…
Reference in New Issue