作品提交

This commit is contained in:
caishi 2023-07-06 11:55:57 +08:00
parent d04c2c75f9
commit 736ea6c465
3 changed files with 14 additions and 11 deletions

View File

@ -92,7 +92,7 @@ const UserModel: UserModelType = {
},
*getUserInfo({ payload }, { call, put }) {
// location.search,,debug:"admin"
const response = yield call(getUserInfo, { ...payload,debug:"student"})
const response = yield call(getUserInfo, { ...payload})
localStorage.userInfo = JSON.stringify(response);
yield put({

View File

@ -1,8 +1,11 @@
[class^='ant-upload-list-item-info']{
padding:10px;
padding-top:3px;
height: 26px;
background: #F6F7F9;
border-radius: 15px;
span[role^='img']{
top:7px!important;
}
}
[class^="ant-table-cell"]::before{
background: rgba(255,255,255,0);

View File

@ -180,7 +180,7 @@ const WorkSubmit: FC<PageProps> = ({
type: 'competitions/Results',
payload: {
identifier: identifier,
stage_id: gameItem?.id,
stage_id: gameItem?.id || null,
module_type:'worksubmit',
...urlData,
}
@ -194,7 +194,7 @@ const WorkSubmit: FC<PageProps> = ({
type: 'competitions/updateMdContent',
payload: {
identifier: identifier,
stage_id: gameItem?.id,
stage_id: gameItem?.id || null,
competition_module_id:ItemData.id,
content:mdContent,
md_content_id:data?.id,
@ -216,18 +216,18 @@ const WorkSubmit: FC<PageProps> = ({
login:userinfo?.login,
container_type:"Competition",
file_name:fileList?.[0]?.name,
stage_type:gameItem?.id,
stage_type:gameItem?.id || null,
container_id:HeaderDetail?.id,
result_id:rowTable?.id,
module_type:'worksubmit',
}
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",
params:{
url:values.url,
stage_id:gameItem?.id,
stage_id:gameItem?.id || null,
result_id:rowTable?.id,
}
}
@ -244,7 +244,7 @@ const WorkSubmit: FC<PageProps> = ({
result_id:rowTable?.id,
name:values.name,
url:values.url,
stage_id:gameItem?.id,
stage_id:gameItem?.id || null,
result_url:rowTable?.result_url,
module_type:'worksubmit',
}
@ -267,7 +267,7 @@ const WorkSubmit: FC<PageProps> = ({
type: 'competitions/Results',
payload: {
identifier: identifier,
stage_id: gameItem?.id,
stage_id: gameItem?.id || null,
page:1,
per_page:9999999, // TODO :查询所有列表数据
keyword:"",
@ -425,14 +425,14 @@ const WorkSubmit: FC<PageProps> = ({
color: "#000000",
marginTop:"10px"
}}></div>}
open={isSubmitModel}
visible={isSubmitModel}
bodyStyle={{padding:" 0px 25px 10px 25px"}}
footer={null}
onCancel={()=>{setIsSubmitModel(false);setFileList([]);setRowTable(null);}}>
<div className={styles.WorkSubmitDesc}></div>
<Form initialValues={rowTable} colon={false} onFinish={handleFormFinish}>
{modelType==1&&<><Form.Item label="作品名称" name="name" rules={[{ required: true, message: "请填写作品名称" }]} >
<Input showCount maxLength={60} placeholder="请输入作品名称"/>
<Input maxLength={60} placeholder="请输入作品名称"/>
</Form.Item>
<Form.Item label="作品链接" name="url" rules={[{ required: true, message: "请填写作品链接" }]} >
<Input placeholder="请输入作品链接"/>