From 4247bedad775538fbf816ffce463e0f886e5a476 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 13:06:50 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/ShixunWorkReport.js | 12 ++++++++++
.../OfficialAcademicTranscript.js | 22 +++++++++++++------
2 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index b5d50abb9..434101f33 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -134,6 +134,17 @@ class ShixunWorkReport extends Component {
goback = () => {
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.state.data.homework_common_id}/list?tab=0`);
}
+
+ setupdalist=(challenge_score,overall_appraisal,work_score)=>{
+ let {data}=this.state;
+ let newdata=data;
+ newdata.challenge_score=challenge_score;
+ newdata.overall_appraisal=overall_appraisal;
+ newdata.work_score=work_score;
+ this.setState({
+ data:newdata
+ })
+ }
render() {
let{data} =this.state;
console.log(data)
@@ -199,6 +210,7 @@ class ShixunWorkReport extends Component {
data={data}
jumptopic={this.jumptopic}
getdatalist={()=>this.getdatalist()}
+ setupdalist={(challenge_score,overall_appraisal,work_score)=>this.setupdalist(challenge_score,overall_appraisal,work_score)}
/>
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index fd00aa699..8e826d8c8 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -22,7 +22,8 @@ class OfficialAcademicTranscript extends Component {
this.props.jumptopic(e);
}
- editgame_scores=(score,id)=>{
+ editgame_scores=(e,id)=>{
+ let score=e.target.value;
if(score!=null&&score!=undefined&&score!=""){
let work_id=this.props.data.work_id;
let url=`/student_works/${work_id}/adjust_review_score.json`
@@ -34,6 +35,8 @@ class OfficialAcademicTranscript extends Component {
if(result.data.status===0){
this.props.getdatalist()
this.props.showNotification(result.data.message);
+
+ this.props.setupdalist(result.data.challenge_score,result.data.overall_appraisal,result.data.work_score)
}else{
this.props.showNotification(result.data.message);
}
@@ -84,9 +87,11 @@ class OfficialAcademicTranscript extends Component {
className:"TaskForms",
render: (text, record) => (
- this.myjumptopic("id"+record.customs)} title={record.taskname.name.length>56?record.taskname.name:""} >
- {record.taskname.name}{record.taskname.complete_status===2?延时:record.taskname.complete_status===3?延时:""}
-
+ this.myjumptopic("id"+record.customs)} title={record.taskname.name.length>56?record.taskname.name:""} >
+ {record.taskname.name}
+
+ {record.taskname.complete_status===2?延时:record.taskname.complete_status===3?延时:""}
+
),
}, {
@@ -160,7 +165,7 @@ class OfficialAcademicTranscript extends Component {
render: (text, record) => (
this.editgame_scores(e,record.challenge_id.id)}
+ onBlur={(e) => this.editgame_scores(e,record.challenge_id.id)}
min={0} max={record.game_scores.game_score_full}
/>
{/*查看*/}
@@ -224,11 +229,11 @@ class OfficialAcademicTranscript extends Component {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- max-width: 450px;
+ max-width: 225px;
text-align: left !important;
}
.TaskForms{
- max-width: 450px;
+ max-width: 260px;
text-align: left !important;
padding: 16px !important;
}
@@ -241,6 +246,9 @@ class OfficialAcademicTranscript extends Component {
border-radius: 0px;
width: 66px;
}
+ .linhe15{
+ line-height: 15px;
+ }
`}
{datas===undefined?"":
Date: Sat, 31 Aug 2019 13:10:08 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/shixunreport/OfficialAcademicTranscript.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index 8e826d8c8..750b1c69e 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -33,7 +33,7 @@ class OfficialAcademicTranscript extends Component {
challenge_id:id
}).then((result)=>{
if(result.data.status===0){
- this.props.getdatalist()
+ // this.props.getdatalist()
this.props.showNotification(result.data.message);
this.props.setupdalist(result.data.challenge_score,result.data.overall_appraisal,result.data.work_score)
@@ -87,7 +87,7 @@ class OfficialAcademicTranscript extends Component {
className:"TaskForms",
render: (text, record) => (
- this.myjumptopic("id"+record.customs)} title={record.taskname.name.length>56?record.taskname.name:""} >
+ this.myjumptopic("id"+record.customs)} title={record.taskname.name.length>15?record.taskname.name:""} >
{record.taskname.name}
{record.taskname.complete_status===2?延时:record.taskname.complete_status===3?延时:""}
From 6d80a53e6d3fce45cb2e444c3fac2cba05eef5d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 13:26:25 +0800
Subject: [PATCH 3/6] b
---
.../OfficialAcademicTranscript.js | 93 +++++++++++--------
1 file changed, 56 insertions(+), 37 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index 750b1c69e..fe8bf988d 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -14,42 +14,6 @@ class OfficialAcademicTranscript extends Component {
}
componentDidMount() {
-
- }
- myjumptopic=(e)=>{
- console.log("获取到值");
- console.log(e);
- this.props.jumptopic(e);
- }
-
- editgame_scores=(e,id)=>{
- let score=e.target.value;
- if(score!=null&&score!=undefined&&score!=""){
- let work_id=this.props.data.work_id;
- let url=`/student_works/${work_id}/adjust_review_score.json`
- axios.post(url,{
- type:"report",
- score:score,
- challenge_id:id
- }).then((result)=>{
- if(result.data.status===0){
- // this.props.getdatalist()
- this.props.showNotification(result.data.message);
-
- this.props.setupdalist(result.data.challenge_score,result.data.overall_appraisal,result.data.work_score)
- }else{
- this.props.showNotification(result.data.message);
- }
- }).catch((error)=>{
-
- })
- }else{
- this.props.showNotification("调分为空将不会修改之前的分数");
- }
- }
-
- render() {
-
let {data}=this.props;
let datas=[];
@@ -68,8 +32,63 @@ class OfficialAcademicTranscript extends Component {
// adjustmentminute:asdasd
})
})
+
+ this.setState({
+ datas:datas
+ })
+ }
+ }
+ myjumptopic=(e)=>{
+ console.log("获取到值");
+ console.log(e);
+ this.props.jumptopic(e);
+ }
+
+ editgame_scores=(e,id,maxsum)=>{
+ let{datas}=this.state;
+ let newdatas=datas;
+ let score=e.target.value;
+
+ if(score!=null&&score!=undefined&&score!=""){
+ if(scoremaxsum){
+ this.props.showNotification(`调分不能大于${maxsum}`);
+ }else{
+ let work_id=this.props.data.work_id;
+ let url=`/student_works/${work_id}/adjust_review_score.json`
+ axios.post(url,{
+ type:"report",
+ score:score,
+ challenge_id:id
+ }).then((result)=>{
+ if(result.data.status===0){
+ // this.props.getdatalist()
+ this.props.showNotification(result.data.message);
+ this.props.setupdalist(result.data.challenge_score,result.data.overall_appraisal,result.data.work_score)
+ newdatas.map((item,key)=>{
+ if(item.challenge_id.id===id){
+ item.game_scores.game_score=score
+ }
+ })
+ this.setState({
+ datas:newdatas
+ })
+ }else{
+ this.props.showNotification(result.data.message);
+ }
+ }).catch((error)=>{
+
+ })
+ }
+
+ }else{
+ this.props.showNotification("调分为空将不会修改之前的分数");
}
+ }
+ render() {
+ let {datas}=this.state;
let columns=[{
title: '关卡',
@@ -165,7 +184,7 @@ class OfficialAcademicTranscript extends Component {
render: (text, record) => (
this.editgame_scores(e,record.challenge_id.id)}
+ onBlur={(e) => this.editgame_scores(e,record.challenge_id.id,record.game_scores.game_score_full)}
min={0} max={record.game_scores.game_score_full}
/>
{/*查看*/}
From 618fe608b85118a7e3c02d55b5292ba1c62297bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 13:28:58 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/shixunreport/OfficialAcademicTranscript.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index fe8bf988d..ec6a5dea4 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -185,7 +185,7 @@ class OfficialAcademicTranscript extends Component {
this.editgame_scores(e,record.challenge_id.id,record.game_scores.game_score_full)}
- min={0} max={record.game_scores.game_score_full}
+ // min={0} max={record.game_scores.game_score_full}
/>
{/*查看*/}
From 883177636da910540ddee57f7e45f02149123bf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 13:38:01 +0800
Subject: [PATCH 5/6] b
---
.../shixunHomework/shixunreport/OfficialAcademicTranscript.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index ec6a5dea4..f6f2067ad 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -50,7 +50,7 @@ class OfficialAcademicTranscript extends Component {
let score=e.target.value;
if(score!=null&&score!=undefined&&score!=""){
- if(scoremaxsum){
this.props.showNotification(`调分不能大于${maxsum}`);
@@ -183,7 +183,7 @@ class OfficialAcademicTranscript extends Component {
render: (text, record) => (
- this.editgame_scores(e,record.challenge_id.id,record.game_scores.game_score_full)}
// min={0} max={record.game_scores.game_score_full}
/>
From 1f8e03c737a8a62ba8b26eb4582fe81510c828ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 13:43:31 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/templates/shared/main.css | 2 +-
public/react/public/css/css_min_all.css | 2 +-
public/react/public/css/edu-common.css | 2 +-
.../shixunreport/OfficialAcademicTranscript.js | 16 ++++++++++++----
public/stylesheets/css/edu-common.css | 2 +-
public/stylesheets/educoder/edu-main.css | 2 +-
6 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/app/templates/shared/main.css b/app/templates/shared/main.css
index 9e9bc4f50..884f6fa37 100644
--- a/app/templates/shared/main.css
+++ b/app/templates/shared/main.css
@@ -344,7 +344,7 @@ a.edu-txt-w40,.edu-txt-w40{ width:40px; display: inline-block;text-align: center
.bor-grey01{border:1px solid #E6EAEB;}
.bor-orange{border:1px solid #FF7500;}
.bor-blue{border:1px solid #5faee3;}
-.bor-red{border:1px solid #db0505;}
+.bor-red{border:1px solid #db0505 !important;}
.bor-none{border:none;}
.bor-outnone{outline:none; border:0px;}
diff --git a/public/react/public/css/css_min_all.css b/public/react/public/css/css_min_all.css
index 5ffdc4db7..9bbf43e9b 100755
--- a/public/react/public/css/css_min_all.css
+++ b/public/react/public/css/css_min_all.css
@@ -533,7 +533,7 @@ input::-ms-clear{display:none;}
.bor-grey-d{border:1px solid #ddd;}
.bor-grey01{border:1px solid #E6EAEB;}
.bor-blue{border:1px solid #5faee3;}
-.bor-red{border:1px solid #db0505;}
+.bor-red{border:1px solid #db0505 !important;}
.bor-none{border:none;}
.bor-outnone{outline:none; border:0px;}
/*延时*/
diff --git a/public/react/public/css/edu-common.css b/public/react/public/css/edu-common.css
index a82fa22d2..6817312ad 100755
--- a/public/react/public/css/edu-common.css
+++ b/public/react/public/css/edu-common.css
@@ -536,7 +536,7 @@ input::-ms-clear{display:none;}
.bor-grey-d{border:1px solid #ddd;}
.bor-grey01{border:1px solid #E6EAEB;}
.bor-blue{border:1px solid #5faee3;}
-.bor-red{border:1px solid #db0505;}
+.bor-red{border:1px solid #db0505 !important;}
.bor-none{border:none;}
.bor-outnone{outline:none; border:0px;}
/*延时*/
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index f6f2067ad..19dce082e 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -9,7 +9,8 @@ class OfficialAcademicTranscript extends Component {
super(props);
this.state = {
loadingstate:true,
- datas:undefined
+ datas:undefined,
+ customsids:undefined
}
}
@@ -52,8 +53,14 @@ class OfficialAcademicTranscript extends Component {
if(score!=null&&score!=undefined&&score!=""){
if(score<0){
this.props.showNotification("调分不能小于0");
+ this.setState({
+ customsids:id
+ })
}else if(score>maxsum){
this.props.showNotification(`调分不能大于${maxsum}`);
+ this.setState({
+ customsids:id
+ })
}else{
let work_id=this.props.data.work_id;
let url=`/student_works/${work_id}/adjust_review_score.json`
@@ -72,7 +79,8 @@ class OfficialAcademicTranscript extends Component {
}
})
this.setState({
- datas:newdatas
+ datas:newdatas,
+ customsids:undefined
})
}else{
this.props.showNotification(result.data.message);
@@ -88,7 +96,7 @@ class OfficialAcademicTranscript extends Component {
}
render() {
- let {datas}=this.state;
+ let {datas,customsids}=this.state;
let columns=[{
title: '关卡',
@@ -183,7 +191,7 @@ class OfficialAcademicTranscript extends Component {
render: (text, record) => (
- this.editgame_scores(e,record.challenge_id.id,record.game_scores.game_score_full)}
// min={0} max={record.game_scores.game_score_full}
/>
diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css
index d785959fb..ad1d2598c 100644
--- a/public/stylesheets/css/edu-common.css
+++ b/public/stylesheets/css/edu-common.css
@@ -526,7 +526,7 @@ input::-ms-clear{display:none;}
.bor-grey01{border:1px solid #E6EAEB;}
.bor-orange{border:1px solid #FF7500;}
.bor-blue{border:1px solid #5faee3;}
-.bor-red{border:1px solid #db0505;}
+.bor-red{border:1px solid #db0505 !important;}
.bor-none{border:none;}
.bor-outnone{outline:none; border:0px;}
/*延时*/
diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css
index c66453b4c..62e052104 100644
--- a/public/stylesheets/educoder/edu-main.css
+++ b/public/stylesheets/educoder/edu-main.css
@@ -345,7 +345,7 @@ a.edu-txt-w40,.edu-txt-w40{ width:40px; display: inline-block;text-align: center
.bor-grey01{border:1px solid #E6EAEB;}
.bor-orange{border:1px solid #FF7500;}
.bor-blue{border:1px solid #5faee3;}
-.bor-red{border:1px solid #db0505;}
+.bor-red{border:1px solid #db0505 !important;}
.bor-none{border:none;}
.bor-outnone{outline:none; border:0px;}