forked from Gitlink/forgeplus-react
starfdetail.enrolled
This commit is contained in:
parent
7eee378218
commit
7ed5aa376c
|
@ -18,10 +18,11 @@ interface Ranking{
|
|||
userinfo:any
|
||||
Editable: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 [defaultValue,setDefaultValue]=useState('');
|
||||
const [ClickButton,setClickButton]=useState(true);
|
||||
|
@ -172,14 +173,18 @@ function Ranking({ChartRules,ItemData,getCharts,Selectkey,HeaderDetail,getChartR
|
|||
return(
|
||||
<div>
|
||||
{ChartRules?.stages?.length>0?null:<RankingNull/>}
|
||||
|
||||
{ChartRules?.stages?.length>0&&<Tabs animated={true} tabBarExtraContent={(userinfo?.admin||userinfo?.business||Editable)?<Button onClick={()=>{
|
||||
setIsupdate(true)
|
||||
|
||||
{ChartRules?.stages?.length>0&&
|
||||
<Tabs animated={true} tabBarExtraContent={(userinfo?.admin||userinfo?.business||Editable)?<Button onClick={()=>{
|
||||
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={()=>{
|
||||
// <moment(item?.end_time).unix()
|
||||
</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()
|
||||
dispatch({
|
||||
type: 'shixunsDetail/setActionTabs',
|
||||
payload: {
|
||||
|
@ -190,7 +195,8 @@ function Ranking({ChartRules,ItemData,getCharts,Selectkey,HeaderDetail,getChartR
|
|||
}
|
||||
},
|
||||
})
|
||||
}}>提交结果</Button></span>} onChange={(e)=>{
|
||||
}}>提交结果</Button>
|
||||
</span>} onChange={(e)=>{
|
||||
setIsupdate(false)
|
||||
let data=ChartRules?.stages?.filter(item=>parseInt(e)===parseInt(item?.id))[0];
|
||||
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}
|
||||
{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}
|
||||
{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>
|
||||
<AuthModel />
|
||||
|
|
Loading…
Reference in New Issue