forked from Gitlink/forgeplus-react
update issue
This commit is contained in:
parent
cfeef738b5
commit
bd0fcda510
|
@ -35,12 +35,12 @@ function Datas({checkbox ,item , projectsId,owner}){
|
|||
<div style={{marginTop:"-2px"}}>
|
||||
<div className="idetails mt2">
|
||||
{/* <img src={issue} alt="" width="16px" className="mr5" /> */}
|
||||
<Link to={`/${owner}/${projectsId}/issues/${item.project_issues_index}`}>{item.subject}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/issues/${item.project_issues_index}`} title={item.subject}>{item.subject}</Link>
|
||||
{
|
||||
item.tags && item.tags.length>0?
|
||||
item.tags.map((i,k)=>{
|
||||
return(
|
||||
<span style={{backgroundColor: `${i.color}`}} className="ml12 tagscolor task-hide">{i.name}</span>
|
||||
<span style={{borderColor: `${i.color}`,color: `${i.color}`}} className="ml12 tagscolor task-hide" title={i.name}>{i.name}</span>
|
||||
)
|
||||
})
|
||||
:""
|
||||
|
|
|
@ -55,7 +55,7 @@ function List(props){
|
|||
},[projectDetail])
|
||||
|
||||
useEffect(()=>{
|
||||
const datas = cookie.load('states');
|
||||
const datas = cookie.load('issuestates');
|
||||
let states = datas === "undefined" ? undefined : datas;
|
||||
if(states){
|
||||
setAboutMe(states.participant_category);
|
||||
|
@ -121,10 +121,10 @@ function List(props){
|
|||
|
||||
// 获取issue列表数据
|
||||
function Init(params,p,names){
|
||||
const datas = cookie.load('states');
|
||||
const datas = cookie.load('issuestates');
|
||||
let states = datas === "undefined" ? undefined : datas;
|
||||
if(states){
|
||||
cookie.remove('states');
|
||||
cookie.remove('issuestates');
|
||||
}
|
||||
const url = `/v1/${owner}/${projectsId}/issues`;
|
||||
axios.get(url,{
|
||||
|
@ -154,7 +154,7 @@ function List(props){
|
|||
sort_by:getBy(params && params.sort_by),names:names};
|
||||
|
||||
let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);
|
||||
cookie.save('states', {...d},{ expires: inFifteenMinutes,path:`/` });
|
||||
cookie.save('issuestates', {...d},{ expires: inFifteenMinutes,path:`/` });
|
||||
}
|
||||
}).then(error=>{})
|
||||
}
|
||||
|
@ -291,6 +291,13 @@ function List(props){
|
|||
setPage(1);
|
||||
setTotal(undefined);
|
||||
}
|
||||
|
||||
function changeSearchValueFunc(e){
|
||||
setValue(e.target.value);
|
||||
if(e.target.value===""){
|
||||
setKeyword(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
<div>
|
||||
|
@ -309,7 +316,7 @@ function List(props){
|
|||
<Search
|
||||
placeholder="输入关键字搜索疑修"
|
||||
value={value}
|
||||
onChange={e=>{setValue(e.target.value);}}
|
||||
onChange={changeSearchValueFunc}
|
||||
onSearch={()=>setKeyword(value)}
|
||||
style={{ width: 354 , height : 32 }}
|
||||
allowClear
|
||||
|
|
|
@ -121,7 +121,6 @@ function New(props){
|
|||
if(milepostId && milepostId === keyword){
|
||||
setMillstone_choose(milestones);
|
||||
}else{
|
||||
setMillstone_choose([]);
|
||||
setMillstoneList(milestones);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,11 @@ function Sign(props){
|
|||
axios.delete(url).then(result=>{
|
||||
if(result){
|
||||
props.showNotification("项目标记删除成功!");
|
||||
Init();
|
||||
if(list && list.length === 1 && page>1){
|
||||
setPage(page-1);
|
||||
}else{
|
||||
Init();
|
||||
}
|
||||
setDelVisible(false);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
|
@ -224,7 +228,7 @@ function Sign(props){
|
|||
<p>
|
||||
<span className="square mr10" style={{backgroundColor:`${i.color}`}}></span>
|
||||
<i className="iconfont icon-biaoji mr3 font-12 " style={{color:`${i.color}`}}></i>
|
||||
{i.name}
|
||||
<span className="task-hide" title={i.name} style={{maxWidth:210}}>{i.name}</span>
|
||||
</p>
|
||||
<p style={{flex:2}} className="task-hide">{i.description}</p>
|
||||
<p>
|
||||
|
|
|
@ -218,16 +218,17 @@
|
|||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 600px;
|
||||
max-width: 519px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tagscolor{
|
||||
padding:0px 6px;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
max-width: 200px;
|
||||
line-height: 18px;
|
||||
max-width: 60px;
|
||||
border:1px solid ;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
.infos{
|
||||
|
@ -390,15 +391,17 @@
|
|||
padding:10px 20px;
|
||||
&>p{
|
||||
flex:1;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
color: 40424a;
|
||||
&:first-child{
|
||||
flex:1.2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
&:last-child{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.square{
|
||||
|
|
|
@ -247,6 +247,7 @@ class Detail extends Component {
|
|||
let currentIssue = pathname.indexOf(`/${owner}/${projectsId}/issues`) === -1;
|
||||
if (currentIssue) {
|
||||
cookie.save('states', undefined, { expires: 0, path: `/` });
|
||||
cookie.save('issuestates', undefined, { expires: 0, path: `/` });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue