forked from Gitlink/forgeplus-react
issue #2598
This commit is contained in:
parent
63c2e8ba8e
commit
f6dbcaf1b2
|
@ -44,6 +44,7 @@ function AllMenus({owner,projectsId,chooseFunc,update,defaultNames,defaultIds,op
|
|||
|
||||
useEffect(()=>{
|
||||
if(defaultIds){
|
||||
console.log("defaule:",defaultIds);
|
||||
setIds(defaultIds);
|
||||
}
|
||||
},[defaultIds])
|
||||
|
|
|
@ -146,7 +146,7 @@ function List(props){
|
|||
limit,
|
||||
begin_date,end_date,
|
||||
sort_direction:getDirection(params && params.sort_by),
|
||||
sort_by:getBy(params && params.sort_by),
|
||||
sort_by:getBy(params && params.sort_by),names:undefined
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
|
@ -292,6 +292,11 @@ function List(props){
|
|||
// setUpdateIds(ids);
|
||||
setUpdateChooseIds(ids);
|
||||
}else{
|
||||
if(ids.status_id === "5"){
|
||||
setCategory("closed");
|
||||
}else{
|
||||
setCategory("opened");
|
||||
}
|
||||
setUpdateIds(ids);
|
||||
setTotal(undefined);
|
||||
// Init(ids,1,n);
|
||||
|
@ -304,6 +309,19 @@ function List(props){
|
|||
}
|
||||
function changeCategory(value){
|
||||
if(value !== category){
|
||||
let ids = {...updateIds};
|
||||
let ns = {...names};
|
||||
if(value === "closed"){
|
||||
ns = {...ns,status_name:"关闭"}
|
||||
ids = {...ids,status_id:'5'};
|
||||
setNames(ns)
|
||||
setUpdateIds(ids);
|
||||
}else{
|
||||
ns = {...ns,status_name:undefined}
|
||||
ids = {...ids,status_id:undefined};
|
||||
setNames(ns)
|
||||
setUpdateIds(ids);
|
||||
}
|
||||
setCategory(value);
|
||||
setPage(1);
|
||||
setTotal(undefined);
|
||||
|
|
Loading…
Reference in New Issue