From 95e145cbc369deacd1c9b4d851a7d6677a9793a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 11 Nov 2019 09:25:30 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E8=B0=83=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Studentshavecompletedthelist.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index be7871d7b..a787575e1 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -1031,10 +1031,8 @@ class Studentshavecompletedthelist extends Component { render: (text, record) => ( <span> {record.finalscore==="--"? - - - <span style={{textAlign: "center", color: '#999999'}} - >--</span> + <a style={{textAlign: "center"}} className="color-blue" target="_blank" + onClick={() => this.Adjustment(record.user_id)}>评阅</a> : <a style={{textAlign: "center"}} className="color-blue" target="_blank" @@ -1229,8 +1227,8 @@ class Studentshavecompletedthelist extends Component { render: (text, record) => ( <span> {record.finalscore==="--"? - <span style={{textAlign: "center", color: '#999999'}} - >--</span> + <a style={{textAlign: "center"}} className="color-blue" target="_blank" + onClick={() => this.Adjustment(record.user_id)}>评阅</a> : <a style={{textAlign: "center"}} className="color-blue" target="_blank" From 4247476e5c03b668fdf8fd7845bb19f277ddfaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 11 Nov 2019 10:46:58 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E8=B0=83=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coursesPublic/ModulationModal_exercise.js | 504 +++++++++++++++--- .../courses/coursesPublic/Newshixunmodel.css | 2 +- .../exercise/Studentshavecompletedthelist.js | 37 +- 3 files changed, 465 insertions(+), 78 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/ModulationModal_exercise.js b/public/react/src/modules/courses/coursesPublic/ModulationModal_exercise.js index 538b32773..a9e54a62c 100644 --- a/public/react/src/modules/courses/coursesPublic/ModulationModal_exercise.js +++ b/public/react/src/modules/courses/coursesPublic/ModulationModal_exercise.js @@ -11,21 +11,209 @@ class ModulationModal_exercise extends Component { score: 0, subjective_questions: 0, objective_questions: 0, - + subjective_score: 0, + objective_score: 0, + subool: false, + Inputsval: '', + Inputsvals: '', + Inputsvaltype: false, + Inputsvaltypes: false, + Inputsvaltest: "", + Inputsvaltests: "", } //因为主观题加客观题的和是总分 } componentDidMount = () => { - + console.log("ModulationModal_exercise"); + console.log(this.props); + this.setState({ + subjective_score: this.props.subjective_score, + objective_score: this.props.objective_score, + }) + if (this.props.subjective_score > 0 && this.props.objective_score > 0) { + this.setState({ + subool: false, + }) + } else { + this.setState({ + subool: true + }) + } } Saves = () => { - let {textareaval, subjective_questions, objective_questions, score} = this.state; + let { + textareaval, + subjective_questions, + objective_questions, + score, + subool, + Inputsval, + subjective_score, + objective_score, + Inputsvals + } = this.state; + let re = /^[0-9]+.?[0-9]*$/;//判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/ + + if (subool === false) { + //不是总分模式 + if (Inputsval === undefined || Inputsval === null || Inputsval === "") { + this.setState({ + Inputsval: "", + Inputsvaltype: true, + Inputsvaltest: "请填写分数", + }) + return + } + + //判断主观题 + + var nubmer = Inputsval; + if (!re.test(nubmer)) { + this.setState({ + Inputsval: Inputsval, + Inputsvaltype: true, + Inputsvaltest: "请输入0-100的分数", + }) + return; + } + + + if (0 > parseFloat(Inputsval)) { + this.setState({ + Inputsval: Inputsval, + Inputsvaltype: true, + Inputsvaltest: "成绩不能小于零", + }) + return; + } else if (parseFloat(Inputsval) > this.props.subjective_score) { + this.setState({ + Inputsval: Inputsval, + Inputsvaltype: true, + Inputsvaltest: `成绩不能大于${this.props.subjective_score}`, + }) + return; + } + //判断客观题 + if (Inputsvals === undefined || Inputsvals === null || Inputsvals === "") { + this.setState({ + Inputsvals: "", + Inputsvaltypes: true, + Inputsvaltests: "请填写分数", + }) + return + } + var nubmers = Inputsvals; + if (!re.test(nubmers)) { + this.setState({ + Inputsvals: "", + Inputsvaltypes: true, + Inputsvaltests: "请输入0-100的分数", + }) + return; + } + + if (0 > parseFloat(Inputsvals)) { + this.setState({ + Inputsvals: Inputsvals, + Inputsvaltypes: true, + Inputsvaltests: "请输入0-100的分数", + }) + return; + } else if (parseFloat(Inputsval) > 100) { + this.setState({ + Inputsvals: Inputsvals, + Inputsvaltypes: true, + Inputsvaltests: `成绩不能大于${this.props.objective_score}`, + }) + return; + } - // this.props.Saves(textareaval, Inputsval) + + } else { + //总分模式 + if (subjective_score > 0) { + //主观题 + if (Inputsval === undefined || Inputsval === null || Inputsval === "") { + this.setState({ + Inputsval: "", + Inputsvaltype: true, + Inputsvaltest: "请填写分数", + }) + return + } + + //判断主观题 + var nubmer = Inputsval; + if (!re.test(nubmer)) { + this.setState({ + Inputsval: Inputsval, + Inputsvaltype: true, + Inputsvaltest: "请输入0-100的分数", + }) + return; + } + + + if (0 > parseFloat(Inputsval)) { + this.setState({ + Inputsval: Inputsval, + Inputsvaltype: true, + Inputsvaltest: "成绩不能小于零", + }) + return; + } else if (parseFloat(Inputsval) > this.props.subjective_score) { + this.setState({ + Inputsval: Inputsval, + Inputsvaltype: true, + Inputsvaltest: `成绩不能大于${this.props.subjective_score}`, + }) + return; + } + } else if (objective_score > 0) { + //客观题 + if (Inputsvals === undefined || Inputsvals === null || Inputsvals === "") { + this.setState({ + Inputsvals: "", + Inputsvaltypes: true, + Inputsvaltests: "请填写分数", + }) + return + } + var nubmers = Inputsvals; + if (!re.test(nubmers)) { + this.setState({ + Inputsvals: "", + Inputsvaltypes: true, + Inputsvaltests: "请输入0-100的分数", + }) + return; + } + + if (0 > parseFloat(Inputsvals)) { + this.setState({ + Inputsvals: Inputsvals, + Inputsvaltypes: true, + Inputsvaltests: "请输入0-100的分数", + }) + return; + } else if (parseFloat(Inputsvals) > 100) { + this.setState({ + Inputsvals: Inputsvals, + Inputsvaltypes: true, + Inputsvaltests: `成绩不能大于${this.props.objective_score}`, + }) + return; + } + + } + } + + + this.props.Saves(Inputsval, Inputsvals); } @@ -35,13 +223,57 @@ class ModulationModal_exercise extends Component { }) } + //主观题 setInputs = (e) => { + console.log("主"); + console.log(e.target.value); + this.setState({ + Inputsval: e.target.value, + Inputsvaltype: false, + }) + } + //客观题 + setInputss = (e) => { + console.log("客"); + console.log(e.target.value); + this.setState({ + Inputsvals: e.target.value, + Inputsvaltypes: false, + + }) + } + //最终成绩主观题 + setInputsss = (e) => { + console.log("终主"); + console.log(e.target.value); + this.setState({ + Inputsval: e.target.value, + Inputsvaltype: false, + }) + } + //最终成绩客观题 + setInputssss = (e) => { + console.log("终客"); + console.log(e.target.value); + this.setState({ + Inputsvals: e.target.value, + Inputsvaltypes: false, + }) } render() { - let {Inputsvaltype, subjective_questions, objective_questions, score} = this.state; + let { + Inputsvaltype, + Inputsvaltypes, + Inputsvaltest, + Inputsvaltests, + subjective_score, + objective_score, + Inputsval, + Inputsvals, + } = this.state; return ( <div> <Modal @@ -58,66 +290,216 @@ class ModulationModal_exercise extends Component { flexDirection: "column", alignItems: "center", }}> + { + subjective_score > 0 && objective_score > 0 ? + <div> + {Inputsvaltype === true ? + <style> + { + ` + .ant-input:hover { + border: 1px solid #DD1717!important; + } + .ant-input:focus { + border: 1px solid #DD1717!important; + } + } + ` + } + </style> + : + "" - <div className="mexertwo"> - <p className="mexeheigth2">主观题成绩:</p> - <Input - className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"} - style={{ - width: "120px", - height: "40px", - }} - placeholder="请填写主观题成绩" - onChange={(e) => this.setInputs(e)} - value={subjective_questions === undefined || subjective_questions === null ? "" : subjective_questions}/> - <p className="mexeheigth">分 ,</p> - <p className="mexeheigth"><span>总分:</span><span>45.0 </span><span>分</span></p> - </div> - - <div className="mexertwo"> - - <p className="mexeheigth2">客观题成绩:</p> - <Input - className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"} - style={{ - width: "120px", - height: "40px", - }} - placeholder="请填写客观题成绩" - onChange={(e) => this.setInputs(e)} - value={objective_questions === undefined || objective_questions === null ? "" : objective_questions}/> - <p className="mexeheigth">分 ,</p> - <p className="mexeheigth"><span>总分:</span><span>45.0 </span><span>分</span></p> - - </div> - - <div className="mexertwo"> - <p className="mexeheigth2">最终成绩:</p> - <Input - className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"} - style={{ - width: "120px", - height: "40px", - }} - placeholder="请填写最终成绩" - onChange={(e) => this.setInputs(e)} - value={score === undefined || score === null ? "" : score}/> - <p className="mexeheigth"> 分 ,</p> - <p className="mexeheigth"><span>总分:</span><span>45.0 </span><span>分</span></p> - - </div> - - - <div className="minbuttionte"> - <a className="task-btn color-white mr30" style={{width: "72px",}} - onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a> - <a className="task-btn task-btn-orange" style={{width: "72px",}} - onClick={this.Saves}>{this.props.Savesname || '保存'}</a> - </div> + } + <div className="mexertwo"> + <p className="mexeheigth2">主观题成绩:</p> + <Input + className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"} + style={{ + width: "150px", + height: "40px", + }} + placeholder="请填写主观题成绩" + onInput={this.setInputs} + value={Inputsval === undefined || Inputsval === null ? "" : Inputsval}/> + <p className="mexeheigth ml10">分 ,</p> + <p className="mexeheigth"><span>总分:</span><span>{subjective_score}</span><span + className="ml10">分</span></p> + </div> + { + Inputsvaltype === true ? + <p style={{ + color: "#DD1717", + width: "77%", + marginLeft: "75px", + marginTop: "10px", + }}>{Inputsvaltest}</p> + : "" + } + {Inputsvaltypes === true ? + <style> + { + ` + .ant-input:hover { + border: 1px solid #DD1717!important; + } + .ant-input:focus { + border: 1px solid #DD1717!important; + } + } + ` + } + </style> + : + "" - </div> + } + <div className="mexertwo"> + + <p className="mexeheigth2">客观题成绩:</p> + <Input + className={Inputsvaltypes === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"} + style={{ + width: "150px", + height: "40px", + }} + placeholder="请填写客观题成绩" + onInput={this.setInputss} + value={Inputsvals === undefined || Inputsvals === null ? "" : Inputsvals}/> + <p className="mexeheigth ml10">分 ,</p> + <p className="mexeheigth"><span>总分:</span><span>{objective_score} </span><span + className="ml10">分</span></p> + + </div> + { + Inputsvaltypes === true ? + <p style={{ + color: "#DD1717", + width: "77%", + marginLeft: "75px", + marginTop: "10px", + }}>{Inputsvaltests}</p> + : "" + } + </div> + : + <div className="mt20"> + { + subjective_score > 0 && objective_score === 0 ? + <div> + {Inputsvaltype === true ? + <style> + { + ` + .ant-input:hover { + border: 1px solid #DD1717!important; + } + .ant-input:focus { + border: 1px solid #DD1717!important; + } + } + ` + } + </style> + : + "" + + } + <div className="mexertwo"> + <p className="mexeheigth2">最终成绩:</p> + <Input + className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"} + style={{ + width: "150px", + height: "40px", + }} + placeholder="请填写最终成绩" + onInput={this.setInputsss} + value={Inputsval === undefined || Inputsval === null ? "" : Inputsval}/> + <p className="mexeheigth ml10"> 分 ,</p> + <p className="mexeheigth"> + <span>总分:</span><span>{subjective_score > 0 && objective_score === 0 ? subjective_score : ""} {objective_score > 0 && subjective_score === 0 ? objective_score : ""}</span><span + className="ml10">分</span></p> + </div> + { + Inputsvaltype === true ? + <p style={{ + color: "#DD1717", + width: "77%", + marginLeft: "75px", + marginTop: "10px", + }}>{Inputsvaltest}</p> + : "" + } + </div> + : + "" + } + { + objective_score > 0 && subjective_score === 0 ? + <div> + {Inputsvaltypes === true ? + <style> + { + ` + .ant-input:hover { + border: 1px solid #DD1717!important; + } + .ant-input:focus { + border: 1px solid #DD1717!important; + } + } + ` + } + </style> + : + "" + } + <div className="mexertwo"> + <p className="mexeheigth2">最终成绩:</p> + <Input + className={Inputsvaltypes === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"} + style={{ + width: "150px", + height: "40px", + }} + placeholder="请填写最终成绩" + onInput={this.setInputssss} + value={Inputsvals === undefined || Inputsvals === null ? "" : Inputsvals}/> + <p className="mexeheigth ml10"> 分 ,</p> + <p className="mexeheigth"> + <span>总分:</span><span>{subjective_score > 0 && objective_score === 0 ? subjective_score : ""} {objective_score > 0 && subjective_score === 0 ? objective_score : ""}</span><span + className="ml10">分</span></p> + + </div> + { + Inputsvaltypes === true ? + <p style={{ + color: "#DD1717", + width: "77%", + marginLeft: "75px", + marginTop: "10px", + }}>{Inputsvaltests}</p> + : "" + } + </div> + : + "" + } + + + <div className="minbuttionte"> + <a className="task-btn color-white mr30" style={{width: "72px",}} + onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a> + <a className="task-btn task-btn-orange" style={{width: "72px",}} + onClick={this.Saves}>{this.props.Savesname || '保存'}</a> + </div> + </div> + + } + </div> </Modal> </div> ) diff --git a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css index 34721fa21..30cb300c8 100644 --- a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css +++ b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css @@ -361,7 +361,7 @@ .minbuttionte { /* display: flex; */ - margin-top: 27px; + margin-top: 20px; width: 100%; /* align-items: center; */ margin-bottom: 17px; diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index a787575e1..5b2150457 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -2598,9 +2598,11 @@ class Studentshavecompletedthelist extends Component { } // 调分 Adjustment = (e) => { + console.log("Adjustment"); + console.log(e); this.setState({ testpapergradingboll: true, - exeuserid: e.user_id, + exeuserid: e, }) } @@ -2615,12 +2617,13 @@ class Studentshavecompletedthelist extends Component { //试卷调分 Testpapergrading = (v, n) => { + // debugger var exercise_id = this.props.match.params.Id; let url = `/exercises/${exercise_id}/adjust_score.json`; axios.post(url, { user_id: this.state.exeuserid, - subjective_score: n, - objective_score: v, + subjective_score: v, + objective_score: n, }) .then((response) => { if (response.data.status == '0') { @@ -2629,7 +2632,7 @@ class Studentshavecompletedthelist extends Component { this.Teacherliststudentlist(); } }) - .catch(function (error) { + .catch((error) => { console.log(error); this.setState({testpapergradingboll: false}) }); @@ -2666,18 +2669,20 @@ class Studentshavecompletedthelist extends Component { </div> : <div> - {testpapergradingboll === true ? <ModulationModal - visible={testpapergradingboll} - Cancel={() => this.Adjustments()} - Saves={(value, num) => this.Testpapergrading(value, num)} - /> : ""} - {/*{*/} - {/* testpapergradingboll === true ? <ModulationModal_exercise*/} - {/* visible={testpapergradingboll}*/} - {/* Cancel={() => this.Adjustments()}*/} - {/* Saves={(value, num) => this.Testpapergrading(value, num)}*/} - {/* /> : ""*/} - {/*}*/} + {/*{testpapergradingboll === true ? <ModulationModal*/} + {/* visible={testpapergradingboll}*/} + {/* Cancel={() => this.Adjustments()}*/} + {/* Saves={(value, num) => this.Testpapergrading(value, num)}*/} + {/*/> : ""}*/} + { + testpapergradingboll === true ? <ModulationModal_exercise + {...this.props} + {...this.state} + visible={testpapergradingboll} + Cancel={() => this.Adjustments()} + Saves={(value, num) => this.Testpapergrading(value, num)} + /> : "" + } <div className="edu-back-white" > <ul className="clearfix" style={{padding: '10px 30px 10px 30px'}}> From ce97442fbc075018b221a25ba6415b58d4a9e156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 11 Nov 2019 13:46:26 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=86=E7=8F=AD?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E8=BF=87=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/statistics/Statistics.css | 14 ++++++++++++++ .../src/modules/courses/statistics/Statistics.js | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/statistics/Statistics.css b/public/react/src/modules/courses/statistics/Statistics.css index cc6a7a34a..8c495307e 100644 --- a/public/react/src/modules/courses/statistics/Statistics.css +++ b/public/react/src/modules/courses/statistics/Statistics.css @@ -132,3 +132,17 @@ font-size: 16px; margin-left:15px; } +.maxnamewidth200 { + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: default; +} +.maxnamewidth180 { + max-width: 180px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: default; +} diff --git a/public/react/src/modules/courses/statistics/Statistics.js b/public/react/src/modules/courses/statistics/Statistics.js index 31f897c21..bb1ed9a09 100644 --- a/public/react/src/modules/courses/statistics/Statistics.js +++ b/public/react/src/modules/courses/statistics/Statistics.js @@ -201,15 +201,17 @@ class Statistics extends Component{ { title: '姓名', dataIndex:'user_name', + className: 'maxnamewidth180', render: (text, record) => ( - <span>{record.user_name}</span> + <a title={record.user_name} className="maxnamewidth180">{record.user_name}</a> ) }, { title: '分班', dataIndex: 'course_group', + className: 'maxnamewidth200', render: (text, record) => ( - <span >{record.course_group}</span> + <a title={record.course_group} className="maxnamewidth200">{record.course_group}</a> ) }, { From 0ee2c7a6963818e75149dd3a0e716f48f6c0ab77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 11 Nov 2019 14:26:43 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=86=E7=BB=84=E4=BD=9C=E4=B8=9A=E6=AF=95?= =?UTF-8?q?=E8=AE=BE=E4=BB=BB=E5=8A=A1=E8=AE=BE=E7=BD=AE=E8=A1=A5=E4=BA=A4?= =?UTF-8?q?=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkSetting.js | 25 ++++++++++++----- .../tasks/GraduationTaskssetting.js | 27 ++++++++++--------- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 1e3ced6d3..9e4b9f4b8 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -46,6 +46,7 @@ function disabledDateFunc(current) { return current && current < moment().endOf('day').subtract(1, 'days'); } // 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting +//普通作业分组作业设置 class CommonWorkSetting extends Component{ constructor(props){ @@ -411,10 +412,11 @@ class CommonWorkSetting extends Component{ } // 补交设置 允许补交 allow_late_change=(e)=>{ + // console.log(e.target.checked ); this.setState({ - allow_late: e.target.value + allow_late: e.target.checked }) - if (e.target.value) { + if (e.target.checked) { this.setState({ late_penalty: 5 }) @@ -1155,12 +1157,16 @@ class CommonWorkSetting extends Component{ <div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36"> <div className={" font-16 color-dark h20 mb20"}>补交设置 - <span className={"ml15 font-14 color-grey-9 "}>(选中,则允许学生延时提交作品)</span> + <span className={"ml15 font-14 color-grey-9 "}></span> </div> - <RadioGroup onChange={this.allow_late_change} value={allow_late}> - <Radio style={radioStyle} value={true} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>允许补交</Radio> + + + <Checkbox style={radioStyle} value={"允许补交"} checked={allow_late} className="font-16 " + onChange={this.allow_late_change} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>开启补交 <span + className={"font-14 ml10 color-grey-c"} + style={{textAlign: "left", fontSize: "14px"}}>(选中,则允许学生延时提交作品)</span></Checkbox> <div className={"h21 mb10 ml30 mt20"}> <span>迟交扣分:</span> @@ -1205,9 +1211,7 @@ class CommonWorkSetting extends Component{ </div> - <Radio style={radioStyle} value={false} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>禁止补交</Radio> - </RadioGroup> </div> @@ -1539,3 +1543,10 @@ class CommonWorkSetting extends Component{ const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting); export default CommonWorkSettingForm; + +// {/*<RadioGroup onChange={this.allow_late_change} value={allow_late}>*/} +// +// {/* <Radio style={radioStyle} value={true} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>允许补交</Radio>*/} +// {/* <Radio style={radioStyle} value={false} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>禁止补交</Radio>*/} +// +// {/*</RadioGroup>*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 967303e5e..57851a9dd 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -31,7 +31,7 @@ function disabledDate(current) { return current && current < moment().endOf('day').subtract(1, 'days'); } - +//毕设任务设置 class GraduationTaskssettingapp extends Component{ constructor(props){ @@ -315,17 +315,17 @@ class GraduationTaskssettingapp extends Component{ allowlatefun=(e)=>{ let {end_time}=this.state; - if(e.target.value===true||e.target.value===1){ + if(e.target.checked===true||e.target.checked===1){ this.setState({ latepenalty:5, - allowlate:e.target.value, + allowlate:e.target.checked, latetime:end_time===null||end_time === ""?"":moment(moment(handleDateString(end_time))).add(1, 'months').format("YYYY-MM-DD HH:mm"), }) }else{ this.setState({ latepenalty:0, - allowlate:e.target.value, + allowlate:e.target.checked, latetime:"" }) } @@ -1120,10 +1120,10 @@ debugger <div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36"> <div className={" font-16 color-dark h20 mb20"}>补交设置 </div> - - <RadioGroup onChange={this.allowlatefun} value={allowlate===true||allowlate===1?1:2} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}> - - <Radio style={radioStyle} value={1}>开启补交<span className={"font-14 color-grey-c "}>(选中,则允许学生延时提交作品)</span></Radio> + <Checkbox style={radioStyle} value={"允许补交"} checked={allowlate} className="font-16 " + onChange={this.allowlatefun} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}>开启补交 <span + className={"font-14 ml10 color-grey-c"} + style={{textAlign: "left", fontSize: "14px"}}>(选中,则允许学生延时提交作品)</span></Checkbox> <div className={"h21 mb30 ml30 mt20"}> <span>迟交扣分:</span> @@ -1163,11 +1163,6 @@ debugger {latetimetype===true?<div className={"color-red ml70"}>{this.state.latetimetypeval}</div>:""} </div> - - <Radio style={radioStyle} value={2}>禁止补交</Radio> - - </RadioGroup> - </div> @@ -1308,3 +1303,9 @@ debugger const GraduationTaskssetting = Form.create({ name: 'coursesNew' })(GraduationTaskssettingapp); export default GraduationTaskssetting; +// {/*<RadioGroup onChange={this.allowlatefun} value={allowlate===true||allowlate===1?1:2} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}>*/} +// +// {/* <Radio style={radioStyle} value={1}>开启补交<span className={"font-14 color-grey-c "}>(选中,则允许学生延时提交作品)</span></Radio>*/} +// {/* <Radio style={radioStyle} value={2}>禁止补交</Radio>*/} +// +// {/*</RadioGroup>*/} From 9b4abaa6637415f6c13db817dfe039de23c0c2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 11 Nov 2019 14:47:28 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E4=B8=8D=E6=89=A3=E5=88=86=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index c2d78f83e..1efb4c1cd 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -45,6 +45,7 @@ const {Option} = Select; //作品列表(学生) let allow_lates=false; +let answer_open_evaluation=false; class Listofworksstudentone extends Component { //unifiedsetting 统一设置 //allowreplenishment 允许补交 @@ -1173,7 +1174,7 @@ class Listofworksstudentone extends Component { <div>{record.late_penalty === "--" ? <span>迟交扣分:0分</span> : <span>迟交扣分:{record.late_penalty}分</span>}</div> - {record.view_answer_count===null?"":<div>查看参考答案:{record.view_answer_count}关</div>} + {record.view_answer_count===null?"":answer_open_evaluation===true?<div>查看参考答案:{record.view_answer_count}关</div>:""} <div>{record.finalscore === "--" ? <span>最终成绩:0分</span> : <span>最终成绩:{record.finalscore}分</span>}</div> @@ -1510,7 +1511,7 @@ class Listofworksstudentone extends Component { <div>{record.late_penalty === "--" ? <span>迟交扣分:0分</span> : <span>迟交扣分:{record.late_penalty}分</span>}</div> - {record.view_answer_count===null?"":<div>查看参考答案:{record.view_answer_count}关</div>} + {record.view_answer_count===null?"":answer_open_evaluation===true?<div>查看参考答案:{record.view_answer_count}关</div>:""} <div>{record.finalscore === "--" ? <span>最终成绩:0分</span> : <span>最终成绩:{record.finalscore}分</span>}</div> @@ -1749,9 +1750,11 @@ class Listofworksstudentone extends Component { loadingstate: false, computeTimetype: true, homework_status: result.data.homework_status, - update_score: result.data.update_score + update_score: result.data.update_score, }); allow_lates=result.data.allow_late; + answer_open_evaluation=result.data.answer_open_evaluation; + //老师 this.seacthdatat(result.data, result.data.student_works, result.data.work_efficiency, result.data.course_group_info, 1); if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { @@ -2491,8 +2494,11 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count: result.data.challenges_count, homework_status: result.data.homework_status, + answer_open_evaluation:result.data.answer_open_evaluation, }); - allow_lates=result.data.allow_late + allow_lates=result.data.allow_late; + answer_open_evaluation=result.data.answer_open_evaluation; + //老师 this.seacthdatat(result.data, result.data.student_works, result.data.work_efficiency, result.data.course_group_info, page); this.props.Getdataback(result, result.data); // } From 8243616eee2d5195c2842efc71c6a69cdd4f529e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 12 Nov 2019 10:04:38 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompetitionContentspdfpeopledata.js | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js index aa550c0c5..05cd680ce 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js @@ -340,6 +340,10 @@ class CompetitionContentspdfpeopledata extends Component { render() { + const admins=this.props.user.admin; + if(admins===undefined||admins===null){ + admins===false + } const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state return ( <div className="flexdidirectionss mt17"> @@ -528,7 +532,21 @@ class CompetitionContentspdfpeopledata extends Component { } </div> - : "" + : + <div> + { + admins===true? + <Bankcardnumberverifications {...this.props} {...this.state} basicInfo={this.state.basicInfo} + hideUpdating={(i) => this.hideUpdating(i)} + getdata={() => this.getdata()} + GetawardinformationAPI={() => this.GetawardinformationAPI()} + bank_account={this.state.bank_account} + ></Bankcardnumberverifications> + :"" + } + </div> + + } From 8b63f82ee02a601b7b715e6fae6c14376c17f5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 12 Nov 2019 10:49:22 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompetitionCommonChild/CompetitionContentspdf.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js index a379f2607..b41a3a837 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js @@ -17,6 +17,15 @@ class CompetitionContentspdf extends Component{ componentDidMount(){ window.document.title = '竞赛'; + let query=this.props.location&&this.props.location.search; + const types = query.split('user_id=') + let userid; + if(types[1]===undefined){ + }else{ + this.setState({ + Tabskey:"2" + }) + } } @@ -54,4 +63,4 @@ class CompetitionContentspdf extends Component{ ) } } -export default CompetitionContentspdf; \ No newline at end of file +export default CompetitionContentspdf;