forked from Gitlink/forgeplus-react
作品提交
This commit is contained in:
parent
d04c2c75f9
commit
736ea6c465
|
@ -92,7 +92,7 @@ const UserModel: UserModelType = {
|
||||||
},
|
},
|
||||||
*getUserInfo({ payload }, { call, put }) {
|
*getUserInfo({ payload }, { call, put }) {
|
||||||
// location.search,,debug:"admin"
|
// location.search,,debug:"admin"
|
||||||
const response = yield call(getUserInfo, { ...payload,debug:"student"})
|
const response = yield call(getUserInfo, { ...payload})
|
||||||
localStorage.userInfo = JSON.stringify(response);
|
localStorage.userInfo = JSON.stringify(response);
|
||||||
|
|
||||||
yield put({
|
yield put({
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
[class^='ant-upload-list-item-info']{
|
[class^='ant-upload-list-item-info']{
|
||||||
padding:10px;
|
padding-top:3px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
background: #F6F7F9;
|
background: #F6F7F9;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
|
span[role^='img']{
|
||||||
|
top:7px!important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[class^="ant-table-cell"]::before{
|
[class^="ant-table-cell"]::before{
|
||||||
background: rgba(255,255,255,0);
|
background: rgba(255,255,255,0);
|
||||||
|
|
|
@ -180,7 +180,7 @@ const WorkSubmit: FC<PageProps> = ({
|
||||||
type: 'competitions/Results',
|
type: 'competitions/Results',
|
||||||
payload: {
|
payload: {
|
||||||
identifier: identifier,
|
identifier: identifier,
|
||||||
stage_id: gameItem?.id,
|
stage_id: gameItem?.id || null,
|
||||||
module_type:'worksubmit',
|
module_type:'worksubmit',
|
||||||
...urlData,
|
...urlData,
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ const WorkSubmit: FC<PageProps> = ({
|
||||||
type: 'competitions/updateMdContent',
|
type: 'competitions/updateMdContent',
|
||||||
payload: {
|
payload: {
|
||||||
identifier: identifier,
|
identifier: identifier,
|
||||||
stage_id: gameItem?.id,
|
stage_id: gameItem?.id || null,
|
||||||
competition_module_id:ItemData.id,
|
competition_module_id:ItemData.id,
|
||||||
content:mdContent,
|
content:mdContent,
|
||||||
md_content_id:data?.id,
|
md_content_id:data?.id,
|
||||||
|
@ -216,18 +216,18 @@ const WorkSubmit: FC<PageProps> = ({
|
||||||
login:userinfo?.login,
|
login:userinfo?.login,
|
||||||
container_type:"Competition",
|
container_type:"Competition",
|
||||||
file_name:fileList?.[0]?.name,
|
file_name:fileList?.[0]?.name,
|
||||||
stage_type:gameItem?.id,
|
stage_type:gameItem?.id || null,
|
||||||
container_id:HeaderDetail?.id,
|
container_id:HeaderDetail?.id,
|
||||||
result_id:rowTable?.id,
|
result_id:rowTable?.id,
|
||||||
module_type:'worksubmit',
|
module_type:'worksubmit',
|
||||||
}
|
}
|
||||||
if(modelType==1){
|
if(modelType==1){
|
||||||
const res:any = await Fetch(`/api/competitions/${identifier}/check_result_url.json`,
|
const res:any = await Fetch(`https://data.educoder.net/api/competitions/${identifier}/check_result_url.json`,
|
||||||
{
|
{
|
||||||
method:"GET",
|
method:"GET",
|
||||||
params:{
|
params:{
|
||||||
url:values.url,
|
url:values.url,
|
||||||
stage_id:gameItem?.id,
|
stage_id:gameItem?.id || null,
|
||||||
result_id:rowTable?.id,
|
result_id:rowTable?.id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ const WorkSubmit: FC<PageProps> = ({
|
||||||
result_id:rowTable?.id,
|
result_id:rowTable?.id,
|
||||||
name:values.name,
|
name:values.name,
|
||||||
url:values.url,
|
url:values.url,
|
||||||
stage_id:gameItem?.id,
|
stage_id:gameItem?.id || null,
|
||||||
result_url:rowTable?.result_url,
|
result_url:rowTable?.result_url,
|
||||||
module_type:'worksubmit',
|
module_type:'worksubmit',
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ const WorkSubmit: FC<PageProps> = ({
|
||||||
type: 'competitions/Results',
|
type: 'competitions/Results',
|
||||||
payload: {
|
payload: {
|
||||||
identifier: identifier,
|
identifier: identifier,
|
||||||
stage_id: gameItem?.id,
|
stage_id: gameItem?.id || null,
|
||||||
page:1,
|
page:1,
|
||||||
per_page:9999999, // TODO :查询所有列表数据
|
per_page:9999999, // TODO :查询所有列表数据
|
||||||
keyword:"",
|
keyword:"",
|
||||||
|
@ -425,14 +425,14 @@ const WorkSubmit: FC<PageProps> = ({
|
||||||
color: "#000000",
|
color: "#000000",
|
||||||
marginTop:"10px"
|
marginTop:"10px"
|
||||||
}}>参数作品提交</div>}
|
}}>参数作品提交</div>}
|
||||||
open={isSubmitModel}
|
visible={isSubmitModel}
|
||||||
bodyStyle={{padding:" 0px 25px 10px 25px"}}
|
bodyStyle={{padding:" 0px 25px 10px 25px"}}
|
||||||
footer={null}
|
footer={null}
|
||||||
onCancel={()=>{setIsSubmitModel(false);setFileList([]);setRowTable(null);}}>
|
onCancel={()=>{setIsSubmitModel(false);setFileList([]);setRowTable(null);}}>
|
||||||
<div className={styles.WorkSubmitDesc}>说明:参赛作品不支持删除,大赛进行中上传后的作品如需修改,可在【作品提交】列表点击“编辑”进行修改。</div>
|
<div className={styles.WorkSubmitDesc}>说明:参赛作品不支持删除,大赛进行中上传后的作品如需修改,可在【作品提交】列表点击“编辑”进行修改。</div>
|
||||||
<Form initialValues={rowTable} colon={false} onFinish={handleFormFinish}>
|
<Form initialValues={rowTable} colon={false} onFinish={handleFormFinish}>
|
||||||
{modelType==1&&<><Form.Item label="作品名称" name="name" rules={[{ required: true, message: "请填写作品名称" }]} >
|
{modelType==1&&<><Form.Item label="作品名称" name="name" rules={[{ required: true, message: "请填写作品名称" }]} >
|
||||||
<Input showCount maxLength={60} placeholder="请输入作品名称"/>
|
<Input maxLength={60} placeholder="请输入作品名称"/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="作品链接" name="url" rules={[{ required: true, message: "请填写作品链接" }]} >
|
<Form.Item label="作品链接" name="url" rules={[{ required: true, message: "请填写作品链接" }]} >
|
||||||
<Input placeholder="请输入作品链接"/>
|
<Input placeholder="请输入作品链接"/>
|
||||||
|
|
Loading…
Reference in New Issue