From d52afc2cd425ecb56d5b3e6f19e069fd77269345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 25 Mar 2022 11:27:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=B5=9B=E6=8A=A5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/military/qz2022/api.js | 20 ++---- src/military/qz2022/apply/index.jsx | 53 ++++++++++++---- src/military/qz2022/apply/index.scss | 57 ++++++++++++++++-- src/military/qz2022/editTable/index.jsx | 7 ++- src/military/qz2022/fetch.js | 1 + src/military/qz2022/image/apply_delete.png | Bin 0 -> 540 bytes src/military/qz2022/image/apply_one.png | Bin 0 -> 2197 bytes .../qz2022/image/apply_two_active.png | Bin 0 -> 2361 bytes src/military/qz2022/index.scss | 2 +- 9 files changed, 105 insertions(+), 35 deletions(-) create mode 100644 src/military/qz2022/image/apply_delete.png create mode 100644 src/military/qz2022/image/apply_one.png create mode 100644 src/military/qz2022/image/apply_two_active.png diff --git a/src/military/qz2022/api.js b/src/military/qz2022/api.js index 54b3a6be..d14d38dc 100644 --- a/src/military/qz2022/api.js +++ b/src/military/qz2022/api.js @@ -1,21 +1,13 @@ -import fetch,{main_web_site_url} from './fetch'; +import fetch,{main_web_site_url, current_main_site_url} from './fetch'; import { notification } from 'antd'; -// 专家列表查询 -export async function expertList(params) { +// 用户参与启智2022状态 +export async function userCompetitionStatus(id) { let res = await fetch({ - url: '/api/experts/', - method: 'get', - params, + url: `${current_main_site_url}/api/competition_infos/${id}/enroll_status.json`, + method: 'get' }); - if (res.data) { - return res.data; - } else { - notification.open({ - message: "提示", - description: res.message || '请求错误', - }); - } + return res; } //删除专家 diff --git a/src/military/qz2022/apply/index.jsx b/src/military/qz2022/apply/index.jsx index eb570e56..a050b7b8 100644 --- a/src/military/qz2022/apply/index.jsx +++ b/src/military/qz2022/apply/index.jsx @@ -3,10 +3,13 @@ import { Input, Select, Button, Form, DatePicker, Table, Pagination, Upload, Mod import {competitionArea, competitionType} from '../static.js'; import { Link } from "react-router-dom"; import { formatDuring } from 'educoder'; +import {userCompetitionStatus} from '../api'; import EditTable from "../editTable"; import apply_top from "../image/apply_top.png"; import apply_down from "../image/apply_down.png"; import apply_one_active from "../image/apply_one_active.png"; +import apply_one from "../image/apply_one.png"; +import apply_two_active from "../image/apply_two_active.png"; import apply_two from "../image/apply_two.png"; import apply_notice from "../image/apply_notice.png"; @@ -16,7 +19,8 @@ const Option = Select.Option; export default Form.create()(({ match, history, showNotification, form, current_user }) => { const { getFieldDecorator, validateFields, setFieldsValue } = form; - const [applyStatue, setApplyState] = useState(); + const [applyStatue, setApplyState] = useState(undefined); + // form表单公共处理函数 const helper = useCallback( (label, name, rules, widget) => ( @@ -28,7 +32,12 @@ export default Form.create()(({ match, history, showNotification, form, current_ ); useEffect(() => { - + // 获取用户是否报名启智2022 + userCompetitionStatus('qz2022').then(response=>{ + if(response && response.message === "success"){ + setApplyState(response.data.enroll_status); + } + }) }, []); return ( @@ -37,20 +46,20 @@ export default Form.create()(({ match, history, showNotification, form, current_   报名
- +
- +
-
+ {!applyStatue &&
请认真核对报名信息,务必与线下报名表信息一致! -
-
-
填写报名信息
+
} +
+
{!applyStatue && '填写'}报名信息
{/* 报名表单 */} -
+ {!applyStatue && {helper('参赛单位', 'expertName', [{ required: true, message: "参赛单位不能为空" }, @@ -79,14 +88,14 @@ export default Form.create()(({ match, history, showNotification, form, current_ 'expertName', [{ required: true, message: "军衔不能为空" }], )} {helper('赛项', 'expertName', [{ required: true, message: "军衔不能为空" }], )}
@@ -108,8 +117,28 @@ export default Form.create()(({ match, history, showNotification, form, current_ {/* */}
-
+ } + {/* 已报名,报名信息 */} + {applyStatue &&
+
参赛单位 :
+
参赛团队负责人姓名 :
+
职务 :
+
军衔 :
+
赛区 :
+
赛项 :
+
课题来源 :
+
成员 :
+
电话 :
+
}
+ {!applyStatue &&
+ + +
}
) }) \ No newline at end of file diff --git a/src/military/qz2022/apply/index.scss b/src/military/qz2022/apply/index.scss index e52fb598..950061de 100644 --- a/src/military/qz2022/apply/index.scss +++ b/src/military/qz2022/apply/index.scss @@ -29,16 +29,16 @@ } } .apply_information{ - // padding: 0 0 30px 30px; background-color:#ffffff; border-radius:4px; box-shadow:0px 3px 12px #ecf0ff; + padding-bottom: 1px; .info_head{ border-bottom: 1px solid #eee; padding: 12px 30px; } .info_form{ - padding: 8px 0 0 30px; + padding: 8px 0 30px 30px; .ant-form-item{ display: inline-block; width: 33%; @@ -48,24 +48,71 @@ display: inline; } } + .info{ + border: 0.5px solid rgba(153, 153, 153, 0.3); + margin: 20px 70px 30px 25px; + div{ + display: inline-block; + display: inline-block; + width: 50%; + border-right: 1px solid rgba(153, 153, 153, 0.3); + border-bottom: 1px solid rgba(153, 153, 153, 0.3); + height: 44px; + padding-left: 40px; + line-height: 44px; + } + .info-right{ + border-right: none; + } + & div:last-child{ + border-right: none; + border-bottom: none; + } + } .apply_team{ color: red; .add_member{ + padding: 0 12px; margin: 10px 0 20px; border-radius:4px; } + .member_info{ + padding-right: 240px; + } .member_info .ant-table{ margin-top: 20px; .ant-form-item{ width: 76%; + margin: 0 0 10px 0; + position: relative; + } + .ant-form-item .has-error .ant-form-explain{ + font-size: 12px; + position: absolute; } } .ant-table-thead > tr > th, .ant-table-tbody > tr > td{ - padding: 3px 16px; - text-align: center; + padding: 12px 16px; + text-align: left; } .ant-table-thead > tr > th:first-child, .ant-table-tbody > tr > td:first-child{ - padding: 3px 16px 3px 55px; + padding-left: 55px; + } + .apply_delete{ + width: 16px; + margin-bottom: 12px; + &:hover{cursor: pointer;} } } +} +.apply_but{ + padding-bottom: 60px; + text-align: center; + .cancel_submit, .submit_info{ + padding: 0 18px; + height: 36px; + } + .cancel_submit{ + padding: 0 30px; + } } \ No newline at end of file diff --git a/src/military/qz2022/editTable/index.jsx b/src/military/qz2022/editTable/index.jsx index 9d74e51a..bf9bf501 100644 --- a/src/military/qz2022/editTable/index.jsx +++ b/src/military/qz2022/editTable/index.jsx @@ -1,6 +1,7 @@ import React, { useState, useCallback, useMemo, useEffect } from "react"; import { Table, Input, Button, Popconfirm, Form } from 'antd'; import './index.scss'; +import apply_delete from "../image/apply_delete.png"; const EditableContext = React.createContext(); @@ -72,13 +73,12 @@ class EditableTable extends React.Component { title: '姓名', dataIndex: 'name', editable: true, - align:'left' }, { title: '单位', - width: '30%', dataIndex: 'age', editable: true, + width: '30%', }, { title: '职务', @@ -93,10 +93,11 @@ class EditableTable extends React.Component { { title: '操作', dataIndex: 'operation', + width: '10%', render: (text, record) => this.state.dataSource.length >= 1 ? ( this.handleDelete(record.key)}> - 删除 + ) : null, }, diff --git a/src/military/qz2022/fetch.js b/src/military/qz2022/fetch.js index ca278fde..05bef440 100644 --- a/src/military/qz2022/fetch.js +++ b/src/military/qz2022/fetch.js @@ -7,4 +7,5 @@ let actionUrl = settings && settings.api_urls && settings.api_urls.task ? settin const service = javaFetch(actionUrl); export const httpUrl = actionUrl; export const main_web_site_url = settings && settings.main_web_site_url; +export const current_main_site_url = settings && settings.current_main_site_url; export default service; \ No newline at end of file diff --git a/src/military/qz2022/image/apply_delete.png b/src/military/qz2022/image/apply_delete.png new file mode 100644 index 0000000000000000000000000000000000000000..e14b905c3f04792a1a802fd53c4f6effb7b81247 GIT binary patch literal 540 zcmV+%0^|LOP)5w&DqtoiT!V0`Ua0)WJl&0iHlOfqH{6ku6b^vI&Y6908~#-zQIgSY~jWP2ozTUI+mE8SGP8e0qmUc zb}GT2exL%5-tN&f0kC(*1&jIFkNF-V^YMtTE`BZp!41|0uqb{6z)yxDaS)-qK(td4bXLt?>u)j6a6Ps5sKomwH6GfFKOL| eOvuv0v+D<=Wk!hvXdvJK00001&f949GD>CnbXJ9Q|cpg<9zMQfvI><)=eLu_=4@&s|7 z!15DVeu5}Z5a$UZPlcVqr*x>54tD1bR*|7o8#(O~*&_QVc|7stlkSe>DG`txY|G;3 z@BhL77Z0NuJqL#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v}mYu9Rv{B4e*qZ2{49sHRNf zj6)3bM`OpXOgYTjFw2EQ4D-&hma1u_%+_@0z_{WNC#L)R;M_R^#7KW|f<&A<%_s@O zXjyfEZE(m1Af~Pd->V)zl@YVx=(P$ES%v_z5@D>pF?Wo|gFb{1gFJRLgs383hQ5HJ z)+jz{N$*VE?Sjn87mEa$133!AXf`QKQ|~tu2BXHtqQZyJ(hz6h6pE7aToP4b6`Oy0o5)9}*y#+l zMy;|kB6iX2zbYny)E<;WEZgW3HF3asO$Xf40ZKMq)QO}nhtRDy)A-~hR<{7g84wzG zh@#%OJ-(BYs`J8monJA7$t$27%j*7%sGY}%Uk>W=D`v%Ev2Bu8n5KU+msCkzqKfWV zuf(n_yIxcp#hgbQSqK02n5S(g>B)&@nWF;wXoXE43!T-Np%FHv$|0$6S5(+Q;oC0c zeIL$h;d#sxmTEx#+_Va*G^O3X0L3u)lE>zVu!)iwN@{_<3mz^?qZ77Bwk7ij76tSnnjm@ii_tmE8D#;&mBx*nk_~eBqH-TmT*0pzwNv zqQMJO&=8&JuggFM*+*<#s3%r|PyBTmW3S#|J|Tsci};AX6K5O}2al{@g^h{#fADKv z77x_X@>g$gAoIK`n=2st_QlIm3e=-azAyzQ4mjX)JS5NwKL1TH>t766J1>1SPNM$- X1$&)(DuxU?00000NkvXXu0mjfv-KD| literal 0 HcmV?d00001 diff --git a/src/military/qz2022/image/apply_two_active.png b/src/military/qz2022/image/apply_two_active.png new file mode 100644 index 0000000000000000000000000000000000000000..ff0b3d03defdf07fee71cd6d6f627bca65182ef5 GIT binary patch literal 2361 zcmV-93C8w`P)~jrVFu7geDaQ zyGgT>;!h_FDXyGu6clWtP3$fc6pJ8qx+#cA(?q4arW-}jb}B+K$-L`1_rCk)&E(B{ z@80_+oq%tX%*?y@o%`K$zI)EO=RSlTx}GYD;rjrdr^gNOBL#|4{)>V>BMeJ11gr>z zy80e#foSzDfXlxw;>u2lirsw3U`ZSX^harM<22}^)3XGu6Npt1UTtj=m!0}bX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X#r%Yq?TM;50%dgwaYll2MHCw#Z7mLaU4~r-5A8 z)C_#A{RQn!h3Is@)}C*#*b%GiIC=_@Gba#UItW(gq5*aXq~vo5ywBET!o;nEim;hX zA4NDoJF@G)1AO>}fGca}9ooiX+GJ!s%e^4g=unRz0yusM;eq?(R~-{rY@M@wSDEM@ zs)_V;uQriee*=7ZQNZV48+OokdoIgv813z_W2V7yF_Cuoa&gS=h3kHVqMq^_2&@@n zC(L|}Bpu4fbr1GEZPkqhG!5?N->1UVCl!JIaVvg^e^G&!NjziAA5#9%>?yd5Y}|xt zG*e49O%8D!!|_VeW$LNgh8`?KG<~WQL~`kMN)S1u08A%fJ9pTJ{_Xjo|5J#;KDOTL zm4Jj9FUwd!&scNCa-DO7_Krzr9gDRjnWY_-nrSqbElg8_H5mG~TV05hI}5iVXzP}O zLRnJYm5r)M6`;#_6Wiuds*$)+6kf={W(eH>0m*@uv$3@Dn+QNd9O|P-&#ut>1%E4bA}IU?gkY$d|GL3u`p#TNH4StOEt&|ORA7cFYN|VMA4yBRZ;Fp#vNa74Zr$$W zQhr7{fyO<@7!dBH?Vw+7hlp)~Xg^Htk{YlAM1w+yh?#7s!+{7ad;M^Br#xF_9>By| zZpsjU>?14K)_~{-Y&%3u$G9j)p`-3FpGUMDHxPBy9gYzYeBMR9ej}&D)Xsotf#u5( zh;UoNeBv15ZF(63EW7fIdf9@1jNTM68m&j+Xt+Vd>Ds>@M{a=V4udeC3t(CBwpUzG z77e_0Ot5UNe^x(%9nzep!4xDLJb)f;?{#=}Y;`H`p=<_<`-bD7QO zFdyU#RrvV1{Uv~^&O}x43st&!RJN;tL`Sdk5PTNL4{V-PU#db(K16;^F_iq>t8X-* f+ATh6pP~N%olnV~pzW9#00000NkvXXu0mjfk2+ZY literal 0 HcmV?d00001 diff --git a/src/military/qz2022/index.scss b/src/military/qz2022/index.scss index 44c071cc..7897809a 100644 --- a/src/military/qz2022/index.scss +++ b/src/military/qz2022/index.scss @@ -36,7 +36,7 @@ .qzCont{ min-height: 35vh; border-radius:4px; - box-shadow:0px 3px 12px #ecf0ff; + // box-shadow:0px 3px 12px #ecf0ff; } } .qz_manage{