forked from Gitlink/forgeplus-react
starfdetail.enrolled
This commit is contained in:
parent
7eee378218
commit
7ed5aa376c
|
@ -18,10 +18,11 @@ interface Ranking{
|
||||||
userinfo:any
|
userinfo:any
|
||||||
Editable:any
|
Editable:any
|
||||||
dispatch:any
|
dispatch:any
|
||||||
HeaderDetail:any
|
HeaderDetail:any,
|
||||||
|
StaffDetail:any
|
||||||
}
|
}
|
||||||
|
|
||||||
function Ranking({ChartRules,ItemData,getCharts,Selectkey,HeaderDetail,getChartRules,userinfo,Editable,dispatch}:Ranking){
|
function Ranking({ChartRules,ItemData,getCharts,Selectkey,HeaderDetail,getChartRules,userinfo,Editable,dispatch,StaffDetail}:Ranking){
|
||||||
const [isUpdate,setIsupdate]=useState(false);
|
const [isUpdate,setIsupdate]=useState(false);
|
||||||
const [defaultValue,setDefaultValue]=useState('');
|
const [defaultValue,setDefaultValue]=useState('');
|
||||||
const [ClickButton,setClickButton]=useState(true);
|
const [ClickButton,setClickButton]=useState(true);
|
||||||
|
@ -172,13 +173,17 @@ function Ranking({ChartRules,ItemData,getCharts,Selectkey,HeaderDetail,getChartR
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
{ChartRules?.stages?.length>0?null:<RankingNull/>}
|
{ChartRules?.stages?.length>0?null:<RankingNull/>}
|
||||||
|
{ChartRules?.stages?.length>0&&
|
||||||
{ChartRules?.stages?.length>0&&<Tabs animated={true} tabBarExtraContent={(userinfo?.admin||userinfo?.business||Editable)?<Button onClick={()=>{
|
<Tabs animated={true} tabBarExtraContent={(userinfo?.admin||userinfo?.business||Editable)?<Button onClick={()=>{
|
||||||
setIsupdate(true)
|
setIsupdate(true)
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
编辑
|
编辑
|
||||||
</Button>:<span>提交时间:{moment(item?.start_time).format("YYYY-MM-DD HH:mm:ss")}至{moment(item?.end_time).format("YYYY-MM-DD HH:mm:ss")}<Button style={{marginLeft:'20px'}} disabled={moment(item?.start_time).unix()>moment(moment().format('YYYY-MM-DD HH:mm:s')).unix()||moment(moment().format('YYYY-MM-DD HH:mm:s')).unix()>moment(item?.end_time).unix()} onClick={()=>{
|
</Button>
|
||||||
|
:
|
||||||
|
StaffDetail?.enrolled &&
|
||||||
|
<span>
|
||||||
|
提交时间:{moment(item?.start_time).format("YYYY-MM-DD HH:mm:ss")}至{moment(item?.end_time).format("YYYY-MM-DD HH:mm:ss")}
|
||||||
|
<Button style={{marginLeft:'20px'}} disabled={moment(item?.start_time).unix()>moment(moment().format('YYYY-MM-DD HH:mm:s')).unix()||moment(moment().format('YYYY-MM-DD HH:mm:s')).unix()>moment(item?.end_time).unix()} onClick={()=>{
|
||||||
// <moment(item?.end_time).unix()
|
// <moment(item?.end_time).unix()
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'shixunsDetail/setActionTabs',
|
type: 'shixunsDetail/setActionTabs',
|
||||||
|
@ -190,7 +195,8 @@ function Ranking({ChartRules,ItemData,getCharts,Selectkey,HeaderDetail,getChartR
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}}>提交结果</Button></span>} onChange={(e)=>{
|
}}>提交结果</Button>
|
||||||
|
</span>} onChange={(e)=>{
|
||||||
setIsupdate(false)
|
setIsupdate(false)
|
||||||
let data=ChartRules?.stages?.filter(item=>parseInt(e)===parseInt(item?.id))[0];
|
let data=ChartRules?.stages?.filter(item=>parseInt(e)===parseInt(item?.id))[0];
|
||||||
setItem(data);
|
setItem(data);
|
||||||
|
|
|
@ -403,7 +403,7 @@ const competitionDetails: FC<PageProps> = ({
|
||||||
{isRanKing ? <RanKing HeaderDetail={HeaderDetail} userinfo={user.userInfo} Editable={HeaderDetail?.permission?.editable} getCharts={getCharts} getChartRules={getChartRules} Selectkey={Selectkey} ChartRules={ChartRules} ItemData={ItemData} /> : null}
|
{isRanKing ? <RanKing HeaderDetail={HeaderDetail} userinfo={user.userInfo} Editable={HeaderDetail?.permission?.editable} getCharts={getCharts} getChartRules={getChartRules} Selectkey={Selectkey} ChartRules={ChartRules} ItemData={ItemData} /> : null}
|
||||||
{ISsee ? <SeeItem ref={see} StaffDetail={StaffDetail} HeaderDetail={HeaderDetail} userinfo={user.userInfo} Editable={HeaderDetail?.permission?.editable} ItemData={ItemData} setIssee={setIssee} ModelType={ModelType} dispatch={dispatch} /> : null}
|
{ISsee ? <SeeItem ref={see} StaffDetail={StaffDetail} HeaderDetail={HeaderDetail} userinfo={user.userInfo} Editable={HeaderDetail?.permission?.editable} ItemData={ItemData} setIssee={setIssee} ModelType={ModelType} dispatch={dispatch} /> : null}
|
||||||
{!ISsee && !isRanKing && !isAward && !MdTab ? <UpItem userinfo={user.userInfo} ModelType={ModelType} getrightdatas={getrightdatas} dispatch={dispatch} MenuItem={MenuItem} setIssee={setIssee} identifier={identifier} ItemData={ItemData} /> : null}
|
{!ISsee && !isRanKing && !isAward && !MdTab ? <UpItem userinfo={user.userInfo} ModelType={ModelType} getrightdatas={getrightdatas} dispatch={dispatch} MenuItem={MenuItem} setIssee={setIssee} identifier={identifier} ItemData={ItemData} /> : null}
|
||||||
{MdTab && <SubmitResult dispatch={dispatch} userinfo={user.userInfo} HeaderDetail={HeaderDetail} Editable={HeaderDetail?.permission?.editable} getCharts={getResults} getChartRules={getTabResults} Selectkey={Selectkey} ChartRules={TabResults} ItemData={ItemData} />}
|
{MdTab && <SubmitResult dispatch={dispatch} StaffDetail={StaffDetail} userinfo={user.userInfo} HeaderDetail={HeaderDetail} Editable={HeaderDetail?.permission?.editable} getCharts={getResults} getChartRules={getTabResults} Selectkey={Selectkey} ChartRules={TabResults} ItemData={ItemData} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AuthModel />
|
<AuthModel />
|
||||||
|
|
Loading…
Reference in New Issue